Skip to content

Commit

Permalink
issue #8867 Fortran source file that contains the character literal "…
Browse files Browse the repository at this point in the history
…import" or 'import'

Problem is that a bit a greedy rule:
```
<*>"import"{BS}/"\n"                    |
<*>"import"{BS_}                        {
```
though in this case we should have used a specific rule for a `String`, by rejecting the match in case of a `String` we will get the correct results.
  • Loading branch information
albert-github committed Nov 1, 2021
1 parent 09fb676 commit ed749f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fortrancode.l
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
<*>"import"{BS}/"\n" |
<*>"import"{BS_} {
if (YY_START == String) REJECT;
startFontClass(yyscanner,"keywordtype");
codifyLines(yyscanner,yytext);
endFontClass(yyscanner);
Expand Down

0 comments on commit ed749f5

Please sign in to comment.