/** * Output debug information to output (php://output stream) */ static function PrintTrace() { self::$yyTraceFILE = fopen('php://output', 'w'); self::$yyTracePrompt = ''; }
/** * This function is cached since the number of string pattern that it will recive is limited. * * @param string $string_pattern The string pattern * @return __ExpressionTemplate */ private function _createExpressionTemplate($string_pattern) { $return_value = __ApplicationContext::getInstance()->getCache()->getData($string_pattern); if ($return_value == null) { $return_value = new __ExpressionTemplate(); try { $lex = new __REInverseLexer($string_pattern); $parser = new __REInverseParser($lex); while ($lex->yylex()) { $parser->doParse($lex->token, $lex->value); } $parser->doParse(0, 0); $return_value = $parser->getResult(); } catch (Exception $e) { throw new __CoreException($e->getMessage()); } __ApplicationContext::getInstance()->getCache()->setData($string_pattern, $return_value); } return $return_value; }