[antlr-interest] DFA ignoring my input

Michael Leibow leibow at xelic.com
Fri Dec 11 15:27:15 PST 2009


I've taken a tiny subset of a VHDL 2002 grammar I've been working on (and
having problems with) to elicit some help.  Please help me before I run out
of hair.

I've attached the grammar description (bug.g) and a parse tree picture from
AntlrWorks 1.3.1 the debugger trying to parse this, "blargh'(smile) * 97"
starting at rule "expression."

In my original grammar, the DFA at production name ignores certain input
tokens and returns an exception.  This grammar has an almost exact same
problem although the DFA is different.  In my original grammar, the "name"
production seems to always ignore APOSTROPHE.  In this example, the
RIGHTPAREN after the "smile" is ignored.

The same bug shows up in the Java and Python parsers so I must be doing
something wrong.  Ideas?

k=1

Thanks ahead of time!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091211/f79e14d6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.jpg
Type: image/jpeg
Size: 31664 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20091211/f79e14d6/attachment.jpg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.g
Type: application/octet-stream
Size: 6769 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20091211/f79e14d6/attachment.obj 


More information about the antlr-interest mailing list