[antlr-interest] DFA ignoring my input

Jim Idle jimi at temporal-wave.com
Fri Dec 11 16:08:24 PST 2009


You mean you have set k=1? You should remove that option. Also be careful with VHDL  - you cannot go by the normative spec and just type it in, you have to left factor all the descriptions.
 
Jim
 
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Michael Leibow
Sent: Friday, December 11, 2009 3:27 PM
To: antlr-interest
Subject: [antlr-interest] DFA ignoring my input
 
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/b88d23b3/attachment.html 


More information about the antlr-interest mailing list