]> ocean-lang.org Git - ocean/commit
parsergen: add more power to symbol references in generated code
authorNeilBrown <neil@brown.name>
Sun, 11 Oct 2020 03:49:07 +0000 (14:49 +1100)
committerNeilBrown <neil@brown.name>
Sun, 11 Oct 2020 03:49:07 +0000 (14:49 +1100)
commitd7f2c9af259a43cbdb8def0ebe8040deed480848
tree34fb68c1631e149b986b8db46e1b64169eacff80
parent984be32382c8e191600f1ff6643c4280dc5d2597
parsergen: add more power to symbol references in generated code

As well as symbol references like "$2", you can now use references
with letters like "$Ss".  This will find the shortest symbol in the
production that contains all the given letters in the given order.
There must be a unique shortest symbol.

If that same symbol occurs multiple times, later instances can be given
with a numeric suffix such as "$Ss2".

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