+ */
+class Smarty_Internal_Templateparser
{
- #line 15 "smarty_internal_templateparser.y"
+ // line 23 "../smarty/lexer/smarty_internal_templateparser.y"
+ const ERR1 = 'Security error: Call to private object member not allowed';
+ const ERR2 = 'Security error: Call to dynamic object member not allowed';
+ const ERR3 = 'PHP in template not allowed. Use SmartyBC to enable it';
+ const TP_VERT = 1;
+ const TP_COLON = 2;
+ const TP_PHP = 3;
+ const TP_TEXT = 4;
+ const TP_STRIPON = 5;
+ const TP_STRIPOFF = 6;
+ const TP_LITERALSTART = 7;
+ const TP_LITERALEND = 8;
+ const TP_LITERAL = 9;
+ const TP_SIMPELOUTPUT = 10;
+ const TP_SIMPLETAG = 11;
+ const TP_SMARTYBLOCKCHILDPARENT = 12;
+ const TP_LDEL = 13;
+ const TP_RDEL = 14;
+ const TP_DOLLARID = 15;
+ const TP_EQUAL = 16;
+ const TP_ID = 17;
+ const TP_PTR = 18;
+ const TP_LDELMAKENOCACHE = 19;
+ const TP_LDELIF = 20;
+ const TP_LDELFOR = 21;
+ const TP_SEMICOLON = 22;
+ const TP_INCDEC = 23;
+ const TP_TO = 24;
+ const TP_STEP = 25;
+ const TP_LDELFOREACH = 26;
+ const TP_SPACE = 27;
+ const TP_AS = 28;
+ const TP_APTR = 29;
+ const TP_LDELSETFILTER = 30;
+ const TP_CLOSETAG = 31;
+ const TP_LDELSLASH = 32;
+ const TP_ATTR = 33;
+ const TP_INTEGER = 34;
+ const TP_COMMA = 35;
+ const TP_OPENP = 36;
+ const TP_CLOSEP = 37;
+ const TP_MATH = 38;
+ const TP_UNIMATH = 39;
+ const TP_ISIN = 40;
+ const TP_QMARK = 41;
+ const TP_NOT = 42;
+ const TP_TYPECAST = 43;
+ const TP_HEX = 44;
+ const TP_DOT = 45;
+ const TP_INSTANCEOF = 46;
+ const TP_SINGLEQUOTESTRING = 47;
+ const TP_DOUBLECOLON = 48;
+ const TP_NAMESPACE = 49;
+ const TP_AT = 50;
+ const TP_HATCH = 51;
+ const TP_OPENB = 52;
+ const TP_CLOSEB = 53;
+ const TP_DOLLAR = 54;
+ const TP_LOGOP = 55;
+ const TP_SLOGOP = 56;
+ const TP_TLOGOP = 57;
+ const TP_SINGLECOND = 58;
+ const TP_ARRAYOPEN = 59;
+ const TP_QUOTE = 60;
+ const TP_BACKTICK = 61;
+ const YY_NO_ACTION = 516;
+ const YY_ACCEPT_ACTION = 515;
+ const YY_ERROR_ACTION = 514;
+ const YY_SZ_ACTTAB = 2071;
+ const YY_SHIFT_USE_DFLT = -31;
+ const YY_SHIFT_MAX = 230;
+ const YY_REDUCE_USE_DFLT = -91;
+ const YY_REDUCE_MAX = 178;
+ const YYNOCODE = 110;
+ const YYSTACKDEPTH = 500;
+ const YYNSTATE = 327;
+ const YYNRULE = 187;
+ const YYERRORSYMBOL = 62;
+ const YYERRSYMDT = 'yy0';
+ const YYFALLBACK = 0;
- const Err1 = "Security error: Call to private object member not allowed";
- const Err2 = "Security error: Call to dynamic object member not allowed";
- const Err3 = "PHP in template not allowed. Use SmartyBC to enable it";
- // states whether the parse was successful or not
- public $successful = true;
- public $retvalue = 0;
- public static $prefix_number = 0;
- private $lex;
- private $internalError = false;
- private $strip = false;
-
- function __construct($lex, $compiler)
- {
- $this->lex = $lex;
- $this->compiler = $compiler;
- $this->smarty = $this->compiler->smarty;
- $this->template = $this->compiler->template;
- $this->compiler->has_variable_string = false;
- $this->compiler->prefix_code = array();
- $this->block_nesting_level = 0;
- if ($this->security = isset($this->smarty->security_policy)) {
- $this->php_handling = $this->smarty->security_policy->php_handling;
- } else {
- $this->php_handling = $this->smarty->php_handling;
- }
- $this->is_xml = false;
- $this->asp_tags = (ini_get('asp_tags') != '0');
- $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this);
- }
-
- public static function escape_start_tag($tag_text)
- {
- $tag = preg_replace('/\A<\?(.*)\z/', '<?\1', $tag_text, - 1, $count); //Escape tag
- return $tag;
- }
-
- public static function escape_end_tag($tag_text)
- {
- return '?>';
- }
-
- public function compileVariable($variable)
- {
- if (strpos($variable, '(') == 0) {
- // not a variable variable
- $var = trim($variable, '\'');
- $this->compiler->tag_nocache = $this->compiler->tag_nocache | $this->template->getVariable($var, null, true, false)->nocache;
- $this->template->properties['variables'][$var] = $this->compiler->tag_nocache | $this->compiler->nocache;
- }
- // return '(isset($_smarty_tpl->tpl_vars['. $variable .'])?$_smarty_tpl->tpl_vars['. $variable .']->value:$_smarty_tpl->getVariable('. $variable .')->value)';
- return '$_smarty_tpl->tpl_vars[' . $variable . ']->value';
- }
-
- #line 133 "smarty_internal_templateparser.php"
-
- const TP_VERT = 1;
- const TP_COLON = 2;
- const TP_RDEL = 3;
- const TP_COMMENT = 4;
- const TP_PHPSTARTTAG = 5;
- const TP_PHPENDTAG = 6;
- const TP_ASPSTARTTAG = 7;
- const TP_ASPENDTAG = 8;
- const TP_FAKEPHPSTARTTAG = 9;
- const TP_XMLTAG = 10;
- const TP_TEXT = 11;
- const TP_STRIPON = 12;
- const TP_STRIPOFF = 13;
- const TP_BLOCKSOURCE = 14;
- const TP_LITERALSTART = 15;
- const TP_LITERALEND = 16;
- const TP_LITERAL = 17;
- const TP_LDEL = 18;
- const TP_DOLLAR = 19;
- const TP_ID = 20;
- const TP_EQUAL = 21;
- const TP_PTR = 22;
- const TP_LDELIF = 23;
- const TP_LDELFOR = 24;
- const TP_SEMICOLON = 25;
- const TP_INCDEC = 26;
- const TP_TO = 27;
- const TP_STEP = 28;
- const TP_LDELFOREACH = 29;
- const TP_SPACE = 30;
- const TP_AS = 31;
- const TP_APTR = 32;
- const TP_LDELSETFILTER = 33;
- const TP_SMARTYBLOCKCHILDPARENT = 34;
- const TP_LDELSLASH = 35;
- const TP_ATTR = 36;
- const TP_INTEGER = 37;
- const TP_COMMA = 38;
- const TP_OPENP = 39;
- const TP_CLOSEP = 40;
- const TP_MATH = 41;
- const TP_UNIMATH = 42;
- const TP_ANDSYM = 43;
- const TP_ISIN = 44;
- const TP_ISDIVBY = 45;
- const TP_ISNOTDIVBY = 46;
- const TP_ISEVEN = 47;
- const TP_ISNOTEVEN = 48;
- const TP_ISEVENBY = 49;
- const TP_ISNOTEVENBY = 50;
- const TP_ISODD = 51;
- const TP_ISNOTODD = 52;
- const TP_ISODDBY = 53;
- const TP_ISNOTODDBY = 54;
- const TP_INSTANCEOF = 55;
- const TP_QMARK = 56;
- const TP_NOT = 57;
- const TP_TYPECAST = 58;
- const TP_HEX = 59;
- const TP_DOT = 60;
- const TP_SINGLEQUOTESTRING = 61;
- const TP_DOUBLECOLON = 62;
- const TP_AT = 63;
- const TP_HATCH = 64;
- const TP_OPENB = 65;
- const TP_CLOSEB = 66;
- const TP_EQUALS = 67;
- const TP_NOTEQUALS = 68;
- const TP_GREATERTHAN = 69;
- const TP_LESSTHAN = 70;
- const TP_GREATEREQUAL = 71;
- const TP_LESSEQUAL = 72;
- const TP_IDENTITY = 73;
- const TP_NONEIDENTITY = 74;
- const TP_MOD = 75;
- const TP_LAND = 76;
- const TP_LOR = 77;
- const TP_LXOR = 78;
- const TP_QUOTE = 79;
- const TP_BACKTICK = 80;
- const TP_DOLLARID = 81;
- const YY_NO_ACTION = 570;
- const YY_ACCEPT_ACTION = 569;
- const YY_ERROR_ACTION = 568;
-
- const YY_SZ_ACTTAB = 2407;
- static public $yy_action = array(
- /* 0 */
- 219, 309, 305, 301, 302, 303, 304, 310, 311, 317,
- /* 10 */
- 318, 319, 201, 30, 273, 9, 33, 238, 280, 15,
- /* 20 */
- 5, 108, 235, 234, 220, 7, 126, 42, 30, 30,
- /* 30 */
- 259, 211, 256, 495, 15, 15, 10, 33, 495, 280,
- /* 40 */
- 46, 47, 51, 45, 24, 14, 352, 353, 39, 37,
- /* 50 */
- 278, 359, 12, 25, 219, 219, 326, 434, 219, 192,
- /* 60 */
- 434, 569, 95, 263, 227, 306, 360, 361, 358, 357,
- /* 70 */
- 354, 355, 356, 342, 341, 328, 329, 330, 292, 219,
- /* 80 */
- 202, 322, 242, 30, 434, 231, 207, 434, 143, 15,
- /* 90 */
- 434, 35, 158, 434, 46, 47, 51, 45, 24, 14,
- /* 100 */
- 352, 353, 39, 37, 278, 359, 12, 25, 219, 48,
- /* 110 */
- 32, 219, 48, 391, 196, 2, 31, 138, 321, 4,
- /* 120 */
- 360, 361, 358, 357, 354, 355, 356, 342, 341, 328,
- /* 130 */
- 329, 330, 127, 48, 290, 349, 251, 30, 145, 140,
- /* 140 */
- 30, 207, 264, 15, 200, 322, 15, 334, 46, 47,
- /* 150 */
- 51, 45, 24, 14, 352, 353, 39, 37, 278, 359,
- /* 160 */
- 12, 25, 219, 289, 219, 48, 431, 297, 219, 33,
- /* 170 */
- 396, 280, 18, 191, 360, 361, 358, 357, 354, 355,
- /* 180 */
- 356, 342, 341, 328, 329, 330, 300, 285, 286, 287,
- /* 190 */
- 299, 206, 219, 431, 428, 194, 201, 315, 314, 431,
- /* 200 */
- 207, 281, 46, 47, 51, 45, 24, 14, 352, 353,
- /* 210 */
- 39, 37, 278, 359, 12, 25, 219, 33, 48, 280,
- /* 220 */
- 34, 30, 48, 197, 322, 276, 158, 15, 360, 361,
- /* 230 */
- 358, 357, 354, 355, 356, 342, 341, 328, 329, 330,
- /* 240 */
- 230, 338, 16, 289, 103, 179, 244, 219, 295, 2,
- /* 250 */
- 41, 33, 265, 280, 283, 148, 46, 47, 51, 45,
- /* 260 */
- 24, 14, 352, 353, 39, 37, 278, 359, 12, 25,
- /* 270 */
- 219, 207, 145, 43, 132, 189, 109, 333, 307, 227,
- /* 280 */
- 306, 190, 360, 361, 358, 357, 354, 355, 356, 342,
- /* 290 */
- 341, 328, 329, 330, 20, 22, 248, 339, 219, 99,
- /* 300 */
- 174, 48, 324, 33, 346, 280, 18, 288, 207, 283,
- /* 310 */
- 46, 47, 51, 45, 24, 14, 352, 353, 39, 37,
- /* 320 */
- 278, 359, 12, 25, 219, 289, 207, 30, 41, 110,
- /* 330 */
- 275, 2, 41, 15, 272, 266, 360, 361, 358, 357,
- /* 340 */
- 354, 355, 356, 342, 341, 328, 329, 330, 242, 40,
- /* 350 */
- 236, 347, 104, 177, 145, 219, 44, 316, 148, 135,
- /* 360 */
- 228, 27, 283, 269, 46, 47, 51, 45, 24, 14,
- /* 370 */
- 352, 353, 39, 37, 278, 359, 12, 25, 219, 207,
- /* 380 */
- 208, 33, 7, 280, 245, 239, 136, 173, 241, 279,
- /* 390 */
- 360, 361, 358, 357, 354, 355, 356, 342, 341, 328,
- /* 400 */
- 329, 330, 29, 158, 106, 13, 122, 171, 181, 6,
- /* 410 */
- 33, 15, 226, 33, 219, 237, 283, 283, 46, 47,
- /* 420 */
- 51, 45, 24, 14, 352, 353, 39, 37, 278, 359,
- /* 430 */
- 12, 25, 219, 205, 205, 252, 313, 238, 312, 235,
- /* 440 */
- 232, 195, 97, 127, 360, 361, 358, 357, 354, 355,
- /* 450 */
- 356, 342, 341, 328, 329, 330, 28, 320, 230, 105,
- /* 460 */
- 182, 164, 176, 33, 279, 254, 282, 186, 207, 283,
- /* 470 */
- 283, 253, 46, 47, 51, 45, 24, 14, 352, 353,
- /* 480 */
- 39, 37, 278, 359, 12, 25, 219, 205, 260, 107,
- /* 490 */
- 235, 262, 33, 193, 214, 332, 166, 198, 360, 361,
- /* 500 */
- 358, 357, 354, 355, 356, 342, 341, 328, 329, 330,
- /* 510 */
- 137, 175, 167, 291, 308, 344, 185, 261, 267, 161,
- /* 520 */
- 283, 283, 128, 337, 124, 283, 46, 47, 51, 45,
- /* 530 */
- 24, 14, 352, 353, 39, 37, 278, 359, 12, 25,
- /* 540 */
- 219, 38, 205, 203, 141, 169, 257, 134, 35, 130,
- /* 550 */
- 156, 114, 360, 361, 358, 357, 354, 355, 356, 342,
- /* 560 */
- 341, 328, 329, 330, 320, 158, 320, 241, 36, 293,
- /* 570 */
- 298, 94, 21, 26, 284, 219, 292, 168, 271, 162,
- /* 580 */
- 46, 47, 51, 45, 24, 14, 352, 353, 39, 37,
- /* 590 */
- 278, 359, 12, 25, 219, 279, 229, 205, 44, 281,
- /* 600 */
- 187, 17, 270, 331, 98, 127, 360, 361, 358, 357,
- /* 610 */
- 354, 355, 356, 342, 341, 328, 329, 330, 199, 320,
- /* 620 */
- 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
- /* 630 */
- 331, 331, 331, 331, 46, 47, 51, 45, 24, 14,
- /* 640 */
- 352, 353, 39, 37, 278, 359, 12, 25, 219, 331,
- /* 650 */
- 268, 331, 331, 331, 331, 331, 331, 331, 125, 115,
- /* 660 */
- 360, 361, 358, 357, 354, 355, 356, 342, 341, 328,
- /* 670 */
- 329, 330, 279, 331, 320, 331, 331, 331, 331, 331,
- /* 680 */
- 331, 331, 331, 331, 331, 331, 331, 331, 46, 47,
- /* 690 */
- 51, 45, 24, 14, 352, 353, 39, 37, 278, 359,
- /* 700 */
- 12, 25, 219, 331, 204, 331, 331, 331, 331, 331,
- /* 710 */
- 331, 159, 100, 116, 360, 361, 358, 357, 354, 355,
- /* 720 */
- 356, 342, 341, 328, 329, 330, 320, 320, 320, 331,
- /* 730 */
- 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
- /* 740 */
- 331, 331, 46, 47, 51, 45, 24, 14, 352, 353,
- /* 750 */
- 39, 37, 278, 359, 12, 25, 219, 331, 331, 331,
- /* 760 */
- 331, 331, 331, 331, 331, 102, 117, 331, 360, 361,
- /* 770 */
- 358, 357, 354, 355, 356, 342, 341, 328, 329, 330,
- /* 780 */
- 320, 320, 331, 331, 331, 331, 331, 331, 331, 331,
- /* 790 */
- 331, 331, 331, 331, 331, 331, 46, 47, 51, 45,
- /* 800 */
- 24, 14, 352, 353, 39, 37, 278, 359, 12, 25,
- /* 810 */
- 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
- /* 820 */
- 158, 331, 360, 361, 358, 357, 354, 355, 356, 342,
- /* 830 */
- 341, 328, 329, 330, 331, 331, 331, 331, 46, 47,
- /* 840 */
- 51, 45, 24, 14, 352, 353, 39, 37, 278, 359,
- /* 850 */
- 12, 25, 331, 331, 331, 331, 331, 331, 211, 331,
- /* 860 */
- 331, 331, 331, 10, 360, 361, 358, 357, 354, 355,
- /* 870 */
- 356, 342, 341, 328, 329, 330, 331, 331, 331, 331,
- /* 880 */
- 331, 331, 331, 9, 142, 212, 331, 331, 5, 108,
- /* 890 */
- 331, 246, 331, 331, 126, 157, 183, 331, 259, 123,
- /* 900 */
- 256, 331, 250, 331, 23, 283, 331, 52, 277, 331,
- /* 910 */
- 331, 255, 350, 348, 331, 345, 331, 279, 180, 178,
- /* 920 */
- 331, 331, 49, 50, 296, 240, 351, 283, 283, 106,
- /* 930 */
- 1, 274, 331, 147, 331, 331, 331, 331, 331, 279,
- /* 940 */
- 279, 9, 144, 92, 96, 233, 5, 108, 331, 345,
- /* 950 */
- 331, 331, 126, 331, 331, 246, 259, 323, 256, 146,
- /* 960 */
- 250, 331, 23, 123, 184, 52, 331, 331, 331, 331,
- /* 970 */
- 246, 331, 343, 283, 153, 255, 350, 348, 123, 345,
- /* 980 */
- 49, 50, 296, 240, 351, 279, 331, 106, 1, 331,
- /* 990 */
- 255, 350, 348, 331, 345, 33, 331, 280, 331, 9,
- /* 1000 */
- 142, 224, 96, 331, 5, 108, 331, 30, 331, 247,
- /* 1010 */
- 126, 246, 331, 15, 259, 149, 256, 331, 250, 123,
- /* 1020 */
- 23, 331, 331, 52, 331, 331, 331, 331, 331, 331,
- /* 1030 */
- 331, 255, 350, 348, 331, 345, 331, 331, 49, 50,
- /* 1040 */
- 296, 240, 351, 331, 331, 106, 1, 331, 331, 331,
- /* 1050 */
- 331, 331, 33, 331, 280, 331, 331, 9, 135, 224,
- /* 1060 */
- 96, 331, 5, 108, 30, 246, 258, 331, 126, 151,
- /* 1070 */
- 15, 246, 259, 123, 256, 154, 250, 331, 11, 123,
- /* 1080 */
- 331, 52, 331, 331, 331, 255, 350, 348, 331, 345,
- /* 1090 */
- 331, 255, 350, 348, 331, 345, 49, 50, 296, 240,
- /* 1100 */
- 351, 331, 331, 106, 1, 331, 331, 331, 331, 331,
- /* 1110 */
- 331, 331, 331, 331, 331, 9, 142, 210, 96, 331,
- /* 1120 */
- 5, 108, 331, 331, 331, 331, 126, 246, 331, 331,
- /* 1130 */
- 259, 155, 256, 331, 216, 123, 23, 331, 331, 52,
- /* 1140 */
- 331, 331, 331, 331, 331, 331, 331, 255, 350, 348,
- /* 1150 */
- 331, 345, 331, 331, 49, 50, 296, 240, 351, 331,
- /* 1160 */
- 331, 106, 1, 331, 331, 331, 331, 331, 331, 331,
- /* 1170 */
- 331, 331, 331, 9, 131, 224, 96, 331, 5, 108,
- /* 1180 */
- 331, 331, 331, 331, 126, 246, 331, 331, 259, 152,
- /* 1190 */
- 256, 331, 250, 123, 3, 331, 331, 52, 331, 331,
- /* 1200 */
- 331, 331, 331, 331, 331, 255, 350, 348, 331, 345,
- /* 1210 */
- 331, 331, 49, 50, 296, 240, 351, 331, 331, 106,
- /* 1220 */
- 1, 331, 331, 331, 331, 331, 331, 331, 331, 331,
- /* 1230 */
- 331, 9, 142, 213, 96, 331, 5, 108, 331, 331,
- /* 1240 */
- 331, 331, 126, 246, 331, 331, 259, 150, 256, 331,
- /* 1250 */
- 250, 123, 23, 331, 331, 52, 331, 331, 331, 331,
- /* 1260 */
- 331, 331, 331, 255, 350, 348, 331, 345, 331, 331,
- /* 1270 */
- 49, 50, 296, 240, 351, 331, 331, 106, 1, 331,
- /* 1280 */
- 219, 331, 401, 331, 331, 331, 331, 331, 331, 9,
- /* 1290 */
- 142, 209, 96, 331, 5, 108, 331, 331, 331, 331,
- /* 1300 */
- 126, 249, 331, 331, 259, 331, 256, 331, 250, 30,
- /* 1310 */
- 23, 190, 163, 52, 331, 15, 331, 331, 2, 331,
- /* 1320 */
- 331, 283, 331, 331, 20, 22, 331, 331, 49, 50,
- /* 1330 */
- 296, 240, 351, 331, 331, 106, 1, 331, 207, 331,
- /* 1340 */
- 331, 145, 331, 331, 331, 432, 331, 9, 139, 224,
- /* 1350 */
- 96, 331, 5, 108, 331, 331, 331, 331, 126, 331,
- /* 1360 */
- 331, 331, 259, 243, 256, 331, 250, 331, 23, 190,
- /* 1370 */
- 188, 52, 432, 331, 331, 331, 331, 331, 432, 283,
- /* 1380 */
- 331, 2, 20, 22, 331, 331, 49, 50, 296, 240,
- /* 1390 */
- 351, 331, 331, 106, 1, 331, 207, 331, 331, 331,
- /* 1400 */
- 331, 331, 331, 331, 145, 9, 135, 224, 96, 331,
- /* 1410 */
- 5, 108, 331, 331, 331, 331, 126, 331, 331, 331,
- /* 1420 */
- 259, 331, 256, 331, 250, 331, 11, 101, 160, 52,
- /* 1430 */
- 331, 331, 331, 331, 331, 331, 331, 283, 331, 331,
- /* 1440 */
- 20, 22, 331, 331, 49, 50, 296, 240, 351, 331,
- /* 1450 */
- 331, 106, 331, 331, 207, 331, 331, 331, 331, 331,
- /* 1460 */
- 331, 331, 331, 9, 135, 225, 96, 331, 5, 108,
- /* 1470 */
- 331, 331, 331, 331, 126, 331, 331, 331, 259, 331,
- /* 1480 */
- 256, 331, 250, 331, 11, 331, 477, 52, 331, 331,
- /* 1490 */
- 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
- /* 1500 */
- 331, 331, 49, 50, 296, 240, 351, 331, 477, 106,
- /* 1510 */
- 477, 477, 331, 477, 477, 331, 331, 331, 331, 477,
- /* 1520 */
- 331, 477, 2, 477, 96, 331, 331, 331, 331, 331,
- /* 1530 */
- 331, 331, 331, 331, 331, 246, 331, 331, 477, 120,
- /* 1540 */
- 331, 331, 84, 123, 331, 145, 331, 331, 331, 477,
- /* 1550 */
- 331, 294, 327, 331, 331, 255, 350, 348, 331, 345,
- /* 1560 */
- 331, 331, 331, 477, 331, 331, 331, 246, 331, 218,
- /* 1570 */
- 362, 120, 331, 331, 84, 123, 331, 331, 331, 331,
- /* 1580 */
- 331, 331, 331, 294, 327, 331, 331, 255, 350, 348,
- /* 1590 */
- 246, 345, 331, 331, 129, 331, 331, 61, 119, 232,
- /* 1600 */
- 331, 246, 335, 331, 331, 129, 294, 327, 80, 123,
- /* 1610 */
- 255, 350, 348, 331, 345, 331, 331, 294, 327, 331,
- /* 1620 */
- 331, 255, 350, 348, 331, 345, 246, 331, 331, 331,
- /* 1630 */
- 129, 331, 215, 80, 123, 331, 331, 331, 331, 331,
- /* 1640 */
- 331, 331, 294, 327, 331, 331, 255, 350, 348, 331,
- /* 1650 */
- 345, 331, 331, 331, 246, 190, 170, 221, 129, 331,
- /* 1660 */
- 331, 55, 119, 133, 331, 283, 331, 331, 20, 22,
- /* 1670 */
- 294, 327, 331, 331, 255, 350, 348, 246, 345, 331,
- /* 1680 */
- 331, 129, 207, 331, 80, 123, 331, 331, 331, 331,
- /* 1690 */
- 331, 331, 331, 294, 327, 331, 246, 255, 350, 348,
- /* 1700 */
- 129, 345, 331, 89, 123, 331, 331, 331, 223, 331,
- /* 1710 */
- 331, 331, 294, 327, 331, 331, 255, 350, 348, 246,
- /* 1720 */
- 345, 331, 331, 129, 331, 331, 70, 123, 331, 331,
- /* 1730 */
- 246, 331, 331, 331, 111, 294, 327, 67, 123, 255,
- /* 1740 */
- 350, 348, 331, 345, 331, 331, 294, 327, 331, 246,
- /* 1750 */
- 255, 350, 348, 129, 345, 331, 86, 123, 331, 331,
- /* 1760 */
- 331, 331, 331, 331, 331, 294, 327, 331, 246, 255,
- /* 1770 */
- 350, 348, 129, 345, 331, 90, 123, 331, 331, 331,
- /* 1780 */
- 331, 331, 331, 331, 294, 327, 331, 246, 255, 350,
- /* 1790 */
- 348, 129, 345, 331, 77, 123, 331, 331, 331, 331,
- /* 1800 */
- 331, 331, 331, 294, 327, 331, 246, 255, 350, 348,
- /* 1810 */
- 129, 345, 331, 74, 123, 331, 331, 246, 331, 331,
- /* 1820 */
- 331, 129, 294, 327, 66, 123, 255, 350, 348, 331,
- /* 1830 */
- 345, 331, 331, 294, 327, 331, 246, 222, 350, 348,
- /* 1840 */
- 129, 345, 331, 69, 123, 331, 331, 331, 331, 331,
- /* 1850 */
- 331, 331, 294, 327, 331, 246, 255, 350, 348, 129,
- /* 1860 */
- 345, 331, 78, 123, 331, 331, 331, 331, 331, 331,
- /* 1870 */
- 331, 294, 327, 331, 246, 255, 350, 348, 129, 345,
- /* 1880 */
- 331, 60, 123, 331, 331, 331, 331, 331, 331, 331,
- /* 1890 */
- 294, 327, 331, 246, 255, 350, 348, 129, 345, 331,
- /* 1900 */
- 53, 123, 331, 331, 246, 331, 331, 331, 129, 294,
- /* 1910 */
- 327, 65, 123, 255, 350, 348, 331, 345, 331, 331,
- /* 1920 */
- 294, 327, 336, 331, 255, 350, 348, 331, 345, 8,
- /* 1930 */
- 331, 331, 331, 331, 5, 108, 331, 331, 331, 331,
- /* 1940 */
- 126, 331, 331, 246, 259, 331, 256, 129, 331, 331,
- /* 1950 */
- 72, 123, 331, 331, 331, 331, 331, 331, 331, 294,
- /* 1960 */
- 327, 331, 246, 255, 350, 348, 129, 345, 331, 85,
- /* 1970 */
- 123, 331, 331, 331, 331, 331, 331, 331, 294, 327,
- /* 1980 */
- 331, 246, 255, 350, 348, 129, 345, 331, 81, 123,
- /* 1990 */
- 331, 19, 340, 331, 331, 331, 331, 294, 327, 331,
- /* 2000 */
- 246, 255, 350, 348, 113, 345, 331, 82, 123, 331,
- /* 2010 */
- 331, 246, 331, 331, 331, 93, 294, 327, 54, 121,
- /* 2020 */
- 255, 350, 348, 331, 345, 331, 331, 294, 327, 331,
- /* 2030 */
- 246, 217, 350, 348, 129, 345, 331, 58, 123, 331,
- /* 2040 */
- 331, 331, 331, 331, 331, 331, 294, 327, 331, 336,
- /* 2050 */
- 255, 350, 348, 331, 345, 331, 8, 331, 331, 331,
- /* 2060 */
- 331, 5, 108, 331, 331, 331, 331, 126, 246, 331,
- /* 2070 */
- 331, 259, 129, 256, 331, 88, 123, 331, 331, 246,
- /* 2080 */
- 331, 331, 331, 129, 294, 327, 56, 123, 255, 350,
- /* 2090 */
- 348, 331, 345, 331, 331, 294, 327, 331, 331, 255,
- /* 2100 */
- 350, 348, 331, 345, 246, 331, 331, 331, 129, 331,
- /* 2110 */
- 331, 68, 123, 331, 331, 331, 331, 325, 19, 340,
- /* 2120 */
- 294, 327, 331, 331, 255, 350, 348, 331, 345, 331,
- /* 2130 */
- 331, 331, 331, 246, 331, 331, 331, 118, 331, 331,
- /* 2140 */
- 59, 123, 331, 331, 331, 331, 190, 172, 331, 294,
- /* 2150 */
- 327, 331, 331, 255, 350, 348, 283, 345, 246, 20,
- /* 2160 */
- 22, 331, 93, 331, 331, 57, 121, 331, 331, 331,
- /* 2170 */
- 331, 331, 331, 207, 294, 327, 331, 246, 255, 350,
- /* 2180 */
- 348, 129, 345, 331, 64, 123, 331, 331, 246, 331,
- /* 2190 */
- 331, 331, 129, 294, 327, 63, 123, 255, 350, 348,
- /* 2200 */
- 331, 345, 331, 331, 294, 327, 331, 246, 255, 350,
- /* 2210 */
- 348, 129, 345, 331, 73, 123, 331, 331, 331, 331,
- /* 2220 */
- 190, 165, 331, 294, 327, 331, 331, 255, 350, 348,
- /* 2230 */
- 283, 345, 331, 20, 22, 331, 246, 331, 331, 331,
- /* 2240 */
- 129, 331, 331, 87, 123, 331, 331, 207, 331, 331,
- /* 2250 */
- 331, 331, 294, 327, 331, 331, 255, 350, 348, 331,
- /* 2260 */
- 345, 246, 331, 331, 331, 129, 331, 331, 75, 123,
- /* 2270 */
- 331, 331, 246, 331, 331, 331, 129, 294, 327, 61,
- /* 2280 */
- 123, 255, 350, 348, 331, 345, 331, 331, 294, 327,
- /* 2290 */
- 331, 246, 255, 350, 348, 129, 345, 331, 71, 123,
- /* 2300 */
- 331, 331, 246, 331, 331, 331, 129, 294, 327, 83,
- /* 2310 */
- 123, 255, 350, 348, 331, 345, 331, 331, 294, 327,
- /* 2320 */
- 331, 331, 255, 350, 348, 331, 345, 246, 331, 331,
- /* 2330 */
- 331, 112, 331, 331, 76, 123, 331, 331, 331, 331,
- /* 2340 */
- 331, 331, 331, 294, 327, 331, 331, 255, 350, 348,
- /* 2350 */
- 331, 345, 246, 331, 331, 331, 129, 331, 331, 91,
- /* 2360 */
- 123, 331, 331, 246, 331, 331, 331, 129, 294, 327,
- /* 2370 */
- 62, 123, 255, 350, 348, 331, 345, 331, 331, 294,
- /* 2380 */
- 327, 331, 246, 255, 350, 348, 129, 345, 331, 79,
- /* 2390 */
- 123, 331, 331, 331, 331, 331, 331, 331, 294, 327,
- /* 2400 */
- 331, 331, 255, 350, 348, 331, 345,
+ public static $yy_action = array(
+ 251, 234, 237, 1, 144, 127, 428, 184, 199, 212,
+ 10, 54, 19, 175, 282, 215, 109, 389, 428, 428,
+ 224, 321, 223, 303, 203, 389, 13, 389, 281, 43,
+ 389, 428, 41, 40, 266, 225, 389, 213, 389, 194,
+ 389, 52, 4, 308, 301, 383, 34, 209, 222, 3,
+ 50, 153, 251, 234, 237, 1, 199, 131, 383, 198,
+ 305, 212, 10, 54, 383, 16, 199, 428, 109, 385,
+ 132, 18, 224, 321, 223, 222, 221, 12, 32, 428,
+ 116, 43, 385, 262, 41, 40, 266, 225, 385, 233,
+ 95, 194, 16, 52, 4, 131, 301, 252, 18, 265,
+ 164, 3, 50, 324, 251, 234, 237, 1, 23, 130,
+ 229, 198, 150, 212, 10, 54, 326, 11, 170, 284,
+ 109, 42, 22, 239, 224, 321, 223, 193, 221, 261,
+ 13, 52, 157, 43, 301, 286, 41, 40, 266, 225,
+ 205, 233, 5, 194, 96, 52, 4, 263, 301, 301,
+ 99, 349, 96, 3, 50, 199, 251, 234, 237, 1,
+ 238, 130, 241, 181, 349, 212, 10, 54, 382, 240,
+ 349, 36, 109, 185, 104, 256, 224, 321, 223, 132,
+ 191, 382, 13, 49, 91, 43, 12, 382, 41, 40,
+ 266, 225, 257, 233, 152, 194, 457, 52, 4, 457,
+ 301, 301, 228, 457, 282, 3, 50, 285, 251, 234,
+ 237, 1, 301, 131, 441, 198, 238, 212, 10, 54,
+ 349, 441, 325, 175, 109, 30, 349, 273, 224, 321,
+ 223, 20, 221, 295, 32, 211, 457, 39, 166, 49,
+ 41, 40, 266, 225, 87, 233, 205, 194, 279, 52,
+ 4, 24, 301, 204, 200, 280, 99, 3, 50, 199,
+ 251, 234, 237, 1, 31, 130, 96, 198, 205, 212,
+ 10, 54, 350, 55, 293, 207, 109, 283, 99, 96,
+ 224, 321, 223, 199, 180, 350, 13, 134, 230, 43,
+ 222, 350, 41, 40, 266, 225, 104, 233, 316, 194,
+ 279, 52, 4, 24, 301, 165, 284, 280, 85, 3,
+ 50, 25, 251, 234, 237, 1, 131, 129, 210, 198,
+ 14, 212, 10, 54, 269, 270, 301, 116, 109, 295,
+ 216, 211, 224, 321, 223, 171, 221, 95, 13, 28,
+ 219, 43, 323, 9, 41, 40, 266, 225, 151, 233,
+ 324, 194, 52, 52, 4, 301, 301, 30, 282, 302,
+ 178, 3, 50, 7, 251, 234, 237, 1, 136, 130,
+ 304, 179, 238, 212, 10, 54, 279, 175, 282, 24,
+ 109, 238, 429, 280, 224, 321, 223, 177, 221, 270,
+ 13, 255, 281, 43, 429, 49, 41, 40, 266, 225,
+ 275, 233, 318, 194, 49, 52, 4, 276, 301, 163,
+ 26, 199, 8, 3, 50, 119, 251, 234, 237, 1,
+ 11, 93, 291, 51, 107, 212, 10, 54, 226, 428,
+ 206, 201, 109, 148, 178, 322, 224, 321, 223, 441,
+ 221, 428, 13, 282, 9, 43, 441, 115, 41, 40,
+ 266, 225, 167, 233, 227, 194, 457, 52, 4, 457,
+ 301, 96, 158, 457, 101, 3, 50, 271, 251, 234,
+ 237, 1, 282, 130, 235, 186, 135, 212, 10, 54,
+ 199, 37, 119, 315, 109, 165, 284, 176, 224, 321,
+ 223, 104, 221, 149, 13, 281, 146, 43, 281, 300,
+ 41, 40, 266, 225, 30, 233, 289, 194, 21, 52,
+ 4, 272, 301, 211, 18, 301, 161, 3, 50, 110,
+ 251, 234, 237, 1, 137, 128, 282, 198, 268, 212,
+ 10, 54, 222, 169, 515, 92, 109, 172, 284, 31,
+ 224, 321, 223, 29, 221, 238, 6, 260, 53, 43,
+ 232, 139, 41, 40, 266, 225, 154, 233, 178, 194,
+ 168, 52, 4, 214, 301, 145, 99, 33, 49, 3,
+ 50, 245, 208, 211, 320, 282, 90, 111, 311, 183,
+ 98, 70, 309, 297, 236, 178, 95, 319, 142, 258,
+ 247, 267, 249, 264, 250, 195, 231, 199, 246, 324,
+ 317, 253, 254, 259, 126, 137, 133, 251, 234, 237,
+ 1, 326, 290, 105, 143, 156, 212, 10, 54, 88,
+ 84, 83, 484, 109, 322, 282, 37, 224, 321, 223,
+ 245, 208, 211, 320, 281, 90, 111, 298, 182, 98,
+ 56, 245, 298, 211, 178, 95, 103, 147, 258, 197,
+ 102, 75, 141, 250, 195, 231, 95, 246, 324, 258,
+ 279, 242, 89, 24, 250, 195, 231, 280, 246, 324,
+ 298, 298, 298, 298, 298, 298, 298, 16, 298, 192,
+ 277, 298, 298, 18, 294, 44, 45, 38, 298, 298,
+ 251, 234, 237, 2, 298, 296, 298, 298, 298, 212,
+ 10, 54, 310, 312, 313, 314, 109, 162, 298, 298,
+ 224, 321, 223, 298, 298, 298, 294, 282, 298, 42,
+ 22, 239, 251, 234, 237, 2, 298, 296, 298, 298,
+ 298, 212, 10, 54, 298, 159, 298, 298, 109, 298,
+ 298, 17, 224, 321, 223, 282, 298, 42, 22, 239,
+ 298, 298, 245, 298, 211, 278, 298, 103, 111, 298,
+ 183, 98, 70, 298, 298, 298, 298, 95, 298, 298,
+ 258, 298, 292, 17, 298, 250, 195, 231, 279, 246,
+ 324, 24, 298, 395, 245, 280, 211, 298, 298, 103,
+ 298, 298, 197, 102, 75, 16, 298, 140, 298, 95,
+ 298, 18, 258, 298, 298, 298, 298, 250, 195, 231,
+ 298, 246, 324, 298, 298, 298, 298, 428, 298, 395,
+ 395, 395, 202, 277, 298, 245, 298, 211, 298, 428,
+ 103, 298, 298, 197, 120, 69, 395, 395, 395, 395,
+ 95, 298, 298, 258, 298, 298, 298, 160, 250, 195,
+ 231, 86, 246, 324, 245, 16, 211, 282, 298, 103,
+ 196, 18, 197, 120, 69, 298, 44, 45, 38, 95,
+ 298, 298, 258, 298, 298, 298, 178, 250, 195, 231,
+ 298, 246, 324, 310, 312, 313, 314, 298, 298, 190,
+ 245, 298, 211, 298, 298, 103, 298, 298, 197, 102,
+ 75, 298, 298, 298, 298, 95, 298, 298, 258, 298,
+ 298, 298, 298, 250, 195, 231, 298, 246, 324, 298,
+ 298, 298, 245, 298, 211, 298, 199, 100, 298, 288,
+ 197, 120, 47, 298, 106, 298, 298, 95, 298, 353,
+ 258, 155, 298, 218, 298, 250, 195, 231, 298, 246,
+ 324, 282, 16, 42, 22, 239, 298, 245, 18, 211,
+ 298, 428, 103, 298, 298, 197, 120, 69, 298, 298,
+ 298, 298, 95, 428, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 100, 189, 298, 197, 120, 59, 245, 207, 211,
+ 298, 95, 103, 298, 258, 197, 120, 81, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 120, 80, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 67, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 120, 57, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 120, 58, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 82, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 97, 76, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 120, 71, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 187, 120, 61, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 120, 63, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 94, 79, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 59, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 120, 77, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 188, 108, 64, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 65, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 97, 66, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 120, 68, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 62, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 120, 60, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 120, 74, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 72, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 120, 48, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 120, 46, 298, 298,
+ 298, 298, 95, 298, 298, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 120, 78, 245, 298, 211,
+ 298, 95, 103, 298, 258, 197, 120, 73, 298, 250,
+ 195, 231, 95, 246, 324, 258, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 125, 298, 298, 298,
+ 298, 298, 95, 298, 298, 298, 298, 298, 298, 244,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 114, 298, 245, 298, 211,
+ 298, 95, 103, 298, 298, 197, 122, 298, 243, 250,
+ 195, 231, 95, 246, 324, 298, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 117, 298, 298, 298,
+ 298, 298, 95, 298, 298, 298, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 121, 298, 245, 298, 211,
+ 298, 95, 103, 298, 298, 197, 124, 298, 298, 250,
+ 195, 231, 95, 246, 324, 298, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 298, 245, 298, 211,
+ 298, 298, 103, 298, 298, 197, 118, 298, 298, 298,
+ 298, 298, 95, 298, 298, 298, 298, 298, 298, 298,
+ 250, 195, 231, 298, 246, 324, 245, 298, 211, 298,
+ 298, 103, 298, 298, 197, 123, 298, 245, 298, 211,
+ 298, 95, 103, 298, 298, 197, 113, 298, 298, 250,
+ 195, 231, 95, 246, 324, 298, 298, 298, 298, 298,
+ 250, 195, 231, 220, 246, 324, 298, 27, 298, 16,
+ 298, 457, 298, 298, 457, 18, 298, 26, 457, 441,
+ 44, 45, 38, 217, 44, 45, 38, 298, 298, 298,
+ 298, 298, 298, 298, 298, 298, 298, 310, 312, 313,
+ 314, 310, 312, 313, 314, 298, 441, 298, 298, 441,
+ 298, 457, 220, 441, 457, 298, 298, 457, 298, 298,
+ 457, 457, 441, 457, 298, 298, 220, 457, 441, 298,
+ 298, 298, 298, 298, 457, 298, 298, 457, 298, 298,
+ 5, 457, 441, 298, 298, 298, 298, 298, 298, 441,
+ 298, 298, 441, 298, 457, 441, 441, 298, 441, 298,
+ 457, 298, 441, 306, 298, 298, 298, 298, 298, 441,
+ 298, 298, 441, 298, 457, 220, 441, 298, 298, 298,
+ 298, 298, 298, 457, 298, 298, 457, 298, 298, 15,
+ 457, 441, 35, 274, 44, 45, 38, 457, 298, 298,
+ 457, 298, 298, 298, 457, 441, 298, 298, 298, 298,
+ 298, 310, 312, 313, 314, 298, 298, 298, 441, 298,
+ 298, 441, 298, 457, 298, 441, 287, 298, 44, 45,
+ 38, 298, 441, 298, 298, 441, 298, 457, 298, 441,
+ 248, 298, 298, 298, 298, 310, 312, 313, 314, 298,
+ 44, 45, 38, 298, 298, 112, 298, 44, 45, 38,
+ 298, 173, 298, 298, 44, 45, 38, 310, 312, 313,
+ 314, 44, 45, 38, 310, 312, 313, 314, 298, 298,
+ 299, 310, 312, 313, 314, 44, 45, 38, 310, 312,
+ 313, 314, 174, 298, 298, 298, 138, 298, 298, 298,
+ 298, 298, 310, 312, 313, 314, 44, 45, 38, 298,
+ 298, 298, 44, 45, 38, 298, 44, 45, 38, 298,
+ 44, 45, 38, 310, 312, 313, 314, 307, 298, 310,
+ 312, 313, 314, 310, 312, 313, 314, 310, 312, 313,
+ 314,
);
- static public $yy_lookahead = array(
- /* 0 */
- 1, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- /* 10 */
- 13, 14, 15, 30, 66, 18, 18, 2, 20, 36,
- /* 20 */
- 23, 24, 94, 95, 96, 39, 29, 28, 30, 30,
- /* 30 */
- 33, 60, 35, 60, 36, 36, 65, 18, 65, 20,
- /* 40 */
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- /* 50 */
- 51, 52, 53, 54, 1, 1, 3, 3, 1, 91,
- /* 60 */
- 3, 83, 84, 85, 86, 87, 67, 68, 69, 70,
- /* 70 */
- 71, 72, 73, 74, 75, 76, 77, 78, 112, 1,
- /* 80 */
- 114, 115, 63, 30, 30, 31, 118, 30, 19, 36,
- /* 90 */
- 36, 21, 22, 36, 41, 42, 43, 44, 45, 46,
- /* 100 */
- 47, 48, 49, 50, 51, 52, 53, 54, 1, 55,
- /* 110 */
- 32, 1, 55, 3, 91, 39, 18, 19, 20, 38,
- /* 120 */
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- /* 130 */
- 77, 78, 62, 55, 20, 37, 60, 30, 62, 20,
- /* 140 */
- 30, 118, 66, 36, 114, 115, 36, 66, 41, 42,
- /* 150 */
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- /* 160 */
- 53, 54, 1, 26, 1, 55, 3, 37, 1, 18,
- /* 170 */
- 3, 20, 21, 91, 67, 68, 69, 70, 71, 72,
- /* 180 */
- 73, 74, 75, 76, 77, 78, 5, 6, 7, 8,
- /* 190 */
- 9, 20, 1, 30, 3, 100, 15, 16, 17, 36,
- /* 200 */
- 118, 119, 41, 42, 43, 44, 45, 46, 47, 48,
- /* 210 */
- 49, 50, 51, 52, 53, 54, 1, 18, 55, 20,
- /* 220 */
- 21, 30, 55, 114, 115, 26, 22, 36, 67, 68,
- /* 230 */
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- /* 240 */
- 86, 80, 32, 26, 91, 92, 31, 1, 109, 39,
- /* 250 */
- 38, 18, 40, 20, 101, 116, 41, 42, 43, 44,
- /* 260 */
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- /* 270 */
- 1, 118, 62, 18, 19, 20, 122, 123, 85, 86,
- /* 280 */
- 87, 91, 67, 68, 69, 70, 71, 72, 73, 74,
- /* 290 */
- 75, 76, 77, 78, 104, 105, 63, 80, 1, 91,
- /* 300 */
- 92, 55, 3, 18, 115, 20, 21, 20, 118, 101,
- /* 310 */
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- /* 320 */
- 51, 52, 53, 54, 1, 26, 118, 30, 38, 88,
- /* 330 */
- 40, 39, 38, 36, 40, 66, 67, 68, 69, 70,
- /* 340 */
- 71, 72, 73, 74, 75, 76, 77, 78, 63, 21,
- /* 350 */
- 63, 109, 91, 92, 62, 1, 2, 16, 116, 19,
- /* 360 */
- 20, 18, 101, 40, 41, 42, 43, 44, 45, 46,
- /* 370 */
- 47, 48, 49, 50, 51, 52, 53, 54, 1, 118,
- /* 380 */
- 3, 18, 39, 20, 19, 20, 19, 111, 60, 113,
- /* 390 */
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- /* 400 */
- 77, 78, 21, 22, 64, 30, 39, 92, 92, 39,
- /* 410 */
- 18, 36, 20, 18, 1, 20, 101, 101, 41, 42,
- /* 420 */
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- /* 430 */
- 53, 54, 1, 118, 118, 22, 87, 2, 89, 94,
- /* 440 */
- 95, 91, 98, 62, 67, 68, 69, 70, 71, 72,
- /* 450 */
- 73, 74, 75, 76, 77, 78, 21, 113, 86, 111,
- /* 460 */
- 92, 92, 111, 18, 113, 20, 20, 111, 118, 101,
- /* 470 */
- 101, 40, 41, 42, 43, 44, 45, 46, 47, 48,
- /* 480 */
- 49, 50, 51, 52, 53, 54, 1, 118, 3, 100,
- /* 490 */
- 94, 95, 18, 100, 20, 123, 111, 25, 67, 68,
- /* 500 */
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- /* 510 */
- 38, 92, 92, 20, 3, 3, 92, 20, 40, 64,
- /* 520 */
- 101, 101, 19, 3, 19, 101, 41, 42, 43, 44,
- /* 530 */
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- /* 540 */
- 1, 2, 118, 20, 19, 64, 20, 19, 21, 98,
- /* 550 */
- 20, 98, 67, 68, 69, 70, 71, 72, 73, 74,
- /* 560 */
- 75, 76, 77, 78, 113, 22, 113, 60, 27, 20,
- /* 570 */
- 37, 20, 56, 2, 101, 1, 112, 111, 116, 111,
- /* 580 */
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- /* 590 */
- 51, 52, 53, 54, 1, 113, 97, 118, 2, 119,
- /* 600 */
- 111, 97, 30, 124, 98, 62, 67, 68, 69, 70,
- /* 610 */
- 71, 72, 73, 74, 75, 76, 77, 78, 25, 113,
- /* 620 */
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- /* 630 */
- 124, 124, 124, 124, 41, 42, 43, 44, 45, 46,
- /* 640 */
- 47, 48, 49, 50, 51, 52, 53, 54, 1, 124,
- /* 650 */
- 3, 124, 124, 124, 124, 124, 124, 124, 99, 98,
- /* 660 */
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- /* 670 */
- 77, 78, 113, 124, 113, 124, 124, 124, 124, 124,
- /* 680 */
- 124, 124, 124, 124, 124, 124, 124, 124, 41, 42,
- /* 690 */
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- /* 700 */
- 53, 54, 1, 124, 3, 124, 124, 124, 124, 124,
- /* 710 */
- 124, 98, 98, 98, 67, 68, 69, 70, 71, 72,
- /* 720 */
- 73, 74, 75, 76, 77, 78, 113, 113, 113, 124,
- /* 730 */
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- /* 740 */
- 124, 124, 41, 42, 43, 44, 45, 46, 47, 48,
- /* 750 */
- 49, 50, 51, 52, 53, 54, 1, 124, 124, 124,
- /* 760 */
- 124, 124, 124, 124, 124, 98, 98, 124, 67, 68,
- /* 770 */
- 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- /* 780 */
- 113, 113, 124, 124, 124, 124, 124, 124, 124, 124,
- /* 790 */
- 124, 124, 124, 124, 124, 124, 41, 42, 43, 44,
- /* 800 */
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- /* 810 */
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- /* 820 */
- 22, 124, 67, 68, 69, 70, 71, 72, 73, 74,
- /* 830 */
- 75, 76, 77, 78, 124, 124, 124, 124, 41, 42,
- /* 840 */
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
- /* 850 */
- 53, 54, 124, 124, 124, 124, 124, 124, 60, 124,
- /* 860 */
- 124, 124, 124, 65, 67, 68, 69, 70, 71, 72,
- /* 870 */
- 73, 74, 75, 76, 77, 78, 124, 124, 124, 124,
- /* 880 */
- 124, 124, 124, 18, 19, 20, 124, 124, 23, 24,
- /* 890 */
- 124, 86, 124, 124, 29, 90, 92, 124, 33, 94,
- /* 900 */
- 35, 124, 37, 124, 39, 101, 124, 42, 103, 124,
- /* 910 */
- 124, 106, 107, 108, 124, 110, 124, 113, 92, 92,
- /* 920 */
- 124, 124, 57, 58, 59, 60, 61, 101, 101, 64,
- /* 930 */
- 65, 66, 124, 94, 124, 124, 124, 124, 124, 113,
- /* 940 */
- 113, 18, 19, 20, 79, 106, 23, 24, 124, 110,
- /* 950 */
- 124, 124, 29, 124, 124, 86, 33, 34, 35, 90,
- /* 960 */
- 37, 124, 39, 94, 92, 42, 124, 124, 124, 124,
- /* 970 */
- 86, 124, 103, 101, 90, 106, 107, 108, 94, 110,
- /* 980 */
- 57, 58, 59, 60, 61, 113, 124, 64, 65, 124,
- /* 990 */
- 106, 107, 108, 124, 110, 18, 124, 20, 124, 18,
- /* 1000 */
- 19, 20, 79, 124, 23, 24, 124, 30, 124, 32,
- /* 1010 */
- 29, 86, 124, 36, 33, 90, 35, 124, 37, 94,
- /* 1020 */
- 39, 124, 124, 42, 124, 124, 124, 124, 124, 124,
- /* 1030 */
- 124, 106, 107, 108, 124, 110, 124, 124, 57, 58,
- /* 1040 */
- 59, 60, 61, 124, 124, 64, 65, 124, 124, 124,
- /* 1050 */
- 124, 124, 18, 124, 20, 124, 124, 18, 19, 20,
- /* 1060 */
- 79, 124, 23, 24, 30, 86, 32, 124, 29, 90,
- /* 1070 */
- 36, 86, 33, 94, 35, 90, 37, 124, 39, 94,
- /* 1080 */
- 124, 42, 124, 124, 124, 106, 107, 108, 124, 110,
- /* 1090 */
- 124, 106, 107, 108, 124, 110, 57, 58, 59, 60,
- /* 1100 */
- 61, 124, 124, 64, 65, 124, 124, 124, 124, 124,
- /* 1110 */
- 124, 124, 124, 124, 124, 18, 19, 20, 79, 124,
- /* 1120 */
- 23, 24, 124, 124, 124, 124, 29, 86, 124, 124,
- /* 1130 */
- 33, 90, 35, 124, 37, 94, 39, 124, 124, 42,
- /* 1140 */
- 124, 124, 124, 124, 124, 124, 124, 106, 107, 108,
- /* 1150 */
- 124, 110, 124, 124, 57, 58, 59, 60, 61, 124,
- /* 1160 */
- 124, 64, 65, 124, 124, 124, 124, 124, 124, 124,
- /* 1170 */
- 124, 124, 124, 18, 19, 20, 79, 124, 23, 24,
- /* 1180 */
- 124, 124, 124, 124, 29, 86, 124, 124, 33, 90,
- /* 1190 */
- 35, 124, 37, 94, 39, 124, 124, 42, 124, 124,
- /* 1200 */
- 124, 124, 124, 124, 124, 106, 107, 108, 124, 110,
- /* 1210 */
- 124, 124, 57, 58, 59, 60, 61, 124, 124, 64,
- /* 1220 */
- 65, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- /* 1230 */
- 124, 18, 19, 20, 79, 124, 23, 24, 124, 124,
- /* 1240 */
- 124, 124, 29, 86, 124, 124, 33, 90, 35, 124,
- /* 1250 */
- 37, 94, 39, 124, 124, 42, 124, 124, 124, 124,
- /* 1260 */
- 124, 124, 124, 106, 107, 108, 124, 110, 124, 124,
- /* 1270 */
- 57, 58, 59, 60, 61, 124, 124, 64, 65, 124,
- /* 1280 */
- 1, 124, 3, 124, 124, 124, 124, 124, 124, 18,
- /* 1290 */
- 19, 20, 79, 124, 23, 24, 124, 124, 124, 124,
- /* 1300 */
- 29, 22, 124, 124, 33, 124, 35, 124, 37, 30,
- /* 1310 */
- 39, 91, 92, 42, 124, 36, 124, 124, 39, 124,
- /* 1320 */
- 124, 101, 124, 124, 104, 105, 124, 124, 57, 58,
- /* 1330 */
- 59, 60, 61, 124, 124, 64, 65, 124, 118, 124,
- /* 1340 */
- 124, 62, 124, 124, 124, 3, 124, 18, 19, 20,
- /* 1350 */
- 79, 124, 23, 24, 124, 124, 124, 124, 29, 124,
- /* 1360 */
- 124, 124, 33, 21, 35, 124, 37, 124, 39, 91,
- /* 1370 */
- 92, 42, 30, 124, 124, 124, 124, 124, 36, 101,
- /* 1380 */
- 124, 39, 104, 105, 124, 124, 57, 58, 59, 60,
- /* 1390 */
- 61, 124, 124, 64, 65, 124, 118, 124, 124, 124,
- /* 1400 */
- 124, 124, 124, 124, 62, 18, 19, 20, 79, 124,
- /* 1410 */
- 23, 24, 124, 124, 124, 124, 29, 124, 124, 124,
- /* 1420 */
- 33, 124, 35, 124, 37, 124, 39, 91, 92, 42,
- /* 1430 */
- 124, 124, 124, 124, 124, 124, 124, 101, 124, 124,
- /* 1440 */
- 104, 105, 124, 124, 57, 58, 59, 60, 61, 124,
- /* 1450 */
- 124, 64, 124, 124, 118, 124, 124, 124, 124, 124,
- /* 1460 */
- 124, 124, 124, 18, 19, 20, 79, 124, 23, 24,
- /* 1470 */
- 124, 124, 124, 124, 29, 124, 124, 124, 33, 124,
- /* 1480 */
- 35, 124, 37, 124, 39, 124, 3, 42, 124, 124,
- /* 1490 */
- 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- /* 1500 */
- 124, 124, 57, 58, 59, 60, 61, 124, 25, 64,
- /* 1510 */
- 27, 28, 124, 30, 31, 124, 124, 124, 124, 36,
- /* 1520 */
- 124, 38, 39, 40, 79, 124, 124, 124, 124, 124,
- /* 1530 */
- 124, 124, 124, 124, 124, 86, 124, 124, 55, 90,
- /* 1540 */
- 124, 124, 93, 94, 124, 62, 124, 124, 124, 66,
- /* 1550 */
- 124, 102, 103, 124, 124, 106, 107, 108, 124, 110,
- /* 1560 */
- 124, 124, 124, 80, 124, 124, 124, 86, 124, 120,
- /* 1570 */
- 121, 90, 124, 124, 93, 94, 124, 124, 124, 124,
- /* 1580 */
- 124, 124, 124, 102, 103, 124, 124, 106, 107, 108,
- /* 1590 */
- 86, 110, 124, 124, 90, 124, 124, 93, 94, 95,
- /* 1600 */
- 124, 86, 121, 124, 124, 90, 102, 103, 93, 94,
- /* 1610 */
- 106, 107, 108, 124, 110, 124, 124, 102, 103, 124,
- /* 1620 */
- 124, 106, 107, 108, 124, 110, 86, 124, 124, 124,
- /* 1630 */
- 90, 124, 117, 93, 94, 124, 124, 124, 124, 124,
- /* 1640 */
- 124, 124, 102, 103, 124, 124, 106, 107, 108, 124,
- /* 1650 */
- 110, 124, 124, 124, 86, 91, 92, 117, 90, 124,
- /* 1660 */
- 124, 93, 94, 95, 124, 101, 124, 124, 104, 105,
- /* 1670 */
- 102, 103, 124, 124, 106, 107, 108, 86, 110, 124,
- /* 1680 */
- 124, 90, 118, 124, 93, 94, 124, 124, 124, 124,
- /* 1690 */
- 124, 124, 124, 102, 103, 124, 86, 106, 107, 108,
- /* 1700 */
- 90, 110, 124, 93, 94, 124, 124, 124, 117, 124,
- /* 1710 */
- 124, 124, 102, 103, 124, 124, 106, 107, 108, 86,
- /* 1720 */
- 110, 124, 124, 90, 124, 124, 93, 94, 124, 124,
- /* 1730 */
- 86, 124, 124, 124, 90, 102, 103, 93, 94, 106,
- /* 1740 */
- 107, 108, 124, 110, 124, 124, 102, 103, 124, 86,
- /* 1750 */
- 106, 107, 108, 90, 110, 124, 93, 94, 124, 124,
- /* 1760 */
- 124, 124, 124, 124, 124, 102, 103, 124, 86, 106,
- /* 1770 */
- 107, 108, 90, 110, 124, 93, 94, 124, 124, 124,
- /* 1780 */
- 124, 124, 124, 124, 102, 103, 124, 86, 106, 107,
- /* 1790 */
- 108, 90, 110, 124, 93, 94, 124, 124, 124, 124,
- /* 1800 */
- 124, 124, 124, 102, 103, 124, 86, 106, 107, 108,
- /* 1810 */
- 90, 110, 124, 93, 94, 124, 124, 86, 124, 124,
- /* 1820 */
- 124, 90, 102, 103, 93, 94, 106, 107, 108, 124,
- /* 1830 */
- 110, 124, 124, 102, 103, 124, 86, 106, 107, 108,
- /* 1840 */
- 90, 110, 124, 93, 94, 124, 124, 124, 124, 124,
- /* 1850 */
- 124, 124, 102, 103, 124, 86, 106, 107, 108, 90,
- /* 1860 */
- 110, 124, 93, 94, 124, 124, 124, 124, 124, 124,
- /* 1870 */
- 124, 102, 103, 124, 86, 106, 107, 108, 90, 110,
- /* 1880 */
- 124, 93, 94, 124, 124, 124, 124, 124, 124, 124,
- /* 1890 */
- 102, 103, 124, 86, 106, 107, 108, 90, 110, 124,
- /* 1900 */
- 93, 94, 124, 124, 86, 124, 124, 124, 90, 102,
- /* 1910 */
- 103, 93, 94, 106, 107, 108, 124, 110, 124, 124,
- /* 1920 */
- 102, 103, 11, 124, 106, 107, 108, 124, 110, 18,
- /* 1930 */
- 124, 124, 124, 124, 23, 24, 124, 124, 124, 124,
- /* 1940 */
- 29, 124, 124, 86, 33, 124, 35, 90, 124, 124,
- /* 1950 */
- 93, 94, 124, 124, 124, 124, 124, 124, 124, 102,
- /* 1960 */
- 103, 124, 86, 106, 107, 108, 90, 110, 124, 93,
- /* 1970 */
- 94, 124, 124, 124, 124, 124, 124, 124, 102, 103,
- /* 1980 */
- 124, 86, 106, 107, 108, 90, 110, 124, 93, 94,
- /* 1990 */
- 79, 80, 81, 124, 124, 124, 124, 102, 103, 124,
- /* 2000 */
- 86, 106, 107, 108, 90, 110, 124, 93, 94, 124,
- /* 2010 */
- 124, 86, 124, 124, 124, 90, 102, 103, 93, 94,
- /* 2020 */
- 106, 107, 108, 124, 110, 124, 124, 102, 103, 124,
- /* 2030 */
- 86, 106, 107, 108, 90, 110, 124, 93, 94, 124,
- /* 2040 */
- 124, 124, 124, 124, 124, 124, 102, 103, 124, 11,
- /* 2050 */
- 106, 107, 108, 124, 110, 124, 18, 124, 124, 124,
- /* 2060 */
- 124, 23, 24, 124, 124, 124, 124, 29, 86, 124,
- /* 2070 */
- 124, 33, 90, 35, 124, 93, 94, 124, 124, 86,
- /* 2080 */
- 124, 124, 124, 90, 102, 103, 93, 94, 106, 107,
- /* 2090 */
- 108, 124, 110, 124, 124, 102, 103, 124, 124, 106,
- /* 2100 */
- 107, 108, 124, 110, 86, 124, 124, 124, 90, 124,
- /* 2110 */
- 124, 93, 94, 124, 124, 124, 124, 79, 80, 81,
- /* 2120 */
- 102, 103, 124, 124, 106, 107, 108, 124, 110, 124,
- /* 2130 */
- 124, 124, 124, 86, 124, 124, 124, 90, 124, 124,
- /* 2140 */
- 93, 94, 124, 124, 124, 124, 91, 92, 124, 102,
- /* 2150 */
- 103, 124, 124, 106, 107, 108, 101, 110, 86, 104,
- /* 2160 */
- 105, 124, 90, 124, 124, 93, 94, 124, 124, 124,
- /* 2170 */
- 124, 124, 124, 118, 102, 103, 124, 86, 106, 107,
- /* 2180 */
- 108, 90, 110, 124, 93, 94, 124, 124, 86, 124,
- /* 2190 */
- 124, 124, 90, 102, 103, 93, 94, 106, 107, 108,
- /* 2200 */
- 124, 110, 124, 124, 102, 103, 124, 86, 106, 107,
- /* 2210 */
- 108, 90, 110, 124, 93, 94, 124, 124, 124, 124,
- /* 2220 */
- 91, 92, 124, 102, 103, 124, 124, 106, 107, 108,
- /* 2230 */
- 101, 110, 124, 104, 105, 124, 86, 124, 124, 124,
- /* 2240 */
- 90, 124, 124, 93, 94, 124, 124, 118, 124, 124,
- /* 2250 */
- 124, 124, 102, 103, 124, 124, 106, 107, 108, 124,
- /* 2260 */
- 110, 86, 124, 124, 124, 90, 124, 124, 93, 94,
- /* 2270 */
- 124, 124, 86, 124, 124, 124, 90, 102, 103, 93,
- /* 2280 */
- 94, 106, 107, 108, 124, 110, 124, 124, 102, 103,
- /* 2290 */
- 124, 86, 106, 107, 108, 90, 110, 124, 93, 94,
- /* 2300 */
- 124, 124, 86, 124, 124, 124, 90, 102, 103, 93,
- /* 2310 */
- 94, 106, 107, 108, 124, 110, 124, 124, 102, 103,
- /* 2320 */
- 124, 124, 106, 107, 108, 124, 110, 86, 124, 124,
- /* 2330 */
- 124, 90, 124, 124, 93, 94, 124, 124, 124, 124,
- /* 2340 */
- 124, 124, 124, 102, 103, 124, 124, 106, 107, 108,
- /* 2350 */
- 124, 110, 86, 124, 124, 124, 90, 124, 124, 93,
- /* 2360 */
- 94, 124, 124, 86, 124, 124, 124, 90, 102, 103,
- /* 2370 */
- 93, 94, 106, 107, 108, 124, 110, 124, 124, 102,
- /* 2380 */
- 103, 124, 86, 106, 107, 108, 90, 110, 124, 93,
- /* 2390 */
- 94, 124, 124, 124, 124, 124, 124, 124, 102, 103,
- /* 2400 */
- 124, 124, 106, 107, 108, 124, 110,
+
+ public static $yy_lookahead = array(
+ 10, 11, 12, 13, 74, 15, 36, 17, 1, 19,
+ 20, 21, 29, 103, 84, 45, 26, 14, 48, 36,
+ 30, 31, 32, 53, 34, 22, 36, 24, 98, 39,
+ 27, 48, 42, 43, 44, 45, 33, 47, 35, 49,
+ 37, 51, 52, 53, 54, 14, 16, 16, 45, 59,
+ 60, 96, 10, 11, 12, 13, 1, 15, 27, 17,
+ 53, 19, 20, 21, 33, 27, 1, 36, 26, 14,
+ 45, 33, 30, 31, 32, 45, 34, 52, 36, 48,
+ 72, 39, 27, 75, 42, 43, 44, 45, 33, 47,
+ 82, 49, 27, 51, 52, 15, 54, 17, 33, 91,
+ 83, 59, 60, 95, 10, 11, 12, 13, 13, 15,
+ 15, 17, 17, 19, 20, 21, 97, 35, 99, 100,
+ 26, 86, 87, 88, 30, 31, 32, 66, 34, 49,
+ 36, 51, 96, 39, 54, 53, 42, 43, 44, 45,
+ 72, 47, 16, 49, 18, 51, 52, 79, 54, 54,
+ 82, 14, 18, 59, 60, 1, 10, 11, 12, 13,
+ 23, 15, 15, 17, 27, 19, 20, 21, 14, 17,
+ 33, 13, 26, 15, 48, 17, 30, 31, 32, 45,
+ 34, 27, 36, 46, 83, 39, 52, 33, 42, 43,
+ 44, 45, 34, 47, 74, 49, 10, 51, 52, 13,
+ 54, 54, 50, 17, 84, 59, 60, 14, 10, 11,
+ 12, 13, 54, 15, 45, 17, 23, 19, 20, 21,
+ 27, 52, 100, 103, 26, 35, 33, 37, 30, 31,
+ 32, 22, 34, 67, 36, 69, 50, 39, 83, 46,
+ 42, 43, 44, 45, 35, 47, 72, 49, 10, 51,
+ 52, 13, 54, 79, 80, 17, 82, 59, 60, 1,
+ 10, 11, 12, 13, 16, 15, 18, 17, 72, 19,
+ 20, 21, 14, 107, 108, 79, 26, 71, 82, 18,
+ 30, 31, 32, 1, 34, 27, 36, 15, 50, 39,
+ 45, 33, 42, 43, 44, 45, 48, 47, 53, 49,
+ 10, 51, 52, 13, 54, 99, 100, 17, 36, 59,
+ 60, 29, 10, 11, 12, 13, 15, 15, 17, 17,
+ 13, 19, 20, 21, 8, 9, 54, 72, 26, 67,
+ 75, 69, 30, 31, 32, 78, 34, 82, 36, 24,
+ 50, 39, 17, 36, 42, 43, 44, 45, 74, 47,
+ 95, 49, 51, 51, 52, 54, 54, 35, 84, 37,
+ 103, 59, 60, 36, 10, 11, 12, 13, 74, 15,
+ 108, 17, 23, 19, 20, 21, 10, 103, 84, 13,
+ 26, 23, 36, 17, 30, 31, 32, 7, 34, 9,
+ 36, 17, 98, 39, 48, 46, 42, 43, 44, 45,
+ 17, 47, 53, 49, 46, 51, 52, 93, 54, 78,
+ 16, 1, 36, 59, 60, 101, 10, 11, 12, 13,
+ 35, 15, 37, 17, 48, 19, 20, 21, 18, 36,
+ 65, 66, 26, 74, 103, 104, 30, 31, 32, 45,
+ 34, 48, 36, 84, 36, 39, 52, 17, 42, 43,
+ 44, 45, 15, 47, 17, 49, 10, 51, 52, 13,
+ 54, 18, 74, 17, 82, 59, 60, 34, 10, 11,
+ 12, 13, 84, 15, 93, 17, 15, 19, 20, 21,
+ 1, 2, 101, 101, 26, 99, 100, 17, 30, 31,
+ 32, 48, 34, 96, 36, 98, 96, 39, 98, 71,
+ 42, 43, 44, 45, 35, 47, 37, 49, 27, 51,
+ 52, 67, 54, 69, 33, 54, 74, 59, 60, 17,
+ 10, 11, 12, 13, 96, 15, 84, 17, 34, 19,
+ 20, 21, 45, 78, 63, 64, 26, 99, 100, 16,
+ 30, 31, 32, 16, 34, 23, 36, 17, 17, 39,
+ 23, 51, 42, 43, 44, 45, 72, 47, 103, 49,
+ 78, 51, 52, 17, 54, 74, 82, 41, 46, 59,
+ 60, 67, 68, 69, 70, 84, 72, 73, 53, 75,
+ 76, 77, 53, 61, 15, 103, 82, 14, 51, 85,
+ 14, 37, 17, 8, 90, 91, 92, 1, 94, 95,
+ 3, 4, 5, 6, 7, 96, 82, 10, 11, 12,
+ 13, 97, 84, 81, 96, 74, 19, 20, 21, 78,
+ 82, 82, 1, 26, 104, 84, 2, 30, 31, 32,
+ 67, 68, 69, 70, 98, 72, 73, 109, 75, 76,
+ 77, 67, 109, 69, 103, 82, 72, 96, 85, 75,
+ 76, 77, 96, 90, 91, 92, 82, 94, 95, 85,
+ 10, 14, 96, 13, 90, 91, 92, 17, 94, 95,
+ 109, 109, 109, 109, 109, 109, 109, 27, 109, 105,
+ 106, 109, 109, 33, 4, 38, 39, 40, 109, 109,
+ 10, 11, 12, 13, 109, 15, 109, 109, 109, 19,
+ 20, 21, 55, 56, 57, 58, 26, 74, 109, 109,
+ 30, 31, 32, 109, 109, 109, 4, 84, 109, 86,
+ 87, 88, 10, 11, 12, 13, 109, 15, 109, 109,
+ 109, 19, 20, 21, 109, 74, 109, 109, 26, 109,
+ 60, 61, 30, 31, 32, 84, 109, 86, 87, 88,
+ 109, 109, 67, 109, 69, 70, 109, 72, 73, 109,
+ 75, 76, 77, 109, 109, 109, 109, 82, 109, 109,
+ 85, 109, 60, 61, 109, 90, 91, 92, 10, 94,
+ 95, 13, 109, 2, 67, 17, 69, 109, 109, 72,
+ 109, 109, 75, 76, 77, 27, 109, 29, 109, 82,
+ 109, 33, 85, 109, 109, 109, 109, 90, 91, 92,
+ 109, 94, 95, 109, 109, 109, 109, 36, 109, 38,
+ 39, 40, 105, 106, 109, 67, 109, 69, 109, 48,
+ 72, 109, 109, 75, 76, 77, 55, 56, 57, 58,
+ 82, 109, 109, 85, 109, 109, 109, 74, 90, 91,
+ 92, 78, 94, 95, 67, 27, 69, 84, 109, 72,
+ 102, 33, 75, 76, 77, 109, 38, 39, 40, 82,
+ 109, 109, 85, 109, 109, 109, 103, 90, 91, 92,
+ 109, 94, 95, 55, 56, 57, 58, 109, 109, 102,
+ 67, 109, 69, 109, 109, 72, 109, 109, 75, 76,
+ 77, 109, 109, 109, 109, 82, 109, 109, 85, 109,
+ 109, 109, 109, 90, 91, 92, 109, 94, 95, 109,
+ 109, 109, 67, 109, 69, 109, 1, 72, 109, 106,
+ 75, 76, 77, 109, 79, 109, 109, 82, 109, 14,
+ 85, 74, 109, 18, 109, 90, 91, 92, 109, 94,
+ 95, 84, 27, 86, 87, 88, 109, 67, 33, 69,
+ 109, 36, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 48, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 102, 109, 75, 76, 77, 67, 79, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 77, 109, 109,
+ 109, 109, 82, 109, 109, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 77, 67, 109, 69,
+ 109, 82, 72, 109, 85, 75, 76, 77, 109, 90,
+ 91, 92, 82, 94, 95, 85, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 109, 109, 109,
+ 109, 109, 82, 109, 109, 109, 109, 109, 109, 89,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 109, 67, 109, 69,
+ 109, 82, 72, 109, 109, 75, 76, 109, 89, 90,
+ 91, 92, 82, 94, 95, 109, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 109, 109, 109,
+ 109, 109, 82, 109, 109, 109, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 109, 67, 109, 69,
+ 109, 82, 72, 109, 109, 75, 76, 109, 109, 90,
+ 91, 92, 82, 94, 95, 109, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 109, 67, 109, 69,
+ 109, 109, 72, 109, 109, 75, 76, 109, 109, 109,
+ 109, 109, 82, 109, 109, 109, 109, 109, 109, 109,
+ 90, 91, 92, 109, 94, 95, 67, 109, 69, 109,
+ 109, 72, 109, 109, 75, 76, 109, 67, 109, 69,
+ 109, 82, 72, 109, 109, 75, 76, 109, 109, 90,
+ 91, 92, 82, 94, 95, 109, 109, 109, 109, 109,
+ 90, 91, 92, 2, 94, 95, 109, 25, 109, 27,
+ 109, 10, 109, 109, 13, 33, 109, 16, 17, 18,
+ 38, 39, 40, 37, 38, 39, 40, 109, 109, 109,
+ 109, 109, 109, 109, 109, 109, 109, 55, 56, 57,
+ 58, 55, 56, 57, 58, 109, 45, 109, 109, 48,
+ 109, 50, 2, 52, 10, 109, 109, 13, 109, 109,
+ 10, 17, 18, 13, 109, 109, 2, 17, 18, 109,
+ 109, 109, 109, 109, 10, 109, 109, 13, 109, 109,
+ 16, 17, 18, 109, 109, 109, 109, 109, 109, 45,
+ 109, 109, 48, 109, 50, 45, 52, 109, 48, 109,
+ 50, 109, 52, 53, 109, 109, 109, 109, 109, 45,
+ 109, 109, 48, 109, 50, 2, 52, 109, 109, 109,
+ 109, 109, 109, 10, 109, 109, 13, 109, 109, 2,
+ 17, 18, 2, 37, 38, 39, 40, 10, 109, 109,
+ 13, 109, 109, 109, 17, 18, 109, 109, 109, 109,
+ 109, 55, 56, 57, 58, 109, 109, 109, 45, 109,
+ 109, 48, 109, 50, 109, 52, 14, 109, 38, 39,
+ 40, 109, 45, 109, 109, 48, 109, 50, 109, 52,
+ 14, 109, 109, 109, 109, 55, 56, 57, 58, 109,
+ 38, 39, 40, 109, 109, 22, 109, 38, 39, 40,
+ 109, 14, 109, 109, 38, 39, 40, 55, 56, 57,
+ 58, 38, 39, 40, 55, 56, 57, 58, 109, 109,
+ 61, 55, 56, 57, 58, 38, 39, 40, 55, 56,
+ 57, 58, 14, 109, 109, 109, 28, 109, 109, 109,
+ 109, 109, 55, 56, 57, 58, 38, 39, 40, 109,
+ 109, 109, 38, 39, 40, 109, 38, 39, 40, 109,
+ 38, 39, 40, 55, 56, 57, 58, 53, 109, 55,
+ 56, 57, 58, 55, 56, 57, 58, 55, 56, 57,
+ 58,
);
- const YY_SHIFT_USE_DFLT = - 53;
- const YY_SHIFT_MAX = 259;
- static public $yy_shift_ofst = array(
- /* 0 */
- - 3, 1213, 981, 1155, 1213, 1155, 981, 981, 923, 923,
- /* 10 */
- 865, 981, 981, 1097, 981, 981, 981, 981, 981, 981,
- /* 20 */
- 981, 1329, 981, 981, 981, 981, 1271, 981, 981, 981,
- /* 30 */
- 1097, 981, 981, 981, 981, 981, 981, 981, 981, 981,
- /* 40 */
- 981, 981, 981, 981, 1039, 1039, 1387, 1387, 1445, 1387,
- /* 50 */
- 1387, 1387, 1387, - 1, 53, 107, 107, 107, 107, 107,
- /* 60 */
- 485, 431, 593, 647, 701, 323, 161, 215, 377, 269,
- /* 70 */
- 539, 755, 755, 755, 755, 755, 755, 755, 755, 755,
- /* 80 */
- 755, 755, 755, 755, 755, 755, 755, 755, 755, 755,
- /* 90 */
- 797, 797, 1279, 110, 297, - 3, 2038, 977, 1034, 191,
- /* 100 */
- - 2, 191, - 2, 297, 297, 798, 340, 354, 367, 1911,
- /* 110 */
- 181, 54, 57, 163, 199, 285, 19, 151, 167, 70,
- /* 120 */
- 78, 381, 367, 543, 363, - 17, 375, 365, 363, 246,
- /* 130 */
- 363, 395, 392, - 17, 363, 363, 363, 367, 363, 445,
- /* 140 */
- 413, 363, 395, 363, 474, 365, 574, 204, 204, 574,
- /* 150 */
- 574, 574, 574, 574, 574, 574, 574, - 53, 255, 233,
- /* 160 */
- - 17, - 27, - 29, - 17, - 17, - 17, - 29, - 17, - 29, - 27,
- /* 170 */
- - 17, - 17, - 17, - 29, - 17, - 17, - 29, - 17, - 17, - 17,
- /* 180 */
- - 17, - 17, - 17, - 17, - 17, - 17, - 29, - 29, - 17, 343,
- /* 190 */
- 574, 574, 574, 596, 596, 574, 574, 204, 572, 572,
- /* 200 */
- 204, 341, 204, 370, - 53, - 53, - 53, - 53, - 53, 1483,
- /* 210 */
- 1342, 98, 76, 210, 435, 212, 328, 299, 81, 287,
- /* 220 */
- 472, 294, 217, 290, 292, 292, 370, 511, 455, 505,
- /* 230 */
- 520, 528, 478, 481, 541, 527, 446, 15, 114, - 14,
- /* 240 */
- 533, 130, 493, 497, 503, 523, 512, 525, 549, 551,
- /* 250 */
- 507, 526, 530, 516, 571, 137, 119, - 52, 69, 171,
+
+ public static $yy_shift_ofst = array(
+ -31, 406, 406, 458, 458, 94, 510, 94, 94, 94,
+ 510, 458, -10, 94, 94, 354, 146, 94, 94, 94,
+ 94, 146, 94, 94, 94, 94, 250, 94, 94, 94,
+ 94, 94, 94, 302, 94, 94, 94, 198, 42, 42,
+ 42, 42, 42, 42, 42, 42, 1772, 828, 828, 80,
+ 712, 925, 301, 65, 272, 680, 1942, 1920, 1886, 1776,
+ 647, 1949, 1977, 2008, 2004, 1963, 1998, 1956, 2012, 2012,
+ 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012,
+ 2012, 2012, 2012, 768, 650, 272, 65, 272, 65, 134,
+ 126, 479, 597, 1854, 154, 290, 95, 55, 258, 366,
+ 248, 366, 282, 443, 437, 38, 38, 437, 7, 481,
+ 410, 38, 461, 621, 596, 596, 261, 596, 596, 261,
+ 596, 596, 596, 596, 596, -31, -31, 1840, 1791, 1917,
+ 1903, 1834, 158, 238, 394, 446, 38, 25, 147, 169,
+ 147, 25, 169, 25, 38, 38, 25, 25, 38, 25,
+ 307, 38, 38, 25, 527, 38, 38, 25, 38, 38,
+ 38, 38, 38, 596, 624, 261, 624, 327, 596, 596,
+ 261, 596, 261, -31, -31, -31, -31, -31, -31, 781,
+ 3, 31, 193, 137, -30, 186, -17, 522, 349, 469,
+ 322, 30, 82, 316, 346, 376, 190, 358, 393, 152,
+ 209, 380, 385, 245, 315, 523, 585, 554, 576, 575,
+ 537, 573, 569, 529, 525, 546, 500, 526, 531, 325,
+ 530, 487, 494, 502, 470, 433, 430, 408, 383, 327,
+ 374,
);
- const YY_REDUCE_USE_DFLT = - 73;
- const YY_REDUCE_MAX = 208;
- static public $yy_reduce_ofst = array(
- /* 0 */
- - 22, 1449, 1540, 1504, 1481, 1568, 1515, 1591, 1925, 2072,
- /* 10 */
- 1750, 1818, 1895, 1644, 1663, 1914, 2205, 2277, 1876, 1731,
- /* 20 */
- 1857, 1633, 1701, 2186, 2150, 2296, 2266, 2091, 2047, 1993,
- /* 30 */
- 2241, 2102, 1720, 1788, 1982, 1769, 1807, 1610, 1682, 2175,
- /* 40 */
- 2216, 2121, 1944, 2018, 805, 869, 884, 979, 925, 985,
- /* 50 */
- 1041, 1157, 1099, 1220, 1336, 2129, 1278, 1336, 1564, 2055,
- /* 60 */
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- /* 70 */
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- /* 80 */
- 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
- /* 90 */
- 190, 190, 261, 208, 153, 193, 154, 827, 826, 369,
- /* 100 */
- 804, 315, 872, 316, 424, - 34, 839, 82, - 72, 372,
- /* 110 */
- 349, - 32, - 32, - 32, 559, 351, 351, 351, - 32, 30,
- /* 120 */
- - 32, 30, 345, 30, 453, 420, 368, 242, 344, - 32,
- /* 130 */
- 276, 561, 451, 419, 506, 615, 668, 396, 613, 615,
- /* 140 */
- 350, 614, 615, 667, 615, 139, - 32, 30, 109, - 32,
- /* 150 */
- - 32, - 32, - 32, - 32, - 32, - 32, 23, - 32, 462, 482,
- /* 160 */
- 473, 466, 464, 473, 473, 473, 464, 473, 464, 468,
- /* 170 */
- 473, 473, 473, 464, 473, 473, 464, 473, 473, 473,
- /* 180 */
- 473, 473, 473, 473, 473, 473, 464, 464, 473, 489,
- /* 190 */
- 479, 479, 479, 480, 480, 479, 479, 189, 504, 499,
- /* 200 */
- 189, 241, 189, 348, 356, 393, 389, 95, 385,
+
+ public static $yy_reduce_ofst = array(
+ 471, 504, 563, 717, 574, 685, 919, 890, 787, 758,
+ 855, 823, 1240, 1199, 1140, 1100, 1070, 1129, 1170, 1210,
+ 1269, 1280, 1310, 1339, 1350, 1380, 1409, 1420, 1450, 1479,
+ 1490, 1059, 1030, 1000, 930, 960, 989, 1520, 1549, 1700,
+ 1619, 1689, 1660, 1630, 1590, 1560, 633, 661, 867, 8,
+ 166, 773, 255, 541, 174, 262, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 294, -70, 196, 120, 68, 274, 19,
+ 206, 331, 444, 428, 257, 400, 382, 257, 257, 400,
+ 386, 397, 257, 386, 381, 388, 359, 314, 257, 442,
+ 482, 491, 484, 257, 257, 455, 386, 257, 257, 438,
+ 257, 257, 257, 257, 257, 257, 365, 509, 509, 509,
+ 509, 509, 524, 536, 509, 509, 528, 514, 539, 551,
+ 538, 514, 556, 514, 528, 528, 514, 514, 528, 514,
+ 518, 528, 528, 514, 532, 528, 528, 514, 528, 528,
+ 528, 528, 528, -90, 520, 122, 520, 566, -90, -90,
+ 122, -90, 122, -45, 36, 155, 101, 61, 17,
);
- static public $yyExpectedTokens = array(
- /* 0 */
- array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 23, 24, 29, 33, 35,),
- /* 1 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 2 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 3 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 4 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 5 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 6 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 7 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 8 */
- array(18, 19, 20, 23, 24, 29, 33, 34, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 9 */
- array(18, 19, 20, 23, 24, 29, 33, 34, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 10 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 66, 79,),
- /* 11 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 12 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 13 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 14 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 15 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 16 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 17 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 18 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 19 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 20 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 21 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 22 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 23 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 24 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 25 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 26 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 27 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 28 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 29 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 30 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 31 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 32 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 33 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 34 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 35 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 36 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 37 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 38 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 39 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 40 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 41 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 42 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 43 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 44 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 45 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 65, 79,),
- /* 46 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 47 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 48 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 49 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 50 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 51 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 52 */
- array(18, 19, 20, 23, 24, 29, 33, 35, 37, 39, 42, 57, 58, 59, 60, 61, 64, 79,),
- /* 53 */
- array(1, 28, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 54 */
- array(1, 3, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 55 */
- array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 56 */
- array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 57 */
- array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 58 */
- array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 59 */
- array(1, 30, 36, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 60 */
- array(1, 3, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 61 */
- array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 62 */
- array(1, 25, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 63 */
- array(1, 3, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 64 */
- array(1, 3, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 65 */
- array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 66 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80,),
- /* 67 */
- array(1, 31, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 68 */
- array(1, 3, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 69 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 70 */
- array(1, 2, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 71 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 72 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 73 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 74 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 75 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 76 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 77 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 78 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 79 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 80 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 81 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 82 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 83 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 84 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 85 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 86 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 87 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 88 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 89 */
- array(1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 90 */
- array(41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 91 */
- array(41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,),
- /* 92 */
- array(1, 3, 22, 30, 36, 39, 62,),
- /* 93 */
- array(1, 3, 30, 36, 55,),
- /* 94 */
- array(1, 30, 36,),
- /* 95 */
- array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 23, 24, 29, 33, 35,),
- /* 96 */
- array(11, 18, 23, 24, 29, 33, 35, 79, 80, 81,),
- /* 97 */
- array(18, 20, 30, 32, 36,),
- /* 98 */
- array(18, 20, 30, 32, 36,),
- /* 99 */
- array(1, 3, 30, 36,),
- /* 100 */
- array(18, 20, 30, 36,),
- /* 101 */
- array(1, 3, 30, 36,),
- /* 102 */
- array(18, 20, 30, 36,),
- /* 103 */
- array(1, 30, 36,),
- /* 104 */
- array(1, 30, 36,),
- /* 105 */
- array(22, 60, 65,),
- /* 106 */
- array(19, 20, 64,),
- /* 107 */
+
+ public static $yyExpectedTokens = array(
+ array(),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 53, 54, 59,
+ 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(
+ 10, 11, 12, 13, 15, 17, 19, 20, 21, 26, 30, 31, 32, 34, 36, 39, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59, 60,
+ ),
+ array(25, 27, 33, 38, 39, 40, 55, 56, 57, 58,),
+ array(27, 33, 38, 39, 40, 55, 56, 57, 58,),
+ array(27, 33, 38, 39, 40, 55, 56, 57, 58,),
+ array(15, 17, 49, 51, 54,),
+ array(4, 10, 11, 12, 13, 15, 19, 20, 21, 26, 30, 31, 32, 60, 61,),
+ array(1, 14, 18, 27, 33, 36, 48,),
+ array(15, 17, 51, 54,),
+ array(1, 27, 33,),
+ array(15, 36, 54,),
+ array(4, 10, 11, 12, 13, 15, 19, 20, 21, 26, 30, 31, 32, 60, 61,),
+ array(14, 38, 39, 40, 55, 56, 57, 58,),
+ array(2, 38, 39, 40, 55, 56, 57, 58,),
+ array(37, 38, 39, 40, 55, 56, 57, 58,),
+ array(37, 38, 39, 40, 55, 56, 57, 58,),
+ array(14, 38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58, 61,),
+ array(14, 38, 39, 40, 55, 56, 57, 58,),
+ array(14, 38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 53, 55, 56, 57, 58,),
+ array(22, 38, 39, 40, 55, 56, 57, 58,),
+ array(28, 38, 39, 40, 55, 56, 57, 58,),
+ array(14, 38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(38, 39, 40, 55, 56, 57, 58,),
+ array(10, 13, 17, 27, 29, 33,),
+ array(10, 13, 17, 27, 33,),
+ array(15, 36, 54,),
+ array(1, 27, 33,),
+ array(15, 36, 54,),
+ array(1, 27, 33,),
+ array(18, 45, 52,),
+ array(16, 18, 48,),
array(1, 2,),
- /* 108 */
- array(19, 39,),
- /* 109 */
- array(11, 18, 23, 24, 29, 33, 35, 79, 80, 81,),
- /* 110 */
- array(5, 6, 7, 8, 9, 15, 16, 17,),
- /* 111 */
- array(1, 3, 30, 31, 36, 55,),
- /* 112 */
- array(1, 3, 30, 36, 55,),
- /* 113 */
- array(1, 3, 30, 36, 55,),
- /* 114 */
- array(18, 20, 21, 26,),
- /* 115 */
- array(18, 20, 21, 63,),
- /* 116 */
- array(18, 20, 63,),
- /* 117 */
- array(18, 20, 21,),
- /* 118 */
- array(1, 3, 55,),
- /* 119 */
- array(21, 22, 62,),
- /* 120 */
- array(1, 32, 55,),
- /* 121 */
- array(21, 22, 62,),
- /* 122 */
- array(19, 39,),
- /* 123 */
- array(22, 62,),
- /* 124 */
- array(18, 20,),
- /* 125 */
- array(30, 36,),
- /* 126 */
- array(30, 36,),
- /* 127 */
- array(19, 20,),
- /* 128 */
- array(18, 20,),
- /* 129 */
- array(1, 55,),
- /* 130 */
- array(18, 20,),
- /* 131 */
- array(18, 20,),
- /* 132 */
- array(18, 20,),
- /* 133 */
- array(30, 36,),
- /* 134 */
- array(18, 20,),
- /* 135 */
- array(18, 20,),
- /* 136 */
- array(18, 20,),
- /* 137 */
- array(19, 39,),
- /* 138 */
- array(18, 20,),
- /* 139 */
- array(18, 20,),
- /* 140 */
- array(1, 22,),
- /* 141 */
- array(18, 20,),
- /* 142 */
- array(18, 20,),
- /* 143 */
- array(18, 20,),
- /* 144 */
- array(18, 20,),
- /* 145 */
- array(19, 20,),
- /* 146 */
+ array(3, 4, 5, 6, 7, 10, 11, 12, 13, 19, 20, 21, 26, 30, 31, 32,),
+ array(2, 10, 13, 16, 17, 18, 45, 48, 50, 52,),
+ array(1, 14, 27, 33,),
+ array(10, 13, 17, 50,),
+ array(13, 15, 17, 54,),
+ array(1, 14, 27, 33,),
+ array(1, 14, 27, 33,),
+ array(10, 13, 17,),
+ array(16, 18, 48,),
+ array(10, 13, 17,),
+ array(1, 29,),
+ array(18, 48,),
+ array(15, 17,),
+ array(27, 33,),
+ array(27, 33,),
+ array(15, 17,),
+ array(1, 53,),
+ array(27, 33,),
+ array(1, 18,),
+ array(27, 33,),
+ array(15, 54,),
array(1,),
- /* 147 */
- array(22,),
- /* 148 */
- array(22,),
- /* 149 */
array(1,),
- /* 150 */
array(1,),
- /* 151 */
+ array(18,),
array(1,),
- /* 152 */
array(1,),
- /* 153 */
+ array(18,),
array(1,),
- /* 154 */
array(1,),
- /* 155 */
array(1,),
- /* 156 */
array(1,),
- /* 157 */
- array(),
- /* 158 */
- array(18, 19, 20,),
- /* 159 */
- array(18, 20, 63,),
- /* 160 */
- array(30, 36,),
- /* 161 */
- array(60, 65,),
- /* 162 */
- array(60, 65,),
- /* 163 */
- array(30, 36,),
- /* 164 */
- array(30, 36,),
- /* 165 */
- array(30, 36,),
- /* 166 */
- array(60, 65,),
- /* 167 */
- array(30, 36,),
- /* 168 */
- array(60, 65,),
- /* 169 */
- array(60, 65,),
- /* 170 */
- array(30, 36,),
- /* 171 */
- array(30, 36,),
- /* 172 */
- array(30, 36,),
- /* 173 */
- array(60, 65,),
- /* 174 */
- array(30, 36,),
- /* 175 */
- array(30, 36,),
- /* 176 */
- array(60, 65,),
- /* 177 */
- array(30, 36,),
- /* 178 */
- array(30, 36,),
- /* 179 */
- array(30, 36,),
- /* 180 */
- array(30, 36,),
- /* 181 */
- array(30, 36,),
- /* 182 */
- array(30, 36,),
- /* 183 */
- array(30, 36,),
- /* 184 */
- array(30, 36,),
- /* 185 */
- array(30, 36,),
- /* 186 */
- array(60, 65,),
- /* 187 */
- array(60, 65,),
- /* 188 */
- array(30, 36,),
- /* 189 */
- array(18, 39,),
- /* 190 */
array(1,),
- /* 191 */
- array(1,),
- /* 192 */
+ array(),
+ array(),
+ array(2, 10, 13, 17, 18, 45, 48, 50, 52, 53,),
+ array(2, 10, 13, 16, 17, 18, 45, 48, 50, 52,),
+ array(2, 10, 13, 17, 18, 45, 48, 50, 52,),
+ array(2, 10, 13, 17, 18, 45, 48, 50, 52,),
+ array(10, 13, 17, 18, 45, 48, 50, 52,),
+ array(13, 15, 17, 34, 54,),
+ array(10, 13, 17, 50,),
+ array(16, 45, 52,),
+ array(10, 13, 17,),
+ array(27, 33,),
+ array(45, 52,),
+ array(15, 54,),
+ array(45, 52,),
+ array(15, 54,),
+ array(45, 52,),
+ array(45, 52,),
+ array(45, 52,),
+ array(27, 33,),
+ array(27, 33,),
+ array(45, 52,),
+ array(45, 52,),
+ array(27, 33,),
+ array(45, 52,),
+ array(13, 36,),
+ array(27, 33,),
+ array(27, 33,),
+ array(45, 52,),
+ array(16, 23,),
+ array(27, 33,),
+ array(27, 33,),
+ array(45, 52,),
+ array(27, 33,),
+ array(27, 33,),
+ array(27, 33,),
+ array(27, 33,),
+ array(27, 33,),
array(1,),
- /* 193 */
array(2,),
- /* 194 */
+ array(18,),
array(2,),
- /* 195 */
+ array(36,),
+ array(1,),
array(1,),
- /* 196 */
+ array(18,),
array(1,),
- /* 197 */
- array(22,),
- /* 198 */
- array(30,),
- /* 199 */
- array(30,),
- /* 200 */
- array(22,),
- /* 201 */
+ array(18,),
+ array(),
+ array(),
+ array(),
+ array(),
+ array(),
+ array(),
+ array(2, 36, 38, 39, 40, 48, 55, 56, 57, 58,),
+ array(14, 22, 24, 27, 33, 35, 37, 45,),
+ array(14, 16, 27, 33, 36, 48,),
+ array(14, 23, 27, 33, 46,),
+ array(14, 23, 27, 33, 46,),
+ array(36, 45, 48, 53,),
+ array(10, 13, 17, 50,),
+ array(29, 36, 48,),
+ array(23, 46, 61,),
+ array(23, 46, 53,),
+ array(35, 37,),
+ array(35, 37,),
+ array(16, 45,),
+ array(35, 53,),
+ array(8, 9,),
+ array(36, 48,),
+ array(36, 48,),
+ array(35, 37,),
+ array(23, 46,),
+ array(36, 48,),
+ array(17, 50,),
+ array(22, 35,),
+ array(7, 9,),
+ array(35, 37,),
+ array(45, 53,),
+ array(24,),
array(16,),
- /* 202 */
- array(22,),
- /* 203 */
- array(39,),
- /* 204 */
- array(),
- /* 205 */
- array(),
- /* 206 */
- array(),
- /* 207 */
- array(),
- /* 208 */
- array(),
- /* 209 */
- array(3, 25, 27, 28, 30, 31, 36, 38, 39, 40, 55, 62, 66, 80,),
- /* 210 */
- array(3, 21, 30, 36, 39, 62,),
- /* 211 */
- array(18, 19, 20, 37,),
- /* 212 */
- array(39, 60, 62, 66,),
- /* 213 */
- array(32, 39, 62,),
- /* 214 */
- array(2, 21,),
- /* 215 */
- array(38, 40,),
- /* 216 */
- array(21, 60,),
- /* 217 */
- array(3, 26,),
- /* 218 */
- array(38, 66,),
- /* 219 */
- array(20, 63,),
- /* 220 */
- array(25, 38,),
- /* 221 */
- array(38, 40,),
- /* 222 */
- array(26, 80,),
- /* 223 */
- array(38, 40,),
- /* 224 */
- array(39, 62,),
- /* 225 */
- array(39, 62,),
- /* 226 */
- array(39,),
- /* 227 */
- array(3,),
- /* 228 */
- array(64,),
- /* 229 */
- array(19,),
- /* 230 */
- array(3,),
- /* 231 */
- array(19,),
- /* 232 */
- array(40,),
- /* 233 */
- array(64,),
- /* 234 */
- array(27,),
- /* 235 */
- array(21,),
- /* 236 */
- array(20,),
- /* 237 */
- array(2,),
- /* 238 */
- array(20,),
- /* 239 */
- array(39,),
- /* 240 */
- array(37,),
- /* 241 */
+ array(8,),
array(37,),
- /* 242 */
- array(20,),
- /* 243 */
- array(20,),
- /* 244 */
- array(19,),
- /* 245 */
- array(20,),
- /* 246 */
- array(3,),
- /* 247 */
- array(19,),
- /* 248 */
- array(20,),
- /* 249 */
- array(20,),
- /* 250 */
- array(60,),
- /* 251 */
- array(20,),
- /* 252 */
- array(20,),
- /* 253 */
- array(56,),
- /* 254 */
- array(2,),
- /* 255 */
- array(26,),
- /* 256 */
- array(20,),
- /* 257 */
- array(66,),
- /* 258 */
- array(19,),
- /* 259 */
- array(20,),
- /* 260 */
- array(),
- /* 261 */
- array(),
- /* 262 */
+ array(14,),
+ array(17,),
+ array(51,),
+ array(14,),
+ array(15,),
+ array(53,),
+ array(53,),
+ array(17,),
+ array(51,),
+ array(41,),
+ array(17,),
+ array(17,),
+ array(17,),
+ array(45,),
+ array(34,),
+ array(17,),
+ array(17,),
+ array(34,),
+ array(17,),
+ array(36,),
+ array(17,),
+ array(36,),
+ array(17,),
array(),
- /* 263 */
array(),
- /* 264 */
array(),
- /* 265 */
array(),
- /* 266 */
array(),
- /* 267 */
array(),
- /* 268 */
array(),
- /* 269 */
array(),
- /* 270 */
array(),
- /* 271 */
array(),
- /* 272 */
array(),
- /* 273 */
array(),
- /* 274 */
array(),
- /* 275 */
array(),
- /* 276 */
array(),
- /* 277 */
array(),
- /* 278 */
array(),
- /* 279 */
array(),
- /* 280 */
array(),
- /* 281 */
array(),
- /* 282 */
array(),
- /* 283 */
array(),
- /* 284 */
array(),
- /* 285 */
array(),
- /* 286 */
array(),
- /* 287 */
array(),
- /* 288 */
array(),
- /* 289 */
array(),
- /* 290 */
array(),
- /* 291 */
array(),
- /* 292 */
array(),
- /* 293 */
array(),
- /* 294 */
array(),
- /* 295 */
array(),
- /* 296 */
array(),
- /* 297 */
array(),
- /* 298 */
array(),
- /* 299 */
array(),
- /* 300 */
array(),
- /* 301 */
array(),
- /* 302 */
array(),
- /* 303 */
array(),
- /* 304 */
array(),
- /* 305 */
array(),
- /* 306 */
array(),
- /* 307 */
array(),
- /* 308 */
array(),
- /* 309 */
array(),
- /* 310 */
array(),
- /* 311 */
array(),
- /* 312 */
array(),
- /* 313 */
array(),
- /* 314 */
array(),
- /* 315 */
array(),
- /* 316 */
array(),
- /* 317 */
array(),
- /* 318 */
array(),
- /* 319 */
array(),
- /* 320 */
array(),
- /* 321 */
array(),
- /* 322 */
array(),
- /* 323 */
array(),
- /* 324 */
array(),
- /* 325 */
array(),
- /* 326 */
array(),
- /* 327 */
array(),
- /* 328 */
array(),
- /* 329 */
array(),
- /* 330 */
array(),
- /* 331 */
array(),
- /* 332 */
array(),
- /* 333 */
array(),
- /* 334 */
array(),
- /* 335 */
array(),
- /* 336 */
array(),
- /* 337 */
array(),
- /* 338 */
array(),
- /* 339 */
array(),
- /* 340 */
array(),
- /* 341 */
array(),
- /* 342 */
array(),
- /* 343 */
array(),
- /* 344 */
array(),
- /* 345 */
array(),
- /* 346 */
array(),
- /* 347 */
array(),
- /* 348 */
array(),
- /* 349 */
array(),
- /* 350 */
array(),
- /* 351 */
array(),
- /* 352 */
array(),
- /* 353 */
array(),
- /* 354 */
array(),
- /* 355 */
array(),
- /* 356 */
array(),
- /* 357 */
- array(),
- /* 358 */
- array(),
- /* 359 */
- array(),
- /* 360 */
- array(),
- /* 361 */
- array(),
- /* 362 */
array(),
);
- static public $yy_default = array(
- /* 0 */
- 366, 551, 522, 568, 568, 568, 522, 522, 568, 568,
- /* 10 */
- 568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
- /* 20 */
- 568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
- /* 30 */
- 568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
- /* 40 */
- 568, 568, 568, 568, 568, 568, 568, 568, 568, 568,
- /* 50 */
- 568, 568, 568, 428, 568, 405, 428, 428, 428, 397,
- /* 60 */
- 568, 568, 568, 568, 568, 568, 568, 433, 568, 568,
- /* 70 */
- 568, 553, 449, 520, 552, 457, 433, 452, 439, 462,
- /* 80 */
- 521, 461, 430, 435, 554, 438, 454, 453, 410, 458,
- /* 90 */
- 466, 465, 477, 441, 428, 363, 568, 428, 428, 485,
- /* 100 */
- 428, 448, 428, 428, 428, 534, 568, 419, 568, 568,
- /* 110 */
- 568, 441, 441, 441, 568, 495, 495, 495, 441, 486,
- /* 120 */
- 441, 486, 568, 486, 568, 428, 428, 568, 568, 441,
- /* 130 */
- 495, 568, 568, 407, 568, 568, 568, 568, 568, 568,
- /* 140 */
- 422, 568, 568, 568, 568, 568, 451, 486, 531, 464,
- /* 150 */
- 446, 445, 468, 444, 469, 470, 424, 529, 568, 496,
- /* 160 */
- 395, 489, 492, 412, 392, 406, 514, 409, 490, 491,
- /* 170 */
- 413, 394, 398, 513, 393, 408, 493, 400, 417, 402,
- /* 180 */
- 415, 404, 414, 418, 416, 403, 515, 512, 399, 495,
- /* 190 */
- 448, 420, 485, 523, 524, 423, 425, 532, 567, 567,
- /* 200 */
- 509, 383, 535, 495, 495, 528, 528, 528, 495, 443,
- /* 210 */
- 477, 568, 477, 477, 507, 568, 473, 467, 568, 568,
- /* 220 */
- 568, 568, 467, 568, 477, 463, 507, 568, 568, 568,
- /* 230 */
- 568, 568, 568, 568, 436, 568, 568, 507, 568, 533,
- /* 240 */
- 568, 475, 568, 568, 568, 568, 568, 568, 568, 568,
- /* 250 */
- 473, 568, 568, 479, 507, 467, 568, 568, 568, 568,
- /* 260 */
- 508, 429, 437, 364, 501, 519, 503, 440, 500, 479,
- /* 270 */
- 566, 516, 517, 502, 504, 518, 411, 530, 459, 506,
- /* 280 */
- 507, 527, 525, 427, 426, 388, 389, 390, 526, 471,
- /* 290 */
- 443, 487, 494, 497, 442, 482, 472, 474, 476, 387,
- /* 300 */
- 386, 371, 372, 373, 374, 370, 369, 365, 367, 368,
- /* 310 */
- 375, 376, 382, 384, 385, 381, 380, 377, 378, 379,
- /* 320 */
- 505, 498, 510, 421, 562, 555, 563, 447, 545, 546,
- /* 330 */
- 547, 556, 557, 558, 548, 550, 565, 564, 560, 559,
- /* 340 */
- 561, 544, 543, 450, 484, 488, 511, 483, 481, 499,
- /* 350 */
- 478, 480, 455, 456, 540, 541, 542, 539, 538, 460,
- /* 360 */
- 536, 537, 549,
+
+ public static $yy_default = array(
+ 338, 514, 514, 499, 499, 514, 514, 476, 476, 476,
+ 514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
+ 514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
+ 514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
+ 514, 514, 514, 514, 514, 514, 379, 358, 379, 514,
+ 514, 415, 514, 379, 514, 514, 351, 514, 514, 514,
+ 514, 514, 514, 514, 514, 514, 384, 514, 399, 475,
+ 351, 403, 390, 474, 500, 502, 384, 501, 363, 381,
+ 404, 386, 391, 379, 379, 514, 379, 514, 379, 489,
+ 431, 370, 327, 430, 393, 441, 514, 393, 393, 441,
+ 431, 441, 393, 431, 514, 379, 360, 514, 393, 379,
+ 373, 379, 514, 406, 402, 375, 431, 396, 398, 486,
+ 393, 408, 397, 407, 406, 483, 336, 430, 430, 430,
+ 430, 430, 514, 443, 457, 441, 367, 438, 514, 436,
+ 514, 435, 434, 466, 368, 348, 439, 437, 361, 467,
+ 441, 356, 354, 468, 514, 366, 355, 469, 362, 359,
+ 352, 369, 365, 371, 478, 463, 477, 441, 374, 376,
+ 490, 424, 487, 441, 441, 482, 482, 336, 482, 415,
+ 411, 415, 405, 405, 415, 442, 415, 405, 405, 514,
+ 514, 411, 514, 514, 425, 514, 514, 405, 415, 514,
+ 514, 334, 514, 411, 387, 514, 514, 514, 514, 514,
+ 514, 514, 514, 420, 514, 514, 514, 417, 514, 514,
+ 514, 411, 413, 514, 514, 514, 514, 488, 514, 457,
+ 514, 421, 364, 420, 340, 422, 357, 341, 409, 400,
+ 480, 457, 462, 401, 485, 423, 426, 342, 447, 380,
+ 416, 339, 428, 329, 330, 444, 445, 446, 394, 331,
+ 395, 429, 419, 388, 332, 418, 410, 392, 412, 333,
+ 335, 414, 337, 472, 417, 479, 427, 497, 347, 461,
+ 460, 459, 378, 346, 464, 510, 495, 511, 498, 473,
+ 377, 496, 503, 506, 513, 512, 509, 507, 504, 508,
+ 345, 458, 471, 448, 505, 454, 452, 455, 456, 450,
+ 491, 449, 492, 493, 494, 470, 451, 328, 453, 343,
+ 344, 372, 481, 432, 433, 465, 440,
);
- const YYNOCODE = 125;
- const YYSTACKDEPTH = 500;
- const YYNSTATE = 363;
- const YYNRULE = 205;
- const YYERRORSYMBOL = 82;
- const YYERRSYMDT = 'yy0';
- const YYFALLBACK = 0;
- public static $yyFallback = array();
+
+ public static $yyFallback = array();
+
+ public static $yyRuleName = array(
+ 'start ::= template',
+ 'template ::= template PHP',
+ 'template ::= template TEXT',
+ 'template ::= template STRIPON',
+ 'template ::= template STRIPOFF',
+ 'template ::= template LITERALSTART literal_e2 LITERALEND',
+ 'literal_e2 ::= literal_e1 LITERALSTART literal_e1 LITERALEND',
+ 'literal_e2 ::= literal_e1',
+ 'literal_e1 ::= literal_e1 LITERAL',
+ 'literal_e1 ::=',
+ 'template ::= template smartytag',
+ 'template ::=',
+ 'smartytag ::= SIMPELOUTPUT',
+ 'smartytag ::= SIMPLETAG',
+ 'smartytag ::= SMARTYBLOCKCHILDPARENT',
+ 'smartytag ::= LDEL tagbody RDEL',
+ 'smartytag ::= tag RDEL',
+ 'tagbody ::= outattr',
+ 'tagbody ::= DOLLARID eqoutattr',
+ 'tagbody ::= varindexed eqoutattr',
+ 'eqoutattr ::= EQUAL outattr',
+ 'outattr ::= output attributes',
+ 'output ::= variable',
+ 'output ::= value',
+ 'output ::= expr',
+ 'tag ::= LDEL ID attributes',
+ 'tag ::= LDEL ID',
+ 'tag ::= LDEL ID modifierlist attributes',
+ 'tag ::= LDEL ID PTR ID attributes',
+ 'tag ::= LDEL ID PTR ID modifierlist attributes',
+ 'tag ::= LDELMAKENOCACHE DOLLARID',
+ 'tag ::= LDELIF expr',
+ 'tag ::= LDELIF expr attributes',
+ 'tag ::= LDELIF statement',
+ 'tag ::= LDELIF statement attributes',
+ 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes',
+ 'foraction ::= EQUAL expr',
+ 'foraction ::= INCDEC',
+ 'tag ::= LDELFOR statement TO expr attributes',
+ 'tag ::= LDELFOR statement TO expr STEP expr attributes',
+ 'tag ::= LDELFOREACH SPACE expr AS varvar attributes',
+ 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes',
+ 'tag ::= LDELFOREACH attributes',
+ 'tag ::= LDELSETFILTER ID modparameters',
+ 'tag ::= LDELSETFILTER ID modparameters modifierlist',
+ 'smartytag ::= CLOSETAG',
+ 'tag ::= LDELSLASH ID',
+ 'tag ::= LDELSLASH ID modifierlist',
+ 'tag ::= LDELSLASH ID PTR ID',
+ 'tag ::= LDELSLASH ID PTR ID modifierlist',
+ 'attributes ::= attributes attribute',
+ 'attributes ::= attribute',
+ 'attributes ::=',
+ 'attribute ::= SPACE ID EQUAL ID',
+ 'attribute ::= ATTR expr',
+ 'attribute ::= ATTR value',
+ 'attribute ::= SPACE ID',
+ 'attribute ::= SPACE expr',
+ 'attribute ::= SPACE value',
+ 'attribute ::= SPACE INTEGER EQUAL expr',
+ 'statements ::= statement',
+ 'statements ::= statements COMMA statement',
+ 'statement ::= DOLLARID EQUAL INTEGER',
+ 'statement ::= DOLLARID EQUAL expr',
+ 'statement ::= varindexed EQUAL expr',
+ 'statement ::= OPENP statement CLOSEP',
+ 'expr ::= value',
+ 'expr ::= ternary',
+ 'expr ::= DOLLARID COLON ID',
+ 'expr ::= expr MATH value',
+ 'expr ::= expr UNIMATH value',
+ 'expr ::= expr tlop value',
+ 'expr ::= expr lop expr',
+ 'expr ::= expr scond',
+ 'expr ::= expr ISIN array',
+ 'expr ::= expr ISIN value',
+ 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr',
+ 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr',
+ 'value ::= variable',
+ 'value ::= UNIMATH value',
+ 'value ::= NOT value',
+ 'value ::= TYPECAST value',
+ 'value ::= variable INCDEC',
+ 'value ::= HEX',
+ 'value ::= INTEGER',
+ 'value ::= INTEGER DOT INTEGER',
+ 'value ::= INTEGER DOT',
+ 'value ::= DOT INTEGER',
+ 'value ::= ID',
+ 'value ::= function',
+ 'value ::= OPENP expr CLOSEP',
+ 'value ::= variable INSTANCEOF ns1',
+ 'value ::= variable INSTANCEOF variable',
+ 'value ::= SINGLEQUOTESTRING',
+ 'value ::= doublequoted_with_quotes',
+ 'value ::= varindexed DOUBLECOLON static_class_access',
+ 'value ::= smartytag',
+ 'value ::= value modifierlist',
+ 'value ::= NAMESPACE',
+ 'value ::= arraydef',
+ 'value ::= ns1 DOUBLECOLON static_class_access',
+ 'ns1 ::= ID',
+ 'ns1 ::= NAMESPACE',
+ 'variable ::= DOLLARID',
+ 'variable ::= varindexed',
+ 'variable ::= varvar AT ID',
+ 'variable ::= object',
+ 'variable ::= HATCH ID HATCH',
+ 'variable ::= HATCH ID HATCH arrayindex',
+ 'variable ::= HATCH variable HATCH',
+ 'variable ::= HATCH variable HATCH arrayindex',
+ 'varindexed ::= DOLLARID arrayindex',
+ 'varindexed ::= varvar arrayindex',
+ 'arrayindex ::= arrayindex indexdef',
+ 'arrayindex ::=',
+ 'indexdef ::= DOT DOLLARID',
+ 'indexdef ::= DOT varvar',
+ 'indexdef ::= DOT varvar AT ID',
+ 'indexdef ::= DOT ID',
+ 'indexdef ::= DOT INTEGER',
+ 'indexdef ::= DOT LDEL expr RDEL',
+ 'indexdef ::= OPENB ID CLOSEB',
+ 'indexdef ::= OPENB ID DOT ID CLOSEB',
+ 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB',
+ 'indexdef ::= OPENB INTEGER CLOSEB',
+ 'indexdef ::= OPENB DOLLARID CLOSEB',
+ 'indexdef ::= OPENB variable CLOSEB',
+ 'indexdef ::= OPENB value CLOSEB',
+ 'indexdef ::= OPENB expr CLOSEB',
+ 'indexdef ::= OPENB CLOSEB',
+ 'varvar ::= DOLLARID',
+ 'varvar ::= DOLLAR',
+ 'varvar ::= varvar varvarele',
+ 'varvarele ::= ID',
+ 'varvarele ::= SIMPELOUTPUT',
+ 'varvarele ::= LDEL expr RDEL',
+ 'object ::= varindexed objectchain',
+ 'objectchain ::= objectelement',
+ 'objectchain ::= objectchain objectelement',
+ 'objectelement ::= PTR ID arrayindex',
+ 'objectelement ::= PTR varvar arrayindex',
+ 'objectelement ::= PTR LDEL expr RDEL arrayindex',
+ 'objectelement ::= PTR ID LDEL expr RDEL arrayindex',
+ 'objectelement ::= PTR method',
+ 'function ::= ns1 OPENP params CLOSEP',
+ 'method ::= ID OPENP params CLOSEP',
+ 'method ::= DOLLARID OPENP params CLOSEP',
+ 'params ::= params COMMA expr',
+ 'params ::= expr',
+ 'params ::=',
+ 'modifierlist ::= modifierlist modifier modparameters',
+ 'modifierlist ::= modifier modparameters',
+ 'modifier ::= VERT AT ID',
+ 'modifier ::= VERT ID',
+ 'modparameters ::= modparameters modparameter',
+ 'modparameters ::=',
+ 'modparameter ::= COLON value',
+ 'modparameter ::= COLON UNIMATH value',
+ 'modparameter ::= COLON array',
+ 'static_class_access ::= method',
+ 'static_class_access ::= method objectchain',
+ 'static_class_access ::= ID',
+ 'static_class_access ::= DOLLARID arrayindex',
+ 'static_class_access ::= DOLLARID arrayindex objectchain',
+ 'lop ::= LOGOP',
+ 'lop ::= SLOGOP',
+ 'tlop ::= TLOGOP',
+ 'scond ::= SINGLECOND',
+ 'arraydef ::= OPENB arrayelements CLOSEB',
+ 'arraydef ::= ARRAYOPEN arrayelements CLOSEP',
+ 'arrayelements ::= arrayelement',
+ 'arrayelements ::= arrayelements COMMA arrayelement',
+ 'arrayelements ::=',
+ 'arrayelement ::= value APTR expr',
+ 'arrayelement ::= ID APTR expr',
+ 'arrayelement ::= expr',
+ 'doublequoted_with_quotes ::= QUOTE QUOTE',
+ 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE',
+ 'doublequoted ::= doublequoted doublequotedcontent',
+ 'doublequoted ::= doublequotedcontent',
+ 'doublequotedcontent ::= BACKTICK variable BACKTICK',
+ 'doublequotedcontent ::= BACKTICK expr BACKTICK',
+ 'doublequotedcontent ::= DOLLARID',
+ 'doublequotedcontent ::= LDEL variable RDEL',
+ 'doublequotedcontent ::= LDEL expr RDEL',
+ 'doublequotedcontent ::= smartytag',
+ 'doublequotedcontent ::= TEXT',
+ );
+
+ public static $yyRuleInfo = array(
+ array(0 => 63, 1 => 1),
+ array(0 => 64, 1 => 2),
+ array(0 => 64, 1 => 2),
+ array(0 => 64, 1 => 2),
+ array(0 => 64, 1 => 2),
+ array(0 => 64, 1 => 4),
+ array(0 => 65, 1 => 4),
+ array(0 => 65, 1 => 1),
+ array(0 => 66, 1 => 2),
+ array(0 => 66, 1 => 0),
+ array(0 => 64, 1 => 2),
+ array(0 => 64, 1 => 0),
+ array(0 => 67, 1 => 1),
+ array(0 => 67, 1 => 1),
+ array(0 => 67, 1 => 1),
+ array(0 => 67, 1 => 3),
+ array(0 => 67, 1 => 2),
+ array(0 => 68, 1 => 1),
+ array(0 => 68, 1 => 2),
+ array(0 => 68, 1 => 2),
+ array(0 => 71, 1 => 2),
+ array(0 => 70, 1 => 2),
+ array(0 => 73, 1 => 1),
+ array(0 => 73, 1 => 1),
+ array(0 => 73, 1 => 1),
+ array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 4),
+ array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 6),
+ array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 8),
+ array(0 => 81, 1 => 2),
+ array(0 => 81, 1 => 1),
+ array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 7),
+ array(0 => 69, 1 => 6),
+ array(0 => 69, 1 => 8),
+ array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 4),
+ array(0 => 67, 1 => 1),
+ array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 4),
+ array(0 => 69, 1 => 5),
+ array(0 => 74, 1 => 2),
+ array(0 => 74, 1 => 1),
+ array(0 => 74, 1 => 0),
+ array(0 => 84, 1 => 4),
+ array(0 => 84, 1 => 2),
+ array(0 => 84, 1 => 2),
+ array(0 => 84, 1 => 2),
+ array(0 => 84, 1 => 2),
+ array(0 => 84, 1 => 2),
+ array(0 => 84, 1 => 4),
+ array(0 => 80, 1 => 1),
+ array(0 => 80, 1 => 3),
+ array(0 => 79, 1 => 3),
+ array(0 => 79, 1 => 3),
+ array(0 => 79, 1 => 3),
+ array(0 => 79, 1 => 3),
+ array(0 => 77, 1 => 1),
+ array(0 => 77, 1 => 1),
+ array(0 => 77, 1 => 3),
+ array(0 => 77, 1 => 3),
+ array(0 => 77, 1 => 3),
+ array(0 => 77, 1 => 3),
+ array(0 => 77, 1 => 3),
+ array(0 => 77, 1 => 2),
+ array(0 => 77, 1 => 3),
+ array(0 => 77, 1 => 3),
+ array(0 => 85, 1 => 7),
+ array(0 => 85, 1 => 7),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 2),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 1),
+ array(0 => 76, 1 => 3),
+ array(0 => 91, 1 => 1),
+ array(0 => 91, 1 => 1),
+ array(0 => 75, 1 => 1),
+ array(0 => 75, 1 => 1),
+ array(0 => 75, 1 => 3),
+ array(0 => 75, 1 => 1),
+ array(0 => 75, 1 => 3),
+ array(0 => 75, 1 => 4),
+ array(0 => 75, 1 => 3),
+ array(0 => 75, 1 => 4),
+ array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 2),
+ array(0 => 96, 1 => 2),
+ array(0 => 96, 1 => 0),
+ array(0 => 97, 1 => 2),
+ array(0 => 97, 1 => 2),
+ array(0 => 97, 1 => 4),
+ array(0 => 97, 1 => 2),
+ array(0 => 97, 1 => 2),
+ array(0 => 97, 1 => 4),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 5),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 3),
+ array(0 => 97, 1 => 2),
+ array(0 => 82, 1 => 1),
+ array(0 => 82, 1 => 1),
+ array(0 => 82, 1 => 2),
+ array(0 => 98, 1 => 1),
+ array(0 => 98, 1 => 1),
+ array(0 => 98, 1 => 3),
+ array(0 => 95, 1 => 2),
+ array(0 => 99, 1 => 1),
+ array(0 => 99, 1 => 2),
+ array(0 => 100, 1 => 3),
+ array(0 => 100, 1 => 3),
+ array(0 => 100, 1 => 5),
+ array(0 => 100, 1 => 6),
+ array(0 => 100, 1 => 2),
+ array(0 => 90, 1 => 4),
+ array(0 => 101, 1 => 4),
+ array(0 => 101, 1 => 4),
+ array(0 => 102, 1 => 3),
+ array(0 => 102, 1 => 1),
+ array(0 => 102, 1 => 0),
+ array(0 => 78, 1 => 3),
+ array(0 => 78, 1 => 2),
+ array(0 => 103, 1 => 3),
+ array(0 => 103, 1 => 2),
+ array(0 => 83, 1 => 2),
+ array(0 => 83, 1 => 0),
+ array(0 => 104, 1 => 2),
+ array(0 => 104, 1 => 3),
+ array(0 => 104, 1 => 2),
+ array(0 => 93, 1 => 1),
+ array(0 => 93, 1 => 2),
+ array(0 => 93, 1 => 1),
+ array(0 => 93, 1 => 2),
+ array(0 => 93, 1 => 3),
+ array(0 => 87, 1 => 1),
+ array(0 => 87, 1 => 1),
+ array(0 => 86, 1 => 1),
+ array(0 => 88, 1 => 1),
+ array(0 => 94, 1 => 3),
+ array(0 => 94, 1 => 3),
+ array(0 => 105, 1 => 1),
+ array(0 => 105, 1 => 3),
+ array(0 => 105, 1 => 0),
+ array(0 => 106, 1 => 3),
+ array(0 => 106, 1 => 3),
+ array(0 => 106, 1 => 1),
+ array(0 => 92, 1 => 2),
+ array(0 => 92, 1 => 3),
+ array(0 => 107, 1 => 2),
+ array(0 => 107, 1 => 1),
+ array(0 => 108, 1 => 3),
+ array(0 => 108, 1 => 3),
+ array(0 => 108, 1 => 1),
+ array(0 => 108, 1 => 3),
+ array(0 => 108, 1 => 3),
+ array(0 => 108, 1 => 1),
+ array(0 => 108, 1 => 1),
+ );
+
+ public static $yyReduceMap = array(
+ 0 => 0,
+ 1 => 1,
+ 2 => 2,
+ 3 => 3,
+ 4 => 4,
+ 5 => 5,
+ 6 => 6,
+ 7 => 7,
+ 22 => 7,
+ 23 => 7,
+ 24 => 7,
+ 37 => 7,
+ 57 => 7,
+ 58 => 7,
+ 66 => 7,
+ 67 => 7,
+ 78 => 7,
+ 83 => 7,
+ 84 => 7,
+ 89 => 7,
+ 93 => 7,
+ 94 => 7,
+ 98 => 7,
+ 99 => 7,
+ 101 => 7,
+ 106 => 7,
+ 170 => 7,
+ 175 => 7,
+ 8 => 8,
+ 9 => 9,
+ 10 => 10,
+ 12 => 12,
+ 13 => 13,
+ 14 => 14,
+ 15 => 15,
+ 16 => 16,
+ 17 => 17,
+ 18 => 18,
+ 19 => 19,
+ 20 => 20,
+ 21 => 21,
+ 25 => 25,
+ 26 => 26,
+ 27 => 27,
+ 28 => 28,
+ 29 => 29,
+ 30 => 30,
+ 31 => 31,
+ 32 => 32,
+ 34 => 32,
+ 33 => 33,
+ 35 => 35,
+ 36 => 36,
+ 38 => 38,
+ 39 => 39,
+ 40 => 40,
+ 41 => 41,
+ 42 => 42,
+ 43 => 43,
+ 44 => 44,
+ 45 => 45,
+ 46 => 46,
+ 47 => 47,
+ 48 => 48,
+ 49 => 49,
+ 50 => 50,
+ 51 => 51,
+ 60 => 51,
+ 148 => 51,
+ 152 => 51,
+ 156 => 51,
+ 158 => 51,
+ 52 => 52,
+ 149 => 52,
+ 155 => 52,
+ 53 => 53,
+ 54 => 54,
+ 55 => 54,
+ 56 => 56,
+ 133 => 56,
+ 59 => 59,
+ 61 => 61,
+ 62 => 62,
+ 63 => 62,
+ 64 => 64,
+ 65 => 65,
+ 68 => 68,
+ 69 => 69,
+ 70 => 69,
+ 71 => 71,
+ 72 => 72,
+ 73 => 73,
+ 74 => 74,
+ 75 => 75,
+ 76 => 76,
+ 77 => 77,
+ 79 => 79,
+ 81 => 79,
+ 82 => 79,
+ 113 => 79,
+ 80 => 80,
+ 85 => 85,
+ 86 => 86,
+ 87 => 87,
+ 88 => 88,
+ 90 => 90,
+ 91 => 91,
+ 92 => 91,
+ 95 => 95,
+ 96 => 96,
+ 97 => 97,
+ 100 => 100,
+ 102 => 102,
+ 103 => 103,
+ 104 => 104,
+ 105 => 105,
+ 107 => 107,
+ 108 => 108,
+ 109 => 109,
+ 110 => 110,
+ 111 => 111,
+ 112 => 112,
+ 114 => 114,
+ 172 => 114,
+ 115 => 115,
+ 116 => 116,
+ 117 => 117,
+ 118 => 118,
+ 119 => 119,
+ 120 => 120,
+ 128 => 120,
+ 121 => 121,
+ 122 => 122,
+ 123 => 123,
+ 124 => 123,
+ 126 => 123,
+ 127 => 123,
+ 125 => 125,
+ 129 => 129,
+ 130 => 130,
+ 131 => 131,
+ 176 => 131,
+ 132 => 132,
+ 134 => 134,
+ 135 => 135,
+ 136 => 136,
+ 137 => 137,
+ 138 => 138,
+ 139 => 139,
+ 140 => 140,
+ 141 => 141,
+ 142 => 142,
+ 143 => 143,
+ 144 => 144,
+ 145 => 145,
+ 146 => 146,
+ 147 => 147,
+ 150 => 150,
+ 151 => 151,
+ 153 => 153,
+ 154 => 154,
+ 157 => 157,
+ 159 => 159,
+ 160 => 160,
+ 161 => 161,
+ 162 => 162,
+ 163 => 163,
+ 164 => 164,
+ 165 => 165,
+ 166 => 166,
+ 167 => 167,
+ 168 => 168,
+ 169 => 168,
+ 171 => 171,
+ 173 => 173,
+ 174 => 174,
+ 177 => 177,
+ 178 => 178,
+ 179 => 179,
+ 180 => 180,
+ 183 => 180,
+ 181 => 181,
+ 184 => 181,
+ 182 => 182,
+ 185 => 185,
+ 186 => 186,
+ );
+
+ /**
+ * result status
+ *
+ * @var bool
+ */
+ public $successful = true;
+
+ /**
+ * return value
+ *
+ * @var mixed
+ */
+ public $retvalue = 0;
+
+ /**
+ * @var
+ */
+ public $yymajor;
+
+ /**
+ * last index of array variable
+ *
+ * @var mixed
+ */
+ public $last_index;
+
+ /**
+ * last variable name
+ *
+ * @var string
+ */
+ public $last_variable;
+
+ /**
+ * root parse tree buffer
+ *
+ * @var Smarty_Internal_ParseTree_Template
+ */
+ public $root_buffer;
+
+ /**
+ * current parse tree object
+ *
+ * @var Smarty_Internal_ParseTree
+ */
+ public $current_buffer;
+
+ /**
+ * lexer object
+ *
+ * @var Smarty_Internal_Templatelexer
+ */
+ public $lex;
+
+ /**
+ * {strip} status
+ *
+ * @var bool
+ */
+ public $strip = false;
+
+ /**
+ * compiler object
+ *
+ * @var Smarty_Internal_TemplateCompilerBase
+ */
+ public $compiler = null;
+
+ /**
+ * smarty object
+ *
+ * @var Smarty
+ */
+ public $smarty = null;
+
+ /**
+ * template object
+ *
+ * @var Smarty_Internal_Template
+ */
+ public $template = null;
+
+ /**
+ * block nesting level
+ *
+ * @var int
+ */
+ public $block_nesting_level = 0;
+
+ /**
+ * security object
+ *
+ * @var Smarty_Security
+ */
+ public $security = null;
+
+ /**
+ * template prefix array
+ *
+ * @var \Smarty_Internal_ParseTree[]
+ */
+ public $template_prefix = array();
+
+ /**
+ * template prefix array
+ *
+ * @var \Smarty_Internal_ParseTree[]
+ */
+ public $template_postfix = array();
+
+ public $yyTraceFILE;
+
+ public $yyTracePrompt;
+
+ public $yyidx;
+
+ public $yyerrcnt;
+
+ public $yystack = array();
+
+ public $yyTokenName = array(
+ '$', 'VERT', 'COLON', 'PHP',
+ 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART',
+ 'LITERALEND', 'LITERAL', 'SIMPELOUTPUT', 'SIMPLETAG',
+ 'SMARTYBLOCKCHILDPARENT', 'LDEL', 'RDEL', 'DOLLARID',
+ 'EQUAL', 'ID', 'PTR', 'LDELMAKENOCACHE',
+ 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC',
+ 'TO', 'STEP', 'LDELFOREACH', 'SPACE',
+ 'AS', 'APTR', 'LDELSETFILTER', 'CLOSETAG',
+ 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA',
+ 'OPENP', 'CLOSEP', 'MATH', 'UNIMATH',
+ 'ISIN', 'QMARK', 'NOT', 'TYPECAST',
+ 'HEX', 'DOT', 'INSTANCEOF', 'SINGLEQUOTESTRING',
+ 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH',
+ 'OPENB', 'CLOSEB', 'DOLLAR', 'LOGOP',
+ 'SLOGOP', 'TLOGOP', 'SINGLECOND', 'ARRAYOPEN',
+ 'QUOTE', 'BACKTICK', 'error', 'start',
+ 'template', 'literal_e2', 'literal_e1', 'smartytag',
+ 'tagbody', 'tag', 'outattr', 'eqoutattr',
+ 'varindexed', 'output', 'attributes', 'variable',
+ 'value', 'expr', 'modifierlist', 'statement',
+ 'statements', 'foraction', 'varvar', 'modparameters',
+ 'attribute', 'ternary', 'tlop', 'lop',
+ 'scond', 'array', 'function', 'ns1',
+ 'doublequoted_with_quotes', 'static_class_access', 'arraydef', 'object',
+ 'arrayindex', 'indexdef', 'varvarele', 'objectchain',
+ 'objectelement', 'method', 'params', 'modifier',
+ 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted',
+ 'doublequotedcontent',
+ );
+
+ /**
+ * internal error flag
+ *
+ * @var bool
+ */
+ private $internalError = false; /* Index of top element in stack */
+ private $_retvalue; /* Shifts left before out of the error */
+ /**
+ * constructor
+ *
+ * @param Smarty_Internal_Templatelexer $lex
+ * @param Smarty_Internal_TemplateCompilerBase $compiler
+ */
+ public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler)
+ {
+ $this->lex = $lex;
+ $this->compiler = $compiler;
+ $this->template = $this->compiler->template;
+ $this->smarty = $this->template->smarty;
+ $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false;
+ $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template();
+ } /* The parser's stack */
+ public static function yy_destructor($yymajor, $yypminor)
+ {
+ switch ($yymajor) {
+ default:
+ break; /* If no destructor action specified: do nothing */
+ }
+ }
+
+ /**
+ * insert PHP code in current buffer
+ *
+ * @param string $code
+ */
+ public function insertPhpCode($code)
+ {
+ $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code));
+ }
+
+ /**
+ * error rundown
+ *
+ */
+ public function errorRunDown()
+ {
+ while ($this->yystack !== array()) {
+ $this->yy_pop_parser_stack();
+ }
+ if (is_resource($this->yyTraceFILE)) {
+ fclose($this->yyTraceFILE);
+ }
+ }
+
+ /**
+ * merge PHP code with prefix code and return parse tree tag object
+ *
+ * @param string $code
+ *
+ * @return Smarty_Internal_ParseTree_Tag
+ */
+ public function mergePrefixCode($code)
+ {
+ $tmp = '';
+ foreach ($this->compiler->prefix_code as $preCode) {
+ $tmp .= $preCode;
+ }
+ $this->compiler->prefix_code = array();
+ $tmp .= $code;
+ return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true));
+ }
public function Trace($TraceFILE, $zTracePrompt)
{
@@ -2131,500 +1840,38 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
$this->yyTracePrompt = '
';
}
- public $yyTraceFILE;
- public $yyTracePrompt;
- public $yyidx; /* Index of top element in stack */
- public $yyerrcnt; /* Shifts left before out of the error */
- public $yystack = array(); /* The parser's stack */
-
- public $yyTokenName = array(
- '$', 'VERT', 'COLON', 'RDEL',
- 'COMMENT', 'PHPSTARTTAG', 'PHPENDTAG', 'ASPSTARTTAG',
- 'ASPENDTAG', 'FAKEPHPSTARTTAG', 'XMLTAG', 'TEXT',
- 'STRIPON', 'STRIPOFF', 'BLOCKSOURCE', 'LITERALSTART',
- 'LITERALEND', 'LITERAL', 'LDEL', 'DOLLAR',
- 'ID', 'EQUAL', 'PTR', 'LDELIF',
- 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO',
- 'STEP', 'LDELFOREACH', 'SPACE', 'AS',
- 'APTR', 'LDELSETFILTER', 'SMARTYBLOCKCHILDPARENT', 'LDELSLASH',
- 'ATTR', 'INTEGER', 'COMMA', 'OPENP',
- 'CLOSEP', 'MATH', 'UNIMATH', 'ANDSYM',
- 'ISIN', 'ISDIVBY', 'ISNOTDIVBY', 'ISEVEN',
- 'ISNOTEVEN', 'ISEVENBY', 'ISNOTEVENBY', 'ISODD',
- 'ISNOTODD', 'ISODDBY', 'ISNOTODDBY', 'INSTANCEOF',
- 'QMARK', 'NOT', 'TYPECAST', 'HEX',
- 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'AT',
- 'HATCH', 'OPENB', 'CLOSEB', 'EQUALS',
- 'NOTEQUALS', 'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL',
- 'LESSEQUAL', 'IDENTITY', 'NONEIDENTITY', 'MOD',
- 'LAND', 'LOR', 'LXOR', 'QUOTE',
- 'BACKTICK', 'DOLLARID', 'error', 'start',
- 'template', 'template_element', 'smartytag', 'literal',
- 'literal_elements', 'literal_element', 'value', 'modifierlist',
- 'attributes', 'expr', 'varindexed', 'statement',
- 'statements', 'optspace', 'varvar', 'foraction',
- 'modparameters', 'attribute', 'ternary', 'array',
- 'ifcond', 'lop', 'variable', 'function',
- 'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex',
- 'indexdef', 'varvarele', 'objectchain', 'objectelement',
- 'method', 'params', 'modifier', 'modparameter',
- 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent',
- );
-
- public static $yyRuleName = array(
- /* 0 */
- "start ::= template",
- /* 1 */
- "template ::= template_element",
- /* 2 */
- "template ::= template template_element",
- /* 3 */
- "template ::=",
- /* 4 */
- "template_element ::= smartytag RDEL",
- /* 5 */
- "template_element ::= COMMENT",
- /* 6 */
- "template_element ::= literal",
- /* 7 */
- "template_element ::= PHPSTARTTAG",
- /* 8 */
- "template_element ::= PHPENDTAG",
- /* 9 */
- "template_element ::= ASPSTARTTAG",
- /* 10 */
- "template_element ::= ASPENDTAG",
- /* 11 */
- "template_element ::= FAKEPHPSTARTTAG",
- /* 12 */
- "template_element ::= XMLTAG",
- /* 13 */
- "template_element ::= TEXT",
- /* 14 */
- "template_element ::= STRIPON",
- /* 15 */
- "template_element ::= STRIPOFF",
- /* 16 */
- "template_element ::= BLOCKSOURCE",
- /* 17 */
- "literal ::= LITERALSTART LITERALEND",
- /* 18 */
- "literal ::= LITERALSTART literal_elements LITERALEND",
- /* 19 */
- "literal_elements ::= literal_elements literal_element",
- /* 20 */
- "literal_elements ::=",
- /* 21 */
- "literal_element ::= literal",
- /* 22 */
- "literal_element ::= LITERAL",
- /* 23 */
- "literal_element ::= PHPSTARTTAG",
- /* 24 */
- "literal_element ::= FAKEPHPSTARTTAG",
- /* 25 */
- "literal_element ::= PHPENDTAG",
- /* 26 */
- "literal_element ::= ASPSTARTTAG",
- /* 27 */
- "literal_element ::= ASPENDTAG",
- /* 28 */
- "smartytag ::= LDEL value",
- /* 29 */
- "smartytag ::= LDEL value modifierlist attributes",
- /* 30 */
- "smartytag ::= LDEL value attributes",
- /* 31 */
- "smartytag ::= LDEL expr modifierlist attributes",
- /* 32 */
- "smartytag ::= LDEL expr attributes",
- /* 33 */
- "smartytag ::= LDEL DOLLAR ID EQUAL value",
- /* 34 */
- "smartytag ::= LDEL DOLLAR ID EQUAL expr",
- /* 35 */
- "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes",
- /* 36 */
- "smartytag ::= LDEL varindexed EQUAL expr attributes",
- /* 37 */
- "smartytag ::= LDEL ID attributes",
- /* 38 */
- "smartytag ::= LDEL ID",
- /* 39 */
- "smartytag ::= LDEL ID PTR ID attributes",
- /* 40 */
- "smartytag ::= LDEL ID modifierlist attributes",
- /* 41 */
- "smartytag ::= LDEL ID PTR ID modifierlist attributes",
- /* 42 */
- "smartytag ::= LDELIF expr",
- /* 43 */
- "smartytag ::= LDELIF expr attributes",
- /* 44 */
- "smartytag ::= LDELIF statement",
- /* 45 */
- "smartytag ::= LDELIF statement attributes",
- /* 46 */
- "smartytag ::= LDELFOR statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes",
- /* 47 */
- "foraction ::= EQUAL expr",
- /* 48 */
- "foraction ::= INCDEC",
- /* 49 */
- "smartytag ::= LDELFOR statement TO expr attributes",
- /* 50 */
- "smartytag ::= LDELFOR statement TO expr STEP expr attributes",
- /* 51 */
- "smartytag ::= LDELFOREACH attributes",
- /* 52 */
- "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes",
- /* 53 */
- "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes",
- /* 54 */
- "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes",
- /* 55 */
- "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes",
- /* 56 */
- "smartytag ::= LDELSETFILTER ID modparameters",
- /* 57 */
- "smartytag ::= LDELSETFILTER ID modparameters modifierlist",
- /* 58 */
- "smartytag ::= LDEL SMARTYBLOCKCHILDPARENT",
- /* 59 */
- "smartytag ::= LDELSLASH ID",
- /* 60 */
- "smartytag ::= LDELSLASH ID modifierlist",
- /* 61 */
- "smartytag ::= LDELSLASH ID PTR ID",
- /* 62 */
- "smartytag ::= LDELSLASH ID PTR ID modifierlist",
- /* 63 */
- "attributes ::= attributes attribute",
- /* 64 */
- "attributes ::= attribute",
- /* 65 */
- "attributes ::=",
- /* 66 */
- "attribute ::= SPACE ID EQUAL ID",
- /* 67 */
- "attribute ::= ATTR expr",
- /* 68 */
- "attribute ::= ATTR value",
- /* 69 */
- "attribute ::= SPACE ID",
- /* 70 */
- "attribute ::= SPACE expr",
- /* 71 */
- "attribute ::= SPACE value",
- /* 72 */
- "attribute ::= SPACE INTEGER EQUAL expr",
- /* 73 */
- "statements ::= statement",
- /* 74 */
- "statements ::= statements COMMA statement",
- /* 75 */
- "statement ::= DOLLAR varvar EQUAL expr",
- /* 76 */
- "statement ::= varindexed EQUAL expr",
- /* 77 */
- "statement ::= OPENP statement CLOSEP",
- /* 78 */
- "expr ::= value",
- /* 79 */
- "expr ::= ternary",
- /* 80 */
- "expr ::= DOLLAR ID COLON ID",
- /* 81 */
- "expr ::= expr MATH value",
- /* 82 */
- "expr ::= expr UNIMATH value",
- /* 83 */
- "expr ::= expr ANDSYM value",
- /* 84 */
- "expr ::= array",
- /* 85 */
- "expr ::= expr modifierlist",
- /* 86 */
- "expr ::= expr ifcond expr",
- /* 87 */
- "expr ::= expr ISIN array",
- /* 88 */
- "expr ::= expr ISIN value",
- /* 89 */
- "expr ::= expr lop expr",
- /* 90 */
- "expr ::= expr ISDIVBY expr",
- /* 91 */
- "expr ::= expr ISNOTDIVBY expr",
- /* 92 */
- "expr ::= expr ISEVEN",
- /* 93 */
- "expr ::= expr ISNOTEVEN",
- /* 94 */
- "expr ::= expr ISEVENBY expr",
- /* 95 */
- "expr ::= expr ISNOTEVENBY expr",
- /* 96 */
- "expr ::= expr ISODD",
- /* 97 */
- "expr ::= expr ISNOTODD",
- /* 98 */
- "expr ::= expr ISODDBY expr",
- /* 99 */
- "expr ::= expr ISNOTODDBY expr",
- /* 100 */
- "expr ::= value INSTANCEOF ID",
- /* 101 */
- "expr ::= value INSTANCEOF value",
- /* 102 */
- "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr",
- /* 103 */
- "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr",
- /* 104 */
- "value ::= variable",
- /* 105 */
- "value ::= UNIMATH value",
- /* 106 */
- "value ::= NOT value",
- /* 107 */
- "value ::= TYPECAST value",
- /* 108 */
- "value ::= variable INCDEC",
- /* 109 */
- "value ::= HEX",
- /* 110 */
- "value ::= INTEGER",
- /* 111 */
- "value ::= INTEGER DOT INTEGER",
- /* 112 */
- "value ::= INTEGER DOT",
- /* 113 */
- "value ::= DOT INTEGER",
- /* 114 */
- "value ::= ID",
- /* 115 */
- "value ::= function",
- /* 116 */
- "value ::= OPENP expr CLOSEP",
- /* 117 */
- "value ::= SINGLEQUOTESTRING",
- /* 118 */
- "value ::= doublequoted_with_quotes",
- /* 119 */
- "value ::= ID DOUBLECOLON static_class_access",
- /* 120 */
- "value ::= varindexed DOUBLECOLON static_class_access",
- /* 121 */
- "value ::= smartytag RDEL",
- /* 122 */
- "value ::= value modifierlist",
- /* 123 */
- "variable ::= varindexed",
- /* 124 */
- "variable ::= DOLLAR varvar AT ID",
- /* 125 */
- "variable ::= object",
- /* 126 */
- "variable ::= HATCH ID HATCH",
- /* 127 */
- "variable ::= HATCH ID HATCH arrayindex",
- /* 128 */
- "variable ::= HATCH variable HATCH",
- /* 129 */
- "variable ::= HATCH variable HATCH arrayindex",
- /* 130 */
- "varindexed ::= DOLLAR varvar arrayindex",
- /* 131 */
- "arrayindex ::= arrayindex indexdef",
- /* 132 */
- "arrayindex ::=",
- /* 133 */
- "indexdef ::= DOT DOLLAR varvar",
- /* 134 */
- "indexdef ::= DOT DOLLAR varvar AT ID",
- /* 135 */
- "indexdef ::= DOT ID",
- /* 136 */
- "indexdef ::= DOT INTEGER",
- /* 137 */
- "indexdef ::= DOT LDEL expr RDEL",
- /* 138 */
- "indexdef ::= OPENB ID CLOSEB",
- /* 139 */
- "indexdef ::= OPENB ID DOT ID CLOSEB",
- /* 140 */
- "indexdef ::= OPENB expr CLOSEB",
- /* 141 */
- "indexdef ::= OPENB CLOSEB",
- /* 142 */
- "varvar ::= varvarele",
- /* 143 */
- "varvar ::= varvar varvarele",
- /* 144 */
- "varvarele ::= ID",
- /* 145 */
- "varvarele ::= LDEL expr RDEL",
- /* 146 */
- "object ::= varindexed objectchain",
- /* 147 */
- "objectchain ::= objectelement",
- /* 148 */
- "objectchain ::= objectchain objectelement",
- /* 149 */
- "objectelement ::= PTR ID arrayindex",
- /* 150 */
- "objectelement ::= PTR DOLLAR varvar arrayindex",
- /* 151 */
- "objectelement ::= PTR LDEL expr RDEL arrayindex",
- /* 152 */
- "objectelement ::= PTR ID LDEL expr RDEL arrayindex",
- /* 153 */
- "objectelement ::= PTR method",
- /* 154 */
- "function ::= ID OPENP params CLOSEP",
- /* 155 */
- "method ::= ID OPENP params CLOSEP",
- /* 156 */
- "method ::= DOLLAR ID OPENP params CLOSEP",
- /* 157 */
- "params ::= params COMMA expr",
- /* 158 */
- "params ::= expr",
- /* 159 */
- "params ::=",
- /* 160 */
- "modifierlist ::= modifierlist modifier modparameters",
- /* 161 */
- "modifierlist ::= modifier modparameters",
- /* 162 */
- "modifier ::= VERT AT ID",
- /* 163 */
- "modifier ::= VERT ID",
- /* 164 */
- "modparameters ::= modparameters modparameter",
- /* 165 */
- "modparameters ::=",
- /* 166 */
- "modparameter ::= COLON value",
- /* 167 */
- "modparameter ::= COLON array",
- /* 168 */
- "static_class_access ::= method",
- /* 169 */
- "static_class_access ::= method objectchain",
- /* 170 */
- "static_class_access ::= ID",
- /* 171 */
- "static_class_access ::= DOLLAR ID arrayindex",
- /* 172 */
- "static_class_access ::= DOLLAR ID arrayindex objectchain",
- /* 173 */
- "ifcond ::= EQUALS",
- /* 174 */
- "ifcond ::= NOTEQUALS",
- /* 175 */
- "ifcond ::= GREATERTHAN",
- /* 176 */
- "ifcond ::= LESSTHAN",
- /* 177 */
- "ifcond ::= GREATEREQUAL",
- /* 178 */
- "ifcond ::= LESSEQUAL",
- /* 179 */
- "ifcond ::= IDENTITY",
- /* 180 */
- "ifcond ::= NONEIDENTITY",
- /* 181 */
- "ifcond ::= MOD",
- /* 182 */
- "lop ::= LAND",
- /* 183 */
- "lop ::= LOR",
- /* 184 */
- "lop ::= LXOR",
- /* 185 */
- "array ::= OPENB arrayelements CLOSEB",
- /* 186 */
- "arrayelements ::= arrayelement",
- /* 187 */
- "arrayelements ::= arrayelements COMMA arrayelement",
- /* 188 */
- "arrayelements ::=",
- /* 189 */
- "arrayelement ::= value APTR expr",
- /* 190 */
- "arrayelement ::= ID APTR expr",
- /* 191 */
- "arrayelement ::= expr",
- /* 192 */
- "doublequoted_with_quotes ::= QUOTE QUOTE",
- /* 193 */
- "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE",
- /* 194 */
- "doublequoted ::= doublequoted doublequotedcontent",
- /* 195 */
- "doublequoted ::= doublequotedcontent",
- /* 196 */
- "doublequotedcontent ::= BACKTICK variable BACKTICK",
- /* 197 */
- "doublequotedcontent ::= BACKTICK expr BACKTICK",
- /* 198 */
- "doublequotedcontent ::= DOLLARID",
- /* 199 */
- "doublequotedcontent ::= LDEL variable RDEL",
- /* 200 */
- "doublequotedcontent ::= LDEL expr RDEL",
- /* 201 */
- "doublequotedcontent ::= smartytag RDEL",
- /* 202 */
- "doublequotedcontent ::= TEXT",
- /* 203 */
- "optspace ::= SPACE",
- /* 204 */
- "optspace ::=",
- );
-
public function tokenName($tokenType)
{
if ($tokenType === 0) {
return 'End of Input';
}
if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
- return $this->yyTokenName[$tokenType];
+ return $this->yyTokenName[ $tokenType ];
} else {
- return "Unknown";
- }
- }
-
- public static function yy_destructor($yymajor, $yypminor)
- {
- switch ($yymajor) {
- default:
- break; /* If no destructor action specified: do nothing */
+ return 'Unknown';
}
}
public function yy_pop_parser_stack()
{
- if (!count($this->yystack)) {
+ if (empty($this->yystack)) {
return;
}
$yytos = array_pop($this->yystack);
if ($this->yyTraceFILE && $this->yyidx >= 0) {
fwrite($this->yyTraceFILE,
- $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .
- "\n");
+ $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] .
+ "\n");
}
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
- $this->yyidx --;
-
+ $this->yyidx--;
return $yymajor;
}
public function __destruct()
{
- while ($this->yystack !== Array()) {
+ while ($this->yystack !== array()) {
$this->yy_pop_parser_stack();
}
if (is_resource($this->yyTraceFILE)) {
@@ -2634,10 +1881,18 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
public 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;
+ static $res3 = array();
+ static $res4 = array();
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ $expected = self::$yyExpectedTokens[ $state ];
+ if (isset($res3[ $state ][ $token ])) {
+ if ($res3[ $state ][ $token ]) {
+ return $expected;
+ }
+ } else {
+ if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
+ return $expected;
+ }
}
$stack = $this->yystack;
$yyidx = $this->yyidx;
@@ -2647,7 +1902,7 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
// reduce action
$done = 0;
do {
- if ($done ++ == 100) {
+ if ($done++ === 100) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// too much recursion prevents proper detection
@@ -2655,29 +1910,36 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
return array_unique($expected);
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
$nextstate = $this->yy_find_reduce_action(
- $this->yystack[$this->yyidx]->stateno,
- self::$yyRuleInfo[$yyruleno]['lhs']);
- if (isset(self::$yyExpectedTokens[$nextstate])) {
- $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
- if (in_array($token,
- self::$yyExpectedTokens[$nextstate], true)) {
- $this->yyidx = $yyidx;
- $this->yystack = $stack;
-
- return array_unique($expected);
+ $this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset(self::$yyExpectedTokens[ $nextstate ])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
+ if (isset($res4[ $nextstate ][ $token ])) {
+ if ($res4[ $nextstate ][ $token ]) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+ } else {
+ if ($res4[ $nextstate ][ $token ] =
+ 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 ++;
+ $this->yyidx++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
- } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ } elseif ($nextstate === self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// the last token was just ignored, we can't accept
@@ -2698,18 +1960,25 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
} while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
-
return array_unique($expected);
}
public function yy_is_expected_token($token)
{
+ static $res = array();
+ static $res2 = array();
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;
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ if (isset($res[ $state ][ $token ])) {
+ if ($res[ $state ][ $token ]) {
+ return true;
+ }
+ } else {
+ if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
+ return true;
+ }
}
$stack = $this->yystack;
$yyidx = $this->yyidx;
@@ -2719,7 +1988,7 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
// reduce action
$done = 0;
do {
- if ($done ++ == 100) {
+ if ($done++ === 100) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
// too much recursion prevents proper detection
@@ -2727,27 +1996,34 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
return true;
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
$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;
+ $this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset($res2[ $nextstate ][ $token ])) {
+ if ($res2[ $nextstate ][ $token ]) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+ } else {
+ if ($res2[ $nextstate ][ $token ] =
+ (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 ++;
+ $this->yyidx++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
- } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ } elseif ($nextstate === self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
if (!$token) {
@@ -2772,1646 +2048,1455 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
} while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
-
return true;
}
public function yy_find_shift_action($iLookAhead)
{
- $stateno = $this->yystack[$this->yyidx]->stateno;
-
+ $stateno = $this->yystack[ $this->yyidx ]->stateno;
/* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
- if (!isset(self::$yy_shift_ofst[$stateno])) {
+ if (!isset(self::$yy_shift_ofst[ $stateno ])) {
// no shift actions
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_shift_ofst[$stateno];
+ $i = self::$yy_shift_ofst[ $stateno ];
if ($i === self::YY_SHIFT_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
- if ($iLookAhead == self::YYNOCODE) {
+ if ($iLookAhead === self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
- self::$yy_lookahead[$i] != $iLookAhead
- ) {
+ self::$yy_lookahead[ $i ] != $iLookAhead) {
if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
- && ($iFallback = self::$yyFallback[$iLookAhead]) != 0
- ) {
+ && ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) {
if ($this->yyTraceFILE) {
- fwrite($this->yyTraceFILE, $this->yyTracePrompt . "FALLBACK " .
- $this->yyTokenName[$iLookAhead] . " => " .
- $this->yyTokenName[$iFallback] . "\n");
+ fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'FALLBACK ' .
+ $this->yyTokenName[ $iLookAhead ] . ' => ' .
+ $this->yyTokenName[ $iFallback ] . "\n");
}
-
return $this->yy_find_shift_action($iFallback);
}
-
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
public 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];
+ 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];
+ $i = self::$yy_reduce_ofst[ $stateno ];
+ if ($i === self::YY_REDUCE_USE_DFLT) {
+ return self::$yy_default[ $stateno ];
}
- if ($iLookAhead == self::YYNOCODE) {
+ 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];
+ self::$yy_lookahead[ $i ] != $iLookAhead) {
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
+ // line 234 "../smarty/lexer/smarty_internal_templateparser.y"
public function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
- $this->yyidx ++;
+ $this->yyidx++;
if ($this->yyidx >= self::YYSTACKDEPTH) {
- $this->yyidx --;
+ $this->yyidx--;
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt);
}
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
- #line 85 "smarty_internal_templateparser.y"
-
+ // line 221 "../smarty/lexer/smarty_internal_templateparser.y"
$this->internalError = true;
- $this->compiler->trigger_template_error("Stack overflow in template parser");
- #line 1707 "smarty_internal_templateparser.php"
-
- return;
- }
- $yytos = new TP_yyStackEntry;
- $yytos->stateno = $yyNewState;
- $yytos->major = $yyMajor;
- $yytos->minor = $yypMinor;
- array_push($this->yystack, $yytos);
- if ($this->yyTraceFILE && $this->yyidx > 0) {
- fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt,
- $yyNewState);
- fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
- for ($i = 1; $i <= $this->yyidx; $i ++) {
- fprintf($this->yyTraceFILE, " %s",
- $this->yyTokenName[$this->yystack[$i]->major]);
- }
- fwrite($this->yyTraceFILE, "\n");
- }
- }
-
- public static $yyRuleInfo = array(
- array('lhs' => 83, 'rhs' => 1),
- array('lhs' => 84, 'rhs' => 1),
- array('lhs' => 84, 'rhs' => 2),
- array('lhs' => 84, 'rhs' => 0),
- array('lhs' => 85, 'rhs' => 2),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 85, 'rhs' => 1),
- array('lhs' => 87, 'rhs' => 2),
- array('lhs' => 87, 'rhs' => 3),
- array('lhs' => 88, 'rhs' => 2),
- array('lhs' => 88, 'rhs' => 0),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 89, 'rhs' => 1),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 4),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 4),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 5),
- array('lhs' => 86, 'rhs' => 5),
- array('lhs' => 86, 'rhs' => 6),
- array('lhs' => 86, 'rhs' => 5),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 5),
- array('lhs' => 86, 'rhs' => 4),
- array('lhs' => 86, 'rhs' => 6),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 11),
- array('lhs' => 99, 'rhs' => 2),
- array('lhs' => 99, 'rhs' => 1),
- array('lhs' => 86, 'rhs' => 5),
- array('lhs' => 86, 'rhs' => 7),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 7),
- array('lhs' => 86, 'rhs' => 10),
- array('lhs' => 86, 'rhs' => 7),
- array('lhs' => 86, 'rhs' => 10),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 4),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 2),
- array('lhs' => 86, 'rhs' => 3),
- array('lhs' => 86, 'rhs' => 4),
- array('lhs' => 86, 'rhs' => 5),
- array('lhs' => 92, 'rhs' => 2),
- array('lhs' => 92, 'rhs' => 1),
- array('lhs' => 92, 'rhs' => 0),
- array('lhs' => 101, 'rhs' => 4),
- array('lhs' => 101, 'rhs' => 2),
- array('lhs' => 101, 'rhs' => 2),
- array('lhs' => 101, 'rhs' => 2),
- array('lhs' => 101, 'rhs' => 2),
- array('lhs' => 101, 'rhs' => 2),
- array('lhs' => 101, 'rhs' => 4),
- array('lhs' => 96, 'rhs' => 1),
- array('lhs' => 96, 'rhs' => 3),
- array('lhs' => 95, 'rhs' => 4),
- array('lhs' => 95, 'rhs' => 3),
- array('lhs' => 95, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 1),
- array('lhs' => 93, 'rhs' => 1),
- array('lhs' => 93, 'rhs' => 4),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 1),
- array('lhs' => 93, 'rhs' => 2),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 2),
- array('lhs' => 93, 'rhs' => 2),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 2),
- array('lhs' => 93, 'rhs' => 2),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 93, 'rhs' => 3),
- array('lhs' => 102, 'rhs' => 8),
- array('lhs' => 102, 'rhs' => 7),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 3),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 3),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 1),
- array('lhs' => 90, 'rhs' => 3),
- array('lhs' => 90, 'rhs' => 3),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 90, 'rhs' => 2),
- array('lhs' => 106, 'rhs' => 1),
- array('lhs' => 106, 'rhs' => 4),
- array('lhs' => 106, 'rhs' => 1),
- array('lhs' => 106, 'rhs' => 3),
- array('lhs' => 106, 'rhs' => 4),
- array('lhs' => 106, 'rhs' => 3),
- array('lhs' => 106, 'rhs' => 4),
- array('lhs' => 94, 'rhs' => 3),
- array('lhs' => 111, 'rhs' => 2),
- array('lhs' => 111, 'rhs' => 0),
- array('lhs' => 112, 'rhs' => 3),
- array('lhs' => 112, 'rhs' => 5),
- array('lhs' => 112, 'rhs' => 2),
- array('lhs' => 112, 'rhs' => 2),
- array('lhs' => 112, 'rhs' => 4),
- array('lhs' => 112, 'rhs' => 3),
- array('lhs' => 112, 'rhs' => 5),
- array('lhs' => 112, 'rhs' => 3),
- array('lhs' => 112, 'rhs' => 2),
- array('lhs' => 98, 'rhs' => 1),
- array('lhs' => 98, 'rhs' => 2),
- array('lhs' => 113, 'rhs' => 1),
- array('lhs' => 113, 'rhs' => 3),
- array('lhs' => 110, 'rhs' => 2),
- array('lhs' => 114, 'rhs' => 1),
- array('lhs' => 114, 'rhs' => 2),
- array('lhs' => 115, 'rhs' => 3),
- array('lhs' => 115, 'rhs' => 4),
- array('lhs' => 115, 'rhs' => 5),
- array('lhs' => 115, 'rhs' => 6),
- array('lhs' => 115, 'rhs' => 2),
- array('lhs' => 107, 'rhs' => 4),
- array('lhs' => 116, 'rhs' => 4),
- array('lhs' => 116, 'rhs' => 5),
- array('lhs' => 117, 'rhs' => 3),
- array('lhs' => 117, 'rhs' => 1),
- array('lhs' => 117, 'rhs' => 0),
- array('lhs' => 91, 'rhs' => 3),
- array('lhs' => 91, 'rhs' => 2),
- array('lhs' => 118, 'rhs' => 3),
- array('lhs' => 118, 'rhs' => 2),
- array('lhs' => 100, 'rhs' => 2),
- array('lhs' => 100, 'rhs' => 0),
- array('lhs' => 119, 'rhs' => 2),
- array('lhs' => 119, 'rhs' => 2),
- array('lhs' => 109, 'rhs' => 1),
- array('lhs' => 109, 'rhs' => 2),
- array('lhs' => 109, 'rhs' => 1),
- array('lhs' => 109, 'rhs' => 3),
- array('lhs' => 109, 'rhs' => 4),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 104, 'rhs' => 1),
- array('lhs' => 105, 'rhs' => 1),
- array('lhs' => 105, 'rhs' => 1),
- array('lhs' => 105, 'rhs' => 1),
- array('lhs' => 103, 'rhs' => 3),
- array('lhs' => 120, 'rhs' => 1),
- array('lhs' => 120, 'rhs' => 3),
- array('lhs' => 120, 'rhs' => 0),
- array('lhs' => 121, 'rhs' => 3),
- array('lhs' => 121, 'rhs' => 3),
- array('lhs' => 121, 'rhs' => 1),
- array('lhs' => 108, 'rhs' => 2),
- array('lhs' => 108, 'rhs' => 3),
- array('lhs' => 122, 'rhs' => 2),
- array('lhs' => 122, 'rhs' => 1),
- array('lhs' => 123, 'rhs' => 3),
- array('lhs' => 123, 'rhs' => 3),
- array('lhs' => 123, 'rhs' => 1),
- array('lhs' => 123, 'rhs' => 3),
- array('lhs' => 123, 'rhs' => 3),
- array('lhs' => 123, 'rhs' => 2),
- array('lhs' => 123, 'rhs' => 1),
- array('lhs' => 97, 'rhs' => 1),
- array('lhs' => 97, 'rhs' => 0),
- );
-
- public static $yyReduceMap = array(
- 0 => 0,
- 1 => 1,
- 2 => 1,
- 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,
- 20 => 17,
- 204 => 17,
- 18 => 18,
- 77 => 18,
- 19 => 19,
- 105 => 19,
- 107 => 19,
- 108 => 19,
- 131 => 19,
- 169 => 19,
- 21 => 21,
- 22 => 21,
- 48 => 21,
- 70 => 21,
- 71 => 21,
- 78 => 21,
- 79 => 21,
- 84 => 21,
- 104 => 21,
- 109 => 21,
- 110 => 21,
- 115 => 21,
- 117 => 21,
- 118 => 21,
- 125 => 21,
- 142 => 21,
- 168 => 21,
- 170 => 21,
- 186 => 21,
- 191 => 21,
- 203 => 21,
- 23 => 23,
- 24 => 23,
- 25 => 25,
- 26 => 26,
- 27 => 27,
- 28 => 28,
- 29 => 29,
- 30 => 30,
- 32 => 30,
- 31 => 31,
- 33 => 33,
- 34 => 33,
- 35 => 35,
- 36 => 36,
- 37 => 37,
- 38 => 38,
- 39 => 39,
- 40 => 40,
- 41 => 41,
- 42 => 42,
- 43 => 43,
- 45 => 43,
- 44 => 44,
- 46 => 46,
- 47 => 47,
- 49 => 49,
- 50 => 50,
- 51 => 51,
- 52 => 52,
- 54 => 52,
- 53 => 53,
- 55 => 53,
- 56 => 56,
- 57 => 57,
- 58 => 58,
- 59 => 59,
- 60 => 60,
- 61 => 61,
- 62 => 62,
- 63 => 63,
- 64 => 64,
- 73 => 64,
- 158 => 64,
- 162 => 64,
- 166 => 64,
- 167 => 64,
- 65 => 65,
- 159 => 65,
- 165 => 65,
- 66 => 66,
- 67 => 67,
- 68 => 67,
- 69 => 69,
- 72 => 72,
- 74 => 74,
- 75 => 75,
- 76 => 75,
- 80 => 80,
- 81 => 81,
- 82 => 81,
- 83 => 81,
- 85 => 85,
- 122 => 85,
- 86 => 86,
- 89 => 86,
- 100 => 86,
- 87 => 87,
- 88 => 88,
- 90 => 90,
- 91 => 91,
- 92 => 92,
- 97 => 92,
- 93 => 93,
- 96 => 93,
- 94 => 94,
- 99 => 94,
- 95 => 95,
- 98 => 95,
- 101 => 101,
- 102 => 102,
- 103 => 103,
- 106 => 106,
- 111 => 111,
- 112 => 112,
- 113 => 113,
- 114 => 114,
- 116 => 116,
- 119 => 119,
- 120 => 120,
- 121 => 121,
- 123 => 123,
- 124 => 124,
- 126 => 126,
- 127 => 127,
- 128 => 128,
- 129 => 129,
- 130 => 130,
- 132 => 132,
- 188 => 132,
- 133 => 133,
- 134 => 134,
- 135 => 135,
- 136 => 136,
- 137 => 137,
- 140 => 137,
- 138 => 138,
- 139 => 139,
- 141 => 141,
- 143 => 143,
- 144 => 144,
- 145 => 145,
- 146 => 146,
- 147 => 147,
- 148 => 148,
- 149 => 149,
- 150 => 150,
- 151 => 151,
- 152 => 152,
- 153 => 153,
- 154 => 154,
- 155 => 155,
- 156 => 156,
- 157 => 157,
- 160 => 160,
- 161 => 161,
- 163 => 163,
- 164 => 164,
- 171 => 171,
- 172 => 172,
- 173 => 173,
- 174 => 174,
- 175 => 175,
- 176 => 176,
- 177 => 177,
- 178 => 178,
- 179 => 179,
- 180 => 180,
- 181 => 181,
- 182 => 182,
- 183 => 183,
- 184 => 184,
- 185 => 185,
- 187 => 187,
- 189 => 189,
- 190 => 190,
- 192 => 192,
- 193 => 193,
- 194 => 194,
- 195 => 195,
- 196 => 196,
- 197 => 196,
- 199 => 196,
- 198 => 198,
- 200 => 200,
- 201 => 201,
- 202 => 202,
- );
-
- #line 96 "smarty_internal_templateparser.y"
- function yy_r0()
- {
- $this->_retvalue = $this->root_buffer->to_smarty_php();
- }
- #line 2146 "smarty_internal_templateparser.php"
- #line 104 "smarty_internal_templateparser.y"
- function yy_r1()
- {
- if ($this->yystack[$this->yyidx + 0]->minor != null) {
- $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor);
- }
- }
- #line 2153 "smarty_internal_templateparser.php"
- #line 124 "smarty_internal_templateparser.y"
- function yy_r4()
- {
- if ($this->compiler->has_code) {
- $tmp = '';
- foreach ($this->compiler->prefix_code as $code) {
- $tmp .= $code;
- }
- $this->compiler->prefix_code = array();
- $this->_retvalue = new _smarty_tag($this, $this->compiler->processNocacheCode($tmp . $this->yystack[$this->yyidx + - 1]->minor, true));
- } else {
- $this->_retvalue = null;
- }
- $this->compiler->has_variable_string = false;
- $this->block_nesting_level = count($this->compiler->_tag_stack);
- }
- #line 2165 "smarty_internal_templateparser.php"
- #line 136 "smarty_internal_templateparser.y"
- function yy_r5()
- {
- $this->_retvalue = null;
- }
- #line 2170 "smarty_internal_templateparser.php"
- #line 141 "smarty_internal_templateparser.y"
- function yy_r6()
- {
- $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);
- }
- #line 2175 "smarty_internal_templateparser.php"
- #line 146 "smarty_internal_templateparser.y"
- function yy_r7()
- {
- if ($this->php_handling == Smarty::PHP_PASSTHRU) {
- $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
- } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
- } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
- if (!($this->smarty instanceof SmartyBC)) {
- $this->compiler->trigger_template_error(self::Err3);
- }
- $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('php_handling == Smarty::PHP_REMOVE) {
- $this->_retvalue = null;
- }
- }
- #line 2191 "smarty_internal_templateparser.php"
- #line 162 "smarty_internal_templateparser.y"
- function yy_r8()
- {
- if ($this->is_xml) {
- $this->compiler->tag_nocache = true;
- $this->is_xml = false;
- $save = $this->template->has_nocache_code;
- $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("';?>\n", $this->compiler, true));
- $this->template->has_nocache_code = $save;
- } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) {
- $this->_retvalue = new _smarty_text($this, '?>');
- } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- $this->_retvalue = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES));
- } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
- $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true));
- } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
- $this->_retvalue = null;
- }
- }
- #line 2210 "smarty_internal_templateparser.php"
- #line 181 "smarty_internal_templateparser.y"
- function yy_r9()
- {
- if ($this->php_handling == Smarty::PHP_PASSTHRU) {
- $this->_retvalue = new _smarty_text($this, '<%');
- } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
- } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
- if ($this->asp_tags) {
- if (!($this->smarty instanceof SmartyBC)) {
- $this->compiler->trigger_template_error(self::Err3);
- }
- $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true));
- } else {
- $this->_retvalue = new _smarty_text($this, '<%');
- }
- } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
- if ($this->asp_tags) {
- $this->_retvalue = null;
- } else {
- $this->_retvalue = new _smarty_text($this, '<%');
- }
- }
- }
- #line 2234 "smarty_internal_templateparser.php"
- #line 205 "smarty_internal_templateparser.y"
- function yy_r10()
- {
- if ($this->php_handling == Smarty::PHP_PASSTHRU) {
- $this->_retvalue = new _smarty_text($this, '%>');
- } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES));
- } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
- if ($this->asp_tags) {
- $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true));
- } else {
- $this->_retvalue = new _smarty_text($this, '%>');
- }
- } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
- if ($this->asp_tags) {
- $this->_retvalue = null;
- } else {
- $this->_retvalue = new _smarty_text($this, '%>');
+ $this->compiler->trigger_template_error('Stack overflow in template parser');
+ return;
+ }
+ $yytos = new TP_yyStackEntry;
+ $yytos->stateno = $yyNewState;
+ $yytos->major = $yyMajor;
+ $yytos->minor = $yypMinor;
+ $this->yystack[] = $yytos;
+ if ($this->yyTraceFILE && $this->yyidx > 0) {
+ fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt,
+ $yyNewState);
+ fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
+ for ($i = 1; $i <= $this->yyidx; $i++) {
+ fprintf($this->yyTraceFILE, " %s",
+ $this->yyTokenName[ $this->yystack[ $i ]->major ]);
}
+ fwrite($this->yyTraceFILE, "\n");
}
}
- #line 2255 "smarty_internal_templateparser.php"
- #line 225 "smarty_internal_templateparser.y"
- function yy_r11()
+
+ // line 242 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r0()
{
- if ($this->strip) {
- $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)));
- } else {
- $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
- }
+ $this->root_buffer->prepend_array($this, $this->template_prefix);
+ $this->root_buffer->append_array($this, $this->template_postfix);
+ $this->_retvalue = $this->root_buffer->to_smarty_php($this);
}
- #line 2264 "smarty_internal_templateparser.php"
- #line 234 "smarty_internal_templateparser.y"
- function yy_r12()
- {
- $this->compiler->tag_nocache = true;
- $this->is_xml = true;
- $save = $this->template->has_nocache_code;
- $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("", $this->compiler, true));
- $this->template->has_nocache_code = $save;
+
+ // line 251 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r1()
+ {
+ $code =
+ $this->compiler->compileTag('private_php',
+ array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), array('type' => $this->lex->phpType)),
+ array());
+ if ($this->compiler->has_code && !empty($code)) {
+ $tmp = '';
+ foreach ($this->compiler->prefix_code as $code) {
+ $tmp .= $code;
+ }
+ $this->compiler->prefix_code = array();
+ $this->current_buffer->append_subtree($this,
+ new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true)));
+ }
}
- #line 2273 "smarty_internal_templateparser.php"
- #line 243 "smarty_internal_templateparser.y"
- function yy_r13()
+
+ // line 255 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r2()
{
- if ($this->strip) {
- $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor));
- } else {
- $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);
- }
+ $text = $this->yystack[ $this->yyidx + 0 ]->minor;
+
+ if ((string)$text == '') {
+ $this->current_buffer->append_subtree($this, null);
+ }
+
+ $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Text($text, $this->strip));
}
- #line 2282 "smarty_internal_templateparser.php"
- #line 252 "smarty_internal_templateparser.y"
- function yy_r14()
+
+ // line 259 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r3()
{
$this->strip = true;
}
- #line 2287 "smarty_internal_templateparser.php"
- #line 256 "smarty_internal_templateparser.y"
- function yy_r15()
+
+ // line 264 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r4()
{
$this->strip = false;
}
- #line 2292 "smarty_internal_templateparser.php"
- #line 260 "smarty_internal_templateparser.y"
- function yy_r16()
+
+ // line 269 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r5()
{
- if ($this->strip) {
- SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor));
- } else {
- SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
- }
+ $this->current_buffer->append_subtree($this,
+ new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + -1 ]->minor));
}
- #line 2301 "smarty_internal_templateparser.php"
- #line 269 "smarty_internal_templateparser.y"
- function yy_r17()
+
+ // line 272 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r6()
{
- $this->_retvalue = '';
+ $this->_retvalue = $this->yystack[ $this->yyidx + -3 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor;
}
- #line 2306 "smarty_internal_templateparser.php"
- #line 273 "smarty_internal_templateparser.y"
- function yy_r18()
+
+ // line 276 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r7()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2311 "smarty_internal_templateparser.php"
- #line 277 "smarty_internal_templateparser.y"
- function yy_r19()
+
+ // line 281 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r8()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2316 "smarty_internal_templateparser.php"
- #line 285 "smarty_internal_templateparser.y"
- function yy_r21()
+
+ // line 285 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r9()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '';
}
- #line 2321 "smarty_internal_templateparser.php"
- #line 293 "smarty_internal_templateparser.y"
- function yy_r23()
+
+ // line 297 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r10()
{
- $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor);
+ if ($this->compiler->has_code) {
+ $this->current_buffer->append_subtree($this,
+ $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor));
+ }
+ $this->compiler->has_variable_string = false;
+ $this->block_nesting_level = count($this->compiler->_tag_stack);
}
- #line 2326 "smarty_internal_templateparser.php"
- #line 301 "smarty_internal_templateparser.y"
- function yy_r25()
- {
- $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor);
+
+ // line 307 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r12()
+ {
+ $var =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
+ -$this->compiler->getRdelLength()), ' $');
+ if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) {
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', array('nocache'),
+ array('value' => $this->compiler->compileVariable('\'' . $match[ 1 ] . '\'')));
+ } else {
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', array(),
+ array('value' => $this->compiler->compileVariable('\'' . $var . '\'')));
+ }
}
- #line 2331 "smarty_internal_templateparser.php"
- #line 305 "smarty_internal_templateparser.y"
- function yy_r26()
- {
- $this->_retvalue = '<%';
+
+ // line 328 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r13()
+ {
+ $tag =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
+ -$this->compiler->getRdelLength()));
+ if ($tag == 'strip') {
+ $this->strip = true;
+ $this->_retvalue = null;
+ } else {
+ if (defined($tag)) {
+ if ($this->security) {
+ $this->security->isTrustedConstant($tag, $this->compiler);
+ }
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag));
+ } else {
+ if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) {
+ $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array('\'nocache\''));
+ } else {
+ $this->_retvalue = $this->compiler->compileTag($tag, array());
+ }
+ }
+ }
}
- #line 2336 "smarty_internal_templateparser.php"
- #line 309 "smarty_internal_templateparser.y"
- function yy_r27()
+
+ // line 339 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r14()
{
- $this->_retvalue = '%>';
+ $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.');
+ if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') {
+ // {$smarty.block.child}
+ $this->_retvalue =
+ $this->compiler->compileTag('child', array(), array($this->yystack[ $this->yyidx + 0 ]->minor));
+ } else {
+ // {$smarty.block.parent}
+ $this->_retvalue =
+ $this->compiler->compileTag('parent', array(), array($this->yystack[ $this->yyidx + 0 ]->minor));
+ }
}
- #line 2341 "smarty_internal_templateparser.php"
- #line 318 "smarty_internal_templateparser.y"
- function yy_r28()
+
+ // line 343 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r15()
{
- $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(), array('value' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
}
- #line 2346 "smarty_internal_templateparser.php"
- #line 322 "smarty_internal_templateparser.y"
- function yy_r29()
+
+ // line 347 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r16()
{
- $this->_retvalue = $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array('value' => $this->yystack[$this->yyidx + - 2]->minor, 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
}
- #line 2351 "smarty_internal_templateparser.php"
- #line 326 "smarty_internal_templateparser.y"
- function yy_r30()
+
+ // line 356 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r17()
{
- $this->_retvalue = $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array('value' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ],
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]));
}
- #line 2356 "smarty_internal_templateparser.php"
- #line 330 "smarty_internal_templateparser.y"
- function yy_r31()
+
+ // line 360 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r18()
{
- $this->_retvalue = $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array('value' => $this->yystack[$this->yyidx + - 2]->minor, 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->_retvalue =
+ $this->compiler->compileTag('assign', array_merge(array(
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]),
+ array('var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'')
+ ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]));
}
- #line 2361 "smarty_internal_templateparser.php"
- #line 343 "smarty_internal_templateparser.y"
- function yy_r33()
- {
- $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[$this->yyidx + 0]->minor), array('var' => "'" . $this->yystack[$this->yyidx + - 2]->minor . "'")));
+
+ // line 364 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r19()
+ {
+ $this->_retvalue =
+ $this->compiler->compileTag('assign', array_merge(array(
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]),
+ array('var' => $this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ])
+ ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]), array(
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx +
+ -1 ]->minor[ 'smarty_internal_index' ]
+ ));
}
- #line 2366 "smarty_internal_templateparser.php"
- #line 351 "smarty_internal_templateparser.y"
- function yy_r35()
+
+ // line 368 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r20()
{
- $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => "'" . $this->yystack[$this->yyidx + - 3]->minor . "'")), $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2371 "smarty_internal_templateparser.php"
- #line 355 "smarty_internal_templateparser.y"
- function yy_r36()
+
+ // line 383 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r21()
{
- $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(array('value' => $this->yystack[$this->yyidx + - 1]->minor), array('var' => $this->yystack[$this->yyidx + - 3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor), array('smarty_internal_index' => $this->yystack[$this->yyidx + - 3]->minor['smarty_internal_index']));
+ $this->_retvalue = array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2376 "smarty_internal_templateparser.php"
- #line 360 "smarty_internal_templateparser.y"
- function yy_r37()
+
+ // line 393 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r25()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ if (defined($this->yystack[ $this->yyidx + -1 ]->minor)) {
+ if ($this->security) {
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler);
+ }
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + -1 ]->minor));
+ } else {
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor);
+ }
}
- #line 2381 "smarty_internal_templateparser.php"
- #line 364 "smarty_internal_templateparser.y"
- function yy_r38()
+
+ // line 406 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r26()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor, array());
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
+ if ($this->security) {
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
+ }
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', array(),
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor));
+ } else {
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array());
+ }
}
- #line 2386 "smarty_internal_templateparser.php"
- #line 369 "smarty_internal_templateparser.y"
- function yy_r39()
+
+ // line 418 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r27()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor, $this->yystack[$this->yyidx + 0]->minor, array('object_method' => $this->yystack[$this->yyidx + - 1]->minor));
+ if (defined($this->yystack[ $this->yyidx + -2 ]->minor)) {
+ if ($this->security) {
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler);
+ }
+ $this->_retvalue =
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array(
+ 'value' => $this->yystack[ $this->yyidx + -2 ]->minor,
+ 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor
+ ));
+ } else {
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor));
+ }
}
- #line 2391 "smarty_internal_templateparser.php"
- #line 374 "smarty_internal_templateparser.y"
- function yy_r40()
+
+ // line 423 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r28()
{
- $this->_retvalue = '' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor, $this->yystack[$this->yyidx + 0]->minor) . '_retvalue .= $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()')) . '?>';
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('object_method' => $this->yystack[ $this->yyidx + -1 ]->minor));
}
- #line 2397 "smarty_internal_templateparser.php"
- #line 380 "smarty_internal_templateparser.y"
- function yy_r41()
+
+ // line 428 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r29()
{
- $this->_retvalue = '' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor, $this->yystack[$this->yyidx + 0]->minor, array('object_method' => $this->yystack[$this->yyidx + - 2]->minor)) . '_retvalue .= $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()')) . '?>';
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -4 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor, array(
+ 'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor,
+ 'object_method' => $this->yystack[ $this->yyidx + -2 ]->minor
+ ));
}
- #line 2403 "smarty_internal_templateparser.php"
- #line 386 "smarty_internal_templateparser.y"
- function yy_r42()
+
+ // line 433 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r30()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length));
- $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), array('if condition' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ $this->compiler->compileTag('make_nocache',
+ array(array('var' => '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'')));
}
- #line 2409 "smarty_internal_templateparser.php"
- #line 391 "smarty_internal_templateparser.y"
- function yy_r43()
+
+ // line 438 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r31()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor, $this->lex->ldel_length));
- $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, $this->yystack[$this->yyidx + 0]->minor, array('if condition' => $this->yystack[$this->yyidx + - 1]->minor));
+ $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength()));
+ $this->_retvalue =
+ $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(),
+ array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 2415 "smarty_internal_templateparser.php"
- #line 396 "smarty_internal_templateparser.y"
- function yy_r44()
+
+ // line 443 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r32()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length));
- $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(), array('if condition' => $this->yystack[$this->yyidx + 0]->minor));
+ $tag = trim(substr($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler->getLdelLength()));
+ $this->_retvalue =
+ $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('if condition' => $this->yystack[ $this->yyidx + -1 ]->minor));
}
- #line 2421 "smarty_internal_templateparser.php"
- #line 407 "smarty_internal_templateparser.y"
- function yy_r46()
+
+ // line 454 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r33()
{
- $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' => $this->yystack[$this->yyidx + - 9]->minor), array('ifexp' => $this->yystack[$this->yyidx + - 6]->minor), array('var' => $this->yystack[$this->yyidx + - 2]->minor), array('step' => $this->yystack[$this->yyidx + - 1]->minor))), 1);
+ $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength()));
+ $this->_retvalue =
+ $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(),
+ array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 2426 "smarty_internal_templateparser.php"
- #line 411 "smarty_internal_templateparser.y"
- function yy_r47()
+
+ // line 458 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r35()
{
- $this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
+ array('start' => $this->yystack[ $this->yyidx + -6 ]->minor),
+ array('ifexp' => $this->yystack[ $this->yyidx + -4 ]->minor),
+ array('var' => $this->yystack[ $this->yyidx + -2 ]->minor),
+ array('step' => $this->yystack[ $this->yyidx + -1 ]->minor)
+ )), 1);
}
- #line 2431 "smarty_internal_templateparser.php"
- #line 419 "smarty_internal_templateparser.y"
- function yy_r49()
+
+ // line 466 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r36()
{
- $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' => $this->yystack[$this->yyidx + - 3]->minor), array('to' => $this->yystack[$this->yyidx + - 1]->minor))), 0);
+ $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2436 "smarty_internal_templateparser.php"
- #line 423 "smarty_internal_templateparser.y"
- function yy_r50()
+
+ // line 470 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r38()
{
- $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' => $this->yystack[$this->yyidx + - 5]->minor), array('to' => $this->yystack[$this->yyidx + - 3]->minor), array('step' => $this->yystack[$this->yyidx + - 1]->minor))), 0);
+ $this->_retvalue =
+ $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
+ array('start' => $this->yystack[ $this->yyidx + -3 ]->minor),
+ array('to' => $this->yystack[ $this->yyidx + -1 ]->minor)
+ )), 0);
}
- #line 2441 "smarty_internal_templateparser.php"
- #line 428 "smarty_internal_templateparser.y"
- function yy_r51()
+
+ // line 475 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r39()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
+ array('start' => $this->yystack[ $this->yyidx + -5 ]->minor),
+ array('to' => $this->yystack[ $this->yyidx + -3 ]->minor),
+ array('step' => $this->yystack[ $this->yyidx + -1 ]->minor)
+ )), 0);
}
- #line 2446 "smarty_internal_templateparser.php"
- #line 433 "smarty_internal_templateparser.y"
- function yy_r52()
+
+ // line 479 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r40()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' => $this->yystack[$this->yyidx + - 4]->minor), array('item' => $this->yystack[$this->yyidx + - 1]->minor))));
+ $this->_retvalue =
+ $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
+ array('from' => $this->yystack[ $this->yyidx + -3 ]->minor),
+ array('item' => $this->yystack[ $this->yyidx + -1 ]->minor)
+ )));
}
- #line 2451 "smarty_internal_templateparser.php"
- #line 437 "smarty_internal_templateparser.y"
- function yy_r53()
+
+ // line 482 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r41()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' => $this->yystack[$this->yyidx + - 7]->minor), array('item' => $this->yystack[$this->yyidx + - 1]->minor), array('key' => $this->yystack[$this->yyidx + - 4]->minor))));
+ $this->_retvalue =
+ $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
+ array('from' => $this->yystack[ $this->yyidx + -5 ]->minor),
+ array('item' => $this->yystack[ $this->yyidx + -1 ]->minor),
+ array('key' => $this->yystack[ $this->yyidx + -3 ]->minor)
+ )));
}
- #line 2456 "smarty_internal_templateparser.php"
- #line 450 "smarty_internal_templateparser.y"
- function yy_r56()
+
+ // line 487 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r42()
{
- $this->_retvalue = $this->compiler->compileTag('setfilter', array(), array('modifier_list' => array(array_merge(array($this->yystack[$this->yyidx + - 1]->minor), $this->yystack[$this->yyidx + 0]->minor))));
+ $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2461 "smarty_internal_templateparser.php"
- #line 454 "smarty_internal_templateparser.y"
- function yy_r57()
+
+ // line 491 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r43()
{
- $this->_retvalue = $this->compiler->compileTag('setfilter', array(), array('modifier_list' => array_merge(array(array_merge(array($this->yystack[$this->yyidx + - 2]->minor), $this->yystack[$this->yyidx + - 1]->minor)), $this->yystack[$this->yyidx + 0]->minor)));
+ $this->_retvalue =
+ $this->compiler->compileTag('setfilter', array(), array(
+ 'modifier_list' => array(
+ array_merge(array($this->yystack[ $this->yyidx + -1 ]->minor),
+ $this->yystack[ $this->yyidx + 0 ]->minor)
+ )
+ ));
}
- #line 2466 "smarty_internal_templateparser.php"
- #line 459 "smarty_internal_templateparser.y"
- function yy_r58()
- {
- $j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.');
- if ($this->yystack[$this->yyidx + 0]->minor[$j + 1] == 'c') {
- // {$smarty.block.child}
- $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler);
+
+ // line 497 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r44()
+ {
+ $this->_retvalue =
+ $this->compiler->compileTag('setfilter', array(), array(
+ 'modifier_list' => array_merge(array(
+ array_merge(array(
+ $this->yystack[ $this->yyidx +
+ -2 ]->minor
+ ), $this->yystack[ $this->yyidx + -1 ]->minor)
+ ), $this->yystack[ $this->yyidx + 0 ]->minor)
+ ));
+ }
+
+ // line 506 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r45()
+ {
+ $tag =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
+ -$this->compiler->getRdelLength()), ' /');
+ if ($tag === 'strip') {
+ $this->strip = false;
+ $this->_retvalue = null;
} else {
- // {$smarty.block.parent}
- $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler);
+ $this->_retvalue = $this->compiler->compileTag($tag . 'close', array());
}
}
- #line 2478 "smarty_internal_templateparser.php"
- #line 472 "smarty_internal_templateparser.y"
- function yy_r59()
+
+ // line 510 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r46()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor . 'close', array());
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array());
}
- #line 2483 "smarty_internal_templateparser.php"
- #line 476 "smarty_internal_templateparser.y"
- function yy_r60()
+
+ // line 515 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r47()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor . 'close', array(), array('modifier_list' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor . 'close', array(),
+ array('modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 2488 "smarty_internal_templateparser.php"
- #line 481 "smarty_internal_templateparser.y"
- function yy_r61()
+
+ // line 519 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r48()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor . 'close', array(), array('object_method' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor . 'close', array(),
+ array('object_method' => $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 2493 "smarty_internal_templateparser.php"
- #line 485 "smarty_internal_templateparser.y"
- function yy_r62()
+
+ // line 527 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r49()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor . 'close', array(), array('object_method' => $this->yystack[$this->yyidx + - 1]->minor, 'modifier_list' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor . 'close', array(), array(
+ 'object_method' => $this->yystack[ $this->yyidx + -1 ]->minor,
+ 'modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor
+ ));
}
- #line 2498 "smarty_internal_templateparser.php"
- #line 493 "smarty_internal_templateparser.y"
- function yy_r63()
+
+ // line 533 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r50()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
- $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
+ $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2504 "smarty_internal_templateparser.php"
- #line 499 "smarty_internal_templateparser.y"
- function yy_r64()
+
+ // line 538 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r51()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2509 "smarty_internal_templateparser.php"
- #line 504 "smarty_internal_templateparser.y"
- function yy_r65()
+
+ // line 543 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r52()
{
$this->_retvalue = array();
}
- #line 2514 "smarty_internal_templateparser.php"
- #line 509 "smarty_internal_templateparser.y"
- function yy_r66()
+
+ // line 554 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r53()
{
- if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => 'true');
- } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => 'false');
- } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => 'null');
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
+ if ($this->security) {
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
+ }
+ $this->_retvalue =
+ array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
} else {
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => "'" . $this->yystack[$this->yyidx + 0]->minor . "'");
+ $this->_retvalue =
+ array(
+ $this->yystack[ $this->yyidx + -2 ]->minor => '\'' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ '\''
+ );
}
}
- #line 2527 "smarty_internal_templateparser.php"
- #line 521 "smarty_internal_templateparser.y"
- function yy_r67()
+
+ // line 562 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r54()
{
- $this->_retvalue = array(trim($this->yystack[$this->yyidx + - 1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ array(
+ trim($this->yystack[ $this->yyidx + -1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx +
+ 0 ]->minor
+ );
}
- #line 2532 "smarty_internal_templateparser.php"
- #line 529 "smarty_internal_templateparser.y"
- function yy_r69()
+
+ // line 574 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r56()
{
- $this->_retvalue = "'" . $this->yystack[$this->yyidx + 0]->minor . "'";
+ $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
}
- #line 2537 "smarty_internal_templateparser.php"
- #line 541 "smarty_internal_templateparser.y"
- function yy_r72()
+
+ // line 587 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r59()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2542 "smarty_internal_templateparser.php"
- #line 554 "smarty_internal_templateparser.y"
- function yy_r74()
+
+ // line 592 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r61()
{
- $this->yystack[$this->yyidx + - 2]->minor[] = $this->yystack[$this->yyidx + 0]->minor;
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor;
+ $this->yystack[ $this->yyidx + -2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor;
}
- #line 2548 "smarty_internal_templateparser.php"
- #line 559 "smarty_internal_templateparser.y"
- function yy_r75()
+
+ // line 599 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r62()
{
- $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 2]->minor, 'value' => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ array(
+ 'var' => '\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'',
+ 'value' => $this->yystack[ $this->yyidx + 0 ]->minor
+ );
}
- #line 2553 "smarty_internal_templateparser.php"
- #line 587 "smarty_internal_templateparser.y"
- function yy_r80()
+
+ // line 603 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r64()
{
- $this->_retvalue = '$_smarty_tpl->getStreamVariable(\'' . $this->yystack[$this->yyidx + - 2]->minor . '://' . $this->yystack[$this->yyidx + 0]->minor . '\')';
+ $this->_retvalue =
+ array(
+ 'var' => $this->yystack[ $this->yyidx + -2 ]->minor,
+ 'value' => $this->yystack[ $this->yyidx + 0 ]->minor
+ );
}
- #line 2558 "smarty_internal_templateparser.php"
- #line 592 "smarty_internal_templateparser.y"
- function yy_r81()
+
+ // line 623 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r65()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . trim($this->yystack[$this->yyidx + - 1]->minor) . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
}
- #line 2563 "smarty_internal_templateparser.php"
- #line 611 "smarty_internal_templateparser.y"
- function yy_r85()
+
+ // line 628 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r68()
{
- $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), array('value' => $this->yystack[$this->yyidx + - 1]->minor, 'modifierlist' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ '$_smarty_tpl->getStreamVariable(\'' .
+ substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) .
+ '://' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ '\')';
}
- #line 2568 "smarty_internal_templateparser.php"
- #line 617 "smarty_internal_templateparser.y"
- function yy_r86()
+
+ // line 638 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r69()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ trim($this->yystack[ $this->yyidx + -1 ]->minor) .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2573 "smarty_internal_templateparser.php"
- #line 621 "smarty_internal_templateparser.y"
- function yy_r87()
+
+ // line 642 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r71()
{
- $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -1 ]->minor[ 'pre' ] .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ $this->yystack[ $this->yyidx + -1 ]->minor[ 'op' ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ ')';
}
- #line 2578 "smarty_internal_templateparser.php"
- #line 625 "smarty_internal_templateparser.y"
- function yy_r88()
+
+ // line 646 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r72()
{
- $this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',(array)' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ $this->yystack[ $this->yyidx + -1 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2583 "smarty_internal_templateparser.php"
- #line 633 "smarty_internal_templateparser.y"
- function yy_r90()
+
+ // line 650 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r73()
{
- $this->_retvalue = '!(' . $this->yystack[$this->yyidx + - 2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
}
- #line 2588 "smarty_internal_templateparser.php"
- #line 637 "smarty_internal_templateparser.y"
- function yy_r91()
+
+ // line 654 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r74()
{
- $this->_retvalue = '(' . $this->yystack[$this->yyidx + - 2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue =
+ 'in_array(' .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ ',' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ ')';
}
- #line 2593 "smarty_internal_templateparser.php"
- #line 641 "smarty_internal_templateparser.y"
- function yy_r92()
+
+ // line 662 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r75()
{
- $this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue =
+ 'in_array(' .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ ',(array)' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ ')';
}
- #line 2598 "smarty_internal_templateparser.php"
- #line 645 "smarty_internal_templateparser.y"
- function yy_r93()
+
+ // line 666 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r76()
{
- $this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -5 ]->minor .
+ ' ? ' .
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'') .
+ ' : ' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2603 "smarty_internal_templateparser.php"
- #line 649 "smarty_internal_templateparser.y"
- function yy_r94()
+
+ // line 676 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r77()
{
- $this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + - 2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -5 ]->minor .
+ ' ? ' .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ ' : ' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2608 "smarty_internal_templateparser.php"
- #line 653 "smarty_internal_templateparser.y"
- function yy_r95()
+
+ // line 681 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r79()
{
- $this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + - 2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2613 "smarty_internal_templateparser.php"
- #line 677 "smarty_internal_templateparser.y"
- function yy_r101()
+
+ // line 702 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r80()
{
- self::$prefix_number ++;
- $this->compiler->prefix_code[] = 'yystack[$this->yyidx + 0]->minor . ';?>';
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . '$_tmp' . self::$prefix_number;
+ $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2620 "smarty_internal_templateparser.php"
- #line 686 "smarty_internal_templateparser.y"
- function yy_r102()
+
+ // line 706 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r85()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 6]->minor . ' ? ' . $this->compileVariable("'" . $this->yystack[$this->yyidx + - 2]->minor . "'") . ' : ' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2625 "smarty_internal_templateparser.php"
- #line 690 "smarty_internal_templateparser.y"
- function yy_r103()
+
+ // line 710 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r86()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.';
}
- #line 2630 "smarty_internal_templateparser.php"
- #line 705 "smarty_internal_templateparser.y"
- function yy_r106()
+
+ // line 715 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r87()
{
- $this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2635 "smarty_internal_templateparser.php"
- #line 726 "smarty_internal_templateparser.y"
- function yy_r111()
+
+ // line 732 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r88()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
+ if ($this->security) {
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
+ }
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
+ } else {
+ $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
+ }
}
- #line 2640 "smarty_internal_templateparser.php"
- #line 730 "smarty_internal_templateparser.y"
- function yy_r112()
+
+ // line 736 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r90()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.';
+ $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
}
- #line 2645 "smarty_internal_templateparser.php"
- #line 734 "smarty_internal_templateparser.y"
- function yy_r113()
+
+ // line 754 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r91()
{
- $this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ $this->yystack[ $this->yyidx + -1 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2650 "smarty_internal_templateparser.php"
- #line 739 "smarty_internal_templateparser.y"
- function yy_r114()
- {
- if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
- $this->_retvalue = 'true';
- } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
- $this->_retvalue = 'false';
- } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
- $this->_retvalue = 'null';
+
+ // line 765 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r95()
+ {
+ $prefixVar = $this->compiler->getNewPrefixVariable();
+ if ($this->yystack[ $this->yyidx + -2 ]->minor[ 'var' ] === '\'smarty\'') {
+ $this->compiler->appendPrefixCode("compiler->compileTag('private_special_variable', array(),
+ $this->yystack[ $this->yyidx +
+ -2 ]->minor[ 'smarty_internal_index' ]) .
+ ';?>');
} else {
- $this->_retvalue = "'" . $this->yystack[$this->yyidx + 0]->minor . "'";
+ $this->compiler->appendPrefixCode("compiler->compileVariable($this->yystack[ $this->yyidx +
+ -2 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + -2 ]->minor[ 'smarty_internal_index' ] .
+ ';?>');
}
+ $this->_retvalue =
+ $prefixVar .
+ '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
}
- #line 2663 "smarty_internal_templateparser.php"
- #line 757 "smarty_internal_templateparser.y"
- function yy_r116()
+
+ // line 772 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r96()
{
- $this->_retvalue = "(" . $this->yystack[$this->yyidx + - 1]->minor . ")";
+ $prefixVar = $this->compiler->getNewPrefixVariable();
+ $tmp = $this->compiler->appendCode('', $this->yystack[ $this->yyidx + 0 ]->minor);
+ $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, ""));
+ $this->_retvalue = $prefixVar;
}
- #line 2668 "smarty_internal_templateparser.php"
- #line 772 "smarty_internal_templateparser.y"
- function yy_r119()
+
+ // line 785 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r97()
{
- if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + - 2]->minor, $this->compiler)) {
- if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor])) {
- $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor] . '::' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->compiler->compileTag('private_modifier', array(), array(
+ 'value' => $this->yystack[ $this->yyidx + -1 ]->minor,
+ 'modifierlist' => $this->yystack[ $this->yyidx + 0 ]->minor
+ ));
+ }
+
+ // line 804 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r100()
+ {
+ if (!in_array(strtolower($this->yystack[ $this->yyidx + -2 ]->minor), array('self', 'parent')) &&
+ (!$this->security ||
+ $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + -2 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler))) {
+ if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ])) {
+ $this->_retvalue =
+ $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ] .
+ '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
} else {
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '::' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
}
} else {
- $this->compiler->trigger_template_error("static class '" . $this->yystack[$this->yyidx + - 2]->minor . "' is undefined or not allowed by security setting");
+ $this->compiler->trigger_template_error('static class \'' .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ '\' is undefined or not allowed by security setting');
}
}
- #line 2681 "smarty_internal_templateparser.php"
- #line 784 "smarty_internal_templateparser.y"
- function yy_r120()
+
+ // line 815 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r102()
{
- if ($this->yystack[$this->yyidx + - 2]->minor['var'] == '\'smarty\'') {
- $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index']) . '::' . $this->yystack[$this->yyidx + 0]->minor;
- } else {
- $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + - 2]->minor['var']) . $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index'] . '::' . $this->yystack[$this->yyidx + 0]->minor;
- }
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2690 "smarty_internal_templateparser.php"
- #line 793 "smarty_internal_templateparser.y"
- function yy_r121()
+
+ // line 818 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r103()
{
- self::$prefix_number ++;
- $this->compiler->prefix_code[] = '' . $this->yystack[$this->yyidx + - 1]->minor . '';
- $this->_retvalue = '$_tmp' . self::$prefix_number;
+ $this->_retvalue =
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'');
}
- #line 2697 "smarty_internal_templateparser.php"
- #line 808 "smarty_internal_templateparser.y"
- function yy_r123()
+
+ // line 831 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r104()
{
- if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') {
- $smarty_var = $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);
+ if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] === '\'smarty\'') {
+ $smarty_var =
+ $this->compiler->compileTag('private_special_variable', array(),
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]);
$this->_retvalue = $smarty_var;
} else {
- // used for array reset,next,prev,end,current
- $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var'];
- $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
- $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ // used for array reset,next,prev,end,current
+ $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ];
+ $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
+ $this->_retvalue =
+ $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
}
}
- #line 2710 "smarty_internal_templateparser.php"
- #line 821 "smarty_internal_templateparser.y"
- function yy_r124()
+
+ // line 841 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r105()
{
- $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[$this->yyidx + - 2]->minor . ']->' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ '$_smarty_tpl->tpl_vars[' .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ ']->' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2715 "smarty_internal_templateparser.php"
- #line 831 "smarty_internal_templateparser.y"
- function yy_r126()
+
+ // line 845 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r107()
{
- $this->_retvalue = '$_smarty_tpl->getConfigVariable(\'' . $this->yystack[$this->yyidx + - 1]->minor . '\')';
+ $this->_retvalue =
+ $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\'');
}
- #line 2720 "smarty_internal_templateparser.php"
- #line 835 "smarty_internal_templateparser.y"
- function yy_r127()
+
+ // line 849 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r108()
{
- $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable(\'' . $this->yystack[$this->yyidx + - 2]->minor . '\')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' :null)';
+ $this->_retvalue =
+ '(is_array($tmp = ' .
+ $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'') .
+ ') ? $tmp' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ ' :null)';
}
- #line 2725 "smarty_internal_templateparser.php"
- #line 839 "smarty_internal_templateparser.y"
- function yy_r128()
+
+ // line 853 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r109()
{
- $this->_retvalue = '$_smarty_tpl->getConfigVariable(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -1 ]->minor);
}
- #line 2730 "smarty_internal_templateparser.php"
- #line 843 "smarty_internal_templateparser.y"
- function yy_r129()
+
+ // line 857 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r110()
{
- $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable(' . $this->yystack[$this->yyidx + - 2]->minor . ')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' : null)';
+ $this->_retvalue =
+ '(is_array($tmp = ' .
+ $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -2 ]->minor) .
+ ') ? $tmp' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ ' : null)';
}
- #line 2735 "smarty_internal_templateparser.php"
- #line 847 "smarty_internal_templateparser.y"
- function yy_r130()
+
+ // line 860 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r111()
{
- $this->_retvalue = array('var' => $this->yystack[$this->yyidx + - 1]->minor, 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ array(
+ 'var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'',
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor
+ );
}
- #line 2740 "smarty_internal_templateparser.php"
- #line 860 "smarty_internal_templateparser.y"
- function yy_r132()
+
+ // line 873 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r112()
{
- return;
+ $this->_retvalue =
+ array(
+ 'var' => $this->yystack[ $this->yyidx + -1 ]->minor,
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor
+ );
}
- #line 2745 "smarty_internal_templateparser.php"
- #line 866 "smarty_internal_templateparser.y"
- function yy_r133()
+
+ // line 879 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r114()
{
- $this->_retvalue = '[' . $this->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']';
+ return;
}
- #line 2750 "smarty_internal_templateparser.php"
- #line 870 "smarty_internal_templateparser.y"
- function yy_r134()
+
+ // line 882 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r115()
{
- $this->_retvalue = '[' . $this->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' . $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue =
+ '[' .
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') .
+ ']';
}
- #line 2755 "smarty_internal_templateparser.php"
- #line 874 "smarty_internal_templateparser.y"
- function yy_r135()
+
+ // line 886 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r116()
{
- $this->_retvalue = "['" . $this->yystack[$this->yyidx + 0]->minor . "']";
+ $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']';
}
- #line 2760 "smarty_internal_templateparser.php"
- #line 878 "smarty_internal_templateparser.y"
- function yy_r136()
+
+ // line 890 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r117()
{
- $this->_retvalue = "[" . $this->yystack[$this->yyidx + 0]->minor . "]";
+ $this->_retvalue =
+ '[' .
+ $this->compiler->compileVariable($this->yystack[ $this->yyidx + -2 ]->minor) .
+ '->' .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ ']';
}
- #line 2765 "smarty_internal_templateparser.php"
- #line 882 "smarty_internal_templateparser.y"
- function yy_r137()
+
+ // line 894 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r118()
{
- $this->_retvalue = "[" . $this->yystack[$this->yyidx + - 1]->minor . "]";
+ $this->_retvalue = '[\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\']';
}
- #line 2770 "smarty_internal_templateparser.php"
- #line 887 "smarty_internal_templateparser.y"
- function yy_r138()
+
+ // line 899 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r119()
{
- $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + - 1]->minor . '\'][\'index\']') . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']';
}
- #line 2775 "smarty_internal_templateparser.php"
- #line 891 "smarty_internal_templateparser.y"
- function yy_r139()
+
+ // line 904 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r120()
{
- $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + - 3]->minor . '\'][\'' . $this->yystack[$this->yyidx + - 1]->minor . '\']') . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']';
}
- #line 2780 "smarty_internal_templateparser.php"
- #line 901 "smarty_internal_templateparser.y"
- function yy_r141()
+
+ // line 908 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r121()
{
- $this->_retvalue = '[]';
+ $this->_retvalue =
+ '[' .
+ $this->compiler->compileTag('private_special_variable', array(),
+ '[\'section\'][\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\'][\'index\']') .
+ ']';
}
- #line 2785 "smarty_internal_templateparser.php"
- #line 914 "smarty_internal_templateparser.y"
- function yy_r143()
- {
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
+
+ // line 911 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r122()
+ {
+ $this->_retvalue =
+ '[' .
+ $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' .
+ $this->yystack[ $this->yyidx +
+ -3 ]->minor .
+ '\'][\'' .
+ $this->yystack[ $this->yyidx +
+ -1 ]->minor .
+ '\']') .
+ ']';
}
- #line 2790 "smarty_internal_templateparser.php"
- #line 919 "smarty_internal_templateparser.y"
- function yy_r144()
+
+ // line 917 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r123()
{
- $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\'';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']';
}
- #line 2795 "smarty_internal_templateparser.php"
- #line 924 "smarty_internal_templateparser.y"
- function yy_r145()
+
+ // line 933 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r125()
{
- $this->_retvalue = '(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue =
+ '[' .
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'') .
+ ']';
}
- #line 2800 "smarty_internal_templateparser.php"
- #line 931 "smarty_internal_templateparser.y"
- function yy_r146()
+
+ // line 943 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r129()
{
- if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\'smarty\'') {
- $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index']) . $this->yystack[$this->yyidx + 0]->minor;
- } else {
- $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) . $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] . $this->yystack[$this->yyidx + 0]->minor;
- }
+ $this->_retvalue = '[]';
}
- #line 2809 "smarty_internal_templateparser.php"
- #line 940 "smarty_internal_templateparser.y"
- function yy_r147()
+
+ // line 947 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r130()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'';
}
- #line 2814 "smarty_internal_templateparser.php"
- #line 945 "smarty_internal_templateparser.y"
- function yy_r148()
+
+ // line 952 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r131()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '\'\'';
}
- #line 2819 "smarty_internal_templateparser.php"
- #line 950 "smarty_internal_templateparser.y"
- function yy_r149()
+
+ // line 960 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r132()
{
- if ($this->security && substr($this->yystack[$this->yyidx + - 1]->minor, 0, 1) == '_') {
- $this->compiler->trigger_template_error(self::Err1);
- }
- $this->_retvalue = '->' . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2827 "smarty_internal_templateparser.php"
- #line 957 "smarty_internal_templateparser.y"
- function yy_r150()
+
+ // line 966 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r134()
{
- if ($this->security) {
- $this->compiler->trigger_template_error(self::Err2);
- }
- $this->_retvalue = '->{' . $this->compileVariable($this->yystack[$this->yyidx + - 1]->minor) . $this->yystack[$this->yyidx + 0]->minor . '}';
+ $var =
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
+ -$this->compiler->getRdelLength()), ' $');
+ $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\'');
}
- #line 2835 "smarty_internal_templateparser.php"
- #line 964 "smarty_internal_templateparser.y"
- function yy_r151()
+
+ // line 973 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r135()
{
- if ($this->security) {
- $this->compiler->trigger_template_error(self::Err2);
+ $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
+ }
+
+ // line 982 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r136()
+ {
+ if ($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ] === '\'smarty\'') {
+ $this->_retvalue =
+ $this->compiler->compileTag('private_special_variable', array(),
+ $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ]) .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
+ } else {
+ $this->_retvalue =
+ $this->compiler->compileVariable($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
- $this->_retvalue = '->{' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2843 "smarty_internal_templateparser.php"
- #line 971 "smarty_internal_templateparser.y"
- function yy_r152()
+
+ // line 987 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r137()
{
- if ($this->security) {
- $this->compiler->trigger_template_error(self::Err2);
- }
- $this->_retvalue = '->{\'' . $this->yystack[$this->yyidx + - 4]->minor . '\'.' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2851 "smarty_internal_templateparser.php"
- #line 979 "smarty_internal_templateparser.y"
- function yy_r153()
+
+ // line 992 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r138()
{
- $this->_retvalue = '->' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2856 "smarty_internal_templateparser.php"
- #line 987 "smarty_internal_templateparser.y"
- function yy_r154()
+
+ // line 999 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r139()
{
- if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + - 3]->minor, $this->compiler)) {
- if (strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'array') === 0 || is_callable($this->yystack[$this->yyidx + - 3]->minor)) {
- $func_name = strtolower($this->yystack[$this->yyidx + - 3]->minor);
- if ($func_name == 'isset') {
- if (count($this->yystack[$this->yyidx + - 1]->minor) == 0) {
- $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"');
- }
- $par = implode(',', $this->yystack[$this->yyidx + - 1]->minor);
- if (strncasecmp($par, '$_smarty_tpl->getConfigVariable', strlen('$_smarty_tpl->getConfigVariable')) === 0) {
- self::$prefix_number ++;
- $this->compiler->prefix_code[] = '';
- $isset_par = '$_tmp' . self::$prefix_number;
- } else {
- $isset_par = str_replace("')->value", "',null,true,false)->value", $par);
- }
- $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . $isset_par . ")";
- } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) {
- if (count($this->yystack[$this->yyidx + - 1]->minor) != 1) {
- $this->compiler->trigger_template_error('Illegal number of paramer in "empty()"');
- }
- if ($func_name == 'empty') {
- $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value", $this->yystack[$this->yyidx + - 1]->minor[0]) . ')';
- } else {
- $this->_retvalue = $func_name . '(' . $this->yystack[$this->yyidx + - 1]->minor[0] . ')';
- }
- } else {
- $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")";
- }
- } else {
- $this->compiler->trigger_template_error("unknown function \"" . $this->yystack[$this->yyidx + - 3]->minor . "\"");
- }
+ if ($this->security && substr($this->yystack[ $this->yyidx + -1 ]->minor, 0, 1) === '_') {
+ $this->compiler->trigger_template_error(self::ERR1);
}
+ $this->_retvalue =
+ '->' . $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2892 "smarty_internal_templateparser.php"
- #line 1025 "smarty_internal_templateparser.y"
- function yy_r155()
+
+ // line 1006 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r140()
{
- if ($this->security && substr($this->yystack[$this->yyidx + - 3]->minor, 0, 1) == '_') {
- $this->compiler->trigger_template_error(self::Err1);
+ if ($this->security) {
+ $this->compiler->trigger_template_error(self::ERR2);
}
- $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")";
+ $this->_retvalue =
+ '->{' .
+ $this->compiler->compileVariable($this->yystack[ $this->yyidx + -1 ]->minor) .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ '}';
}
- #line 2900 "smarty_internal_templateparser.php"
- #line 1032 "smarty_internal_templateparser.y"
- function yy_r156()
+
+ // line 1013 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r141()
{
if ($this->security) {
- $this->compiler->trigger_template_error(self::Err2);
+ $this->compiler->trigger_template_error(self::ERR2);
}
- self::$prefix_number ++;
- $this->compiler->prefix_code[] = 'compileVariable("'" . $this->yystack[$this->yyidx + - 3]->minor . "'") . ';?>';
- $this->_retvalue = '$_tmp' . self::$prefix_number . '(' . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ')';
+ $this->_retvalue =
+ '->{' . $this->yystack[ $this->yyidx + -2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}';
}
- #line 2910 "smarty_internal_templateparser.php"
- #line 1043 "smarty_internal_templateparser.y"
- function yy_r157()
+
+ // line 1021 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r142()
{
- $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 2]->minor, array($this->yystack[$this->yyidx + 0]->minor));
+ if ($this->security) {
+ $this->compiler->trigger_template_error(self::ERR2);
+ }
+ $this->_retvalue =
+ '->{\'' .
+ $this->yystack[ $this->yyidx + -4 ]->minor .
+ '\'.' .
+ $this->yystack[ $this->yyidx + -2 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ '}';
}
- #line 2915 "smarty_internal_templateparser.php"
- #line 1060 "smarty_internal_templateparser.y"
- function yy_r160()
+
+ // line 1029 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r143()
{
- $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 2]->minor, array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor)));
+ $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 2920 "smarty_internal_templateparser.php"
- #line 1064 "smarty_internal_templateparser.y"
- function yy_r161()
+
+ // line 1037 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r144()
{
- $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ $this->compiler->compilePHPFunctionCall($this->yystack[ $this->yyidx + -3 ]->minor,
+ $this->yystack[ $this->yyidx + -1 ]->minor);
}
- #line 2925 "smarty_internal_templateparser.php"
- #line 1072 "smarty_internal_templateparser.y"
- function yy_r163()
+
+ // line 1044 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r145()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ if ($this->security && substr($this->yystack[ $this->yyidx + -3 ]->minor, 0, 1) === '_') {
+ $this->compiler->trigger_template_error(self::ERR1);
+ }
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -3 ]->minor .
+ '(' .
+ implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) .
+ ')';
}
- #line 2930 "smarty_internal_templateparser.php"
- #line 1080 "smarty_internal_templateparser.y"
- function yy_r164()
+
+ // line 1055 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r146()
{
- $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ if ($this->security) {
+ $this->compiler->trigger_template_error(self::ERR2);
+ }
+ $prefixVar = $this->compiler->getNewPrefixVariable();
+ $this->compiler->appendPrefixCode("compiler->compileVariable('\'' .
+ substr($this->yystack[ $this->yyidx +
+ -3 ]->minor, 1) .
+ '\'') .
+ ';?>');
+ $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) . ')';
}
- #line 2935 "smarty_internal_templateparser.php"
- #line 1114 "smarty_internal_templateparser.y"
- function yy_r171()
+
+ // line 1072 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r147()
{
- $this->_retvalue = '$' . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 2940 "smarty_internal_templateparser.php"
- #line 1119 "smarty_internal_templateparser.y"
- function yy_r172()
+
+ // line 1076 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r150()
{
- $this->_retvalue = '$' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array(
+ array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)
+ ));
}
- #line 2945 "smarty_internal_templateparser.php"
- #line 1125 "smarty_internal_templateparser.y"
- function yy_r173()
+
+ // line 1084 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r151()
{
- $this->_retvalue = '==';
+ $this->_retvalue =
+ array(array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor));
}
- #line 2950 "smarty_internal_templateparser.php"
- #line 1129 "smarty_internal_templateparser.y"
- function yy_r174()
+
+ // line 1092 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r153()
{
- $this->_retvalue = '!=';
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2955 "smarty_internal_templateparser.php"
- #line 1133 "smarty_internal_templateparser.y"
- function yy_r175()
+
+ // line 1105 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r154()
{
- $this->_retvalue = '>';
+ $this->_retvalue =
+ array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2960 "smarty_internal_templateparser.php"
- #line 1137 "smarty_internal_templateparser.y"
- function yy_r176()
+
+ // line 1114 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r157()
{
- $this->_retvalue = '<';
+ $this->_retvalue =
+ array(trim($this->yystack[ $this->yyidx + -1 ]->minor) . $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 2965 "smarty_internal_templateparser.php"
- #line 1141 "smarty_internal_templateparser.y"
- function yy_r177()
+
+ // line 1119 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r159()
{
- $this->_retvalue = '>=';
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method');
}
- #line 2970 "smarty_internal_templateparser.php"
- #line 1145 "smarty_internal_templateparser.y"
- function yy_r178()
+
+ // line 1124 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r160()
{
- $this->_retvalue = '<=';
+ $this->_retvalue =
+ array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method');
}
- #line 2975 "smarty_internal_templateparser.php"
- #line 1149 "smarty_internal_templateparser.y"
- function yy_r179()
+
+ // line 1129 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r161()
{
- $this->_retvalue = '===';
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '');
}
- #line 2980 "smarty_internal_templateparser.php"
- #line 1153 "smarty_internal_templateparser.y"
- function yy_r180()
+
+ // line 1134 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r162()
{
- $this->_retvalue = '!==';
+ $this->_retvalue =
+ array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property');
}
- #line 2985 "smarty_internal_templateparser.php"
- #line 1157 "smarty_internal_templateparser.y"
- function yy_r181()
+
+ // line 1140 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r163()
{
- $this->_retvalue = '%';
+ $this->_retvalue =
+ array(
+ $this->yystack[ $this->yyidx + -2 ]->minor,
+ $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor, 'property'
+ );
}
- #line 2990 "smarty_internal_templateparser.php"
- #line 1161 "smarty_internal_templateparser.y"
- function yy_r182()
+
+ // line 1144 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r164()
{
- $this->_retvalue = '&&';
+ $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' ';
}
- #line 2995 "smarty_internal_templateparser.php"
- #line 1165 "smarty_internal_templateparser.y"
- function yy_r183()
- {
- $this->_retvalue = '||';
+
+ // line 1163 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r165()
+ {
+ static $lops = array(
+ 'eq' => ' == ',
+ 'ne' => ' != ',
+ 'neq' => ' != ',
+ 'gt' => ' > ',
+ 'ge' => ' >= ',
+ 'gte' => ' >= ',
+ 'lt' => ' < ',
+ 'le' => ' <= ',
+ 'lte' => ' <= ',
+ 'mod' => ' % ',
+ 'and' => ' && ',
+ 'or' => ' || ',
+ 'xor' => ' xor ',
+ );
+ $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $lops[ $op ];
}
- #line 3000 "smarty_internal_templateparser.php"
- #line 1169 "smarty_internal_templateparser.y"
- function yy_r184()
- {
- $this->_retvalue = ' XOR ';
+
+ // line 1176 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r166()
+ {
+ static $tlops = array(
+ 'isdivby' => array('op' => ' % ', 'pre' => '!('),
+ 'isnotdivby' => array('op' => ' % ', 'pre' => '('),
+ 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '),
+ 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
+ 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
+ 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),
+ );
+ $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $tlops[ $op ];
}
- #line 3005 "smarty_internal_templateparser.php"
- #line 1176 "smarty_internal_templateparser.y"
- function yy_r185()
- {
- $this->_retvalue = 'array(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+
+ // line 1190 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r167()
+ {
+ static $scond = array(
+ 'iseven' => '!(1 & ',
+ 'isnoteven' => '(1 & ',
+ 'isodd' => '(1 & ',
+ 'isnotodd' => '!(1 & ',
+ );
+ $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $scond[ $op ];
}
- #line 3010 "smarty_internal_templateparser.php"
- #line 1184 "smarty_internal_templateparser.y"
- function yy_r187()
+
+ // line 1201 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r168()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
}
- #line 3015 "smarty_internal_templateparser.php"
- #line 1192 "smarty_internal_templateparser.y"
- function yy_r189()
+
+ // line 1209 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r171()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '=>' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 3020 "smarty_internal_templateparser.php"
- #line 1196 "smarty_internal_templateparser.y"
- function yy_r190()
+
+ // line 1213 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r173()
{
- $this->_retvalue = '\'' . $this->yystack[$this->yyidx + - 2]->minor . '\'=>' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + -2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 3025 "smarty_internal_templateparser.php"
- #line 1208 "smarty_internal_templateparser.y"
- function yy_r192()
+
+ // line 1229 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r174()
{
- $this->_retvalue = "''";
+ $this->_retvalue =
+ '\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
- #line 3030 "smarty_internal_templateparser.php"
- #line 1212 "smarty_internal_templateparser.y"
- function yy_r193()
+
+ // line 1235 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r177()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor->to_smarty_php();
+ $this->compiler->leaveDoubleQuote();
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor->to_smarty_php($this);
}
- #line 3035 "smarty_internal_templateparser.php"
- #line 1217 "smarty_internal_templateparser.y"
- function yy_r194()
+
+ // line 1240 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r178()
{
- $this->yystack[$this->yyidx + - 1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor);
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->yystack[ $this->yyidx + -1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
+ $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
}
- #line 3041 "smarty_internal_templateparser.php"
- #line 1222 "smarty_internal_templateparser.y"
- function yy_r195()
+
+ // line 1244 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r179()
{
- $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 3046 "smarty_internal_templateparser.php"
- #line 1226 "smarty_internal_templateparser.y"
- function yy_r196()
+
+ // line 1248 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r180()
{
- $this->_retvalue = new _smarty_code($this, '(string)' . $this->yystack[$this->yyidx + - 1]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + -1 ]->minor);
}
- #line 3051 "smarty_internal_templateparser.php"
- #line 1234 "smarty_internal_templateparser.y"
- function yy_r198()
+
+ // line 1252 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r181()
{
- $this->_retvalue = new _smarty_code($this, '(string)$_smarty_tpl->tpl_vars[\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\']->value');
+ $this->_retvalue =
+ new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')');
}
- #line 3056 "smarty_internal_templateparser.php"
- #line 1242 "smarty_internal_templateparser.y"
- function yy_r200()
+
+ // line 1264 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r182()
{
- $this->_retvalue = new _smarty_code($this, '(string)(' . $this->yystack[$this->yyidx + - 1]->minor . ')');
+ $this->_retvalue =
+ new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' .
+ substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) .
+ '\']->value');
}
- #line 3061 "smarty_internal_templateparser.php"
- #line 1246 "smarty_internal_templateparser.y"
- function yy_r201()
+
+ // line 1268 "../smarty/lexer/smarty_internal_templateparser.y"
+ public function yy_r185()
{
- $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + - 1]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 3066 "smarty_internal_templateparser.php"
- #line 1250 "smarty_internal_templateparser.y"
- function yy_r202()
+
+ public function yy_r186()
{
- $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor);
}
- #line 3071 "smarty_internal_templateparser.php"
-
- private $_retvalue;
-
public function yy_reduce($yyruleno)
{
- $yymsp = $this->yystack[$this->yyidx];
if ($this->yyTraceFILE && $yyruleno >= 0
- && $yyruleno < count(self::$yyRuleName)
- ) {
+ && $yyruleno < count(self::$yyRuleName)) {
fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n",
- $this->yyTracePrompt, $yyruleno,
- self::$yyRuleName[$yyruleno]);
+ $this->yyTracePrompt, $yyruleno,
+ self::$yyRuleName[ $yyruleno ]);
}
-
$this->_retvalue = $yy_lefthand_side = null;
- if (array_key_exists($yyruleno, self::$yyReduceMap)) {
+ if (isset(self::$yyReduceMap[ $yyruleno ])) {
// call the action
$this->_retvalue = null;
- $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}();
$yy_lefthand_side = $this->_retvalue;
}
- $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
- $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
+ $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ];
$this->yyidx -= $yysize;
- for ($i = $yysize; $i; $i --) {
+ 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);
+ $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto);
if ($yyact < self::YYNSTATE) {
if (!$this->yyTraceFILE && $yysize) {
- $this->yyidx ++;
+ $this->yyidx++;
$x = new TP_yyStackEntry;
$x->stateno = $yyact;
$x->major = $yygoto;
$x->minor = $yy_lefthand_side;
- $this->yystack[$this->yyidx] = $x;
+ $this->yystack[ $this->yyidx ] = $x;
} else {
$this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
}
- } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
+ } elseif ($yyact === self::YYNSTATE + self::YYNRULE + 1) {
$this->yy_accept();
}
}
@@ -4428,12 +3513,10 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
public function yy_syntax_error($yymajor, $TOKEN)
{
- #line 78 "smarty_internal_templateparser.y"
-
+ // line 214 "../smarty/lexer/smarty_internal_templateparser.y"
$this->internalError = true;
$this->yymajor = $yymajor;
$this->compiler->trigger_template_error();
- #line 3133 "smarty_internal_templateparser.php"
}
public function yy_accept()
@@ -4442,48 +3525,41 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt);
}
while ($this->yyidx >= 0) {
- $stack = $this->yy_pop_parser_stack();
+ $this->yy_pop_parser_stack();
}
- #line 70 "smarty_internal_templateparser.y"
-
+ // line 207 "../smarty/lexer/smarty_internal_templateparser.y"
$this->successful = !$this->internalError;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
- //echo $this->retvalue."\n\n";
- #line 3150 "smarty_internal_templateparser.php"
}
public function doParse($yymajor, $yytokenvalue)
{
- $yyerrorhit = 0; /* True if yymajor has invoked an error */
-
+ $yyerrorhit = 0; /* True if yymajor has invoked an error */
if ($this->yyidx === null || $this->yyidx < 0) {
$this->yyidx = 0;
- $this->yyerrcnt = - 1;
+ $this->yyerrcnt = -1;
$x = new TP_yyStackEntry;
$x->stateno = 0;
$x->major = 0;
$this->yystack = array();
- array_push($this->yystack, $x);
+ $this->yystack[] = $x;
}
$yyendofinput = ($yymajor == 0);
-
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE, "%sInput %s\n",
- $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]);
}
-
do {
$yyact = $this->yy_find_shift_action($yymajor);
if ($yymajor < self::YYERRORSYMBOL &&
- !$this->yy_is_expected_token($yymajor)
- ) {
+ !$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 --;
+ $this->yyerrcnt--;
if ($yyendofinput && $this->yyidx >= 0) {
$yymajor = 0;
} else {
@@ -4491,27 +3567,27 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
}
} elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
$this->yy_reduce($yyact - self::YYNSTATE);
- } elseif ($yyact == self::YY_ERROR_ACTION) {
+ } elseif ($yyact === self::YY_ERROR_ACTION) {
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE, "%sSyntax Error!\n",
- $this->yyTracePrompt);
+ $this->yyTracePrompt);
}
if (self::YYERRORSYMBOL) {
if ($this->yyerrcnt < 0) {
$this->yy_syntax_error($yymajor, $yytokenvalue);
}
- $yymx = $this->yystack[$this->yyidx]->major;
- if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) {
+ $yymx = $this->yystack[ $this->yyidx ]->major;
+ if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) {
if ($this->yyTraceFILE) {
fprintf($this->yyTraceFILE, "%sDiscard input token %s\n",
- $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ $this->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
+ $yymx !== self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
) {
$this->yy_pop_parser_stack();
}
@@ -4519,7 +3595,7 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
$this->yy_destructor($yymajor, $yytokenvalue);
$this->yy_parse_failed();
$yymajor = self::YYNOCODE;
- } elseif ($yymx != self::YYERRORSYMBOL) {
+ } elseif ($yymx !== self::YYERRORSYMBOL) {
$u2 = 0;
$this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
}
@@ -4541,6 +3617,7 @@ class Smarty_Internal_Templateparser #line 80 "smarty_internal_templateparser.ph
$this->yy_accept();
$yymajor = self::YYNOCODE;
}
- } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
+ } while ($yymajor !== self::YYNOCODE && $this->yyidx >= 0);
}
}
+
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_testinstall.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_testinstall.php
new file mode 100644
index 000000000..504a4582c
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_testinstall.php
@@ -0,0 +1,609 @@
+\n";
+ echo "Smarty Installation test...\n";
+ echo "Testing template directory...\n";
+ }
+ $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
+ // test if all registered template_dir are accessible
+ foreach ($smarty->getTemplateDir() as $template_dir) {
+ $_template_dir = $template_dir;
+ $template_dir = realpath($template_dir);
+ // resolve include_path or fail existence
+ if (!$template_dir) {
+ if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $template_dir = stream_resolve_include_path($_template_dir);
+ } else {
+ $template_dir = $smarty->ext->_getIncludePath->getIncludePath($_template_dir, null, $smarty);
+ }
+ if ($template_dir !== false) {
+ if ($errors === null) {
+ echo "$template_dir is OK.\n";
+ }
+ continue;
+ } else {
+ $status = false;
+ $message =
+ "FAILED: $_template_dir does not exist (and couldn't be found in include_path either)";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'template_dir' ] = $message;
+ }
+ continue;
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: $_template_dir does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'template_dir' ] = $message;
+ }
+ continue;
+ }
+ }
+ if (!is_dir($template_dir)) {
+ $status = false;
+ $message = "FAILED: $template_dir is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'template_dir' ] = $message;
+ }
+ } elseif (!is_readable($template_dir)) {
+ $status = false;
+ $message = "FAILED: $template_dir is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'template_dir' ] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "$template_dir is OK.\n";
+ }
+ }
+ }
+ if ($errors === null) {
+ echo "Testing compile directory...\n";
+ }
+ // test if registered compile_dir is accessible
+ $__compile_dir = $smarty->getCompileDir();
+ $_compile_dir = realpath($__compile_dir);
+ if (!$_compile_dir) {
+ $status = false;
+ $message = "FAILED: {$__compile_dir} does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'compile_dir' ] = $message;
+ }
+ } elseif (!is_dir($_compile_dir)) {
+ $status = false;
+ $message = "FAILED: {$_compile_dir} is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'compile_dir' ] = $message;
+ }
+ } elseif (!is_readable($_compile_dir)) {
+ $status = false;
+ $message = "FAILED: {$_compile_dir} is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'compile_dir' ] = $message;
+ }
+ } elseif (!is_writable($_compile_dir)) {
+ $status = false;
+ $message = "FAILED: {$_compile_dir} is not writable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'compile_dir' ] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "{$_compile_dir} is OK.\n";
+ }
+ }
+ if ($errors === null) {
+ echo "Testing plugins directory...\n";
+ }
+ // test if all registered plugins_dir are accessible
+ // and if core plugins directory is still registered
+ $_core_plugins_dir = realpath(dirname(__FILE__) . '/../plugins');
+ $_core_plugins_available = false;
+ foreach ($smarty->getPluginsDir() as $plugin_dir) {
+ $_plugin_dir = $plugin_dir;
+ $plugin_dir = realpath($plugin_dir);
+ // resolve include_path or fail existence
+ if (!$plugin_dir) {
+ if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $plugin_dir = stream_resolve_include_path($_plugin_dir);
+ } else {
+ $plugin_dir = $smarty->ext->_getIncludePath->getIncludePath($_plugin_dir, null, $smarty);
+ }
+ if ($plugin_dir !== false) {
+ if ($errors === null) {
+ echo "$plugin_dir is OK.\n";
+ }
+ continue;
+ } else {
+ $status = false;
+ $message = "FAILED: $_plugin_dir does not exist (and couldn't be found in include_path either)";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'plugins_dir' ] = $message;
+ }
+ continue;
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: $_plugin_dir does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'plugins_dir' ] = $message;
+ }
+ continue;
+ }
+ }
+ if (!is_dir($plugin_dir)) {
+ $status = false;
+ $message = "FAILED: $plugin_dir is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'plugins_dir' ] = $message;
+ }
+ } elseif (!is_readable($plugin_dir)) {
+ $status = false;
+ $message = "FAILED: $plugin_dir is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'plugins_dir' ] = $message;
+ }
+ } elseif ($_core_plugins_dir && $_core_plugins_dir == realpath($plugin_dir)) {
+ $_core_plugins_available = true;
+ if ($errors === null) {
+ echo "$plugin_dir is OK.\n";
+ }
+ } else {
+ if ($errors === null) {
+ echo "$plugin_dir is OK.\n";
+ }
+ }
+ }
+ if (!$_core_plugins_available) {
+ $status = false;
+ $message = "WARNING: Smarty's own libs/plugins is not available";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } elseif (!isset($errors[ 'plugins_dir' ])) {
+ $errors[ 'plugins_dir' ] = $message;
+ }
+ }
+ if ($errors === null) {
+ echo "Testing cache directory...\n";
+ }
+ // test if all registered cache_dir is accessible
+ $__cache_dir = $smarty->getCacheDir();
+ $_cache_dir = realpath($__cache_dir);
+ if (!$_cache_dir) {
+ $status = false;
+ $message = "FAILED: {$__cache_dir} does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'cache_dir' ] = $message;
+ }
+ } elseif (!is_dir($_cache_dir)) {
+ $status = false;
+ $message = "FAILED: {$_cache_dir} is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'cache_dir' ] = $message;
+ }
+ } elseif (!is_readable($_cache_dir)) {
+ $status = false;
+ $message = "FAILED: {$_cache_dir} is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'cache_dir' ] = $message;
+ }
+ } elseif (!is_writable($_cache_dir)) {
+ $status = false;
+ $message = "FAILED: {$_cache_dir} is not writable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'cache_dir' ] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "{$_cache_dir} is OK.\n";
+ }
+ }
+ if ($errors === null) {
+ echo "Testing configs directory...\n";
+ }
+ // test if all registered config_dir are accessible
+ foreach ($smarty->getConfigDir() as $config_dir) {
+ $_config_dir = $config_dir;
+ // resolve include_path or fail existence
+ if (!$config_dir) {
+ if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_config_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $config_dir = stream_resolve_include_path($_config_dir);
+ } else {
+ $config_dir = $smarty->ext->_getIncludePath->getIncludePath($_config_dir, null, $smarty);
+ }
+ if ($config_dir !== false) {
+ if ($errors === null) {
+ echo "$config_dir is OK.\n";
+ }
+ continue;
+ } else {
+ $status = false;
+ $message = "FAILED: $_config_dir does not exist (and couldn't be found in include_path either)";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'config_dir' ] = $message;
+ }
+ continue;
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: $_config_dir does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'config_dir' ] = $message;
+ }
+ continue;
+ }
+ }
+ if (!is_dir($config_dir)) {
+ $status = false;
+ $message = "FAILED: $config_dir is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'config_dir' ] = $message;
+ }
+ } elseif (!is_readable($config_dir)) {
+ $status = false;
+ $message = "FAILED: $config_dir is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'config_dir' ] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "$config_dir is OK.\n";
+ }
+ }
+ }
+ if ($errors === null) {
+ echo "Testing sysplugin files...\n";
+ }
+ // test if sysplugins are available
+ $source = SMARTY_SYSPLUGINS_DIR;
+ if (is_dir($source)) {
+ $expectedSysplugins = array(
+ 'smartycompilerexception.php' => true,
+ 'smartyexception.php' => true,
+ 'smarty_cacheresource.php' => true,
+ 'smarty_cacheresource_custom.php' => true,
+ 'smarty_cacheresource_keyvaluestore.php' => true,
+ 'smarty_data.php' => true,
+ 'smarty_internal_block.php' => true,
+ 'smarty_internal_cacheresource_file.php' => true,
+ 'smarty_internal_compilebase.php' => true,
+ 'smarty_internal_compile_append.php' => true,
+ 'smarty_internal_compile_assign.php' => true,
+ 'smarty_internal_compile_block.php' => true,
+ 'smarty_internal_compile_block_child.php' => true,
+ 'smarty_internal_compile_block_parent.php' => true,
+ 'smarty_internal_compile_child.php' => true,
+ 'smarty_internal_compile_parent.php' => true,
+ 'smarty_internal_compile_break.php' => true,
+ 'smarty_internal_compile_call.php' => true,
+ 'smarty_internal_compile_capture.php' => true,
+ 'smarty_internal_compile_config_load.php' => true,
+ 'smarty_internal_compile_continue.php' => true,
+ 'smarty_internal_compile_debug.php' => true,
+ 'smarty_internal_compile_eval.php' => true,
+ 'smarty_internal_compile_extends.php' => true,
+ 'smarty_internal_compile_for.php' => true,
+ 'smarty_internal_compile_foreach.php' => true,
+ 'smarty_internal_compile_function.php' => true,
+ 'smarty_internal_compile_if.php' => true,
+ 'smarty_internal_compile_include.php' => true,
+ 'smarty_internal_compile_include_php.php' => true,
+ 'smarty_internal_compile_insert.php' => true,
+ 'smarty_internal_compile_ldelim.php' => true,
+ 'smarty_internal_compile_make_nocache.php' => true,
+ 'smarty_internal_compile_nocache.php' => true,
+ 'smarty_internal_compile_private_block_plugin.php' => true,
+ 'smarty_internal_compile_private_foreachsection.php' => true,
+ 'smarty_internal_compile_private_function_plugin.php' => true,
+ 'smarty_internal_compile_private_modifier.php' => true,
+ 'smarty_internal_compile_private_object_block_function.php' => true,
+ 'smarty_internal_compile_private_object_function.php' => true,
+ 'smarty_internal_compile_private_php.php' => true,
+ 'smarty_internal_compile_private_print_expression.php' => true,
+ 'smarty_internal_compile_private_registered_block.php' => true,
+ 'smarty_internal_compile_private_registered_function.php' => true,
+ 'smarty_internal_compile_private_special_variable.php' => true,
+ 'smarty_internal_compile_rdelim.php' => true,
+ 'smarty_internal_compile_section.php' => true,
+ 'smarty_internal_compile_setfilter.php' => true,
+ 'smarty_internal_compile_shared_inheritance.php' => true,
+ 'smarty_internal_compile_while.php' => true,
+ 'smarty_internal_configfilelexer.php' => true,
+ 'smarty_internal_configfileparser.php' => true,
+ 'smarty_internal_config_file_compiler.php' => true,
+ 'smarty_internal_data.php' => true,
+ 'smarty_internal_debug.php' => true,
+ 'smarty_internal_errorhandler.php' => true,
+ 'smarty_internal_extension_handler.php' => true,
+ 'smarty_internal_method_addautoloadfilters.php' => true,
+ 'smarty_internal_method_adddefaultmodifiers.php' => true,
+ 'smarty_internal_method_append.php' => true,
+ 'smarty_internal_method_appendbyref.php' => true,
+ 'smarty_internal_method_assignbyref.php' => true,
+ 'smarty_internal_method_assignglobal.php' => true,
+ 'smarty_internal_method_clearallassign.php' => true,
+ 'smarty_internal_method_clearallcache.php' => true,
+ 'smarty_internal_method_clearassign.php' => true,
+ 'smarty_internal_method_clearcache.php' => true,
+ 'smarty_internal_method_clearcompiledtemplate.php' => true,
+ 'smarty_internal_method_clearconfig.php' => true,
+ 'smarty_internal_method_compileallconfig.php' => true,
+ 'smarty_internal_method_compilealltemplates.php' => true,
+ 'smarty_internal_method_configload.php' => true,
+ 'smarty_internal_method_createdata.php' => true,
+ 'smarty_internal_method_getautoloadfilters.php' => true,
+ 'smarty_internal_method_getconfigvariable.php' => true,
+ 'smarty_internal_method_getconfigvars.php' => true,
+ 'smarty_internal_method_getdebugtemplate.php' => true,
+ 'smarty_internal_method_getdefaultmodifiers.php' => true,
+ 'smarty_internal_method_getglobal.php' => true,
+ 'smarty_internal_method_getregisteredobject.php' => true,
+ 'smarty_internal_method_getstreamvariable.php' => true,
+ 'smarty_internal_method_gettags.php' => true,
+ 'smarty_internal_method_gettemplatevars.php' => true,
+ 'smarty_internal_method_literals.php' => true,
+ 'smarty_internal_method_loadfilter.php' => true,
+ 'smarty_internal_method_loadplugin.php' => true,
+ 'smarty_internal_method_mustcompile.php' => true,
+ 'smarty_internal_method_registercacheresource.php' => true,
+ 'smarty_internal_method_registerclass.php' => true,
+ 'smarty_internal_method_registerdefaultconfighandler.php' => true,
+ 'smarty_internal_method_registerdefaultpluginhandler.php' => true,
+ 'smarty_internal_method_registerdefaulttemplatehandler.php' => true,
+ 'smarty_internal_method_registerfilter.php' => true,
+ 'smarty_internal_method_registerobject.php' => true,
+ 'smarty_internal_method_registerplugin.php' => true,
+ 'smarty_internal_method_registerresource.php' => true,
+ 'smarty_internal_method_setautoloadfilters.php' => true,
+ 'smarty_internal_method_setdebugtemplate.php' => true,
+ 'smarty_internal_method_setdefaultmodifiers.php' => true,
+ 'smarty_internal_method_unloadfilter.php' => true,
+ 'smarty_internal_method_unregistercacheresource.php' => true,
+ 'smarty_internal_method_unregisterfilter.php' => true,
+ 'smarty_internal_method_unregisterobject.php' => true,
+ 'smarty_internal_method_unregisterplugin.php' => true,
+ 'smarty_internal_method_unregisterresource.php' => true,
+ 'smarty_internal_nocache_insert.php' => true,
+ 'smarty_internal_parsetree.php' => true,
+ 'smarty_internal_parsetree_code.php' => true,
+ 'smarty_internal_parsetree_dq.php' => true,
+ 'smarty_internal_parsetree_dqcontent.php' => true,
+ 'smarty_internal_parsetree_tag.php' => true,
+ 'smarty_internal_parsetree_template.php' => true,
+ 'smarty_internal_parsetree_text.php' => true,
+ 'smarty_internal_resource_eval.php' => true,
+ 'smarty_internal_resource_extends.php' => true,
+ 'smarty_internal_resource_file.php' => true,
+ 'smarty_internal_resource_php.php' => true,
+ 'smarty_internal_resource_registered.php' => true,
+ 'smarty_internal_resource_stream.php' => true,
+ 'smarty_internal_resource_string.php' => true,
+ 'smarty_internal_runtime_cachemodify.php' => true,
+ 'smarty_internal_runtime_cacheresourcefile.php' => true,
+ 'smarty_internal_runtime_capture.php' => true,
+ 'smarty_internal_runtime_codeframe.php' => true,
+ 'smarty_internal_runtime_filterhandler.php' => true,
+ 'smarty_internal_runtime_foreach.php' => true,
+ 'smarty_internal_runtime_getincludepath.php' => true,
+ 'smarty_internal_runtime_inheritance.php' => true,
+ 'smarty_internal_runtime_make_nocache.php' => true,
+ 'smarty_internal_runtime_tplfunction.php' => true,
+ 'smarty_internal_runtime_updatecache.php' => true,
+ 'smarty_internal_runtime_updatescope.php' => true,
+ 'smarty_internal_runtime_writefile.php' => true,
+ 'smarty_internal_smartytemplatecompiler.php' => true,
+ 'smarty_internal_template.php' => true,
+ 'smarty_internal_templatebase.php' => true,
+ 'smarty_internal_templatecompilerbase.php' => true,
+ 'smarty_internal_templatelexer.php' => true,
+ 'smarty_internal_templateparser.php' => true,
+ 'smarty_internal_testinstall.php' => true,
+ 'smarty_internal_undefined.php' => true,
+ 'smarty_resource.php' => true,
+ 'smarty_resource_custom.php' => true,
+ 'smarty_resource_recompiled.php' => true,
+ 'smarty_resource_uncompiled.php' => true,
+ 'smarty_security.php' => true,
+ 'smarty_template_cached.php' => true,
+ 'smarty_template_compiled.php' => true,
+ 'smarty_template_config.php' => true,
+ 'smarty_template_resource_base.php' => true,
+ 'smarty_template_source.php' => true,
+ 'smarty_undefined_variable.php' => true,
+ 'smarty_variable.php' => true,
+ );
+ $iterator = new DirectoryIterator($source);
+ foreach ($iterator as $file) {
+ if (!$file->isDot()) {
+ $filename = $file->getFilename();
+ if (isset($expectedSysplugins[ $filename ])) {
+ unset($expectedSysplugins[ $filename ]);
+ }
+ }
+ }
+ if ($expectedSysplugins) {
+ $status = false;
+ $message = "FAILED: files missing from libs/sysplugins: " . join(', ', array_keys($expectedSysplugins));
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'sysplugins' ] = $message;
+ }
+ } elseif ($errors === null) {
+ echo "... OK\n";
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: " . SMARTY_SYSPLUGINS_DIR . ' is not a directory';
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'sysplugins_dir_constant' ] = $message;
+ }
+ }
+ if ($errors === null) {
+ echo "Testing plugin files...\n";
+ }
+ // test if core plugins are available
+ $source = SMARTY_PLUGINS_DIR;
+ if (is_dir($source)) {
+ $expectedPlugins = array(
+ 'block.textformat.php' => true,
+ 'function.counter.php' => true,
+ 'function.cycle.php' => true,
+ 'function.fetch.php' => true,
+ 'function.html_checkboxes.php' => true,
+ 'function.html_image.php' => true,
+ 'function.html_options.php' => true,
+ 'function.html_radios.php' => true,
+ 'function.html_select_date.php' => true,
+ 'function.html_select_time.php' => true,
+ 'function.html_table.php' => true,
+ 'function.mailto.php' => true,
+ 'function.math.php' => true,
+ 'modifier.capitalize.php' => true,
+ 'modifier.date_format.php' => true,
+ 'modifier.debug_print_var.php' => true,
+ 'modifier.escape.php' => true,
+ 'modifier.mb_wordwrap.php' => true,
+ 'modifier.regex_replace.php' => true,
+ 'modifier.replace.php' => true,
+ 'modifier.spacify.php' => true,
+ 'modifier.truncate.php' => true,
+ 'modifiercompiler.cat.php' => true,
+ 'modifiercompiler.count_characters.php' => true,
+ 'modifiercompiler.count_paragraphs.php' => true,
+ 'modifiercompiler.count_sentences.php' => true,
+ 'modifiercompiler.count_words.php' => true,
+ 'modifiercompiler.default.php' => true,
+ 'modifiercompiler.escape.php' => true,
+ 'modifiercompiler.from_charset.php' => true,
+ 'modifiercompiler.indent.php' => true,
+ 'modifiercompiler.lower.php' => true,
+ 'modifiercompiler.noprint.php' => true,
+ 'modifiercompiler.string_format.php' => true,
+ 'modifiercompiler.strip.php' => true,
+ 'modifiercompiler.strip_tags.php' => true,
+ 'modifiercompiler.to_charset.php' => true,
+ 'modifiercompiler.unescape.php' => true,
+ 'modifiercompiler.upper.php' => true,
+ 'modifiercompiler.wordwrap.php' => true,
+ 'outputfilter.trimwhitespace.php' => true,
+ 'shared.escape_special_chars.php' => true,
+ 'shared.literal_compiler_param.php' => true,
+ 'shared.make_timestamp.php' => true,
+ 'shared.mb_str_replace.php' => true,
+ 'shared.mb_unicode.php' => true,
+ 'variablefilter.htmlspecialchars.php' => true,
+ );
+ $iterator = new DirectoryIterator($source);
+ foreach ($iterator as $file) {
+ if (!$file->isDot()) {
+ $filename = $file->getFilename();
+ if (isset($expectedPlugins[ $filename ])) {
+ unset($expectedPlugins[ $filename ]);
+ }
+ }
+ }
+ if ($expectedPlugins) {
+ $status = false;
+ $message = "FAILED: files missing from libs/plugins: " . join(', ', array_keys($expectedPlugins));
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'plugins' ] = $message;
+ }
+ } elseif ($errors === null) {
+ echo "... OK\n";
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: " . SMARTY_PLUGINS_DIR . ' is not a directory';
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors[ 'plugins_dir_constant' ] = $message;
+ }
+ }
+ if ($errors === null) {
+ echo "Tests complete.\n";
+ echo "\n";
+ }
+ return $status;
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_undefined.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_undefined.php
new file mode 100644
index 000000000..7df0acc2d
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_undefined.php
@@ -0,0 +1,67 @@
+class = $class;
+ }
+
+ /**
+ * Wrapper for obsolete class Smarty_Internal_Runtime_ValidateCompiled
+ *
+ * @param \Smarty_Internal_Template $tpl
+ * @param array $properties special template properties
+ * @param bool $cache flag if called from cache file
+ *
+ * @return bool false
+ */
+ public function decodeProperties(Smarty_Internal_Template $tpl, $properties, $cache = false)
+ {
+ if ($cache) {
+ $tpl->cached->valid = false;
+ } else {
+ $tpl->mustCompile = true;
+ }
+ return false;
+ }
+
+ /**
+ * Call error handler for undefined method
+ *
+ * @param string $name unknown method-name
+ * @param array $args argument array
+ *
+ * @return mixed
+ * @throws SmartyException
+ */
+ public function __call($name, $args)
+ {
+ if (isset($this->class)) {
+ throw new SmartyException("undefined extension class '{$this->class}'");
+ } else {
+ throw new SmartyException(get_class($args[ 0 ]) . "->{$name}() undefined method");
+ }
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_utility.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_utility.php
deleted file mode 100644
index 0a5975bba..000000000
--- a/web/private_php/ams/smarty/libs/sysplugins/smarty_internal_utility.php
+++ /dev/null
@@ -1,837 +0,0 @@
-
- * @author Uwe Tews
- * @package Smarty
- * @subpackage PluginsInternal
- * @version 3-SVN$Rev: 3286 $
- */
-
-/**
- * Utility class
- *
- * @package Smarty
- * @subpackage Security
- */
-class Smarty_Internal_Utility
-{
- /**
- * private constructor to prevent calls creation of new instances
- */
- final private function __construct()
- {
- // intentionally left blank
- }
-
- /**
- * Compile all template files
- *
- * @param string $extension template file name extension
- * @param bool $force_compile force all to recompile
- * @param int $time_limit set maximum execution time
- * @param int $max_errors set maximum allowed errors
- * @param Smarty $smarty Smarty instance
- *
- * @return integer number of template files compiled
- */
- public static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
- {
- // switch off time limit
- if (function_exists('set_time_limit')) {
- @set_time_limit($time_limit);
- }
- $smarty->force_compile = $force_compile;
- $_count = 0;
- $_error_count = 0;
- // loop over array of template directories
- foreach ($smarty->getTemplateDir() as $_dir) {
- $_compileDirs = new RecursiveDirectoryIterator($_dir);
- $_compile = new RecursiveIteratorIterator($_compileDirs);
- foreach ($_compile as $_fileinfo) {
- $_file = $_fileinfo->getFilename();
- if (substr(basename($_fileinfo->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false) {
- continue;
- }
- if (!substr_compare($_file, $extension, - strlen($extension)) == 0) {
- continue;
- }
- if ($_fileinfo->getPath() == substr($_dir, 0, - 1)) {
- $_template_file = $_file;
- } else {
- $_template_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
- }
- echo '
', $_dir, '---', $_template_file;
- flush();
- $_start_time = microtime(true);
- try {
- $_tpl = $smarty->createTemplate($_template_file, null, null, null, false);
- if ($_tpl->mustCompile()) {
- $_tpl->compileTemplateSource();
- $_count ++;
- echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
- flush();
- } else {
- echo ' is up to date';
- flush();
- }
- }
- catch (Exception $e) {
- echo 'Error: ', $e->getMessage(), "
";
- $_error_count ++;
- }
- // free memory
- $smarty->template_objects = array();
- $_tpl->smarty->template_objects = array();
- $_tpl = null;
- if ($max_errors !== null && $_error_count == $max_errors) {
- echo '
too many errors';
- exit();
- }
- }
- }
-
- return $_count;
- }
-
- /**
- * Compile all config files
- *
- * @param string $extension config file name extension
- * @param bool $force_compile force all to recompile
- * @param int $time_limit set maximum execution time
- * @param int $max_errors set maximum allowed errors
- * @param Smarty $smarty Smarty instance
- *
- * @return integer number of config files compiled
- */
- public static function compileAllConfig($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
- {
- // switch off time limit
- if (function_exists('set_time_limit')) {
- @set_time_limit($time_limit);
- }
- $smarty->force_compile = $force_compile;
- $_count = 0;
- $_error_count = 0;
- // loop over array of template directories
- foreach ($smarty->getConfigDir() as $_dir) {
- $_compileDirs = new RecursiveDirectoryIterator($_dir);
- $_compile = new RecursiveIteratorIterator($_compileDirs);
- foreach ($_compile as $_fileinfo) {
- $_file = $_fileinfo->getFilename();
- if (substr(basename($_fileinfo->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false) {
- continue;
- }
- if (!substr_compare($_file, $extension, - strlen($extension)) == 0) {
- continue;
- }
- if ($_fileinfo->getPath() == substr($_dir, 0, - 1)) {
- $_config_file = $_file;
- } else {
- $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
- }
- echo '
', $_dir, '---', $_config_file;
- flush();
- $_start_time = microtime(true);
- try {
- $_config = new Smarty_Internal_Config($_config_file, $smarty);
- if ($_config->mustCompile()) {
- $_config->compileConfigSource();
- $_count ++;
- echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
- flush();
- } else {
- echo ' is up to date';
- flush();
- }
- }
- catch (Exception $e) {
- echo 'Error: ', $e->getMessage(), "
";
- $_error_count ++;
- }
- if ($max_errors !== null && $_error_count == $max_errors) {
- echo '
too many errors';
- exit();
- }
- }
- }
-
- return $_count;
- }
-
- /**
- * Delete compiled template file
- *
- * @param string $resource_name template name
- * @param string $compile_id compile id
- * @param integer $exp_time expiration time
- * @param Smarty $smarty Smarty instance
- *
- * @return integer number of template files deleted
- */
- public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty)
- {
- $_compile_dir = realpath($smarty->getCompileDir()) . '/';
- $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
- $_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
- if (isset($resource_name)) {
- $_save_stat = $smarty->caching;
- $smarty->caching = false;
- $tpl = new $smarty->template_class($resource_name, $smarty);
- $smarty->caching = $_save_stat;
-
- // remove from template cache
- $tpl->source; // have the template registered before unset()
- if ($smarty->allow_ambiguous_resources) {
- $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
- } else {
- $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;
- }
- if (isset($_templateId[150])) {
- $_templateId = sha1($_templateId);
- }
- unset($smarty->template_objects[$_templateId]);
-
- if ($tpl->source->exists) {
- $_resource_part_1 = basename(str_replace('^', '/', $tpl->compiled->filepath));
- $_resource_part_1_length = strlen($_resource_part_1);
- } else {
- return 0;
- }
-
- $_resource_part_2 = str_replace('.php', '.cache.php', $_resource_part_1);
- $_resource_part_2_length = strlen($_resource_part_2);
- }
- $_dir = $_compile_dir;
- if ($smarty->use_sub_dirs && isset($_compile_id)) {
- $_dir .= $_compile_id . $_dir_sep;
- }
- if (isset($_compile_id)) {
- $_compile_id_part = str_replace('\\', '/', $_compile_dir . $_compile_id . $_dir_sep);
- $_compile_id_part_length = strlen($_compile_id_part);
- }
- $_count = 0;
- try {
- $_compileDirs = new RecursiveDirectoryIterator($_dir);
- // NOTE: UnexpectedValueException thrown for PHP >= 5.3
- }
- catch (Exception $e) {
- return 0;
- }
- $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
- foreach ($_compile as $_file) {
- if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false) {
- continue;
- }
-
- $_filepath = str_replace('\\', '/', (string) $_file);
-
- if ($_file->isDir()) {
- if (!$_compile->isDot()) {
- // delete folder if empty
- @rmdir($_file->getPathname());
- }
- } else {
- $unlink = false;
- if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) && $a = !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length)))
- && (!isset($resource_name)
- || (isset($_filepath[$_resource_part_1_length])
- && substr_compare($_filepath, $_resource_part_1, - $_resource_part_1_length, $_resource_part_1_length) == 0)
- || (isset($_filepath[$_resource_part_2_length])
- && substr_compare($_filepath, $_resource_part_2, - $_resource_part_2_length, $_resource_part_2_length) == 0))
- ) {
- if (isset($exp_time)) {
- if (time() - @filemtime($_filepath) >= $exp_time) {
- $unlink = true;
- }
- } else {
- $unlink = true;
- }
- }
-
- if ($unlink && @unlink($_filepath)) {
- $_count ++;
- }
- }
- }
- // clear compiled cache
- Smarty_Resource::$sources = array();
- Smarty_Resource::$compileds = array();
-
- return $_count;
- }
-
- /**
- * Return array of tag/attributes of all tags used by an template
- *
- * @param Smarty_Internal_Template $template
- *
- * @throws Exception
- * @throws SmartyException
- * @return array of tag/attributes
- */
- public static function getTags(Smarty_Internal_Template $template)
- {
- $template->smarty->get_used_tags = true;
- $template->compileTemplateSource();
-
- return $template->used_tags;
- }
-
- /**
- * diagnose Smarty setup
- * If $errors is secified, the diagnostic report will be appended to the array, rather than being output.
- *
- * @param Smarty $smarty Smarty instance to test
- * @param array $errors array to push results into rather than outputting them
- *
- * @return bool status, true if everything is fine, false else
- */
- public static function testInstall(Smarty $smarty, &$errors = null)
- {
- $status = true;
-
- if ($errors === null) {
- echo "\n";
- echo "Smarty Installation test...\n";
- echo "Testing template directory...\n";
- }
-
- $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
-
- // test if all registered template_dir are accessible
- foreach ($smarty->getTemplateDir() as $template_dir) {
- $_template_dir = $template_dir;
- $template_dir = realpath($template_dir);
- // resolve include_path or fail existence
- if (!$template_dir) {
- if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
- // try PHP include_path
- if ($_stream_resolve_include_path) {
- $template_dir = stream_resolve_include_path($_template_dir);
- } else {
- $template_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_template_dir);
- }
-
- if ($template_dir !== false) {
- if ($errors === null) {
- echo "$template_dir is OK.\n";
- }
-
- continue;
- } else {
- $status = false;
- $message = "FAILED: $_template_dir does not exist (and couldn't be found in include_path either)";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['template_dir'] = $message;
- }
-
- continue;
- }
- } else {
- $status = false;
- $message = "FAILED: $_template_dir does not exist";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['template_dir'] = $message;
- }
-
- continue;
- }
- }
-
- if (!is_dir($template_dir)) {
- $status = false;
- $message = "FAILED: $template_dir is not a directory";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['template_dir'] = $message;
- }
- } elseif (!is_readable($template_dir)) {
- $status = false;
- $message = "FAILED: $template_dir is not readable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['template_dir'] = $message;
- }
- } else {
- if ($errors === null) {
- echo "$template_dir is OK.\n";
- }
- }
- }
-
- if ($errors === null) {
- echo "Testing compile directory...\n";
- }
-
- // test if registered compile_dir is accessible
- $__compile_dir = $smarty->getCompileDir();
- $_compile_dir = realpath($__compile_dir);
- if (!$_compile_dir) {
- $status = false;
- $message = "FAILED: {$__compile_dir} does not exist";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['compile_dir'] = $message;
- }
- } elseif (!is_dir($_compile_dir)) {
- $status = false;
- $message = "FAILED: {$_compile_dir} is not a directory";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['compile_dir'] = $message;
- }
- } elseif (!is_readable($_compile_dir)) {
- $status = false;
- $message = "FAILED: {$_compile_dir} is not readable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['compile_dir'] = $message;
- }
- } elseif (!is_writable($_compile_dir)) {
- $status = false;
- $message = "FAILED: {$_compile_dir} is not writable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['compile_dir'] = $message;
- }
- } else {
- if ($errors === null) {
- echo "{$_compile_dir} is OK.\n";
- }
- }
-
- if ($errors === null) {
- echo "Testing plugins directory...\n";
- }
-
- // test if all registered plugins_dir are accessible
- // and if core plugins directory is still registered
- $_core_plugins_dir = realpath(dirname(__FILE__) . '/../plugins');
- $_core_plugins_available = false;
- foreach ($smarty->getPluginsDir() as $plugin_dir) {
- $_plugin_dir = $plugin_dir;
- $plugin_dir = realpath($plugin_dir);
- // resolve include_path or fail existence
- if (!$plugin_dir) {
- if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
- // try PHP include_path
- if ($_stream_resolve_include_path) {
- $plugin_dir = stream_resolve_include_path($_plugin_dir);
- } else {
- $plugin_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_plugin_dir);
- }
-
- if ($plugin_dir !== false) {
- if ($errors === null) {
- echo "$plugin_dir is OK.\n";
- }
-
- continue;
- } else {
- $status = false;
- $message = "FAILED: $_plugin_dir does not exist (and couldn't be found in include_path either)";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['plugins_dir'] = $message;
- }
-
- continue;
- }
- } else {
- $status = false;
- $message = "FAILED: $_plugin_dir does not exist";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['plugins_dir'] = $message;
- }
-
- continue;
- }
- }
-
- if (!is_dir($plugin_dir)) {
- $status = false;
- $message = "FAILED: $plugin_dir is not a directory";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['plugins_dir'] = $message;
- }
- } elseif (!is_readable($plugin_dir)) {
- $status = false;
- $message = "FAILED: $plugin_dir is not readable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['plugins_dir'] = $message;
- }
- } elseif ($_core_plugins_dir && $_core_plugins_dir == realpath($plugin_dir)) {
- $_core_plugins_available = true;
- if ($errors === null) {
- echo "$plugin_dir is OK.\n";
- }
- } else {
- if ($errors === null) {
- echo "$plugin_dir is OK.\n";
- }
- }
- }
- if (!$_core_plugins_available) {
- $status = false;
- $message = "WARNING: Smarty's own libs/plugins is not available";
- if ($errors === null) {
- echo $message . ".\n";
- } elseif (!isset($errors['plugins_dir'])) {
- $errors['plugins_dir'] = $message;
- }
- }
-
- if ($errors === null) {
- echo "Testing cache directory...\n";
- }
-
- // test if all registered cache_dir is accessible
- $__cache_dir = $smarty->getCacheDir();
- $_cache_dir = realpath($__cache_dir);
- if (!$_cache_dir) {
- $status = false;
- $message = "FAILED: {$__cache_dir} does not exist";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['cache_dir'] = $message;
- }
- } elseif (!is_dir($_cache_dir)) {
- $status = false;
- $message = "FAILED: {$_cache_dir} is not a directory";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['cache_dir'] = $message;
- }
- } elseif (!is_readable($_cache_dir)) {
- $status = false;
- $message = "FAILED: {$_cache_dir} is not readable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['cache_dir'] = $message;
- }
- } elseif (!is_writable($_cache_dir)) {
- $status = false;
- $message = "FAILED: {$_cache_dir} is not writable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['cache_dir'] = $message;
- }
- } else {
- if ($errors === null) {
- echo "{$_cache_dir} is OK.\n";
- }
- }
-
- if ($errors === null) {
- echo "Testing configs directory...\n";
- }
-
- // test if all registered config_dir are accessible
- foreach ($smarty->getConfigDir() as $config_dir) {
- $_config_dir = $config_dir;
- $config_dir = realpath($config_dir);
- // resolve include_path or fail existence
- if (!$config_dir) {
- if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_config_dir)) {
- // try PHP include_path
- if ($_stream_resolve_include_path) {
- $config_dir = stream_resolve_include_path($_config_dir);
- } else {
- $config_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_config_dir);
- }
-
- if ($config_dir !== false) {
- if ($errors === null) {
- echo "$config_dir is OK.\n";
- }
-
- continue;
- } else {
- $status = false;
- $message = "FAILED: $_config_dir does not exist (and couldn't be found in include_path either)";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['config_dir'] = $message;
- }
-
- continue;
- }
- } else {
- $status = false;
- $message = "FAILED: $_config_dir does not exist";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['config_dir'] = $message;
- }
-
- continue;
- }
- }
-
- if (!is_dir($config_dir)) {
- $status = false;
- $message = "FAILED: $config_dir is not a directory";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['config_dir'] = $message;
- }
- } elseif (!is_readable($config_dir)) {
- $status = false;
- $message = "FAILED: $config_dir is not readable";
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['config_dir'] = $message;
- }
- } else {
- if ($errors === null) {
- echo "$config_dir is OK.\n";
- }
- }
- }
-
- if ($errors === null) {
- echo "Testing sysplugin files...\n";
- }
- // test if sysplugins are available
- $source = SMARTY_SYSPLUGINS_DIR;
- if (is_dir($source)) {
- $expected = array(
- "smarty_cacheresource.php" => true,
- "smarty_cacheresource_custom.php" => true,
- "smarty_cacheresource_keyvaluestore.php" => true,
- "smarty_config_source.php" => true,
- "smarty_internal_cacheresource_file.php" => true,
- "smarty_internal_compile_append.php" => true,
- "smarty_internal_compile_assign.php" => true,
- "smarty_internal_compile_block.php" => true,
- "smarty_internal_compile_break.php" => true,
- "smarty_internal_compile_call.php" => true,
- "smarty_internal_compile_capture.php" => true,
- "smarty_internal_compile_config_load.php" => true,
- "smarty_internal_compile_continue.php" => true,
- "smarty_internal_compile_debug.php" => true,
- "smarty_internal_compile_eval.php" => true,
- "smarty_internal_compile_extends.php" => true,
- "smarty_internal_compile_for.php" => true,
- "smarty_internal_compile_foreach.php" => true,
- "smarty_internal_compile_function.php" => true,
- "smarty_internal_compile_if.php" => true,
- "smarty_internal_compile_include.php" => true,
- "smarty_internal_compile_include_php.php" => true,
- "smarty_internal_compile_insert.php" => true,
- "smarty_internal_compile_ldelim.php" => true,
- "smarty_internal_compile_nocache.php" => true,
- "smarty_internal_compile_private_block_plugin.php" => true,
- "smarty_internal_compile_private_function_plugin.php" => true,
- "smarty_internal_compile_private_modifier.php" => true,
- "smarty_internal_compile_private_object_block_function.php" => true,
- "smarty_internal_compile_private_object_function.php" => true,
- "smarty_internal_compile_private_print_expression.php" => true,
- "smarty_internal_compile_private_registered_block.php" => true,
- "smarty_internal_compile_private_registered_function.php" => true,
- "smarty_internal_compile_private_special_variable.php" => true,
- "smarty_internal_compile_rdelim.php" => true,
- "smarty_internal_compile_section.php" => true,
- "smarty_internal_compile_setfilter.php" => true,
- "smarty_internal_compile_while.php" => true,
- "smarty_internal_compilebase.php" => true,
- "smarty_internal_config.php" => true,
- "smarty_internal_config_file_compiler.php" => true,
- "smarty_internal_configfilelexer.php" => true,
- "smarty_internal_configfileparser.php" => true,
- "smarty_internal_data.php" => true,
- "smarty_internal_debug.php" => true,
- "smarty_internal_filter_handler.php" => true,
- "smarty_internal_function_call_handler.php" => true,
- "smarty_internal_get_include_path.php" => true,
- "smarty_internal_nocache_insert.php" => true,
- "smarty_internal_parsetree.php" => true,
- "smarty_internal_resource_eval.php" => true,
- "smarty_internal_resource_extends.php" => true,
- "smarty_internal_resource_file.php" => true,
- "smarty_internal_resource_registered.php" => true,
- "smarty_internal_resource_stream.php" => true,
- "smarty_internal_resource_string.php" => true,
- "smarty_internal_smartytemplatecompiler.php" => true,
- "smarty_internal_template.php" => true,
- "smarty_internal_templatebase.php" => true,
- "smarty_internal_templatecompilerbase.php" => true,
- "smarty_internal_templatelexer.php" => true,
- "smarty_internal_templateparser.php" => true,
- "smarty_internal_utility.php" => true,
- "smarty_internal_write_file.php" => true,
- "smarty_resource.php" => true,
- "smarty_resource_custom.php" => true,
- "smarty_resource_recompiled.php" => true,
- "smarty_resource_uncompiled.php" => true,
- "smarty_security.php" => true,
- );
- $iterator = new DirectoryIterator($source);
- foreach ($iterator as $file) {
- if (!$file->isDot()) {
- $filename = $file->getFilename();
- if (isset($expected[$filename])) {
- unset($expected[$filename]);
- }
- }
- }
- if ($expected) {
- $status = false;
- $message = "FAILED: files missing from libs/sysplugins: " . join(', ', array_keys($expected));
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['sysplugins'] = $message;
- }
- } elseif ($errors === null) {
- echo "... OK\n";
- }
- } else {
- $status = false;
- $message = "FAILED: " . SMARTY_SYSPLUGINS_DIR . ' is not a directory';
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['sysplugins_dir_constant'] = $message;
- }
- }
-
- if ($errors === null) {
- echo "Testing plugin files...\n";
- }
- // test if core plugins are available
- $source = SMARTY_PLUGINS_DIR;
- if (is_dir($source)) {
- $expected = array(
- "block.textformat.php" => true,
- "function.counter.php" => true,
- "function.cycle.php" => true,
- "function.fetch.php" => true,
- "function.html_checkboxes.php" => true,
- "function.html_image.php" => true,
- "function.html_options.php" => true,
- "function.html_radios.php" => true,
- "function.html_select_date.php" => true,
- "function.html_select_time.php" => true,
- "function.html_table.php" => true,
- "function.mailto.php" => true,
- "function.math.php" => true,
- "modifier.capitalize.php" => true,
- "modifier.date_format.php" => true,
- "modifier.debug_print_var.php" => true,
- "modifier.escape.php" => true,
- "modifier.regex_replace.php" => true,
- "modifier.replace.php" => true,
- "modifier.spacify.php" => true,
- "modifier.truncate.php" => true,
- "modifiercompiler.cat.php" => true,
- "modifiercompiler.count_characters.php" => true,
- "modifiercompiler.count_paragraphs.php" => true,
- "modifiercompiler.count_sentences.php" => true,
- "modifiercompiler.count_words.php" => true,
- "modifiercompiler.default.php" => true,
- "modifiercompiler.escape.php" => true,
- "modifiercompiler.from_charset.php" => true,
- "modifiercompiler.indent.php" => true,
- "modifiercompiler.lower.php" => true,
- "modifiercompiler.noprint.php" => true,
- "modifiercompiler.string_format.php" => true,
- "modifiercompiler.strip.php" => true,
- "modifiercompiler.strip_tags.php" => true,
- "modifiercompiler.to_charset.php" => true,
- "modifiercompiler.unescape.php" => true,
- "modifiercompiler.upper.php" => true,
- "modifiercompiler.wordwrap.php" => true,
- "outputfilter.trimwhitespace.php" => true,
- "shared.escape_special_chars.php" => true,
- "shared.literal_compiler_param.php" => true,
- "shared.make_timestamp.php" => true,
- "shared.mb_str_replace.php" => true,
- "shared.mb_unicode.php" => true,
- "shared.mb_wordwrap.php" => true,
- "variablefilter.htmlspecialchars.php" => true,
- );
- $iterator = new DirectoryIterator($source);
- foreach ($iterator as $file) {
- if (!$file->isDot()) {
- $filename = $file->getFilename();
- if (isset($expected[$filename])) {
- unset($expected[$filename]);
- }
- }
- }
- if ($expected) {
- $status = false;
- $message = "FAILED: files missing from libs/plugins: " . join(', ', array_keys($expected));
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['plugins'] = $message;
- }
- } elseif ($errors === null) {
- echo "... OK\n";
- }
- } else {
- $status = false;
- $message = "FAILED: " . SMARTY_PLUGINS_DIR . ' is not a directory';
- if ($errors === null) {
- echo $message . ".\n";
- } else {
- $errors['plugins_dir_constant'] = $message;
- }
- }
-
- if ($errors === null) {
- echo "Tests complete.\n";
- echo "
\n";
- }
-
- return $status;
- }
-}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource.php
index f478a533d..aae7e42f7 100644
--- a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource.php
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource.php
@@ -13,377 +13,53 @@
*
* @package Smarty
* @subpackage TemplateResources
+ *
+ * @method renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template)
+ * @method populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
+ * @method process(Smarty_Internal_Template $_smarty_tpl)
*/
abstract class Smarty_Resource
{
- /**
- * cache for Smarty_Template_Source instances
- *
- * @var array
- */
- public static $sources = array();
- /**
- * cache for Smarty_Template_Compiled instances
- *
- * @var array
- */
- public static $compileds = array();
- /**
- * cache for Smarty_Resource instances
- *
- * @var array
- */
- public static $resources = array();
/**
* resource types provided by the core
*
* @var array
*/
- protected static $sysplugins = array(
- 'file' => true,
- 'string' => true,
- 'extends' => true,
- 'stream' => true,
- 'eval' => true,
- 'php' => true
+ public static $sysplugins = array(
+ 'file' => 'smarty_internal_resource_file.php',
+ 'string' => 'smarty_internal_resource_string.php',
+ 'extends' => 'smarty_internal_resource_extends.php',
+ 'stream' => 'smarty_internal_resource_stream.php',
+ 'eval' => 'smarty_internal_resource_eval.php',
+ 'php' => 'smarty_internal_resource_php.php'
);
/**
- * Name of the Class to compile this resource's contents with
- *
- * @var string
- */
- public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
-
- /**
- * Name of the Class to tokenize this resource's contents with
- *
- * @var string
- */
- public $template_lexer_class = 'Smarty_Internal_Templatelexer';
-
- /**
- * Name of the Class to parse this resource's contents with
- *
- * @var string
- */
- public $template_parser_class = 'Smarty_Internal_Templateparser';
-
- /**
- * Load template's source into current template object
- * {@internal The loaded source is assigned to $_template->source->content directly.}}
- *
- * @param Smarty_Template_Source $source source object
- *
- * @return string template source
- * @throws SmartyException if source cannot be loaded
- */
- abstract public function getContent(Smarty_Template_Source $source);
-
- /**
- * populate Source Object with meta data from Resource
- *
- * @param Smarty_Template_Source $source source object
- * @param Smarty_Internal_Template $_template template object
- */
- abstract public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null);
-
- /**
- * populate Source Object with timestamp and exists from Resource
- *
- * @param Smarty_Template_Source $source source object
- */
- public function populateTimestamp(Smarty_Template_Source $source)
- {
- // intentionally left blank
- }
-
- /**
- * modify resource_name according to resource handlers specifications
- *
- * @param Smarty $smarty Smarty instance
- * @param string $resource_name resource_name to make unique
- * @param boolean $is_config flag for config resource
- *
- * @return string unique resource name
- */
- protected function buildUniqueResourceName(Smarty $smarty, $resource_name, $is_config = false)
- {
- if ($is_config) {
- return get_class($this) . '#' . $smarty->joined_config_dir . '#' . $resource_name;
- } else {
- return get_class($this) . '#' . $smarty->joined_template_dir . '#' . $resource_name;
- }
- }
-
- /**
- * populate Compiled Object with compiled filepath
- *
- * @param Smarty_Template_Compiled $compiled compiled object
- * @param Smarty_Internal_Template $_template template object
- */
- public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
- {
- $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
- $_filepath = $compiled->source->uid;
- // if use_sub_dirs, break file into directories
- if ($_template->smarty->use_sub_dirs) {
- $_filepath = substr($_filepath, 0, 2) . DS
- . substr($_filepath, 2, 2) . DS
- . substr($_filepath, 4, 2) . DS
- . $_filepath;
- }
- $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
- if (isset($_compile_id)) {
- $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
- }
- // caching token
- if ($_template->caching) {
- $_cache = '.cache';
- } else {
- $_cache = '';
- }
- $_compile_dir = $_template->smarty->getCompileDir();
- // set basename if not specified
- $_basename = $this->getBasename($compiled->source);
- if ($_basename === null) {
- $_basename = basename(preg_replace('![^\w\/]+!', '_', $compiled->source->name));
- }
- // separate (optional) basename by dot
- if ($_basename) {
- $_basename = '.' . $_basename;
- }
-
- $compiled->filepath = $_compile_dir . $_filepath . '.' . $compiled->source->type . $_basename . $_cache . '.php';
- }
-
- /**
- * Normalize Paths "foo/../bar" to "bar"
- *
- * @param string $_path path to normalize
- * @param boolean $ds respect windows directory separator
- *
- * @return string normalized path
- */
- protected function normalizePath($_path, $ds = true)
- {
- if ($ds) {
- // don't we all just love windows?
- $_path = str_replace('\\', '/', $_path);
- }
-
- $offset = 0;
-
- // resolve simples
- $_path = preg_replace('#/\./(\./)*#', '/', $_path);
- // resolve parents
- while (true) {
- $_parent = strpos($_path, '/../', $offset);
- if (!$_parent) {
- break;
- } elseif ($_path[$_parent - 1] === '.') {
- $offset = $_parent + 3;
- continue;
- }
-
- $_pos = strrpos($_path, '/', $_parent - strlen($_path) - 1);
- if ($_pos === false) {
- // don't we all just love windows?
- $_pos = $_parent;
- }
-
- $_path = substr_replace($_path, '', $_pos, $_parent + 3 - $_pos);
- }
-
- if ($ds && DS != '/') {
- // don't we all just love windows?
- $_path = str_replace('/', '\\', $_path);
- }
-
- return $_path;
- }
-
- /**
- * build template filepath by traversing the template_dir array
- *
- * @param Smarty_Template_Source $source source object
- * @param Smarty_Internal_Template $_template template object
+ * Source is bypassing compiler
*
- * @return string fully qualified filepath
- * @throws SmartyException if default template handler is registered but not callable
+ * @var boolean
*/
- protected function buildFilepath(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
- {
- $file = $source->name;
- if ($source instanceof Smarty_Config_Source) {
- $_directories = $source->smarty->getConfigDir();
- $_default_handler = $source->smarty->default_config_handler_func;
- } else {
- $_directories = $source->smarty->getTemplateDir();
- $_default_handler = $source->smarty->default_template_handler_func;
- }
-
- // go relative to a given template?
- $_file_is_dotted = $file[0] == '.' && ($file[1] == '.' || $file[1] == '/' || $file[1] == "\\");
- if ($_template && $_template->parent instanceof Smarty_Internal_Template && $_file_is_dotted) {
- if ($_template->parent->source->type != 'file' && $_template->parent->source->type != 'extends' && !$_template->parent->allow_relative_path) {
- throw new SmartyException("Template '{$file}' cannot be relative to template of resource type '{$_template->parent->source->type}'");
- }
- $file = dirname($_template->parent->source->filepath) . DS . $file;
- $_file_exact_match = true;
- if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
- // the path gained from the parent template is relative to the current working directory
- // as expansions (like include_path) have already been done
- $file = getcwd() . DS . $file;
- }
- }
-
- // resolve relative path
- if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
- // don't we all just love windows?
- $_path = DS . trim($file, '/');
- $_was_relative = true;
- } else {
- // don't we all just love windows?
- $_path = str_replace('\\', '/', $file);
- }
- $_path = $this->normalizePath($_path, false);
- if (DS != '/') {
- // don't we all just love windows?
- $_path = str_replace('/', '\\', $_path);
- }
- // revert to relative
- if (isset($_was_relative)) {
- $_path = substr($_path, 1);
- }
-
- // this is only required for directories
- $file = rtrim($_path, '/\\');
-
- // files relative to a template only get one shot
- if (isset($_file_exact_match)) {
- return $this->fileExists($source, $file) ? $file : false;
- }
-
- // template_dir index?
- if (preg_match('#^\[(?P[^\]]+)\](?P.+)$#', $file, $match)) {
- $_directory = null;
- // try string indexes
- if (isset($_directories[$match['key']])) {
- $_directory = $_directories[$match['key']];
- } elseif (is_numeric($match['key'])) {
- // try numeric index
- $match['key'] = (int) $match['key'];
- if (isset($_directories[$match['key']])) {
- $_directory = $_directories[$match['key']];
- } else {
- // try at location index
- $keys = array_keys($_directories);
- $_directory = $_directories[$keys[$match['key']]];
- }
- }
-
- if ($_directory) {
- $_file = substr($file, strpos($file, ']') + 1);
- $_filepath = $_directory . $_file;
- if ($this->fileExists($source, $_filepath)) {
- return $_filepath;
- }
- }
- }
-
- $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
-
- // relative file name?
- if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
- foreach ($_directories as $_directory) {
- $_filepath = $_directory . $file;
- if ($this->fileExists($source, $_filepath)) {
- return $this->normalizePath($_filepath);
- }
- if ($source->smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_directory)) {
- // try PHP include_path
- if ($_stream_resolve_include_path) {
- $_filepath = stream_resolve_include_path($_filepath);
- } else {
- $_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath);
- }
-
- if ($_filepath !== false) {
- if ($this->fileExists($source, $_filepath)) {
- return $this->normalizePath($_filepath);
- }
- }
- }
- }
- }
-
- // try absolute filepath
- if ($this->fileExists($source, $file)) {
- return $file;
- }
-
- // no tpl file found
- if ($_default_handler) {
- if (!is_callable($_default_handler)) {
- if ($source instanceof Smarty_Config_Source) {
- throw new SmartyException("Default config handler not callable");
- } else {
- throw new SmartyException("Default template handler not callable");
- }
- }
- $_return = call_user_func_array($_default_handler,
- array($source->type, $source->name, &$_content, &$_timestamp, $source->smarty));
- if (is_string($_return)) {
- $source->timestamp = @filemtime($_return);
- $source->exists = !!$source->timestamp;
-
- return $_return;
- } elseif ($_return === true) {
- $source->content = $_content;
- $source->timestamp = $_timestamp;
- $source->exists = true;
-
- return $_filepath;
- }
- }
-
- // give up
- return false;
- }
+ public $uncompiled = false;
/**
- * test is file exists and save timestamp
- *
- * @param Smarty_Template_Source $source source object
- * @param string $file file name
+ * Source must be recompiled on every occasion
*
- * @return bool true if file exists
+ * @var boolean
*/
- protected function fileExists(Smarty_Template_Source $source, $file)
- {
- $source->timestamp = is_file($file) ? @filemtime($file) : false;
-
- return $source->exists = !!$source->timestamp;
- }
+ public $recompiled = false;
/**
- * Determine basename for compiled filename
- *
- * @param Smarty_Template_Source $source source object
+ * Flag if resource does implement populateCompiledFilepath() method
*
- * @return string resource's basename
+ * @var bool
*/
- protected function getBasename(Smarty_Template_Source $source)
- {
- return null;
- }
+ public $hasCompiledHandler = false;
/**
* Load Resource Handler
*
- * @param Smarty $smarty smarty object
- * @param string $type name of the resource
+ * @param Smarty $smarty smarty object
+ * @param string $type name of the resource
*
* @throws SmartyException
* @return Smarty_Resource Resource Handler
@@ -391,62 +67,37 @@ abstract class Smarty_Resource
public static function load(Smarty $smarty, $type)
{
// try smarty's cache
- if (isset($smarty->_resource_handlers[$type])) {
- return $smarty->_resource_handlers[$type];
+ if (isset($smarty->_cache[ 'resource_handlers' ][ $type ])) {
+ return $smarty->_cache[ 'resource_handlers' ][ $type ];
}
-
// try registered resource
- if (isset($smarty->registered_resources[$type])) {
- if ($smarty->registered_resources[$type] instanceof Smarty_Resource) {
- $smarty->_resource_handlers[$type] = $smarty->registered_resources[$type];
- // note registered to smarty is not kept unique!
- return $smarty->_resource_handlers[$type];
- }
-
- if (!isset(self::$resources['registered'])) {
- self::$resources['registered'] = new Smarty_Internal_Resource_Registered();
- }
- if (!isset($smarty->_resource_handlers[$type])) {
- $smarty->_resource_handlers[$type] = self::$resources['registered'];
- }
-
- return $smarty->_resource_handlers[$type];
+ if (isset($smarty->registered_resources[ $type ])) {
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] =
+ $smarty->registered_resources[ $type ] instanceof Smarty_Resource ?
+ $smarty->registered_resources[ $type ] : new Smarty_Internal_Resource_Registered();
}
-
// try sysplugins dir
- if (isset(self::$sysplugins[$type])) {
- if (!isset(self::$resources[$type])) {
- $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type);
- self::$resources[$type] = new $_resource_class();
- }
-
- return $smarty->_resource_handlers[$type] = self::$resources[$type];
+ if (isset(self::$sysplugins[ $type ])) {
+ $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type);
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] = new $_resource_class();
}
-
// try plugins dir
$_resource_class = 'Smarty_Resource_' . ucfirst($type);
if ($smarty->loadPlugin($_resource_class)) {
- if (isset(self::$resources[$type])) {
- return $smarty->_resource_handlers[$type] = self::$resources[$type];
- }
-
if (class_exists($_resource_class, false)) {
- self::$resources[$type] = new $_resource_class();
-
- return $smarty->_resource_handlers[$type] = self::$resources[$type];
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] = new $_resource_class();
} else {
- $smarty->registerResource($type, array(
- "smarty_resource_{$type}_source",
- "smarty_resource_{$type}_timestamp",
- "smarty_resource_{$type}_secure",
- "smarty_resource_{$type}_trusted"
- ));
-
+ $smarty->registerResource(
+ $type,
+ array(
+ "smarty_resource_{$type}_source", "smarty_resource_{$type}_timestamp",
+ "smarty_resource_{$type}_secure", "smarty_resource_{$type}_trusted"
+ )
+ );
// give it another try, now that the resource is registered properly
return self::load($smarty, $type);
}
}
-
// try streams
$_known_stream = stream_get_wrappers();
if (in_array($type, $_known_stream)) {
@@ -454,459 +105,158 @@ abstract class Smarty_Resource
if (is_object($smarty->security_policy)) {
$smarty->security_policy->isTrustedStream($type);
}
- if (!isset(self::$resources['stream'])) {
- self::$resources['stream'] = new Smarty_Internal_Resource_Stream();
- }
-
- return $smarty->_resource_handlers[$type] = self::$resources['stream'];
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] = new Smarty_Internal_Resource_Stream();
}
-
// TODO: try default_(template|config)_handler
-
// give up
throw new SmartyException("Unknown resource type '{$type}'");
}
/**
* extract resource_type and resource_name from template_resource and config_resource
+ *
* @note "C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including).
*
- * @param string $resource_name template_resource or config_resource to parse
- * @param string $default_resource the default resource_type defined in $smarty
- * @param string &$name the parsed resource name
- * @param string &$type the parsed resource type
+ * @param string $resource_name template_resource or config_resource to parse
+ * @param string $default_resource the default resource_type defined in $smarty
*
- * @return void
+ * @return array with parsed resource name and type
*/
- protected static function parseResourceName($resource_name, $default_resource, &$name, &$type)
+ public static function parseResourceName($resource_name, $default_resource)
{
- $parts = explode(':', $resource_name, 2);
- if (!isset($parts[1]) || !isset($parts[0][1])) {
+ if (preg_match('/^([A-Za-z0-9_\-]{2,})[:]/', $resource_name, $match)) {
+ $type = $match[ 1 ];
+ $name = substr($resource_name, strlen($match[ 0 ]));
+ } else {
// no resource given, use default
// or single character before the colon is not a resource type, but part of the filepath
$type = $default_resource;
$name = $resource_name;
- } else {
- $type = $parts[0];
- $name = $parts[1];
}
+ return array($name, $type);
}
- /**
- * modify resource_name according to resource handlers specifications
- *
- * @param Smarty $smarty Smarty instance
- * @param string $resource_name resource_name to make unique
- *
- * @return string unique resource name
- */
-
/**
* modify template_resource according to resource handlers specifications
*
- * @param Smarty_Internal_template $template Smarty instance
- * @param string $template_resource template_resource to extract resource handler and name of
+ * @param \Smarty_Internal_Template|\Smarty $obj Smarty instance
+ * @param string $template_resource template_resource to extract resource handler and
+ * name of
*
* @return string unique resource name
+ * @throws \SmartyException
*/
- public static function getUniqueTemplateName($template, $template_resource)
+ public static function getUniqueTemplateName($obj, $template_resource)
{
- self::parseResourceName($template_resource, $template->smarty->default_resource_type, $name, $type);
+ $smarty = $obj->_getSmartyObj();
+ list($name, $type) = self::parseResourceName($template_resource, $smarty->default_resource_type);
// TODO: optimize for Smarty's internal resource types
- $resource = Smarty_Resource::load($template->smarty, $type);
+ $resource = Smarty_Resource::load($smarty, $type);
// go relative to a given template?
- $_file_is_dotted = $name[0] == '.' && ($name[1] == '.' || $name[1] == '/' || $name[1] == "\\");
- if ($template instanceof Smarty_Internal_Template && $_file_is_dotted && ($template->source->type == 'file' || $template->parent->source->type == 'extends')) {
- $name = dirname($template->source->filepath) . DS . $name;
+ $_file_is_dotted = $name[ 0 ] === '.' && ($name[ 1 ] === '.' || $name[ 1 ] === '/');
+ if ($obj->_isTplObj() && $_file_is_dotted
+ && ($obj->source->type === 'file' || $obj->parent->source->type === 'extends')
+ ) {
+ $name = $smarty->_realpath(dirname($obj->parent->source->filepath) . DIRECTORY_SEPARATOR . $name);
}
- return $resource->buildUniqueResourceName($template->smarty, $name);
+ return $resource->buildUniqueResourceName($smarty, $name);
}
/**
* initialize Source Object for given resource
+ * wrapper for backward compatibility to versions < 3.1.22
* Either [$_template] or [$smarty, $template_resource] must be specified
*
- * @param Smarty_Internal_Template $_template template object
- * @param Smarty $smarty smarty object
- * @param string $template_resource resource identifier
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty $smarty smarty object
+ * @param string $template_resource resource identifier
*
- * @return Smarty_Template_Source Source Object
+ * @return \Smarty_Template_Source Source Object
+ * @throws \SmartyException
*/
- public static function source(Smarty_Internal_Template $_template = null, Smarty $smarty = null, $template_resource = null)
- {
- if ($_template) {
- $smarty = $_template->smarty;
- $template_resource = $_template->template_resource;
- }
-
- // parse resource_name, load resource handler, identify unique resource name
- self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type);
- $resource = Smarty_Resource::load($smarty, $type);
- // go relative to a given template?
- $_file_is_dotted = isset($name[0]) && $name[0] == '.' && ($name[1] == '.' || $name[1] == '/' || $name[1] == "\\");
- if ($_file_is_dotted && isset($_template) && $_template->parent instanceof Smarty_Internal_Template && ($_template->parent->source->type == 'file' || $_template->parent->source->type == 'extends')) {
- $name2 = dirname($_template->parent->source->filepath) . DS . $name;
- } else {
- $name2 = $name;
- }
- $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name2);
-
- // check runtime cache
- $_cache_key = 'template|' . $unique_resource_name;
- if ($smarty->compile_id) {
- $_cache_key .= '|' . $smarty->compile_id;
- }
- if (isset(self::$sources[$_cache_key])) {
- return self::$sources[$_cache_key];
- }
-
- // create source
- $source = new Smarty_Template_Source($resource, $smarty, $template_resource, $type, $name, $unique_resource_name);
- $resource->populate($source, $_template);
-
- // runtime cache
- self::$sources[$_cache_key] = $source;
-
- return $source;
- }
-
- /**
- * initialize Config Source Object for given resource
- *
- * @param Smarty_Internal_Config $_config config object
- *
- * @throws SmartyException
- * @return Smarty_Config_Source Source Object
- */
- public static function config(Smarty_Internal_Config $_config)
- {
- static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true);
- $config_resource = $_config->config_resource;
- $smarty = $_config->smarty;
-
- // parse resource_name
- self::parseResourceName($config_resource, $smarty->default_config_type, $name, $type);
-
- // make sure configs are not loaded via anything smarty can't handle
- if (isset($_incompatible_resources[$type])) {
- throw new SmartyException ("Unable to use resource '{$type}' for config");
- }
-
- // load resource handler, identify unique resource name
- $resource = Smarty_Resource::load($smarty, $type);
- $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name, true);
-
- // check runtime cache
- $_cache_key = 'config|' . $unique_resource_name;
- if (isset(self::$sources[$_cache_key])) {
- return self::$sources[$_cache_key];
- }
-
- // create source
- $source = new Smarty_Config_Source($resource, $smarty, $config_resource, $type, $name, $unique_resource_name);
- $resource->populate($source, null);
-
- // runtime cache
- self::$sources[$_cache_key] = $source;
-
- return $source;
+ public static function source(
+ Smarty_Internal_Template $_template = null,
+ Smarty $smarty = null,
+ $template_resource = null
+ ) {
+ return Smarty_Template_Source::load($_template, $smarty, $template_resource);
}
-}
-
-/**
- * Smarty Resource Data Object
- * Meta Data Container for Template Files
- *
- * @package Smarty
- * @subpackage TemplateResources
- * @author Rodney Rehm
- * @property integer $timestamp Source Timestamp
- * @property boolean $exists Source Existence
- * @property boolean $template Extended Template reference
- * @property string $content Source Content
- */
-class Smarty_Template_Source
-{
- /**
- * Name of the Class to compile this resource's contents with
- *
- * @var string
- */
- public $compiler_class = null;
-
- /**
- * Name of the Class to tokenize this resource's contents with
- *
- * @var string
- */
- public $template_lexer_class = null;
-
- /**
- * Name of the Class to parse this resource's contents with
- *
- * @var string
- */
- public $template_parser_class = null;
-
- /**
- * Unique Template ID
- *
- * @var string
- */
- public $uid = null;
-
- /**
- * Template Resource (Smarty_Internal_Template::$template_resource)
- *
- * @var string
- */
- public $resource = null;
-
- /**
- * Resource Type
- *
- * @var string
- */
- public $type = null;
-
- /**
- * Resource Name
- *
- * @var string
- */
- public $name = null;
-
- /**
- * Unique Resource Name
- *
- * @var string
- */
- public $unique_resource = null;
-
- /**
- * Source Filepath
- *
- * @var string
- */
- public $filepath = null;
-
- /**
- * Source is bypassing compiler
- *
- * @var boolean
- */
- public $uncompiled = null;
/**
- * Source must be recompiled on every occasion
- *
- * @var boolean
- */
- public $recompiled = null;
-
- /**
- * The Components an extended template is made of
+ * Load template's source into current template object
*
- * @var array
- */
- public $components = null;
-
- /**
- * Resource Handler
+ * @param Smarty_Template_Source $source source object
*
- * @var Smarty_Resource
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
*/
- public $handler = null;
+ abstract public function getContent(Smarty_Template_Source $source);
/**
- * Smarty instance
+ * populate Source Object with meta data from Resource
*
- * @var Smarty
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
*/
- public $smarty = null;
+ abstract public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null);
/**
- * create Source Object container
+ * populate Source Object with timestamp and exists from Resource
*
- * @param Smarty_Resource $handler Resource Handler this source object communicates with
- * @param Smarty $smarty Smarty instance this source object belongs to
- * @param string $resource full template_resource
- * @param string $type type of resource
- * @param string $name resource name
- * @param string $unique_resource unique resource name
+ * @param Smarty_Template_Source $source source object
*/
- public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)
+ public function populateTimestamp(Smarty_Template_Source $source)
{
- $this->handler = $handler; // Note: prone to circular references
-
- $this->compiler_class = $handler->compiler_class;
- $this->template_lexer_class = $handler->template_lexer_class;
- $this->template_parser_class = $handler->template_parser_class;
- $this->uncompiled = $this->handler instanceof Smarty_Resource_Uncompiled;
- $this->recompiled = $this->handler instanceof Smarty_Resource_Recompiled;
-
- $this->smarty = $smarty;
- $this->resource = $resource;
- $this->type = $type;
- $this->name = $name;
- $this->unique_resource = $unique_resource;
+ // intentionally left blank
}
/**
- * get a Compiled Object of this source
+ * modify resource_name according to resource handlers specifications
*
- * @param Smarty_Internal_Template|Smarty_Internal_Config $_template template object
+ * @param Smarty $smarty Smarty instance
+ * @param string $resource_name resource_name to make unique
+ * @param boolean $isConfig flag for config resource
*
- * @return Smarty_Template_Compiled compiled object
+ * @return string unique resource name
*/
- public function getCompiled($_template)
+ public function buildUniqueResourceName(Smarty $smarty, $resource_name, $isConfig = false)
{
- // check runtime cache
- $_cache_key = $this->unique_resource . '#' . $_template->compile_id;
- if (isset(Smarty_Resource::$compileds[$_cache_key])) {
- return Smarty_Resource::$compileds[$_cache_key];
+ if ($isConfig) {
+ if (!isset($smarty->_joined_config_dir)) {
+ $smarty->getTemplateDir(null, true);
+ }
+ return get_class($this) . '#' . $smarty->_joined_config_dir . '#' . $resource_name;
+ } else {
+ if (!isset($smarty->_joined_template_dir)) {
+ $smarty->getTemplateDir();
+ }
+ return get_class($this) . '#' . $smarty->_joined_template_dir . '#' . $resource_name;
}
-
- $compiled = new Smarty_Template_Compiled($this);
- $this->handler->populateCompiledFilepath($compiled, $_template);
- $compiled->timestamp = @filemtime($compiled->filepath);
- $compiled->exists = !!$compiled->timestamp;
-
- // runtime cache
- Smarty_Resource::$compileds[$_cache_key] = $compiled;
-
- return $compiled;
- }
-
- /**
- * render the uncompiled source
- *
- * @param Smarty_Internal_Template $_template template object
- */
- public function renderUncompiled(Smarty_Internal_Template $_template)
- {
- return $this->handler->renderUncompiled($this, $_template);
}
- /**
- * <> Generic Setter.
- *
- * @param string $property_name valid: timestamp, exists, content, template
- * @param mixed $value new value (is not checked)
+ /*
+ * Check if resource must check time stamps when when loading complied or cached templates.
+ * Resources like 'extends' which use source components my disable timestamp checks on own resource.
*
- * @throws SmartyException if $property_name is not valid
+ * @return bool
*/
- public function __set($property_name, $value)
- {
- switch ($property_name) {
- // regular attributes
- case 'timestamp':
- case 'exists':
- case 'content':
- // required for extends: only
- case 'template':
- $this->$property_name = $value;
- break;
-
- default:
- throw new SmartyException("invalid source property '$property_name'.");
- }
- }
-
/**
- * <> Generic getter.
+ * Determine basename for compiled filename
*
- * @param string $property_name valid: timestamp, exists, content
+ * @param Smarty_Template_Source $source source object
*
- * @return mixed
- * @throws SmartyException if $property_name is not valid
+ * @return string resource's basename
*/
- public function __get($property_name)
+ public function getBasename(Smarty_Template_Source $source)
{
- switch ($property_name) {
- case 'timestamp':
- case 'exists':
- $this->handler->populateTimestamp($this);
-
- return $this->$property_name;
-
- case 'content':
- return $this->content = $this->handler->getContent($this);
-
- default:
- throw new SmartyException("source property '$property_name' does not exist.");
- }
+ return basename(preg_replace('![^\w]+!', '_', $source->name));
}
-}
-
-/**
- * Smarty Resource Data Object
- * Meta Data Container for Template Files
- *
- * @package Smarty
- * @subpackage TemplateResources
- * @author Rodney Rehm
- * @property string $content compiled content
- */
-class Smarty_Template_Compiled
-{
- /**
- * Compiled Filepath
- *
- * @var string
- */
- public $filepath = null;
-
- /**
- * Compiled Timestamp
- *
- * @var integer
- */
- public $timestamp = null;
-
- /**
- * Compiled Existence
- *
- * @var boolean
- */
- public $exists = false;
-
- /**
- * Compiled Content Loaded
- *
- * @var boolean
- */
- public $loaded = false;
-
- /**
- * Template was compiled
- *
- * @var boolean
- */
- public $isCompiled = false;
-
- /**
- * Source Object
- *
- * @var Smarty_Template_Source
- */
- public $source = null;
/**
- * Metadata properties
- * populated by Smarty_Internal_Template::decodeProperties()
- *
- * @var array
- */
- public $_properties = null;
-
- /**
- * create Compiled Object container
- *
- * @param Smarty_Template_Source $source source object this compiled object belongs to
+ * @return bool
*/
- public function __construct(Smarty_Template_Source $source)
+ public function checkTimestamps()
{
- $this->source = $source;
+ return true;
}
}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_custom.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_custom.php
index 7c11bd8c7..8d66be3ae 100644
--- a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_custom.php
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_custom.php
@@ -30,7 +30,7 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource
* {@internal implementing this method is optional.
* Only implement it if modification times can be accessed faster than loading the complete template source.}}
*
- * @param string $name template name
+ * @param string $name template name
*
* @return integer|boolean timestamp (epoch) the template was modified, or false if not found
*/
@@ -47,9 +47,8 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource
*/
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
{
- $source->filepath = $source->type . ':' . $source->name;
+ $source->filepath = $source->type . ':' . substr(preg_replace('/[^A-Za-z0-9.]/', '', $source->name), 0, 25);
$source->uid = sha1($source->type . ':' . $source->name);
-
$mtime = $this->fetchTimestamp($source->name);
if ($mtime !== null) {
$source->timestamp = $mtime;
@@ -66,7 +65,7 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource
/**
* Load template's source into current template object
*
- * @param Smarty_Template_Source $source source object
+ * @param Smarty_Template_Source $source source object
*
* @return string template source
* @throws SmartyException if source cannot be loaded
@@ -77,19 +76,18 @@ abstract class Smarty_Resource_Custom extends Smarty_Resource
if (isset($content)) {
return $content;
}
-
throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
}
/**
* Determine basename for compiled filename
*
- * @param Smarty_Template_Source $source source object
+ * @param Smarty_Template_Source $source source object
*
* @return string resource's basename
*/
- protected function getBasename(Smarty_Template_Source $source)
+ public function getBasename(Smarty_Template_Source $source)
{
- return basename($source->name);
+ return basename(substr(preg_replace('/[^A-Za-z0-9.]/', '', $source->name), 0, 25));
}
}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_recompiled.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_recompiled.php
index 66b36e17a..760c4dd33 100644
--- a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_recompiled.php
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_recompiled.php
@@ -16,11 +16,59 @@
*/
abstract class Smarty_Resource_Recompiled extends Smarty_Resource
{
+ /**
+ * Flag that it's an recompiled resource
+ *
+ * @var bool
+ */
+ public $recompiled = true;
+
+ /**
+ * Resource does implement populateCompiledFilepath() method
+ *
+ * @var bool
+ */
+ public $hasCompiledHandler = true;
+
+ /**
+ * compile template from source
+ *
+ * @param Smarty_Internal_Template $_smarty_tpl do not change variable name, is used by compiled template
+ *
+ * @throws Exception
+ */
+ public function process(Smarty_Internal_Template $_smarty_tpl)
+ {
+ $compiled = &$_smarty_tpl->compiled;
+ $compiled->file_dependency = array();
+ $compiled->includes = array();
+ $compiled->nocache_hash = null;
+ $compiled->unifunc = null;
+ $level = ob_get_level();
+ ob_start();
+ $_smarty_tpl->loadCompiler();
+ // call compiler
+ try {
+ eval('?>' . $_smarty_tpl->compiler->compileTemplate($_smarty_tpl));
+ } catch (Exception $e) {
+ unset($_smarty_tpl->compiler);
+ while (ob_get_level() > $level) {
+ ob_end_clean();
+ }
+ throw $e;
+ }
+ // release compiler object to free memory
+ unset($_smarty_tpl->compiler);
+ ob_get_clean();
+ $compiled->timestamp = time();
+ $compiled->exists = true;
+ }
+
/**
* populate Compiled Object with compiled filepath
*
- * @param Smarty_Template_Compiled $compiled compiled object
- * @param Smarty_Internal_Template $_template template object
+ * @param Smarty_Template_Compiled $compiled compiled object
+ * @param Smarty_Internal_Template $_template template object
*
* @return void
*/
@@ -30,4 +78,17 @@ abstract class Smarty_Resource_Recompiled extends Smarty_Resource
$compiled->timestamp = false;
$compiled->exists = false;
}
+
+ /*
+ * Disable timestamp checks for recompiled resource.
+ *
+ * @return bool
+ */
+ /**
+ * @return bool
+ */
+ public function checkTimestamps()
+ {
+ return false;
+ }
}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_uncompiled.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_uncompiled.php
index 4ee5d7908..a11e2c14c 100644
--- a/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_uncompiled.php
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_resource_uncompiled.php
@@ -17,25 +17,33 @@
abstract class Smarty_Resource_Uncompiled extends Smarty_Resource
{
/**
- * Render and output the template (without using the compiler)
+ * Flag that it's an uncompiled resource
*
- * @param Smarty_Template_Source $source source object
- * @param Smarty_Internal_Template $_template template object
+ * @var bool
+ */
+ public $uncompiled = true;
+
+ /**
+ * Resource does implement populateCompiledFilepath() method
*
- * @throws SmartyException on failure
+ * @var bool
*/
- abstract public function renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template);
+ public $hasCompiledHandler = true;
/**
* populate compiled object with compiled filepath
*
* @param Smarty_Template_Compiled $compiled compiled object
- * @param Smarty_Internal_Template $_template template object (is ignored)
+ * @param Smarty_Internal_Template $_template template object
*/
public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
{
- $compiled->filepath = false;
- $compiled->timestamp = false;
- $compiled->exists = false;
+ $compiled->filepath = $_template->source->filepath;
+ $compiled->timestamp = $_template->source->timestamp;
+ $compiled->exists = $_template->source->exists;
+ if ($_template->smarty->merge_compiled_includes || $_template->source->handler->checkTimestamps()) {
+ $compiled->file_dependency[ $_template->source->uid ] =
+ array($compiled->filepath, $compiled->timestamp, $_template->source->type,);
+ }
}
}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_security.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_security.php
index 75d8756ec..441a7e284 100644
--- a/web/private_php/ams/smarty/libs/sysplugins/smarty_security.php
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_security.php
@@ -6,12 +6,12 @@
* @subpackage Security
* @author Uwe Tews
*/
-
-/*
+/**
* FIXME: Smarty_Security API
* - getter and setter instead of public properties would allow cultivating an internal cache properly
- * - current implementation of isTrustedResourceDir() assumes that Smarty::$template_dir and Smarty::$config_dir are immutable
- * the cache is killed every time either of the variables change. That means that two distinct Smarty objects with differing
+ * - current implementation of isTrustedResourceDir() assumes that Smarty::$template_dir and Smarty::$config_dir
+ * are immutable the cache is killed every time either of the variables change. That means that two distinct
+ * Smarty objects with differing
* $template_dir or $config_dir should NOT share the same Smarty_Security instance,
* as this would lead to (severe) performance penalty! how should this be handled?
*/
@@ -34,6 +34,7 @@ class Smarty_Security
* @var integer
*/
public $php_handling = Smarty::PHP_PASSTHRU;
+
/**
* This is the list of template directories that are considered secure.
* $template_dir is in this list implicitly.
@@ -41,6 +42,7 @@ class Smarty_Security
* @var array
*/
public $secure_dir = array();
+
/**
* This is an array of directories where trusted php scripts reside.
* {@link $security} is disabled during their inclusion/execution.
@@ -48,12 +50,21 @@ class Smarty_Security
* @var array
*/
public $trusted_dir = array();
+
/**
* List of regular expressions (PCRE) that include trusted URIs
*
* @var array
*/
public $trusted_uri = array();
+
+ /**
+ * List of trusted constants names
+ *
+ * @var array
+ */
+ public $trusted_constants = array();
+
/**
* This is an array of trusted static classes.
* If empty access to all static classes is allowed.
@@ -62,6 +73,35 @@ class Smarty_Security
* @var array
*/
public $static_classes = array();
+
+ /**
+ * This is an nested array of trusted classes and static methods.
+ * If empty access to all static classes and methods is allowed.
+ * Format:
+ * array (
+ * 'class_1' => array('method_1', 'method_2'), // allowed methods listed
+ * 'class_2' => array(), // all methods of class allowed
+ * )
+ * If set to null none is allowed.
+ *
+ * @var array
+ */
+ public $trusted_static_methods = array();
+
+ /**
+ * This is an array of trusted static properties.
+ * If empty access to all static classes and properties is allowed.
+ * Format:
+ * array (
+ * 'class_1' => array('prop_1', 'prop_2'), // allowed properties listed
+ * 'class_2' => array(), // all properties of class allowed
+ * )
+ * If set to null none is allowed.
+ *
+ * @var array
+ */
+ public $trusted_static_properties = array();
+
/**
* This is an array of trusted PHP functions.
* If empty all functions are allowed.
@@ -69,24 +109,17 @@ class Smarty_Security
*
* @var array
*/
- public $php_functions = array(
- 'isset', 'empty',
- 'count', 'sizeof',
- 'in_array', 'is_array',
- 'time',
- 'nl2br',
- );
+ public $php_functions = array('isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', 'time',);
+
/**
* This is an array of trusted PHP modifiers.
* If empty all modifiers are allowed.
- * To disable all modifier set $modifiers = null.
+ * To disable all modifier set $php_modifiers = null.
*
* @var array
*/
- public $php_modifiers = array(
- 'escape',
- 'count'
- );
+ public $php_modifiers = array('escape', 'count', 'nl2br',);
+
/**
* This is an array of allowed tags.
* If empty no restriction by allowed_tags.
@@ -94,6 +127,7 @@ class Smarty_Security
* @var array
*/
public $allowed_tags = array();
+
/**
* This is an array of disabled tags.
* If empty no restriction by disabled_tags.
@@ -101,6 +135,7 @@ class Smarty_Security
* @var array
*/
public $disabled_tags = array();
+
/**
* This is an array of allowed modifier plugins.
* If empty no restriction by allowed_modifiers.
@@ -108,6 +143,7 @@ class Smarty_Security
* @var array
*/
public $allowed_modifiers = array();
+
/**
* This is an array of disabled modifier plugins.
* If empty no restriction by disabled_modifiers.
@@ -115,6 +151,14 @@ class Smarty_Security
* @var array
*/
public $disabled_modifiers = array();
+
+ /**
+ * This is an array of disabled special $smarty variables.
+ *
+ * @var array
+ */
+ public $disabled_special_smarty_vars = array();
+
/**
* This is an array of trusted streams.
* If empty all streams are allowed.
@@ -123,12 +167,14 @@ class Smarty_Security
* @var array
*/
public $streams = array('file');
+
/**
* + flag if constants can be accessed from template
*
* @var boolean
*/
public $allow_constants = true;
+
/**
* + flag if super globals can be accessed from template
*
@@ -136,36 +182,55 @@ class Smarty_Security
*/
public $allow_super_globals = true;
+ /**
+ * max template nesting level
+ *
+ * @var int
+ */
+ public $max_template_nesting = 0;
+
+ /**
+ * current template nesting level
+ *
+ * @var int
+ */
+ private $_current_template_nesting = 0;
+
/**
* Cache for $resource_dir lookup
*
* @var array
*/
- protected $_resource_dir = null;
+ protected $_resource_dir = array();
+
/**
* Cache for $template_dir lookup
*
* @var array
*/
- protected $_template_dir = null;
+ protected $_template_dir = array();
+
/**
* Cache for $config_dir lookup
*
* @var array
*/
- protected $_config_dir = null;
+ protected $_config_dir = array();
+
/**
* Cache for $secure_dir lookup
*
* @var array
*/
- protected $_secure_dir = null;
+ protected $_secure_dir = array();
+
/**
* Cache for $php_resource_dir lookup
*
* @var array
*/
protected $_php_resource_dir = null;
+
/**
* Cache for $trusted_dir lookup
*
@@ -173,6 +238,20 @@ class Smarty_Security
*/
protected $_trusted_dir = null;
+ /**
+ * Cache for include path status
+ *
+ * @var bool
+ */
+ protected $_include_path_status = false;
+
+ /**
+ * Cache for $_include_array lookup
+ *
+ * @var array
+ */
+ protected $_include_dir = array();
+
/**
* @param Smarty $smarty
*/
@@ -184,77 +263,118 @@ class Smarty_Security
/**
* Check if PHP function is trusted.
*
- * @param string $function_name
- * @param object $compiler compiler object
+ * @param string $function_name
+ * @param object $compiler compiler object
*
* @return boolean true if function is trusted
- * @throws SmartyCompilerException if php function is not trusted
*/
public function isTrustedPhpFunction($function_name, $compiler)
{
- if (isset($this->php_functions) && (empty($this->php_functions) || in_array($function_name, $this->php_functions))) {
+ if (isset($this->php_functions)
+ && (empty($this->php_functions) || in_array($function_name, $this->php_functions))
+ ) {
return true;
}
-
$compiler->trigger_template_error("PHP function '{$function_name}' not allowed by security setting");
-
return false; // should not, but who knows what happens to the compiler in the future?
}
/**
* Check if static class is trusted.
*
- * @param string $class_name
- * @param object $compiler compiler object
+ * @param string $class_name
+ * @param object $compiler compiler object
*
* @return boolean true if class is trusted
- * @throws SmartyCompilerException if static class is not trusted
*/
public function isTrustedStaticClass($class_name, $compiler)
{
- if (isset($this->static_classes) && (empty($this->static_classes) || in_array($class_name, $this->static_classes))) {
+ if (isset($this->static_classes)
+ && (empty($this->static_classes) || in_array($class_name, $this->static_classes))
+ ) {
return true;
}
-
$compiler->trigger_template_error("access to static class '{$class_name}' not allowed by security setting");
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+ /**
+ * Check if static class method/property is trusted.
+ *
+ * @param string $class_name
+ * @param string $params
+ * @param object $compiler compiler object
+ *
+ * @return boolean true if class method is trusted
+ */
+ public function isTrustedStaticClassAccess($class_name, $params, $compiler)
+ {
+ if (!isset($params[ 2 ])) {
+ // fall back
+ return $this->isTrustedStaticClass($class_name, $compiler);
+ }
+ if ($params[ 2 ] === 'method') {
+ $allowed = $this->trusted_static_methods;
+ $name = substr($params[ 0 ], 0, strpos($params[ 0 ], '('));
+ } else {
+ $allowed = $this->trusted_static_properties;
+ // strip '$'
+ $name = substr($params[ 0 ], 1);
+ }
+ if (isset($allowed)) {
+ if (empty($allowed)) {
+ // fall back
+ return $this->isTrustedStaticClass($class_name, $compiler);
+ }
+ if (isset($allowed[ $class_name ])
+ && (empty($allowed[ $class_name ]) || in_array($name, $allowed[ $class_name ]))
+ ) {
+ return true;
+ }
+ }
+ $compiler->trigger_template_error("access to static class '{$class_name}' {$params[2]} '{$name}' not allowed by security setting");
return false; // should not, but who knows what happens to the compiler in the future?
}
/**
* Check if PHP modifier is trusted.
*
- * @param string $modifier_name
- * @param object $compiler compiler object
+ * @param string $modifier_name
+ * @param object $compiler compiler object
*
* @return boolean true if modifier is trusted
- * @throws SmartyCompilerException if modifier is not trusted
*/
public function isTrustedPhpModifier($modifier_name, $compiler)
{
- if (isset($this->php_modifiers) && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))) {
+ if (isset($this->php_modifiers)
+ && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))
+ ) {
return true;
}
-
$compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting");
-
return false; // should not, but who knows what happens to the compiler in the future?
}
/**
* Check if tag is trusted.
*
- * @param string $tag_name
- * @param object $compiler compiler object
+ * @param string $tag_name
+ * @param object $compiler compiler object
*
* @return boolean true if tag is trusted
- * @throws SmartyCompilerException if modifier is not trusted
*/
public function isTrustedTag($tag_name, $compiler)
{
// check for internal always required tags
- if (in_array($tag_name, array('assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin', 'private_object_block_function',
- 'private_object_function', 'private_registered_function', 'private_registered_block', 'private_special_variable', 'private_print_expression', 'private_modifier'))
+ if (in_array(
+ $tag_name,
+ array(
+ 'assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin',
+ 'private_object_block_function', 'private_object_function', 'private_registered_function',
+ 'private_registered_block', 'private_special_variable', 'private_print_expression',
+ 'private_modifier'
+ )
+ )
) {
return true;
}
@@ -263,25 +383,45 @@ class Smarty_Security
if (empty($this->disabled_tags) || !in_array($tag_name, $this->disabled_tags)) {
return true;
} else {
- $compiler->trigger_template_error("tag '{$tag_name}' disabled by security setting", $compiler->lex->taglineno);
+ $compiler->trigger_template_error("tag '{$tag_name}' disabled by security setting", null, true);
}
} elseif (in_array($tag_name, $this->allowed_tags) && !in_array($tag_name, $this->disabled_tags)) {
return true;
} else {
- $compiler->trigger_template_error("tag '{$tag_name}' not allowed by security setting", $compiler->lex->taglineno);
+ $compiler->trigger_template_error("tag '{$tag_name}' not allowed by security setting", null, true);
}
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+ /**
+ * Check if special $smarty variable is trusted.
+ *
+ * @param string $var_name
+ * @param object $compiler compiler object
+ *
+ * @return boolean true if tag is trusted
+ */
+ public function isTrustedSpecialSmartyVar($var_name, $compiler)
+ {
+ if (!in_array($var_name, $this->disabled_special_smarty_vars)) {
+ return true;
+ } else {
+ $compiler->trigger_template_error(
+ "special variable '\$smarty.{$var_name}' not allowed by security setting",
+ null,
+ true
+ );
+ }
return false; // should not, but who knows what happens to the compiler in the future?
}
/**
* Check if modifier plugin is trusted.
*
- * @param string $modifier_name
- * @param object $compiler compiler object
+ * @param string $modifier_name
+ * @param object $compiler compiler object
*
* @return boolean true if tag is trusted
- * @throws SmartyCompilerException if modifier is not trusted
*/
public function isTrustedModifier($modifier_name, $compiler)
{
@@ -294,21 +434,57 @@ class Smarty_Security
if (empty($this->disabled_modifiers) || !in_array($modifier_name, $this->disabled_modifiers)) {
return true;
} else {
- $compiler->trigger_template_error("modifier '{$modifier_name}' disabled by security setting", $compiler->lex->taglineno);
+ $compiler->trigger_template_error(
+ "modifier '{$modifier_name}' disabled by security setting",
+ null,
+ true
+ );
}
- } elseif (in_array($modifier_name, $this->allowed_modifiers) && !in_array($modifier_name, $this->disabled_modifiers)) {
+ } elseif (in_array($modifier_name, $this->allowed_modifiers)
+ && !in_array($modifier_name, $this->disabled_modifiers)
+ ) {
return true;
} else {
- $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting", $compiler->lex->taglineno);
+ $compiler->trigger_template_error(
+ "modifier '{$modifier_name}' not allowed by security setting",
+ null,
+ true
+ );
}
-
return false; // should not, but who knows what happens to the compiler in the future?
}
+ /**
+ * Check if constants are enabled or trusted
+ *
+ * @param string $const constant name
+ * @param object $compiler compiler object
+ *
+ * @return bool
+ */
+ public function isTrustedConstant($const, $compiler)
+ {
+ if (in_array($const, array('true', 'false', 'null'))) {
+ return true;
+ }
+ if (!empty($this->trusted_constants)) {
+ if (!in_array(strtolower($const), $this->trusted_constants)) {
+ $compiler->trigger_template_error("Security: access to constant '{$const}' not permitted");
+ return false;
+ }
+ return true;
+ }
+ if ($this->allow_constants) {
+ return true;
+ }
+ $compiler->trigger_template_error("Security: access to constants not permitted");
+ return false;
+ }
+
/**
* Check if stream is trusted.
*
- * @param string $stream_name
+ * @param string $stream_name
*
* @return boolean true if stream is trusted
* @throws SmartyException if stream is not trusted
@@ -318,88 +494,52 @@ class Smarty_Security
if (isset($this->streams) && (empty($this->streams) || in_array($stream_name, $this->streams))) {
return true;
}
-
throw new SmartyException("stream '{$stream_name}' not allowed by security setting");
}
/**
* Check if directory of file resource is trusted.
*
- * @param string $filepath
+ * @param string $filepath
+ * @param null|bool $isConfig
*
- * @return boolean true if directory is trusted
- * @throws SmartyException if directory is not trusted
+ * @return bool true if directory is trusted
+ * @throws \SmartyException if directory is not trusted
*/
- public function isTrustedResourceDir($filepath)
+ public function isTrustedResourceDir($filepath, $isConfig = null)
{
- $_template = false;
- $_config = false;
- $_secure = false;
-
- $_template_dir = $this->smarty->getTemplateDir();
- $_config_dir = $this->smarty->getConfigDir();
-
- // check if index is outdated
- if ((!$this->_template_dir || $this->_template_dir !== $_template_dir)
- || (!$this->_config_dir || $this->_config_dir !== $_config_dir)
- || (!empty($this->secure_dir) && (!$this->_secure_dir || $this->_secure_dir !== $this->secure_dir))
- ) {
- $this->_resource_dir = array();
- $_template = true;
- $_config = true;
- $_secure = !empty($this->secure_dir);
- }
-
- // rebuild template dir index
- if ($_template) {
- $this->_template_dir = $_template_dir;
- foreach ($_template_dir as $directory) {
- $directory = realpath($directory);
- $this->_resource_dir[$directory] = true;
+ if ($this->_include_path_status !== $this->smarty->use_include_path) {
+ $_dir =
+ $this->smarty->use_include_path ? $this->smarty->ext->_getIncludePath->getIncludePathDirs($this->smarty) : array();
+ if ($this->_include_dir !== $_dir) {
+ $this->_updateResourceDir($this->_include_dir, $_dir);
+ $this->_include_dir = $_dir;
}
+ $this->_include_path_status = $this->smarty->use_include_path;
}
-
- // rebuild config dir index
- if ($_config) {
- $this->_config_dir = $_config_dir;
- foreach ($_config_dir as $directory) {
- $directory = realpath($directory);
- $this->_resource_dir[$directory] = true;
- }
+ $_dir = $this->smarty->getTemplateDir();
+ if ($this->_template_dir !== $_dir) {
+ $this->_updateResourceDir($this->_template_dir, $_dir);
+ $this->_template_dir = $_dir;
}
-
- // rebuild secure dir index
- if ($_secure) {
- $this->_secure_dir = $this->secure_dir;
- foreach ((array) $this->secure_dir as $directory) {
- $directory = realpath($directory);
- $this->_resource_dir[$directory] = true;
- }
+ $_dir = $this->smarty->getConfigDir();
+ if ($this->_config_dir !== $_dir) {
+ $this->_updateResourceDir($this->_config_dir, $_dir);
+ $this->_config_dir = $_dir;
}
-
- $_filepath = realpath($filepath);
- $directory = dirname($_filepath);
- $_directory = array();
- while (true) {
- // remember the directory to add it to _resource_dir in case we're successful
- $_directory[$directory] = true;
- // test if the directory is trusted
- if (isset($this->_resource_dir[$directory])) {
- // merge sub directories of current $directory into _resource_dir to speed up subsequent lookup
- $this->_resource_dir = array_merge($this->_resource_dir, $_directory);
-
- return true;
- }
- // abort if we've reached root
- if (($pos = strrpos($directory, DS)) === false || !isset($directory[1])) {
- break;
+ if ($this->_secure_dir !== $this->secure_dir) {
+ $this->secure_dir = (array)$this->secure_dir;
+ foreach ($this->secure_dir as $k => $d) {
+ $this->secure_dir[ $k ] = $this->smarty->_realpath($d . DIRECTORY_SEPARATOR, true);
}
- // bubble up one level
- $directory = substr($directory, 0, $pos);
+ $this->_updateResourceDir($this->_secure_dir, $this->secure_dir);
+ $this->_secure_dir = $this->secure_dir;
}
-
- // give up
- throw new SmartyException("directory '{$_filepath}' not allowed by security setting");
+ $addPath = $this->_checkDir($filepath, $this->_resource_dir);
+ if ($addPath !== false) {
+ $this->_resource_dir = array_merge($this->_resource_dir, $addPath);
+ }
+ return true;
}
/**
@@ -408,31 +548,30 @@ class Smarty_Security
* So "http://username:password@hello.world.example.org:8080/some-path?some=query-string"
* is reduced to "http://hello.world.example.org" prior to applying the patters from {@link $trusted_uri}.
*
- * @param string $uri
+ * @param string $uri
*
* @return boolean true if URI is trusted
* @throws SmartyException if URI is not trusted
- * @uses $trusted_uri for list of patterns to match against $uri
+ * @uses $trusted_uri for list of patterns to match against $uri
*/
public function isTrustedUri($uri)
{
$_uri = parse_url($uri);
- if (!empty($_uri['scheme']) && !empty($_uri['host'])) {
- $_uri = $_uri['scheme'] . '://' . $_uri['host'];
+ if (!empty($_uri[ 'scheme' ]) && !empty($_uri[ 'host' ])) {
+ $_uri = $_uri[ 'scheme' ] . '://' . $_uri[ 'host' ];
foreach ($this->trusted_uri as $pattern) {
if (preg_match($pattern, $_uri)) {
return true;
}
}
}
-
throw new SmartyException("URI '{$uri}' not allowed by security setting");
}
/**
* Check if directory of file resource is trusted.
*
- * @param string $filepath
+ * @param string $filepath
*
* @return boolean true if directory is trusted
* @throws SmartyException if PHP directory is not trusted
@@ -442,39 +581,141 @@ class Smarty_Security
if (empty($this->trusted_dir)) {
throw new SmartyException("directory '{$filepath}' not allowed by security setting (no trusted_dir specified)");
}
-
// check if index is outdated
if (!$this->_trusted_dir || $this->_trusted_dir !== $this->trusted_dir) {
$this->_php_resource_dir = array();
-
$this->_trusted_dir = $this->trusted_dir;
- foreach ((array) $this->trusted_dir as $directory) {
- $directory = realpath($directory);
- $this->_php_resource_dir[$directory] = true;
+ foreach ((array)$this->trusted_dir as $directory) {
+ $directory = $this->smarty->_realpath($directory . '/', true);
+ $this->_php_resource_dir[ $directory ] = true;
}
}
+ $addPath = $this->_checkDir($filepath, $this->_php_resource_dir);
+ if ($addPath !== false) {
+ $this->_php_resource_dir = array_merge($this->_php_resource_dir, $addPath);
+ }
+ return true;
+ }
- $_filepath = realpath($filepath);
- $directory = dirname($_filepath);
- $_directory = array();
- while (true) {
- // remember the directory to add it to _resource_dir in case we're successful
- $_directory[] = $directory;
- // test if the directory is trusted
- if (isset($this->_php_resource_dir[$directory])) {
- // merge sub directories of current $directory into _resource_dir to speed up subsequent lookup
- $this->_php_resource_dir = array_merge($this->_php_resource_dir, $_directory);
-
- return true;
+ /**
+ * Remove old directories and its sub folders, add new directories
+ *
+ * @param array $oldDir
+ * @param array $newDir
+ */
+ private function _updateResourceDir($oldDir, $newDir)
+ {
+ foreach ($oldDir as $directory) {
+ // $directory = $this->smarty->_realpath($directory, true);
+ $length = strlen($directory);
+ foreach ($this->_resource_dir as $dir) {
+ if (substr($dir, 0, $length) === $directory) {
+ unset($this->_resource_dir[ $dir ]);
+ }
}
- // abort if we've reached root
- if (($pos = strrpos($directory, DS)) === false || !isset($directory[2])) {
- break;
+ }
+ foreach ($newDir as $directory) {
+ // $directory = $this->smarty->_realpath($directory, true);
+ $this->_resource_dir[ $directory ] = true;
+ }
+ }
+
+ /**
+ * Check if file is inside a valid directory
+ *
+ * @param string $filepath
+ * @param array $dirs valid directories
+ *
+ * @return array|bool
+ * @throws \SmartyException
+ */
+ private function _checkDir($filepath, $dirs)
+ {
+ $directory = dirname($this->smarty->_realpath($filepath, true)) . DIRECTORY_SEPARATOR;
+ $_directory = array();
+ if (!preg_match('#[\\\\/][.][.][\\\\/]#', $directory)) {
+ while (true) {
+ // test if the directory is trusted
+ if (isset($dirs[ $directory ])) {
+ return $_directory;
+ }
+ // abort if we've reached root
+ if (!preg_match('#[\\\\/][^\\\\/]+[\\\\/]$#', $directory)) {
+ // give up
+ break;
+ }
+ // remember the directory to add it to _resource_dir in case we're successful
+ $_directory[ $directory ] = true;
+ // bubble up one level
+ $directory = preg_replace('#[\\\\/][^\\\\/]+[\\\\/]$#', DIRECTORY_SEPARATOR, $directory);
}
- // bubble up one level
- $directory = substr($directory, 0, $pos);
}
+ // give up
+ throw new SmartyException(sprintf('Smarty Security: not trusted file path \'%s\' ', $filepath));
+ }
- throw new SmartyException("directory '{$_filepath}' not allowed by security setting");
+ /**
+ * Loads security class and enables security
+ *
+ * @param \Smarty $smarty
+ * @param string|Smarty_Security $security_class if a string is used, it must be class-name
+ *
+ * @return \Smarty current Smarty instance for chaining
+ * @throws \SmartyException when an invalid class name is provided
+ */
+ public static function enableSecurity(Smarty $smarty, $security_class)
+ {
+ if ($security_class instanceof Smarty_Security) {
+ $smarty->security_policy = $security_class;
+ return $smarty;
+ } elseif (is_object($security_class)) {
+ throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security.");
+ }
+ if ($security_class === null) {
+ $security_class = $smarty->security_class;
+ }
+ if (!class_exists($security_class)) {
+ throw new SmartyException("Security class '$security_class' is not defined");
+ } elseif ($security_class !== 'Smarty_Security' && !is_subclass_of($security_class, 'Smarty_Security')) {
+ throw new SmartyException("Class '$security_class' must extend Smarty_Security.");
+ } else {
+ $smarty->security_policy = new $security_class($smarty);
+ }
+ return $smarty;
+ }
+
+ /**
+ * Start template processing
+ *
+ * @param $template
+ *
+ * @throws SmartyException
+ */
+ public function startTemplate($template)
+ {
+ if ($this->max_template_nesting > 0 && $this->_current_template_nesting++ >= $this->max_template_nesting) {
+ throw new SmartyException("maximum template nesting level of '{$this->max_template_nesting}' exceeded when calling '{$template->template_resource}'");
+ }
+ }
+
+ /**
+ * Exit template processing
+ */
+ public function endTemplate()
+ {
+ if ($this->max_template_nesting > 0) {
+ $this->_current_template_nesting--;
+ }
+ }
+
+ /**
+ * Register callback functions call at start/end of template rendering
+ *
+ * @param \Smarty_Internal_Template $template
+ */
+ public function registerCallBacks(Smarty_Internal_Template $template)
+ {
+ $template->startRenderCallbacks[] = array($this, 'startTemplate');
+ $template->endRenderCallbacks[] = array($this, 'endTemplate');
}
}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_template_cached.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_cached.php
new file mode 100644
index 000000000..508d27f36
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_cached.php
@@ -0,0 +1,257 @@
+compile_id = $_template->compile_id;
+ $this->cache_id = $_template->cache_id;
+ $this->source = $_template->source;
+ if (!class_exists('Smarty_CacheResource', false)) {
+ include SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php';
+ }
+ $this->handler = Smarty_CacheResource::load($_template->smarty);
+ }
+
+ /**
+ * @param Smarty_Internal_Template $_template
+ *
+ * @return Smarty_Template_Cached
+ */
+ public static function load(Smarty_Internal_Template $_template)
+ {
+ $_template->cached = new Smarty_Template_Cached($_template);
+ $_template->cached->handler->populate($_template->cached, $_template);
+ // caching enabled ?
+ if (!$_template->caching || $_template->source->handler->recompiled
+ ) {
+ $_template->cached->valid = false;
+ }
+ return $_template->cached;
+ }
+
+ /**
+ * Render cache template
+ *
+ * @param \Smarty_Internal_Template $_template
+ * @param bool $no_output_filter
+ *
+ * @throws \Exception
+ */
+ public function render(Smarty_Internal_Template $_template, $no_output_filter = true)
+ {
+ if ($this->isCached($_template)) {
+ if ($_template->smarty->debugging) {
+ if (!isset($_template->smarty->_debug)) {
+ $_template->smarty->_debug = new Smarty_Internal_Debug();
+ }
+ $_template->smarty->_debug->start_cache($_template);
+ }
+ if (!$this->processed) {
+ $this->process($_template);
+ }
+ $this->getRenderedTemplateCode($_template);
+ if ($_template->smarty->debugging) {
+ $_template->smarty->_debug->end_cache($_template);
+ }
+ return;
+ } else {
+ $_template->smarty->ext->_updateCache->updateCache($this, $_template, $no_output_filter);
+ }
+ }
+
+ /**
+ * Check if cache is valid, lock cache if required
+ *
+ * @param \Smarty_Internal_Template $_template
+ *
+ * @return bool flag true if cache is valid
+ */
+ public function isCached(Smarty_Internal_Template $_template)
+ {
+ if ($this->valid !== null) {
+ return $this->valid;
+ }
+ while (true) {
+ while (true) {
+ if ($this->exists === false || $_template->smarty->force_compile || $_template->smarty->force_cache) {
+ $this->valid = false;
+ } else {
+ $this->valid = true;
+ }
+ if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_CURRENT
+ && $_template->cache_lifetime >= 0 && time() > ($this->timestamp + $_template->cache_lifetime)
+ ) {
+ // lifetime expired
+ $this->valid = false;
+ }
+ if ($this->valid && $_template->compile_check === Smarty::COMPILECHECK_ON
+ && $_template->source->getTimeStamp() > $this->timestamp
+ ) {
+ $this->valid = false;
+ }
+ if ($this->valid || !$_template->smarty->cache_locking) {
+ break;
+ }
+ if (!$this->handler->locked($_template->smarty, $this)) {
+ $this->handler->acquireLock($_template->smarty, $this);
+ break 2;
+ }
+ $this->handler->populate($this, $_template);
+ }
+ if ($this->valid) {
+ if (!$_template->smarty->cache_locking || $this->handler->locked($_template->smarty, $this) === null) {
+ // load cache file for the following checks
+ if ($_template->smarty->debugging) {
+ $_template->smarty->_debug->start_cache($_template);
+ }
+ if ($this->handler->process($_template, $this) === false) {
+ $this->valid = false;
+ } else {
+ $this->processed = true;
+ }
+ if ($_template->smarty->debugging) {
+ $_template->smarty->_debug->end_cache($_template);
+ }
+ } else {
+ $this->is_locked = true;
+ continue;
+ }
+ } else {
+ return $this->valid;
+ }
+ if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_SAVED
+ && $_template->cached->cache_lifetime >= 0
+ && (time() > ($_template->cached->timestamp + $_template->cached->cache_lifetime))
+ ) {
+ $this->valid = false;
+ }
+ if ($_template->smarty->cache_locking) {
+ if (!$this->valid) {
+ $this->handler->acquireLock($_template->smarty, $this);
+ } elseif ($this->is_locked) {
+ $this->handler->releaseLock($_template->smarty, $this);
+ }
+ }
+ return $this->valid;
+ }
+ return $this->valid;
+ }
+
+ /**
+ * Process cached template
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param bool $update flag if called because cache update
+ */
+ public function process(Smarty_Internal_Template $_template, $update = false)
+ {
+ if ($this->handler->process($_template, $this, $update) === false) {
+ $this->valid = false;
+ }
+ if ($this->valid) {
+ $this->processed = true;
+ } else {
+ $this->processed = false;
+ }
+ }
+
+ /**
+ * Read cache content from handler
+ *
+ * @param Smarty_Internal_Template $_template template object
+ *
+ * @return string|false content
+ */
+ public function read(Smarty_Internal_Template $_template)
+ {
+ if (!$_template->source->handler->recompiled) {
+ return $this->handler->readCachedContent($_template);
+ }
+ return false;
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_template_compiled.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_compiled.php
new file mode 100644
index 000000000..37d8f0a9e
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_compiled.php
@@ -0,0 +1,257 @@
+source->handler->hasCompiledHandler) {
+ $_template->source->handler->populateCompiledFilepath($compiled, $_template);
+ } else {
+ $compiled->populateCompiledFilepath($_template);
+ }
+ return $compiled;
+ }
+
+ /**
+ * populate Compiled Object with compiled filepath
+ *
+ * @param Smarty_Internal_Template $_template template object
+ **/
+ public function populateCompiledFilepath(Smarty_Internal_Template $_template)
+ {
+ $source = &$_template->source;
+ $smarty = &$_template->smarty;
+ $this->filepath = $smarty->getCompileDir();
+ if (isset($_template->compile_id)) {
+ $this->filepath .= preg_replace('![^\w]+!', '_', $_template->compile_id) .
+ ($smarty->use_sub_dirs ? DIRECTORY_SEPARATOR : '^');
+ }
+ // if use_sub_dirs, break file into directories
+ if ($smarty->use_sub_dirs) {
+ $this->filepath .= $source->uid[ 0 ] . $source->uid[ 1 ] . DIRECTORY_SEPARATOR . $source->uid[ 2 ] .
+ $source->uid[ 3 ] . DIRECTORY_SEPARATOR . $source->uid[ 4 ] . $source->uid[ 5 ] .
+ DIRECTORY_SEPARATOR;
+ }
+ $this->filepath .= $source->uid . '_';
+ if ($source->isConfig) {
+ $this->filepath .= (int)$smarty->config_read_hidden + (int)$smarty->config_booleanize * 2 +
+ (int)$smarty->config_overwrite * 4;
+ } else {
+ $this->filepath .= (int)$smarty->merge_compiled_includes + (int)$smarty->escape_html * 2 +
+ (($smarty->merge_compiled_includes && $source->type === 'extends') ?
+ (int)$smarty->extends_recursion * 4 : 0);
+ }
+ $this->filepath .= '.' . $source->type;
+ $basename = $source->handler->getBasename($source);
+ if (!empty($basename)) {
+ $this->filepath .= '.' . $basename;
+ }
+ if ($_template->caching) {
+ $this->filepath .= '.cache';
+ }
+ $this->filepath .= '.php';
+ $this->timestamp = $this->exists = is_file($this->filepath);
+ if ($this->exists) {
+ $this->timestamp = filemtime($this->filepath);
+ }
+ }
+
+ /**
+ * render compiled template code
+ *
+ * @param Smarty_Internal_Template $_template
+ *
+ * @return string
+ * @throws Exception
+ */
+ public function render(Smarty_Internal_Template $_template)
+ {
+ // checks if template exists
+ if (!$_template->source->exists) {
+ $type = $_template->source->isConfig ? 'config' : 'template';
+ throw new SmartyException("Unable to load {$type} '{$_template->source->type}:{$_template->source->name}'");
+ }
+ if ($_template->smarty->debugging) {
+ if (!isset($_template->smarty->_debug)) {
+ $_template->smarty->_debug = new Smarty_Internal_Debug();
+ }
+ $_template->smarty->_debug->start_render($_template);
+ }
+ if (!$this->processed) {
+ $this->process($_template);
+ }
+ if (isset($_template->cached)) {
+ $_template->cached->file_dependency =
+ array_merge($_template->cached->file_dependency, $this->file_dependency);
+ }
+ if ($_template->source->handler->uncompiled) {
+ $_template->source->handler->renderUncompiled($_template->source, $_template);
+ } else {
+ $this->getRenderedTemplateCode($_template);
+ }
+ if ($_template->caching && $this->has_nocache_code) {
+ $_template->cached->hashes[ $this->nocache_hash ] = true;
+ }
+ if ($_template->smarty->debugging) {
+ $_template->smarty->_debug->end_render($_template);
+ }
+ }
+
+ /**
+ * load compiled template or compile from source
+ *
+ * @param Smarty_Internal_Template $_smarty_tpl do not change variable name, is used by compiled template
+ *
+ * @throws Exception
+ */
+ public function process(Smarty_Internal_Template $_smarty_tpl)
+ {
+ $source = &$_smarty_tpl->source;
+ $smarty = &$_smarty_tpl->smarty;
+ if ($source->handler->recompiled) {
+ $source->handler->process($_smarty_tpl);
+ } elseif (!$source->handler->uncompiled) {
+ if (!$this->exists || $smarty->force_compile
+ || ($_smarty_tpl->compile_check && $source->getTimeStamp() > $this->getTimeStamp())
+ ) {
+ $this->compileTemplateSource($_smarty_tpl);
+ $compileCheck = $_smarty_tpl->compile_check;
+ $_smarty_tpl->compile_check = Smarty::COMPILECHECK_OFF;
+ $this->loadCompiledTemplate($_smarty_tpl);
+ $_smarty_tpl->compile_check = $compileCheck;
+ } else {
+ $_smarty_tpl->mustCompile = true;
+ @include $this->filepath;
+ if ($_smarty_tpl->mustCompile) {
+ $this->compileTemplateSource($_smarty_tpl);
+ $compileCheck = $_smarty_tpl->compile_check;
+ $_smarty_tpl->compile_check = Smarty::COMPILECHECK_OFF;
+ $this->loadCompiledTemplate($_smarty_tpl);
+ $_smarty_tpl->compile_check = $compileCheck;
+ }
+ }
+ $_smarty_tpl->_subTemplateRegister();
+ $this->processed = true;
+ }
+ }
+
+ /**
+ * compile template from source
+ *
+ * @param Smarty_Internal_Template $_template
+ *
+ * @throws Exception
+ */
+ public function compileTemplateSource(Smarty_Internal_Template $_template)
+ {
+ $this->file_dependency = array();
+ $this->includes = array();
+ $this->nocache_hash = null;
+ $this->unifunc = null;
+ // compile locking
+ if ($saved_timestamp = (!$_template->source->handler->recompiled && is_file($this->filepath))) {
+ $saved_timestamp = $this->getTimeStamp();
+ touch($this->filepath);
+ }
+ // compile locking
+ try {
+ // call compiler
+ $_template->loadCompiler();
+ $this->write($_template, $_template->compiler->compileTemplate($_template));
+ } catch (Exception $e) {
+ // restore old timestamp in case of error
+ if ($saved_timestamp && is_file($this->filepath)) {
+ touch($this->filepath, $saved_timestamp);
+ }
+ unset($_template->compiler);
+ throw $e;
+ }
+ // release compiler object to free memory
+ unset($_template->compiler);
+ }
+
+ /**
+ * Write compiled code by handler
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $code compiled code
+ *
+ * @return bool success
+ * @throws \SmartyException
+ */
+ public function write(Smarty_Internal_Template $_template, $code)
+ {
+ if (!$_template->source->handler->recompiled) {
+ if ($_template->smarty->ext->_writeFile->writeFile($this->filepath, $code, $_template->smarty) === true) {
+ $this->timestamp = $this->exists = is_file($this->filepath);
+ if ($this->exists) {
+ $this->timestamp = filemtime($this->filepath);
+ return true;
+ }
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Read compiled content from handler
+ *
+ * @param Smarty_Internal_Template $_template template object
+ *
+ * @return string content
+ */
+ public function read(Smarty_Internal_Template $_template)
+ {
+ if (!$_template->source->handler->recompiled) {
+ return file_get_contents($this->filepath);
+ }
+ return isset($this->content) ? $this->content : false;
+ }
+
+ /**
+ * Load fresh compiled template by including the PHP file
+ * HHVM requires a work around because of a PHP incompatibility
+ *
+ * @param \Smarty_Internal_Template $_smarty_tpl do not change variable name, is used by compiled template
+ */
+ private function loadCompiledTemplate(Smarty_Internal_Template $_smarty_tpl)
+ {
+ if (function_exists('opcache_invalidate')
+ && (!function_exists('ini_get') || strlen(ini_get("opcache.restrict_api")) < 1)
+ ) {
+ opcache_invalidate($this->filepath, true);
+ } elseif (function_exists('apc_compile_file')) {
+ apc_compile_file($this->filepath);
+ }
+ if (defined('HHVM_VERSION')) {
+ eval('?>' . file_get_contents($this->filepath));
+ } else {
+ include $this->filepath;
+ }
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_template_config.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_config.php
new file mode 100644
index 000000000..850ae32e7
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_config.php
@@ -0,0 +1,100 @@
+ true, 'php' => true);
+ if ($_template) {
+ $smarty = $_template->smarty;
+ $template_resource = $_template->template_resource;
+ }
+ if (empty($template_resource)) {
+ throw new SmartyException('Source: Missing name');
+ }
+ // parse resource_name, load resource handler
+ list($name, $type) = Smarty_Resource::parseResourceName($template_resource, $smarty->default_config_type);
+ // make sure configs are not loaded via anything smarty can't handle
+ if (isset($_incompatible_resources[ $type ])) {
+ throw new SmartyException("Unable to use resource '{$type}' for config");
+ }
+ $source = new Smarty_Template_Config($smarty, $template_resource, $type, $name);
+ $source->handler->populate($source, $_template);
+ if (!$source->exists && isset($smarty->default_config_handler_func)) {
+ Smarty_Internal_Method_RegisterDefaultTemplateHandler::_getDefaultTemplate($source);
+ $source->handler->populate($source, $_template);
+ }
+ return $source;
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_template_resource_base.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_resource_base.php
new file mode 100644
index 000000000..52bfba252
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_resource_base.php
@@ -0,0 +1,152 @@
+smarty;
+ $_template->isRenderingCache = $this->isCache;
+ $level = ob_get_level();
+ try {
+ if (!isset($unifunc)) {
+ $unifunc = $this->unifunc;
+ }
+ if (empty($unifunc) || !function_exists($unifunc)) {
+ throw new SmartyException("Invalid compiled template for '{$_template->template_resource}'");
+ }
+ if ($_template->startRenderCallbacks) {
+ foreach ($_template->startRenderCallbacks as $callback) {
+ call_user_func($callback, $_template);
+ }
+ }
+ $unifunc($_template);
+ foreach ($_template->endRenderCallbacks as $callback) {
+ call_user_func($callback, $_template);
+ }
+ $_template->isRenderingCache = false;
+ } catch (Exception $e) {
+ $_template->isRenderingCache = false;
+ while (ob_get_level() > $level) {
+ ob_end_clean();
+ }
+ if (isset($smarty->security_policy)) {
+ $smarty->security_policy->endTemplate();
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Get compiled time stamp
+ *
+ * @return int
+ */
+ public function getTimeStamp()
+ {
+ if ($this->exists && !$this->timestamp) {
+ $this->timestamp = filemtime($this->filepath);
+ }
+ return $this->timestamp;
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_template_source.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_source.php
new file mode 100644
index 000000000..16b47f23c
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_template_source.php
@@ -0,0 +1,213 @@
+handler =
+ isset($smarty->_cache[ 'resource_handlers' ][ $type ]) ? $smarty->_cache[ 'resource_handlers' ][ $type ] :
+ Smarty_Resource::load($smarty, $type);
+ $this->smarty = $smarty;
+ $this->resource = $resource;
+ $this->type = $type;
+ $this->name = $name;
+ }
+
+ /**
+ * initialize Source Object for given resource
+ * Either [$_template] or [$smarty, $template_resource] must be specified
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty $smarty smarty object
+ * @param string $template_resource resource identifier
+ *
+ * @return Smarty_Template_Source Source Object
+ * @throws SmartyException
+ */
+ public static function load(
+ Smarty_Internal_Template $_template = null,
+ Smarty $smarty = null,
+ $template_resource = null
+ ) {
+ if ($_template) {
+ $smarty = $_template->smarty;
+ $template_resource = $_template->template_resource;
+ }
+ if (empty($template_resource)) {
+ throw new SmartyException('Source: Missing name');
+ }
+ // parse resource_name, load resource handler, identify unique resource name
+ if (preg_match('/^([A-Za-z0-9_\-]{2,})[:]([\s\S]*)$/', $template_resource, $match)) {
+ $type = $match[ 1 ];
+ $name = $match[ 2 ];
+ } else {
+ // no resource given, use default
+ // or single character before the colon is not a resource type, but part of the filepath
+ $type = $smarty->default_resource_type;
+ $name = $template_resource;
+ }
+ // create new source object
+ $source = new Smarty_Template_Source($smarty, $template_resource, $type, $name);
+ $source->handler->populate($source, $_template);
+ if (!$source->exists && isset($_template->smarty->default_template_handler_func)) {
+ Smarty_Internal_Method_RegisterDefaultTemplateHandler::_getDefaultTemplate($source);
+ $source->handler->populate($source, $_template);
+ }
+ return $source;
+ }
+
+ /**
+ * Get source time stamp
+ *
+ * @return int
+ */
+ public function getTimeStamp()
+ {
+ if (!isset($this->timestamp)) {
+ $this->handler->populateTimestamp($this);
+ }
+ return $this->timestamp;
+ }
+
+ /**
+ * Get source content
+ *
+ * @return string
+ * @throws \SmartyException
+ */
+ public function getContent()
+ {
+ return isset($this->content) ? $this->content : $this->handler->getContent($this);
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smarty_undefined_variable.php b/web/private_php/ams/smarty/libs/sysplugins/smarty_undefined_variable.php
new file mode 100644
index 000000000..6d31a8a05
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smarty_undefined_variable.php
@@ -0,0 +1,33 @@
+value = $value;
+ $this->nocache = $nocache;
+ }
+
+ /**
+ * <> String conversion
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return (string)$this->value;
+ }
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smartycompilerexception.php b/web/private_php/ams/smarty/libs/sysplugins/smartycompilerexception.php
new file mode 100644
index 000000000..f7ad39b93
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smartycompilerexception.php
@@ -0,0 +1,45 @@
+ Smarty Compiler: ' . $this->message . ' <-- ';
+ }
+
+ /**
+ * The line number of the template error
+ *
+ * @type int|null
+ */
+ public $line = null;
+
+ /**
+ * The template source snippet relating to the error
+ *
+ * @type string|null
+ */
+ public $source = null;
+
+ /**
+ * The raw text of the error message
+ *
+ * @type string|null
+ */
+ public $desc = null;
+
+ /**
+ * The resource identifier or template name
+ *
+ * @type string|null
+ */
+ public $template = null;
+}
diff --git a/web/private_php/ams/smarty/libs/sysplugins/smartyexception.php b/web/private_php/ams/smarty/libs/sysplugins/smartyexception.php
new file mode 100644
index 000000000..7f7b9aa43
--- /dev/null
+++ b/web/private_php/ams/smarty/libs/sysplugins/smartyexception.php
@@ -0,0 +1,19 @@
+ Smarty: ' . (self::$escape ? htmlentities($this->message) : $this->message) . ' <-- ';
+ }
+}