fortran-src
fortran-src copied to clipboard
Comment between continuation lines in F77 breaks lexer
Example:
SUBROUTINE lex
IMPLICIT NONE
INTEGER X, Y,
c break
& ZZ
END
Remove the comment and the problem goes away.
https://github.com/camfort/fortran-src/pull/58 addresses this in the Fortran77Legacy
mode, though it throws the comments away.
I know GHC has done some work on preserving comments that can appear anywhere in the source code. That might be a good place to look if you want a parse<->print isomorphism including arbitrary comments.