-
Notifications
You must be signed in to change notification settings - Fork 0
/
Execution.h
53 lines (41 loc) · 964 Bytes
/
Execution.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
49
50
51
52
53
#pragma once
#ifndef EXECUTION_H
#define EXECUTION_H
#include <vector>
#include <queue>
#include <string>
#include <map>
#include "stdafx.h"
#include "BinaryTree.h"
#include "LexicalAnalyzer.h"
using namespace std;
/*struct Token {
string type;
string token;
};*/
class Execution {
public:
Execution(TNode * r, Lexar *l);
~Execution();
void PreOrderbreakST();
queue<string> getControlsStruct();
void CSEM();
private:
int mnextdeltaVal;
int mpresentEnv;
Lexar *mLex;
TNode *mstRoot;
map<int,int> envMap;
map<int, vector<string>> delMp;
queue<TNode *> mcsList;
queue<string> mdeltaQ;
pair<int,string> keytuple;
int envCount;
stack<int> envStk;
void PreOrderbreakST(TNode *stRoot);
void genCS(TNode *r);
void ExecuteCS(string &str, stack <string> &e, stack <string> &c);
string applyRatorRand(string &ctk, string &ftk, string &stk);
void executeCSEM();
};
#endif // !EXECUTION_H