From 5b773d6a0ec801161f97fc5159d1f9c5a75c29c9 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Tue, 29 Oct 2013 18:08:01 +0100 Subject: Added previously missing parser.cc --- src/parser.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/parser.cc (limited to 'src/parser.cc') diff --git a/src/parser.cc b/src/parser.cc new file mode 100644 index 0000000..4106fc0 --- /dev/null +++ b/src/parser.cc @@ -0,0 +1,21 @@ +#include "parser.h" + +namespace SimpleParser { + +double calculate(std::string term) { + return Tree(term).solve(); +} + +double calculate(std::string term, const ConstantMap* constants) { + return Tree(term, constants).solve(); +} + +std::string print(std::string term) { + return Tree(term).print(); +} + +std::string print(std::string term, const ConstantMap* constants) { + return Tree(term, constants).print(); +} + +} -- cgit v1.2.3