diff options
author | Adrian Kummerländer | 2013-01-05 23:06:51 +0100 |
---|---|---|
committer | Adrian Kummerländer | 2013-01-05 23:06:51 +0100 |
commit | 39038fddb2032c9944e549be8f1665e028cb68b8 (patch) | |
tree | 69b27a62fcb828602f458746976b223c0ecf4d11 /main.cc | |
parent | cde848ce1eb995170723f6f070b9fcba0dfdb880 (diff) | |
download | SimpleParser-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.cc | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 ) { |