| 270 | } |
| 271 | |
| 272 | FieldGeneratorPtr ExpressionParser::parseString(const string& input) const { |
| 273 | // Allocate a new lexer |
| 274 | LexInfo lex(input, reserved_chars); |
| 275 | |
| 276 | // Parse |
| 277 | auto expr = parseExpression(lex); |
| 278 | |
| 279 | // Check for remaining characters |
| 280 | if (lex.curtok != 0) { |
| 281 | throw ParseException("Tokens remaining unparsed in '{:s}'", input); |
| 282 | } |
| 283 | |
| 284 | return expr; |
| 285 | } |
| 286 | |
| 287 | ////////////////////////////////////////////////////////// |
| 288 | // Private functions |