[antlr-interest] Why does it silently ignore invalid input?

Terence Parr parrt at jguru.com
Wed Jun 4 10:01:41 PDT 2003


If anything is optional and it doesn't find DECLARE, it will simply say 
"matching 'nothing' is ok" :)

Ter

On Wednesday, June 4, 2003, at 09:32  AM, Paul J. Lucas wrote:

> I have a grammar with a second entry-point that I call.  In my 
> grammar, "DECLARE" is
> a keyword (must be upper-case).  When the generated parser encounters 
> "declare"
> (lower-case), it simply breaks out of the parse loop and returns.  Why 
> doesn't it throw
> an exception?
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
>
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list