Advanced Strategic Command
parser.h
Go to the documentation of this file.
1 // Generated by Bisonc++ V2.4.2 on Sat Jul 19 21:56:21 2008 +0100
2 
3 #ifndef Parser_h_included
4 #define Parser_h_included
5 
6 // $insert baseclass
7 #include "parserbase.h"
8 // $insert scanner.h
9 #include "scannerwrapper.h"
10 
11 
12 #undef Parser
13 class Parser: public ParserBase
14 {
15  // $insert scannerobject
16  Scanner d_scanner;
17 
18  public:
19  int parse();
20 
21  private:
22  void error(char const *msg); // called on (syntax) errors
23  int lex(); // returns the next token from the
24  // lexical scanner.
25  void print(); // use, e.g., d_token, d_loc
26 
27  // support functions for parse():
28  void executeAction(int ruleNr);
29  void errorRecovery();
30  int lookup(bool recovery);
31  void nextToken();
32 };
33 
34 inline void Parser::error(char const *msg)
35 {
36  std::cerr << msg << std::endl;
37 }
38 
39 // $insert lex
40 inline int Parser::lex()
41 {
42  return d_scanner.yylex();
43 }
44 
45 inline void Parser::print() // use d_token, d_loc
46 {}
47 
48 
49 #endif
Definition: parser.h:13
int parse()
Definition: parser.cpp:727