[antlr-interest] Java Parser to analyze C++ language syntax

Kaleb Pederson kaleb.pederson at gmail.com
Fri Feb 27 14:48:41 PST 2009


On Fri, Feb 27, 2009 at 1:27 PM, Andy Tripp <antlr at jazillian.com> wrote:
> But it looks like your parser needs to be written in C++ to use LLVM, no?
> And the wikipedia entry only mentions a front-end for parsing Java byte
> code,
> with no mention of parsing Java source code (other than saying one could
> be developed). Is there a Java source code frontend for LLVM in development?

Ack, I didn't read the original request closely enough, sorry :(.

Yes, you'd need to interact with C/C++, although you might be able to
use Swig to generate Java bindings... but that definitely doesn't fit
the original request.

In looking at LLVM a bit more closely, although both the FAQ and the
features page mention full C++ support, the Clang C++ page doesn't:
http://clang.llvm.org/cxx_status.html.  I'd guess, therefore, that
llvm-gcc is a different front end from Clang, which could complicate
matters.

One note on David Wigg's C++ grammar, it seemed well documented
although, IIRC, it used a slightly patched version of ANTLR or its
runtime which makes it a bit more difficult to use than would be
typical.

--Kaleb


More information about the antlr-interest mailing list