[antlr-interest] Resolving ambiguity
Gavin Lambert
antlr at mirality.co.nz
Fri May 4 16:52:07 PDT 2007
At 11:28 5/05/2007, Stefan wrote:
>I believe it should be just like you've written, but I had to
>write input.LT(1), because it wouldn't compile otherwise. Is it
>a bug? Which one is right?
No, input.LT(1) is correct for ANTLR v3 and Java. I don't use
them too often myself so I frequently get mixed up between some of
the other variations (in both ANTLR2 and the C target for ANTLR3
you just use LT(1), so that's the one I tend to remember).
More information about the antlr-interest
mailing list