[antlr-interest] TreeDL way
Andy Tripp
antlr at jazillian.com
Tue Mar 14 09:05:15 PST 2006
Alexey Demakov wrote:
> Hi all,
>
> My project, TreeDL (http://treedl.sf.net), is mentioned in the article
> "Manual Tree Walking Is Better Than Tree Grammars" by Andy Tripp. I
> generally agree with this statement
> but can't agree with the context:
>
>> The mapping from one AST structure to another is quite complex
>> (see XSLT, TXL, or TreeDL for example), and a single BNF-like grammar
>> doesn't capture it.
>
>
Hi Alexey,
Yea, I guess I shouldn't mentioned TreeDL. Thanks for correcting that -
I'll take it out.
As you can see, I was just trying to list a few technologies relating to
tree-transformation.
As for the rest of your comments, I just have one place where I'm very
sceptical:
>
> 2a. It is source of code generation. You need not write depth-first
> walker by hands and update it on each AST change - just re-generate it.
I'm not sure exactly what you're claiming here. You're not saying that,
for example,
I could change ANTLR to produce a different AST structure for Java code
input,
and have whatever AST-processing I've written still work correctly, are you?
I mean, if the AST structure changes, whatever code is written that does
something
with that AST (whether just print it, change it, or whatever) is now broken.
Andy
More information about the antlr-interest
mailing list