- bugfix internal $tmpx variables must be unique over all inheritance templates (Issue 149)

This commit is contained in:
Uwe.Tews@googlemail.com
2013-08-12 21:09:29 +00:00
parent 35d2e254bb
commit 518ffca6f5
4 changed files with 956 additions and 1093 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
12.08.2013
- bugfix internal $tmpx variables must be unique over all inheritance templates (Issue 149)
10.08.2013 10.08.2013
- bugfix a newline was eaten when a <?xml ... ?> was passed by a Smarty variable and caching was enabled (forum topic 24482) - bugfix a newline was eaten when a <?xml ... ?> was passed by a Smarty variable and caching was enabled (forum topic 24482)

View File

@@ -82,7 +82,7 @@ class _smarty_tag extends _smarty_parsetree
*/ */
public function assign_to_var() public function assign_to_var()
{ {
$var = sprintf('$_tmp%d', ++$this->parser->prefix_number); $var = sprintf('$_tmp%d', ++Smarty_Internal_Templateparser::$prefix_number);
$this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var); $this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);
return $var; return $var;

View File

@@ -22,58 +22,59 @@ class Smarty_Internal_Templatelexer
public $state = 1; public $state = 1;
private $heredoc_id_stack = Array(); private $heredoc_id_stack = Array();
public $smarty_token_names = array ( // Text for parser error messages public $smarty_token_names = array ( // Text for parser error messages
'IDENTITY' => '===', 'IDENTITY' => '===',
'NONEIDENTITY' => '!==', 'NONEIDENTITY' => '!==',
'EQUALS' => '==', 'EQUALS' => '==',
'NOTEQUALS' => '!=', 'NOTEQUALS' => '!=',
'GREATEREQUAL' => '(>=,ge)', 'GREATEREQUAL' => '(>=,ge)',
'LESSEQUAL' => '(<=,le)', 'LESSEQUAL' => '(<=,le)',
'GREATERTHAN' => '(>,gt)', 'GREATERTHAN' => '(>,gt)',
'LESSTHAN' => '(<,lt)', 'LESSTHAN' => '(<,lt)',
'MOD' => '(%,mod)', 'MOD' => '(%,mod)',
'NOT' => '(!,not)', 'NOT' => '(!,not)',
'LAND' => '(&&,and)', 'LAND' => '(&&,and)',
'LOR' => '(||,or)', 'LOR' => '(||,or)',
'LXOR' => 'xor', 'LXOR' => 'xor',
'OPENP' => '(', 'OPENP' => '(',
'CLOSEP' => ')', 'CLOSEP' => ')',
'OPENB' => '[', 'OPENB' => '[',
'CLOSEB' => ']', 'CLOSEB' => ']',
'PTR' => '->', 'PTR' => '->',
'APTR' => '=>', 'APTR' => '=>',
'EQUAL' => '=', 'EQUAL' => '=',
'NUMBER' => 'number', 'NUMBER' => 'number',
'UNIMATH' => '+" , "-', 'UNIMATH' => '+" , "-',
'MATH' => '*" , "/" , "%', 'MATH' => '*" , "/" , "%',
'INCDEC' => '++" , "--', 'INCDEC' => '++" , "--',
'SPACE' => ' ', 'SPACE' => ' ',
'DOLLAR' => '$', 'DOLLAR' => '$',
'SEMICOLON' => ';', 'SEMICOLON' => ';',
'COLON' => ':', 'COLON' => ':',
'DOUBLECOLON' => '::', 'DOUBLECOLON' => '::',
'AT' => '@', 'AT' => '@',
'HATCH' => '#', 'HATCH' => '#',
'QUOTE' => '"', 'QUOTE' => '"',
'BACKTICK' => '`', 'BACKTICK' => '`',
'VERT' => '|', 'VERT' => '|',
'DOT' => '.', 'DOT' => '.',
'COMMA' => '","', 'COMMA' => '","',
'ANDSYM' => '"&"', 'ANDSYM' => '"&"',
'QMARK' => '"?"', 'QMARK' => '"?"',
'ID' => 'identifier', 'ID' => 'identifier',
'TEXT' => 'text', 'TEXT' => 'text',
'FAKEPHPSTARTTAG' => 'Fake PHP start tag', 'FAKEPHPSTARTTAG' => 'Fake PHP start tag',
'PHPSTARTTAG' => 'PHP start tag', 'PHPSTARTTAG' => 'PHP start tag',
'PHPENDTAG' => 'PHP end tag', 'PHPENDTAG' => 'PHP end tag',
'LITERALSTART' => 'Literal start', 'LITERALSTART' => 'Literal start',
'LITERALEND' => 'Literal end', 'LITERALEND' => 'Literal end',
'LDELSLASH' => 'closing tag', 'LDELSLASH' => 'closing tag',
'COMMENT' => 'comment', 'COMMENT' => 'comment',
'AS' => 'as', 'AS' => 'as',
'TO' => 'to', 'TO' => 'to',
); );
public function __construct($data,$compiler)
function __construct($data,$compiler)
{ {
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data); // $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
$this->data = $data; $this->data = $data;
@@ -90,6 +91,7 @@ class Smarty_Internal_Templatelexer
$this->mbstring_overload = ini_get('mbstring.func_overload') & 2; $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
} }
private $_yy_state = 1; private $_yy_state = 1;
private $_yy_stack = array(); private $_yy_stack = array();
@@ -114,6 +116,8 @@ class Smarty_Internal_Templatelexer
$this->_yy_state = $state; $this->_yy_state = $state;
} }
public function yylex1() public function yylex1()
{ {
$tokenMap = array ( $tokenMap = array (
@@ -191,28 +195,29 @@ class Smarty_Internal_Templatelexer
} // end function } // end function
const TEXT = 1; const TEXT = 1;
public function yy_r1_1($yy_subpatterns) function yy_r1_1($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD; $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD;
} }
public function yy_r1_2($yy_subpatterns) function yy_r1_2($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TEXT; $this->token = Smarty_Internal_Templateparser::TP_TEXT;
} }
public function yy_r1_3($yy_subpatterns) function yy_r1_3($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_COMMENT; $this->token = Smarty_Internal_Templateparser::TP_COMMENT;
} }
public function yy_r1_5($yy_subpatterns) function yy_r1_5($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_STRIPON; $this->token = Smarty_Internal_Templateparser::TP_STRIPON;
} }
public function yy_r1_6($yy_subpatterns) function yy_r1_6($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -221,12 +226,12 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_STRIPON; $this->token = Smarty_Internal_Templateparser::TP_STRIPON;
} }
} }
public function yy_r1_7($yy_subpatterns) function yy_r1_7($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
} }
public function yy_r1_8($yy_subpatterns) function yy_r1_8($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -235,13 +240,13 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
} }
} }
public function yy_r1_9($yy_subpatterns) function yy_r1_9($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
$this->yypushstate(self::LITERAL); $this->yypushstate(self::LITERAL);
} }
public function yy_r1_10($yy_subpatterns) function yy_r1_10($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -252,7 +257,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r1_11($yy_subpatterns) function yy_r1_11($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -263,7 +268,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r1_13($yy_subpatterns) function yy_r1_13($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -274,7 +279,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r1_14($yy_subpatterns) function yy_r1_14($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -285,7 +290,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r1_15($yy_subpatterns) function yy_r1_15($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -296,7 +301,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r1_16($yy_subpatterns) function yy_r1_16($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -307,21 +312,21 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r1_17($yy_subpatterns) function yy_r1_17($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r1_18($yy_subpatterns) function yy_r1_18($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->token = Smarty_Internal_Templateparser::TP_LDEL;
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r1_19($yy_subpatterns) function yy_r1_19($yy_subpatterns)
{ {
if (in_array($this->value, Array('<?', '<?=', '<?php'))) { if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
@@ -333,27 +338,27 @@ class Smarty_Internal_Templatelexer
$this->value = substr($this->value, 0, 2); $this->value = substr($this->value, 0, 2);
} }
} }
public function yy_r1_20($yy_subpatterns) function yy_r1_20($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
} }
public function yy_r1_21($yy_subpatterns) function yy_r1_21($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TEXT; $this->token = Smarty_Internal_Templateparser::TP_TEXT;
} }
public function yy_r1_22($yy_subpatterns) function yy_r1_22($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
} }
public function yy_r1_23($yy_subpatterns) function yy_r1_23($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
} }
public function yy_r1_24($yy_subpatterns) function yy_r1_24($yy_subpatterns)
{ {
if ($this->mbstring_overload) { if ($this->mbstring_overload) {
@@ -373,6 +378,7 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_TEXT; $this->token = Smarty_Internal_Templateparser::TP_TEXT;
} }
public function yylex2() public function yylex2()
{ {
$tokenMap = array ( $tokenMap = array (
@@ -496,13 +502,14 @@ class Smarty_Internal_Templatelexer
} // end function } // end function
const SMARTY = 2; const SMARTY = 2;
public function yy_r2_1($yy_subpatterns) function yy_r2_1($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING; $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
} }
public function yy_r2_2($yy_subpatterns) function yy_r2_2($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -513,7 +520,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r2_3($yy_subpatterns) function yy_r2_3($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -524,7 +531,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r2_5($yy_subpatterns) function yy_r2_5($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -535,7 +542,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r2_6($yy_subpatterns) function yy_r2_6($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -546,7 +553,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r2_7($yy_subpatterns) function yy_r2_7($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -557,300 +564,300 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r2_8($yy_subpatterns) function yy_r2_8($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->token = Smarty_Internal_Templateparser::TP_RDEL;
$this->yypopstate(); $this->yypopstate();
} }
public function yy_r2_9($yy_subpatterns) function yy_r2_9($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r2_10($yy_subpatterns) function yy_r2_10($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->token = Smarty_Internal_Templateparser::TP_LDEL;
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r2_11($yy_subpatterns) function yy_r2_11($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->token = Smarty_Internal_Templateparser::TP_RDEL;
$this->yypopstate(); $this->yypopstate();
} }
public function yy_r2_12($yy_subpatterns) function yy_r2_12($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISIN; $this->token = Smarty_Internal_Templateparser::TP_ISIN;
} }
public function yy_r2_13($yy_subpatterns) function yy_r2_13($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_AS; $this->token = Smarty_Internal_Templateparser::TP_AS;
} }
public function yy_r2_14($yy_subpatterns) function yy_r2_14($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TO; $this->token = Smarty_Internal_Templateparser::TP_TO;
} }
public function yy_r2_15($yy_subpatterns) function yy_r2_15($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_STEP; $this->token = Smarty_Internal_Templateparser::TP_STEP;
} }
public function yy_r2_16($yy_subpatterns) function yy_r2_16($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF; $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
} }
public function yy_r2_17($yy_subpatterns) function yy_r2_17($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_IDENTITY; $this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
} }
public function yy_r2_18($yy_subpatterns) function yy_r2_18($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY; $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
} }
public function yy_r2_19($yy_subpatterns) function yy_r2_19($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_EQUALS; $this->token = Smarty_Internal_Templateparser::TP_EQUALS;
} }
public function yy_r2_20($yy_subpatterns) function yy_r2_20($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS; $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
} }
public function yy_r2_22($yy_subpatterns) function yy_r2_22($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL; $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
} }
public function yy_r2_24($yy_subpatterns) function yy_r2_24($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL; $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
} }
public function yy_r2_26($yy_subpatterns) function yy_r2_26($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN; $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
} }
public function yy_r2_27($yy_subpatterns) function yy_r2_27($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LESSTHAN; $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
} }
public function yy_r2_28($yy_subpatterns) function yy_r2_28($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_MOD; $this->token = Smarty_Internal_Templateparser::TP_MOD;
} }
public function yy_r2_29($yy_subpatterns) function yy_r2_29($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_NOT; $this->token = Smarty_Internal_Templateparser::TP_NOT;
} }
public function yy_r2_30($yy_subpatterns) function yy_r2_30($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LAND; $this->token = Smarty_Internal_Templateparser::TP_LAND;
} }
public function yy_r2_31($yy_subpatterns) function yy_r2_31($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LOR; $this->token = Smarty_Internal_Templateparser::TP_LOR;
} }
public function yy_r2_32($yy_subpatterns) function yy_r2_32($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LXOR; $this->token = Smarty_Internal_Templateparser::TP_LXOR;
} }
public function yy_r2_33($yy_subpatterns) function yy_r2_33($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISODDBY; $this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
} }
public function yy_r2_34($yy_subpatterns) function yy_r2_34($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY; $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
} }
public function yy_r2_35($yy_subpatterns) function yy_r2_35($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISODD; $this->token = Smarty_Internal_Templateparser::TP_ISODD;
} }
public function yy_r2_36($yy_subpatterns) function yy_r2_36($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODD; $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
} }
public function yy_r2_37($yy_subpatterns) function yy_r2_37($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISEVENBY; $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
} }
public function yy_r2_38($yy_subpatterns) function yy_r2_38($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY; $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
} }
public function yy_r2_39($yy_subpatterns) function yy_r2_39($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISEVEN; $this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
} }
public function yy_r2_40($yy_subpatterns) function yy_r2_40($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN; $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
} }
public function yy_r2_41($yy_subpatterns) function yy_r2_41($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISDIVBY; $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
} }
public function yy_r2_42($yy_subpatterns) function yy_r2_42($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY; $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
} }
public function yy_r2_43($yy_subpatterns) function yy_r2_43($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TYPECAST; $this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
} }
public function yy_r2_47($yy_subpatterns) function yy_r2_47($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_OPENP; $this->token = Smarty_Internal_Templateparser::TP_OPENP;
} }
public function yy_r2_48($yy_subpatterns) function yy_r2_48($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_CLOSEP; $this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
} }
public function yy_r2_49($yy_subpatterns) function yy_r2_49($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_OPENB; $this->token = Smarty_Internal_Templateparser::TP_OPENB;
} }
public function yy_r2_50($yy_subpatterns) function yy_r2_50($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_CLOSEB; $this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
} }
public function yy_r2_51($yy_subpatterns) function yy_r2_51($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_PTR; $this->token = Smarty_Internal_Templateparser::TP_PTR;
} }
public function yy_r2_52($yy_subpatterns) function yy_r2_52($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_APTR; $this->token = Smarty_Internal_Templateparser::TP_APTR;
} }
public function yy_r2_53($yy_subpatterns) function yy_r2_53($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_EQUAL; $this->token = Smarty_Internal_Templateparser::TP_EQUAL;
} }
public function yy_r2_54($yy_subpatterns) function yy_r2_54($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_INCDEC; $this->token = Smarty_Internal_Templateparser::TP_INCDEC;
} }
public function yy_r2_55($yy_subpatterns) function yy_r2_55($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_UNIMATH; $this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
} }
public function yy_r2_57($yy_subpatterns) function yy_r2_57($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_MATH; $this->token = Smarty_Internal_Templateparser::TP_MATH;
} }
public function yy_r2_59($yy_subpatterns) function yy_r2_59($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_DOLLAR; $this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
} }
public function yy_r2_60($yy_subpatterns) function yy_r2_60($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
} }
public function yy_r2_61($yy_subpatterns) function yy_r2_61($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
} }
public function yy_r2_62($yy_subpatterns) function yy_r2_62($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_COLON; $this->token = Smarty_Internal_Templateparser::TP_COLON;
} }
public function yy_r2_63($yy_subpatterns) function yy_r2_63($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_AT; $this->token = Smarty_Internal_Templateparser::TP_AT;
} }
public function yy_r2_64($yy_subpatterns) function yy_r2_64($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_HATCH; $this->token = Smarty_Internal_Templateparser::TP_HATCH;
} }
public function yy_r2_65($yy_subpatterns) function yy_r2_65($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->token = Smarty_Internal_Templateparser::TP_QUOTE;
$this->yypushstate(self::DOUBLEQUOTEDSTRING); $this->yypushstate(self::DOUBLEQUOTEDSTRING);
} }
public function yy_r2_66($yy_subpatterns) function yy_r2_66($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
$this->yypopstate(); $this->yypopstate();
} }
public function yy_r2_67($yy_subpatterns) function yy_r2_67($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_VERT; $this->token = Smarty_Internal_Templateparser::TP_VERT;
} }
public function yy_r2_68($yy_subpatterns) function yy_r2_68($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_DOT; $this->token = Smarty_Internal_Templateparser::TP_DOT;
} }
public function yy_r2_69($yy_subpatterns) function yy_r2_69($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_COMMA; $this->token = Smarty_Internal_Templateparser::TP_COMMA;
} }
public function yy_r2_70($yy_subpatterns) function yy_r2_70($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ANDSYM; $this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
} }
public function yy_r2_71($yy_subpatterns) function yy_r2_71($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_QMARK; $this->token = Smarty_Internal_Templateparser::TP_QMARK;
} }
public function yy_r2_72($yy_subpatterns) function yy_r2_72($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_HEX; $this->token = Smarty_Internal_Templateparser::TP_HEX;
} }
public function yy_r2_73($yy_subpatterns) function yy_r2_73($yy_subpatterns)
{ {
// resolve conflicts with shorttag and right_delimiter starting with '=' // resolve conflicts with shorttag and right_delimiter starting with '='
@@ -862,27 +869,29 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_ATTR; $this->token = Smarty_Internal_Templateparser::TP_ATTR;
} }
} }
public function yy_r2_74($yy_subpatterns) function yy_r2_74($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ID; $this->token = Smarty_Internal_Templateparser::TP_ID;
} }
public function yy_r2_75($yy_subpatterns) function yy_r2_75($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_INTEGER; $this->token = Smarty_Internal_Templateparser::TP_INTEGER;
} }
public function yy_r2_76($yy_subpatterns) function yy_r2_76($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_SPACE; $this->token = Smarty_Internal_Templateparser::TP_SPACE;
} }
public function yy_r2_77($yy_subpatterns) function yy_r2_77($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TEXT; $this->token = Smarty_Internal_Templateparser::TP_TEXT;
} }
public function yylex3() public function yylex3()
{ {
$tokenMap = array ( $tokenMap = array (
@@ -945,20 +954,21 @@ class Smarty_Internal_Templatelexer
} // end function } // end function
const LITERAL = 3; const LITERAL = 3;
public function yy_r3_1($yy_subpatterns) function yy_r3_1($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
$this->yypushstate(self::LITERAL); $this->yypushstate(self::LITERAL);
} }
public function yy_r3_2($yy_subpatterns) function yy_r3_2($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LITERALEND; $this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
$this->yypopstate(); $this->yypopstate();
} }
public function yy_r3_3($yy_subpatterns) function yy_r3_3($yy_subpatterns)
{ {
if (in_array($this->value, Array('<?', '<?=', '<?php'))) { if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
@@ -968,22 +978,22 @@ class Smarty_Internal_Templatelexer
$this->value = substr($this->value, 0, 2); $this->value = substr($this->value, 0, 2);
} }
} }
public function yy_r3_4($yy_subpatterns) function yy_r3_4($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
} }
public function yy_r3_5($yy_subpatterns) function yy_r3_5($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
} }
public function yy_r3_6($yy_subpatterns) function yy_r3_6($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
} }
public function yy_r3_7($yy_subpatterns) function yy_r3_7($yy_subpatterns)
{ {
if ($this->mbstring_overload) { if ($this->mbstring_overload) {
@@ -1005,6 +1015,7 @@ class Smarty_Internal_Templatelexer
$this->token = Smarty_Internal_Templateparser::TP_LITERAL; $this->token = Smarty_Internal_Templateparser::TP_LITERAL;
} }
public function yylex4() public function yylex4()
{ {
$tokenMap = array ( $tokenMap = array (
@@ -1073,8 +1084,9 @@ class Smarty_Internal_Templatelexer
} // end function } // end function
const DOUBLEQUOTEDSTRING = 4; const DOUBLEQUOTEDSTRING = 4;
public function yy_r4_1($yy_subpatterns) function yy_r4_1($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -1085,7 +1097,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r4_2($yy_subpatterns) function yy_r4_2($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -1096,7 +1108,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r4_4($yy_subpatterns) function yy_r4_4($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -1107,7 +1119,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r4_5($yy_subpatterns) function yy_r4_5($yy_subpatterns)
{ {
if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
@@ -1118,7 +1130,7 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r4_6($yy_subpatterns) function yy_r4_6($yy_subpatterns)
{ {
if ($this->smarty->auto_literal) { if ($this->smarty->auto_literal) {
@@ -1129,27 +1141,27 @@ class Smarty_Internal_Templatelexer
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
} }
public function yy_r4_7($yy_subpatterns) function yy_r4_7($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r4_8($yy_subpatterns) function yy_r4_8($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->token = Smarty_Internal_Templateparser::TP_LDEL;
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r4_9($yy_subpatterns) function yy_r4_9($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->token = Smarty_Internal_Templateparser::TP_QUOTE;
$this->yypopstate(); $this->yypopstate();
} }
public function yy_r4_10($yy_subpatterns) function yy_r4_10($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
@@ -1157,22 +1169,22 @@ class Smarty_Internal_Templatelexer
$this->yypushstate(self::SMARTY); $this->yypushstate(self::SMARTY);
$this->taglineno = $this->line; $this->taglineno = $this->line;
} }
public function yy_r4_11($yy_subpatterns) function yy_r4_11($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_DOLLARID; $this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
} }
public function yy_r4_12($yy_subpatterns) function yy_r4_12($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TEXT; $this->token = Smarty_Internal_Templateparser::TP_TEXT;
} }
public function yy_r4_13($yy_subpatterns) function yy_r4_13($yy_subpatterns)
{ {
$this->token = Smarty_Internal_Templateparser::TP_TEXT; $this->token = Smarty_Internal_Templateparser::TP_TEXT;
} }
public function yy_r4_17($yy_subpatterns) function yy_r4_17($yy_subpatterns)
{ {
if ($this->mbstring_overload) { if ($this->mbstring_overload) {

File diff suppressed because it is too large Load Diff