orga-comp/main.cpp

19 lines
466 B
C++

#include "orga-comp.h"
#include <iostream>
int
main(){
// lex -> parse -> analisis semantico
// realizar un interprete
// interpretar a = 2 + 2
interpreter inter;
lexer lex;
std::vector<struct token*> lexed = lex.lex_file("tst.cfran");
parser parser(lexed);
struct token *end = parser.parse_tokens();
std::cout << "\n-----------------------\n";
std::cout << "EVALUATING RESULTING TREE:\n";
std::cout << str_token(*end);
inter.evalSTM(*end);
return 1;
}