[antlr-interest] Reduction in code base after yanking AST stuff

Eric researcher0x00 at gmail.com
Tue Jan 3 05:25:02 PST 2012


Ter,

>From my personal perspective I commend the decision. While I know that AST
rewrites have been a personal work of yours for years, I am sure it took a
lot to make the move.

When looking at the pipeline as Lexer -> Parser -> Tree manipulation (v3,
AST rewrite vs v4 SAX, DOM, visitor) -> Output (String Template),
I have had the most trouble with AST rewrite, and routinely resorted to
doing tree manipulation via calls to the API.  I even notice mention in v4
of outputting the tree in LISP format using toStringTree(), though I
haven't tested it yet. While I have tinkered with converting the
s-expressions to LISP or PROLOG in v3 and then manipulating, that is a
route I plan to explore more with v4. Also of note here would be
http://strategoxt.org/

As a hint to Sam Harwell, I have considered creating an F# library for the
tree manipulation phase for the C# target for v4.

I hope that once users see how to make effective use of the new ways of
doing tree manipulations, more ideas will come out on how to effectively
apply the new mechanisms.

Thanks,  Eric


More information about the antlr-interest mailing list