[antlr-interest] False error 208?

Bart Kiers bkiers at gmail.com
Mon Oct 24 08:20:03 PDT 2011


Hi Jim,

No, that doesn't make a difference: the error (IF can never be matched)
still remains.
Not that _I_ know what is going wrong though...

Regards,

Bart.


On Mon, Oct 24, 2011 at 5:09 PM, Jim Idle <jimi at temporal-wave.com> wrote:

> parse    :    IF* EOF;
>
>
> Jim
>
> > -----Original Message-----
> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of Bood Qian
> > Sent: Monday, October 24, 2011 1:29 AM
> > To: antlr-interest at antlr.org
> > Subject: [antlr-interest] False error 208?
> >
> > I don't understand why the following grammar leads to error 208
> > complaining IF will be never matched
> >
> > ANTLRWorks 1.4.3
> > ANTLT 3.4
> > =====================
> > grammar test;
> >
> > @lexer::members {
> >   private boolean rawAhead() {
> >   }
> > }
> >
> > parse    :    IF*;
> >
> > RAW    :    ({rawAhead()}?=> . )+;
> > IF      :    'if';
> > ID    :    ('A'..'Z'|'a'..'z')+;
> > ======================
> >
> > Either remove RAW rule or ID rule solves the error...
> > >From my point of view, IF has the possibility to be matched.
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> > email-address
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list