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

lgcraymer lgc at mail1.jpl.nasa.gov
Tue Feb 24 11:50:18 PST 2004


You probably have no rule which references x--ANTLR automatically assumes that x will be invoked as an entry point to the grammar.

--Loring


--- In antlr-interest at yahoogroups.com, "dotlessbraille" <easjolly at i...> wrote:
> 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