<?php
class TP_yyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
public function __construct($s, $m = array())
{
if ($s instanceof TP_yyToken) {
$this->string = $s->string;
$this->metadata = $s->metadata;
} else {
$this->string = (string) $s;
if ($m instanceof TP_yyToken) {
$this->metadata = $m->metadata;
} elseif (is_array($m)) {
$this->metadata = $m;
}
}
}
public function __toString()
{
return $this->string;
}
public function offsetExists($offset)
{
return isset($this->metadata[$offset]);
}
public function offsetGet($offset)
{
return $this->metadata[$offset];
}
public function offsetSet($offset, $value)
{
if ($offset === null) {
if (isset($value[0])) {
$x = ($value instanceof TP_yyToken) ? $value->metadata : $value;
$this->metadata = array_merge($this->metadata, $x);
return;
}
$offset = count($this->metadata);
}
if ($value === null) {
return;
}
if ($value instanceof TP_yyToken) {
if ($value->metadata) {
$this->metadata[$offset] = $value->metadata;
}
} elseif ($value) {
$this->metadata[$offset] = $value;
}
}
public function offsetUnset($offset)
{
unset($this->metadata[$offset]);
}
}
class TP_yyStackEntry
{
public $stateno; /* The state-number */
public $major; /* The major token value. This is the code
** number for the token at this stack level */
public $minor; /* The user-supplied minor token value. This
** is the value of the token */
}
;
#line 13 "../smarty/lexer/smarty_internal_templateparser.y"
/**
* Smarty Internal Plugin Templateparser
*
* This is the template parser.
* It is generated from the smarty_internal_templateparser.y file
*
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews
*/
class Smarty_Internal_Templateparser
{
#line 26 "../smarty/lexer/smarty_internal_templateparser.y"
const Err1 = "Security error: Call to private object member not allowed";
const Err2 = "Security error: Call to dynamic object member not allowed";
const Err3 = "PHP in template not allowed. Use SmartyBC to enable it";
/**
* result status
*
* @var bool
*/
public $successful = true;
/**
* return value
*
* @var mixed
*/
public $retvalue = 0;
/**
* counter for prefix code
*
* @var int
*/
public static $prefix_number = 0;
/**
* @var
*/
public $yymajor;
/**
* last index of array variable
*
* @var mixed
*/
public $last_index;
/**
* last variable name
*
* @var string
*/
public $last_variable;
/**
* root parse tree buffer
*
* @var Smarty_Internal_ParseTree
*/
public $root_buffer;
/**
* current parse tree object
*
* @var Smarty_Internal_ParseTree
*/
public $current_buffer;
/**
* lexer object
*
* @var Smarty_Internal_Templatelexer
*/
private $lex;
/**
* internal error flag
*
* @var bool
*/
private $internalError = false;
/**
* {strip} status
*
* @var bool
*/
public $strip = false;
/**
* compiler object
*
* @var Smarty_Internal_TemplateCompilerBase
*/
public $compiler = null;
/**
* smarty object
*
* @var Smarty
*/
public $smarty = null;
/**
* template object
*
* @var Smarty_Internal_Template
*/
public $template = null;
/**
* block nesting level
*
* @var int
*/
public $block_nesting_level = 0;
/**
* security object
*
* @var Smarty_Security
*/
private $security = null;
/**
* constructor
*
* @param Smarty_Internal_Templatelexer $lex
* @param Smarty_Internal_TemplateCompilerBase $compiler
*/
function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler)
{
$this->lex = $lex;
$this->compiler = $compiler;
$this->template = $this->compiler->template;
$this->smarty = $this->template->smarty;
$this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false;
$this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template($this);
}
/**
* insert PHP code in current buffer
*
* @param string $code
*/
public function insertPhpCode($code)
{
$this->current_buffer->append_subtree(new Smarty_Internal_ParseTree_Tag($this, $code));
}
/**
* merge PHP code with prefix code and return parse tree tag object
*
* @param string $code
*
* @return Smarty_Internal_ParseTree_Tag
*/
public function mergePrefixCode($code)
{
$tmp = '';
foreach ($this->compiler->prefix_code as $preCode) {
$tmp = empty($tmp) ? $preCode : $this->compiler->appendCode($tmp, $preCode);
}
$this->compiler->prefix_code = array();
$tmp = empty($tmp) ? $code : $this->compiler->appendCode($tmp, $code);
return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true));
}
const TP_VERT = 1;
const TP_COLON = 2;
const TP_PHP = 3;
const TP_NOCACHE = 4;
const TP_TEXT = 5;
const TP_STRIPON = 6;
const TP_STRIPOFF = 7;
const TP_BLOCKSOURCE = 8;
const TP_LITERALSTART = 9;
const TP_LITERALEND = 10;
const TP_LITERAL = 11;
const TP_RDEL = 12;
const TP_SIMPLEOUTPUT = 13;
const TP_LDEL = 14;
const TP_DOLLARID = 15;
const TP_EQUAL = 16;
const TP_SIMPLETAG = 17;
const TP_ID = 18;
const TP_PTR = 19;
const TP_LDELIF = 20;
const TP_LDELFOR = 21;
const TP_SEMICOLON = 22;
const TP_INCDEC = 23;
const TP_TO = 24;
const TP_STEP = 25;
const TP_LDELFOREACH = 26;
const TP_SPACE = 27;
const TP_AS = 28;
const TP_APTR = 29;
const TP_LDELSETFILTER = 30;
const TP_SMARTYBLOCKCHILDPARENT = 31;
const TP_CLOSETAG = 32;
const TP_LDELSLASH = 33;
const TP_ATTR = 34;
const TP_INTEGER = 35;
const TP_COMMA = 36;
const TP_OPENP = 37;
const TP_CLOSEP = 38;
const TP_MATH = 39;
const TP_UNIMATH = 40;
const TP_ISIN = 41;
const TP_INSTANCEOF = 42;
const TP_QMARK = 43;
const TP_NOT = 44;
const TP_TYPECAST = 45;
const TP_HEX = 46;
const TP_DOT = 47;
const TP_SINGLEQUOTESTRING = 48;
const TP_DOUBLECOLON = 49;
const TP_NAMESPACE = 50;
const TP_AT = 51;
const TP_HATCH = 52;
const TP_OPENB = 53;
const TP_CLOSEB = 54;
const TP_DOLLAR = 55;
const TP_LOGOP = 56;
const TP_TLOGOP = 57;
const TP_SINGLECOND = 58;
const TP_QUOTE = 59;
const TP_BACKTICK = 60;
const YY_NO_ACTION = 525;
const YY_ACCEPT_ACTION = 524;
const YY_ERROR_ACTION = 523;
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