summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-04-24 11:19:49 -0500
committerHombreLaser <sebastian-440@live.com>2022-04-24 11:19:49 -0500
commitc399b0875b94c8f9439e317fbcdb6fce5b8f0bcb (patch)
tree014ca9f2d4c244d5a9cab01ae4826711fab057c3 /main.cpp
parentc88da3e10da5ddac6eca479e3bcac8e3b26d86fa (diff)
Añadido simplificador terminado
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index fb8b8df..c1ecd22 100644
--- a/main.cpp
+++ b/main.cpp
@@ -7,6 +7,7 @@
#include "include/expressions.hpp"
#include "include/exceptions.hpp"
#include "include/differentiator.hpp"
+#include "include/simplifier.hpp"
using std::string, std::cin, std::cout, std::getline, std::vector,
std::begin, std::end, std::endl;
@@ -15,7 +16,7 @@ int main(){
string input;
Parser parser;
Expression *tree;
- Expression *differential = NULL;
+ Expression *simplified = NULL;
getline(cin, input);
try {
@@ -27,9 +28,10 @@ int main(){
}
if(tree != NULL) {
- differential = deriv(tree);
+ simplified = simplify(tree);
+ cout << simplified->getRepr() << endl;
delete tree;
- delete differential;
+ delete simplified;
}
return 0;