Reuse nodes based on state matching, not sentential form validity

I think that state matching is the only correct strategy for incremental
node reuse that is compatible with the new error recovery algorithm. It's
also simpler than the sentential-form algorithm. With the compressed parse
tables, state matching shouldn't be too conservative of a test.
This commit is contained in:
Max Brunsfeld 2016-07-17 13:35:43 -07:00
parent 0ee1994078
commit 87ca3cb099
3 changed files with 137 additions and 160 deletions

View file

@ -173,7 +173,7 @@ describe("Document", [&]() {
AssertThat(debugger->messages, Contains("new_parse"));
AssertThat(debugger->messages, Contains("lookahead char:'['"));
AssertThat(debugger->messages, Contains("reduce sym:array, child_count:4, fragile:false"));
AssertThat(debugger->messages, Contains("reduce sym:array, child_count:4"));
AssertThat(debugger->messages, Contains("accept"));
});