-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathParser.h
More file actions
39 lines (31 loc) · 1.05 KB
/
Copy pathParser.h
File metadata and controls
39 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Generated by Bisonc++ V6.05.00 on Mon, 12 Aug 2024 13:24:14 +0100
#ifndef Parser_h_included
#define Parser_h_included
// $insert baseclass
#include "Parserbase.h"
#include "Scanner.h"
#include "Node.h"
class Parser: public ParserBase
{
public:
Parser() = delete;
Parser(Scanner& scanner, std::list<Node>& nodes) : scanner{ scanner }, nodes{ nodes } {}
int parse();
private:
Scanner& scanner;
std::list<Node>& nodes;
std::list<Node>::iterator nextNode;
int nodeId{};
void error(); // called on (syntax) errors
int lex(); // returns the next token from the
// lexical scanner.
void print(); // use, e.g., d_token, d_loc
void exceptionHandler(std::exception const &exc);
// support functions for parse():
void executeAction_(int ruleNr);
void errorRecovery_();
void nextCycle_();
void nextToken_();
void print_();
};
#endif