]> ocean-lang.org Git - ocean/commit
parsergen: be careful shifting TK_error
authorNeilBrown <neil@brown.name>
Mon, 19 Feb 2018 05:31:14 +0000 (16:31 +1100)
committerNeilBrown <neil@brown.name>
Mon, 19 Feb 2018 05:31:14 +0000 (16:31 +1100)
commitd28c54dc30f0b4322ffb2ecbbfcee9a566052d4b
tree516e8992fb31a6a92d9d854184b7954245112631
parent5e49e8477111fab2af5314dca964ef89c87361fe
parsergen: be careful shifting TK_error

shift() behaved a little differently when p.tos == 0,
and if the stack is completely empty, there is little
point trying to shift TK_error as there is no state
to work with.

So rearrange the loop slightly.

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