Context-Free Grammar → Pushdown Automaton Visualizer

expanding a nonterminal (production applied) symbols pushed terminal matched / popped
Symbols on the left of -> (or ::=) are nonterminals; everything else is a terminal. Use ε, eps, or an empty alternative for the empty string. Tokens in the input must be separated by spaces; the terminal num matches any integer.
Grammar (BNF) — current production highlighted
Pushdown Automaton Stack