#include #include #include #include #include #include "include/parser.hpp" #include "include/expressions.hpp" #include "include/exceptions.hpp" #include "include/differentiator.hpp" using std::string, std::cin, std::cout, std::getline, std::vector, std::begin, std::end, std::endl; int main(){ string input; Parser parser; Expression *tree; Expression *differential = NULL; getline(cin, input); try { tree = parser.parse(input); cout << tree->getRepr() << '\n'; } catch(const ParserException &e) { cout << e.showMsg() << endl; tree = NULL; } if(tree != NULL) { differential = deriv(tree); delete tree; delete differential; } return 0; }