diff options
author | HombreLaser <sebastian-440@live.com> | 2022-04-10 10:21:12 -0500 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2022-04-10 10:21:12 -0500 |
commit | 531f8f2f1adc1c6777920f0a8c68caaee30b0fc4 (patch) | |
tree | c3d8ac22f3ecc118cd2b5056e7ac556371efaca7 /main.cpp | |
parent | ae25e110ca9d65c4e2cfffef21abc16f26ac3739 (diff) |
Corregidos errores de las expresiones.
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; } |