Help
Every terminal/non-terminal needs to be in a seperate input field. (for both the grammar and the word).
There is no
|
so A -> A B | a
for example is entered as A -> A B
and A -> a
.Which symbols are terminal, and which non-terminal, is automaticaly deduced from which symbols are present on the left-hand-side.
1
Help
Rules are of the form
lhs → rhs
(you can use ->
or →
).Right-hand-sides can have multiple options seperated with
|
.ɛ
may also be written as epsilon
or EPSILON
.Terminals in a word need to be seperated by spaces.
Here are some example grammars:
if_expr → IF bool THEN bool if_tail
if_tail → ELIF bool THEN bool | ELSE bool | ɛ
bool → TRUE | FALSE
S -> A B | +
A -> A A | 0
B -> 1 | 2 | S S
Input