Repository navigation
Fix missing IELR splits for nested rules - #871
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
State#annotate_predecessoronly propagated conditional contributions through predecessor kernels on the transition lane. For an item one symbol into its rule, lookaheads can come from enclosing rules whose kernels are outside that lane. Dropping those contributions prevented necessary IELR state splitting and made the generated parser reject valid inputs.Propagate all conditional kernels returned by
lhs_contributionsfor these items, following Bison's predecessor-annotation calculation (https://github.com/akimd/bison/blob/v3.8.2/src/AnnotationList.c#L249-L273).For example:
Previously this produced 17 states with a reduce/reduce conflict and rejected
axyeandbxyd. It now produces 19 states without conflicts and accepts all four valid inputs, matching Bison 3.8.2. Add regression coverage for contributions outside the transition lane, nested tails of one to three symbols, and the generated parser.