[antlr-interest] literals.
Oliver Zeigermann
oliver at zeigermann.de
Tue Dec 9 23:00:06 PST 2003
This looks like you need more lookahead, k=3 should do to distinguish
"in" from "instanceof".
"in" : LA(1)=i, LA(2)=n, LA(3)=?
"instance" : LA(1)=i, LA(2)=n, LA(3)=s
Oliver
cesar octavio lopez nataren wrote:
> Hello, I have this rule:
>
> rel_expr rel_op shift_exp;
>
> and rel_op is "instanceof" and "in", I get the warning:
>
> warning:nondeterminism between alts 1 and 2 of block upon
> jscript.g:573:11: k==1:"in"
>
> how can I handle this?
>
> I tried putting the lexical rule:
>
> IN: "in";
>
> but It messes with my IDENTIFIER rule.
>
> suggestions?
>
> Thanks in advanced.
>
>
> César
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list