From 620e52405b602c81bd7944ebca777fc232469a79 Mon Sep 17 00:00:00 2001 From: uwetews Date: Tue, 1 Sep 2015 01:54:28 +0200 Subject: [PATCH] - improvement convert template inheritance into runtime processing - bugfix {$smarty.block.parent} did always reference the root parent block https://github.com/smarty-php/smarty/issues/68 --- INHERITANCE_RELEASE_NOTES.txt | 42 +- NEW_FEATURES.txt | 7 +- README.md | 6 +- change_log.txt | 4 + lexer/smarty_internal_templatelexer.plex | 155 +- lexer/smarty_internal_templateparser.y | 61 +- .../smarty_internal_compile_block.php | 483 ++--- .../smarty_internal_compile_extends.php | 46 +- .../smarty_internal_compile_include.php | 71 +- ...nternal_compile_private_foreachsection.php | 13 - .../smarty_internal_extension_codeframe.php | 1 + ...smarty_internal_smartytemplatecompiler.php | 4 - libs/sysplugins/smarty_internal_template.php | 27 +- .../smarty_internal_templatecompilerbase.php | 264 ++- .../smarty_internal_templatelexer.php | 345 +--- .../smarty_internal_templateparser.php | 1796 +++++++++-------- libs/sysplugins/smarty_template_compiled.php | 1 + 17 files changed, 1415 insertions(+), 1911 deletions(-) diff --git a/INHERITANCE_RELEASE_NOTES.txt b/INHERITANCE_RELEASE_NOTES.txt index a7d285f0..8568a35c 100644 --- a/INHERITANCE_RELEASE_NOTES.txt +++ b/INHERITANCE_RELEASE_NOTES.txt @@ -1,4 +1,40 @@ -In Smarty 3.1 template inheritance is a compile time process. All the extending of {block} tags +Starting with version 3.1.28 template inheritance is no longer a compile time process. +All {block} tag parent/child relations are resolved at run time. +This does resolve all known existing restrictions (see below). + +The $smarty::$inheritance_merge_compiled_includes property has been removed. +Any access to it is ignored. + +This does enable some new features: + +Any code outside root {block} tags in child templates is now executed but any output will be ignored. + + {extends 'foo.tpl} + {$bar = 'on'} // assigns variable $bar seen in parent templates + {block 'buh'}{/block} + + {extends 'foo.tpl} + {$bar} // the output of variable bar is ignored + {block 'buh'}{/block} + +{block} tags can be dynamically en/disabled by conditions. + + {block 'root} + {if $foo} + {block 'v1} + .... + {/block} + {else} + {block 'v1} + .... + {/block} + {/if} + {/block} + + + +THE FOLLOWING RESTRICTIONS ARE NO LONGER EXISTING: +In Smarty 3.1 template inheritance is a compile time process. All the extending of {block} tags is done at compile time and the parent and child templates are compiled in a single compiled template. {include} subtemplate could also {block} tags. Such subtemplate could not compiled by it's own because it could be used in other context where the {block} extended with a different result. For that reasion @@ -29,7 +65,3 @@ You must now manually merge all {include} subtemplate which do contain {block} t 3. If call templates with different template_dir configurations and a parent could same named child template from different folders you must make the folder name part of the compile_id. - -In the upcomming major release Smarty 3.2 inheritance will no longer be a compile time process. -All restrictions will be then removed. - diff --git a/NEW_FEATURES.txt b/NEW_FEATURES.txt index a62e8c1c..b88a3319 100644 --- a/NEW_FEATURES.txt +++ b/NEW_FEATURES.txt @@ -4,13 +4,18 @@ This file contains a brief description of new features which have been added to Smarty 3.1.28 + Template inheritance + ==================== + Template inheritance is now processed in run time. + See the INHERITANCE_RELEASE_NOTES + Modifier regex_replace ====================== An optional limit parameter was added fetch() and display() ===================== - The fetch() and display() methods of the template object accept now optionally the same paramter + The fetch() and display() methods of the template object accept now optionally the same parameter as the corresponding Smarty methods the get tne content of another template. File: resource diff --git a/README.md b/README.md index f5f93fa9..fd625d4d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ #Smarty 3 template engine ##Distribution repository -*Read the NEW_FEATURES file for recent extensions to Smarty 3.1 functionality* - +``` +* Smarty 3.1.28 introduces run time template inheritance * +*Read the NEW_FEATURES and INHERITANCE_RELEASE_NOTES file for recent extensions to Smarty 3.1 functionality* +``` Smarty versions 3.1.11 or later are now on github and can be installed with Composer. diff --git a/change_log.txt b/change_log.txt index d0996c2c..15f9ddf8 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,8 @@  ===== 3.1.28-dev===== (xx.xx.2015) + 01.09.2015 + - improvement convert template inheritance into runtime processing + - bugfix {$smarty.block.parent} did always reference the root parent block https://github.com/smarty-php/smarty/issues/68 + 23.08.2015 - introduce Smarty::$resource_cache_mode and cache template object of {include} inside loop - load seldom used Smarty API methods dynamically to reduce memory footprint diff --git a/lexer/smarty_internal_templatelexer.plex b/lexer/smarty_internal_templatelexer.plex index 67602cbb..cc05297e 100644 --- a/lexer/smarty_internal_templatelexer.plex +++ b/lexer/smarty_internal_templatelexer.plex @@ -1,11 +1,11 @@ */ class Smarty_Internal_Templatelexer { @@ -25,84 +24,98 @@ class Smarty_Internal_Templatelexer * @var string */ public $data; + /** * 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 = ''; + /** * escaped left delimiter * * @var string */ public $ldel = ''; + /** * escaped left delimiter length * * @var int */ public $ldel_length = 0; + /** * escaped right delimiter * * @var string */ public $rdel = ''; + /** * escaped right delimiter length * * @var int */ public $rdel_length = 0; + /** * state number * * @var int */ public $state = 1; + /** * Smarty object * * @var Smarty */ public $smarty = null; + /** * compiler object * * @var Smarty_Internal_TemplateCompilerBase */ public $compiler = null; + /** * literal tag nesting level * @@ -142,8 +155,7 @@ class Smarty_Internal_Templatelexer * * @var array */ - public $state_name = array(1 => 'TEXT', 2 => 'TAG', 3 => 'TAGBODY', 4 => 'LITERAL', 5 => 'DOUBLEQUOTEDSTRING', - 6 => 'CHILDBODY', 7 => 'CHILDBLOCK', 8 => 'CHILDLITERAL'); + public $state_name = array(1 => 'TEXT', 2 => 'TAG', 3 => 'TAGBODY', 4 => 'LITERAL', 5 => 'DOUBLEQUOTEDSTRING',); /** * storage for assembled token patterns @@ -160,12 +172,6 @@ class Smarty_Internal_Templatelexer private $yy_global_pattern5 = null; - private $yy_global_pattern6 = null; - - private $yy_global_pattern7 = null; - - private $yy_global_pattern8 = null; - /** * token names * @@ -404,7 +410,7 @@ class Smarty_Internal_Templatelexer ldel dollar id nocacherdel { if ($this->_yy_stack[count($this->_yy_stack)-1] == self::TEXT) { $this->yypopstate(); - $this->token = Smarty_Internal_Templateparser::TP_SIMPLEOUTPUT; + $this->token = Smarty_Internal_Templateparser::TP_SIMPELOUTPUT; $this->taglineno = $this->line; } else { $this->value = $this->smarty->left_delimiter; @@ -425,7 +431,7 @@ class Smarty_Internal_Templatelexer } */ /*!lex2php - %statename TAGBODY + %statename TAGBODY rdel { $this->token = Smarty_Internal_Templateparser::TP_RDEL; $this->yypopstate(); @@ -661,115 +667,6 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_TEXT; } */ - /*!lex2php - %statename CHILDBODY - ldel strip rdel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - return false; - } else { - $this->token = Smarty_Internal_Templateparser::TP_STRIPON; - } - } - ldel slash strip rdel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - return false; - } else { - $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; - } - } - ldel block { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - return false; - } else { - $this->yypopstate(); - return true; - } - } - text { - $to = strlen($this->data); - preg_match("~SMARTYldel\s*(([/])?strip\s*SMARTYrdel|block\s+)~i",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); - if (isset($match[0][1])) { - $to = $match[0][1]; - } - $this->value = substr($this->data,$this->counter,$to-$this->counter); - return false; - } - - */ - /*!lex2php - %statename CHILDBLOCK - ldel literal rdel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - $this->yypushstate(self::CHILDLITERAL); - } - } - ldel block { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->yypopstate(); - return true; - } - } - ldel slash block { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->yypopstate(); - return true; - } - } - ldel smartyblockchildparent { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->yypopstate(); - return true; - } - } - text { - $to = strlen($this->data); - preg_match("~SMARTYldel\s*(literal\s*SMARTYrdel|([/])?block(\s|SMARTYrdel)|[\$]smarty\.block\.(child|parent))~i",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter); - if (isset($match[0][1])) { - $to = $match[0][1]; - } - $this->value = substr($this->data,$this->counter,$to-$this->counter); - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } - */ - /*!lex2php - %statename CHILDLITERAL - ldel literal rdel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - $this->yypushstate(self::CHILDLITERAL); - } - } - ldel slash literal rdel { - if ($this->smarty->auto_literal && isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - $this->yypopstate(); - } - } - text { - $to = strlen($this->data); - preg_match("~{$this->ldel}[/]?literal\s*{$this->rdel}~i",$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->value = substr($this->data,$this->counter,$to-$this->counter); - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } - */ - } + } \ No newline at end of file diff --git a/lexer/smarty_internal_templateparser.y b/lexer/smarty_internal_templateparser.y index eab44464..707ba318 100644 --- a/lexer/smarty_internal_templateparser.y +++ b/lexer/smarty_internal_templateparser.y @@ -1,24 +1,21 @@ -/** -* Smarty Internal Plugin Templateparser -* -* This is the template parser -* -* -* @package Smarty -* @subpackage Compiler -* @author Uwe Tews -*/ +/* + * This file is part of Smarty. + * + * (c) 2015 Uwe Tews + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ %stack_size 500 %name TP_ %declare_class { /** -* Smarty Internal Plugin Templateparser +* Smarty Template Parser Class * * This is the template parser. * It is generated from the smarty_internal_templateparser.y file -* @package Smarty -* @subpackage Compiler -* @author Uwe Tews +* +* @author Uwe Tews */ class Smarty_Internal_Templateparser } @@ -161,10 +158,10 @@ class Smarty_Internal_Templateparser { $tmp =''; foreach ($this->compiler->prefix_code as $preCode) { - $tmp = empty($tmp) ? $preCode : $this->compiler->appendCode($tmp, $preCode); + $tmp .= $preCode; } $this->compiler->prefix_code=array(); - $tmp = empty($tmp) ? $code : $this->compiler->appendCode($tmp, $code); + $tmp .= $code; return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp,true)); } @@ -199,6 +196,7 @@ class Smarty_Internal_Templateparser // complete template // start(res) ::= template. { + $this->compiler->processInheritance($this); res = $this->root_buffer->to_smarty_php($this); } @@ -255,9 +253,9 @@ template_element(res)::= PHP(o). { // nocache code template_element(res)::= NOCACHE(c). { $this->compiler->tag_nocache = true; - $save = $this->template->has_nocache_code; + $save = $this->template->compiled->has_nocache_code; res = new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode("\n", $this->compiler, true)); - $this->template->has_nocache_code = $save; + $this->template->compiled->has_nocache_code = $save; } // template text template_element(res)::= text_content(t). { @@ -280,14 +278,6 @@ template_element ::= STRIPON(d). { template_element ::= STRIPOFF(d). { $this->strip = false; } - // process source of inheritance child block -template_element ::= BLOCKSOURCE(s). { - if ($this->strip) { - SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', s)); - } else { - SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler, s); - } -} // Litteral literal(res) ::= LITERALSTART LITERALEND. { @@ -320,7 +310,7 @@ smartytag(res) ::= tag(t) RDEL. { // // output tags start here // -smartytag(res) ::= SIMPLEOUTPUT(i). { +smartytag(res) ::= SIMPELOUTPUT(i). { $var = trim(substr(i, $this->lex->ldel_length, -$this->lex->rdel_length), ' $'); if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) { res = $this->compiler->compileTag('private_print_expression',array('nocache'),array('value'=>$this->compiler->compileVariable('\''.$match[1].'\''))); @@ -334,18 +324,26 @@ tag(res) ::= LDEL variable(e). { res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); } +tag(res) ::= LDEL variable(e) modifierlist(l) attributes(a). { + res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e, 'modifierlist'=>l)); +} + tag(res) ::= LDEL variable(e) attributes(a). { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e)); } tag(res) ::= LDEL value(e). { res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); } +tag(res) ::= LDEL value(e) modifierlist(l) attributes(a). { + res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e, 'modifierlist'=>l)); +} + tag(res) ::= LDEL value(e) attributes(a). { res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e)); } -tag(res) ::= LDEL expr(e). { - res = $this->compiler->compileTag('private_print_expression',array(),array('value'=>e)); +tag(res) ::= LDEL expr(e) modifierlist(l) attributes(a). { + res = $this->compiler->compileTag('private_print_expression',a,array('value'=>e,'modifierlist'=>l)); } tag(res) ::= LDEL expr(e) attributes(a). { @@ -940,6 +938,7 @@ indexdef(res) ::= DOT INTEGER(n). { res = '['. n .']'; } + indexdef(res) ::= DOT LDEL expr(e) RDEL. { res = '['. e .']'; } @@ -1001,6 +1000,10 @@ varvar(res) ::= varvar(v1) varvarele(v2). { varvarele(res) ::= ID(s). { res = '\''.s.'\''; } +varvarele(res) ::= SIMPELOUTPUT(i). { + $var = trim(substr(i, $this->lex->ldel_length, -$this->lex->rdel_length), ' $'); + res = $this->compiler->compileVariable('\''.$var.'\''); +} // variable sections of element varvarele(res) ::= LDEL expr(e) RDEL. { diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index 1d97ac81..f2dff536 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -1,25 +1,20 @@ */ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase { - - const parent = '____SMARTY_BLOCK_PARENT____'; - /** * Attribute definition: Overwrites base class. * @@ -42,173 +37,76 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase * @var array * @see Smarty_Internal_CompileBase */ - public $option_flags = array('hide', 'append', 'prepend', 'nocache'); + public $option_flags = array('hide', 'nocache'); /** - * nested child block names + * Attribute definition: Overwrites base class. * * @var array + * @see Smarty_Internal_CompileBase */ - public static $nested_block_names = array(); + public $optional_attributes = array(); /** - * child block source buffer + * nesting level of block tags * - * @var array + * @var int */ - public static $block_data = array(); + public static $blockTagNestingLevel = 0; /** * Compiles code for the {block} tag * - * @param array $args array with attributes from parser - * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object + * @param array $args array with attributes from parser + * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object + * @param array $parameter array with compilation parameter * * @return bool true */ - public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) + public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter) { + if ($compiler->blockTagNestingLevel == 0 && $compiler->template->isChild) { + $this->option_flags = array('hide', 'nocache', 'append', 'prepend'); + } else { + $this->option_flags = array('hide', 'nocache'); + } // check and get attributes $_attr = $this->getAttributes($compiler, $args); - $_name = trim($_attr['name'], "\"'"); - - // existing child must override parent settings - if (isset($compiler->template->block_data[$_name]) && - $compiler->template->block_data[$_name]['mode'] == 'replace' - ) { - $_attr['append'] = false; - $_attr['prepend'] = false; + $compiler->blockTagNestingLevel ++; + $this->openTag($compiler, 'block', array($_attr, $compiler->nocache, $compiler->parser->current_buffer, + $compiler->template->compiled->has_nocache_code, + $compiler->template->caching)); + // must whole block be nocache ? + if ($compiler->tag_nocache) { + $i = 0; } - - // check if we process an inheritance child template - if ($compiler->inheritance_child) { - array_unshift(self::$nested_block_names, $_name); - // build {block} for child block - self::$block_data[$_name]['source'] = "{$compiler->smarty->left_delimiter}private_child_block name={$_attr['name']} uid='{$compiler->template->source->uid}' line={$compiler->parser->lex->line}"; - if ($_attr['nocache']) { - self::$block_data[$_name]['source'] .= ' nocache'; - } - self::$block_data[$_name]['source'] .= $compiler->smarty->right_delimiter; - // save source object - $compiler->cache["source_{$compiler->template->source->uid}"] = $compiler->template->source; - - $save = array($_attr, $compiler->inheritance); - $this->openTag($compiler, 'block', $save); - // set flag for {block} tag - $compiler->inheritance = true; - $compiler->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBLOCK); - $compiler->has_code = false; - return null; - } - // must merge includes - if ($_attr['nocache'] == true) { - $compiler->tag_nocache = true; - } - $save = array($_attr, $compiler->inheritance, $compiler->parser->current_buffer, $compiler->nocache); - $this->openTag($compiler, 'block', $save); - $compiler->inheritance = true; $compiler->nocache = $compiler->nocache | $compiler->tag_nocache; - + // $compiler->suppressNocacheProcessing = true; + if ($_attr['nocache'] === true) { + //$compiler->trigger_template_error('nocache option not allowed', $compiler->parser->lex->taglineno); + } $compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template(); - $compiler->has_code = false; - - return true; + $compiler->template->compiled->has_nocache_code = false; + $compiler->suppressNocacheProcessing = true; } /** * Compile saved child block source * - * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object - * @param string $_name optional name of child block + * @param \Smarty_Internal_TemplateCompilerBase compiler object + * @param string $_name optional name of child block * - * @return string compiled code of child block - * @throws \SmartyCompilerException + * @return string compiled code of child block */ static function compileChildBlock(Smarty_Internal_TemplateCompilerBase $compiler, $_name = null) { - if ($compiler->inheritance_child) { - $name1 = Smarty_Internal_Compile_Block::$nested_block_names[0]; - if (isset($compiler->template->block_data[$name1])) { - // replace inner block name with generic - Smarty_Internal_Compile_Block::$block_data[$name1]['source'] .= $compiler->template->block_data[$name1]['source']; - Smarty_Internal_Compile_Block::$block_data[$name1]['child'] = true; - } - $compiler->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBLOCK); - $compiler->has_code = false; - return null; + if (!$compiler->blockTagNestingLevel) { + $compiler->trigger_template_error(' tag {$smarty.block.child} used outside {block} tags ', $compiler->parser->lex->taglineno); } - // if called by {$smarty.block.child} we must search the name of enclosing {block} - if ($_name == null) { - $stack_count = count($compiler->_tag_stack); - while (-- $stack_count >= 0) { - if ($compiler->_tag_stack[$stack_count][0] == 'block') { - $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'], "\"'"); - break; - } - } - } - if ($_name == null) { - $compiler->trigger_template_error(' tag {$smarty.block.child} used outside {block} tags ', null, true); - } - // undefined child? - if (!isset($compiler->template->block_data[$_name]['source'])) { - $compiler->popTrace(); - return ''; - } - // flag that child is already compile by {$smarty.block.child} inclusion - $compiler->template->block_data[$_name]['compiled'] = true; - $_tpl = new Smarty_Internal_template('string:' . - $compiler->template->block_data[$_name]['source'], $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id, $compiler->template->caching, $compiler->template->cache_lifetime); - if ($compiler->smarty->debugging) { - $compiler->smarty->_debug->ignore($_tpl); - } - $_tpl->tpl_vars = $compiler->template->tpl_vars; - $_tpl->compiled = new Smarty_Template_Compiled(); - $_tpl->compiled->nocache_hash = $compiler->template->compiled->nocache_hash; - $_tpl->_cache['allow_relative_path'] = true; - $_tpl->loadCompiler(); - $_tpl->compiler->variable_filters = $compiler->variable_filters; - $_tpl->compiler->parent_compiler = $compiler; - $_tpl->compiler->_tag_objects = $compiler->_tag_objects; - $_tpl->compiler->inheritance = true; - $_tpl->compiler->suppressHeader = true; - $_tpl->compiler->suppressFilter = true; - $_tpl->compiler->suppressTemplatePropertyHeader = true; - $nocache = $compiler->nocache || $compiler->tag_nocache; - $_output = ''; - if (strpos($compiler->template->block_data[$_name]['source'], self::parent) !== false) { - $_output = str_replace(self::parent, $compiler->parser->current_buffer->to_smarty_php($compiler->parser), $_tpl->compiler->compileTemplate($_tpl, $nocache, $compiler->parent_compiler)); - } elseif ($compiler->template->block_data[$_name]['mode'] == 'prepend') { - $_output = $_tpl->compiler->compileTemplate($_tpl, $nocache, $compiler->parent_compiler) . - $compiler->parser->current_buffer->to_smarty_php($compiler->parser); - } elseif ($compiler->template->block_data[$_name]['mode'] == 'append') { - $_output = $compiler->parser->current_buffer->to_smarty_php($compiler->parser) . - $_tpl->compiler->compileTemplate($_tpl, $nocache, $compiler->parent_compiler); - } elseif (!empty($compiler->template->block_data[$_name])) { - $_output = $_tpl->compiler->compileTemplate($_tpl, $nocache, $compiler->parent_compiler); - } - $compiler->template->compiled->file_dependency = array_merge($compiler->template->compiled->file_dependency, $_tpl->compiled->file_dependency); - unset($compiler->template->compiled->file_dependency[$_tpl->source->uid]); - $compiler->template->tpl_function = array_merge($compiler->template->tpl_function, $_tpl->tpl_function); - $compiler->variable_filters = $_tpl->compiler->variable_filters; - if ($_tpl->compiled->has_nocache_code) { - $compiler->template->compiled->has_nocache_code = true; - } - foreach ($_tpl->compiled->required_plugins as $key => $tmp1) { - if ($compiler->nocache && $compiler->template->caching) { - $code = 'nocache'; - } else { - $code = $key; - } - foreach ($tmp1 as $name => $tmp) { - foreach ($tmp as $type => $data) { - $compiler->parent_compiler->template->compiled->required_plugins[$code][$name][$type] = $data; - } - } - } - $compiler->_tag_objects = $_tpl->compiler->_tag_objects; - unset($_tpl); $compiler->has_code = true; + $compiler->suppressNocacheProcessing = true; + $compiler->callChildBlock[$compiler->blockTagNestingLevel] = true; + $_output = "_Block->callChildBlock(\$_smarty_tpl, \$block);?>"; return $_output; } @@ -218,232 +116,133 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object * @param string $_name optional name of child block * - * @return string compiled code of child block - * @throws \SmartyCompilerException + * @return string compiled code of child block */ static function compileParentBlock(Smarty_Internal_TemplateCompilerBase $compiler, $_name = null) { - // if called by {$smarty.block.parent} we must search the name of enclosing {block} - if ($_name == null) { - $stack_count = count($compiler->_tag_stack); - while (-- $stack_count >= 0) { - if ($compiler->_tag_stack[$stack_count][0] == 'block') { - $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'], "\"'"); - break; - } - } + if (!$compiler->template->isChild) { + $compiler->trigger_template_error(' tag {$smarty.block.parent} used in parent template ', $compiler->parser->lex->taglineno); } - if ($_name == null) { - $compiler->trigger_template_error(' tag {$smarty.block.parent} used outside {block} tags ', null, true); + if (!$compiler->blockTagNestingLevel) { + $compiler->trigger_template_error(' tag {$smarty.block.parent} used outside {block} tags ', $compiler->parser->lex->taglineno); } - if (empty(Smarty_Internal_Compile_Block::$nested_block_names)) { - $compiler->trigger_template_error(' illegal {$smarty.block.parent} in parent template ', null, true); - } - Smarty_Internal_Compile_Block::$block_data[Smarty_Internal_Compile_Block::$nested_block_names[0]]['source'] .= Smarty_Internal_Compile_Block::parent; - $compiler->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBLOCK); - $compiler->has_code = false; - return; - } - - /** - * Process block source - * - * @param \Smarty_Internal_TemplateCompilerBase $compiler - * @param string $source source text - */ - static function blockSource(Smarty_Internal_TemplateCompilerBase $compiler, $source) - { - Smarty_Internal_Compile_Block::$block_data[Smarty_Internal_Compile_Block::$nested_block_names[0]]['source'] .= $source; + $compiler->suppressNocacheProcessing = true; + $compiler->has_code = true; + $_output = "_Block->callParentBlock(\$_smarty_tpl, \$block);?>"; + return $_output; } } /** * Smarty Internal Plugin Compile BlockClose Class * - * @package Smarty - * @subpackage Compiler */ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase { /** * Compiles code for the {/block} tag * - * @param array $args array with attributes from parser - * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object + * @param array $args array with attributes from parser + * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object + * @param array $parameter array with compilation parameter * - * @return string compiled code + * @return bool true */ - public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) + public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter) { - $compiler->has_code = true; - $saved_data = $this->closeTag($compiler, array('block')); - $_name = trim($saved_data[0]['name'], "\"'"); - // reset flag for {block} tag - $compiler->inheritance = $saved_data[1]; - // check if we process an inheritance child template - if ($compiler->inheritance_child) { - $name1 = Smarty_Internal_Compile_Block::$nested_block_names[0]; - Smarty_Internal_Compile_Block::$block_data[$name1]['source'] .= "{$compiler->smarty->left_delimiter}/private_child_block{$compiler->smarty->right_delimiter}"; - array_shift(Smarty_Internal_Compile_Block::$nested_block_names); - if (!empty(Smarty_Internal_Compile_Block::$nested_block_names)) { - $name2 = Smarty_Internal_Compile_Block::$nested_block_names[0]; - if (isset($compiler->template->block_data[$name1]) || !$saved_data[0]['hide']) { - if (isset(Smarty_Internal_Compile_Block::$block_data[$name1]['child']) || - !isset($compiler->template->block_data[$name1]) - ) { - Smarty_Internal_Compile_Block::$block_data[$name2]['source'] .= Smarty_Internal_Compile_Block::$block_data[$name1]['source']; - } else { - if ($compiler->template->block_data[$name1]['mode'] == 'append') { - Smarty_Internal_Compile_Block::$block_data[$name2]['source'] .= Smarty_Internal_Compile_Block::$block_data[$name1]['source'] . - $compiler->template->block_data[$name1]['source']; - } elseif ($compiler->template->block_data[$name1]['mode'] == 'prepend') { - Smarty_Internal_Compile_Block::$block_data[$name2]['source'] .= $compiler->template->block_data[$name1]['source'] . - Smarty_Internal_Compile_Block::$block_data[$name1]['source']; - } else { - Smarty_Internal_Compile_Block::$block_data[$name2]['source'] .= $compiler->template->block_data[$name1]['source']; - } - } - } - unset(Smarty_Internal_Compile_Block::$block_data[$name1]); - $compiler->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBLOCK); - } else { - if (isset($compiler->template->block_data[$name1]) || !$saved_data[0]['hide']) { - if (isset($compiler->template->block_data[$name1]) && - !isset(Smarty_Internal_Compile_Block::$block_data[$name1]['child']) - ) { - if (strpos($compiler->template->block_data[$name1]['source'], Smarty_Internal_Compile_Block::parent) !== - false - ) { - $compiler->template->block_data[$name1]['source'] = str_replace(Smarty_Internal_Compile_Block::parent, Smarty_Internal_Compile_Block::$block_data[$name1]['source'], $compiler->template->block_data[$name1]['source']); - } elseif ($compiler->template->block_data[$name1]['mode'] == 'prepend') { - $compiler->template->block_data[$name1]['source'] .= Smarty_Internal_Compile_Block::$block_data[$name1]['source']; - } elseif ($compiler->template->block_data[$name1]['mode'] == 'append') { - $compiler->template->block_data[$name1]['source'] = Smarty_Internal_Compile_Block::$block_data[$name1]['source'] . - $compiler->template->block_data[$name1]['source']; - } - } else { - $compiler->template->block_data[$name1]['source'] = Smarty_Internal_Compile_Block::$block_data[$name1]['source']; - } - $compiler->template->block_data[$name1]['mode'] = 'replace'; - if ($saved_data[0]['append']) { - $compiler->template->block_data[$name1]['mode'] = 'append'; - } - if ($saved_data[0]['prepend']) { - $compiler->template->block_data[$name1]['mode'] = 'prepend'; - } - } - unset(Smarty_Internal_Compile_Block::$block_data[$name1]); - $compiler->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBODY); - } - $compiler->has_code = false; - return null; + $this->compiler = $compiler; + list($_attr, $_nocache, $_buffer, $_has_nocache_code, $_caching) = $this->closeTag($compiler, array('block')); + $_name = trim($_attr['name'], "'\""); + $_functionCode = $compiler->parser->current_buffer; + // setup buffer for template function code + $compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template(); + + $_funcNameCaching = $_funcName = preg_replace('![^\w]+!', '_', "block_function_{$_name}_" . + uniqid(rand(), true)); + if ($compiler->template->compiled->has_nocache_code) { + // $compiler->parent_compiler->template->tpl_function[$_name]['call_name_caching'] = $_funcNameCaching; + $_funcNameCaching .= '_nocache'; + $output = "template->source->type}:{$compiler->template->source->name} */\n"; + $output .= "if (!function_exists('{$_funcNameCaching}')) {\n"; + $output .= "function {$_funcNameCaching} (\$_smarty_tpl, \$block) {\n"; + $output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n"; + $output .= "\$_smarty_tpl->cached->hashes['{$compiler->template->compiled->nocache_hash}'] = true;\n?>\n"; + $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output)); + $compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode); + $output = "template->compiled->nocache_hash}%%*/\n"; + $output .= "\n}\n}\n"; + $output .= "/*/ {$_funcName}_nocache */\n\n"; + $output .= "?>\n"; + $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output)); + $compiler->parent_compiler->templateFunctionCode .= $f = $compiler->parser->current_buffer->to_smarty_php($compiler->parser); + $compiler->parser->current_buffer = new Smarty_Internal_ParseTree_Template(); + $_functionCode = new Smarty_Internal_ParseTree_Tag($compiler->parser, preg_replace_callback("/((<\?php )?echo '\/\*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/([\S\s]*?)\/\*\/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/';(\?>\n)?)/", array($this, + 'removeNocache'), $_functionCode->to_smarty_php($compiler->parser))); } - if (isset($compiler->template->block_data[$_name]) && - !isset($compiler->template->block_data[$_name]['compiled']) - ) { - $_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name); + $output = "template->source->type}:{$compiler->template->source->name} */\n"; + $output .= "if (!function_exists('{$_funcName}')) {\n"; + $output .= "function {$_funcName}(\$_smarty_tpl, \$block) {?>"; + $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output)); + $compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode); + $output = "\n"; + $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output)); + $compiler->parent_compiler->templateFunctionCode .= $f = $compiler->parser->current_buffer->to_smarty_php($compiler->parser); + // nocache plugins must be copied + if (!empty($compiler->template->compiled->required_plugins['nocache'])) { + foreach ($compiler->template->compiled->required_plugins['nocache'] as $plugin => $tmp) { + foreach ($tmp as $type => $data) { + $compiler->parent_compiler->template->compiled->required_plugins['compiled'][$plugin][$type] = $data; + } + } + } + // restore old status + $compiler->template->compiled->has_nocache_code = $_has_nocache_code; + $compiler->tag_nocache = $compiler->nocache; + $compiler->nocache = $_nocache; + $compiler->parser->current_buffer = $_buffer; + + $_parameter = $_attr; + foreach ($_parameter as $name => $stat) { + if ($stat === false) { + unset($_parameter[$name]); + } + } + if (isset($compiler->callChildBlock[$compiler->blockTagNestingLevel])) { + $_parameter['callChildBlock'] = 'true'; + unset($compiler->callChildBlock[$compiler->blockTagNestingLevel]); + } + $compiler->blockTagNestingLevel --; + if ($compiler->blockTagNestingLevel == 0 && $compiler->template->isChild) { + $_function = 'register'; } else { - if ($saved_data[0]['hide'] && !isset($compiler->template->block_data[$_name]['source'])) { - $_output = ''; - } else { - $_output = $compiler->parser->current_buffer->to_smarty_php($compiler->parser); + $_function = 'call'; + } + $cm = $compiler->template->caching ? 'true' : 'false'; + $output = "_Block->{$_function}Block(\$_smarty_tpl, array('caching' => {$cm}, 'function' => '{$_funcNameCaching}'"; + foreach ($_parameter as $name => $stat) { + if ($stat !== false) { + $output .= ", '{$name}' => {$stat}"; } } - if (isset($compiler->template->block_data[$_name]['compiled'])) { - unset($compiler->template->block_data[$_name]['compiled']); - } - // reset flags - $compiler->parser->current_buffer = $saved_data[2]; - if ($compiler->nocache) { - $compiler->tag_nocache = true; - } - $compiler->nocache = $saved_data[3]; - // $_output content has already nocache code processed + $output .= "));\n?>\n"; + $compiler->has_code = true; $compiler->suppressNocacheProcessing = true; - - return $_output; + return $output; } -} - -/** - * Smarty Internal Plugin Compile Child Block Class - * - * @package Smarty - * @subpackage Compiler - */ -class Smarty_Internal_Compile_Private_Child_Block extends Smarty_Internal_CompileBase -{ /** - * Attribute definition: Overwrites base class. + * @param $match * - * @var array - * @see Smarty_Internal_CompileBase + * @return mixed */ - public $required_attributes = array('name', 'uid', 'line'); - - /** - * Compiles code for the {private_child_block} tag - * - * @param array $args array with attributes from parser - * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object - * - * @return bool true - */ - public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) + function removeNocache($match) { - // check and get attributes - $_attr = $this->getAttributes($compiler, $args); - $uid = trim($_attr['uid'], "\"'"); - // update template with original template source of {block} - $compiler->template->source = $compiler->parent_compiler->cache["source_{$uid}"]; - - // must merge includes - if ($_attr['nocache'] == true) { - $compiler->tag_nocache = true; - } - $save = array($_attr, $compiler->nocache); - - // set trace back to child block - $compiler->pushTrace($compiler->template->source->filepath, $uid, $_attr['line'] - - $compiler->parser->lex->line); - - $this->openTag($compiler, 'private_child_block', $save); - - $compiler->nocache = $compiler->nocache | $compiler->tag_nocache; - $compiler->has_code = false; - - return true; - } -} - -/** - * Smarty Internal Plugin Compile Child Block Close Class - * - * @package Smarty - * @subpackage Compiler - */ -class Smarty_Internal_Compile_Private_Child_Blockclose extends Smarty_Internal_CompileBase -{ - - /** - * Compiles code for the {/private_child_block} tag - * - * @param array $args array with attributes from parser - * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object - * - * @return bool true - */ - public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) - { - $saved_data = $this->closeTag($compiler, array('private_child_block')); - - // end of child block - $compiler->popTrace(); - - $compiler->nocache = $saved_data[1]; - $compiler->has_code = false; - - return true; + $code = preg_replace("/((<\?php )?echo '\/\*%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/)|(\/\*\/%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/';(\?>\n)?)/", '', $match[0]); + $code = str_replace(array('\\\'', '\\\\\''), array('\'', '\\\''), $code); + return $code; } } diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php index 0109e204..6af35bb6 100644 --- a/libs/sysplugins/smarty_internal_compile_extends.php +++ b/libs/sysplugins/smarty_internal_compile_extends.php @@ -36,7 +36,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase /** * Compiles code for the {extends} tag * - * @param array $args array with attributes from parser + * @param array $args array with attributes from parser * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object * * @return string compiled code @@ -48,48 +48,14 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase // check and get attributes $_attr = $this->getAttributes($compiler, $args); if ($_attr['nocache'] === true) { - $compiler->trigger_template_error('nocache option not allowed', null, true); + $compiler->trigger_template_error('nocache option not allowed', $compiler->parser->lex->line - 1); } if (strpos($_attr['file'], '$_tmp') !== false) { - $compiler->trigger_template_error('illegal value for file attribute', null, true); + $compiler->trigger_template_error('illegal value for file attribute', $compiler->parser->lex->line - 1); } - - $name = $_attr['file']; - if ($compiler->has_variable_string || !((substr_count($name, '"') == 2 || substr_count($name, "'") == 2)) || - substr_count($name, '(') != 0 || substr_count($name, '$_smarty_tpl->') != 0 - ) { - /** @var Smarty_Internal_Template $_smarty_tpl - * used in evaluated code - */ - $_smarty_tpl = $compiler->template; - eval("\$tpl_name = @{$name};"); - } else { - $tpl_name = trim($name, '\'"'); - } - // create source object - $_source = Smarty_Template_Source::load(null, $compiler->smarty, $tpl_name); - // check for recursion - $uid = $_source->uid; - if (isset($compiler->extends_uid[$uid])) { - $compiler->trigger_template_error("illegal recursive call of \"{$_source->filepath}\"", $compiler->parser->lex->line - - 1); - } - $compiler->extends_uid[$uid] = true; - if (empty($_source->components)) { - array_unshift($compiler->sources, $_source); - } else { - foreach ($_source->components as $source) { - array_unshift($compiler->sources, $source); - $uid = $source->uid; - if (isset($compiler->extends_uid[$uid])) { - $compiler->trigger_template_error("illegal recursive call of \"{$source->filepath}\"", $compiler->parser->lex->line - - 1); - } - $compiler->extends_uid[$uid] = true; - } - } - $compiler->inheritance_child = true; - $compiler->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBODY); + $compiler->extendsFileName = $_attr['file']; + $compiler->template->isChild = true; + $compiler->has_code = false; return ''; } } diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 4bdaaed4..39e4ef22 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -65,6 +65,9 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase */ public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler, $parameter) { + if (!isset($parameter['isChild'])) { + $parameter['isChild'] = false; + } // check and get attributes $_attr = $this->getAttributes($compiler, $args); @@ -117,9 +120,8 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } // flag if included template code should be merged into caller - $merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || - ($compiler->inheritance && $compiler->smarty->inheritance_merge_compiled_includes) || - $_attr['inline'] === true) && !$compiler->template->source->handler->recompiled; + $merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) && + !$compiler->template->source->handler->recompiled; if ($merge_compiled_includes && $_attr['inline'] !== true) { // variable template name ? @@ -129,11 +131,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase // must use individual cache file //$_attr['caching'] = 1; } - if ($compiler->inheritance && $compiler->smarty->inheritance_merge_compiled_includes && - $_attr['inline'] !== true - ) { - $compiler->trigger_template_error(' variable template file names not allow within {block} tags'); - } } // variable compile_id? if (isset($_attr['compile_id'])) { @@ -146,11 +143,6 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase // must use individual cache file //$_attr['caching'] = 1; } - if ($compiler->inheritance && $compiler->smarty->inheritance_merge_compiled_includes && - $_attr['inline'] !== true - ) { - $compiler->trigger_template_error(' variable compile_id not allow within {block} tags'); - } } } } @@ -194,17 +186,9 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase $has_compiled_template = false; if ($merge_compiled_includes) { - if ($compiler->template->caching && ($compiler->tag_nocache || $compiler->nocache) && - $_caching != self::CACHING_NOCACHE_CODE - ) { - // $merge_compiled_includes = false; - if ($compiler->inheritance && $compiler->smarty->inheritance_merge_compiled_includes) { - $compiler->trigger_template_error(' invalid caching mode of subtemplate within {block} tags'); - } - } $c_id = isset($_attr['compile_id']) ? $_attr['compile_id'] : $compiler->template->compile_id; // we must observe different compile_id and caching - $uid = sha1($c_id . ($_caching ? '--caching' : '--nocaching')); + $t_hash = sha1($c_id . ($_caching ? '--caching' : '--nocaching')); $tpl_name = null; /** @var Smarty_Internal_Template $_smarty_tpl @@ -212,32 +196,40 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase */ $_smarty_tpl = $compiler->template; eval("\$tpl_name = @$include_file;"); - if (!isset($compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid])) { + if (!isset($compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$t_hash])) { $compiler->smarty->allow_ambiguous_resources = true; - $tpl = new $compiler->smarty->template_class ($tpl_name, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $c_id, $_caching); + $tpl = new $compiler->smarty->template_class ($tpl_name, $compiler->smarty, $compiler->template, + $compiler->template->cache_id, $c_id, $_caching); + $compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$t_hash]['uid'] = $tpl->source->uid; if (!($tpl->source->handler->uncompiled) && $tpl->source->exists) { $tpl->compiled = new Smarty_Template_Compiled(); $tpl->compiled->nocache_hash = $compiler->parent_compiler->template->compiled->nocache_hash; $tpl->loadCompiler(); + $tpl->isChild = $parameter['isChild']; // save unique function name - $compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['func'] = $tpl->compiled->unifunc = 'content_' . - str_replace(array('.', ','), '_', uniqid('', true)); - if ($compiler->inheritance) { - $tpl->compiler->inheritance = true; - } + $compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$t_hash]['func'] = + $tpl->compiled->unifunc = 'content_' . str_replace(array('.', ','), '_', uniqid('', true)); // make sure whole chain gets compiled $tpl->mustCompile = true; $tpl->compiler->suppressTemplatePropertyHeader = true; - $compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['nocache_hash'] = $tpl->compiled->nocache_hash; + $compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$t_hash]['nocache_hash'] = + $tpl->compiled->nocache_hash; // get compiled code - $compiled_code = Smarty_Internal_Extension_CodeFrame::createFunctionFrame($tpl, $tpl->compiler->compileTemplate($tpl, null, $compiler->parent_compiler)); + $compiled_code = Smarty_Internal_Extension_CodeFrame::createFunctionFrame($tpl, + $tpl->compiler->compileTemplate($tpl, + null, + $compiler->parent_compiler)); unset($tpl->compiler); // remove header code - $compiled_code = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->compiled->nocache_hash}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_code); + $compiled_code = + preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->compiled->nocache_hash}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", + '', $compiled_code); if ($tpl->compiled->has_nocache_code) { // replace nocache_hash - $compiled_code = str_replace("{$tpl->compiled->nocache_hash}", $compiler->template->compiled->nocache_hash, $compiled_code); + $compiled_code = + str_replace("{$tpl->compiled->nocache_hash}", $compiler->template->compiled->nocache_hash, + $compiled_code); $compiler->template->compiled->has_nocache_code = true; } $compiler->parent_compiler->mergedSubTemplatesCode[$tpl->compiled->unifunc] = $compiled_code; @@ -268,7 +260,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase $_vars = 'array()'; } $this->logInclude($compiler, $include_file, $variable_template); - + $_isChild = var_export($parameter['isChild'], true); $update_compile_id = $compiler->template->caching && !$compiler->tag_nocache && !$compiler->nocache && $_compile_id != '$_smarty_tpl->compile_id'; if ($has_compiled_template && !$call_nocache) { @@ -283,10 +275,10 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } if (isset($_assign)) { $_output .= "ob_start();\n"; - $_output .= "\$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, {$_cache_tpl}, '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['func']}');\n"; + $_output .= "\$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, {$_cache_tpl}, {$_isChild}, '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$t_hash]['func']}');\n"; $_output .= "\$_smarty_tpl->tpl_vars[$_assign] = new Smarty_Variable(ob_get_clean());\n"; } else { - $_output .= "\$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, {$_cache_tpl}, '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['func']}');\n"; + $_output .= "\$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, {$_cache_tpl}, {$_isChild}, '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$t_hash]['func']}');\n"; } if ($update_compile_id) { $_output .= $compiler->makeNocacheCode("\$_smarty_tpl->compile_id = array_pop(\$_compile_id_save);\n"); @@ -330,13 +322,14 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase if ($variable_template) { return; } - list($name, $type) = Smarty_Resource::parseResourceName(trim($include_file, '\'"'), $compiler->template->smarty->default_resource_type); + list($name, $type) = Smarty_Resource::parseResourceName(trim($include_file, '\'"'), + $compiler->template->smarty->default_resource_type); if (in_array($type, array('eval', 'string'))) { return; } $include_name = $type . ':' . $name; $compiled = $compiler->parent_compiler->template->compiled; - $compiled->includes[$include_name] = isset($compiled->includes[$include_name]) ? $compiled->includes[$include_name] + - 1 : 1; + $compiled->includes[$include_name] = + isset($compiled->includes[$include_name]) ? $compiled->includes[$include_name] + 1 : 1; } } diff --git a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php index 02449c02..2c75b389 100644 --- a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php +++ b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php @@ -192,20 +192,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com */ public function matchBlockSource(Smarty_Internal_TemplateCompilerBase $compiler) { - foreach ($compiler->template->block_data as $b) { - if (isset($b['source'])) { - $this->matchProperty($b['source']); - } - } - if (class_exists('Smarty_Internal_Compile_Block', false)) { - foreach (Smarty_Internal_Compile_Block::$block_data as $b) { - if (isset($b['source'])) { - $this->matchProperty($b['source']); - } - } - } - $this->matchProperty($compiler->parser->lex->data); } /** diff --git a/libs/sysplugins/smarty_internal_extension_codeframe.php b/libs/sysplugins/smarty_internal_extension_codeframe.php index 9b12d0c6..60a3e3fd 100644 --- a/libs/sysplugins/smarty_internal_extension_codeframe.php +++ b/libs/sysplugins/smarty_internal_extension_codeframe.php @@ -35,6 +35,7 @@ class Smarty_Internal_Extension_CodeFrame if (!$cache) { $properties['file_dependency'] = $_template->compiled->file_dependency; $properties['includes'] = $_template->compiled->includes; + $properties['isChild'] = $_template->isChild; } else { $properties['file_dependency'] = $_template->cached->file_dependency; $properties['cache_lifetime'] = $_template->cache_lifetime; diff --git a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php index 45a8d2e4..c5f6c68c 100644 --- a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php +++ b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php @@ -73,10 +73,6 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom if ($isTemplateSource) { $this->parser->insertPhpCode("compiled->nocache_hash = '{$this->nocache_hash}';\n?>\n"); } - if ($this->inheritance_child) { - // start state on child templates - $this->parser->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBODY); - } if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('ASCII'); diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index ffbc8323..931ce618 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -77,6 +77,13 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase */ public $tpl_function = array(); + /** + * Template is inheritance child template + * + * @var bool + */ + public $isChild = false; + /** * Create template data object * Some of the global Smarty settings copied to template scope @@ -292,10 +299,16 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase * @return string template content * @throws \SmartyException */ - public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $cache_tpl_obj) + public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $cache_tpl_obj, $isChild) { $tpl = $this->setupSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $cache_tpl_obj); + $tpl->isChild = $isChild; $tpl->render(); + if ($tpl->isChild && !isset($this->_Block) && isset($tpl->_Block) && + ($this->isChild || !empty($this->source->components)) + ) { + $this->_Block = $tpl->_Block; + } } /** @@ -309,6 +322,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase * @param array $data passed parameter template variables * @param int $parent_scope scope in which {include} should execute * @param bool $cache_tpl_obj cache template object + * @param bool $isChild flag if subtemplate is an inheritance child * * @return \Smarty_Internal_Template template object */ @@ -332,6 +346,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase } else { $tpl = clone $this; $tpl->parent = $this; + $tpl->isChild = false; if ($tpl->templateId !== $_templateId) { $tpl->templateId = $_templateId; $tpl->template_resource = $template; @@ -383,12 +398,13 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase * @param array $data passed parameter template variables * @param int $parent_scope scope in which {include} should execute * @param bool $cache_tpl_obj cache template object + * @param bool $isChild flag if subtemplate is an inheritance child * @param string $content_func name of content function * * @return string template content * @throws \Exception */ - public function getInlineSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $cache_tpl_obj, $content_func) + public function getInlineSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $cache_tpl_obj, $isChild, $content_func) { $tpl = $this->setupSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $cache_tpl_obj); if (!isset($tpl->compiled)) { @@ -397,6 +413,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase $tpl->cacheTpl(true); } } + $tpl->isChild = $isChild; if ($this->smarty->debugging) { $this->smarty->_debug->start_template($tpl); $this->smarty->_debug->start_render($tpl); @@ -409,6 +426,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase if ($caching == 9999 && $tpl->compiled->has_nocache_code) { $this->cached->hashes[$tpl->compiled->nocache_hash] = true; } + if (!isset($this->_Block) && $isChild && isset($tpl->_Block) && + ($this->isChild || !empty($this->source->components)) + ) { + $this->_Block = $tpl->_Block; + } } /** @@ -516,6 +538,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase $resource = $this->cached; } else { $this->mustCompile = !$is_valid; + $this->isChild = $properties['isChild']; $resource = $this->compiled; $resource->includes = isset($properties['includes']) ? $properties['includes'] : array(); } diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 97a1280a..267d5e21 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -95,13 +95,6 @@ abstract class Smarty_Internal_TemplateCompilerBase */ public $sources = array(); - /** - * flag that we are inside {block} - * - * @var bool - */ - public $inheritance = false; - /** * flag when compiling inheritance child template * @@ -326,13 +319,27 @@ abstract class Smarty_Internal_TemplateCompilerBase */ public $variable_filters = array(); - /** - * Loop nesting count + /** + * Nesting count of looping tags like {foreach}, {for}, {section}, {while} * * @var int */ public $loopNesting = 0; + /** + * nesting level of block tags + * + * @var int + */ + public $blockTagNestingLevel = 0; + + /** + * Flag if {$smarty.block.child} was called at $blockTagNestingLevel + * + * @var array + */ + public $callChildBlock = array(); + /** * Strip preg pattern * @@ -347,7 +354,6 @@ abstract class Smarty_Internal_TemplateCompilerBase */ public $plugin_search_order = array('function', 'block', 'compiler', 'class'); - /** * method to compile a Smarty template * @@ -384,6 +390,7 @@ abstract class Smarty_Internal_TemplateCompilerBase // save template object in compiler class $this->template = $template; $this->savedSource = $this->template->source; + try { if (isset($this->template->smarty->security_policy)) { $this->php_handling = $this->template->smarty->security_policy->php_handling; @@ -405,55 +412,47 @@ abstract class Smarty_Internal_TemplateCompilerBase $template_header .= " compiled from \"" . $this->template->source->filepath . "\" */ ?>\n"; } - if (empty($this->template->source->components)) { - $this->sources = array($template->source); - } else { + $_compiled_code = ''; + $this->smarty->_current_file = $this->template->source->filepath; + if ($this->smarty->debugging) { + $this->smarty->_debug->start_compile($this->template); + } + $this->parent_compiler->template->compiled->file_dependency[$this->template->source->uid] = + array($this->template->source->filepath, $this->template->source->getTimeStamp(), + $this->template->source->type); + // compile for child template? + $this->inheritance_child = $this->template->isChild; + // flag for nochache sections + $this->nocache = $nocache; + $this->tag_nocache = false; + // reset has nocache code flag + $this->template->compiled->has_nocache_code = false; + $this->has_variable_string = false; + $this->prefix_code = array(); + // get template source + if (!empty($this->template->source->components)) { // we have array of inheritance templates by extends: resource $this->sources = array_reverse($template->source->components); - } - $loop = 0; - $_compiled_code = ''; - // the $this->sources array can get additional elements while compiling by the {extends} tag - while ($this->template->source = array_shift($this->sources)) { - $this->smarty->_current_file = $this->template->source->filepath; - if ($this->smarty->debugging) { - $this->smarty->_debug->start_compile($this->template); - } - $no_sources = count($this->sources); - $this->parent_compiler->template->compiled->file_dependency[$this->template->source->uid] = array($this->template->source->filepath, - $this->template->source->getTimeStamp(), - $this->template->source->type); - $loop ++; - if ($no_sources) { - $this->inheritance_child = true; - } else { - $this->inheritance_child = false; - } - // flag for nochache sections - $this->nocache = $nocache; - $this->tag_nocache = false; - // reset has nocache code flag - $this->template->compiled->has_nocache_code = false; - $this->has_variable_string = false; - $this->prefix_code = array(); + $_content = ''; + } else { // get template source $_content = $this->template->source->getContent(); - if ($_content != '') { - // run pre filter if required - if ((isset($this->smarty->autoload_filters['pre']) || - isset($this->smarty->registered_filters['pre'])) && !$this->suppressFilter - ) { - $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template); - } - // call compiler - $_compiled_code = $this->doCompile($_content, true); - } - if ($this->smarty->debugging) { - $this->smarty->_debug->end_compile($this->template); - } - // free memory - $this->parser = null; } + if ($_content != '') { + // run pre filter if required + if ($_content != '' && ((isset($this->smarty->autoload_filters['pre']) || + isset($this->smarty->registered_filters['pre'])) && !$this->suppressFilter) + ) { + $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template); + } + } + // call compiler + $_compiled_code = $this->doCompile($_content, true); + if ($this->smarty->debugging) { + $this->smarty->_debug->end_compile($this->template); + } + // free memory + $this->parser = null; // restore source $this->template->source = $this->savedSource; $this->savedSource = null; @@ -474,15 +473,17 @@ abstract class Smarty_Internal_TemplateCompilerBase if ($this->suppressTemplatePropertyHeader) { $_compiled_code .= $merged_code; } else { - $_compiled_code = $template_header . - Smarty_Internal_Extension_CodeFrame::create($template, $_compiled_code) . $merged_code; + $_compiled_code = + $template_header . Smarty_Internal_Extension_CodeFrame::create($template, $_compiled_code) . + $merged_code; } if (!empty($this->templateFunctionCode)) { // run post filter if required on compiled template code if ((isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) && !$this->suppressFilter ) { - $_compiled_code .= Smarty_Internal_Filter_Handler::runFilter('post', $this->templateFunctionCode, $template); + $_compiled_code .= Smarty_Internal_Filter_Handler::runFilter('post', $this->templateFunctionCode, + $template); } else { $_compiled_code .= $this->templateFunctionCode; } @@ -507,6 +508,59 @@ abstract class Smarty_Internal_TemplateCompilerBase return $_compiled_code; } + /** + * Add code to call parent template on inheritance child templates + * + * @param $parser + * + * @throws \Smarty_Exception + */ + public function processInheritance($parser) + { + if (isset($this->extendsFileName)) { + // child did use {extends} + $name = $this->extendsFileName; + $this->extendsFileName = null; + if (!$this->inheritance_child) { + // drop any output of child templates + array_unshift($parser->current_buffer->subtrees, + new Smarty_Internal_ParseTree_Tag($parser, "\n")); + $parser->current_buffer->append_subtree($parser, new Smarty_Internal_ParseTree_Tag($parser, + "\n")); + } + $parser->current_buffer->append_subtree($parser, new Smarty_Internal_ParseTree_Tag($parser, + $this->compileTag('include', + array($name, + array('scope' => 'parent'), + array('inline' => true)), + array('isChild' => $this->inheritance_child)))); + return; + } + // template list of extends: resource ? + if (!empty($this->sources)) { + if (!$this->inheritance_child) { + // drop any output of child templates + $parser->current_buffer->append_subtree($parser, new Smarty_Internal_ParseTree_Tag($parser, + "\n")); + } + while (!empty($this->sources)) { + $source = array_shift($this->sources); + if (!$this->inheritance_child && empty($this->sources)) { + // drop any output of child templates + $parser->current_buffer->append_subtree($parser, new Smarty_Internal_ParseTree_Tag($parser, + "\n")); + } + $parser->current_buffer->append_subtree($parser, new Smarty_Internal_ParseTree_Tag($parser, + $this->compileTag('include', + array("'{$source->resource}'", + array('scope' => 'parent'), + array('inline' => true)), + array('isChild' => $this->inheritance_child || + !empty($this->sources))))); + } + } + } + /** * Compile Tag * This is a call back from the lexer/parser @@ -603,7 +657,8 @@ abstract class Smarty_Internal_TemplateCompilerBase ) { return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $method); } elseif (in_array($method, $this->smarty->registered_objects[$tag][3])) { - return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $method); + return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, + $method); } else { // throw exception $this->trigger_template_error('not allowed method "' . $method . '" in registered object "' . @@ -631,15 +686,16 @@ abstract class Smarty_Internal_TemplateCompilerBase if (!is_array($function)) { return $function($new_args, $this); } elseif (is_object($function[0])) { - return $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->{$function[1]}($new_args, $this); + return $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->{$function[1]}($new_args, + $this); } else { return call_user_func_array($function, array($new_args, $this)); } } // compile registered function or block function if ($plugin_type == Smarty::PLUGIN_FUNCTION || $plugin_type == Smarty::PLUGIN_BLOCK) { - return $this->callTagCompiler('private_registered_' . - $plugin_type, $args, $parameter, $tag); + return $this->callTagCompiler('private_registered_' . $plugin_type, $args, $parameter, + $tag); } } } @@ -676,8 +732,8 @@ abstract class Smarty_Internal_TemplateCompilerBase if (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this) ) { - return $this->callTagCompiler('private_' . $plugin_type . - '_plugin', $args, $parameter, $tag, $function); + return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $parameter, + $tag, $function); } } } @@ -711,13 +767,14 @@ abstract class Smarty_Internal_TemplateCompilerBase if (!is_array($function)) { return $function($new_args, $this); } elseif (is_object($function[0])) { - return $this->default_handler_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this); + return $this->default_handler_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, + $this); } else { return call_user_func_array($function, array($new_args, $this)); } } else { - return $this->callTagCompiler('private_registered_' . - $plugin_type, $args, $parameter, $tag); + return $this->callTagCompiler('private_registered_' . $plugin_type, $args, $parameter, + $tag); } } } @@ -728,7 +785,8 @@ abstract class Smarty_Internal_TemplateCompilerBase if (isset($this->smarty->registered_objects[$base_tag]) && isset($parameter['object_method'])) { $method = $parameter['object_method']; if (in_array($method, $this->smarty->registered_objects[$base_tag][3])) { - return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $method); + return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, + $method); } else { // throw exception $this->trigger_template_error('not allowed closing tag method "' . $method . @@ -768,7 +826,8 @@ abstract class Smarty_Internal_TemplateCompilerBase if (!is_array($function)) { return $function($args, $this); } elseif (is_object($function[0])) { - return $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0][0]->$function[1]($args, $this); + return $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0][0]->$function[1]($args, + $this); } else { return call_user_func_array($function, array($args, $this)); } @@ -859,8 +918,8 @@ abstract class Smarty_Internal_TemplateCompilerBase } } // compile this tag - return $this->_tag_objects[$tag] === - false ? false : $this->_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3); + return $this->_tag_objects[$tag] === false ? false : + $this->_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3); } /** @@ -876,17 +935,23 @@ abstract class Smarty_Internal_TemplateCompilerBase $function = null; if ($this->template->caching && ($this->nocache || $this->tag_nocache)) { if (isset($this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type])) { - $function = $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function']; + $function = + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function']; } elseif (isset($this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type])) { - $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type] = $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]; - $function = $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function']; + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type] = + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]; + $function = + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function']; } } else { if (isset($this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type])) { - $function = $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function']; + $function = + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function']; } elseif (isset($this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type])) { - $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type] = $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]; - $function = $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function']; + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type] = + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]; + $function = + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function']; } } if (isset($function)) { @@ -902,11 +967,15 @@ abstract class Smarty_Internal_TemplateCompilerBase if (is_string($file)) { if ($this->template->caching && ($this->nocache || $this->tag_nocache)) { - $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['file'] = $file; - $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function'] = $function; + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['file'] = + $file; + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name][$plugin_type]['function'] = + $function; } else { - $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['file'] = $file; - $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function'] = $function; + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['file'] = + $file; + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name][$plugin_type]['function'] = + $function; } if ($plugin_type == 'modifier') { $this->modifier_plugins[$plugin_name] = true; @@ -935,19 +1004,22 @@ abstract class Smarty_Internal_TemplateCompilerBase $callback = null; $script = null; $cacheable = true; - $result = call_user_func_array($this->smarty->default_plugin_handler_func, array($tag, $plugin_type, - $this->template, &$callback, - &$script, &$cacheable)); + $result = call_user_func_array($this->smarty->default_plugin_handler_func, + array($tag, $plugin_type, $this->template, &$callback, &$script, &$cacheable)); if ($result) { $this->tag_nocache = $this->tag_nocache || !$cacheable; if ($script !== null) { if (is_file($script)) { if ($this->template->caching && ($this->nocache || $this->tag_nocache)) { - $this->parent_compiler->template->compiled->required_plugins['nocache'][$tag][$plugin_type]['file'] = $script; - $this->parent_compiler->template->compiled->required_plugins['nocache'][$tag][$plugin_type]['function'] = $callback; + $this->parent_compiler->template->compiled->required_plugins['nocache'][$tag][$plugin_type]['file'] = + $script; + $this->parent_compiler->template->compiled->required_plugins['nocache'][$tag][$plugin_type]['function'] = + $callback; } else { - $this->parent_compiler->template->compiled->required_plugins['compiled'][$tag][$plugin_type]['file'] = $script; - $this->parent_compiler->template->compiled->required_plugins['compiled'][$tag][$plugin_type]['function'] = $callback; + $this->parent_compiler->template->compiled->required_plugins['compiled'][$tag][$plugin_type]['file'] = + $script; + $this->parent_compiler->template->compiled->required_plugins['compiled'][$tag][$plugin_type]['function'] = + $callback; } require_once $script; } else { @@ -1015,7 +1087,8 @@ abstract class Smarty_Internal_TemplateCompilerBase // make sure we include modifier plugins for nocache code foreach ($this->modifier_plugins as $plugin_name => $dummy) { if (isset($this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name]['modifier'])) { - $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name]['modifier'] = $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name]['modifier']; + $this->parent_compiler->template->compiled->required_plugins['nocache'][$plugin_name]['modifier'] = + $this->parent_compiler->template->compiled->required_plugins['compiled'][$plugin_name]['modifier']; } } } else { @@ -1141,19 +1214,20 @@ abstract class Smarty_Internal_TemplateCompilerBase } if (in_array($this->template->source->type, array('eval', 'string'))) { - $templateName = $this->template->source->type . ':' . - trim(preg_replace('![\t\r\n]+!', ' ', strlen($lex->data) > 40 ? substr($lex->data, 0, 40) . - '...' : $lex->data)); + $templateName = $this->template->source->type . ':' . trim(preg_replace('![\t\r\n]+!', ' ', + strlen($lex->data) > 40 ? + substr($lex->data, 0, 40) . + '...' : $lex->data)); } else { $templateName = $this->template->source->type . ':' . $this->template->source->filepath; } // $line += $this->trace_line_offset; $match = preg_split("/\n/", $lex->data); - $error_text = 'Syntax error in template "' . - (empty($this->trace_filepath) ? $templateName : $this->trace_filepath) . '" on line ' . - ($line + $this->trace_line_offset) . ' "' . trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1])) . - '" '; + $error_text = + 'Syntax error in template "' . (empty($this->trace_filepath) ? $templateName : $this->trace_filepath) . + '" on line ' . ($line + $this->trace_line_offset) . ' "' . + trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1])) . '" '; if (isset($args)) { // individual error message $error_text .= $args; diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index 7d200015..ceb658a1 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -1,11 +1,11 @@ */ class Smarty_Internal_Templatelexer { @@ -156,8 +155,7 @@ class Smarty_Internal_Templatelexer * * @var array */ - public $state_name = array(1 => 'TEXT', 2 => 'TAG', 3 => 'TAGBODY', 4 => 'LITERAL', 5 => 'DOUBLEQUOTEDSTRING', - 6 => 'CHILDBODY', 7 => 'CHILDBLOCK', 8 => 'CHILDLITERAL'); + public $state_name = array(1 => 'TEXT', 2 => 'TAG', 3 => 'TAGBODY', 4 => 'LITERAL', 5 => 'DOUBLEQUOTEDSTRING',); /** * storage for assembled token patterns @@ -174,12 +172,6 @@ class Smarty_Internal_Templatelexer private $yy_global_pattern5 = null; - private $yy_global_pattern6 = null; - - private $yy_global_pattern7 = null; - - private $yy_global_pattern8 = null; - /** * token names * @@ -523,7 +515,7 @@ class Smarty_Internal_Templatelexer if ($this->_yy_stack[count($this->_yy_stack) - 1] == self::TEXT) { $this->yypopstate(); - $this->token = Smarty_Internal_Templateparser::TP_SIMPLEOUTPUT; + $this->token = Smarty_Internal_Templateparser::TP_SIMPELOUTPUT; $this->taglineno = $this->line; } else { $this->value = $this->smarty->left_delimiter; @@ -570,7 +562,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 '); + substr($this->data, $this->counter, 5) . '... state TAGBODY'); } next($yymatches); // skip global match $this->token = key($yymatches); // token number @@ -1123,321 +1115,6 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_TEXT; } - public function yylex6() - { - if (!isset($this->yy_global_pattern6)) { - $this->yy_global_pattern6 = "/\G(" . $this->ldel . "\\s*strip\\s*" . $this->rdel . ")|\G(" . $this->ldel . - "\\s*[\/]strip\\s*" . $this->rdel . ")|\G(" . $this->ldel . "\\s*block)|\G([\S\s])/isS"; - } - if ($this->counter >= strlen($this->data)) { - return false; // end of input - } - - do { - if (preg_match($this->yy_global_pattern6, $this->data, $yymatches, null, $this->counter)) { - $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { - $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); - } else { - $yymatches = array_filter($yymatches, 'strlen'); - } - if (empty($yymatches)) { - throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . - substr($this->data, $this->counter, 5) . '... state CHILDBODY'); - } - next($yymatches); // skip global match - $this->token = key($yymatches); // token number - $this->value = current($yymatches); // token value - $r = $this->{'yy_r6_' . $this->token}(); - if ($r === null) { - $this->counter += strlen($this->value); - $this->line += substr_count($this->value, "\n"); - // accept this token - return true; - } elseif ($r === true) { - // we have changed state - // process this token in the new state - return $this->yylex(); - } elseif ($r === false) { - $this->counter += strlen($this->value); - $this->line += substr_count($this->value, "\n"); - if ($this->counter >= strlen($this->data)) { - return false; // end of input - } - // skip this token - continue; - } - } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); - } - break; - } while (true); - } // end function - - const CHILDBODY = 6; - - function yy_r6_1() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - return false; - } else { - $this->token = Smarty_Internal_Templateparser::TP_STRIPON; - } - } - - function yy_r6_2() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - return false; - } else { - $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF; - } - } - - function yy_r6_3() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - return false; - } else { - $this->yypopstate(); - return true; - } - } - - function yy_r6_4() - { - - $to = strlen($this->data); - preg_match("~" . $this->ldel . "\s*(([/])?strip\s*" . $this->rdel . - "|block\s+)~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[0][1])) { - $to = $match[0][1]; - } - $this->value = substr($this->data, $this->counter, $to - $this->counter); - return false; - } - - public function yylex7() - { - if (!isset($this->yy_global_pattern7)) { - $this->yy_global_pattern7 = "/\G(" . $this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" . $this->ldel . - "\\s*block)|\G(" . $this->ldel . "\\s*[\/]block)|\G(" . $this->ldel . - "\\s*[$]smarty\\.block\\.(child|parent))|\G([\S\s])/isS"; - } - if ($this->counter >= strlen($this->data)) { - return false; // end of input - } - - do { - if (preg_match($this->yy_global_pattern7, $this->data, $yymatches, null, $this->counter)) { - $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { - $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); - } else { - $yymatches = array_filter($yymatches, 'strlen'); - } - if (empty($yymatches)) { - throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . - substr($this->data, $this->counter, 5) . '... state CHILDBLOCK'); - } - next($yymatches); // skip global match - $this->token = key($yymatches); // token number - $this->value = current($yymatches); // token value - $r = $this->{'yy_r7_' . $this->token}(); - if ($r === null) { - $this->counter += strlen($this->value); - $this->line += substr_count($this->value, "\n"); - // accept this token - return true; - } elseif ($r === true) { - // we have changed state - // process this token in the new state - return $this->yylex(); - } elseif ($r === false) { - $this->counter += strlen($this->value); - $this->line += substr_count($this->value, "\n"); - if ($this->counter >= strlen($this->data)) { - return false; // end of input - } - // skip this token - continue; - } - } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); - } - break; - } while (true); - } // end function - - const CHILDBLOCK = 7; - - function yy_r7_1() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - $this->yypushstate(self::CHILDLITERAL); - } - } - - function yy_r7_2() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->yypopstate(); - return true; - } - } - - function yy_r7_3() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->yypopstate(); - return true; - } - } - - function yy_r7_4() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->yypopstate(); - return true; - } - } - - function yy_r7_6() - { - - $to = strlen($this->data); - preg_match("~" . $this->ldel . "\s*(literal\s*" . $this->rdel . "|([/])?block(\s|" . $this->rdel . - ")|[\$]smarty\.block\.(child|parent))~i", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter); - if (isset($match[0][1])) { - $to = $match[0][1]; - } - $this->value = substr($this->data, $this->counter, $to - $this->counter); - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } - - public function yylex8() - { - if (!isset($this->yy_global_pattern8)) { - $this->yy_global_pattern8 = "/\G(" . $this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" . $this->ldel . - "\\s*[\/]literal\\s*" . $this->rdel . ")|\G([\S\s])/isS"; - } - if ($this->counter >= strlen($this->data)) { - return false; // end of input - } - - do { - if (preg_match($this->yy_global_pattern8, $this->data, $yymatches, null, $this->counter)) { - $yysubmatches = $yymatches; - if (strlen($yysubmatches[0]) < 200) { - $yymatches = preg_grep("/(.|\s)+/", $yysubmatches); - } else { - $yymatches = array_filter($yymatches, 'strlen'); - } - if (empty($yymatches)) { - throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . - substr($this->data, $this->counter, 5) . '... state CHILDLITERAL'); - } - next($yymatches); // skip global match - $this->token = key($yymatches); // token number - $this->value = current($yymatches); // token value - $r = $this->{'yy_r8_' . $this->token}(); - if ($r === null) { - $this->counter += strlen($this->value); - $this->line += substr_count($this->value, "\n"); - // accept this token - return true; - } elseif ($r === true) { - // we have changed state - // process this token in the new state - return $this->yylex(); - } elseif ($r === false) { - $this->counter += strlen($this->value); - $this->line += substr_count($this->value, "\n"); - if ($this->counter >= strlen($this->data)) { - return false; // end of input - } - // skip this token - continue; - } - } else { - throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]); - } - break; - } while (true); - } // end function - - const CHILDLITERAL = 8; - - function yy_r8_1() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - $this->yypushstate(self::CHILDLITERAL); - } - } - - function yy_r8_2() - { - - if ($this->smarty->auto_literal && - isset($this->value[$this->ldel_length]) ? strpos(" \n\t\r", $this->value[$this->ldel_length]) !== false : false - ) { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } else { - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - $this->yypopstate(); - } - } - - function yy_r8_3() - { - - $to = strlen($this->data); - preg_match("~{$this->ldel}[/]?literal\s*{$this->rdel}~i", $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->value = substr($this->data, $this->counter, $to - $this->counter); - $this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE; - } - } \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php index c4de7801..663955ce 100644 --- a/libs/sysplugins/smarty_internal_templateparser.php +++ b/libs/sysplugins/smarty_internal_templateparser.php @@ -76,21 +76,19 @@ class TP_yyStackEntry ; -#line 13 "../smarty/lexer/smarty_internal_templateparser.y" +#line 11 "../smarty/lexer/smarty_internal_templateparser.y" /** - * Smarty Internal Plugin Templateparser + * Smarty Template Parser Class * * This is the template parser. * It is generated from the smarty_internal_templateparser.y file * - * @package Smarty - * @subpackage Compiler - * @author Uwe Tews + * @author Uwe Tews */ class Smarty_Internal_Templateparser { - #line 26 "../smarty/lexer/smarty_internal_templateparser.y" + #line 23 "../smarty/lexer/smarty_internal_templateparser.y" const Err1 = "Security error: Call to private object member not allowed"; @@ -245,10 +243,10 @@ class Smarty_Internal_Templateparser { $tmp = ''; foreach ($this->compiler->prefix_code as $preCode) { - $tmp = empty($tmp) ? $preCode : $this->compiler->appendCode($tmp, $preCode); + $tmp .= $preCode; } $this->compiler->prefix_code = array(); - $tmp = empty($tmp) ? $code : $this->compiler->appendCode($tmp, $code); + $tmp .= $code; return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true)); } @@ -266,533 +264,561 @@ class Smarty_Internal_Templateparser const TP_STRIPOFF = 7; - const TP_BLOCKSOURCE = 8; + const TP_LITERALSTART = 8; - const TP_LITERALSTART = 9; + const TP_LITERALEND = 9; - const TP_LITERALEND = 10; + const TP_LITERAL = 10; - const TP_LITERAL = 11; + const TP_RDEL = 11; - const TP_RDEL = 12; + const TP_SIMPELOUTPUT = 12; - const TP_SIMPLEOUTPUT = 13; + const TP_LDEL = 13; - const TP_LDEL = 14; + const TP_DOLLARID = 14; - const TP_DOLLARID = 15; + const TP_EQUAL = 15; - const TP_EQUAL = 16; + const TP_SIMPLETAG = 16; - const TP_SIMPLETAG = 17; + const TP_ID = 17; - const TP_ID = 18; + const TP_PTR = 18; - const TP_PTR = 19; + const TP_LDELIF = 19; - const TP_LDELIF = 20; + const TP_LDELFOR = 20; - const TP_LDELFOR = 21; + const TP_SEMICOLON = 21; - const TP_SEMICOLON = 22; + const TP_INCDEC = 22; - const TP_INCDEC = 23; + const TP_TO = 23; - const TP_TO = 24; + const TP_STEP = 24; - const TP_STEP = 25; + const TP_LDELFOREACH = 25; - const TP_LDELFOREACH = 26; + const TP_SPACE = 26; - const TP_SPACE = 27; + const TP_AS = 27; - const TP_AS = 28; + const TP_APTR = 28; - const TP_APTR = 29; + const TP_LDELSETFILTER = 29; - const TP_LDELSETFILTER = 30; + const TP_SMARTYBLOCKCHILDPARENT = 30; - const TP_SMARTYBLOCKCHILDPARENT = 31; + const TP_CLOSETAG = 31; - const TP_CLOSETAG = 32; + const TP_LDELSLASH = 32; - const TP_LDELSLASH = 33; + const TP_ATTR = 33; - const TP_ATTR = 34; + const TP_INTEGER = 34; - const TP_INTEGER = 35; + const TP_COMMA = 35; - const TP_COMMA = 36; + const TP_OPENP = 36; - const TP_OPENP = 37; + const TP_CLOSEP = 37; - const TP_CLOSEP = 38; + const TP_MATH = 38; - const TP_MATH = 39; + const TP_UNIMATH = 39; - const TP_UNIMATH = 40; + const TP_ISIN = 40; - const TP_ISIN = 41; + const TP_INSTANCEOF = 41; - const TP_INSTANCEOF = 42; + const TP_QMARK = 42; - const TP_QMARK = 43; + const TP_NOT = 43; - const TP_NOT = 44; + const TP_TYPECAST = 44; - const TP_TYPECAST = 45; + const TP_HEX = 45; - const TP_HEX = 46; + const TP_DOT = 46; - const TP_DOT = 47; + const TP_SINGLEQUOTESTRING = 47; - const TP_SINGLEQUOTESTRING = 48; + const TP_DOUBLECOLON = 48; - const TP_DOUBLECOLON = 49; + const TP_NAMESPACE = 49; - const TP_NAMESPACE = 50; + const TP_AT = 50; - const TP_AT = 51; + const TP_HATCH = 51; - const TP_HATCH = 52; + const TP_OPENB = 52; - const TP_OPENB = 53; + const TP_CLOSEB = 53; - const TP_CLOSEB = 54; + const TP_DOLLAR = 54; - const TP_DOLLAR = 55; + const TP_LOGOP = 55; - const TP_LOGOP = 56; + const TP_TLOGOP = 56; - const TP_TLOGOP = 57; + const TP_SINGLECOND = 57; - const TP_SINGLECOND = 58; + const TP_QUOTE = 58; - const TP_QUOTE = 59; + const TP_BACKTICK = 59; - const TP_BACKTICK = 60; + const YY_NO_ACTION = 533; - const YY_NO_ACTION = 525; + const YY_ACCEPT_ACTION = 532; - const YY_ACCEPT_ACTION = 524; + const YY_ERROR_ACTION = 531; - const YY_ERROR_ACTION = 523; + const YY_SZ_ACTTAB = 2133; - const YY_SZ_ACTTAB = 1908; - - static public $yy_action = array(287, 9, 129, 251, 273, 194, 441, 2, 82, 280, 281, 282, 216, 110, 353, 223, 212, - 229, 441, 258, 217, 12, 199, 240, 32, 257, 257, 39, 17, 12, 25, 43, 42, 263, 224, - 233, 17, 206, 441, 80, 1, 244, 311, 311, 172, 172, 52, 287, 9, 128, 441, 273, 65, - 178, 2, 82, 268, 14, 184, 298, 110, 262, 13, 319, 229, 297, 258, 217, 31, 225, 12, - 32, 170, 257, 39, 239, 189, 17, 43, 42, 263, 224, 292, 214, 206, 249, 80, 1, 113, - 311, 164, 442, 172, 52, 287, 9, 132, 201, 273, 209, 260, 2, 82, 442, 14, 141, 256, - 110, 262, 88, 303, 229, 261, 258, 217, 260, 225, 12, 32, 168, 36, 39, 241, 12, 17, - 43, 42, 263, 224, 292, 17, 206, 189, 80, 1, 7, 311, 180, 257, 219, 52, 287, 9, 132, - 134, 273, 193, 470, 2, 82, 10, 470, 156, 304, 110, 300, 89, 172, 229, 310, 258, - 217, 260, 205, 223, 32, 257, 14, 39, 324, 12, 262, 43, 42, 263, 224, 292, 17, 206, - 189, 80, 1, 470, 311, 470, 172, 470, 52, 287, 9, 131, 201, 273, 209, 257, 2, 82, - 83, 307, 232, 201, 110, 399, 454, 230, 229, 237, 258, 217, 454, 225, 355, 32, 133, - 201, 39, 215, 399, 144, 43, 42, 263, 224, 292, 399, 206, 12, 80, 1, 326, 311, 157, - 236, 17, 52, 287, 9, 133, 201, 273, 209, 260, 2, 82, 214, 201, 235, 202, 110, 113, - 80, 99, 229, 311, 258, 217, 396, 225, 187, 19, 14, 323, 39, 18, 262, 28, 43, 42, - 263, 224, 292, 396, 206, 12, 80, 1, 143, 311, 396, 134, 17, 52, 287, 9, 132, 10, - 273, 209, 4, 2, 82, 313, 14, 146, 454, 110, 262, 181, 158, 229, 454, 258, 217, 260, - 192, 12, 32, 20, 260, 39, 99, 441, 17, 43, 42, 263, 224, 292, 243, 206, 189, 80, 1, - 441, 311, 187, 182, 298, 52, 287, 9, 130, 201, 273, 209, 14, 2, 82, 93, 262, 104, - 24, 110, 399, 99, 169, 229, 154, 258, 217, 220, 225, 113, 5, 124, 260, 39, 135, - 399, 100, 43, 42, 263, 224, 292, 399, 206, 261, 80, 1, 325, 311, 228, 112, 104, 52, - 287, 9, 132, 92, 273, 191, 173, 2, 82, 174, 291, 285, 16, 110, 330, 312, 260, 229, - 310, 258, 217, 311, 225, 223, 32, 259, 90, 39, 261, 6, 264, 43, 42, 263, 224, 292, - 181, 206, 175, 80, 1, 116, 311, 171, 201, 21, 52, 287, 9, 132, 37, 273, 195, 260, - 2, 82, 36, 296, 238, 189, 110, 189, 259, 201, 229, 261, 258, 217, 214, 225, 218, - 32, 35, 113, 39, 36, 232, 299, 43, 42, 263, 224, 292, 15, 206, 183, 80, 1, 211, - 311, 17, 91, 226, 52, 287, 9, 133, 177, 273, 209, 179, 2, 82, 318, 470, 99, 18, - 110, 470, 454, 121, 229, 288, 258, 217, 289, 225, 316, 19, 145, 189, 39, 187, 189, - 121, 43, 42, 263, 224, 292, 161, 206, 261, 80, 99, 104, 311, 454, 14, 454, 52, 470, - 262, 454, 279, 278, 276, 277, 283, 284, 174, 159, 470, 261, 287, 9, 470, 454, 273, - 311, 317, 2, 82, 176, 298, 223, 204, 110, 115, 68, 107, 229, 117, 258, 217, 100, 3, - 201, 272, 329, 138, 29, 210, 271, 293, 454, 325, 454, 359, 470, 260, 454, 254, 317, - 139, 275, 200, 306, 223, 204, 111, 119, 72, 107, 260, 201, 37, 242, 100, 255, 151, - 272, 329, 213, 4, 210, 271, 293, 150, 325, 245, 167, 20, 152, 317, 81, 208, 149, - 260, 223, 204, 260, 119, 60, 102, 186, 218, 185, 265, 100, 269, 22, 272, 329, 286, - 270, 210, 271, 293, 317, 325, 248, 147, 148, 223, 204, 178, 119, 72, 107, 153, 232, - 260, 274, 100, 13, 319, 272, 329, 261, 397, 210, 271, 293, 231, 325, 268, 136, 317, - 189, 165, 106, 207, 223, 204, 397, 115, 68, 107, 84, 327, 85, 397, 100, 103, 441, - 272, 329, 290, 86, 210, 271, 293, 87, 325, 299, 299, 441, 317, 299, 155, 299, 299, - 223, 204, 305, 119, 50, 102, 299, 108, 299, 299, 100, 299, 299, 272, 329, 299, 299, - 210, 271, 293, 317, 325, 299, 299, 299, 223, 204, 299, 119, 72, 107, 299, 299, 299, - 299, 100, 27, 227, 272, 329, 160, 299, 210, 271, 293, 299, 325, 299, 299, 317, 299, - 299, 299, 203, 223, 204, 299, 109, 46, 107, 299, 299, 299, 299, 100, 299, 299, 272, - 329, 299, 308, 210, 271, 293, 299, 325, 299, 311, 287, 8, 309, 299, 273, 299, 317, - 2, 82, 299, 299, 223, 204, 110, 119, 49, 107, 229, 299, 258, 217, 100, 299, 142, - 272, 329, 299, 178, 210, 271, 293, 299, 325, 260, 317, 299, 13, 319, 299, 223, 204, - 299, 119, 70, 107, 299, 294, 23, 299, 100, 189, 299, 272, 329, 299, 299, 210, 271, - 293, 317, 325, 299, 299, 299, 223, 204, 299, 119, 77, 107, 299, 299, 299, 299, 100, - 299, 299, 272, 329, 299, 308, 210, 271, 293, 299, 325, 299, 299, 287, 8, 309, 299, - 273, 299, 317, 2, 82, 299, 299, 223, 204, 110, 119, 71, 107, 229, 299, 258, 217, - 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 299, 317, 299, 299, - 299, 299, 223, 204, 299, 119, 60, 107, 299, 295, 23, 299, 100, 299, 299, 272, 329, - 299, 299, 210, 271, 293, 317, 325, 299, 140, 299, 223, 204, 178, 119, 73, 107, 299, - 299, 260, 299, 100, 13, 319, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 201, - 299, 189, 299, 223, 204, 299, 119, 62, 107, 299, 41, 40, 38, 100, 299, 299, 272, - 329, 299, 299, 210, 271, 293, 299, 325, 317, 163, 321, 322, 328, 223, 204, 299, - 119, 63, 107, 299, 41, 40, 38, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, - 299, 325, 317, 201, 321, 322, 328, 223, 204, 299, 97, 69, 107, 299, 299, 299, 299, - 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, - 299, 223, 204, 299, 119, 75, 107, 222, 41, 40, 38, 100, 299, 299, 272, 329, 299, - 299, 210, 271, 293, 299, 325, 317, 201, 321, 322, 328, 223, 204, 299, 119, 64, 107, - 299, 247, 299, 299, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, - 317, 201, 26, 299, 299, 223, 204, 299, 98, 74, 107, 299, 41, 40, 38, 100, 299, 299, - 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 201, 321, 322, 328, 223, 198, - 299, 105, 59, 107, 299, 41, 40, 38, 100, 299, 299, 272, 329, 299, 299, 210, 271, - 293, 299, 325, 317, 299, 321, 322, 328, 223, 204, 299, 119, 45, 107, 246, 41, 40, - 38, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 201, 321, 322, - 328, 223, 94, 299, 79, 48, 101, 299, 252, 299, 299, 100, 299, 299, 272, 329, 299, - 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, 299, 223, 204, 299, 119, 56, 107, - 299, 41, 40, 38, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, - 201, 321, 322, 328, 223, 204, 299, 119, 61, 107, 299, 190, 299, 299, 100, 299, 299, - 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, 299, 223, 204, - 299, 96, 58, 107, 299, 41, 40, 38, 100, 299, 299, 272, 329, 299, 299, 210, 271, - 293, 299, 325, 317, 201, 321, 322, 328, 223, 204, 299, 119, 66, 107, 299, 188, 299, - 299, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 201, 299, - 299, 299, 223, 204, 299, 119, 47, 107, 299, 41, 40, 38, 100, 299, 299, 272, 329, - 299, 299, 210, 271, 293, 299, 325, 317, 299, 321, 322, 328, 223, 204, 299, 119, 78, - 107, 299, 41, 40, 38, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, - 317, 299, 321, 322, 328, 223, 204, 299, 119, 54, 107, 299, 299, 299, 299, 100, 299, - 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, 299, 223, - 204, 299, 119, 53, 107, 299, 299, 299, 299, 100, 299, 299, 272, 329, 299, 299, 210, - 271, 293, 299, 325, 317, 299, 299, 299, 299, 223, 95, 299, 79, 44, 101, 299, 299, - 299, 299, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 299, - 299, 299, 299, 223, 197, 299, 119, 57, 107, 299, 299, 299, 299, 100, 299, 299, 272, - 329, 299, 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, 299, 223, 204, 299, - 119, 76, 107, 299, 299, 299, 299, 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, - 299, 325, 317, 299, 299, 299, 299, 223, 204, 299, 119, 55, 107, 299, 299, 299, 299, - 100, 299, 299, 272, 329, 299, 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, - 299, 223, 204, 299, 119, 67, 107, 299, 299, 299, 299, 100, 299, 299, 272, 329, 299, - 299, 210, 271, 293, 299, 325, 317, 299, 299, 299, 299, 223, 234, 299, 122, 299, - 107, 299, 299, 299, 299, 100, 299, 299, 299, 320, 299, 299, 210, 271, 293, 299, - 325, 317, 409, 409, 299, 299, 223, 234, 299, 127, 299, 107, 299, 299, 299, 299, - 100, 299, 299, 299, 250, 299, 299, 210, 271, 293, 299, 325, 524, 51, 253, 281, 282, - 216, 299, 299, 223, 299, 441, 317, 409, 409, 409, 201, 223, 234, 299, 126, 299, - 107, 441, 299, 299, 299, 100, 299, 299, 409, 409, 409, 299, 210, 271, 293, 201, - 325, 299, 33, 299, 12, 299, 299, 299, 299, 299, 301, 17, 299, 299, 299, 299, 41, - 40, 38, 299, 299, 317, 299, 299, 299, 12, 223, 234, 299, 123, 299, 107, 17, 321, - 322, 328, 100, 41, 40, 38, 299, 299, 299, 210, 271, 293, 299, 325, 299, 299, 403, - 299, 299, 299, 321, 322, 328, 299, 317, 299, 403, 299, 403, 223, 234, 403, 118, - 299, 107, 299, 299, 299, 403, 100, 403, 299, 403, 299, 299, 299, 210, 271, 293, - 317, 325, 232, 299, 299, 223, 234, 299, 125, 299, 107, 299, 299, 226, 299, 100, - 299, 201, 299, 299, 299, 299, 210, 271, 293, 470, 325, 317, 201, 470, 454, 226, - 223, 234, 299, 120, 299, 107, 299, 299, 299, 299, 100, 470, 299, 30, 299, 470, 454, - 210, 271, 293, 201, 325, 12, 41, 40, 38, 454, 299, 454, 17, 470, 299, 454, 314, 41, - 40, 38, 299, 315, 299, 321, 322, 328, 201, 454, 34, 454, 299, 470, 299, 454, 321, - 322, 328, 299, 299, 226, 470, 41, 40, 38, 470, 454, 299, 114, 299, 299, 299, 470, - 299, 299, 299, 470, 454, 299, 321, 322, 328, 299, 302, 299, 41, 40, 38, 201, 299, - 299, 299, 299, 299, 454, 299, 454, 299, 470, 365, 454, 299, 321, 322, 328, 454, - 221, 454, 299, 470, 299, 454, 166, 299, 12, 299, 178, 299, 299, 299, 299, 17, 260, - 299, 441, 13, 319, 162, 299, 11, 196, 178, 299, 266, 137, 299, 441, 260, 178, 189, - 13, 319, 299, 299, 260, 299, 299, 13, 319, 299, 267, 299, 299, 299, 189, 299, 299, - 299, 299, 299, 299, 189, 299, 299, 299, 299, 299, 299, 299, 299, 311,); - - static public $yy_lookahead = array(13, 14, 15, 15, 17, 18, 37, 20, 21, 64, 65, 66, 67, 26, 12, 70, 47, 30, 49, 32, - 33, 27, 35, 54, 37, 23, 23, 40, 34, 27, 29, 44, 45, 46, 47, 48, 34, 50, 37, 52, - 53, 54, 55, 55, 42, 42, 59, 13, 14, 15, 49, 17, 18, 76, 20, 21, 93, 14, 95, 96, - 26, 18, 85, 86, 30, 31, 32, 33, 16, 35, 27, 37, 29, 23, 40, 23, 99, 34, 44, 45, - 46, 47, 48, 75, 50, 77, 52, 53, 80, 55, 72, 37, 42, 59, 13, 14, 15, 1, 17, 18, - 82, 20, 21, 49, 14, 72, 18, 26, 18, 76, 60, 30, 94, 32, 33, 82, 35, 27, 37, 29, - 36, 40, 38, 27, 34, 44, 45, 46, 47, 48, 34, 50, 99, 52, 53, 36, 55, 81, 23, 51, - 59, 13, 14, 15, 47, 17, 18, 14, 20, 21, 53, 18, 72, 54, 26, 12, 76, 42, 30, 65, - 32, 33, 82, 35, 70, 37, 23, 14, 40, 54, 27, 18, 44, 45, 46, 47, 48, 34, 50, 99, - 52, 53, 14, 55, 51, 42, 18, 59, 13, 14, 15, 1, 17, 18, 23, 20, 21, 103, 104, 47, - 1, 26, 12, 47, 51, 30, 54, 32, 33, 53, 35, 12, 37, 15, 1, 40, 18, 27, 28, 44, - 45, 46, 47, 48, 34, 50, 27, 52, 53, 18, 55, 72, 19, 34, 59, 13, 14, 15, 1, 17, - 18, 82, 20, 21, 75, 1, 77, 78, 26, 80, 52, 19, 30, 55, 32, 33, 12, 35, 99, 37, - 14, 50, 40, 16, 18, 14, 44, 45, 46, 47, 48, 27, 50, 27, 52, 53, 92, 55, 34, 47, - 34, 59, 13, 14, 15, 53, 17, 18, 37, 20, 21, 54, 14, 72, 47, 26, 18, 76, 72, 30, - 53, 32, 33, 82, 35, 27, 37, 16, 82, 40, 19, 37, 34, 44, 45, 46, 47, 48, 54, 50, - 99, 52, 53, 49, 55, 99, 95, 96, 59, 13, 14, 15, 1, 17, 18, 14, 20, 21, 81, 18, - 49, 16, 26, 12, 19, 72, 30, 75, 32, 33, 71, 35, 80, 37, 75, 82, 40, 15, 27, 80, - 44, 45, 46, 47, 48, 34, 50, 94, 52, 53, 91, 55, 51, 80, 49, 59, 13, 14, 15, 37, - 17, 18, 72, 20, 21, 9, 10, 11, 22, 26, 97, 96, 82, 30, 65, 32, 33, 55, 35, 70, - 37, 100, 36, 40, 94, 37, 35, 44, 45, 46, 47, 48, 76, 50, 76, 52, 53, 49, 55, 72, - 1, 16, 59, 13, 14, 15, 2, 17, 18, 82, 20, 21, 36, 104, 38, 99, 26, 99, 100, 1, - 30, 94, 32, 33, 75, 35, 77, 37, 29, 80, 40, 36, 47, 38, 44, 45, 46, 47, 48, 27, - 50, 15, 52, 53, 18, 55, 34, 92, 2, 59, 13, 14, 15, 76, 17, 18, 76, 20, 21, 90, - 14, 19, 16, 26, 18, 19, 97, 30, 66, 32, 33, 69, 35, 90, 37, 15, 99, 40, 99, 99, - 97, 44, 45, 46, 47, 48, 92, 50, 94, 52, 19, 49, 55, 47, 14, 49, 59, 51, 18, 53, - 3, 4, 5, 6, 7, 8, 9, 92, 14, 94, 13, 14, 18, 19, 17, 55, 65, 20, 21, 95, 96, 70, - 71, 26, 73, 74, 75, 30, 18, 32, 33, 80, 37, 1, 83, 84, 72, 24, 87, 88, 89, 47, - 91, 49, 12, 51, 82, 53, 18, 65, 72, 5, 101, 102, 70, 71, 18, 73, 74, 75, 82, 1, - 2, 38, 80, 18, 52, 83, 84, 18, 37, 87, 88, 89, 72, 91, 54, 72, 16, 52, 65, 18, - 98, 92, 82, 70, 71, 82, 73, 74, 75, 18, 77, 81, 18, 80, 18, 43, 83, 84, 12, 35, - 87, 88, 89, 65, 91, 18, 72, 92, 70, 71, 76, 73, 74, 75, 92, 47, 82, 82, 80, 85, - 86, 83, 84, 94, 12, 87, 88, 89, 16, 91, 93, 80, 65, 99, 92, 79, 98, 70, 71, 27, - 73, 74, 75, 80, 87, 80, 34, 80, 68, 37, 83, 84, 10, 80, 87, 88, 89, 80, 91, 105, - 105, 49, 65, 105, 92, 105, 105, 70, 71, 102, 73, 74, 75, 105, 77, 105, 105, 80, - 105, 105, 83, 84, 105, 105, 87, 88, 89, 65, 91, 105, 105, 105, 70, 71, 105, 73, - 74, 75, 105, 105, 105, 105, 80, 14, 15, 83, 84, 18, 105, 87, 88, 89, 105, 91, - 105, 105, 65, 105, 105, 105, 98, 70, 71, 105, 73, 74, 75, 105, 105, 105, 105, - 80, 105, 105, 83, 84, 105, 5, 87, 88, 89, 105, 91, 105, 55, 13, 14, 15, 105, 17, - 105, 65, 20, 21, 105, 105, 70, 71, 26, 73, 74, 75, 30, 105, 32, 33, 80, 105, 72, - 83, 84, 105, 76, 87, 88, 89, 105, 91, 82, 65, 105, 85, 86, 105, 70, 71, 105, 73, - 74, 75, 105, 59, 60, 105, 80, 99, 105, 83, 84, 105, 105, 87, 88, 89, 65, 91, - 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, 105, 105, 105, 80, 105, 105, 83, - 84, 105, 5, 87, 88, 89, 105, 91, 105, 105, 13, 14, 15, 105, 17, 105, 65, 20, 21, - 105, 105, 70, 71, 26, 73, 74, 75, 30, 105, 32, 33, 80, 105, 105, 83, 84, 105, - 105, 87, 88, 89, 105, 91, 105, 65, 105, 105, 105, 105, 70, 71, 105, 73, 74, 75, - 105, 59, 60, 105, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 65, 91, 105, 72, - 105, 70, 71, 76, 73, 74, 75, 105, 105, 82, 105, 80, 85, 86, 83, 84, 105, 105, - 87, 88, 89, 105, 91, 65, 1, 105, 99, 105, 70, 71, 105, 73, 74, 75, 105, 39, 40, - 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 28, 56, 57, 58, 70, - 71, 105, 73, 74, 75, 105, 39, 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, - 89, 105, 91, 65, 1, 56, 57, 58, 70, 71, 105, 73, 74, 75, 105, 105, 105, 105, 80, - 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, 105, 105, 105, 70, 71, - 105, 73, 74, 75, 38, 39, 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, - 105, 91, 65, 1, 56, 57, 58, 70, 71, 105, 73, 74, 75, 105, 12, 105, 105, 80, 105, - 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 1, 2, 105, 105, 70, 71, 105, 73, - 74, 75, 105, 39, 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, - 65, 1, 56, 57, 58, 70, 71, 105, 73, 74, 75, 105, 39, 40, 41, 80, 105, 105, 83, - 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, 56, 57, 58, 70, 71, 105, 73, 74, 75, - 38, 39, 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 1, 56, - 57, 58, 70, 71, 105, 73, 74, 75, 105, 12, 105, 105, 80, 105, 105, 83, 84, 105, - 105, 87, 88, 89, 105, 91, 65, 105, 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, - 39, 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 1, 56, 57, - 58, 70, 71, 105, 73, 74, 75, 105, 12, 105, 105, 80, 105, 105, 83, 84, 105, 105, - 87, 88, 89, 105, 91, 65, 105, 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, 39, - 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 1, 56, 57, 58, - 70, 71, 105, 73, 74, 75, 105, 12, 105, 105, 80, 105, 105, 83, 84, 105, 105, 87, - 88, 89, 105, 91, 65, 1, 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, 39, 40, 41, - 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, 56, 57, 58, 70, - 71, 105, 73, 74, 75, 105, 39, 40, 41, 80, 105, 105, 83, 84, 105, 105, 87, 88, - 89, 105, 91, 65, 105, 56, 57, 58, 70, 71, 105, 73, 74, 75, 105, 105, 105, 105, - 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, 105, 105, 105, 70, - 71, 105, 73, 74, 75, 105, 105, 105, 105, 80, 105, 105, 83, 84, 105, 105, 87, 88, - 89, 105, 91, 65, 105, 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, 105, 105, - 105, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, 105, 105, - 105, 70, 71, 105, 73, 74, 75, 105, 105, 105, 105, 80, 105, 105, 83, 84, 105, - 105, 87, 88, 89, 105, 91, 65, 105, 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, - 105, 105, 105, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, - 105, 105, 105, 70, 71, 105, 73, 74, 75, 105, 105, 105, 105, 80, 105, 105, 83, - 84, 105, 105, 87, 88, 89, 105, 91, 65, 105, 105, 105, 105, 70, 71, 105, 73, 74, - 75, 105, 105, 105, 105, 80, 105, 105, 83, 84, 105, 105, 87, 88, 89, 105, 91, 65, - 105, 105, 105, 105, 70, 71, 105, 73, 105, 75, 105, 105, 105, 105, 80, 105, 105, - 105, 84, 105, 105, 87, 88, 89, 105, 91, 65, 1, 2, 105, 105, 70, 71, 105, 73, - 105, 75, 105, 105, 105, 105, 80, 105, 105, 105, 84, 105, 105, 87, 88, 89, 105, - 91, 62, 63, 64, 65, 66, 67, 105, 105, 70, 105, 37, 65, 39, 40, 41, 1, 70, 71, - 105, 73, 105, 75, 49, 105, 105, 105, 80, 105, 105, 56, 57, 58, 105, 87, 88, 89, - 1, 91, 105, 25, 105, 27, 105, 105, 105, 105, 105, 12, 34, 105, 105, 105, 105, - 39, 40, 41, 105, 105, 65, 105, 105, 105, 27, 70, 71, 105, 73, 105, 75, 34, 56, - 57, 58, 80, 39, 40, 41, 105, 105, 105, 87, 88, 89, 105, 91, 105, 105, 12, 105, - 105, 105, 56, 57, 58, 105, 65, 105, 22, 105, 24, 70, 71, 27, 73, 105, 75, 105, - 105, 105, 34, 80, 36, 105, 38, 105, 105, 105, 87, 88, 89, 65, 91, 47, 105, 105, - 70, 71, 105, 73, 105, 75, 105, 105, 2, 105, 80, 105, 1, 105, 105, 105, 105, 87, - 88, 89, 14, 91, 65, 1, 18, 19, 2, 70, 71, 105, 73, 105, 75, 105, 105, 105, 105, - 80, 14, 105, 16, 105, 18, 19, 87, 88, 89, 1, 91, 27, 39, 40, 41, 47, 105, 49, - 34, 51, 105, 53, 54, 39, 40, 41, 105, 54, 105, 56, 57, 58, 1, 47, 2, 49, 105, - 51, 105, 53, 56, 57, 58, 105, 105, 2, 14, 39, 40, 41, 18, 19, 105, 22, 105, 105, - 105, 14, 105, 105, 105, 18, 19, 105, 56, 57, 58, 105, 60, 105, 39, 40, 41, 1, - 105, 105, 105, 105, 105, 47, 105, 49, 105, 51, 12, 53, 105, 56, 57, 58, 47, 19, - 49, 105, 51, 105, 53, 72, 105, 27, 105, 76, 105, 105, 105, 105, 34, 82, 105, 37, - 85, 86, 72, 105, 14, 15, 76, 105, 18, 72, 105, 49, 82, 76, 99, 85, 86, 105, 105, - 82, 105, 105, 85, 86, 105, 35, 105, 105, 105, 99, 105, 105, 105, 105, 105, 105, - 99, 105, 105, 105, 105, 105, 105, 105, 105, 55,); - - const YY_SHIFT_USE_DFLT = - 32; - - const YY_SHIFT_MAX = 236; - - static public $yy_shift_ofst = array(517, 410, 316, 81, 81, 316, 81, 410, 34, 34, - 13, 81, 128, 81, 81, 128, 81, - 81, 269, 81, 81, 81, 175, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 363, 81, - 81, 222, 222, 457, 457, 457, 457, 457, 1624, 1603, 1736, 1736, 1736, 1736, - 1736, 517, 754, 1211, 1265, 1076, 1157, 1760, 941, 1725, 995, 1103, 1049, 1783, - 1292, 1824, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, - 914, 914, 199, 198, 96, 342, 842, 90, 43, 278, 246, 96, 96, 342, 232, 342, 580, - 2, 143, 190, 244, 331, 711, 321, 325, 291, 376, 446, 237, - 6, 462, - 6, 552, - 432, 213, 500, 500, 480, 419, 446, 438, 438, 438, 438, 491, 438, 438, 491, 438, - 438, - 32, 1738, 1720, 466, 1784, 1795, 514, 1852, 247, 153, - 6, - 6, - 6, - - 6, - 6, - 6, 97, - 12, 168, - 6, - 6, 97, 97, - 6, 156, 156, 97, 52, 97, - 6, - - 6, - 6, 97, 251, 97, - 6, - 12, - 6, 97, - 6, - 6, - 12, - 6, - 12, - 6, 211, - - 6, 664, 438, 491, 438, 438, 438, 424, 438, 491, 515, 491, 424, - 32, - 32, - - 32, - 32, - 32, 1562, 1664, 634, - 31, 1, 133, 50, 115, 152, 99, 88, 366, 84, - 3, 405, 54, 415, 396, 274, 368, 553, 571, 542, 582, 534, 566, 558, 545, 567, - 547, 583, 574, 608, 586, 590, 598, 515, 550, 593, 596, 609, 371, 264, 171, 533, - 530,); - - const YY_REDUCE_USE_DFLT = - 56; - - const YY_REDUCE_MAX = 190; - - static public $yy_reduce_ofst = array(1527, 471, 619, 560, 644, 535, 504, 589, 1335, 1092, 1038, 1119, 1011, 984, - 876, 1173, 903, 930, 957, 1146, 1200, 1443, 1416, 1362, 1227, 1389, 1254, - 1281, 1308, 1065, 673, 849, 824, 708, 761, 736, 796, 1497, 1470, 1619, 1535, - 1671, 1644, 1582, 1792, 1777, 1799, 845, 1792, 718, 556, - 55, 94, - 23, - 23, - - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, 33, - 23, - 23, - - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, - 23, 221, 279, - 80, 169, 329, 347, 310, 18, 273, 159, 226, 8, - 37, 369, 338, 525, 525, 336, - 336, 336, 293, 414, 231, 231, 422, 389, 336, 522, 231, 498, 336, 484, 400, - 435, 414, 272, 336, 403, 397, 336, 336, 336, 444, 336, 336, 231, 336, 336, - 336, 184, 184, 184, 184, 184, 184, 573, 184, 551, 557, 557, 557, 557, 557, - 557, 559, 585, 184, 557, 557, 559, 559, 557, 544, 564, 559, 578, 559, 557, - 557, 557, 559, 594, 559, 557, 587, 557, 559, 557, 557, 595, 557, 599, 557, - 579, 557, 602, 399, 295, 399, 399, 399, 301, 399, 295, 375, 295, 301, 257, 56, - 537, 532, 511,); - - static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 9, 13, 14, 17, 20, 21, 26, 30, 32, 33,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 44, 45, - 46, 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 31, 32, 33, 35, 37, 40, 44, 45, - 46, 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 54, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 53, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 55, 59,), - array(13, 14, 15, 17, 18, 20, 21, 26, 30, 32, 33, 35, 37, 40, 44, 45, 46, - 47, 48, 50, 52, 55, 59,), - array(1, 12, 27, 34, 39, 40, 41, 56, 57, 58,), - array(1, 25, 27, 34, 39, 40, 41, 56, 57, 58,), - array(1, 27, 34, 39, 40, 41, 56, 57, 58,), - array(1, 27, 34, 39, 40, 41, 56, 57, 58,), - array(1, 27, 34, 39, 40, 41, 56, 57, 58,), - array(1, 27, 34, 39, 40, 41, 56, 57, 58,), - array(1, 27, 34, 39, 40, 41, 56, 57, 58,), - array(3, 4, 5, 6, 7, 8, 9, 13, 14, 17, 20, 21, 26, 30, 32, 33,), - array(5, 13, 14, 15, 17, 20, 21, 26, 30, 32, 33, 59, 60,), - array(1, 12, 39, 40, 41, 56, 57, 58,), - array(1, 12, 39, 40, 41, 56, 57, 58,), array(1, 2, 39, 40, 41, 56, 57, 58,), - array(1, 12, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 56, 57, 58, 60,), - array(1, 28, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 54, 56, 57, 58,), - array(1, 38, 39, 40, 41, 56, 57, 58,), - array(1, 38, 39, 40, 41, 56, 57, 58,), - array(1, 12, 39, 40, 41, 56, 57, 58,), - array(1, 22, 39, 40, 41, 56, 57, 58,), array(1, 39, 40, 41, 56, 57, 58,), - array(1, 12, 19, 27, 34, 37, 49,), array(1, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 56, 57, 58,), array(1, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 56, 57, 58,), array(1, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 56, 57, 58,), array(1, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 56, 57, 58,), array(1, 39, 40, 41, 56, 57, 58,), - array(1, 39, 40, 41, 56, 57, 58,), array(1, 39, 40, 41, 56, 57, 58,), - array(39, 40, 41, 56, 57, 58,), array(39, 40, 41, 56, 57, 58,), - array(1, 12, 27, 34,), array(15, 18, 52, 55,), array(1, 27, 34,), - array(15, 37, 55,), - array(5, 13, 14, 15, 17, 20, 21, 26, 30, 32, 33, 59, 60,), - array(14, 18, 27, 29, 34,), array(14, 18, 27, 29, 34,), - array(14, 18, 27, 34,), array(14, 18, 27, 34,), array(1, 27, 34,), - array(1, 27, 34,), array(15, 37, 55,), array(19, 47, 53,), - array(15, 37, 55,), array(1, 2,), array(12, 23, 27, 34, 42,), - array(12, 23, 27, 34, 42,), array(1, 12, 27, 28, 34,), - array(1, 12, 27, 34,), array(1, 12, 27, 34,), array(14, 15, 18, 55,), - array(14, 18, 51,), array(16, 19, 49,), array(16, 19, 49,), - array(9, 10, 11,), array(15, 18,), array(1, 54,), array(27, 34,), - array(19, 49,), array(27, 34,), array(1, 12,), array(27, 34,), - array(1, 19,), array(14, 18,), array(14, 18,), array(15, 55,), - array(1, 29,), array(15, 18,), array(1,), array(1,), array(1,), array(1,), - array(19,), array(1,), array(1,), array(19,), array(1,), array(1,), array(), - array(2, 14, 16, 18, 19, 47, 49, 51, 53,), - array(2, 14, 18, 19, 47, 49, 51, 53, 54,), - array(2, 14, 16, 18, 19, 47, 49, 51, 53,), - array(2, 14, 18, 19, 47, 49, 51, 53,), - array(2, 14, 18, 19, 47, 49, 51, 53,), array(14, 18, 19, 47, 49, 51, 53,), - array(14, 15, 18, 35, 55,), array(16, 47, 53,), array(14, 18, 51,), - array(27, 34,), array(27, 34,), array(27, 34,), array(27, 34,), - array(27, 34,), array(27, 34,), array(47, 53,), array(15, 55,), - array(14, 18,), array(27, 34,), array(27, 34,), array(47, 53,), - array(47, 53,), array(27, 34,), array(47, 53,), array(47, 53,), - array(47, 53,), array(16, 23,), array(47, 53,), array(27, 34,), - array(27, 34,), array(27, 34,), array(47, 53,), array(14, 37,), - array(47, 53,), array(27, 34,), array(15, 55,), array(27, 34,), - array(47, 53,), array(27, 34,), array(27, 34,), array(15, 55,), - array(27, 34,), array(15, 55,), array(27, 34,), array(18, 50,), - array(27, 34,), array(10,), array(1,), array(19,), array(1,), array(1,), - array(1,), array(2,), array(1,), array(19,), array(37,), array(19,), - array(2,), array(), array(), array(), array(), array(), - array(1, 2, 37, 39, 40, 41, 49, 56, 57, 58,), - array(12, 22, 24, 27, 34, 36, 38, 47,), array(12, 16, 27, 34, 37, 49,), - array(37, 47, 49, 54,), array(29, 37, 49,), array(14, 18, 51,), - array(23, 42, 60,), array(23, 42, 54,), array(47, 54,), array(36, 54,), - array(18, 51,), array(22, 36,), array(36, 38,), array(23, 42,), - array(16, 47,), array(37, 49,), array(36, 38,), array(36, 38,), - array(37, 49,), array(37, 49,), array(37,), array(18,), array(54,), - array(16,), array(52,), array(5,), array(18,), array(38,), array(18,), - array(52,), array(18,), array(43,), array(12,), array(35,), array(47,), - array(18,), array(37,), array(18,), array(18,), array(18,), array(18,), - array(35,), array(54,), array(23,), array(24,), array(18,), array(), + static public $yy_action = array(292, 9, 133, 449, 280, 70, 208, 2, 84, 268, 11, 97, 155, 113, 267, 449, 366, 224, + 303, 264, 217, 279, 231, 26, 21, 172, 274, 42, 190, 304, 17, 43, 39, 269, 223, 298, + 13, 209, 194, 81, 1, 143, 317, 90, 148, 105, 52, 292, 9, 132, 93, 280, 200, 279, 2, + 84, 35, 325, 91, 156, 113, 218, 219, 207, 224, 105, 264, 217, 279, 205, 194, 21, + 268, 11, 42, 262, 26, 267, 43, 39, 269, 223, 233, 17, 209, 194, 81, 1, 252, 317, + 186, 141, 101, 52, 292, 9, 134, 192, 280, 213, 279, 2, 84, 35, 325, 208, 12, 113, + 235, 101, 220, 224, 3, 264, 217, 361, 231, 194, 21, 218, 258, 42, 110, 105, 16, 43, + 39, 269, 223, 298, 26, 209, 448, 81, 1, 5, 317, 17, 332, 110, 52, 292, 9, 134, 448, + 280, 197, 118, 2, 84, 286, 287, 288, 227, 113, 27, 229, 305, 224, 316, 264, 217, + 232, 231, 229, 21, 136, 120, 42, 241, 329, 102, 43, 39, 269, 223, 298, 243, 209, + 137, 81, 1, 260, 317, 208, 10, 186, 52, 292, 9, 134, 101, 280, 199, 406, 2, 84, 85, + 313, 35, 325, 113, 27, 81, 248, 224, 317, 264, 217, 406, 212, 25, 21, 194, 101, 42, + 406, 317, 461, 43, 39, 269, 223, 298, 461, 209, 263, 81, 1, 318, 317, 92, 150, 22, + 52, 292, 9, 135, 140, 280, 213, 279, 2, 84, 110, 163, 94, 159, 113, 183, 296, 294, + 224, 448, 264, 217, 279, 231, 194, 21, 263, 191, 42, 309, 221, 448, 43, 39, 269, + 223, 298, 316, 209, 194, 81, 1, 229, 317, 317, 163, 185, 52, 292, 9, 136, 153, 280, + 213, 194, 2, 84, 330, 268, 11, 279, 113, 24, 267, 221, 224, 30, 264, 217, 259, 231, + 254, 31, 194, 265, 42, 302, 192, 83, 43, 39, 269, 223, 298, 158, 209, 208, 81, 1, + 6, 317, 4, 157, 279, 52, 292, 9, 134, 154, 280, 202, 279, 2, 84, 27, 101, 247, 279, + 113, 310, 192, 26, 224, 324, 264, 217, 170, 231, 17, 21, 121, 180, 42, 139, 192, + 279, 43, 39, 269, 223, 298, 162, 209, 137, 81, 1, 179, 317, 266, 10, 279, 52, 292, + 9, 131, 95, 280, 213, 194, 2, 84, 263, 266, 218, 222, 113, 146, 105, 266, 224, 208, + 264, 217, 317, 231, 19, 7, 208, 32, 42, 163, 178, 17, 43, 39, 269, 223, 298, 160, + 209, 279, 81, 1, 107, 317, 184, 304, 279, 52, 292, 9, 134, 266, 280, 213, 182, 2, + 84, 230, 461, 336, 242, 113, 181, 192, 461, 224, 208, 264, 217, 145, 198, 319, 21, + 189, 304, 42, 124, 149, 279, 43, 39, 269, 223, 298, 322, 209, 279, 81, 1, 194, 317, + 121, 208, 34, 52, 292, 9, 136, 266, 280, 213, 138, 2, 84, 208, 37, 265, 152, 113, + 236, 295, 37, 224, 297, 264, 217, 279, 231, 175, 31, 276, 261, 42, 249, 187, 251, + 43, 39, 269, 223, 298, 193, 209, 192, 81, 477, 477, 317, 404, 275, 477, 52, 234, + 114, 270, 285, 284, 282, 283, 289, 183, 12, 208, 404, 292, 9, 33, 331, 280, 281, + 404, 2, 84, 448, 271, 250, 173, 113, 166, 98, 246, 224, 111, 264, 217, 448, 20, + 323, 221, 6, 477, 477, 229, 214, 291, 477, 115, 69, 109, 40, 41, 38, 102, 268, 11, + 278, 335, 168, 267, 211, 277, 299, 144, 260, 188, 263, 327, 328, 334, 293, 323, + 279, 169, 206, 312, 229, 214, 87, 477, 115, 69, 109, 108, 266, 266, 102, 165, 208, + 278, 335, 119, 226, 211, 277, 299, 88, 260, 406, 89, 323, 274, 86, 290, 333, 229, + 214, 208, 311, 128, 65, 109, 171, 406, 151, 102, 164, 400, 278, 335, 406, 96, 211, + 277, 299, 323, 260, 300, 186, 174, 229, 214, 26, 215, 128, 65, 109, 300, 279, 17, + 102, 35, 325, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 194, 300, + 300, 216, 229, 214, 300, 300, 128, 59, 106, 222, 300, 300, 102, 300, 208, 278, 335, + 300, 300, 211, 277, 299, 300, 260, 403, 300, 323, 300, 300, 300, 300, 229, 214, + 300, 300, 128, 49, 106, 112, 403, 300, 102, 300, 300, 278, 335, 403, 300, 211, 277, + 299, 323, 260, 300, 300, 300, 229, 214, 268, 11, 128, 65, 109, 267, 36, 239, 102, + 300, 176, 278, 335, 300, 26, 211, 277, 299, 300, 260, 300, 17, 323, 300, 300, 300, + 210, 229, 214, 300, 300, 128, 59, 109, 300, 300, 300, 102, 300, 300, 278, 335, 448, + 300, 211, 277, 299, 317, 260, 300, 300, 323, 240, 300, 448, 300, 229, 214, 300, + 253, 128, 64, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 214, 300, 300, 128, 74, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, + 300, 229, 78, 300, 300, 82, 44, 104, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 80, 300, 300, + 82, 47, 104, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, 323, + 260, 300, 300, 300, 229, 214, 300, 300, 99, 54, 109, 300, 300, 300, 102, 300, 300, + 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, + 229, 214, 300, 300, 128, 61, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 314, + 211, 277, 299, 300, 260, 300, 292, 8, 315, 300, 280, 300, 300, 2, 84, 300, 18, 201, + 300, 113, 272, 300, 300, 224, 323, 264, 217, 300, 300, 229, 214, 300, 300, 128, 66, + 109, 300, 273, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, 323, 260, + 300, 301, 23, 229, 214, 300, 317, 128, 72, 109, 300, 300, 300, 102, 300, 300, 278, + 335, 300, 314, 211, 277, 299, 300, 260, 300, 292, 8, 315, 300, 280, 300, 300, 2, + 84, 300, 300, 300, 300, 113, 300, 300, 300, 224, 323, 264, 217, 300, 300, 229, 214, + 300, 300, 128, 63, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, + 299, 323, 260, 300, 300, 23, 229, 214, 300, 300, 128, 45, 109, 300, 300, 300, 102, + 268, 11, 278, 335, 300, 267, 211, 277, 299, 300, 260, 300, 300, 323, 26, 300, 147, + 300, 229, 204, 300, 17, 117, 53, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 214, 300, + 300, 128, 75, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 214, 300, 300, 128, 56, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, + 300, 229, 214, 300, 300, 116, 50, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 214, 300, + 300, 103, 67, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 214, 300, 300, 128, 46, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, + 300, 229, 214, 300, 300, 128, 76, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 214, 300, + 300, 128, 73, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 214, 300, 300, 128, 77, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, + 300, 229, 214, 300, 300, 128, 79, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 214, 300, + 300, 128, 58, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 203, 300, 300, 128, 55, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, + 300, 229, 214, 300, 300, 128, 62, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 214, 300, + 300, 128, 60, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 214, 300, 300, 128, 71, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, + 300, 229, 214, 300, 300, 128, 57, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, + 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, 214, 300, + 300, 128, 48, 109, 300, 300, 300, 102, 300, 300, 278, 335, 300, 300, 211, 277, 299, + 323, 260, 300, 300, 300, 229, 214, 300, 300, 100, 68, 109, 300, 300, 300, 102, 300, + 300, 278, 335, 300, 410, 211, 277, 299, 300, 260, 300, 300, 323, 300, 410, 300, + 410, 229, 237, 410, 300, 122, 300, 109, 300, 300, 410, 102, 410, 300, 410, 326, + 300, 300, 211, 277, 299, 300, 260, 221, 300, 323, 300, 208, 300, 300, 229, 237, + 416, 416, 130, 300, 109, 300, 300, 300, 102, 300, 300, 300, 255, 300, 300, 211, + 277, 299, 29, 260, 26, 532, 51, 244, 287, 288, 227, 17, 300, 229, 225, 300, 40, 41, + 38, 448, 300, 416, 416, 416, 477, 477, 225, 15, 300, 477, 461, 448, 300, 327, 328, + 334, 477, 477, 416, 416, 416, 477, 461, 208, 300, 300, 300, 300, 40, 41, 38, 300, + 300, 307, 300, 300, 300, 300, 461, 300, 461, 300, 477, 300, 461, 327, 328, 334, 26, + 300, 461, 300, 461, 225, 477, 17, 461, 320, 300, 300, 40, 41, 38, 477, 477, 300, + 32, 300, 477, 461, 300, 300, 300, 300, 300, 300, 300, 327, 328, 334, 300, 300, 300, + 323, 300, 300, 300, 300, 229, 237, 300, 300, 127, 300, 109, 300, 300, 461, 102, + 461, 300, 477, 300, 461, 300, 211, 277, 299, 300, 260, 14, 300, 300, 323, 300, 300, + 300, 300, 229, 237, 477, 477, 126, 300, 109, 477, 461, 300, 102, 300, 300, 300, + 300, 300, 300, 211, 277, 299, 300, 260, 300, 300, 323, 300, 300, 300, 300, 229, + 237, 300, 300, 123, 300, 109, 461, 300, 461, 102, 477, 300, 461, 300, 300, 300, + 211, 277, 299, 300, 260, 300, 323, 300, 300, 300, 300, 229, 237, 300, 300, 129, + 300, 109, 300, 300, 300, 102, 300, 300, 300, 300, 300, 300, 211, 277, 299, 208, + 260, 225, 300, 208, 323, 300, 300, 300, 300, 229, 237, 477, 477, 125, 300, 109, + 477, 461, 300, 102, 300, 300, 300, 300, 26, 300, 211, 277, 299, 300, 260, 17, 300, + 208, 300, 300, 40, 41, 38, 256, 40, 41, 38, 245, 208, 461, 300, 461, 300, 477, 300, + 461, 300, 327, 328, 334, 208, 327, 328, 334, 300, 300, 300, 300, 300, 300, 257, + 300, 208, 300, 40, 41, 38, 300, 300, 300, 300, 300, 195, 300, 228, 40, 41, 38, 300, + 300, 300, 327, 328, 334, 300, 208, 300, 40, 41, 38, 208, 28, 327, 328, 334, 196, + 208, 300, 300, 40, 41, 38, 300, 300, 327, 328, 334, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 327, 328, 334, 300, 300, 300, 40, 41, 38, 208, 300, 40, 41, 38, 208, + 300, 300, 40, 41, 38, 300, 477, 477, 327, 328, 334, 477, 461, 327, 328, 334, 300, + 321, 300, 327, 328, 334, 208, 300, 300, 167, 300, 300, 300, 300, 300, 40, 41, 38, + 300, 300, 40, 41, 38, 300, 461, 300, 461, 300, 477, 300, 461, 300, 327, 328, 334, + 300, 308, 327, 328, 334, 208, 300, 208, 40, 41, 38, 300, 300, 300, 300, 372, 300, + 358, 300, 300, 300, 300, 238, 300, 300, 327, 328, 334, 263, 300, 26, 300, 26, 300, + 300, 186, 177, 17, 300, 17, 448, 300, 300, 186, 161, 279, 300, 163, 35, 325, 208, + 300, 448, 279, 186, 142, 35, 325, 300, 300, 306, 300, 194, 300, 279, 300, 300, 35, + 325, 300, 194, 263, 300, 300, 300, 26, 300, 300, 300, 300, 300, 194, 17, 300, 300, + 300, 300, 300, 300, 300, 163,); + + static public $yy_lookahead = array(12, 13, 14, 36, 16, 17, 1, 19, 20, 12, 13, 71, 72, 25, 17, 48, 11, 29, 30, 31, + 32, 81, 34, 26, 36, 28, 92, 39, 94, 95, 33, 43, 44, 45, 46, 47, 21, 49, 98, 51, + 52, 75, 54, 71, 72, 79, 58, 12, 13, 14, 35, 16, 17, 81, 19, 20, 84, 85, 71, 72, + 25, 75, 76, 77, 29, 79, 31, 32, 81, 34, 98, 36, 12, 13, 39, 17, 26, 17, 43, 44, + 45, 46, 47, 33, 49, 98, 51, 52, 53, 54, 71, 72, 18, 58, 12, 13, 14, 98, 16, 17, + 81, 19, 20, 84, 85, 1, 15, 25, 50, 18, 50, 29, 36, 31, 32, 11, 34, 98, 36, 75, + 76, 39, 48, 79, 28, 43, 44, 45, 46, 47, 26, 49, 36, 51, 52, 36, 54, 33, 17, 48, + 58, 12, 13, 14, 48, 16, 17, 48, 19, 20, 63, 64, 65, 66, 25, 35, 69, 37, 29, 64, + 31, 32, 70, 34, 69, 36, 14, 75, 39, 17, 49, 79, 43, 44, 45, 46, 47, 14, 49, 46, + 51, 52, 90, 54, 1, 52, 71, 58, 12, 13, 14, 18, 16, 17, 11, 19, 20, 102, 103, 84, + 85, 25, 35, 51, 37, 29, 54, 31, 32, 26, 34, 15, 36, 98, 18, 39, 33, 54, 46, 43, + 44, 45, 46, 47, 52, 49, 22, 51, 52, 95, 54, 71, 72, 15, 58, 12, 13, 14, 14, 16, + 17, 81, 19, 20, 48, 41, 71, 72, 25, 8, 9, 10, 29, 36, 31, 32, 81, 34, 98, 36, + 22, 71, 39, 59, 46, 48, 43, 44, 45, 46, 47, 64, 49, 98, 51, 52, 69, 54, 54, 41, + 71, 58, 12, 13, 14, 72, 16, 17, 98, 19, 20, 53, 12, 13, 81, 25, 15, 17, 46, 29, + 13, 31, 32, 22, 34, 53, 36, 98, 99, 39, 103, 98, 17, 43, 44, 45, 46, 47, 72, 49, + 1, 51, 52, 36, 54, 35, 72, 81, 58, 12, 13, 14, 72, 16, 17, 81, 19, 20, 35, 18, + 37, 81, 25, 53, 98, 26, 29, 89, 31, 32, 72, 34, 33, 36, 96, 71, 39, 14, 98, 81, + 43, 44, 45, 46, 47, 72, 49, 46, 51, 52, 91, 54, 93, 52, 81, 58, 12, 13, 14, 36, + 16, 17, 98, 19, 20, 22, 93, 75, 76, 25, 91, 79, 93, 29, 1, 31, 32, 54, 34, 26, + 36, 1, 15, 39, 41, 72, 33, 43, 44, 45, 46, 47, 72, 49, 81, 51, 52, 79, 54, 94, + 95, 81, 58, 12, 13, 14, 93, 16, 17, 14, 19, 20, 17, 46, 96, 17, 25, 71, 98, 52, + 29, 1, 31, 32, 72, 34, 53, 36, 94, 95, 39, 17, 72, 81, 43, 44, 45, 46, 47, 89, + 49, 81, 51, 52, 98, 54, 96, 1, 28, 58, 12, 13, 14, 93, 16, 17, 79, 19, 20, 1, 2, + 99, 72, 25, 18, 65, 2, 29, 68, 31, 32, 81, 34, 51, 36, 34, 17, 39, 53, 80, 37, + 43, 44, 45, 46, 47, 17, 49, 98, 51, 12, 13, 54, 11, 17, 17, 58, 15, 17, 34, 3, + 4, 5, 6, 7, 8, 15, 1, 26, 12, 13, 23, 17, 16, 5, 33, 19, 20, 36, 17, 53, 51, 25, + 91, 80, 17, 29, 21, 31, 32, 48, 42, 64, 46, 36, 12, 13, 69, 70, 11, 17, 73, 74, + 75, 38, 39, 40, 79, 12, 13, 82, 83, 91, 17, 86, 87, 88, 72, 90, 80, 22, 55, 56, + 57, 81, 64, 81, 91, 100, 101, 69, 70, 79, 50, 73, 74, 75, 67, 93, 93, 79, 91, 1, + 82, 83, 78, 50, 86, 87, 88, 79, 90, 11, 79, 64, 92, 79, 9, 86, 69, 70, 1, 101, + 73, 74, 75, 91, 26, 27, 79, 91, 11, 82, 83, 33, 91, 86, 87, 88, 64, 90, 104, 71, + 72, 69, 70, 26, 97, 73, 74, 75, 104, 81, 33, 79, 84, 85, 82, 83, 104, 104, 86, + 87, 88, 104, 90, 104, 104, 64, 98, 104, 104, 97, 69, 70, 104, 104, 73, 74, 75, + 76, 104, 104, 79, 104, 1, 82, 83, 104, 104, 86, 87, 88, 104, 90, 11, 104, 64, + 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 76, 26, 104, 79, 104, 104, 82, + 83, 33, 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, 70, 12, 13, 73, 74, 75, 17, + 13, 14, 79, 104, 17, 82, 83, 104, 26, 86, 87, 88, 104, 90, 104, 33, 64, 104, + 104, 104, 97, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, + 36, 104, 86, 87, 88, 54, 90, 104, 104, 64, 46, 104, 48, 104, 69, 70, 104, 53, + 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, + 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, + 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, + 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, + 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, + 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, + 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, + 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, + 104, 104, 104, 79, 104, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104, 12, 13, + 14, 104, 16, 104, 104, 19, 20, 104, 13, 14, 104, 25, 17, 104, 104, 29, 64, 31, + 32, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 34, 104, 79, 104, 104, 82, 83, + 104, 104, 86, 87, 88, 64, 90, 104, 58, 59, 69, 70, 104, 54, 73, 74, 75, 104, + 104, 104, 79, 104, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104, 12, 13, 14, + 104, 16, 104, 104, 19, 20, 104, 104, 104, 104, 25, 104, 104, 104, 29, 64, 31, + 32, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, + 104, 104, 86, 87, 88, 64, 90, 104, 58, 59, 69, 70, 104, 104, 73, 74, 75, 104, + 104, 104, 79, 12, 13, 82, 83, 104, 17, 86, 87, 88, 104, 90, 104, 104, 64, 26, + 104, 28, 104, 69, 70, 104, 33, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, + 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, + 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 64, + 90, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, + 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, + 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, + 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, + 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, + 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, + 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, + 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, + 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, + 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, 70, 104, 104, 73, + 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, + 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, + 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, + 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, + 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, + 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, + 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, + 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, + 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, + 64, 90, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, + 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, + 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, + 87, 88, 104, 90, 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 74, 75, + 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104, + 104, 69, 70, 104, 104, 73, 74, 75, 104, 104, 104, 79, 104, 104, 82, 83, 104, 11, + 86, 87, 88, 104, 90, 104, 104, 64, 104, 21, 104, 23, 69, 70, 26, 104, 73, 104, + 75, 104, 104, 33, 79, 35, 104, 37, 83, 104, 104, 86, 87, 88, 104, 90, 46, 104, + 64, 104, 1, 104, 104, 69, 70, 1, 2, 73, 104, 75, 104, 104, 104, 79, 104, 104, + 104, 83, 104, 104, 86, 87, 88, 24, 90, 26, 61, 62, 63, 64, 65, 66, 33, 104, 69, + 2, 104, 38, 39, 40, 36, 104, 38, 39, 40, 12, 13, 2, 15, 104, 17, 18, 48, 104, + 55, 56, 57, 12, 13, 55, 56, 57, 17, 18, 1, 104, 104, 104, 104, 38, 39, 40, 104, + 104, 11, 104, 104, 104, 104, 46, 104, 48, 104, 50, 104, 52, 55, 56, 57, 26, 104, + 46, 104, 48, 2, 50, 33, 52, 53, 104, 104, 38, 39, 40, 12, 13, 104, 15, 104, 17, + 18, 104, 104, 104, 104, 104, 104, 104, 55, 56, 57, 104, 104, 104, 64, 104, 104, + 104, 104, 69, 70, 104, 104, 73, 104, 75, 104, 104, 46, 79, 48, 104, 50, 104, 52, + 104, 86, 87, 88, 104, 90, 2, 104, 104, 64, 104, 104, 104, 104, 69, 70, 12, 13, + 73, 104, 75, 17, 18, 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88, 104, 90, + 104, 104, 64, 104, 104, 104, 104, 69, 70, 104, 104, 73, 104, 75, 46, 104, 48, + 79, 50, 104, 52, 104, 104, 104, 86, 87, 88, 104, 90, 104, 64, 104, 104, 104, + 104, 69, 70, 104, 104, 73, 104, 75, 104, 104, 104, 79, 104, 104, 104, 104, 104, + 104, 86, 87, 88, 1, 90, 2, 104, 1, 64, 104, 104, 104, 104, 69, 70, 12, 13, 73, + 104, 75, 17, 18, 104, 79, 104, 104, 104, 104, 26, 104, 86, 87, 88, 104, 90, 33, + 104, 1, 104, 104, 38, 39, 40, 37, 38, 39, 40, 11, 1, 46, 104, 48, 104, 50, 104, + 52, 104, 55, 56, 57, 1, 55, 56, 57, 104, 104, 104, 104, 104, 104, 11, 104, 1, + 104, 38, 39, 40, 104, 104, 104, 104, 104, 11, 104, 37, 38, 39, 40, 104, 104, + 104, 55, 56, 57, 104, 1, 104, 38, 39, 40, 1, 2, 55, 56, 57, 11, 1, 104, 104, 38, + 39, 40, 104, 104, 55, 56, 57, 104, 104, 104, 104, 104, 104, 104, 104, 104, 55, + 56, 57, 104, 104, 104, 38, 39, 40, 1, 104, 38, 39, 40, 1, 104, 104, 38, 39, 40, + 104, 12, 13, 55, 56, 57, 17, 18, 55, 56, 57, 104, 53, 104, 55, 56, 57, 1, 104, + 104, 27, 104, 104, 104, 104, 104, 38, 39, 40, 104, 104, 38, 39, 40, 104, 46, + 104, 48, 104, 50, 104, 52, 104, 55, 56, 57, 104, 59, 55, 56, 57, 1, 104, 1, 38, + 39, 40, 104, 104, 104, 104, 11, 104, 11, 104, 104, 104, 104, 18, 104, 104, 55, + 56, 57, 22, 104, 26, 104, 26, 104, 104, 71, 72, 33, 104, 33, 36, 104, 104, 71, + 72, 81, 104, 41, 84, 85, 1, 104, 48, 81, 71, 72, 84, 85, 104, 104, 11, 104, 98, + 104, 81, 104, 104, 84, 85, 104, 98, 22, 104, 104, 104, 26, 104, 104, 104, 104, + 104, 98, 33, 104, 104, 104, 104, 104, 104, 104, 41,); + + const YY_SHIFT_USE_DFLT = - 34; + + const YY_SHIFT_MAX = 242; + + static public $yy_shift_ofst = array(517, 317, 364, 82, 317, 82, 82, 364, - 12, - 12, 35, 82, 82, 82, 129, 82, 82, + 82, 82, 176, 223, 82, 82, 82, 82, 82, 176, 82, 82, 82, 82, 82, 411, 82, 82, 82, + 82, 270, 270, 458, 458, 458, 458, 458, 1680, 1616, 1852, 1852, 1852, 1852, + 1852, 517, 1004, 1955, 1989, 1984, 1909, 526, 1886, 1897, 1944, 1921, 1856, + 1949, 2012, 2012, 2012, 2012, 2012, 2012, 2046, 2012, 2012, 2012, 2012, 2012, + 2012, 1648, 2091, 1648, 2048, 152, 104, 319, 343, 933, - 3, 1063, 717, 717, + 620, 620, 319, 343, 319, 343, 321, 319, 478, 601, 684, 722, 60, 183, 196, 280, + 91, 280, 241, 74, 415, 224, 50, 373, 466, 440, 5, 393, 415, 50, 173, 173, 400, + 400, 400, 400, 400, 400, 400, 400, - 34, 1709, 1662, 1650, 1853, 1766, 1985, + 942, 556, 387, 498, 50, 50, 281, 50, 50, 133, 163, 50, 50, 50, 163, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 121, 133, 133, 133, 163, 133, 133, 50, 133, + 163, 172, 50, 172, 287, 50, 50, 133, 400, 400, 76, 608, 173, 400, 400, 484, + 484, 173, 173, 400, - 34, - 34, - 34, - 34, - 34, 1621, 1567, 502, 735, 543, + 96, 204, 238, 252, 290, 15, 58, - 33, 120, 99, 218, 217, 363, 167, 303, 501, + 511, 508, 515, 485, 463, 461, 489, 497, 522, 529, 509, 548, 518, 507, 490, 487, + 528, 479, 434, 558, 295, 76, 418, 442, 445,); + + const YY_REDUCE_USE_DFLT = - 67; + + const YY_REDUCE_MAX = 196; + + static public $yy_reduce_ofst = array(1582, 488, 633, 658, 521, 550, 575, 604, 770, 799, 1024, 1302, 1410, 1439, + 1244, 1107, 1190, 1493, 1078, 824, 970, 687, 924, 1327, 1219, 1161, 1136, + 1053, 1273, 1468, 1385, 1356, 899, 995, 741, 716, 853, 1551, 1522, 1764, 1794, + 1736, 1707, 1677, - 28, 571, 19, - 28, 2006, 2014, 2025, 87, 95, 115, 115, + 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, + 175, 115, 115, 115, 115, 115, 115, 115, 160, 115, 160, 92, - 13, - 60, - 14, + 207, 333, 380, 505, 293, 246, 213, 260, 44, 410, 312, - 66, 340, 209, 190, + 190, 338, 299, 190, 325, 299, 325, 279, 420, 325, 258, - 34, 278, 254, 366, + 190, 190, 190, 370, 372, 325, 354, 190, 190, 284, 190, 190, 190, 190, 190, + 190, 496, 496, 496, 496, 496, 496, 397, 506, 496, 496, 503, 503, 527, 503, + 503, 523, 531, 503, 503, 503, 513, 503, 503, 503, 503, 503, 503, 503, 503, + 503, 503, 503, 532, 523, 523, 523, 537, 523, 523, 503, 523, 534, 510, 503, + 535, 539, 503, 503, 523, - 1, - 1, 544, 530, 134, - 1, - 1, 382, 382, 134, + 134, - 1, 499, 464, 419, 452, 481,); + + static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44, + 45, 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44, + 45, 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 53, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 52, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 54, 58,), + array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, + 46, 47, 49, 51, 54, 58,), + array(1, 11, 26, 33, 38, 39, 40, 55, 56, 57,), + array(1, 24, 26, 33, 38, 39, 40, 55, 56, 57,), + array(1, 26, 33, 38, 39, 40, 55, 56, 57,), + array(1, 26, 33, 38, 39, 40, 55, 56, 57,), + array(1, 26, 33, 38, 39, 40, 55, 56, 57,), + array(1, 26, 33, 38, 39, 40, 55, 56, 57,), + array(1, 26, 33, 38, 39, 40, 55, 56, 57,), + array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,), + array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,), + array(1, 38, 39, 40, 53, 55, 56, 57,), + array(1, 27, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57, 59,), + array(1, 11, 38, 39, 40, 55, 56, 57,), + array(1, 21, 38, 39, 40, 55, 56, 57,), + array(1, 11, 38, 39, 40, 55, 56, 57,), + array(1, 37, 38, 39, 40, 55, 56, 57,), + array(1, 11, 38, 39, 40, 55, 56, 57,), + array(1, 11, 38, 39, 40, 55, 56, 57,), + array(1, 37, 38, 39, 40, 55, 56, 57,), array(1, 2, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), + array(1, 11, 18, 26, 33, 36, 48,), array(1, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), + array(1, 38, 39, 40, 55, 56, 57,), array(38, 39, 40, 55, 56, 57,), + array(1, 11, 22, 26, 33, 41,), array(38, 39, 40, 55, 56, 57,), + array(1, 11, 22, 26, 33, 41,), array(14, 17, 51, 54,), + array(1, 11, 26, 33,), array(1, 26, 33,), array(14, 36, 54,), + array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,), + array(12, 13, 17, 26, 28, 33,), array(12, 13, 17, 26, 28, 33,), + array(12, 13, 17, 26, 33,), array(12, 13, 17, 26, 33,), + array(1, 11, 26, 33,), array(1, 11, 26, 33,), array(1, 26, 33,), + array(14, 36, 54,), array(1, 26, 33,), array(14, 36, 54,), + array(18, 46, 52,), array(1, 26, 33,), array(1, 2,), + array(1, 11, 26, 27, 33,), array(1, 11, 26, 33,), array(13, 14, 17, 54,), + array(12, 13, 17, 50,), array(1, 11, 26, 33,), array(15, 18, 48,), + array(12, 13, 17,), array(15, 18, 48,), array(12, 13, 17,), + array(8, 9, 10,), array(18, 48,), array(14, 17,), array(14, 54,), + array(26, 33,), array(26, 33,), array(1, 18,), array(1, 28,), array(1, 11,), + array(1, 53,), array(14, 17,), array(26, 33,), array(18,), array(18,), + array(1,), array(1,), array(1,), array(1,), array(1,), array(1,), array(1,), + array(1,), array(), array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,), + array(2, 12, 13, 17, 18, 46, 48, 50, 52, 53,), + array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,), + array(2, 12, 13, 17, 18, 46, 48, 50, 52,), + array(2, 12, 13, 17, 18, 46, 48, 50, 52,), + array(12, 13, 17, 18, 46, 48, 50, 52,), array(13, 14, 17, 34, 54,), + array(12, 13, 17, 50,), array(15, 46, 52,), array(12, 13, 17,), + array(26, 33,), array(26, 33,), array(15, 22,), array(26, 33,), + array(26, 33,), array(46, 52,), array(14, 54,), array(26, 33,), + array(26, 33,), array(26, 33,), array(14, 54,), array(26, 33,), + array(26, 33,), array(26, 33,), array(26, 33,), array(26, 33,), + array(26, 33,), array(26, 33,), array(26, 33,), array(26, 33,), + array(26, 33,), array(26, 33,), array(17, 49,), array(46, 52,), + array(46, 52,), array(46, 52,), array(14, 54,), array(46, 52,), + array(46, 52,), array(26, 33,), array(46, 52,), array(14, 54,), + array(46, 52,), array(26, 33,), array(46, 52,), array(13, 36,), + array(26, 33,), array(26, 33,), array(46, 52,), array(1,), array(1,), + array(36,), array(9,), array(18,), array(1,), array(1,), array(2,), + array(2,), array(18,), array(18,), array(1,), array(), array(), array(), + array(), array(), array(1, 2, 36, 38, 39, 40, 48, 55, 56, 57,), + array(11, 21, 23, 26, 33, 35, 37, 46,), array(11, 15, 26, 33, 36, 48,), + array(36, 46, 48, 53,), array(12, 13, 17, 50,), array(28, 36, 48,), + array(22, 41, 59,), array(22, 41, 53,), array(46, 53,), array(35, 53,), + array(21, 35,), array(17, 50,), array(36, 48,), array(35, 37,), + array(36, 48,), array(15, 46,), array(36, 48,), array(22, 41,), + array(35, 37,), array(35, 37,), array(17,), array(15,), array(23,), + array(17,), array(34,), array(37,), array(34,), array(17,), array(17,), + array(17,), array(5,), array(42,), array(11,), array(36,), array(46,), + array(51,), array(53,), array(17,), array(17,), array(17,), array(22,), + array(17,), array(36,), array(17,), array(51,), array(53,), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), @@ -806,37 +832,38 @@ class Smarty_Internal_Templateparser array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),); - static public $yy_default = array(334, 508, 523, 488, 488, 523, 488, 523, 523, 523, 523, 523, 523, 523, 523, 523, - 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, - 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 393, 360, 393, - 357, 393, 369, 331, 523, 523, 523, 523, 523, 523, 398, 523, 523, 523, 523, 523, - 414, 431, 405, 400, 511, 395, 509, 486, 487, 374, 398, 404, 510, 419, 420, 407, - 523, 393, 523, 523, 393, 393, 393, 393, 393, 393, 523, 500, 523, 383, 421, 421, - 407, 407, 407, 523, 454, 444, 444, 523, 523, 407, 393, 444, 371, 407, 393, 387, - 454, 454, 523, 407, 523, 389, 422, 407, 410, 497, 417, 423, 444, 424, 411, 495, - 443, 443, 443, 443, 443, 443, 523, 470, 456, 361, 378, 372, 362, 364, 377, 451, - 523, 454, 356, 370, 480, 481, 373, 447, 449, 448, 523, 478, 367, 366, 368, 479, - 454, 452, 358, 523, 380, 450, 376, 354, 523, 382, 523, 379, 523, 381, 348, 384, - 498, 390, 413, 388, 489, 438, 475, 454, 501, 490, 494, 494, 454, 494, 454, 431, - 427, 431, 431, 431, 455, 421, 421, 427, 523, 523, 523, 523, 421, 427, 439, 523, - 523, 431, 523, 499, 523, 523, 523, 523, 339, 523, 523, 523, 523, 523, 433, 523, - 523, 427, 523, 470, 523, 523, 523, 523, 429, 434, 421, 401, 523, 464, 483, 375, - 461, 484, 406, 463, 469, 462, 433, 474, 394, 402, 496, 470, 460, 332, 445, 491, - 492, 425, 386, 493, 392, 472, 473, 426, 428, 457, 458, 459, 453, 409, 430, 432, - 408, 363, 391, 341, 340, 342, 338, 337, 333, 335, 336, 343, 344, 350, 351, 352, - 349, 347, 345, 346, 434, 435, 512, 513, 514, 385, 476, 485, 519, 520, 517, 516, - 505, 507, 506, 515, 522, 518, 521, 471, 477, 467, 465, 468, 440, 437, 436, 415, - 416, 502, 503, 442, 466, 446, 441, 418, 504, 412, 482,); + static public $yy_default = array(340, 516, 531, 496, 531, 496, 496, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 400, 400, 400, + 400, 376, 367, 337, 531, 531, 405, 531, 531, 531, 531, 531, 531, 531, 531, 531, + 421, 495, 411, 405, 402, 519, 438, 412, 407, 381, 517, 494, 518, 426, 428, 427, + 428, 531, 414, 400, 531, 531, 400, 400, 400, 400, 420, 445, 400, 531, 400, 531, + 508, 400, 390, 414, 414, 531, 461, 414, 451, 461, 451, 461, 531, 451, 531, 531, + 378, 400, 394, 414, 414, 414, 531, 400, 451, 505, 424, 418, 396, 417, 429, 430, + 414, 431, 503, 450, 450, 450, 450, 450, 450, 531, 463, 477, 461, 369, 368, 531, + 387, 380, 459, 531, 365, 386, 360, 531, 373, 362, 359, 374, 363, 385, 364, 371, + 375, 377, 389, 531, 486, 457, 488, 531, 489, 458, 379, 455, 531, 456, 383, 454, + 461, 384, 388, 487, 397, 395, 461, 353, 483, 391, 420, 498, 497, 506, 509, 445, + 502, 502, 502, 461, 461, 438, 434, 438, 438, 462, 438, 428, 428, 434, 531, 531, + 531, 446, 531, 531, 434, 438, 428, 531, 531, 531, 531, 408, 531, 436, 531, 531, + 531, 531, 531, 345, 440, 531, 507, 434, 531, 441, 531, 531, 531, 428, 531, 477, + 531, 531, 531, 477, 338, 482, 401, 492, 491, 469, 470, 413, 476, 468, 471, 504, + 440, 467, 409, 382, 453, 499, 500, 432, 393, 501, 479, 480, 481, 433, 435, 464, + 465, 466, 460, 416, 437, 439, 415, 399, 370, 347, 346, 348, 344, 343, 339, 341, + 342, 349, 350, 356, 357, 398, 355, 354, 351, 352, 441, 442, 520, 521, 522, 392, + 484, 493, 527, 528, 525, 524, 513, 515, 514, 523, 530, 526, 529, 478, 485, 474, + 472, 475, 447, 444, 443, 422, 423, 510, 511, 449, 473, 452, 448, 425, 512, 419, + 490,); - const YYNOCODE = 106; + const YYNOCODE = 105; const YYSTACKDEPTH = 500; - const YYNSTATE = 331; + const YYNSTATE = 337; - const YYNRULE = 192; + const YYNRULE = 194; - const YYERRORSYMBOL = 61; + const YYERRORSYMBOL = 60; const YYERRSYMDT = 'yy0'; @@ -869,17 +896,17 @@ class Smarty_Internal_Templateparser public $yyerrcnt; /* Shifts left before out of the error */ public $yystack = array(); /* The parser's stack */ - public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'BLOCKSOURCE', - 'LITERALSTART', 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPLEOUTPUT', 'LDEL', 'DOLLARID', - 'EQUAL', 'SIMPLETAG', 'ID', 'PTR', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO', - 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', 'SMARTYBLOCKCHILDPARENT', + public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', + 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', + 'SIMPLETAG', 'ID', 'PTR', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO', 'STEP', + 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', 'SMARTYBLOCKCHILDPARENT', 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', 'INSTANCEOF', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', 'CLOSEB', 'DOLLAR', 'LOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', 'error', 'start', 'template', 'template_element', 'smartytag', 'literal', 'text_content', - 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', 'value', 'expr', - 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', 'varvar', + 'literal_elements', 'literal_element', 'tag', 'variable', 'modifierlist', 'attributes', + 'value', 'expr', 'varindexed', 'statement', 'statements', 'foraction', 'varvar', 'modparameters', 'attribute', 'ternary', 'array', 'lop', 'scond', 'ns1', 'function', 'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', 'params', 'modifier', @@ -892,16 +919,17 @@ class Smarty_Internal_Templateparser 'template_element ::= PHP', 'template_element ::= NOCACHE', 'template_element ::= text_content', 'text_content ::= TEXT', 'text_content ::= text_content TEXT', 'template_element ::= STRIPON', - 'template_element ::= STRIPOFF', 'template_element ::= BLOCKSOURCE', - 'literal ::= LITERALSTART LITERALEND', + 'template_element ::= STRIPOFF', 'literal ::= LITERALSTART LITERALEND', 'literal ::= LITERALSTART literal_elements LITERALEND', 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=', 'literal_element ::= literal', 'literal_element ::= LITERAL', - 'smartytag ::= tag RDEL', 'smartytag ::= SIMPLEOUTPUT', 'tag ::= LDEL variable', + 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable', + 'tag ::= LDEL variable modifierlist attributes', 'tag ::= LDEL variable attributes', 'tag ::= LDEL value', - 'tag ::= LDEL value attributes', 'tag ::= LDEL expr', - 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value', - 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes', + 'tag ::= LDEL value modifierlist attributes', 'tag ::= LDEL value attributes', + 'tag ::= LDEL expr modifierlist attributes', 'tag ::= LDEL expr attributes', + 'tag ::= LDEL DOLLARID EQUAL value', 'tag ::= LDEL DOLLARID EQUAL expr', + 'tag ::= LDEL DOLLARID EQUAL expr attributes', 'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG', 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID', 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes', @@ -959,7 +987,7 @@ class Smarty_Internal_Templateparser 'indexdef ::= OPENB variable CLOSEB', 'indexdef ::= OPENB value CLOSEB', 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB', 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele', - 'varvarele ::= ID', 'varvarele ::= LDEL expr RDEL', + 'varvarele ::= ID', 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL', 'object ::= varindexed objectchain', 'objectchain ::= objectelement', 'objectchain ::= objectchain objectelement', 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex', @@ -1273,7 +1301,7 @@ class Smarty_Internal_Templateparser while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } - #line 190 "../smarty/lexer/smarty_internal_templateparser.y" + #line 187 "../smarty/lexer/smarty_internal_templateparser.y" $this->internalError = true; $this->compiler->trigger_template_error("Stack overflow in template parser"); @@ -1295,106 +1323,109 @@ class Smarty_Internal_Templateparser } } - public static $yyRuleInfo = array(array(0 => 62, 1 => 1), array(0 => 63, 1 => 1), array(0 => 63, 1 => 2), - array(0 => 63, 1 => 0), array(0 => 64, 1 => 1), array(0 => 64, 1 => 1), - array(0 => 64, 1 => 1), array(0 => 64, 1 => 1), array(0 => 64, 1 => 1), - array(0 => 67, 1 => 1), array(0 => 67, 1 => 2), array(0 => 64, 1 => 1), - array(0 => 64, 1 => 1), array(0 => 64, 1 => 1), array(0 => 66, 1 => 2), - array(0 => 66, 1 => 3), array(0 => 68, 1 => 2), array(0 => 68, 1 => 0), - array(0 => 69, 1 => 1), array(0 => 69, 1 => 1), array(0 => 65, 1 => 2), - array(0 => 65, 1 => 1), array(0 => 70, 1 => 2), array(0 => 70, 1 => 3), - array(0 => 70, 1 => 2), array(0 => 70, 1 => 3), array(0 => 70, 1 => 2), - array(0 => 70, 1 => 3), array(0 => 70, 1 => 4), array(0 => 70, 1 => 4), - array(0 => 70, 1 => 5), array(0 => 70, 1 => 5), array(0 => 65, 1 => 1), - array(0 => 70, 1 => 3), array(0 => 70, 1 => 2), array(0 => 70, 1 => 4), - array(0 => 70, 1 => 5), array(0 => 70, 1 => 6), array(0 => 70, 1 => 2), - array(0 => 70, 1 => 3), array(0 => 70, 1 => 2), array(0 => 70, 1 => 3), - array(0 => 70, 1 => 8), array(0 => 79, 1 => 2), array(0 => 79, 1 => 1), - array(0 => 70, 1 => 5), array(0 => 70, 1 => 7), array(0 => 70, 1 => 2), - array(0 => 70, 1 => 6), array(0 => 70, 1 => 8), array(0 => 70, 1 => 6), - array(0 => 70, 1 => 8), array(0 => 70, 1 => 3), array(0 => 70, 1 => 4), - array(0 => 70, 1 => 2), array(0 => 65, 1 => 1), array(0 => 70, 1 => 2), - array(0 => 70, 1 => 3), array(0 => 70, 1 => 4), array(0 => 70, 1 => 5), - array(0 => 72, 1 => 2), array(0 => 72, 1 => 1), array(0 => 72, 1 => 0), - array(0 => 82, 1 => 4), array(0 => 82, 1 => 2), array(0 => 82, 1 => 2), - array(0 => 82, 1 => 2), array(0 => 82, 1 => 2), array(0 => 82, 1 => 2), - array(0 => 82, 1 => 4), array(0 => 78, 1 => 1), array(0 => 78, 1 => 3), - array(0 => 77, 1 => 3), array(0 => 77, 1 => 3), array(0 => 77, 1 => 3), - array(0 => 77, 1 => 3), array(0 => 74, 1 => 1), array(0 => 74, 1 => 1), - array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), - array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), array(0 => 74, 1 => 3), - array(0 => 74, 1 => 2), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), - array(0 => 74, 1 => 3), array(0 => 83, 1 => 7), array(0 => 83, 1 => 7), - array(0 => 73, 1 => 1), array(0 => 73, 1 => 2), array(0 => 73, 1 => 2), + public static $yyRuleInfo = array(array(0 => 61, 1 => 1), array(0 => 62, 1 => 1), array(0 => 62, 1 => 2), + array(0 => 62, 1 => 0), array(0 => 63, 1 => 1), array(0 => 63, 1 => 1), + array(0 => 63, 1 => 1), array(0 => 63, 1 => 1), array(0 => 63, 1 => 1), + array(0 => 66, 1 => 1), array(0 => 66, 1 => 2), array(0 => 63, 1 => 1), + array(0 => 63, 1 => 1), array(0 => 65, 1 => 2), array(0 => 65, 1 => 3), + array(0 => 67, 1 => 2), array(0 => 67, 1 => 0), array(0 => 68, 1 => 1), + array(0 => 68, 1 => 1), array(0 => 64, 1 => 2), array(0 => 64, 1 => 1), + array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 3), + array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 3), + array(0 => 69, 1 => 4), array(0 => 69, 1 => 3), array(0 => 69, 1 => 4), + array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 69, 1 => 5), + array(0 => 64, 1 => 1), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2), + array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 69, 1 => 6), + array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2), + array(0 => 69, 1 => 3), array(0 => 69, 1 => 8), array(0 => 78, 1 => 2), + array(0 => 78, 1 => 1), array(0 => 69, 1 => 5), array(0 => 69, 1 => 7), + array(0 => 69, 1 => 2), array(0 => 69, 1 => 6), array(0 => 69, 1 => 8), + array(0 => 69, 1 => 6), array(0 => 69, 1 => 8), array(0 => 69, 1 => 3), + array(0 => 69, 1 => 4), array(0 => 69, 1 => 2), array(0 => 64, 1 => 1), + array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 4), + array(0 => 69, 1 => 5), array(0 => 72, 1 => 2), array(0 => 72, 1 => 1), + array(0 => 72, 1 => 0), array(0 => 81, 1 => 4), array(0 => 81, 1 => 2), + array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), + array(0 => 81, 1 => 2), array(0 => 81, 1 => 4), array(0 => 77, 1 => 1), + array(0 => 77, 1 => 3), array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), + array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), array(0 => 74, 1 => 1), + array(0 => 74, 1 => 1), array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), + array(0 => 74, 1 => 3), array(0 => 74, 1 => 1), array(0 => 74, 1 => 2), + array(0 => 74, 1 => 3), array(0 => 74, 1 => 2), array(0 => 74, 1 => 3), + array(0 => 74, 1 => 3), array(0 => 74, 1 => 3), array(0 => 82, 1 => 7), + array(0 => 82, 1 => 7), array(0 => 73, 1 => 1), array(0 => 73, 1 => 2), + array(0 => 73, 1 => 2), array(0 => 73, 1 => 2), array(0 => 73, 1 => 2), + array(0 => 73, 1 => 1), array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), array(0 => 73, 1 => 2), array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), - array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), array(0 => 73, 1 => 2), - array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 1), - array(0 => 73, 1 => 3), array(0 => 73, 1 => 1), array(0 => 73, 1 => 1), - array(0 => 73, 1 => 3), array(0 => 73, 1 => 1), array(0 => 73, 1 => 2), - array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), array(0 => 87, 1 => 1), - array(0 => 87, 1 => 1), array(0 => 71, 1 => 1), array(0 => 71, 1 => 1), - array(0 => 71, 1 => 3), array(0 => 71, 1 => 1), array(0 => 71, 1 => 3), - array(0 => 71, 1 => 4), array(0 => 71, 1 => 3), array(0 => 71, 1 => 4), - array(0 => 75, 1 => 2), array(0 => 75, 1 => 2), array(0 => 92, 1 => 2), - array(0 => 92, 1 => 0), array(0 => 93, 1 => 2), array(0 => 93, 1 => 2), - array(0 => 93, 1 => 4), array(0 => 93, 1 => 2), array(0 => 93, 1 => 2), - array(0 => 93, 1 => 4), array(0 => 93, 1 => 3), array(0 => 93, 1 => 5), - array(0 => 93, 1 => 3), array(0 => 93, 1 => 3), array(0 => 93, 1 => 3), - array(0 => 93, 1 => 3), array(0 => 93, 1 => 3), array(0 => 93, 1 => 3), - array(0 => 93, 1 => 2), array(0 => 80, 1 => 1), array(0 => 80, 1 => 1), - array(0 => 80, 1 => 2), array(0 => 94, 1 => 1), array(0 => 94, 1 => 3), - array(0 => 91, 1 => 2), array(0 => 95, 1 => 1), array(0 => 95, 1 => 2), - array(0 => 96, 1 => 3), array(0 => 96, 1 => 3), array(0 => 96, 1 => 5), - array(0 => 96, 1 => 6), array(0 => 96, 1 => 2), array(0 => 88, 1 => 4), - array(0 => 97, 1 => 4), array(0 => 97, 1 => 4), array(0 => 98, 1 => 3), - array(0 => 98, 1 => 1), array(0 => 98, 1 => 0), array(0 => 76, 1 => 3), - array(0 => 76, 1 => 2), array(0 => 99, 1 => 3), array(0 => 99, 1 => 2), - array(0 => 81, 1 => 2), array(0 => 81, 1 => 0), array(0 => 100, 1 => 2), - array(0 => 100, 1 => 2), array(0 => 90, 1 => 1), array(0 => 90, 1 => 2), - array(0 => 90, 1 => 1), array(0 => 90, 1 => 2), array(0 => 90, 1 => 3), - array(0 => 85, 1 => 1), array(0 => 85, 1 => 1), array(0 => 86, 1 => 1), - array(0 => 84, 1 => 3), array(0 => 101, 1 => 1), array(0 => 101, 1 => 3), - array(0 => 101, 1 => 0), array(0 => 102, 1 => 3), array(0 => 102, 1 => 3), - array(0 => 102, 1 => 1), array(0 => 89, 1 => 2), array(0 => 89, 1 => 3), - array(0 => 103, 1 => 2), array(0 => 103, 1 => 1), array(0 => 104, 1 => 3), - array(0 => 104, 1 => 3), array(0 => 104, 1 => 1), array(0 => 104, 1 => 3), - array(0 => 104, 1 => 3), array(0 => 104, 1 => 1), array(0 => 104, 1 => 1),); + array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), array(0 => 73, 1 => 1), + array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), array(0 => 73, 1 => 1), + array(0 => 73, 1 => 2), array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), + array(0 => 86, 1 => 1), array(0 => 86, 1 => 1), array(0 => 70, 1 => 1), + array(0 => 70, 1 => 1), array(0 => 70, 1 => 3), array(0 => 70, 1 => 1), + array(0 => 70, 1 => 3), array(0 => 70, 1 => 4), array(0 => 70, 1 => 3), + array(0 => 70, 1 => 4), array(0 => 75, 1 => 2), array(0 => 75, 1 => 2), + array(0 => 91, 1 => 2), array(0 => 91, 1 => 0), array(0 => 92, 1 => 2), + array(0 => 92, 1 => 2), array(0 => 92, 1 => 4), array(0 => 92, 1 => 2), + array(0 => 92, 1 => 2), array(0 => 92, 1 => 4), array(0 => 92, 1 => 3), + array(0 => 92, 1 => 5), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), + array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), + array(0 => 92, 1 => 3), array(0 => 92, 1 => 2), array(0 => 79, 1 => 1), + array(0 => 79, 1 => 1), array(0 => 79, 1 => 2), array(0 => 93, 1 => 1), + array(0 => 93, 1 => 1), array(0 => 93, 1 => 3), array(0 => 90, 1 => 2), + array(0 => 94, 1 => 1), array(0 => 94, 1 => 2), array(0 => 95, 1 => 3), + array(0 => 95, 1 => 3), array(0 => 95, 1 => 5), array(0 => 95, 1 => 6), + array(0 => 95, 1 => 2), array(0 => 87, 1 => 4), array(0 => 96, 1 => 4), + array(0 => 96, 1 => 4), array(0 => 97, 1 => 3), array(0 => 97, 1 => 1), + array(0 => 97, 1 => 0), array(0 => 71, 1 => 3), array(0 => 71, 1 => 2), + array(0 => 98, 1 => 3), array(0 => 98, 1 => 2), array(0 => 80, 1 => 2), + array(0 => 80, 1 => 0), array(0 => 99, 1 => 2), array(0 => 99, 1 => 2), + array(0 => 89, 1 => 1), array(0 => 89, 1 => 2), array(0 => 89, 1 => 1), + array(0 => 89, 1 => 2), array(0 => 89, 1 => 3), array(0 => 84, 1 => 1), + array(0 => 84, 1 => 1), array(0 => 85, 1 => 1), array(0 => 83, 1 => 3), + array(0 => 100, 1 => 1), array(0 => 100, 1 => 3), array(0 => 100, 1 => 0), + array(0 => 101, 1 => 3), array(0 => 101, 1 => 3), array(0 => 101, 1 => 1), + array(0 => 88, 1 => 2), array(0 => 88, 1 => 3), array(0 => 102, 1 => 2), + array(0 => 102, 1 => 1), array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), + array(0 => 103, 1 => 1), array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), + array(0 => 103, 1 => 1), array(0 => 103, 1 => 1),); public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, - 18 => 9, 19 => 9, 44 => 9, 67 => 9, 68 => 9, 76 => 9, 77 => 9, 81 => 9, 90 => 9, - 95 => 9, 96 => 9, 101 => 9, 103 => 9, 104 => 9, 108 => 9, 110 => 9, 111 => 9, - 115 => 9, 175 => 9, 180 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, - 17 => 14, 15 => 15, 75 => 15, 16 => 16, 91 => 16, 93 => 16, 94 => 16, 122 => 16, - 20 => 20, 21 => 21, 22 => 22, 24 => 22, 26 => 22, 23 => 23, 25 => 23, 27 => 23, - 28 => 28, 29 => 28, 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, - 36 => 36, 37 => 37, 38 => 38, 39 => 39, 41 => 39, 40 => 40, 42 => 42, 43 => 43, - 45 => 45, 46 => 46, 47 => 47, 48 => 48, 50 => 48, 49 => 49, 51 => 49, 52 => 52, + 17 => 9, 18 => 9, 45 => 9, 68 => 9, 69 => 9, 77 => 9, 78 => 9, 82 => 9, 91 => 9, + 96 => 9, 97 => 9, 102 => 9, 104 => 9, 105 => 9, 109 => 9, 111 => 9, 112 => 9, + 116 => 9, 177 => 9, 182 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, + 14 => 14, 76 => 14, 15 => 15, 92 => 15, 94 => 15, 95 => 15, 123 => 15, 19 => 19, + 20 => 20, 21 => 21, 24 => 21, 22 => 22, 25 => 22, 23 => 23, 26 => 23, 28 => 23, + 27 => 27, 29 => 29, 30 => 29, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, + 36 => 36, 37 => 37, 38 => 38, 39 => 39, 40 => 40, 42 => 40, 41 => 41, 43 => 43, + 44 => 44, 46 => 46, 47 => 47, 48 => 48, 49 => 49, 51 => 49, 50 => 50, 52 => 50, 53 => 53, 54 => 54, 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, - 61 => 61, 70 => 61, 156 => 61, 160 => 61, 164 => 61, 165 => 61, 62 => 62, - 157 => 62, 163 => 62, 63 => 63, 64 => 64, 65 => 64, 66 => 66, 142 => 66, - 69 => 69, 71 => 71, 72 => 72, 73 => 72, 74 => 74, 78 => 78, 79 => 79, 80 => 79, - 82 => 82, 107 => 82, 83 => 83, 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, - 89 => 89, 92 => 92, 97 => 97, 98 => 98, 99 => 99, 100 => 100, 102 => 102, - 105 => 105, 106 => 106, 109 => 109, 112 => 112, 113 => 113, 114 => 114, - 116 => 116, 117 => 117, 118 => 118, 119 => 119, 120 => 120, 121 => 121, - 123 => 123, 177 => 123, 124 => 124, 125 => 125, 126 => 126, 127 => 127, - 128 => 128, 129 => 129, 137 => 129, 130 => 130, 131 => 131, 132 => 132, - 133 => 132, 135 => 132, 136 => 132, 134 => 134, 138 => 138, 139 => 139, - 140 => 140, 181 => 140, 141 => 141, 143 => 143, 144 => 144, 145 => 145, + 61 => 61, 62 => 62, 71 => 62, 158 => 62, 162 => 62, 166 => 62, 167 => 62, + 63 => 63, 159 => 63, 165 => 63, 64 => 64, 65 => 65, 66 => 65, 67 => 67, + 143 => 67, 70 => 70, 72 => 72, 73 => 73, 74 => 73, 75 => 75, 79 => 79, 80 => 80, + 81 => 80, 83 => 83, 108 => 83, 84 => 84, 85 => 85, 86 => 86, 87 => 87, 88 => 88, + 89 => 89, 90 => 90, 93 => 93, 98 => 98, 99 => 99, 100 => 100, 101 => 101, + 103 => 103, 106 => 106, 107 => 107, 110 => 110, 113 => 113, 114 => 114, + 115 => 115, 117 => 117, 118 => 118, 119 => 119, 120 => 120, 121 => 121, + 122 => 122, 124 => 124, 179 => 124, 125 => 125, 126 => 126, 127 => 127, + 128 => 128, 129 => 129, 130 => 130, 138 => 130, 131 => 131, 132 => 132, + 133 => 133, 134 => 133, 136 => 133, 137 => 133, 135 => 135, 139 => 139, + 140 => 140, 141 => 141, 183 => 141, 142 => 142, 144 => 144, 145 => 145, 146 => 146, 147 => 147, 148 => 148, 149 => 149, 150 => 150, 151 => 151, - 152 => 152, 153 => 153, 154 => 154, 155 => 155, 158 => 158, 159 => 159, - 161 => 161, 162 => 162, 166 => 166, 167 => 167, 168 => 168, 169 => 169, - 170 => 170, 171 => 171, 172 => 172, 173 => 173, 174 => 174, 176 => 176, - 178 => 178, 179 => 179, 182 => 182, 183 => 183, 184 => 184, 185 => 185, - 186 => 185, 188 => 185, 187 => 187, 189 => 189, 190 => 190, 191 => 191,); + 152 => 152, 153 => 153, 154 => 154, 155 => 155, 156 => 156, 157 => 157, + 160 => 160, 161 => 161, 163 => 163, 164 => 164, 168 => 168, 169 => 169, + 170 => 170, 171 => 171, 172 => 172, 173 => 173, 174 => 174, 175 => 175, + 176 => 176, 178 => 178, 180 => 180, 181 => 181, 184 => 184, 185 => 185, + 186 => 186, 187 => 187, 188 => 187, 190 => 187, 189 => 189, 191 => 191, + 192 => 192, 193 => 193,); - #line 201 "../smarty/lexer/smarty_internal_templateparser.y" + #line 198 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r0() { + $this->compiler->processInheritance($this); $this->_retvalue = $this->root_buffer->to_smarty_php($this); } - #line 209 "../smarty/lexer/smarty_internal_templateparser.y" + #line 207 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r1() { if ($this->yystack[$this->yyidx + 0]->minor != null) { @@ -1402,7 +1433,7 @@ class Smarty_Internal_Templateparser } } - #line 216 "../smarty/lexer/smarty_internal_templateparser.y" + #line 214 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r2() { if ($this->yystack[$this->yyidx + 0]->minor != null) { @@ -1411,7 +1442,7 @@ class Smarty_Internal_Templateparser } } - #line 230 "../smarty/lexer/smarty_internal_templateparser.y" + #line 228 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r4() { if ($this->compiler->has_code) { @@ -1423,13 +1454,13 @@ class Smarty_Internal_Templateparser $this->block_nesting_level = count($this->compiler->_tag_stack); } - #line 241 "../smarty/lexer/smarty_internal_templateparser.y" + #line 239 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r5() { $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[$this->yyidx + 0]->minor); } - #line 245 "../smarty/lexer/smarty_internal_templateparser.y" + #line 243 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r6() { $code = $this->compiler->compileTag('private_php', array(array('code' => $this->yystack[$this->yyidx + @@ -1447,7 +1478,7 @@ class Smarty_Internal_Templateparser } } - #line 256 "../smarty/lexer/smarty_internal_templateparser.y" + #line 254 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r7() { $this->compiler->tag_nocache = true; @@ -1456,73 +1487,62 @@ class Smarty_Internal_Templateparser $this->template->compiled->has_nocache_code = $save; } - #line 263 "../smarty/lexer/smarty_internal_templateparser.y" + #line 261 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r8() { $this->_retvalue = $this->compiler->processText($this->yystack[$this->yyidx + 0]->minor); } - #line 267 "../smarty/lexer/smarty_internal_templateparser.y" + #line 265 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r9() { $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } - #line 271 "../smarty/lexer/smarty_internal_templateparser.y" + #line 269 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r10() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; } - #line 276 "../smarty/lexer/smarty_internal_templateparser.y" + #line 274 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r11() { $this->strip = true; } - #line 280 "../smarty/lexer/smarty_internal_templateparser.y" + #line 278 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r12() { $this->strip = false; } - #line 284 "../smarty/lexer/smarty_internal_templateparser.y" + #line 283 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r13() - { - if ($this->strip) { - SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + - 0]->minor)); - } else { - SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler, $this->yystack[$this->yyidx + 0]->minor); - } - } - - #line 293 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r14() { $this->_retvalue = ''; } - #line 297 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r15() + #line 287 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r14() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; } - #line 301 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r16() + #line 291 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r15() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; } - #line 317 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r20() + #line 307 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r19() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; } - #line 323 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r21() + #line 313 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r20() { $var = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), ' $'); @@ -1537,37 +1557,53 @@ class Smarty_Internal_Templateparser } } - #line 333 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r22() + #line 323 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r21() { $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), array('value' => $this->yystack[$this->yyidx + 0]->minor)); } - #line 337 "../smarty/lexer/smarty_internal_templateparser.y" + #line 327 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r22() + { + $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)); + } + + #line 331 "../smarty/lexer/smarty_internal_templateparser.y" function yy_r23() { $this->_retvalue = $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array('value' => $this->yystack[$this->yyidx + - 1]->minor)); } - #line 360 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r28() + #line 345 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r27() + { + $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)); + } + + #line 358 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r29() { $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[$this->yyidx + 0]->minor), array('var' => '\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\''))); } - #line 368 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r30() + #line 366 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r31() { $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => '\'' . substr($this->yystack[$this->yyidx + - 3]->minor, 1) . '\'')), $this->yystack[$this->yyidx + 0]->minor)); } - #line 372 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r31() + #line 370 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r32() { $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => $this->yystack[$this->yyidx + - 3]->minor['var'])), $this->yystack[$this->yyidx + @@ -1575,8 +1611,8 @@ class Smarty_Internal_Templateparser - 3]->minor['smarty_internal_index'])); } - #line 377 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r32() + #line 375 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r33() { $tag = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length)); @@ -1599,8 +1635,8 @@ class Smarty_Internal_Templateparser } } - #line 399 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r33() + #line 397 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r34() { if (defined($this->yystack[$this->yyidx + - 1]->minor)) { if ($this->security) { @@ -1614,8 +1650,8 @@ class Smarty_Internal_Templateparser } } - #line 409 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r34() + #line 407 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r35() { if (defined($this->yystack[$this->yyidx + 0]->minor)) { if ($this->security) { @@ -1628,8 +1664,8 @@ class Smarty_Internal_Templateparser } } - #line 422 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r35() + #line 420 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r36() { if (defined($this->yystack[$this->yyidx + - 2]->minor)) { if ($this->security) { @@ -1649,16 +1685,16 @@ class Smarty_Internal_Templateparser } } - #line 435 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r36() + #line 433 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r37() { $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)); } - #line 440 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r37() + #line 438 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r38() { $this->_retvalue = '' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor, $this->yystack[$this->yyidx + @@ -1669,16 +1705,16 @@ class Smarty_Internal_Templateparser ';?>'; } - #line 446 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r38() + #line 444 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r39() { $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), array('if condition' => $this->yystack[$this->yyidx + 0]->minor)); } - #line 451 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r39() + #line 449 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r40() { $tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor, $this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == @@ -1686,16 +1722,16 @@ class Smarty_Internal_Templateparser 0]->minor, array('if condition' => $this->yystack[$this->yyidx + - 1]->minor)); } - #line 456 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r40() + #line 454 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r41() { $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), array('if condition' => $this->yystack[$this->yyidx + 0]->minor)); } - #line 467 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r42() + #line 465 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r43() { $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' => $this->yystack[$this->yyidx + - 6]->minor), @@ -1704,22 +1740,22 @@ class Smarty_Internal_Templateparser array('step' => $this->yystack[$this->yyidx + - 1]->minor))), 1); } - #line 471 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r43() + #line 469 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r44() { $this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor; } - #line 479 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r45() + #line 477 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r46() { $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); } - #line 483 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r46() + #line 481 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r47() { $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' => $this->yystack[$this->yyidx + - 5]->minor), @@ -1727,22 +1763,22 @@ class Smarty_Internal_Templateparser array('step' => $this->yystack[$this->yyidx + - 1]->minor))), 0); } - #line 488 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r47() + #line 486 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r48() { $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[$this->yyidx + 0]->minor); } - #line 493 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r48() + #line 491 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r49() { $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)))); } - #line 497 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r49() + #line 495 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r50() { $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' => $this->yystack[$this->yyidx + - 5]->minor), @@ -1750,22 +1786,22 @@ class Smarty_Internal_Templateparser array('key' => $this->yystack[$this->yyidx + - 3]->minor)))); } - #line 510 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r52() + #line 508 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r53() { $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)))); } - #line 514 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r53() + #line 512 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r54() { $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))); } - #line 519 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r54() + #line 517 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r55() { $j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.'); if ($this->yystack[$this->yyidx + 0]->minor[$j + 1] == 'c') { @@ -1777,8 +1813,8 @@ class Smarty_Internal_Templateparser } } - #line 532 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r55() + #line 530 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r56() { $tag = trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), ' /'); @@ -1790,30 +1826,30 @@ class Smarty_Internal_Templateparser } } - #line 541 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r56() + #line 539 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r57() { $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor . 'close', array()); } - #line 545 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r57() + #line 543 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r58() { $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor . 'close', array(), array('modifier_list' => $this->yystack[$this->yyidx + 0]->minor)); } - #line 550 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r58() + #line 548 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r59() { $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor . 'close', array(), array('object_method' => $this->yystack[$this->yyidx + 0]->minor)); } - #line 554 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r59() + #line 552 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r60() { $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor . 'close', array(), array('object_method' => $this->yystack[$this->yyidx + @@ -1822,27 +1858,27 @@ class Smarty_Internal_Templateparser 0]->minor)); } - #line 562 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r60() + #line 560 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r61() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; } - #line 568 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r61() + #line 566 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r62() { $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } - #line 573 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r62() + #line 571 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r63() { $this->_retvalue = array(); } - #line 578 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r63() + #line 576 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r64() { if (defined($this->yystack[$this->yyidx + 0]->minor)) { if ($this->security) { @@ -1856,62 +1892,62 @@ class Smarty_Internal_Templateparser } } - #line 589 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r64() + #line 587 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r65() { $this->_retvalue = array(trim($this->yystack[$this->yyidx + - 1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx + 0]->minor); } - #line 597 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r66() + #line 595 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r67() { $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\''; } - #line 609 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r69() + #line 607 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r70() { $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor); } - #line 622 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r71() + #line 620 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r72() { $this->yystack[$this->yyidx + - 2]->minor[] = $this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor; } - #line 627 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r72() + #line 625 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r73() { $this->_retvalue = array('var' => '\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'', 'value' => $this->yystack[$this->yyidx + 0]->minor); } - #line 634 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r74() + #line 632 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r75() { $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 2]->minor, 'value' => $this->yystack[$this->yyidx + 0]->minor); } - #line 658 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r78() + #line 656 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r79() { $this->_retvalue = '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '://' . $this->yystack[$this->yyidx + 0]->minor . '\')'; } - #line 663 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r79() + #line 661 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r80() { $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . trim($this->yystack[$this->yyidx + - 1]->minor) . $this->yystack[$this->yyidx + 0]->minor; } - #line 677 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r82() + #line 675 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r83() { $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), array('value' => $this->yystack[$this->yyidx + - 1]->minor, @@ -1919,8 +1955,8 @@ class Smarty_Internal_Templateparser 0]->minor)); } - #line 683 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r83() + #line 681 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r84() { $this->_retvalue = (isset($this->yystack[$this->yyidx + - 1]->minor['pre']) ? $this->yystack[$this->yyidx + - 1]->minor['pre'] : '') . $this->yystack[$this->yyidx + - 2]->minor . @@ -1928,74 +1964,74 @@ class Smarty_Internal_Templateparser (isset($this->yystack[$this->yyidx + - 1]->minor['pre']) ? ')' : ''); } - #line 686 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r84() + #line 684 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r85() { $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor . $this->yystack[$this->yyidx + - 1]->minor . ')'; } - #line 690 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r85() + #line 688 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r86() { $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor . ')'; } - #line 694 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r86() + #line 692 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r87() { $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',(array)' . $this->yystack[$this->yyidx + 0]->minor . ')'; } - #line 698 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r87() + #line 696 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r88() { $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; } - #line 706 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r88() + #line 704 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r89() { $this->_retvalue = $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'') . ' : ' . $this->yystack[$this->yyidx + 0]->minor; } - #line 710 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r89() + #line 708 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r90() { $this->_retvalue = $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' . $this->yystack[$this->yyidx + 0]->minor; } - #line 725 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r92() + #line 723 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r93() { $this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor; } - #line 746 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r97() + #line 744 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r98() { $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor; } - #line 750 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r98() + #line 748 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r99() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.'; } - #line 754 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r99() + #line 752 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r100() { $this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor; } - #line 759 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r100() + #line 757 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r101() { if (defined($this->yystack[$this->yyidx + 0]->minor)) { if ($this->security) { @@ -2007,14 +2043,14 @@ class Smarty_Internal_Templateparser } } - #line 776 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r102() + #line 774 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r103() { $this->_retvalue = "(" . $this->yystack[$this->yyidx + - 1]->minor . ")"; } - #line 791 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r105() + #line 789 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r106() { self::$prefix_number ++; if ($this->yystack[$this->yyidx + - 2]->minor['var'] == '\'smarty\'') { @@ -2030,8 +2066,8 @@ class Smarty_Internal_Templateparser $this->yystack[$this->yyidx + 0]->minor[1]; } - #line 802 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r106() + #line 800 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r107() { self::$prefix_number ++; $tmp = $this->compiler->appendCode('', $this->yystack[$this->yyidx + 0]->minor); @@ -2040,8 +2076,8 @@ class Smarty_Internal_Templateparser $this->_retvalue = '$_tmp' . self::$prefix_number; } - #line 819 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r109() + #line 817 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r110() { if (!in_array(strtolower($this->yystack[$this->yyidx + - 2]->minor), array('self', 'parent')) && (!$this->security || $this->security->isTrustedStaticClassAccess($this->yystack[$this->yyidx + @@ -2060,15 +2096,15 @@ class Smarty_Internal_Templateparser } } - #line 853 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r112() + #line 851 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r113() { $this->_retvalue = $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\''); } - #line 856 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r113() + #line 854 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r114() { if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') { $smarty_var = $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + @@ -2083,83 +2119,83 @@ class Smarty_Internal_Templateparser } } - #line 869 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r114() + #line 867 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r115() { $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[$this->yyidx + - 2]->minor . ']->' . $this->yystack[$this->yyidx + 0]->minor; } - #line 879 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r116() + #line 877 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r117() { $this->_retvalue = '$_smarty_tpl->_getConfigVariable( \'' . $this->yystack[$this->yyidx + - 1]->minor . '\')'; } - #line 883 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r117() + #line 881 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r118() { $this->_retvalue = '(is_array($tmp = $_smarty_tpl->_getConfigVariable( \'' . $this->yystack[$this->yyidx + - 2]->minor . '\')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' :null)'; } - #line 887 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r118() + #line 885 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r119() { $this->_retvalue = '$_smarty_tpl->_getConfigVariable( ' . $this->yystack[$this->yyidx + - 1]->minor . ')'; } - #line 891 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r119() + #line 889 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r120() { $this->_retvalue = '(is_array($tmp = $_smarty_tpl->_getConfigVariable( ' . $this->yystack[$this->yyidx + - 2]->minor . ')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' : null)'; } - #line 895 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r120() + #line 893 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r121() { $this->_retvalue = array('var' => '\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'', 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor); } - #line 898 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r121() + #line 896 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r122() { $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 1]->minor, 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor); } - #line 911 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r123() + #line 909 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r124() { return; } - #line 917 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r124() + #line 915 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r125() { $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'') . ']'; } - #line 920 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r125() + #line 918 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r126() { $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']'; } - #line 924 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r126() + #line 922 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r127() { $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' . $this->yystack[$this->yyidx + 0]->minor . ']'; } - #line 928 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r127() + #line 926 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r128() { if (defined($this->yystack[$this->yyidx + 0]->minor)) { if ($this->security) { @@ -2171,20 +2207,20 @@ class Smarty_Internal_Templateparser } } - #line 939 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r128() + #line 937 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r129() { $this->_retvalue = '[' . $this->yystack[$this->yyidx + 0]->minor . ']'; } - #line 943 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r129() + #line 942 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r130() { $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']'; } - #line 948 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r130() + #line 947 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r131() { $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + @@ -2192,8 +2228,8 @@ class Smarty_Internal_Templateparser ']'; } - #line 952 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r131() + #line 951 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r132() { $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + @@ -2202,51 +2238,59 @@ class Smarty_Internal_Templateparser - 1]->minor . '\']') . ']'; } - #line 955 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r132() + #line 954 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r133() { $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']'; } - #line 961 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r134() + #line 960 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r135() { $this->_retvalue = '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'') . ']';; } - #line 977 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r138() + #line 976 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r139() { $this->_retvalue = '[]'; } - #line 987 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r139() + #line 986 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r140() { $this->_retvalue = '\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\''; } - #line 991 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r140() + #line 990 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r141() { $this->_retvalue = "''"; } - #line 996 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r141() + #line 995 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r142() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor; } - #line 1006 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r143() + #line 1003 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r144() + { + $var = trim(substr($this->yystack[$this->yyidx + + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), ' $'); + $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\''); + } + + #line 1009 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r145() { $this->_retvalue = '(' . $this->yystack[$this->yyidx + - 1]->minor . ')'; } - #line 1013 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r144() + #line 1016 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r146() { if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + @@ -2258,20 +2302,20 @@ class Smarty_Internal_Templateparser } } - #line 1022 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r145() + #line 1025 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r147() { $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } - #line 1027 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r146() + #line 1030 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r148() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; } - #line 1032 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r147() + #line 1035 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r149() { if ($this->security && substr($this->yystack[$this->yyidx + - 1]->minor, 0, 1) == '_') { $this->compiler->trigger_template_error(self::Err1); @@ -2279,8 +2323,8 @@ class Smarty_Internal_Templateparser $this->_retvalue = '->' . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor; } - #line 1039 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r148() + #line 1042 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r150() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -2289,8 +2333,8 @@ class Smarty_Internal_Templateparser $this->yystack[$this->yyidx + 0]->minor . '}'; } - #line 1046 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r149() + #line 1049 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r151() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -2299,8 +2343,8 @@ class Smarty_Internal_Templateparser '}'; } - #line 1053 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r150() + #line 1056 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r152() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -2309,14 +2353,14 @@ class Smarty_Internal_Templateparser $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}'; } - #line 1061 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r151() + #line 1064 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r153() { $this->_retvalue = '->' . $this->yystack[$this->yyidx + 0]->minor; } - #line 1069 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r152() + #line 1072 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r154() { if (!$this->security || $this->security->isTrustedPhpFunction($this->yystack[$this->yyidx + - 3]->minor, $this->compiler) @@ -2365,8 +2409,8 @@ class Smarty_Internal_Templateparser } } - #line 1108 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r153() + #line 1111 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r155() { if ($this->security && substr($this->yystack[$this->yyidx + - 3]->minor, 0, 1) == '_') { $this->compiler->trigger_template_error(self::Err1); @@ -2375,8 +2419,8 @@ class Smarty_Internal_Templateparser implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")"; } - #line 1115 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r154() + #line 1118 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r156() { if ($this->security) { $this->compiler->trigger_template_error(self::Err2); @@ -2389,83 +2433,83 @@ class Smarty_Internal_Templateparser implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ')'; } - #line 1126 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r155() + #line 1129 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r157() { $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 2]->minor, array($this->yystack[$this->yyidx + 0]->minor)); } - #line 1143 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r158() + #line 1146 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r160() { $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))); } - #line 1147 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r159() + #line 1150 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r161() { $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor)); } - #line 1155 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r161() + #line 1158 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r163() { $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } - #line 1163 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r162() + #line 1166 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r164() { $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor); } - #line 1182 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r166() + #line 1185 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r168() { $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '', 'method'); } - #line 1187 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r167() + #line 1190 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r169() { $this->_retvalue = array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'method'); } - #line 1192 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r168() + #line 1195 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r170() { $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, ''); } - #line 1197 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r169() + #line 1200 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r171() { $this->_retvalue = array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'property'); } - #line 1202 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r170() + #line 1205 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r172() { $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor, $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor, 'property'); } - #line 1208 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r171() + #line 1211 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r173() { $this->_retvalue['op'] = ' ' . trim($this->yystack[$this->yyidx + 0]->minor) . ' '; } - #line 1212 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r172() + #line 1215 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r174() { static $lops = array('eq' => array('op' => ' == ', 'pre' => null), 'ne' => array('op' => ' != ', 'pre' => null), @@ -2490,8 +2534,8 @@ class Smarty_Internal_Templateparser $this->_retvalue = $lops[$op]; } - #line 1238 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r173() + #line 1241 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r175() { static $scond = array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',); @@ -2499,79 +2543,79 @@ class Smarty_Internal_Templateparser $this->_retvalue = $scond[$op]; } - #line 1252 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r174() + #line 1255 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r176() { $this->_retvalue = 'array(' . $this->yystack[$this->yyidx + - 1]->minor . ')'; } - #line 1260 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r176() + #line 1263 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r178() { $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor; } - #line 1268 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r178() + #line 1271 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r180() { $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '=>' . $this->yystack[$this->yyidx + 0]->minor; } - #line 1272 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r179() + #line 1275 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r181() { $this->_retvalue = '\'' . $this->yystack[$this->yyidx + - 2]->minor . '\'=>' . $this->yystack[$this->yyidx + 0]->minor; } - #line 1288 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r182() + #line 1291 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r184() { $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor->to_smarty_php($this); } - #line 1293 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r183() + #line 1296 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r185() { $this->yystack[$this->yyidx + - 1]->minor->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor; } - #line 1298 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r184() + #line 1301 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r186() { $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[$this->yyidx + 0]->minor); } - #line 1302 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r185() + #line 1305 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r187() { $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[$this->yyidx + - 1]->minor); } - #line 1310 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r187() + #line 1313 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r189() { $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\']->value'); } - #line 1318 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r189() + #line 1321 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r191() { $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[$this->yyidx + - 1]->minor . ')'); } - #line 1322 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r190() + #line 1325 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r192() { $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[$this->yyidx + 0]->minor); } - #line 1326 "../smarty/lexer/smarty_internal_templateparser.y" - function yy_r191() + #line 1329 "../smarty/lexer/smarty_internal_templateparser.y" + function yy_r193() { $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[$this->yyidx + 0]->minor); } @@ -2627,7 +2671,7 @@ class Smarty_Internal_Templateparser public function yy_syntax_error($yymajor, $TOKEN) { - #line 183 "../smarty/lexer/smarty_internal_templateparser.y" + #line 180 "../smarty/lexer/smarty_internal_templateparser.y" $this->internalError = true; $this->yymajor = $yymajor; @@ -2642,7 +2686,7 @@ class Smarty_Internal_Templateparser while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } - #line 176 "../smarty/lexer/smarty_internal_templateparser.y" + #line 173 "../smarty/lexer/smarty_internal_templateparser.y" $this->successful = !$this->internalError; $this->internalError = false; diff --git a/libs/sysplugins/smarty_template_compiled.php b/libs/sysplugins/smarty_template_compiled.php index d2c4af56..d488a190 100644 --- a/libs/sysplugins/smarty_template_compiled.php +++ b/libs/sysplugins/smarty_template_compiled.php @@ -233,6 +233,7 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base public function compileTemplateSource(Smarty_Internal_Template $_template) { $_template->source->compileds = array(); + $_template->isChild = false; $this->file_dependency = array(); $this->tpl_function = array(); $this->includes = array();