1 #ifndef CALCXX_DRIVER_HH
2 # define CALCXX_DRIVER_HH
6 /// Forward declarations.
17 // Announce to Flex the prototype we want for lexing function, ...
19 int yylex (YYSTYPE* yylval, yy::location* yylloc, calcxx_driver& driver)
20 // ... and declare it for the parser's sake.
23 /// Conducting the whole scanning and parsing of Calc++.
28 virtual ~calcxx_driver ();
31 std::map<std::string, int> variables;
33 /// \name Handling the scanner.
35 /// Open \a file for scanning.
37 /// End scanning, clean up memory.
39 /// Whether to enable scanner traces.
43 /// \name Handling the parser.
45 /// Parse the file \a f.
46 void parse (const std::string& f);
47 /// The file being parsed.
49 /// Whether to enable parsing traces.
56 /// \name Error handling.
58 /// Register a located error.
59 void error (const yy::location& l, const std::string& m);
60 /// Register an error.
61 void error (const std::string& m);