1 |
|
---|
2 | /* A Bison parser, made from grammar.y
|
---|
3 | by GNU Bison version 1.28 */
|
---|
4 |
|
---|
5 | #define YYBISON 1 /* Identify Bison output. */
|
---|
6 |
|
---|
7 | #define yyparse kjsyyparse
|
---|
8 | #define yylex kjsyylex
|
---|
9 | #define yyerror kjsyyerror
|
---|
10 | #define yylval kjsyylval
|
---|
11 | #define yychar kjsyychar
|
---|
12 | #define yydebug kjsyydebug
|
---|
13 | #define yynerrs kjsyynerrs
|
---|
14 | #define YYLSP_NEEDED
|
---|
15 |
|
---|
16 | #define NULLTOKEN 257
|
---|
17 | #define TRUETOKEN 258
|
---|
18 | #define FALSETOKEN 259
|
---|
19 | #define STRING 260
|
---|
20 | #define NUMBER 261
|
---|
21 | #define BREAK 262
|
---|
22 | #define CASE 263
|
---|
23 | #define DEFAULT 264
|
---|
24 | #define FOR 265
|
---|
25 | #define NEW 266
|
---|
26 | #define VAR 267
|
---|
27 | #define CONTINUE 268
|
---|
28 | #define FUNCTION 269
|
---|
29 | #define RETURN 270
|
---|
30 | #define VOID 271
|
---|
31 | #define DELETE 272
|
---|
32 | #define IF 273
|
---|
33 | #define THIS 274
|
---|
34 | #define DO 275
|
---|
35 | #define WHILE 276
|
---|
36 | #define ELSE 277
|
---|
37 | #define IN 278
|
---|
38 | #define INSTANCEOF 279
|
---|
39 | #define TYPEOF 280
|
---|
40 | #define SWITCH 281
|
---|
41 | #define WITH 282
|
---|
42 | #define RESERVED 283
|
---|
43 | #define THROW 284
|
---|
44 | #define TRY 285
|
---|
45 | #define CATCH 286
|
---|
46 | #define FINALLY 287
|
---|
47 | #define EQEQ 288
|
---|
48 | #define NE 289
|
---|
49 | #define STREQ 290
|
---|
50 | #define STRNEQ 291
|
---|
51 | #define LE 292
|
---|
52 | #define GE 293
|
---|
53 | #define OR 294
|
---|
54 | #define AND 295
|
---|
55 | #define PLUSPLUS 296
|
---|
56 | #define MINUSMINUS 297
|
---|
57 | #define LSHIFT 298
|
---|
58 | #define RSHIFT 299
|
---|
59 | #define URSHIFT 300
|
---|
60 | #define PLUSEQUAL 301
|
---|
61 | #define MINUSEQUAL 302
|
---|
62 | #define MULTEQUAL 303
|
---|
63 | #define DIVEQUAL 304
|
---|
64 | #define LSHIFTEQUAL 305
|
---|
65 | #define RSHIFTEQUAL 306
|
---|
66 | #define URSHIFTEQUAL 307
|
---|
67 | #define ANDEQUAL 308
|
---|
68 | #define MODEQUAL 309
|
---|
69 | #define XOREQUAL 310
|
---|
70 | #define OREQUAL 311
|
---|
71 | #define IDENT 312
|
---|
72 | #define AUTOPLUSPLUS 313
|
---|
73 | #define AUTOMINUSMINUS 314
|
---|
74 |
|
---|
75 | #line 1 "grammar.y"
|
---|
76 |
|
---|
77 |
|
---|
78 | /*
|
---|
79 | * This file is part of the KDE libraries
|
---|
80 | * Copyright (C) 1999-2000 Harri Porten ([email protected])
|
---|
81 | *
|
---|
82 | * This library is free software; you can redistribute it and/or
|
---|
83 | * modify it under the terms of the GNU Lesser General Public
|
---|
84 | * License as published by the Free Software Foundation; either
|
---|
85 | * version 2 of the License, or (at your option) any later version.
|
---|
86 | *
|
---|
87 | * This library is distributed in the hope that it will be useful,
|
---|
88 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
89 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
90 | * Lesser General Public License for more details.
|
---|
91 | *
|
---|
92 | * You should have received a copy of the GNU Lesser General Public
|
---|
93 | * License along with this library; if not, write to the Free Software
|
---|
94 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
95 | *
|
---|
96 | */
|
---|
97 |
|
---|
98 | #ifdef HAVE_CONFIG_H
|
---|
99 | #include <config.h>
|
---|
100 | #endif
|
---|
101 | #include <string.h>
|
---|
102 | #include <stdlib.h>
|
---|
103 | #include "value.h"
|
---|
104 | #include "object.h"
|
---|
105 | #include "types.h"
|
---|
106 | #include "interpreter.h"
|
---|
107 | #include "nodes.h"
|
---|
108 | #include "lexer.h"
|
---|
109 | #include "internal.h"
|
---|
110 |
|
---|
111 | // Not sure why, but yacc doesn't add this define along with the others.
|
---|
112 | #define yylloc kjsyylloc
|
---|
113 |
|
---|
114 | /* default values for bison */
|
---|
115 | #define YYDEBUG 0
|
---|
116 | #define YYMAXDEPTH 0
|
---|
117 | #if !APPLE_CHANGES
|
---|
118 | #define YYERROR_VERBOSE
|
---|
119 | #endif
|
---|
120 | #define DBG(l, s, e) { l->setLoc(s.first_line, e.last_line, Parser::sid); } // location
|
---|
121 |
|
---|
122 | extern int kjsyylex();
|
---|
123 | int kjsyyerror(const char *);
|
---|
124 | static bool automatic();
|
---|
125 |
|
---|
126 | using namespace KJS;
|
---|
127 |
|
---|
128 |
|
---|
129 | #line 55 "grammar.y"
|
---|
130 | typedef union {
|
---|
131 | int ival;
|
---|
132 | double dval;
|
---|
133 | UString *ustr;
|
---|
134 | Identifier *ident;
|
---|
135 | Node *node;
|
---|
136 | StatementNode *stat;
|
---|
137 | ParameterNode *param;
|
---|
138 | FunctionBodyNode *body;
|
---|
139 | FuncDeclNode *func;
|
---|
140 | ProgramNode *prog;
|
---|
141 | AssignExprNode *init;
|
---|
142 | SourceElementsNode *srcs;
|
---|
143 | StatListNode *slist;
|
---|
144 | ArgumentsNode *args;
|
---|
145 | ArgumentListNode *alist;
|
---|
146 | VarDeclNode *decl;
|
---|
147 | VarDeclListNode *vlist;
|
---|
148 | CaseBlockNode *cblk;
|
---|
149 | ClauseListNode *clist;
|
---|
150 | CaseClauseNode *ccl;
|
---|
151 | ElementNode *elm;
|
---|
152 | Operator op;
|
---|
153 | PropertyValueNode *plist;
|
---|
154 | PropertyNode *pnode;
|
---|
155 | CatchNode *cnode;
|
---|
156 | FinallyNode *fnode;
|
---|
157 | } YYSTYPE;
|
---|
158 |
|
---|
159 | #ifndef YYLTYPE
|
---|
160 | typedef
|
---|
161 | struct yyltype
|
---|
162 | {
|
---|
163 | int timestamp;
|
---|
164 | int first_line;
|
---|
165 | int first_column;
|
---|
166 | int last_line;
|
---|
167 | int last_column;
|
---|
168 | char *text;
|
---|
169 | }
|
---|
170 | yyltype;
|
---|
171 |
|
---|
172 | #define YYLTYPE yyltype
|
---|
173 | #endif
|
---|
174 |
|
---|
175 | #include <stdio.h>
|
---|
176 |
|
---|
177 | #ifndef __cplusplus
|
---|
178 | #ifndef __STDC__
|
---|
179 | #define const
|
---|
180 | #endif
|
---|
181 | #endif
|
---|
182 |
|
---|
183 |
|
---|
184 |
|
---|
185 | #define YYFINAL 358
|
---|
186 | #define YYFLAG -32768
|
---|
187 | #define YYNTBASE 85
|
---|
188 |
|
---|
189 | #define YYTRANSLATE(x) ((unsigned)(x) <= 314 ? yytranslate[x] : 149)
|
---|
190 |
|
---|
191 | static const char yytranslate[] = { 0,
|
---|
192 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
193 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
194 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
195 | 2, 2, 74, 2, 2, 2, 76, 79, 2, 62,
|
---|
196 | 63, 75, 71, 68, 72, 70, 61, 2, 2, 2,
|
---|
197 | 2, 2, 2, 2, 2, 2, 2, 69, 84, 77,
|
---|
198 | 83, 78, 82, 2, 2, 2, 2, 2, 2, 2,
|
---|
199 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
200 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
201 | 66, 2, 67, 80, 2, 2, 2, 2, 2, 2,
|
---|
202 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
203 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
204 | 2, 2, 64, 81, 65, 73, 2, 2, 2, 2,
|
---|
205 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
206 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
207 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
208 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
209 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
210 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
211 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
212 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
213 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
214 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
215 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
216 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
217 | 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
|
---|
218 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
---|
219 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
---|
220 | 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
---|
221 | 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
|
---|
222 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
---|
223 | 57, 58, 59, 60
|
---|
224 | };
|
---|
225 |
|
---|
226 | #if YYDEBUG != 0
|
---|
227 | static const short yyprhs[] = { 0,
|
---|
228 | 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
|
---|
229 | 20, 22, 26, 29, 33, 37, 41, 47, 50, 55,
|
---|
230 | 56, 58, 60, 63, 67, 73, 75, 77, 79, 81,
|
---|
231 | 83, 88, 92, 96, 98, 101, 104, 107, 112, 116,
|
---|
232 | 119, 123, 125, 129, 131, 133, 135, 138, 141, 143,
|
---|
233 | 146, 149, 152, 155, 158, 161, 164, 167, 170, 173,
|
---|
234 | 176, 178, 182, 186, 190, 192, 196, 200, 202, 206,
|
---|
235 | 210, 214, 216, 220, 224, 228, 232, 236, 240, 242,
|
---|
236 | 246, 250, 254, 258, 260, 264, 266, 270, 272, 276,
|
---|
237 | 278, 282, 284, 288, 290, 296, 298, 302, 304, 306,
|
---|
238 | 308, 310, 312, 314, 316, 318, 320, 322, 324, 326,
|
---|
239 | 328, 332, 334, 336, 338, 340, 342, 344, 346, 348,
|
---|
240 | 350, 352, 354, 356, 358, 360, 363, 367, 369, 372,
|
---|
241 | 376, 380, 382, 386, 388, 391, 394, 396, 399, 402,
|
---|
242 | 408, 416, 423, 429, 439, 450, 458, 467, 477, 478,
|
---|
243 | 480, 483, 486, 490, 494, 497, 500, 504, 508, 511,
|
---|
244 | 514, 518, 522, 528, 534, 538, 544, 545, 547, 549,
|
---|
245 | 552, 556, 561, 564, 568, 572, 576, 580, 584, 589,
|
---|
246 | 595, 598, 604, 611, 616, 622, 624, 628, 631, 635,
|
---|
247 | 636, 638, 640, 643, 645
|
---|
248 | };
|
---|
249 |
|
---|
250 | static const short yyrhs[] = { 3,
|
---|
251 | 0, 4, 0, 5, 0, 7, 0, 6, 0, 61,
|
---|
252 | 0, 50, 0, 20, 0, 58, 0, 85, 0, 87,
|
---|
253 | 0, 62, 114, 63, 0, 64, 65, 0, 64, 91,
|
---|
254 | 65, 0, 66, 89, 67, 0, 66, 88, 67, 0,
|
---|
255 | 66, 88, 68, 89, 67, 0, 89, 112, 0, 88,
|
---|
256 | 68, 89, 112, 0, 0, 90, 0, 68, 0, 90,
|
---|
257 | 68, 0, 92, 69, 112, 0, 91, 68, 92, 69,
|
---|
258 | 112, 0, 58, 0, 6, 0, 7, 0, 86, 0,
|
---|
259 | 143, 0, 93, 66, 114, 67, 0, 93, 70, 58,
|
---|
260 | 0, 12, 93, 96, 0, 93, 0, 12, 94, 0,
|
---|
261 | 93, 96, 0, 95, 96, 0, 95, 66, 114, 67,
|
---|
262 | 0, 95, 70, 58, 0, 62, 63, 0, 62, 97,
|
---|
263 | 63, 0, 112, 0, 97, 68, 112, 0, 94, 0,
|
---|
264 | 95, 0, 98, 0, 98, 42, 0, 98, 43, 0,
|
---|
265 | 99, 0, 18, 100, 0, 17, 100, 0, 26, 100,
|
---|
266 | 0, 42, 100, 0, 59, 100, 0, 43, 100, 0,
|
---|
267 | 60, 100, 0, 71, 100, 0, 72, 100, 0, 73,
|
---|
268 | 100, 0, 74, 100, 0, 100, 0, 101, 75, 100,
|
---|
269 | 0, 101, 61, 100, 0, 101, 76, 100, 0, 101,
|
---|
270 | 0, 102, 71, 101, 0, 102, 72, 101, 0, 102,
|
---|
271 | 0, 103, 44, 102, 0, 103, 45, 102, 0, 103,
|
---|
272 | 46, 102, 0, 103, 0, 104, 77, 103, 0, 104,
|
---|
273 | 78, 103, 0, 104, 38, 103, 0, 104, 39, 103,
|
---|
274 | 0, 104, 25, 103, 0, 104, 24, 103, 0, 104,
|
---|
275 | 0, 105, 34, 104, 0, 105, 35, 104, 0, 105,
|
---|
276 | 36, 104, 0, 105, 37, 104, 0, 105, 0, 106,
|
---|
277 | 79, 105, 0, 106, 0, 107, 80, 105, 0, 107,
|
---|
278 | 0, 108, 81, 105, 0, 108, 0, 109, 41, 108,
|
---|
279 | 0, 109, 0, 110, 40, 109, 0, 110, 0, 110,
|
---|
280 | 82, 112, 69, 112, 0, 111, 0, 98, 113, 112,
|
---|
281 | 0, 83, 0, 47, 0, 48, 0, 49, 0, 50,
|
---|
282 | 0, 51, 0, 52, 0, 53, 0, 54, 0, 56,
|
---|
283 | 0, 57, 0, 55, 0, 112, 0, 114, 68, 112,
|
---|
284 | 0, 116, 0, 118, 0, 122, 0, 123, 0, 124,
|
---|
285 | 0, 125, 0, 127, 0, 128, 0, 129, 0, 130,
|
---|
286 | 0, 131, 0, 137, 0, 138, 0, 139, 0, 64,
|
---|
287 | 65, 0, 64, 147, 65, 0, 115, 0, 117, 115,
|
---|
288 | 0, 13, 119, 84, 0, 13, 119, 1, 0, 120,
|
---|
289 | 0, 119, 68, 120, 0, 58, 0, 58, 121, 0,
|
---|
290 | 83, 112, 0, 84, 0, 114, 84, 0, 114, 1,
|
---|
291 | 0, 19, 62, 114, 63, 115, 0, 19, 62, 114,
|
---|
292 | 63, 115, 23, 115, 0, 21, 115, 22, 62, 114,
|
---|
293 | 63, 0, 22, 62, 114, 63, 115, 0, 11, 62,
|
---|
294 | 126, 84, 126, 84, 126, 63, 115, 0, 11, 62,
|
---|
295 | 13, 119, 84, 126, 84, 126, 63, 115, 0, 11,
|
---|
296 | 62, 98, 24, 114, 63, 115, 0, 11, 62, 13,
|
---|
297 | 58, 24, 114, 63, 115, 0, 11, 62, 13, 58,
|
---|
298 | 121, 24, 114, 63, 115, 0, 0, 114, 0, 14,
|
---|
299 | 84, 0, 14, 1, 0, 14, 58, 84, 0, 14,
|
---|
300 | 58, 1, 0, 8, 84, 0, 8, 1, 0, 8,
|
---|
301 | 58, 84, 0, 8, 58, 1, 0, 16, 84, 0,
|
---|
302 | 16, 1, 0, 16, 114, 84, 0, 16, 114, 1,
|
---|
303 | 0, 28, 62, 114, 63, 115, 0, 27, 62, 114,
|
---|
304 | 63, 132, 0, 64, 133, 65, 0, 64, 133, 136,
|
---|
305 | 133, 65, 0, 0, 134, 0, 135, 0, 134, 135,
|
---|
306 | 0, 9, 114, 69, 0, 9, 114, 69, 117, 0,
|
---|
307 | 10, 69, 0, 10, 69, 117, 0, 58, 69, 115,
|
---|
308 | 0, 30, 114, 84, 0, 31, 116, 140, 0, 31,
|
---|
309 | 116, 141, 0, 31, 116, 140, 141, 0, 32, 62,
|
---|
310 | 58, 63, 116, 0, 33, 116, 0, 15, 58, 62,
|
---|
311 | 63, 145, 0, 15, 58, 62, 144, 63, 145, 0,
|
---|
312 | 15, 62, 63, 145, 0, 15, 62, 144, 63, 145,
|
---|
313 | 0, 58, 0, 144, 68, 58, 0, 64, 65, 0,
|
---|
314 | 64, 147, 65, 0, 0, 147, 0, 148, 0, 147,
|
---|
315 | 148, 0, 115, 0, 142, 0
|
---|
316 | };
|
---|
317 |
|
---|
318 | #endif
|
---|
319 |
|
---|
320 | #if YYDEBUG != 0
|
---|
321 | static const short yyrline[] = { 0,
|
---|
322 | 169, 171, 172, 173, 174, 175, 178, 184, 186, 187,
|
---|
323 | 188, 189, 190, 191, 194, 196, 197, 200, 202, 206,
|
---|
324 | 208, 211, 213, 216, 218, 222, 224, 225, 228, 230,
|
---|
325 | 231, 232, 233, 236, 238, 241, 243, 244, 245, 248,
|
---|
326 | 250, 253, 255, 258, 260, 263, 265, 266, 269, 271,
|
---|
327 | 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
|
---|
328 | 284, 286, 287, 288, 291, 293, 294, 297, 299, 300,
|
---|
329 | 301, 304, 306, 308, 310, 312, 314, 316, 320, 322,
|
---|
330 | 323, 324, 325, 328, 330, 333, 335, 338, 340, 343,
|
---|
331 | 345, 349, 351, 355, 357, 361, 363, 367, 369, 370,
|
---|
332 | 371, 372, 373, 374, 375, 376, 377, 378, 379, 382,
|
---|
333 | 384, 387, 389, 390, 391, 392, 393, 394, 395, 396,
|
---|
334 | 397, 398, 399, 400, 401, 404, 406, 409, 411, 414,
|
---|
335 | 417, 426, 428, 432, 434, 437, 441, 445, 448, 455,
|
---|
336 | 457, 461, 463, 464, 467, 470, 473, 476, 481, 483,
|
---|
337 | 486, 488, 492, 493, 499, 501, 505, 506, 513, 515,
|
---|
338 | 519, 520, 526, 531, 536, 538, 542, 544, 547, 549,
|
---|
339 | 552, 554, 557, 559, 562, 567, 571, 573, 574, 577,
|
---|
340 | 581, 585, 587, 590, 592, 597, 599, 602, 605, 609,
|
---|
341 | 612, 616, 618, 621, 623
|
---|
342 | };
|
---|
343 | #endif
|
---|
344 |
|
---|
345 |
|
---|
346 | #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
|
---|
347 |
|
---|
348 | static const char * const yytname[] = { "$","error","$undefined.","NULLTOKEN",
|
---|
349 | "TRUETOKEN","FALSETOKEN","STRING","NUMBER","BREAK","CASE","DEFAULT","FOR","NEW",
|
---|
350 | "VAR","CONTINUE","FUNCTION","RETURN","VOID","DELETE","IF","THIS","DO","WHILE",
|
---|
351 | "ELSE","IN","INSTANCEOF","TYPEOF","SWITCH","WITH","RESERVED","THROW","TRY","CATCH",
|
---|
352 | "FINALLY","EQEQ","NE","STREQ","STRNEQ","LE","GE","OR","AND","PLUSPLUS","MINUSMINUS",
|
---|
353 | "LSHIFT","RSHIFT","URSHIFT","PLUSEQUAL","MINUSEQUAL","MULTEQUAL","DIVEQUAL",
|
---|
354 | "LSHIFTEQUAL","RSHIFTEQUAL","URSHIFTEQUAL","ANDEQUAL","MODEQUAL","XOREQUAL",
|
---|
355 | "OREQUAL","IDENT","AUTOPLUSPLUS","AUTOMINUSMINUS","'/'","'('","')'","'{'","'}'",
|
---|
356 | "'['","']'","','","':'","'.'","'+'","'-'","'~'","'!'","'*'","'%'","'<'","'>'",
|
---|
357 | "'&'","'^'","'|'","'?'","'='","';'","Literal","PrimaryExpr","ArrayLiteral","ElementList",
|
---|
358 | "ElisionOpt","Elision","PropertyNameAndValueList","PropertyName","MemberExpr",
|
---|
359 | "NewExpr","CallExpr","Arguments","ArgumentList","LeftHandSideExpr","PostfixExpr",
|
---|
360 | "UnaryExpr","MultiplicativeExpr","AdditiveExpr","ShiftExpr","RelationalExpr",
|
---|
361 | "EqualityExpr","BitwiseANDExpr","BitwiseXORExpr","BitwiseORExpr","LogicalANDExpr",
|
---|
362 | "LogicalORExpr","ConditionalExpr","AssignmentExpr","AssignmentOperator","Expr",
|
---|
363 | "Statement","Block","StatementList","VariableStatement","VariableDeclarationList",
|
---|
364 | "VariableDeclaration","Initializer","EmptyStatement","ExprStatement","IfStatement",
|
---|
365 | "IterationStatement","ExprOpt","ContinueStatement","BreakStatement","ReturnStatement",
|
---|
366 | "WithStatement","SwitchStatement","CaseBlock","CaseClausesOpt","CaseClauses",
|
---|
367 | "CaseClause","DefaultClause","LabelledStatement","ThrowStatement","TryStatement",
|
---|
368 | "Catch","Finally","FunctionDeclaration","FunctionExpr","FormalParameterList",
|
---|
369 | "FunctionBody","Program","SourceElements","SourceElement", NULL
|
---|
370 | };
|
---|
371 | #endif
|
---|
372 |
|
---|
373 | static const short yyr1[] = { 0,
|
---|
374 | 85, 85, 85, 85, 85, 85, 85, 86, 86, 86,
|
---|
375 | 86, 86, 86, 86, 87, 87, 87, 88, 88, 89,
|
---|
376 | 89, 90, 90, 91, 91, 92, 92, 92, 93, 93,
|
---|
377 | 93, 93, 93, 94, 94, 95, 95, 95, 95, 96,
|
---|
378 | 96, 97, 97, 98, 98, 99, 99, 99, 100, 100,
|
---|
379 | 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
---|
380 | 101, 101, 101, 101, 102, 102, 102, 103, 103, 103,
|
---|
381 | 103, 104, 104, 104, 104, 104, 104, 104, 105, 105,
|
---|
382 | 105, 105, 105, 106, 106, 107, 107, 108, 108, 109,
|
---|
383 | 109, 110, 110, 111, 111, 112, 112, 113, 113, 113,
|
---|
384 | 113, 113, 113, 113, 113, 113, 113, 113, 113, 114,
|
---|
385 | 114, 115, 115, 115, 115, 115, 115, 115, 115, 115,
|
---|
386 | 115, 115, 115, 115, 115, 116, 116, 117, 117, 118,
|
---|
387 | 118, 119, 119, 120, 120, 121, 122, 123, 123, 124,
|
---|
388 | 124, 125, 125, 125, 125, 125, 125, 125, 126, 126,
|
---|
389 | 127, 127, 127, 127, 128, 128, 128, 128, 129, 129,
|
---|
390 | 129, 129, 130, 131, 132, 132, 133, 133, 134, 134,
|
---|
391 | 135, 135, 136, 136, 137, 138, 139, 139, 139, 140,
|
---|
392 | 141, 142, 142, 143, 143, 144, 144, 145, 145, 146,
|
---|
393 | 146, 147, 147, 148, 148
|
---|
394 | };
|
---|
395 |
|
---|
396 | static const short yyr2[] = { 0,
|
---|
397 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
398 | 1, 3, 2, 3, 3, 3, 5, 2, 4, 0,
|
---|
399 | 1, 1, 2, 3, 5, 1, 1, 1, 1, 1,
|
---|
400 | 4, 3, 3, 1, 2, 2, 2, 4, 3, 2,
|
---|
401 | 3, 1, 3, 1, 1, 1, 2, 2, 1, 2,
|
---|
402 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
---|
403 | 1, 3, 3, 3, 1, 3, 3, 1, 3, 3,
|
---|
404 | 3, 1, 3, 3, 3, 3, 3, 3, 1, 3,
|
---|
405 | 3, 3, 3, 1, 3, 1, 3, 1, 3, 1,
|
---|
406 | 3, 1, 3, 1, 5, 1, 3, 1, 1, 1,
|
---|
407 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
408 | 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
---|
409 | 1, 1, 1, 1, 1, 2, 3, 1, 2, 3,
|
---|
410 | 3, 1, 3, 1, 2, 2, 1, 2, 2, 5,
|
---|
411 | 7, 6, 5, 9, 10, 7, 8, 9, 0, 1,
|
---|
412 | 2, 2, 3, 3, 2, 2, 3, 3, 2, 2,
|
---|
413 | 3, 3, 5, 5, 3, 5, 0, 1, 1, 2,
|
---|
414 | 3, 4, 2, 3, 3, 3, 3, 3, 4, 5,
|
---|
415 | 2, 5, 6, 4, 5, 1, 3, 2, 3, 0,
|
---|
416 | 1, 1, 2, 1, 1
|
---|
417 | };
|
---|
418 |
|
---|
419 | static const short yydefact[] = { 190,
|
---|
420 | 1, 2, 3, 5, 4, 0, 0, 0, 0, 0,
|
---|
421 | 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
|
---|
422 | 0, 0, 0, 0, 0, 7, 9, 0, 0, 6,
|
---|
423 | 0, 0, 20, 0, 0, 0, 0, 137, 10, 29,
|
---|
424 | 11, 34, 44, 45, 46, 49, 61, 65, 68, 72,
|
---|
425 | 79, 84, 86, 88, 90, 92, 94, 96, 110, 0,
|
---|
426 | 194, 112, 113, 114, 115, 116, 117, 118, 119, 120,
|
---|
427 | 121, 122, 123, 124, 125, 195, 30, 191, 192, 156,
|
---|
428 | 0, 155, 149, 0, 9, 0, 34, 35, 134, 0,
|
---|
429 | 132, 152, 0, 151, 0, 0, 160, 159, 0, 46,
|
---|
430 | 51, 50, 0, 0, 0, 52, 0, 0, 0, 0,
|
---|
431 | 0, 53, 55, 0, 54, 56, 0, 5, 4, 9,
|
---|
432 | 13, 0, 0, 0, 22, 0, 0, 21, 57, 58,
|
---|
433 | 59, 60, 0, 0, 0, 36, 0, 0, 37, 47,
|
---|
434 | 48, 99, 100, 101, 102, 103, 104, 105, 106, 109,
|
---|
435 | 107, 108, 98, 0, 0, 0, 0, 0, 0, 0,
|
---|
436 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
437 | 0, 0, 0, 0, 0, 0, 0, 0, 139, 0,
|
---|
438 | 138, 193, 158, 157, 0, 46, 150, 0, 27, 28,
|
---|
439 | 26, 13, 33, 0, 135, 131, 0, 130, 154, 153,
|
---|
440 | 0, 186, 0, 0, 162, 161, 0, 0, 0, 0,
|
---|
441 | 0, 176, 126, 0, 0, 177, 178, 175, 12, 14,
|
---|
442 | 0, 0, 127, 16, 20, 15, 18, 23, 40, 0,
|
---|
443 | 42, 0, 32, 0, 39, 97, 63, 62, 64, 66,
|
---|
444 | 67, 69, 70, 71, 78, 77, 75, 76, 73, 74,
|
---|
445 | 80, 81, 82, 83, 85, 87, 89, 91, 93, 0,
|
---|
446 | 111, 134, 0, 0, 149, 136, 133, 0, 0, 0,
|
---|
447 | 184, 0, 0, 0, 0, 0, 0, 0, 0, 181,
|
---|
448 | 179, 0, 24, 0, 41, 0, 31, 38, 0, 0,
|
---|
449 | 135, 149, 0, 0, 182, 0, 188, 0, 185, 187,
|
---|
450 | 140, 0, 143, 167, 164, 163, 0, 0, 17, 19,
|
---|
451 | 43, 95, 0, 0, 0, 0, 149, 183, 189, 0,
|
---|
452 | 142, 0, 0, 168, 169, 0, 25, 0, 0, 149,
|
---|
453 | 146, 0, 141, 0, 0, 165, 167, 170, 180, 147,
|
---|
454 | 0, 0, 0, 171, 173, 0, 148, 0, 144, 128,
|
---|
455 | 172, 174, 166, 145, 129, 0, 0, 0
|
---|
456 | };
|
---|
457 |
|
---|
458 | static const short yydefgoto[] = { 39,
|
---|
459 | 40, 41, 126, 127, 128, 122, 123, 42, 43, 44,
|
---|
460 | 136, 230, 45, 46, 47, 48, 49, 50, 51, 52,
|
---|
461 | 53, 54, 55, 56, 57, 58, 59, 154, 60, 61,
|
---|
462 | 62, 351, 63, 90, 91, 195, 64, 65, 66, 67,
|
---|
463 | 188, 68, 69, 70, 71, 72, 305, 323, 324, 325,
|
---|
464 | 337, 73, 74, 75, 216, 217, 76, 77, 204, 271,
|
---|
465 | 356, 124, 79
|
---|
466 | };
|
---|
467 |
|
---|
468 | static const short yypact[] = { 779,
|
---|
469 | -32768,-32768,-32768,-32768,-32768, 5, -28, 111, -30, 6,
|
---|
470 | -31, 335, 1252, 1252, -16,-32768, 853, -5, 1252, 9,
|
---|
471 | 57, 1252, -20, 1252, 1252,-32768, -21, 1252, 1252,-32768,
|
---|
472 | 1252, 409, -1, 1252, 1252, 1252, 1252,-32768,-32768,-32768,
|
---|
473 | -32768, 42,-32768, 43, 179,-32768,-32768, -14, 12, 195,
|
---|
474 | 82, 118, 72, 85, 93, 151, -23,-32768,-32768, 11,
|
---|
475 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
---|
476 | -32768,-32768,-32768,-32768,-32768,-32768,-32768, 779,-32768,-32768,
|
---|
477 | 7,-32768, 964, 161,-32768, 45, 42,-32768, 136, 17,
|
---|
478 | -32768,-32768, 8,-32768, 192, 24,-32768,-32768, 18, 90,
|
---|
479 | -32768,-32768, 1252, 236, 1252,-32768, 1252, 1252, -45, 483,
|
---|
480 | 231,-32768,-32768, 853,-32768,-32768, 59, 191, 196, -21,
|
---|
481 | 935, 123, 208, 557,-32768, 200, 1036, 203,-32768,-32768,
|
---|
482 | -32768,-32768, 1108, 1252, 222,-32768, 1252, 224,-32768,-32768,
|
---|
483 | -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
|
---|
484 | -32768,-32768,-32768, 1252, 1252, 1252, 1252, 1252, 1252, 1252,
|
---|
485 | 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252,
|
---|
486 | 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252,-32768, 1252,
|
---|
487 | -32768,-32768,-32768,-32768, 226, 87, 217, 204,-32768,-32768,
|
---|
488 | -32768,-32768,-32768, 1252,-32768,-32768, -30,-32768,-32768,-32768,
|
---|
489 | 105,-32768, 223, 103,-32768,-32768, 113, 227, 115, 116,
|
---|
490 | 117,-32768,-32768, 228, -20, 253,-32768,-32768,-32768,-32768,
|
---|
491 | 35, 1252,-32768,-32768, -1,-32768,-32768,-32768,-32768, 119,
|
---|
492 | -32768, 202,-32768, 206,-32768,-32768,-32768,-32768,-32768, -14,
|
---|
493 | -14, 12, 12, 12, 195, 195, 195, 195, 195, 195,
|
---|
494 | 82, 82, 82, 82, 118, 118, 118, 93, 151, 225,
|
---|
495 | -32768, -3, -44, 1252, 1252,-32768,-32768, 223, 126, 631,
|
---|
496 | -32768, 223, 233, 853, 1252, 853, 229, 853, 234,-32768,
|
---|
497 | -32768, 232,-32768, 1180,-32768, 1252,-32768,-32768, 1252, 1252,
|
---|
498 | 271, 1252, 127, 212,-32768, 223,-32768, 705,-32768,-32768,
|
---|
499 | 274, 157,-32768, 289,-32768,-32768, 237, 1252,-32768,-32768,
|
---|
500 | -32768,-32768, 174, 1252, 218, 853, 1252,-32768,-32768, 853,
|
---|
501 | -32768, 1252, 23, 289,-32768, -20,-32768, 853, 175, 1252,
|
---|
502 | -32768, 243,-32768, 207, 238,-32768, 289,-32768,-32768,-32768,
|
---|
503 | 853, 246, 853, 853, 853, 245,-32768, 853,-32768,-32768,
|
---|
504 | 853, 853,-32768,-32768,-32768, 312, 314,-32768
|
---|
505 | };
|
---|
506 |
|
---|
507 | static const short yypgoto[] = {-32768,
|
---|
508 | -32768,-32768,-32768, 91,-32768,-32768, 94, 309, 310,-32768,
|
---|
509 | -34,-32768, 41,-32768, 1, 120, 88, -18, 75, 78,
|
---|
510 | -32768,-32768, 143, 145,-32768,-32768, -122,-32768, -9, -17,
|
---|
511 | -22, -25,-32768, 138, 128, 67,-32768,-32768,-32768,-32768,
|
---|
512 | -249,-32768,-32768,-32768,-32768,-32768,-32768, -7,-32768, 13,
|
---|
513 | -32768,-32768,-32768,-32768,-32768, 129,-32768,-32768, 131, -223,
|
---|
514 | -32768, 2, -74
|
---|
515 | };
|
---|
516 |
|
---|
517 |
|
---|
518 | #define YYLAST 1326
|
---|
519 |
|
---|
520 |
|
---|
521 | static const short yytable[] = { 104,
|
---|
522 | 111, 78, 99, 182, 227, 80, 92, 183, 199, 139,
|
---|
523 | 231, 179, 109, 101, 102, 294, 177, 196, 205, 106,
|
---|
524 | 290, 117, 180, 197, 112, 113, 95, 89, 115, 116,
|
---|
525 | 96, 236, 335, 83, 129, 130, 131, 132, 212, 292,
|
---|
526 | 189, 190, 315, 110, 295, 103, 155, 114, 299, 182,
|
---|
527 | 189, 190, 193, 100, 100, 260, 105, 261, 178, 100,
|
---|
528 | 156, 157, 81, 93, 100, 100, 125, 332, 100, 100,
|
---|
529 | 107, 266, 318, 187, 100, 100, 100, 100, 180, 194,
|
---|
530 | 342, 202, 158, 159, 197, 180, 203, 336, 82, 94,
|
---|
531 | 184, 200, 191, 207, 181, 209, 218, 210, 211, 283,
|
---|
532 | 198, 206, 191, 133, 133, 163, 164, 134, 137, 192,
|
---|
533 | 264, 135, 138, 1, 2, 3, 4, 5, 108, 165,
|
---|
534 | 166, 219, 8, 186, 232, 84, 180, 234, 140, 141,
|
---|
535 | 16, 140, 141, 142, 143, 144, 145, 146, 147, 148,
|
---|
536 | 149, 150, 151, 152, 245, 246, 247, 248, 249, 250,
|
---|
537 | 173, 169, 170, 171, 172, 237, 238, 239, 167, 168,
|
---|
538 | 26, 310, 202, 311, 174, 272, 312, 268, 85, 153,
|
---|
539 | 273, 30, 31, 175, 86, 274, 33, 276, 277, 278,
|
---|
540 | 180, 285, 180, 180, 180, 327, 286, 220, 296, 316,
|
---|
541 | 221, 176, 280, 273, 180, 100, 100, 100, 100, 100,
|
---|
542 | 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
|
---|
543 | 100, 100, 100, 100, 100, 100, 100, 100, 194, 321,
|
---|
544 | 140, 141, 96, 182, 180, 142, 143, 144, 145, 146,
|
---|
545 | 147, 148, 149, 150, 151, 152, 328, 341, 160, 161,
|
---|
546 | 162, 180, 180, 251, 252, 253, 254, 242, 243, 244,
|
---|
547 | 255, 256, 257, 201, 293, 187, 301, 208, 303, -27,
|
---|
548 | 306, 153, 214, 215, -28, 302, 224, 225, 287, 180,
|
---|
549 | 228, 298, 288, 180, 180, 344, 222, 240, 241, 233,
|
---|
550 | 313, 235, 187, 262, 180, 215, 270, 265, 275, 279,
|
---|
551 | 300, 307, 304, 289, 314, 317, 320, 322, 331, 326,
|
---|
552 | 308, 330, 333, 339, 329, 343, 345, 187, 348, 353,
|
---|
553 | 340, 357, 334, 358, 282, 284, 87, 88, 258, 352,
|
---|
554 | 187, 259, 263, 347, 267, 349, 350, 350, 291, 346,
|
---|
555 | 354, 269, 0, 355, 355, 97, 338, 1, 2, 3,
|
---|
556 | 4, 5, 0, 0, 281, 0, 8, 0, 0, 84,
|
---|
557 | 0, 13, 14, 0, 16, 0, 0, 0, 0, 0,
|
---|
558 | 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
559 | 0, 0, 0, 0, 0, 0, 24, 25, 0, 0,
|
---|
560 | 0, 0, 0, 0, 26, 0, 0, 0, 0, 0,
|
---|
561 | 0, 0, 85, 28, 29, 30, 31, 0, 86, 0,
|
---|
562 | 33, 0, 0, 0, 0, 34, 35, 36, 37, 0,
|
---|
563 | 0, 1, 2, 3, 118, 119, 6, 0, 98, 7,
|
---|
564 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
---|
565 | 18, 0, 0, 0, 19, 20, 21, 0, 22, 23,
|
---|
566 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
567 | 24, 25, 0, 0, 0, 0, 0, 0, 26, 0,
|
---|
568 | 0, 0, 0, 0, 0, 0, 120, 28, 29, 30,
|
---|
569 | 31, 0, 32, 121, 33, 0, 0, 0, 0, 34,
|
---|
570 | 35, 36, 37, 0, 0, 1, 2, 3, 4, 5,
|
---|
571 | 6, 0, 38, 7, 8, 9, 10, 11, 12, 13,
|
---|
572 | 14, 15, 16, 17, 18, 0, 0, 0, 19, 20,
|
---|
573 | 21, 0, 22, 23, 0, 0, 0, 0, 0, 0,
|
---|
574 | 0, 0, 0, 0, 24, 25, 0, 0, 0, 0,
|
---|
575 | 0, 0, 26, 0, 0, 0, 0, 0, 0, 0,
|
---|
576 | 27, 28, 29, 30, 31, 0, 32, 213, 33, 0,
|
---|
577 | 0, 0, 0, 34, 35, 36, 37, 0, 0, 1,
|
---|
578 | 2, 3, 4, 5, 6, 0, 38, 7, 8, 9,
|
---|
579 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 0,
|
---|
580 | 0, 0, 19, 20, 21, 0, 22, 23, 0, 0,
|
---|
581 | 0, 0, 0, 0, 0, 0, 0, 0, 24, 25,
|
---|
582 | 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,
|
---|
583 | 0, 0, 0, 0, 27, 28, 29, 30, 31, 0,
|
---|
584 | 32, 223, 33, 0, 0, 0, 0, 34, 35, 36,
|
---|
585 | 37, 0, 0, 1, 2, 3, 4, 5, 6, 0,
|
---|
586 | 38, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
---|
587 | 16, 17, 18, 0, 0, 0, 19, 20, 21, 0,
|
---|
588 | 22, 23, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
589 | 0, 0, 24, 25, 0, 0, 0, 0, 0, 0,
|
---|
590 | 26, 0, 0, 0, 0, 0, 0, 0, 27, 28,
|
---|
591 | 29, 30, 31, 0, 32, 297, 33, 0, 0, 0,
|
---|
592 | 0, 34, 35, 36, 37, 0, 0, 1, 2, 3,
|
---|
593 | 4, 5, 6, 0, 38, 7, 8, 9, 10, 11,
|
---|
594 | 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
|
---|
595 | 19, 20, 21, 0, 22, 23, 0, 0, 0, 0,
|
---|
596 | 0, 0, 0, 0, 0, 0, 24, 25, 0, 0,
|
---|
597 | 0, 0, 0, 0, 26, 0, 0, 0, 0, 0,
|
---|
598 | 0, 0, 27, 28, 29, 30, 31, 0, 32, 319,
|
---|
599 | 33, 0, 0, 0, 0, 34, 35, 36, 37, 0,
|
---|
600 | 0, 1, 2, 3, 4, 5, 6, 0, 38, 7,
|
---|
601 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
---|
602 | 18, 0, 0, 0, 19, 20, 21, 0, 22, 23,
|
---|
603 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
604 | 24, 25, 0, 0, 0, 0, 0, 0, 26, 0,
|
---|
605 | 0, 0, 0, 0, 0, 0, 27, 28, 29, 30,
|
---|
606 | 31, 0, 32, 0, 33, 0, 0, 0, 0, 34,
|
---|
607 | 35, 36, 37, 0, 0, 1, 2, 3, 4, 5,
|
---|
608 | 6, 0, 38, 7, 8, 9, 10, 84, 12, 13,
|
---|
609 | 14, 15, 16, 17, 18, 0, 0, 0, 19, 20,
|
---|
610 | 21, 0, 22, 23, 0, 0, 0, 0, 0, 0,
|
---|
611 | 0, 0, 0, 0, 24, 25, 0, 0, 0, 0,
|
---|
612 | 0, 0, 26, 0, 0, 0, 0, 0, 0, 0,
|
---|
613 | 27, 28, 29, 30, 31, 0, 32, 0, 33, 0,
|
---|
614 | 0, 0, 0, 34, 35, 36, 37, 0, 0, 0,
|
---|
615 | 0, 0, 0, 0, -126, 0, 38, -126, -126, -126,
|
---|
616 | -126, -126, -126, -126, -126, -126, -126, -126, -126, -126,
|
---|
617 | -126, -126, -126, -126, -126, -126, -126, -126, 0, 0,
|
---|
618 | -126, -126, -126, 0, -126, -126, 1, 2, 3, 4,
|
---|
619 | 5, 0, 0, 0, 0, 8, 185, 0, 84, 0,
|
---|
620 | 13, 14, 0, 16, 0, 0, 0, 0, 0, 19,
|
---|
621 | 0, 0, -126, -126, -126, 0, 0, 0, -126, -126,
|
---|
622 | 0, 0, 0, 0, 0, 24, 25, -126, -126, 0,
|
---|
623 | 0, 0, 0, 26, 0, 0, 0, 0, 0, 0,
|
---|
624 | 0, 85, 28, 29, 30, 31, 0, 86, 0, 33,
|
---|
625 | 0, 0, 0, 0, 34, 35, 36, 37, 1, 2,
|
---|
626 | 3, 4, 5, 0, 0, 0, 0, 8, 0, 0,
|
---|
627 | 84, 0, 13, 14, 0, 16, 0, 0, 0, 0,
|
---|
628 | 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
629 | 0, 0, 0, 0, 0, 0, 0, 24, 25, 0,
|
---|
630 | 0, 0, 0, 0, 0, 26, 0, 0, 0, 0,
|
---|
631 | 0, 0, 0, 85, 28, 29, 30, 31, 0, 86,
|
---|
632 | 0, 33, 226, 0, 0, 0, 34, 35, 36, 37,
|
---|
633 | 1, 2, 3, 4, 5, 0, 0, 0, 0, 8,
|
---|
634 | 0, 0, 84, 0, 13, 14, 0, 16, 0, 0,
|
---|
635 | 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
|
---|
636 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,
|
---|
637 | 25, 0, 0, 0, 0, 0, 0, 26, 0, 0,
|
---|
638 | 0, 0, 0, 0, 0, 85, 28, 29, 30, 31,
|
---|
639 | 229, 86, 0, 33, 0, 0, 0, 0, 34, 35,
|
---|
640 | 36, 37, 1, 2, 3, 4, 5, 0, 0, 0,
|
---|
641 | 0, 8, 0, 0, 84, 0, 13, 14, 0, 16,
|
---|
642 | 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
|
---|
643 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
644 | 0, 24, 25, 0, 0, 0, 0, 0, 0, 26,
|
---|
645 | 0, 0, 0, 0, 0, 0, 0, 85, 28, 29,
|
---|
646 | 30, 31, 0, 86, 0, 33, 309, 0, 0, 0,
|
---|
647 | 34, 35, 36, 37, 1, 2, 3, 4, 5, 0,
|
---|
648 | 0, 0, 0, 8, 0, 0, 84, 0, 13, 14,
|
---|
649 | 0, 16, 0, 0, 0, 0, 0, 19, 0, 0,
|
---|
650 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
---|
651 | 0, 0, 0, 24, 25, 0, 0, 0, 0, 0,
|
---|
652 | 0, 26, 0, 0, 0, 0, 0, 0, 0, 85,
|
---|
653 | 28, 29, 30, 31, 0, 86, 0, 33, 0, 0,
|
---|
654 | 0, 0, 34, 35, 36, 37
|
---|
655 | };
|
---|
656 |
|
---|
657 | static const short yycheck[] = { 17,
|
---|
658 | 23, 0, 12, 78, 127, 1, 1, 1, 1, 44,
|
---|
659 | 133, 1, 22, 13, 14, 265, 40, 1, 1, 19,
|
---|
660 | 24, 31, 68, 68, 24, 25, 58, 58, 28, 29,
|
---|
661 | 62, 154, 10, 62, 34, 35, 36, 37, 84, 84,
|
---|
662 | 6, 7, 292, 64, 268, 62, 61, 69, 272, 124,
|
---|
663 | 6, 7, 87, 13, 14, 178, 62, 180, 82, 19,
|
---|
664 | 75, 76, 58, 58, 24, 25, 68, 317, 28, 29,
|
---|
665 | 62, 194, 296, 83, 34, 35, 36, 37, 68, 83,
|
---|
666 | 330, 58, 71, 72, 68, 68, 63, 65, 84, 84,
|
---|
667 | 84, 84, 58, 103, 84, 105, 114, 107, 108, 222,
|
---|
668 | 84, 84, 58, 62, 62, 24, 25, 66, 66, 65,
|
---|
669 | 24, 70, 70, 3, 4, 5, 6, 7, 62, 38,
|
---|
670 | 39, 63, 12, 83, 134, 15, 68, 137, 42, 43,
|
---|
671 | 20, 42, 43, 47, 48, 49, 50, 51, 52, 53,
|
---|
672 | 54, 55, 56, 57, 163, 164, 165, 166, 167, 168,
|
---|
673 | 79, 34, 35, 36, 37, 155, 156, 157, 77, 78,
|
---|
674 | 50, 284, 58, 286, 80, 63, 289, 63, 58, 83,
|
---|
675 | 68, 61, 62, 81, 64, 63, 66, 63, 63, 63,
|
---|
676 | 68, 63, 68, 68, 68, 308, 68, 65, 63, 63,
|
---|
677 | 68, 41, 215, 68, 68, 155, 156, 157, 158, 159,
|
---|
678 | 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
|
---|
679 | 170, 171, 172, 173, 174, 175, 176, 177, 83, 63,
|
---|
680 | 42, 43, 62, 298, 68, 47, 48, 49, 50, 51,
|
---|
681 | 52, 53, 54, 55, 56, 57, 63, 63, 44, 45,
|
---|
682 | 46, 68, 68, 169, 170, 171, 172, 160, 161, 162,
|
---|
683 | 173, 174, 175, 62, 264, 265, 274, 22, 276, 69,
|
---|
684 | 278, 83, 32, 33, 69, 275, 67, 68, 67, 68,
|
---|
685 | 68, 270, 67, 68, 68, 69, 69, 158, 159, 58,
|
---|
686 | 290, 58, 292, 58, 68, 33, 64, 84, 62, 62,
|
---|
687 | 58, 58, 64, 69, 24, 84, 23, 9, 316, 63,
|
---|
688 | 69, 84, 320, 326, 314, 63, 69, 317, 63, 65,
|
---|
689 | 328, 0, 322, 0, 221, 225, 8, 8, 176, 345,
|
---|
690 | 330, 177, 185, 341, 197, 343, 344, 345, 262, 337,
|
---|
691 | 348, 201, -1, 351, 352, 1, 324, 3, 4, 5,
|
---|
692 | 6, 7, -1, -1, 216, -1, 12, -1, -1, 15,
|
---|
693 | -1, 17, 18, -1, 20, -1, -1, -1, -1, -1,
|
---|
694 | 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
695 | -1, -1, -1, -1, -1, -1, 42, 43, -1, -1,
|
---|
696 | -1, -1, -1, -1, 50, -1, -1, -1, -1, -1,
|
---|
697 | -1, -1, 58, 59, 60, 61, 62, -1, 64, -1,
|
---|
698 | 66, -1, -1, -1, -1, 71, 72, 73, 74, -1,
|
---|
699 | -1, 3, 4, 5, 6, 7, 8, -1, 84, 11,
|
---|
700 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
|
---|
701 | 22, -1, -1, -1, 26, 27, 28, -1, 30, 31,
|
---|
702 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
703 | 42, 43, -1, -1, -1, -1, -1, -1, 50, -1,
|
---|
704 | -1, -1, -1, -1, -1, -1, 58, 59, 60, 61,
|
---|
705 | 62, -1, 64, 65, 66, -1, -1, -1, -1, 71,
|
---|
706 | 72, 73, 74, -1, -1, 3, 4, 5, 6, 7,
|
---|
707 | 8, -1, 84, 11, 12, 13, 14, 15, 16, 17,
|
---|
708 | 18, 19, 20, 21, 22, -1, -1, -1, 26, 27,
|
---|
709 | 28, -1, 30, 31, -1, -1, -1, -1, -1, -1,
|
---|
710 | -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
|
---|
711 | -1, -1, 50, -1, -1, -1, -1, -1, -1, -1,
|
---|
712 | 58, 59, 60, 61, 62, -1, 64, 65, 66, -1,
|
---|
713 | -1, -1, -1, 71, 72, 73, 74, -1, -1, 3,
|
---|
714 | 4, 5, 6, 7, 8, -1, 84, 11, 12, 13,
|
---|
715 | 14, 15, 16, 17, 18, 19, 20, 21, 22, -1,
|
---|
716 | -1, -1, 26, 27, 28, -1, 30, 31, -1, -1,
|
---|
717 | -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
|
---|
718 | -1, -1, -1, -1, -1, -1, 50, -1, -1, -1,
|
---|
719 | -1, -1, -1, -1, 58, 59, 60, 61, 62, -1,
|
---|
720 | 64, 65, 66, -1, -1, -1, -1, 71, 72, 73,
|
---|
721 | 74, -1, -1, 3, 4, 5, 6, 7, 8, -1,
|
---|
722 | 84, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
---|
723 | 20, 21, 22, -1, -1, -1, 26, 27, 28, -1,
|
---|
724 | 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
725 | -1, -1, 42, 43, -1, -1, -1, -1, -1, -1,
|
---|
726 | 50, -1, -1, -1, -1, -1, -1, -1, 58, 59,
|
---|
727 | 60, 61, 62, -1, 64, 65, 66, -1, -1, -1,
|
---|
728 | -1, 71, 72, 73, 74, -1, -1, 3, 4, 5,
|
---|
729 | 6, 7, 8, -1, 84, 11, 12, 13, 14, 15,
|
---|
730 | 16, 17, 18, 19, 20, 21, 22, -1, -1, -1,
|
---|
731 | 26, 27, 28, -1, 30, 31, -1, -1, -1, -1,
|
---|
732 | -1, -1, -1, -1, -1, -1, 42, 43, -1, -1,
|
---|
733 | -1, -1, -1, -1, 50, -1, -1, -1, -1, -1,
|
---|
734 | -1, -1, 58, 59, 60, 61, 62, -1, 64, 65,
|
---|
735 | 66, -1, -1, -1, -1, 71, 72, 73, 74, -1,
|
---|
736 | -1, 3, 4, 5, 6, 7, 8, -1, 84, 11,
|
---|
737 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
|
---|
738 | 22, -1, -1, -1, 26, 27, 28, -1, 30, 31,
|
---|
739 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
740 | 42, 43, -1, -1, -1, -1, -1, -1, 50, -1,
|
---|
741 | -1, -1, -1, -1, -1, -1, 58, 59, 60, 61,
|
---|
742 | 62, -1, 64, -1, 66, -1, -1, -1, -1, 71,
|
---|
743 | 72, 73, 74, -1, -1, 3, 4, 5, 6, 7,
|
---|
744 | 8, -1, 84, 11, 12, 13, 14, 15, 16, 17,
|
---|
745 | 18, 19, 20, 21, 22, -1, -1, -1, 26, 27,
|
---|
746 | 28, -1, 30, 31, -1, -1, -1, -1, -1, -1,
|
---|
747 | -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
|
---|
748 | -1, -1, 50, -1, -1, -1, -1, -1, -1, -1,
|
---|
749 | 58, 59, 60, 61, 62, -1, 64, -1, 66, -1,
|
---|
750 | -1, -1, -1, 71, 72, 73, 74, -1, -1, -1,
|
---|
751 | -1, -1, -1, -1, 0, -1, 84, 3, 4, 5,
|
---|
752 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
---|
753 | 16, 17, 18, 19, 20, 21, 22, 23, -1, -1,
|
---|
754 | 26, 27, 28, -1, 30, 31, 3, 4, 5, 6,
|
---|
755 | 7, -1, -1, -1, -1, 12, 13, -1, 15, -1,
|
---|
756 | 17, 18, -1, 20, -1, -1, -1, -1, -1, 26,
|
---|
757 | -1, -1, 58, 59, 60, -1, -1, -1, 64, 65,
|
---|
758 | -1, -1, -1, -1, -1, 42, 43, 73, 74, -1,
|
---|
759 | -1, -1, -1, 50, -1, -1, -1, -1, -1, -1,
|
---|
760 | -1, 58, 59, 60, 61, 62, -1, 64, -1, 66,
|
---|
761 | -1, -1, -1, -1, 71, 72, 73, 74, 3, 4,
|
---|
762 | 5, 6, 7, -1, -1, -1, -1, 12, -1, -1,
|
---|
763 | 15, -1, 17, 18, -1, 20, -1, -1, -1, -1,
|
---|
764 | -1, 26, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
765 | -1, -1, -1, -1, -1, -1, -1, 42, 43, -1,
|
---|
766 | -1, -1, -1, -1, -1, 50, -1, -1, -1, -1,
|
---|
767 | -1, -1, -1, 58, 59, 60, 61, 62, -1, 64,
|
---|
768 | -1, 66, 67, -1, -1, -1, 71, 72, 73, 74,
|
---|
769 | 3, 4, 5, 6, 7, -1, -1, -1, -1, 12,
|
---|
770 | -1, -1, 15, -1, 17, 18, -1, 20, -1, -1,
|
---|
771 | -1, -1, -1, 26, -1, -1, -1, -1, -1, -1,
|
---|
772 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
|
---|
773 | 43, -1, -1, -1, -1, -1, -1, 50, -1, -1,
|
---|
774 | -1, -1, -1, -1, -1, 58, 59, 60, 61, 62,
|
---|
775 | 63, 64, -1, 66, -1, -1, -1, -1, 71, 72,
|
---|
776 | 73, 74, 3, 4, 5, 6, 7, -1, -1, -1,
|
---|
777 | -1, 12, -1, -1, 15, -1, 17, 18, -1, 20,
|
---|
778 | -1, -1, -1, -1, -1, 26, -1, -1, -1, -1,
|
---|
779 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
780 | -1, 42, 43, -1, -1, -1, -1, -1, -1, 50,
|
---|
781 | -1, -1, -1, -1, -1, -1, -1, 58, 59, 60,
|
---|
782 | 61, 62, -1, 64, -1, 66, 67, -1, -1, -1,
|
---|
783 | 71, 72, 73, 74, 3, 4, 5, 6, 7, -1,
|
---|
784 | -1, -1, -1, 12, -1, -1, 15, -1, 17, 18,
|
---|
785 | -1, 20, -1, -1, -1, -1, -1, 26, -1, -1,
|
---|
786 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
---|
787 | -1, -1, -1, 42, 43, -1, -1, -1, -1, -1,
|
---|
788 | -1, 50, -1, -1, -1, -1, -1, -1, -1, 58,
|
---|
789 | 59, 60, 61, 62, -1, 64, -1, 66, -1, -1,
|
---|
790 | -1, -1, 71, 72, 73, 74
|
---|
791 | };
|
---|
792 | /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
---|
793 | #line 3 "/usr/share/bison.simple"
|
---|
794 | /* This file comes from bison-1.28. */
|
---|
795 |
|
---|
796 | /* Skeleton output parser for bison,
|
---|
797 | Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
|
---|
798 |
|
---|
799 | This program is free software; you can redistribute it and/or modify
|
---|
800 | it under the terms of the GNU General Public License as published by
|
---|
801 | the Free Software Foundation; either version 2, or (at your option)
|
---|
802 | any later version.
|
---|
803 |
|
---|
804 | This program is distributed in the hope that it will be useful,
|
---|
805 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
806 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
807 | GNU General Public License for more details.
|
---|
808 |
|
---|
809 | You should have received a copy of the GNU General Public License
|
---|
810 | along with this program; if not, write to the Free Software
|
---|
811 | Foundation, Inc., 59 Temple Place - Suite 330,
|
---|
812 | Boston, MA 02111-1307, USA. */
|
---|
813 |
|
---|
814 | /* As a special exception, when this file is copied by Bison into a
|
---|
815 | Bison output file, you may use that output file without restriction.
|
---|
816 | This special exception was added by the Free Software Foundation
|
---|
817 | in version 1.24 of Bison. */
|
---|
818 |
|
---|
819 | /* This is the parser code that is written into each bison parser
|
---|
820 | when the %semantic_parser declaration is not specified in the grammar.
|
---|
821 | It was written by Richard Stallman by simplifying the hairy parser
|
---|
822 | used when %semantic_parser is specified. */
|
---|
823 |
|
---|
824 | #ifndef YYSTACK_USE_ALLOCA
|
---|
825 | #ifdef alloca
|
---|
826 | #define YYSTACK_USE_ALLOCA
|
---|
827 | #else /* alloca not defined */
|
---|
828 | #ifdef __GNUC__
|
---|
829 | #define YYSTACK_USE_ALLOCA
|
---|
830 | #define alloca __builtin_alloca
|
---|
831 | #else /* not GNU C. */
|
---|
832 | #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
|
---|
833 | #define YYSTACK_USE_ALLOCA
|
---|
834 | #include <alloca.h>
|
---|
835 | #else /* not sparc */
|
---|
836 | /* We think this test detects Watcom and Microsoft C. */
|
---|
837 | /* This used to test MSDOS, but that is a bad idea
|
---|
838 | since that symbol is in the user namespace. */
|
---|
839 | #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
|
---|
840 | #if 0 /* No need for malloc.h, which pollutes the namespace;
|
---|
841 | instead, just don't use alloca. */
|
---|
842 | #include <malloc.h>
|
---|
843 | #endif
|
---|
844 | #else /* not MSDOS, or __TURBOC__ */
|
---|
845 | #if defined(_AIX)
|
---|
846 | /* I don't know what this was needed for, but it pollutes the namespace.
|
---|
847 | So I turned it off. rms, 2 May 1997. */
|
---|
848 | /* #include <malloc.h> */
|
---|
849 | #pragma alloca
|
---|
850 | #define YYSTACK_USE_ALLOCA
|
---|
851 | #else /* not MSDOS, or __TURBOC__, or _AIX */
|
---|
852 | #if 0
|
---|
853 | #ifdef __hpux /* [email protected] says this works for HPUX 9.05 and up,
|
---|
854 | and on HPUX 10. Eventually we can turn this on. */
|
---|
855 | #define YYSTACK_USE_ALLOCA
|
---|
856 | #define alloca __builtin_alloca
|
---|
857 | #endif /* __hpux */
|
---|
858 | #endif
|
---|
859 | #endif /* not _AIX */
|
---|
860 | #endif /* not MSDOS, or __TURBOC__ */
|
---|
861 | #endif /* not sparc */
|
---|
862 | #endif /* not GNU C */
|
---|
863 | #endif /* alloca not defined */
|
---|
864 | #endif /* YYSTACK_USE_ALLOCA not defined */
|
---|
865 |
|
---|
866 | #ifdef YYSTACK_USE_ALLOCA
|
---|
867 | #define YYSTACK_ALLOC alloca
|
---|
868 | #else
|
---|
869 | #define YYSTACK_ALLOC malloc
|
---|
870 | #endif
|
---|
871 |
|
---|
872 | /* Note: there must be only one dollar sign in this file.
|
---|
873 | It is replaced by the list of actions, each action
|
---|
874 | as one case of the switch. */
|
---|
875 |
|
---|
876 | #define yyerrok (yyerrstatus = 0)
|
---|
877 | #define yyclearin (yychar = YYEMPTY)
|
---|
878 | #define YYEMPTY -2
|
---|
879 | #define YYEOF 0
|
---|
880 | #define YYACCEPT goto yyacceptlab
|
---|
881 | #define YYABORT goto yyabortlab
|
---|
882 | #define YYERROR goto yyerrlab1
|
---|
883 | /* Like YYERROR except do call yyerror.
|
---|
884 | This remains here temporarily to ease the
|
---|
885 | transition to the new meaning of YYERROR, for GCC.
|
---|
886 | Once GCC version 2 has supplanted version 1, this can go. */
|
---|
887 | #define YYFAIL goto yyerrlab
|
---|
888 | #define YYRECOVERING() (!!yyerrstatus)
|
---|
889 | #define YYBACKUP(token, value) \
|
---|
890 | do \
|
---|
891 | if (yychar == YYEMPTY && yylen == 1) \
|
---|
892 | { yychar = (token), yylval = (value); \
|
---|
893 | yychar1 = YYTRANSLATE (yychar); \
|
---|
894 | YYPOPSTACK; \
|
---|
895 | goto yybackup; \
|
---|
896 | } \
|
---|
897 | else \
|
---|
898 | { yyerror ("syntax error: cannot back up"); YYERROR; } \
|
---|
899 | while (0)
|
---|
900 |
|
---|
901 | #define YYTERROR 1
|
---|
902 | #define YYERRCODE 256
|
---|
903 |
|
---|
904 | #ifndef YYPURE
|
---|
905 | #define YYLEX yylex()
|
---|
906 | #endif
|
---|
907 |
|
---|
908 | #ifdef YYPURE
|
---|
909 | #ifdef YYLSP_NEEDED
|
---|
910 | #ifdef YYLEX_PARAM
|
---|
911 | #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
|
---|
912 | #else
|
---|
913 | #define YYLEX yylex(&yylval, &yylloc)
|
---|
914 | #endif
|
---|
915 | #else /* not YYLSP_NEEDED */
|
---|
916 | #ifdef YYLEX_PARAM
|
---|
917 | #define YYLEX yylex(&yylval, YYLEX_PARAM)
|
---|
918 | #else
|
---|
919 | #define YYLEX yylex(&yylval)
|
---|
920 | #endif
|
---|
921 | #endif /* not YYLSP_NEEDED */
|
---|
922 | #endif
|
---|
923 |
|
---|
924 | /* If nonreentrant, generate the variables here */
|
---|
925 |
|
---|
926 | #ifndef YYPURE
|
---|
927 |
|
---|
928 | int yychar; /* the lookahead symbol */
|
---|
929 | YYSTYPE yylval; /* the semantic value of the */
|
---|
930 | /* lookahead symbol */
|
---|
931 |
|
---|
932 | #ifdef YYLSP_NEEDED
|
---|
933 | YYLTYPE yylloc; /* location data for the lookahead */
|
---|
934 | /* symbol */
|
---|
935 | #endif
|
---|
936 |
|
---|
937 | int yynerrs; /* number of parse errors so far */
|
---|
938 | #endif /* not YYPURE */
|
---|
939 |
|
---|
940 | #if YYDEBUG != 0
|
---|
941 | int yydebug; /* nonzero means print parse trace */
|
---|
942 | /* Since this is uninitialized, it does not stop multiple parsers
|
---|
943 | from coexisting. */
|
---|
944 | #endif
|
---|
945 |
|
---|
946 | /* YYINITDEPTH indicates the initial size of the parser's stacks */
|
---|
947 |
|
---|
948 | #ifndef YYINITDEPTH
|
---|
949 | #define YYINITDEPTH 200
|
---|
950 | #endif
|
---|
951 |
|
---|
952 | /* YYMAXDEPTH is the maximum size the stacks can grow to
|
---|
953 | (effective only if the built-in stack extension method is used). */
|
---|
954 |
|
---|
955 | #if YYMAXDEPTH == 0
|
---|
956 | #undef YYMAXDEPTH
|
---|
957 | #endif
|
---|
958 |
|
---|
959 | #ifndef YYMAXDEPTH
|
---|
960 | #define YYMAXDEPTH 10000
|
---|
961 | #endif
|
---|
962 | |
---|
963 |
|
---|
964 | /* Define __yy_memcpy. Note that the size argument
|
---|
965 | should be passed with type unsigned int, because that is what the non-GCC
|
---|
966 | definitions require. With GCC, __builtin_memcpy takes an arg
|
---|
967 | of type size_t, but it can handle unsigned int. */
|
---|
968 |
|
---|
969 | #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
|
---|
970 | #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
|
---|
971 | #else /* not GNU C or C++ */
|
---|
972 | #ifndef __cplusplus
|
---|
973 |
|
---|
974 | /* This is the most reliable way to avoid incompatibilities
|
---|
975 | in available built-in functions on various systems. */
|
---|
976 | static void
|
---|
977 | __yy_memcpy (to, from, count)
|
---|
978 | char *to;
|
---|
979 | char *from;
|
---|
980 | unsigned int count;
|
---|
981 | {
|
---|
982 | register char *f = from;
|
---|
983 | register char *t = to;
|
---|
984 | register int i = count;
|
---|
985 |
|
---|
986 | while (i-- > 0)
|
---|
987 | *t++ = *f++;
|
---|
988 | }
|
---|
989 |
|
---|
990 | #else /* __cplusplus */
|
---|
991 |
|
---|
992 | /* This is the most reliable way to avoid incompatibilities
|
---|
993 | in available built-in functions on various systems. */
|
---|
994 | static void
|
---|
995 | __yy_memcpy (char *to, char *from, unsigned int count)
|
---|
996 | {
|
---|
997 | register char *t = to;
|
---|
998 | register char *f = from;
|
---|
999 | register int i = count;
|
---|
1000 |
|
---|
1001 | while (i-- > 0)
|
---|
1002 | *t++ = *f++;
|
---|
1003 | }
|
---|
1004 |
|
---|
1005 | #endif
|
---|
1006 | #endif
|
---|
1007 | |
---|
1008 |
|
---|
1009 | #line 217 "/usr/share/bison.simple"
|
---|
1010 |
|
---|
1011 | /* The user can define YYPARSE_PARAM as the name of an argument to be passed
|
---|
1012 | into yyparse. The argument should have type void *.
|
---|
1013 | It should actually point to an object.
|
---|
1014 | Grammar actions can access the variable by casting it
|
---|
1015 | to the proper pointer type. */
|
---|
1016 |
|
---|
1017 | #ifdef YYPARSE_PARAM
|
---|
1018 | #ifdef __cplusplus
|
---|
1019 | #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
|
---|
1020 | #define YYPARSE_PARAM_DECL
|
---|
1021 | #else /* not __cplusplus */
|
---|
1022 | #define YYPARSE_PARAM_ARG YYPARSE_PARAM
|
---|
1023 | #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
|
---|
1024 | #endif /* not __cplusplus */
|
---|
1025 | #else /* not YYPARSE_PARAM */
|
---|
1026 | #define YYPARSE_PARAM_ARG
|
---|
1027 | #define YYPARSE_PARAM_DECL
|
---|
1028 | #endif /* not YYPARSE_PARAM */
|
---|
1029 |
|
---|
1030 | /* Prevent warning if -Wstrict-prototypes. */
|
---|
1031 | #ifdef __GNUC__
|
---|
1032 | #ifdef YYPARSE_PARAM
|
---|
1033 | int yyparse (void *);
|
---|
1034 | #else
|
---|
1035 | int yyparse (void);
|
---|
1036 | #endif
|
---|
1037 | #endif
|
---|
1038 |
|
---|
1039 | int
|
---|
1040 | yyparse(YYPARSE_PARAM_ARG)
|
---|
1041 | YYPARSE_PARAM_DECL
|
---|
1042 | {
|
---|
1043 | register int yystate;
|
---|
1044 | register int yyn;
|
---|
1045 | register short *yyssp;
|
---|
1046 | register YYSTYPE *yyvsp;
|
---|
1047 | int yyerrstatus; /* number of tokens to shift before error messages enabled */
|
---|
1048 | int yychar1 = 0; /* lookahead token as an internal (translated) token number */
|
---|
1049 |
|
---|
1050 | short yyssa[YYINITDEPTH]; /* the state stack */
|
---|
1051 | YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
|
---|
1052 |
|
---|
1053 | short *yyss = yyssa; /* refer to the stacks thru separate pointers */
|
---|
1054 | YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
|
---|
1055 |
|
---|
1056 | #ifdef YYLSP_NEEDED
|
---|
1057 | YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
|
---|
1058 | YYLTYPE *yyls = yylsa;
|
---|
1059 | YYLTYPE *yylsp;
|
---|
1060 |
|
---|
1061 | #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
|
---|
1062 | #else
|
---|
1063 | #define YYPOPSTACK (yyvsp--, yyssp--)
|
---|
1064 | #endif
|
---|
1065 |
|
---|
1066 | int yystacksize = YYINITDEPTH;
|
---|
1067 | int yyfree_stacks = 0;
|
---|
1068 |
|
---|
1069 | #ifdef YYPURE
|
---|
1070 | int yychar;
|
---|
1071 | YYSTYPE yylval;
|
---|
1072 | int yynerrs;
|
---|
1073 | #ifdef YYLSP_NEEDED
|
---|
1074 | YYLTYPE yylloc;
|
---|
1075 | #endif
|
---|
1076 | #endif
|
---|
1077 |
|
---|
1078 | YYSTYPE yyval; /* the variable used to return */
|
---|
1079 | /* semantic values from the action */
|
---|
1080 | /* routines */
|
---|
1081 |
|
---|
1082 | int yylen;
|
---|
1083 |
|
---|
1084 | #if YYDEBUG != 0
|
---|
1085 | if (yydebug)
|
---|
1086 | fprintf(stderr, "Starting parse\n");
|
---|
1087 | #endif
|
---|
1088 |
|
---|
1089 | yystate = 0;
|
---|
1090 | yyerrstatus = 0;
|
---|
1091 | yynerrs = 0;
|
---|
1092 | yychar = YYEMPTY; /* Cause a token to be read. */
|
---|
1093 |
|
---|
1094 | /* Initialize stack pointers.
|
---|
1095 | Waste one element of value and location stack
|
---|
1096 | so that they stay on the same level as the state stack.
|
---|
1097 | The wasted elements are never initialized. */
|
---|
1098 |
|
---|
1099 | yyssp = yyss - 1;
|
---|
1100 | yyvsp = yyvs;
|
---|
1101 | #ifdef YYLSP_NEEDED
|
---|
1102 | yylsp = yyls;
|
---|
1103 | #endif
|
---|
1104 |
|
---|
1105 | /* Push a new state, which is found in yystate . */
|
---|
1106 | /* In all cases, when you get here, the value and location stacks
|
---|
1107 | have just been pushed. so pushing a state here evens the stacks. */
|
---|
1108 | yynewstate:
|
---|
1109 |
|
---|
1110 | *++yyssp = yystate;
|
---|
1111 |
|
---|
1112 | if (yyssp >= yyss + yystacksize - 1)
|
---|
1113 | {
|
---|
1114 | /* Give user a chance to reallocate the stack */
|
---|
1115 | /* Use copies of these so that the &'s don't force the real ones into memory. */
|
---|
1116 | YYSTYPE *yyvs1 = yyvs;
|
---|
1117 | short *yyss1 = yyss;
|
---|
1118 | #ifdef YYLSP_NEEDED
|
---|
1119 | YYLTYPE *yyls1 = yyls;
|
---|
1120 | #endif
|
---|
1121 |
|
---|
1122 | /* Get the current used size of the three stacks, in elements. */
|
---|
1123 | int size = yyssp - yyss + 1;
|
---|
1124 |
|
---|
1125 | #ifdef yyoverflow
|
---|
1126 | /* Each stack pointer address is followed by the size of
|
---|
1127 | the data in use in that stack, in bytes. */
|
---|
1128 | #ifdef YYLSP_NEEDED
|
---|
1129 | /* This used to be a conditional around just the two extra args,
|
---|
1130 | but that might be undefined if yyoverflow is a macro. */
|
---|
1131 | yyoverflow("parser stack overflow",
|
---|
1132 | &yyss1, size * sizeof (*yyssp),
|
---|
1133 | &yyvs1, size * sizeof (*yyvsp),
|
---|
1134 | &yyls1, size * sizeof (*yylsp),
|
---|
1135 | &yystacksize);
|
---|
1136 | #else
|
---|
1137 | yyoverflow("parser stack overflow",
|
---|
1138 | &yyss1, size * sizeof (*yyssp),
|
---|
1139 | &yyvs1, size * sizeof (*yyvsp),
|
---|
1140 | &yystacksize);
|
---|
1141 | #endif
|
---|
1142 |
|
---|
1143 | yyss = yyss1; yyvs = yyvs1;
|
---|
1144 | #ifdef YYLSP_NEEDED
|
---|
1145 | yyls = yyls1;
|
---|
1146 | #endif
|
---|
1147 | #else /* no yyoverflow */
|
---|
1148 | /* Extend the stack our own way. */
|
---|
1149 | if (yystacksize >= YYMAXDEPTH)
|
---|
1150 | {
|
---|
1151 | yyerror("parser stack overflow");
|
---|
1152 | if (yyfree_stacks)
|
---|
1153 | {
|
---|
1154 | free (yyss);
|
---|
1155 | free (yyvs);
|
---|
1156 | #ifdef YYLSP_NEEDED
|
---|
1157 | free (yyls);
|
---|
1158 | #endif
|
---|
1159 | }
|
---|
1160 | return 2;
|
---|
1161 | }
|
---|
1162 | yystacksize *= 2;
|
---|
1163 | if (yystacksize > YYMAXDEPTH)
|
---|
1164 | yystacksize = YYMAXDEPTH;
|
---|
1165 | #ifndef YYSTACK_USE_ALLOCA
|
---|
1166 | yyfree_stacks = 1;
|
---|
1167 | #endif
|
---|
1168 | yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
|
---|
1169 | __yy_memcpy ((char *)yyss, (char *)yyss1,
|
---|
1170 | size * (unsigned int) sizeof (*yyssp));
|
---|
1171 | yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
|
---|
1172 | __yy_memcpy ((char *)yyvs, (char *)yyvs1,
|
---|
1173 | size * (unsigned int) sizeof (*yyvsp));
|
---|
1174 | #ifdef YYLSP_NEEDED
|
---|
1175 | yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
|
---|
1176 | __yy_memcpy ((char *)yyls, (char *)yyls1,
|
---|
1177 | size * (unsigned int) sizeof (*yylsp));
|
---|
1178 | #endif
|
---|
1179 | #endif /* no yyoverflow */
|
---|
1180 |
|
---|
1181 | yyssp = yyss + size - 1;
|
---|
1182 | yyvsp = yyvs + size - 1;
|
---|
1183 | #ifdef YYLSP_NEEDED
|
---|
1184 | yylsp = yyls + size - 1;
|
---|
1185 | #endif
|
---|
1186 |
|
---|
1187 | #if YYDEBUG != 0
|
---|
1188 | if (yydebug)
|
---|
1189 | fprintf(stderr, "Stack size increased to %d\n", yystacksize);
|
---|
1190 | #endif
|
---|
1191 |
|
---|
1192 | if (yyssp >= yyss + yystacksize - 1)
|
---|
1193 | YYABORT;
|
---|
1194 | }
|
---|
1195 |
|
---|
1196 | #if YYDEBUG != 0
|
---|
1197 | if (yydebug)
|
---|
1198 | fprintf(stderr, "Entering state %d\n", yystate);
|
---|
1199 | #endif
|
---|
1200 |
|
---|
1201 | goto yybackup;
|
---|
1202 | yybackup:
|
---|
1203 |
|
---|
1204 | /* Do appropriate processing given the current state. */
|
---|
1205 | /* Read a lookahead token if we need one and don't already have one. */
|
---|
1206 | /* yyresume: */
|
---|
1207 |
|
---|
1208 | /* First try to decide what to do without reference to lookahead token. */
|
---|
1209 |
|
---|
1210 | yyn = yypact[yystate];
|
---|
1211 | if (yyn == YYFLAG)
|
---|
1212 | goto yydefault;
|
---|
1213 |
|
---|
1214 | /* Not known => get a lookahead token if don't already have one. */
|
---|
1215 |
|
---|
1216 | /* yychar is either YYEMPTY or YYEOF
|
---|
1217 | or a valid token in external form. */
|
---|
1218 |
|
---|
1219 | if (yychar == YYEMPTY)
|
---|
1220 | {
|
---|
1221 | #if YYDEBUG != 0
|
---|
1222 | if (yydebug)
|
---|
1223 | fprintf(stderr, "Reading a token: ");
|
---|
1224 | #endif
|
---|
1225 | yychar = YYLEX;
|
---|
1226 | }
|
---|
1227 |
|
---|
1228 | /* Convert token to internal form (in yychar1) for indexing tables with */
|
---|
1229 |
|
---|
1230 | if (yychar <= 0) /* This means end of input. */
|
---|
1231 | {
|
---|
1232 | yychar1 = 0;
|
---|
1233 | yychar = YYEOF; /* Don't call YYLEX any more */
|
---|
1234 |
|
---|
1235 | #if YYDEBUG != 0
|
---|
1236 | if (yydebug)
|
---|
1237 | fprintf(stderr, "Now at end of input.\n");
|
---|
1238 | #endif
|
---|
1239 | }
|
---|
1240 | else
|
---|
1241 | {
|
---|
1242 | yychar1 = YYTRANSLATE(yychar);
|
---|
1243 |
|
---|
1244 | #if YYDEBUG != 0
|
---|
1245 | if (yydebug)
|
---|
1246 | {
|
---|
1247 | fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
|
---|
1248 | /* Give the individual parser a way to print the precise meaning
|
---|
1249 | of a token, for further debugging info. */
|
---|
1250 | #ifdef YYPRINT
|
---|
1251 | YYPRINT (stderr, yychar, yylval);
|
---|
1252 | #endif
|
---|
1253 | fprintf (stderr, ")\n");
|
---|
1254 | }
|
---|
1255 | #endif
|
---|
1256 | }
|
---|
1257 |
|
---|
1258 | yyn += yychar1;
|
---|
1259 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
|
---|
1260 | goto yydefault;
|
---|
1261 |
|
---|
1262 | yyn = yytable[yyn];
|
---|
1263 |
|
---|
1264 | /* yyn is what to do for this token type in this state.
|
---|
1265 | Negative => reduce, -yyn is rule number.
|
---|
1266 | Positive => shift, yyn is new state.
|
---|
1267 | New state is final state => don't bother to shift,
|
---|
1268 | just return success.
|
---|
1269 | 0, or most negative number => error. */
|
---|
1270 |
|
---|
1271 | if (yyn < 0)
|
---|
1272 | {
|
---|
1273 | if (yyn == YYFLAG)
|
---|
1274 | goto yyerrlab;
|
---|
1275 | yyn = -yyn;
|
---|
1276 | goto yyreduce;
|
---|
1277 | }
|
---|
1278 | else if (yyn == 0)
|
---|
1279 | goto yyerrlab;
|
---|
1280 |
|
---|
1281 | if (yyn == YYFINAL)
|
---|
1282 | YYACCEPT;
|
---|
1283 |
|
---|
1284 | /* Shift the lookahead token. */
|
---|
1285 |
|
---|
1286 | #if YYDEBUG != 0
|
---|
1287 | if (yydebug)
|
---|
1288 | fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
|
---|
1289 | #endif
|
---|
1290 |
|
---|
1291 | /* Discard the token being shifted unless it is eof. */
|
---|
1292 | if (yychar != YYEOF)
|
---|
1293 | yychar = YYEMPTY;
|
---|
1294 |
|
---|
1295 | *++yyvsp = yylval;
|
---|
1296 | #ifdef YYLSP_NEEDED
|
---|
1297 | *++yylsp = yylloc;
|
---|
1298 | #endif
|
---|
1299 |
|
---|
1300 | /* count tokens shifted since error; after three, turn off error status. */
|
---|
1301 | if (yyerrstatus) yyerrstatus--;
|
---|
1302 |
|
---|
1303 | yystate = yyn;
|
---|
1304 | goto yynewstate;
|
---|
1305 |
|
---|
1306 | /* Do the default action for the current state. */
|
---|
1307 | yydefault:
|
---|
1308 |
|
---|
1309 | yyn = yydefact[yystate];
|
---|
1310 | if (yyn == 0)
|
---|
1311 | goto yyerrlab;
|
---|
1312 |
|
---|
1313 | /* Do a reduction. yyn is the number of a rule to reduce with. */
|
---|
1314 | yyreduce:
|
---|
1315 | yylen = yyr2[yyn];
|
---|
1316 | if (yylen > 0)
|
---|
1317 | yyval = yyvsp[1-yylen]; /* implement default value of the action */
|
---|
1318 |
|
---|
1319 | #if YYDEBUG != 0
|
---|
1320 | if (yydebug)
|
---|
1321 | {
|
---|
1322 | int i;
|
---|
1323 |
|
---|
1324 | fprintf (stderr, "Reducing via rule %d (line %d), ",
|
---|
1325 | yyn, yyrline[yyn]);
|
---|
1326 |
|
---|
1327 | /* Print the symbols being reduced, and their result. */
|
---|
1328 | for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
|
---|
1329 | fprintf (stderr, "%s ", yytname[yyrhs[i]]);
|
---|
1330 | fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
|
---|
1331 | }
|
---|
1332 | #endif
|
---|
1333 |
|
---|
1334 |
|
---|
1335 | switch (yyn) {
|
---|
1336 |
|
---|
1337 | case 1:
|
---|
1338 | #line 170 "grammar.y"
|
---|
1339 | { yyval.node = new NullNode(); ;
|
---|
1340 | break;}
|
---|
1341 | case 2:
|
---|
1342 | #line 171 "grammar.y"
|
---|
1343 | { yyval.node = new BooleanNode(true); ;
|
---|
1344 | break;}
|
---|
1345 | case 3:
|
---|
1346 | #line 172 "grammar.y"
|
---|
1347 | { yyval.node = new BooleanNode(false); ;
|
---|
1348 | break;}
|
---|
1349 | case 4:
|
---|
1350 | #line 173 "grammar.y"
|
---|
1351 | { yyval.node = new NumberNode(yyvsp[0].dval); ;
|
---|
1352 | break;}
|
---|
1353 | case 5:
|
---|
1354 | #line 174 "grammar.y"
|
---|
1355 | { yyval.node = new StringNode(yyvsp[0].ustr); ;
|
---|
1356 | break;}
|
---|
1357 | case 6:
|
---|
1358 | #line 175 "grammar.y"
|
---|
1359 | { Lexer *l = Lexer::curr();
|
---|
1360 | if (!l->scanRegExp()) YYABORT;
|
---|
1361 | yyval.node = new RegExpNode(l->pattern,l->flags);;
|
---|
1362 | break;}
|
---|
1363 | case 7:
|
---|
1364 | #line 179 "grammar.y"
|
---|
1365 | { Lexer *l = Lexer::curr();
|
---|
1366 | if (!l->scanRegExp()) YYABORT;
|
---|
1367 | yyval.node = new RegExpNode(UString('=')+l->pattern,l->flags);;
|
---|
1368 | break;}
|
---|
1369 | case 8:
|
---|
1370 | #line 185 "grammar.y"
|
---|
1371 | { yyval.node = new ThisNode(); ;
|
---|
1372 | break;}
|
---|
1373 | case 9:
|
---|
1374 | #line 186 "grammar.y"
|
---|
1375 | { yyval.node = new ResolveNode(*yyvsp[0].ident); ;
|
---|
1376 | break;}
|
---|
1377 | case 12:
|
---|
1378 | #line 189 "grammar.y"
|
---|
1379 | { yyval.node = new GroupNode(yyvsp[-1].node); ;
|
---|
1380 | break;}
|
---|
1381 | case 13:
|
---|
1382 | #line 190 "grammar.y"
|
---|
1383 | { yyval.node = new ObjectLiteralNode(); ;
|
---|
1384 | break;}
|
---|
1385 | case 14:
|
---|
1386 | #line 191 "grammar.y"
|
---|
1387 | { yyval.node = new ObjectLiteralNode(yyvsp[-1].plist); ;
|
---|
1388 | break;}
|
---|
1389 | case 15:
|
---|
1390 | #line 195 "grammar.y"
|
---|
1391 | { yyval.node = new ArrayNode(yyvsp[-1].ival); ;
|
---|
1392 | break;}
|
---|
1393 | case 16:
|
---|
1394 | #line 196 "grammar.y"
|
---|
1395 | { yyval.node = new ArrayNode(yyvsp[-1].elm); ;
|
---|
1396 | break;}
|
---|
1397 | case 17:
|
---|
1398 | #line 197 "grammar.y"
|
---|
1399 | { yyval.node = new ArrayNode(yyvsp[-1].ival, yyvsp[-3].elm); ;
|
---|
1400 | break;}
|
---|
1401 | case 18:
|
---|
1402 | #line 201 "grammar.y"
|
---|
1403 | { yyval.elm = new ElementNode(yyvsp[-1].ival, yyvsp[0].node); ;
|
---|
1404 | break;}
|
---|
1405 | case 19:
|
---|
1406 | #line 203 "grammar.y"
|
---|
1407 | { yyval.elm = new ElementNode(yyvsp[-3].elm, yyvsp[-1].ival, yyvsp[0].node); ;
|
---|
1408 | break;}
|
---|
1409 | case 20:
|
---|
1410 | #line 207 "grammar.y"
|
---|
1411 | { yyval.ival = 0; ;
|
---|
1412 | break;}
|
---|
1413 | case 22:
|
---|
1414 | #line 212 "grammar.y"
|
---|
1415 | { yyval.ival = 1; ;
|
---|
1416 | break;}
|
---|
1417 | case 23:
|
---|
1418 | #line 213 "grammar.y"
|
---|
1419 | { yyval.ival = yyvsp[-1].ival + 1; ;
|
---|
1420 | break;}
|
---|
1421 | case 24:
|
---|
1422 | #line 217 "grammar.y"
|
---|
1423 | { yyval.plist = new PropertyValueNode(yyvsp[-2].pnode, yyvsp[0].node); ;
|
---|
1424 | break;}
|
---|
1425 | case 25:
|
---|
1426 | #line 219 "grammar.y"
|
---|
1427 | { yyval.plist = new PropertyValueNode(yyvsp[-2].pnode, yyvsp[0].node, yyvsp[-4].plist); ;
|
---|
1428 | break;}
|
---|
1429 | case 26:
|
---|
1430 | #line 223 "grammar.y"
|
---|
1431 | { yyval.pnode = new PropertyNode(*yyvsp[0].ident); ;
|
---|
1432 | break;}
|
---|
1433 | case 27:
|
---|
1434 | #line 224 "grammar.y"
|
---|
1435 | { yyval.pnode = new PropertyNode(Identifier(*yyvsp[0].ustr)); ;
|
---|
1436 | break;}
|
---|
1437 | case 28:
|
---|
1438 | #line 225 "grammar.y"
|
---|
1439 | { yyval.pnode = new PropertyNode(yyvsp[0].dval); ;
|
---|
1440 | break;}
|
---|
1441 | case 31:
|
---|
1442 | #line 231 "grammar.y"
|
---|
1443 | { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
|
---|
1444 | break;}
|
---|
1445 | case 32:
|
---|
1446 | #line 232 "grammar.y"
|
---|
1447 | { yyval.node = new AccessorNode2(yyvsp[-2].node, *yyvsp[0].ident); ;
|
---|
1448 | break;}
|
---|
1449 | case 33:
|
---|
1450 | #line 233 "grammar.y"
|
---|
1451 | { yyval.node = new NewExprNode(yyvsp[-1].node, yyvsp[0].args); ;
|
---|
1452 | break;}
|
---|
1453 | case 35:
|
---|
1454 | #line 238 "grammar.y"
|
---|
1455 | { yyval.node = new NewExprNode(yyvsp[0].node); ;
|
---|
1456 | break;}
|
---|
1457 | case 36:
|
---|
1458 | #line 242 "grammar.y"
|
---|
1459 | { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
|
---|
1460 | break;}
|
---|
1461 | case 37:
|
---|
1462 | #line 243 "grammar.y"
|
---|
1463 | { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
|
---|
1464 | break;}
|
---|
1465 | case 38:
|
---|
1466 | #line 244 "grammar.y"
|
---|
1467 | { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
|
---|
1468 | break;}
|
---|
1469 | case 39:
|
---|
1470 | #line 245 "grammar.y"
|
---|
1471 | { yyval.node = new AccessorNode2(yyvsp[-2].node, *yyvsp[0].ident); ;
|
---|
1472 | break;}
|
---|
1473 | case 40:
|
---|
1474 | #line 249 "grammar.y"
|
---|
1475 | { yyval.args = new ArgumentsNode(); ;
|
---|
1476 | break;}
|
---|
1477 | case 41:
|
---|
1478 | #line 250 "grammar.y"
|
---|
1479 | { yyval.args = new ArgumentsNode(yyvsp[-1].alist); ;
|
---|
1480 | break;}
|
---|
1481 | case 42:
|
---|
1482 | #line 254 "grammar.y"
|
---|
1483 | { yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
|
---|
1484 | break;}
|
---|
1485 | case 43:
|
---|
1486 | #line 255 "grammar.y"
|
---|
1487 | { yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ;
|
---|
1488 | break;}
|
---|
1489 | case 47:
|
---|
1490 | #line 265 "grammar.y"
|
---|
1491 | { yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
|
---|
1492 | break;}
|
---|
1493 | case 48:
|
---|
1494 | #line 266 "grammar.y"
|
---|
1495 | { yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ;
|
---|
1496 | break;}
|
---|
1497 | case 50:
|
---|
1498 | #line 271 "grammar.y"
|
---|
1499 | { yyval.node = new DeleteNode(yyvsp[0].node); ;
|
---|
1500 | break;}
|
---|
1501 | case 51:
|
---|
1502 | #line 272 "grammar.y"
|
---|
1503 | { yyval.node = new VoidNode(yyvsp[0].node); ;
|
---|
1504 | break;}
|
---|
1505 | case 52:
|
---|
1506 | #line 273 "grammar.y"
|
---|
1507 | { yyval.node = new TypeOfNode(yyvsp[0].node); ;
|
---|
1508 | break;}
|
---|
1509 | case 53:
|
---|
1510 | #line 274 "grammar.y"
|
---|
1511 | { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
|
---|
1512 | break;}
|
---|
1513 | case 54:
|
---|
1514 | #line 275 "grammar.y"
|
---|
1515 | { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
|
---|
1516 | break;}
|
---|
1517 | case 55:
|
---|
1518 | #line 276 "grammar.y"
|
---|
1519 | { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
|
---|
1520 | break;}
|
---|
1521 | case 56:
|
---|
1522 | #line 277 "grammar.y"
|
---|
1523 | { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
|
---|
1524 | break;}
|
---|
1525 | case 57:
|
---|
1526 | #line 278 "grammar.y"
|
---|
1527 | { yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
|
---|
1528 | break;}
|
---|
1529 | case 58:
|
---|
1530 | #line 279 "grammar.y"
|
---|
1531 | { yyval.node = new NegateNode(yyvsp[0].node); ;
|
---|
1532 | break;}
|
---|
1533 | case 59:
|
---|
1534 | #line 280 "grammar.y"
|
---|
1535 | { yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
|
---|
1536 | break;}
|
---|
1537 | case 60:
|
---|
1538 | #line 281 "grammar.y"
|
---|
1539 | { yyval.node = new LogicalNotNode(yyvsp[0].node); ;
|
---|
1540 | break;}
|
---|
1541 | case 62:
|
---|
1542 | #line 286 "grammar.y"
|
---|
1543 | { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
|
---|
1544 | break;}
|
---|
1545 | case 63:
|
---|
1546 | #line 287 "grammar.y"
|
---|
1547 | { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
|
---|
1548 | break;}
|
---|
1549 | case 64:
|
---|
1550 | #line 288 "grammar.y"
|
---|
1551 | { yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ;
|
---|
1552 | break;}
|
---|
1553 | case 66:
|
---|
1554 | #line 293 "grammar.y"
|
---|
1555 | { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
|
---|
1556 | break;}
|
---|
1557 | case 67:
|
---|
1558 | #line 294 "grammar.y"
|
---|
1559 | { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '-'); ;
|
---|
1560 | break;}
|
---|
1561 | case 69:
|
---|
1562 | #line 299 "grammar.y"
|
---|
1563 | { yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
|
---|
1564 | break;}
|
---|
1565 | case 70:
|
---|
1566 | #line 300 "grammar.y"
|
---|
1567 | { yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
|
---|
1568 | break;}
|
---|
1569 | case 71:
|
---|
1570 | #line 301 "grammar.y"
|
---|
1571 | { yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ;
|
---|
1572 | break;}
|
---|
1573 | case 73:
|
---|
1574 | #line 307 "grammar.y"
|
---|
1575 | { yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ;
|
---|
1576 | break;}
|
---|
1577 | case 74:
|
---|
1578 | #line 309 "grammar.y"
|
---|
1579 | { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ;
|
---|
1580 | break;}
|
---|
1581 | case 75:
|
---|
1582 | #line 311 "grammar.y"
|
---|
1583 | { yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ;
|
---|
1584 | break;}
|
---|
1585 | case 76:
|
---|
1586 | #line 313 "grammar.y"
|
---|
1587 | { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;
|
---|
1588 | break;}
|
---|
1589 | case 77:
|
---|
1590 | #line 315 "grammar.y"
|
---|
1591 | { yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;
|
---|
1592 | break;}
|
---|
1593 | case 78:
|
---|
1594 | #line 317 "grammar.y"
|
---|
1595 | { yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ;
|
---|
1596 | break;}
|
---|
1597 | case 80:
|
---|
1598 | #line 322 "grammar.y"
|
---|
1599 | { yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
|
---|
1600 | break;}
|
---|
1601 | case 81:
|
---|
1602 | #line 323 "grammar.y"
|
---|
1603 | { yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
|
---|
1604 | break;}
|
---|
1605 | case 82:
|
---|
1606 | #line 324 "grammar.y"
|
---|
1607 | { yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
|
---|
1608 | break;}
|
---|
1609 | case 83:
|
---|
1610 | #line 325 "grammar.y"
|
---|
1611 | { yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);;
|
---|
1612 | break;}
|
---|
1613 | case 85:
|
---|
1614 | #line 330 "grammar.y"
|
---|
1615 | { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ;
|
---|
1616 | break;}
|
---|
1617 | case 87:
|
---|
1618 | #line 335 "grammar.y"
|
---|
1619 | { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ;
|
---|
1620 | break;}
|
---|
1621 | case 89:
|
---|
1622 | #line 340 "grammar.y"
|
---|
1623 | { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ;
|
---|
1624 | break;}
|
---|
1625 | case 91:
|
---|
1626 | #line 346 "grammar.y"
|
---|
1627 | { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ;
|
---|
1628 | break;}
|
---|
1629 | case 93:
|
---|
1630 | #line 352 "grammar.y"
|
---|
1631 | { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ;
|
---|
1632 | break;}
|
---|
1633 | case 95:
|
---|
1634 | #line 358 "grammar.y"
|
---|
1635 | { yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
|
---|
1636 | break;}
|
---|
1637 | case 97:
|
---|
1638 | #line 364 "grammar.y"
|
---|
1639 | { yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);;
|
---|
1640 | break;}
|
---|
1641 | case 98:
|
---|
1642 | #line 368 "grammar.y"
|
---|
1643 | { yyval.op = OpEqual; ;
|
---|
1644 | break;}
|
---|
1645 | case 99:
|
---|
1646 | #line 369 "grammar.y"
|
---|
1647 | { yyval.op = OpPlusEq; ;
|
---|
1648 | break;}
|
---|
1649 | case 100:
|
---|
1650 | #line 370 "grammar.y"
|
---|
1651 | { yyval.op = OpMinusEq; ;
|
---|
1652 | break;}
|
---|
1653 | case 101:
|
---|
1654 | #line 371 "grammar.y"
|
---|
1655 | { yyval.op = OpMultEq; ;
|
---|
1656 | break;}
|
---|
1657 | case 102:
|
---|
1658 | #line 372 "grammar.y"
|
---|
1659 | { yyval.op = OpDivEq; ;
|
---|
1660 | break;}
|
---|
1661 | case 103:
|
---|
1662 | #line 373 "grammar.y"
|
---|
1663 | { yyval.op = OpLShift; ;
|
---|
1664 | break;}
|
---|
1665 | case 104:
|
---|
1666 | #line 374 "grammar.y"
|
---|
1667 | { yyval.op = OpRShift; ;
|
---|
1668 | break;}
|
---|
1669 | case 105:
|
---|
1670 | #line 375 "grammar.y"
|
---|
1671 | { yyval.op = OpURShift; ;
|
---|
1672 | break;}
|
---|
1673 | case 106:
|
---|
1674 | #line 376 "grammar.y"
|
---|
1675 | { yyval.op = OpAndEq; ;
|
---|
1676 | break;}
|
---|
1677 | case 107:
|
---|
1678 | #line 377 "grammar.y"
|
---|
1679 | { yyval.op = OpXOrEq; ;
|
---|
1680 | break;}
|
---|
1681 | case 108:
|
---|
1682 | #line 378 "grammar.y"
|
---|
1683 | { yyval.op = OpOrEq; ;
|
---|
1684 | break;}
|
---|
1685 | case 109:
|
---|
1686 | #line 379 "grammar.y"
|
---|
1687 | { yyval.op = OpModEq; ;
|
---|
1688 | break;}
|
---|
1689 | case 111:
|
---|
1690 | #line 384 "grammar.y"
|
---|
1691 | { yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ;
|
---|
1692 | break;}
|
---|
1693 | case 126:
|
---|
1694 | #line 405 "grammar.y"
|
---|
1695 | { yyval.stat = new BlockNode(0); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
|
---|
1696 | break;}
|
---|
1697 | case 127:
|
---|
1698 | #line 406 "grammar.y"
|
---|
1699 | { yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
|
---|
1700 | break;}
|
---|
1701 | case 128:
|
---|
1702 | #line 410 "grammar.y"
|
---|
1703 | { yyval.slist = new StatListNode(yyvsp[0].stat); ;
|
---|
1704 | break;}
|
---|
1705 | case 129:
|
---|
1706 | #line 411 "grammar.y"
|
---|
1707 | { yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;
|
---|
1708 | break;}
|
---|
1709 | case 130:
|
---|
1710 | #line 415 "grammar.y"
|
---|
1711 | { yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
|
---|
1712 | DBG(yyval.stat, yylsp[-2], yylsp[0]); ;
|
---|
1713 | break;}
|
---|
1714 | case 131:
|
---|
1715 | #line 417 "grammar.y"
|
---|
1716 | { if (automatic()) {
|
---|
1717 | yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
|
---|
1718 | DBG(yyval.stat, yylsp[-2], yylsp[-1]);
|
---|
1719 | } else {
|
---|
1720 | YYABORT;
|
---|
1721 | }
|
---|
1722 | ;
|
---|
1723 | break;}
|
---|
1724 | case 132:
|
---|
1725 | #line 427 "grammar.y"
|
---|
1726 | { yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;
|
---|
1727 | break;}
|
---|
1728 | case 133:
|
---|
1729 | #line 429 "grammar.y"
|
---|
1730 | { yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;
|
---|
1731 | break;}
|
---|
1732 | case 134:
|
---|
1733 | #line 433 "grammar.y"
|
---|
1734 | { yyval.decl = new VarDeclNode(*yyvsp[0].ident, 0); ;
|
---|
1735 | break;}
|
---|
1736 | case 135:
|
---|
1737 | #line 434 "grammar.y"
|
---|
1738 | { yyval.decl = new VarDeclNode(*yyvsp[-1].ident, yyvsp[0].init); ;
|
---|
1739 | break;}
|
---|
1740 | case 136:
|
---|
1741 | #line 438 "grammar.y"
|
---|
1742 | { yyval.init = new AssignExprNode(yyvsp[0].node); ;
|
---|
1743 | break;}
|
---|
1744 | case 137:
|
---|
1745 | #line 442 "grammar.y"
|
---|
1746 | { yyval.stat = new EmptyStatementNode(); ;
|
---|
1747 | break;}
|
---|
1748 | case 138:
|
---|
1749 | #line 446 "grammar.y"
|
---|
1750 | { yyval.stat = new ExprStatementNode(yyvsp[-1].node);
|
---|
1751 | DBG(yyval.stat, yylsp[-1], yylsp[0]); ;
|
---|
1752 | break;}
|
---|
1753 | case 139:
|
---|
1754 | #line 448 "grammar.y"
|
---|
1755 | { if (automatic()) {
|
---|
1756 | yyval.stat = new ExprStatementNode(yyvsp[-1].node);
|
---|
1757 | DBG(yyval.stat, yylsp[-1], yylsp[-1]);
|
---|
1758 | } else
|
---|
1759 | YYABORT; ;
|
---|
1760 | break;}
|
---|
1761 | case 140:
|
---|
1762 | #line 456 "grammar.y"
|
---|
1763 | { yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
|
---|
1764 | break;}
|
---|
1765 | case 141:
|
---|
1766 | #line 458 "grammar.y"
|
---|
1767 | { yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;
|
---|
1768 | break;}
|
---|
1769 | case 142:
|
---|
1770 | #line 462 "grammar.y"
|
---|
1771 | { yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
|
---|
1772 | break;}
|
---|
1773 | case 143:
|
---|
1774 | #line 463 "grammar.y"
|
---|
1775 | { yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
|
---|
1776 | break;}
|
---|
1777 | case 144:
|
---|
1778 | #line 465 "grammar.y"
|
---|
1779 | { yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
|
---|
1780 | DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
|
---|
1781 | break;}
|
---|
1782 | case 145:
|
---|
1783 | #line 468 "grammar.y"
|
---|
1784 | { yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
|
---|
1785 | DBG(yyval.stat,yylsp[-9],yylsp[-1]); ;
|
---|
1786 | break;}
|
---|
1787 | case 146:
|
---|
1788 | #line 471 "grammar.y"
|
---|
1789 | { yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat);
|
---|
1790 | DBG(yyval.stat,yylsp[-6],yylsp[-1]); ;
|
---|
1791 | break;}
|
---|
1792 | case 147:
|
---|
1793 | #line 474 "grammar.y"
|
---|
1794 | { yyval.stat = new ForInNode(*yyvsp[-4].ident,0,yyvsp[-2].node,yyvsp[0].stat);
|
---|
1795 | DBG(yyval.stat,yylsp[-7],yylsp[-1]); ;
|
---|
1796 | break;}
|
---|
1797 | case 148:
|
---|
1798 | #line 477 "grammar.y"
|
---|
1799 | { yyval.stat = new ForInNode(*yyvsp[-5].ident,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat);
|
---|
1800 | DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
|
---|
1801 | break;}
|
---|
1802 | case 149:
|
---|
1803 | #line 482 "grammar.y"
|
---|
1804 | { yyval.node = 0; ;
|
---|
1805 | break;}
|
---|
1806 | case 151:
|
---|
1807 | #line 487 "grammar.y"
|
---|
1808 | { yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
|
---|
1809 | break;}
|
---|
1810 | case 152:
|
---|
1811 | #line 488 "grammar.y"
|
---|
1812 | { if (automatic()) {
|
---|
1813 | yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]);
|
---|
1814 | } else
|
---|
1815 | YYABORT; ;
|
---|
1816 | break;}
|
---|
1817 | case 153:
|
---|
1818 | #line 492 "grammar.y"
|
---|
1819 | { yyval.stat = new ContinueNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;
|
---|
1820 | break;}
|
---|
1821 | case 154:
|
---|
1822 | #line 493 "grammar.y"
|
---|
1823 | { if (automatic()) {
|
---|
1824 | yyval.stat = new ContinueNode(*yyvsp[-1].ident);DBG(yyval.stat,yylsp[-2],yylsp[-1]);
|
---|
1825 | } else
|
---|
1826 | YYABORT; ;
|
---|
1827 | break;}
|
---|
1828 | case 155:
|
---|
1829 | #line 500 "grammar.y"
|
---|
1830 | { yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
|
---|
1831 | break;}
|
---|
1832 | case 156:
|
---|
1833 | #line 501 "grammar.y"
|
---|
1834 | { if (automatic()) {
|
---|
1835 | yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
|
---|
1836 | } else
|
---|
1837 | YYABORT; ;
|
---|
1838 | break;}
|
---|
1839 | case 157:
|
---|
1840 | #line 505 "grammar.y"
|
---|
1841 | { yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;
|
---|
1842 | break;}
|
---|
1843 | case 158:
|
---|
1844 | #line 506 "grammar.y"
|
---|
1845 | { if (automatic()) {
|
---|
1846 | yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[-1]);
|
---|
1847 | } else
|
---|
1848 | YYABORT;
|
---|
1849 | ;
|
---|
1850 | break;}
|
---|
1851 | case 159:
|
---|
1852 | #line 514 "grammar.y"
|
---|
1853 | { yyval.stat = new ReturnNode(0); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
|
---|
1854 | break;}
|
---|
1855 | case 160:
|
---|
1856 | #line 515 "grammar.y"
|
---|
1857 | { if (automatic()) {
|
---|
1858 | yyval.stat = new ReturnNode(0); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
|
---|
1859 | } else
|
---|
1860 | YYABORT; ;
|
---|
1861 | break;}
|
---|
1862 | case 161:
|
---|
1863 | #line 519 "grammar.y"
|
---|
1864 | { yyval.stat = new ReturnNode(yyvsp[-1].node); ;
|
---|
1865 | break;}
|
---|
1866 | case 162:
|
---|
1867 | #line 520 "grammar.y"
|
---|
1868 | { if (automatic())
|
---|
1869 | yyval.stat = new ReturnNode(yyvsp[-1].node);
|
---|
1870 | else
|
---|
1871 | YYABORT; ;
|
---|
1872 | break;}
|
---|
1873 | case 163:
|
---|
1874 | #line 527 "grammar.y"
|
---|
1875 | { yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat);
|
---|
1876 | DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
|
---|
1877 | break;}
|
---|
1878 | case 164:
|
---|
1879 | #line 532 "grammar.y"
|
---|
1880 | { yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk);
|
---|
1881 | DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
|
---|
1882 | break;}
|
---|
1883 | case 165:
|
---|
1884 | #line 537 "grammar.y"
|
---|
1885 | { yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0, 0); ;
|
---|
1886 | break;}
|
---|
1887 | case 166:
|
---|
1888 | #line 539 "grammar.y"
|
---|
1889 | { yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;
|
---|
1890 | break;}
|
---|
1891 | case 167:
|
---|
1892 | #line 543 "grammar.y"
|
---|
1893 | { yyval.clist = 0; ;
|
---|
1894 | break;}
|
---|
1895 | case 169:
|
---|
1896 | #line 548 "grammar.y"
|
---|
1897 | { yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
|
---|
1898 | break;}
|
---|
1899 | case 170:
|
---|
1900 | #line 549 "grammar.y"
|
---|
1901 | { yyval.clist = new ClauseListNode(yyvsp[-1].clist, yyvsp[0].ccl); ;
|
---|
1902 | break;}
|
---|
1903 | case 171:
|
---|
1904 | #line 553 "grammar.y"
|
---|
1905 | { yyval.ccl = new CaseClauseNode(yyvsp[-1].node); ;
|
---|
1906 | break;}
|
---|
1907 | case 172:
|
---|
1908 | #line 554 "grammar.y"
|
---|
1909 | { yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;
|
---|
1910 | break;}
|
---|
1911 | case 173:
|
---|
1912 | #line 558 "grammar.y"
|
---|
1913 | { yyval.ccl = new CaseClauseNode(0); ;
|
---|
1914 | break;}
|
---|
1915 | case 174:
|
---|
1916 | #line 559 "grammar.y"
|
---|
1917 | { yyval.ccl = new CaseClauseNode(0, yyvsp[0].slist); ;
|
---|
1918 | break;}
|
---|
1919 | case 175:
|
---|
1920 | #line 563 "grammar.y"
|
---|
1921 | { yyvsp[0].stat->pushLabel(*yyvsp[-2].ident);
|
---|
1922 | yyval.stat = new LabelNode(*yyvsp[-2].ident, yyvsp[0].stat); ;
|
---|
1923 | break;}
|
---|
1924 | case 176:
|
---|
1925 | #line 568 "grammar.y"
|
---|
1926 | { yyval.stat = new ThrowNode(yyvsp[-1].node); ;
|
---|
1927 | break;}
|
---|
1928 | case 177:
|
---|
1929 | #line 572 "grammar.y"
|
---|
1930 | { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].cnode); ;
|
---|
1931 | break;}
|
---|
1932 | case 178:
|
---|
1933 | #line 573 "grammar.y"
|
---|
1934 | { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].fnode); ;
|
---|
1935 | break;}
|
---|
1936 | case 179:
|
---|
1937 | #line 574 "grammar.y"
|
---|
1938 | { yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].cnode, yyvsp[0].fnode); ;
|
---|
1939 | break;}
|
---|
1940 | case 180:
|
---|
1941 | #line 578 "grammar.y"
|
---|
1942 | { yyval.cnode = new CatchNode(*yyvsp[-2].ident, yyvsp[0].stat); ;
|
---|
1943 | break;}
|
---|
1944 | case 181:
|
---|
1945 | #line 582 "grammar.y"
|
---|
1946 | { yyval.fnode = new FinallyNode(yyvsp[0].stat); ;
|
---|
1947 | break;}
|
---|
1948 | case 182:
|
---|
1949 | #line 586 "grammar.y"
|
---|
1950 | { yyval.func = new FuncDeclNode(*yyvsp[-3].ident, yyvsp[0].body); ;
|
---|
1951 | break;}
|
---|
1952 | case 183:
|
---|
1953 | #line 588 "grammar.y"
|
---|
1954 | { yyval.func = new FuncDeclNode(*yyvsp[-4].ident, yyvsp[-2].param, yyvsp[0].body); ;
|
---|
1955 | break;}
|
---|
1956 | case 184:
|
---|
1957 | #line 591 "grammar.y"
|
---|
1958 | { yyval.node = new FuncExprNode(yyvsp[0].body); ;
|
---|
1959 | break;}
|
---|
1960 | case 185:
|
---|
1961 | #line 593 "grammar.y"
|
---|
1962 | { yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ;
|
---|
1963 | break;}
|
---|
1964 | case 186:
|
---|
1965 | #line 598 "grammar.y"
|
---|
1966 | { yyval.param = new ParameterNode(*yyvsp[0].ident); ;
|
---|
1967 | break;}
|
---|
1968 | case 187:
|
---|
1969 | #line 599 "grammar.y"
|
---|
1970 | { yyval.param = new ParameterNode(yyvsp[-2].param, *yyvsp[0].ident); ;
|
---|
1971 | break;}
|
---|
1972 | case 188:
|
---|
1973 | #line 603 "grammar.y"
|
---|
1974 | { yyval.body = new FunctionBodyNode(0);
|
---|
1975 | DBG(yyval.body, yylsp[-1], yylsp[0]);;
|
---|
1976 | break;}
|
---|
1977 | case 189:
|
---|
1978 | #line 605 "grammar.y"
|
---|
1979 | { yyval.body = new FunctionBodyNode(yyvsp[-1].srcs);
|
---|
1980 | DBG(yyval.body, yylsp[-2], yylsp[0]);;
|
---|
1981 | break;}
|
---|
1982 | case 190:
|
---|
1983 | #line 610 "grammar.y"
|
---|
1984 | { yyval.prog = new ProgramNode(0);
|
---|
1985 | Parser::progNode = yyval.prog; ;
|
---|
1986 | break;}
|
---|
1987 | case 191:
|
---|
1988 | #line 612 "grammar.y"
|
---|
1989 | { yyval.prog = new ProgramNode(yyvsp[0].srcs);
|
---|
1990 | Parser::progNode = yyval.prog; ;
|
---|
1991 | break;}
|
---|
1992 | case 192:
|
---|
1993 | #line 617 "grammar.y"
|
---|
1994 | { yyval.srcs = new SourceElementsNode(yyvsp[0].stat); ;
|
---|
1995 | break;}
|
---|
1996 | case 193:
|
---|
1997 | #line 618 "grammar.y"
|
---|
1998 | { yyval.srcs = new SourceElementsNode(yyvsp[-1].srcs, yyvsp[0].stat); ;
|
---|
1999 | break;}
|
---|
2000 | case 194:
|
---|
2001 | #line 622 "grammar.y"
|
---|
2002 | { yyval.stat = yyvsp[0].stat; ;
|
---|
2003 | break;}
|
---|
2004 | case 195:
|
---|
2005 | #line 623 "grammar.y"
|
---|
2006 | { yyval.stat = yyvsp[0].func; ;
|
---|
2007 | break;}
|
---|
2008 | }
|
---|
2009 | /* the action file gets copied in in place of this dollarsign */
|
---|
2010 | #line 543 "/usr/share/bison.simple"
|
---|
2011 | |
---|
2012 |
|
---|
2013 | yyvsp -= yylen;
|
---|
2014 | yyssp -= yylen;
|
---|
2015 | #ifdef YYLSP_NEEDED
|
---|
2016 | yylsp -= yylen;
|
---|
2017 | #endif
|
---|
2018 |
|
---|
2019 | #if YYDEBUG != 0
|
---|
2020 | if (yydebug)
|
---|
2021 | {
|
---|
2022 | short *ssp1 = yyss - 1;
|
---|
2023 | fprintf (stderr, "state stack now");
|
---|
2024 | while (ssp1 != yyssp)
|
---|
2025 | fprintf (stderr, " %d", *++ssp1);
|
---|
2026 | fprintf (stderr, "\n");
|
---|
2027 | }
|
---|
2028 | #endif
|
---|
2029 |
|
---|
2030 | *++yyvsp = yyval;
|
---|
2031 |
|
---|
2032 | #ifdef YYLSP_NEEDED
|
---|
2033 | yylsp++;
|
---|
2034 | if (yylen == 0)
|
---|
2035 | {
|
---|
2036 | yylsp->first_line = yylloc.first_line;
|
---|
2037 | yylsp->first_column = yylloc.first_column;
|
---|
2038 | yylsp->last_line = (yylsp-1)->last_line;
|
---|
2039 | yylsp->last_column = (yylsp-1)->last_column;
|
---|
2040 | yylsp->text = 0;
|
---|
2041 | }
|
---|
2042 | else
|
---|
2043 | {
|
---|
2044 | yylsp->last_line = (yylsp+yylen-1)->last_line;
|
---|
2045 | yylsp->last_column = (yylsp+yylen-1)->last_column;
|
---|
2046 | }
|
---|
2047 | #endif
|
---|
2048 |
|
---|
2049 | /* Now "shift" the result of the reduction.
|
---|
2050 | Determine what state that goes to,
|
---|
2051 | based on the state we popped back to
|
---|
2052 | and the rule number reduced by. */
|
---|
2053 |
|
---|
2054 | yyn = yyr1[yyn];
|
---|
2055 |
|
---|
2056 | yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
|
---|
2057 | if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
---|
2058 | yystate = yytable[yystate];
|
---|
2059 | else
|
---|
2060 | yystate = yydefgoto[yyn - YYNTBASE];
|
---|
2061 |
|
---|
2062 | goto yynewstate;
|
---|
2063 |
|
---|
2064 | yyerrlab: /* here on detecting error */
|
---|
2065 |
|
---|
2066 | if (! yyerrstatus)
|
---|
2067 | /* If not already recovering from an error, report this error. */
|
---|
2068 | {
|
---|
2069 | ++yynerrs;
|
---|
2070 |
|
---|
2071 | #ifdef YYERROR_VERBOSE
|
---|
2072 | yyn = yypact[yystate];
|
---|
2073 |
|
---|
2074 | if (yyn > YYFLAG && yyn < YYLAST)
|
---|
2075 | {
|
---|
2076 | int size = 0;
|
---|
2077 | char *msg;
|
---|
2078 | int x, count;
|
---|
2079 |
|
---|
2080 | count = 0;
|
---|
2081 | /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
|
---|
2082 | for (x = (yyn < 0 ? -yyn : 0);
|
---|
2083 | x < (sizeof(yytname) / sizeof(char *)); x++)
|
---|
2084 | if (yycheck[x + yyn] == x)
|
---|
2085 | size += strlen(yytname[x]) + 15, count++;
|
---|
2086 | msg = (char *) malloc(size + 15);
|
---|
2087 | if (msg != 0)
|
---|
2088 | {
|
---|
2089 | strcpy(msg, "parse error");
|
---|
2090 |
|
---|
2091 | if (count < 5)
|
---|
2092 | {
|
---|
2093 | count = 0;
|
---|
2094 | for (x = (yyn < 0 ? -yyn : 0);
|
---|
2095 | x < (sizeof(yytname) / sizeof(char *)); x++)
|
---|
2096 | if (yycheck[x + yyn] == x)
|
---|
2097 | {
|
---|
2098 | strcat(msg, count == 0 ? ", expecting `" : " or `");
|
---|
2099 | strcat(msg, yytname[x]);
|
---|
2100 | strcat(msg, "'");
|
---|
2101 | count++;
|
---|
2102 | }
|
---|
2103 | }
|
---|
2104 | yyerror(msg);
|
---|
2105 | free(msg);
|
---|
2106 | }
|
---|
2107 | else
|
---|
2108 | yyerror ("parse error; also virtual memory exceeded");
|
---|
2109 | }
|
---|
2110 | else
|
---|
2111 | #endif /* YYERROR_VERBOSE */
|
---|
2112 | yyerror("parse error");
|
---|
2113 | }
|
---|
2114 |
|
---|
2115 | goto yyerrlab1;
|
---|
2116 | yyerrlab1: /* here on error raised explicitly by an action */
|
---|
2117 |
|
---|
2118 | if (yyerrstatus == 3)
|
---|
2119 | {
|
---|
2120 | /* if just tried and failed to reuse lookahead token after an error, discard it. */
|
---|
2121 |
|
---|
2122 | /* return failure if at end of input */
|
---|
2123 | if (yychar == YYEOF)
|
---|
2124 | YYABORT;
|
---|
2125 |
|
---|
2126 | #if YYDEBUG != 0
|
---|
2127 | if (yydebug)
|
---|
2128 | fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
|
---|
2129 | #endif
|
---|
2130 |
|
---|
2131 | yychar = YYEMPTY;
|
---|
2132 | }
|
---|
2133 |
|
---|
2134 | /* Else will try to reuse lookahead token
|
---|
2135 | after shifting the error token. */
|
---|
2136 |
|
---|
2137 | yyerrstatus = 3; /* Each real token shifted decrements this */
|
---|
2138 |
|
---|
2139 | goto yyerrhandle;
|
---|
2140 |
|
---|
2141 | yyerrdefault: /* current state does not do anything special for the error token. */
|
---|
2142 |
|
---|
2143 | #if 0
|
---|
2144 | /* This is wrong; only states that explicitly want error tokens
|
---|
2145 | should shift them. */
|
---|
2146 | yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
|
---|
2147 | if (yyn) goto yydefault;
|
---|
2148 | #endif
|
---|
2149 |
|
---|
2150 | yyerrpop: /* pop the current state because it cannot handle the error token */
|
---|
2151 |
|
---|
2152 | if (yyssp == yyss) YYABORT;
|
---|
2153 | yyvsp--;
|
---|
2154 | yystate = *--yyssp;
|
---|
2155 | #ifdef YYLSP_NEEDED
|
---|
2156 | yylsp--;
|
---|
2157 | #endif
|
---|
2158 |
|
---|
2159 | #if YYDEBUG != 0
|
---|
2160 | if (yydebug)
|
---|
2161 | {
|
---|
2162 | short *ssp1 = yyss - 1;
|
---|
2163 | fprintf (stderr, "Error: state stack now");
|
---|
2164 | while (ssp1 != yyssp)
|
---|
2165 | fprintf (stderr, " %d", *++ssp1);
|
---|
2166 | fprintf (stderr, "\n");
|
---|
2167 | }
|
---|
2168 | #endif
|
---|
2169 |
|
---|
2170 | yyerrhandle:
|
---|
2171 |
|
---|
2172 | yyn = yypact[yystate];
|
---|
2173 | if (yyn == YYFLAG)
|
---|
2174 | goto yyerrdefault;
|
---|
2175 |
|
---|
2176 | yyn += YYTERROR;
|
---|
2177 | if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
|
---|
2178 | goto yyerrdefault;
|
---|
2179 |
|
---|
2180 | yyn = yytable[yyn];
|
---|
2181 | if (yyn < 0)
|
---|
2182 | {
|
---|
2183 | if (yyn == YYFLAG)
|
---|
2184 | goto yyerrpop;
|
---|
2185 | yyn = -yyn;
|
---|
2186 | goto yyreduce;
|
---|
2187 | }
|
---|
2188 | else if (yyn == 0)
|
---|
2189 | goto yyerrpop;
|
---|
2190 |
|
---|
2191 | if (yyn == YYFINAL)
|
---|
2192 | YYACCEPT;
|
---|
2193 |
|
---|
2194 | #if YYDEBUG != 0
|
---|
2195 | if (yydebug)
|
---|
2196 | fprintf(stderr, "Shifting error token, ");
|
---|
2197 | #endif
|
---|
2198 |
|
---|
2199 | *++yyvsp = yylval;
|
---|
2200 | #ifdef YYLSP_NEEDED
|
---|
2201 | *++yylsp = yylloc;
|
---|
2202 | #endif
|
---|
2203 |
|
---|
2204 | yystate = yyn;
|
---|
2205 | goto yynewstate;
|
---|
2206 |
|
---|
2207 | yyacceptlab:
|
---|
2208 | /* YYACCEPT comes here. */
|
---|
2209 | if (yyfree_stacks)
|
---|
2210 | {
|
---|
2211 | free (yyss);
|
---|
2212 | free (yyvs);
|
---|
2213 | #ifdef YYLSP_NEEDED
|
---|
2214 | free (yyls);
|
---|
2215 | #endif
|
---|
2216 | }
|
---|
2217 | return 0;
|
---|
2218 |
|
---|
2219 | yyabortlab:
|
---|
2220 | /* YYABORT comes here. */
|
---|
2221 | if (yyfree_stacks)
|
---|
2222 | {
|
---|
2223 | free (yyss);
|
---|
2224 | free (yyvs);
|
---|
2225 | #ifdef YYLSP_NEEDED
|
---|
2226 | free (yyls);
|
---|
2227 | #endif
|
---|
2228 | }
|
---|
2229 | return 1;
|
---|
2230 | }
|
---|
2231 | #line 626 "grammar.y"
|
---|
2232 |
|
---|
2233 |
|
---|
2234 | int yyerror (const char * /* s */) /* Called by yyparse on error */
|
---|
2235 | {
|
---|
2236 | // fprintf(stderr, "ERROR: %s at line %d\n",
|
---|
2237 | // s, KJS::Lexer::curr()->lineNo());
|
---|
2238 | return 1;
|
---|
2239 | }
|
---|
2240 |
|
---|
2241 | /* may we automatically insert a semicolon ? */
|
---|
2242 | bool automatic()
|
---|
2243 | {
|
---|
2244 | if (yychar == '}' || yychar == 0)
|
---|
2245 | return true;
|
---|
2246 | else if (Lexer::curr()->prevTerminator())
|
---|
2247 | return true;
|
---|
2248 |
|
---|
2249 | return false;
|
---|
2250 | }
|
---|