I'm giving some more tries to generate a C++ parser for a small language, here it's the result:
http://www.neuralnoise.com/small_backup_2/ it's hevily ripped off by the example calc++, and I really don't know why I can't get scanner.cc (the file generated from "flex -+ -o scanner.cc scanner.ll") to compile properly; here it's the output: stfu# flex -+ -o scanner.cc scanner.ll stfu# bison parser.yy -oparser.cc stfu# g++ -g -c driver.cc stfu# g++ -g -c parser.cc stfu# g++ -g -c scanner.cc scanner.cc: In function `yy::parser::token::yytokentype yylex(yy::parser::semantic_type*, yy::location*, driver&)': scanner.cc:745: error: `yy_init' undeclared (first use this function) scanner.cc:745: error: (Each undeclared identifier is reported only once for each function it appears in.) scanner.cc:753: error: `yy_start' undeclared (first use this function) scanner.cc:756: error: `yyin' undeclared (first use this function) scanner.cc:763: error: `yyout' undeclared (first use this function) scanner.cc:770: error: `yy_buffer_stack' undeclared (first use this function) scanner.cc:770: error: `yy_buffer_stack_top' undeclared (first use this function) scanner.cc:771: error: `yyensure_buffer_stack' undeclared (first use this function) scanner.cc:773: error: `yy_create_buffer' undeclared (first use this function) scanner.cc:776: error: `yy_load_buffer_state' undeclared (first use this function) scanner.cc:782: error: `yy_c_buf_p' undeclared (first use this function) scanner.cc:785: error: `yy_hold_char' undeclared (first use this function) scanner.cc:800: error: `yy_last_accepting_state' undeclared (first use this function) scanner.cc:801: error: `yy_last_accepting_cpos' undeclared (first use this function) scanner.cc:820: error: `yytext' undeclared (first use this function) scanner.cc:827: error: `yy_flex_debug' undeclared (first use this function) scanner.ll:68: error: `LexerOutput' undeclared (first use this function) scanner.cc:1036: error: `yy_n_chars' undeclared (first use this function) scanner.cc:1054: error: `yy_get_previous_state' undeclared (first use this function) scanner.cc:1065: error: `yy_try_NUL_trans' undeclared (first use this function) scanner.cc:1086: error: `yy_get_next_buffer' undeclared (first use this function) scanner.cc:1090: error: `yy_did_buffer_switch_on_eof' undeclared (first use this function) scanner.cc:1112: error: `yyrestart' undeclared (first use this function) scanner.cc:1141: error: `LexerError' undeclared (first use this function) any idea ? Thanks in advance. -- p. minervini, [EMAIL PROTECTED] _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison