[antlr-interest] ANTLRWorks generating cpp files.

Murat Atalay atalay at udel.edu
Mon Jul 9 11:22:37 PDT 2012

Hello Everyone,

I have question about generating cpp files with ANTLRWorks. I would like to
generate compile-able CPP files.

ANTLRWorks only generates C files which also can be compiled by CPP. But I
have to go in to header files and comment out some of the lines, such as;

//extern "C"{

Because i'm adding specific CPP libraries (STL) in to my grammer and it
doesn't work properly unless I comment out those lines. I was wondering is
there any way to do this automated. I keep update my grammar and then I
have to go in to my header files and comment these out and its kinda

Can we quickly add CPP language support to ANTLR. At least it can remove
the lines given above.

Please let me know if anyone has any ideas about it.


More information about the antlr-interest mailing list