diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -4,6 +4,7 @@ #include <vector> #include <iostream> #include "include/parser.hpp" +#include "include/expressions.hpp" #include "include/exceptions.hpp" using std::string, std::cin, std::cout, std::getline, std::vector, @@ -15,19 +16,13 @@ int main(){ getline(cin, input); - try - { - parser.parse(input); - cout << "Todo correcto." << endl; - } - catch(ParserException e) - { - cout << e.showMsg() << endl; - } - catch(LexerException e) - { - cout << e.showMsg() << endl; - } + //try { + Expression *tree = parser.parse(input); + cout << tree->getRepr() << endl; + //} catch(const ParserException &e) { + //cout << e.showMsg() << endl; + //} + delete tree; return 0; } |