[antlr-interest] "!" operator and hidden tokens

johnj1984 johnj1984 at yahoo.com
Wed Jul 21 15:12:34 PDT 2004


Hi, thanks all for the suggestions for examples of source to source 
translation. Excellent reference.

Now I have a question with regards to maintaining comments: 
  When using CommonASTWithHiddenTokens ast nodes, does the "!" 
operator transfer the hidden tokens to the surrounding non-matched 
nodes? When I am iterating through a tree that has some of the 
original nodes "!" out, I don't seem to be getting any comments, 
although the filter.getInitialHiddenToken() method correctly returns 
the first hidden comment.

 If the "!" operator does not link the hidden tokens to the 
surrounding tokens, what is the general strategy for dealing with 
this? Override the match() method  to copy the links?
  
  Also defined as, are there any examples of spitting out comments in 
across AST tree translation/manipulations?

  Thanks, johnj1984



 
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