]> ocean-lang.org Git - ocean/commit
parsergen: fix return of final result.
authorNeilBrown <neilb@suse.de>
Sun, 15 Jun 2014 07:59:27 +0000 (17:59 +1000)
committerNeilBrown <neilb@suse.de>
Sun, 15 Jun 2014 07:59:27 +0000 (17:59 +1000)
commit1c4f8cfc5db843715598120335310472621a49a4
tree1211d781c19ecf2283120ec8779781dc25eec42a
parent04b0a192798804088ed75c39371a663c97e12d2a
parsergen: fix return of final result.

We cannot really shift the final result onto the stack, because
there is not 'goto' for '$eof' in that final state.

So if the shift() fails, hold onto the result and ultimately return it.
This means we don't need to pop it off the stack at the end.

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