]> ocean-lang.org Git - ocean/commitdiff
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)
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>

No differences found