[antlr-interest] Transforming Comments along with trees
Terence Parr
parrt at cs.usfca.edu
Sun Nov 14 09:19:20 PST 2004
On Nov 12, 2004, at 7:41 AM, dsfsdf fdsfdsf wrote:
> Hi
> What do you mean by the tree input output thing?
> I have been transforming my Source Tree and the comments do
> not appear to have been automatically brought acorss.
> My code is something like this.
>
> ASTPass1.setLocalIntelligence(li);
> ASTPass1.setASTNodeClass("antlr.CommonASTWithHiddenTokens");
> ASTPass1.select(sourceASTAnalyzer.getAST());
> t = (CommonASTWithHiddenTokens) ASTPass1.getAST();
> showTree(t,"first pass")
>
> In my ASTPass.g file will i have to handle comments manualy there?
Does your lexer allow comments to return or do you set Token.SKIP?
Mostly likely that is the issue.
Terence
--
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