-
Notifications
You must be signed in to change notification settings - Fork 2
/
parser.h
41 lines (31 loc) · 1.02 KB
/
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
#ifndef PARSER_H
#define PARSER_H
#include "tree.h"
#include "lex.h"
#include "var.h"
#include "func.h"
#include "type.h"
#include <vector>
#include <map>
#include <string>
#include <stack>
#include <sstream>
class parser
{
public:
std::map<std::string,var> Vars;
std::map<std::string,func> Funcs;
std::vector<type> Types;
std::map<std::string,int> TypeMap;
void ParseResWord( std::vector<token> Tokens, tree& Tree );
void LoadTree( std::vector<token> Tokens, tree& Tree );
void Declare(std::string Script);
void Declare(std::vector<token>& Tokens, std::string Class, int Depth=0);
std::vector< std::vector<token> >
GetStatements( std::vector<token> Tokens, int Div, bool AllowBraceTerm, bool AddTail );
std::vector<token>
GetScope(std::vector<token> Tokens, int Start, int &End, int Open, int Close);
void PreParse(std::vector<token>& Tokens);
void PreParseFuncCalls( std::vector<token>& Tokens );
};
#endif