summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
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;