[antlr-interest] ANTLR not reporting error for malformed program

Vitaliy Vitaliy at dbsophic.com
Thu Nov 6 08:28:50 PST 2008


Hi Matt,



Had exactly the same problem.

What you need to do is

"Add EOF to the end of your top-level parser rule.",

As Gavin had told me.



Gavin - thanks again!



Enjoy,

Vitaliy



From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Dejas Ninethousand
Sent: Thursday, November 06, 2008 18:21
To: antlr-interest Interest
Subject: [antlr-interest] ANTLR not reporting error for malformed program



I know I saw something about this on the ANTLR web site a while back, but I can't find it now for the life of me.  I have some program text that does not conform to my grammar.  If thought of as a long string, about the first half of the string conforms to the cfg but then does something blatantly wrong from a grammar standpoint.  When ANTLR processes the program it consumes and parses the valid part of the program and then stops as if only the first half of the program string was the entire program string.  I do not see tokens pass by for the 2nd half of the malformed program (and as consiquence, no error is generated).  Can someone point me to the part of the web site that discusses this issue?

Thanks,
Matt



__________ Information from ESET NOD32 Antivirus, version of virus signature database 3591 (20081106) __________



The message was checked by ESET NOD32 Antivirus.



http://www.eset.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081106/17f20737/attachment.html 


More information about the antlr-interest mailing list