[antlr-interest] More Infinite Recursion

Chris Poirier cpoirier at dreaming.org
Thu Jan 29 21:20:32 PST 2004


Hi Jason, jbb,

> Jason :-
>
> You wrote:
> >Imagine I've got the following rule:
> >
> >memory:
> >  A B
> >  |
> >  memory C D
> >  |
> >  E F G
> >  |
> >  H I J
> >  |
> >  memory K
> >  |
> >  memory L
> >  |
> >  M N O
> >  ;
>
> I think your rule should be:
>
> memory:
>   ( A B | E F G | H I J | M N O ) ( C D | K | L )+
> ;

Looks right, except I think you meant *, not +, on the second term:

   ( A B | E F G | H I J | M N O ) ( C D | K | L )*

Right?

Later,
   Chris.



 

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