[antlr-interest] buildTokenTypeASTClassMap() in derived parser

Edward Povazan epovazan at telus.net
Tue Dec 2 00:08:19 PST 2003


Hello,

I have a base parser with a tokens section.
I want specialized AST nodes, so I tried to duplicate the token in the
derived parser with the <AST=nnn> but that gives me a compiler error.
Adding the AST modifier to the base parser doesn't help as this isn't copied
into the derived parser.
Do I need to use
parser.getASTFactory().setTokenTypeASTNodeType(...);
and do it all manually, or am I missing an easier/natural way to do this
directly in my grammar?

Thanks
-Ed



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list