public function evaluate(Context $context, $expression) {
		if(is_numeric($expression)) {
			$expression = (string)$expression;
		}
		if(! isset($context->view->lexers[$expression]) ) {
			$lexer = new Lexer($expression);
			$context->view->lexers[$expression] = & $lexer;
			$lexer->parse($context);
		} else {
			$lexer = & $context->view->lexers[$expression];
		}

		$result = $lexer->evaluate($context);
		return $result;
	}
public function evaluate(Context $context, $expression) {
		if(is_numeric($expression)) {
			$expression = (string)$expression;
		}
		if(! isset($context->view->lexers[$expression]) ) {
			$lexer = new Lexer($expression);
			$context->view->lexers[$expression] = & $lexer;
			$lexer->parse($context);
		} else {
			$lexer = & $context->view->lexers[$expression];
		}

		$result = $lexer->evaluate($context);
		return $result;
	}
public function evaluate ( Context $ context , $ expression ) { if ( is_numeric ( $ expression ) ) { $ expression = ( string ) $ expression ; } if ( ! isset ( $ context -> view -> lexers [ $ expression ] ) ) { $ lexer = new Lexer ( $ expression ) ; $ context -> view -> lexers [ $ expression ] = & $ lexer ; $ lexer -> parse ( $ context ) ; } else { $ lexer = & $ context -> view -> lexers [ $ expression ] ; } $ result = $ lexer -> evaluate ( $ context ) ; return $ result ; }
Evaluate the XPath-like expression
on the data object associated to the view.

@param Context $context
@param string $expression
@return string
@throws \figdice\exceptions\LexerSyntaxErrorException
@throws \figdice\exceptions\LexerUnbalancedParenthesesException
@throws \figdice\exceptions\LexerUnexpectedCharException
Evaluate the XPath - like expression on the data object associated to the view .