[antlr-interest] assign a derived token to the lexer
Thomas Krebs
Thomas_Krebs at gmx.de
Tue May 27 04:13:32 PDT 2003
Ric Klaren wrote:
>
> Make sure your token is derived of CommonToken, then make a RefToken of
> your new token (not a RefCount<ADerived> or you have to cast static_cast
Ah, I actually did that and that was my problem.
> them :( ). When trying to access your own token you would then have to use
> the get() method to access the underlying pointer to the refcounter then
> dynamic_cast or if the situation permits static_cast (but be sure not to
> cheat too much with this pointer).
That works fine now.
Thanks a lot for your help, Ric!
Thomas
--
Dr. Thomas Krebs
Merianstr. 18
90409 Nürnberg
Germany
Tel.: +49 911 563321
Mobil: +49 172 8916010
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list