[antlr-interest] Changing the base node type

Bruno Marc-Aurele bruno.marc-aurele at polymtl.ca
Fri Feb 6 06:17:45 PST 2009


Hello all,

I am trying to do a grammar with a new base type for nodes. I can see that I am
provided with ASTLabelType, whose value I set to Node, the name of my
CommonTree subclass. The only difference between the two classes is the
presence of a "Accept" method. The parser, however, still creates CommonTree
nodes (of course, the ITreeAdaptor is still a CommonTreeAdaptor).

What would be the suggested method to make my parser create Node objects instead
of CommonTree objects?

Thanks a lot,
Bruno M-A.

P.S.: I am using the C#2 target.
--
Bruno Marc-Aurèle
courriel Poly: bruno.marc-aurele at polymtl.ca
courriel perso: bruno.m-a at hotmail.com






More information about the antlr-interest mailing list