|
From: | Evan Lavelle |
Subject: | Re: bison and C++ |
Date: | Wed, 13 Dec 2006 10:33:54 +0000 |
User-agent: | Thunderbird 1.5.0.8 (Windows/20061025) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |