-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (23 loc) · 734 Bytes
/
main.cpp
File metadata and controls
29 lines (23 loc) · 734 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
#include <iostream>
#include <fstream>
#include <codecvt>
#include "fileRead.h"
#include <regex>
#include "tree.h"
int main(const int argc, const char *argv[]) {
const char *program = argv[argc - 2];
// std::ofstream debug ("../debug.txt");
int size = getFileSize(program);
char *buffer = new char [size] ();
readFile(program, buffer, size + 100);
// for(const auto & smileOperator : smileOperators) {
// std::cout << smileOperator.opName << smileOperator.symbol.length() << std::endl;
// }
tree::Tree <char *> langTree = {}; //('L', "AST.txt");
langTree.getG(buffer);
// langTree.dump();
langTree.saveTo(argv[argc - 1]);
// debug.close();
delete [] buffer;
return 0;
}