<?php
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 11 "../smarty/lexer/smarty_internal_templateparser.y"
/**
* Smarty Template Parser Class
*
* This is the template parser.
* It is generated from the smarty_internal_templateparser.y file
*
* @author Uwe Tews <
[email protected]>
*/
class Smarty_Internal_Templateparser
{
// line 23 "../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';
/**
* result status
*
* @var bool
*/
public $successful = true;
/**
* return value
*
* @var mixed
*/
public $retvalue = 0;
/**
* @var
*/
public $yymajor;
/**
* last index of array variable
*
* @var mixed
*/
public $last_index;
/**
* last variable name
*
* @var string
*/
public $last_variable;
/**
* root parse tree buffer
*
* @var Smarty_Internal_ParseTree_Template
*/
public $root_buffer;
/**
* current parse tree object
*
* @var Smarty_Internal_ParseTree
*/
public $current_buffer;
/**
* lexer object
*
* @var Smarty_Internal_Templatelexer
*/
public $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
*/
public $security = null;
/**
* template prefix array
*
* @var \Smarty_Internal_ParseTree[]
*/
public $template_prefix = array();
/**
* template prefix array
*
* @var \Smarty_Internal_ParseTree[]
*/
public $template_postfix = array();
/**
* constructor
*
* @param Smarty_Internal_Templatelexer $lex
* @param Smarty_Internal_TemplateCompilerBase $compiler
*/
public 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();
}
/**
* insert PHP code in current buffer
*
* @param string $code
*/
public function insertPhpCode($code)
{
$this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code));
}
/**
* error rundown
*
*/
public function errorRunDown()
{
while ($this->yystack !== array()) {
$this->yy_pop_parser_stack();
}
if (is_resource($this->yyTraceFILE)) {
fclose($this->yyTraceFILE);
}
}
/**
* 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 .= $preCode;
}
$this->compiler->prefix_code = array();
$tmp .= $code;
return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true));
}
const TP_VERT = 1;
const TP_COLON = 2;
const TP_TEXT = 3;
const TP_STRIPON = 4;
const TP_STRIPOFF = 5;
const TP_LITERALSTART = 6;
const TP_LITERALEND = 7;
const TP_LITERAL = 8;
const TP_SIMPELOUTPUT = 9;
const TP_SIMPLETAG = 10;
const TP_SMARTYBLOCKCHILDPARENT = 11;
const TP_LDEL = 12;
const TP_RDEL = 13;
const TP_DOLLARID = 14;
const TP_EQUAL = 15;
const TP_ID = 16;
const TP_PTR = 17;
const TP_LDELMAKENOCACHE = 18;
const TP_LDELIF = 19;
const TP_LDELFOR = 20;
const TP_SEMICOLON = 21;
const TP_INCDEC = 22;
const TP_TO = 23;
const TP_STEP = 24;
const TP_LDELFOREACH = 25;
const TP_SPACE = 26;
const TP_AS = 27;
const TP_APTR = 28;
const TP_LDELSETFILTER = 29;
const TP_CLOSETAG = 30;
const TP_LDELSLASH = 31;
const TP_ATTR = 32;
const TP_INTEGER = 33;
const TP_COMMA = 34;
const TP_OPENP = 35;
const TP_CLOSEP = 36;
const TP_MATH = 37;
const TP_UNIMATH = 38;
const TP_ISIN = 39;
const TP_QMARK = 40;
const TP_NOT = 41;
const TP_TYPECAST = 42;
const TP_HEX = 43;
const TP_DOT = 44;
const TP_INSTANCEOF = 45;
const TP_SINGLEQUOTESTRING = 46;
const TP_DOUBLECOLON = 47;
const TP_NAMESPACE = 48;
const TP_AT = 49;
const TP_HATCH = 50;
const TP_OPENB = 51;
const TP_CLOSEB = 52;
const TP_DOLLAR = 53;
const TP_LOGOP = 54;
const TP_SLOGOP = 55;
const TP_TLOGOP = 56;
const TP_SINGLECOND = 57;
const TP_ARRAYOPEN = 58;
const TP_QUOTE = 59;
const TP_BACKTICK = 60;
const YY_NO_ACTION = 514;
const YY_ACCEPT_ACTION = 513;
const YY_ERROR_ACTION = 512;
const YY_SZ_ACTTAB = 1997;
public static $yy_action = array(
249, 250, 239, 1, 27, 127, 220, 184, 160, 213,
11, 54, 278, 10, 173, 34, 108, 387, 282, 279,
223, 321, 221, 8, 194, 387, 18, 387, 85, 41,
387, 285, 42, 44, 264, 222, 387, 209, 387, 198,
387, 52, 5, 307, 288, 288, 164, 283, 224, 4,
50, 249, 250, 239, 1, 232, 131, 381, 189, 205,
213, 11, 54, 39, 35, 243, 31, 108, 94, 17,
381, 223, 321, 221, 439, 226, 381, 33,