-
Notifications
You must be signed in to change notification settings - Fork 0
/
epptester.cpp
37 lines (35 loc) · 857 Bytes
/
epptester.cpp
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
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include "eppcompiler.cpp"
#include "symnode.cpp"
#include "symtable.cpp"
#include "parser.cpp"
#include "exprtreenode.cpp"
#include "minheap.cpp"
#include "heapnode.cpp"
int main() {
int ct = 0;
vector<vector<string>> code;
ifstream tc_file("testcase_exp.txt");
string ln;
while (getline(tc_file, ln)) {
stringstream ss(ln);
string temp;
vector<string> toPush;
while (getline(ss, temp, ' ')) {
toPush.push_back(temp);
}
code.push_back(toPush);
ct++;
}
EPPCompiler e = EPPCompiler("targ.txt", ct);
ofstream writer("targ.txt");
writer << "You are not clearing the output file!\n";
writer.close();
e.compile(code);
tc_file.close();
return 0;
}