[antlr-interest] Transforming Comments along with trees

Terence Parr parrt at cs.usfca.edu
Wed Nov 10 10:55:25 PST 2004



On Nov 10, 2004, at 4:22 AM, dsfsdf fdsfdsf wrote:

> Hi
>  I am building a parser that will convert a piece of t-slq to the 
> corresponding p-sql. I am using a TokenStreamHiddenTokenFilter to 
> ignore but preserve comments and builld up my source ast tree!
> I than plan to do maybe one or to pass transformations to the tree!
> However i am stuck on how to bring across my comments after each 
> transformations!
> I would greatly appreciate any ideas on how this can be done!

Hi.  First, given the similarity of source / target languages, you 
might want to use TokenStreamRewriteEngine instead.  have you seen that 
article on the site?

For the above, are you saying that the auto construction of trees in 
the tree walker doesn't carry along the hidden stream stuff?

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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





More information about the antlr-interest mailing list