[antlr-interest] Comment rule matches links

Jenny Balfer ai06087 at Lehre.BA-Stuttgart.De
Tue Aug 26 06:16:14 PDT 2008


> There is no standard way. You could override nextToken to keep a copy.
> Or you could pass the lexer a copy of the token stream. The LA\LB
> methods won't work as it's being built but you could use getToken()
> and just find the last non-hidden one. Or you could subclass the
> existing CommonTokenSream to provide access to the protected internals
> where tokens.get(skipOffTokenChannelsReverse(tokens.size() - 1))
> should do it.
> 
> Tom.

I think I found a solution here:
http://www.antlr.org/pipermail/antlr-interest/2008-April/027625.html

Thanks a lot!



More information about the antlr-interest mailing list