-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParser.h
48 lines (40 loc) · 893 Bytes
/
Parser.h
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
40
41
42
43
44
45
46
47
48
#ifndef PARSER_H
#define PARSER_H
#include "Token.h"
#include "datalogProgram.h"
#include <stack>
#include <vector>
class Parser {
private:
DatalogProgram program;
std::stack<Token*> input;
void check(int);
void check(int, DatalogObject*);
void scheme();
void schemeList();
void idList(DatalogObject*);
void fact();
void factList();
void rule();
void ruleList();
void headPredicate(DatalogObject*);
void predicate(DatalogObject*);
void predicateList(DatalogObject*);
void parameter(DatalogObject*);
void parameterList(DatalogObject*);
void expression(DatalogObject*);
void myOperator(DatalogObject*);
void query();
void queryList();
void stringList(DatalogObject*);
public:
Parser () {
}
virtual ~Parser () {
}
DatalogProgram* test(std::vector<Token*> tokens);
std::string toString() {
return program.toString();
}
};
#endif