f90nml icon indicating copy to clipboard operation
f90nml copied to clipboard

Namelist without group name but with content incorrectly sets group as first variable.

Open marshallward opened this issue 4 years ago • 0 comments

This follow namelist should fail parsing, but does not:

&
    x = 1
/

It instead produces the following namelist:

Namelist([('x', Namelist([('x', 1)]))])

Our naive test for group name is insufficient, since we are still doing a blanket lookahead, and believe the first variable name is the group name.

This needs to be addressed, but may require a new parser which does not rely on persistent single-token lookahead.

marshallward avatar Jul 26 '20 15:07 marshallward