-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·35 lines (28 loc) · 896 Bytes
/
main.cpp
File metadata and controls
executable file
·35 lines (28 loc) · 896 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
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <string_view>
#include <utility>
#include <memory>
#include <string>
#include "lib/Regex2Dfa/CFlex.h"
#include "lib/Parser/LALR.h"
#include <list>
#include "lib/Compiler/CompilerFrontGenerater.h"
#include <yaml-cpp/yaml.h>
using namespace std;
int main() {
//
CompilerFrontGenerater compilerFrontGenerater("/home/supercb/mycode/CppProjects/CBcompiler/yamls/front.yaml");
compilerFrontGenerater.Generate();
// const std::string yamlFilePath = "/home/supercb/mycode/CppProjects/CBcompiler/yamls/withempty.yaml";
// YAML::Node root = YAML::LoadFile(yamlFilePath);
// CBCompiler::LALR lalr(root["cbsion"]);
// auto firsts= lalr.GetFirst({CBCompiler::LRType::UNEND, "Tp"});
// for (auto str: firsts) {
// std::cout << str << std::endl;
// }
}