On 13 Dec 2006, at 00:09, Satya wrote:

No, you dont need to use the C++ skeleton. Just put an extern "C"
declaration at the beggining of your parser file (.y file)  e.g.,

extern "C"
{
   int yyparse ( void );
   int yylex   ( void );
   int yywrap  ();
   void yyerror ( char* );
}

Putting the in the .y file would not suffice, as those functions need to be put in a file compiled by the C++ associated C-compiler; one cannot then use C++ containers. If the C-parser is compiled using a C+ + compiler, would it succeed, in view of that support for this has been terminated, then the parser stack will not invoke copy constructors when reallocating: it will only work with POD semantic types.

  Hans Aberg




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

Reply via email to