Overview
LR(1) item-set construction computes closure and goto sets over dotted grammar productions plus one-symbol lookahead. The resulting automaton drives canonical LR parsing tables.
Builds canonical LR(1) parser states from grammar items with lookahead symbols.
Compact metadata for implementation and discovery.
LR(1) item-set construction computes closure and goto sets over dotted grammar productions plus one-symbol lookahead. The resulting automaton drives canonical LR parsing tables.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n log n)
Worst
O(n^2)
Space
O(n)
Show closing and transitioning item sets with one-symbol lookahead on a small lr parser construction example.
LR(1) precision reduces conflicts but can produce many parser states.
What each reference supports for this entry.
Original LR parsing reference for LR item sets and deterministic bottom-up parsing.
Open sourceCompiler textbook support for LR(1) Item Set Construction's grammar analysis, parser construction, and implementation constraints.
Good next jumps from the relationship graph, ranked for useful discovery.
LR(1) closure uses FIRST-style lookahead propagation.
LALR parsing merges compatible LR(1) states to reduce table size.