[antlr-interest] assign a derived token to the lexer
thomaskrebs
Thomas_Krebs at gmx.de
Tue May 27 02:22:27 PDT 2003
I want to assign a different Token than CommonToken to the lexer. In
lexer.html at lexer.html#Token_Attributes it is documented how to do
that. But this seems to be wrong:
ImageToken t = new ImageToken(IMAGE,$getText);
t.setAttributes(attrs);
$setToken(t);
I assume t should be a pointer to ImageToken and the parameter to
setToken can not be a Token or a pointer to a Token but a RefToken.
But I cannot assign a RefCount<ADerivedToken> to the _token inside
the parser rule. How to deal with that?
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list