[antlr-interest] Java AST Grammar
Olivier Lefevre
lefevrol at yahoo.com
Tue Feb 19 17:48:43 PST 2008
Adam Cooney wrote:
> I'm rather new to ANTLR and require a java AST grammar which will end up
> taking a Java file as an input and creating the AST for the Java code.
Perhaps you don't need ANTLR for this. The JDK has included an AST API for
some time: it lives in the com.sun.source.tree and com.sun.source.util
packages. It is not well documented but googling for "tree API" + javac (or
java) should bring up enough information to get you started.
-- O.L.
More information about the antlr-interest
mailing list