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

dotlessbraille easjolly at ix.netcom.com
Tue Feb 24 11:42:42 PST 2004


I have a question about the simple parser rule
x: (A)(B)? ;
The generated Java for the rule requires an
EOF if there is not a B. What am I doing wrong?

match(A);
switch ( LA(1)) {
 case B:			
  match(B);			
  break;			{
 case EOF:
  break;	
 default:
  throw new NoViableAltException(...);
}	

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