]> ocean-lang.org Git - ocean/commit
parsergen: store reduction information separate from states.
authorNeilBrown <neil@brown.name>
Sat, 13 Nov 2021 08:25:23 +0000 (19:25 +1100)
committerNeilBrown <neil@brown.name>
Sat, 13 Nov 2021 22:50:58 +0000 (09:50 +1100)
commit212f45a62c9e8a05a5df6b9e933619a86a9bd05b
tree25ff1e97d1da1234793851a0f008f84b1b10d5fd
parent45da2641b117c266e07e8aa306b92913ea5ab214
parsergen: store reduction information separate from states.

There are more states than reductions (aka productions) so storing the
reduction data in the state table results in a lot of duplication - and
wasted space as some states have no reduction.

So create a separate table of reduction information.  This will also
make it easier to allow a state to have multiple reductions with LALR
and canonical-LR grammars.

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