Files
smarty/libs/sysplugins/internal.templateparser.php

2530 lines
118 KiB
PHP
Raw Normal View History

<?php
/**
* Smarty Internal Plugin Templateparser
*
* This is the template parser.
* It is generated from the internal.templateparser.y file
* @package Smarty
* @subpackage Compiler
* @author Uwe Tews
*/
/**
* This can be used to store both the string representation of
* a token, and any useful meta-data associated with the token.
*
* meta-data should be stored as an array
*/
class TP_yyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
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;
}
}
}
function __toString()
{
return $this->_string;
}
function offsetExists($offset)
{
return isset($this->metadata[$offset]);
}
function offsetGet($offset)
{
return $this->metadata[$offset];
}
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;
}
}
function offsetUnset($offset)
{
unset($this->metadata[$offset]);
}
}
/** The following structure represents a single element of the
* parser's stack. Information stored includes:
*
* + The state number for the parser at this level of the stack.
*
* + The value of the token stored at this level of the stack.
* (In other words, the "major" token.)
*
* + The semantic value stored at this level of the stack. This is
* the information used by the action routines in the grammar.
* It is sometimes called the "minor" token.
*/
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 */
};
// code external to the class is included here
// declare_class is output here
#line 12 "internal.templateparser.y"
class Smarty_Internal_Templateparser#line 109 "internal.templateparser.php"
{
/* First off, code is included which follows the "include_class" declaration
** in the input file. */
#line 14 "internal.templateparser.y"
// states whether the parse was successful or not
public $successful = true;
public $retvalue = 0;
private $lex;
private $internalError = false;
function __construct($lex, $compiler) {
// set instance object
self::instance($this);
$this->lex = $lex;
$this->smarty = Smarty::instance();
$this->compiler = $compiler;
$this->template = $this->compiler->template;
$this->cacher = $this->template->cacher_object;
$this->nocache = false;
$this->prefix_code = array();
$this->prefix_number = 0;
}
public static function &instance($new_instance = null)
{
static $instance = null;
if (isset($new_instance) && is_object($new_instance))
$instance = $new_instance;
return $instance;
}
#line 142 "internal.templateparser.php"
/* Next is all token values, as class constants
*/
/*
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands.
**
** Each symbol here is a terminal symbol in the grammar.
*/
const TP_OTHER = 1;
const TP_LDELSLASH = 2;
const TP_LDEL = 3;
const TP_RDEL = 4;
const TP_PHP = 5;
const TP_SHORTTAGSTART = 6;
const TP_SHORTTAGEND = 7;
const TP_COMMENTEND = 8;
const TP_COMMENTSTART = 9;
const TP_INTEGER = 10;
const TP_MATH = 11;
const TP_UNIMATH = 12;
const TP_INCDEC = 13;
const TP_OPENP = 14;
const TP_CLOSEP = 15;
const TP_OPENB = 16;
const TP_CLOSEB = 17;
const TP_DOLLAR = 18;
const TP_DOT = 19;
const TP_COMMA = 20;
const TP_COLON = 21;
const TP_DOUBLECOLON = 22;
const TP_SEMICOLON = 23;
const TP_VERT = 24;
const TP_EQUAL = 25;
const TP_SPACE = 26;
const TP_PTR = 27;
const TP_APTR = 28;
const TP_ID = 29;
const TP_EQUALS = 30;
const TP_NOTEQUALS = 31;
const TP_GREATERTHAN = 32;
const TP_LESSTHAN = 33;
const TP_GREATEREQUAL = 34;
const TP_LESSEQUAL = 35;
const TP_IDENTITY = 36;
const TP_NONEIDENTITY = 37;
const TP_NOT = 38;
const TP_LAND = 39;
const TP_LOR = 40;
const TP_QUOTE = 41;
const TP_SINGLEQUOTE = 42;
const TP_BOOLEAN = 43;
const TP_NULL = 44;
const TP_AS = 45;
const TP_ANDSYM = 46;
const TP_BACKTICK = 47;
const TP_HATCH = 48;
const TP_AT = 49;
const TP_ISODD = 50;
const TP_ISNOTODD = 51;
const TP_ISEVEN = 52;
const TP_ISNOTEVEN = 53;
const TP_ISODDBY = 54;
const TP_ISNOTODDBY = 55;
const TP_ISEVENBY = 56;
const TP_ISNOTEVENBY = 57;
const TP_ISDIVBY = 58;
const TP_ISNOTDIVBY = 59;
const TP_ISIN = 60;
const TP_LITERALSTART = 61;
const TP_LITERALEND = 62;
const TP_LDELIMTAG = 63;
const TP_RDELIMTAG = 64;
const TP_PHPSTART = 65;
const TP_PHPEND = 66;
const TP_XML = 67;
const YY_NO_ACTION = 423;
const YY_ACCEPT_ACTION = 422;
const YY_ERROR_ACTION = 421;
/* Next are that tables used to determine what action to take based on the
** current state and lookahead token. These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.
**
** Suppose the action integer is N. Then the action is determined as
** follows
**
** 0 <= N < self::YYNSTATE Shift N. That is,
** push the lookahead
** token onto the stack
** and goto state N.
**
** self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE Reduce by rule N-YYNSTATE.
**
** N == self::YYNSTATE+self::YYNRULE A syntax error has occurred.
**
** N == self::YYNSTATE+self::YYNRULE+1 The parser accepts its
** input. (and concludes parsing)
**
** N == self::YYNSTATE+self::YYNRULE+2 No such action. Denotes unused
** slots in the yy_action[] table.
**
** The action table is constructed as a single large static array $yy_action.
** Given state S and lookahead X, the action is computed as
**
** self::$yy_action[self::$yy_shift_ofst[S] + X ]
**
** If the index value self::$yy_shift_ofst[S]+X is out of range or if the value
** self::$yy_lookahead[self::$yy_shift_ofst[S]+X] is not equal to X or if
** self::$yy_shift_ofst[S] is equal to self::YY_SHIFT_USE_DFLT, it means that
** the action is not in the table and that self::$yy_default[S] should be used instead.
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
** a reduce action) then the static $yy_reduce_ofst array is used in place of
** the static $yy_shift_ofst array and self::YY_REDUCE_USE_DFLT is used in place of
** self::YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
** self::$yy_action A single table containing all actions.
** self::$yy_lookahead A table containing the lookahead for each entry in
** yy_action. Used to detect hash collisions.
** self::$yy_shift_ofst For each state, the offset into self::$yy_action for
** shifting terminals.
** self::$yy_reduce_ofst For each state, the offset into self::$yy_action for
** shifting non-terminals after a reduce.
** self::$yy_default Default action for each state.
*/
const YY_SZ_ACTTAB = 952;
static public $yy_action = array(
/* 0 */ 174, 173, 170, 422, 48, 177, 206, 31, 22, 192,
/* 10 */ 39, 20, 184, 188, 187, 180, 5, 2, 10, 6,
/* 20 */ 8, 9, 14, 22, 173, 170, 227, 225, 210, 271,
/* 30 */ 209, 135, 235, 191, 215, 184, 188, 187, 180, 5,
/* 40 */ 2, 10, 6, 8, 9, 27, 226, 165, 29, 215,
/* 50 */ 200, 45, 221, 115, 57, 210, 204, 209, 238, 129,
/* 60 */ 135, 36, 203, 111, 173, 170, 248, 213, 245, 246,
/* 70 */ 251, 252, 257, 256, 243, 184, 188, 187, 180, 5,
/* 80 */ 2, 10, 6, 8, 9, 13, 146, 223, 149, 205,
/* 90 */ 109, 189, 129, 98, 201, 135, 34, 1, 152, 18,
/* 100 */ 214, 243, 250, 249, 173, 170, 66, 254, 198, 199,
/* 110 */ 60, 22, 220, 190, 61, 184, 188, 187, 180, 5,
/* 120 */ 2, 10, 6, 8, 9, 107, 156, 210, 37, 209,
/* 130 */ 11, 117, 12, 26, 63, 31, 123, 215, 39, 204,
/* 140 */ 210, 238, 209, 156, 140, 138, 38, 28, 13, 12,
/* 150 */ 99, 61, 129, 210, 7, 209, 98, 51, 55, 193,
/* 160 */ 273, 243, 137, 33, 140, 156, 22, 37, 259, 28,
/* 170 */ 179, 12, 247, 61, 51, 55, 193, 273, 61, 189,
/* 180 */ 50, 140, 201, 105, 132, 70, 151, 136, 26, 172,
/* 190 */ 145, 161, 215, 91, 269, 254, 51, 55, 193, 273,
/* 200 */ 135, 190, 13, 140, 30, 196, 253, 156, 140, 37,
/* 210 */ 98, 11, 154, 12, 236, 56, 25, 156, 104, 37,
/* 220 */ 126, 28, 13, 12, 216, 63, 131, 22, 211, 243,
/* 230 */ 98, 227, 225, 19, 135, 7, 138, 224, 51, 55,
/* 240 */ 193, 273, 16, 227, 225, 140, 135, 61, 51, 55,
/* 250 */ 193, 273, 217, 215, 157, 140, 156, 201, 37, 141,
/* 260 */ 28, 135, 12, 231, 63, 24, 36, 248, 213, 245,
/* 270 */ 246, 251, 252, 257, 256, 130, 190, 140, 36, 96,
/* 280 */ 150, 61, 231, 128, 24, 100, 201, 51, 55, 193,
/* 290 */ 273, 175, 153, 113, 140, 129, 3, 34, 156, 150,
/* 300 */ 37, 240, 28, 232, 12, 190, 63, 22, 156, 41,
/* 310 */ 37, 140, 28, 141, 12, 147, 61, 40, 201, 23,
/* 320 */ 228, 32, 268, 17, 218, 88, 141, 137, 41, 51,
/* 330 */ 55, 193, 273, 155, 267, 186, 140, 190, 201, 51,
/* 340 */ 55, 193, 273, 156, 169, 37, 140, 28, 263, 12,
/* 350 */ 189, 61, 13, 201, 217, 234, 141, 190, 159, 197,
/* 360 */ 98, 262, 134, 135, 43, 261, 254, 214, 241, 166,
/* 370 */ 141, 255, 190, 22, 51, 55, 193, 273, 46, 189,
/* 380 */ 50, 140, 201, 81, 22, 71, 38, 141, 135, 265,
/* 390 */ 182, 181, 125, 91, 54, 254, 158, 127, 233, 215,
/* 400 */ 53, 190, 189, 50, 92, 201, 253, 89, 77, 244,
/* 410 */ 215, 141, 135, 182, 181, 244, 91, 135, 254, 244,
/* 420 */ 189, 49, 244, 201, 190, 210, 72, 209, 86, 253,
/* 430 */ 154, 182, 181, 135, 91, 141, 254, 189, 50, 208,
/* 440 */ 201, 106, 190, 73, 141, 162, 148, 253, 182, 181,
/* 450 */ 85, 91, 243, 254, 189, 50, 124, 201, 87, 190,
/* 460 */ 78, 238, 197, 90, 253, 182, 181, 52, 91, 58,
/* 470 */ 254, 185, 206, 244, 103, 272, 190, 189, 50, 14,
/* 480 */ 201, 253, 244, 80, 197, 243, 67, 230, 182, 181,
/* 490 */ 139, 91, 168, 254, 68, 189, 95, 197, 201, 190,
/* 500 */ 114, 19, 112, 266, 253, 238, 182, 181, 237, 91,
/* 510 */ 212, 254, 260, 65, 171, 4, 21, 190, 189, 50,
/* 520 */ 144, 201, 62, 143, 79, 133, 239, 219, 189, 182,
/* 530 */ 181, 201, 91, 59, 254, 189, 50, 264, 201, 258,
/* 540 */ 190, 75, 178, 202, 254, 253, 182, 181, 194, 91,
/* 550 */ 190, 254, 189, 50, 176, 201, 189, 190, 76, 201,
/* 560 */ 69, 167, 253, 182, 181, 270, 91, 183, 254, 207,
/* 570 */ 189, 50, 254, 201, 190, 222, 74, 204, 190, 253,
/* 580 */ 141, 182, 181, 214, 91, 156, 254, 64, 35, 28,
/* 590 */ 195, 32, 190, 61, 15, 42, 257, 253, 108, 257,
/* 600 */ 257, 223, 257, 257, 137, 257, 257, 257, 257, 257,
/* 610 */ 189, 97, 257, 201, 257, 257, 51, 55, 193, 273,
/* 620 */ 257, 182, 181, 140, 91, 257, 254, 189, 97, 164,
/* 630 */ 201, 257, 190, 257, 257, 257, 257, 257, 182, 181,
/* 640 */ 257, 91, 257, 254, 257, 257, 163, 257, 257, 190,
/* 650 */ 257, 189, 97, 257, 201, 257, 257, 257, 257, 257,
/* 660 */ 257, 257, 182, 181, 257, 91, 257, 254, 189, 97,
/* 670 */ 160, 201, 257, 190, 257, 257, 257, 257, 257, 182,
/* 680 */ 181, 257, 91, 257, 254, 189, 95, 242, 201, 257,
/* 690 */ 190, 257, 189, 120, 257, 201, 182, 181, 257, 91,
/* 700 */ 257, 254, 257, 182, 181, 257, 91, 190, 254, 257,
/* 710 */ 257, 257, 257, 257, 190, 257, 229, 257, 189, 118,
/* 720 */ 257, 201, 257, 257, 257, 257, 257, 257, 257, 182,
/* 730 */ 181, 257, 91, 257, 254, 257, 257, 257, 189, 116,
/* 740 */ 190, 201, 257, 257, 257, 189, 47, 257, 201, 182,
/* 750 */ 181, 257, 91, 257, 254, 257, 182, 181, 257, 91,
/* 760 */ 190, 254, 189, 93, 257, 201, 257, 190, 257, 257,
/* 770 */ 257, 257, 257, 182, 181, 257, 91, 257, 254, 189,
/* 780 */ 119, 257, 201, 257, 190, 257, 257, 257, 257, 257,
/* 790 */ 182, 181, 257, 91, 257, 254, 189, 101, 257, 201,
/* 800 */ 257, 190, 257, 257, 257, 257, 257, 182, 181, 257,
/* 810 */ 91, 257, 254, 189, 44, 257, 142, 257, 190, 257,
/* 820 */ 189, 121, 257, 201, 182, 181, 257, 91, 257, 254,
/* 830 */ 257, 182, 181, 257, 91, 190, 254, 189, 110, 257,
/* 840 */ 201, 257, 190, 257, 257, 257, 257, 257, 182, 181,
/* 850 */ 257, 91, 257, 254, 189, 94, 257, 201, 257, 190,
/* 860 */ 257, 257, 257, 257, 257, 182, 181, 257, 91, 257,
/* 870 */ 254, 189, 102, 257, 201, 257, 190, 257, 257, 257,
/* 880 */ 257, 257, 182, 181, 257, 91, 257, 254, 189, 122,
/* 890 */ 257, 201, 257, 190, 257, 189, 257, 257, 201, 182,
/* 900 */ 181, 257, 91, 257, 254, 257, 182, 181, 257, 84,
/* 910 */ 190, 254, 189, 257, 257, 201, 257, 190, 257, 257,
/* 920 */ 257, 257, 257, 182, 181, 257, 82, 257, 254, 189,
/* 930 */ 257, 257, 201, 257, 190, 257, 257, 257, 257, 257,
/* 940 */ 182, 181, 257, 83, 257, 254, 257, 257, 257, 257,
/* 950 */ 257, 190,
);
static public $yy_lookahead = array(
/* 0 */ 15, 39, 40, 69, 70, 71, 72, 16, 3, 4,
/* 10 */ 19, 3, 50, 51, 52, 53, 54, 55, 56, 57,
/* 20 */ 58, 59, 14, 3, 39, 40, 11, 12, 1, 4,
/* 30 */ 3, 24, 17, 13, 29, 50, 51, 52, 53, 54,
/* 40 */ 55, 56, 57, 58, 59, 25, 1, 2, 3, 29,
/* 50 */ 5, 6, 7, 94, 9, 1, 97, 3, 99, 78,
/* 60 */ 24, 46, 8, 76, 39, 40, 30, 31, 32, 33,
/* 70 */ 34, 35, 36, 37, 87, 50, 51, 52, 53, 54,
/* 80 */ 55, 56, 57, 58, 59, 14, 84, 100, 23, 62,
/* 90 */ 76, 74, 78, 22, 77, 24, 60, 26, 27, 3,
/* 100 */ 98, 87, 85, 86, 39, 40, 61, 90, 63, 64,
/* 110 */ 65, 3, 67, 96, 18, 50, 51, 52, 53, 54,
/* 120 */ 55, 56, 57, 58, 59, 29, 10, 1, 12, 3,
/* 130 */ 14, 79, 16, 25, 18, 16, 94, 29, 19, 97,
/* 140 */ 1, 99, 3, 10, 48, 29, 27, 14, 14, 16,
/* 150 */ 76, 18, 78, 1, 38, 3, 22, 41, 42, 43,
/* 160 */ 44, 87, 29, 3, 48, 10, 3, 12, 42, 14,
/* 170 */ 10, 16, 17, 18, 41, 42, 43, 44, 18, 74,
/* 180 */ 75, 48, 77, 95, 29, 80, 81, 82, 25, 29,
/* 190 */ 85, 86, 29, 88, 42, 90, 41, 42, 43, 44,
/* 200 */ 24, 96, 14, 48, 28, 66, 101, 10, 48, 12,
/* 210 */ 22, 14, 49, 16, 4, 18, 28, 10, 76, 12,
/* 220 */ 78, 14, 14, 16, 4, 18, 29, 3, 4, 87,
/* 230 */ 22, 11, 12, 25, 24, 38, 29, 4, 41, 42,
/* 240 */ 43, 44, 20, 11, 12, 48, 24, 18, 41, 42,
/* 250 */ 43, 44, 15, 29, 74, 48, 10, 77, 12, 26,
/* 260 */ 14, 24, 16, 1, 18, 3, 46, 30, 31, 32,
/* 270 */ 33, 34, 35, 36, 37, 29, 96, 48, 46, 95,
/* 280 */ 18, 18, 1, 74, 3, 95, 77, 41, 42, 43,
/* 290 */ 44, 4, 29, 20, 48, 78, 23, 60, 10, 18,
/* 300 */ 12, 92, 14, 41, 16, 96, 18, 3, 10, 47,
/* 310 */ 12, 48, 14, 26, 16, 74, 18, 29, 77, 102,
/* 320 */ 17, 21, 41, 20, 29, 73, 26, 29, 47, 41,
/* 330 */ 42, 43, 44, 29, 4, 74, 48, 96, 77, 41,
/* 340 */ 42, 43, 44, 10, 49, 12, 48, 14, 4, 16,
/* 350 */ 74, 18, 14, 77, 15, 17, 26, 96, 18, 107,
/* 360 */ 22, 85, 29, 24, 95, 4, 90, 98, 4, 29,
/* 370 */ 26, 99, 96, 3, 41, 42, 43, 44, 79, 74,
/* 380 */ 75, 48, 77, 91, 3, 80, 27, 26, 24, 4,
/* 390 */ 85, 86, 4, 88, 83, 90, 29, 4, 106, 29,
/* 400 */ 83, 96, 74, 75, 83, 77, 101, 83, 80, 98,
/* 410 */ 29, 26, 24, 85, 86, 98, 88, 24, 90, 98,
/* 420 */ 74, 75, 98, 77, 96, 1, 80, 3, 73, 101,
/* 430 */ 49, 85, 86, 24, 88, 26, 90, 74, 75, 29,
/* 440 */ 77, 76, 96, 80, 26, 27, 21, 101, 85, 86,
/* 450 */ 73, 88, 87, 90, 74, 75, 94, 77, 83, 96,
/* 460 */ 80, 99, 107, 73, 101, 85, 86, 83, 88, 29,
/* 470 */ 90, 71, 72, 98, 76, 47, 96, 74, 75, 14,
/* 480 */ 77, 101, 98, 80, 107, 87, 29, 15, 85, 86,
/* 490 */ 19, 88, 29, 90, 15, 74, 75, 107, 77, 96,
/* 500 */ 94, 25, 29, 47, 101, 99, 85, 86, 15, 88,
/* 510 */ 4, 90, 29, 18, 48, 103, 25, 96, 74, 75,
/* 520 */ 45, 77, 18, 29, 80, 104, 105, 29, 74, 85,
/* 530 */ 86, 77, 88, 18, 90, 74, 75, 29, 77, 85,
/* 540 */ 96, 80, 4, 4, 90, 101, 85, 86, 7, 88,
/* 550 */ 96, 90, 74, 75, 10, 77, 74, 96, 80, 77,
/* 560 */ 92, 45, 101, 85, 86, 106, 88, 85, 90, 107,
/* 570 */ 74, 75, 90, 77, 96, 87, 80, 97, 96, 101,
/* 580 */ 26, 85, 86, 98, 88, 10, 90, 18, 89, 14,
/* 590 */ 81, 21, 96, 18, 14, 95, 108, 101, 95, 108,
/* 600 */ 108, 100, 108, 108, 29, 108, 108, 108, 108, 108,
/* 610 */ 74, 75, 108, 77, 108, 108, 41, 42, 43, 44,
/* 620 */ 108, 85, 86, 48, 88, 108, 90, 74, 75, 93,
/* 630 */ 77, 108, 96, 108, 108, 108, 108, 108, 85, 86,
/* 640 */ 108, 88, 108, 90, 108, 108, 93, 108, 108, 96,
/* 650 */ 108, 74, 75, 108, 77, 108, 108, 108, 108, 108,
/* 660 */ 108, 108, 85, 86, 108, 88, 108, 90, 74, 75,
/* 670 */ 93, 77, 108, 96, 108, 108, 108, 108, 108, 85,
/* 680 */ 86, 108, 88, 108, 90, 74, 75, 93, 77, 108,
/* 690 */ 96, 108, 74, 75, 108, 77, 85, 86, 108, 88,
/* 700 */ 108, 90, 108, 85, 86, 108, 88, 96, 90, 108,
/* 710 */ 108, 108, 108, 108, 96, 108, 105, 108, 74, 75,
/* 720 */ 108, 77, 108, 108, 108, 108, 108, 108, 108, 85,
/* 730 */ 86, 108, 88, 108, 90, 108, 108, 108, 74, 75,
/* 740 */ 96, 77, 108, 108, 108, 74, 75, 108, 77, 85,
/* 750 */ 86, 108, 88, 108, 90, 108, 85, 86, 108, 88,
/* 760 */ 96, 90, 74, 75, 108, 77, 108, 96, 108, 108,
/* 770 */ 108, 108, 108, 85, 86, 108, 88, 108, 90, 74,
/* 780 */ 75, 108, 77, 108, 96, 108, 108, 108, 108, 108,
/* 790 */ 85, 86, 108, 88, 108, 90, 74, 75, 108, 77,
/* 800 */ 108, 96, 108, 108, 108, 108, 108, 85, 86, 108,
/* 810 */ 88, 108, 90, 74, 75, 108, 77, 108, 96, 108,
/* 820 */ 74, 75, 108, 77, 85, 86, 108, 88, 108, 90,
/* 830 */ 108, 85, 86, 108, 88, 96, 90, 74, 75, 108,
/* 840 */ 77, 108, 96, 108, 108, 108, 108, 108, 85, 86,
/* 850 */ 108, 88, 108, 90, 74, 75, 108, 77, 108, 96,
/* 860 */ 108, 108, 108, 108, 108, 85, 86, 108, 88, 108,
/* 870 */ 90, 74, 75, 108, 77, 108, 96, 108, 108, 108,
/* 880 */ 108, 108, 85, 86, 108, 88, 108, 90, 74, 75,
/* 890 */ 108, 77, 108, 96, 108, 74, 108, 108, 77, 85,
/* 900 */ 86, 108, 88, 108, 90, 108, 85, 86, 108, 88,
/* 910 */ 96, 90, 74, 108, 108, 77, 108, 96, 108, 108,
/* 920 */ 108, 108, 108, 85, 86, 108, 88, 108, 90, 74,
/* 930 */ 108, 108, 77, 108, 96, 108, 108, 108, 108, 108,
/* 940 */ 85, 86, 108, 88, 108, 90, 108, 108, 108, 108,
/* 950 */ 108, 96,
);
const YY_SHIFT_USE_DFLT = -39;
2009-05-14 10:53:28 +00:00
const YY_SHIFT_MAX = 169;
static public $yy_shift_ofst = array(
/* 0 */ 45, 197, 116, 116, 116, 116, 116, 116, 116, 116,
/* 10 */ 116, 116, 246, 207, 207, 207, 207, 246, 207, 207,
/* 20 */ 207, 207, 207, 207, 207, 207, 207, 207, 207, 288,
/* 30 */ 207, 155, 333, 298, 133, 575, 575, 575, 96, 160,
/* 40 */ 71, 263, 119, 119, 409, 229, 300, 409, 45, 237,
/* 50 */ 36, 262, 163, 20, 381, 152, 304, 424, 418, 370,
/* 60 */ 424, 370, 370, 304, 370, 370, 424, 554, 359, 359,
/* 70 */ 25, 65, -15, -38, -38, -38, -38, -38, -38, -38,
/* 80 */ -38, 281, 220, 15, 232, 126, 139, 5, 54, 224,
/* 90 */ 27, 232, 108, 393, 339, 176, -9, 222, 340, 385,
/* 100 */ -9, 388, 364, 361, 344, -9, 287, 8, -9, 233,
/* 110 */ 210, 330, 580, 569, 359, 359, 7, 570, 7, 7,
/* 120 */ 7, 7, 7, 359, 359, -39, -39, -39, -39, -39,
/* 130 */ 188, 208, 338, 303, 134, 295, 273, 134, 134, 544,
/* 140 */ 494, 367, 491, 466, 495, 475, 539, 541, 508, 504,
/* 150 */ 483, 506, 457, 428, 410, 425, 471, 456, 476, 473,
/* 160 */ 479, 516, 463, 493, 472, 440, 465, 515, 538, 498,
);
const YY_REDUCE_USE_DFLT = -67;
2009-05-14 10:53:28 +00:00
const YY_REDUCE_MAX = 129;
static public $yy_reduce_ofst = array(
/* 0 */ -66, 105, 461, 305, 478, 496, 328, 403, 444, 380,
/* 10 */ 363, 346, 421, 553, 536, 577, 594, 611, 688, 644,
/* 20 */ 722, 671, 797, 664, 763, 618, 705, 814, 780, 739,
/* 30 */ 746, 855, 821, 838, 17, 454, 276, 482, 209, 261,
/* 40 */ 142, 180, 42, -41, 14, 241, -13, 74, 400, 217,
/* 50 */ 217, 292, 269, 2, 269, 377, 384, 252, 365, 324,
/* 60 */ 355, 311, 317, 311, 321, 375, 390, 398, 362, 406,
/* 70 */ 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
/* 80 */ 412, 459, 499, 499, 499, 462, 462, 485, 462, 485,
/* 90 */ 462, 499, 485, -19, -19, -19, 480, -19, 468, 488,
/* 100 */ 480, -19, -19, 488, 488, 480, 488, 503, 480, 488,
/* 110 */ -19, 488, 500, 509, 272, 272, -19, 501, -19, -19,
/* 120 */ -19, -19, -19, 272, 272, 88, 299, 184, 190, 52,
);
static public $yyExpectedTokens = array(
/* 0 */ array(1, 2, 3, 5, 6, 7, 9, 61, 63, 64, 65, 67, ),
/* 1 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 2 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 3 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 4 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 5 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 6 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 7 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 8 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 9 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 10 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 11 */ array(10, 12, 14, 16, 18, 29, 38, 41, 42, 43, 44, 48, ),
/* 12 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 13 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 14 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 15 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 16 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 17 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 18 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 19 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 20 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 21 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 22 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 23 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 24 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 25 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 26 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 27 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 28 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 29 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 30 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 31 */ array(10, 12, 14, 16, 17, 18, 29, 41, 42, 43, 44, 48, ),
/* 32 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 33 */ array(10, 12, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 34 */ array(10, 14, 16, 18, 29, 41, 42, 43, 44, 48, ),
/* 35 */ array(10, 14, 18, 29, 41, 42, 43, 44, 48, ),
/* 36 */ array(10, 14, 18, 29, 41, 42, 43, 44, 48, ),
/* 37 */ array(10, 14, 18, 29, 41, 42, 43, 44, 48, ),
/* 38 */ array(3, 18, 29, 48, ),
/* 39 */ array(3, 10, 18, 29, 48, ),
/* 40 */ array(14, 22, 24, 26, 27, ),
/* 41 */ array(18, 29, 48, ),
/* 42 */ array(16, 19, 27, ),
/* 43 */ array(16, 19, 27, ),
/* 44 */ array(24, 26, ),
/* 45 */ array(18, 48, ),
/* 46 */ array(21, 26, ),
/* 47 */ array(24, 26, ),
/* 48 */ array(1, 2, 3, 5, 6, 7, 9, 61, 63, 64, 65, 67, ),
/* 49 */ array(15, 24, 30, 31, 32, 33, 34, 35, 36, 37, 60, ),
/* 50 */ array(24, 30, 31, 32, 33, 34, 35, 36, 37, 60, ),
/* 51 */ array(1, 3, 18, 41, 47, ),
/* 52 */ array(3, 25, 29, 49, ),
/* 53 */ array(3, 13, 25, 29, ),
/* 54 */ array(3, 29, 49, ),
/* 55 */ array(1, 3, 42, ),
/* 56 */ array(3, 29, ),
/* 57 */ array(1, 3, ),
/* 58 */ array(26, 27, ),
/* 59 */ array(3, 29, ),
/* 60 */ array(1, 3, ),
/* 61 */ array(3, 29, ),
/* 62 */ array(3, 29, ),
/* 63 */ array(3, 29, ),
/* 64 */ array(3, 29, ),
/* 65 */ array(3, 29, ),
2009-05-14 10:53:28 +00:00
/* 66 */ array(1, 3, ),
/* 67 */ array(26, ),
/* 68 */ array(27, ),
/* 69 */ array(27, ),
/* 70 */ array(4, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 71 */ array(23, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 72 */ array(15, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 73 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 74 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 75 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 76 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 77 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 78 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 79 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 80 */ array(39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ),
/* 81 */ array(1, 3, 18, 41, 47, ),
/* 82 */ array(4, 11, 12, 46, ),
/* 83 */ array(11, 12, 17, 46, ),
/* 84 */ array(11, 12, 46, ),
/* 85 */ array(1, 3, 42, ),
/* 86 */ array(1, 3, 66, ),
/* 87 */ array(3, 4, 29, ),
/* 88 */ array(1, 3, 8, ),
/* 89 */ array(3, 4, 29, ),
/* 90 */ array(1, 3, 62, ),
/* 91 */ array(11, 12, 46, ),
/* 92 */ array(3, 25, 29, ),
/* 93 */ array(4, 24, ),
/* 94 */ array(15, 24, ),
/* 95 */ array(24, 28, ),
/* 96 */ array(16, 19, ),
/* 97 */ array(20, 24, ),
/* 98 */ array(18, 29, ),
/* 99 */ array(4, 26, ),
/* 100 */ array(16, 19, ),
/* 101 */ array(4, 24, ),
/* 102 */ array(4, 24, ),
/* 103 */ array(4, 26, ),
/* 104 */ array(4, 26, ),
/* 105 */ array(16, 19, ),
/* 106 */ array(4, 26, ),
/* 107 */ array(3, 14, ),
/* 108 */ array(16, 19, ),
/* 109 */ array(4, 26, ),
/* 110 */ array(4, 24, ),
/* 111 */ array(4, 26, ),
/* 112 */ array(14, ),
/* 113 */ array(18, ),
/* 114 */ array(27, ),
/* 115 */ array(27, ),
/* 116 */ array(24, ),
/* 117 */ array(21, ),
/* 118 */ array(24, ),
/* 119 */ array(24, ),
/* 120 */ array(24, ),
/* 121 */ array(24, ),
/* 122 */ array(24, ),
/* 123 */ array(27, ),
/* 124 */ array(27, ),
2009-05-14 10:53:28 +00:00
/* 125 */ array(),
/* 126 */ array(),
/* 127 */ array(),
/* 128 */ array(),
2009-05-09 12:44:43 +00:00
/* 129 */ array(),
/* 130 */ array(14, 22, 28, ),
/* 131 */ array(14, 22, 25, ),
/* 132 */ array(14, 17, 22, ),
/* 133 */ array(17, 20, ),
/* 134 */ array(14, 22, ),
/* 135 */ array(29, 49, ),
/* 136 */ array(20, 23, ),
/* 137 */ array(14, 22, ),
/* 138 */ array(14, 22, ),
/* 139 */ array(10, ),
/* 140 */ array(29, ),
/* 141 */ array(29, ),
/* 142 */ array(25, ),
/* 143 */ array(48, ),
/* 144 */ array(18, ),
/* 145 */ array(45, ),
/* 146 */ array(4, ),
/* 147 */ array(7, ),
/* 148 */ array(29, ),
/* 149 */ array(18, ),
/* 150 */ array(29, ),
/* 151 */ array(4, ),
/* 152 */ array(29, ),
/* 153 */ array(47, ),
/* 154 */ array(29, ),
/* 155 */ array(21, ),
/* 156 */ array(19, ),
/* 157 */ array(47, ),
/* 158 */ array(25, ),
/* 159 */ array(29, ),
/* 160 */ array(15, ),
/* 161 */ array(45, ),
/* 162 */ array(29, ),
/* 163 */ array(15, ),
/* 164 */ array(15, ),
/* 165 */ array(29, ),
/* 166 */ array(14, ),
/* 167 */ array(18, ),
/* 168 */ array(4, ),
/* 169 */ array(29, ),
/* 170 */ array(),
/* 171 */ array(),
/* 172 */ array(),
/* 173 */ array(),
/* 174 */ array(),
/* 175 */ array(),
/* 176 */ array(),
/* 177 */ array(),
/* 178 */ array(),
/* 179 */ array(),
/* 180 */ array(),
/* 181 */ array(),
/* 182 */ array(),
/* 183 */ array(),
/* 184 */ array(),
/* 185 */ array(),
/* 186 */ array(),
/* 187 */ array(),
/* 188 */ array(),
/* 189 */ array(),
/* 190 */ array(),
/* 191 */ array(),
/* 192 */ array(),
/* 193 */ array(),
/* 194 */ array(),
/* 195 */ array(),
/* 196 */ array(),
/* 197 */ array(),
/* 198 */ array(),
/* 199 */ array(),
/* 200 */ array(),
/* 201 */ array(),
/* 202 */ array(),
/* 203 */ array(),
/* 204 */ array(),
/* 205 */ array(),
/* 206 */ array(),
/* 207 */ array(),
/* 208 */ array(),
/* 209 */ array(),
/* 210 */ array(),
/* 211 */ array(),
/* 212 */ array(),
/* 213 */ array(),
/* 214 */ array(),
/* 215 */ array(),
/* 216 */ array(),
/* 217 */ array(),
/* 218 */ array(),
/* 219 */ array(),
/* 220 */ array(),
/* 221 */ array(),
/* 222 */ array(),
/* 223 */ array(),
/* 224 */ array(),
/* 225 */ array(),
/* 226 */ array(),
/* 227 */ array(),
/* 228 */ array(),
/* 229 */ array(),
/* 230 */ array(),
/* 231 */ array(),
/* 232 */ array(),
/* 233 */ array(),
/* 234 */ array(),
/* 235 */ array(),
/* 236 */ array(),
/* 237 */ array(),
/* 238 */ array(),
/* 239 */ array(),
/* 240 */ array(),
/* 241 */ array(),
2009-04-08 14:47:28 +00:00
/* 242 */ array(),
/* 243 */ array(),
/* 244 */ array(),
/* 245 */ array(),
/* 246 */ array(),
/* 247 */ array(),
/* 248 */ array(),
/* 249 */ array(),
/* 250 */ array(),
/* 251 */ array(),
/* 252 */ array(),
/* 253 */ array(),
/* 254 */ array(),
/* 255 */ array(),
/* 256 */ array(),
/* 257 */ array(),
/* 258 */ array(),
/* 259 */ array(),
/* 260 */ array(),
/* 261 */ array(),
/* 262 */ array(),
/* 263 */ array(),
/* 264 */ array(),
/* 265 */ array(),
/* 266 */ array(),
/* 267 */ array(),
/* 268 */ array(),
/* 269 */ array(),
/* 270 */ array(),
2009-05-14 10:53:28 +00:00
/* 271 */ array(),
/* 272 */ array(),
/* 273 */ array(),
);
static public $yy_default = array(
/* 0 */ 421, 421, 421, 421, 421, 421, 421, 421, 421, 421,
/* 10 */ 421, 421, 406, 368, 368, 368, 368, 421, 421, 421,
/* 20 */ 421, 421, 421, 421, 421, 421, 421, 421, 421, 421,
/* 30 */ 421, 421, 421, 421, 421, 421, 421, 421, 421, 421,
/* 40 */ 304, 421, 336, 342, 304, 421, 304, 304, 274, 378,
/* 50 */ 378, 421, 344, 421, 344, 421, 421, 421, 304, 421,
/* 60 */ 421, 421, 421, 421, 421, 421, 421, 304, 332, 331,
/* 70 */ 421, 421, 421, 387, 391, 392, 382, 388, 384, 383,
/* 80 */ 376, 421, 421, 421, 373, 421, 421, 421, 421, 421,
/* 90 */ 421, 310, 421, 421, 421, 407, 361, 367, 421, 421,
/* 100 */ 360, 421, 421, 421, 421, 362, 421, 344, 359, 421,
/* 110 */ 421, 421, 344, 421, 333, 356, 379, 312, 305, 308,
/* 120 */ 409, 408, 298, 337, 334, 344, 372, 344, 344, 372,
/* 130 */ 309, 309, 421, 421, 374, 421, 421, 421, 309, 421,
/* 140 */ 421, 421, 338, 421, 421, 314, 421, 421, 421, 421,
/* 150 */ 421, 306, 421, 421, 421, 354, 321, 421, 421, 421,
/* 160 */ 421, 313, 421, 421, 421, 421, 335, 421, 421, 421,
/* 170 */ 402, 341, 345, 401, 377, 293, 322, 275, 294, 346,
/* 180 */ 386, 313, 314, 315, 389, 276, 347, 385, 390, 320,
/* 190 */ 340, 299, 300, 323, 284, 307, 283, 418, 280, 281,
/* 200 */ 282, 338, 297, 278, 343, 279, 277, 417, 339, 420,
/* 210 */ 419, 301, 296, 394, 353, 354, 348, 326, 370, 369,
/* 220 */ 285, 286, 302, 371, 288, 318, 287, 319, 403, 405,
/* 230 */ 365, 416, 330, 411, 349, 350, 415, 364, 357, 404,
/* 240 */ 363, 355, 366, 303, 352, 395, 396, 351, 393, 380,
/* 250 */ 381, 397, 398, 375, 325, 358, 400, 399, 316, 327,
/* 260 */ 414, 291, 317, 290, 311, 289, 413, 292, 329, 328,
/* 270 */ 410, 295, 412, 324,
);
/* The next thing included is series of defines which control
** various aspects of the generated parser.
** self::YYNOCODE is a number which corresponds
** to no legal terminal or nonterminal number. This
** number is used to fill in empty slots of the hash
** table.
** self::YYFALLBACK If defined, this indicates that one or more tokens
** have fall-back values which should be used if the
** original value of the token will not parse.
** self::YYSTACKDEPTH is the maximum depth of the parser's stack.
** self::YYNSTATE the combined number of states.
** self::YYNRULE the number of rules in the grammar
** self::YYERRORSYMBOL is the code number of the error symbol. If not
** defined, then do no error processing.
*/
const YYNOCODE = 109;
const YYSTACKDEPTH = 100;
const YYNSTATE = 274;
const YYNRULE = 147;
const YYERRORSYMBOL = 68;
const YYERRSYMDT = 'yy0';
const YYFALLBACK = 1;
/** The next table maps tokens into fallback tokens. If a construct
* like the following:
*
* %fallback ID X Y Z.
*
* appears in the grammer, then ID becomes a fallback token for X, Y,
* and Z. Whenever one of the tokens X, Y, or Z is input to the parser
* but it does not parse, the type of the token is changed to ID and
* the parse is retried before an error is thrown.
*/
static public $yyFallback = array(
0, /* $ => nothing */
0, /* OTHER => nothing */
1, /* LDELSLASH => OTHER */
1, /* LDEL => OTHER */
1, /* RDEL => OTHER */
1, /* PHP => OTHER */
1, /* SHORTTAGSTART => OTHER */
1, /* SHORTTAGEND => OTHER */
1, /* COMMENTEND => OTHER */
1, /* COMMENTSTART => OTHER */
1, /* INTEGER => OTHER */
1, /* MATH => OTHER */
1, /* UNIMATH => OTHER */
1, /* INCDEC => OTHER */
1, /* OPENP => OTHER */
1, /* CLOSEP => OTHER */
1, /* OPENB => OTHER */
1, /* CLOSEB => OTHER */
1, /* DOLLAR => OTHER */
1, /* DOT => OTHER */
1, /* COMMA => OTHER */
1, /* COLON => OTHER */
1, /* DOUBLECOLON => OTHER */
1, /* SEMICOLON => OTHER */
1, /* VERT => OTHER */
1, /* EQUAL => OTHER */
1, /* SPACE => OTHER */
1, /* PTR => OTHER */
1, /* APTR => OTHER */
1, /* ID => OTHER */
1, /* EQUALS => OTHER */
1, /* NOTEQUALS => OTHER */
1, /* GREATERTHAN => OTHER */
1, /* LESSTHAN => OTHER */
1, /* GREATEREQUAL => OTHER */
1, /* LESSEQUAL => OTHER */
1, /* IDENTITY => OTHER */
1, /* NONEIDENTITY => OTHER */
1, /* NOT => OTHER */
1, /* LAND => OTHER */
1, /* LOR => OTHER */
1, /* QUOTE => OTHER */
1, /* SINGLEQUOTE => OTHER */
1, /* BOOLEAN => OTHER */
1, /* NULL => OTHER */
1, /* AS => OTHER */
1, /* ANDSYM => OTHER */
1, /* BACKTICK => OTHER */
1, /* HATCH => OTHER */
1, /* AT => OTHER */
1, /* ISODD => OTHER */
1, /* ISNOTODD => OTHER */
1, /* ISEVEN => OTHER */
1, /* ISNOTEVEN => OTHER */
1, /* ISODDBY => OTHER */
1, /* ISNOTODDBY => OTHER */
1, /* ISEVENBY => OTHER */
1, /* ISNOTEVENBY => OTHER */
1, /* ISDIVBY => OTHER */
1, /* ISNOTDIVBY => OTHER */
1, /* ISIN => OTHER */
0, /* LITERALSTART => nothing */
0, /* LITERALEND => nothing */
0, /* LDELIMTAG => nothing */
0, /* RDELIMTAG => nothing */
0, /* PHPSTART => nothing */
0, /* PHPEND => nothing */
0, /* XML => nothing */
);
/**
* Turn parser tracing on by giving a stream to which to write the trace
* and a prompt to preface each trace message. Tracing is turned off
* by making either argument NULL
*
* Inputs:
*
* - A stream resource to which trace output should be written.
* If NULL, then tracing is turned off.
* - A prefix string written at the beginning of every
* line of trace output. If NULL, then tracing is
* turned off.
*
* Outputs:
*
* - None.
* @param resource
* @param string
*/
static function Trace($TraceFILE, $zTracePrompt)
{
if (!$TraceFILE) {
$zTracePrompt = 0;
} elseif (!$zTracePrompt) {
$TraceFILE = 0;
}
self::$yyTraceFILE = $TraceFILE;
self::$yyTracePrompt = $zTracePrompt;
}
/**
* Output debug information to output (php://output stream)
*/
static function PrintTrace()
{
self::$yyTraceFILE = fopen('php://output', 'w');
self::$yyTracePrompt = '<br>';
}
/**
* @var resource|0
*/
static public $yyTraceFILE;
/**
* String to prepend to debug output
* @var string|0
*/
static public $yyTracePrompt;
/**
* @var int
*/
public $yyidx; /* Index of top element in stack */
/**
* @var int
*/
public $yyerrcnt; /* Shifts left before out of the error */
/**
* @var array
*/
public $yystack = array(); /* The parser's stack */
/**
* For tracing shifts, the names of all terminals and nonterminals
* are required. The following table supplies these names
* @var array
*/
public $yyTokenName = array(
'$', 'OTHER', 'LDELSLASH', 'LDEL',
'RDEL', 'PHP', 'SHORTTAGSTART', 'SHORTTAGEND',
'COMMENTEND', 'COMMENTSTART', 'INTEGER', 'MATH',
'UNIMATH', 'INCDEC', 'OPENP', 'CLOSEP',
'OPENB', 'CLOSEB', 'DOLLAR', 'DOT',
'COMMA', 'COLON', 'DOUBLECOLON', 'SEMICOLON',
'VERT', 'EQUAL', 'SPACE', 'PTR',
'APTR', 'ID', 'EQUALS', 'NOTEQUALS',
'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL', 'LESSEQUAL',
'IDENTITY', 'NONEIDENTITY', 'NOT', 'LAND',
'LOR', 'QUOTE', 'SINGLEQUOTE', 'BOOLEAN',
'NULL', 'AS', 'ANDSYM', 'BACKTICK',
'HATCH', 'AT', 'ISODD', 'ISNOTODD',
'ISEVEN', 'ISNOTEVEN', 'ISODDBY', 'ISNOTODDBY',
'ISEVENBY', 'ISNOTEVENBY', 'ISDIVBY', 'ISNOTDIVBY',
'ISIN', 'LITERALSTART', 'LITERALEND', 'LDELIMTAG',
'RDELIMTAG', 'PHPSTART', 'PHPEND', 'XML',
'error', 'start', 'template', 'template_element',
'smartytag', 'text', 'variable', 'expr',
'attributes', 'varindexed', 'modifier', 'modparameters',
'ifexprs', 'statement', 'statements', 'varvar',
'foraction', 'value', 'array', 'attribute',
'exprs', 'math', 'function', 'doublequoted',
'method', 'params', 'objectchain', 'arrayindex',
'object', 'indexdef', 'varvarele', 'objectelement',
'modparameter', 'ifexpr', 'ifcond', 'lop',
'arrayelements', 'arrayelement', 'doublequotedcontent', 'textelement',
);
/**
* For tracing reduce actions, the names of all rules are required.
* @var array
*/
static public $yyRuleName = array(
/* 0 */ "start ::= template",
/* 1 */ "template ::= template_element",
/* 2 */ "template ::= template template_element",
/* 3 */ "template_element ::= smartytag",
/* 4 */ "template_element ::= COMMENTSTART text COMMENTEND",
/* 5 */ "template_element ::= LITERALSTART text LITERALEND",
/* 6 */ "template_element ::= LDELIMTAG",
/* 7 */ "template_element ::= RDELIMTAG",
/* 8 */ "template_element ::= PHP",
/* 9 */ "template_element ::= PHPSTART text PHPEND",
/* 10 */ "template_element ::= SHORTTAGSTART variable SHORTTAGEND",
/* 11 */ "template_element ::= XML",
/* 12 */ "template_element ::= SHORTTAGEND",
/* 13 */ "template_element ::= OTHER",
/* 14 */ "smartytag ::= LDEL expr attributes RDEL",
/* 15 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL",
/* 16 */ "smartytag ::= LDEL ID attributes RDEL",
/* 17 */ "smartytag ::= LDEL ID PTR ID attributes RDEL",
/* 18 */ "smartytag ::= LDEL ID modifier modparameters attributes RDEL",
/* 19 */ "smartytag ::= LDELSLASH ID attributes RDEL",
/* 20 */ "smartytag ::= LDELSLASH ID PTR ID RDEL",
/* 21 */ "smartytag ::= LDEL ID SPACE ifexprs RDEL",
/* 22 */ "smartytag ::= LDEL ID SPACE statement RDEL",
/* 23 */ "smartytag ::= LDEL ID SPACE statements SEMICOLON ifexprs SEMICOLON DOLLAR varvar foraction RDEL",
/* 24 */ "foraction ::= EQUAL expr",
/* 25 */ "foraction ::= INCDEC",
/* 26 */ "smartytag ::= LDEL ID SPACE value AS DOLLAR varvar RDEL",
/* 27 */ "smartytag ::= LDEL ID SPACE array AS DOLLAR varvar RDEL",
/* 28 */ "attributes ::= attributes attribute",
/* 29 */ "attributes ::= attribute",
/* 30 */ "attributes ::=",
/* 31 */ "attribute ::= SPACE ID EQUAL expr",
/* 32 */ "statements ::= statement",
/* 33 */ "statements ::= statements COMMA statement",
/* 34 */ "statement ::= DOLLAR varvar EQUAL expr",
/* 35 */ "expr ::= ID",
/* 36 */ "expr ::= exprs",
/* 37 */ "expr ::= DOLLAR ID COLON ID",
/* 38 */ "expr ::= expr modifier modparameters",
/* 39 */ "exprs ::= array",
/* 40 */ "exprs ::= value",
/* 41 */ "exprs ::= UNIMATH value",
/* 42 */ "exprs ::= exprs math value",
/* 43 */ "exprs ::= exprs ANDSYM value",
/* 44 */ "math ::= UNIMATH",
/* 45 */ "math ::= MATH",
/* 46 */ "value ::= variable",
/* 47 */ "value ::= INTEGER",
/* 48 */ "value ::= INTEGER DOT INTEGER",
/* 49 */ "value ::= BOOLEAN",
/* 50 */ "value ::= NULL",
/* 51 */ "value ::= function",
/* 52 */ "value ::= OPENP expr CLOSEP",
/* 53 */ "value ::= SINGLEQUOTE text SINGLEQUOTE",
/* 54 */ "value ::= SINGLEQUOTE SINGLEQUOTE",
/* 55 */ "value ::= QUOTE doublequoted QUOTE",
/* 56 */ "value ::= QUOTE QUOTE",
/* 57 */ "value ::= ID DOUBLECOLON method",
/* 58 */ "value ::= ID DOUBLECOLON DOLLAR ID OPENP params CLOSEP",
/* 59 */ "value ::= ID DOUBLECOLON method objectchain",
/* 60 */ "value ::= ID DOUBLECOLON DOLLAR ID OPENP params CLOSEP objectchain",
/* 61 */ "value ::= ID DOUBLECOLON ID",
/* 62 */ "value ::= ID DOUBLECOLON DOLLAR ID arrayindex",
/* 63 */ "value ::= ID DOUBLECOLON DOLLAR ID arrayindex objectchain",
/* 64 */ "variable ::= varindexed",
/* 65 */ "variable ::= DOLLAR varvar AT ID",
/* 66 */ "variable ::= object",
/* 67 */ "variable ::= HATCH ID HATCH",
/* 68 */ "varindexed ::= DOLLAR varvar arrayindex",
/* 69 */ "arrayindex ::= arrayindex indexdef",
/* 70 */ "arrayindex ::=",
/* 71 */ "indexdef ::= DOT ID",
/* 72 */ "indexdef ::= DOT INTEGER",
/* 73 */ "indexdef ::= DOT variable",
/* 74 */ "indexdef ::= DOT LDEL exprs RDEL",
/* 75 */ "indexdef ::= OPENB ID CLOSEB",
/* 76 */ "indexdef ::= OPENB exprs CLOSEB",
/* 77 */ "indexdef ::= OPENB CLOSEB",
/* 78 */ "varvar ::= varvarele",
/* 79 */ "varvar ::= varvar varvarele",
/* 80 */ "varvarele ::= ID",
/* 81 */ "varvarele ::= LDEL expr RDEL",
/* 82 */ "object ::= DOLLAR varvar arrayindex objectchain",
/* 83 */ "objectchain ::= objectelement",
/* 84 */ "objectchain ::= objectchain objectelement",
/* 85 */ "objectelement ::= PTR ID arrayindex",
/* 86 */ "objectelement ::= PTR variable arrayindex",
/* 87 */ "objectelement ::= PTR LDEL expr RDEL arrayindex",
/* 88 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex",
/* 89 */ "objectelement ::= PTR method",
/* 90 */ "function ::= ID OPENP params CLOSEP",
/* 91 */ "method ::= ID OPENP params CLOSEP",
/* 92 */ "params ::= expr COMMA params",
/* 93 */ "params ::= expr",
/* 94 */ "params ::=",
/* 95 */ "modifier ::= VERT AT ID",
/* 96 */ "modifier ::= VERT ID",
/* 97 */ "modparameters ::= modparameters modparameter",
/* 98 */ "modparameters ::=",
/* 99 */ "modparameter ::= COLON exprs",
/* 100 */ "modparameter ::= COLON ID",
/* 101 */ "ifexprs ::= ifexpr",
/* 102 */ "ifexprs ::= NOT ifexprs",
/* 103 */ "ifexprs ::= OPENP ifexprs CLOSEP",
/* 104 */ "ifexpr ::= expr",
/* 105 */ "ifexpr ::= expr ifcond expr",
/* 106 */ "ifexpr ::= expr ISIN array",
/* 107 */ "ifexpr ::= expr ISIN value",
/* 108 */ "ifexpr ::= ifexprs lop ifexprs",
/* 109 */ "ifexpr ::= ifexprs ISDIVBY ifexprs",
/* 110 */ "ifexpr ::= ifexprs ISNOTDIVBY ifexprs",
/* 111 */ "ifexpr ::= ifexprs ISEVEN",
/* 112 */ "ifexpr ::= ifexprs ISNOTEVEN",
/* 113 */ "ifexpr ::= ifexprs ISEVENBY ifexprs",
/* 114 */ "ifexpr ::= ifexprs ISNOTEVENBY ifexprs",
/* 115 */ "ifexpr ::= ifexprs ISODD",
/* 116 */ "ifexpr ::= ifexprs ISNOTODD",
/* 117 */ "ifexpr ::= ifexprs ISODDBY ifexprs",
/* 118 */ "ifexpr ::= ifexprs ISNOTODDBY ifexprs",
/* 119 */ "ifcond ::= EQUALS",
/* 120 */ "ifcond ::= NOTEQUALS",
/* 121 */ "ifcond ::= GREATERTHAN",
/* 122 */ "ifcond ::= LESSTHAN",
/* 123 */ "ifcond ::= GREATEREQUAL",
/* 124 */ "ifcond ::= LESSEQUAL",
/* 125 */ "ifcond ::= IDENTITY",
/* 126 */ "ifcond ::= NONEIDENTITY",
/* 127 */ "lop ::= LAND",
/* 128 */ "lop ::= LOR",
/* 129 */ "array ::= OPENB arrayelements CLOSEB",
/* 130 */ "arrayelements ::= arrayelement",
/* 131 */ "arrayelements ::= arrayelements COMMA arrayelement",
/* 132 */ "arrayelements ::=",
/* 133 */ "arrayelement ::= expr",
/* 134 */ "arrayelement ::= expr APTR expr",
/* 135 */ "arrayelement ::= ID APTR expr",
/* 136 */ "doublequoted ::= doublequoted doublequotedcontent",
/* 137 */ "doublequoted ::= doublequotedcontent",
/* 138 */ "doublequotedcontent ::= BACKTICK ID BACKTICK",
/* 139 */ "doublequotedcontent ::= BACKTICK variable BACKTICK",
/* 140 */ "doublequotedcontent ::= DOLLAR ID",
/* 141 */ "doublequotedcontent ::= LDEL expr RDEL",
/* 142 */ "doublequotedcontent ::= OTHER",
/* 143 */ "text ::= text textelement",
/* 144 */ "text ::= textelement",
/* 145 */ "textelement ::= OTHER",
/* 146 */ "textelement ::= LDEL",
);
/**
* This function returns the symbolic name associated with a token
* value.
* @param int
* @return string
*/
function tokenName($tokenType)
{
if ($tokenType === 0) {
return 'End of Input';
}
if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
return $this->yyTokenName[$tokenType];
} else {
return "Unknown";
}
}
/**
* The following function deletes the value associated with a
* symbol. The symbol can be either a terminal or nonterminal.
* @param int the symbol code
* @param mixed the symbol's value
*/
static function yy_destructor($yymajor, $yypminor)
{
switch ($yymajor) {
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
** when the symbol is popped from the stack during a
** reduce or during error processing or when a parser is
** being destroyed before it is finished parsing.
**
** Note: during a reduce, the only symbols destroyed are those
** which appear on the RHS of the rule, but which are not used
** inside the C code.
*/
default: break; /* If no destructor action specified: do nothing */
}
}
/**
* Pop the parser's stack once.
*
* If there is a destructor routine associated with the token which
* is popped from the stack, then call it.
*
* Return the major token number for the symbol popped.
* @param TP_yyParser
* @return int
*/
function yy_pop_parser_stack()
{
if (!count($this->yystack)) {
return;
}
$yytos = array_pop($this->yystack);
if (self::$yyTraceFILE && $this->yyidx >= 0) {
fwrite(self::$yyTraceFILE,
self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .
"\n");
}
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
$this->yyidx--;
return $yymajor;
}
/**
* Deallocate and destroy a parser. Destructors are all called for
* all stack elements before shutting the parser down.
*/
function __destruct()
{
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
if (is_resource(self::$yyTraceFILE)) {
fclose(self::$yyTraceFILE);
}
}
/**
* Based on the current state and parser stack, get a list of all
* possible lookahead tokens
* @param int
* @return array
*/
function yy_get_expected_tokens($token)
{
$state = $this->yystack[$this->yyidx]->stateno;
$expected = self::$yyExpectedTokens[$state];
if (in_array($token, self::$yyExpectedTokens[$state], true)) {
return $expected;
}
$stack = $this->yystack;
$yyidx = $this->yyidx;
do {
$yyact = $this->yy_find_shift_action($token);
if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
// reduce action
$done = 0;
do {
if ($done++ == 100) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// too much recursion prevents proper detection
// so give up
return array_unique($expected);
}
$yyruleno = $yyact - self::YYNSTATE;
$this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
$nextstate = $this->yy_find_reduce_action(
$this->yystack[$this->yyidx]->stateno,
self::$yyRuleInfo[$yyruleno]['lhs']);
if (isset(self::$yyExpectedTokens[$nextstate])) {
$expected += self::$yyExpectedTokens[$nextstate];
if (in_array($token,
self::$yyExpectedTokens[$nextstate], true)) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
}
}
if ($nextstate < self::YYNSTATE) {
// we need to shift a non-terminal
$this->yyidx++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
$x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
$this->yystack[$this->yyidx] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// the last token was just ignored, we can't accept
// by ignoring input, this is in essence ignoring a
// syntax error!
return array_unique($expected);
} elseif ($nextstate === self::YY_NO_ACTION) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// input accepted, but not shifted (I guess)
return $expected;
} else {
$yyact = $nextstate;
}
} while (true);
}
break;
} while (true);
return array_unique($expected);
}
/**
* Based on the parser state and current parser stack, determine whether
* the lookahead token is possible.
*
* The parser will convert the token value to an error token if not. This
* catches some unusual edge cases where the parser would fail.
* @param int
* @return bool
*/
function yy_is_expected_token($token)
{
if ($token === 0) {
return true; // 0 is not part of this
}
$state = $this->yystack[$this->yyidx]->stateno;
if (in_array($token, self::$yyExpectedTokens[$state], true)) {
return true;
}
$stack = $this->yystack;
$yyidx = $this->yyidx;
do {
$yyact = $this->yy_find_shift_action($token);
if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
// reduce action
$done = 0;
do {
if ($done++ == 100) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// too much recursion prevents proper detection
// so give up
return true;
}
$yyruleno = $yyact - self::YYNSTATE;
$this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
$nextstate = $this->yy_find_reduce_action(
$this->yystack[$this->yyidx]->stateno,
self::$yyRuleInfo[$yyruleno]['lhs']);
if (isset(self::$yyExpectedTokens[$nextstate]) &&
in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
if ($nextstate < self::YYNSTATE) {
// we need to shift a non-terminal
$this->yyidx++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
$x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
$this->yystack[$this->yyidx] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
if (!$token) {
// end of input: this is valid
return true;
}
// the last token was just ignored, we can't accept
// by ignoring input, this is in essence ignoring a
// syntax error!
return false;
} elseif ($nextstate === self::YY_NO_ACTION) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// input accepted, but not shifted (I guess)
return true;
} else {
$yyact = $nextstate;
}
} while (true);
}
break;
} while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
/**
* Find the appropriate action for a parser given the terminal
* look-ahead token iLookAhead.
*
* If the look-ahead token is YYNOCODE, then check to see if the action is
* independent of the look-ahead. If it is, return the action, otherwise
* return YY_NO_ACTION.
* @param int The look-ahead token
*/
function yy_find_shift_action($iLookAhead)
{
$stateno = $this->yystack[$this->yyidx]->stateno;
/* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
if (!isset(self::$yy_shift_ofst[$stateno])) {
// no shift actions
return self::$yy_default[$stateno];
}
$i = self::$yy_shift_ofst[$stateno];
if ($i === self::YY_SHIFT_USE_DFLT) {
return self::$yy_default[$stateno];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
self::$yy_lookahead[$i] != $iLookAhead) {
if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
&& ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
if (self::$yyTraceFILE) {
fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " .
$this->yyTokenName[$iLookAhead] . " => " .
$this->yyTokenName[$iFallback] . "\n");
}
return $this->yy_find_shift_action($iFallback);
}
return self::$yy_default[$stateno];
} else {
return self::$yy_action[$i];
}
}
/**
* Find the appropriate action for a parser given the non-terminal
* look-ahead token $iLookAhead.
*
* If the look-ahead token is self::YYNOCODE, then check to see if the action is
* independent of the look-ahead. If it is, return the action, otherwise
* return self::YY_NO_ACTION.
* @param int Current state number
* @param int The look-ahead token
*/
function yy_find_reduce_action($stateno, $iLookAhead)
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
if (!isset(self::$yy_reduce_ofst[$stateno])) {
return self::$yy_default[$stateno];
}
$i = self::$yy_reduce_ofst[$stateno];
if ($i == self::YY_REDUCE_USE_DFLT) {
return self::$yy_default[$stateno];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
self::$yy_lookahead[$i] != $iLookAhead) {
return self::$yy_default[$stateno];
} else {
return self::$yy_action[$i];
}
}
/**
* Perform a shift action.
* @param int The new state to shift in
* @param int The major token to shift in
* @param mixed the minor token to shift in
*/
function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
if ($this->yyidx >= self::YYSTACKDEPTH) {
$this->yyidx--;
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt);
}
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
/* Here code is inserted which will execute if the parser
** stack ever overflows */
return;
}
$yytos = new TP_yyStackEntry;
$yytos->stateno = $yyNewState;
$yytos->major = $yyMajor;
$yytos->minor = $yypMinor;
array_push($this->yystack, $yytos);
if (self::$yyTraceFILE && $this->yyidx > 0) {
fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt,
$yyNewState);
fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt);
for($i = 1; $i <= $this->yyidx; $i++) {
fprintf(self::$yyTraceFILE, " %s",
$this->yyTokenName[$this->yystack[$i]->major]);
}
fwrite(self::$yyTraceFILE,"\n");
}
}
/**
* The following table contains information about every rule that
* is used during the reduce.
*
* <pre>
* array(
* array(
* int $lhs; Symbol on the left-hand side of the rule
* int $nrhs; Number of right-hand side symbols in the rule
* ),...
* );
* </pre>
*/
static public $yyRuleInfo = array(
array( 'lhs' => 69, 'rhs' => 1 ),
array( 'lhs' => 70, 'rhs' => 1 ),
array( 'lhs' => 70, 'rhs' => 2 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 71, 'rhs' => 3 ),
array( 'lhs' => 71, 'rhs' => 3 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 71, 'rhs' => 3 ),
array( 'lhs' => 71, 'rhs' => 3 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 71, 'rhs' => 1 ),
array( 'lhs' => 72, 'rhs' => 4 ),
array( 'lhs' => 72, 'rhs' => 6 ),
array( 'lhs' => 72, 'rhs' => 4 ),
array( 'lhs' => 72, 'rhs' => 6 ),
array( 'lhs' => 72, 'rhs' => 6 ),
array( 'lhs' => 72, 'rhs' => 4 ),
array( 'lhs' => 72, 'rhs' => 5 ),
array( 'lhs' => 72, 'rhs' => 5 ),
array( 'lhs' => 72, 'rhs' => 5 ),
array( 'lhs' => 72, 'rhs' => 11 ),
array( 'lhs' => 84, 'rhs' => 2 ),
array( 'lhs' => 84, 'rhs' => 1 ),
array( 'lhs' => 72, 'rhs' => 8 ),
array( 'lhs' => 72, 'rhs' => 8 ),
array( 'lhs' => 76, 'rhs' => 2 ),
array( 'lhs' => 76, 'rhs' => 1 ),
array( 'lhs' => 76, 'rhs' => 0 ),
array( 'lhs' => 87, 'rhs' => 4 ),
array( 'lhs' => 82, 'rhs' => 1 ),
array( 'lhs' => 82, 'rhs' => 3 ),
array( 'lhs' => 81, 'rhs' => 4 ),
array( 'lhs' => 75, 'rhs' => 1 ),
array( 'lhs' => 75, 'rhs' => 1 ),
2009-05-14 10:53:28 +00:00
array( 'lhs' => 75, 'rhs' => 4 ),
2009-05-09 12:44:43 +00:00
array( 'lhs' => 75, 'rhs' => 3 ),
array( 'lhs' => 88, 'rhs' => 1 ),
array( 'lhs' => 88, 'rhs' => 1 ),
array( 'lhs' => 88, 'rhs' => 2 ),
array( 'lhs' => 88, 'rhs' => 3 ),
array( 'lhs' => 88, 'rhs' => 3 ),
array( 'lhs' => 89, 'rhs' => 1 ),
array( 'lhs' => 89, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 85, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 1 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 85, 'rhs' => 2 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 85, 'rhs' => 2 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 85, 'rhs' => 7 ),
array( 'lhs' => 85, 'rhs' => 4 ),
array( 'lhs' => 85, 'rhs' => 8 ),
array( 'lhs' => 85, 'rhs' => 3 ),
array( 'lhs' => 85, 'rhs' => 5 ),
array( 'lhs' => 85, 'rhs' => 6 ),
array( 'lhs' => 74, 'rhs' => 1 ),
array( 'lhs' => 74, 'rhs' => 4 ),
array( 'lhs' => 74, 'rhs' => 1 ),
array( 'lhs' => 74, 'rhs' => 3 ),
array( 'lhs' => 77, 'rhs' => 3 ),
array( 'lhs' => 95, 'rhs' => 2 ),
array( 'lhs' => 95, 'rhs' => 0 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 97, 'rhs' => 4 ),
array( 'lhs' => 97, 'rhs' => 3 ),
array( 'lhs' => 97, 'rhs' => 3 ),
array( 'lhs' => 97, 'rhs' => 2 ),
array( 'lhs' => 83, 'rhs' => 1 ),
array( 'lhs' => 83, 'rhs' => 2 ),
array( 'lhs' => 98, 'rhs' => 1 ),
array( 'lhs' => 98, 'rhs' => 3 ),
2009-04-08 14:47:28 +00:00
array( 'lhs' => 96, 'rhs' => 4 ),
array( 'lhs' => 94, 'rhs' => 1 ),
array( 'lhs' => 94, 'rhs' => 2 ),
array( 'lhs' => 99, 'rhs' => 3 ),
array( 'lhs' => 99, 'rhs' => 3 ),
array( 'lhs' => 99, 'rhs' => 5 ),
array( 'lhs' => 99, 'rhs' => 6 ),
array( 'lhs' => 99, 'rhs' => 2 ),
array( 'lhs' => 90, 'rhs' => 4 ),
array( 'lhs' => 92, 'rhs' => 4 ),
array( 'lhs' => 93, 'rhs' => 3 ),
array( 'lhs' => 93, 'rhs' => 1 ),
array( 'lhs' => 93, 'rhs' => 0 ),
array( 'lhs' => 78, 'rhs' => 3 ),
array( 'lhs' => 78, 'rhs' => 2 ),
array( 'lhs' => 79, 'rhs' => 2 ),
array( 'lhs' => 79, 'rhs' => 0 ),
array( 'lhs' => 100, 'rhs' => 2 ),
array( 'lhs' => 100, 'rhs' => 2 ),
array( 'lhs' => 80, 'rhs' => 1 ),
array( 'lhs' => 80, 'rhs' => 2 ),
array( 'lhs' => 80, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 1 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 2 ),
array( 'lhs' => 101, 'rhs' => 2 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 2 ),
array( 'lhs' => 101, 'rhs' => 2 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 101, 'rhs' => 3 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 102, 'rhs' => 1 ),
array( 'lhs' => 103, 'rhs' => 1 ),
array( 'lhs' => 103, 'rhs' => 1 ),
array( 'lhs' => 86, 'rhs' => 3 ),
array( 'lhs' => 104, 'rhs' => 1 ),
array( 'lhs' => 104, 'rhs' => 3 ),
array( 'lhs' => 104, 'rhs' => 0 ),
2009-04-10 14:31:23 +00:00
array( 'lhs' => 105, 'rhs' => 1 ),
array( 'lhs' => 105, 'rhs' => 3 ),
array( 'lhs' => 105, 'rhs' => 3 ),
array( 'lhs' => 91, 'rhs' => 2 ),
array( 'lhs' => 91, 'rhs' => 1 ),
array( 'lhs' => 106, 'rhs' => 3 ),
array( 'lhs' => 106, 'rhs' => 3 ),
array( 'lhs' => 106, 'rhs' => 2 ),
array( 'lhs' => 106, 'rhs' => 3 ),
array( 'lhs' => 106, 'rhs' => 1 ),
array( 'lhs' => 73, 'rhs' => 2 ),
array( 'lhs' => 73, 'rhs' => 1 ),
array( 'lhs' => 107, 'rhs' => 1 ),
array( 'lhs' => 107, 'rhs' => 1 ),
);
/**
* The following table contains a mapping of reduce action to method name
* that handles the reduction.
*
* If a rule is not set, it has no handler.
*/
static public $yyReduceMap = array(
0 => 0,
40 => 0,
2009-05-09 12:44:43 +00:00
46 => 0,
47 => 0,
49 => 0,
2009-05-09 12:44:43 +00:00
50 => 0,
51 => 0,
66 => 0,
130 => 0,
1 => 1,
36 => 1,
39 => 1,
2009-05-09 12:44:43 +00:00
44 => 1,
45 => 1,
78 => 1,
101 => 1,
137 => 1,
144 => 1,
145 => 1,
146 => 1,
2 => 2,
69 => 2,
136 => 2,
143 => 2,
3 => 3,
4 => 4,
5 => 5,
6 => 6,
7 => 7,
8 => 8,
9 => 9,
10 => 10,
11 => 11,
12 => 12,
13 => 13,
14 => 14,
15 => 15,
16 => 16,
17 => 17,
18 => 18,
19 => 19,
20 => 20,
21 => 21,
22 => 22,
23 => 23,
24 => 24,
25 => 25,
29 => 25,
93 => 25,
133 => 25,
26 => 26,
27 => 27,
28 => 28,
30 => 30,
31 => 31,
32 => 32,
33 => 33,
34 => 34,
35 => 35,
2009-05-09 12:44:43 +00:00
37 => 37,
38 => 38,
41 => 41,
2009-05-09 12:44:43 +00:00
42 => 42,
43 => 43,
48 => 48,
52 => 52,
53 => 53,
2009-05-09 12:44:43 +00:00
54 => 54,
56 => 54,
55 => 55,
57 => 57,
58 => 58,
59 => 59,
60 => 60,
61 => 61,
62 => 62,
63 => 63,
2009-05-09 12:44:43 +00:00
64 => 64,
65 => 65,
67 => 67,
68 => 68,
70 => 70,
98 => 70,
71 => 71,
2009-04-08 14:47:28 +00:00
72 => 72,
73 => 73,
74 => 74,
76 => 74,
75 => 75,
77 => 77,
79 => 79,
80 => 80,
81 => 81,
103 => 81,
82 => 82,
83 => 83,
2009-04-08 14:47:28 +00:00
84 => 84,
85 => 85,
86 => 86,
87 => 87,
88 => 88,
89 => 89,
90 => 90,
91 => 91,
92 => 92,
94 => 94,
95 => 95,
96 => 96,
97 => 97,
99 => 99,
100 => 100,
102 => 102,
104 => 104,
105 => 105,
108 => 105,
106 => 106,
107 => 107,
109 => 109,
110 => 110,
111 => 111,
116 => 111,
112 => 112,
115 => 112,
113 => 113,
118 => 113,
114 => 114,
117 => 114,
2009-04-08 14:47:28 +00:00
119 => 119,
120 => 120,
121 => 121,
122 => 122,
123 => 123,
124 => 124,
125 => 125,
126 => 126,
127 => 127,
128 => 128,
129 => 129,
131 => 131,
132 => 132,
134 => 134,
135 => 135,
138 => 138,
139 => 139,
140 => 140,
141 => 141,
142 => 142,
);
/* Beginning here are the reduction cases. A typical example
** follows:
** #line <lineno> <grammarfile>
** function yy_r0($yymsp){ ... } // User supplied code
** #line <lineno> <thisfile>
*/
#line 73 "internal.templateparser.y"
function yy_r0(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
#line 1843 "internal.templateparser.php"
#line 79 "internal.templateparser.y"
function yy_r1(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
#line 1846 "internal.templateparser.php"
#line 81 "internal.templateparser.y"
function yy_r2(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
#line 1849 "internal.templateparser.php"
#line 87 "internal.templateparser.y"
function yy_r3(){if ($this->compiler->has_code) {
$tmp =''; foreach ($this->prefix_code as $code) {$tmp.=$code;} $this->prefix_code=array();
$this->_retvalue = $this->cacher->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor, $this->compiler,$this->nocache,true);
} $this->nocache=false; }
#line 1855 "internal.templateparser.php"
#line 92 "internal.templateparser.y"
function yy_r4(){ $this->_retvalue = ''; }
#line 1858 "internal.templateparser.php"
#line 95 "internal.templateparser.y"
function yy_r5(){$this->_retvalue = $this->cacher->processNocacheCode($this->yystack[$this->yyidx + -1]->minor, $this->compiler,false,false); }
#line 1861 "internal.templateparser.php"
#line 97 "internal.templateparser.y"
function yy_r6(){$this->_retvalue = $this->cacher->processNocacheCode($this->smarty->left_delimiter, $this->compiler,false,false); }
#line 1864 "internal.templateparser.php"
#line 99 "internal.templateparser.y"
function yy_r7(){$this->_retvalue = $this->cacher->processNocacheCode($this->smarty->right_delimiter, $this->compiler,false,false); }
#line 1867 "internal.templateparser.php"
#line 101 "internal.templateparser.y"
function yy_r8(){if (!$this->template->security) {
$this->_retvalue = $this->cacher->processNocacheCode($this->yystack[$this->yyidx + 0]->minor, $this->compiler, false,true);
} elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_QUOTE) {
$this->_retvalue = $this->cacher->processNocacheCode(htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES), $this->compiler, false, false);
}elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_PASSTHRU || $this->smarty->security_policy->php_handling == SMARTY_PHP_ALLOW) {
$this->_retvalue = $this->cacher->processNocacheCode("<?php echo '".$this->yystack[$this->yyidx + 0]->minor."';?>\n", $this->compiler, false, false);
}elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_REMOVE) {
$this->_retvalue = '';
} }
#line 1878 "internal.templateparser.php"
#line 111 "internal.templateparser.y"
function yy_r9(){if (!$this->template->security) {
$this->_retvalue = $this->cacher->processNocacheCode('<?php '.$this->yystack[$this->yyidx + -1]->minor.' ?>', $this->compiler, false,true);
} elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_QUOTE) {
$this->_retvalue = $this->cacher->processNocacheCode(htmlspecialchars('<?php '.$this->yystack[$this->yyidx + -1]->minor.' ?>', ENT_QUOTES), $this->compiler, false, false);
}elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_PASSTHRU || $this->smarty->security_policy->php_handling == SMARTY_PHP_ALLOW) {
$this->_retvalue = $this->cacher->processNocacheCode("<?php echo '<?php ".$this->yystack[$this->yyidx + -1]->minor." ?>';?>\n", $this->compiler, false, false);
}elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_REMOVE) {
$this->_retvalue = '';
} }
#line 1889 "internal.templateparser.php"
#line 121 "internal.templateparser.y"
function yy_r10(){if (!$this->template->security) {
$this->_retvalue = $this->cacher->processNocacheCode($this->compiler->compileTag('print_expression',array('value'=>$this->yystack[$this->yyidx + -1]->minor)), $this->compiler, false,true);
} elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_QUOTE) {
$this->_retvalue = $this->cacher->processNocacheCode(htmlspecialchars('<?php '.t.' ?>', ENT_QUOTES), $this->compiler, false, false);
}elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_PASSTHRU || $this->smarty->security_policy->php_handling == SMARTY_PHP_ALLOW) {
$this->_retvalue = $this->cacher->processNocacheCode("<?php echo '<?php ".t." ?>';?>\n", $this->compiler, false, false);
}elseif ($this->smarty->security_policy->php_handling == SMARTY_PHP_REMOVE) {
$this->_retvalue = '';
} }
#line 1900 "internal.templateparser.php"
#line 131 "internal.templateparser.y"
function yy_r11(){$this->_retvalue = $this->cacher->processNocacheCode("<?php echo '".$this->yystack[$this->yyidx + 0]->minor."';?>\n", $this->compiler, true, true); }
#line 1903 "internal.templateparser.php"
#line 132 "internal.templateparser.y"
function yy_r12(){$this->_retvalue = $this->cacher->processNocacheCode("<?php echo '?>';?>\n", $this->compiler, true, true); }
#line 1906 "internal.templateparser.php"
#line 134 "internal.templateparser.y"
function yy_r13(){$this->_retvalue = $this->cacher->processNocacheCode($this->yystack[$this->yyidx + 0]->minor, $this->compiler,false,false); }
#line 1909 "internal.templateparser.php"
#line 141 "internal.templateparser.y"
function yy_r14(){ $this->_retvalue = $this->compiler->compileTag('print_expression',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); }
#line 1912 "internal.templateparser.php"
#line 143 "internal.templateparser.y"
function yy_r15(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor)); }
#line 1915 "internal.templateparser.php"
#line 145 "internal.templateparser.y"
function yy_r16(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor); }
#line 1918 "internal.templateparser.php"
#line 147 "internal.templateparser.y"
function yy_r17(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,array_merge(array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); }
#line 1921 "internal.templateparser.php"
#line 149 "internal.templateparser.y"
function yy_r18(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';
if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -3]->minor[0],'modifier')) {
$this->_retvalue .= "\$_smarty_tpl->smarty->plugin_handler->".$this->yystack[$this->yyidx + -3]->minor[0] . "(array(ob_get_clean()". $this->yystack[$this->yyidx + -2]->minor ."),'modifier');?>";
} else {
if ($this->yystack[$this->yyidx + -3]->minor[0] == 'isset' || $this->yystack[$this->yyidx + -3]->minor[0] == 'empty' || is_callable($this->yystack[$this->yyidx + -3]->minor[0])) {
if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -3]->minor[0], $this->compiler)) {
$this->_retvalue .= $this->yystack[$this->yyidx + -3]->minor[0] . "(ob_get_clean()". $this->yystack[$this->yyidx + -2]->minor .");?>";
}
} else {
$this->compiler->trigger_template_error ("unknown modifier \"" . $this->yystack[$this->yyidx + -3]->minor[0] . "\"");
}
}
}
#line 1936 "internal.templateparser.php"
#line 163 "internal.templateparser.y"
function yy_r19(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',$this->yystack[$this->yyidx + -1]->minor); }
#line 1939 "internal.templateparser.php"
#line 165 "internal.templateparser.y"
function yy_r20(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor)); }
#line 1942 "internal.templateparser.php"
#line 167 "internal.templateparser.y"
function yy_r21(){if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {
$this->compiler->trigger_template_error ("wrong syntax for tag \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
}
$this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }
#line 1948 "internal.templateparser.php"
#line 171 "internal.templateparser.y"
function yy_r22(){ if (!in_array($this->yystack[$this->yyidx + -3]->minor,array('if','elseif','while'))) {
$this->compiler->trigger_template_error ("wrong syntax for tag \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
}
$this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); }
#line 1954 "internal.templateparser.php"
#line 176 "internal.templateparser.y"
function yy_r23(){
if ($this->yystack[$this->yyidx + -9]->minor != 'for') {
$this->compiler->trigger_template_error ("wrong syntax for tag \"" . $this->yystack[$this->yyidx + -9]->minor . "\"");
}
$this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -9]->minor,array('start'=>$this->yystack[$this->yyidx + -7]->minor,'ifexp'=>$this->yystack[$this->yyidx + -5]->minor,'varloop'=>$this->yystack[$this->yyidx + -2]->minor,'loop'=>$this->yystack[$this->yyidx + -1]->minor)); }
#line 1961 "internal.templateparser.php"
2009-04-10 14:31:23 +00:00
#line 181 "internal.templateparser.y"
function yy_r24(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; }
#line 1964 "internal.templateparser.php"
#line 182 "internal.templateparser.y"
function yy_r25(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
#line 1967 "internal.templateparser.php"
#line 184 "internal.templateparser.y"
function yy_r26(){
if ($this->yystack[$this->yyidx + -6]->minor != 'foreach') {
$this->compiler->trigger_template_error ("wrong syntax for tag \"" . $this->yystack[$this->yyidx + -6]->minor . "\"");
}
$this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); }
#line 1974 "internal.templateparser.php"
#line 189 "internal.templateparser.y"
function yy_r27(){
if ($this->yystack[$this->yyidx + -6]->minor != 'foreach') {
$this->compiler->trigger_template_error ("wrong syntax for tag \"" . $this->yystack[$this->yyidx + -6]->minor . "\"");
}
$this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -6]->minor,array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); }
2009-05-14 10:53:28 +00:00
#line 1981 "internal.templateparser.php"
#line 199 "internal.templateparser.y"
function yy_r28(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); }
2009-05-14 10:53:28 +00:00
#line 1984 "internal.templateparser.php"
#line 203 "internal.templateparser.y"
function yy_r30(){ $this->_retvalue = array(); }
#line 1987 "internal.templateparser.php"
#line 206 "internal.templateparser.y"
function yy_r31(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
#line 1990 "internal.templateparser.php"
#line 211 "internal.templateparser.y"
function yy_r32(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
#line 1993 "internal.templateparser.php"
#line 212 "internal.templateparser.y"
function yy_r33(){ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; }
#line 1996 "internal.templateparser.php"
#line 214 "internal.templateparser.y"
function yy_r34(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor); }
#line 1999 "internal.templateparser.php"
#line 220 "internal.templateparser.y"
function yy_r35(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; }
#line 2002 "internal.templateparser.php"
2009-05-14 10:53:28 +00:00
#line 224 "internal.templateparser.y"
function yy_r37(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')'; }
#line 2005 "internal.templateparser.php"
#line 225 "internal.templateparser.y"
function yy_r38(){
if ($this->smarty->plugin_handler->loadSmartyPlugin($this->yystack[$this->yyidx + -1]->minor[0],'modifier')) {
$this->_retvalue = "\$_smarty_tpl->smarty->plugin_handler->".$this->yystack[$this->yyidx + -1]->minor[0] . "(array(". $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + 0]->minor ."),'modifier')";
} else {
if ($this->yystack[$this->yyidx + -1]->minor[0] == 'isset' || $this->yystack[$this->yyidx + -1]->minor[0] == 'empty' || is_callable($this->yystack[$this->yyidx + -1]->minor[0])) {
if (!$this->template->security || $this->smarty->security_handler->isTrustedModifier($this->yystack[$this->yyidx + -1]->minor[0], $this->compiler)) {
$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor[0] . "(". $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + 0]->minor .")";
}
} else {
$this->compiler->trigger_template_error ("unknown modifier \"" . $this->yystack[$this->yyidx + -1]->minor[0] . "\"");
}
}
}
2009-05-14 10:53:28 +00:00
#line 2020 "internal.templateparser.php"
#line 243 "internal.templateparser.y"
function yy_r41(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2023 "internal.templateparser.php"
#line 245 "internal.templateparser.y"
function yy_r42(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2026 "internal.templateparser.php"
#line 247 "internal.templateparser.y"
function yy_r43(){ $this->_retvalue = '('. $this->yystack[$this->yyidx + -2]->minor . ').(' . $this->yystack[$this->yyidx + 0]->minor. ')'; }
2009-05-14 10:53:28 +00:00
#line 2029 "internal.templateparser.php"
#line 264 "internal.templateparser.y"
function yy_r48(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2032 "internal.templateparser.php"
#line 273 "internal.templateparser.y"
function yy_r52(){ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")"; }
2009-05-14 10:53:28 +00:00
#line 2035 "internal.templateparser.php"
#line 276 "internal.templateparser.y"
function yy_r53(){ $this->_retvalue = "'".$this->yystack[$this->yyidx + -1]->minor."'"; }
2009-05-14 10:53:28 +00:00
#line 2038 "internal.templateparser.php"
#line 277 "internal.templateparser.y"
function yy_r54(){ $this->_retvalue = "''"; }
2009-05-14 10:53:28 +00:00
#line 2041 "internal.templateparser.php"
#line 279 "internal.templateparser.y"
function yy_r55(){ $this->_retvalue = "'".str_replace('\"','"',$this->yystack[$this->yyidx + -1]->minor)."'"; }
2009-05-14 10:53:28 +00:00
#line 2044 "internal.templateparser.php"
#line 283 "internal.templateparser.y"
function yy_r57(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor; }
#line 2047 "internal.templateparser.php"
#line 284 "internal.templateparser.y"
function yy_r58(){ $this->prefix_number++; $this->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -3]->minor .'\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -1]->minor .')'; }
#line 2050 "internal.templateparser.php"
#line 286 "internal.templateparser.y"
function yy_r59(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor.'::'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
#line 2053 "internal.templateparser.php"
#line 287 "internal.templateparser.y"
function yy_r60(){ $this->prefix_number++; $this->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -4]->minor .'\')->value;?>'; $this->_retvalue = $this->yystack[$this->yyidx + -7]->minor.'::$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -2]->minor .')'.$this->yystack[$this->yyidx + 0]->minor; }
#line 2056 "internal.templateparser.php"
#line 289 "internal.templateparser.y"
function yy_r61(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor; }
#line 2059 "internal.templateparser.php"
#line 291 "internal.templateparser.y"
function yy_r62(){ $this->_retvalue = $this->yystack[$this->yyidx + -4]->minor.'::$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
#line 2062 "internal.templateparser.php"
#line 293 "internal.templateparser.y"
function yy_r63(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.'::$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
#line 2065 "internal.templateparser.php"
#line 300 "internal.templateparser.y"
function yy_r64(){ if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('internal_smarty_var',$this->yystack[$this->yyidx + 0]->minor['index']);} else {
$this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['index']; $this->nocache=$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],"'"))->nocache;} }
2009-05-14 10:53:28 +00:00
#line 2069 "internal.templateparser.php"
#line 303 "internal.templateparser.y"
function yy_r65(){ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor; $this->nocache=$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"))->nocache; }
2009-05-14 10:53:28 +00:00
#line 2072 "internal.templateparser.php"
#line 307 "internal.templateparser.y"
function yy_r67(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')'; }
2009-05-14 10:53:28 +00:00
#line 2075 "internal.templateparser.php"
#line 310 "internal.templateparser.y"
function yy_r68(){$this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'index'=>$this->yystack[$this->yyidx + 0]->minor); }
2009-05-14 10:53:28 +00:00
#line 2078 "internal.templateparser.php"
#line 318 "internal.templateparser.y"
function yy_r70(){return; }
2009-05-14 10:53:28 +00:00
#line 2081 "internal.templateparser.php"
#line 322 "internal.templateparser.y"
function yy_r71(){ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']"; }
2009-05-14 10:53:28 +00:00
#line 2084 "internal.templateparser.php"
#line 323 "internal.templateparser.y"
function yy_r72(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]"; }
2009-05-14 10:53:28 +00:00
#line 2087 "internal.templateparser.php"
#line 324 "internal.templateparser.y"
function yy_r73(){ $this->_retvalue = "[".$this->yystack[$this->yyidx + 0]->minor."]"; }
2009-05-14 10:53:28 +00:00
#line 2090 "internal.templateparser.php"
#line 325 "internal.templateparser.y"
function yy_r74(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]"; }
2009-05-14 10:53:28 +00:00
#line 2093 "internal.templateparser.php"
#line 327 "internal.templateparser.y"
function yy_r75(){ $this->_retvalue = '['.$this->compiler->compileTag('internal_smarty_var','[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; }
2009-05-14 10:53:28 +00:00
#line 2096 "internal.templateparser.php"
#line 331 "internal.templateparser.y"
function yy_r77(){$this->_retvalue = ''; }
2009-05-14 10:53:28 +00:00
#line 2099 "internal.templateparser.php"
#line 339 "internal.templateparser.y"
function yy_r79(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2102 "internal.templateparser.php"
#line 341 "internal.templateparser.y"
function yy_r80(){$this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; }
2009-05-14 10:53:28 +00:00
#line 2105 "internal.templateparser.php"
#line 343 "internal.templateparser.y"
function yy_r81(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2108 "internal.templateparser.php"
#line 348 "internal.templateparser.y"
function yy_r82(){ $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->value'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; $this->nocache=$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"))->nocache; }
2009-05-14 10:53:28 +00:00
#line 2111 "internal.templateparser.php"
#line 350 "internal.templateparser.y"
function yy_r83(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
#line 2114 "internal.templateparser.php"
#line 352 "internal.templateparser.y"
function yy_r84(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
#line 2117 "internal.templateparser.php"
#line 354 "internal.templateparser.y"
function yy_r85(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
#line 2120 "internal.templateparser.php"
#line 355 "internal.templateparser.y"
function yy_r86(){ $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }
#line 2123 "internal.templateparser.php"
#line 356 "internal.templateparser.y"
function yy_r87(){ $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }
#line 2126 "internal.templateparser.php"
#line 357 "internal.templateparser.y"
function yy_r88(){ $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; }
#line 2129 "internal.templateparser.php"
#line 359 "internal.templateparser.y"
function yy_r89(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; }
#line 2132 "internal.templateparser.php"
#line 365 "internal.templateparser.y"
function yy_r90(){if (!$this->template->security || $this->smarty->security_handler->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
if ($this->yystack[$this->yyidx + -3]->minor == 'isset' || $this->yystack[$this->yyidx + -3]->minor == 'empty' || $this->yystack[$this->yyidx + -3]->minor == 'array' || is_callable($this->yystack[$this->yyidx + -3]->minor)) {
$this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $this->yystack[$this->yyidx + -1]->minor .")";
} else {
$this->compiler->trigger_template_error ("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
}
} }
2009-05-14 10:53:28 +00:00
#line 2141 "internal.templateparser.php"
#line 376 "internal.templateparser.y"
function yy_r91(){ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $this->yystack[$this->yyidx + -1]->minor .")"; }
2009-05-14 10:53:28 +00:00
#line 2144 "internal.templateparser.php"
#line 380 "internal.templateparser.y"
function yy_r92(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.",".$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2147 "internal.templateparser.php"
#line 384 "internal.templateparser.y"
function yy_r94(){ return; }
2009-05-14 10:53:28 +00:00
#line 2150 "internal.templateparser.php"
#line 389 "internal.templateparser.y"
function yy_r95(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor,true); }
2009-05-14 10:53:28 +00:00
#line 2153 "internal.templateparser.php"
#line 390 "internal.templateparser.y"
function yy_r96(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor,false); }
2009-05-14 10:53:28 +00:00
#line 2156 "internal.templateparser.php"
#line 397 "internal.templateparser.y"
function yy_r97(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2159 "internal.templateparser.php"
#line 401 "internal.templateparser.y"
function yy_r99(){$this->_retvalue = ','.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2162 "internal.templateparser.php"
#line 402 "internal.templateparser.y"
function yy_r100(){$this->_retvalue = ',\''.$this->yystack[$this->yyidx + 0]->minor.'\''; }
2009-05-14 10:53:28 +00:00
#line 2165 "internal.templateparser.php"
#line 409 "internal.templateparser.y"
function yy_r102(){$this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2168 "internal.templateparser.php"
#line 414 "internal.templateparser.y"
function yy_r104(){$this->_retvalue =$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2171 "internal.templateparser.php"
#line 415 "internal.templateparser.y"
function yy_r105(){$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2174 "internal.templateparser.php"
#line 416 "internal.templateparser.y"
function yy_r106(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2177 "internal.templateparser.php"
#line 417 "internal.templateparser.y"
function yy_r107(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2180 "internal.templateparser.php"
#line 419 "internal.templateparser.y"
function yy_r109(){$this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2183 "internal.templateparser.php"
#line 420 "internal.templateparser.y"
function yy_r110(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2186 "internal.templateparser.php"
#line 421 "internal.templateparser.y"
function yy_r111(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2189 "internal.templateparser.php"
#line 422 "internal.templateparser.y"
function yy_r112(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2192 "internal.templateparser.php"
#line 423 "internal.templateparser.y"
function yy_r113(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2195 "internal.templateparser.php"
#line 424 "internal.templateparser.y"
function yy_r114(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2198 "internal.templateparser.php"
#line 430 "internal.templateparser.y"
function yy_r119(){$this->_retvalue = '=='; }
2009-05-14 10:53:28 +00:00
#line 2201 "internal.templateparser.php"
#line 431 "internal.templateparser.y"
function yy_r120(){$this->_retvalue = '!='; }
2009-05-14 10:53:28 +00:00
#line 2204 "internal.templateparser.php"
#line 432 "internal.templateparser.y"
function yy_r121(){$this->_retvalue = '>'; }
2009-05-14 10:53:28 +00:00
#line 2207 "internal.templateparser.php"
#line 433 "internal.templateparser.y"
function yy_r122(){$this->_retvalue = '<'; }
2009-05-14 10:53:28 +00:00
#line 2210 "internal.templateparser.php"
#line 434 "internal.templateparser.y"
function yy_r123(){$this->_retvalue = '>='; }
2009-05-14 10:53:28 +00:00
#line 2213 "internal.templateparser.php"
#line 435 "internal.templateparser.y"
function yy_r124(){$this->_retvalue = '<='; }
2009-05-14 10:53:28 +00:00
#line 2216 "internal.templateparser.php"
#line 436 "internal.templateparser.y"
function yy_r125(){$this->_retvalue = '==='; }
2009-05-14 10:53:28 +00:00
#line 2219 "internal.templateparser.php"
#line 437 "internal.templateparser.y"
function yy_r126(){$this->_retvalue = '!=='; }
2009-05-14 10:53:28 +00:00
#line 2222 "internal.templateparser.php"
#line 439 "internal.templateparser.y"
function yy_r127(){$this->_retvalue = '&&'; }
2009-05-14 10:53:28 +00:00
#line 2225 "internal.templateparser.php"
#line 440 "internal.templateparser.y"
function yy_r128(){$this->_retvalue = '||'; }
2009-05-14 10:53:28 +00:00
#line 2228 "internal.templateparser.php"
#line 445 "internal.templateparser.y"
function yy_r129(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; }
2009-05-14 10:53:28 +00:00
#line 2231 "internal.templateparser.php"
#line 447 "internal.templateparser.y"
function yy_r131(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; }
2009-05-14 10:53:28 +00:00
#line 2234 "internal.templateparser.php"
#line 448 "internal.templateparser.y"
function yy_r132(){ return; }
2009-05-14 10:53:28 +00:00
#line 2237 "internal.templateparser.php"
#line 450 "internal.templateparser.y"
function yy_r134(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; }
#line 2240 "internal.templateparser.php"
#line 451 "internal.templateparser.y"
function yy_r135(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; }
#line 2243 "internal.templateparser.php"
#line 458 "internal.templateparser.y"
function yy_r138(){$this->_retvalue = "`".$this->yystack[$this->yyidx + -1]->minor."`"; }
#line 2246 "internal.templateparser.php"
#line 459 "internal.templateparser.y"
function yy_r139(){$this->_retvalue = "'.".$this->yystack[$this->yyidx + -1]->minor.".'"; }
#line 2249 "internal.templateparser.php"
#line 460 "internal.templateparser.y"
function yy_r140(){$this->_retvalue = "'.".'$_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + 0]->minor .'\')->value'.".'"; $this->nocache=$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,"'"))->nocache; }
#line 2252 "internal.templateparser.php"
#line 461 "internal.templateparser.y"
function yy_r141(){$this->_retvalue = "'.(".$this->yystack[$this->yyidx + -1]->minor.").'"; }
#line 2255 "internal.templateparser.php"
#line 462 "internal.templateparser.y"
function yy_r142(){$this->_retvalue = addcslashes($this->yystack[$this->yyidx + 0]->minor,"'"); }
#line 2258 "internal.templateparser.php"
/**
* placeholder for the left hand side in a reduce operation.
*
* For a parser with a rule like this:
* <pre>
* rule(A) ::= B. { A = 1; }
* </pre>
*
* The parser will translate to something like:
*
* <code>
* function yy_r0(){$this->_retvalue = 1;}
* </code>
*/
private $_retvalue;
/**
* Perform a reduce action and the shift that must immediately
* follow the reduce.
*
* For a rule such as:
*
* <pre>
* A ::= B blah C. { dosomething(); }
* </pre>
*
* This function will first call the action, if any, ("dosomething();" in our
* example), and then it will pop three states from the stack,
* one for each entry on the right-hand side of the expression
* (B, blah, and C in our example rule), and then push the result of the action
* back on to the stack with the resulting state reduced to (as described in the .out
* file)
* @param int Number of the rule by which to reduce
*/
function yy_reduce($yyruleno)
{
//int $yygoto; /* The next state */
//int $yyact; /* The next action */
//mixed $yygotominor; /* The LHS of the rule reduced */
//TP_yyStackEntry $yymsp; /* The top of the parser's stack */
//int $yysize; /* Amount to pop the stack */
$yymsp = $this->yystack[$this->yyidx];
if (self::$yyTraceFILE && $yyruleno >= 0
&& $yyruleno < count(self::$yyRuleName)) {
fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n",
self::$yyTracePrompt, $yyruleno,
self::$yyRuleName[$yyruleno]);
}
$this->_retvalue = $yy_lefthand_side = null;
if (array_key_exists($yyruleno, self::$yyReduceMap)) {
// call the action
$this->_retvalue = null;
$this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
$yy_lefthand_side = $this->_retvalue;
}
$yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
$yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
$this->yyidx -= $yysize;
for($i = $yysize; $i; $i--) {
// pop all of the right-hand side parameters
array_pop($this->yystack);
}
$yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
if ($yyact < self::YYNSTATE) {
/* If we are not debugging and the reduce action popped at least
** one element off the stack, then we can push the new element back
** onto the stack here, and skip the stack overflow test in yy_shift().
** That gives a significant speed improvement. */
if (!self::$yyTraceFILE && $yysize) {
$this->yyidx++;
$x = new TP_yyStackEntry;
$x->stateno = $yyact;
$x->major = $yygoto;
$x->minor = $yy_lefthand_side;
$this->yystack[$this->yyidx] = $x;
} else {
$this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
}
} elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
$this->yy_accept();
}
}
/**
* The following code executes when the parse fails
*
* Code from %parse_fail is inserted here
*/
function yy_parse_failed()
{
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt);
}
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
/* Here code is inserted which will be executed whenever the
** parser fails */
}
/**
* The following code executes when a syntax error first occurs.
*
* %syntax_error code is inserted here
* @param int The major type of the error token
* @param mixed The minor type of the error token
*/
function yy_syntax_error($yymajor, $TOKEN)
{
#line 55 "internal.templateparser.y"
$this->internalError = true;
$this->yymajor = $yymajor;
$this->compiler->trigger_template_error();
#line 2376 "internal.templateparser.php"
}
/**
* The following is executed when the parser accepts
*
* %parse_accept code is inserted here
*/
function yy_accept()
{
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt);
}
while ($this->yyidx >= 0) {
$stack = $this->yy_pop_parser_stack();
}
/* Here code is inserted which will be executed whenever the
** parser accepts */
#line 47 "internal.templateparser.y"
$this->successful = !$this->internalError;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
//echo $this->retvalue."\n\n";
#line 2401 "internal.templateparser.php"
}
/**
* The main parser program.
*
* The first argument is the major token number. The second is
* the token value string as scanned from the input.
*
* @param int the token number
* @param mixed the token value
* @param mixed any extra arguments that should be passed to handlers
*/
function doParse($yymajor, $yytokenvalue)
{
// $yyact; /* The parser action. */
// $yyendofinput; /* True if we are at the end of input */
$yyerrorhit = 0; /* True if yymajor has invoked an error */
/* (re)initialize the parser, if necessary */
if ($this->yyidx === null || $this->yyidx < 0) {
/* if ($yymajor == 0) return; // not sure why this was here... */
$this->yyidx = 0;
$this->yyerrcnt = -1;
$x = new TP_yyStackEntry;
$x->stateno = 0;
$x->major = 0;
$this->yystack = array();
array_push($this->yystack, $x);
}
$yyendofinput = ($yymajor==0);
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sInput %s\n",
self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
}
do {
$yyact = $this->yy_find_shift_action($yymajor);
if ($yymajor < self::YYERRORSYMBOL &&
!$this->yy_is_expected_token($yymajor)) {
// force a syntax error
$yyact = self::YY_ERROR_ACTION;
}
if ($yyact < self::YYNSTATE) {
$this->yy_shift($yyact, $yymajor, $yytokenvalue);
$this->yyerrcnt--;
if ($yyendofinput && $this->yyidx >= 0) {
$yymajor = 0;
} else {
$yymajor = self::YYNOCODE;
}
} elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
$this->yy_reduce($yyact - self::YYNSTATE);
} elseif ($yyact == self::YY_ERROR_ACTION) {
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sSyntax Error!\n",
self::$yyTracePrompt);
}
if (self::YYERRORSYMBOL) {
/* A syntax error has occurred.
** The response to an error depends upon whether or not the
** grammar defines an error token "ERROR".
**
** This is what we do if the grammar does define ERROR:
**
** * Call the %syntax_error function.
**
** * Begin popping the stack until we enter a state where
** it is legal to shift the error symbol, then shift
** the error symbol.
**
** * Set the error count to three.
**
** * Begin accepting and shifting new tokens. No new error
** processing will occur until three tokens have been
** shifted successfully.
**
*/
if ($this->yyerrcnt < 0) {
$this->yy_syntax_error($yymajor, $yytokenvalue);
}
$yymx = $this->yystack[$this->yyidx]->major;
if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){
if (self::$yyTraceFILE) {
fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n",
self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
}
$this->yy_destructor($yymajor, $yytokenvalue);
$yymajor = self::YYNOCODE;
} else {
while ($this->yyidx >= 0 &&
$yymx != self::YYERRORSYMBOL &&
($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
){
$this->yy_pop_parser_stack();
}
if ($this->yyidx < 0 || $yymajor==0) {
$this->yy_destructor($yymajor, $yytokenvalue);
$this->yy_parse_failed();
$yymajor = self::YYNOCODE;
} elseif ($yymx != self::YYERRORSYMBOL) {
$u2 = 0;
$this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
}
}
$this->yyerrcnt = 3;
$yyerrorhit = 1;
} else {
/* YYERRORSYMBOL is not defined */
/* This is what we do if the grammar does not define ERROR:
**
** * Report an error message, and throw away the input token.
**
** * If the input token is $, then fail the parse.
**
** As before, subsequent error messages are suppressed until
** three input tokens have been successfully shifted.
*/
if ($this->yyerrcnt <= 0) {
$this->yy_syntax_error($yymajor, $yytokenvalue);
}
$this->yyerrcnt = 3;
$this->yy_destructor($yymajor, $yytokenvalue);
if ($yyendofinput) {
$this->yy_parse_failed();
}
$yymajor = self::YYNOCODE;
}
} else {
$this->yy_accept();
$yymajor = self::YYNOCODE;
}
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
}
}