-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (26 loc) · 745 Bytes
/
Copy pathmain.cpp
File metadata and controls
29 lines (26 loc) · 745 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 "llvm/Support/raw_ostream.h"
#include "lexer.h"
#include "driver.hpp"
#include "parser.hpp"
#include "ast.hpp"
#include "astPrinter.hpp"
#include "semantic.hpp"
#include "codeGenerator.hpp"
extern ast::Program *program;
int main(int argc, char **argv)
{
carbonic_c::Driver driver;
// while (lexer->yylex() != 0)
// driver.parse_args(argc, argv);
int x = driver.parse_program();
std::cout << std::endl;
// analyzer::AstPrinter printer;
// program->accept(&printer);
analyzer::Semantic analyzer;
program->accept(&analyzer);
// prettyPrinter::codePrinter printer;
// program->accept(&printer);
generator::codeGenerator code_generator;
program->accept(&code_generator);
return 0;
}