[antlr-interest] 2 C-target questions
Johannes Luber
jaluber at gmx.de
Wed Oct 3 05:47:33 PDT 2007
Gavin Lambert wrote:
> At 22:22 3/10/2007, Corno Schraverus wrote:
>> If I have labeled a token (like this: myToken=IDENT ), how can I then
>> get the text of that token? (similar like myToken->getText() for C++
>> in ANTLR2).
>
> Just use $myToken.text. The codegen should translate that into the
> appropriate bit of code no matter what target language you're using.
>
That's not true for at least the C# target. I've wrote about it on the
appropriate wiki page.
Best regards,
Johannes Luber
More information about the antlr-interest
mailing list