Assignment-3/main.cpp

22 lines
430 B
C++
Raw Permalink Normal View History

#include <iostream>
#include <set>
2019-05-20 11:12:53 -07:00
#include "tree.hpp"
#include "parser.hpp"
extern int yylex();
2019-05-20 11:12:53 -07:00
extern stmt_ptr target_program;
int main() {
if (!yylex()) {
2019-05-20 13:28:33 -07:00
std::vector<std::string> dest;
target_program->print_dot(dest, "start");
std::cout << "digraph G {" << std::endl;
for(auto& line : dest) {
std::cout << line << std::endl;
}
std::cout << "}" << std::endl;
delete target_program;
}
}