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