LL(1) Workbench — From Grammar to Table-Driven Parser
Prepare a grammar, derive FIRST and FOLLOW as least fixed points, build the LL(1) table, and then watch the table drive a stack-based parser.
Edit or enter a grammar
ASCII syntax: use ->, |, and epsilon. Separate symbols with spaces. A name appearing on a left-hand side is a nonterminal; every other symbol is a terminal.
→
→
→
Current form
Grammar
Preconditions and opportunities
Diagnostics
← → step · Space play/pause
FIRST
Analyzing
Numbered rules
Grammar
Least fixed points
FIRST and FOLLOW
| Nonterminal | FIRST | FOLLOW |
|---|
Production selected by lookahead
LL(1) parse table
Scanner output
Input tape
Top at the right
Parser stack
Expanded by table entries