yy_pop_parser_stack()   A
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
nc 3
nop 0
dl 0
loc 18
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
class TP_yyStackEntry
4
{
5
    public $stateno;       /* The state-number */
6
    public $major;         /* The major token value.  This is the code
7
                            * number for the token at this stack level
8
                            */
9
    public $minor;          /* The user-supplied minor token value.  This
10
                            * is the value of the token
11
                            */
12
}
13
14
// line 11 "../smarty/lexer/smarty_internal_templateparser.y"
15
16
/**
17
 * Smarty Template Parser Class
18
 *
19
 * This is the template parser.
20
 * It is generated from the smarty_internal_templateparser.y file
21
 *
22
 * @author Uwe Tews <[email protected]>
23
 */
24
class Smarty_Internal_Templateparser
25
{
26
    // line 23 "../smarty/lexer/smarty_internal_templateparser.y"
27
    const ERR1                      = 'Security error: Call to private object member not allowed';
28
    const ERR2                      = 'Security error: Call to dynamic object member not allowed';
29
    const ERR3                      = 'PHP in template not allowed. Use SmartyBC to enable it';
30
    const TP_VERT                   = 1;
31
    const TP_COLON                  = 2;
32
    const TP_UNIMATH                = 3;
33
    const TP_PHP                    = 4;
34
    const TP_TEXT                   = 5;
35
    const TP_STRIPON                = 6;
36
    const TP_STRIPOFF               = 7;
37
    const TP_LITERALSTART           = 8;
38
    const TP_LITERALEND             = 9;
39
    const TP_LITERAL                = 10;
40
    const TP_SIMPELOUTPUT           = 11;
41
    const TP_SIMPLETAG              = 12;
42
    const TP_SMARTYBLOCKCHILDPARENT = 13;
43
    const TP_LDEL                   = 14;
44
    const TP_RDEL                   = 15;
45
    const TP_DOLLARID               = 16;
46
    const TP_EQUAL                  = 17;
47
    const TP_ID                     = 18;
48
    const TP_PTR                    = 19;
49
    const TP_LDELMAKENOCACHE        = 20;
50
    const TP_LDELIF                 = 21;
51
    const TP_LDELFOR                = 22;
52
    const TP_SEMICOLON              = 23;
53
    const TP_INCDEC                 = 24;
54
    const TP_TO                     = 25;
55
    const TP_STEP                   = 26;
56
    const TP_LDELFOREACH            = 27;
57
    const TP_SPACE                  = 28;
58
    const TP_AS                     = 29;
59
    const TP_APTR                   = 30;
60
    const TP_LDELSETFILTER          = 31;
61
    const TP_CLOSETAG               = 32;
62
    const TP_LDELSLASH              = 33;
63
    const TP_ATTR                   = 34;
64
    const TP_INTEGER                = 35;
65
    const TP_COMMA                  = 36;
66
    const TP_OPENP                  = 37;
67
    const TP_CLOSEP                 = 38;
68
    const TP_MATH                   = 39;
69
    const TP_ISIN                   = 40;
70
    const TP_QMARK                  = 41;
71
    const TP_NOT                    = 42;
72
    const TP_TYPECAST               = 43;
73
    const TP_HEX                    = 44;
74
    const TP_DOT                    = 45;
75
    const TP_INSTANCEOF             = 46;
76
    const TP_SINGLEQUOTESTRING      = 47;
77
    const TP_DOUBLECOLON            = 48;
78
    const TP_NAMESPACE              = 49;
79
    const TP_AT                     = 50;
80
    const TP_HATCH                  = 51;
81
    const TP_OPENB                  = 52;
82
    const TP_CLOSEB                 = 53;
83
    const TP_DOLLAR                 = 54;
84
    const TP_LOGOP                  = 55;
85
    const TP_SLOGOP                 = 56;
86
    const TP_TLOGOP                 = 57;
87
    const TP_SINGLECOND             = 58;
88
    const TP_QUOTE                  = 59;
89
    const TP_BACKTICK               = 60;
90
    const YY_NO_ACTION              = 511;
91
    const YY_ACCEPT_ACTION          = 510;
92
    const YY_ERROR_ACTION           = 509;
93
    const YY_SZ_ACTTAB              = 2076;
94
    const YY_SHIFT_USE_DFLT         = -23;
95
    const YY_SHIFT_MAX              = 227;
96
    const YY_REDUCE_USE_DFLT        = -68;
97
    const YY_REDUCE_MAX             = 176;
98
    const YYNOCODE                  = 108;
99
    const YYSTACKDEPTH              = 500;
100
    const YYNSTATE                  = 323;
101
    const YYNRULE                   = 186;
102
    const YYERRORSYMBOL             = 61;
103
    const YYERRSYMDT                = 'yy0';
104
    const YYFALLBACK                = 0;
105
106
    public static $yy_action        = array(
107
        42, 266, 267, 379, 115, 202, 27, 204, 260, 235,
108
        237, 1, 17, 125, 94, 182, 379, 215, 10, 79,
109
        317, 168, 379, 12, 107, 425, 308, 318, 224, 298,
110
        218, 129, 189, 292, 21, 203, 425, 27, 11, 39,
111
        38, 299, 219, 17, 213, 385, 191, 245, 77, 3,
112
        303, 315, 42, 385, 160, 385, 75, 29, 385, 95,
113
        260, 235, 237, 1, 385, 126, 385, 193, 385, 215,
114
        10, 79, 80, 290, 145, 226, 107, 148, 172, 150,
115
        224, 298, 218, 85, 217, 315, 21, 280, 101, 280,
116
        141, 39, 38, 299, 219, 20, 287, 183, 191, 232,
117
        77, 3, 42, 315, 16, 176, 316, 172, 75, 275,
118
        260, 235, 237, 1, 167, 128, 236, 193, 319, 215,
119
        10, 79, 345, 40, 14, 257, 107, 319, 345, 5,
120
        224, 298, 218, 89, 217, 315, 30, 292, 172, 203,
121
        74, 39, 38, 299, 219, 132, 287, 205, 191, 74,
122
        77, 3, 42, 315, 210, 194, 310, 99, 75, 345,
123
        260, 235, 237, 1, 425, 126, 87, 179, 319, 215,
124
        10, 79, 345, 95, 195, 425, 107, 272, 345, 176,
125
        224, 298, 218, 315, 199, 115, 21, 128, 278, 209,
126
        74, 39, 38, 299, 219, 94, 287, 226, 191, 129,
127
        77, 3, 42, 315, 277, 309, 11, 308, 75, 13,
128
        260, 235, 237, 1, 163, 127, 425, 193, 319, 215,
129
        10, 79, 77, 254, 19, 315, 107, 425, 137, 34,
130
        224, 298, 218, 196, 217, 33, 21, 220, 280, 159,
131
        74, 39, 38, 299, 219, 196, 287, 8, 191, 162,
132
        77, 3, 42, 315, 294, 222, 196, 438, 75, 378,
133
        260, 235, 237, 1, 438, 126, 16, 193, 271, 215,
134
        10, 79, 378, 172, 302, 315, 107, 175, 378, 267,
135
        224, 298, 218, 27, 178, 252, 21, 164, 296, 17,
136
        83, 39, 38, 299, 219, 196, 287, 205, 191, 170,
137
        77, 3, 42, 315, 270, 18, 144, 99, 75, 346,
138
        260, 235, 237, 1, 142, 126, 280, 177, 84, 215,
139
        10, 79, 346, 172, 280, 4, 107, 95, 346, 321,
140
        224, 298, 218, 438, 217, 131, 21, 321, 426, 24,
141
        438, 39, 38, 299, 219, 196, 287, 205, 191, 426,
142
        77, 3, 42, 315, 201, 9, 101, 99, 75, 381,
143
        260, 235, 237, 1, 149, 124, 102, 193, 22, 215,
144
        10, 79, 381, 315, 99, 231, 107, 311, 381, 425,
145
        224, 298, 218, 23, 217, 319, 7, 207, 196, 17,
146
        425, 39, 38, 299, 219, 307, 287, 36, 191, 154,
147
        77, 3, 42, 315, 161, 296, 227, 74, 75, 280,
148
        260, 235, 237, 1, 16, 91, 273, 76, 312, 215,
149
        10, 79, 317, 208, 190, 12, 107, 176, 196, 318,
150
        224, 298, 218, 135, 217, 321, 21, 196, 35, 95,
151
        263, 39, 38, 299, 219, 157, 287, 111, 191, 88,
152
        77, 3, 42, 315, 169, 280, 225, 15, 75, 285,
153
        260, 235, 237, 1, 155, 126, 226, 184, 101, 215,
154
        10, 79, 454, 172, 280, 454, 107, 246, 253, 454,
155
        224, 298, 218, 152, 217, 111, 21, 161, 296, 265,
156
        6, 39, 38, 299, 219, 269, 287, 203, 191, 119,
157
        77, 3, 42, 315, 158, 262, 321, 274, 75, 97,
158
        260, 235, 237, 1, 153, 128, 165, 193, 151, 215,
159
        10, 79, 317, 43, 280, 12, 107, 320, 280, 318,
160
        224, 298, 218, 8, 217, 171, 30, 306, 196, 36,
161
        172, 39, 38, 299, 219, 264, 287, 256, 191, 128,
162
        77, 288, 78, 315, 510, 90, 166, 296, 75, 41,
163
        37, 223, 104, 228, 250, 251, 255, 122, 226, 289,
164
        260, 235, 237, 1, 239, 233, 238, 240, 241, 215,
165
        10, 79, 229, 305, 77, 304, 107, 315, 281, 300,
166
        224, 298, 218, 261, 211, 203, 314, 28, 86, 108,
167
        140, 181, 96, 61, 214, 247, 317, 454, 94, 12,
168
        454, 297, 322, 318, 454, 29, 259, 192, 249, 248,
169
        308, 313, 138, 27, 302, 143, 130, 82, 95, 17,
170
        261, 211, 203, 314, 252, 86, 108, 286, 180, 96,
171
        50, 136, 139, 100, 152, 94, 454, 81, 297, 322,
172
        295, 321, 146, 259, 192, 249, 295, 308, 261, 295,
173
        203, 295, 295, 110, 295, 295, 197, 105, 64, 295,
174
        295, 295, 295, 94, 295, 295, 297, 322, 295, 295,
175
        295, 259, 192, 249, 261, 308, 203, 276, 295, 110,
176
        108, 295, 181, 96, 61, 187, 282, 295, 317, 94,
177
        295, 12, 297, 322, 295, 318, 295, 259, 192, 249,
178
        295, 308, 295, 291, 295, 295, 295, 295, 295, 260,
179
        235, 237, 2, 295, 293, 295, 295, 295, 215, 10,
180
        79, 295, 295, 295, 295, 107, 291, 206, 295, 224,
181
        298, 218, 260, 235, 237, 2, 295, 293, 295, 295,
182
        295, 215, 10, 79, 295, 295, 295, 295, 107, 295,
183
        295, 295, 224, 298, 218, 295, 295, 295, 26, 261,
184
        295, 203, 295, 295, 110, 295, 295, 197, 113, 60,
185
        295, 295, 295, 295, 94, 156, 295, 297, 322, 167,
186
        284, 26, 259, 192, 249, 280, 308, 295, 40, 14,
187
        257, 295, 261, 200, 203, 295, 295, 110, 295, 295,
188
        197, 105, 64, 172, 295, 295, 295, 94, 295, 295,
189
        297, 322, 295, 295, 295, 259, 192, 249, 295, 308,
190
        295, 295, 295, 295, 261, 295, 203, 295, 295, 98,
191
        283, 295, 197, 113, 51, 295, 201, 295, 295, 94,
192
        295, 295, 297, 322, 295, 295, 295, 259, 192, 249,
193
        261, 308, 203, 295, 295, 110, 295, 295, 197, 113,
194
        60, 295, 295, 295, 295, 94, 295, 295, 297, 322,
195
        295, 295, 295, 259, 192, 249, 295, 308, 261, 295,
196
        203, 295, 295, 110, 188, 295, 197, 113, 60, 196,
197
        31, 43, 295, 94, 295, 295, 297, 322, 295, 295,
198
        295, 259, 192, 249, 295, 308, 261, 295, 203, 295,
199
        295, 98, 198, 295, 197, 113, 45, 295, 109, 295,
200
        295, 94, 295, 295, 297, 322, 295, 41, 37, 259,
201
        192, 249, 261, 308, 203, 295, 295, 110, 295, 295,
202
        197, 113, 67, 233, 238, 240, 241, 94, 295, 295,
203
        297, 322, 295, 295, 295, 259, 192, 249, 295, 308,
204
        261, 295, 203, 295, 295, 110, 295, 295, 197, 113,
205
        57, 196, 295, 43, 295, 94, 295, 295, 297, 322,
206
        295, 295, 295, 259, 192, 249, 295, 308, 261, 295,
207
        203, 295, 295, 110, 295, 295, 197, 113, 46, 295,
208
        295, 295, 295, 94, 295, 295, 297, 322, 295, 41,
209
        37, 259, 192, 249, 261, 308, 203, 295, 295, 110,
210
        295, 295, 197, 113, 66, 233, 238, 240, 241, 94,
211
        301, 295, 297, 322, 295, 295, 295, 259, 192, 249,
212
        295, 308, 261, 295, 203, 295, 295, 110, 295, 295,
213
        197, 113, 72, 196, 295, 43, 295, 94, 295, 295,
214
        297, 322, 295, 295, 295, 259, 192, 249, 295, 308,
215
        261, 295, 203, 295, 295, 110, 295, 295, 197, 113,
216
        53, 295, 295, 295, 295, 94, 295, 295, 297, 322,
217
        230, 41, 37, 259, 192, 249, 261, 308, 203, 295,
218
        295, 110, 295, 295, 197, 113, 48, 233, 238, 240,
219
        241, 94, 295, 295, 297, 322, 295, 295, 295, 259,
220
        192, 249, 295, 308, 261, 295, 203, 295, 295, 110,
221
        295, 295, 185, 103, 49, 196, 295, 43, 295, 94,
222
        295, 295, 297, 322, 295, 295, 295, 259, 192, 249,
223
        295, 308, 261, 295, 203, 295, 295, 110, 295, 295,
224
        197, 113, 55, 134, 295, 295, 295, 94, 295, 295,
225
        297, 322, 295, 41, 37, 259, 192, 249, 261, 308,
226
        203, 295, 295, 110, 295, 295, 197, 113, 71, 233,
227
        238, 240, 241, 94, 295, 295, 297, 322, 295, 295,
228
        295, 259, 192, 249, 295, 308, 261, 295, 203, 295,
229
        295, 110, 295, 295, 197, 113, 59, 196, 295, 43,
230
        295, 94, 295, 295, 297, 322, 295, 295, 295, 259,
231
        192, 249, 295, 308, 261, 295, 203, 295, 295, 110,
232
        295, 295, 197, 113, 63, 295, 295, 295, 295, 94,
233
        295, 295, 297, 322, 216, 41, 37, 259, 192, 249,
234
        261, 308, 203, 295, 295, 110, 295, 295, 197, 113,
235
        62, 233, 238, 240, 241, 94, 295, 295, 297, 322,
236
        295, 295, 295, 259, 192, 249, 295, 308, 261, 295,
237
        203, 295, 295, 110, 295, 295, 197, 92, 69, 196,
238
        295, 43, 295, 94, 295, 295, 297, 322, 295, 295,
239
        295, 259, 192, 249, 295, 308, 261, 295, 203, 295,
240
        295, 110, 295, 295, 197, 113, 52, 295, 295, 295,
241
        295, 94, 295, 295, 297, 322, 295, 41, 37, 259,
242
        192, 249, 261, 308, 203, 295, 295, 110, 295, 295,
243
        197, 113, 65, 233, 238, 240, 241, 94, 295, 295,
244
        297, 322, 295, 196, 295, 259, 192, 249, 295, 308,
245
        261, 295, 203, 295, 295, 110, 295, 349, 197, 113,
246
        58, 221, 295, 295, 295, 94, 295, 295, 297, 322,
247
        27, 295, 295, 259, 192, 249, 17, 308, 261, 425,
248
        203, 295, 295, 110, 295, 295, 197, 113, 56, 295,
249
        425, 295, 295, 94, 295, 295, 297, 322, 295, 295,
250
        295, 259, 192, 249, 261, 308, 203, 295, 295, 110,
251
        295, 295, 197, 113, 44, 295, 295, 295, 295, 94,
252
        295, 295, 297, 322, 295, 295, 295, 259, 192, 249,
253
        295, 308, 261, 295, 203, 295, 295, 110, 295, 295,
254
        197, 93, 70, 295, 295, 295, 295, 94, 295, 295,
255
        297, 322, 295, 295, 295, 259, 192, 249, 295, 308,
256
        261, 295, 203, 295, 295, 110, 295, 295, 186, 113,
257
        54, 295, 295, 295, 295, 94, 295, 295, 297, 322,
258
        295, 295, 295, 259, 192, 249, 261, 308, 203, 295,
259
        295, 110, 295, 295, 197, 113, 73, 295, 295, 295,
260
        295, 94, 295, 295, 297, 322, 295, 295, 295, 259,
261
        192, 249, 295, 308, 261, 295, 203, 295, 295, 110,
262
        295, 295, 197, 113, 68, 295, 295, 295, 295, 94,
263
        295, 295, 297, 322, 295, 295, 295, 259, 192, 249,
264
        295, 308, 261, 295, 203, 295, 295, 110, 295, 295,
265
        197, 93, 47, 295, 295, 295, 295, 94, 295, 295,
266
        297, 322, 391, 391, 391, 259, 192, 249, 261, 308,
267
        203, 295, 295, 110, 295, 295, 197, 113, 51, 295,
268
        295, 295, 295, 94, 295, 295, 297, 322, 196, 295,
269
        43, 259, 192, 249, 295, 308, 295, 295, 425, 295,
270
        391, 391, 295, 295, 295, 261, 295, 203, 295, 425,
271
        110, 295, 295, 197, 118, 27, 391, 391, 391, 391,
272
        94, 17, 295, 295, 258, 295, 41, 37, 259, 192,
273
        249, 261, 308, 203, 295, 196, 110, 43, 295, 197,
274
        120, 295, 233, 238, 240, 241, 94, 295, 295, 295,
275
        243, 295, 295, 295, 259, 192, 249, 295, 308, 295,
276
        32, 295, 27, 212, 295, 295, 295, 295, 17, 295,
277
        295, 295, 454, 41, 37, 454, 295, 295, 295, 454,
278
        438, 295, 295, 295, 295, 295, 295, 295, 295, 233,
279
        238, 240, 241, 295, 295, 261, 295, 203, 295, 295,
280
        110, 295, 295, 197, 112, 295, 438, 295, 295, 438,
281
        94, 454, 212, 438, 268, 295, 295, 295, 259, 192,
282
        249, 454, 308, 212, 454, 295, 295, 34, 454, 438,
283
        295, 295, 454, 295, 295, 454, 295, 133, 4, 454,
284
        438, 167, 295, 295, 295, 295, 295, 280, 295, 295,
285
        40, 14, 257, 295, 295, 438, 295, 295, 438, 261,
286
        454, 203, 438, 295, 110, 172, 438, 197, 121, 438,
287
        261, 454, 203, 438, 94, 110, 295, 295, 197, 117,
288
        295, 295, 259, 192, 249, 94, 308, 295, 295, 295,
289
        295, 295, 295, 259, 192, 249, 261, 308, 203, 295,
290
        295, 110, 295, 295, 197, 116, 295, 261, 295, 203,
291
        295, 94, 110, 295, 295, 197, 114, 295, 295, 259,
292
        192, 249, 94, 308, 196, 295, 43, 295, 295, 295,
293
        259, 192, 249, 261, 308, 203, 295, 196, 110, 43,
294
        295, 197, 123, 295, 295, 295, 106, 295, 94, 295,
295
        196, 174, 43, 295, 295, 295, 259, 192, 249, 196,
296
        308, 43, 41, 37, 244, 295, 295, 295, 295, 295,
297
        295, 295, 295, 234, 295, 41, 37, 295, 233, 238,
298
        240, 241, 295, 295, 295, 295, 295, 295, 41, 37,
299
        295, 233, 238, 240, 241, 295, 295, 41, 37, 295,
300
        295, 295, 295, 295, 233, 238, 240, 241, 25, 196,
301
        295, 43, 295, 233, 238, 240, 241, 454, 295, 295,
302
        454, 295, 295, 279, 454, 438, 212, 295, 295, 295,
303
        295, 295, 295, 295, 295, 454, 295, 295, 454, 295,
304
        295, 295, 454, 438, 196, 295, 43, 41, 37, 295,
305
        295, 438, 295, 196, 438, 43, 454, 295, 438, 295,
306
        295, 295, 295, 233, 238, 240, 241, 173, 295, 438,
307
        295, 295, 438, 295, 454, 295, 438, 454, 295, 295,
308
        454, 295, 41, 37, 454, 438, 295, 295, 295, 295,
309
        295, 41, 37, 295, 295, 295, 242, 295, 233, 238,
310
        240, 241, 295, 295, 295, 295, 295, 233, 238, 240,
311
        241, 438, 295, 295, 438, 295, 454, 147, 438, 295,
312
        295, 167, 295, 295, 295, 295, 295, 280, 295, 295,
313
        40, 14, 257, 295, 295, 295, 295, 295, 295, 295,
314
        295, 295, 295, 295, 295, 172,
315
    );
316
317
    public static $yy_lookahead     = array(
318
        3, 9, 10, 15, 71, 17, 28, 74, 11, 12,
319
        13, 14, 34, 16, 81, 18, 28, 20, 21, 22,
320
        11, 82, 34, 14, 27, 37, 93, 18, 31, 32,
321
        33, 45, 35, 66, 37, 68, 48, 28, 52, 42,
322
        43, 44, 45, 34, 47, 15, 49, 16, 51, 52,
323
        53, 54, 3, 23, 77, 25, 59, 17, 28, 19,
324
        11, 12, 13, 14, 34, 16, 36, 18, 38, 20,
325
        21, 22, 105, 106, 94, 45, 27, 73, 101, 73,
326
        31, 32, 33, 77, 35, 54, 37, 83, 48, 83,
327
        94, 42, 43, 44, 45, 14, 47, 16, 49, 18,
328
        51, 52, 3, 54, 36, 101, 38, 101, 59, 15,
329
        11, 12, 13, 14, 77, 16, 35, 18, 24, 20,
330
        21, 22, 28, 86, 87, 88, 27, 24, 34, 37,
331
        31, 32, 33, 82, 35, 54, 37, 66, 101, 68,
332
        46, 42, 43, 44, 45, 16, 47, 71, 49, 46,
333
        51, 52, 3, 54, 78, 79, 53, 81, 59, 15,
334
        11, 12, 13, 14, 37, 16, 37, 18, 24, 20,
335
        21, 22, 28, 19, 65, 48, 27, 106, 34, 101,
336
        31, 32, 33, 54, 35, 71, 37, 16, 74, 18,
337
        46, 42, 43, 44, 45, 81, 47, 45, 49, 45,
338
        51, 52, 3, 54, 90, 53, 52, 93, 59, 30,
339
        11, 12, 13, 14, 82, 16, 37, 18, 24, 20,
340
        21, 22, 51, 18, 14, 54, 27, 48, 73, 17,
341
        31, 32, 33, 1, 35, 14, 37, 16, 83, 18,
342
        46, 42, 43, 44, 45, 1, 47, 37, 49, 77,
343
        51, 52, 3, 54, 60, 50, 1, 45, 59, 15,
344
        11, 12, 13, 14, 52, 16, 36, 18, 38, 20,
345
        21, 22, 28, 101, 102, 54, 27, 8, 34, 10,
346
        31, 32, 33, 28, 35, 95, 37, 97, 98, 34,
347
        94, 42, 43, 44, 45, 1, 47, 71, 49, 77,
348
        51, 52, 3, 54, 78, 23, 73, 81, 59, 15,
349
        11, 12, 13, 14, 73, 16, 83, 18, 36, 20,
350
        21, 22, 28, 101, 83, 17, 27, 19, 34, 96,
351
        31, 32, 33, 45, 35, 16, 37, 96, 37, 41,
352
        52, 42, 43, 44, 45, 1, 47, 71, 49, 48,
353
        51, 52, 3, 54, 78, 37, 48, 81, 59, 15,
354
        11, 12, 13, 14, 71, 16, 48, 18, 17, 20,
355
        21, 22, 28, 54, 81, 24, 27, 70, 34, 37,
356
        31, 32, 33, 28, 35, 24, 37, 45, 1, 34,
357
        48, 42, 43, 44, 45, 53, 47, 2, 49, 73,
358
        51, 52, 3, 54, 97, 98, 19, 46, 59, 83,
359
        11, 12, 13, 14, 36, 16, 38, 18, 98, 20,
360
        21, 22, 11, 64, 65, 14, 27, 101, 1, 18,
361
        31, 32, 33, 94, 35, 96, 37, 1, 17, 19,
362
        92, 42, 43, 44, 45, 73, 47, 99, 49, 77,
363
        51, 52, 3, 54, 16, 83, 18, 30, 59, 70,
364
        11, 12, 13, 14, 73, 16, 45, 18, 48, 20,
365
        21, 22, 11, 101, 83, 14, 27, 35, 92, 18,
366
        31, 32, 33, 94, 35, 99, 37, 97, 98, 53,
367
        36, 42, 43, 44, 45, 66, 47, 68, 49, 18,
368
        51, 52, 3, 54, 94, 38, 96, 53, 59, 81,
369
        11, 12, 13, 14, 73, 16, 77, 18, 73, 20,
370
        21, 22, 11, 3, 83, 14, 27, 99, 83, 18,
371
        31, 32, 33, 37, 35, 18, 37, 18, 1, 2,
372
        101, 42, 43, 44, 45, 35, 47, 18, 49, 16,
373
        51, 18, 18, 54, 62, 63, 97, 98, 59, 39,
374
        40, 50, 18, 4, 5, 6, 7, 8, 45, 16,
375
        11, 12, 13, 14, 18, 55, 56, 57, 58, 20,
376
        21, 22, 49, 53, 51, 53, 27, 54, 18, 15,
377
        31, 32, 33, 66, 67, 68, 69, 25, 71, 72,
378
        51, 74, 75, 76, 18, 18, 11, 11, 81, 14,
379
        14, 84, 85, 18, 18, 17, 89, 90, 91, 9,
380
        93, 15, 51, 28, 102, 30, 81, 81, 19, 34,
381
        66, 67, 68, 69, 95, 71, 72, 83, 74, 75,
382
        76, 94, 94, 80, 94, 81, 50, 81, 84, 85,
383
        107, 96, 94, 89, 90, 91, 107, 93, 66, 107,
384
        68, 107, 107, 71, 107, 107, 74, 75, 76, 107,
385
        107, 107, 107, 81, 107, 107, 84, 85, 107, 107,
386
        107, 89, 90, 91, 66, 93, 68, 69, 107, 71,
387
        72, 107, 74, 75, 76, 103, 104, 107, 11, 81,
388
        107, 14, 84, 85, 107, 18, 107, 89, 90, 91,
389
        107, 93, 107, 5, 107, 107, 107, 107, 107, 11,
390
        12, 13, 14, 107, 16, 107, 107, 107, 20, 21,
391
        22, 107, 107, 107, 107, 27, 5, 50, 107, 31,
392
        32, 33, 11, 12, 13, 14, 107, 16, 107, 107,
393
        107, 20, 21, 22, 107, 107, 107, 107, 27, 107,
394
        107, 107, 31, 32, 33, 107, 107, 59, 60, 66,
395
        107, 68, 107, 107, 71, 107, 107, 74, 75, 76,
396
        107, 107, 107, 107, 81, 73, 107, 84, 85, 77,
397
        59, 60, 89, 90, 91, 83, 93, 107, 86, 87,
398
        88, 107, 66, 100, 68, 107, 107, 71, 107, 107,
399
        74, 75, 76, 101, 107, 107, 107, 81, 107, 107,
400
        84, 85, 107, 107, 107, 89, 90, 91, 107, 93,
401
        107, 107, 107, 107, 66, 107, 68, 107, 107, 71,
402
        104, 107, 74, 75, 76, 107, 78, 107, 107, 81,
403
        107, 107, 84, 85, 107, 107, 107, 89, 90, 91,
404
        66, 93, 68, 107, 107, 71, 107, 107, 74, 75,
405
        76, 107, 107, 107, 107, 81, 107, 107, 84, 85,
406
        107, 107, 107, 89, 90, 91, 107, 93, 66, 107,
407
        68, 107, 107, 71, 100, 107, 74, 75, 76, 1,
408
        2, 3, 107, 81, 107, 107, 84, 85, 107, 107,
409
        107, 89, 90, 91, 107, 93, 66, 107, 68, 107,
410
        107, 71, 100, 107, 74, 75, 76, 107, 78, 107,
411
        107, 81, 107, 107, 84, 85, 107, 39, 40, 89,
412
        90, 91, 66, 93, 68, 107, 107, 71, 107, 107,
413
        74, 75, 76, 55, 56, 57, 58, 81, 107, 107,
414
        84, 85, 107, 107, 107, 89, 90, 91, 107, 93,
415
        66, 107, 68, 107, 107, 71, 107, 107, 74, 75,
416
        76, 1, 107, 3, 107, 81, 107, 107, 84, 85,
417
        107, 107, 107, 89, 90, 91, 107, 93, 66, 107,
418
        68, 107, 107, 71, 107, 107, 74, 75, 76, 107,
419
        107, 107, 107, 81, 107, 107, 84, 85, 107, 39,
420
        40, 89, 90, 91, 66, 93, 68, 107, 107, 71,
421
        107, 107, 74, 75, 76, 55, 56, 57, 58, 81,
422
        60, 107, 84, 85, 107, 107, 107, 89, 90, 91,
423
        107, 93, 66, 107, 68, 107, 107, 71, 107, 107,
424
        74, 75, 76, 1, 107, 3, 107, 81, 107, 107,
425
        84, 85, 107, 107, 107, 89, 90, 91, 107, 93,
426
        66, 107, 68, 107, 107, 71, 107, 107, 74, 75,
427
        76, 107, 107, 107, 107, 81, 107, 107, 84, 85,
428
        38, 39, 40, 89, 90, 91, 66, 93, 68, 107,
429
        107, 71, 107, 107, 74, 75, 76, 55, 56, 57,
430
        58, 81, 107, 107, 84, 85, 107, 107, 107, 89,
431
        90, 91, 107, 93, 66, 107, 68, 107, 107, 71,
432
        107, 107, 74, 75, 76, 1, 107, 3, 107, 81,
433
        107, 107, 84, 85, 107, 107, 107, 89, 90, 91,
434
        107, 93, 66, 107, 68, 107, 107, 71, 107, 107,
435
        74, 75, 76, 29, 107, 107, 107, 81, 107, 107,
436
        84, 85, 107, 39, 40, 89, 90, 91, 66, 93,
437
        68, 107, 107, 71, 107, 107, 74, 75, 76, 55,
438
        56, 57, 58, 81, 107, 107, 84, 85, 107, 107,
439
        107, 89, 90, 91, 107, 93, 66, 107, 68, 107,
440
        107, 71, 107, 107, 74, 75, 76, 1, 107, 3,
441
        107, 81, 107, 107, 84, 85, 107, 107, 107, 89,
442
        90, 91, 107, 93, 66, 107, 68, 107, 107, 71,
443
        107, 107, 74, 75, 76, 107, 107, 107, 107, 81,
444
        107, 107, 84, 85, 38, 39, 40, 89, 90, 91,
445
        66, 93, 68, 107, 107, 71, 107, 107, 74, 75,
446
        76, 55, 56, 57, 58, 81, 107, 107, 84, 85,
447
        107, 107, 107, 89, 90, 91, 107, 93, 66, 107,
448
        68, 107, 107, 71, 107, 107, 74, 75, 76, 1,
449
        107, 3, 107, 81, 107, 107, 84, 85, 107, 107,
450
        107, 89, 90, 91, 107, 93, 66, 107, 68, 107,
451
        107, 71, 107, 107, 74, 75, 76, 107, 107, 107,
452
        107, 81, 107, 107, 84, 85, 107, 39, 40, 89,
453
        90, 91, 66, 93, 68, 107, 107, 71, 107, 107,
454
        74, 75, 76, 55, 56, 57, 58, 81, 107, 107,
455
        84, 85, 107, 1, 107, 89, 90, 91, 107, 93,
456
        66, 107, 68, 107, 107, 71, 107, 15, 74, 75,
457
        76, 19, 107, 107, 107, 81, 107, 107, 84, 85,
458
        28, 107, 107, 89, 90, 91, 34, 93, 66, 37,
459
        68, 107, 107, 71, 107, 107, 74, 75, 76, 107,
460
        48, 107, 107, 81, 107, 107, 84, 85, 107, 107,
461
        107, 89, 90, 91, 66, 93, 68, 107, 107, 71,
462
        107, 107, 74, 75, 76, 107, 107, 107, 107, 81,
463
        107, 107, 84, 85, 107, 107, 107, 89, 90, 91,
464
        107, 93, 66, 107, 68, 107, 107, 71, 107, 107,
465
        74, 75, 76, 107, 107, 107, 107, 81, 107, 107,
466
        84, 85, 107, 107, 107, 89, 90, 91, 107, 93,
467
        66, 107, 68, 107, 107, 71, 107, 107, 74, 75,
468
        76, 107, 107, 107, 107, 81, 107, 107, 84, 85,
469
        107, 107, 107, 89, 90, 91, 66, 93, 68, 107,
470
        107, 71, 107, 107, 74, 75, 76, 107, 107, 107,
471
        107, 81, 107, 107, 84, 85, 107, 107, 107, 89,
472
        90, 91, 107, 93, 66, 107, 68, 107, 107, 71,
473
        107, 107, 74, 75, 76, 107, 107, 107, 107, 81,
474
        107, 107, 84, 85, 107, 107, 107, 89, 90, 91,
475
        107, 93, 66, 107, 68, 107, 107, 71, 107, 107,
476
        74, 75, 76, 107, 107, 107, 107, 81, 107, 107,
477
        84, 85, 1, 2, 3, 89, 90, 91, 66, 93,
478
        68, 107, 107, 71, 107, 107, 74, 75, 76, 107,
479
        107, 107, 107, 81, 107, 107, 84, 85, 1, 107,
480
        3, 89, 90, 91, 107, 93, 107, 107, 37, 107,
481
        39, 40, 107, 107, 107, 66, 107, 68, 107, 48,
482
        71, 107, 107, 74, 75, 28, 55, 56, 57, 58,
483
        81, 34, 107, 107, 85, 107, 39, 40, 89, 90,
484
        91, 66, 93, 68, 107, 1, 71, 3, 107, 74,
485
        75, 107, 55, 56, 57, 58, 81, 107, 107, 107,
486
        85, 107, 107, 107, 89, 90, 91, 107, 93, 107,
487
        26, 107, 28, 2, 107, 107, 107, 107, 34, 107,
488
        107, 107, 11, 39, 40, 14, 107, 107, 107, 18,
489
        19, 107, 107, 107, 107, 107, 107, 107, 107, 55,
490
        56, 57, 58, 107, 107, 66, 107, 68, 107, 107,
491
        71, 107, 107, 74, 75, 107, 45, 107, 107, 48,
492
        81, 50, 2, 52, 53, 107, 107, 107, 89, 90,
493
        91, 11, 93, 2, 14, 107, 107, 17, 18, 19,
494
        107, 107, 11, 107, 107, 14, 107, 73, 17, 18,
495
        19, 77, 107, 107, 107, 107, 107, 83, 107, 107,
496
        86, 87, 88, 107, 107, 45, 107, 107, 48, 66,
497
        50, 68, 52, 107, 71, 101, 45, 74, 75, 48,
498
        66, 50, 68, 52, 81, 71, 107, 107, 74, 75,
499
        107, 107, 89, 90, 91, 81, 93, 107, 107, 107,
500
        107, 107, 107, 89, 90, 91, 66, 93, 68, 107,
501
        107, 71, 107, 107, 74, 75, 107, 66, 107, 68,
502
        107, 81, 71, 107, 107, 74, 75, 107, 107, 89,
503
        90, 91, 81, 93, 1, 107, 3, 107, 107, 107,
504
        89, 90, 91, 66, 93, 68, 107, 1, 71, 3,
505
        107, 74, 75, 107, 107, 107, 23, 107, 81, 107,
506
        1, 15, 3, 107, 107, 107, 89, 90, 91, 1,
507
        93, 3, 39, 40, 15, 107, 107, 107, 107, 107,
508
        107, 107, 107, 15, 107, 39, 40, 107, 55, 56,
509
        57, 58, 107, 107, 107, 107, 107, 107, 39, 40,
510
        107, 55, 56, 57, 58, 107, 107, 39, 40, 107,
511
        107, 107, 107, 107, 55, 56, 57, 58, 2, 1,
512
        107, 3, 107, 55, 56, 57, 58, 11, 107, 107,
513
        14, 107, 107, 15, 18, 19, 2, 107, 107, 107,
514
        107, 107, 107, 107, 107, 11, 107, 107, 14, 107,
515
        107, 107, 18, 19, 1, 107, 3, 39, 40, 107,
516
        107, 45, 107, 1, 48, 3, 50, 107, 52, 107,
517
        107, 107, 107, 55, 56, 57, 58, 15, 107, 45,
518
        107, 107, 48, 107, 50, 107, 52, 11, 107, 107,
519
        14, 107, 39, 40, 18, 19, 107, 107, 107, 107,
520
        107, 39, 40, 107, 107, 107, 53, 107, 55, 56,
521
        57, 58, 107, 107, 107, 107, 107, 55, 56, 57,
522
        58, 45, 107, 107, 48, 107, 50, 73, 52, 107,
523
        107, 77, 107, 107, 107, 107, 107, 83, 107, 107,
524
        86, 87, 88, 107, 107, 107, 107, 107, 107, 107,
525
        107, 107, 107, 107, 107, 101,
526
    );
527
528
    public static $yy_shift_ofst    = array(
529
        -23, 399, 399, 449, 49, 49, 449, 349, 49, 49,
530
        349, -3, 49, 49, 49, 49, 49, 49, 49, 49,
531
        49, 49, 49, 149, 199, 299, 49, 149, 49, 49,
532
        49, 49, 49, 49, 249, 49, 99, 99, 499, 499,
533
        499, 499, 499, 499, 1664, 1617, 1617, 1144, 1982, 1973,
534
        1938, 1226, 1853, 1062, 980, 1879, 898, 1866, 1888, 1308,
535
        1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308,
536
        1308, 1308, 520, 520, 533, 731, 1372, 171, 255, 129,
537
        708, 595, 9, 154, 129, 255, 308, 129, 255, 537,
538
        559, 1751, 244, 344, 511, 221, 294, 411, 40, 411,
539
        -22, 438, 438, 436, 387, 427, 319, 355, -22, -22,
540
        420, 609, 232, 232, 232, 609, 232, 232, 232, 232,
541
        -23, -23, -23, -23, 1740, 1691, 1954, 1936, 1996, 81,
542
        687, 461, 212, -22, 31, -14, -14, -22, 288, -14,
543
        288, -14, -22, 31, -22, -14, -14, -22, -22, 351,
544
        -22, -22, -14, -22, -22, -22, -22, -22, -14, 210,
545
        232, 609, 232, 395, 609, 232, 609, 232, 395, 92,
546
        232, -23, -23, -23, -23, -23, -23, 1591, 30, -12,
547
        94, 144, 342, 596, 179, 103, 194, 454, 230, 152,
548
        269, 301, 318, 127, 282, -8, 205, 361, 378, 421,
549
        68, 467, 556, 606, 571, 598, 587, 586, 610, 549,
550
        572, 574, 570, 532, 530, 553, 298, 523, 544, 510,
551
        92, 534, 529, 519, 517, 496, 442, 481,
552
    );
553
554
    public static $yy_reduce_ofst   = array(
555
        492, 527, 564, 592, 618, 703, 736, 768, 794, 822,
556
        850, 1068, 1096, 1122, 1150, 1286, 1204, 1232, 1260, 1040,
557
        1314, 1532, 1478, 1506, 1342, 1450, 1424, 1396, 1368, 1178,
558
        1014, 986, 932, 904, 876, 958, 1595, 1569, 1771, 1659,
559
        1760, 1734, 1723, 1797, 712, 1694, 1974, 37, 37, 37,
560
        37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
561
        37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
562
        37, 37, 37, 37, 114, -33, 372, -67, 6, 76,
563
        71, 233, 241, 190, 226, 4, 307, 276, 326, 172,
564
        429, 389, -23, -23, 339, 428, -23, 410, 390, 339,
565
        391, 386, 348, -23, 222, -23, 293, 155, 441, 445,
566
        390, 459, -23, -23, -23, 390, -23, -23, -23, 439,
567
        -23, -23, 359, -23, 550, 550, 550, 550, 550, 545,
568
        555, 550, 550, 554, 566, 539, 539, 554, 547, 539,
569
        548, 539, 554, 546, 554, 539, 539, 554, 554, 563,
570
        554, 554, 539, 554, 554, 554, 554, 554, 539, 558,
571
        78, 320, 78, 522, 320, 78, 320, 78, 522, 196,
572
        78, 51, -61, -20, -4, 109, 132,
573
    );
574
575
    public static $yyExpectedTokens = array(
576
        array(),
577
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
578
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
579
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
580
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
581
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
582
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
583
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
584
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
585
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
586
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
587
        array(
588
            3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 53, 54, 59,
589
        ),
590
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
591
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
592
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
593
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
594
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
595
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
596
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
597
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
598
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
599
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
600
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
601
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
602
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
603
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
604
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
605
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
606
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
607
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
608
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
609
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
610
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
611
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
612
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
613
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
614
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
615
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 52, 54, 59,),
616
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 54, 59,),
617
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 54, 59,),
618
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 54, 59,),
619
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 54, 59,),
620
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 54, 59,),
621
        array(3, 11, 12, 13, 14, 16, 18, 20, 21, 22, 27, 31, 32, 33, 35, 37, 42, 43, 44, 45, 47, 49, 51, 54, 59,),
622
        array(1, 3, 26, 28, 34, 39, 40, 55, 56, 57, 58,),
623
        array(1, 3, 28, 34, 39, 40, 55, 56, 57, 58,),
624
        array(1, 3, 28, 34, 39, 40, 55, 56, 57, 58,),
625
        array(1, 3, 29, 39, 40, 55, 56, 57, 58,),
626
        array(1, 3, 15, 39, 40, 55, 56, 57, 58,),
627
        array(1, 3, 39, 40, 53, 55, 56, 57, 58,),
628
        array(1, 3, 15, 39, 40, 55, 56, 57, 58,),
629
        array(1, 3, 38, 39, 40, 55, 56, 57, 58,),
630
        array(1, 3, 23, 39, 40, 55, 56, 57, 58,),
631
        array(1, 3, 38, 39, 40, 55, 56, 57, 58,),
632
        array(1, 3, 39, 40, 55, 56, 57, 58, 60,),
633
        array(1, 3, 15, 39, 40, 55, 56, 57, 58,),
634
        array(1, 2, 3, 39, 40, 55, 56, 57, 58,),
635
        array(1, 3, 15, 39, 40, 55, 56, 57, 58,),
636
        array(1, 3, 15, 39, 40, 55, 56, 57, 58,),
637
        array(1, 3, 39, 40, 55, 56, 57, 58,),
638
        array(1, 3, 39, 40, 55, 56, 57, 58,),
639
        array(1, 3, 39, 40, 55, 56, 57, 58,),
640
        array(1, 3, 39, 40, 55, 56, 57, 58,),
641
        array(1, 3, 39, 40, 55, 56, 57, 58,),
642
        array(1, 3, 39, 40, 55, 56, 57, 58,),
643
        array(1, 3, 39, 40, 55, 56, 57, 58,),
644
        array(1, 3, 39, 40, 55, 56, 57, 58,),
645
        array(1, 3, 39, 40, 55, 56, 57, 58,),
646
        array(1, 3, 39, 40, 55, 56, 57, 58,),
647
        array(1, 3, 39, 40, 55, 56, 57, 58,),
648
        array(1, 3, 39, 40, 55, 56, 57, 58,),
649
        array(1, 3, 39, 40, 55, 56, 57, 58,),
650
        array(3, 39, 40, 55, 56, 57, 58,),
651
        array(3, 39, 40, 55, 56, 57, 58,),
652
        array(16, 18, 49, 51, 54,),
653
        array(5, 11, 12, 13, 14, 16, 20, 21, 22, 27, 31, 32, 33, 59, 60,),
654
        array(1, 15, 19, 28, 34, 37, 48,),
655
        array(16, 18, 51, 54,),
656
        array(1, 28, 34,),
657
        array(16, 37, 54,),
658
        array(5, 11, 12, 13, 14, 16, 20, 21, 22, 27, 31, 32, 33, 59, 60,),
659
        array(11, 14, 18, 28, 30, 34,),
660
        array(11, 14, 18, 28, 34,),
661
        array(19, 45, 52,),
662
        array(16, 37, 54,),
663
        array(1, 28, 34,),
664
        array(17, 19, 48,),
665
        array(16, 37, 54,),
666
        array(1, 28, 34,),
667
        array(1, 2,),
668
        array(4, 5, 6, 7, 8, 11, 12, 13, 14, 20, 21, 22, 27, 31, 32, 33,),
669
        array(2, 11, 14, 17, 18, 19, 45, 48, 50, 52,),
670
        array(1, 15, 28, 34,),
671
        array(1, 15, 28, 34,),
672
        array(11, 14, 18, 50,),
673
        array(14, 16, 18, 54,),
674
        array(1, 15, 28, 34,),
675
        array(11, 14, 18,),
676
        array(17, 19, 48,),
677
        array(11, 14, 18,),
678
        array(28, 34,),
679
        array(16, 18,),
680
        array(16, 18,),
681
        array(1, 53,),
682
        array(1, 19,),
683
        array(1, 30,),
684
        array(16, 54,),
685
        array(28, 34,),
686
        array(28, 34,),
687
        array(28, 34,),
688
        array(19, 48,),
689
        array(19,),
690
        array(1,),
691
        array(1,),
692
        array(1,),
693
        array(19,),
694
        array(1,),
695
        array(1,),
696
        array(1,),
697
        array(1,),
698
        array(),
699
        array(),
700
        array(),
701
        array(),
702
        array(2, 11, 14, 17, 18, 19, 45, 48, 50, 52,),
703
        array(2, 11, 14, 18, 19, 45, 48, 50, 52, 53,),
704
        array(2, 11, 14, 18, 19, 45, 48, 50, 52,),
705
        array(2, 11, 14, 18, 19, 45, 48, 50, 52,),
706
        array(11, 14, 18, 19, 45, 48, 50, 52,),
707
        array(14, 16, 18, 35, 54,),
708
        array(11, 14, 18, 50,),
709
        array(11, 14, 18,),
710
        array(17, 45, 52,),
711
        array(28, 34,),
712
        array(16, 54,),
713
        array(45, 52,),
714
        array(45, 52,),
715
        array(28, 34,),
716
        array(45, 52,),
717
        array(45, 52,),
718
        array(45, 52,),
719
        array(45, 52,),
720
        array(28, 34,),
721
        array(16, 54,),
722
        array(28, 34,),
723
        array(45, 52,),
724
        array(45, 52,),
725
        array(28, 34,),
726
        array(28, 34,),
727
        array(17, 24,),
728
        array(28, 34,),
729
        array(28, 34,),
730
        array(45, 52,),
731
        array(28, 34,),
732
        array(28, 34,),
733
        array(28, 34,),
734
        array(28, 34,),
735
        array(28, 34,),
736
        array(45, 52,),
737
        array(14, 37,),
738
        array(1,),
739
        array(19,),
740
        array(1,),
741
        array(2,),
742
        array(19,),
743
        array(1,),
744
        array(19,),
745
        array(1,),
746
        array(2,),
747
        array(37,),
748
        array(1,),
749
        array(),
750
        array(),
751
        array(),
752
        array(),
753
        array(),
754
        array(),
755
        array(1, 2, 3, 37, 39, 40, 48, 55, 56, 57, 58,),
756
        array(15, 23, 25, 28, 34, 36, 38, 45,),
757
        array(15, 17, 28, 34, 37, 48,),
758
        array(15, 24, 28, 34, 46,),
759
        array(15, 24, 28, 34, 46,),
760
        array(37, 45, 48, 53,),
761
        array(11, 14, 18, 50,),
762
        array(30, 37, 48,),
763
        array(24, 46, 53,),
764
        array(24, 46, 60,),
765
        array(36, 53,),
766
        array(36, 38,),
767
        array(45, 53,),
768
        array(8, 10,),
769
        array(37, 48,),
770
        array(37, 48,),
771
        array(37, 48,),
772
        array(23, 36,),
773
        array(9, 10,),
774
        array(18, 50,),
775
        array(24, 46,),
776
        array(36, 38,),
777
        array(17, 45,),
778
        array(36, 38,),
779
        array(38,),
780
        array(18,),
781
        array(15,),
782
        array(51,),
783
        array(17,),
784
        array(18,),
785
        array(18,),
786
        array(9,),
787
        array(51,),
788
        array(25,),
789
        array(15,),
790
        array(18,),
791
        array(53,),
792
        array(53,),
793
        array(16,),
794
        array(41,),
795
        array(45,),
796
        array(18,),
797
        array(35,),
798
        array(37,),
799
        array(18,),
800
        array(18,),
801
        array(18,),
802
        array(18,),
803
        array(37,),
804
        array(35,),
805
        array(18,),
806
        array(),
807
        array(),
808
        array(),
809
        array(),
810
        array(),
811
        array(),
812
        array(),
813
        array(),
814
        array(),
815
        array(),
816
        array(),
817
        array(),
818
        array(),
819
        array(),
820
        array(),
821
        array(),
822
        array(),
823
        array(),
824
        array(),
825
        array(),
826
        array(),
827
        array(),
828
        array(),
829
        array(),
830
        array(),
831
        array(),
832
        array(),
833
        array(),
834
        array(),
835
        array(),
836
        array(),
837
        array(),
838
        array(),
839
        array(),
840
        array(),
841
        array(),
842
        array(),
843
        array(),
844
        array(),
845
        array(),
846
        array(),
847
        array(),
848
        array(),
849
        array(),
850
        array(),
851
        array(),
852
        array(),
853
        array(),
854
        array(),
855
        array(),
856
        array(),
857
        array(),
858
        array(),
859
        array(),
860
        array(),
861
        array(),
862
        array(),
863
        array(),
864
        array(),
865
        array(),
866
        array(),
867
        array(),
868
        array(),
869
        array(),
870
        array(),
871
        array(),
872
        array(),
873
        array(),
874
        array(),
875
        array(),
876
        array(),
877
        array(),
878
        array(),
879
        array(),
880
        array(),
881
        array(),
882
        array(),
883
        array(),
884
        array(),
885
        array(),
886
        array(),
887
        array(),
888
        array(),
889
        array(),
890
        array(),
891
        array(),
892
        array(),
893
        array(),
894
        array(),
895
        array(),
896
        array(),
897
        array(),
898
        array(),
899
        array(),
900
        array(),
901
    );
902
903
    public static $yy_default       = array(
904
        334, 509, 509, 494, 509, 473, 509, 509, 473, 473,
905
        509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
906
        509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
907
        509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
908
        509, 509, 509, 509, 375, 354, 375, 380, 509, 509,
909
        347, 509, 509, 509, 509, 509, 509, 509, 509, 397,
910
        472, 347, 471, 387, 497, 495, 382, 386, 359, 377,
911
        380, 496, 402, 401, 509, 509, 413, 509, 375, 509,
912
        509, 375, 375, 485, 509, 375, 428, 509, 375, 366,
913
        323, 427, 389, 389, 438, 509, 389, 438, 428, 438,
914
        375, 509, 509, 389, 369, 389, 509, 375, 375, 356,
915
        428, 482, 405, 389, 406, 428, 396, 392, 400, 371,
916
        480, 404, 332, 393, 427, 427, 427, 427, 427, 509,
917
        440, 438, 454, 355, 509, 436, 434, 365, 433, 432,
918
        431, 465, 364, 509, 363, 466, 463, 362, 352, 509,
919
        351, 357, 435, 344, 350, 358, 361, 348, 464, 438,
920
        422, 460, 367, 474, 486, 372, 483, 395, 475, 438,
921
        370, 479, 479, 438, 438, 332, 479, 413, 409, 413,
922
        403, 403, 413, 439, 413, 403, 403, 509, 509, 409,
923
        330, 423, 509, 413, 509, 509, 509, 403, 509, 409,
924
        509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
925
        383, 509, 509, 418, 509, 509, 415, 409, 509, 509,
926
        454, 509, 509, 509, 509, 484, 411, 509, 324, 426,
927
        415, 360, 442, 487, 444, 336, 443, 337, 488, 376,
928
        489, 490, 452, 481, 459, 454, 410, 441, 328, 419,
929
        325, 326, 437, 420, 477, 327, 476, 398, 399, 414,
930
        335, 421, 388, 424, 412, 451, 329, 331, 449, 333,
931
        384, 469, 500, 468, 491, 505, 343, 416, 417, 506,
932
        374, 391, 492, 493, 498, 341, 373, 418, 425, 353,
933
        501, 508, 507, 504, 502, 499, 461, 390, 368, 408,
934
        338, 503, 478, 453, 447, 446, 429, 445, 430, 448,
935
        450, 342, 462, 339, 340, 455, 470, 458, 457, 407,
936
        467, 456, 394,
937
    );
938
939
    public static $yyFallback       = array();
940
941
    public static $yyRuleName       = array(
942
        'start ::= template',
943
        'template ::= template PHP',
944
        'template ::= template TEXT',
945
        'template ::= template STRIPON',
946
        'template ::= template STRIPOFF',
947
        'template ::= template LITERALSTART literal_e2 LITERALEND',
948
        'literal_e2 ::= literal_e1 LITERALSTART literal_e1 LITERALEND',
949
        'literal_e2 ::= literal_e1',
950
        'literal_e1 ::= literal_e1 LITERAL',
951
        'literal_e1 ::=',
952
        'template ::= template smartytag',
953
        'template ::=',
954
        'smartytag ::= SIMPELOUTPUT',
955
        'smartytag ::= SIMPLETAG',
956
        'smartytag ::= SMARTYBLOCKCHILDPARENT',
957
        'smartytag ::= LDEL tagbody RDEL',
958
        'smartytag ::= tag RDEL',
959
        'tagbody ::= outattr',
960
        'tagbody ::= DOLLARID eqoutattr',
961
        'tagbody ::= varindexed eqoutattr',
962
        'eqoutattr ::= EQUAL outattr',
963
        'outattr ::= output attributes',
964
        'output ::= variable',
965
        'output ::= value',
966
        'output ::= expr',
967
        'tag ::= LDEL ID attributes',
968
        'tag ::= LDEL ID',
969
        'tag ::= LDEL ID modifierlist attributes',
970
        'tag ::= LDEL ID PTR ID attributes',
971
        'tag ::= LDEL ID PTR ID modifierlist attributes',
972
        'tag ::= LDELMAKENOCACHE DOLLARID',
973
        'tag ::= LDELIF expr',
974
        'tag ::= LDELIF expr attributes',
975
        'tag ::= LDELIF statement',
976
        'tag ::= LDELIF statement attributes',
977
        'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes',
978
        'foraction ::= EQUAL expr',
979
        'foraction ::= INCDEC',
980
        'tag ::= LDELFOR statement TO expr attributes',
981
        'tag ::= LDELFOR statement TO expr STEP expr attributes',
982
        'tag ::= LDELFOREACH SPACE expr AS varvar attributes',
983
        'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes',
984
        'tag ::= LDELFOREACH attributes',
985
        'tag ::= LDELSETFILTER ID modparameters',
986
        'tag ::= LDELSETFILTER ID modparameters modifierlist',
987
        'smartytag ::= CLOSETAG',
988
        'tag ::= LDELSLASH ID',
989
        'tag ::= LDELSLASH ID modifierlist',
990
        'tag ::= LDELSLASH ID PTR ID',
991
        'tag ::= LDELSLASH ID PTR ID modifierlist',
992
        'attributes ::= attributes attribute',
993
        'attributes ::= attribute',
994
        'attributes ::=',
995
        'attribute ::= SPACE ID EQUAL ID',
996
        'attribute ::= ATTR expr',
997
        'attribute ::= ATTR value',
998
        'attribute ::= SPACE ID',
999
        'attribute ::= SPACE expr',
1000
        'attribute ::= SPACE value',
1001
        'attribute ::= SPACE INTEGER EQUAL expr',
1002
        'statements ::= statement',
1003
        'statements ::= statements COMMA statement',
1004
        'statement ::= DOLLARID EQUAL INTEGER',
1005
        'statement ::= DOLLARID EQUAL expr',
1006
        'statement ::= varindexed EQUAL expr',
1007
        'statement ::= OPENP statement CLOSEP',
1008
        'expr ::= value',
1009
        'expr ::= ternary',
1010
        'expr ::= DOLLARID COLON ID',
1011
        'expr ::= expr MATH value',
1012
        'expr ::= expr UNIMATH value',
1013
        'expr ::= array',
1014
        'expr ::= expr modifierlist',
1015
        'expr ::= expr tlop value',
1016
        'expr ::= expr lop expr',
1017
        'expr ::= expr scond',
1018
        'expr ::= expr ISIN array',
1019
        'expr ::= expr ISIN value',
1020
        'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr',
1021
        'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr',
1022
        'value ::= variable',
1023
        'value ::= UNIMATH value',
1024
        'value ::= NOT value',
1025
        'value ::= TYPECAST value',
1026
        'value ::= variable INCDEC',
1027
        'value ::= HEX',
1028
        'value ::= INTEGER',
1029
        'value ::= INTEGER DOT INTEGER',
1030
        'value ::= INTEGER DOT',
1031
        'value ::= DOT INTEGER',
1032
        'value ::= ID',
1033
        'value ::= function',
1034
        'value ::= OPENP expr CLOSEP',
1035
        'value ::= variable INSTANCEOF ns1',
1036
        'value ::= variable INSTANCEOF variable',
1037
        'value ::= SINGLEQUOTESTRING',
1038
        'value ::= doublequoted_with_quotes',
1039
        'value ::= varindexed DOUBLECOLON static_class_access',
1040
        'value ::= smartytag',
1041
        'value ::= value modifierlist',
1042
        'value ::= NAMESPACE',
1043
        'value ::= ns1 DOUBLECOLON static_class_access',
1044
        'ns1 ::= ID',
1045
        'ns1 ::= NAMESPACE',
1046
        'variable ::= DOLLARID',
1047
        'variable ::= varindexed',
1048
        'variable ::= varvar AT ID',
1049
        'variable ::= object',
1050
        'variable ::= HATCH ID HATCH',
1051
        'variable ::= HATCH ID HATCH arrayindex',
1052
        'variable ::= HATCH variable HATCH',
1053
        'variable ::= HATCH variable HATCH arrayindex',
1054
        'varindexed ::= DOLLARID arrayindex',
1055
        'varindexed ::= varvar arrayindex',
1056
        'arrayindex ::= arrayindex indexdef',
1057
        'arrayindex ::=',
1058
        'indexdef ::= DOT DOLLARID',
1059
        'indexdef ::= DOT varvar',
1060
        'indexdef ::= DOT varvar AT ID',
1061
        'indexdef ::= DOT ID',
1062
        'indexdef ::= DOT INTEGER',
1063
        'indexdef ::= DOT LDEL expr RDEL',
1064
        'indexdef ::= OPENB ID CLOSEB',
1065
        'indexdef ::= OPENB ID DOT ID CLOSEB',
1066
        'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB',
1067
        'indexdef ::= OPENB INTEGER CLOSEB',
1068
        'indexdef ::= OPENB DOLLARID CLOSEB',
1069
        'indexdef ::= OPENB variable CLOSEB',
1070
        'indexdef ::= OPENB value CLOSEB',
1071
        'indexdef ::= OPENB expr CLOSEB',
1072
        'indexdef ::= OPENB CLOSEB',
1073
        'varvar ::= DOLLARID',
1074
        'varvar ::= DOLLAR',
1075
        'varvar ::= varvar varvarele',
1076
        'varvarele ::= ID',
1077
        'varvarele ::= SIMPELOUTPUT',
1078
        'varvarele ::= LDEL expr RDEL',
1079
        'object ::= varindexed objectchain',
1080
        'objectchain ::= objectelement',
1081
        'objectchain ::= objectchain objectelement',
1082
        'objectelement ::= PTR ID arrayindex',
1083
        'objectelement ::= PTR varvar arrayindex',
1084
        'objectelement ::= PTR LDEL expr RDEL arrayindex',
1085
        'objectelement ::= PTR ID LDEL expr RDEL arrayindex',
1086
        'objectelement ::= PTR method',
1087
        'function ::= ns1 OPENP params CLOSEP',
1088
        'method ::= ID OPENP params CLOSEP',
1089
        'method ::= DOLLARID OPENP params CLOSEP',
1090
        'params ::= params COMMA expr',
1091
        'params ::= expr',
1092
        'params ::=',
1093
        'modifierlist ::= modifierlist modifier modparameters',
1094
        'modifierlist ::= modifier modparameters',
1095
        'modifier ::= VERT AT ID',
1096
        'modifier ::= VERT ID',
1097
        'modparameters ::= modparameters modparameter',
1098
        'modparameters ::=',
1099
        'modparameter ::= COLON value',
1100
        'modparameter ::= COLON array',
1101
        'static_class_access ::= method',
1102
        'static_class_access ::= method objectchain',
1103
        'static_class_access ::= ID',
1104
        'static_class_access ::= DOLLARID arrayindex',
1105
        'static_class_access ::= DOLLARID arrayindex objectchain',
1106
        'lop ::= LOGOP',
1107
        'lop ::= SLOGOP',
1108
        'tlop ::= TLOGOP',
1109
        'scond ::= SINGLECOND',
1110
        'array ::= OPENB arrayelements CLOSEB',
1111
        'arrayelements ::= arrayelement',
1112
        'arrayelements ::= arrayelements COMMA arrayelement',
1113
        'arrayelements ::=',
1114
        'arrayelement ::= value APTR expr',
1115
        'arrayelement ::= ID APTR expr',
1116
        'arrayelement ::= expr',
1117
        'doublequoted_with_quotes ::= QUOTE QUOTE',
1118
        'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE',
1119
        'doublequoted ::= doublequoted doublequotedcontent',
1120
        'doublequoted ::= doublequotedcontent',
1121
        'doublequotedcontent ::= BACKTICK variable BACKTICK',
1122
        'doublequotedcontent ::= BACKTICK expr BACKTICK',
1123
        'doublequotedcontent ::= DOLLARID',
1124
        'doublequotedcontent ::= LDEL variable RDEL',
1125
        'doublequotedcontent ::= LDEL expr RDEL',
1126
        'doublequotedcontent ::= smartytag',
1127
        'doublequotedcontent ::= TEXT',
1128
    );
1129
1130
    public static $yyRuleInfo       = array(
1131
        array(0 => 62, 1 => 1),
1132
        array(0 => 63, 1 => 2),
1133
        array(0 => 63, 1 => 2),
1134
        array(0 => 63, 1 => 2),
1135
        array(0 => 63, 1 => 2),
1136
        array(0 => 63, 1 => 4),
1137
        array(0 => 64, 1 => 4),
1138
        array(0 => 64, 1 => 1),
1139
        array(0 => 65, 1 => 2),
1140
        array(0 => 65, 1 => 0),
1141
        array(0 => 63, 1 => 2),
1142
        array(0 => 63, 1 => 0),
1143
        array(0 => 66, 1 => 1),
1144
        array(0 => 66, 1 => 1),
1145
        array(0 => 66, 1 => 1),
1146
        array(0 => 66, 1 => 3),
1147
        array(0 => 66, 1 => 2),
1148
        array(0 => 67, 1 => 1),
1149
        array(0 => 67, 1 => 2),
1150
        array(0 => 67, 1 => 2),
1151
        array(0 => 70, 1 => 2),
1152
        array(0 => 69, 1 => 2),
1153
        array(0 => 72, 1 => 1),
1154
        array(0 => 72, 1 => 1),
1155
        array(0 => 72, 1 => 1),
1156
        array(0 => 68, 1 => 3),
1157
        array(0 => 68, 1 => 2),
1158
        array(0 => 68, 1 => 4),
1159
        array(0 => 68, 1 => 5),
1160
        array(0 => 68, 1 => 6),
1161
        array(0 => 68, 1 => 2),
1162
        array(0 => 68, 1 => 2),
1163
        array(0 => 68, 1 => 3),
1164
        array(0 => 68, 1 => 2),
1165
        array(0 => 68, 1 => 3),
1166
        array(0 => 68, 1 => 8),
1167
        array(0 => 80, 1 => 2),
1168
        array(0 => 80, 1 => 1),
1169
        array(0 => 68, 1 => 5),
1170
        array(0 => 68, 1 => 7),
1171
        array(0 => 68, 1 => 6),
1172
        array(0 => 68, 1 => 8),
1173
        array(0 => 68, 1 => 2),
1174
        array(0 => 68, 1 => 3),
1175
        array(0 => 68, 1 => 4),
1176
        array(0 => 66, 1 => 1),
1177
        array(0 => 68, 1 => 2),
1178
        array(0 => 68, 1 => 3),
1179
        array(0 => 68, 1 => 4),
1180
        array(0 => 68, 1 => 5),
1181
        array(0 => 73, 1 => 2),
1182
        array(0 => 73, 1 => 1),
1183
        array(0 => 73, 1 => 0),
1184
        array(0 => 83, 1 => 4),
1185
        array(0 => 83, 1 => 2),
1186
        array(0 => 83, 1 => 2),
1187
        array(0 => 83, 1 => 2),
1188
        array(0 => 83, 1 => 2),
1189
        array(0 => 83, 1 => 2),
1190
        array(0 => 83, 1 => 4),
1191
        array(0 => 79, 1 => 1),
1192
        array(0 => 79, 1 => 3),
1193
        array(0 => 78, 1 => 3),
1194
        array(0 => 78, 1 => 3),
1195
        array(0 => 78, 1 => 3),
1196
        array(0 => 78, 1 => 3),
1197
        array(0 => 76, 1 => 1),
1198
        array(0 => 76, 1 => 1),
1199
        array(0 => 76, 1 => 3),
1200
        array(0 => 76, 1 => 3),
1201
        array(0 => 76, 1 => 3),
1202
        array(0 => 76, 1 => 1),
1203
        array(0 => 76, 1 => 2),
1204
        array(0 => 76, 1 => 3),
1205
        array(0 => 76, 1 => 3),
1206
        array(0 => 76, 1 => 2),
1207
        array(0 => 76, 1 => 3),
1208
        array(0 => 76, 1 => 3),
1209
        array(0 => 84, 1 => 7),
1210
        array(0 => 84, 1 => 7),
1211
        array(0 => 75, 1 => 1),
1212
        array(0 => 75, 1 => 2),
1213
        array(0 => 75, 1 => 2),
1214
        array(0 => 75, 1 => 2),
1215
        array(0 => 75, 1 => 2),
1216
        array(0 => 75, 1 => 1),
1217
        array(0 => 75, 1 => 1),
1218
        array(0 => 75, 1 => 3),
1219
        array(0 => 75, 1 => 2),
1220
        array(0 => 75, 1 => 2),
1221
        array(0 => 75, 1 => 1),
1222
        array(0 => 75, 1 => 1),
1223
        array(0 => 75, 1 => 3),
1224
        array(0 => 75, 1 => 3),
1225
        array(0 => 75, 1 => 3),
1226
        array(0 => 75, 1 => 1),
1227
        array(0 => 75, 1 => 1),
1228
        array(0 => 75, 1 => 3),
1229
        array(0 => 75, 1 => 1),
1230
        array(0 => 75, 1 => 2),
1231
        array(0 => 75, 1 => 1),
1232
        array(0 => 75, 1 => 3),
1233
        array(0 => 90, 1 => 1),
1234
        array(0 => 90, 1 => 1),
1235
        array(0 => 74, 1 => 1),
1236
        array(0 => 74, 1 => 1),
1237
        array(0 => 74, 1 => 3),
1238
        array(0 => 74, 1 => 1),
1239
        array(0 => 74, 1 => 3),
1240
        array(0 => 74, 1 => 4),
1241
        array(0 => 74, 1 => 3),
1242
        array(0 => 74, 1 => 4),
1243
        array(0 => 71, 1 => 2),
1244
        array(0 => 71, 1 => 2),
1245
        array(0 => 94, 1 => 2),
1246
        array(0 => 94, 1 => 0),
1247
        array(0 => 95, 1 => 2),
1248
        array(0 => 95, 1 => 2),
1249
        array(0 => 95, 1 => 4),
1250
        array(0 => 95, 1 => 2),
1251
        array(0 => 95, 1 => 2),
1252
        array(0 => 95, 1 => 4),
1253
        array(0 => 95, 1 => 3),
1254
        array(0 => 95, 1 => 5),
1255
        array(0 => 95, 1 => 3),
1256
        array(0 => 95, 1 => 3),
1257
        array(0 => 95, 1 => 3),
1258
        array(0 => 95, 1 => 3),
1259
        array(0 => 95, 1 => 3),
1260
        array(0 => 95, 1 => 3),
1261
        array(0 => 95, 1 => 2),
1262
        array(0 => 81, 1 => 1),
1263
        array(0 => 81, 1 => 1),
1264
        array(0 => 81, 1 => 2),
1265
        array(0 => 96, 1 => 1),
1266
        array(0 => 96, 1 => 1),
1267
        array(0 => 96, 1 => 3),
1268
        array(0 => 93, 1 => 2),
1269
        array(0 => 97, 1 => 1),
1270
        array(0 => 97, 1 => 2),
1271
        array(0 => 98, 1 => 3),
1272
        array(0 => 98, 1 => 3),
1273
        array(0 => 98, 1 => 5),
1274
        array(0 => 98, 1 => 6),
1275
        array(0 => 98, 1 => 2),
1276
        array(0 => 89, 1 => 4),
1277
        array(0 => 99, 1 => 4),
1278
        array(0 => 99, 1 => 4),
1279
        array(0 => 100, 1 => 3),
1280
        array(0 => 100, 1 => 1),
1281
        array(0 => 100, 1 => 0),
1282
        array(0 => 77, 1 => 3),
1283
        array(0 => 77, 1 => 2),
1284
        array(0 => 101, 1 => 3),
1285
        array(0 => 101, 1 => 2),
1286
        array(0 => 82, 1 => 2),
1287
        array(0 => 82, 1 => 0),
1288
        array(0 => 102, 1 => 2),
1289
        array(0 => 102, 1 => 2),
1290
        array(0 => 92, 1 => 1),
1291
        array(0 => 92, 1 => 2),
1292
        array(0 => 92, 1 => 1),
1293
        array(0 => 92, 1 => 2),
1294
        array(0 => 92, 1 => 3),
1295
        array(0 => 87, 1 => 1),
1296
        array(0 => 87, 1 => 1),
1297
        array(0 => 86, 1 => 1),
1298
        array(0 => 88, 1 => 1),
1299
        array(0 => 85, 1 => 3),
1300
        array(0 => 103, 1 => 1),
1301
        array(0 => 103, 1 => 3),
1302
        array(0 => 103, 1 => 0),
1303
        array(0 => 104, 1 => 3),
1304
        array(0 => 104, 1 => 3),
1305
        array(0 => 104, 1 => 1),
1306
        array(0 => 91, 1 => 2),
1307
        array(0 => 91, 1 => 3),
1308
        array(0 => 105, 1 => 2),
1309
        array(0 => 105, 1 => 1),
1310
        array(0 => 106, 1 => 3),
1311
        array(0 => 106, 1 => 3),
1312
        array(0 => 106, 1 => 1),
1313
        array(0 => 106, 1 => 3),
1314
        array(0 => 106, 1 => 3),
1315
        array(0 => 106, 1 => 1),
1316
        array(0 => 106, 1 => 1),
1317
    );
1318
1319
    public static $yyReduceMap      = array(
1320
        0   => 0,
1321
        1   => 1,
1322
        2   => 2,
1323
        3   => 3,
1324
        4   => 4,
1325
        5   => 5,
1326
        6   => 6,
1327
        7   => 7,
1328
        22  => 7,
1329
        23  => 7,
1330
        24  => 7,
1331
        37  => 7,
1332
        57  => 7,
1333
        58  => 7,
1334
        66  => 7,
1335
        67  => 7,
1336
        71  => 7,
1337
        80  => 7,
1338
        85  => 7,
1339
        86  => 7,
1340
        91  => 7,
1341
        95  => 7,
1342
        96  => 7,
1343
        100 => 7,
1344
        102 => 7,
1345
        107 => 7,
1346
        169 => 7,
1347
        174 => 7,
1348
        8   => 8,
1349
        9   => 9,
1350
        10  => 10,
1351
        12  => 12,
1352
        13  => 13,
1353
        14  => 14,
1354
        15  => 15,
1355
        16  => 16,
1356
        17  => 17,
1357
        18  => 18,
1358
        19  => 19,
1359
        20  => 20,
1360
        21  => 21,
1361
        25  => 25,
1362
        26  => 26,
1363
        27  => 27,
1364
        28  => 28,
1365
        29  => 29,
1366
        30  => 30,
1367
        31  => 31,
1368
        32  => 32,
1369
        34  => 32,
1370
        33  => 33,
1371
        35  => 35,
1372
        36  => 36,
1373
        38  => 38,
1374
        39  => 39,
1375
        40  => 40,
1376
        41  => 41,
1377
        42  => 42,
1378
        43  => 43,
1379
        44  => 44,
1380
        45  => 45,
1381
        46  => 46,
1382
        47  => 47,
1383
        48  => 48,
1384
        49  => 49,
1385
        50  => 50,
1386
        51  => 51,
1387
        60  => 51,
1388
        149 => 51,
1389
        153 => 51,
1390
        157 => 51,
1391
        158 => 51,
1392
        52  => 52,
1393
        150 => 52,
1394
        156 => 52,
1395
        53  => 53,
1396
        54  => 54,
1397
        55  => 54,
1398
        56  => 56,
1399
        134 => 56,
1400
        59  => 59,
1401
        61  => 61,
1402
        62  => 62,
1403
        63  => 62,
1404
        64  => 64,
1405
        65  => 65,
1406
        68  => 68,
1407
        69  => 69,
1408
        70  => 69,
1409
        72  => 72,
1410
        99  => 72,
1411
        73  => 73,
1412
        74  => 74,
1413
        75  => 75,
1414
        76  => 76,
1415
        77  => 77,
1416
        78  => 78,
1417
        79  => 79,
1418
        81  => 81,
1419
        83  => 81,
1420
        84  => 81,
1421
        114 => 81,
1422
        82  => 82,
1423
        87  => 87,
1424
        88  => 88,
1425
        89  => 89,
1426
        90  => 90,
1427
        92  => 92,
1428
        93  => 93,
1429
        94  => 93,
1430
        97  => 97,
1431
        98  => 98,
1432
        101 => 101,
1433
        103 => 103,
1434
        104 => 104,
1435
        105 => 105,
1436
        106 => 106,
1437
        108 => 108,
1438
        109 => 109,
1439
        110 => 110,
1440
        111 => 111,
1441
        112 => 112,
1442
        113 => 113,
1443
        115 => 115,
1444
        171 => 115,
1445
        116 => 116,
1446
        117 => 117,
1447
        118 => 118,
1448
        119 => 119,
1449
        120 => 120,
1450
        121 => 121,
1451
        129 => 121,
1452
        122 => 122,
1453
        123 => 123,
1454
        124 => 124,
1455
        125 => 124,
1456
        127 => 124,
1457
        128 => 124,
1458
        126 => 126,
1459
        130 => 130,
1460
        131 => 131,
1461
        132 => 132,
1462
        175 => 132,
1463
        133 => 133,
1464
        135 => 135,
1465
        136 => 136,
1466
        137 => 137,
1467
        138 => 138,
1468
        139 => 139,
1469
        140 => 140,
1470
        141 => 141,
1471
        142 => 142,
1472
        143 => 143,
1473
        144 => 144,
1474
        145 => 145,
1475
        146 => 146,
1476
        147 => 147,
1477
        148 => 148,
1478
        151 => 151,
1479
        152 => 152,
1480
        154 => 154,
1481
        155 => 155,
1482
        159 => 159,
1483
        160 => 160,
1484
        161 => 161,
1485
        162 => 162,
1486
        163 => 163,
1487
        164 => 164,
1488
        165 => 165,
1489
        166 => 166,
1490
        167 => 167,
1491
        168 => 168,
1492
        170 => 170,
1493
        172 => 172,
1494
        173 => 173,
1495
        176 => 176,
1496
        177 => 177,
1497
        178 => 178,
1498
        179 => 179,
1499
        182 => 179,
1500
        180 => 180,
1501
        183 => 180,
1502
        181 => 181,
1503
        184 => 184,
1504
        185 => 185,
1505
    );
1506
1507
    /**
1508
     * result status
1509
     *
1510
     * @var bool
1511
     */
1512
    public $successful = true;
1513
1514
    /**
1515
     * return value
1516
     *
1517
     * @var mixed
1518
     */
1519
    public $retvalue = 0;
1520
1521
    /**
1522
     * @var
1523
     */
1524
    public $yymajor;
1525
1526
    /**
1527
     * last index of array variable
1528
     *
1529
     * @var mixed
1530
     */
1531
    public $last_index;
1532
1533
    /**
1534
     * last variable name
1535
     *
1536
     * @var string
1537
     */
1538
    public $last_variable;
1539
1540
    /**
1541
     * root parse tree buffer
1542
     *
1543
     * @var Smarty_Internal_ParseTree_Template
1544
     */
1545
    public $root_buffer;
1546
1547
    /**
1548
     * current parse tree object
1549
     *
1550
     * @var Smarty_Internal_ParseTree
1551
     */
1552
    public $current_buffer;
1553
1554
    /**
1555
     * lexer object
1556
     *
1557
     * @var Smarty_Internal_Templatelexer
1558
     */
1559
    public $lex;
1560
1561
    /**
1562
     * {strip} status
1563
     *
1564
     * @var bool
1565
     */
1566
    public $strip = false;
1567
1568
    /**
1569
     * compiler object
1570
     *
1571
     * @var Smarty_Internal_TemplateCompilerBase
1572
     */
1573
    public $compiler = null;
1574
1575
    /**
1576
     * smarty object
1577
     *
1578
     * @var Smarty
1579
     */
1580
    public $smarty = null;
1581
1582
    /**
1583
     * template object
1584
     *
1585
     * @var Smarty_Internal_Template
1586
     */
1587
    public $template = null;
1588
1589
    /**
1590
     * block nesting level
1591
     *
1592
     * @var int
1593
     */
1594
    public $block_nesting_level = 0;
1595
1596
    /**
1597
     * security object
1598
     *
1599
     * @var Smarty_Security
1600
     */
1601
    public $security = null;
1602
1603
    /**
1604
     * template prefix array
1605
     *
1606
     * @var \Smarty_Internal_ParseTree[]
1607
     */
1608
    public $template_prefix = array();
1609
1610
    /**
1611
     * template prefix array
1612
     *
1613
     * @var \Smarty_Internal_ParseTree[]
1614
     */
1615
    public $template_postfix = array();
1616
1617
    public $yyTraceFILE;
1618
1619
    public $yyTracePrompt;
1620
1621
    public $yyidx;
1622
1623
    public $yyerrcnt;
1624
1625
    public $yystack          = array();
1626
1627
    public $yyTokenName      = array(
1628
        '$', 'VERT', 'COLON', 'UNIMATH',
1629
        'PHP', 'TEXT', 'STRIPON', 'STRIPOFF',
1630
        'LITERALSTART', 'LITERALEND', 'LITERAL', 'SIMPELOUTPUT',
1631
        'SIMPLETAG', 'SMARTYBLOCKCHILDPARENT', 'LDEL', 'RDEL',
1632
        'DOLLARID', 'EQUAL', 'ID', 'PTR',
1633
        'LDELMAKENOCACHE', 'LDELIF', 'LDELFOR', 'SEMICOLON',
1634
        'INCDEC', 'TO', 'STEP', 'LDELFOREACH',
1635
        'SPACE', 'AS', 'APTR', 'LDELSETFILTER',
1636
        'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER',
1637
        'COMMA', 'OPENP', 'CLOSEP', 'MATH',
1638
        'ISIN', 'QMARK', 'NOT', 'TYPECAST',
1639
        'HEX', 'DOT', 'INSTANCEOF', 'SINGLEQUOTESTRING',
1640
        'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH',
1641
        'OPENB', 'CLOSEB', 'DOLLAR', 'LOGOP',
1642
        'SLOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE',
1643
        'BACKTICK', 'error', 'start', 'template',
1644
        'literal_e2', 'literal_e1', 'smartytag', 'tagbody',
1645
        'tag', 'outattr', 'eqoutattr', 'varindexed',
1646
        'output', 'attributes', 'variable', 'value',
1647
        'expr', 'modifierlist', 'statement', 'statements',
1648
        'foraction', 'varvar', 'modparameters', 'attribute',
1649
        'ternary', 'array', 'tlop', 'lop',
1650
        'scond', 'function', 'ns1', 'doublequoted_with_quotes',
1651
        'static_class_access', 'object', 'arrayindex', 'indexdef',
1652
        'varvarele', 'objectchain', 'objectelement', 'method',
1653
        'params', 'modifier', 'modparameter', 'arrayelements',
1654
        'arrayelement', 'doublequoted', 'doublequotedcontent',
1655
    );
1656
1657
    /**
1658
     * internal error flag
1659
     *
1660
     * @var bool
1661
     */
1662
    private $internalError = false;                    /* Index of top element in stack */
1663
    private $_retvalue;                 /* Shifts left before out of the error */
1664
    /**
1665
     * constructor
1666
     *
1667
     * @param Smarty_Internal_Templatelexer        $lex
1668
     * @param Smarty_Internal_TemplateCompilerBase $compiler
1669
     */
1670
    public function __construct(Smarty_Internal_Templatelexer $lex, Smarty_Internal_TemplateCompilerBase $compiler)
1671
    {
1672
        $this->lex = $lex;
1673
        $this->compiler = $compiler;
1674
        $this->template = $this->compiler->template;
1675
        $this->smarty = $this->template->smarty;
1676
        $this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false;
0 ignored issues
show
Documentation Bug introduced by
It seems like isset($this->smarty->sec...security_policy : false can also be of type false. However, the property $security is declared as type object<Smarty_Security>. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
1677
        $this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template();
1678
    }  /* The parser's stack */
1679
    public static function yy_destructor($yymajor, $yypminor)
0 ignored issues
show
Unused Code introduced by
The parameter $yypminor is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
1680
    {
1681
        switch ($yymajor) {
1682
            default:
0 ignored issues
show
Unused Code introduced by
default: break; does not seem to be reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
1683
                break;   /* If no destructor action specified: do nothing */
1684
        }
1685
    }
1686
1687
    /**
1688
     * insert PHP code in current buffer
1689
     *
1690
     * @param string $code
1691
     */
1692
    public function insertPhpCode($code)
1693
    {
1694
        $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code));
0 ignored issues
show
Bug introduced by
It seems like you code against a specific sub-type and not the parent class Smarty_Internal_ParseTree as the method append_subtree() does only exist in the following sub-classes of Smarty_Internal_ParseTree: Smarty_Internal_ParseTree_Dq, Smarty_Internal_ParseTree_Template. Maybe you want to instanceof check for one of these explicitly?

Let’s take a look at an example:

abstract class User
{
    /** @return string */
    abstract public function getPassword();
}

class MyUser extends User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the parent class:

    abstract class User
    {
        /** @return string */
        abstract public function getPassword();
    
        /** @return string */
        abstract public function getDisplayName();
    }
    
Loading history...
1695
    }
1696
1697
    /**
1698
     * error rundown
1699
     *
1700
     */
1701
    public function errorRunDown()
1702
    {
1703
        while ($this->yystack !== array()) {
1704
            $this->yy_pop_parser_stack();
1705
        }
1706
        if (is_resource($this->yyTraceFILE)) {
1707
            fclose($this->yyTraceFILE);
1708
        }
1709
    }
1710
1711
    /**
1712
     *  merge PHP code with prefix code and return parse tree tag object
1713
     *
1714
     * @param string $code
1715
     *
1716
     * @return Smarty_Internal_ParseTree_Tag
1717
     */
1718
    public function mergePrefixCode($code)
1719
    {
1720
        $tmp = '';
1721
        foreach ($this->compiler->prefix_code as $preCode) {
1722
            $tmp .= $preCode;
1723
        }
1724
        $this->compiler->prefix_code = array();
1725
        $tmp .= $code;
1726
        return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true));
1727
    }
1728
1729
    public function Trace($TraceFILE, $zTracePrompt)
1730
    {
1731
        if (!$TraceFILE) {
1732
            $zTracePrompt = 0;
1733
        } elseif (!$zTracePrompt) {
1734
            $TraceFILE = 0;
1735
        }
1736
        $this->yyTraceFILE = $TraceFILE;
1737
        $this->yyTracePrompt = $zTracePrompt;
1738
    }
1739
1740
    public function PrintTrace()
1741
    {
1742
        $this->yyTraceFILE = fopen('php://output', 'w');
1743
        $this->yyTracePrompt = '<br>';
1744
    }
1745
1746
    public function tokenName($tokenType)
1747
    {
1748
        if ($tokenType === 0) {
1749
            return 'End of Input';
1750
        }
1751
        if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
1752
            return $this->yyTokenName[ $tokenType ];
1753
        } else {
1754
            return 'Unknown';
1755
        }
1756
    }
1757
1758
    public function yy_pop_parser_stack()
1759
    {
1760
        if (empty($this->yystack)) {
1761
            return;
1762
        }
1763
        $yytos = array_pop($this->yystack);
1764
        if ($this->yyTraceFILE && $this->yyidx >= 0) {
1765
            fwrite(
1766
                $this->yyTraceFILE,
1767
                $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] .
1768
                "\n"
1769
            );
1770
        }
1771
        $yymajor = $yytos->major;
1772
        self::yy_destructor($yymajor, $yytos->minor);
0 ignored issues
show
Unused Code introduced by
The call to the method Smarty_Internal_Templateparser::yy_destructor() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
1773
        $this->yyidx--;
1774
        return $yymajor;
1775
    }
1776
1777
    public function __destruct()
1778
    {
1779
        while ($this->yystack !== array()) {
1780
            $this->yy_pop_parser_stack();
1781
        }
1782
        if (is_resource($this->yyTraceFILE)) {
1783
            fclose($this->yyTraceFILE);
1784
        }
1785
    }
1786
1787
    public function yy_get_expected_tokens($token)
1788
    {
1789
        static $res3 = array();
1790
        static $res4 = array();
1791
        $state = $this->yystack[ $this->yyidx ]->stateno;
1792
        $expected = self::$yyExpectedTokens[ $state ];
1793
        if (isset($res3[ $state ][ $token ])) {
1794
            if ($res3[ $state ][ $token ]) {
1795
                return $expected;
1796
            }
1797
        } else {
1798
            if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
1799
                return $expected;
1800
            }
1801
        }
1802
        $stack = $this->yystack;
1803
        $yyidx = $this->yyidx;
1804
        do {
1805
            $yyact = $this->yy_find_shift_action($token);
1806
            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
1807
                // reduce action
1808
                $done = 0;
1809
                do {
1810
                    if ($done++ === 100) {
1811
                        $this->yyidx = $yyidx;
1812
                        $this->yystack = $stack;
1813
                        // too much recursion prevents proper detection
1814
                        // so give up
1815
                        return array_unique($expected);
1816
                    }
1817
                    $yyruleno = $yyact - self::YYNSTATE;
1818
                    $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
1819
                    $nextstate = $this->yy_find_reduce_action(
1820
                        $this->yystack[ $this->yyidx ]->stateno,
1821
                        self::$yyRuleInfo[ $yyruleno ][ 0 ]
1822
                    );
1823
                    if (isset(self::$yyExpectedTokens[ $nextstate ])) {
1824
                        $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
1825
                        if (isset($res4[ $nextstate ][ $token ])) {
1826
                            if ($res4[ $nextstate ][ $token ]) {
1827
                                $this->yyidx = $yyidx;
1828
                                $this->yystack = $stack;
1829
                                return array_unique($expected);
1830
                            }
1831
                        } else {
1832
                            if ($res4[ $nextstate ][ $token ] =
1833
                                in_array($token, self::$yyExpectedTokens[ $nextstate ], true)) {
1834
                                $this->yyidx = $yyidx;
1835
                                $this->yystack = $stack;
1836
                                return array_unique($expected);
1837
                            }
1838
                        }
1839
                    }
1840
                    if ($nextstate < self::YYNSTATE) {
1841
                        // we need to shift a non-terminal
1842
                        $this->yyidx++;
1843
                        $x = new TP_yyStackEntry;
1844
                        $x->stateno = $nextstate;
1845
                        $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
1846
                        $this->yystack[ $this->yyidx ] = $x;
1847
                        continue 2;
1848
                    } elseif ($nextstate === self::YYNSTATE + self::YYNRULE + 1) {
1849
                        $this->yyidx = $yyidx;
1850
                        $this->yystack = $stack;
1851
                        // the last token was just ignored, we can't accept
1852
                        // by ignoring input, this is in essence ignoring a
1853
                        // syntax error!
1854
                        return array_unique($expected);
1855
                    } elseif ($nextstate === self::YY_NO_ACTION) {
1856
                        $this->yyidx = $yyidx;
1857
                        $this->yystack = $stack;
1858
                        // input accepted, but not shifted (I guess)
1859
                        return $expected;
1860
                    } else {
1861
                        $yyact = $nextstate;
1862
                    }
1863
                } while (true);
1864
            }
1865
            break;
1866
        } while (true);
1867
        $this->yyidx = $yyidx;
1868
        $this->yystack = $stack;
1869
        return array_unique($expected);
1870
    }
1871
1872
    public function yy_is_expected_token($token)
1873
    {
1874
        static $res = array();
1875
        static $res2 = array();
1876
        if ($token === 0) {
1877
            return true; // 0 is not part of this
1878
        }
1879
        $state = $this->yystack[ $this->yyidx ]->stateno;
1880
        if (isset($res[ $state ][ $token ])) {
1881
            if ($res[ $state ][ $token ]) {
1882
                return true;
1883
            }
1884
        } else {
1885
            if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
1886
                return true;
1887
            }
1888
        }
1889
        $stack = $this->yystack;
1890
        $yyidx = $this->yyidx;
1891
        do {
1892
            $yyact = $this->yy_find_shift_action($token);
1893
            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
1894
                // reduce action
1895
                $done = 0;
1896
                do {
1897
                    if ($done++ === 100) {
1898
                        $this->yyidx = $yyidx;
1899
                        $this->yystack = $stack;
1900
                        // too much recursion prevents proper detection
1901
                        // so give up
1902
                        return true;
1903
                    }
1904
                    $yyruleno = $yyact - self::YYNSTATE;
1905
                    $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
1906
                    $nextstate = $this->yy_find_reduce_action(
1907
                        $this->yystack[ $this->yyidx ]->stateno,
1908
                        self::$yyRuleInfo[ $yyruleno ][ 0 ]
1909
                    );
1910
                    if (isset($res2[ $nextstate ][ $token ])) {
1911
                        if ($res2[ $nextstate ][ $token ]) {
1912
                            $this->yyidx = $yyidx;
1913
                            $this->yystack = $stack;
1914
                            return true;
1915
                        }
1916
                    } else {
1917
                        if ($res2[ $nextstate ][ $token ] =
1918
                            (isset(self::$yyExpectedTokens[ $nextstate ]) &&
1919
                             in_array($token, self::$yyExpectedTokens[ $nextstate ], true))) {
1920
                            $this->yyidx = $yyidx;
1921
                            $this->yystack = $stack;
1922
                            return true;
1923
                        }
1924
                    }
1925
                    if ($nextstate < self::YYNSTATE) {
1926
                        // we need to shift a non-terminal
1927
                        $this->yyidx++;
1928
                        $x = new TP_yyStackEntry;
1929
                        $x->stateno = $nextstate;
1930
                        $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
1931
                        $this->yystack[ $this->yyidx ] = $x;
1932
                        continue 2;
1933
                    } elseif ($nextstate === self::YYNSTATE + self::YYNRULE + 1) {
1934
                        $this->yyidx = $yyidx;
1935
                        $this->yystack = $stack;
1936
                        if (!$token) {
1937
                            // end of input: this is valid
1938
                            return true;
1939
                        }
1940
                        // the last token was just ignored, we can't accept
1941
                        // by ignoring input, this is in essence ignoring a
1942
                        // syntax error!
1943
                        return false;
1944
                    } elseif ($nextstate === self::YY_NO_ACTION) {
1945
                        $this->yyidx = $yyidx;
1946
                        $this->yystack = $stack;
1947
                        // input accepted, but not shifted (I guess)
1948
                        return true;
1949
                    } else {
1950
                        $yyact = $nextstate;
1951
                    }
1952
                } while (true);
1953
            }
1954
            break;
1955
        } while (true);
1956
        $this->yyidx = $yyidx;
1957
        $this->yystack = $stack;
1958
        return true;
1959
    }
1960
1961
    public function yy_find_shift_action($iLookAhead)
1962
    {
1963
        $stateno = $this->yystack[ $this->yyidx ]->stateno;
1964
        /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */
0 ignored issues
show
Unused Code Comprehensibility introduced by
53% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
1965
        if (!isset(self::$yy_shift_ofst[ $stateno ])) {
1966
            // no shift actions
1967
            return self::$yy_default[ $stateno ];
1968
        }
1969
        $i = self::$yy_shift_ofst[ $stateno ];
1970
        if ($i === self::YY_SHIFT_USE_DFLT) {
1971
            return self::$yy_default[ $stateno ];
1972
        }
1973
        if ($iLookAhead === self::YYNOCODE) {
1974
            return self::YY_NO_ACTION;
1975
        }
1976
        $i += $iLookAhead;
1977
        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
1978
            self::$yy_lookahead[ $i ] != $iLookAhead) {
1979
            if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
1980
                && ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0) {
1981
                if ($this->yyTraceFILE) {
1982
                    fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'FALLBACK ' .
1983
                                               $this->yyTokenName[ $iLookAhead ] . ' => ' .
1984
                                               $this->yyTokenName[ $iFallback ] . "\n");
1985
                }
1986
                return $this->yy_find_shift_action($iFallback);
1987
            }
1988
            return self::$yy_default[ $stateno ];
1989
        } else {
1990
            return self::$yy_action[ $i ];
1991
        }
1992
    }
1993
1994
    public function yy_find_reduce_action($stateno, $iLookAhead)
1995
    {
1996
        /* $stateno = $this->yystack[$this->yyidx]->stateno; */
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
1997
        if (!isset(self::$yy_reduce_ofst[ $stateno ])) {
1998
            return self::$yy_default[ $stateno ];
1999
        }
2000
        $i = self::$yy_reduce_ofst[ $stateno ];
2001
        if ($i === self::YY_REDUCE_USE_DFLT) {
2002
            return self::$yy_default[ $stateno ];
2003
        }
2004
        if ($iLookAhead === self::YYNOCODE) {
2005
            return self::YY_NO_ACTION;
2006
        }
2007
        $i += $iLookAhead;
2008
        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
2009
            self::$yy_lookahead[ $i ] != $iLookAhead) {
2010
            return self::$yy_default[ $stateno ];
2011
        } else {
2012
            return self::$yy_action[ $i ];
2013
        }
2014
    }
2015
2016
    // line 234 "../smarty/lexer/smarty_internal_templateparser.y"
2017
    public function yy_shift($yyNewState, $yyMajor, $yypMinor)
2018
    {
2019
        $this->yyidx++;
2020
        if ($this->yyidx >= self::YYSTACKDEPTH) {
2021
            $this->yyidx--;
2022
            if ($this->yyTraceFILE) {
2023
                fprintf($this->yyTraceFILE, "%sStack Overflow!\n", $this->yyTracePrompt);
2024
            }
2025
            while ($this->yyidx >= 0) {
2026
                $this->yy_pop_parser_stack();
2027
            }
2028
            // line 221 "../smarty/lexer/smarty_internal_templateparser.y"
2029
            $this->internalError = true;
2030
            $this->compiler->trigger_template_error('Stack overflow in template parser');
2031
            return;
2032
        }
2033
        $yytos = new TP_yyStackEntry;
2034
        $yytos->stateno = $yyNewState;
2035
        $yytos->major = $yyMajor;
2036
        $yytos->minor = $yypMinor;
2037
        $this->yystack[] = $yytos;
2038
        if ($this->yyTraceFILE && $this->yyidx > 0) {
2039
            fprintf(
2040
                $this->yyTraceFILE,
2041
                "%sShift %d\n",
2042
                $this->yyTracePrompt,
2043
                $yyNewState
2044
            );
2045
            fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
2046
            for ($i = 1; $i <= $this->yyidx; $i++) {
2047
                fprintf(
2048
                    $this->yyTraceFILE,
2049
                    " %s",
2050
                    $this->yyTokenName[ $this->yystack[ $i ]->major ]
2051
                );
2052
            }
2053
            fwrite($this->yyTraceFILE, "\n");
2054
        }
2055
    }
2056
2057
    // line 242 "../smarty/lexer/smarty_internal_templateparser.y"
2058
    public function yy_r0()
2059
    {
2060
        $this->root_buffer->prepend_array($this, $this->template_prefix);
2061
        $this->root_buffer->append_array($this, $this->template_postfix);
2062
        $this->_retvalue = $this->root_buffer->to_smarty_php($this);
2063
    }
2064
2065
    // line 251 "../smarty/lexer/smarty_internal_templateparser.y"
2066
    public function yy_r1()
2067
    {
2068
        $code =
2069
            $this->compiler->compileTag('private_php',
2070
                array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor), array('type' => $this->lex->phpType)),
2071
                array());
2072
        if ($this->compiler->has_code && !empty($code)) {
2073
            $tmp = '';
2074
            foreach ($this->compiler->prefix_code as $code) {
2075
                $tmp .= $code;
2076
            }
2077
            $this->compiler->prefix_code = array();
2078
            $this->current_buffer->append_subtree($this,
0 ignored issues
show
Bug introduced by
It seems like you code against a specific sub-type and not the parent class Smarty_Internal_ParseTree as the method append_subtree() does only exist in the following sub-classes of Smarty_Internal_ParseTree: Smarty_Internal_ParseTree_Dq, Smarty_Internal_ParseTree_Template. Maybe you want to instanceof check for one of these explicitly?

Let’s take a look at an example:

abstract class User
{
    /** @return string */
    abstract public function getPassword();
}

class MyUser extends User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the parent class:

    abstract class User
    {
        /** @return string */
        abstract public function getPassword();
    
        /** @return string */
        abstract public function getDisplayName();
    }
    
Loading history...
2079
                new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp . $code, true)));
2080
        }
2081
    }
2082
2083
    // line 255 "../smarty/lexer/smarty_internal_templateparser.y"
2084
    public function yy_r2()
2085
    {
2086
        $this->current_buffer->append_subtree($this,
0 ignored issues
show
Bug introduced by
It seems like you code against a specific sub-type and not the parent class Smarty_Internal_ParseTree as the method append_subtree() does only exist in the following sub-classes of Smarty_Internal_ParseTree: Smarty_Internal_ParseTree_Dq, Smarty_Internal_ParseTree_Template. Maybe you want to instanceof check for one of these explicitly?

Let’s take a look at an example:

abstract class User
{
    /** @return string */
    abstract public function getPassword();
}

class MyUser extends User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the parent class:

    abstract class User
    {
        /** @return string */
        abstract public function getPassword();
    
        /** @return string */
        abstract public function getDisplayName();
    }
    
Loading history...
2087
            $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor));
2088
    }
2089
2090
    // line 259 "../smarty/lexer/smarty_internal_templateparser.y"
2091
    public function yy_r3()
2092
    {
2093
        $this->strip = true;
2094
    }
2095
2096
    // line 264 "../smarty/lexer/smarty_internal_templateparser.y"
2097
    public function yy_r4()
2098
    {
2099
        $this->strip = false;
2100
    }
2101
2102
    // line 269 "../smarty/lexer/smarty_internal_templateparser.y"
2103
    public function yy_r5()
2104
    {
2105
        $this->current_buffer->append_subtree($this,
0 ignored issues
show
Bug introduced by
It seems like you code against a specific sub-type and not the parent class Smarty_Internal_ParseTree as the method append_subtree() does only exist in the following sub-classes of Smarty_Internal_ParseTree: Smarty_Internal_ParseTree_Dq, Smarty_Internal_ParseTree_Template. Maybe you want to instanceof check for one of these explicitly?

Let’s take a look at an example:

abstract class User
{
    /** @return string */
    abstract public function getPassword();
}

class MyUser extends User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the parent class:

    abstract class User
    {
        /** @return string */
        abstract public function getPassword();
    
        /** @return string */
        abstract public function getDisplayName();
    }
    
Loading history...
2106
            new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + -1 ]->minor));
2107
    }
2108
2109
    // line 272 "../smarty/lexer/smarty_internal_templateparser.y"
2110
    public function yy_r6()
2111
    {
2112
        $this->_retvalue = $this->yystack[ $this->yyidx + -3 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor;
2113
    }
2114
2115
    // line 276 "../smarty/lexer/smarty_internal_templateparser.y"
2116
    public function yy_r7()
2117
    {
2118
        $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
2119
    }
2120
2121
    // line 281 "../smarty/lexer/smarty_internal_templateparser.y"
2122
    public function yy_r8()
2123
    {
2124
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
2125
    }
2126
2127
    // line 285 "../smarty/lexer/smarty_internal_templateparser.y"
2128
    public function yy_r9()
2129
    {
2130
        $this->_retvalue = '';
2131
    }
2132
2133
    // line 297 "../smarty/lexer/smarty_internal_templateparser.y"
2134
    public function yy_r10()
2135
    {
2136
        if ($this->compiler->has_code) {
2137
            $this->current_buffer->append_subtree($this,
0 ignored issues
show
Bug introduced by
It seems like you code against a specific sub-type and not the parent class Smarty_Internal_ParseTree as the method append_subtree() does only exist in the following sub-classes of Smarty_Internal_ParseTree: Smarty_Internal_ParseTree_Dq, Smarty_Internal_ParseTree_Template. Maybe you want to instanceof check for one of these explicitly?

Let’s take a look at an example:

abstract class User
{
    /** @return string */
    abstract public function getPassword();
}

class MyUser extends User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the parent class:

    abstract class User
    {
        /** @return string */
        abstract public function getPassword();
    
        /** @return string */
        abstract public function getDisplayName();
    }
    
Loading history...
2138
                $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor));
2139
        }
2140
        $this->compiler->has_variable_string = false;
2141
        $this->block_nesting_level = count($this->compiler->_tag_stack);
2142
    }
2143
2144
    // line 307 "../smarty/lexer/smarty_internal_templateparser.y"
2145
    public function yy_r12()
2146
    {
2147
        $var =
2148
            trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
2149
                -$this->compiler->getRdelLength()), ' $');
2150
        if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) {
2151
            $this->_retvalue =
2152
                $this->compiler->compileTag('private_print_expression', array('nocache'),
2153
                    array('value' => $this->compiler->compileVariable('\'' . $match[ 1 ] . '\'')));
2154
        } else {
2155
            $this->_retvalue =
2156
                $this->compiler->compileTag('private_print_expression', array(),
2157
                    array('value' => $this->compiler->compileVariable('\'' . $var . '\'')));
2158
        }
2159
    }
2160
2161
    // line 328 "../smarty/lexer/smarty_internal_templateparser.y"
2162
    public function yy_r13()
2163
    {
2164
        $tag =
2165
            trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
2166
                -$this->compiler->getRdelLength()));
2167
        if ($tag == 'strip') {
2168
            $this->strip = true;
2169
            $this->_retvalue = null;;
2170
        } else {
2171
            if (defined($tag)) {
2172
                if ($this->security) {
2173
                    $this->security->isTrustedConstant($tag, $this->compiler);
2174
                }
2175
                $this->_retvalue =
2176
                    $this->compiler->compileTag('private_print_expression', array(), array('value' => $tag));
2177
            } else {
2178
                if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) {
2179
                    $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array('\'nocache\''));
2180
                } else {
2181
                    $this->_retvalue = $this->compiler->compileTag($tag, array());
2182
                }
2183
            }
2184
        }
2185
    }
2186
2187
    // line 339 "../smarty/lexer/smarty_internal_templateparser.y"
2188
    public function yy_r14()
2189
    {
2190
        $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.');
2191
        if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') {
2192
            // {$smarty.block.child}
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
2193
            $this->_retvalue =
2194
                $this->compiler->compileTag('child', array(), array($this->yystack[ $this->yyidx + 0 ]->minor));
2195
        } else {
2196
            // {$smarty.block.parent}
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
2197
            $this->_retvalue =
2198
                $this->compiler->compileTag('parent', array(), array($this->yystack[ $this->yyidx + 0 ]->minor));
2199
        }
2200
    }
2201
2202
    // line 343 "../smarty/lexer/smarty_internal_templateparser.y"
2203
    public function yy_r15()
2204
    {
2205
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
2206
    }
2207
2208
    // line 347 "../smarty/lexer/smarty_internal_templateparser.y"
2209
    public function yy_r16()
2210
    {
2211
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
2212
    }
2213
2214
    // line 356 "../smarty/lexer/smarty_internal_templateparser.y"
2215
    public function yy_r17()
2216
    {
2217
        $this->_retvalue =
2218
            $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ],
2219
                array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]));
2220
    }
2221
2222
    // line 360 "../smarty/lexer/smarty_internal_templateparser.y"
2223
    public function yy_r18()
2224
    {
2225
        $this->_retvalue =
2226
            $this->compiler->compileTag('assign', array_merge(array(
2227
                array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]),
2228
                array('var' => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'')
2229
            ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]));
2230
    }
2231
2232
    // line 364 "../smarty/lexer/smarty_internal_templateparser.y"
2233
    public function yy_r19()
2234
    {
2235
        $this->_retvalue =
2236
            $this->compiler->compileTag('assign', array_merge(array(
2237
                array('value' => $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ]),
2238
                array('var' => $this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ])
2239
            ), $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ]), array(
2240
                'smarty_internal_index' => $this->yystack[ $this->yyidx +
2241
                                                           -1 ]->minor[ 'smarty_internal_index' ]
2242
            ));
2243
    }
2244
2245
    // line 368 "../smarty/lexer/smarty_internal_templateparser.y"
2246
    public function yy_r20()
2247
    {
2248
        $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
2249
    }
2250
2251
    // line 383 "../smarty/lexer/smarty_internal_templateparser.y"
2252
    public function yy_r21()
2253
    {
2254
        $this->_retvalue = array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
2255
    }
2256
2257
    // line 393 "../smarty/lexer/smarty_internal_templateparser.y"
2258
    public function yy_r25()
2259
    {
2260
        if (defined($this->yystack[ $this->yyidx + -1 ]->minor)) {
2261
            if ($this->security) {
2262
                $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler);
2263
            }
2264
            $this->_retvalue =
2265
                $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
2266
                    array('value' => $this->yystack[ $this->yyidx + -1 ]->minor));
2267
        } else {
2268
            $this->_retvalue =
2269
                $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor,
2270
                    $this->yystack[ $this->yyidx + 0 ]->minor);
2271
        }
2272
    }
2273
2274
    // line 406 "../smarty/lexer/smarty_internal_templateparser.y"
2275
    public function yy_r26()
2276
    {
2277
        if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
2278
            if ($this->security) {
2279
                $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
2280
            }
2281
            $this->_retvalue =
2282
                $this->compiler->compileTag('private_print_expression', array(),
2283
                    array('value' => $this->yystack[ $this->yyidx + 0 ]->minor));
2284
        } else {
2285
            $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array());
2286
        }
2287
    }
2288
2289
    // line 418 "../smarty/lexer/smarty_internal_templateparser.y"
2290
    public function yy_r27()
2291
    {
2292
        if (defined($this->yystack[ $this->yyidx + -2 ]->minor)) {
2293
            if ($this->security) {
2294
                $this->security->isTrustedConstant($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler);
2295
            }
2296
            $this->_retvalue =
2297
                $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
2298
                    array(
2299
                        'value'        => $this->yystack[ $this->yyidx + -2 ]->minor,
2300
                        'modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor
2301
                    ));
2302
        } else {
2303
            $this->_retvalue =
2304
                $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor,
2305
                    $this->yystack[ $this->yyidx + 0 ]->minor,
2306
                    array('modifierlist' => $this->yystack[ $this->yyidx + -1 ]->minor));
2307
        }
2308
    }
2309
2310
    // line 423 "../smarty/lexer/smarty_internal_templateparser.y"
2311
    public function yy_r28()
2312
    {
2313
        $this->_retvalue =
2314
            $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor,
2315
                $this->yystack[ $this->yyidx + 0 ]->minor,
2316
                array('object_method' => $this->yystack[ $this->yyidx + -1 ]->minor));
2317
    }
2318
2319
    // line 428 "../smarty/lexer/smarty_internal_templateparser.y"
2320
    public function yy_r29()
2321
    {
2322
        $this->_retvalue =
2323
            $this->compiler->compileTag($this->yystack[ $this->yyidx + -4 ]->minor,
2324
                $this->yystack[ $this->yyidx + 0 ]->minor, array(
2325
                    'modifierlist'  => $this->yystack[ $this->yyidx + -1 ]->minor,
2326
                    'object_method' => $this->yystack[ $this->yyidx + -2 ]->minor
2327
                ));
2328
    }
2329
2330
    // line 433 "../smarty/lexer/smarty_internal_templateparser.y"
2331
    public function yy_r30()
2332
    {
2333
        $this->_retvalue =
2334
            $this->compiler->compileTag('make_nocache',
2335
                array(array('var' => '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'')));
2336
    }
2337
2338
    // line 438 "../smarty/lexer/smarty_internal_templateparser.y"
2339
    public function yy_r31()
2340
    {
2341
        $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength()));
2342
        $this->_retvalue =
2343
            $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(),
2344
                array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor));
2345
    }
2346
2347
    // line 443 "../smarty/lexer/smarty_internal_templateparser.y"
2348
    public function yy_r32()
2349
    {
2350
        $tag = trim(substr($this->yystack[ $this->yyidx + -2 ]->minor, $this->compiler->getLdelLength()));
2351
        $this->_retvalue =
2352
            $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag,
2353
                $this->yystack[ $this->yyidx + 0 ]->minor,
2354
                array('if condition' => $this->yystack[ $this->yyidx + -1 ]->minor));
2355
    }
2356
2357
    // line 454 "../smarty/lexer/smarty_internal_templateparser.y"
2358
    public function yy_r33()
2359
    {
2360
        $tag = trim(substr($this->yystack[ $this->yyidx + -1 ]->minor, $this->compiler->getLdelLength()));
2361
        $this->_retvalue =
2362
            $this->compiler->compileTag(($tag === 'else if') ? 'elseif' : $tag, array(),
2363
                array('if condition' => $this->yystack[ $this->yyidx + 0 ]->minor));
2364
    }
2365
2366
    // line 458 "../smarty/lexer/smarty_internal_templateparser.y"
2367
    public function yy_r35()
2368
    {
2369
        $this->_retvalue =
2370
            $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
2371
                array('start' => $this->yystack[ $this->yyidx + -6 ]->minor),
2372
                array('ifexp' => $this->yystack[ $this->yyidx + -4 ]->minor),
2373
                array('var' => $this->yystack[ $this->yyidx + -2 ]->minor),
2374
                array('step' => $this->yystack[ $this->yyidx + -1 ]->minor)
2375
            )), 1);
0 ignored issues
show
Documentation introduced by
1 is of type integer, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
2376
    }
2377
2378
    // line 466 "../smarty/lexer/smarty_internal_templateparser.y"
2379
    public function yy_r36()
2380
    {
2381
        $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor;
2382
    }
2383
2384
    // line 470 "../smarty/lexer/smarty_internal_templateparser.y"
2385
    public function yy_r38()
2386
    {
2387
        $this->_retvalue =
2388
            $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
2389
                array('start' => $this->yystack[ $this->yyidx + -3 ]->minor),
2390
                array('to' => $this->yystack[ $this->yyidx + -1 ]->minor)
2391
            )), 0);
0 ignored issues
show
Documentation introduced by
0 is of type integer, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
2392
    }
2393
2394
    // line 475 "../smarty/lexer/smarty_internal_templateparser.y"
2395
    public function yy_r39()
2396
    {
2397
        $this->_retvalue =
2398
            $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
2399
                array('start' => $this->yystack[ $this->yyidx + -5 ]->minor),
2400
                array('to' => $this->yystack[ $this->yyidx + -3 ]->minor),
2401
                array('step' => $this->yystack[ $this->yyidx + -1 ]->minor)
2402
            )), 0);
0 ignored issues
show
Documentation introduced by
0 is of type integer, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
2403
    }
2404
2405
    // line 479 "../smarty/lexer/smarty_internal_templateparser.y"
2406
    public function yy_r40()
2407
    {
2408
        $this->_retvalue =
2409
            $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
2410
                array('from' => $this->yystack[ $this->yyidx + -3 ]->minor),
2411
                array('item' => $this->yystack[ $this->yyidx + -1 ]->minor)
2412
            )));
2413
    }
2414
2415
    // line 482 "../smarty/lexer/smarty_internal_templateparser.y"
2416
    public function yy_r41()
2417
    {
2418
        $this->_retvalue =
2419
            $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor, array(
2420
                array('from' => $this->yystack[ $this->yyidx + -5 ]->minor),
2421
                array('item' => $this->yystack[ $this->yyidx + -1 ]->minor),
2422
                array('key' => $this->yystack[ $this->yyidx + -3 ]->minor)
2423
            )));
2424
    }
2425
2426
    // line 487 "../smarty/lexer/smarty_internal_templateparser.y"
2427
    public function yy_r42()
2428
    {
2429
        $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor);
2430
    }
2431
2432
    // line 491 "../smarty/lexer/smarty_internal_templateparser.y"
2433
    public function yy_r43()
2434
    {
2435
        $this->_retvalue =
2436
            $this->compiler->compileTag('setfilter', array(), array(
2437
                'modifier_list' => array(
2438
                    array_merge(array($this->yystack[ $this->yyidx + -1 ]->minor),
2439
                        $this->yystack[ $this->yyidx + 0 ]->minor)
2440
                )
2441
            ));
2442
    }
2443
2444
    // line 497 "../smarty/lexer/smarty_internal_templateparser.y"
2445
    public function yy_r44()
2446
    {
2447
        $this->_retvalue =
2448
            $this->compiler->compileTag('setfilter', array(), array(
2449
                'modifier_list' => array_merge(array(
2450
                    array_merge(array(
2451
                        $this->yystack[ $this->yyidx +
2452
                                        -2 ]->minor
2453
                    ), $this->yystack[ $this->yyidx + -1 ]->minor)
2454
                ), $this->yystack[ $this->yyidx + 0 ]->minor)
2455
            ));
2456
    }
2457
2458
    // line 506 "../smarty/lexer/smarty_internal_templateparser.y"
2459
    public function yy_r45()
2460
    {
2461
        $tag =
2462
            trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
2463
                -$this->compiler->getRdelLength()), ' /');
2464
        if ($tag === 'strip') {
2465
            $this->strip = false;
2466
            $this->_retvalue = null;
2467
        } else {
2468
            $this->_retvalue = $this->compiler->compileTag($tag . 'close', array());
2469
        }
2470
    }
2471
2472
    // line 510 "../smarty/lexer/smarty_internal_templateparser.y"
2473
    public function yy_r46()
2474
    {
2475
        $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array());
2476
    }
2477
2478
    // line 515 "../smarty/lexer/smarty_internal_templateparser.y"
2479
    public function yy_r47()
2480
    {
2481
        $this->_retvalue =
2482
            $this->compiler->compileTag($this->yystack[ $this->yyidx + -1 ]->minor . 'close', array(),
2483
                array('modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor));
2484
    }
2485
2486
    // line 519 "../smarty/lexer/smarty_internal_templateparser.y"
2487
    public function yy_r48()
2488
    {
2489
        $this->_retvalue =
2490
            $this->compiler->compileTag($this->yystack[ $this->yyidx + -2 ]->minor . 'close', array(),
2491
                array('object_method' => $this->yystack[ $this->yyidx + 0 ]->minor));
2492
    }
2493
2494
    // line 527 "../smarty/lexer/smarty_internal_templateparser.y"
2495
    public function yy_r49()
2496
    {
2497
        $this->_retvalue =
2498
            $this->compiler->compileTag($this->yystack[ $this->yyidx + -3 ]->minor . 'close', array(), array(
2499
                'object_method' => $this->yystack[ $this->yyidx + -1 ]->minor,
2500
                'modifier_list' => $this->yystack[ $this->yyidx + 0 ]->minor
2501
            ));
2502
    }
2503
2504
    // line 533 "../smarty/lexer/smarty_internal_templateparser.y"
2505
    public function yy_r50()
2506
    {
2507
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
2508
        $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor;
2509
    }
2510
2511
    // line 538 "../smarty/lexer/smarty_internal_templateparser.y"
2512
    public function yy_r51()
2513
    {
2514
        $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
2515
    }
2516
2517
    // line 543 "../smarty/lexer/smarty_internal_templateparser.y"
2518
    public function yy_r52()
2519
    {
2520
        $this->_retvalue = array();
2521
    }
2522
2523
    // line 554 "../smarty/lexer/smarty_internal_templateparser.y"
2524
    public function yy_r53()
2525
    {
2526
        if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
2527
            if ($this->security) {
2528
                $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
2529
            }
2530
            $this->_retvalue =
2531
                array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
2532
        } else {
2533
            $this->_retvalue =
2534
                array(
2535
                    $this->yystack[ $this->yyidx + -2 ]->minor => '\'' .
2536
                                                                  $this->yystack[ $this->yyidx + 0 ]->minor .
2537
                                                                  '\''
2538
                );
2539
        }
2540
    }
2541
2542
    // line 562 "../smarty/lexer/smarty_internal_templateparser.y"
2543
    public function yy_r54()
2544
    {
2545
        $this->_retvalue =
2546
            array(
2547
                trim($this->yystack[ $this->yyidx + -1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx +
2548
                                                                                                0 ]->minor
2549
            );
2550
    }
2551
2552
    // line 574 "../smarty/lexer/smarty_internal_templateparser.y"
2553
    public function yy_r56()
2554
    {
2555
        $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
2556
    }
2557
2558
    // line 587 "../smarty/lexer/smarty_internal_templateparser.y"
2559
    public function yy_r59()
2560
    {
2561
        $this->_retvalue =
2562
            array($this->yystack[ $this->yyidx + -2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
2563
    }
2564
2565
    // line 592 "../smarty/lexer/smarty_internal_templateparser.y"
2566
    public function yy_r61()
2567
    {
2568
        $this->yystack[ $this->yyidx + -2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor;
2569
        $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor;
2570
    }
2571
2572
    // line 599 "../smarty/lexer/smarty_internal_templateparser.y"
2573
    public function yy_r62()
2574
    {
2575
        $this->_retvalue =
2576
            array(
2577
                'var'   => '\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'',
2578
                'value' => $this->yystack[ $this->yyidx + 0 ]->minor
2579
            );
2580
    }
2581
2582
    // line 603 "../smarty/lexer/smarty_internal_templateparser.y"
2583
    public function yy_r64()
2584
    {
2585
        $this->_retvalue =
2586
            array(
2587
                'var'   => $this->yystack[ $this->yyidx + -2 ]->minor,
2588
                'value' => $this->yystack[ $this->yyidx + 0 ]->minor
2589
            );
2590
    }
2591
2592
    // line 623 "../smarty/lexer/smarty_internal_templateparser.y"
2593
    public function yy_r65()
2594
    {
2595
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
2596
    }
2597
2598
    // line 628 "../smarty/lexer/smarty_internal_templateparser.y"
2599
    public function yy_r68()
2600
    {
2601
        $this->_retvalue =
2602
            '$_smarty_tpl->getStreamVariable(\'' .
2603
            substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) .
2604
            '://' .
2605
            $this->yystack[ $this->yyidx + 0 ]->minor .
2606
            '\')';
2607
    }
2608
2609
    // line 642 "../smarty/lexer/smarty_internal_templateparser.y"
2610
    public function yy_r69()
2611
    {
2612
        $this->_retvalue =
2613
            $this->yystack[ $this->yyidx + -2 ]->minor .
2614
            trim($this->yystack[ $this->yyidx + -1 ]->minor) .
2615
            $this->yystack[ $this->yyidx + 0 ]->minor;
2616
    }
2617
2618
    // line 648 "../smarty/lexer/smarty_internal_templateparser.y"
2619
    public function yy_r72()
2620
    {
2621
        $this->_retvalue =
2622
            $this->compiler->compileTag('private_modifier', array(), array(
2623
                'value'        => $this->yystack[ $this->yyidx + -1 ]->minor,
2624
                'modifierlist' => $this->yystack[ $this->yyidx + 0 ]->minor
2625
            ));
2626
    }
2627
2628
    // line 652 "../smarty/lexer/smarty_internal_templateparser.y"
2629
    public function yy_r73()
2630
    {
2631
        $this->_retvalue =
2632
            $this->yystack[ $this->yyidx + -1 ]->minor[ 'pre' ] .
2633
            $this->yystack[ $this->yyidx + -2 ]->minor .
2634
            $this->yystack[ $this->yyidx + -1 ]->minor[ 'op' ] .
2635
            $this->yystack[ $this->yyidx + 0 ]->minor .
2636
            ')';
2637
    }
2638
2639
    // line 656 "../smarty/lexer/smarty_internal_templateparser.y"
2640
    public function yy_r74()
2641
    {
2642
        $this->_retvalue =
2643
            $this->yystack[ $this->yyidx + -2 ]->minor .
2644
            $this->yystack[ $this->yyidx + -1 ]->minor .
2645
            $this->yystack[ $this->yyidx + 0 ]->minor;
2646
    }
2647
2648
    // line 660 "../smarty/lexer/smarty_internal_templateparser.y"
2649
    public function yy_r75()
2650
    {
2651
        $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
2652
    }
2653
2654
    // line 664 "../smarty/lexer/smarty_internal_templateparser.y"
2655
    public function yy_r76()
2656
    {
2657
        $this->_retvalue =
2658
            'in_array(' .
2659
            $this->yystack[ $this->yyidx + -2 ]->minor .
2660
            ',' .
2661
            $this->yystack[ $this->yyidx + 0 ]->minor .
2662
            ')';
2663
    }
2664
2665
    // line 672 "../smarty/lexer/smarty_internal_templateparser.y"
2666
    public function yy_r77()
2667
    {
2668
        $this->_retvalue =
2669
            'in_array(' .
2670
            $this->yystack[ $this->yyidx + -2 ]->minor .
2671
            ',(array)' .
2672
            $this->yystack[ $this->yyidx + 0 ]->minor .
2673
            ')';
2674
    }
2675
2676
    // line 676 "../smarty/lexer/smarty_internal_templateparser.y"
2677
    public function yy_r78()
2678
    {
2679
        $this->_retvalue =
2680
            $this->yystack[ $this->yyidx + -5 ]->minor .
2681
            ' ? ' .
2682
            $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + -2 ]->minor, 1) . '\'') .
2683
            ' : ' .
2684
            $this->yystack[ $this->yyidx + 0 ]->minor;
2685
    }
2686
2687
    // line 686 "../smarty/lexer/smarty_internal_templateparser.y"
2688
    public function yy_r79()
2689
    {
2690
        $this->_retvalue =
2691
            $this->yystack[ $this->yyidx + -5 ]->minor .
2692
            ' ? ' .
2693
            $this->yystack[ $this->yyidx + -2 ]->minor .
2694
            ' : ' .
2695
            $this->yystack[ $this->yyidx + 0 ]->minor;
2696
    }
2697
2698
    // line 691 "../smarty/lexer/smarty_internal_templateparser.y"
2699
    public function yy_r81()
2700
    {
2701
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
2702
    }
2703
2704
    // line 712 "../smarty/lexer/smarty_internal_templateparser.y"
2705
    public function yy_r82()
2706
    {
2707
        $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor;
2708
    }
2709
2710
    // line 716 "../smarty/lexer/smarty_internal_templateparser.y"
2711
    public function yy_r87()
2712
    {
2713
        $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
2714
    }
2715
2716
    // line 720 "../smarty/lexer/smarty_internal_templateparser.y"
2717
    public function yy_r88()
2718
    {
2719
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.';
2720
    }
2721
2722
    // line 725 "../smarty/lexer/smarty_internal_templateparser.y"
2723
    public function yy_r89()
2724
    {
2725
        $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
2726
    }
2727
2728
    // line 742 "../smarty/lexer/smarty_internal_templateparser.y"
2729
    public function yy_r90()
2730
    {
2731
        if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
2732
            if ($this->security) {
2733
                $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
2734
            }
2735
            $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
2736
        } else {
2737
            $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
2738
        }
2739
    }
2740
2741
    // line 746 "../smarty/lexer/smarty_internal_templateparser.y"
2742
    public function yy_r92()
2743
    {
2744
        $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
2745
    }
2746
2747
    // line 764 "../smarty/lexer/smarty_internal_templateparser.y"
2748
    public function yy_r93()
2749
    {
2750
        $this->_retvalue =
2751
            $this->yystack[ $this->yyidx + -2 ]->minor .
2752
            $this->yystack[ $this->yyidx + -1 ]->minor .
2753
            $this->yystack[ $this->yyidx + 0 ]->minor;
2754
    }
2755
2756
    // line 775 "../smarty/lexer/smarty_internal_templateparser.y"
2757
    public function yy_r97()
2758
    {
2759
        $prefixVar = $this->compiler->getNewPrefixVariable();
2760
        if ($this->yystack[ $this->yyidx + -2 ]->minor[ 'var' ] === '\'smarty\'') {
2761
            $this->compiler->appendPrefixCode("<?php {$prefixVar} = " .
2762
                                              $this->compiler->compileTag('private_special_variable', array(),
2763
                                                  $this->yystack[ $this->yyidx +
2764
                                                                  -2 ]->minor[ 'smarty_internal_index' ]) .
2765
                                              ';?>');
2766
        } else {
2767
            $this->compiler->appendPrefixCode("<?php  {$prefixVar} = " .
2768
                                              $this->compiler->compileVariable($this->yystack[ $this->yyidx +
2769
                                                                                               -2 ]->minor[ 'var' ]) .
2770
                                              $this->yystack[ $this->yyidx + -2 ]->minor[ 'smarty_internal_index' ] .
2771
                                              ';?>');
2772
        }
2773
        $this->_retvalue =
2774
            $prefixVar .
2775
            '::' .
2776
            $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
2777
            $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
2778
    }
2779
2780
    // line 792 "../smarty/lexer/smarty_internal_templateparser.y"
2781
    public function yy_r98()
2782
    {
2783
        $prefixVar = $this->compiler->getNewPrefixVariable();
2784
        $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor);
2785
        $this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php {$prefixVar} = ob_get_clean();?>"));
2786
        $this->_retvalue = $prefixVar;
2787
    }
2788
2789
    // line 811 "../smarty/lexer/smarty_internal_templateparser.y"
2790
    public function yy_r101()
2791
    {
2792
        if (!in_array(strtolower($this->yystack[ $this->yyidx + -2 ]->minor), array('self', 'parent')) &&
2793
            (!$this->security ||
2794
             $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + -2 ]->minor,
2795
                 $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler))) {
2796
            if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ])) {
2797
                $this->_retvalue =
2798
                    $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + -2 ]->minor ] .
2799
                    '::' .
2800
                    $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
2801
                    $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
2802
            } else {
2803
                $this->_retvalue =
2804
                    $this->yystack[ $this->yyidx + -2 ]->minor .
2805
                    '::' .
2806
                    $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
2807
                    $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
2808
            }
2809
        } else {
2810
            $this->compiler->trigger_template_error('static class \'' .
2811
                                                    $this->yystack[ $this->yyidx + -2 ]->minor .
2812
                                                    '\' is undefined or not allowed by security setting');
2813
        }
2814
    }
2815
2816
    // line 822 "../smarty/lexer/smarty_internal_templateparser.y"
2817
    public function yy_r103()
2818
    {
2819
        $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
2820
    }
2821
2822
    // line 825 "../smarty/lexer/smarty_internal_templateparser.y"
2823
    public function yy_r104()
2824
    {
2825
        $this->_retvalue =
2826
            $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'');
2827
    }
2828
2829
    // line 838 "../smarty/lexer/smarty_internal_templateparser.y"
2830
    public function yy_r105()
2831
    {
2832
        if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] === '\'smarty\'') {
2833
            $smarty_var =
2834
                $this->compiler->compileTag('private_special_variable', array(),
2835
                    $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ]);
2836
            $this->_retvalue = $smarty_var;
2837
        } else {
2838
            // used for array reset,next,prev,end,current
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
2839
            $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ];
2840
            $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
2841
            $this->_retvalue =
2842
                $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) .
2843
                $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
2844
        }
2845
    }
2846
2847
    // line 848 "../smarty/lexer/smarty_internal_templateparser.y"
2848
    public function yy_r106()
2849
    {
2850
        $this->_retvalue =
2851
            '$_smarty_tpl->tpl_vars[' .
2852
            $this->yystack[ $this->yyidx + -2 ]->minor .
2853
            ']->' .
2854
            $this->yystack[ $this->yyidx + 0 ]->minor;
2855
    }
2856
2857
    // line 852 "../smarty/lexer/smarty_internal_templateparser.y"
2858
    public function yy_r108()
2859
    {
2860
        $this->_retvalue =
2861
            $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\'');
2862
    }
2863
2864
    // line 856 "../smarty/lexer/smarty_internal_templateparser.y"
2865
    public function yy_r109()
2866
    {
2867
        $this->_retvalue =
2868
            '(is_array($tmp = ' .
2869
            $this->compiler->compileConfigVariable('\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'') .
2870
            ') ? $tmp' .
2871
            $this->yystack[ $this->yyidx + 0 ]->minor .
2872
            ' :null)';
2873
    }
2874
2875
    // line 860 "../smarty/lexer/smarty_internal_templateparser.y"
2876
    public function yy_r110()
2877
    {
2878
        $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -1 ]->minor);
2879
    }
2880
2881
    // line 864 "../smarty/lexer/smarty_internal_templateparser.y"
2882
    public function yy_r111()
2883
    {
2884
        $this->_retvalue =
2885
            '(is_array($tmp = ' .
2886
            $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + -2 ]->minor) .
2887
            ') ? $tmp' .
2888
            $this->yystack[ $this->yyidx + 0 ]->minor .
2889
            ' : null)';
2890
    }
2891
2892
    // line 867 "../smarty/lexer/smarty_internal_templateparser.y"
2893
    public function yy_r112()
2894
    {
2895
        $this->_retvalue =
2896
            array(
2897
                'var'                   => '\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'',
2898
                'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor
2899
            );
2900
    }
2901
2902
    // line 880 "../smarty/lexer/smarty_internal_templateparser.y"
2903
    public function yy_r113()
2904
    {
2905
        $this->_retvalue =
2906
            array(
2907
                'var'                   => $this->yystack[ $this->yyidx + -1 ]->minor,
2908
                'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor
2909
            );
2910
    }
2911
2912
    // line 886 "../smarty/lexer/smarty_internal_templateparser.y"
2913
    public function yy_r115()
2914
    {
2915
        return;
2916
    }
2917
2918
    // line 889 "../smarty/lexer/smarty_internal_templateparser.y"
2919
    public function yy_r116()
2920
    {
2921
        $this->_retvalue =
2922
            '[' .
2923
            $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') .
2924
            ']';
2925
    }
2926
2927
    // line 893 "../smarty/lexer/smarty_internal_templateparser.y"
2928
    public function yy_r117()
2929
    {
2930
        $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']';
2931
    }
2932
2933
    // line 897 "../smarty/lexer/smarty_internal_templateparser.y"
2934
    public function yy_r118()
2935
    {
2936
        $this->_retvalue =
2937
            '[' .
2938
            $this->compiler->compileVariable($this->yystack[ $this->yyidx + -2 ]->minor) .
2939
            '->' .
2940
            $this->yystack[ $this->yyidx + 0 ]->minor .
2941
            ']';
2942
    }
2943
2944
    // line 901 "../smarty/lexer/smarty_internal_templateparser.y"
2945
    public function yy_r119()
2946
    {
2947
        $this->_retvalue = '[\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\']';
2948
    }
2949
2950
    // line 906 "../smarty/lexer/smarty_internal_templateparser.y"
2951
    public function yy_r120()
2952
    {
2953
        $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']';
2954
    }
2955
2956
    // line 911 "../smarty/lexer/smarty_internal_templateparser.y"
2957
    public function yy_r121()
2958
    {
2959
        $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']';
2960
    }
2961
2962
    // line 915 "../smarty/lexer/smarty_internal_templateparser.y"
2963
    public function yy_r122()
2964
    {
2965
        $this->_retvalue =
2966
            '[' .
2967
            $this->compiler->compileTag('private_special_variable', array(),
2968
                '[\'section\'][\'' . $this->yystack[ $this->yyidx + -1 ]->minor . '\'][\'index\']') .
0 ignored issues
show
Documentation introduced by
'[\'section\'][\'' . $th...inor . '\'][\'index\']' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
2969
            ']';
2970
    }
2971
2972
    // line 918 "../smarty/lexer/smarty_internal_templateparser.y"
2973
    public function yy_r123()
2974
    {
2975
        $this->_retvalue =
2976
            '[' .
2977
            $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' .
0 ignored issues
show
Documentation introduced by
'[\'section\'][\'' . $th...dx + -1]->minor . '\']' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
2978
                                                                             $this->yystack[ $this->yyidx +
2979
                                                                                             -3 ]->minor .
2980
                                                                             '\'][\'' .
2981
                                                                             $this->yystack[ $this->yyidx +
2982
                                                                                             -1 ]->minor .
2983
                                                                             '\']') .
2984
            ']';
2985
    }
2986
2987
    // line 924 "../smarty/lexer/smarty_internal_templateparser.y"
2988
    public function yy_r124()
2989
    {
2990
        $this->_retvalue = '[' . $this->yystack[ $this->yyidx + -1 ]->minor . ']';
2991
    }
2992
2993
    // line 940 "../smarty/lexer/smarty_internal_templateparser.y"
2994
    public function yy_r126()
2995
    {
2996
        $this->_retvalue =
2997
            '[' .
2998
            $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + -1 ]->minor, 1) . '\'') .
2999
            ']';
3000
    }
3001
3002
    // line 950 "../smarty/lexer/smarty_internal_templateparser.y"
3003
    public function yy_r130()
3004
    {
3005
        $this->_retvalue = '[]';
3006
    }
3007
3008
    // line 954 "../smarty/lexer/smarty_internal_templateparser.y"
3009
    public function yy_r131()
3010
    {
3011
        $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'';
3012
    }
3013
3014
    // line 959 "../smarty/lexer/smarty_internal_templateparser.y"
3015
    public function yy_r132()
3016
    {
3017
        $this->_retvalue = '\'\'';
3018
    }
3019
3020
    // line 967 "../smarty/lexer/smarty_internal_templateparser.y"
3021
    public function yy_r133()
3022
    {
3023
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
3024
    }
3025
3026
    // line 973 "../smarty/lexer/smarty_internal_templateparser.y"
3027
    public function yy_r135()
3028
    {
3029
        $var =
3030
            trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler->getLdelLength(),
3031
                -$this->compiler->getRdelLength()), ' $');
3032
        $this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\'');
3033
    }
3034
3035
    // line 980 "../smarty/lexer/smarty_internal_templateparser.y"
3036
    public function yy_r136()
3037
    {
3038
        $this->_retvalue = '(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
3039
    }
3040
3041
    // line 989 "../smarty/lexer/smarty_internal_templateparser.y"
3042
    public function yy_r137()
3043
    {
3044
        if ($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ] === '\'smarty\'') {
3045
            $this->_retvalue =
3046
                $this->compiler->compileTag('private_special_variable', array(),
3047
                    $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ]) .
3048
                $this->yystack[ $this->yyidx + 0 ]->minor;
3049
        } else {
3050
            $this->_retvalue =
3051
                $this->compiler->compileVariable($this->yystack[ $this->yyidx + -1 ]->minor[ 'var' ]) .
3052
                $this->yystack[ $this->yyidx + -1 ]->minor[ 'smarty_internal_index' ] .
3053
                $this->yystack[ $this->yyidx + 0 ]->minor;
3054
        }
3055
    }
3056
3057
    // line 994 "../smarty/lexer/smarty_internal_templateparser.y"
3058
    public function yy_r138()
3059
    {
3060
        $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
3061
    }
3062
3063
    // line 999 "../smarty/lexer/smarty_internal_templateparser.y"
3064
    public function yy_r139()
3065
    {
3066
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
3067
    }
3068
3069
    // line 1006 "../smarty/lexer/smarty_internal_templateparser.y"
3070
    public function yy_r140()
3071
    {
3072
        if ($this->security && substr($this->yystack[ $this->yyidx + -1 ]->minor, 0, 1) === '_') {
3073
            $this->compiler->trigger_template_error(self::ERR1);
3074
        }
3075
        $this->_retvalue =
3076
            '->' . $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
3077
    }
3078
3079
    // line 1013 "../smarty/lexer/smarty_internal_templateparser.y"
3080
    public function yy_r141()
3081
    {
3082
        if ($this->security) {
3083
            $this->compiler->trigger_template_error(self::ERR2);
3084
        }
3085
        $this->_retvalue =
3086
            '->{' .
3087
            $this->compiler->compileVariable($this->yystack[ $this->yyidx + -1 ]->minor) .
3088
            $this->yystack[ $this->yyidx + 0 ]->minor .
3089
            '}';
3090
    }
3091
3092
    // line 1020 "../smarty/lexer/smarty_internal_templateparser.y"
3093
    public function yy_r142()
3094
    {
3095
        if ($this->security) {
3096
            $this->compiler->trigger_template_error(self::ERR2);
3097
        }
3098
        $this->_retvalue =
3099
            '->{' . $this->yystack[ $this->yyidx + -2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}';
3100
    }
3101
3102
    // line 1028 "../smarty/lexer/smarty_internal_templateparser.y"
3103
    public function yy_r143()
3104
    {
3105
        if ($this->security) {
3106
            $this->compiler->trigger_template_error(self::ERR2);
3107
        }
3108
        $this->_retvalue =
3109
            '->{\'' .
3110
            $this->yystack[ $this->yyidx + -4 ]->minor .
3111
            '\'.' .
3112
            $this->yystack[ $this->yyidx + -2 ]->minor .
3113
            $this->yystack[ $this->yyidx + 0 ]->minor .
3114
            '}';
3115
    }
3116
3117
    // line 1036 "../smarty/lexer/smarty_internal_templateparser.y"
3118
    public function yy_r144()
3119
    {
3120
        $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor;
3121
    }
3122
3123
    // line 1044 "../smarty/lexer/smarty_internal_templateparser.y"
3124
    public function yy_r145()
3125
    {
3126
        $this->_retvalue =
3127
            $this->compiler->compilePHPFunctionCall($this->yystack[ $this->yyidx + -3 ]->minor,
3128
                $this->yystack[ $this->yyidx + -1 ]->minor);
3129
    }
3130
3131
    // line 1051 "../smarty/lexer/smarty_internal_templateparser.y"
3132
    public function yy_r146()
3133
    {
3134
        if ($this->security && substr($this->yystack[ $this->yyidx + -3 ]->minor, 0, 1) === '_') {
3135
            $this->compiler->trigger_template_error(self::ERR1);
3136
        }
3137
        $this->_retvalue =
3138
            $this->yystack[ $this->yyidx + -3 ]->minor .
3139
            '(' .
3140
            implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) .
3141
            ')';
3142
    }
3143
3144
    // line 1062 "../smarty/lexer/smarty_internal_templateparser.y"
3145
    public function yy_r147()
3146
    {
3147
        if ($this->security) {
3148
            $this->compiler->trigger_template_error(self::ERR2);
3149
        }
3150
        $prefixVar = $this->compiler->getNewPrefixVariable();
3151
        $this->compiler->appendPrefixCode("<?php {$prefixVar} = " .
3152
                                          $this->compiler->compileVariable('\'' .
3153
                                                                           substr($this->yystack[ $this->yyidx +
3154
                                                                                                  -3 ]->minor, 1) .
3155
                                                                           '\'') .
3156
                                          ';?>');
3157
        $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + -1 ]->minor) . ')';
3158
    }
3159
3160
    // line 1079 "../smarty/lexer/smarty_internal_templateparser.y"
3161
    public function yy_r148()
3162
    {
3163
        $this->_retvalue =
3164
            array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
3165
    }
3166
3167
    // line 1083 "../smarty/lexer/smarty_internal_templateparser.y"
3168
    public function yy_r151()
3169
    {
3170
        $this->_retvalue =
3171
            array_merge($this->yystack[ $this->yyidx + -2 ]->minor, array(
3172
                array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor)
3173
            ));
3174
    }
3175
3176
    // line 1091 "../smarty/lexer/smarty_internal_templateparser.y"
3177
    public function yy_r152()
3178
    {
3179
        $this->_retvalue =
3180
            array(array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor));
3181
    }
3182
3183
    // line 1099 "../smarty/lexer/smarty_internal_templateparser.y"
3184
    public function yy_r154()
3185
    {
3186
        $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
3187
    }
3188
3189
    // line 1118 "../smarty/lexer/smarty_internal_templateparser.y"
3190
    public function yy_r155()
3191
    {
3192
        $this->_retvalue =
3193
            array_merge($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
3194
    }
3195
3196
    // line 1123 "../smarty/lexer/smarty_internal_templateparser.y"
3197
    public function yy_r159()
3198
    {
3199
        $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method');
3200
    }
3201
3202
    // line 1128 "../smarty/lexer/smarty_internal_templateparser.y"
3203
    public function yy_r160()
3204
    {
3205
        $this->_retvalue =
3206
            array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method');
3207
    }
3208
3209
    // line 1133 "../smarty/lexer/smarty_internal_templateparser.y"
3210
    public function yy_r161()
3211
    {
3212
        $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '');
3213
    }
3214
3215
    // line 1138 "../smarty/lexer/smarty_internal_templateparser.y"
3216
    public function yy_r162()
3217
    {
3218
        $this->_retvalue =
3219
            array($this->yystack[ $this->yyidx + -1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property');
3220
    }
3221
3222
    // line 1144 "../smarty/lexer/smarty_internal_templateparser.y"
3223
    public function yy_r163()
3224
    {
3225
        $this->_retvalue =
3226
            array(
3227
                $this->yystack[ $this->yyidx + -2 ]->minor,
3228
                $this->yystack[ $this->yyidx + -1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor, 'property'
3229
            );
3230
    }
3231
3232
    // line 1148 "../smarty/lexer/smarty_internal_templateparser.y"
3233
    public function yy_r164()
3234
    {
3235
        $this->_retvalue = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' ';
3236
    }
3237
3238
    // line 1167 "../smarty/lexer/smarty_internal_templateparser.y"
3239
    public function yy_r165()
3240
    {
3241
        static $lops = array(
3242
            'eq'  => ' == ',
3243
            'ne'  => ' != ',
3244
            'neq' => ' != ',
3245
            'gt'  => ' > ',
3246
            'ge'  => ' >= ',
3247
            'gte' => ' >= ',
3248
            'lt'  => ' < ',
3249
            'le'  => ' <= ',
3250
            'lte' => ' <= ',
3251
            'mod' => ' % ',
3252
            'and' => ' && ',
3253
            'or'  => ' || ',
3254
            'xor' => ' xor ',
3255
        );
3256
        $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
3257
        $this->_retvalue = $lops[ $op ];
3258
    }
3259
3260
    // line 1180 "../smarty/lexer/smarty_internal_templateparser.y"
3261
    public function yy_r166()
3262
    {
3263
        static $tlops = array(
3264
            'isdivby'     => array('op' => ' % ', 'pre' => '!('),
3265
            'isnotdivby'  => array('op' => ' % ', 'pre' => '('),
3266
            'isevenby'    => array('op' => ' / ', 'pre' => '!(1 & '),
3267
            'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
3268
            'isoddby'     => array('op' => ' / ', 'pre' => '(1 & '),
3269
            'isnotoddby'  => array('op' => ' / ', 'pre' => '!(1 & '),
3270
        );
3271
        $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
3272
        $this->_retvalue = $tlops[ $op ];
3273
    }
3274
3275
    // line 1194 "../smarty/lexer/smarty_internal_templateparser.y"
3276
    public function yy_r167()
3277
    {
3278
        static $scond = array(
3279
            'iseven'    => '!(1 & ',
3280
            'isnoteven' => '(1 & ',
3281
            'isodd'     => '(1 & ',
3282
            'isnotodd'  => '!(1 & ',
3283
        );
3284
        $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor));
3285
        $this->_retvalue = $scond[ $op ];
3286
    }
3287
3288
    // line 1202 "../smarty/lexer/smarty_internal_templateparser.y"
3289
    public function yy_r168()
3290
    {
3291
        $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')';
3292
    }
3293
3294
    // line 1210 "../smarty/lexer/smarty_internal_templateparser.y"
3295
    public function yy_r170()
3296
    {
3297
        $this->_retvalue = $this->yystack[ $this->yyidx + -2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor;
3298
    }
3299
3300
    // line 1214 "../smarty/lexer/smarty_internal_templateparser.y"
3301
    public function yy_r172()
3302
    {
3303
        $this->_retvalue =
3304
            $this->yystack[ $this->yyidx + -2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
3305
    }
3306
3307
    // line 1230 "../smarty/lexer/smarty_internal_templateparser.y"
3308
    public function yy_r173()
3309
    {
3310
        $this->_retvalue =
3311
            '\'' . $this->yystack[ $this->yyidx + -2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
3312
    }
3313
3314
    // line 1236 "../smarty/lexer/smarty_internal_templateparser.y"
3315
    public function yy_r176()
3316
    {
3317
        $this->compiler->leaveDoubleQuote();
3318
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor->to_smarty_php($this);
3319
    }
3320
3321
    // line 1241 "../smarty/lexer/smarty_internal_templateparser.y"
3322
    public function yy_r177()
3323
    {
3324
        $this->yystack[ $this->yyidx + -1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
3325
        $this->_retvalue = $this->yystack[ $this->yyidx + -1 ]->minor;
3326
    }
3327
3328
    // line 1245 "../smarty/lexer/smarty_internal_templateparser.y"
3329
    public function yy_r178()
3330
    {
3331
        $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor);
3332
    }
3333
3334
    // line 1249 "../smarty/lexer/smarty_internal_templateparser.y"
3335
    public function yy_r179()
3336
    {
3337
        $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + -1 ]->minor);
3338
    }
3339
3340
    // line 1253 "../smarty/lexer/smarty_internal_templateparser.y"
3341
    public function yy_r180()
3342
    {
3343
        $this->_retvalue =
3344
            new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + -1 ]->minor . ')');
3345
    }
3346
3347
    // line 1265 "../smarty/lexer/smarty_internal_templateparser.y"
3348
    public function yy_r181()
3349
    {
3350
        $this->_retvalue =
3351
            new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' .
3352
                                               substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) .
3353
                                               '\']->value');
3354
    }
3355
3356
    // line 1269 "../smarty/lexer/smarty_internal_templateparser.y"
3357
    public function yy_r184()
3358
    {
3359
        $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor);
3360
    }
3361
3362
    public function yy_r185()
3363
    {
3364
        $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor);
3365
    }
3366
3367
    public function yy_reduce($yyruleno)
3368
    {
3369
        if ($this->yyTraceFILE && $yyruleno >= 0
3370
            && $yyruleno < count(self::$yyRuleName)) {
3371
            fprintf(
3372
                $this->yyTraceFILE,
3373
                "%sReduce (%d) [%s].\n",
3374
                $this->yyTracePrompt,
3375
                $yyruleno,
3376
                self::$yyRuleName[ $yyruleno ]
3377
            );
3378
        }
3379
        $this->_retvalue = $yy_lefthand_side = null;
3380
        if (isset(self::$yyReduceMap[ $yyruleno ])) {
3381
            // call the action
3382
            $this->_retvalue = null;
3383
            $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}();
3384
            $yy_lefthand_side = $this->_retvalue;
3385
        }
3386
        $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ];
3387
        $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ];
3388
        $this->yyidx -= $yysize;
3389
        for ($i = $yysize; $i; $i--) {
3390
            // pop all of the right-hand side parameters
3391
            array_pop($this->yystack);
3392
        }
3393
        $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto);
3394
        if ($yyact < self::YYNSTATE) {
3395
            if (!$this->yyTraceFILE && $yysize) {
3396
                $this->yyidx++;
3397
                $x = new TP_yyStackEntry;
3398
                $x->stateno = $yyact;
3399
                $x->major = $yygoto;
3400
                $x->minor = $yy_lefthand_side;
3401
                $this->yystack[ $this->yyidx ] = $x;
3402
            } else {
3403
                $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
3404
            }
3405
        } elseif ($yyact === self::YYNSTATE + self::YYNRULE + 1) {
3406
            $this->yy_accept();
3407
        }
3408
    }
3409
3410
    public function yy_parse_failed()
3411
    {
3412
        if ($this->yyTraceFILE) {
3413
            fprintf($this->yyTraceFILE, "%sFail!\n", $this->yyTracePrompt);
3414
        }
3415
        while ($this->yyidx >= 0) {
3416
            $this->yy_pop_parser_stack();
3417
        }
3418
    }
3419
3420
    public function yy_syntax_error($yymajor, $TOKEN)
0 ignored issues
show
Unused Code introduced by
The parameter $TOKEN is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
3421
    {
3422
        // line 214 "../smarty/lexer/smarty_internal_templateparser.y"
3423
        $this->internalError = true;
3424
        $this->yymajor = $yymajor;
3425
        $this->compiler->trigger_template_error();
3426
    }
3427
3428
    public function yy_accept()
3429
    {
3430
        if ($this->yyTraceFILE) {
3431
            fprintf($this->yyTraceFILE, "%sAccept!\n", $this->yyTracePrompt);
3432
        }
3433
        while ($this->yyidx >= 0) {
3434
            $this->yy_pop_parser_stack();
3435
        }
3436
        // line 207 "../smarty/lexer/smarty_internal_templateparser.y"
3437
        $this->successful = !$this->internalError;
3438
        $this->internalError = false;
3439
        $this->retvalue = $this->_retvalue;
3440
    }
3441
3442
    public function doParse($yymajor, $yytokenvalue)
3443
    {
3444
        $yyerrorhit = 0;   /* True if yymajor has invoked an error */
3445
        if ($this->yyidx === null || $this->yyidx < 0) {
3446
            $this->yyidx = 0;
3447
            $this->yyerrcnt = -1;
3448
            $x = new TP_yyStackEntry;
3449
            $x->stateno = 0;
3450
            $x->major = 0;
3451
            $this->yystack = array();
3452
            $this->yystack[] = $x;
3453
        }
3454
        $yyendofinput = ($yymajor == 0);
3455
        if ($this->yyTraceFILE) {
3456
            fprintf(
3457
                $this->yyTraceFILE,
3458
                "%sInput %s\n",
3459
                $this->yyTracePrompt,
3460
                $this->yyTokenName[ $yymajor ]
3461
            );
3462
        }
3463
        do {
3464
            $yyact = $this->yy_find_shift_action($yymajor);
3465
            if ($yymajor < self::YYERRORSYMBOL &&
3466
                !$this->yy_is_expected_token($yymajor)) {
3467
                // force a syntax error
3468
                $yyact = self::YY_ERROR_ACTION;
3469
            }
3470
            if ($yyact < self::YYNSTATE) {
3471
                $this->yy_shift($yyact, $yymajor, $yytokenvalue);
3472
                $this->yyerrcnt--;
3473
                if ($yyendofinput && $this->yyidx >= 0) {
3474
                    $yymajor = 0;
3475
                } else {
3476
                    $yymajor = self::YYNOCODE;
3477
                }
3478
            } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
3479
                $this->yy_reduce($yyact - self::YYNSTATE);
3480
            } elseif ($yyact === self::YY_ERROR_ACTION) {
3481
                if ($this->yyTraceFILE) {
3482
                    fprintf(
3483
                        $this->yyTraceFILE,
3484
                        "%sSyntax Error!\n",
3485
                        $this->yyTracePrompt
3486
                    );
3487
                }
3488
                if (self::YYERRORSYMBOL) {
3489
                    if ($this->yyerrcnt < 0) {
3490
                        $this->yy_syntax_error($yymajor, $yytokenvalue);
3491
                    }
3492
                    $yymx = $this->yystack[ $this->yyidx ]->major;
3493
                    if ($yymx === self::YYERRORSYMBOL || $yyerrorhit) {
3494
                        if ($this->yyTraceFILE) {
3495
                            fprintf(
3496
                                $this->yyTraceFILE,
3497
                                "%sDiscard input token %s\n",
3498
                                $this->yyTracePrompt,
3499
                                $this->yyTokenName[ $yymajor ]
3500
                            );
3501
                        }
3502
                        $this->yy_destructor($yymajor, $yytokenvalue);
0 ignored issues
show
Unused Code introduced by
The call to the method Smarty_Internal_Templateparser::yy_destructor() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
3503
                        $yymajor = self::YYNOCODE;
3504
                    } else {
3505
                        while ($this->yyidx >= 0 &&
3506
                               $yymx !== self::YYERRORSYMBOL &&
3507
                               ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
3508
                        ) {
3509
                            $this->yy_pop_parser_stack();
3510
                        }
3511
                        if ($this->yyidx < 0 || $yymajor == 0) {
3512
                            $this->yy_destructor($yymajor, $yytokenvalue);
0 ignored issues
show
Unused Code introduced by
The call to the method Smarty_Internal_Templateparser::yy_destructor() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
3513
                            $this->yy_parse_failed();
3514
                            $yymajor = self::YYNOCODE;
3515
                        } elseif ($yymx !== self::YYERRORSYMBOL) {
3516
                            $u2 = 0;
3517
                            $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
3518
                        }
3519
                    }
3520
                    $this->yyerrcnt = 3;
3521
                    $yyerrorhit = 1;
3522
                } else {
3523
                    if ($this->yyerrcnt <= 0) {
3524
                        $this->yy_syntax_error($yymajor, $yytokenvalue);
3525
                    }
3526
                    $this->yyerrcnt = 3;
3527
                    $this->yy_destructor($yymajor, $yytokenvalue);
0 ignored issues
show
Unused Code introduced by
The call to the method Smarty_Internal_Templateparser::yy_destructor() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
3528
                    if ($yyendofinput) {
3529
                        $this->yy_parse_failed();
3530
                    }
3531
                    $yymajor = self::YYNOCODE;
3532
                }
3533
            } else {
3534
                $this->yy_accept();
3535
                $yymajor = self::YYNOCODE;
3536
            }
3537
        } while ($yymajor !== self::YYNOCODE && $this->yyidx >= 0);
3538
    }
3539
}
3540