source: webkit/trunk/JavaScriptCore/kjs/grammar.cpp@ 903

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