OpenFortranProject / ofp-sdf

SDF grammar for Fortran 2008 with constructors for AST
Other
23 stars 7 forks source link

Older style assumed length character*(*) string fails to unparse #16

Closed rasmussn closed 7 years ago

rasmussn commented 7 years ago

The following will parse ok but fails to unparse because it isn't transformed to the correct FAST representation:

character() :: string end

The FAST ATerm representation is CHARACTER(IntVal(CharLength(STAR()))) and should be CHARACTER(STAR())

rasmussn commented 7 years ago

Issue fixed by adding to the rule ofp-to-ast:

  LengthSelector_STAR(CharLength(STAR())) ; ! STAR()