[antlr-interest] Retaining comments
David Holroyd
dave at badgers-in-foil.co.uk
Wed Mar 12 14:55:19 PDT 2008
On Wed, Mar 12, 2008 at 02:22:55PM -0700, Gerald B. Rosenberg wrote:
> There are times where you just need to randomly muck around in the
> AST. To use the AST interactively (to do user-driven refactorings in
> my case), or where the selection conditions are context dependent, as
> what sounds to be Stuart's case. An AST wrapper is, I think, the
> right approach. The down-side is that it would be directly dependent
> on the implementation/structure of the AST, requiring rewrite each
> time the AST changed.
>
> So, how to generate the implementation of a reasonably generic AST
> random access/manipulation API?
I believe LPG (ANTLR competitor!) has some capability in this area,
http://kent.dl.sourceforge.net/sourceforge/lpg/LPG_Automatic_AST_Generation.htm
Not that this on its own says much about problems like code refactoring,
but getting a heterogeneous AST for 'free' sounds nice.
LPG is used in the Eclipse 'IDE Meta-tooling Platform', about which I
know little,
http://eclipse-imp.sourceforge.net/
ta,
dave
--
http://david.holroyd.me.uk/
More information about the antlr-interest
mailing list