| 607 | // LexInfo |
| 608 | |
| 609 | ExpressionParser::LexInfo::LexInfo(const std::string& input, std::string reserved_chars) |
| 610 | : reserved_chars(std::move(reserved_chars)) { |
| 611 | ss.clear(); |
| 612 | ss.str(input); // Set the input stream |
| 613 | ss.seekg(0, std::ios_base::beg); |
| 614 | |
| 615 | LastChar = static_cast<signed char>(ss.get()); // First char from stream |
| 616 | nextToken(); // Get first token |
| 617 | } |
| 618 | |
| 619 | char ExpressionParser::LexInfo::nextToken() { |
| 620 | while (isspace(static_cast<unsigned char>(LastChar))) { |