-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnalyzeTest.cpp
More file actions
55 lines (45 loc) · 1.07 KB
/
AnalyzeTest.cpp
File metadata and controls
55 lines (45 loc) · 1.07 KB
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
54
55
//#define AnalyzeTest
#ifdef AnalyzeTest
#include <cstdio>
#include "Tokenizer.h"
#include "VarManager.h"
#include "OperatorsDefine.h"
#include "Operator.h"
#include "Analyze.h"
#include "FuncManager.h"
int main() {
Tokenizer tokenizer;
VarManager globalVars;
VarManager localVars;
OperatorManager operators;
FuncManager funcs;
//std::vector<KeyWordPack> operatorList;
operators.add_operator(operatorsInitList);
/*
operatorList = operators.make_keywordsList();
for (int i = 0; i < operatorList.size(); i++) {
std::cout << operatorList[i]._type << " " << operatorList[i]._value << std::endl;
}
*/
tokenizer.load_map_data(operators.make_keywordsList());
/*
operators.printAllInfo();
std::cout << std::endl;
tokenizer.printAllInfo();
std::cout << std::endl;
*/
HP_complex ANS;
//*
FILE* InputStr;
freopen_s(&InputStr, "AnalyzeTest_InputStr.txt", "r", stdin);
std::string str;
while (std::cin >> str) {
ANS = calculate(str, operators, tokenizer,funcs, globalVars, localVars);
ANS.out();
std::cout << std::endl;
}
std::cin.clear();
//*/
return 0;
}
#endif