[antlr-interest] State Machines Galore

Jeff Barnes jbarnesweb at yahoo.com
Thu Jan 5 20:23:52 PST 2006


Thanks, Terrence, for the project/assignment posted at
http://www.cs.usfca.edu/~parrt/course/652/projects-Spring-2004/nfa.html.

You said the following NFA generates (a | b | c):

.s0 -> .a1 -> . -a-> . -> .s5 -> :
       .a2 -> . -b-> . -> @s5
       .a3 -> . -c-> . -> @s5
@a1 -> @a2
@a2 -> @a3

What not use a simpler graph?

.s0 -> .a1 -a-> .s5 -> :
       .a2 -b-> @s5
       .a3 -c-> @s5
@a1 -> @a2
@a2 -> @a3

Where can I find more info about constructing NFA's?
Thanks again for the web page.

Regards,
Jeff



More information about the antlr-interest mailing list