[antlr-interest] parsing and modifying java programs. please help!

Alexey Demakov demakov at ispras.ru
Mon Nov 14 04:44:28 PST 2005


Hi,

May be it is not exactly what you want, but may be it will help:

We're developing open-source Java 1.5 frontend.
Now available:
+ Java 1.5 AST description (as heterogenous tree)
+ parser that builds this tree.
+ printer that prints tree back to text.
Will be available in future:
- semantic checker.

AST is described in TreeDL language http://treedl.sf.net
Tree description looks like:
http://treedl.sourceforge.net/frontend/java5/treedl/com/unitesk/java5/Java5.tdl-xref/index.html
Tree description is used to generate Java classes for tree nodes, visitors, walkers etc.

There were many changes since last released version is 0.0.3,
so I recommend to use latest anonymous CVS snapshot before
0.0.4 will be released. Now it is stable enough to successfully parse JDK 1.5 sources.

Small Java program modifications can be implemented as inheritors of
printer visitor using our simple template engine. But you can use any other
template engine if you like.

This frontend is suitable not only for Java code modifications,
but for translation of extention-of-Java to Java language itself.

Feel free to ask any questions you have.

Regards,
Alexey

-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com

----- Original Message ----- 
From: "Naghmeh Daneshmand" <naghmeh.daneshmand at informatik.uni-ulm.de>
To: <antlr-interest at antlr.org>
Sent: Sunday, November 13, 2005 2:12 AM
Subject: [antlr-interest] parsing and modifying java programs. please help!


> Hi,
> how can I define my own node type (AST). I would like to parse Java 
> programs and modify their values. What would be the best way to achieve 
> this goal?
> Is there any example of this and where can I find them?
> Have I to define a new node type?
> 
> thank you.
> Naghmeh
> 
>



More information about the antlr-interest mailing list