Handle goto actions after reductions in a more standard way

Rather than letting the reduced tree become the new lookahead symbol,
and re-adding it to the stack via a subsequent shift action, just
add it to the stack as part of the reduce action. This is more in
line with the way LR is described traditionally.
This commit is contained in:
Max Brunsfeld 2015-05-27 10:53:02 -07:00
parent 59fd190695
commit f7e4445358
3 changed files with 27 additions and 19 deletions

View file

@ -13,7 +13,6 @@ typedef struct {
TSStack right_stack;
size_t total_chars;
TSTree *lookahead;
TSTree *next_lookahead;
const TSLanguage *language;
} TSParser;