[antlr-interest] Simple C++ Support
Kamil Burzynski
nopik at data.pl
Sun Apr 6 02:50:51 PDT 2008
Christian Schladetsch wrote:
> There is a very simple way to allow C++ support via your C target (for
> ANTLR 3.1b). All that has to happen is that the StringTemplate that
> generates the FooParser.c from Foo.g3pl generates:
>
> extern "C"
> {
> #include "FooParser.h"
> }
Well, I'm using C target as C++ without any problems. Also, extern
clause is not necessary, as long you compile FooParser.c as C++. Under
linux, simple g++ command does the trick. The syntax of C API is still
very ugly, though ;p
--
Best regards from
Kamil Burzynski
More information about the antlr-interest
mailing list