Overview
LALR parsing keeps much of LR parsing's power while reducing table size, which made it common in parser generators.
Builds compact LR-style parse tables by merging states with the same cores.
Compact metadata for implementation and discovery.
LALR parsing keeps much of LR parsing's power while reducing table size, which made it common in parser generators.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(parse table)
merge states when LR(0) cores matchCombines compatible LR states while preserving lookahead actions.
Show grammar items, parser states, and consumed input as parsing progresses.
LALR Parsing should be used with the assumptions and tradeoffs of bottom-Up Parsing in mind.
What each reference supports for this entry.
Compiler textbook support for LALR Parsing's grammar analysis, parser construction, and implementation constraints.
Specific reference for practical LR-family parser construction and state merging used by LALR parsing.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
LALR parsing merges LR item sets to reduce parse table size.