LR(0) Workbench — Item Sets, DFA, Table, and Parser
Augment a grammar, build its canonical collection of LR(0) item sets, draw the viable-prefix DFA, derive its ACTION and GOTO table, and parse an input one action at a time.
Edit or enter a grammar
ASCII syntax: use ->, |, and epsilon. Separate symbols with spaces. A symbol appearing on a left-hand side is a nonterminal; every other symbol is a terminal.
Canonical collection
LR(0) item sets
Transitions on grammar symbols
DFA recognizing viable prefixes
Every state accepts a viable prefix. Node labels additionally show R for a completed production, A for the accepting parser configuration, and ! for a parsing-table conflict.
One row per item-set state
LR(0) parsing table
Separate tokens with spaces;
$ is appended automatically.
← → step
Unread token highlighted
Input
Top at the right
Grammar symbols and DFA states
Orange cell is consulted now
Current ACTION/GOTO lookup
Built by reductions