f90nml
f90nml copied to clipboard
Namelist without group name but with content incorrectly sets group as first variable.
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.