Debian Codegraph @

documentation/manual/algorithm/demos/Parser.h

raw
1 #ifndef Parser_h_included
2 #define Parser_h_included
3
4 // for error()'s inline implementation
5 #include <iostream>
6
7 // $insert baseclass
8 #include "Parserbase.h"
9
10
11 #undef Parser
12 class Parser: public ParserBase
13 {
14
15 public:
16 int parse();
17
18 private:
19 void error(char const *msg)
20 {
21 std::cerr << msg << '\n';
22 }
23
24 // $insert lex
25 int lex();
26
27 void print() // d_token, d_loc
28 {}
29
30 // support functions for parse():
31
32 void executeAction(int d_production);
33 size_t errorRecovery();
34 int lookup(int token);
35 int nextToken();
36 };
37
38
39 #endif