MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / parseString

Method parseString

src/sys/expressionparser.cxx:272–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272FieldGeneratorPtr 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

Callers 1

TEST_FFunction · 0.80

Calls 1

parseExpressionFunction · 0.85

Tested by 1

TEST_FFunction · 0.64