| 29 | } |
| 30 | |
| 31 | double MathParser::parse(const QString& s) |
| 32 | { |
| 33 | Result result; |
| 34 | try { |
| 35 | result = plusMinus(s); |
| 36 | if (!result.rest.isEmpty()) { |
| 37 | qWarning() << "Error: can't full parse" |
| 38 | << "\"" << s << "\""; |
| 39 | qWarning() << "rest: " + result.rest; |
| 40 | } |
| 41 | } catch (const QString& str) { |
| 42 | qWarning() << str; |
| 43 | } |
| 44 | return result.acc; |
| 45 | } |
| 46 | |
| 47 | Result MathParser::plusMinus(QString s) //throws Exception |
| 48 | { |