interpreter_pattern::Expression

class Expression

Abstract expression in the grammar.

Subclassed by interpreter_pattern::And, interpreter_pattern::Constant, interpreter_pattern::Not, interpreter_pattern::Or, interpreter_pattern::Variable

Public Functions

virtual bool interpret(const Context &ctx) const = 0

Evaluate this expression given a ctx of variable bindings.

Parameters:

ctx – The interpretation context.

Returns:

The boolean result of evaluating the expression.