concepts.dm.crow.parsers.crow_parser.parse_expression#

parse_expression(domain, string, state=None, variables=None, auto_constant_guess=True)[source]#

Parse an expression.

Parameters:
  • domain (CrowDomain) – the domain object.

  • string (str) – the string containing the expression.

  • state (CrowState | None) – the current state, containing objects.

  • variables (Sequence[Variable] | None) – the variables.

  • auto_constant_guess (bool) – whether to guess whether a variable is a constant.

Returns:

the parsed expression.

Return type:

Expression