00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #define YYBISON 1
00038
00039
00040 #define YYSKELETON_NAME "yacc.c"
00041
00042
00043 #define YYPURE 0
00044
00045
00046 #define YYLSP_NEEDED 1
00047
00048
00049
00050 #define yyparse kjsyyparse
00051 #define yylex kjsyylex
00052 #define yyerror kjsyyerror
00053 #define yylval kjsyylval
00054 #define yychar kjsyychar
00055 #define yydebug kjsyydebug
00056 #define yynerrs kjsyynerrs
00057 #define yylloc kjsyylloc
00058
00059
00060 #ifndef YYTOKENTYPE
00061 # define YYTOKENTYPE
00062
00063
00064 enum yytokentype {
00065 NULLTOKEN = 258,
00066 TRUETOKEN = 259,
00067 FALSETOKEN = 260,
00068 STRING = 261,
00069 NUMBER = 262,
00070 BREAK = 263,
00071 CASE = 264,
00072 DEFAULT = 265,
00073 FOR = 266,
00074 NEW = 267,
00075 VAR = 268,
00076 CONST = 269,
00077 CONTINUE = 270,
00078 FUNCTION = 271,
00079 RETURN = 272,
00080 VOID = 273,
00081 DELETE = 274,
00082 IF = 275,
00083 THIS = 276,
00084 DO = 277,
00085 WHILE = 278,
00086 ELSE = 279,
00087 IN = 280,
00088 INSTANCEOF = 281,
00089 TYPEOF = 282,
00090 SWITCH = 283,
00091 WITH = 284,
00092 RESERVED = 285,
00093 THROW = 286,
00094 TRY = 287,
00095 CATCH = 288,
00096 FINALLY = 289,
00097 EQEQ = 290,
00098 NE = 291,
00099 STREQ = 292,
00100 STRNEQ = 293,
00101 LE = 294,
00102 GE = 295,
00103 OR = 296,
00104 AND = 297,
00105 PLUSPLUS = 298,
00106 MINUSMINUS = 299,
00107 LSHIFT = 300,
00108 RSHIFT = 301,
00109 URSHIFT = 302,
00110 PLUSEQUAL = 303,
00111 MINUSEQUAL = 304,
00112 MULTEQUAL = 305,
00113 DIVEQUAL = 306,
00114 LSHIFTEQUAL = 307,
00115 RSHIFTEQUAL = 308,
00116 URSHIFTEQUAL = 309,
00117 ANDEQUAL = 310,
00118 MODEQUAL = 311,
00119 XOREQUAL = 312,
00120 OREQUAL = 313,
00121 IDENT = 314,
00122 AUTOPLUSPLUS = 315,
00123 AUTOMINUSMINUS = 316
00124 };
00125 #endif
00126 #define NULLTOKEN 258
00127 #define TRUETOKEN 259
00128 #define FALSETOKEN 260
00129 #define STRING 261
00130 #define NUMBER 262
00131 #define BREAK 263
00132 #define CASE 264
00133 #define DEFAULT 265
00134 #define FOR 266
00135 #define NEW 267
00136 #define VAR 268
00137 #define CONST 269
00138 #define CONTINUE 270
00139 #define FUNCTION 271
00140 #define RETURN 272
00141 #define VOID 273
00142 #define DELETE 274
00143 #define IF 275
00144 #define THIS 276
00145 #define DO 277
00146 #define WHILE 278
00147 #define ELSE 279
00148 #define IN 280
00149 #define INSTANCEOF 281
00150 #define TYPEOF 282
00151 #define SWITCH 283
00152 #define WITH 284
00153 #define RESERVED 285
00154 #define THROW 286
00155 #define TRY 287
00156 #define CATCH 288
00157 #define FINALLY 289
00158 #define EQEQ 290
00159 #define NE 291
00160 #define STREQ 292
00161 #define STRNEQ 293
00162 #define LE 294
00163 #define GE 295
00164 #define OR 296
00165 #define AND 297
00166 #define PLUSPLUS 298
00167 #define MINUSMINUS 299
00168 #define LSHIFT 300
00169 #define RSHIFT 301
00170 #define URSHIFT 302
00171 #define PLUSEQUAL 303
00172 #define MINUSEQUAL 304
00173 #define MULTEQUAL 305
00174 #define DIVEQUAL 306
00175 #define LSHIFTEQUAL 307
00176 #define RSHIFTEQUAL 308
00177 #define URSHIFTEQUAL 309
00178 #define ANDEQUAL 310
00179 #define MODEQUAL 311
00180 #define XOREQUAL 312
00181 #define OREQUAL 313
00182 #define IDENT 314
00183 #define AUTOPLUSPLUS 315
00184 #define AUTOMINUSMINUS 316
00185
00186
00187
00188
00189
00190 #line 1 "grammar.y"
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213 #ifdef HAVE_CONFIG_H
00214 #include <config.h>
00215 #endif
00216 #include <string.h>
00217 #include <stdlib.h>
00218 #include "value.h"
00219 #include "object.h"
00220 #include "types.h"
00221 #include "interpreter.h"
00222 #include "nodes.h"
00223 #include "lexer.h"
00224 #include "internal.h"
00225
00226
00227 #define YYDEBUG 0
00228 #define YYMAXDEPTH 0
00229 #define YYERROR_VERBOSE
00230 #define DBG(l, s, e) { l->setLoc(s.first_line, e.last_line, Parser::source); } // location
00231
00232 extern int yylex();
00233 static int yyerror (const char *);
00234 static bool automatic();
00235
00236 using namespace KJS;
00237
00238
00239
00240
00241 #ifndef YYDEBUG
00242 # define YYDEBUG 0
00243 #endif
00244
00245
00246 #ifdef YYERROR_VERBOSE
00247 # undef YYERROR_VERBOSE
00248 # define YYERROR_VERBOSE 1
00249 #else
00250 # define YYERROR_VERBOSE 0
00251 #endif
00252
00253 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
00254 #line 50 "grammar.y"
00255 typedef union YYSTYPE {
00256 int ival;
00257 double dval;
00258 UString *ustr;
00259 Identifier *ident;
00260 Node *node;
00261 StatementNode *stat;
00262 ParameterNode *param;
00263 FunctionBodyNode *body;
00264 FuncDeclNode *func;
00265 FunctionBodyNode *prog;
00266 AssignExprNode *init;
00267 SourceElementsNode *srcs;
00268 StatListNode *slist;
00269 ArgumentsNode *args;
00270 ArgumentListNode *alist;
00271 VarDeclNode *decl;
00272 VarDeclListNode *vlist;
00273 CaseBlockNode *cblk;
00274 ClauseListNode *clist;
00275 CaseClauseNode *ccl;
00276 ElementNode *elm;
00277 Operator op;
00278 PropertyValueNode *plist;
00279 PropertyNode *pnode;
00280 CatchNode *cnode;
00281 FinallyNode *fnode;
00282 } YYSTYPE;
00283
00284 #line 284 "grammar.tab.c"
00285 # define yystype YYSTYPE
00286 # define YYSTYPE_IS_DECLARED 1
00287 # define YYSTYPE_IS_TRIVIAL 1
00288 #endif
00289
00290 #if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
00291 typedef struct YYLTYPE
00292 {
00293 int first_line;
00294 int first_column;
00295 int last_line;
00296 int last_column;
00297 } YYLTYPE;
00298 # define yyltype YYLTYPE
00299 # define YYLTYPE_IS_DECLARED 1
00300 # define YYLTYPE_IS_TRIVIAL 1
00301 #endif
00302
00303
00304
00305
00306
00307
00308 #line 308 "grammar.tab.c"
00309
00310 #if ! defined (yyoverflow) || YYERROR_VERBOSE
00311
00312
00313
00314 # if YYSTACK_USE_ALLOCA
00315 # define YYSTACK_ALLOC alloca
00316 # else
00317 # ifndef YYSTACK_USE_ALLOCA
00318 # if defined (alloca) || defined (_ALLOCA_H)
00319 # define YYSTACK_ALLOC alloca
00320 # else
00321 # ifdef __GNUC__
00322 # define YYSTACK_ALLOC __builtin_alloca
00323 # endif
00324 # endif
00325 # endif
00326 # endif
00327
00328 # ifdef YYSTACK_ALLOC
00329
00330 # define YYSTACK_FREE(Ptr) do { ; } while (0)
00331 # else
00332 # if defined (__STDC__) || defined (__cplusplus)
00333 # include <stdlib.h>
00334 # define YYSIZE_T size_t
00335 # endif
00336 # define YYSTACK_ALLOC malloc
00337 # define YYSTACK_FREE free
00338 # endif
00339 #endif
00340
00341
00342 #if (! defined (yyoverflow) \
00343 && (! defined (__cplusplus) \
00344 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00345
00346
00347 union yyalloc
00348 {
00349 short yyss;
00350 YYSTYPE yyvs;
00351 YYLTYPE yyls;
00352 };
00353
00354
00355 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00356
00357
00358
00359 # define YYSTACK_BYTES(N) \
00360 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
00361 + 2 * YYSTACK_GAP_MAXIMUM)
00362
00363
00364
00365 # ifndef YYCOPY
00366 # if 1 < __GNUC__
00367 # define YYCOPY(To, From, Count) \
00368 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00369 # else
00370 # define YYCOPY(To, From, Count) \
00371 do \
00372 { \
00373 register YYSIZE_T yyi; \
00374 for (yyi = 0; yyi < (Count); yyi++) \
00375 (To)[yyi] = (From)[yyi]; \
00376 } \
00377 while (0)
00378 # endif
00379 # endif
00380
00381
00382
00383
00384
00385
00386 # define YYSTACK_RELOCATE(Stack) \
00387 do \
00388 { \
00389 YYSIZE_T yynewbytes; \
00390 YYCOPY (&yyptr->Stack, Stack, yysize); \
00391 Stack = &yyptr->Stack; \
00392 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00393 yyptr += yynewbytes / sizeof (*yyptr); \
00394 } \
00395 while (0)
00396
00397 #endif
00398
00399 #if defined (__STDC__) || defined (__cplusplus)
00400 typedef signed char yysigned_char;
00401 #else
00402 typedef short yysigned_char;
00403 #endif
00404
00405
00406 #define YYFINAL 191
00407
00408 #define YYLAST 1380
00409
00410
00411 #define YYNTOKENS 86
00412
00413 #define YYNNTS 69
00414
00415 #define YYNRULES 206
00416
00417 #define YYNSTATES 372
00418
00419
00420 #define YYUNDEFTOK 2
00421 #define YYMAXUTOK 316
00422
00423 #define YYTRANSLATE(YYX) \
00424 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00425
00426
00427 static const unsigned char yytranslate[] =
00428 {
00429 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00432 2, 2, 2, 75, 2, 2, 2, 77, 80, 2,
00433 63, 64, 76, 72, 69, 73, 71, 62, 2, 2,
00434 2, 2, 2, 2, 2, 2, 2, 2, 70, 85,
00435 78, 84, 79, 83, 2, 2, 2, 2, 2, 2,
00436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00438 2, 67, 2, 68, 81, 2, 2, 2, 2, 2,
00439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00441 2, 2, 2, 65, 82, 66, 74, 2, 2, 2,
00442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00454 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
00455 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
00456 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
00457 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00458 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
00459 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
00460 55, 56, 57, 58, 59, 60, 61
00461 };
00462
00463 #if YYDEBUG
00464
00465
00466 static const unsigned short yyprhs[] =
00467 {
00468 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
00469 19, 21, 23, 25, 29, 32, 36, 40, 44, 50,
00470 53, 58, 59, 61, 63, 66, 70, 76, 78, 80,
00471 82, 84, 86, 91, 95, 99, 101, 104, 107, 110,
00472 115, 119, 122, 126, 128, 132, 134, 136, 138, 141,
00473 144, 146, 149, 152, 155, 158, 161, 164, 167, 170,
00474 173, 176, 179, 181, 185, 189, 193, 195, 199, 203,
00475 205, 209, 213, 217, 219, 223, 227, 231, 235, 239,
00476 243, 245, 249, 253, 257, 261, 263, 267, 269, 273,
00477 275, 279, 281, 285, 287, 291, 293, 299, 301, 305,
00478 307, 309, 311, 313, 315, 317, 319, 321, 323, 325,
00479 327, 329, 331, 335, 337, 339, 341, 343, 345, 347,
00480 349, 351, 353, 355, 357, 359, 361, 363, 365, 368,
00481 372, 374, 377, 381, 385, 387, 391, 393, 396, 400,
00482 404, 406, 410, 412, 415, 418, 420, 423, 426, 432,
00483 440, 447, 453, 463, 474, 482, 491, 501, 502, 504,
00484 507, 510, 514, 518, 521, 524, 528, 532, 535, 538,
00485 542, 546, 552, 558, 562, 568, 569, 571, 573, 576,
00486 580, 585, 588, 592, 596, 600, 604, 608, 612, 617,
00487 623, 626, 628, 631, 637, 644, 649, 655, 657, 661,
00488 664, 668, 669, 671, 673, 676, 678
00489 };
00490
00491
00492 static const short yyrhs[] =
00493 {
00494 152, 0, -1, 3, -1, 4, -1, 5, -1, 7,
00495 -1, 6, -1, 62, -1, 51, -1, 21, -1, 59,
00496 -1, 87, -1, 89, -1, 63, 116, 64, -1, 65,
00497 66, -1, 65, 93, 66, -1, 67, 91, 68, -1,
00498 67, 90, 68, -1, 67, 90, 69, 91, 68, -1,
00499 91, 114, -1, 90, 69, 91, 114, -1, -1, 92,
00500 -1, 69, -1, 92, 69, -1, 94, 70, 114, -1,
00501 93, 69, 94, 70, 114, -1, 59, -1, 6, -1,
00502 7, -1, 88, -1, 149, -1, 95, 67, 116, 68,
00503 -1, 95, 71, 59, -1, 12, 95, 98, -1, 95,
00504 -1, 12, 96, -1, 95, 98, -1, 97, 98, -1,
00505 97, 67, 116, 68, -1, 97, 71, 59, -1, 63,
00506 64, -1, 63, 99, 64, -1, 114, -1, 99, 69,
00507 114, -1, 96, -1, 97, -1, 100, -1, 100, 43,
00508 -1, 100, 44, -1, 101, -1, 19, 102, -1, 18,
00509 102, -1, 27, 102, -1, 43, 102, -1, 60, 102,
00510 -1, 44, 102, -1, 61, 102, -1, 72, 102, -1,
00511 73, 102, -1, 74, 102, -1, 75, 102, -1, 102,
00512 -1, 103, 76, 102, -1, 103, 62, 102, -1, 103,
00513 77, 102, -1, 103, -1, 104, 72, 103, -1, 104,
00514 73, 103, -1, 104, -1, 105, 45, 104, -1, 105,
00515 46, 104, -1, 105, 47, 104, -1, 105, -1, 106,
00516 78, 105, -1, 106, 79, 105, -1, 106, 39, 105,
00517 -1, 106, 40, 105, -1, 106, 26, 105, -1, 106,
00518 25, 105, -1, 106, -1, 107, 35, 106, -1, 107,
00519 36, 106, -1, 107, 37, 106, -1, 107, 38, 106,
00520 -1, 107, -1, 108, 80, 107, -1, 108, -1, 109,
00521 81, 108, -1, 109, -1, 110, 82, 109, -1, 110,
00522 -1, 111, 42, 110, -1, 111, -1, 112, 41, 111,
00523 -1, 112, -1, 112, 83, 114, 70, 114, -1, 113,
00524 -1, 100, 115, 114, -1, 84, -1, 48, -1, 49,
00525 -1, 50, -1, 51, -1, 52, -1, 53, -1, 54,
00526 -1, 55, -1, 57, -1, 58, -1, 56, -1, 114,
00527 -1, 116, 69, 114, -1, 118, -1, 120, -1, 123,
00528 -1, 127, -1, 128, -1, 129, -1, 130, -1, 132,
00529 -1, 133, -1, 134, -1, 135, -1, 136, -1, 142,
00530 -1, 143, -1, 144, -1, 65, 66, -1, 65, 153,
00531 66, -1, 117, -1, 119, 117, -1, 13, 121, 85,
00532 -1, 13, 121, 1, -1, 122, -1, 121, 69, 122,
00533 -1, 59, -1, 59, 126, -1, 14, 124, 85, -1,
00534 14, 124, 1, -1, 125, -1, 124, 69, 122, -1,
00535 59, -1, 59, 126, -1, 84, 114, -1, 85, -1,
00536 116, 85, -1, 116, 1, -1, 20, 63, 116, 64,
00537 117, -1, 20, 63, 116, 64, 117, 24, 117, -1,
00538 22, 117, 23, 63, 116, 64, -1, 23, 63, 116,
00539 64, 117, -1, 11, 63, 131, 85, 131, 85, 131,
00540 64, 117, -1, 11, 63, 13, 121, 85, 131, 85,
00541 131, 64, 117, -1, 11, 63, 100, 25, 116, 64,
00542 117, -1, 11, 63, 13, 59, 25, 116, 64, 117,
00543 -1, 11, 63, 13, 59, 126, 25, 116, 64, 117,
00544 -1, -1, 116, -1, 15, 85, -1, 15, 1, -1,
00545 15, 59, 85, -1, 15, 59, 1, -1, 8, 85,
00546 -1, 8, 1, -1, 8, 59, 85, -1, 8, 59,
00547 1, -1, 17, 85, -1, 17, 1, -1, 17, 116,
00548 85, -1, 17, 116, 1, -1, 29, 63, 116, 64,
00549 117, -1, 28, 63, 116, 64, 137, -1, 65, 138,
00550 66, -1, 65, 138, 141, 138, 66, -1, -1, 139,
00551 -1, 140, -1, 139, 140, -1, 9, 116, 70, -1,
00552 9, 116, 70, 119, -1, 10, 70, -1, 10, 70,
00553 119, -1, 59, 70, 117, -1, 31, 116, 85, -1,
00554 31, 116, 1, -1, 32, 118, 145, -1, 32, 118,
00555 146, -1, 32, 118, 145, 146, -1, 33, 63, 59,
00556 64, 118, -1, 34, 118, -1, 148, -1, 18, 148,
00557 -1, 16, 59, 63, 64, 151, -1, 16, 59, 63,
00558 150, 64, 151, -1, 16, 63, 64, 151, -1, 16,
00559 63, 150, 64, 151, -1, 59, -1, 150, 69, 59,
00560 -1, 65, 66, -1, 65, 153, 66, -1, -1, 153,
00561 -1, 154, -1, 153, 154, -1, 117, -1, 147, -1
00562 };
00563
00564
00565 static const unsigned short yyrline[] =
00566 {
00567 0, 165, 165, 166, 167, 168, 169, 170, 173, 180,
00568 181, 182, 183, 184, 185, 186, 190, 191, 192, 196,
00569 197, 202, 203, 207, 208, 212, 213, 218, 219, 220,
00570 224, 225, 226, 227, 228, 232, 233, 237, 238, 239,
00571 240, 244, 245, 249, 250, 254, 255, 259, 260, 261,
00572 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
00573 275, 276, 280, 281, 282, 283, 287, 288, 289, 293,
00574 294, 295, 296, 300, 301, 303, 305, 307, 309, 311,
00575 316, 317, 318, 319, 320, 324, 325, 329, 330, 334,
00576 335, 339, 340, 345, 346, 351, 352, 357, 358, 363,
00577 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
00578 374, 378, 379, 383, 384, 385, 386, 387, 388, 389,
00579 390, 391, 392, 393, 394, 395, 396, 397, 401, 402,
00580 406, 407, 411, 413, 423, 424, 429, 430, 434, 436,
00581 446, 447, 452, 453, 457, 461, 465, 467, 475, 476,
00582 481, 482, 483, 486, 489, 492, 495, 501, 502, 506,
00583 507, 511, 512, 519, 520, 524, 525, 533, 534, 538,
00584 539, 547, 552, 557, 558, 563, 564, 568, 569, 573,
00585 574, 578, 579, 583, 588, 589, 596, 597, 598, 602,
00586 607, 611, 613, 617, 618, 623, 624, 630, 631, 635,
00587 637, 642, 645, 650, 651, 655, 656
00588 };
00589 #endif
00590
00591 #if YYDEBUG || YYERROR_VERBOSE
00592
00593
00594 static const char *const yytname[] =
00595 {
00596 "$end", "error", "$undefined", "NULLTOKEN", "TRUETOKEN", "FALSETOKEN",
00597 "STRING", "NUMBER", "BREAK", "CASE", "DEFAULT", "FOR", "NEW", "VAR",
00598 "CONST", "CONTINUE", "FUNCTION", "RETURN", "VOID", "DELETE", "IF",
00599 "THIS", "DO", "WHILE", "ELSE", "IN", "INSTANCEOF", "TYPEOF", "SWITCH",
00600 "WITH", "RESERVED", "THROW", "TRY", "CATCH", "FINALLY", "EQEQ", "NE",
00601 "STREQ", "STRNEQ", "LE", "GE", "OR", "AND", "PLUSPLUS", "MINUSMINUS",
00602 "LSHIFT", "RSHIFT", "URSHIFT", "PLUSEQUAL", "MINUSEQUAL", "MULTEQUAL",
00603 "DIVEQUAL", "LSHIFTEQUAL", "RSHIFTEQUAL", "URSHIFTEQUAL", "ANDEQUAL",
00604 "MODEQUAL", "XOREQUAL", "OREQUAL", "IDENT", "AUTOPLUSPLUS",
00605 "AUTOMINUSMINUS", "'/'", "'('", "')'", "'{'", "'}'", "'['", "']'",
00606 "','", "':'", "'.'", "'+'", "'-'", "'~'", "'!'", "'*'", "'%'", "'<'",
00607 "'>'", "'&'", "'^'", "'|'", "'?'", "'='", "';'", "$accept", "Literal",
00608 "PrimaryExpr", "ArrayLiteral", "ElementList", "ElisionOpt", "Elision",
00609 "PropertyNameAndValueList", "PropertyName", "MemberExpr", "NewExpr",
00610 "CallExpr", "Arguments", "ArgumentList", "LeftHandSideExpr",
00611 "PostfixExpr", "UnaryExpr", "MultiplicativeExpr", "AdditiveExpr",
00612 "ShiftExpr", "RelationalExpr", "EqualityExpr", "BitwiseANDExpr",
00613 "BitwiseXORExpr", "BitwiseORExpr", "LogicalANDExpr", "LogicalORExpr",
00614 "ConditionalExpr", "AssignmentExpr", "AssignmentOperator", "Expr",
00615 "Statement", "Block", "StatementList", "VariableStatement",
00616 "VariableDeclarationList", "VariableDeclaration", "ConstStatement",
00617 "ConstDeclarationList", "ConstDeclaration", "Initializer",
00618 "EmptyStatement", "ExprStatement", "IfStatement", "IterationStatement",
00619 "ExprOpt", "ContinueStatement", "BreakStatement", "ReturnStatement",
00620 "WithStatement", "SwitchStatement", "CaseBlock", "CaseClausesOpt",
00621 "CaseClauses", "CaseClause", "DefaultClause", "LabelledStatement",
00622 "ThrowStatement", "TryStatement", "Catch", "Finally",
00623 "FunctionDeclaration", "FunctionDeclarationInternal", "FunctionExpr",
00624 "FormalParameterList", "FunctionBody", "Program", "SourceElements",
00625 "SourceElement", 0
00626 };
00627 #endif
00628
00629 # ifdef YYPRINT
00630
00631
00632 static const unsigned short yytoknum[] =
00633 {
00634 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
00635 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
00636 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
00637 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
00638 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
00639 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
00640 315, 316, 47, 40, 41, 123, 125, 91, 93, 44,
00641 58, 46, 43, 45, 126, 33, 42, 37, 60, 62,
00642 38, 94, 124, 63, 61, 59
00643 };
00644 # endif
00645
00646
00647 static const unsigned char yyr1[] =
00648 {
00649 0, 86, 87, 87, 87, 87, 87, 87, 87, 88,
00650 88, 88, 88, 88, 88, 88, 89, 89, 89, 90,
00651 90, 91, 91, 92, 92, 93, 93, 94, 94, 94,
00652 95, 95, 95, 95, 95, 96, 96, 97, 97, 97,
00653 97, 98, 98, 99, 99, 100, 100, 101, 101, 101,
00654 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
00655 102, 102, 103, 103, 103, 103, 104, 104, 104, 105,
00656 105, 105, 105, 106, 106, 106, 106, 106, 106, 106,
00657 107, 107, 107, 107, 107, 108, 108, 109, 109, 110,
00658 110, 111, 111, 112, 112, 113, 113, 114, 114, 115,
00659 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
00660 115, 116, 116, 117, 117, 117, 117, 117, 117, 117,
00661 117, 117, 117, 117, 117, 117, 117, 117, 118, 118,
00662 119, 119, 120, 120, 121, 121, 122, 122, 123, 123,
00663 124, 124, 125, 125, 126, 127, 128, 128, 129, 129,
00664 130, 130, 130, 130, 130, 130, 130, 131, 131, 132,
00665 132, 132, 132, 133, 133, 133, 133, 134, 134, 134,
00666 134, 135, 136, 137, 137, 138, 138, 139, 139, 140,
00667 140, 141, 141, 142, 143, 143, 144, 144, 144, 145,
00668 146, 147, 147, 148, 148, 149, 149, 150, 150, 151,
00669 151, 152, 152, 153, 153, 154, 154
00670 };
00671
00672
00673 static const unsigned char yyr2[] =
00674 {
00675 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
00676 1, 1, 1, 3, 2, 3, 3, 3, 5, 2,
00677 4, 0, 1, 1, 2, 3, 5, 1, 1, 1,
00678 1, 1, 4, 3, 3, 1, 2, 2, 2, 4,
00679 3, 2, 3, 1, 3, 1, 1, 1, 2, 2,
00680 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00681 2, 2, 1, 3, 3, 3, 1, 3, 3, 1,
00682 3, 3, 3, 1, 3, 3, 3, 3, 3, 3,
00683 1, 3, 3, 3, 3, 1, 3, 1, 3, 1,
00684 3, 1, 3, 1, 3, 1, 5, 1, 3, 1,
00685 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00686 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
00687 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
00688 1, 2, 3, 3, 1, 3, 1, 2, 3, 3,
00689 1, 3, 1, 2, 2, 1, 2, 2, 5, 7,
00690 6, 5, 9, 10, 7, 8, 9, 0, 1, 2,
00691 2, 3, 3, 2, 2, 3, 3, 2, 2, 3,
00692 3, 5, 5, 3, 5, 0, 1, 1, 2, 3,
00693 4, 2, 3, 3, 3, 3, 3, 3, 4, 5,
00694 2, 1, 2, 5, 6, 4, 5, 1, 3, 2,
00695 3, 0, 1, 1, 2, 1, 1
00696 };
00697
00698
00699
00700
00701 static const unsigned char yydefact[] =
00702 {
00703 201, 2, 3, 4, 6, 5, 0, 0, 0, 0,
00704 0, 0, 0, 0, 0, 0, 0, 9, 0, 0,
00705 0, 0, 0, 0, 0, 0, 0, 8, 10, 0,
00706 0, 7, 0, 0, 21, 0, 0, 0, 0, 145,
00707 11, 30, 12, 35, 45, 46, 47, 50, 62, 66,
00708 69, 73, 80, 85, 87, 89, 91, 93, 95, 97,
00709 111, 0, 205, 113, 114, 115, 116, 117, 118, 119,
00710 120, 121, 122, 123, 124, 125, 126, 127, 206, 191,
00711 31, 0, 202, 203, 164, 0, 163, 157, 0, 10,
00712 0, 35, 36, 136, 0, 134, 142, 0, 140, 160,
00713 0, 159, 0, 0, 168, 0, 167, 0, 47, 52,
00714 192, 51, 0, 0, 0, 53, 0, 0, 0, 0,
00715 0, 54, 56, 0, 55, 57, 0, 6, 5, 10,
00716 14, 0, 0, 0, 23, 0, 0, 22, 58, 59,
00717 60, 61, 0, 0, 0, 37, 0, 0, 38, 48,
00718 49, 100, 101, 102, 103, 104, 105, 106, 107, 110,
00719 108, 109, 99, 0, 0, 0, 0, 0, 0, 0,
00720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00721 0, 0, 0, 0, 0, 0, 0, 0, 147, 0,
00722 146, 1, 204, 166, 165, 0, 47, 158, 0, 28,
00723 29, 27, 14, 34, 0, 137, 133, 0, 132, 143,
00724 139, 0, 138, 162, 161, 0, 197, 0, 0, 170,
00725 169, 0, 0, 0, 0, 0, 185, 184, 128, 0,
00726 0, 186, 187, 183, 13, 15, 0, 0, 129, 17,
00727 21, 16, 19, 24, 41, 0, 43, 0, 33, 0,
00728 40, 98, 64, 63, 65, 67, 68, 70, 71, 72,
00729 79, 78, 76, 77, 74, 75, 81, 82, 83, 84,
00730 86, 88, 90, 92, 94, 0, 112, 136, 0, 0,
00731 157, 144, 135, 141, 0, 0, 0, 195, 0, 0,
00732 0, 0, 0, 0, 0, 0, 190, 188, 0, 25,
00733 0, 42, 0, 32, 39, 0, 0, 137, 157, 0,
00734 0, 193, 0, 199, 0, 196, 198, 148, 0, 151,
00735 175, 172, 171, 0, 0, 18, 20, 44, 96, 0,
00736 0, 0, 0, 157, 194, 200, 0, 150, 0, 0,
00737 176, 177, 0, 26, 0, 0, 157, 154, 0, 149,
00738 0, 0, 173, 175, 178, 189, 155, 0, 0, 0,
00739 179, 181, 0, 156, 0, 152, 130, 180, 182, 174,
00740 153, 131
00741 };
00742
00743
00744 static const short yydefgoto[] =
00745 {
00746 -1, 40, 41, 42, 135, 136, 137, 131, 132, 43,
00747 44, 45, 145, 245, 46, 47, 48, 49, 50, 51,
00748 52, 53, 54, 55, 56, 57, 58, 59, 60, 163,
00749 61, 62, 63, 367, 64, 94, 95, 65, 97, 98,
00750 205, 66, 67, 68, 69, 198, 70, 71, 72, 73,
00751 74, 321, 339, 340, 341, 353, 75, 76, 77, 231,
00752 232, 78, 79, 80, 218, 287, 81, 133, 83
00753 };
00754
00755
00756
00757 #define YYPACT_NINF -265
00758 static const short yypact[] =
00759 {
00760 747, -265, -265, -265, -265, -265, 5, -45, 176, -31,
00761 30, 6, -3, 67, 1232, 1305, -14, -265, 822, 12,
00762 1305, 15, 74, 1305, -13, 1305, 1305, -265, 44, 1305,
00763 1305, -265, 1305, 372, 84, 1305, 1305, 1305, 1305, -265,
00764 -265, -265, -265, -26, -265, -17, 251, -265, -265, -19,
00765 50, 159, 131, 184, 115, 156, 158, 200, -2, -265,
00766 -265, 11, -265, -265, -265, -265, -265, -265, -265, -265,
00767 -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
00768 -265, 244, 747, -265, -265, 10, -265, 940, 182, -265,
00769 92, -26, -265, 178, 18, -265, 178, 28, -265, -265,
00770 16, -265, 201, -11, -265, 1305, -265, 39, 19, -265,
00771 -265, -265, 1305, 240, 1305, -265, 1305, 1305, 46, 447,
00772 132, -265, -265, 822, -265, -265, 48, 195, 196, 44,
00773 905, 69, 197, 522, -265, 107, 1013, 199, -265, -265,
00774 -265, -265, 1086, 1305, 212, -265, 1305, 214, -265, -265,
00775 -265, -265, -265, -265, -265, -265, -265, -265, -265, -265,
00776 -265, -265, -265, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
00777 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305,
00778 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, -265, 1305,
00779 -265, -265, -265, -265, -265, 218, 203, 209, 194, -265,
00780 -265, -265, -265, -265, 1305, -265, -265, -31, -265, -265,
00781 -265, -31, -265, -265, -265, 57, -265, 215, 56, -265,
00782 -265, 85, 219, 86, 98, 99, -265, -265, -265, 220,
00783 -13, 250, -265, -265, -265, -265, 60, 1305, -265, -265,
00784 84, -265, -265, -265, -265, 100, -265, 143, -265, 147,
00785 -265, -265, -265, -265, -265, -19, -19, 50, 50, 50,
00786 159, 159, 159, 159, 159, 159, 131, 131, 131, 131,
00787 184, 115, 156, 158, 200, 216, -265, 9, -43, 1305,
00788 1305, -265, -265, -265, 215, 109, 597, -265, 215, 226,
00789 822, 1305, 822, 224, 822, 231, -265, -265, 221, -265,
00790 1159, -265, 1305, -265, -265, 1305, 1305, 267, 1305, 120,
00791 225, -265, 215, -265, 672, -265, -265, 273, 121, -265,
00792 302, -265, -265, 248, 1305, -265, -265, -265, -265, 129,
00793 1305, 228, 822, 1305, -265, -265, 822, -265, 1305, 26,
00794 302, -265, -13, -265, 822, 130, 1305, -265, 252, -265,
00795 164, 245, -265, 302, -265, -265, -265, 822, 253, 822,
00796 822, 822, 255, -265, 822, -265, -265, 822, 822, -265,
00797 -265, -265
00798 };
00799
00800
00801 static const short yypgoto[] =
00802 {
00803 -265, -265, -265, -265, -265, 82, -265, -265, 88, 317,
00804 319, -265, -7, -265, 188, -265, -5, 33, 79, -29,
00805 51, 148, 146, 149, 152, 145, -265, -265, -128, -265,
00806 -10, -18, -23, -27, -265, 137, -20, -265, -265, -265,
00807 -91, -265, -265, -265, -265, -264, -265, -265, -265, -265,
00808 -265, -265, -15, -265, 0, -265, -265, -265, -265, -265,
00809 113, -265, 331, -265, 133, -261, -265, 2, -78
00810 };
00811
00812
00813
00814
00815
00816 #define YYTABLE_NINF -129
00817 static const short yytable[] =
00818 {
00819 113, 120, 82, 107, 192, 209, 84, 99, 242, 109,
00820 111, 193, 188, 118, 246, 115, 310, 213, 87, 206,
00821 121, 122, 126, 311, 124, 125, 207, 315, 93, 210,
00822 138, 139, 140, 141, 306, 251, 351, 142, 148, 186,
00823 219, 143, 308, 164, 331, 144, 142, 226, 216, 112,
00824 146, 334, 119, 217, 147, 192, 102, 165, 166, 275,
00825 103, 276, 149, 150, 85, 100, 199, 200, 104, 348,
00826 1, 2, 3, 4, 5, 114, 281, 197, 116, 8,
00827 189, 187, 358, 88, 203, 105, 15, 207, 17, 96,
00828 86, 101, 352, 204, 20, 194, 190, 211, 199, 200,
00829 109, 214, 221, 208, 223, 233, 224, 225, 189, 299,
00830 25, 26, 234, 212, 123, 189, 216, 189, 27, 201,
00831 288, 284, 167, 168, 220, 289, 89, 29, 30, 31,
00832 32, 227, 90, 247, 34, 235, 249, 117, 236, 35,
00833 36, 37, 38, 260, 261, 262, 263, 264, 265, 290,
00834 292, 201, 106, 134, 189, 189, 172, 173, 202, 252,
00835 253, 254, 293, 294, 301, 229, 230, 189, 189, 302,
00836 174, 175, 326, 312, 327, 239, 240, 328, 289, 1,
00837 2, 3, 4, 5, 332, 337, 307, 282, 8, 189,
00838 189, 283, 88, 344, 357, 182, 343, 17, 189, 189,
00839 255, 256, 108, 108, 169, 170, 171, 296, 108, 176,
00840 177, 303, 189, 108, 108, 304, 189, 108, 108, 178,
00841 179, 180, 181, 108, 108, 108, 108, 27, 279, 266,
00842 267, 268, 269, 189, 360, 89, 192, 183, 31, 32,
00843 184, 90, 185, 34, 191, 103, 149, 150, 257, 258,
00844 259, 151, 152, 153, 154, 155, 156, 157, 158, 159,
00845 160, 161, 204, 222, 215, -28, -29, 237, 243, 309,
00846 197, 248, 317, 250, 319, 196, 322, 277, 189, 280,
00847 286, 318, 291, 295, 230, 316, 305, 162, 314, 320,
00848 323, 324, 330, 108, 149, 150, 329, 336, 197, 151,
00849 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
00850 333, 338, 342, 346, 347, 361, 359, 364, 349, 355,
00851 345, 369, 300, 197, 298, 91, 356, 92, 350, 271,
00852 270, 274, 278, 272, 368, 162, 197, 273, 362, 363,
00853 354, 365, 366, 366, 297, 110, 370, 0, 285, 371,
00854 371, 0, 108, 108, 108, 108, 108, 108, 108, 108,
00855 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
00856 108, 108, 108, 108, 108, 1, 2, 3, 127, 128,
00857 6, 0, 0, 7, 8, 9, 10, 11, 12, 13,
00858 14, 15, 16, 17, 18, 19, 0, 0, 0, 20,
00859 21, 22, 0, 23, 24, 0, 0, 0, 0, 0,
00860 0, 0, 0, 0, 0, 25, 26, 0, 0, 0,
00861 0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
00862 0, 129, 29, 30, 31, 32, 0, 33, 130, 34,
00863 0, 0, 0, 0, 35, 36, 37, 38, 0, 0,
00864 1, 2, 3, 4, 5, 6, 0, 39, 7, 8,
00865 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
00866 19, 0, 0, 0, 20, 21, 22, 0, 23, 24,
00867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00868 25, 26, 0, 0, 0, 0, 0, 0, 27, 0,
00869 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
00870 32, 0, 33, 228, 34, 0, 0, 0, 0, 35,
00871 36, 37, 38, 0, 0, 1, 2, 3, 4, 5,
00872 6, 0, 39, 7, 8, 9, 10, 11, 12, 13,
00873 14, 15, 16, 17, 18, 19, 0, 0, 0, 20,
00874 21, 22, 0, 23, 24, 0, 0, 0, 0, 0,
00875 0, 0, 0, 0, 0, 25, 26, 0, 0, 0,
00876 0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
00877 0, 28, 29, 30, 31, 32, 0, 33, 238, 34,
00878 0, 0, 0, 0, 35, 36, 37, 38, 0, 0,
00879 1, 2, 3, 4, 5, 6, 0, 39, 7, 8,
00880 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
00881 19, 0, 0, 0, 20, 21, 22, 0, 23, 24,
00882 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00883 25, 26, 0, 0, 0, 0, 0, 0, 27, 0,
00884 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
00885 32, 0, 33, 313, 34, 0, 0, 0, 0, 35,
00886 36, 37, 38, 0, 0, 1, 2, 3, 4, 5,
00887 6, 0, 39, 7, 8, 9, 10, 11, 12, 13,
00888 14, 15, 16, 17, 18, 19, 0, 0, 0, 20,
00889 21, 22, 0, 23, 24, 0, 0, 0, 0, 0,
00890 0, 0, 0, 0, 0, 25, 26, 0, 0, 0,
00891 0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
00892 0, 28, 29, 30, 31, 32, 0, 33, 335, 34,
00893 0, 0, 0, 0, 35, 36, 37, 38, 0, 0,
00894 1, 2, 3, 4, 5, 6, 0, 39, 7, 8,
00895 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
00896 19, 0, 0, 0, 20, 21, 22, 0, 23, 24,
00897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00898 25, 26, 0, 0, 0, 0, 0, 0, 27, 0,
00899 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
00900 32, 0, 33, 0, 34, 0, 0, 0, 0, 35,
00901 36, 37, 38, 0, 0, 1, 2, 3, 4, 5,
00902 6, 0, 39, 7, 8, 9, 10, 11, 88, 13,
00903 105, 15, 16, 17, 18, 19, 0, 0, 0, 20,
00904 21, 22, 0, 23, 24, 0, 0, 0, 0, 0,
00905 0, 0, 0, 0, 0, 25, 26, 0, 0, 0,
00906 0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
00907 0, 28, 29, 30, 31, 32, 0, 33, 0, 34,
00908 0, 0, 0, 0, 35, 36, 37, 38, 0, 0,
00909 0, 0, 0, 0, 0, -128, 0, 39, -128, -128,
00910 -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
00911 -128, -128, -128, -128, -128, -128, -128, -128, -128, -128,
00912 0, 0, -128, -128, -128, 0, -128, -128, 0, 0,
00913 0, 0, 0, 1, 2, 3, 4, 5, 0, 0,
00914 0, 0, 8, 195, 0, 0, 88, 0, 105, 15,
00915 0, 17, 0, 0, -128, -128, -128, 20, 0, 0,
00916 -128, -128, 0, 0, 0, 0, 0, 0, 0, -128,
00917 -128, 0, 0, 25, 26, 0, 0, 0, 0, 0,
00918 0, 27, 0, 0, 0, 0, 0, 0, 0, 89,
00919 29, 30, 31, 32, 0, 90, 0, 34, 0, 0,
00920 0, 0, 35, 36, 37, 38, 1, 2, 3, 4,
00921 5, 0, 0, 0, 0, 8, 0, 0, 0, 88,
00922 0, 105, 15, 0, 17, 0, 0, 0, 0, 0,
00923 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00924 0, 0, 0, 0, 0, 0, 25, 26, 0, 0,
00925 0, 0, 0, 0, 27, 0, 0, 0, 0, 0,
00926 0, 0, 89, 29, 30, 31, 32, 0, 90, 0,
00927 34, 241, 0, 0, 0, 35, 36, 37, 38, 1,
00928 2, 3, 4, 5, 0, 0, 0, 0, 8, 0,
00929 0, 0, 88, 0, 105, 15, 0, 17, 0, 0,
00930 0, 0, 0, 20, 0, 0, 0, 0, 0, 0,
00931 0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
00932 26, 0, 0, 0, 0, 0, 0, 27, 0, 0,
00933 0, 0, 0, 0, 0, 89, 29, 30, 31, 32,
00934 244, 90, 0, 34, 0, 0, 0, 0, 35, 36,
00935 37, 38, 1, 2, 3, 4, 5, 0, 0, 0,
00936 0, 8, 0, 0, 0, 88, 0, 105, 15, 0,
00937 17, 0, 0, 0, 0, 0, 20, 0, 0, 0,
00938 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00939 0, 0, 25, 26, 0, 0, 0, 0, 0, 0,
00940 27, 0, 0, 0, 0, 0, 0, 0, 89, 29,
00941 30, 31, 32, 0, 90, 0, 34, 325, 0, 0,
00942 0, 35, 36, 37, 38, 1, 2, 3, 4, 5,
00943 0, 0, 0, 0, 8, 0, 0, 0, 12, 0,
00944 105, 15, 0, 17, 0, 0, 0, 0, 0, 20,
00945 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00946 0, 0, 0, 0, 0, 25, 26, 0, 0, 0,
00947 0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
00948 0, 89, 29, 30, 31, 32, 0, 90, 0, 34,
00949 0, 0, 0, 0, 35, 36, 37, 38, 1, 2,
00950 3, 4, 5, 0, 0, 0, 0, 8, 0, 0,
00951 0, 88, 0, 105, 15, 0, 17, 0, 0, 0,
00952 0, 0, 20, 0, 0, 0, 0, 0, 0, 0,
00953 0, 0, 0, 0, 0, 0, 0, 0, 25, 26,
00954 0, 0, 0, 0, 0, 0, 27, 0, 0, 0,
00955 0, 0, 0, 0, 89, 29, 30, 31, 32, 0,
00956 90, 0, 34, 0, 0, 0, 0, 35, 36, 37,
00957 38
00958 };
00959
00960 static const short yycheck[] =
00961 {
00962 18, 24, 0, 13, 82, 96, 1, 1, 136, 14,
00963 15, 1, 1, 23, 142, 20, 280, 1, 63, 1,
00964 25, 26, 32, 284, 29, 30, 69, 288, 59, 1,
00965 35, 36, 37, 38, 25, 163, 10, 63, 45, 41,
00966 1, 67, 85, 62, 308, 71, 63, 1, 59, 63,
00967 67, 312, 65, 64, 71, 133, 59, 76, 77, 187,
00968 63, 189, 43, 44, 59, 59, 6, 7, 1, 333,
00969 3, 4, 5, 6, 7, 63, 204, 87, 63, 12,
00970 69, 83, 346, 16, 91, 18, 19, 69, 21, 59,
00971 85, 85, 66, 84, 27, 85, 85, 69, 6, 7,
00972 105, 85, 112, 85, 114, 123, 116, 117, 69, 237,
00973 43, 44, 64, 85, 70, 69, 59, 69, 51, 59,
00974 64, 64, 72, 73, 85, 69, 59, 60, 61, 62,
00975 63, 85, 65, 143, 67, 66, 146, 63, 69, 72,
00976 73, 74, 75, 172, 173, 174, 175, 176, 177, 64,
00977 64, 59, 85, 69, 69, 69, 25, 26, 66, 164,
00978 165, 166, 64, 64, 64, 33, 34, 69, 69, 69,
00979 39, 40, 300, 64, 302, 68, 69, 305, 69, 3,
00980 4, 5, 6, 7, 64, 64, 277, 207, 12, 69,
00981 69, 211, 16, 64, 64, 80, 324, 21, 69, 69,
00982 167, 168, 14, 15, 45, 46, 47, 230, 20, 78,
00983 79, 68, 69, 25, 26, 68, 69, 29, 30, 35,
00984 36, 37, 38, 35, 36, 37, 38, 51, 25, 178,
00985 179, 180, 181, 69, 70, 59, 314, 81, 62, 63,
00986 82, 65, 42, 67, 0, 63, 43, 44, 169, 170,
00987 171, 48, 49, 50, 51, 52, 53, 54, 55, 56,
00988 57, 58, 84, 23, 63, 70, 70, 70, 69, 279,
00989 280, 59, 290, 59, 292, 87, 294, 59, 69, 85,
00990 65, 291, 63, 63, 34, 59, 70, 84, 286, 65,
00991 59, 70, 25, 105, 43, 44, 306, 24, 308, 48,
00992 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
00993 85, 9, 64, 85, 332, 70, 64, 64, 336, 342,
00994 330, 66, 240, 333, 236, 8, 344, 8, 338, 183,
00995 182, 186, 195, 184, 361, 84, 346, 185, 353, 357,
00996 340, 359, 360, 361, 231, 14, 364, -1, 215, 367,
00997 368, -1, 164, 165, 166, 167, 168, 169, 170, 171,
00998 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
00999 182, 183, 184, 185, 186, 3, 4, 5, 6, 7,
01000 8, -1, -1, 11, 12, 13, 14, 15, 16, 17,
01001 18, 19, 20, 21, 22, 23, -1, -1, -1, 27,
01002 28, 29, -1, 31, 32, -1, -1, -1, -1, -1,
01003 -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
01004 -1, -1, -1, 51, -1, -1, -1, -1, -1, -1,
01005 -1, 59, 60, 61, 62, 63, -1, 65, 66, 67,
01006 -1, -1, -1, -1, 72, 73, 74, 75, -1, -1,
01007 3, 4, 5, 6, 7, 8, -1, 85, 11, 12,
01008 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
01009 23, -1, -1, -1, 27, 28, 29, -1, 31, 32,
01010 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
01011 43, 44, -1, -1, -1, -1, -1, -1, 51, -1,
01012 -1, -1, -1, -1, -1, -1, 59, 60, 61, 62,
01013 63, -1, 65, 66, 67, -1, -1, -1, -1, 72,
01014 73, 74, 75, -1, -1, 3, 4, 5, 6, 7,
01015 8, -1, 85, 11, 12, 13, 14, 15, 16, 17,
01016 18, 19, 20, 21, 22, 23, -1, -1, -1, 27,
01017 28, 29, -1, 31, 32, -1, -1, -1, -1, -1,
01018 -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
01019 -1, -1, -1, 51, -1, -1, -1, -1, -1, -1,
01020 -1, 59, 60, 61, 62, 63, -1, 65, 66, 67,
01021 -1, -1, -1, -1, 72, 73, 74, 75, -1, -1,
01022 3, 4, 5, 6, 7, 8, -1, 85, 11, 12,
01023 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
01024 23, -1, -1, -1, 27, 28, 29, -1, 31, 32,
01025 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
01026 43, 44, -1, -1, -1, -1, -1, -1, 51, -1,
01027 -1, -1, -1, -1, -1, -1, 59, 60, 61, 62,
01028 63, -1, 65, 66, 67, -1, -1, -1, -1, 72,
01029 73, 74, 75, -1, -1, 3, 4, 5, 6, 7,
01030 8, -1, 85, 11, 12, 13, 14, 15, 16, 17,
01031 18, 19, 20, 21, 22, 23, -1, -1, -1, 27,
01032 28, 29, -1, 31, 32, -1, -1, -1, -1, -1,
01033 -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
01034 -1, -1, -1, 51, -1, -1, -1, -1, -1, -1,
01035 -1, 59, 60, 61, 62, 63, -1, 65, 66, 67,
01036 -1, -1, -1, -1, 72, 73, 74, 75, -1, -1,
01037 3, 4, 5, 6, 7, 8, -1, 85, 11, 12,
01038 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
01039 23, -1, -1, -1, 27, 28, 29, -1, 31, 32,
01040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
01041 43, 44, -1, -1, -1, -1, -1, -1, 51, -1,
01042 -1, -1, -1, -1, -1, -1, 59, 60, 61, 62,
01043 63, -1, 65, -1, 67, -1, -1, -1, -1, 72,
01044 73, 74, 75, -1, -1, 3, 4, 5, 6, 7,
01045 8, -1, 85, 11, 12, 13, 14, 15, 16, 17,
01046 18, 19, 20, 21, 22, 23, -1, -1, -1, 27,
01047 28, 29, -1, 31, 32, -1, -1, -1, -1, -1,
01048 -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
01049 -1, -1, -1, 51, -1, -1, -1, -1, -1, -1,
01050 -1, 59, 60, 61, 62, 63, -1, 65, -1, 67,
01051 -1, -1, -1, -1, 72, 73, 74, 75, -1, -1,
01052 -1, -1, -1, -1, -1, 0, -1, 85, 3, 4,
01053 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
01054 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
01055 -1, -1, 27, 28, 29, -1, 31, 32, -1, -1,
01056 -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
01057 -1, -1, 12, 13, -1, -1, 16, -1, 18, 19,
01058 -1, 21, -1, -1, 59, 60, 61, 27, -1, -1,
01059 65, 66, -1, -1, -1, -1, -1, -1, -1, 74,
01060 75, -1, -1, 43, 44, -1, -1, -1, -1, -1,
01061 -1, 51, -1, -1, -1, -1, -1, -1, -1, 59,
01062 60, 61, 62, 63, -1, 65, -1, 67, -1, -1,
01063 -1, -1, 72, 73, 74, 75, 3, 4, 5, 6,
01064 7, -1, -1, -1, -1, 12, -1, -1, -1, 16,
01065 -1, 18, 19, -1, 21, -1, -1, -1, -1, -1,
01066 27, -1, -1, -1, -1, -1, -1, -1, -1, -1,
01067 -1, -1, -1, -1, -1, -1, 43, 44, -1, -1,
01068 -1, -1, -1, -1, 51, -1, -1, -1, -1, -1,
01069 -1, -1, 59, 60, 61, 62, 63, -1, 65, -1,
01070 67, 68, -1, -1, -1, 72, 73, 74, 75, 3,
01071 4, 5, 6, 7, -1, -1, -1, -1, 12, -1,
01072 -1, -1, 16, -1, 18, 19, -1, 21, -1, -1,
01073 -1, -1, -1, 27, -1, -1, -1, -1, -1, -1,
01074 -1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
01075 44, -1, -1, -1, -1, -1, -1, 51, -1, -1,
01076 -1, -1, -1, -1, -1, 59, 60, 61, 62, 63,
01077 64, 65, -1, 67, -1, -1, -1, -1, 72, 73,
01078 74, 75, 3, 4, 5, 6, 7, -1, -1, -1,
01079 -1, 12, -1, -1, -1, 16, -1, 18, 19, -1,
01080 21, -1, -1, -1, -1, -1, 27, -1, -1, -1,
01081 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
01082 -1, -1, 43, 44, -1, -1, -1, -1, -1, -1,
01083 51, -1, -1, -1, -1, -1, -1, -1, 59, 60,
01084 61, 62, 63, -1, 65, -1, 67, 68, -1, -1,
01085 -1, 72, 73, 74, 75, 3, 4, 5, 6, 7,
01086 -1, -1, -1, -1, 12, -1, -1, -1, 16, -1,
01087 18, 19, -1, 21, -1, -1, -1, -1, -1, 27,
01088 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
01089 -1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
01090 -1, -1, -1, 51, -1, -1, -1, -1, -1, -1,
01091 -1, 59, 60, 61, 62, 63, -1, 65, -1, 67,
01092 -1, -1, -1, -1, 72, 73, 74, 75, 3, 4,
01093 5, 6, 7, -1, -1, -1, -1, 12, -1, -1,
01094 -1, 16, -1, 18, 19, -1, 21, -1, -1, -1,
01095 -1, -1, 27, -1, -1, -1, -1, -1, -1, -1,
01096 -1, -1, -1, -1, -1, -1, -1, -1, 43, 44,
01097 -1, -1, -1, -1, -1, -1, 51, -1, -1, -1,
01098 -1, -1, -1, -1, 59, 60, 61, 62, 63, -1,
01099 65, -1, 67, -1, -1, -1, -1, 72, 73, 74,
01100 75
01101 };
01102
01103
01104
01105 static const unsigned char yystos[] =
01106 {
01107 0, 3, 4, 5, 6, 7, 8, 11, 12, 13,
01108 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
01109 27, 28, 29, 31, 32, 43, 44, 51, 59, 60,
01110 61, 62, 63, 65, 67, 72, 73, 74, 75, 85,
01111 87, 88, 89, 95, 96, 97, 100, 101, 102, 103,
01112 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
01113 114, 116, 117, 118, 120, 123, 127, 128, 129, 130,
01114 132, 133, 134, 135, 136, 142, 143, 144, 147, 148,
01115 149, 152, 153, 154, 1, 59, 85, 63, 16, 59,
01116 65, 95, 96, 59, 121, 122, 59, 124, 125, 1,
01117 59, 85, 59, 63, 1, 18, 85, 116, 100, 102,
01118 148, 102, 63, 117, 63, 102, 63, 63, 116, 65,
01119 118, 102, 102, 70, 102, 102, 116, 6, 7, 59,
01120 66, 93, 94, 153, 69, 90, 91, 92, 102, 102,
01121 102, 102, 63, 67, 71, 98, 67, 71, 98, 43,
01122 44, 48, 49, 50, 51, 52, 53, 54, 55, 56,
01123 57, 58, 84, 115, 62, 76, 77, 72, 73, 45,
01124 46, 47, 25, 26, 39, 40, 78, 79, 35, 36,
01125 37, 38, 80, 81, 82, 42, 41, 83, 1, 69,
01126 85, 0, 154, 1, 85, 13, 100, 116, 131, 6,
01127 7, 59, 66, 98, 84, 126, 1, 69, 85, 126,
01128 1, 69, 85, 1, 85, 63, 59, 64, 150, 1,
01129 85, 116, 23, 116, 116, 116, 1, 85, 66, 33,
01130 34, 145, 146, 117, 64, 66, 69, 70, 66, 68,
01131 69, 68, 114, 69, 64, 99, 114, 116, 59, 116,
01132 59, 114, 102, 102, 102, 103, 103, 104, 104, 104,
01133 105, 105, 105, 105, 105, 105, 106, 106, 106, 106,
01134 107, 108, 109, 110, 111, 114, 114, 59, 121, 25,
01135 85, 114, 122, 122, 64, 150, 65, 151, 64, 69,
01136 64, 63, 64, 64, 64, 63, 118, 146, 94, 114,
01137 91, 64, 69, 68, 68, 70, 25, 126, 85, 116,
01138 131, 151, 64, 66, 153, 151, 59, 117, 116, 117,
01139 65, 137, 117, 59, 70, 68, 114, 114, 114, 116,
01140 25, 131, 64, 85, 151, 66, 24, 64, 9, 138,
01141 139, 140, 64, 114, 64, 116, 85, 117, 131, 117,
01142 116, 10, 66, 141, 140, 118, 117, 64, 131, 64,
01143 70, 70, 138, 117, 64, 117, 117, 119, 119, 66,
01144 117, 117
01145 };
01146
01147 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
01148 # define YYSIZE_T __SIZE_TYPE__
01149 #endif
01150 #if ! defined (YYSIZE_T) && defined (size_t)
01151 # define YYSIZE_T size_t
01152 #endif
01153 #if ! defined (YYSIZE_T)
01154 # if defined (__STDC__) || defined (__cplusplus)
01155 # include <stddef.h>
01156 # define YYSIZE_T size_t
01157 # endif
01158 #endif
01159 #if ! defined (YYSIZE_T)
01160 # define YYSIZE_T unsigned int
01161 #endif
01162
01163 #define yyerrok (yyerrstatus = 0)
01164 #define yyclearin (yychar = YYEMPTY)
01165 #define YYEMPTY (-2)
01166 #define YYEOF 0
01167
01168 #define YYACCEPT goto yyacceptlab
01169 #define YYABORT goto yyabortlab
01170 #define YYERROR goto yyerrlab1
01171
01172
01173
01174
01175
01176 #define YYFAIL goto yyerrlab
01177
01178 #define YYRECOVERING() (!!yyerrstatus)
01179
01180 #define YYBACKUP(Token, Value) \
01181 do \
01182 if (yychar == YYEMPTY && yylen == 1) \
01183 { \
01184 yychar = (Token); \
01185 yylval = (Value); \
01186 yytoken = YYTRANSLATE (yychar); \
01187 YYPOPSTACK; \
01188 goto yybackup; \
01189 } \
01190 else \
01191 { \
01192 yyerror ("syntax error: cannot back up");\
01193 YYERROR; \
01194 } \
01195 while (0)
01196
01197 #define YYTERROR 1
01198 #define YYERRCODE 256
01199
01200
01201
01202
01203 #ifndef YYLLOC_DEFAULT
01204 # define YYLLOC_DEFAULT(Current, Rhs, N) \
01205 Current.first_line = Rhs[1].first_line; \
01206 Current.first_column = Rhs[1].first_column; \
01207 Current.last_line = Rhs[N].last_line; \
01208 Current.last_column = Rhs[N].last_column;
01209 #endif
01210
01211
01212
01213 #ifdef YYLEX_PARAM
01214 # define YYLEX yylex (YYLEX_PARAM)
01215 #else
01216 # define YYLEX yylex ()
01217 #endif
01218
01219
01220 #if YYDEBUG
01221
01222 # ifndef YYFPRINTF
01223 # include <stdio.h>
01224 # define YYFPRINTF fprintf
01225 # endif
01226
01227 # define YYDPRINTF(Args) \
01228 do { \
01229 if (yydebug) \
01230 YYFPRINTF Args; \
01231 } while (0)
01232
01233 # define YYDSYMPRINT(Args) \
01234 do { \
01235 if (yydebug) \
01236 yysymprint Args; \
01237 } while (0)
01238
01239 # define YYDSYMPRINTF(Title, Token, Value, Location) \
01240 do { \
01241 if (yydebug) \
01242 { \
01243 YYFPRINTF (stderr, "%s ", Title); \
01244 yysymprint (stderr, \
01245 Token, Value, Location); \
01246 YYFPRINTF (stderr, "\n"); \
01247 } \
01248 } while (0)
01249
01250
01251
01252
01253
01254
01255 #if defined (__STDC__) || defined (__cplusplus)
01256 static void
01257 yy_stack_print (short *bottom, short *top)
01258 #else
01259 static void
01260 yy_stack_print (bottom, top)
01261 short *bottom;
01262 short *top;
01263 #endif
01264 {
01265 YYFPRINTF (stderr, "Stack now");
01266 for (; bottom <= top; ++bottom)
01267 YYFPRINTF (stderr, " %d", *bottom);
01268 YYFPRINTF (stderr, "\n");
01269 }
01270
01271 # define YY_STACK_PRINT(Bottom, Top) \
01272 do { \
01273 if (yydebug) \
01274 yy_stack_print ((Bottom), (Top)); \
01275 } while (0)
01276
01277
01278
01279
01280
01281
01282 #if defined (__STDC__) || defined (__cplusplus)
01283 static void
01284 yy_reduce_print (int yyrule)
01285 #else
01286 static void
01287 yy_reduce_print (yyrule)
01288 int yyrule;
01289 #endif
01290 {
01291 int yyi;
01292 unsigned int yylineno = yyrline[yyrule];
01293 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
01294 yyrule - 1, yylineno);
01295
01296 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
01297 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
01298 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
01299 }
01300
01301 # define YY_REDUCE_PRINT(Rule) \
01302 do { \
01303 if (yydebug) \
01304 yy_reduce_print (Rule); \
01305 } while (0)
01306
01307
01308
01309 int yydebug;
01310 #else
01311 # define YYDPRINTF(Args)
01312 # define YYDSYMPRINT(Args)
01313 # define YYDSYMPRINTF(Title, Token, Value, Location)
01314 # define YY_STACK_PRINT(Bottom, Top)
01315 # define YY_REDUCE_PRINT(Rule)
01316 #endif
01317
01318
01319
01320 #ifndef YYINITDEPTH
01321 # define YYINITDEPTH 200
01322 #endif
01323
01324
01325
01326
01327
01328
01329
01330
01331 #if YYMAXDEPTH == 0
01332 # undef YYMAXDEPTH
01333 #endif
01334
01335 #ifndef YYMAXDEPTH
01336 # define YYMAXDEPTH 10000
01337 #endif
01338
01339
01340
01341 #if YYERROR_VERBOSE
01342
01343 # ifndef yystrlen
01344 # if defined (__GLIBC__) && defined (_STRING_H)
01345 # define yystrlen strlen
01346 # else
01347
01348 static YYSIZE_T
01349 # if defined (__STDC__) || defined (__cplusplus)
01350 yystrlen (const char *yystr)
01351 # else
01352 yystrlen (yystr)
01353 const char *yystr;
01354 # endif
01355 {
01356 register const char *yys = yystr;
01357
01358 while (*yys++ != '\0')
01359 continue;
01360
01361 return yys - yystr - 1;
01362 }
01363 # endif
01364 # endif
01365
01366 # ifndef yystpcpy
01367 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
01368 # define yystpcpy stpcpy
01369 # else
01370
01371
01372 static char *
01373 # if defined (__STDC__) || defined (__cplusplus)
01374 yystpcpy (char *yydest, const char *yysrc)
01375 # else
01376 yystpcpy (yydest, yysrc)
01377 char *yydest;
01378 const char *yysrc;
01379 # endif
01380 {
01381 register char *yyd = yydest;
01382 register const char *yys = yysrc;
01383
01384 while ((*yyd++ = *yys++) != '\0')
01385 continue;
01386
01387 return yyd - 1;
01388 }
01389 # endif
01390 # endif
01391
01392 #endif
01393
01394
01395
01396 #if YYDEBUG
01397
01398
01399
01400
01401 #if defined (__STDC__) || defined (__cplusplus)
01402 static void
01403 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
01404 #else
01405 static void
01406 yysymprint (yyoutput, yytype, yyvaluep, yylocationp)
01407 FILE *yyoutput;
01408 int yytype;
01409 YYSTYPE *yyvaluep;
01410 YYLTYPE *yylocationp;
01411 #endif
01412 {
01413
01414 (void) yyvaluep;
01415 (void) yylocationp;
01416
01417 if (yytype < YYNTOKENS)
01418 {
01419 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
01420 # ifdef YYPRINT
01421 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
01422 # endif
01423 }
01424 else
01425 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
01426
01427 switch (yytype)
01428 {
01429 default:
01430 break;
01431 }
01432 YYFPRINTF (yyoutput, ")");
01433 }
01434
01435 #endif
01436
01437
01438
01439
01440 #if defined (__STDC__) || defined (__cplusplus)
01441 static void
01442 yydestruct (int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
01443 #else
01444 static void
01445 yydestruct (yytype, yyvaluep, yylocationp)
01446 int yytype;
01447 YYSTYPE *yyvaluep;
01448 YYLTYPE *yylocationp;
01449 #endif
01450 {
01451
01452 (void) yyvaluep;
01453 (void) yylocationp;
01454
01455 switch (yytype)
01456 {
01457
01458 default:
01459 break;
01460 }
01461 }
01462
01463
01464
01465
01466 #ifdef YYPARSE_PARAM
01467 # if defined (__STDC__) || defined (__cplusplus)
01468 int yyparse (void *YYPARSE_PARAM);
01469 # else
01470 int yyparse ();
01471 # endif
01472 #else
01473 #if defined (__STDC__) || defined (__cplusplus)
01474 int yyparse (void);
01475 #else
01476 int yyparse ();
01477 #endif
01478 #endif
01479
01480
01481
01482
01483 int yychar;
01484
01485
01486 YYSTYPE yylval;
01487
01488
01489 int yynerrs;
01490
01491 YYLTYPE yylloc;
01492
01493
01494
01495
01496
01497
01498
01499 #ifdef YYPARSE_PARAM
01500 # if defined (__STDC__) || defined (__cplusplus)
01501 int yyparse (void *YYPARSE_PARAM)
01502 # else
01503 int yyparse (YYPARSE_PARAM)
01504 void *YYPARSE_PARAM;
01505 # endif
01506 #else
01507 #if defined (__STDC__) || defined (__cplusplus)
01508 int
01509 yyparse (void)
01510 #else
01511 int
01512 yyparse ()
01513
01514 #endif
01515 #endif
01516 {
01517
01518 register int yystate;
01519 register int yyn;
01520 int yyresult;
01521
01522 int yyerrstatus;
01523
01524 int yytoken = 0;
01525
01526
01527
01528
01529
01530
01531
01532
01533
01534
01535 short yyssa[YYINITDEPTH];
01536 short *yyss = yyssa;
01537 register short *yyssp;
01538
01539
01540 YYSTYPE yyvsa[YYINITDEPTH];
01541 YYSTYPE *yyvs = yyvsa;
01542 register YYSTYPE *yyvsp;
01543
01544
01545 YYLTYPE yylsa[YYINITDEPTH];
01546 YYLTYPE *yyls = yylsa;
01547 YYLTYPE *yylsp;
01548 YYLTYPE *yylerrsp;
01549
01550 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
01551
01552 YYSIZE_T yystacksize = YYINITDEPTH;
01553
01554
01555
01556 YYSTYPE yyval;
01557 YYLTYPE yyloc;
01558
01559
01560
01561 int yylen;
01562
01563 YYDPRINTF ((stderr, "Starting parse\n"));
01564
01565 yystate = 0;
01566 yyerrstatus = 0;
01567 yynerrs = 0;
01568 yychar = YYEMPTY;
01569
01570
01571
01572
01573
01574
01575 yyssp = yyss;
01576 yyvsp = yyvs;
01577 yylsp = yyls;
01578 goto yysetstate;
01579
01580
01581
01582
01583 yynewstate:
01584
01585
01586
01587 yyssp++;
01588
01589 yysetstate:
01590 *yyssp = yystate;
01591
01592 if (yyss + yystacksize - 1 <= yyssp)
01593 {
01594
01595 YYSIZE_T yysize = yyssp - yyss + 1;
01596
01597 #ifdef yyoverflow
01598 {
01599
01600
01601
01602 YYSTYPE *yyvs1 = yyvs;
01603 short *yyss1 = yyss;
01604 YYLTYPE *yyls1 = yyls;
01605
01606
01607
01608
01609
01610 yyoverflow ("parser stack overflow",
01611 &yyss1, yysize * sizeof (*yyssp),
01612 &yyvs1, yysize * sizeof (*yyvsp),
01613 &yyls1, yysize * sizeof (*yylsp),
01614 &yystacksize);
01615 yyls = yyls1;
01616 yyss = yyss1;
01617 yyvs = yyvs1;
01618 }
01619 #else
01620 # ifndef YYSTACK_RELOCATE
01621 goto yyoverflowlab;
01622 # else
01623
01624 if (YYMAXDEPTH <= yystacksize)
01625 goto yyoverflowlab;
01626 yystacksize *= 2;
01627 if (YYMAXDEPTH < yystacksize)
01628 yystacksize = YYMAXDEPTH;
01629
01630 {
01631 short *yyss1 = yyss;
01632 union yyalloc *yyptr =
01633 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01634 if (! yyptr)
01635 goto yyoverflowlab;
01636 YYSTACK_RELOCATE (yyss);
01637 YYSTACK_RELOCATE (yyvs);
01638 YYSTACK_RELOCATE (yyls);
01639 # undef YYSTACK_RELOCATE
01640 if (yyss1 != yyssa)
01641 YYSTACK_FREE (yyss1);
01642 }
01643 # endif
01644 #endif
01645
01646 yyssp = yyss + yysize - 1;
01647 yyvsp = yyvs + yysize - 1;
01648 yylsp = yyls + yysize - 1;
01649
01650 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01651 (unsigned long int) yystacksize));
01652
01653 if (yyss + yystacksize - 1 <= yyssp)
01654 YYABORT;
01655 }
01656
01657 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01658
01659 goto yybackup;
01660
01661
01662
01663
01664 yybackup:
01665
01666
01667
01668
01669
01670
01671
01672 yyn = yypact[yystate];
01673 if (yyn == YYPACT_NINF)
01674 goto yydefault;
01675
01676
01677
01678
01679 if (yychar == YYEMPTY)
01680 {
01681 YYDPRINTF ((stderr, "Reading a token: "));
01682 yychar = YYLEX;
01683 }
01684
01685 if (yychar <= YYEOF)
01686 {
01687 yychar = yytoken = YYEOF;
01688 YYDPRINTF ((stderr, "Now at end of input.\n"));
01689 }
01690 else
01691 {
01692 yytoken = YYTRANSLATE (yychar);
01693 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
01694 }
01695
01696
01697
01698 yyn += yytoken;
01699 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01700 goto yydefault;
01701 yyn = yytable[yyn];
01702 if (yyn <= 0)
01703 {
01704 if (yyn == 0 || yyn == YYTABLE_NINF)
01705 goto yyerrlab;
01706 yyn = -yyn;
01707 goto yyreduce;
01708 }
01709
01710 if (yyn == YYFINAL)
01711 YYACCEPT;
01712
01713
01714 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
01715
01716
01717 if (yychar != YYEOF)
01718 yychar = YYEMPTY;
01719
01720 *++yyvsp = yylval;
01721 *++yylsp = yylloc;
01722
01723
01724
01725 if (yyerrstatus)
01726 yyerrstatus--;
01727
01728 yystate = yyn;
01729 goto yynewstate;
01730
01731
01732
01733
01734
01735 yydefault:
01736 yyn = yydefact[yystate];
01737 if (yyn == 0)
01738 goto yyerrlab;
01739 goto yyreduce;
01740
01741
01742
01743
01744
01745 yyreduce:
01746
01747 yylen = yyr2[yyn];
01748
01749
01750
01751
01752
01753
01754
01755
01756
01757 yyval = yyvsp[1-yylen];
01758
01759
01760 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
01761 YY_REDUCE_PRINT (yyn);
01762 switch (yyn)
01763 {
01764 case 2:
01765 #line 165 "grammar.y"
01766 { yyval.node = new NullNode(); ;}
01767 break;
01768
01769 case 3:
01770 #line 166 "grammar.y"
01771 { yyval.node = new BooleanNode(true); ;}
01772 break;
01773
01774 case 4:
01775 #line 167 "grammar.y"
01776 { yyval.node = new BooleanNode(false); ;}
01777 break;
01778
01779 case 5:
01780 #line 168 "grammar.y"
01781 { yyval.node = new NumberNode(yyvsp[0].dval); ;}
01782 break;
01783
01784 case 6:
01785 #line 169 "grammar.y"
01786 { yyval.node = new StringNode(yyvsp[0].ustr); ;}
01787 break;
01788
01789 case 7:
01790 #line 170 "grammar.y"
01791 { Lexer *l = Lexer::curr();
01792 if (!l->scanRegExp()) YYABORT;
01793 yyval.node = new RegExpNode(l->pattern,l->flags);;}
01794 break;
01795
01796 case 8:
01797 #line 174 "grammar.y"
01798 { Lexer *l = Lexer::curr();
01799 if (!l->scanRegExp()) YYABORT;
01800 yyval.node = new RegExpNode(UString('=')+l->pattern,l->flags);;}
01801 break;
01802
01803 case 9:
01804 #line 180 "grammar.y"
01805 { yyval.node = new ThisNode(); ;}
01806 break;
01807
01808 case 10:
01809 #line 181 "grammar.y"
01810 { yyval.node = new ResolveNode(*yyvsp[0].ident); ;}
01811 break;
01812
01813 case 13:
01814 #line 184 "grammar.y"
01815 { yyval.node = new GroupNode(yyvsp[-1].node); ;}
01816 break;
01817
01818 case 14:
01819 #line 185 "grammar.y"
01820 { yyval.node = new ObjectLiteralNode(); ;}
01821 break;
01822
01823 case 15:
01824 #line 186 "grammar.y"
01825 { yyval.node = new ObjectLiteralNode(yyvsp[-1].plist); ;}
01826 break;
01827
01828 case 16:
01829 #line 190 "grammar.y"
01830 { yyval.node = new ArrayNode(yyvsp[-1].ival); ;}
01831 break;
01832
01833 case 17:
01834 #line 191 "grammar.y"
01835 { yyval.node = new ArrayNode(yyvsp[-1].elm); ;}
01836 break;
01837
01838 case 18:
01839 #line 192 "grammar.y"
01840 { yyval.node = new ArrayNode(yyvsp[-1].ival, yyvsp[-3].elm); ;}
01841 break;
01842
01843 case 19:
01844 #line 196 "grammar.y"
01845 { yyval.elm = new ElementNode(yyvsp[-1].ival, yyvsp[0].node); ;}
01846 break;
01847
01848 case 20:
01849 #line 198 "grammar.y"
01850 { yyval.elm = new ElementNode(yyvsp[-3].elm, yyvsp[-1].ival, yyvsp[0].node); ;}
01851 break;
01852
01853 case 21:
01854 #line 202 "grammar.y"
01855 { yyval.ival = 0; ;}
01856 break;
01857
01858 case 23:
01859 #line 207 "grammar.y"
01860 { yyval.ival = 1; ;}
01861 break;
01862
01863 case 24:
01864 #line 208 "grammar.y"
01865 { yyval.ival = yyvsp[-1].ival + 1; ;}
01866 break;
01867
01868 case 25:
01869 #line 212 "grammar.y"
01870 { yyval.plist = new PropertyValueNode(yyvsp[-2].pnode, yyvsp[0].node); ;}
01871 break;
01872
01873 case 26:
01874 #line 214 "grammar.y"
01875 { yyval.plist = new PropertyValueNode(yyvsp[-2].pnode, yyvsp[0].node, yyvsp[-4].plist); ;}
01876 break;
01877
01878 case 27:
01879 #line 218 "grammar.y"
01880 { yyval.pnode = new PropertyNode(*yyvsp[0].ident); ;}
01881 break;
01882
01883 case 28:
01884 #line 219 "grammar.y"
01885 { yyval.pnode = new PropertyNode(Identifier(*yyvsp[0].ustr)); ;}
01886 break;
01887
01888 case 29:
01889 #line 220 "grammar.y"
01890 { yyval.pnode = new PropertyNode(yyvsp[0].dval); ;}
01891 break;
01892
01893 case 32:
01894 #line 226 "grammar.y"
01895 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;}
01896 break;
01897
01898 case 33:
01899 #line 227 "grammar.y"
01900 { yyval.node = new AccessorNode2(yyvsp[-2].node, *yyvsp[0].ident); ;}
01901 break;
01902
01903 case 34:
01904 #line 228 "grammar.y"
01905 { yyval.node = new NewExprNode(yyvsp[-1].node, yyvsp[0].args); ;}
01906 break;
01907
01908 case 36:
01909 #line 233 "grammar.y"
01910 { yyval.node = new NewExprNode(yyvsp[0].node); ;}
01911 break;
01912
01913 case 37:
01914 #line 237 "grammar.y"
01915 { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;}
01916 break;
01917
01918 case 38:
01919 #line 238 "grammar.y"
01920 { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;}
01921 break;
01922
01923 case 39:
01924 #line 239 "grammar.y"
01925 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;}
01926 break;
01927
01928 case 40:
01929 #line 240 "grammar.y"
01930 { yyval.node = new AccessorNode2(yyvsp[-2].node, *yyvsp[0].ident); ;}
01931 break;
01932
01933 case 41:
01934 #line 244 "grammar.y"
01935 { yyval.args = new ArgumentsNode(); ;}
01936 break;
01937
01938 case 42:
01939 #line 245 "grammar.y"
01940 { yyval.args = new ArgumentsNode(yyvsp[-1].alist); ;}
01941 break;
01942
01943 case 43:
01944 #line 249 "grammar.y"
01945 { yyval.alist = new ArgumentListNode(yyvsp[0].node); ;}
01946 break;
01947
01948 case 44:
01949 #line 250 "grammar.y"
01950 { yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ;}
01951 break;
01952
01953 case 48:
01954 #line 260 "grammar.y"
01955 { yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;}
01956 break;
01957
01958 case 49:
01959 #line 261 "grammar.y"
01960 { yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ;}
01961 break;
01962
01963 case 51:
01964 #line 266 "grammar.y"
01965 { yyval.node = new DeleteNode(yyvsp[0].node); ;}
01966 break;
01967
01968 case 52:
01969 #line 267 "grammar.y"
01970 { yyval.node = new VoidNode(yyvsp[0].node); ;}
01971 break;
01972
01973 case 53:
01974 #line 268 "grammar.y"
01975 { yyval.node = new TypeOfNode(yyvsp[0].node); ;}
01976 break;
01977
01978 case 54:
01979 #line 269 "grammar.y"
01980 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;}
01981 break;
01982
01983 case 55:
01984 #line 270 "grammar.y"
01985 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;}
01986 break;
01987
01988 case 56:
01989 #line 271 "grammar.y"
01990 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;}
01991 break;
01992
01993 case 57:
01994 #line 272 "grammar.y"
01995 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;}
01996 break;
01997
01998 case 58:
01999 #line 273 "grammar.y"
02000 { yyval.node = new UnaryPlusNode(yyvsp[0].node); ;}
02001 break;
02002
02003 case 59:
02004 #line 274 "grammar.y"
02005 { yyval.node = new NegateNode(yyvsp[0].node); ;}
02006 break;
02007
02008 case 60:
02009 #line 275 "grammar.y"
02010 { yyval.node = new BitwiseNotNode(yyvsp[0].node); ;}
02011 break;
02012
02013 case 61:
02014 #line 276 "grammar.y"
02015 { yyval.node = new LogicalNotNode(yyvsp[0].node); ;}
02016 break;
02017
02018 case 63:
02019 #line 281 "grammar.y"
02020 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;}
02021 break;
02022
02023 case 64:
02024 #line 282 "grammar.y"
02025 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;}
02026 break;
02027
02028 case 65:
02029 #line 283 "grammar.y"
02030 { yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ;}
02031 break;
02032
02033 case 67:
02034 #line 288 "grammar.y"
02035 { yyval.node = AddNode::create(yyvsp[-2].node, yyvsp[0].node, '+'); ;}
02036 break;
02037
02038 case 68:
02039 #line 289 "grammar.y"
02040 { yyval.node = AddNode::create(yyvsp[-2].node, yyvsp[0].node, '-'); ;}
02041 break;
02042
02043 case 70:
02044 #line 294 "grammar.y"
02045 { yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;}
02046 break;
02047
02048 case 71:
02049 #line 295 "grammar.y"
02050 { yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;}
02051 break;
02052
02053 case 72:
02054 #line 296 "grammar.y"
02055 { yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ;}
02056 break;
02057
02058 case 74:
02059 #line 302 "grammar.y"
02060 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ;}
02061 break;
02062
02063 case 75:
02064 #line 304 "grammar.y"
02065 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ;}
02066 break;
02067
02068 case 76:
02069 #line 306 "grammar.y"
02070 { yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ;}
02071 break;
02072
02073 case 77:
02074 #line 308 "grammar.y"
02075 { yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;}
02076 break;
02077
02078 case 78:
02079 #line 310 "grammar.y"
02080 { yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;}
02081 break;
02082
02083 case 79:
02084 #line 312 "grammar.y"
02085 { yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ;}
02086 break;
02087
02088 case 81:
02089 #line 317 "grammar.y"
02090 { yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;}
02091 break;
02092
02093 case 82:
02094 #line 318 "grammar.y"
02095 { yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;}
02096 break;
02097
02098 case 83:
02099 #line 319 "grammar.y"
02100 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;}
02101 break;
02102
02103 case 84:
02104 #line 320 "grammar.y"
02105 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);;}
02106 break;
02107
02108 case 86:
02109 #line 325 "grammar.y"
02110 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ;}
02111 break;
02112
02113 case 88:
02114 #line 330 "grammar.y"
02115 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ;}
02116 break;
02117
02118 case 90:
02119 #line 335 "grammar.y"
02120 { yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ;}
02121 break;
02122
02123 case 92:
02124 #line 341 "grammar.y"
02125 { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ;}
02126 break;
02127
02128 case 94:
02129 #line 347 "grammar.y"
02130 { yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ;}
02131 break;
02132
02133 case 96:
02134 #line 353 "grammar.y"
02135 { yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;}
02136 break;
02137
02138 case 98:
02139 #line 359 "grammar.y"
02140 { yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);;}
02141 break;
02142
02143 case 99:
02144 #line 363 "grammar.y"
02145 { yyval.op = OpEqual; ;}
02146 break;
02147
02148 case 100:
02149 #line 364 "grammar.y"
02150 { yyval.op = OpPlusEq; ;}
02151 break;
02152
02153 case 101:
02154 #line 365 "grammar.y"
02155 { yyval.op = OpMinusEq; ;}
02156 break;
02157
02158 case 102:
02159 #line 366 "grammar.y"
02160 { yyval.op = OpMultEq; ;}
02161 break;
02162
02163 case 103:
02164 #line 367 "grammar.y"
02165 { yyval.op = OpDivEq; ;}
02166 break;
02167
02168 case 104:
02169 #line 368 "grammar.y"
02170 { yyval.op = OpLShift; ;}
02171 break;
02172
02173 case 105:
02174 #line 369 "grammar.y"
02175 { yyval.op = OpRShift; ;}
02176 break;
02177
02178 case 106:
02179 #line 370 "grammar.y"
02180 { yyval.op = OpURShift; ;}
02181 break;
02182
02183 case 107:
02184 #line 371 "grammar.y"
02185 { yyval.op = OpAndEq; ;}
02186 break;
02187
02188 case 108:
02189 #line 372 "grammar.y"
02190 { yyval.op = OpXOrEq; ;}
02191 break;
02192
02193 case 109:
02194 #line 373 "grammar.y"
02195 { yyval.op = OpOrEq; ;}
02196 break;
02197
02198 case 110:
02199 #line 374 "grammar.y"
02200 { yyval.op = OpModEq; ;}
02201 break;
02202
02203 case 112:
02204 #line 379 "grammar.y"
02205 { yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ;}
02206 break;
02207
02208 case 128:
02209 #line 401 "grammar.y"
02210 { yyval.stat = new BlockNode(0); DBG(yyval.stat, yylsp[0], yylsp[0]); ;}
02211 break;
02212
02213 case 129:
02214 #line 402 "grammar.y"
02215 { yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;}
02216 break;
02217
02218 case 130:
02219 #line 406 "grammar.y"
02220 { yyval.slist = new StatListNode(yyvsp[0].stat); ;}
02221 break;
02222
02223 case 131:
02224 #line 407 "grammar.y"
02225 { yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;}
02226 break;
02227
02228 case 132:
02229 #line 411 "grammar.y"
02230 { yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
02231 DBG(yyval.stat, yylsp[-2], yylsp[0]); ;}
02232 break;
02233
02234 case 133:
02235 #line 413 "grammar.y"
02236 { if (automatic()) {
02237 yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
02238 DBG(yyval.stat, yylsp[-2], yylsp[-1]);
02239 } else {
02240 YYABORT;
02241 }
02242 ;}
02243 break;
02244
02245 case 134:
02246 #line 423 "grammar.y"
02247 { yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;}
02248 break;
02249
02250 case 135:
02251 #line 425 "grammar.y"
02252 { yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;}
02253 break;
02254
02255 case 136:
02256 #line 429 "grammar.y"
02257 { yyval.decl = new VarDeclNode(*yyvsp[0].ident, 0, VarDeclNode::Variable); ;}
02258 break;
02259
02260 case 137:
02261 #line 430 "grammar.y"
02262 { yyval.decl = new VarDeclNode(*yyvsp[-1].ident, yyvsp[0].init, VarDeclNode::Variable); ;}
02263 break;
02264
02265 case 138:
02266 #line 434 "grammar.y"
02267 { yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
02268 DBG(yyval.stat, yylsp[-2], yylsp[0]); ;}
02269 break;
02270
02271 case 139:
02272 #line 436 "grammar.y"
02273 { if (automatic()) {
02274 yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
02275 DBG(yyval.stat, yylsp[-2], yylsp[-1]);
02276 } else {
02277 YYABORT;
02278 }
02279 ;}
02280 break;
02281
02282 case 140:
02283 #line 446 "grammar.y"
02284 { yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;}
02285 break;
02286
02287 case 141:
02288 #line 448 "grammar.y"
02289 { yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;}
02290 break;
02291
02292 case 142:
02293 #line 452 "grammar.y"
02294 { yyval.decl = new VarDeclNode(*yyvsp[0].ident, 0, VarDeclNode::Constant); ;}
02295 break;
02296
02297 case 143:
02298 #line 453 "grammar.y"
02299 { yyval.decl = new VarDeclNode(*yyvsp[-1].ident, yyvsp[0].init, VarDeclNode::Constant); ;}
02300 break;
02301
02302 case 144:
02303 #line 457 "grammar.y"
02304 { yyval.init = new AssignExprNode(yyvsp[0].node); ;}
02305 break;
02306
02307 case 145:
02308 #line 461 "grammar.y"
02309 { yyval.stat = new EmptyStatementNode(); DBG(yyval.stat, yylsp[0], yylsp[0]); ;}
02310 break;
02311
02312 case 146:
02313 #line 465 "grammar.y"
02314 { yyval.stat = new ExprStatementNode(yyvsp[-1].node);
02315 DBG(yyval.stat, yylsp[-1], yylsp[0]); ;}
02316 break;
02317
02318 case 147:
02319 #line 467 "grammar.y"
02320 { if (automatic()) {
02321 yyval.stat = new ExprStatementNode(yyvsp[-1].node);
02322 DBG(yyval.stat, yylsp[-1], yylsp[-1]);
02323 } else
02324 YYABORT; ;}
02325 break;
02326
02327 case 148:
02328 #line 475 "grammar.y"
02329 { yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;}
02330 break;
02331
02332 case 149:
02333 #line 477 "grammar.y"
02334 { yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;}
02335 break;
02336
02337 case 150:
02338 #line 481 "grammar.y"
02339 { yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;}
02340 break;
02341
02342 case 151:
02343 #line 482 "grammar.y"
02344 { yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;}
02345 break;
02346
02347 case 152:
02348 #line 484 "grammar.y"
02349 { yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
02350 DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;}
02351 break;
02352
02353 case 153:
02354 #line 487 "grammar.y"
02355 { yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
02356 DBG(yyval.stat,yylsp[-9],yylsp[-1]); ;}
02357 break;
02358
02359 case 154:
02360 #line 490 "grammar.y"
02361 { yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat);
02362 DBG(yyval.stat,yylsp[-6],yylsp[-1]); ;}
02363 break;
02364
02365 case 155:
02366 #line 493 "grammar.y"
02367 { yyval.stat = new ForInNode(*yyvsp[-4].ident,0,yyvsp[-2].node,yyvsp[0].stat);
02368 DBG(yyval.stat,yylsp[-7],yylsp[-1]); ;}
02369 break;
02370
02371 case 156:
02372 #line 496 "grammar.y"
02373 { yyval.stat = new ForInNode(*yyvsp[-5].ident,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat);
02374 DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;}
02375 break;
02376
02377 case 157:
02378 #line 501 "grammar.y"
02379 { yyval.node = 0; ;}
02380 break;
02381
02382 case 159:
02383 #line 506 "grammar.y"
02384 { yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;}
02385 break;
02386
02387 case 160:
02388 #line 507 "grammar.y"
02389 { if (automatic()) {
02390 yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]);
02391 } else
02392 YYABORT; ;}
02393 break;
02394
02395 case 161:
02396 #line 511 "grammar.y"
02397 { yyval.stat = new ContinueNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;}
02398 break;
02399
02400 case 162:
02401 #line 512 "grammar.y"
02402 { if (automatic()) {
02403 yyval.stat = new ContinueNode(*yyvsp[-1].ident);DBG(yyval.stat,yylsp[-2],yylsp[-1]);
02404 } else
02405 YYABORT; ;}
02406 break;
02407
02408 case 163:
02409 #line 519 "grammar.y"
02410 { yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;}
02411 break;
02412
02413 case 164:
02414 #line 520 "grammar.y"
02415 { if (automatic()) {
02416 yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
02417 } else
02418 YYABORT; ;}
02419 break;
02420
02421 case 165:
02422 #line 524 "grammar.y"
02423 { yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;}
02424 break;
02425
02426 case 166:
02427 #line 525 "grammar.y"
02428 { if (automatic()) {
02429 yyval.stat = new BreakNode(*yyvsp[-1].ident); DBG(yyval.stat,yylsp[-2],yylsp[-1]);
02430 } else
02431 YYABORT;
02432 ;}
02433 break;
02434
02435 case 167:
02436 #line 533 "grammar.y"
02437 { yyval.stat = new ReturnNode(0); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;}
02438 break;
02439
02440 case 168:
02441 #line 534 "grammar.y"
02442 { if (automatic()) {
02443 yyval.stat = new ReturnNode(0); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
02444 } else
02445 YYABORT; ;}
02446 break;
02447
02448 case 169:
02449 #line 538 "grammar.y"
02450 { yyval.stat = new ReturnNode(yyvsp[-1].node); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;}
02451 break;
02452
02453 case 170:
02454 #line 539 "grammar.y"
02455 { if (automatic()) {
02456 yyval.stat = new ReturnNode(yyvsp[-1].node); DBG(yyval.stat,yylsp[-2],yylsp[-2]);
02457 }
02458 else
02459 YYABORT; ;}
02460 break;
02461
02462 case 171:
02463 #line 547 "grammar.y"
02464 { yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat);
02465 DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;}
02466 break;
02467
02468 case 172:
02469 #line 552 "grammar.y"
02470 { yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk);
02471 DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;}
02472 break;
02473
02474 case 173:
02475 #line 557 "grammar.y"
02476 { yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0, 0); ;}
02477 break;
02478
02479 case 174:
02480 #line 559 "grammar.y"
02481 { yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;}
02482 break;
02483
02484 case 175:
02485 #line 563 "grammar.y"
02486 { yyval.clist = 0; ;}
02487 break;
02488
02489 case 177:
02490 #line 568 "grammar.y"
02491 { yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;}
02492 break;
02493
02494 case 178:
02495 #line 569 "grammar.y"
02496 { yyval.clist = new ClauseListNode(yyvsp[-1].clist, yyvsp[0].ccl); ;}
02497 break;
02498
02499 case 179:
02500 #line 573 "grammar.y"
02501 { yyval.ccl = new CaseClauseNode(yyvsp[-1].node); ;}
02502 break;
02503
02504 case 180:
02505 #line 574 "grammar.y"
02506 { yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;}
02507 break;
02508
02509 case 181:
02510 #line 578 "grammar.y"
02511 { yyval.ccl = new CaseClauseNode(0); ;}
02512 break;
02513
02514 case 182:
02515 #line 579 "grammar.y"
02516 { yyval.ccl = new CaseClauseNode(0, yyvsp[0].slist); ;}
02517 break;
02518
02519 case 183:
02520 #line 583 "grammar.y"
02521 { yyvsp[0].stat->pushLabel(*yyvsp[-2].ident);
02522 yyval.stat = new LabelNode(*yyvsp[-2].ident, yyvsp[0].stat); DBG(yyval.stat,yylsp[-2],yylsp[-1]); ;}
02523 break;
02524
02525 case 184:
02526 #line 588 "grammar.y"
02527 { yyval.stat = new ThrowNode(yyvsp[-1].node); DBG(yyval.stat,yylsp[-2],yylsp[0]); ;}
02528 break;
02529
02530 case 185:
02531 #line 589 "grammar.y"
02532 { if (automatic()) {
02533 yyval.stat = new ThrowNode(yyvsp[-1].node); DBG(yyval.stat,yylsp[-2],yylsp[-2]);
02534 } else {
02535 YYABORT; } ;}
02536 break;
02537
02538 case 186:
02539 #line 596 "grammar.y"
02540 { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].cnode); DBG(yyval.stat,yylsp[-2],yylsp[-2]); ;}
02541 break;
02542
02543 case 187:
02544 #line 597 "grammar.y"
02545 { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].fnode); DBG(yyval.stat,yylsp[-2],yylsp[-2]); ;}
02546 break;
02547
02548 case 188:
02549 #line 598 "grammar.y"
02550 { yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].cnode, yyvsp[0].fnode); DBG(yyval.stat,yylsp[-3],yylsp[-3]); ;}
02551 break;
02552
02553 case 189:
02554 #line 602 "grammar.y"
02555 { CatchNode *c; yyval.cnode = c = new CatchNode(*yyvsp[-2].ident, yyvsp[0].stat);
02556 DBG(c,yylsp[-4],yylsp[-1]); ;}
02557 break;
02558
02559 case 190:
02560 #line 607 "grammar.y"
02561 { FinallyNode *f; yyval.fnode = f = new FinallyNode(yyvsp[0].stat); DBG(f,yylsp[-1],yylsp[-1]); ;}
02562 break;
02563
02564 case 192:
02565 #line 613 "grammar.y"
02566 { yyval.func = yyvsp[0].func; ;}
02567 break;
02568
02569 case 193:
02570 #line 617 "grammar.y"
02571 { yyval.func = new FuncDeclNode(*yyvsp[-3].ident, yyvsp[0].body); DBG(yyval.func,yylsp[-4],yylsp[-1]); ;}
02572 break;
02573
02574 case 194:
02575 #line 619 "grammar.y"
02576 { yyval.func = new FuncDeclNode(*yyvsp[-4].ident, yyvsp[-2].param, yyvsp[0].body); DBG(yyval.func,yylsp[-5],yylsp[-1]); ;}
02577 break;
02578
02579 case 195:
02580 #line 623 "grammar.y"
02581 { yyval.node = new FuncExprNode(yyvsp[0].body); ;}
02582 break;
02583
02584 case 196:
02585 #line 625 "grammar.y"
02586 { yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ;}
02587 break;
02588
02589 case 197:
02590 #line 630 "grammar.y"
02591 { yyval.param = new ParameterNode(*yyvsp[0].ident); ;}
02592 break;
02593
02594 case 198:
02595 #line 631 "grammar.y"
02596 { yyval.param = new ParameterNode(yyvsp[-2].param, *yyvsp[0].ident); ;}
02597 break;
02598
02599 case 199:
02600 #line 635 "grammar.y"
02601 { yyval.body = new FunctionBodyNode(0);
02602 DBG(yyval.body, yylsp[-1], yylsp[0]);;}
02603 break;
02604
02605 case 200:
02606 #line 637 "grammar.y"
02607 { yyval.body = new FunctionBodyNode(yyvsp[-1].srcs);
02608 DBG(yyval.body, yylsp[-2], yylsp[0]);;}
02609 break;
02610
02611 case 201:
02612 #line 642 "grammar.y"
02613 { yyval.prog = new FunctionBodyNode(0);
02614 yyval.prog->setLoc(0, 0, Parser::source);
02615 Parser::progNode = yyval.prog; ;}
02616 break;
02617
02618 case 202:
02619 #line 645 "grammar.y"
02620 { yyval.prog = new FunctionBodyNode(yyvsp[0].srcs);
02621 Parser::progNode = yyval.prog; ;}
02622 break;
02623
02624 case 203:
02625 #line 650 "grammar.y"
02626 { yyval.srcs = new SourceElementsNode(yyvsp[0].stat); ;}
02627 break;
02628
02629 case 204:
02630 #line 651 "grammar.y"
02631 { yyval.srcs = new SourceElementsNode(yyvsp[-1].srcs, yyvsp[0].stat); ;}
02632 break;
02633
02634 case 205:
02635 #line 655 "grammar.y"
02636 { yyval.stat = yyvsp[0].stat; ;}
02637 break;
02638
02639 case 206:
02640 #line 656 "grammar.y"
02641 { yyval.stat = yyvsp[0].func; ;}
02642 break;
02643
02644
02645 }
02646
02647
02648 #line 2648 "grammar.tab.c"
02649
02650 yyvsp -= yylen;
02651 yyssp -= yylen;
02652 yylsp -= yylen;
02653
02654 YY_STACK_PRINT (yyss, yyssp);
02655
02656 *++yyvsp = yyval;
02657 *++yylsp = yyloc;
02658
02659
02660
02661
02662
02663 yyn = yyr1[yyn];
02664
02665 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
02666 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
02667 yystate = yytable[yystate];
02668 else
02669 yystate = yydefgoto[yyn - YYNTOKENS];
02670
02671 goto yynewstate;
02672
02673
02674
02675
02676
02677 yyerrlab:
02678
02679 if (!yyerrstatus)
02680 {
02681 ++yynerrs;
02682 #if YYERROR_VERBOSE
02683 yyn = yypact[yystate];
02684
02685 if (YYPACT_NINF < yyn && yyn < YYLAST)
02686 {
02687 YYSIZE_T yysize = 0;
02688 int yytype = YYTRANSLATE (yychar);
02689 char *yymsg;
02690 int yyx, yycount;
02691
02692 yycount = 0;
02693
02694
02695 for (yyx = yyn < 0 ? -yyn : 0;
02696 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
02697 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
02698 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
02699 yysize += yystrlen ("syntax error, unexpected ") + 1;
02700 yysize += yystrlen (yytname[yytype]);
02701 yymsg = (char *) YYSTACK_ALLOC (yysize);
02702 if (yymsg != 0)
02703 {
02704 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
02705 yyp = yystpcpy (yyp, yytname[yytype]);
02706
02707 if (yycount < 5)
02708 {
02709 yycount = 0;
02710 for (yyx = yyn < 0 ? -yyn : 0;
02711 yyx < (int) (sizeof (yytname) / sizeof (char *));
02712 yyx++)
02713 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
02714 {
02715 const char *yyq = ! yycount ? ", expecting " : " or ";
02716 yyp = yystpcpy (yyp, yyq);
02717 yyp = yystpcpy (yyp, yytname[yyx]);
02718 yycount++;
02719 }
02720 }
02721 yyerror (yymsg);
02722 YYSTACK_FREE (yymsg);
02723 }
02724 else
02725 yyerror ("syntax error; also virtual memory exhausted");
02726 }
02727 else
02728 #endif
02729 yyerror ("syntax error");
02730 }
02731
02732 yylerrsp = yylsp;
02733
02734 if (yyerrstatus == 3)
02735 {
02736
02737
02738
02739
02740 if (yychar == YYEOF)
02741 {
02742
02743 YYPOPSTACK;
02744
02745 while (yyss < yyssp)
02746 {
02747 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
02748 yydestruct (yystos[*yyssp], yyvsp, yylsp);
02749 YYPOPSTACK;
02750 }
02751 YYABORT;
02752 }
02753
02754 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
02755 yydestruct (yytoken, &yylval, &yylloc);
02756 yychar = YYEMPTY;
02757 *++yylerrsp = yylloc;
02758 }
02759
02760
02761
02762 goto yyerrlab2;
02763
02764
02765
02766
02767
02768 yyerrlab1:
02769
02770
02771
02772 #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
02773 && !defined __cplusplus
02774 __attribute__ ((__unused__))
02775 #endif
02776
02777 yylerrsp = yylsp;
02778 *++yylerrsp = yyloc;
02779 goto yyerrlab2;
02780
02781
02782
02783
02784
02785 yyerrlab2:
02786 yyerrstatus = 3;
02787
02788 for (;;)
02789 {
02790 yyn = yypact[yystate];
02791 if (yyn != YYPACT_NINF)
02792 {
02793 yyn += YYTERROR;
02794 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
02795 {
02796 yyn = yytable[yyn];
02797 if (0 < yyn)
02798 break;
02799 }
02800 }
02801
02802
02803 if (yyssp == yyss)
02804 YYABORT;
02805
02806 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
02807 yydestruct (yystos[yystate], yyvsp, yylsp);
02808 yyvsp--;
02809 yystate = *--yyssp;
02810 yylsp--;
02811 YY_STACK_PRINT (yyss, yyssp);
02812 }
02813
02814 if (yyn == YYFINAL)
02815 YYACCEPT;
02816
02817 YYDPRINTF ((stderr, "Shifting error token, "));
02818
02819 *++yyvsp = yylval;
02820 YYLLOC_DEFAULT (yyloc, yylsp, (yylerrsp - yylsp));
02821 *++yylsp = yyloc;
02822
02823 yystate = yyn;
02824 goto yynewstate;
02825
02826
02827
02828
02829
02830 yyacceptlab:
02831 yyresult = 0;
02832 goto yyreturn;
02833
02834
02835
02836
02837 yyabortlab:
02838 yyresult = 1;
02839 goto yyreturn;
02840
02841 #ifndef yyoverflow
02842
02843
02844
02845 yyoverflowlab:
02846 yyerror ("parser stack overflow");
02847 yyresult = 2;
02848
02849 #endif
02850
02851 yyreturn:
02852 #ifndef yyoverflow
02853 if (yyss != yyssa)
02854 YYSTACK_FREE (yyss);
02855 #endif
02856 return yyresult;
02857 }
02858
02859
02860 #line 659 "grammar.y"
02861
02862
02863 int yyerror (const char * )
02864 {
02865
02866
02867 return 1;
02868 }
02869
02870
02871 bool automatic()
02872 {
02873 if (Lexer::curr()->hadError())
02874 return false;
02875 if (yychar == '}' || yychar == 0)
02876 return true;
02877 else if (Lexer::curr()->prevTerminator())
02878 return true;
02879
02880 return false;
02881 }
02882