LR1State closure must merge lookaheads of matching items
rick-masters opened this issue · comments
rick-masters commented
In LR1State closure method, new items are created with lookaheads. In some cases, items may be created that differ only by lookahead sets. These states must be merged together otherwise duplicate transition will be created in LR1Parser and incorrect tables are created.
Reproducing this requires a large and complicated grammar and diagnostics that show the duplicate items and transitions. That would require more time to prepare than I have so I'll just be sending over another pull request with the fix.
rick-masters commented
Resolved by PR #5.