rule_expression_from_gtv

Takes a GTV representation of one rule, and converts it into a single rule_expression

Throws "INVALID RULE" if the first component of the gtv can't be mapped into a rule_operator value or the second one can't be mapped into a rule_variable value.

Throws if gtv is not the GTV representation of a rule, for example:

  • it is not a list

  • the first two components are not texts

  • the last component is not an integer

Parameters

gtv

the rule that should be deserialized