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:
parent
59fd190695
commit
f7e4445358
3 changed files with 27 additions and 19 deletions
|
|
@ -13,7 +13,6 @@ typedef struct {
|
|||
TSStack right_stack;
|
||||
size_t total_chars;
|
||||
TSTree *lookahead;
|
||||
TSTree *next_lookahead;
|
||||
const TSLanguage *language;
|
||||
} TSParser;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue