-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInterpretator.h
40 lines (35 loc) · 1.24 KB
/
Interpretator.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
#ifndef PASCAL_INTERPRETATOR_H
#define PASCAL_INTERPRETATOR_H
#include <iostream>
#include <string>
#include <cstdio>
#include <ctype.h>
#include <cstdlib>
#include <vector>
#include <stack>
#include <algorithm>
#include "Parser.h"
#include "Executer.h"
/*==========================================================================
*--------------------------Класс Interpretator-----------------------------
*==========================================================================
* Интерпретация входного файла с программой. Содержит объекты
* классов Parser и Executer
*==========================================================================
*/
class Interpretator {
Parser pars;
Executer E;
public:
Interpretator ( const char* program ): pars (program) {}
void interpretation ();
};
/*==========================================================================
* лексический, синтаксический, семантический анализ
*==========================================================================
*/
void Interpretator::interpretation () {
pars.analyze ();
E.execute ( pars.poliz );
}
#endif //PASCAL_INTERPRETATOR_H