Hi,I search the article on Google (http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00070.html). and copy the files : calc++.cc ,calc++-driver.cc ,calc++-driver.hh ,calc++-parser.yy, calc++-scanner.ll .
Then , I make them with the makefile you provided:
flex -o calc++-scanner.cc calc++-scanner.ll
bison -o calc++-parser.cc calc++-parser.yy
g++ -o calc++ calc++.cc calc++-driver.cc calc++-parser.cc
alc++-scanner.cc
when it runs the "g++ -o calc++ calc++.cc calc++-driver.cc calc++-parser.cc
alc++-scanner.cc",the following error & warnning occur(HP-Unix &
bison-2.3):
------------------------------------------------------- g++ -o calc++ calc++.cc calc++-driver.cc calc++-parser.cc calc++-scanner.cccalc++-parser.cc: In member function `virtual int yy::calcxx_parser::parse()': calc++-parser.cc:328: cannot convert `yy::calcxx_parser::semantic_type*' to `
YYSTYPE*' for argument `1' to `int yylex(YYSTYPE*, yy::location*, calcxx_driver&)' calc++-scanner.ll:18:1: warning: "YY_USER_ACTION" redefinedcalc++-scanner.cc:525:1: warning: this is the location of the previous definition
calc++-scanner.ll: In function `int yylex(YYSTYPE*, yy::location*, calcxx_driver&)': calc++-scanner.ll:27: invalid use of undefined type `union YYSTYPE' calc++-driver.hh:8: forward declaration of `union YYSTYPE' calc++-scanner.ll:28: invalid use of undefined type `union YYSTYPE' calc++-driver.hh:8: forward declaration of `union YYSTYPE' make: *** [calc++] Error 1 ------------------------------------------------------- Would you like to help me to check the source file and make it correctly ? Any reply is appreciated! Best Regards, Wang Yige _________________________________________________________________免费下载 MSN Explorer: http://explorer.msn.com/lccn/
calc++.tar.Z
Description: Unix compressed data
calc++.rar
Description: Binary data
_______________________________________________ help-flex mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-flex
