Input your context-free grammar (CFG) here. The start symbol has already been filled in for you.
The left-hand nonterminal of each production must be filled in.
[ ε ] - An empty text field corresponds to epsilon.
[ | ] - For "or", use the standard pipe character that you use while coding.
Input is case-sensitive. Whitespace is not ignored.
Verify
This is the CFG you have input above:
Test
To test the CFG above, input test strings here, one per line. An empty line corresponds to the empty string. Results will be shown automatically. Derivations may not be available for longer strings or complex grammars.
Test Results for CFG
#
String
Matches
About
Created by Christopher Wong. Stanford University, 2014.
Parser implementation is based on the Earley Parser algorithm.