-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
43 lines (34 loc) · 792 Bytes
/
Copy pathmain.cpp
File metadata and controls
43 lines (34 loc) · 792 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
#include <iostream>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "Interpreter.h"
using namespace std;;
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include "Databases/SymbolsDB.h"
#include "Enviroment.h"
#include "Utils.h"
int main(int argc, char *argv[]) {
Enviroment *e = new Enviroment;
try {
// by if the user inserted a filename or not, do the right operation.
if (argc <= 1) {
e->CommandlineOperation();
}
else {
string fileName = string(argv[1]);
e->runScriptFromFile(fileName);
}
delete e;
exit(0);
} catch (...) {
delete e;
exit(1);
}
}