[antlr-interest] CommonTree vs CommonAST

Terence Parr parrt at cs.usfca.edu
Sun Sep 25 07:51:22 PDT 2011


On Sep 25, 2011, at 4:07 AM, Martijn Reuvers wrote:

> Hey Ter,
> 
> New name sounds good to me to distinguish. Yes it will break things,
> but well if you go to v4 that can be expected anyway - as it's a major
> release. =)

Indeed. I think people will love what v4 does with parse trees. The standard operation of the tool will be to generate listener interfaces and blank implementations so that users can keep actions outside of the grammar, leaving them multi-targetable. By turning on a flag at runtime, the parser will build this internal parse tree. A standard walker will then walk that tree and trigger events in the listener. If all you care about is what happens up on some variable declaration, you simply implement that listener method.

:)
Ter


More information about the antlr-interest mailing list