[antlr-interest] C target; C++ compatibility?

Rupert Mazzucco mazzucco at iiasa.ac.at
Tue Sep 11 05:47:31 PDT 2007

> antlr3bitset.h line 51 declares a function pointer named "or":
>   struct ANTLR3_BITSET_struct  *  (*or)	    (struct ANTLR3_BITSET_struct  * bitset1, struct ANTLR3_BITSET_struct * bitset2);

The SunPro 5.9 compiler doesn't like it either.  Does anybody have a comment on the
use of C++ keywords as symbols in the C target?  I realize it's the C, not C++, target,
but as the latter seems not really functional yet, using the C target via the is the
obvious workaround. This would be much facilitated if the headers could be included
in a C++ program as 'extern "C"'.  I would appreciate a hint on how much work renaming
this symbol requires.  I found it in antlr3bitset.{h,c}, but it must be used somewhere
else and grepping for "or" is not so illuminating.

Thank you
Rupert Mazzucco         <mazzucco at iiasa.ac.at>
Research Scholar, Evolution and Ecology Program
IIASA - Institute for Applied Systems Analysis
Schlossplatz 1, 2361 Laxenburg, Austria
Phone: +43 2236 807 522   Fax: +43 2236 713 13

More information about the antlr-interest mailing list