summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/main.cpp b/main.cpp
index a7e81bb..0d95196 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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;
}