Split parse stack when there are multiple parse actions

This commit is contained in:
Max Brunsfeld 2015-07-08 17:34:21 -07:00
parent f26ddf5187
commit aff8bc3266
12 changed files with 1563 additions and 907 deletions

View file

@ -74,6 +74,11 @@ ParseStackEntry *ts_parse_stack_entry_next(const ParseStackEntry *, int);
*/
bool ts_parse_stack_push(ParseStack *, int head, TSStateId, TSTree *);
/*
* Add an alternative tree for the given head of the stack.
*/
void ts_parse_stack_add_alternative(ParseStack *, int head, TSTree *);
/*
* Pop the given number of entries from the given head of the stack. This
* operation can increase the number of stack heads by revealing multiple heads
@ -94,6 +99,11 @@ void ts_parse_stack_shrink(ParseStack *, int head, int count);
*/
int ts_parse_stack_split(ParseStack *, int head);
/*
* Remove the given head from the stack.
*/
void ts_parse_stack_remove_head(ParseStack *, int head);
/*
* Remove all entries from the stack.
*/