Use this window to configure the interactive with your own set of grammar productions.
The syntax is a simplified YACC syntax:
Begin each line with a non-terminal and colon (:), and end it with a semicolon (;).
Between the colon and semicolon, list replacements for the non-terminal separated by vertical bars (|).
Enclose terminals with inverted commas (').
Separate non-terminals from each other, and terminals from non-terminals, with spaces.
Spaces, colons, semicolons, vertical bars and inverted commas are all reserved for defining the productions and should not be used in the productions themselves.
Ampersands (&) and equals (=) are reserved for interpreting the url and should not be used either.
The default grammar productions can be obtained from:
E:N|E '+' E|E '*' E|'-' E|'(' E ')';
N:'0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9';
Provide your own examples that a user can try to match.
Generate new examples by following your productions at random.
Context-free Grammar Parsing Challenge
Use the available productions to build an equation. Click the non-terminal below to replace it.