[antlr-interest] Dynamic Java compiler?

Andy Tripp atripp at comcast.net
Fri Apr 22 09:35:30 PDT 2005


Why not just use javac itself? It's written in Java,
it uses a ClassLoader (unless I'm misunderstanding what you're looking
for), and you can get the source from Sun.

>I have to believe that someone on this list has seen such a thing or
>even written it.  I'm looking for a Java compiler that has the following
>features:
>      * Is written in pure Java
>      * Uses a ClassLoader to find other classes to compile (so I can
>        generate the source on the fly)
>
>I'd also like it to handle Java 1.5 syntax, but this isn't a
>requirement.
>
>I've looked at DynamicJava and it doesn't handle circular class
>references.
>
>JavaAssist is close, but it can't be given a whole source file to just
>compile, only method bodies.
>
>Groovy works pretty nicely, but doesn't handle the final keyword or
>interfaces.
>
>BCEL is just too low level.  If someone took the Java 1.5 antlr grammar
>and then used BCEL in teh actions, that would probably work.
>




More information about the antlr-interest mailing list