Assignment-3/main.cpp

22 lines
430 B
C++

#include <iostream>
#include <set>
#include "tree.hpp"
#include "parser.hpp"
extern int yylex();
extern stmt_ptr target_program;
int main() {
if (!yylex()) {
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;
}
}