From 39038fddb2032c9944e549be8f1665e028cb68b8 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sat, 5 Jan 2013 23:06:51 +0100 Subject: Deprecated parser class in favour of plain functions; Internal lexer, priority determination and tree building functions were hidden in unnamed namespace --- main.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'main.cc') diff --git a/main.cc b/main.cc index c03cce2..3378e14 100644 --- a/main.cc +++ b/main.cc @@ -7,15 +7,13 @@ int main() { std::string inputTerm; - std::cin >> inputTerm; // Example: 2.5*(2+3-(3/2+1)) - - SimpleParser::Parser parser; + std::cin >> inputTerm; try { typedef std::numeric_limits dbl; std::cout.precision(dbl::digits10); - std::cout << parser.calculate(inputTerm) << std::endl; + std::cout << SimpleParser::calculate(inputTerm) << std::endl; } catch ( std::exception &e ) { -- cgit v1.2.3