[antlr-interest] blog entry to new tree stuff

Matthew Ford matthew.ford at forward.com.au
Wed Jun 8 17:00:12 PDT 2005


Hi Ter,
What about creating trees/nodes programmatically after a tree branch is
matched?
In a rewrite project I am creating derivatives for equations and need to add
extra trees, nodes ect.
In V2 I had to copy/clone almost everything to prevent tree loops.
I have sent you notes on this in the past.  What are you current ideas?
matthew

p.s.

I think you ment
e : ^(PLUS a=INT b=INT) -> {$a.getValue()==0}? $b
                        -> ^(PLUS $a $b)
  ;----- Original Message ----- 
From: "Terence Parr" <parrt at cs.usfca.edu>
To: "ANTLR Interest" <antlr-interest at antlr.org>
Sent: Thursday, June 09, 2005 9:11 AM
Subject: [antlr-interest] blog entry to new tree stuff


> Howdy folks,
>
> I'm starting to think about how to build trees, do rewrites, parse
> trees, etc...
>
> http://www.antlr.org/blog/antlr3/trees.tml
>
> More work tomorrow on it.
>
> As always, remember that this stuff will be changing a lot for a
> while...for example, I might not use this TreeAdaptor thing.
>
> I thank everyone for their suggestions and ideas from which I have
> derived a lot of this stuff (with some twists of my own, naturally).
>
> Thanks,
> Ter
> --
> CS Professor & Grad Director, University of San Francisco
> Creator, ANTLR Parser Generator, http://www.antlr.org
> Cofounder, http://www.jguru.com
>



More information about the antlr-interest mailing list