OpenFortranProject / ofp-sdf

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

Format (FMT) ambiguous with nameless (NML) in io-control-spec #17

Closed rasmussn closed 7 years ago

rasmussn commented 7 years ago

The following read statement produces an ambiguity:

 READ(5, chem_inparm, IOSTAT=ierr)

because chem_inparm could be a format string or a namelist depending on context.

rasmussn commented 7 years ago

This issue was fixed by creating a new term FMT-or-NML to replace both FMT and NML specifiers when used in the second position in the list without FMT= or NML=. This removed the ambiguity from the parse forest but requires disambiguation during an analysis phase.