[antlr-interest] Java-lite install?
Martin Probst
mail at martin-probst.com
Wed May 4 09:54:40 PDT 2005
Hi,
maybe I'm mistaking you, but if you want to generate C++ code with ANTLR
you need to put an option on top of you grammar (*.g file):
options {
language = "Cpp";
}
This will instruct ANTLR to generate C++ files instead of java so you
don't have to fiddle around with gcj. The examples included in the
distribution are (mostly?) Java examples, so you will have to take a
look at the manual for more information on the C++ part of ANTLR.
Regards,
Martin
On Di, 2005-05-03 at 16:30 +0100, Evan Lavelle wrote:
> I don't use Java at all (and know nothing about it), and was hoping to
> use ANTLR to generate C++ code, or at least code that I can link with
> C++ using gcj/gcc.
>
> What I've done so far is to download the sources, and to compile them
> using Luca Di Gaspero's makefile, producing the 'cantlr' executable. I
> then had a go at running the simple example on the 'Getting started with
> ANTLR' page. cantlr processes the example grammar file (t.g) correctly,
> but if I then run 'gcj *.java' I get various error messages along the
> lines of:
>
> L.java:25: error: Class or interface `antlr.SemanticException' not found
> in import.
>
> This class was compiled in by Luca's makefile, and I've got no idea
> what's going on. Any pointers? Is cantlr all that's required, or do I
> need to do something else?
>
> BTW - I had a go at an RPM installation, but gave up following
> dependency meltdown.
>
> Thanks
>
> Evan
>
>
>
>
>
>
More information about the antlr-interest
mailing list