OLD | NEW |
(Empty) | |
| 1 #line 8281 "../../doc/bison.texinfo" |
| 2 #ifndef CALCXX_DRIVER_HH |
| 3 # define CALCXX_DRIVER_HH |
| 4 # include <string> |
| 5 # include <map> |
| 6 # include "calc++-parser.hh" |
| 7 #line 8297 "../../doc/bison.texinfo" |
| 8 // Tell Flex the lexer's prototype ... |
| 9 # define YY_DECL \ |
| 10 yy::calcxx_parser::token_type \ |
| 11 yylex (yy::calcxx_parser::semantic_type* yylval, \ |
| 12 yy::calcxx_parser::location_type* yylloc, \ |
| 13 calcxx_driver& driver) |
| 14 // ... and declare it for the parser's sake. |
| 15 YY_DECL; |
| 16 #line 8313 "../../doc/bison.texinfo" |
| 17 // Conducting the whole scanning and parsing of Calc++. |
| 18 class calcxx_driver |
| 19 { |
| 20 public: |
| 21 calcxx_driver (); |
| 22 virtual ~calcxx_driver (); |
| 23 |
| 24 std::map<std::string, int> variables; |
| 25 |
| 26 int result; |
| 27 #line 8331 "../../doc/bison.texinfo" |
| 28 // Handling the scanner. |
| 29 void scan_begin (); |
| 30 void scan_end (); |
| 31 bool trace_scanning; |
| 32 #line 8342 "../../doc/bison.texinfo" |
| 33 // Run the parser. Return 0 on success. |
| 34 int parse (const std::string& f); |
| 35 std::string file; |
| 36 bool trace_parsing; |
| 37 #line 8356 "../../doc/bison.texinfo" |
| 38 // Error handling. |
| 39 void error (const yy::location& l, const std::string& m); |
| 40 void error (const std::string& m); |
| 41 }; |
| 42 #endif // ! CALCXX_DRIVER_HH |
OLD | NEW |