[antlr-interest] AST tree output from Tree Parser
jaluber at gmx.de
Wed Nov 28 03:09:32 PST 2007
Gavin Lambert wrote:
> At 12:41 28/11/2007, Surinder Jain wrote:
>> I remember (vaiguly since it was many years ago) that ANTLR2 tree
>> walker (or its equivalent) could read a tree, transform it (as per
>> tree grammar rewrite rules) and produce a new different output tree.
>> This allowed multiple passes making translation job into many simple
>> steps rather than one complex one.
>> It appears that this ability has been taken away in ANTLR3.
>> Is my understanding correct or am I missing something that is not in
>> the defintive book. If I am correct then is there any plan to add
>> tree transformation feature in near future?
> AST output for tree walkers was intentionally left out of 3.0 (to make
> things simpler), but AFAIK it's planned to be added in a future
> release. (I think it was going to be in 3.1, but I'm not sure if that's
> still true or not.)
The newest daily build should already have this capability. I haven't
found the documentation for it yet, but I haven't finished reading Ter's
Notes on the wiki nor searched the dev-mailing list.
More information about the antlr-interest