Context-Free Grammar → Pushdown Automaton Visualizer
Grammar (BNF):
E -> T E2 E2 -> + T E2 | ε T -> F T2 T2 -> * F T2 | ε F -> ( E ) | num
Clear Grammar
Input string:
( 2 + 3 ) * 4
Clear Input
Run
Speed:
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