-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecute.h
More file actions
45 lines (38 loc) · 753 Bytes
/
execute.h
File metadata and controls
45 lines (38 loc) · 753 Bytes
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
#ifndef EXEC
#define EXEC
#include "lex.h"
#include "syntax.h"
#include "Table.h"
#include <stack>
#include <vector>
#include <string.h>
#include <iostream>
using namespace std;
class Interpretator{
Lex pc_el;
int c_poliz;
string c_table;
THandle table;
int size;
Parser pars;
stack<long> args;
stack<string> str_args;
void expression(Poliz& poliz);
vector<bool> where();
void execute();
void gp(){
c_poliz++;
pc_el = pars.poliz[c_poliz];
//cout << pc_el;
}
public:
Interpretator(const char *program):pars(program){
c_poliz = 0;
}
void interpretation(){
pars.analyze();
size = pars.poliz.get_free();
execute();
}
};
#endif