fortran-src icon indicating copy to clipboard operation
fortran-src copied to clipboard

Comment between continuation lines in F77 breaks lexer

Open dorchard opened this issue 7 years ago • 1 comments

Example:

      SUBROUTINE lex
      IMPLICIT NONE
      INTEGER X, Y,
c break
     &   ZZ
      
      END

Remove the comment and the problem goes away.

dorchard avatar Apr 05 '17 14:04 dorchard

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.

gridaphobe avatar Mar 16 '18 17:03 gridaphobe