The Implementations of Advanced LR Parser Algorithm
summary
Implements the 2010 ILR algorithm inside the Ruby LR generator Yammer and ships as an option in the 0.7 branch (clone GitHub to avoid an experimental bug). Resolves mysterious conflicts by propagating lookahead annotations, splitting states on compatibility failures, and recalculating filtered lookahead sets. Engineering fixes—loop guards, caching, precomputed SCC, and pruning of unnecessary annotations—reduce parser-generation from effectively hours to about 1 minute. Generated ILR parsers produce automata that diff-identically match existing LLR output for compatibility.
AI-written summary · about
chapters (13)
- 0:00Introduction and speaker intro
- 2:08Overview of Yammer and ILR
- 5:17LR parser basics and theory
- 7:23Shift-reduce conflicts and lookahead
- 11:35LLR vs ILR lookahead sets
- 16:30Conflicts in parser generation
- 17:12Pushdown automaton model
- 20:24Implementation details in Lyama
- 21:26ILR implementation fundamentals
- 23:33Compatibility in ILR states
- 26:20Debugging and performance issues
- 28:57Applying ILR to Ruby
- 30:39Future work and acknowledgments
related talks
29mHow does Lrama make the Ruby parser grammar G.O.A.T.?
15mFaster Reachability Analysis for LR(1) Parsers
26mLiberating Ruby's Parser from Lexer Hacks
30mA reference GLL implementation
46mGrammar a BNF like Ruby DSL Parsing
32mTime flies like an arrow; Fruit flies like a banana: Parsers for Great Good
31mTime flies like an arrow, fruit flies like a banana
22mLinker Relaxation in LLD
