On 21 Jul 2010, at 00:03, Paul Hilfinger wrote:

The Bison documentation says that due to technical differences between C and C++, a C++ compiler wouldn't be able to compile or properly execute
(not clear which) a Bison C program that tried to grow the parser
stack.  What exactly is this technical difference?  Producing a C++
program using the C skeleton (not lalr1.cc), tweaking the generated code to expand the parser stack regardless of __cplusplus, and compiling with
C++ works in at least simple cases.  What's the problem?

One problem is that the C stack does not call C++ copy constructors when reallocating. So one can only use a POD semantic value.

But you have phrased is as an all through C program compiled as C++. That must work if the C parser and the program is written in the subset common to C++.

  Hans



_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to