-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fortran: fixed support of "dotted" keywords
This patch adds a pattern to correctly match keywords delimited by dots (.). The pattern also follows the following rules from the format: - keywords names start with a letter (or dot). - names should only contain latin characters, digits or the underscore symbol. - identifiers starting with a dot must end with a dot.
- Loading branch information
Julien Bloino
committed
Apr 25, 2024
1 parent
f5a2f11
commit 76cab81
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<span class="hljs-keyword">logical</span> :: A=<span class="hljs-literal">.true.</span>, B=<span class="hljs-literal">.false.</span>, C=<span class="hljs-literal">.true.</span>, D=<span class="hljs-literal">.false.</span> | ||
<span class="hljs-keyword">logical</span> :: E | ||
|
||
E = <span class="hljs-number">3</span> < <span class="hljs-number">4</span> <span class="hljs-keyword">.and.</span> B | ||
E = <span class="hljs-string">'ij'</span> <= <span class="hljs-string">'ijk'</span> <span class="hljs-keyword">.and.</span> C | ||
E = B <span class="hljs-keyword">.or.</span> A <span class="hljs-keyword">.and.</span> D | ||
E = (B <span class="hljs-keyword">.or.</span> A) <span class="hljs-keyword">.and.</span> C | ||
E = A <span class="hljs-keyword">.and.</span> <span class="hljs-keyword">.not.</span>B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
logical :: A=.true., B=.false., C=.true., D=.false. | ||
logical :: E | ||
|
||
E = 3 < 4 .and. B | ||
E = 'ij' <= 'ijk' .and. C | ||
E = B .or. A .and. D | ||
E = (B .or. A) .and. C | ||
E = A .and. .not.B |