[antlr-interest] Re: how to eliminate non-determinism warnings upon keywords and literals?
Fan Yang
yhhf_dy at yahoo.com
Thu Mar 11 12:59:30 PST 2004
Hi Lubos,
Thanks much for your answer! That's exact what I want.
Thanks,
Fan
--- In antlr-interest at yahoogroups.com, "Lubos Vnuk" <lubos.vnuk at r...>
wrote:
> > I have tried "turn off the testLiterals option", but the
> > warnings are still there.
> I meant: use the tokens section, delete your non-ID rules and be
sure
> to use testLiterals=false.
>
> Then you can do something like this:
> ID : ('a'..'z')+
> {$setType(testLiteralsTable(ID));
> if (_ttype==TOKEN_IFDEF).......semantic actions........ }
> ;
>
> Regards,
> Lubos.
>
> --- In antlr-interest at yahoogroups.com, "Fan Yang" <yhhf_dy at y...>
> wrote:
> > thank you very much for your response.
> >
> > > Why not put semantic actions in the parser?
> > I need semantic actions in the lexel.
> >
> > > Or you could turn off the testLiterals option, call
> > > testLiteralsTable
> >
> > I have tried "turn off the testLiterals option", but the warnings
> are
> > still there.
> >
> > Other suggestions?
> >
> > thanks,
> >
> > Fan
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