This is a C recursive descent parser that recognizes DFA specifications and strings. For example the following specifies a DFA with two states A and B, where A is the initial state (by default since listed first) and B is a final state, since it has an epsilon production. This machine recognizes the language a*b(a|b)*. After the machine, there are some number of strings to be tested.
A --> a A A --> b B B --> a B B --> b B B --> aaab ababa aThe grammar for this parser (not in LL form):
dfa --> dfa_rules EOL strings dfa_rules --> dfa_rules rule | rule rule --> NT PRODUCE T NT EOL | NT PRODUCE EOL strings --> strings string EOL | string EOL string --> string T |