24 lines
400 B
C++
24 lines
400 B
C++
#include "parser.hpp"
|
|
#include "syntaxer.hpp"
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
if (argc != 2)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
std::vector<Expression::Token> tv = Parser::tokenize_input(argv[1]);
|
|
|
|
if (Syntax::check_syntax(tv))
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
Syntax::apply_corrections(tv);
|
|
|
|
std::vector<Expression::Operation> ov = Syntax::build_op_vector(tv);
|
|
|
|
Expression::TreeNode root = Syntax::ov_to_tree(tv, ov);
|
|
}
|