aboutsummaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorAdrian Kummerländer2013-01-05 23:06:51 +0100
committerAdrian Kummerländer2013-01-05 23:06:51 +0100
commit39038fddb2032c9944e549be8f1665e028cb68b8 (patch)
tree69b27a62fcb828602f458746976b223c0ecf4d11 /main.cc
parentcde848ce1eb995170723f6f070b9fcba0dfdb880 (diff)
downloadSimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.tar
SimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.tar.gz
SimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.tar.bz2
SimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.tar.lz
SimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.tar.xz
SimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.tar.zst
SimpleParser-39038fddb2032c9944e549be8f1665e028cb68b8.zip
Deprecated parser class in favour of plain functions; Internal lexer,
priority determination and tree building functions were hidden in unnamed namespace
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc6
1 files changed, 2 insertions, 4 deletions
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<double> dbl;
std::cout.precision(dbl::digits10);
- std::cout << parser.calculate(inputTerm) << std::endl;
+ std::cout << SimpleParser::calculate(inputTerm) << std::endl;
}
catch ( std::exception &e )
{