Skip to content

Commit

Permalink
Parsing # sign inserted by preprocessor in fixed Form Fortran
Browse files Browse the repository at this point in the history
In Fortran a file that is included is replaced by the doxygen preprocessor by something like:
`#    11 "<path>/<filename>" 2`
when this is in fixed form Fortran and the `<path>/<filename>` is long it is possible that the closing double quote is beyond position 72 and thus not seen resulting in:
```
Error in file <path>/<filename> line: 73, state: 22(String)
```
this is caused as the `#` is not handled properly in prepassFixedForm. The `#` should be handled analogous to e.g. `C`.
  • Loading branch information
albert-github committed Aug 30, 2019
1 parent 6fe6275 commit 78564ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fortranscanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
}
inBackslash = FALSE;
// fallthrough
case '#':
case 'C':
case 'c':
case '*':
Expand Down

0 comments on commit 78564ea

Please sign in to comment.