[antlr-interest] Method getText not available in Lexer ?
Jim Idle
jimi at temporal-wave.com
Mon Sep 8 08:23:17 PDT 2008
On Mon, 2008-09-08 at 15:40 +0200, lars.vonwedel at bayertechnology.com
wrote:
>
> Hello,
>
> I tried to implement the approach for implicitly handling abbreviated
> keywords as described in the Wiki:
>
> http://www.antlr.org/wiki/pages/viewpage.action?pageId=1802308
>
> However, the lexer doesn't seem to have a getText method which makes
> some sense to me. But I can't figure out, how to do it correctly.
>
> Any hint ?
You just use the reference $text the lexer rules are in the process of
building the token, so there is no token to de-reference in the actions.
There is also $pos and so on.
Jim
>
> Thank you and Best Regards
>
> Lars von Wedel
> _________________________________________
>
> Bayer Technology Services GmbH
> BTS-PT-PD-ES
> Leverkusen, E 41
> E-mail: lars.vonwedel at bayertechnology.com
> Web: www.bayertechnology.com
>
> Geschäftsführer: Achim Noack
> Aufsichtsratsvorsitzender: Dr. Wolfgang Plischke
> Sitz der Gesellschaft: Leverkusen | Eintragung: Amtsgericht Köln,
> HRB 49896
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080908/f2d6f49c/attachment.html
More information about the antlr-interest
mailing list