]> ocean-lang.org Git - ocean/commit
parsergen: implement new handling of IN/OUT and NEWLINE
authorNeilBrown <neil@brown.name>
Wed, 10 Mar 2021 00:38:55 +0000 (11:38 +1100)
committerNeilBrown <neil@brown.name>
Wed, 10 Mar 2021 01:01:11 +0000 (12:01 +1100)
commite9af634f13a0957cd510052483b6f9e35a986596
treeee362703a70a04685a45a275c6c0f3f6cdfd5e81
parent29614f479bd2539b7401dc2e5b0df649727a15d8
parsergen: implement new handling of IN/OUT and NEWLINE

IN/OUT are now expected in the grammar.
In a state where an IN can be shifted, IN symbols are significant to the
grammar.  IN symbols appearing anywhere else are ignored (except for how
they affect NEWLINEs).

OUT symbols are ignored precisely when the matching IN was ignored.

NEWLINEs are ignored if the most recent IN was ignored, otherwise they
are significant for the grammar.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/parsergen.mdc