How to Enter a Grammar
JFLAP allows one to enter in and parse both context-free grammars and unrestricted grammars.
We will begin by entering a context-free grammar. To start a new grammar, start JFLAP and click the Grammar option from the menu, as shown below:
You should be able to see a grammar window that looks like the screen below. You can enter your start variable and its production on the first row. The variable should be entered on the leftmost column and the right side of the production on the rightmost column. The middle column is going to be an arrow indicating the production. You can enter the grammar as shown below. (Or you could load the file contextfreeGrammar.jff)
*NOTE : Do not enter blanks in the grammar.
When you are finished, your grammar editor window should look like this.
This grammar represents the language anbmcp where m=n+p, n>0, p>0.
Congratulations, you have just entered your first grammar in JFLAP.
This concludes our brief tutorial on Enter Grammar. Thanks for reading!