/////////////////////////////////////////////////////////////////////////// Arithmetic --> Geometric {( "+" | "-" ) Geometric}
| 477 | //////////////////////////////////////////////////////////////////////////////// |
| 478 | // Arithmetic --> Geometric {( "+" | "-" ) Geometric} |
| 479 | bool Eval::parseArithmetic(std::vector<std::pair<std::string, Lexer::Type>>& infix, |
| 480 | unsigned int& i) const { |
| 481 | if (i < infix.size() && parseGeometric(infix, i)) { |
| 482 | while (i < infix.size() && infix[i].second == Lexer::Type::op && |
| 483 | (infix[i].first == "+" || infix[i].first == "-")) { |
| 484 | ++i; |
| 485 | if (!parseGeometric(infix, i)) return false; |
| 486 | } |
| 487 | |
| 488 | return true; |
| 489 | } |
| 490 | |
| 491 | return false; |
| 492 | } |
| 493 | |
| 494 | //////////////////////////////////////////////////////////////////////////////// |
| 495 | // Geometric --> Tag {( "*" | "/" | "%" ) Tag} |
nothing calls this directly
no outgoing calls
no test coverage detected