<?php
/**
 * Brainy Internal Plugin Templateparser
 *
 * This is the template parser.
 * It is generated from the Parser.y file
 * @package Brainy
 * @subpackage Compiler
 * @author Uwe Tews
 * @author Matt Basta
 */

namespace Box\Brainy\Compiler;


class TP_yyStackEntry
{
    public $stateno;       /* The state-number */
    public $major;         /* The major token value.  This is the code
                     ** number for the token at this stack level */
    public $minor; /* The user-supplied minor token value.  This
                     ** is the value of the token  */
};


#line 17 "Parser.y"
class Parser#line 16 "Parser.php"
{
#line 19 "Parser.y"

    public $retvalue = 0;
    private $internalError = false;

    private $lex;
    private $compiler;
    private $smarty;
    private $template;
    private $security;
    public $current_buffer;

    private $safe_lookups = 0;
    private $strict_mode = false;
    private $strip = 0;

    public function __construct($lex, $compiler) {
        $this->lex = $lex;
        $this->compiler = $compiler;
        $this->smarty = $this->compiler->smarty;
        $this->template = $this->compiler->template;
        $this->security = isset($this->smarty->security_policy);
        $this->current_buffer = $this->root_buffer = new Helpers\TemplateBuffer();

        $this->safe_lookups = $this->smarty->safe_lookups;
    }

    /**
     * Strips whitespace from a string
     * @param string $string
     * @return string
     */
    protected static function stripString($string) {
        // Replaces whitespace followed by a `<` with null.
        // `     \n     </foo>` -> `</foo>`
        $string = preg_replace('/\s+(?=<\/)/ims', '', $string);
        // `     \n     <foo>` -> ` <foo>`
        // `     \n     &nbsp;` -> ` &nbsp;`
        $string = preg_replace('/\s+(?=[<&])/ims', ' ', $string);
        // Replaces `>` followed by whitespace with `>`
        // `<div>\n  foo` -> `<div>foo`
        $string = preg_replace('/>\s+(?=\S)/ims', '>', $string);
        // Replaces whitespace followed by anything else with a space.
        // `            data-hello="` -> ` data-hello="`
        $string = preg_replace('/\s+(?=\w)/ims', ' ', $string);

        // Is there work to be done at the end of the string?
        if ($string !== rtrim($string)) {
            $string = rtrim($string);
            // If the last non-whitespace character is not a `>`, add a space.
            if (substr($string, -1) !== '>') {
                $string .= ' ';
            }
        }
        return $string;
    }

    /**
     * @return bool
     */
    public function isStrictMode() {
        return $this->strict_mode;
    }

    /**
     * @param string $variable The name of the variable to look up
     * @return string|Wrappers\SafeLookupWrapper
     */
    public function compileVariable($variable)
    {
        switch ($this->safe_lookups) {
            case \Box\Brainy\Brainy::LOOKUP_UNSAFE:
                return '$_smarty_tpl->tpl_vars[' . $variable . ']';
            case \Box\Brainy\Brainy::LOOKUP_SAFE:
                return new Wrappers\SubscriptableSafeLookupWrapper('$_smarty_tpl->tpl_vars', '$_smarty_tpl->tpl_vars', $variable);
            case \Box\Brainy\Brainy::LOOKUP_SAFE_WARN:
                return new Wrappers\SubscriptableWarnSafeLookupWrapper('$_smarty_tpl->tpl_vars', '$_smarty_tpl->tpl_vars', $variable);
        }
    }

    /**
     * @param string $base
     * @param string $variable
     * @return string|Wrappers\SafeLookupWrapper
     */
    public function compileSafeLookupWithBase($base, $variable)
    {
        $unsafeBase = $base instanceof Wrappers\SafeLookupWrapper ? $base->getUnsafeRecursive() : $base;
        switch ($this->safe_lookups) {
            case \Box\Brainy\Brainy::LOOKUP_UNSAFE:
                return $base . '[' . $variable . ']';
            case \Box\Brainy\Brainy::LOOKUP_SAFE:
                return new Wrappers\ArraySafeLookupWrapper($unsafeBase, $base, $variable);
            case \Box\Brainy\Brainy::LOOKUP_SAFE_WARN:
                return new Wrappers\ArrayWarnSafeLookupWrapper($unsafeBase, $base, $variable);
        }
    }
#line 116 "Parser.php"

    const TP_VERT                           =  1;
    const TP_COLON                          =  2;
    const TP_SETSTRICT                      =  3;
    const TP_LDELEXTENDS                    =  4;
    const TP_RDEL                           =  5;
    const TP_COMMENT                        =  6;
    const TP_STRIPON                        =  7;
    const TP_STRIPOFF                       =  8;
    const TP_TEXT                           =  9;
    const TP_LDELBLOCK                      = 10;
    const TP_CLOSEBLOCK                     = 11;
    const TP_LITERALSTART                   = 12;
    const TP_LITERALEND                     = 13;
    const TP_LITERAL                        = 14;
    const TP_LDEL                           = 15;
    const TP_EQUAL                          = 16;
    const TP_DOLLAR                         = 17;
    const TP_ID                             = 18;
    const TP_LDELIF                         = 19;
    const TP_LDELFOR                        = 20;
    const TP_SEMICOLON                      = 21;
    const TP_INCDEC                         = 22;
    const TP_TO                             = 23;
    const TP_STEP                           = 24;
    const TP_LDELFOREACH                    = 25;
    const TP_SPACE                          = 26;
    const TP_AS                             = 27;
    const TP_APTR                           = 28;
    const TP_LDELSLASH                      = 29;
    const TP_INTEGER                        = 30;
    const TP_COMMA                          = 31;
    const TP_OPENP                          = 32;
    const TP_CLOSEP                         = 33;
    const TP_MATH                           = 34;
    const TP_UNIMATH                        = 35;
    const TP_ANDSYM                         = 36;
    const TP_ISIN                           = 37;
    const TP_ISDIVBY                        = 38;
    const TP_ISEVEN                         = 39;
    const TP_ISODD                          = 40;
    const TP_QMARK                          = 41;
    const TP_NOT                            = 42;
    const TP_TYPECAST                       = 43;
    const TP_DOT                            = 44;
    const TP_SINGLEQUOTESTRING              = 45;
    const TP_OPENB                          = 46;
    const TP_CLOSEB                         = 47;
    const TP_PTR                            = 48;
    const TP_AT                             = 49;
    const TP_EQUALS                         = 50;
    const TP_NOTEQUALS                      = 51;
    const TP_GREATERTHAN                    = 52;
    const TP_LESSTHAN                       = 53;
    const TP_GREATEREQUAL                   = 54;
    const TP_LESSEQUAL                      = 55;
    const TP_IDENTITY                       = 56;
    const TP_NONEIDENTITY                   = 57;
    const TP_MOD                            = 58;
    const TP_LAND                           = 59;
    const TP_LOR                            = 60;
    const TP_LXOR                           = 61;
    const TP_QUOTE                          = 62;
    const TP_DOLLARID                       = 63;
    const YY_NO_ACTION = 385;
    const YY_ACCEPT_ACTION = 384;
    const YY_ERROR_ACTION = 383;

    const YY_SZ_ACTTAB = 1153;
static public $yy_action = array(
 /*     0 */   119,   87,  105,  210,  213,  214,  212,   82,  240,  116,
 /*    10 */    88,  194,   24,  102,   12,   14,   27,   80,  227,  231,
 /*    20 */     7,  115,   84,   32,  206,    8,  150,  153,  209,    6,
 /*    30 */   154,  142,  211,   67,   68,   72,   40,   15,  175,  176,
 /*    40 */   119,   36,    8,  152,  209,    6,  224,  142,  211,  179,
 /*    50 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*    60 */   190,  233,  153,  209,    6,    8,  142,  211,  228,  229,
 /*    70 */   230,  232,   86,   67,   68,   72,   40,   15,  175,  176,
 /*    80 */   119,  117,   33,   22,  200,  140,  116,  215,  218,  179,
 /*    90 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   100 */   190,   29,   37,  235,  152,  209,    6,  219,  142,  211,
 /*   110 */   384,    1,    9,   67,   68,   72,   40,   15,  175,  176,
 /*   120 */   119,  125,  225,  209,    6,  147,  142,  211,    3,  179,
 /*   130 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   140 */   190,   74,  173,  237,  231,    7,  156,  155,   77,  126,
 /*   150 */    77,  128,  198,   67,   68,   72,   40,   15,  175,  176,
 /*   160 */   119,  164,  167,  164,  167,  295,  158,  159,    8,  179,
 /*   170 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   180 */   190,  217,    8,  216,  149,  236,    8,   19,   77,  129,
 /*   190 */    96,  160,    3,   67,   68,   72,   40,   15,  175,  176,
 /*   200 */   119,  164,  167,  112,  192,   97,    8,  168,   89,  179,
 /*   210 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   220 */   190,  108,  111,  113,  100,  206,  101,   83,   77,  130,
 /*   230 */   206,   94,  178,   67,   68,   72,   40,   15,  175,  176,
 /*   240 */   119,  164,  167,  206,  206,  206,  206,  238,  206,  179,
 /*   250 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   260 */   190,   10,   10,  138,  161,  143,  145,   21,    8,   90,
 /*   270 */   201,    4,  139,   67,   68,   72,   40,   15,  175,  176,
 /*   280 */   119,   18,  202,  221,   20,  282,  199,  195,  146,  179,
 /*   290 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   300 */   190,   20,  157,  205,   81,  119,   85,  114,   77,  131,
 /*   310 */    39,  165,  220,   67,   68,   72,   40,   15,  175,  176,
 /*   320 */   119,  164,  167,   28,  203,  144,  103,   78,  104,  179,
 /*   330 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   340 */   190,  106,  133,  157,  163,    3,  177,   17,   77,  135,
 /*   350 */   141,   95,  208,   67,   68,   72,   40,   15,  175,  176,
 /*   360 */   119,  164,  167,    5,   26,   31,   93,   30,  222,  179,
 /*   370 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   380 */   190,   98,   99,  256,  223,  256,  256,  256,  256,  256,
 /*   390 */   256,  256,  256,   67,   68,   72,   40,   15,  175,  176,
 /*   400 */   256,  119,  256,  256,  256,  256,  204,  256,  256,  179,
 /*   410 */   180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
 /*   420 */   190,  107,  256,  256,  256,  256,  256,  256,  256,  256,
 /*   430 */   256,  256,  256,  256,   67,   68,   72,   40,   15,  175,
 /*   440 */   176,  119,  256,  256,  256,  256,  256,  256,  256,  256,
 /*   450 */   179,  180,  181,  182,  183,  184,  185,  186,  187,  188,
 /*   460 */   189,  190,  193,  256,  256,  256,  256,  148,   13,  119,
 /*   470 */   256,  256,  256,  256,   67,   68,   72,   40,   15,  175,
 /*   480 */   176,  256,  256,  256,  256,   23,  256,  256,  256,  256,
 /*   490 */   179,  180,  181,  182,  183,  184,  185,  186,  187,  188,
 /*   500 */   189,  190,   67,   68,   72,   40,   15,  175,  176,   25,
 /*   510 */   256,  256,  256,  133,  256,  171,  174,  256,  179,  180,
 /*   520 */   181,  182,  183,  184,  185,  186,  187,  188,  189,  190,
 /*   530 */    67,   68,   72,   40,   15,  175,  176,  117,  256,   22,
 /*   540 */   256,  140,  256,  256,  256,  256,  179,  180,  181,  182,
 /*   550 */   183,  184,  185,  186,  187,  188,  189,  190,  210,  213,
 /*   560 */   214,  212,   82,  207,  116,   77,  136,   24,  256,  109,
 /*   570 */   256,   27,   80,  256,  169,  256,  256,   84,  164,  167,
 /*   580 */   256,  150,  256,  256,  210,  213,  214,  212,   82,  234,
 /*   590 */   116,  206,  256,   24,  102,   12,   14,   27,   80,  256,
 /*   600 */   256,  256,  115,   84,  256,  256,  256,  150,   77,  137,
 /*   610 */   210,  213,  214,  212,   82,  256,  116,  170,  256,   24,
 /*   620 */   256,  164,  167,   27,   80,   91,  134,  256,  256,   84,
 /*   630 */   256,   91,  118,  150,  256,  256,  256,  256,  132,  256,
 /*   640 */    16,  256,  256,   69,  123,  256,   16,  256,  256,   69,
 /*   650 */    70,   71,  256,  166,    2,  256,   70,   71,  256,  166,
 /*   660 */     2,  256,   92,   79,  256,  256,  256,  256,   91,  134,
 /*   670 */    75,  256,  256,  256,  256,  132,   75,   16,  256,  256,
 /*   680 */    69,  132,  256,   11,  256,  256,   69,   70,   71,  256,
 /*   690 */   166,    2,  256,   70,   71,  256,  166,    2,  193,  151,
 /*   700 */    38,  226,   73,  256,   13,  256,  256,   75,  256,  256,
 /*   710 */   239,  209,    6,   75,  142,  211,   43,   77,  127,   91,
 /*   720 */   134,  256,  256,  256,  256,  162,  191,  256,  256,  256,
 /*   730 */   164,  167,  132,  256,   11,  256,  256,   69,  120,  197,
 /*   740 */    52,   77,  127,  256,   70,   71,  256,  166,  256,  162,
 /*   750 */   191,  172,  174,  256,  164,  167,  256,  256,  121,  256,
 /*   760 */   256,  256,  256,  256,   75,  256,  256,   43,   77,  127,
 /*   770 */    52,   77,  127,  256,  256,  256,  162,  191,  256,  162,
 /*   780 */   191,  164,  167,  256,  164,  167,  256,  256,  122,  256,
 /*   790 */   196,  256,  256,  256,   59,   77,  127,   51,   77,  127,
 /*   800 */   256,  256,  256,  162,  191,  256,  162,  191,  164,  167,
 /*   810 */   256,  164,  167,   41,   77,  127,  256,  256,  256,  256,
 /*   820 */   256,  256,  162,  191,   42,   77,  127,  164,  167,  256,
 /*   830 */   256,  256,  256,  162,  191,  256,  256,  256,  164,  167,
 /*   840 */   256,   53,   77,  127,  256,  256,  256,  256,  256,  256,
 /*   850 */   162,  191,  256,  256,  256,  164,  167,   44,   77,  127,
 /*   860 */   256,  256,  256,  256,  256,  256,  162,  191,   54,   77,
 /*   870 */   127,  164,  167,  256,  256,  256,  256,  162,  191,  256,
 /*   880 */   256,  256,  164,  167,   55,   77,  127,  256,  256,  256,
 /*   890 */   256,  256,  256,  162,  191,   45,   77,  127,  164,  167,
 /*   900 */   256,  256,  256,  256,  162,  191,  256,  256,  256,  164,
 /*   910 */   167,   46,   77,  127,   66,   77,  127,  256,  256,  256,
 /*   920 */   162,  191,  256,  162,  191,  164,  167,  256,  164,  167,
 /*   930 */    56,   77,  127,  256,  256,  256,  256,  256,  256,  162,
 /*   940 */   191,  256,  256,  256,  164,  167,   57,   77,  127,  256,
 /*   950 */   256,  256,  256,  256,  256,  162,  191,   47,   77,  127,
 /*   960 */   164,  167,  256,  256,  256,  256,  162,  191,  256,  256,
 /*   970 */   256,  164,  167,   48,   77,  127,  256,  256,  256,  256,
 /*   980 */   256,  256,  162,  191,   58,   77,  127,  164,  167,  256,
 /*   990 */   256,  256,  256,  162,  191,  256,  256,  256,  164,  167,
 /*  1000 */    60,   76,  127,   61,   77,  127,  256,  256,  256,  162,
 /*  1010 */   191,  256,  162,  191,  164,  167,  256,  164,  167,   62,
 /*  1020 */    77,  124,  256,  256,  256,  256,  256,  256,  162,  191,
 /*  1030 */   256,  256,  256,  164,  167,   63,   77,  127,  256,  256,
 /*  1040 */   256,  256,  256,  256,  162,  191,   49,   77,  127,  164,
 /*  1050 */   167,  256,  256,  256,  256,  162,  191,  256,  256,  256,
 /*  1060 */   164,  167,   64,   77,  127,  256,  256,  256,  256,  256,
 /*  1070 */   256,  162,  191,   65,   77,  127,  164,  167,  256,  256,
 /*  1080 */   256,  256,  162,  191,  256,  256,  256,  164,  167,   34,
 /*  1090 */    77,  127,   35,   77,  127,  256,  256,  256,  162,  191,
 /*  1100 */   256,  162,  191,  164,  167,  256,  164,  167,   50,   77,
 /*  1110 */   127,  256,  256,  256,  256,  256,  256,  162,  191,  110,
 /*  1120 */   256,  256,  164,  167,  256,  256,  256,  256,  256,  256,
 /*  1130 */   256,  256,  256,  256,  256,  256,  256,  256,  256,  256,
 /*  1140 */   256,  206,  256,  256,  102,   12,   14,  256,  256,  256,
 /*  1150 */   256,  256,  115,
    );
    static public $yy_lookahead = array(
 /*     0 */     1,    4,   72,    6,    7,    8,    9,   10,    3,   12,
 /*    10 */   110,  111,   15,   97,   98,   99,   19,   20,   73,   74,
 /*    20 */    75,  105,   25,   24,   94,   26,   29,   78,   79,   80,
 /*    30 */    81,   82,   83,   34,   35,   36,   37,   38,   39,   40,
 /*    40 */     1,   76,   26,   78,   79,   80,   81,   82,   83,   50,
 /*    50 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*    60 */    61,   77,   78,   79,   80,   26,   82,   83,    6,    7,
 /*    70 */     8,    9,   10,   34,   35,   36,   37,   38,   39,   40,
 /*    80 */     1,   44,   26,   46,    5,   48,   12,   13,   14,   50,
 /*    90 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   100 */    61,   16,   76,   77,   78,   79,   80,   22,   82,   83,
 /*   110 */    65,   66,   16,   34,   35,   36,   37,   38,   39,   40,
 /*   120 */     1,   89,   78,   79,   80,   93,   82,   83,   32,   50,
 /*   130 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   140 */    61,   71,  111,   73,   74,   75,   94,    5,   87,   88,
 /*   150 */    87,   88,   33,   34,   35,   36,   37,   38,   39,   40,
 /*   160 */     1,  100,  101,  100,  101,    5,  102,  103,   26,   50,
 /*   170 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   180 */    61,   83,   26,   85,   28,    5,   26,   28,   87,   88,
 /*   190 */    17,   91,   32,   34,   35,   36,   37,   38,   39,   40,
 /*   200 */     1,  100,  101,   72,    5,   32,   26,   91,   72,   50,
 /*   210 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   220 */    61,   72,   72,   72,   72,   94,   72,   92,   87,   88,
 /*   230 */    94,   91,   18,   34,   35,   36,   37,   38,   39,   40,
 /*   240 */     1,  100,  101,   94,   94,   94,   94,    5,   94,   50,
 /*   250 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   260 */    61,   15,   15,   49,   18,   18,   91,   15,   26,   17,
 /*   270 */    18,   31,   33,   34,   35,   36,   37,   38,   39,   40,
 /*   280 */     1,    2,   30,   93,   31,    5,   33,   47,   93,   50,
 /*   290 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   300 */    61,   31,   22,   33,   91,    1,   91,  105,   87,   88,
 /*   310 */     2,  107,   26,   34,   35,   36,   37,   38,   39,   40,
 /*   320 */     1,  100,  101,   90,    5,   90,  106,   84,  106,   50,
 /*   330 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   340 */    61,   21,   44,   22,   30,   32,   18,   41,   87,   88,
 /*   350 */    18,   31,    5,   34,   35,   36,   37,   38,   39,   40,
 /*   360 */     1,  100,  101,   32,   16,   23,   17,   16,   33,   50,
 /*   370 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   380 */    61,   17,   17,  112,   18,  112,  112,  112,  112,  112,
 /*   390 */   112,  112,  112,   34,   35,   36,   37,   38,   39,   40,
 /*   400 */   112,    1,  112,  112,  112,  112,   47,  112,  112,   50,
 /*   410 */    51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
 /*   420 */    61,   21,  112,  112,  112,  112,  112,  112,  112,  112,
 /*   430 */   112,  112,  112,  112,   34,   35,   36,   37,   38,   39,
 /*   440 */    40,    1,  112,  112,  112,  112,  112,  112,  112,  112,
 /*   450 */    50,   51,   52,   53,   54,   55,   56,   57,   58,   59,
 /*   460 */    60,   61,    9,  112,  112,  112,  112,   27,   15,    1,
 /*   470 */   112,  112,  112,  112,   34,   35,   36,   37,   38,   39,
 /*   480 */    40,  112,  112,  112,  112,   16,  112,  112,  112,  112,
 /*   490 */    50,   51,   52,   53,   54,   55,   56,   57,   58,   59,
 /*   500 */    60,   61,   34,   35,   36,   37,   38,   39,   40,   16,
 /*   510 */   112,  112,  112,   44,  112,   62,   63,  112,   50,   51,
 /*   520 */    52,   53,   54,   55,   56,   57,   58,   59,   60,   61,
 /*   530 */    34,   35,   36,   37,   38,   39,   40,   44,  112,   46,
 /*   540 */   112,   48,  112,  112,  112,  112,   50,   51,   52,   53,
 /*   550 */    54,   55,   56,   57,   58,   59,   60,   61,    6,    7,
 /*   560 */     8,    9,   10,   11,   12,   87,   88,   15,  112,   72,
 /*   570 */   112,   19,   20,  112,   96,  112,  112,   25,  100,  101,
 /*   580 */   112,   29,  112,  112,    6,    7,    8,    9,   10,   11,
 /*   590 */    12,   94,  112,   15,   97,   98,   99,   19,   20,  112,
 /*   600 */   112,  112,  105,   25,  112,  112,  112,   29,   87,   88,
 /*   610 */     6,    7,    8,    9,   10,  112,   12,   96,  112,   15,
 /*   620 */   112,  100,  101,   19,   20,   17,   18,  112,  112,   25,
 /*   630 */   112,   17,   18,   29,  112,  112,  112,  112,   30,  112,
 /*   640 */    32,  112,  112,   35,   30,  112,   32,  112,  112,   35,
 /*   650 */    42,   43,  112,   45,   46,  112,   42,   43,  112,   45,
 /*   660 */    46,  112,   17,   18,  112,  112,  112,  112,   17,   18,
 /*   670 */    62,  112,  112,  112,  112,   30,   62,   32,  112,  112,
 /*   680 */    35,   30,  112,   32,  112,  112,   35,   42,   43,  112,
 /*   690 */    45,   46,  112,   42,   43,  112,   45,   46,    9,   67,
 /*   700 */    68,   69,   70,  112,   15,  112,  112,   62,  112,  112,
 /*   710 */    78,   79,   80,   62,   82,   83,   86,   87,   88,   17,
 /*   720 */    18,  112,  112,  112,  112,   95,   96,  112,  112,  112,
 /*   730 */   100,  101,   30,  112,   32,  112,  112,   35,  108,  109,
 /*   740 */    86,   87,   88,  112,   42,   43,  112,   45,  112,   95,
 /*   750 */    96,   62,   63,  112,  100,  101,  112,  112,  104,  112,
 /*   760 */   112,  112,  112,  112,   62,  112,  112,   86,   87,   88,
 /*   770 */    86,   87,   88,  112,  112,  112,   95,   96,  112,   95,
 /*   780 */    96,  100,  101,  112,  100,  101,  112,  112,  104,  112,
 /*   790 */   109,  112,  112,  112,   86,   87,   88,   86,   87,   88,
 /*   800 */   112,  112,  112,   95,   96,  112,   95,   96,  100,  101,
 /*   810 */   112,  100,  101,   86,   87,   88,  112,  112,  112,  112,
 /*   820 */   112,  112,   95,   96,   86,   87,   88,  100,  101,  112,
 /*   830 */   112,  112,  112,   95,   96,  112,  112,  112,  100,  101,
 /*   840 */   112,   86,   87,   88,  112,  112,  112,  112,  112,  112,
 /*   850 */    95,   96,  112,  112,  112,  100,  101,   86,   87,   88,
 /*   860 */   112,  112,  112,  112,  112,  112,   95,   96,   86,   87,
 /*   870 */    88,  100,  101,  112,  112,  112,  112,   95,   96,  112,
 /*   880 */   112,  112,  100,  101,   86,   87,   88,  112,  112,  112,
 /*   890 */   112,  112,  112,   95,   96,   86,   87,   88,  100,  101,
 /*   900 */   112,  112,  112,  112,   95,   96,  112,  112,  112,  100,
 /*   910 */   101,   86,   87,   88,   86,   87,   88,  112,  112,  112,
 /*   920 */    95,   96,  112,   95,   96,  100,  101,  112,  100,  101,
 /*   930 */    86,   87,   88,  112,  112,  112,  112,  112,  112,   95,
 /*   940 */    96,  112,  112,  112,  100,  101,   86,   87,   88,  112,
 /*   950 */   112,  112,  112,  112,  112,   95,   96,   86,   87,   88,
 /*   960 */   100,  101,  112,  112,  112,  112,   95,   96,  112,  112,
 /*   970 */   112,  100,  101,   86,   87,   88,  112,  112,  112,  112,
 /*   980 */   112,  112,   95,   96,   86,   87,   88,  100,  101,  112,
 /*   990 */   112,  112,  112,   95,   96,  112,  112,  112,  100,  101,
 /*  1000 */    86,   87,   88,   86,   87,   88,  112,  112,  112,   95,
 /*  1010 */    96,  112,   95,   96,  100,  101,  112,  100,  101,   86,
 /*  1020 */    87,   88,  112,  112,  112,  112,  112,  112,   95,   96,
 /*  1030 */   112,  112,  112,  100,  101,   86,   87,   88,  112,  112,
 /*  1040 */   112,  112,  112,  112,   95,   96,   86,   87,   88,  100,
 /*  1050 */   101,  112,  112,  112,  112,   95,   96,  112,  112,  112,
 /*  1060 */   100,  101,   86,   87,   88,  112,  112,  112,  112,  112,
 /*  1070 */   112,   95,   96,   86,   87,   88,  100,  101,  112,  112,
 /*  1080 */   112,  112,   95,   96,  112,  112,  112,  100,  101,   86,
 /*  1090 */    87,   88,   86,   87,   88,  112,  112,  112,   95,   96,
 /*  1100 */   112,   95,   96,  100,  101,  112,  100,  101,   86,   87,
 /*  1110 */    88,  112,  112,  112,  112,  112,  112,   95,   96,   72,
 /*  1120 */   112,  112,  100,  101,  112,  112,  112,  112,  112,  112,
 /*  1130 */   112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
 /*  1140 */   112,   94,  112,  112,   97,   98,   99,  112,  112,  112,
 /*  1150 */   112,  112,  105,
);
    const YY_SHIFT_USE_DFLT = -4;
    const YY_SHIFT_MAX = 150;
    static public $yy_shift_ofst = array(
 /*     0 */     5,   -3,  608,  608,  608,  608,  552,  578,  614,  608,
 /*    10 */   608,  608,  608,  608,  608,  608,  608,  608,  608,  608,
 /*    20 */   608,  608,  608,  608,  645,  608,  608,  608,  608,  608,
 /*    30 */   608,  608,  608,  614,   -1,   39,  552,  578,  604,  651,
 /*    40 */   651,   79,  119,  159,  199,  239,  279,  319,  359,  400,
 /*    50 */   440,  468,  468,  468,  468,  468,  468,  468,  468,  468,
 /*    60 */   468,  468,  468,  468,  468,  468,  496,  702,  702,  702,
 /*    70 */   702,  702,  702,   62,   62,  453,  493,   37,   74,  160,
 /*    80 */   173,  156,   16,   16,   56,   16,   16,   16,  689,  142,
 /*    90 */   246,  246,  247,  246,   85,  173,  246,  173,  246,  246,
 /*   100 */   180,  242,  304,  308,  308,   16,  286,  286,   16,   16,
 /*   110 */    16,   16,   16,   16,   -4,   -4,   -4,  252,   96,  214,
 /*   120 */   240,  253,  270,  469,  280,  320,  321,  321,  321,  321,
 /*   130 */   321,  321,  298,  314,  313,  321,  321,  321,  328,  306,
 /*   140 */   332,  331,  347,  348,  349,  351,  335,  342,  364,  365,
 /*   150 */   366,
);
    const YY_REDUCE_USE_DFLT = -101;
    const YY_REDUCE_MAX = 116;
    static public $yy_reduce_ofst = array(
 /*     0 */    45,  632,  630,  654,  681,  684,  -35,   26,  708,  711,
 /*    10 */   727,  738,  755,  771,  782,  798,  809,  825,  828,  844,
 /*    20 */   860,  871,  887,  898,  914,  917,  933,  949,  960,  976,
 /*    30 */   987, 1003, 1006, 1022,  497, 1047,  -51,  -16,   44,  478,
 /*    40 */   521,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
 /*    50 */   -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
 /*    60 */   -84,  -84,  -84,  -84,  -84,  -84,  -84,   61,   63,  101,
 /*    70 */   141,  221,  261,   70,  -55, -100,   64,   64,   98,  -70,
 /*    80 */    32,  131,  136,  149,  150,  151,  152,  154,   31,   52,
 /*    90 */   100,  116,  116,  140,  135,  190,  175,  195,  213,  215,
 /*   100 */    52,   52,  202,  204,  204,   52,  233,  235,   52,   52,
 /*   110 */    52,   52,   52,   52,  220,  222,  243,
);
    static public $yyExpectedTokens = array(
        /* 0 */ array(3, ),
        /* 1 */ array(4, 6, 7, 8, 9, 10, 12, 15, 19, 20, 25, 29, ),
        /* 2 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 3 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 4 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 5 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 6 */ array(6, 7, 8, 9, 10, 11, 12, 15, 19, 20, 25, 29, ),
        /* 7 */ array(6, 7, 8, 9, 10, 11, 12, 15, 19, 20, 25, 29, ),
        /* 8 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 9 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 10 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 11 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 12 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 13 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 14 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 15 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 16 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 17 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 18 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 19 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 20 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 21 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 22 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 23 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 24 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 25 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 26 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 27 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 28 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 29 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 30 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 31 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 32 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 33 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 34 */ array(1, 24, 26, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 35 */ array(1, 26, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 36 */ array(6, 7, 8, 9, 10, 11, 12, 15, 19, 20, 25, 29, ),
        /* 37 */ array(6, 7, 8, 9, 10, 11, 12, 15, 19, 20, 25, 29, ),
        /* 38 */ array(6, 7, 8, 9, 10, 12, 15, 19, 20, 25, 29, ),
        /* 39 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 40 */ array(17, 18, 30, 32, 35, 42, 43, 45, 46, 62, ),
        /* 41 */ array(1, 5, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 42 */ array(1, 33, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 43 */ array(1, 28, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 44 */ array(1, 5, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 45 */ array(1, 33, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 46 */ array(1, 2, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 47 */ array(1, 5, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 48 */ array(1, 34, 35, 36, 37, 38, 39, 40, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 49 */ array(1, 21, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 50 */ array(1, 27, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 51 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 52 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 53 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 54 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 55 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 56 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 57 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 58 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 59 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 60 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 61 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 62 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 63 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 64 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 65 */ array(1, 34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 66 */ array(34, 35, 36, 37, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ),
        /* 67 */ array(17, 18, 30, 32, 35, 42, 43, 45, 62, ),
        /* 68 */ array(17, 18, 30, 32, 35, 42, 43, 45, 62, ),
        /* 69 */ array(17, 18, 30, 32, 35, 42, 43, 45, 62, ),
        /* 70 */ array(17, 18, 30, 32, 35, 42, 43, 45, 62, ),
        /* 71 */ array(17, 18, 30, 32, 35, 42, 43, 45, 62, ),
        /* 72 */ array(17, 18, 30, 32, 35, 42, 43, 45, 62, ),
        /* 73 */ array(6, 7, 8, 9, 10, ),
        /* 74 */ array(6, 7, 8, 9, 10, ),
        /* 75 */ array(9, 15, 62, 63, ),
        /* 76 */ array(16, 44, 46, 48, ),
        /* 77 */ array(44, 46, 48, ),
        /* 78 */ array(12, 13, 14, ),
        /* 79 */ array(5, 26, 32, ),
        /* 80 */ array(17, 32, ),
        /* 81 */ array(26, 28, ),
        /* 82 */ array(26, ),
        /* 83 */ array(26, ),
        /* 84 */ array(26, ),
        /* 85 */ array(26, ),
        /* 86 */ array(26, ),
        /* 87 */ array(26, ),
        /* 88 */ array(9, 15, 62, 63, ),
        /* 89 */ array(5, 26, ),
        /* 90 */ array(15, 18, ),
        /* 91 */ array(15, 18, ),
        /* 92 */ array(15, 18, ),
        /* 93 */ array(15, 18, ),
        /* 94 */ array(16, 22, ),
        /* 95 */ array(17, 32, ),
        /* 96 */ array(15, 18, ),
        /* 97 */ array(17, 32, ),
        /* 98 */ array(15, 18, ),
        /* 99 */ array(15, 18, ),
        /* 100 */ array(5, 26, ),
        /* 101 */ array(5, 26, ),
        /* 102 */ array(1, ),
        /* 103 */ array(2, ),
        /* 104 */ array(2, ),
        /* 105 */ array(26, ),
        /* 106 */ array(26, ),
        /* 107 */ array(26, ),
        /* 108 */ array(26, ),
        /* 109 */ array(26, ),
        /* 110 */ array(26, ),
        /* 111 */ array(26, ),
        /* 112 */ array(26, ),
        /* 113 */ array(26, ),
        /* 114 */ array(),
        /* 115 */ array(),
        /* 116 */ array(),
        /* 117 */ array(15, 17, 18, 30, ),
        /* 118 */ array(16, 32, ),
        /* 119 */ array(18, 49, ),
        /* 120 */ array(31, 47, ),
        /* 121 */ array(31, 33, ),
        /* 122 */ array(31, 33, ),
        /* 123 */ array(16, 44, ),
        /* 124 */ array(5, 22, ),
        /* 125 */ array(21, 31, ),
        /* 126 */ array(22, ),
        /* 127 */ array(22, ),
        /* 128 */ array(22, ),
        /* 129 */ array(22, ),
        /* 130 */ array(22, ),
        /* 131 */ array(22, ),
        /* 132 */ array(44, ),
        /* 133 */ array(30, ),
        /* 134 */ array(32, ),
        /* 135 */ array(22, ),
        /* 136 */ array(22, ),
        /* 137 */ array(22, ),
        /* 138 */ array(18, ),
        /* 139 */ array(41, ),
        /* 140 */ array(18, ),
        /* 141 */ array(32, ),
        /* 142 */ array(5, ),
        /* 143 */ array(16, ),
        /* 144 */ array(17, ),
        /* 145 */ array(16, ),
        /* 146 */ array(33, ),
        /* 147 */ array(23, ),
        /* 148 */ array(17, ),
        /* 149 */ array(17, ),
        /* 150 */ array(18, ),
        /* 151 */ array(),
        /* 152 */ array(),
        /* 153 */ array(),
        /* 154 */ array(),
        /* 155 */ array(),
        /* 156 */ array(),
        /* 157 */ array(),
        /* 158 */ array(),
        /* 159 */ array(),
        /* 160 */ array(),
        /* 161 */ array(),
        /* 162 */ array(),
        /* 163 */ array(),
        /* 164 */ array(),
        /* 165 */ array(),
        /* 166 */ array(),
        /* 167 */ array(),
        /* 168 */ array(),
        /* 169 */ array(),
        /* 170 */ array(),
        /* 171 */ array(),
        /* 172 */ array(),
        /* 173 */ array(),
        /* 174 */ array(),
        /* 175 */ array(),
        /* 176 */ array(),
        /* 177 */ array(),
        /* 178 */ array(),
        /* 179 */ array(),
        /* 180 */ array(),
        /* 181 */ array(),
        /* 182 */ array(),
        /* 183 */ array(),
        /* 184 */ array(),
        /* 185 */ array(),
        /* 186 */ array(),
        /* 187 */ array(),
        /* 188 */ array(),
        /* 189 */ array(),
        /* 190 */ array(),
        /* 191 */ array(),
        /* 192 */ array(),
        /* 193 */ array(),
        /* 194 */ array(),
        /* 195 */ array(),
        /* 196 */ array(),
        /* 197 */ array(),
        /* 198 */ array(),
        /* 199 */ array(),
        /* 200 */ array(),
        /* 201 */ array(),
        /* 202 */ array(),
        /* 203 */ array(),
        /* 204 */ array(),
        /* 205 */ array(),
        /* 206 */ array(),
        /* 207 */ array(),
        /* 208 */ array(),
        /* 209 */ array(),
        /* 210 */ array(),
        /* 211 */ array(),
        /* 212 */ array(),
        /* 213 */ array(),
        /* 214 */ array(),
        /* 215 */ array(),
        /* 216 */ array(),
        /* 217 */ array(),
        /* 218 */ array(),
        /* 219 */ array(),
        /* 220 */ array(),
        /* 221 */ array(),
        /* 222 */ array(),
        /* 223 */ array(),
        /* 224 */ array(),
        /* 225 */ array(),
        /* 226 */ array(),
        /* 227 */ array(),
        /* 228 */ array(),
        /* 229 */ array(),
        /* 230 */ array(),
        /* 231 */ array(),
        /* 232 */ array(),
        /* 233 */ array(),
        /* 234 */ array(),
        /* 235 */ array(),
        /* 236 */ array(),
        /* 237 */ array(),
        /* 238 */ array(),
        /* 239 */ array(),
        /* 240 */ array(),
);
    static public $yy_default = array(
 /*     0 */   243,  267,  371,  347,  383,  347,  383,  383,  383,  383,
 /*    10 */   383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
 /*    20 */   383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
 /*    30 */   383,  383,  383,  383,  295,  295,  383,  383,  244,  383,
 /*    40 */   383,  383,  383,  373,  383,  383,  383,  383,  383,  383,
 /*    50 */   300,  298,  346,  312,  315,  316,  372,  345,  299,  300,
 /*    60 */   280,  281,  283,  285,  287,  303,  319,  383,  383,  383,
 /*    70 */   383,  383,  383,  383,  246,  383,  320,  320,  383,  327,
 /*    80 */   383,  295,  295,  295,  295,  295,  295,  295,  383,  383,
 /*    90 */   383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
 /*   100 */   383,  383,  311,  348,  349,  284,  382,  382,  286,  289,
 /*   110 */   290,  291,  292,  293,  353,  353,  277,  383,  327,  383,
 /*   120 */   383,  383,  383,  325,  305,  383,  307,  305,  308,  321,
 /*   130 */   322,  323,  325,  383,  327,  309,  354,  314,  383,  329,
 /*   140 */   383,  342,  383,  340,  383,  383,  383,  301,  383,  383,
 /*   150 */   383,  241,  259,  260,  262,  263,  296,  324,  333,  334,
 /*   160 */   335,  340,  306,  326,  328,  352,  330,  331,  332,  355,
 /*   170 */   313,  374,  375,  376,  378,  317,  318,  350,  351,  356,
 /*   180 */   357,  358,  359,  360,  361,  362,  363,  364,  365,  366,
 /*   190 */   367,  310,  379,  380,  377,  368,  369,  370,  329,  344,
 /*   200 */   341,  336,  337,  338,  339,  343,  297,  264,  268,  269,
 /*   210 */   270,  271,  272,  273,  274,  275,  276,  278,  279,  288,
 /*   220 */   381,  302,  304,  294,  261,  266,  245,  249,  250,  251,
 /*   230 */   252,  253,  254,  255,  258,  256,  257,  248,  247,  265,
 /*   240 */   242,
);
    const YYNOCODE = 113;
    const YYSTACKDEPTH = 500;
    const YYNSTATE = 241;
    const YYNRULE = 142;
    const YYERRORSYMBOL = 64;
    const YYERRSYMDT = 'yy0';
    const YYFALLBACK = 0;
    public static $yyFallback = array(
    );

    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',         'SETSTRICT',   
  'LDELEXTENDS',   'RDEL',          'COMMENT',       'STRIPON',     
  'STRIPOFF',      'TEXT',          'LDELBLOCK',     'CLOSEBLOCK',  
  'LITERALSTART',  'LITERALEND',    'LITERAL',       'LDEL',        
  'EQUAL',         'DOLLAR',        'ID',            'LDELIF',      
  'LDELFOR',       'SEMICOLON',     'INCDEC',        'TO',          
  'STEP',          'LDELFOREACH',   'SPACE',         'AS',          
  'APTR',          'LDELSLASH',     'INTEGER',       'COMMA',       
  'OPENP',         'CLOSEP',        'MATH',          'UNIMATH',     
  'ANDSYM',        'ISIN',          'ISDIVBY',       'ISEVEN',      
  'ISODD',         'QMARK',         'NOT',           'TYPECAST',    
  'DOT',           'SINGLEQUOTESTRING',  'OPENB',         'CLOSEB',      
  'PTR',           'AT',            'EQUALS',        'NOTEQUALS',   
  'GREATERTHAN',   'LESSTHAN',      'GREATEREQUAL',  'LESSEQUAL',   
  'IDENTITY',      'NONEIDENTITY',  'MOD',           'LAND',        
  'LOR',           'LXOR',          'QUOTE',         'DOLLARID',    
  'error',         'start',         'strictmode',    'generic_template',
  'template',      'extended_template',  'extended_template_header',  'extended_template_body',
  'attributes',    'extended_template_body_element',  'extended_template_block',  'nonterminal_template_block_head',
  'template_block_content',  'nonterminal_template_block_close',  'template_element',  'template_block',
  'terminal_template_block_head',  'terminal_template_block_close',  'smartytag',     'literal',     
  'literal_elements',  'literal_element',  'expr',          'variable',    
  'value',         'statements',    'optspace',      'varvar',      
  'foraction',     'statement',     'attribute',     'ternary',     
  'array',         'modifierlist',  'ifcond',        'lop',         
  'function',      'doublequoted_with_quotes',  'indexdef',      'objectelement',
  'params',        'modifier',      'modparameters',  'modparameter',
  'arrayelements',  'arrayelement',  'doublequoted',  'doublequotedcontent',
    );

    public static $yyRuleName = array(
 /*   0 */ "start ::= strictmode generic_template",
 /*   1 */ "strictmode ::= SETSTRICT",
 /*   2 */ "strictmode ::=",
 /*   3 */ "generic_template ::= template",
 /*   4 */ "generic_template ::= extended_template",
 /*   5 */ "extended_template ::= extended_template_header extended_template_body",
 /*   6 */ "extended_template_header ::= LDELEXTENDS attributes RDEL",
 /*   7 */ "extended_template_body ::= extended_template_body_element",
 /*   8 */ "extended_template_body ::= extended_template_body extended_template_body_element",
 /*   9 */ "extended_template_body_element ::= COMMENT",
 /*  10 */ "extended_template_body_element ::= STRIPON",
 /*  11 */ "extended_template_body_element ::= STRIPOFF",
 /*  12 */ "extended_template_body_element ::= extended_template_block",
 /*  13 */ "extended_template_body_element ::= TEXT",
 /*  14 */ "extended_template_block ::= nonterminal_template_block_head template_block_content nonterminal_template_block_close",
 /*  15 */ "extended_template_block ::= nonterminal_template_block_head nonterminal_template_block_close",
 /*  16 */ "nonterminal_template_block_head ::= LDELBLOCK attributes RDEL",
 /*  17 */ "nonterminal_template_block_close ::= CLOSEBLOCK",
 /*  18 */ "template_block_content ::= template_element",
 /*  19 */ "template_block_content ::= template_block_content template_element",
 /*  20 */ "template_block ::= terminal_template_block_head terminal_template_block_close",
 /*  21 */ "template_block ::= terminal_template_block_head template_block_content terminal_template_block_close",
 /*  22 */ "terminal_template_block_head ::= LDELBLOCK attributes RDEL",
 /*  23 */ "terminal_template_block_close ::= CLOSEBLOCK",
 /*  24 */ "template ::= template_element",
 /*  25 */ "template ::= template template_element",
 /*  26 */ "template ::=",
 /*  27 */ "template_element ::= smartytag RDEL",
 /*  28 */ "template_element ::= template_block",
 /*  29 */ "template_element ::= COMMENT",
 /*  30 */ "template_element ::= literal",
 /*  31 */ "template_element ::= TEXT",
 /*  32 */ "template_element ::= STRIPON",
 /*  33 */ "template_element ::= STRIPOFF",
 /*  34 */ "literal ::= LITERALSTART literal_elements LITERALEND",
 /*  35 */ "literal_elements ::= literal_elements literal_element",
 /*  36 */ "literal_elements ::=",
 /*  37 */ "literal_element ::= literal",
 /*  38 */ "literal_element ::= LITERAL",
 /*  39 */ "smartytag ::= LDEL expr",
 /*  40 */ "smartytag ::= LDEL variable EQUAL expr",
 /*  41 */ "smartytag ::= LDEL DOLLAR ID EQUAL value",
 /*  42 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr",
 /*  43 */ "smartytag ::= LDEL ID attributes",
 /*  44 */ "smartytag ::= LDELIF expr",
 /*  45 */ "smartytag ::= LDELFOR statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes",
 /*  46 */ "foraction ::= EQUAL expr",
 /*  47 */ "foraction ::= INCDEC",
 /*  48 */ "smartytag ::= LDELFOR statement TO expr attributes",
 /*  49 */ "smartytag ::= LDELFOR statement TO expr STEP expr attributes",
 /*  50 */ "smartytag ::= LDELFOREACH attributes",
 /*  51 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes",
 /*  52 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes",
 /*  53 */ "smartytag ::= LDELSLASH ID",
 /*  54 */ "attributes ::=",
 /*  55 */ "attributes ::= attributes attribute",
 /*  56 */ "attributes ::= attribute",
 /*  57 */ "attribute ::= SPACE ID EQUAL expr",
 /*  58 */ "attribute ::= SPACE INTEGER EQUAL expr",
 /*  59 */ "attribute ::= SPACE expr",
 /*  60 */ "statements ::= statement",
 /*  61 */ "statements ::= statements COMMA statement",
 /*  62 */ "statement ::= DOLLAR varvar EQUAL expr",
 /*  63 */ "statement ::= OPENP statement CLOSEP",
 /*  64 */ "expr ::= value",
 /*  65 */ "expr ::= ternary",
 /*  66 */ "expr ::= expr MATH value",
 /*  67 */ "expr ::= expr UNIMATH value",
 /*  68 */ "expr ::= expr ANDSYM value",
 /*  69 */ "expr ::= array",
 /*  70 */ "expr ::= expr modifierlist",
 /*  71 */ "expr ::= expr ifcond expr",
 /*  72 */ "expr ::= expr ISIN array",
 /*  73 */ "expr ::= expr ISIN value",
 /*  74 */ "expr ::= expr lop expr",
 /*  75 */ "expr ::= expr ISDIVBY expr",
 /*  76 */ "expr ::= expr ISEVEN",
 /*  77 */ "expr ::= expr ISODD",
 /*  78 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr",
 /*  79 */ "value ::= variable",
 /*  80 */ "value ::= UNIMATH value",
 /*  81 */ "value ::= NOT value",
 /*  82 */ "value ::= TYPECAST value",
 /*  83 */ "value ::= value INCDEC",
 /*  84 */ "value ::= INTEGER",
 /*  85 */ "value ::= INTEGER DOT INTEGER",
 /*  86 */ "value ::= ID",
 /*  87 */ "value ::= function",
 /*  88 */ "value ::= OPENP expr CLOSEP",
 /*  89 */ "value ::= SINGLEQUOTESTRING",
 /*  90 */ "value ::= doublequoted_with_quotes",
 /*  91 */ "variable ::= DOLLAR varvar",
 /*  92 */ "variable ::= variable indexdef",
 /*  93 */ "variable ::= variable objectelement",
 /*  94 */ "indexdef ::= DOT DOLLAR varvar",
 /*  95 */ "indexdef ::= DOT ID",
 /*  96 */ "indexdef ::= DOT INTEGER",
 /*  97 */ "indexdef ::= DOT LDEL expr RDEL",
 /*  98 */ "indexdef ::= OPENB expr CLOSEB",
 /*  99 */ "varvar ::= ID",
 /* 100 */ "varvar ::= LDEL expr RDEL",
 /* 101 */ "objectelement ::= PTR ID",
 /* 102 */ "objectelement ::= PTR ID OPENP params CLOSEP",
 /* 103 */ "function ::= ID OPENP params CLOSEP",
 /* 104 */ "params ::= params COMMA expr",
 /* 105 */ "params ::= expr",
 /* 106 */ "params ::=",
 /* 107 */ "modifierlist ::= modifierlist modifier modparameters",
 /* 108 */ "modifierlist ::= modifier modparameters",
 /* 109 */ "modifier ::= VERT AT ID",
 /* 110 */ "modifier ::= VERT ID",
 /* 111 */ "modparameters ::= modparameters modparameter",
 /* 112 */ "modparameters ::=",
 /* 113 */ "modparameter ::= COLON value",
 /* 114 */ "modparameter ::= COLON array",
 /* 115 */ "ifcond ::= EQUALS",
 /* 116 */ "ifcond ::= NOTEQUALS",
 /* 117 */ "ifcond ::= GREATERTHAN",
 /* 118 */ "ifcond ::= LESSTHAN",
 /* 119 */ "ifcond ::= GREATEREQUAL",
 /* 120 */ "ifcond ::= LESSEQUAL",
 /* 121 */ "ifcond ::= IDENTITY",
 /* 122 */ "ifcond ::= NONEIDENTITY",
 /* 123 */ "ifcond ::= MOD",
 /* 124 */ "lop ::= LAND",
 /* 125 */ "lop ::= LOR",
 /* 126 */ "lop ::= LXOR",
 /* 127 */ "array ::= OPENB arrayelements CLOSEB",
 /* 128 */ "arrayelements ::= arrayelements COMMA arrayelement",
 /* 129 */ "arrayelements ::= arrayelement",
 /* 130 */ "arrayelements ::=",
 /* 131 */ "arrayelement ::= expr APTR expr",
 /* 132 */ "arrayelement ::= expr",
 /* 133 */ "doublequoted_with_quotes ::= QUOTE QUOTE",
 /* 134 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE",
 /* 135 */ "doublequoted ::= doublequoted doublequotedcontent",
 /* 136 */ "doublequoted ::= doublequotedcontent",
 /* 137 */ "doublequotedcontent ::= DOLLARID",
 /* 138 */ "doublequotedcontent ::= LDEL expr RDEL",
 /* 139 */ "doublequotedcontent ::= TEXT",
 /* 140 */ "optspace ::= SPACE",
 /* 141 */ "optspace ::=",
    );

    public function tokenName($tokenType)
    {
        if ($tokenType === 0) {
            return 'End of Input';
        }
        if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
            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 */
        }
    }

    public function yy_pop_parser_stack()
    {
        if (!count($this->yystack)) {
            return;
        }
        $yytos = array_pop($this->yystack);
        $yymajor = $yytos->major;
        self::yy_destructor($yymajor, $yytos->minor);
        $this->yyidx--;

        return $yymajor;
    }

    public function __destruct()
    {
        while ($this->yystack !== Array()) {
            $this->yy_pop_parser_stack();
        }
    }

    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;
        }
        $stack = $this->yystack;
        $yyidx = $this->yyidx;
        do {
            $yyact = $this->yy_find_shift_action($token);
            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
                // reduce action
                $done = 0;
                do {
                    if ($done++ == 100) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;
                        // too much recursion prevents proper detection
                        // so give up
                        return array_unique($expected);
                    }
                    $yyruleno = $yyact - self::YYNSTATE;
                    $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
                    $nextstate = $this->yy_find_reduce_action(
                        $this->yystack[$this->yyidx]->stateno,
                        self::$yyRuleInfo[$yyruleno]['lhs']);
                    if (isset(self::$yyExpectedTokens[$nextstate])) {
                $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
                            if (in_array($token,
                                  self::$yyExpectedTokens[$nextstate], true)) {
                            $this->yyidx = $yyidx;
                            $this->yystack = $stack;

                            return array_unique($expected);
                        }
                    }
                    if ($nextstate < self::YYNSTATE) {
                        // we need to shift a non-terminal
                        $this->yyidx++;
                        $x = new TP_yyStackEntry;
                        $x->stateno = $nextstate;
                        $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
                        $this->yystack[$this->yyidx] = $x;
                        continue 2;
                    } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;
                        // the last token was just ignored, we can't accept
                        // by ignoring input, this is in essence ignoring a
                        // syntax error!
                        return array_unique($expected);
                    } elseif ($nextstate === self::YY_NO_ACTION) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;
                        // input accepted, but not shifted (I guess)
                        return $expected;
                    } else {
                        $yyact = $nextstate;
                    }
                } while (true);
            }
            break;
        } while (true);
    $this->yyidx = $yyidx;
    $this->yystack = $stack;

        return array_unique($expected);
    }

    public function yy_is_expected_token($token)
    {
        if ($token === 0) {
            return true; // 0 is not part of this
        }
        $state = $this->yystack[$this->yyidx]->stateno;
        if (in_array($token, self::$yyExpectedTokens[$state], true)) {
            return true;
        }
        $stack = $this->yystack;
        $yyidx = $this->yyidx;
        do {
            $yyact = $this->yy_find_shift_action($token);
            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
                // reduce action
                $done = 0;
                do {
                    if ($done++ == 100) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;
                        // too much recursion prevents proper detection
                        // so give up
                        return true;
                    }
                    $yyruleno = $yyact - self::YYNSTATE;
                    $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
                    $nextstate = $this->yy_find_reduce_action(
                        $this->yystack[$this->yyidx]->stateno,
                        self::$yyRuleInfo[$yyruleno]['lhs']);
                    if (isset(self::$yyExpectedTokens[$nextstate]) &&
                          in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;

                        return true;
                    }
                    if ($nextstate < self::YYNSTATE) {
                        // we need to shift a non-terminal
                        $this->yyidx++;
                        $x = new TP_yyStackEntry;
                        $x->stateno = $nextstate;
                        $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
                        $this->yystack[$this->yyidx] = $x;
                        continue 2;
                    } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;
                        if (!$token && $token !== '0') {
                            // end of input: this is valid
                            return true;
                        }
                        // the last token was just ignored, we can't accept
                        // by ignoring input, this is in essence ignoring a
                        // syntax error!
                        return false;
                    } elseif ($nextstate === self::YY_NO_ACTION) {
                        $this->yyidx = $yyidx;
                        $this->yystack = $stack;
                        // input accepted, but not shifted (I guess)
                        return true;
                    } else {
                        $yyact = $nextstate;
                    }
                } while (true);
            }
            break;
        } while (true);
        $this->yyidx = $yyidx;
        $this->yystack = $stack;

        return true;
    }

   public function yy_find_shift_action($iLookAhead)
    {
        $stateno = $this->yystack[$this->yyidx]->stateno;

        /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */
        if (!isset(self::$yy_shift_ofst[$stateno])) {
            // no shift actions
            return self::$yy_default[$stateno];
        }
        $i = self::$yy_shift_ofst[$stateno];
        if ($i === self::YY_SHIFT_USE_DFLT) {
            return self::$yy_default[$stateno];
        }
        if ($iLookAhead == self::YYNOCODE) {
            return self::YY_NO_ACTION;
        }
        $i += $iLookAhead;
        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
              self::$yy_lookahead[$i] != $iLookAhead) {
            if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
                   && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {

                return $this->yy_find_shift_action($iFallback);
            }

            return self::$yy_default[$stateno];
        } else {
            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];
        }
        $i = self::$yy_reduce_ofst[$stateno];
        if ($i == self::YY_REDUCE_USE_DFLT) {
            return self::$yy_default[$stateno];
        }
        if ($iLookAhead == self::YYNOCODE) {
            return self::YY_NO_ACTION;
        }
        $i += $iLookAhead;
        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
              self::$yy_lookahead[$i] != $iLookAhead) {
            return self::$yy_default[$stateno];
        } else {
            return self::$yy_action[$i];
        }
    }

    public function yy_shift($yyNewState, $yyMajor, $yypMinor)
    {
        $this->yyidx++;
        if ($this->yyidx >= self::YYSTACKDEPTH) {
            $this->yyidx--;
            while ($this->yyidx >= 0) {
                $this->yy_pop_parser_stack();
            }
#line 130 "Parser.y"

    $this->internalError = true;
    $this->compiler->trigger_template_error("Stack overflow in template parser");
#line 1169 "Parser.php"

            return;
        }
        $yytos = new TP_yyStackEntry;
        $yytos->stateno = $yyNewState;
        $yytos->major = $yyMajor;
        $yytos->minor = $yypMinor;
        $this->yystack[] = $yytos;
    }

    public static $yyRuleInfo = array(
  array( 'lhs' => 65, 'rhs' => 2 ),
  array( 'lhs' => 66, 'rhs' => 1 ),
  array( 'lhs' => 66, 'rhs' => 0 ),
  array( 'lhs' => 67, 'rhs' => 1 ),
  array( 'lhs' => 67, 'rhs' => 1 ),
  array( 'lhs' => 69, 'rhs' => 2 ),
  array( 'lhs' => 70, 'rhs' => 3 ),
  array( 'lhs' => 71, 'rhs' => 1 ),
  array( 'lhs' => 71, 'rhs' => 2 ),
  array( 'lhs' => 73, 'rhs' => 1 ),
  array( 'lhs' => 73, 'rhs' => 1 ),
  array( 'lhs' => 73, 'rhs' => 1 ),
  array( 'lhs' => 73, 'rhs' => 1 ),
  array( 'lhs' => 73, 'rhs' => 1 ),
  array( 'lhs' => 74, 'rhs' => 3 ),
  array( 'lhs' => 74, 'rhs' => 2 ),
  array( 'lhs' => 75, 'rhs' => 3 ),
  array( 'lhs' => 77, 'rhs' => 1 ),
  array( 'lhs' => 76, 'rhs' => 1 ),
  array( 'lhs' => 76, 'rhs' => 2 ),
  array( 'lhs' => 79, 'rhs' => 2 ),
  array( 'lhs' => 79, 'rhs' => 3 ),
  array( 'lhs' => 80, 'rhs' => 3 ),
  array( 'lhs' => 81, 'rhs' => 1 ),
  array( 'lhs' => 68, 'rhs' => 1 ),
  array( 'lhs' => 68, 'rhs' => 2 ),
  array( 'lhs' => 68, 'rhs' => 0 ),
  array( 'lhs' => 78, 'rhs' => 2 ),
  array( 'lhs' => 78, 'rhs' => 1 ),
  array( 'lhs' => 78, 'rhs' => 1 ),
  array( 'lhs' => 78, 'rhs' => 1 ),
  array( 'lhs' => 78, 'rhs' => 1 ),
  array( 'lhs' => 78, 'rhs' => 1 ),
  array( 'lhs' => 78, 'rhs' => 1 ),
  array( 'lhs' => 83, 'rhs' => 3 ),
  array( 'lhs' => 84, 'rhs' => 2 ),
  array( 'lhs' => 84, 'rhs' => 0 ),
  array( 'lhs' => 85, 'rhs' => 1 ),
  array( 'lhs' => 85, 'rhs' => 1 ),
  array( 'lhs' => 82, 'rhs' => 2 ),
  array( 'lhs' => 82, 'rhs' => 4 ),
  array( 'lhs' => 82, 'rhs' => 5 ),
  array( 'lhs' => 82, 'rhs' => 5 ),
  array( 'lhs' => 82, 'rhs' => 3 ),
  array( 'lhs' => 82, 'rhs' => 2 ),
  array( 'lhs' => 82, 'rhs' => 11 ),
  array( 'lhs' => 92, 'rhs' => 2 ),
  array( 'lhs' => 92, 'rhs' => 1 ),
  array( 'lhs' => 82, 'rhs' => 5 ),
  array( 'lhs' => 82, 'rhs' => 7 ),
  array( 'lhs' => 82, 'rhs' => 2 ),
  array( 'lhs' => 82, 'rhs' => 7 ),
  array( 'lhs' => 82, 'rhs' => 10 ),
  array( 'lhs' => 82, 'rhs' => 2 ),
  array( 'lhs' => 72, 'rhs' => 0 ),
  array( 'lhs' => 72, 'rhs' => 2 ),
  array( 'lhs' => 72, 'rhs' => 1 ),
  array( 'lhs' => 94, 'rhs' => 4 ),
  array( 'lhs' => 94, 'rhs' => 4 ),
  array( 'lhs' => 94, 'rhs' => 2 ),
  array( 'lhs' => 89, 'rhs' => 1 ),
  array( 'lhs' => 89, 'rhs' => 3 ),
  array( 'lhs' => 93, 'rhs' => 4 ),
  array( 'lhs' => 93, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 1 ),
  array( 'lhs' => 86, 'rhs' => 1 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 1 ),
  array( 'lhs' => 86, 'rhs' => 2 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 3 ),
  array( 'lhs' => 86, 'rhs' => 2 ),
  array( 'lhs' => 86, 'rhs' => 2 ),
  array( 'lhs' => 95, 'rhs' => 7 ),
  array( 'lhs' => 88, 'rhs' => 1 ),
  array( 'lhs' => 88, 'rhs' => 2 ),
  array( 'lhs' => 88, 'rhs' => 2 ),
  array( 'lhs' => 88, 'rhs' => 2 ),
  array( 'lhs' => 88, 'rhs' => 2 ),
  array( 'lhs' => 88, 'rhs' => 1 ),
  array( 'lhs' => 88, 'rhs' => 3 ),
  array( 'lhs' => 88, 'rhs' => 1 ),
  array( 'lhs' => 88, 'rhs' => 1 ),
  array( 'lhs' => 88, 'rhs' => 3 ),
  array( 'lhs' => 88, 'rhs' => 1 ),
  array( 'lhs' => 88, 'rhs' => 1 ),
  array( 'lhs' => 87, 'rhs' => 2 ),
  array( 'lhs' => 87, 'rhs' => 2 ),
  array( 'lhs' => 87, 'rhs' => 2 ),
  array( 'lhs' => 102, 'rhs' => 3 ),
  array( 'lhs' => 102, 'rhs' => 2 ),
  array( 'lhs' => 102, 'rhs' => 2 ),
  array( 'lhs' => 102, 'rhs' => 4 ),
  array( 'lhs' => 102, 'rhs' => 3 ),
  array( 'lhs' => 91, 'rhs' => 1 ),
  array( 'lhs' => 91, 'rhs' => 3 ),
  array( 'lhs' => 103, 'rhs' => 2 ),
  array( 'lhs' => 103, 'rhs' => 5 ),
  array( 'lhs' => 100, 'rhs' => 4 ),
  array( 'lhs' => 104, 'rhs' => 3 ),
  array( 'lhs' => 104, 'rhs' => 1 ),
  array( 'lhs' => 104, 'rhs' => 0 ),
  array( 'lhs' => 97, 'rhs' => 3 ),
  array( 'lhs' => 97, 'rhs' => 2 ),
  array( 'lhs' => 105, 'rhs' => 3 ),
  array( 'lhs' => 105, 'rhs' => 2 ),
  array( 'lhs' => 106, 'rhs' => 2 ),
  array( 'lhs' => 106, 'rhs' => 0 ),
  array( 'lhs' => 107, 'rhs' => 2 ),
  array( 'lhs' => 107, 'rhs' => 2 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 98, 'rhs' => 1 ),
  array( 'lhs' => 99, 'rhs' => 1 ),
  array( 'lhs' => 99, 'rhs' => 1 ),
  array( 'lhs' => 99, 'rhs' => 1 ),
  array( 'lhs' => 96, 'rhs' => 3 ),
  array( 'lhs' => 108, 'rhs' => 3 ),
  array( 'lhs' => 108, 'rhs' => 1 ),
  array( 'lhs' => 108, 'rhs' => 0 ),
  array( 'lhs' => 109, 'rhs' => 3 ),
  array( 'lhs' => 109, 'rhs' => 1 ),
  array( 'lhs' => 101, 'rhs' => 2 ),
  array( 'lhs' => 101, 'rhs' => 3 ),
  array( 'lhs' => 110, 'rhs' => 2 ),
  array( 'lhs' => 110, 'rhs' => 1 ),
  array( 'lhs' => 111, 'rhs' => 1 ),
  array( 'lhs' => 111, 'rhs' => 3 ),
  array( 'lhs' => 111, 'rhs' => 1 ),
  array( 'lhs' => 90, 'rhs' => 1 ),
  array( 'lhs' => 90, 'rhs' => 0 ),
    );

    public static $yyReduceMap = array(
        0 => 0,
        1 => 1,
        2 => 2,
        36 => 2,
        141 => 2,
        5 => 5,
        6 => 6,
        34 => 6,
        63 => 6,
        98 => 6,
        7 => 7,
        8 => 8,
        9 => 9,
        29 => 9,
        10 => 10,
        11 => 11,
        12 => 12,
        37 => 12,
        38 => 12,
        47 => 12,
        59 => 12,
        64 => 12,
        65 => 12,
        69 => 12,
        79 => 12,
        87 => 12,
        96 => 12,
        129 => 12,
        132 => 12,
        140 => 12,
        13 => 13,
        14 => 14,
        21 => 14,
        15 => 15,
        20 => 15,
        35 => 15,
        82 => 15,
        83 => 15,
        93 => 15,
        16 => 16,
        17 => 17,
        18 => 18,
        19 => 19,
        22 => 22,
        23 => 23,
        24 => 24,
        25 => 24,
        27 => 27,
        28 => 28,
        30 => 30,
        31 => 31,
        32 => 32,
        33 => 33,
        39 => 39,
        40 => 40,
        41 => 41,
        42 => 41,
        43 => 43,
        44 => 44,
        45 => 45,
        46 => 46,
        48 => 48,
        49 => 49,
        50 => 50,
        51 => 51,
        52 => 52,
        53 => 53,
        54 => 54,
        106 => 54,
        112 => 54,
        55 => 55,
        56 => 56,
        60 => 56,
        105 => 56,
        113 => 56,
        114 => 56,
        57 => 57,
        58 => 57,
        61 => 61,
        62 => 62,
        66 => 66,
        67 => 66,
        68 => 66,
        70 => 70,
        71 => 71,
        72 => 72,
        73 => 73,
        74 => 74,
        75 => 75,
        76 => 76,
        77 => 77,
        78 => 78,
        80 => 80,
        81 => 81,
        84 => 84,
        89 => 84,
        90 => 84,
        85 => 85,
        86 => 86,
        88 => 88,
        91 => 91,
        92 => 92,
        94 => 94,
        95 => 95,
        97 => 97,
        99 => 99,
        100 => 100,
        101 => 101,
        102 => 102,
        103 => 103,
        104 => 104,
        107 => 107,
        108 => 108,
        109 => 109,
        110 => 110,
        111 => 111,
        115 => 115,
        116 => 116,
        117 => 117,
        118 => 118,
        119 => 119,
        120 => 120,
        121 => 121,
        122 => 122,
        123 => 123,
        124 => 124,
        125 => 125,
        126 => 126,
        127 => 127,
        128 => 128,
        130 => 130,
        131 => 131,
        133 => 133,
        134 => 134,
        135 => 135,
        136 => 136,
        137 => 137,
        138 => 138,
        139 => 139,
    );
#line 138 "Parser.y"
    function yy_r0(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . $this->root_buffer->toSmartyPHP();
    }
#line 1470 "Parser.php"
#line 142 "Parser.y"
    function yy_r1(){
    $this->strict_mode = true;
    $this->_retvalue = "/* strict mode */\n\$_smarty_tpl->strict_mode = true;\n";
    }
#line 1476 "Parser.php"
#line 146 "Parser.y"
    function yy_r2(){
    $this->_retvalue = '';
    }
#line 1481 "Parser.php"
#line 155 "Parser.y"
    function yy_r5(){

    $this->current_buffer->appendSubtree(new Helpers\Tag($this->yystack[$this->yyidx + 0]->minor));

    $header = Constructs\ConstructInclude::compileOpen($this->compiler, $this->yystack[$this->yyidx + -1]->minor);
    $header .= "\$_smarty_tpl->tpl_vars['smarty']['blocks'] = array();\n"; // Clear existing blocks when starting a new template chain
    $this->current_buffer->appendSubtree(new Helpers\Tag($header));
    }
#line 1491 "Parser.php"
#line 163 "Parser.y"
    function yy_r6(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
    }
#line 1496 "Parser.php"
#line 167 "Parser.y"
    function yy_r7(){
    $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor ?: '';
    }
#line 1501 "Parser.php"
#line 170 "Parser.y"
    function yy_r8(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . ($this->yystack[$this->yyidx + 0]->minor ?: '');
    }
#line 1506 "Parser.php"
#line 173 "Parser.y"
    function yy_r9(){
    $this->_retvalue = null;
    }
#line 1511 "Parser.php"
#line 176 "Parser.y"
    function yy_r10(){
    $this->strip++;
    $this->_retvalue = null;
    }
#line 1517 "Parser.php"
#line 180 "Parser.y"
    function yy_r11(){
    if (!$this->strip) {
        $this->compiler->trigger_template_error('Unbalanced {strip} tags');
    }
    $this->strip--;
    $this->_retvalue = null;
    }
#line 1526 "Parser.php"
#line 187 "Parser.y"
    function yy_r12(){
    $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
    }
#line 1531 "Parser.php"
#line 191 "Parser.y"
    function yy_r13(){
    if (trim($this->yystack[$this->yyidx + 0]->minor) !== '') {
        $this->trigger_template_error('Unexpected string in template with {extends}: ' . $this->yystack[$this->yyidx + 0]->minor);
    }
    $this->_retvalue = null;
    }
#line 1539 "Parser.php"
#line 198 "Parser.y"
    function yy_r14(){
    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + -1]->minor->toSmartyPHP() . $this->yystack[$this->yyidx + 0]->minor;
    }
#line 1544 "Parser.php"
#line 201 "Parser.y"
    function yy_r15(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor;
    }
#line 1549 "Parser.php"
#line 204 "Parser.y"
    function yy_r16(){
    $this->_retvalue = Constructs\ConstructBlockNonterminal::compileOpen($this->compiler, $this->yystack[$this->yyidx + -1]->minor);
    }
#line 1554 "Parser.php"
#line 207 "Parser.y"
    function yy_r17(){
    $this->_retvalue = Constructs\ConstructBlockNonterminal::compileClose($this->compiler, array());
    }
#line 1559 "Parser.php"
#line 210 "Parser.y"
    function yy_r18(){
    $this->_retvalue = new Helpers\TemplateBuffer();
    if ($this->yystack[$this->yyidx + 0]->minor) {
        $this->_retvalue->appendSubtree($this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 1567 "Parser.php"
#line 216 "Parser.y"
    function yy_r19(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
    if ($this->yystack[$this->yyidx + 0]->minor) {
        $this->_retvalue->appendSubtree($this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 1575 "Parser.php"
#line 230 "Parser.y"
    function yy_r22(){
    $this->_retvalue = Constructs\ConstructBlockTerminal::compileOpen($this->compiler, $this->yystack[$this->yyidx + -1]->minor);
    }
#line 1580 "Parser.php"
#line 233 "Parser.y"
    function yy_r23(){
    $this->_retvalue = Constructs\ConstructBlockTerminal::compileClose($this->compiler, array());
    }
#line 1585 "Parser.php"
#line 239 "Parser.y"
    function yy_r24(){
    if ($this->yystack[$this->yyidx + 0]->minor !== null) {
        $this->current_buffer->appendSubtree($this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 1592 "Parser.php"
#line 256 "Parser.y"
    function yy_r27(){
    if ($this->compiler->has_code && !is_object($this->yystack[$this->yyidx + -1]->minor)) {
        $this->_retvalue = new Helpers\Tag((string) $this->yystack[$this->yyidx + -1]->minor);
    } elseif ($this->compiler->has_code) {
        $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
    } else {
        $this->_retvalue = null;
    }
    }
#line 1603 "Parser.php"
#line 266 "Parser.y"
    function yy_r28(){
    $this->_retvalue = new Helpers\Tag($this->yystack[$this->yyidx + 0]->minor);
    }
#line 1608 "Parser.php"
#line 275 "Parser.y"
    function yy_r30(){
    $this->_retvalue = new Helpers\Text($this->yystack[$this->yyidx + 0]->minor);
    }
#line 1613 "Parser.php"
#line 280 "Parser.y"
    function yy_r31(){
    if ($this->strip) {
        $this->_retvalue = new Helpers\Text(self::stripString($this->yystack[$this->yyidx + 0]->minor));
    } else {
        $this->_retvalue = new Helpers\Text($this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 1622 "Parser.php"
#line 289 "Parser.y"
    function yy_r32(){
    $this->strip++;
    }
#line 1627 "Parser.php"
#line 293 "Parser.y"
    function yy_r33(){
    if (!$this->strip) {
        $this->compiler->trigger_template_error('Unbalanced {strip} tags');
    }
    $this->strip--;
    }
#line 1635 "Parser.php"
#line 328 "Parser.y"
    function yy_r39(){
    $this->compiler->assertNoEnforcedModifiers($this->yystack[$this->yyidx + 0]->minor instanceof Wrappers\StaticWrapper);
    if ($this->yystack[$this->yyidx + 0]->minor instanceof Wrappers\StaticWrapper) {
        $this->yystack[$this->yyidx + 0]->minor = (string) $this->yystack[$this->yyidx + 0]->minor;
    }
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructPrintExpression::compileOpen(
        $this->compiler,
        array('value' => $this->yystack[$this->yyidx + 0]->minor, 'modifierlist' => array())
    );
    }
#line 1648 "Parser.php"
#line 344 "Parser.y"
    function yy_r40(){
    $base = $this->yystack[$this->yyidx + -2]->minor;
    if ($base instanceof Wrappers\SafeLookupWrapper) {
        $base = $base->getUnsafeRecursive();
    }
    $this->_retvalue = $base . ' = (' . $this->yystack[$this->yyidx + 0]->minor . ');';
    }
#line 1657 "Parser.php"
#line 352 "Parser.y"
    function yy_r41(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructAssign::compileOpen(
        $this->compiler,
        array('value' => $this->yystack[$this->yyidx + 0]->minor, 'var' => "'" . $this->yystack[$this->yyidx + -2]->minor . "'")
    );
    }
#line 1666 "Parser.php"
#line 369 "Parser.y"
    function yy_r43(){
    $this->compiler->has_code = true;
    switch ($this->yystack[$this->yyidx + -1]->minor) {
        case 'assign':
            $this->_retvalue = Constructs\ConstructAssign::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'break':
            $this->_retvalue = Constructs\ConstructBreak::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'call':
            $this->_retvalue = Constructs\ConstructCall::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'capture':
            $this->_retvalue = Constructs\ConstructCapture::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'continue':
            $this->_retvalue = Constructs\ConstructContinue::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'else':
            $this->_retvalue = Constructs\ConstructElse::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'foreachelse':
            $this->_retvalue = Constructs\ConstructForEachElse::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'forelse':
            $this->_retvalue = Constructs\ConstructForElse::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'function':
            $this->_retvalue = Constructs\ConstructFunction::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'include':
            $this->_retvalue = Constructs\ConstructInclude::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
            break;
        case 'ldelim':
            $this->_retvalue = new Helpers\Text($this->compiler->smarty->left_delimiter);
            break;
        case 'rdelim':
            $this->_retvalue = new Helpers\Text($this->compiler->smarty->right_delimiter);
            break;
        default:
            $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 1711 "Parser.php"
#line 415 "Parser.y"
    function yy_r44(){
    $tag = trim(substr($this->yystack[$this->yyidx + -1]->minor, $this->lex->ldel_length));
    $this->compiler->has_code = true;
    switch ($tag) {
        case 'if':
            $this->_retvalue = Constructs\ConstructIf::compileOpen($this->compiler, array('cond' => $this->yystack[$this->yyidx + 0]->minor));
            break;
        case 'elseif':
            $this->_retvalue = Constructs\ConstructElseIf::compileOpen($this->compiler, array('cond' => $this->yystack[$this->yyidx + 0]->minor));
            break;
        case 'while':
            $this->_retvalue = Constructs\ConstructWhile::compileOpen($this->compiler, array('cond' => $this->yystack[$this->yyidx + 0]->minor));
            break;
    }
    }
#line 1728 "Parser.php"
#line 431 "Parser.y"
    function yy_r45(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructFor::compileOpen(
        $this->compiler,
        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)
            )
        )
    );
    }
#line 1745 "Parser.php"
#line 447 "Parser.y"
    function yy_r46(){
    $this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor;
    }
#line 1750 "Parser.php"
#line 455 "Parser.y"
    function yy_r48(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructFor::compileOpen(
        $this->compiler,
        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))
        )
    );
    }
#line 1762 "Parser.php"
#line 466 "Parser.y"
    function yy_r49(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructFor::compileOpen(
        $this->compiler,
        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))
        )
    );
    }
#line 1774 "Parser.php"
#line 478 "Parser.y"
    function yy_r50(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructForEach::compileOpen($this->compiler, $this->yystack[$this->yyidx + 0]->minor);
    }
#line 1780 "Parser.php"
#line 484 "Parser.y"
    function yy_r51(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructForEach::compileOpen(
        $this->compiler,
        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)))
    );
    }
#line 1789 "Parser.php"
#line 493 "Parser.y"
    function yy_r52(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructForEach::compileOpen(
        $this->compiler,
        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),
            )
        )
    );
    }
#line 1805 "Parser.php"
#line 510 "Parser.y"
    function yy_r53(){
    switch ($this->yystack[$this->yyidx + 0]->minor) {
        case 'capture':
            $this->_retvalue = Constructs\ConstructCapture::compileClose($this->compiler, null);
            break;
        case 'for':
            $this->_retvalue = Constructs\ConstructFor::compileClose($this->compiler, null);
            break;
        case 'foreach':
            $this->_retvalue = Constructs\ConstructForEach::compileClose($this->compiler, null);
            break;
        case 'function':
            $this->_retvalue = Constructs\ConstructFunction::compileClose($this->compiler, null);
            break;
        case 'if':
            $this->_retvalue = Constructs\ConstructIf::compileClose($this->compiler, null);
            break;
        case 'while':
            $this->_retvalue = Constructs\ConstructWhile::compileClose($this->compiler, null);
            break;
        default:
            $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor . 'close', array());
    }
    }
#line 1831 "Parser.php"
#line 539 "Parser.y"
    function yy_r54(){
    $this->_retvalue = array();
    }
#line 1836 "Parser.php"
#line 543 "Parser.y"
    function yy_r55(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
    $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
    }
#line 1842 "Parser.php"
#line 548 "Parser.y"
    function yy_r56(){
    $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
    }
#line 1847 "Parser.php"
#line 552 "Parser.y"
    function yy_r57(){
    $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor => $this->yystack[$this->yyidx + 0]->minor);
    }
#line 1852 "Parser.php"
#line 573 "Parser.y"
    function yy_r61(){
    $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor;
    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor;
    }
#line 1858 "Parser.php"
#line 578 "Parser.y"
    function yy_r62(){
    $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor);
    }
#line 1863 "Parser.php"
#line 602 "Parser.y"
    function yy_r66(){
    $this->_retvalue = Wrappers\StaticWrapper::staticIfAll($this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor, array($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor));
    }
#line 1868 "Parser.php"
#line 621 "Parser.y"
    function yy_r70(){
    $this->compiler->has_code = true;
    $this->_retvalue = Constructs\ConstructModifier::compileOpen($this->compiler, array(
        'value' => $this->yystack[$this->yyidx + -1]->minor,
        'modifierlist' => $this->yystack[$this->yyidx + 0]->minor,
    ));
    }
#line 1877 "Parser.php"
#line 631 "Parser.y"
    function yy_r71(){
    $this->_retvalue = new Wrappers\StaticWrapper($this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor);
    }
#line 1882 "Parser.php"
#line 635 "Parser.y"
    function yy_r72(){
    $this->_retvalue = new Wrappers\StaticWrapper('in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')');
    }
#line 1887 "Parser.php"
#line 639 "Parser.y"
    function yy_r73(){
    $this->_retvalue = new Wrappers\StaticWrapper('in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')');
    }
#line 1892 "Parser.php"
#line 643 "Parser.y"
    function yy_r74(){
    $this->_retvalue = new Wrappers\StaticWrapper($this->yystack[$this->yyidx + -2]->minor . $this->yystack[$this->yyidx + -1]->minor . $this->yystack[$this->yyidx + 0]->minor);
    }
#line 1897 "Parser.php"
#line 647 "Parser.y"
    function yy_r75(){
    $this->_retvalue = new Wrappers\StaticWrapper('!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')');
    }
#line 1902 "Parser.php"
#line 651 "Parser.y"
    function yy_r76(){
    $this->_retvalue = new Wrappers\StaticWrapper('!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')');
    }
#line 1907 "Parser.php"
#line 655 "Parser.y"
    function yy_r77(){
    $this->_retvalue = new Wrappers\StaticWrapper('(1 & '.$this->yystack[$this->yyidx + -1]->minor.')');
    }
#line 1912 "Parser.php"
#line 663 "Parser.y"
    function yy_r78(){
    $this->_retvalue = Wrappers\StaticWrapper::staticIfAll($this->yystack[$this->yyidx + -5]->minor . ' ? ' . $this->yystack[$this->yyidx + -2]->minor . ' : ' . $this->yystack[$this->yyidx + 0]->minor, array($this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor));
    }
#line 1917 "Parser.php"
#line 673 "Parser.y"
    function yy_r80(){
    $this->_retvalue = Wrappers\StaticWrapper::staticConcat($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor);
    }
#line 1922 "Parser.php"
#line 678 "Parser.y"
    function yy_r81(){
    $this->_retvalue = Wrappers\StaticWrapper::staticConcat('!', $this->yystack[$this->yyidx + 0]->minor);
    }
#line 1927 "Parser.php"
#line 691 "Parser.y"
    function yy_r84(){
    $this->_retvalue = new Wrappers\StaticWrapper($this->yystack[$this->yyidx + 0]->minor);
    }
#line 1932 "Parser.php"
#line 695 "Parser.y"
    function yy_r85(){
    $this->_retvalue = new Wrappers\StaticWrapper($this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor);
    }
#line 1937 "Parser.php"
#line 700 "Parser.y"
    function yy_r86(){
    if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
        $this->_retvalue = new Wrappers\StaticWrapper('true');
    } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
        $this->_retvalue = new Wrappers\StaticWrapper('false');
    } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
        $this->_retvalue = new Wrappers\StaticWrapper('null');
    } else {
        $this->_retvalue = new Wrappers\StaticWrapper(var_export($this->yystack[$this->yyidx + 0]->minor, true));
    }
    }
#line 1950 "Parser.php"
#line 718 "Parser.y"
    function yy_r88(){
    $this->_retvalue = Wrappers\StaticWrapper::staticIfAll("(". $this->yystack[$this->yyidx + -1]->minor .")", array($this->yystack[$this->yyidx + -1]->minor));
    }
#line 1955 "Parser.php"
#line 737 "Parser.y"
    function yy_r91(){
    if ($this->yystack[$this->yyidx + 0]->minor === "'smarty'") {
        $this->_retvalue = new Wrappers\SmartyVarLookupWrapper();
    } else {
        $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 1964 "Parser.php"
#line 745 "Parser.y"
    function yy_r92(){
    if ($this->yystack[$this->yyidx + -1]->minor instanceof Wrappers\SmartyVarLookupWrapper) {
        $decompiled = Decompile::decompileString($this->yystack[$this->yyidx + 0]->minor);
        switch ($decompiled) {
            case 'now':
                $this->_retvalue = new Wrappers\StaticWrapper('time()');
                break;
            case 'template':
                $this->compiler->assertIsNotStrict('$smarty.template is not supported in strict mode', $this);
                $this->_retvalue = new Wrappers\StaticWrapper('basename($_smarty_tpl->source->filepath)');
                break;
            case 'version':
                $this->_retvalue = new Wrappers\StaticWrapper(var_export(\Box\Brainy\Brainy::SMARTY_VERSION, true));
                break;
            case 'ldelim':
                $this->_retvalue = new Wrappers\StaticWrapper(var_export($this->compiler->smarty->left_delimiter, true));
                break;
            case 'rdelim':
                $this->_retvalue = new Wrappers\StaticWrapper(var_export($this->compiler->smarty->right_delimiter, true));
                break;
            case 'foreach':
            case 'capture':
            case 'block':
                $this->_retvalue = new Wrappers\SmartyVarPoisonWrapper($decompiled);
                break;
            default:
                $this->compiler->trigger_template_error('$smarty[' . $this->yystack[$this->yyidx + 0]->minor . '] is invalid');
        }

    } elseif ($this->yystack[$this->yyidx + -1]->minor instanceof Wrappers\SmartyVarPoisonWrapper) {
        if ($this->yystack[$this->yyidx + -1]->minor->type === 'block') {
            $decompiled = Decompile::decompileString($this->yystack[$this->yyidx + 0]->minor);
            switch ($decompiled) {
                case 'child':
                    $data = $this->compiler->assertIsInTag('block');
                    $childBlockVar = $data['childVar'];

                    $this->_retvalue = "($childBlockVar ? $childBlockVar(\$_smarty_tpl) ?: '' : '')";
                    break;
                default:
                    $this->compiler->trigger_template_error('$smarty.block[' . $this->yystack[$this->yyidx + 0]->minor . '] is invalid');
            }
        } else {
            // foreach and capture
            $this->_retvalue = new Wrappers\StaticWrapper("\$_smarty_tpl->tpl_vars['smarty'][" . var_export($this->yystack[$this->yyidx + -1]->minor->type, true) . "][" . $this->yystack[$this->yyidx + 0]->minor . "]");
        }

    } else {
        $this->_retvalue = $this->compileSafeLookupWithBase($this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor);
    }
    }
#line 2017 "Parser.php"
#line 803 "Parser.y"
    function yy_r94(){
    $this->compiler->assertIsNotStrict('Variable indicies with dot syntax is not supported in strict mode', $this);
    $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + 0]->minor);
    }
#line 2023 "Parser.php"
#line 808 "Parser.y"
    function yy_r95(){
    $this->_retvalue = var_export($this->yystack[$this->yyidx + 0]->minor, true);
    }
#line 2028 "Parser.php"
#line 816 "Parser.y"
    function yy_r97(){
    $this->compiler->assertIsNotStrict('Dot syntax with expressions is not supported in strict mode', $this);
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
    }
#line 2034 "Parser.php"
#line 829 "Parser.y"
    function yy_r99(){
    $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\'';
    }
#line 2039 "Parser.php"
#line 834 "Parser.y"
    function yy_r100(){
    $this->compiler->assertIsNotStrict('Variable variables are not supported in strict mode', $this);
    $this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')';
    }
#line 2045 "Parser.php"
#line 845 "Parser.y"
    function yy_r101(){
    if ($this->security && substr($this->yystack[$this->yyidx + 0]->minor, 0, 1) == '_') {
        $this->compiler->trigger_template_error('Call to private object member "' . $this->yystack[$this->yyidx + 0]->minor . '" not allowed');
    }
    $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor;
    }
#line 2053 "Parser.php"
#line 853 "Parser.y"
    function yy_r102(){
    if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor, 0, 1) == '_') {
        $this->compiler->trigger_template_error('Call to private object member "' . $this->yystack[$this->yyidx + -3]->minor . '" not allowed');
    }
    $this->_retvalue = '->' . $this->yystack[$this->yyidx + -3]->minor . "(" . implode(',', $this->yystack[$this->yyidx + -1]->minor) . ")";
    }
#line 2061 "Parser.php"
#line 864 "Parser.y"
    function yy_r103(){
    if ($this->security && !$this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
        $this->compiler->trigger_template_error('Cannot use untrusted function: ' . $this->yystack[$this->yyidx + -3]->minor);
    }
    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))) {
        $this->compiler->trigger_template_error("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
    }

    $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);

    $is_language_construct = $func_name === 'isset' || $func_name === 'empty';
    $combined_params = array();
    foreach ($this->yystack[$this->yyidx + -1]->minor as $param) {
        if ($is_language_construct && $param instanceof Wrappers\SafeLookupWrapper) {
            $combined_params[] = $param->getUnsafe();
            continue;
        }
        $combined_params[] = $param;
    }
    $par = implode(',', $combined_params);

    if ($func_name == 'isset') {
        if (count($combined_params) !== 1) {
            $this->compiler->trigger_template_error('Illegal number of paramer in "isset()"');
        }
        $isset_par = str_replace("')", "',null,true,false)", $par);
        $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $isset_par .")";

    } elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) {

        if ($func_name !== 'empty') {
            $this->compiler->assertIsNotStrict($func_name . ' is not allowed in strict mode', $this);
        }

        if (count($combined_params) != 1) {
            $this->compiler->trigger_template_error('Illegal number of paramer in "' . $func_name . '()"');
        }
        if ($func_name == 'empty') {
            $this->_retvalue = $func_name.'('.str_replace("')", "',null,true,false)",$combined_params[0]).')';
        } else {
            $this->_retvalue = $func_name.'('.$combined_params[0].')';
        }
    } else {
        $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $par .")";
    }
    }
#line 2109 "Parser.php"
#line 915 "Parser.y"
    function yy_r104(){
    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor));
    }
#line 2114 "Parser.php"
#line 932 "Parser.y"
    function yy_r107(){
    $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 2119 "Parser.php"
#line 936 "Parser.y"
    function yy_r108(){
    $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor));
    }
#line 2124 "Parser.php"
#line 940 "Parser.y"
    function yy_r109(){
    $this->compiler->assertIsNotStrict('@ is not allowed in templates', $this);
    $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
    }
#line 2130 "Parser.php"
#line 945 "Parser.y"
    function yy_r110(){
    $this->_retvalue =  array($this->yystack[$this->yyidx + 0]->minor);
    }
#line 2135 "Parser.php"
#line 950 "Parser.y"
    function yy_r111(){
    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor);
    }
#line 2140 "Parser.php"
#line 970 "Parser.y"
    function yy_r115(){
    $this->_retvalue = '==';
    }
#line 2145 "Parser.php"
#line 974 "Parser.y"
    function yy_r116(){
    $this->_retvalue = '!=';
    }
#line 2150 "Parser.php"
#line 978 "Parser.y"
    function yy_r117(){
    $this->_retvalue = '>';
    }
#line 2155 "Parser.php"
#line 982 "Parser.y"
    function yy_r118(){
    $this->_retvalue = '<';
    }
#line 2160 "Parser.php"
#line 986 "Parser.y"
    function yy_r119(){
    $this->_retvalue = '>=';
    }
#line 2165 "Parser.php"
#line 990 "Parser.y"
    function yy_r120(){
    $this->_retvalue = '<=';
    }
#line 2170 "Parser.php"
#line 994 "Parser.y"
    function yy_r121(){
    $this->_retvalue = '===';
    }
#line 2175 "Parser.php"
#line 998 "Parser.y"
    function yy_r122(){
    $this->_retvalue = '!==';
    }
#line 2180 "Parser.php"
#line 1002 "Parser.y"
    function yy_r123(){
    $this->_retvalue = '%';
    }
#line 2185 "Parser.php"
#line 1006 "Parser.y"
    function yy_r124(){
    $this->_retvalue = '&&';
    }
#line 2190 "Parser.php"
#line 1010 "Parser.y"
    function yy_r125(){
    $this->_retvalue = '||';
    }
#line 2195 "Parser.php"
#line 1014 "Parser.y"
    function yy_r126(){
    $this->compiler->assertIsNotStrict('XOR is not supported in strict mode', $this);
    $this->_retvalue = ' XOR ';
    }
#line 2201 "Parser.php"
#line 1022 "Parser.y"
    function yy_r127(){
    $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')';
    }
#line 2206 "Parser.php"
#line 1026 "Parser.y"
    function yy_r128(){
    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor;
    }
#line 2211 "Parser.php"
#line 1032 "Parser.y"
    function yy_r130(){
    return;
    }
#line 2216 "Parser.php"
#line 1036 "Parser.y"
    function yy_r131(){
    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor;
    }
#line 2221 "Parser.php"
#line 1048 "Parser.y"
    function yy_r133(){
    $this->_retvalue = "''";
    }
#line 2226 "Parser.php"
#line 1052 "Parser.y"
    function yy_r134(){
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->toSmartyPHP();
    }
#line 2231 "Parser.php"
#line 1057 "Parser.y"
    function yy_r135(){
    $this->yystack[$this->yyidx + -1]->minor->appendSubtree($this->yystack[$this->yyidx + 0]->minor);
    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
    }
#line 2237 "Parser.php"
#line 1062 "Parser.y"
    function yy_r136(){
    $this->_retvalue = new Helpers\DoubleQuoted($this);
    $this->_retvalue->appendSubtree($this->yystack[$this->yyidx + 0]->minor);
    }
#line 2243 "Parser.php"
#line 1067 "Parser.y"
    function yy_r137(){
    $this->_retvalue = new Helpers\Expression('(string)' . $this->compileVariable("'" . substr($this->yystack[$this->yyidx + 0]->minor, 1) . "'"));
    }
#line 2248 "Parser.php"
#line 1071 "Parser.y"
    function yy_r138(){
    $this->_retvalue = new Helpers\Expression('(string)(' . $this->yystack[$this->yyidx + -1]->minor . ')');
    }
#line 2253 "Parser.php"
#line 1075 "Parser.y"
    function yy_r139(){
    $this->_retvalue = new Helpers\DoubleQuotedContent($this->yystack[$this->yyidx + 0]->minor);
    }
#line 2258 "Parser.php"

    private $_retvalue;

    public function yy_reduce($yyruleno)
    {
        $yymsp = $this->yystack[$this->yyidx];

        $this->_retvalue = $yy_lefthand_side = null;
        if (isset(self::$yyReduceMap[$yyruleno])) {
            // call the action
            $this->_retvalue = null;
            $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
            $yy_lefthand_side = $this->_retvalue;
        }
        $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
        $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
        $this->yyidx -= $yysize;
        for ($i = $yysize; $i; $i--) {
            // pop all of the right-hand side parameters
            array_pop($this->yystack);
        }
        $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
        if ($yyact < self::YYNSTATE) {
            if ($yysize) {
                $this->yyidx++;
                $x = new TP_yyStackEntry;
                $x->stateno = $yyact;
                $x->major = $yygoto;
                $x->minor = $yy_lefthand_side;
                $this->yystack[$this->yyidx] = $x;
            } else {
                $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
            }
        } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
            $this->yy_accept();
        }
    }

    public function yy_parse_failed()
    {
        while ($this->yyidx >= 0) {
            $this->yy_pop_parser_stack();
        }
    }

    public function yy_syntax_error($yymajor, $TOKEN)
    {
#line 123 "Parser.y"

    $this->internalError = true;
    $this->yymajor = $yymajor;
    $this->compiler->trigger_template_error();
#line 2312 "Parser.php"
    }

    public function yy_accept()
    {
        while ($this->yyidx >= 0) {
            $stack = $this->yy_pop_parser_stack();
        }
#line 117 "Parser.y"

    $this->internalError = false;
    $this->retvalue = $this->_retvalue;
#line 2325 "Parser.php"
    }

    public function doParse($yymajor, $yytokenvalue)
    {
        $yyerrorhit = 0;   /* True if yymajor has invoked an error */

        if ($this->yyidx === null || $this->yyidx < 0) {
            $this->yyidx = 0;
            $this->yyerrcnt = -1;
            $x = new TP_yyStackEntry;
            $x->stateno = 0;
            $x->major = 0;
            $this->yystack = array();
            array_push($this->yystack, $x);
        }
        $yyendofinput = ($yymajor==0);

        do {
            $yyact = $this->yy_find_shift_action($yymajor);
            if ($yymajor < self::YYERRORSYMBOL &&
                  !$this->yy_is_expected_token($yymajor)) {
                // force a syntax error
                $yyact = self::YY_ERROR_ACTION;
            }
            if ($yyact < self::YYNSTATE) {
                $this->yy_shift($yyact, $yymajor, $yytokenvalue);
                $this->yyerrcnt--;
                if ($yyendofinput && $this->yyidx >= 0) {
                    $yymajor = 0;
                } else {
                    $yymajor = self::YYNOCODE;
                }
            } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
                $this->yy_reduce($yyact - self::YYNSTATE);
            } elseif ($yyact == self::YY_ERROR_ACTION) {
                if (self::YYERRORSYMBOL) {
                    if ($this->yyerrcnt < 0) {
                        $this->yy_syntax_error($yymajor, $yytokenvalue);
                    }
                    $yymx = $this->yystack[$this->yyidx]->major;
                    if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) {
                        $this->yy_destructor($yymajor, $yytokenvalue);
                        $yymajor = self::YYNOCODE;
                    } else {
                        while ($this->yyidx >= 0 &&
                                 $yymx != self::YYERRORSYMBOL &&
        ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
                              ){
                            $this->yy_pop_parser_stack();
                        }
                        if ($this->yyidx < 0 || $yymajor==0) {
                            $this->yy_destructor($yymajor, $yytokenvalue);
                            $this->yy_parse_failed();
                            $yymajor = self::YYNOCODE;
                        } elseif ($yymx != self::YYERRORSYMBOL) {
                            $u2 = 0;
                            $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
                        }
                    }
                    $this->yyerrcnt = 3;
                    $yyerrorhit = 1;
                } else {
                    if ($this->yyerrcnt <= 0) {
                        $this->yy_syntax_error($yymajor, $yytokenvalue);
                    }
                    $this->yyerrcnt = 3;
                    $this->yy_destructor($yymajor, $yytokenvalue);
                    if ($yyendofinput) {
                        $this->yy_parse_failed();
                    }
                    $yymajor = self::YYNOCODE;
                }
            } else {
                $this->yy_accept();
                $yymajor = self::YYNOCODE;
            }
        } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
    }
}
