[antlr-interest] Rewriting trees
Maassen, H.A.M.
H.A.M.Maassen at student.tue.nl
Fri Nov 26 02:33:25 PST 2004
Ok I'm stumped.. I've looked through the manual, the FAQ, but I can't figure out how to reorder trees using a treeparser.. why won't this work:
rule: "if" // ignore subtrees for now
{ ## = #([VIRT,"IF STATEMENT"], ##); }
;
How do I tell the treewalker to just copy subtrees without having to describe their exact structure?
rule: #("if" (.)*) // this doesn't work :(
;
Am I missing anything? Is it right under my nose? I know it can't be this difficult...
Are there any tree-reordering examples out there? The ones I downloaded from ANTLR.org don't rewrite but rather generate code or calculate expressions or something else unrelated...
S.O.S., Harald Maassen
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4114 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20041126/27e4dfb6/attachment.bin
More information about the antlr-interest
mailing list