[antlr-interest] Transforming AST subtrees in TreeParser with "buildAST = false"
Monty Zukowski
monty at codetransform.com
Wed May 19 14:58:56 PDT 2004
On May 19, 2004, at 8:19 AM, Ric Klaren wrote:
>> 1. In a TreeParser, is it possible to specify that "buildAST=true"
>> only for certain rules or rule-Alternatives. The rest of the AST is
>> left as is (it is "copied" to output logically but no *actual* copying
>> is done).
>
> buildAST is a grammar option so no go there... Doing it inverted will
> work
> e.g. turn on construction and disable construction for all rules
> except the
> ones where you want it.
>
I don't think that will graft on the newly created tree to the input
tree. You will have to manage that part yourself.
Monty Zukowski
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
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