Re: ( A | B )* A
- From: Sreenivas Viswanadha <sreeni@xxxxxxxxxxxxxx>
- Date: Sun, 01 Jan 2006 00:02:40 -0800
Sreenivas Viswanadha wrote:
kurstk@xxxxxxxxx wrote:
Hi,
I have ( A | B )* A in my grammar file, but javacc gives a warning about the lookahead and it doesn't work. Is there a better way to write this? I just want the input to be zero or more combinations of A or B and always end with A.
While you may be able to come up with something like ( A | (B* A) )+ for
Actually, you can just do (B* A)+, but I would still stick to using actions to give an error and continue.
Sreeni, .
- Follow-Ups:
- Re: ( A | B )* A
- From: kurstk
- Re: ( A | B )* A
- References:
- Re: ( A | B )* A
- From: Sreenivas Viswanadha
- Re: ( A | B )* A
- Prev by Date: Re: ( A | B )* A
- Next by Date: Re: ( A | B )* A
- Previous by thread: Re: ( A | B )* A
- Next by thread: Re: ( A | B )* A
- Index(es):