I am writing a translator that will convert from one version of a language 
to a newer version of that language.  The versions are syntactically 
similar so their underlying ASTs are similar.  I am using parsers for the 
grammar and tree grammars generated as C++.  The old language is parsed 
and an AST is built.  Then numerous walks of the AST are done using 
generated tree grammars.  One of the walks creates a new AST, the 
translation, which conforms to the tree hierarchy that describes the new 
language elements.  A final walk of the new AST "pretty prints" the 
translation. 

As part of the translation walk, or whatever works, I would like to copy 
as many of the comment tokens across to the new AST as possible.  Based on 
my reading, the comments are there as they are being directed to the 
HIDDEN channel.  It is just not clear how, in my tree grammar, I would 
access them.  I have been unable to find any descriptions  of how to do 
this that apply to antlr3 and C++.

Howard W. Nasgaard

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to