diff --git a/change_log.txt b/change_log.txt index 8ab5d319..02ecf348 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,9 @@ -===== 3.1.33-dev-7 ===== +===== 3.1.33-dev-8 ===== +31.08.2018 + - PSR-2 code style fixes for config and template file Lexer/Parser generated with + the Smarty Lexer/Parser generator from https://github.com/smarty-php/smarty-lexer + https://github.com/smarty-php/smarty/pull/483 + 26.08.2018 - bugfix/enhancement {capture} allow variable as capture block name in Smarty special variable like $smarty.capture.$foo https://github.com/smarty-php/smarty/issues/478 https://github.com/smarty-php/smarty/pull/481 diff --git a/lexer/smarty_internal_configfilelexer.plex b/lexer/smarty_internal_configfilelexer.plex index 5e61f338..7a86fadc 100644 --- a/lexer/smarty_internal_configfilelexer.plex +++ b/lexer/smarty_internal_configfilelexer.plex @@ -308,7 +308,7 @@ text { if (isset($match[0][1])) { $to = $match[0][1]; } else { - $this->compiler->trigger_template_error ('missing or misspelled literal closing tag'); + $this->compiler->trigger_config_file_error ('missing or misspelled literal closing tag'); } $this->value = substr($this->data,$this->counter,$to-$this->counter); $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT; diff --git a/lexer/smarty_internal_templateparser.y b/lexer/smarty_internal_templateparser.y index 8fcd5f34..fa68f74b 100644 --- a/lexer/smarty_internal_templateparser.y +++ b/lexer/smarty_internal_templateparser.y @@ -61,7 +61,7 @@ class Smarty_Internal_Templateparser /** * root parse tree buffer * - * @var Smarty_Internal_ParseTree + * @var Smarty_Internal_ParseTree_Template */ public $root_buffer; diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index a8eb336c..766c38e1 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.33-dev-7'; + const SMARTY_VERSION = '3.1.33-dev-8'; /** * define variable scopes */ diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php index 02253369..0d33a769 100644 --- a/libs/sysplugins/smarty_internal_configfilelexer.php +++ b/libs/sysplugins/smarty_internal_configfilelexer.php @@ -27,73 +27,86 @@ class Smarty_Internal_Configfilelexer const COMMENT = 4; const SECTION = 5; const TRIPPLE = 6; + /** * Source * * @var string */ public $data; + /** * Source length * * @var int */ public $dataLength = null; + /** * byte counter * * @var int */ public $counter; + /** * token number * * @var int */ public $token; + /** * token value * * @var string */ public $value; + /** * current line * * @var int */ public $line; + /** * state number * * @var int */ public $state = 1; + /** * Smarty object * * @var Smarty */ public $smarty = null; + /** * trace file * * @var resource */ public $yyTraceFILE; + /** * trace prompt * * @var string */ public $yyTracePrompt; + /** * state names * * @var array */ - public $state_name = array(1 => 'START', 2 => 'VALUE', 3 => 'NAKED_STRING_VALUE', 4 => 'COMMENT', 5 => 'SECTION', - 6 => 'TRIPPLE'); + public $state_name = array( + 1 => 'START', 2 => 'VALUE', 3 => 'NAKED_STRING_VALUE', 4 => 'COMMENT', 5 => 'SECTION', 6 => 'TRIPPLE' + ); + /** * token names * @@ -101,30 +114,40 @@ class Smarty_Internal_Configfilelexer */ public $smarty_token_names = array( // Text for parser error messages ); + /** * compiler object * * @var Smarty_Internal_Config_File_Compiler */ private $compiler = null; + /** * copy of config_booleanize * * @var bool */ private $configBooleanize = false; + /** * storage for assembled token patterns * * @var string */ private $yy_global_pattern1 = null; + private $yy_global_pattern2 = null; + private $yy_global_pattern3 = null; + private $yy_global_pattern4 = null; + private $yy_global_pattern5 = null; + private $yy_global_pattern6 = null; + private $_yy_state = 1; + private $_yy_stack = array(); /** @@ -166,35 +189,27 @@ class Smarty_Internal_Configfilelexer public function yypushstate($state) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sState push %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%snew State %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } public function yypopstate() { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sState pop %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } $this->_yy_state = array_pop($this->_yy_stack); if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%snew State %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -202,10 +217,8 @@ class Smarty_Internal_Configfilelexer { $this->_yy_state = $state; if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sState set %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -231,8 +244,7 @@ class Smarty_Internal_Configfilelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state START'); + $this->counter, 5) . '... state START'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -264,45 +276,45 @@ class Smarty_Internal_Configfilelexer } while (true); } - function yy_r1_1() + public function yy_r1_1() { $this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART; $this->yypushstate(self::COMMENT); } - function yy_r1_2() + public function yy_r1_2() { $this->token = Smarty_Internal_Configfileparser::TPC_OPENB; $this->yypushstate(self::SECTION); } - function yy_r1_3() + public function yy_r1_3() { $this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB; } - function yy_r1_4() + public function yy_r1_4() { $this->token = Smarty_Internal_Configfileparser::TPC_EQUAL; $this->yypushstate(self::VALUE); } // end function - function yy_r1_5() + public function yy_r1_5() { return false; } - function yy_r1_6() + public function yy_r1_6() { $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE; } - function yy_r1_7() + public function yy_r1_7() { $this->token = Smarty_Internal_Configfileparser::TPC_ID; } - function yy_r1_8() + public function yy_r1_8() { $this->token = Smarty_Internal_Configfileparser::TPC_OTHER; } @@ -329,8 +341,7 @@ class Smarty_Internal_Configfilelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state VALUE'); + $this->counter, 5) . '... state VALUE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -362,42 +373,42 @@ class Smarty_Internal_Configfilelexer } while (true); } - function yy_r2_1() + public function yy_r2_1() { return false; } - function yy_r2_2() + public function yy_r2_2() { $this->token = Smarty_Internal_Configfileparser::TPC_FLOAT; $this->yypopstate(); } - function yy_r2_3() + public function yy_r2_3() { $this->token = Smarty_Internal_Configfileparser::TPC_INT; $this->yypopstate(); } - function yy_r2_4() + public function yy_r2_4() { $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES; $this->yypushstate(self::TRIPPLE); } - function yy_r2_5() + public function yy_r2_5() { $this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING; $this->yypopstate(); } - function yy_r2_6() + public function yy_r2_6() { $this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING; $this->yypopstate(); } // end function - function yy_r2_7() + public function yy_r2_7() { if (!$this->configBooleanize || !in_array(strtolower($this->value), array('true', 'false', 'on', 'off', 'yes', 'no'))) { @@ -410,13 +421,13 @@ class Smarty_Internal_Configfilelexer } } - function yy_r2_8() + public function yy_r2_8() { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->yypopstate(); } - function yy_r2_9() + public function yy_r2_9() { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->value = ''; @@ -444,8 +455,7 @@ class Smarty_Internal_Configfilelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state NAKED_STRING_VALUE'); + $this->counter, 5) . '... state NAKED_STRING_VALUE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -477,7 +487,7 @@ class Smarty_Internal_Configfilelexer } while (true); } - function yy_r3_1() + public function yy_r3_1() { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; $this->yypopstate(); @@ -504,8 +514,7 @@ class Smarty_Internal_Configfilelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state COMMENT'); + $this->counter, 5) . '... state COMMENT'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -537,17 +546,17 @@ class Smarty_Internal_Configfilelexer } while (true); } - function yy_r4_1() + public function yy_r4_1() { return false; } - function yy_r4_2() + public function yy_r4_2() { $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING; } // end function - function yy_r4_3() + public function yy_r4_3() { $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE; $this->yypopstate(); @@ -574,8 +583,7 @@ class Smarty_Internal_Configfilelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state SECTION'); + $this->counter, 5) . '... state SECTION'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -607,12 +615,12 @@ class Smarty_Internal_Configfilelexer } while (true); } - function yy_r5_1() + public function yy_r5_1() { $this->token = Smarty_Internal_Configfileparser::TPC_DOT; } - function yy_r5_2() + public function yy_r5_2() { $this->token = Smarty_Internal_Configfileparser::TPC_SECTION; $this->yypopstate(); @@ -639,8 +647,7 @@ class Smarty_Internal_Configfilelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state TRIPPLE'); + $this->counter, 5) . '... state TRIPPLE'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -672,21 +679,21 @@ class Smarty_Internal_Configfilelexer } while (true); } - function yy_r6_1() + public function yy_r6_1() { $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES_END; $this->yypopstate(); $this->yypushstate(self::START); } - function yy_r6_2() + public function yy_r6_2() { $to = strlen($this->data); preg_match("/\"\"\"[ \t\r]*[\n#;]/", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); if (isset($match[ 0 ][ 1 ])) { $to = $match[ 0 ][ 1 ]; } else { - $this->compiler->trigger_template_error('missing or misspelled literal closing tag'); + $this->compiler->trigger_config_file_error('missing or misspelled literal closing tag'); } $this->value = substr($this->data, $this->counter, $to - $this->counter); $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT; diff --git a/libs/sysplugins/smarty_internal_configfileparser.php b/libs/sysplugins/smarty_internal_configfileparser.php index 9dc8f99e..4c52d786 100644 --- a/libs/sysplugins/smarty_internal_configfileparser.php +++ b/libs/sysplugins/smarty_internal_configfileparser.php @@ -57,27 +57,32 @@ class Smarty_Internal_Configfileparser const YYERRORSYMBOL = 19; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; - static public $yy_action = array( + + public static $yy_action = array( 32, 31, 30, 29, 35, 13, 19, 3, 24, 26, 59, 9, 14, 1, 16, 25, 11, 28, 25, 11, 17, 27, 34, 20, 18, 15, 23, 5, 6, 22, 10, 8, 4, 12, 2, 33, 7, 21, ); - static public $yy_lookahead = array( + + public static $yy_lookahead = array( 7, 8, 9, 10, 11, 12, 5, 23, 15, 16, 20, 21, 2, 23, 4, 17, 18, 14, 17, 18, 13, 14, 25, 26, 15, 2, 17, 3, 3, 17, 25, 25, 6, 1, 23, 27, 22, 24, ); - static public $yy_shift_ofst = array( + + public static $yy_shift_ofst = array( -8, 1, 1, 1, -7, -2, -2, 32, -8, -8, -8, 9, 10, 7, 25, 24, 23, 3, 12, 26, ); - static public $yy_reduce_ofst = array( + + public static $yy_reduce_ofst = array( -10, -3, -3, -3, 8, 6, 5, 13, 11, 14, -16, ); - static public $yyExpectedTokens = array( + + public static $yyExpectedTokens = array( array(), array(5, 17, 18,), array(5, 17, 18,), @@ -115,13 +120,16 @@ class Smarty_Internal_Configfileparser array(), array(), ); - static public $yy_default = array( + + public static $yy_default = array( 44, 37, 41, 40, 58, 58, 58, 36, 44, 39, 44, 58, 58, 58, 58, 58, 58, 58, 58, 58, 43, 38, 57, 56, 53, 55, 54, 52, 51, 49, 48, 47, 46, 45, 42, 50, ); + public static $yyFallback = array(); + public static $yyRuleName = array( 'start ::= global_vars sections', 'global_vars ::= var_list', @@ -146,6 +154,7 @@ class Smarty_Internal_Configfileparser 'newline ::= COMMENTSTART NEWLINE', 'newline ::= COMMENTSTART NAKED_STRING NEWLINE', ); + public static $yyRuleInfo = array( array(0 => 20, 1 => 2), array(0 => 21, 1 => 1), @@ -170,6 +179,7 @@ class Smarty_Internal_Configfileparser array(0 => 25, 1 => 2), array(0 => 25, 1 => 3), ); + public static $yyReduceMap = array( 0 => 0, 2 => 0, @@ -194,46 +204,60 @@ class Smarty_Internal_Configfileparser 17 => 17, 18 => 17, ); + /** * helper map * * @var array */ - private static $escapes_single = array('\\' => '\\', - '\'' => '\''); + private static $escapes_single = array( + '\\' => '\\', + '\'' => '\'' + ); + /** * result status * * @var bool */ public $successful = true; + /** * return value * * @var mixed */ public $retvalue = 0; + /** * @var */ public $yymajor; + /** * compiler object * * @var Smarty_Internal_Config_File_Compiler */ public $compiler = null; + /** * smarty object * * @var Smarty */ public $smarty = null; + public $yyTraceFILE; + public $yyTracePrompt; + public $yyidx; + public $yyerrcnt; + public $yystack = array(); + public $yyTokenName = array( '$', 'OPENB', 'SECTION', 'CLOSEB', 'DOT', 'ID', 'EQUAL', 'FLOAT', @@ -243,30 +267,35 @@ class Smarty_Internal_Configfileparser 'start', 'global_vars', 'sections', 'var_list', 'section', 'newline', 'var', 'value', ); + /** * lexer object * * @var Smarty_Internal_Configfilelexer */ private $lex; + /** * internal error flag * * @var bool */ private $internalError = false; + /** * copy of config_overwrite property * * @var bool */ private $configOverwrite = false; + /** * copy of config_read_hidden property * * @var bool */ private $configReadHidden = false; + private $_retvalue; /** @@ -376,8 +405,8 @@ class Smarty_Internal_Configfileparser $yytos = array_pop($this->yystack); if ($this->yyTraceFILE && $this->yyidx >= 0) { fwrite($this->yyTraceFILE, - $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . - "\n"); + $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . + "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); @@ -588,10 +617,9 @@ class Smarty_Internal_Configfileparser if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) { if ($this->yyTraceFILE) { - fwrite($this->yyTraceFILE, - $this->yyTracePrompt . 'FALLBACK ' . - $this->yyTokenName[ $iLookAhead ] . ' => ' . - $this->yyTokenName[ $iFallback ] . "\n"); + fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'FALLBACK ' . + $this->yyTokenName[ $iLookAhead ] . ' => ' . + $this->yyTokenName[ $iFallback ] . "\n"); } return $this->yy_find_shift_action($iFallback); } @@ -645,118 +673,117 @@ class Smarty_Internal_Configfileparser $yytos->minor = $yypMinor; $this->yystack[] = $yytos; if ($this->yyTraceFILE && $this->yyidx > 0) { - fprintf($this->yyTraceFILE, - "%sShift %d\n", - $this->yyTracePrompt, - $yyNewState); + fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, + $yyNewState); fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); for ($i = 1; $i <= $this->yyidx; $i++) { - fprintf($this->yyTraceFILE, - " %s", - $this->yyTokenName[ $this->yystack[ $i ]->major ]); + fprintf($this->yyTraceFILE, " %s", + $this->yyTokenName[ $this->yystack[ $i ]->major ]); } fwrite($this->yyTraceFILE, "\n"); } } - function yy_r0() + public function yy_r0() { $this->_retvalue = null; } - function yy_r1() + public function yy_r1() { $this->add_global_vars($this->yystack[ $this->yyidx + 0 ]->minor); $this->_retvalue = null; } - function yy_r4() + public function yy_r4() { $this->add_section_vars($this->yystack[ $this->yyidx + -3 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); $this->_retvalue = null; } // line 245 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r5() + public function yy_r5() { if ($this->configReadHidden) { $this->add_section_vars($this->yystack[ $this->yyidx + -3 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor); + $this->yystack[ $this->yyidx + 0 ]->minor); } $this->_retvalue = null; } // line 250 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r6() + public function yy_r6() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; } // line 264 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r7() + public function yy_r7() { $this->_retvalue = array_merge($this->yystack[ $this->yyidx + -1 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); } // line 269 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r8() + public function yy_r8() { $this->_retvalue = array(); } // line 277 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r9() + public function yy_r9() { $this->_retvalue = - array('key' => $this->yystack[ $this->yyidx + -2 ]->minor, - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); + array( + 'key' => $this->yystack[ $this->yyidx + -2 ]->minor, + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor + ); } // line 281 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r10() + public function yy_r10() { $this->_retvalue = (float)$this->yystack[ $this->yyidx + 0 ]->minor; } // line 285 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r11() + public function yy_r11() { $this->_retvalue = (int)$this->yystack[ $this->yyidx + 0 ]->minor; } // line 291 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r12() + public function yy_r12() { $this->_retvalue = $this->parse_bool($this->yystack[ $this->yyidx + 0 ]->minor); } // line 296 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r13() + public function yy_r13() { $this->_retvalue = self::parse_single_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor); } // line 300 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r14() + public function yy_r14() { $this->_retvalue = self::parse_double_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor); } // line 304 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r15() + public function yy_r15() { $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[ $this->yyidx + -1 ]->minor); } // line 308 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r16() + public function yy_r16() { $this->_retvalue = ''; } // line 312 "../smarty/lexer/smarty_internal_configfileparser.y" - function yy_r17() + public function yy_r17() { $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; } @@ -766,11 +793,9 @@ class Smarty_Internal_Configfileparser { if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { - fprintf($this->yyTraceFILE, - "%sReduce (%d) [%s].\n", - $this->yyTracePrompt, - $yyruleno, - self::$yyRuleName[ $yyruleno ]); + fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", + $this->yyTracePrompt, $yyruleno, + self::$yyRuleName[ $yyruleno ]); } $this->_retvalue = $yy_lefthand_side = null; if (isset(self::$yyReduceMap[ $yyruleno ])) { @@ -851,10 +876,8 @@ class Smarty_Internal_Configfileparser } $yyendofinput = ($yymajor == 0); if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sInput %s\n", - $this->yyTracePrompt, - $this->yyTokenName[ $yymajor ]); + fprintf($this->yyTraceFILE, "%sInput %s\n", + $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); } do { $yyact = $this->yy_find_shift_action($yymajor); @@ -875,9 +898,8 @@ class Smarty_Internal_Configfileparser $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact === self::YY_ERROR_ACTION) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sSyntax Error!\n", - $this->yyTracePrompt); + fprintf($this->yyTraceFILE, "%sSyntax Error!\n", + $this->yyTracePrompt); } if (self::YYERRORSYMBOL) { if ($this->yyerrcnt < 0) { @@ -886,10 +908,8 @@ class Smarty_Internal_Configfileparser $yymx = $this->yystack[ $this->yyidx ]->major; if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sDiscard input token %s\n", - $this->yyTracePrompt, - $this->yyTokenName[ $yymajor ]); + fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", + $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE; diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index 49144197..e59729a6 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -23,96 +23,112 @@ class Smarty_Internal_Templatelexer const TAGBODY = 3; const LITERAL = 4; const DOUBLEQUOTEDSTRING = 5; + /** * Source * * @var string */ public $data; + /** * Source length * * @var int */ public $dataLength = null; + /** * byte counter * * @var int */ public $counter; + /** * token number * * @var int */ public $token; + /** * token value * * @var string */ public $value; + /** * current line * * @var int */ public $line; + /** * tag start line * * @var */ public $taglineno; + /** * php code type * * @var string */ public $phpType = ''; + /** * state number * * @var int */ public $state = 1; + /** * Smarty object * * @var Smarty */ public $smarty = null; + /** * compiler object * * @var Smarty_Internal_TemplateCompilerBase */ public $compiler = null; + /** * trace file * * @var resource */ public $yyTraceFILE; + /** * trace prompt * * @var string */ public $yyTracePrompt; + /** * XML flag true while processing xml * * @var bool */ public $is_xml = false; + /** * state names * * @var array */ public $state_name = array(1 => 'TEXT', 2 => 'TAG', 3 => 'TAGBODY', 4 => 'LITERAL', 5 => 'DOUBLEQUOTEDSTRING',); + /** * token names * @@ -156,43 +172,51 @@ class Smarty_Internal_Templatelexer 'TLOGOP' => '"lt", "eq" ... logical operator; "is div by" ... if condition', 'SCOND' => '"is even" ... if condition', ); + /** * literal tag nesting level * * @var int */ private $literal_cnt = 0; + /** * preg token pattern for state TEXT * * @var string */ private $yy_global_pattern1 = null; + /** * preg token pattern for state TAG * * @var string */ private $yy_global_pattern2 = null; + /** * preg token pattern for state TAGBODY * * @var string */ private $yy_global_pattern3 = null; + /** * preg token pattern for state LITERAL * * @var string */ private $yy_global_pattern4 = null; + /** * preg token pattern for state DOUBLEQUOTEDSTRING * * @var null */ private $yy_global_pattern5 = null; + private $_yy_state = 1; + private $_yy_stack = array(); /** @@ -258,35 +282,27 @@ class Smarty_Internal_Templatelexer public function yypushstate($state) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sState push %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } array_push($this->_yy_stack, $this->_yy_state); $this->_yy_state = $state; if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%snew State %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } public function yypopstate() { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sState pop %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } $this->_yy_state = array_pop($this->_yy_stack); if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%snew State %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -294,10 +310,8 @@ class Smarty_Internal_Templatelexer { $this->_yy_state = $state; if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sState set %s\n", - $this->yyTracePrompt, - isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); + fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt, + isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] : $this->_yy_state); } } @@ -323,8 +337,7 @@ class Smarty_Internal_Templatelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state TEXT'); + $this->counter, 5) . '... state TEXT'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -356,18 +369,15 @@ class Smarty_Internal_Templatelexer } while (true); } - function yy_r1_1() + public function yy_r1_1() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - function yy_r1_2() + public function yy_r1_2() { - preg_match("/[*]{$this->compiler->getRdelPreg()}[\n]?/", - $this->data, - $match, - PREG_OFFSET_CAPTURE, - $this->counter); + preg_match("/[*]{$this->compiler->getRdelPreg()}[\n]?/", $this->data, $match, PREG_OFFSET_CAPTURE, + $this->counter); if (isset($match[ 0 ][ 1 ])) { $to = $match[ 0 ][ 1 ] + strlen($match[ 0 ][ 0 ]); } else { @@ -377,40 +387,40 @@ class Smarty_Internal_Templatelexer return false; } - function yy_r1_4() + public function yy_r1_4() { $this->compiler->getTagCompiler('private_php')->parsePhp($this); } - function yy_r1_8() + public function yy_r1_8() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - function yy_r1_10() + public function yy_r1_10() { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } - function yy_r1_12() + public function yy_r1_12() { $this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->yypushstate(self::LITERAL); } // end function - function yy_r1_14() + public function yy_r1_14() { $this->yypushstate(self::TAG); return true; } - function yy_r1_16() + public function yy_r1_16() { $this->compiler->getTagCompiler('private_php')->parsePhp($this); } - function yy_r1_19() + public function yy_r1_19() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } @@ -437,8 +447,7 @@ class Smarty_Internal_Templatelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state TAG'); + $this->counter, 5) . '... state TAG'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -470,63 +479,63 @@ class Smarty_Internal_Templatelexer } while (true); } - function yy_r2_1() + public function yy_r2_1() { $this->token = Smarty_Internal_Templateparser::TP_LDELIF; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - function yy_r2_4() + public function yy_r2_4() { $this->token = Smarty_Internal_Templateparser::TP_LDELFOR; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - function yy_r2_6() + public function yy_r2_6() { $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - function yy_r2_8() + public function yy_r2_8() { $this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - function yy_r2_10() + public function yy_r2_10() { $this->token = Smarty_Internal_Templateparser::TP_LDELMAKENOCACHE; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - function yy_r2_12() + public function yy_r2_12() { $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_SIMPLETAG; $this->taglineno = $this->line; } - function yy_r2_15() + public function yy_r2_15() { $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILDPARENT; $this->taglineno = $this->line; } - function yy_r2_18() + public function yy_r2_18() { $this->yypopstate(); $this->token = Smarty_Internal_Templateparser::TP_CLOSETAG; $this->taglineno = $this->line; } - function yy_r2_20() + public function yy_r2_20() { if ($this->_yy_stack[ count($this->_yy_stack) - 1 ] === self::TEXT) { $this->yypopstate(); @@ -540,14 +549,14 @@ class Smarty_Internal_Templatelexer } } // end function - function yy_r2_23() + public function yy_r2_23() { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yybegin(self::TAGBODY); $this->taglineno = $this->line; } - function yy_r2_25() + public function yy_r2_25() { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yybegin(self::TAGBODY); @@ -576,8 +585,7 @@ class Smarty_Internal_Templatelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state TAGBODY'); + $this->counter, 5) . '... state TAGBODY'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -609,156 +617,156 @@ class Smarty_Internal_Templatelexer } while (true); } - function yy_r3_1() + public function yy_r3_1() { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); } - function yy_r3_2() + public function yy_r3_2() { $this->yypushstate(self::TAG); return true; } - function yy_r3_4() + public function yy_r3_4() { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); $this->compiler->enterDoubleQuote(); } - function yy_r3_5() + public function yy_r3_5() { $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; } - function yy_r3_6() + public function yy_r3_6() { $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; } - function yy_r3_7() + public function yy_r3_7() { $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; } - function yy_r3_8() + public function yy_r3_8() { $this->token = Smarty_Internal_Templateparser::TP_ISIN; } - function yy_r3_9() + public function yy_r3_9() { $this->token = Smarty_Internal_Templateparser::TP_AS; } - function yy_r3_10() + public function yy_r3_10() { $this->token = Smarty_Internal_Templateparser::TP_TO; } - function yy_r3_11() + public function yy_r3_11() { $this->token = Smarty_Internal_Templateparser::TP_STEP; } - function yy_r3_12() + public function yy_r3_12() { $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; } - function yy_r3_13() + public function yy_r3_13() { $this->token = Smarty_Internal_Templateparser::TP_LOGOP; } - function yy_r3_15() + public function yy_r3_15() { $this->token = Smarty_Internal_Templateparser::TP_SLOGOP; } - function yy_r3_17() + public function yy_r3_17() { $this->token = Smarty_Internal_Templateparser::TP_TLOGOP; } - function yy_r3_20() + public function yy_r3_20() { $this->token = Smarty_Internal_Templateparser::TP_SINGLECOND; } - function yy_r3_23() + public function yy_r3_23() { $this->token = Smarty_Internal_Templateparser::TP_NOT; } - function yy_r3_24() + public function yy_r3_24() { $this->token = Smarty_Internal_Templateparser::TP_TYPECAST; } - function yy_r3_28() + public function yy_r3_28() { $this->token = Smarty_Internal_Templateparser::TP_OPENP; } - function yy_r3_29() + public function yy_r3_29() { $this->token = Smarty_Internal_Templateparser::TP_CLOSEP; } - function yy_r3_30() + public function yy_r3_30() { $this->token = Smarty_Internal_Templateparser::TP_OPENB; } - function yy_r3_31() + public function yy_r3_31() { $this->token = Smarty_Internal_Templateparser::TP_CLOSEB; } - function yy_r3_32() + public function yy_r3_32() { $this->token = Smarty_Internal_Templateparser::TP_PTR; } - function yy_r3_33() + public function yy_r3_33() { $this->token = Smarty_Internal_Templateparser::TP_APTR; } - function yy_r3_34() + public function yy_r3_34() { $this->token = Smarty_Internal_Templateparser::TP_EQUAL; } - function yy_r3_35() + public function yy_r3_35() { $this->token = Smarty_Internal_Templateparser::TP_INCDEC; } - function yy_r3_37() + public function yy_r3_37() { $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; } - function yy_r3_39() + public function yy_r3_39() { $this->token = Smarty_Internal_Templateparser::TP_MATH; } - function yy_r3_41() + public function yy_r3_41() { $this->token = Smarty_Internal_Templateparser::TP_AT; } - function yy_r3_42() + public function yy_r3_42() { $this->token = Smarty_Internal_Templateparser::TP_HATCH; } - function yy_r3_43() + public function yy_r3_43() { // resolve conflicts with shorttag and right_delimiter starting with '=' if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->compiler->getRdelLength()) === @@ -771,73 +779,73 @@ class Smarty_Internal_Templatelexer } } - function yy_r3_44() + public function yy_r3_44() { $this->token = Smarty_Internal_Templateparser::TP_NAMESPACE; } - function yy_r3_47() + public function yy_r3_47() { $this->token = Smarty_Internal_Templateparser::TP_ID; } - function yy_r3_48() + public function yy_r3_48() { $this->token = Smarty_Internal_Templateparser::TP_INTEGER; } - function yy_r3_49() + public function yy_r3_49() { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); } - function yy_r3_50() + public function yy_r3_50() { $this->token = Smarty_Internal_Templateparser::TP_VERT; } - function yy_r3_51() + public function yy_r3_51() { $this->token = Smarty_Internal_Templateparser::TP_DOT; } - function yy_r3_52() + public function yy_r3_52() { $this->token = Smarty_Internal_Templateparser::TP_COMMA; } - function yy_r3_53() + public function yy_r3_53() { $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; } - function yy_r3_54() + public function yy_r3_54() { $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; } - function yy_r3_55() + public function yy_r3_55() { $this->token = Smarty_Internal_Templateparser::TP_COLON; } - function yy_r3_56() + public function yy_r3_56() { $this->token = Smarty_Internal_Templateparser::TP_QMARK; } - function yy_r3_57() + public function yy_r3_57() { $this->token = Smarty_Internal_Templateparser::TP_HEX; } - function yy_r3_58() + public function yy_r3_58() { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } // end function - function yy_r3_59() + public function yy_r3_59() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } @@ -864,8 +872,7 @@ class Smarty_Internal_Templatelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state LITERAL'); + $this->counter, 5) . '... state LITERAL'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -897,13 +904,13 @@ class Smarty_Internal_Templatelexer } while (true); } - function yy_r4_1() + public function yy_r4_1() { $this->literal_cnt++; $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } - function yy_r4_3() + public function yy_r4_3() { if ($this->literal_cnt) { $this->literal_cnt--; @@ -914,7 +921,7 @@ class Smarty_Internal_Templatelexer } } - function yy_r4_5() + public function yy_r4_5() { $this->token = Smarty_Internal_Templateparser::TP_LITERAL; } // end function @@ -941,8 +948,7 @@ class Smarty_Internal_Templatelexer if (empty($yymatches)) { throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, - $this->counter, - 5) . '... state DOUBLEQUOTEDSTRING'); + $this->counter, 5) . '... state DOUBLEQUOTEDSTRING'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -974,47 +980,47 @@ class Smarty_Internal_Templatelexer } while (true); } - function yy_r5_1() + public function yy_r5_1() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - function yy_r5_3() + public function yy_r5_3() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - function yy_r5_5() + public function yy_r5_5() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - function yy_r5_7() + public function yy_r5_7() { $this->yypushstate(self::TAG); return true; } - function yy_r5_9() + public function yy_r5_9() { $this->yypushstate(self::TAG); return true; } - function yy_r5_11() + public function yy_r5_11() { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->taglineno = $this->line; $this->yypushstate(self::TAGBODY); } - function yy_r5_13() + public function yy_r5_13() { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypopstate(); } - function yy_r5_14() + public function yy_r5_14() { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->value = substr($this->value, 0, -1); @@ -1022,17 +1028,17 @@ class Smarty_Internal_Templatelexer $this->taglineno = $this->line; } - function yy_r5_15() + public function yy_r5_15() { $this->token = Smarty_Internal_Templateparser::TP_DOLLARID; } - function yy_r5_16() + public function yy_r5_16() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - function yy_r5_17() + public function yy_r5_17() { $this->token = Smarty_Internal_Templateparser::TP_TEXT; } diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php index a32c5dd0..4de693e9 100644 --- a/libs/sysplugins/smarty_internal_templateparser.php +++ b/libs/sysplugins/smarty_internal_templateparser.php @@ -100,7 +100,8 @@ class Smarty_Internal_Templateparser const YYERRORSYMBOL = 61; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; - static public $yy_action = array( + + public static $yy_action = array( 42, 266, 267, 379, 115, 202, 27, 204, 260, 235, 237, 1, 17, 125, 94, 182, 379, 215, 10, 79, 317, 168, 379, 12, 107, 425, 308, 318, 224, 298, @@ -310,7 +311,8 @@ class Smarty_Internal_Templateparser 40, 14, 257, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 172, ); - static public $yy_lookahead = array( + + public static $yy_lookahead = array( 3, 9, 10, 15, 71, 17, 28, 74, 11, 12, 13, 14, 34, 16, 81, 18, 28, 20, 21, 22, 11, 82, 34, 14, 27, 37, 93, 18, 31, 32, @@ -520,7 +522,8 @@ class Smarty_Internal_Templateparser 86, 87, 88, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 101, ); - static public $yy_shift_ofst = array( + + public static $yy_shift_ofst = array( -23, 399, 399, 449, 49, 49, 449, 349, 49, 49, 349, -3, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 149, 199, 299, 49, 149, 49, 49, @@ -545,7 +548,8 @@ class Smarty_Internal_Templateparser 572, 574, 570, 532, 530, 553, 298, 523, 544, 510, 92, 534, 529, 519, 517, 496, 442, 481, ); - static public $yy_reduce_ofst = array( + + public static $yy_reduce_ofst = array( 492, 527, 564, 592, 618, 703, 736, 768, 794, 822, 850, 1068, 1096, 1122, 1150, 1286, 1204, 1232, 1260, 1040, 1314, 1532, 1478, 1506, 1342, 1450, 1424, 1396, 1368, 1178, @@ -565,7 +569,8 @@ class Smarty_Internal_Templateparser 78, 320, 78, 522, 320, 78, 320, 78, 522, 196, 78, 51, -61, -20, -4, 109, 132, ); - static public $yyExpectedTokens = array( + + public static $yyExpectedTokens = array( array(), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), @@ -577,8 +582,9 @@ class Smarty_Internal_Templateparser array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), - array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 53, 54, - 59,), + array( + 3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 53, 54, 59, + ), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,), @@ -891,7 +897,8 @@ class Smarty_Internal_Templateparser array(), array(), ); - static public $yy_default = array( + + public static $yy_default = array( 334, 509, 509, 494, 509, 473, 509, 509, 473, 473, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, @@ -926,7 +933,9 @@ class Smarty_Internal_Templateparser 450, 342, 462, 339, 340, 455, 470, 458, 457, 407, 467, 456, 394, ); + public static $yyFallback = array(); + public static $yyRuleName = array( 'start ::= template', 'template ::= template PHP', @@ -1115,6 +1124,7 @@ class Smarty_Internal_Templateparser 'doublequotedcontent ::= smartytag', 'doublequotedcontent ::= TEXT', ); + public static $yyRuleInfo = array( array(0 => 62, 1 => 1), array(0 => 63, 1 => 2), @@ -1303,6 +1313,7 @@ class Smarty_Internal_Templateparser array(0 => 106, 1 => 1), array(0 => 106, 1 => 1), ); + public static $yyReduceMap = array( 0 => 0, 1 => 1, @@ -1490,105 +1501,127 @@ class Smarty_Internal_Templateparser 184 => 184, 185 => 185, ); + /** * result status * * @var bool */ public $successful = true; + /** * return value * * @var mixed */ public $retvalue = 0; + /** * @var */ public $yymajor; + /** * last index of array variable * * @var mixed */ public $last_index; + /** * last variable name * * @var string */ public $last_variable; + /** * root parse tree buffer * - * @var Smarty_Internal_ParseTree + * @var Smarty_Internal_ParseTree_Template */ public $root_buffer; + /** * current parse tree object * * @var Smarty_Internal_ParseTree */ public $current_buffer; + /** * lexer object * * @var Smarty_Internal_Templatelexer */ public $lex; + /** * {strip} status * * @var bool */ public $strip = false; + /** * compiler object * * @var Smarty_Internal_TemplateCompilerBase */ public $compiler = null; + /** * smarty object * * @var Smarty */ public $smarty = null; + /** * template object * * @var Smarty_Internal_Template */ public $template = null; + /** * block nesting level * * @var int */ public $block_nesting_level = 0; + /** * security object * * @var Smarty_Security */ public $security = null; + /** * template prefix array * * @var \Smarty_Internal_ParseTree[] */ public $template_prefix = array(); + /** * template prefix array * * @var \Smarty_Internal_ParseTree[] */ public $template_postfix = array(); + public $yyTraceFILE; + public $yyTracePrompt; + public $yyidx; + public $yyerrcnt; + public $yystack = array(); + public $yyTokenName = array( '$', 'VERT', 'COLON', 'UNIMATH', 'PHP', 'TEXT', 'STRIPON', 'STRIPOFF', @@ -1618,6 +1651,7 @@ class Smarty_Internal_Templateparser 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent', ); + /** * internal error flag * @@ -1727,8 +1761,8 @@ class Smarty_Internal_Templateparser $yytos = array_pop($this->yystack); if ($this->yyTraceFILE && $this->yyidx >= 0) { fwrite($this->yyTraceFILE, - $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . - "\n"); + $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . + "\n"); } $yymajor = $yytos->major; self::yy_destructor($yymajor, $yytos->minor); @@ -1939,10 +1973,9 @@ class Smarty_Internal_Templateparser if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) { if ($this->yyTraceFILE) { - fwrite($this->yyTraceFILE, - $this->yyTracePrompt . 'FALLBACK ' . - $this->yyTokenName[ $iLookAhead ] . ' => ' . - $this->yyTokenName[ $iFallback ] . "\n"); + fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'FALLBACK ' . + $this->yyTokenName[ $iLookAhead ] . ' => ' . + $this->yyTokenName[ $iFallback ] . "\n"); } return $this->yy_find_shift_action($iFallback); } @@ -1997,22 +2030,19 @@ class Smarty_Internal_Templateparser $yytos->minor = $yypMinor; $this->yystack[] = $yytos; if ($this->yyTraceFILE && $this->yyidx > 0) { - fprintf($this->yyTraceFILE, - "%sShift %d\n", - $this->yyTracePrompt, - $yyNewState); + fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, + $yyNewState); fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt); for ($i = 1; $i <= $this->yyidx; $i++) { - fprintf($this->yyTraceFILE, - " %s", - $this->yyTokenName[ $this->yystack[ $i ]->major ]); + fprintf($this->yyTraceFILE, " %s", + $this->yyTokenName[ $this->yystack[ $i ]->major ]); } fwrite($this->yyTraceFILE, "\n"); } } // line 242 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r0() + public function yy_r0() { $this->root_buffer->prepend_array($this, $this->template_prefix); $this->root_buffer->append_array($this, $this->template_postfix); @@ -2020,13 +2050,12 @@ class Smarty_Internal_Templateparser } // line 251 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r1() + public function yy_r1() { $code = $this->compiler->compileTag('private_php', - array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), - array('type' => $this->lex->phpType)), - array()); + array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), array('type' => $this->lex->phpType)), + array()); if ($this->compiler->has_code && !empty($code)) { $tmp = ''; foreach ($this->compiler->prefix_code as $code) { @@ -2034,105 +2063,94 @@ class Smarty_Internal_Templateparser } $this->compiler->prefix_code = array(); $this->current_buffer->append_subtree($this, - new Smarty_Internal_ParseTree_Tag($this, - $this->compiler->processNocacheCode($tmp . - $code, - true))); + new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true))); } } // line 255 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r2() + public function yy_r2() { $this->current_buffer->append_subtree($this, - $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor)); } // line 259 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r3() + public function yy_r3() { $this->strip = true; } // line 264 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r4() + public function yy_r4() { $this->strip = false; } // line 269 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r5() + public function yy_r5() { $this->current_buffer->append_subtree($this, - new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + - -1 ]->minor)); + new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + -1 ]->minor)); } // line 272 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r6() + public function yy_r6() { $this->_retvalue = $this->yystack[ $this->yyidx + -3 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor; } // line 276 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r7() + public function yy_r7() { $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; } // line 281 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r8() + public function yy_r8() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 285 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r9() + public function yy_r9() { $this->_retvalue = ''; } // line 297 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r10() + public function yy_r10() { if ($this->compiler->has_code) { $this->current_buffer->append_subtree($this, - $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor)); + $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor)); } $this->compiler->has_variable_string = false; $this->block_nesting_level = count($this->compiler->_tag_stack); } // line 307 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r12() + public function yy_r12() { $var = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, - $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength()), - ' $'); + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), + -$this->compiler->getRdelLength()), ' $'); if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { $this->_retvalue = - $this->compiler->compileTag('private_print_expression', - array('nocache'), - array('value' => $this->compiler->compileVariable('\'' . - $match[ 1 ] . - '\''))); + $this->compiler->compileTag('private_print_expression', array('nocache'), + array('value' => $this->compiler->compileVariable('\'' . $match[ 1 ] . '\''))); } else { $this->_retvalue = - $this->compiler->compileTag('private_print_expression', - array(), - array('value' => $this->compiler->compileVariable('\'' . $var . '\''))); + $this->compiler->compileTag('private_print_expression', array(), + array('value' => $this->compiler->compileVariable('\'' . $var . '\''))); } } // line 328 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r13() + public function yy_r13() { $tag = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, - $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength())); + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), + -$this->compiler->getRdelLength())); if ($tag == 'strip') { $this->strip = true; $this->_retvalue = null;; @@ -2154,7 +2172,7 @@ class Smarty_Internal_Templateparser } // line 339 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r14() + public function yy_r14() { $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.'); if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') { @@ -2169,284 +2187,267 @@ class Smarty_Internal_Templateparser } // line 343 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r15() + public function yy_r15() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; } // line 347 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r16() + public function yy_r16() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; } // line 356 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r17() + public function yy_r17() { $this->_retvalue = - $this->compiler->compileTag('private_print_expression', - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ], - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ])); + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ], + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ])); } // line 360 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r18() + public function yy_r18() { $this->_retvalue = - $this->compiler->compileTag('assign', - array_merge(array(array('value' => $this->yystack[ $this->yyidx + - 0 ]->minor[ 0 ]), - array('var' => '\'' . - substr($this->yystack[ $this->yyidx + - -1 ]->minor, - 1) . - '\'')), - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ])); + $this->compiler->compileTag('assign', array_merge(array( + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]), + array('var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'') + ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ])); } // line 364 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r19() + public function yy_r19() { $this->_retvalue = - $this->compiler->compileTag('assign', - array_merge(array(array('value' => $this->yystack[ $this->yyidx + - 0 ]->minor[ 0 ]), - array('var' => $this->yystack[ $this->yyidx + - -1 ]->minor[ 'var' ])), - $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]), - array('smarty_internal_index' => $this->yystack[ $this->yyidx + - -1 ]->minor[ 'smarty_internal_index' ])); + $this->compiler->compileTag('assign', array_merge(array( + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]), + array('var' => $this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ]) + ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]), array( + 'smarty_internal_index' => $this->yystack[ $this->yyidx + + -1 ]->minor[ 'smarty_internal_index' ] + )); } // line 368 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r20() + public function yy_r20() { $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; } // line 383 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r21() + public function yy_r21() { $this->_retvalue = array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); } // line 393 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r25() + public function yy_r25() { if (defined($this->yystack[ $this->yyidx + -1 ]->minor)) { if ($this->security) { $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler); } $this->_retvalue = - $this->compiler->compileTag('private_print_expression', - $this->yystack[ $this->yyidx + 0 ]->minor, - array('value' => $this->yystack[ $this->yyidx + -1 ]->minor)); + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, + array('value' => $this->yystack[ $this->yyidx + -1 ]->minor)); } else { $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor); + $this->yystack[ $this->yyidx + 0 ]->minor); } } // line 406 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r26() + public function yy_r26() { if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { if ($this->security) { $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler); } $this->_retvalue = - $this->compiler->compileTag('private_print_expression', - array(), - array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag('private_print_expression', array(), + array('value' => $this->yystack[ $this->yyidx + 0 ]->minor)); } else { $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array()); } } // line 418 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r27() + public function yy_r27() { if (defined($this->yystack[ $this->yyidx + -2 ]->minor)) { if ($this->security) { $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler); } $this->_retvalue = - $this->compiler->compileTag('private_print_expression', - $this->yystack[ $this->yyidx + 0 ]->minor, - array('value' => $this->yystack[ $this->yyidx + -2 ]->minor, - 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor)); + $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor, + array( + 'value' => $this->yystack[ $this->yyidx + -2 ]->minor, + 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor + )); } else { $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor)); + $this->yystack[ $this->yyidx + 0 ]->minor, + array('modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor)); } } // line 423 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r28() + public function yy_r28() { $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('object_method' => $this->yystack[ $this->yyidx + -1 ]->minor)); + $this->yystack[ $this->yyidx + 0 ]->minor, + array('object_method' => $this->yystack[ $this->yyidx + -1 ]->minor)); } // line 428 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r29() + public function yy_r29() { $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + -4 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'object_method' => $this->yystack[ $this->yyidx + -2 ]->minor)); + $this->yystack[ $this->yyidx + 0 ]->minor, array( + 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor, + 'object_method' => $this->yystack[ $this->yyidx + -2 ]->minor + )); } // line 433 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r30() + public function yy_r30() { $this->_retvalue = $this->compiler->compileTag('make_nocache', - array(array('var' => '\'' . - substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . - '\''))); + array(array('var' => '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''))); } // line 438 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r31() + public function yy_r31() { $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength())); $this->_retvalue = - $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, - array(), - array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(), + array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor)); } // line 443 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r32() + public function yy_r32() { $tag = trim(substr($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler->getLdelLength())); $this->_retvalue = $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, - $this->yystack[ $this->yyidx + 0 ]->minor, - array('if condition' => $this->yystack[ $this->yyidx + -1 ]->minor)); + $this->yystack[ $this->yyidx + 0 ]->minor, + array('if condition' => $this->yystack[ $this->yyidx + -1 ]->minor)); } // line 454 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r33() + public function yy_r33() { $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength())); $this->_retvalue = - $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, - array(), - array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(), + array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor)); } // line 458 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r35() + public function yy_r35() { $this->_retvalue = - $this->compiler->compileTag('for', - array_merge($this->yystack[ $this->yyidx + 0 ]->minor, - array(array('start' => $this->yystack[ $this->yyidx + -6 ]->minor), - array('ifexp' => $this->yystack[ $this->yyidx + -4 ]->minor), - array('var' => $this->yystack[ $this->yyidx + -2 ]->minor), - array('step' => $this->yystack[ $this->yyidx + -1 ]->minor))), - 1); + $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( + array('start' => $this->yystack[ $this->yyidx + -6 ]->minor), + array('ifexp' => $this->yystack[ $this->yyidx + -4 ]->minor), + array('var' => $this->yystack[ $this->yyidx + -2 ]->minor), + array('step' => $this->yystack[ $this->yyidx + -1 ]->minor) + )), 1); } // line 466 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r36() + public function yy_r36() { $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 470 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r38() + public function yy_r38() { $this->_retvalue = - $this->compiler->compileTag('for', - array_merge($this->yystack[ $this->yyidx + 0 ]->minor, - array(array('start' => $this->yystack[ $this->yyidx + -3 ]->minor), - array('to' => $this->yystack[ $this->yyidx + -1 ]->minor))), - 0); + $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( + array('start' => $this->yystack[ $this->yyidx + -3 ]->minor), + array('to' => $this->yystack[ $this->yyidx + -1 ]->minor) + )), 0); } // line 475 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r39() + public function yy_r39() { $this->_retvalue = - $this->compiler->compileTag('for', - array_merge($this->yystack[ $this->yyidx + 0 ]->minor, - array(array('start' => $this->yystack[ $this->yyidx + -5 ]->minor), - array('to' => $this->yystack[ $this->yyidx + -3 ]->minor), - array('step' => $this->yystack[ $this->yyidx + -1 ]->minor))), - 0); + $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( + array('start' => $this->yystack[ $this->yyidx + -5 ]->minor), + array('to' => $this->yystack[ $this->yyidx + -3 ]->minor), + array('step' => $this->yystack[ $this->yyidx + -1 ]->minor) + )), 0); } // line 479 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r40() + public function yy_r40() { $this->_retvalue = - $this->compiler->compileTag('foreach', - array_merge($this->yystack[ $this->yyidx + 0 ]->minor, - array(array('from' => $this->yystack[ $this->yyidx + -3 ]->minor), - array('item' => $this->yystack[ $this->yyidx + - -1 ]->minor)))); + $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( + array('from' => $this->yystack[ $this->yyidx + -3 ]->minor), + array('item' => $this->yystack[ $this->yyidx + -1 ]->minor) + ))); } // line 482 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r41() + public function yy_r41() { $this->_retvalue = - $this->compiler->compileTag('foreach', - array_merge($this->yystack[ $this->yyidx + 0 ]->minor, - array(array('from' => $this->yystack[ $this->yyidx + -5 ]->minor), - array('item' => $this->yystack[ $this->yyidx + -1 ]->minor), - array('key' => $this->yystack[ $this->yyidx + -3 ]->minor)))); + $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array( + array('from' => $this->yystack[ $this->yyidx + -5 ]->minor), + array('item' => $this->yystack[ $this->yyidx + -1 ]->minor), + array('key' => $this->yystack[ $this->yyidx + -3 ]->minor) + ))); } // line 487 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r42() + public function yy_r42() { $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor); } // line 491 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r43() + public function yy_r43() { $this->_retvalue = - $this->compiler->compileTag('setfilter', - array(), - array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx + - -1 ]->minor), - $this->yystack[ $this->yyidx + - 0 ]->minor)))); + $this->compiler->compileTag('setfilter', array(), array( + 'modifier_list' => array( + array_merge(array($this->yystack[ $this->yyidx + -1 ]->minor), + $this->yystack[ $this->yyidx + 0 ]->minor) + ) + )); } // line 497 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r44() + public function yy_r44() { $this->_retvalue = - $this->compiler->compileTag('setfilter', - array(), - array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx + - -2 ]->minor), - $this->yystack[ $this->yyidx + - -1 ]->minor)), - $this->yystack[ $this->yyidx + - 0 ]->minor))); + $this->compiler->compileTag('setfilter', array(), array( + 'modifier_list' => array_merge(array( + array_merge(array( + $this->yystack[ $this->yyidx + + -2 ]->minor + ), $this->yystack[ $this->yyidx + -1 ]->minor) + ), $this->yystack[ $this->yyidx + 0 ]->minor) + )); } // line 506 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r45() + public function yy_r45() { $tag = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, - $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength()), - ' /'); + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), + -$this->compiler->getRdelLength()), ' /'); if ($tag === 'strip') { $this->strip = false; $this->_retvalue = null; @@ -2456,60 +2457,58 @@ class Smarty_Internal_Templateparser } // line 510 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r46() + public function yy_r46() { $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array()); } // line 515 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r47() + public function yy_r47() { $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor . 'close', - array(), - array('modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor . 'close', array(), + array('modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor)); } // line 519 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r48() + public function yy_r48() { $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor . 'close', - array(), - array('object_method' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor . 'close', array(), + array('object_method' => $this->yystack[ $this->yyidx + 0 ]->minor)); } // line 527 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r49() + public function yy_r49() { $this->_retvalue = - $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor . 'close', - array(), - array('object_method' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor . 'close', array(), array( + 'object_method' => $this->yystack[ $this->yyidx + -1 ]->minor, + 'modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor + )); } // line 533 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r50() + public function yy_r50() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor; } // line 538 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r51() + public function yy_r51() { $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); } // line 543 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r52() + public function yy_r52() { $this->_retvalue = array(); } // line 554 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r53() + public function yy_r53() { if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { if ($this->security) { @@ -2519,64 +2518,72 @@ class Smarty_Internal_Templateparser array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); } else { $this->_retvalue = - array($this->yystack[ $this->yyidx + -2 ]->minor => '\'' . - $this->yystack[ $this->yyidx + 0 ]->minor . - '\''); + array( + $this->yystack[ $this->yyidx + -2 ]->minor => '\'' . + $this->yystack[ $this->yyidx + 0 ]->minor . + '\'' + ); } } // line 562 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r54() + public function yy_r54() { $this->_retvalue = - array(trim($this->yystack[ $this->yyidx + -1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + - 0 ]->minor); + array( + trim($this->yystack[ $this->yyidx + -1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx + + 0 ]->minor + ); } // line 574 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r56() + public function yy_r56() { $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\''; } // line 587 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r59() + public function yy_r59() { $this->_retvalue = array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor); } // line 592 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r61() + public function yy_r61() { $this->yystack[ $this->yyidx + -2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor; $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor; } // line 599 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r62() + public function yy_r62() { $this->_retvalue = - array('var' => '\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'', - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); + array( + 'var' => '\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'', + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor + ); } // line 603 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r64() + public function yy_r64() { $this->_retvalue = - array('var' => $this->yystack[ $this->yyidx + -2 ]->minor, - 'value' => $this->yystack[ $this->yyidx + 0 ]->minor); + array( + 'var' => $this->yystack[ $this->yyidx + -2 ]->minor, + 'value' => $this->yystack[ $this->yyidx + 0 ]->minor + ); } // line 623 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r65() + public function yy_r65() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; } // line 628 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r68() + public function yy_r68() { $this->_retvalue = '$_smarty_tpl->getStreamVariable(\'' . @@ -2587,7 +2594,7 @@ class Smarty_Internal_Templateparser } // line 642 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r69() + public function yy_r69() { $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . @@ -2596,17 +2603,17 @@ class Smarty_Internal_Templateparser } // line 648 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r72() + public function yy_r72() { $this->_retvalue = - $this->compiler->compileTag('private_modifier', - array(), - array('value' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'modifierlist' => $this->yystack[ $this->yyidx + 0 ]->minor)); + $this->compiler->compileTag('private_modifier', array(), array( + 'value' => $this->yystack[ $this->yyidx + -1 ]->minor, + 'modifierlist' => $this->yystack[ $this->yyidx + 0 ]->minor + )); } // line 652 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r73() + public function yy_r73() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor[ 'pre' ] . @@ -2617,7 +2624,7 @@ class Smarty_Internal_Templateparser } // line 656 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r74() + public function yy_r74() { $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . @@ -2626,13 +2633,13 @@ class Smarty_Internal_Templateparser } // line 660 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r75() + public function yy_r75() { $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; } // line 664 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r76() + public function yy_r76() { $this->_retvalue = 'in_array(' . @@ -2643,7 +2650,7 @@ class Smarty_Internal_Templateparser } // line 672 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r77() + public function yy_r77() { $this->_retvalue = 'in_array(' . @@ -2654,7 +2661,7 @@ class Smarty_Internal_Templateparser } // line 676 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r78() + public function yy_r78() { $this->_retvalue = $this->yystack[ $this->yyidx + -5 ]->minor . @@ -2665,7 +2672,7 @@ class Smarty_Internal_Templateparser } // line 686 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r79() + public function yy_r79() { $this->_retvalue = $this->yystack[ $this->yyidx + -5 ]->minor . @@ -2676,37 +2683,37 @@ class Smarty_Internal_Templateparser } // line 691 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r81() + public function yy_r81() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 712 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r82() + public function yy_r82() { $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 716 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r87() + public function yy_r87() { $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 720 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r88() + public function yy_r88() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.'; } // line 725 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r89() + public function yy_r89() { $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 742 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r90() + public function yy_r90() { if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) { if ($this->security) { @@ -2719,13 +2726,13 @@ class Smarty_Internal_Templateparser } // line 746 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r92() + public function yy_r92() { $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; } // line 764 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r93() + public function yy_r93() { $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . @@ -2734,15 +2741,14 @@ class Smarty_Internal_Templateparser } // line 775 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r97() + public function yy_r97() { $prefixVar = $this->compiler->getNewPrefixVariable(); if ($this->yystack[ $this->yyidx + -2 ]->minor[ 'var' ] === '\'smarty\'') { $this->compiler->appendPrefixCode("compiler->compileTag('private_special_variable', - array(), - $this->yystack[ $this->yyidx + - -2 ]->minor[ 'smarty_internal_index' ]) . + $this->compiler->compileTag('private_special_variable', array(), + $this->yystack[ $this->yyidx + + -2 ]->minor[ 'smarty_internal_index' ]) . ';?>'); } else { $this->compiler->appendPrefixCode("compiler->getNewPrefixVariable(); $tmp = $this->compiler->appendCode('', $this->yystack[ $this->yyidx + 0 ]->minor); @@ -2768,13 +2774,12 @@ class Smarty_Internal_Templateparser } // line 811 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r101() + public function yy_r101() { if (!in_array(strtolower($this->yystack[ $this->yyidx + -2 ]->minor), array('self', 'parent')) && (!$this->security || $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + -2 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor, - $this->compiler))) { + $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler))) { if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ])) { $this->_retvalue = $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ] . @@ -2796,26 +2801,25 @@ class Smarty_Internal_Templateparser } // line 822 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r103() + public function yy_r103() { $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; } // line 825 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r104() + public function yy_r104() { $this->_retvalue = $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''); } // line 838 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r105() + public function yy_r105() { if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] === '\'smarty\'') { $smarty_var = - $this->compiler->compileTag('private_special_variable', - array(), - $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]); + $this->compiler->compileTag('private_special_variable', array(), + $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]); $this->_retvalue = $smarty_var; } else { // used for array reset,next,prev,end,current @@ -2828,7 +2832,7 @@ class Smarty_Internal_Templateparser } // line 848 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r106() + public function yy_r106() { $this->_retvalue = '$_smarty_tpl->tpl_vars[' . @@ -2838,14 +2842,14 @@ class Smarty_Internal_Templateparser } // line 852 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r108() + public function yy_r108() { $this->_retvalue = $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\''); } // line 856 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r109() + public function yy_r109() { $this->_retvalue = '(is_array($tmp = ' . @@ -2856,13 +2860,13 @@ class Smarty_Internal_Templateparser } // line 860 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r110() + public function yy_r110() { $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -1 ]->minor); } // line 864 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r111() + public function yy_r111() { $this->_retvalue = '(is_array($tmp = ' . @@ -2873,29 +2877,33 @@ class Smarty_Internal_Templateparser } // line 867 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r112() + public function yy_r112() { $this->_retvalue = - array('var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'', - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); + array( + 'var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'', + 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor + ); } // line 880 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r113() + public function yy_r113() { $this->_retvalue = - array('var' => $this->yystack[ $this->yyidx + -1 ]->minor, - 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor); + array( + 'var' => $this->yystack[ $this->yyidx + -1 ]->minor, + 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor + ); } // line 886 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r115() + public function yy_r115() { return; } // line 889 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r116() + public function yy_r116() { $this->_retvalue = '[' . @@ -2904,13 +2912,13 @@ class Smarty_Internal_Templateparser } // line 893 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r117() + public function yy_r117() { $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']'; } // line 897 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r118() + public function yy_r118() { $this->_retvalue = '[' . @@ -2921,59 +2929,56 @@ class Smarty_Internal_Templateparser } // line 901 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r119() + public function yy_r119() { $this->_retvalue = '[\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\']'; } // line 906 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r120() + public function yy_r120() { $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']'; } // line 911 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r121() + public function yy_r121() { $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']'; } // line 915 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r122() + public function yy_r122() { $this->_retvalue = '[' . - $this->compiler->compileTag('private_special_variable', - array(), - '[\'section\'][\'' . - $this->yystack[ $this->yyidx + -1 ]->minor . - '\'][\'index\']') . + $this->compiler->compileTag('private_special_variable', array(), + '[\'section\'][\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\'][\'index\']') . ']'; } // line 918 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r123() + public function yy_r123() { $this->_retvalue = '[' . - $this->compiler->compileTag('private_special_variable', - array(), - '[\'section\'][\'' . - $this->yystack[ $this->yyidx + -3 ]->minor . - '\'][\'' . - $this->yystack[ $this->yyidx + -1 ]->minor . - '\']') . + $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . + $this->yystack[ $this->yyidx + + -3 ]->minor . + '\'][\'' . + $this->yystack[ $this->yyidx + + -1 ]->minor . + '\']') . ']'; } // line 924 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r124() + public function yy_r124() { $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']'; } // line 940 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r126() + public function yy_r126() { $this->_retvalue = '[' . @@ -2982,54 +2987,51 @@ class Smarty_Internal_Templateparser } // line 950 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r130() + public function yy_r130() { $this->_retvalue = '[]'; } // line 954 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r131() + public function yy_r131() { $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\''; } // line 959 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r132() + public function yy_r132() { $this->_retvalue = '\'\''; } // line 967 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r133() + public function yy_r133() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 973 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r135() + public function yy_r135() { $var = - trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, - $this->compiler->getLdelLength(), - -$this->compiler->getRdelLength()), - ' $'); + trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(), + -$this->compiler->getRdelLength()), ' $'); $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); } // line 980 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r136() + public function yy_r136() { $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; } // line 989 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r137() + public function yy_r137() { if ($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ] === '\'smarty\'') { $this->_retvalue = - $this->compiler->compileTag('private_special_variable', - array(), - $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ]) . + $this->compiler->compileTag('private_special_variable', array(), + $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ]) . $this->yystack[ $this->yyidx + 0 ]->minor; } else { $this->_retvalue = @@ -3040,19 +3042,19 @@ class Smarty_Internal_Templateparser } // line 994 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r138() + public function yy_r138() { $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor; } // line 999 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r139() + public function yy_r139() { $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 1006 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r140() + public function yy_r140() { if ($this->security && substr($this->yystack[ $this->yyidx + -1 ]->minor, 0, 1) === '_') { $this->compiler->trigger_template_error(self::Err1); @@ -3062,7 +3064,7 @@ class Smarty_Internal_Templateparser } // line 1013 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r141() + public function yy_r141() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -3075,7 +3077,7 @@ class Smarty_Internal_Templateparser } // line 1020 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r142() + public function yy_r142() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -3085,7 +3087,7 @@ class Smarty_Internal_Templateparser } // line 1028 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r143() + public function yy_r143() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -3100,21 +3102,21 @@ class Smarty_Internal_Templateparser } // line 1036 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r144() + public function yy_r144() { $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 1044 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r145() + public function yy_r145() { $this->_retvalue = $this->compiler->compilePHPFunctionCall($this->yystack[ $this->yyidx + -3 ]->minor, - $this->yystack[ $this->yyidx + -1 ]->minor); + $this->yystack[ $this->yyidx + -1 ]->minor); } // line 1051 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r146() + public function yy_r146() { if ($this->security && substr($this->yystack[ $this->yyidx + -3 ]->minor, 0, 1) === '_') { $this->compiler->trigger_template_error(self::Err1); @@ -3127,7 +3129,7 @@ class Smarty_Internal_Templateparser } // line 1062 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r147() + public function yy_r147() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -3136,91 +3138,92 @@ class Smarty_Internal_Templateparser $this->compiler->appendPrefixCode("compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + - -3 ]->minor, - 1) . + -3 ]->minor, 1) . '\'') . ';?>'); $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) . ')'; } // line 1079 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r148() + public function yy_r148() { $this->_retvalue = array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor)); } // line 1083 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r151() + public function yy_r151() { $this->_retvalue = - array_merge($this->yystack[ $this->yyidx + -2 ]->minor, - array(array_merge($this->yystack[ $this->yyidx + -1 ]->minor, - $this->yystack[ $this->yyidx + 0 ]->minor))); + array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array( + array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor) + )); } // line 1091 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r152() + public function yy_r152() { $this->_retvalue = array(array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)); } // line 1099 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r154() + public function yy_r154() { $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor); } // line 1118 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r155() + public function yy_r155() { $this->_retvalue = array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor); } // line 1123 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r159() + public function yy_r159() { $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method'); } // line 1128 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r160() + public function yy_r160() { $this->_retvalue = array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method'); } // line 1133 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r161() + public function yy_r161() { $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, ''); } // line 1138 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r162() + public function yy_r162() { $this->_retvalue = array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); } // line 1144 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r163() + public function yy_r163() { $this->_retvalue = - array($this->yystack[ $this->yyidx + -2 ]->minor, - $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor, 'property'); + array( + $this->yystack[ $this->yyidx + -2 ]->minor, + $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor, 'property' + ); } // line 1148 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r164() + public function yy_r164() { $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' '; } // line 1167 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r165() + public function yy_r165() { static $lops = array( 'eq' => ' == ', @@ -3242,7 +3245,7 @@ class Smarty_Internal_Templateparser } // line 1180 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r166() + public function yy_r166() { static $tlops = array( 'isdivby' => array('op' => ' % ', 'pre' => '!('), @@ -3257,7 +3260,7 @@ class Smarty_Internal_Templateparser } // line 1194 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r167() + public function yy_r167() { static $scond = array( 'iseven' => '!(1 & ', @@ -3270,66 +3273,66 @@ class Smarty_Internal_Templateparser } // line 1202 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r168() + public function yy_r168() { $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'; } // line 1210 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r170() + public function yy_r170() { $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 1214 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r172() + public function yy_r172() { $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 1230 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r173() + public function yy_r173() { $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor; } // line 1236 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r176() + public function yy_r176() { $this->compiler->leaveDoubleQuote(); $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor->to_smarty_php($this); } // line 1241 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r177() + public function yy_r177() { $this->yystack[ $this->yyidx + -1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor); $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor; } // line 1245 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r178() + public function yy_r178() { $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor); } // line 1249 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r179() + public function yy_r179() { $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + -1 ]->minor); } // line 1253 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r180() + public function yy_r180() { $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')'); } // line 1265 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r181() + public function yy_r181() { $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . @@ -3338,12 +3341,12 @@ class Smarty_Internal_Templateparser } // line 1269 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r184() + public function yy_r184() { $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor); } - function yy_r185() + public function yy_r185() { $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor); } @@ -3352,11 +3355,9 @@ class Smarty_Internal_Templateparser { if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) { - fprintf($this->yyTraceFILE, - "%sReduce (%d) [%s].\n", - $this->yyTracePrompt, - $yyruleno, - self::$yyRuleName[ $yyruleno ]); + fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", + $this->yyTracePrompt, $yyruleno, + self::$yyRuleName[ $yyruleno ]); } $this->_retvalue = $yy_lefthand_side = null; if (isset(self::$yyReduceMap[ $yyruleno ])) { @@ -3435,10 +3436,8 @@ class Smarty_Internal_Templateparser } $yyendofinput = ($yymajor == 0); if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sInput %s\n", - $this->yyTracePrompt, - $this->yyTokenName[ $yymajor ]); + fprintf($this->yyTraceFILE, "%sInput %s\n", + $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); } do { $yyact = $this->yy_find_shift_action($yymajor); @@ -3459,9 +3458,8 @@ class Smarty_Internal_Templateparser $this->yy_reduce($yyact - self::YYNSTATE); } elseif ($yyact === self::YY_ERROR_ACTION) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sSyntax Error!\n", - $this->yyTracePrompt); + fprintf($this->yyTraceFILE, "%sSyntax Error!\n", + $this->yyTracePrompt); } if (self::YYERRORSYMBOL) { if ($this->yyerrcnt < 0) { @@ -3470,10 +3468,8 @@ class Smarty_Internal_Templateparser $yymx = $this->yystack[ $this->yyidx ]->major; if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) { if ($this->yyTraceFILE) { - fprintf($this->yyTraceFILE, - "%sDiscard input token %s\n", - $this->yyTracePrompt, - $this->yyTokenName[ $yymajor ]); + fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", + $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]); } $this->yy_destructor($yymajor, $yytokenvalue); $yymajor = self::YYNOCODE;