protected function evaluateExpression($expr)
	{
		$original = $expr;
		foreach ($this->getOptimizationPasses() as $regexp => $methodName)
		{
			$regexp = str_replace(' ', '\\s*', $regexp);
			$expr   = preg_replace_callback($regexp, [$this, $methodName], $expr);
		}

		return ($expr === $original) ? $expr : $this->evaluateExpression(trim($expr));
	}
protected function evaluateExpression($expr)
	{
		$original = $expr;
		foreach ($this->getOptimizationPasses() as $regexp => $methodName)
		{
			$regexp = str_replace(' ', '\\s*', $regexp);
			$expr   = preg_replace_callback($regexp, [$this, $methodName], $expr);
		}

		return ($expr === $original) ? $expr : $this->evaluateExpression(trim($expr));
	}
protected function evaluateExpression ( $ expr ) { $ original = $ expr ; foreach ( $ this -> getOptimizationPasses ( ) as $ regexp => $ methodName ) { $ regexp = str_replace ( ' ' , '\\s*' , $ regexp ) ; $ expr = preg_replace_callback ( $ regexp , [ $ this , $ methodName ] , $ expr ) ; } return ( $ expr === $ original ) ? $ expr : $ this -> evaluateExpression ( trim ( $ expr ) ) ; }
Evaluate given expression and return the result

@param  string $expr
@return string
Evaluate given expression and return the result