help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: The Bison Manual Example Infix Calculator


From: Hans Aberg
Subject: RE: The Bison Manual Example Infix Calculator
Date: Sat, 3 Aug 2002 14:55:47 +0200

At 15:29 -0400 2002/08/02, Donges, William E.,, III wrote:
>Heh I nice idea but no... the rest of the projects that I am working
>on are in C and the conversion from C to C++ would be a major hassle
>and writing just a peice of it in C++ even more so...

You can try adding C functions with C++ in the body by a C++ language construct
in a C++ file:
  extern "C" A f(B) { // Function gets C linkage
     // Body in C++
  }
Not all compilers support this (but GCC might).

If that does not work with your compiler, the only way is to change the
top-node (typically main()) to become C++, and use the standard form of the
C++ 'extern "C"' construct.

  Hans Aberg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]