|
From: | Josh Shinavier |
Subject: | Re: [off-topic] flex/bison compatibility issues using C++ |
Date: | Thu, 03 Jun 2004 23:33:02 +0000 |
typedef struct yy_buffer_state *YY_BUFFER_STATE; extern "C" { YY_BUFFER_STATE yy_scan_string( const char * ); void yy_delete_buffer( YY_BUFFER_STATE ); int yyerror(const char *); int yyparse(void); int yylex(void); int yywrap() { return 1; } }Now at least I know it's definitely something about my input files which is causing failure...
Josh Shinavier
Recent versions of bison no longer have a bison.simple; they have a yacc.c. If you don't want to worry about growing the stack when it overflows, and if your %union contains objects that don't need destructors, then it should just work "out of the box". You can try it yourself wwith the latest test version: ftp://alpha.gnu.org/gnu/bison/bison-1.875d.tar.gz There is also a C++ skeleton called lalr1.cc that is also supposed to work, though it hasn't been tested as much. > I need my instructor to be able to compile the parser on his > machine. I'm afraid that there's no single set of instructions that will work with C++ for all versions of Bison and/or Yacc.
_________________________________________________________________Looking to buy a house? Get informed with the Home Buying Guide from MSN House & Home. http://coldwellbanker.msn.com/
[Prev in Thread] | Current Thread | [Next in Thread] |