[antlr-interest] Re: Problem with x: (A)(B)? ;

dotlessbraille easjolly at ix.netcom.com
Wed Feb 25 07:29:40 PST 2004


OK, let me try again.

I have a large grammar which works fine. Lexer rules of the form 
A:'a'('b')? and A:'a'('b')* both generate the expected 
implementation (in Java).  A parser rule of the form x:A(B)* also 
works as expected.  

However, when I added a parser rule of the form x:A(B)?, ANTLR 
generated a switch statement which requires an EOF in the case there 
is not a B.

Is this a bug or a feature?

Thanks.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list