]> ocean-lang.org Git - ocean/commit
parsergen: include virtual symbols in table of non-terminals
authorNeilBrown <neil@brown.name>
Sun, 9 Jun 2019 22:35:36 +0000 (08:35 +1000)
committerNeilBrown <neil@brown.name>
Sun, 9 Jun 2019 22:35:36 +0000 (08:35 +1000)
commit5281589bf4d9a66ce106b160e1272f1c51d7ac15
tree45c175a529c76dc200ed19cace2d0028029e86bb
parent5b077f5f80cd36fed3b006dd5b0b1cc9025c1b22
parsergen: include virtual symbols in table of non-terminals

Symbol numbers assigned in grammar_analyse are in three groups:
 - predefined (NUMBER, STRING, etc)
 - Terminals
 - everything else: non-terminals and virtual.

When creating the non_term[] list of names, we need to include
virtual symbols in there, otherwise lookup by symbol-number
might find the wrong value - or might reach beyond end of array.

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