Hans Aberg wrote:

Once upon the time, Bison had an informal support for the C-parser to be compiled as C++, but this was dropped, being too difficult to maintain. Instead, a separate C++ skeleton was developed.

So, for C++, it is best to use the C++ skeleton file.

I have a lot of C++ code in my .y file, and no problems. This is 1.875c - has this support been dropped since then?

But then, I can't immediately see why any C++ support is required, as long as you use the union/struct mechanism for passing data. My YYSTYPE is a struct which contains reference-counted classes. Maybe this is the confusion? Do you only need the C++ skeleton if your YYSTYPE is a real C++ class?

BTW, you don't even need Satya's 'extern "C"' declarations if you're using gcc; don't know about other compilers.

Evan


_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to