Ruby 1.9.3p327(2012-11-10revision37606)
|
00001 /* A Bison parser, made by GNU Bison 2.3. */ 00002 00003 /* Skeleton implementation for Bison's Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00006 Free Software Foundation, Inc. 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2, or (at your option) 00011 any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. */ 00022 00023 /* As a special exception, you may create a larger work that contains 00024 part or all of the Bison parser skeleton and distribute that work 00025 under terms of your choice, so long as that work isn't itself a 00026 parser generator using the skeleton or a modified version thereof 00027 as a parser skeleton. Alternatively, if you modify or redistribute 00028 the parser skeleton itself, you may (at your option) remove this 00029 special exception, which will cause the skeleton and the resulting 00030 Bison output files to be licensed under the GNU General Public 00031 License without this special exception. 00032 00033 This special exception was added by the Free Software Foundation in 00034 version 2.2 of Bison. */ 00035 00036 /* C LALR(1) parser skeleton written by Richard Stallman, by 00037 simplifying the original so-called "semantic" parser. */ 00038 00039 /* All symbols defined below should begin with yy or YY, to avoid 00040 infringing on user name space. This should be done even for local 00041 variables, as they might otherwise be expanded by user macros. 00042 There are some unavoidable exceptions within include files to 00043 define necessary library symbols; they are noted "INFRINGES ON 00044 USER NAME SPACE" below. */ 00045 00046 /* Identify Bison output. */ 00047 #define YYBISON 1 00048 00049 /* Bison version. */ 00050 #define YYBISON_VERSION "2.3" 00051 00052 /* Skeleton name. */ 00053 #define YYSKELETON_NAME "yacc.c" 00054 00055 /* Pure parsers. */ 00056 #define YYPURE 1 00057 00058 /* Using locations. */ 00059 #define YYLSP_NEEDED 0 00060 00061 00062 00063 /* Tokens. */ 00064 #ifndef YYTOKENTYPE 00065 # define YYTOKENTYPE 00066 /* Put the tokens into the symbol table, so that GDB and other debuggers 00067 know about them. */ 00068 enum yytokentype { 00069 keyword_class = 258, 00070 keyword_module = 259, 00071 keyword_def = 260, 00072 keyword_undef = 261, 00073 keyword_begin = 262, 00074 keyword_rescue = 263, 00075 keyword_ensure = 264, 00076 keyword_end = 265, 00077 keyword_if = 266, 00078 keyword_unless = 267, 00079 keyword_then = 268, 00080 keyword_elsif = 269, 00081 keyword_else = 270, 00082 keyword_case = 271, 00083 keyword_when = 272, 00084 keyword_while = 273, 00085 keyword_until = 274, 00086 keyword_for = 275, 00087 keyword_break = 276, 00088 keyword_next = 277, 00089 keyword_redo = 278, 00090 keyword_retry = 279, 00091 keyword_in = 280, 00092 keyword_do = 281, 00093 keyword_do_cond = 282, 00094 keyword_do_block = 283, 00095 keyword_do_LAMBDA = 284, 00096 keyword_return = 285, 00097 keyword_yield = 286, 00098 keyword_super = 287, 00099 keyword_self = 288, 00100 keyword_nil = 289, 00101 keyword_true = 290, 00102 keyword_false = 291, 00103 keyword_and = 292, 00104 keyword_or = 293, 00105 keyword_not = 294, 00106 modifier_if = 295, 00107 modifier_unless = 296, 00108 modifier_while = 297, 00109 modifier_until = 298, 00110 modifier_rescue = 299, 00111 keyword_alias = 300, 00112 keyword_defined = 301, 00113 keyword_BEGIN = 302, 00114 keyword_END = 303, 00115 keyword__LINE__ = 304, 00116 keyword__FILE__ = 305, 00117 keyword__ENCODING__ = 306, 00118 tIDENTIFIER = 307, 00119 tFID = 308, 00120 tGVAR = 309, 00121 tIVAR = 310, 00122 tCONSTANT = 311, 00123 tCVAR = 312, 00124 tLABEL = 313, 00125 tINTEGER = 314, 00126 tFLOAT = 315, 00127 tSTRING_CONTENT = 316, 00128 tCHAR = 317, 00129 tNTH_REF = 318, 00130 tBACK_REF = 319, 00131 tREGEXP_END = 320, 00132 tUPLUS = 321, 00133 tUMINUS = 322, 00134 tPOW = 323, 00135 tCMP = 324, 00136 tEQ = 325, 00137 tEQQ = 326, 00138 tNEQ = 327, 00139 tGEQ = 328, 00140 tLEQ = 329, 00141 tANDOP = 330, 00142 tOROP = 331, 00143 tMATCH = 332, 00144 tNMATCH = 333, 00145 tDOT2 = 334, 00146 tDOT3 = 335, 00147 tAREF = 336, 00148 tASET = 337, 00149 tLSHFT = 338, 00150 tRSHFT = 339, 00151 tCOLON2 = 340, 00152 tCOLON3 = 341, 00153 tOP_ASGN = 342, 00154 tASSOC = 343, 00155 tLPAREN = 344, 00156 tLPAREN_ARG = 345, 00157 tRPAREN = 346, 00158 tLBRACK = 347, 00159 tLBRACE = 348, 00160 tLBRACE_ARG = 349, 00161 tSTAR = 350, 00162 tAMPER = 351, 00163 tLAMBDA = 352, 00164 tSYMBEG = 353, 00165 tSTRING_BEG = 354, 00166 tXSTRING_BEG = 355, 00167 tREGEXP_BEG = 356, 00168 tWORDS_BEG = 357, 00169 tQWORDS_BEG = 358, 00170 tSTRING_DBEG = 359, 00171 tSTRING_DVAR = 360, 00172 tSTRING_END = 361, 00173 tLAMBEG = 362, 00174 tLOWEST = 363, 00175 tUMINUS_NUM = 364, 00176 idNULL = 365, 00177 idRespond_to = 366, 00178 idIFUNC = 367, 00179 idCFUNC = 368, 00180 id_core_set_method_alias = 369, 00181 id_core_set_variable_alias = 370, 00182 id_core_undef_method = 371, 00183 id_core_define_method = 372, 00184 id_core_define_singleton_method = 373, 00185 id_core_set_postexe = 374, 00186 tLAST_TOKEN = 375 00187 }; 00188 #endif 00189 /* Tokens. */ 00190 #define keyword_class 258 00191 #define keyword_module 259 00192 #define keyword_def 260 00193 #define keyword_undef 261 00194 #define keyword_begin 262 00195 #define keyword_rescue 263 00196 #define keyword_ensure 264 00197 #define keyword_end 265 00198 #define keyword_if 266 00199 #define keyword_unless 267 00200 #define keyword_then 268 00201 #define keyword_elsif 269 00202 #define keyword_else 270 00203 #define keyword_case 271 00204 #define keyword_when 272 00205 #define keyword_while 273 00206 #define keyword_until 274 00207 #define keyword_for 275 00208 #define keyword_break 276 00209 #define keyword_next 277 00210 #define keyword_redo 278 00211 #define keyword_retry 279 00212 #define keyword_in 280 00213 #define keyword_do 281 00214 #define keyword_do_cond 282 00215 #define keyword_do_block 283 00216 #define keyword_do_LAMBDA 284 00217 #define keyword_return 285 00218 #define keyword_yield 286 00219 #define keyword_super 287 00220 #define keyword_self 288 00221 #define keyword_nil 289 00222 #define keyword_true 290 00223 #define keyword_false 291 00224 #define keyword_and 292 00225 #define keyword_or 293 00226 #define keyword_not 294 00227 #define modifier_if 295 00228 #define modifier_unless 296 00229 #define modifier_while 297 00230 #define modifier_until 298 00231 #define modifier_rescue 299 00232 #define keyword_alias 300 00233 #define keyword_defined 301 00234 #define keyword_BEGIN 302 00235 #define keyword_END 303 00236 #define keyword__LINE__ 304 00237 #define keyword__FILE__ 305 00238 #define keyword__ENCODING__ 306 00239 #define tIDENTIFIER 307 00240 #define tFID 308 00241 #define tGVAR 309 00242 #define tIVAR 310 00243 #define tCONSTANT 311 00244 #define tCVAR 312 00245 #define tLABEL 313 00246 #define tINTEGER 314 00247 #define tFLOAT 315 00248 #define tSTRING_CONTENT 316 00249 #define tCHAR 317 00250 #define tNTH_REF 318 00251 #define tBACK_REF 319 00252 #define tREGEXP_END 320 00253 #define tUPLUS 321 00254 #define tUMINUS 322 00255 #define tPOW 323 00256 #define tCMP 324 00257 #define tEQ 325 00258 #define tEQQ 326 00259 #define tNEQ 327 00260 #define tGEQ 328 00261 #define tLEQ 329 00262 #define tANDOP 330 00263 #define tOROP 331 00264 #define tMATCH 332 00265 #define tNMATCH 333 00266 #define tDOT2 334 00267 #define tDOT3 335 00268 #define tAREF 336 00269 #define tASET 337 00270 #define tLSHFT 338 00271 #define tRSHFT 339 00272 #define tCOLON2 340 00273 #define tCOLON3 341 00274 #define tOP_ASGN 342 00275 #define tASSOC 343 00276 #define tLPAREN 344 00277 #define tLPAREN_ARG 345 00278 #define tRPAREN 346 00279 #define tLBRACK 347 00280 #define tLBRACE 348 00281 #define tLBRACE_ARG 349 00282 #define tSTAR 350 00283 #define tAMPER 351 00284 #define tLAMBDA 352 00285 #define tSYMBEG 353 00286 #define tSTRING_BEG 354 00287 #define tXSTRING_BEG 355 00288 #define tREGEXP_BEG 356 00289 #define tWORDS_BEG 357 00290 #define tQWORDS_BEG 358 00291 #define tSTRING_DBEG 359 00292 #define tSTRING_DVAR 360 00293 #define tSTRING_END 361 00294 #define tLAMBEG 362 00295 #define tLOWEST 363 00296 #define tUMINUS_NUM 364 00297 #define idNULL 365 00298 #define idRespond_to 366 00299 #define idIFUNC 367 00300 #define idCFUNC 368 00301 #define id_core_set_method_alias 369 00302 #define id_core_set_variable_alias 370 00303 #define id_core_undef_method 371 00304 #define id_core_define_method 372 00305 #define id_core_define_singleton_method 373 00306 #define id_core_set_postexe 374 00307 #define tLAST_TOKEN 375 00308 00309 00310 00311 00312 /* Copy the first part of user declarations. */ 00313 #line 12 "parse.y" 00314 00315 00316 #define YYDEBUG 1 00317 #define YYERROR_VERBOSE 1 00318 #define YYSTACK_USE_ALLOCA 0 00319 00320 #include "ruby/ruby.h" 00321 #include "ruby/st.h" 00322 #include "ruby/encoding.h" 00323 #include "internal.h" 00324 #include "node.h" 00325 #include "parse.h" 00326 #include "id.h" 00327 #include "regenc.h" 00328 #include <stdio.h> 00329 #include <errno.h> 00330 #include <ctype.h> 00331 00332 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00333 00334 #define YYMALLOC(size) rb_parser_malloc(parser, (size)) 00335 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 00336 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 00337 #define YYFREE(ptr) rb_parser_free(parser, (ptr)) 00338 #define malloc YYMALLOC 00339 #define realloc YYREALLOC 00340 #define calloc YYCALLOC 00341 #define free YYFREE 00342 00343 #ifndef RIPPER 00344 static ID register_symid(ID, const char *, long, rb_encoding *); 00345 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 00346 #include "id.c" 00347 #endif 00348 00349 #define is_notop_id(id) ((id)>tLAST_TOKEN) 00350 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00351 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00352 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00353 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00354 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00355 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00356 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00357 00358 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00359 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00360 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00361 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00362 00363 enum lex_state_e { 00364 EXPR_BEG, /* ignore newline, +/- is a sign. */ 00365 EXPR_END, /* newline significant, +/- is an operator. */ 00366 EXPR_ENDARG, /* ditto, and unbound braces. */ 00367 EXPR_ENDFN, /* ditto, and unbound braces. */ 00368 EXPR_ARG, /* newline significant, +/- is an operator. */ 00369 EXPR_CMDARG, /* newline significant, +/- is an operator. */ 00370 EXPR_MID, /* newline significant, +/- is an operator. */ 00371 EXPR_FNAME, /* ignore newline, no reserved words. */ 00372 EXPR_DOT, /* right after `.' or `::', no reserved words. */ 00373 EXPR_CLASS, /* immediate after `class', no here document. */ 00374 EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */ 00375 EXPR_MAX_STATE 00376 }; 00377 00378 typedef VALUE stack_type; 00379 00380 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 00381 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 00382 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 00383 # define BITSTACK_SET_P(stack) ((stack)&1) 00384 00385 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 00386 #define COND_POP() BITSTACK_POP(cond_stack) 00387 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00388 #define COND_P() BITSTACK_SET_P(cond_stack) 00389 00390 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 00391 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00392 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00393 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00394 00395 struct vtable { 00396 ID *tbl; 00397 int pos; 00398 int capa; 00399 struct vtable *prev; 00400 }; 00401 00402 struct local_vars { 00403 struct vtable *args; 00404 struct vtable *vars; 00405 struct vtable *used; 00406 struct local_vars *prev; 00407 }; 00408 00409 #define DVARS_INHERIT ((void*)1) 00410 #define DVARS_TOPSCOPE NULL 00411 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00412 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00413 00414 static int 00415 vtable_size(const struct vtable *tbl) 00416 { 00417 if (POINTER_P(tbl)) { 00418 return tbl->pos; 00419 } 00420 else { 00421 return 0; 00422 } 00423 } 00424 00425 #define VTBL_DEBUG 0 00426 00427 static struct vtable * 00428 vtable_alloc(struct vtable *prev) 00429 { 00430 struct vtable *tbl = ALLOC(struct vtable); 00431 tbl->pos = 0; 00432 tbl->capa = 8; 00433 tbl->tbl = ALLOC_N(ID, tbl->capa); 00434 tbl->prev = prev; 00435 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00436 return tbl; 00437 } 00438 00439 static void 00440 vtable_free(struct vtable *tbl) 00441 { 00442 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00443 if (POINTER_P(tbl)) { 00444 if (tbl->tbl) { 00445 xfree(tbl->tbl); 00446 } 00447 xfree(tbl); 00448 } 00449 } 00450 00451 static void 00452 vtable_add(struct vtable *tbl, ID id) 00453 { 00454 if (!POINTER_P(tbl)) { 00455 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00456 } 00457 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00458 00459 if (tbl->pos == tbl->capa) { 00460 tbl->capa = tbl->capa * 2; 00461 REALLOC_N(tbl->tbl, ID, tbl->capa); 00462 } 00463 tbl->tbl[tbl->pos++] = id; 00464 } 00465 00466 static int 00467 vtable_included(const struct vtable * tbl, ID id) 00468 { 00469 int i; 00470 00471 if (POINTER_P(tbl)) { 00472 for (i = 0; i < tbl->pos; i++) { 00473 if (tbl->tbl[i] == id) { 00474 return i+1; 00475 } 00476 } 00477 } 00478 return 0; 00479 } 00480 00481 00482 #ifndef RIPPER 00483 typedef struct token_info { 00484 const char *token; 00485 int linenum; 00486 int column; 00487 int nonspc; 00488 struct token_info *next; 00489 } token_info; 00490 #endif 00491 00492 /* 00493 Structure of Lexer Buffer: 00494 00495 lex_pbeg tokp lex_p lex_pend 00496 | | | | 00497 |-----------+--------------+------------| 00498 |<------------>| 00499 token 00500 */ 00501 struct parser_params { 00502 int is_ripper; 00503 NODE *heap; 00504 00505 YYSTYPE *parser_yylval; 00506 VALUE eofp; 00507 00508 NODE *parser_lex_strterm; 00509 enum lex_state_e parser_lex_state; 00510 stack_type parser_cond_stack; 00511 stack_type parser_cmdarg_stack; 00512 int parser_class_nest; 00513 int parser_paren_nest; 00514 int parser_lpar_beg; 00515 int parser_in_single; 00516 int parser_in_def; 00517 int parser_compile_for_eval; 00518 VALUE parser_cur_mid; 00519 int parser_in_defined; 00520 char *parser_tokenbuf; 00521 int parser_tokidx; 00522 int parser_toksiz; 00523 VALUE parser_lex_input; 00524 VALUE parser_lex_lastline; 00525 VALUE parser_lex_nextline; 00526 const char *parser_lex_pbeg; 00527 const char *parser_lex_p; 00528 const char *parser_lex_pend; 00529 int parser_heredoc_end; 00530 int parser_command_start; 00531 NODE *parser_deferred_nodes; 00532 long parser_lex_gets_ptr; 00533 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00534 struct local_vars *parser_lvtbl; 00535 int parser_ruby__end__seen; 00536 int line_count; 00537 int has_shebang; 00538 char *parser_ruby_sourcefile; /* current source file */ 00539 int parser_ruby_sourceline; /* current line no. */ 00540 rb_encoding *enc; 00541 rb_encoding *utf8; 00542 00543 int parser_yydebug; 00544 00545 #ifndef RIPPER 00546 /* Ruby core only */ 00547 NODE *parser_eval_tree_begin; 00548 NODE *parser_eval_tree; 00549 VALUE debug_lines; 00550 VALUE coverage; 00551 int nerr; 00552 00553 int parser_token_info_enabled; 00554 token_info *parser_token_info; 00555 #else 00556 /* Ripper only */ 00557 VALUE parser_ruby_sourcefile_string; 00558 const char *tokp; 00559 VALUE delayed; 00560 int delayed_line; 00561 int delayed_col; 00562 00563 VALUE value; 00564 VALUE result; 00565 VALUE parsing_thread; 00566 int toplevel_p; 00567 #endif 00568 }; 00569 00570 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ 00571 (parser->utf8 = rb_utf8_encoding())) 00572 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) 00573 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc) 00574 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) 00575 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) 00576 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00577 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) 00578 00579 static int parser_yyerror(struct parser_params*, const char*); 00580 #define yyerror(msg) parser_yyerror(parser, (msg)) 00581 00582 #define YYLEX_PARAM parser 00583 00584 #define lex_strterm (parser->parser_lex_strterm) 00585 #define lex_state (parser->parser_lex_state) 00586 #define cond_stack (parser->parser_cond_stack) 00587 #define cmdarg_stack (parser->parser_cmdarg_stack) 00588 #define class_nest (parser->parser_class_nest) 00589 #define paren_nest (parser->parser_paren_nest) 00590 #define lpar_beg (parser->parser_lpar_beg) 00591 #define in_single (parser->parser_in_single) 00592 #define in_def (parser->parser_in_def) 00593 #define compile_for_eval (parser->parser_compile_for_eval) 00594 #define cur_mid (parser->parser_cur_mid) 00595 #define in_defined (parser->parser_in_defined) 00596 #define tokenbuf (parser->parser_tokenbuf) 00597 #define tokidx (parser->parser_tokidx) 00598 #define toksiz (parser->parser_toksiz) 00599 #define lex_input (parser->parser_lex_input) 00600 #define lex_lastline (parser->parser_lex_lastline) 00601 #define lex_nextline (parser->parser_lex_nextline) 00602 #define lex_pbeg (parser->parser_lex_pbeg) 00603 #define lex_p (parser->parser_lex_p) 00604 #define lex_pend (parser->parser_lex_pend) 00605 #define heredoc_end (parser->parser_heredoc_end) 00606 #define command_start (parser->parser_command_start) 00607 #define deferred_nodes (parser->parser_deferred_nodes) 00608 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00609 #define lex_gets (parser->parser_lex_gets) 00610 #define lvtbl (parser->parser_lvtbl) 00611 #define ruby__end__seen (parser->parser_ruby__end__seen) 00612 #define ruby_sourceline (parser->parser_ruby_sourceline) 00613 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00614 #define current_enc (parser->enc) 00615 #define yydebug (parser->parser_yydebug) 00616 #ifdef RIPPER 00617 #else 00618 #define ruby_eval_tree (parser->parser_eval_tree) 00619 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00620 #define ruby_debug_lines (parser->debug_lines) 00621 #define ruby_coverage (parser->coverage) 00622 #endif 00623 00624 static int yylex(void*, void*); 00625 00626 #ifndef RIPPER 00627 #define yyparse ruby_yyparse 00628 00629 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00630 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 00631 00632 static NODE *cond_gen(struct parser_params*,NODE*); 00633 #define cond(node) cond_gen(parser, (node)) 00634 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00635 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 00636 00637 static NODE *newline_node(NODE*); 00638 static void fixpos(NODE*,NODE*); 00639 00640 static int value_expr_gen(struct parser_params*,NODE*); 00641 static void void_expr_gen(struct parser_params*,NODE*); 00642 static NODE *remove_begin(NODE*); 00643 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00644 #define void_expr0(node) void_expr_gen(parser, (node)) 00645 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00646 static void void_stmts_gen(struct parser_params*,NODE*); 00647 #define void_stmts(node) void_stmts_gen(parser, (node)) 00648 static void reduce_nodes_gen(struct parser_params*,NODE**); 00649 #define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 00650 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00651 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 00652 00653 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00654 #define block_append(h,t) block_append_gen(parser,(h),(t)) 00655 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00656 #define list_append(l,i) list_append_gen(parser,(l),(i)) 00657 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00658 #define list_concat(h,t) list_concat_gen(parser,(h),(t)) 00659 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00660 #define arg_append(h,t) arg_append_gen(parser,(h),(t)) 00661 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00662 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 00663 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00664 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 00665 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00666 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00667 #define new_evstr(n) new_evstr_gen(parser,(n)) 00668 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00669 #define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 00670 static NODE *splat_array(NODE*); 00671 00672 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00673 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 00674 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00675 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 00676 00677 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); 00678 #define new_args(f,o,r,p,b) new_args_gen(parser, (f),(o),(r),(p),(b)) 00679 00680 static NODE *negate_lit(NODE*); 00681 static NODE *ret_args_gen(struct parser_params*,NODE*); 00682 #define ret_args(node) ret_args_gen(parser, (node)) 00683 static NODE *arg_blk_pass(NODE*,NODE*); 00684 static NODE *new_yield_gen(struct parser_params*,NODE*); 00685 #define new_yield(node) new_yield_gen(parser, (node)) 00686 00687 static NODE *gettable_gen(struct parser_params*,ID); 00688 #define gettable(id) gettable_gen(parser,(id)) 00689 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00690 #define assignable(id,node) assignable_gen(parser, (id), (node)) 00691 00692 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00693 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 00694 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00695 #define attrset(node,id) attrset_gen(parser, (node), (id)) 00696 00697 static void rb_backref_error_gen(struct parser_params*,NODE*); 00698 #define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 00699 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00700 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 00701 00702 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00703 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 00704 00705 static ID *local_tbl_gen(struct parser_params*); 00706 #define local_tbl() local_tbl_gen(parser) 00707 00708 static void fixup_nodes(NODE **); 00709 00710 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00711 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 00712 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00713 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 00714 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00715 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 00716 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00717 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 00718 00719 #define get_id(id) (id) 00720 #define get_value(val) (val) 00721 #else 00722 #define remove_begin(node) (node) 00723 #define rb_dvar_defined(id) 0 00724 #define rb_local_defined(id) 0 00725 static ID ripper_get_id(VALUE); 00726 #define get_id(id) ripper_get_id(id) 00727 static VALUE ripper_get_value(VALUE); 00728 #define get_value(val) ripper_get_value(val) 00729 static VALUE assignable_gen(struct parser_params*,VALUE); 00730 #define assignable(lhs,node) assignable_gen(parser, (lhs)) 00731 static int id_is_var_gen(struct parser_params *parser, ID id); 00732 #define id_is_var(id) id_is_var_gen(parser, (id)) 00733 #endif /* !RIPPER */ 00734 00735 static ID formal_argument_gen(struct parser_params*, ID); 00736 #define formal_argument(id) formal_argument_gen(parser, (id)) 00737 static ID shadowing_lvar_gen(struct parser_params*,ID); 00738 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 00739 static void new_bv_gen(struct parser_params*,ID); 00740 #define new_bv(id) new_bv_gen(parser, (id)) 00741 00742 static void local_push_gen(struct parser_params*,int); 00743 #define local_push(top) local_push_gen(parser,(top)) 00744 static void local_pop_gen(struct parser_params*); 00745 #define local_pop() local_pop_gen(parser) 00746 static int local_var_gen(struct parser_params*, ID); 00747 #define local_var(id) local_var_gen(parser, (id)); 00748 static int arg_var_gen(struct parser_params*, ID); 00749 #define arg_var(id) arg_var_gen(parser, (id)) 00750 static int local_id_gen(struct parser_params*, ID); 00751 #define local_id(id) local_id_gen(parser, (id)) 00752 static ID internal_id_gen(struct parser_params*); 00753 #define internal_id() internal_id_gen(parser) 00754 00755 static const struct vtable *dyna_push_gen(struct parser_params *); 00756 #define dyna_push() dyna_push_gen(parser) 00757 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00758 #define dyna_pop(node) dyna_pop_gen(parser, (node)) 00759 static int dyna_in_block_gen(struct parser_params*); 00760 #define dyna_in_block() dyna_in_block_gen(parser) 00761 #define dyna_var(id) local_var(id) 00762 static int dvar_defined_gen(struct parser_params*,ID,int); 00763 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 00764 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 00765 static int dvar_curr_gen(struct parser_params*,ID); 00766 #define dvar_curr(id) dvar_curr_gen(parser, (id)) 00767 00768 static int lvar_defined_gen(struct parser_params*, ID); 00769 #define lvar_defined(id) lvar_defined_gen(parser, (id)) 00770 00771 #define RE_OPTION_ONCE (1<<16) 00772 #define RE_OPTION_ENCODING_SHIFT 8 00773 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00774 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00775 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00776 #define RE_OPTION_MASK 0xff 00777 #define RE_OPTION_ARG_ENCODING_NONE 32 00778 00779 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00780 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00781 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00782 #define nd_func u1.id 00783 #if SIZEOF_SHORT == 2 00784 #define nd_term(node) ((signed short)(node)->u2.id) 00785 #else 00786 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00787 #endif 00788 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00789 #define nd_nest u3.cnt 00790 00791 /****** Ripper *******/ 00792 00793 #ifdef RIPPER 00794 #define RIPPER_VERSION "0.1.0" 00795 00796 #include "eventids1.c" 00797 #include "eventids2.c" 00798 static ID ripper_id_gets; 00799 00800 static VALUE ripper_dispatch0(struct parser_params*,ID); 00801 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00802 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00803 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00804 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00805 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00806 00807 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00808 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 00809 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 00810 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 00811 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 00812 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 00813 00814 #define yyparse ripper_yyparse 00815 00816 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00817 static VALUE ripper_id2sym(ID); 00818 #ifdef __GNUC__ 00819 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00820 ID2SYM(id) : ripper_id2sym(id)) 00821 #endif 00822 00823 #define arg_new() dispatch0(args_new) 00824 #define arg_add(l,a) dispatch2(args_add, (l), (a)) 00825 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 00826 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 00827 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 00828 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 00829 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 00830 00831 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 00832 #define mrhs_new() dispatch0(mrhs_new) 00833 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 00834 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 00835 00836 #define mlhs_new() dispatch0(mlhs_new) 00837 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 00838 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 00839 00840 #define params_new(pars, opts, rest, pars2, blk) \ 00841 dispatch5(params, (pars), (opts), (rest), (pars2), (blk)) 00842 00843 #define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 00844 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 00845 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 00846 00847 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 00848 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 00849 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 00850 00851 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00852 00853 #define FIXME 0 00854 00855 #endif /* RIPPER */ 00856 00857 #ifndef RIPPER 00858 # define ifndef_ripper(x) (x) 00859 #else 00860 # define ifndef_ripper(x) 00861 #endif 00862 00863 #ifndef RIPPER 00864 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 00865 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00866 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00867 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 00868 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00869 #else 00870 # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 00871 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 00872 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 00873 # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 00874 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 00875 static void ripper_warn0(struct parser_params*, const char*); 00876 static void ripper_warnI(struct parser_params*, const char*, int); 00877 #if 0 00878 static void ripper_warnS(struct parser_params*, const char*, const char*); 00879 #endif 00880 static void ripper_warning0(struct parser_params*, const char*); 00881 static void ripper_warningS(struct parser_params*, const char*, const char*); 00882 #endif 00883 00884 #ifdef RIPPER 00885 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00886 # define rb_compile_error ripper_compile_error 00887 # define compile_error ripper_compile_error 00888 # define PARSER_ARG parser, 00889 #else 00890 # define rb_compile_error rb_compile_error_with_enc 00891 # define compile_error parser->nerr++,rb_compile_error_with_enc 00892 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 00893 #endif 00894 00895 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00896 for instance). This is too low for Ruby to parse some files, such as 00897 date/format.rb, therefore bump the value up to at least Bison's default. */ 00898 #ifdef OLD_YACC 00899 #ifndef YYMAXDEPTH 00900 #define YYMAXDEPTH 10000 00901 #endif 00902 #endif 00903 00904 #ifndef RIPPER 00905 static void token_info_push(struct parser_params*, const char *token); 00906 static void token_info_pop(struct parser_params*, const char *token); 00907 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 00908 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 00909 #else 00910 #define token_info_push(token) /* nothing */ 00911 #define token_info_pop(token) /* nothing */ 00912 #endif 00913 00914 00915 /* Enabling traces. */ 00916 #ifndef YYDEBUG 00917 # define YYDEBUG 0 00918 #endif 00919 00920 /* Enabling verbose error messages. */ 00921 #ifdef YYERROR_VERBOSE 00922 # undef YYERROR_VERBOSE 00923 # define YYERROR_VERBOSE 1 00924 #else 00925 # define YYERROR_VERBOSE 0 00926 #endif 00927 00928 /* Enabling the token table. */ 00929 #ifndef YYTOKEN_TABLE 00930 # define YYTOKEN_TABLE 0 00931 #endif 00932 00933 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00934 typedef union YYSTYPE 00935 #line 616 "parse.y" 00936 { 00937 VALUE val; 00938 NODE *node; 00939 ID id; 00940 int num; 00941 const struct vtable *vars; 00942 } 00943 /* Line 187 of yacc.c. */ 00944 #line 945 "parse.c" 00945 YYSTYPE; 00946 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00947 # define YYSTYPE_IS_DECLARED 1 00948 # define YYSTYPE_IS_TRIVIAL 1 00949 #endif 00950 00951 00952 00953 /* Copy the second part of user declarations. */ 00954 00955 00956 /* Line 216 of yacc.c. */ 00957 #line 958 "parse.c" 00958 00959 #ifdef short 00960 # undef short 00961 #endif 00962 00963 #ifdef YYTYPE_UINT8 00964 typedef YYTYPE_UINT8 yytype_uint8; 00965 #else 00966 typedef unsigned char yytype_uint8; 00967 #endif 00968 00969 #ifdef YYTYPE_INT8 00970 typedef YYTYPE_INT8 yytype_int8; 00971 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00972 || defined __cplusplus || defined _MSC_VER) 00973 typedef signed char yytype_int8; 00974 #else 00975 typedef short int yytype_int8; 00976 #endif 00977 00978 #ifdef YYTYPE_UINT16 00979 typedef YYTYPE_UINT16 yytype_uint16; 00980 #else 00981 typedef unsigned short int yytype_uint16; 00982 #endif 00983 00984 #ifdef YYTYPE_INT16 00985 typedef YYTYPE_INT16 yytype_int16; 00986 #else 00987 typedef short int yytype_int16; 00988 #endif 00989 00990 #ifndef YYSIZE_T 00991 # ifdef __SIZE_TYPE__ 00992 # define YYSIZE_T __SIZE_TYPE__ 00993 # elif defined size_t 00994 # define YYSIZE_T size_t 00995 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00996 || defined __cplusplus || defined _MSC_VER) 00997 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00998 # define YYSIZE_T size_t 00999 # else 01000 # define YYSIZE_T unsigned int 01001 # endif 01002 #endif 01003 01004 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 01005 01006 #ifndef YY_ 01007 # if YYENABLE_NLS 01008 # if ENABLE_NLS 01009 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 01010 # define YY_(msgid) dgettext ("bison-runtime", msgid) 01011 # endif 01012 # endif 01013 # ifndef YY_ 01014 # define YY_(msgid) msgid 01015 # endif 01016 #endif 01017 01018 /* Suppress unused-variable warnings by "using" E. */ 01019 #if ! defined lint || defined __GNUC__ 01020 # define YYUSE(e) ((void) (e)) 01021 #else 01022 # define YYUSE(e) /* empty */ 01023 #endif 01024 01025 /* Identity function, used to suppress warnings about constant conditions. */ 01026 #ifndef lint 01027 # define YYID(n) (n) 01028 #else 01029 #if (defined __STDC__ || defined __C99__FUNC__ \ 01030 || defined __cplusplus || defined _MSC_VER) 01031 static int 01032 YYID (int i) 01033 #else 01034 static int 01035 YYID (i) 01036 int i; 01037 #endif 01038 { 01039 return i; 01040 } 01041 #endif 01042 01043 #if ! defined yyoverflow || YYERROR_VERBOSE 01044 01045 /* The parser invokes alloca or malloc; define the necessary symbols. */ 01046 01047 # ifdef YYSTACK_USE_ALLOCA 01048 # if YYSTACK_USE_ALLOCA 01049 # ifdef __GNUC__ 01050 # define YYSTACK_ALLOC __builtin_alloca 01051 # elif defined __BUILTIN_VA_ARG_INCR 01052 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 01053 # elif defined _AIX 01054 # define YYSTACK_ALLOC __alloca 01055 # elif defined _MSC_VER 01056 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 01057 # define alloca _alloca 01058 # else 01059 # define YYSTACK_ALLOC alloca 01060 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01061 || defined __cplusplus || defined _MSC_VER) 01062 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01063 # ifndef _STDLIB_H 01064 # define _STDLIB_H 1 01065 # endif 01066 # endif 01067 # endif 01068 # endif 01069 # endif 01070 01071 # ifdef YYSTACK_ALLOC 01072 /* Pacify GCC's `empty if-body' warning. */ 01073 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 01074 # ifndef YYSTACK_ALLOC_MAXIMUM 01075 /* The OS might guarantee only one guard page at the bottom of the stack, 01076 and a page size can be as small as 4096 bytes. So we cannot safely 01077 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 01078 to allow for a few compiler-allocated temporary stack slots. */ 01079 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 01080 # endif 01081 # else 01082 # define YYSTACK_ALLOC YYMALLOC 01083 # define YYSTACK_FREE YYFREE 01084 # ifndef YYSTACK_ALLOC_MAXIMUM 01085 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 01086 # endif 01087 # if (defined __cplusplus && ! defined _STDLIB_H \ 01088 && ! ((defined YYMALLOC || defined malloc) \ 01089 && (defined YYFREE || defined free))) 01090 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01091 # ifndef _STDLIB_H 01092 # define _STDLIB_H 1 01093 # endif 01094 # endif 01095 # ifndef YYMALLOC 01096 # define YYMALLOC malloc 01097 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01098 || defined __cplusplus || defined _MSC_VER) 01099 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 01100 # endif 01101 # endif 01102 # ifndef YYFREE 01103 # define YYFREE free 01104 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01105 || defined __cplusplus || defined _MSC_VER) 01106 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01107 # endif 01108 # endif 01109 # endif 01110 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01111 01112 01113 #if (! defined yyoverflow \ 01114 && (! defined __cplusplus \ 01115 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01116 01117 /* A type that is properly aligned for any stack member. */ 01118 union yyalloc 01119 { 01120 yytype_int16 yyss; 01121 YYSTYPE yyvs; 01122 }; 01123 01124 /* The size of the maximum gap between one aligned stack and the next. */ 01125 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01126 01127 /* The size of an array large to enough to hold all stacks, each with 01128 N elements. */ 01129 # define YYSTACK_BYTES(N) \ 01130 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01131 + YYSTACK_GAP_MAXIMUM) 01132 01133 /* Copy COUNT objects from FROM to TO. The source and destination do 01134 not overlap. */ 01135 # ifndef YYCOPY 01136 # if defined __GNUC__ && 1 < __GNUC__ 01137 # define YYCOPY(To, From, Count) \ 01138 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01139 # else 01140 # define YYCOPY(To, From, Count) \ 01141 do \ 01142 { \ 01143 YYSIZE_T yyi; \ 01144 for (yyi = 0; yyi < (Count); yyi++) \ 01145 (To)[yyi] = (From)[yyi]; \ 01146 } \ 01147 while (YYID (0)) 01148 # endif 01149 # endif 01150 01151 /* Relocate STACK from its old location to the new one. The 01152 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01153 elements in the stack, and YYPTR gives the new location of the 01154 stack. Advance YYPTR to a properly aligned location for the next 01155 stack. */ 01156 # define YYSTACK_RELOCATE(Stack) \ 01157 do \ 01158 { \ 01159 YYSIZE_T yynewbytes; \ 01160 YYCOPY (&yyptr->Stack, Stack, yysize); \ 01161 Stack = &yyptr->Stack; \ 01162 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01163 yyptr += yynewbytes / sizeof (*yyptr); \ 01164 } \ 01165 while (YYID (0)) 01166 01167 #endif 01168 01169 /* YYFINAL -- State number of the termination state. */ 01170 #define YYFINAL 3 01171 /* YYLAST -- Last index in YYTABLE. */ 01172 #define YYLAST 10748 01173 01174 /* YYNTOKENS -- Number of terminals. */ 01175 #define YYNTOKENS 148 01176 /* YYNNTS -- Number of nonterminals. */ 01177 #define YYNNTS 174 01178 /* YYNRULES -- Number of rules. */ 01179 #define YYNRULES 573 01180 /* YYNRULES -- Number of states. */ 01181 #define YYNSTATES 991 01182 01183 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01184 #define YYUNDEFTOK 2 01185 #define YYMAXUTOK 375 01186 01187 #define YYTRANSLATE(YYX) \ 01188 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01189 01190 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01191 static const yytype_uint8 yytranslate[] = 01192 { 01193 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01194 147, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01196 2, 2, 146, 123, 2, 2, 2, 121, 116, 2, 01197 142, 143, 119, 117, 140, 118, 139, 120, 2, 2, 01198 2, 2, 2, 2, 2, 2, 2, 2, 111, 145, 01199 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, 01200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01202 2, 138, 2, 144, 115, 2, 141, 2, 2, 2, 01203 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01205 2, 2, 2, 136, 114, 137, 124, 2, 2, 2, 01206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01218 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01219 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01220 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01221 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01222 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01223 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01224 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01225 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 01226 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 01227 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 01228 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 01229 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, 01230 130, 131, 132, 133, 134, 135 01231 }; 01232 01233 #if YYDEBUG 01234 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01235 YYRHS. */ 01236 static const yytype_uint16 yyprhs[] = 01237 { 01238 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01239 23, 24, 30, 35, 38, 40, 42, 46, 49, 50, 01240 55, 59, 63, 67, 70, 74, 78, 82, 86, 90, 01241 95, 97, 101, 105, 112, 118, 124, 130, 136, 140, 01242 144, 148, 152, 154, 158, 162, 164, 168, 172, 176, 01243 179, 181, 183, 185, 187, 189, 194, 199, 200, 206, 01244 209, 213, 218, 224, 229, 235, 238, 241, 244, 247, 01245 250, 252, 256, 258, 262, 264, 267, 271, 277, 280, 01246 285, 288, 293, 295, 299, 301, 305, 308, 312, 314, 01247 318, 320, 322, 327, 331, 335, 339, 343, 346, 348, 01248 350, 352, 357, 361, 365, 369, 373, 376, 378, 380, 01249 382, 385, 387, 391, 393, 395, 397, 399, 401, 403, 01250 405, 407, 409, 411, 412, 417, 419, 421, 423, 425, 01251 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01252 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01253 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01254 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01255 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01256 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01257 547, 549, 551, 553, 555, 557, 561, 567, 571, 577, 01258 584, 590, 596, 602, 608, 613, 617, 621, 625, 629, 01259 633, 637, 641, 645, 649, 654, 659, 662, 665, 669, 01260 673, 677, 681, 685, 689, 693, 697, 701, 705, 709, 01261 713, 717, 720, 723, 727, 731, 735, 739, 740, 745, 01262 752, 754, 756, 758, 761, 766, 769, 773, 775, 777, 01263 779, 781, 784, 789, 792, 794, 797, 800, 805, 807, 01264 808, 811, 814, 817, 819, 821, 824, 828, 833, 837, 01265 842, 845, 847, 849, 851, 853, 855, 857, 859, 861, 01266 863, 864, 869, 870, 875, 879, 883, 886, 890, 894, 01267 896, 901, 905, 907, 908, 915, 920, 924, 927, 929, 01268 932, 935, 942, 949, 950, 951, 959, 960, 961, 969, 01269 975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011, 01270 1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044, 01271 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 01272 1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089, 01273 1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117, 01274 1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169, 01275 1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217, 01276 1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246, 01277 1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276, 01278 1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317, 01279 1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353, 01280 1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380, 01281 1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407, 01282 1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438, 01283 1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458, 01284 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482, 01285 1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506, 01286 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 01287 1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552, 01288 1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610, 01289 1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636, 01290 1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666, 01291 1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691, 01292 1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719, 01293 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 01294 1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758, 01295 1760, 1762, 1764, 1767 01296 }; 01297 01298 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01299 static const yytype_int16 yyrhs[] = 01300 { 01301 149, 0, -1, -1, 150, 151, -1, 152, 314, -1, 01302 321, -1, 153, -1, 152, 320, 153, -1, 1, 153, 01303 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1, 01304 156, 256, 231, 259, -1, 157, 314, -1, 321, -1, 01305 158, -1, 157, 320, 158, -1, 1, 158, -1, -1, 01306 45, 180, 159, 180, -1, 45, 54, 54, -1, 45, 01307 54, 64, -1, 45, 54, 63, -1, 6, 181, -1, 01308 158, 40, 162, -1, 158, 41, 162, -1, 158, 42, 01309 162, -1, 158, 43, 162, -1, 158, 44, 158, -1, 01310 48, 136, 156, 137, -1, 160, -1, 168, 109, 163, 01311 -1, 286, 87, 163, -1, 216, 138, 191, 317, 87, 01312 163, -1, 216, 139, 52, 87, 163, -1, 216, 139, 01313 56, 87, 163, -1, 216, 85, 56, 87, 163, -1, 01314 216, 85, 52, 87, 163, -1, 287, 87, 163, -1, 01315 175, 109, 198, -1, 168, 109, 187, -1, 168, 109, 01316 198, -1, 161, -1, 175, 109, 163, -1, 175, 109, 01317 160, -1, 163, -1, 161, 37, 161, -1, 161, 38, 01318 161, -1, 39, 315, 161, -1, 123, 163, -1, 185, 01319 -1, 161, -1, 167, -1, 164, -1, 249, -1, 249, 01320 139, 311, 193, -1, 249, 85, 311, 193, -1, -1, 01321 94, 166, 237, 156, 137, -1, 310, 193, -1, 310, 01322 193, 165, -1, 216, 139, 311, 193, -1, 216, 139, 01323 311, 193, 165, -1, 216, 85, 311, 193, -1, 216, 01324 85, 311, 193, 165, -1, 32, 193, -1, 31, 193, 01325 -1, 30, 192, -1, 21, 192, -1, 22, 192, -1, 01326 170, -1, 89, 169, 316, -1, 170, -1, 89, 169, 01327 316, -1, 172, -1, 172, 171, -1, 172, 95, 174, 01328 -1, 172, 95, 174, 140, 173, -1, 172, 95, -1, 01329 172, 95, 140, 173, -1, 95, 174, -1, 95, 174, 01330 140, 173, -1, 95, -1, 95, 140, 173, -1, 174, 01331 -1, 89, 169, 316, -1, 171, 140, -1, 172, 171, 01332 140, -1, 171, -1, 173, 140, 171, -1, 283, -1, 01333 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01334 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01335 85, 56, -1, 86, 56, -1, 287, -1, 283, -1, 01336 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01337 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01338 85, 56, -1, 86, 56, -1, 287, -1, 52, -1, 01339 56, -1, 86, 176, -1, 176, -1, 216, 85, 176, 01340 -1, 52, -1, 56, -1, 53, -1, 183, -1, 184, 01341 -1, 178, -1, 279, -1, 179, -1, 281, -1, 180, 01342 -1, -1, 181, 140, 182, 180, -1, 114, -1, 115, 01343 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77, 01344 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74, 01345 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118, 01346 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68, 01347 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81, 01348 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51, 01349 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7, 01350 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46, 01351 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9, 01352 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22, 01353 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8, 01354 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13, 01355 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11, 01356 -1, 12, -1, 18, -1, 19, -1, 175, 109, 185, 01357 -1, 175, 109, 185, 44, 185, -1, 286, 87, 185, 01358 -1, 286, 87, 185, 44, 185, -1, 216, 138, 191, 01359 317, 87, 185, -1, 216, 139, 52, 87, 185, -1, 01360 216, 139, 56, 87, 185, -1, 216, 85, 52, 87, 01361 185, -1, 216, 85, 56, 87, 185, -1, 86, 56, 01362 87, 185, -1, 287, 87, 185, -1, 185, 79, 185, 01363 -1, 185, 80, 185, -1, 185, 117, 185, -1, 185, 01364 118, 185, -1, 185, 119, 185, -1, 185, 120, 185, 01365 -1, 185, 121, 185, -1, 185, 68, 185, -1, 122, 01366 59, 68, 185, -1, 122, 60, 68, 185, -1, 66, 01367 185, -1, 67, 185, -1, 185, 114, 185, -1, 185, 01368 115, 185, -1, 185, 116, 185, -1, 185, 69, 185, 01369 -1, 185, 112, 185, -1, 185, 73, 185, -1, 185, 01370 113, 185, -1, 185, 74, 185, -1, 185, 70, 185, 01371 -1, 185, 71, 185, -1, 185, 72, 185, -1, 185, 01372 77, 185, -1, 185, 78, 185, -1, 123, 185, -1, 01373 124, 185, -1, 185, 83, 185, -1, 185, 84, 185, 01374 -1, 185, 75, 185, -1, 185, 76, 185, -1, -1, 01375 46, 315, 186, 185, -1, 185, 110, 185, 315, 111, 01376 185, -1, 199, -1, 185, -1, 321, -1, 197, 318, 01377 -1, 197, 140, 308, 318, -1, 308, 318, -1, 142, 01378 191, 316, -1, 321, -1, 189, -1, 321, -1, 192, 01379 -1, 197, 140, -1, 197, 140, 308, 140, -1, 308, 01380 140, -1, 167, -1, 197, 196, -1, 308, 196, -1, 01381 197, 140, 308, 196, -1, 195, -1, -1, 194, 192, 01382 -1, 96, 187, -1, 140, 195, -1, 321, -1, 187, 01383 -1, 95, 187, -1, 197, 140, 187, -1, 197, 140, 01384 95, 187, -1, 197, 140, 187, -1, 197, 140, 95, 01385 187, -1, 95, 187, -1, 260, -1, 261, -1, 264, 01386 -1, 265, -1, 266, -1, 269, -1, 285, -1, 287, 01387 -1, 53, -1, -1, 217, 200, 155, 227, -1, -1, 01388 90, 161, 201, 316, -1, 89, 156, 143, -1, 216, 01389 85, 56, -1, 86, 56, -1, 92, 188, 144, -1, 01390 93, 307, 137, -1, 30, -1, 31, 142, 192, 316, 01391 -1, 31, 142, 316, -1, 31, -1, -1, 46, 315, 01392 142, 202, 161, 316, -1, 39, 142, 161, 316, -1, 01393 39, 142, 316, -1, 310, 251, -1, 250, -1, 250, 01394 251, -1, 97, 242, -1, 218, 162, 228, 156, 230, 01395 227, -1, 219, 162, 228, 156, 231, 227, -1, -1, 01396 -1, 220, 203, 162, 229, 204, 156, 227, -1, -1, 01397 -1, 221, 205, 162, 229, 206, 156, 227, -1, 222, 01398 162, 314, 254, 227, -1, 222, 314, 254, 227, -1, 01399 -1, -1, 223, 232, 25, 207, 162, 229, 208, 156, 01400 227, -1, -1, 224, 177, 288, 209, 155, 227, -1, 01401 -1, -1, 224, 83, 161, 210, 319, 211, 155, 227, 01402 -1, -1, 225, 177, 212, 155, 227, -1, -1, 226, 01403 178, 213, 290, 155, 227, -1, -1, -1, 226, 305, 01404 313, 214, 178, 215, 290, 155, 227, -1, 21, -1, 01405 22, -1, 23, -1, 24, -1, 199, -1, 7, -1, 01406 11, -1, 12, -1, 18, -1, 19, -1, 16, -1, 01407 20, -1, 3, -1, 4, -1, 5, -1, 10, -1, 01408 319, -1, 13, -1, 319, 13, -1, 319, -1, 27, 01409 -1, 231, -1, 14, 162, 228, 156, 230, -1, 321, 01410 -1, 15, 156, -1, 175, -1, 168, -1, 293, -1, 01411 89, 235, 316, -1, 233, -1, 234, 140, 233, -1, 01412 234, -1, 234, 140, 95, 293, -1, 234, 140, 95, 01413 293, 140, 234, -1, 234, 140, 95, -1, 234, 140, 01414 95, 140, 234, -1, 95, 293, -1, 95, 293, 140, 01415 234, -1, 95, -1, 95, 140, 234, -1, 295, 140, 01416 298, 140, 301, 304, -1, 295, 140, 298, 140, 301, 01417 140, 295, 304, -1, 295, 140, 298, 304, -1, 295, 01418 140, 298, 140, 295, 304, -1, 295, 140, 301, 304, 01419 -1, 295, 140, -1, 295, 140, 301, 140, 295, 304, 01420 -1, 295, 304, -1, 298, 140, 301, 304, -1, 298, 01421 140, 301, 140, 295, 304, -1, 298, 304, -1, 298, 01422 140, 295, 304, -1, 301, 304, -1, 301, 140, 295, 01423 304, -1, 303, -1, 321, -1, 238, -1, 114, 239, 01424 114, -1, 76, -1, 114, 236, 239, 114, -1, 321, 01425 -1, 145, 240, -1, 241, -1, 240, 140, 241, -1, 01426 52, -1, 292, -1, -1, -1, 243, 244, 245, 246, 01427 -1, 142, 291, 239, 316, -1, 291, -1, 107, 156, 01428 137, -1, 29, 156, 10, -1, -1, 28, 248, 237, 01429 156, 10, -1, 167, 247, -1, 249, 139, 311, 190, 01430 -1, 249, 85, 311, 190, -1, 310, 189, -1, 216, 01431 139, 311, 190, -1, 216, 85, 311, 189, -1, 216, 01432 85, 312, -1, 216, 139, 189, -1, 216, 85, 189, 01433 -1, 32, 189, -1, 32, -1, 216, 138, 191, 317, 01434 -1, -1, 136, 252, 237, 156, 137, -1, -1, 26, 01435 253, 237, 156, 10, -1, 17, 197, 228, 156, 255, 01436 -1, 231, -1, 254, -1, 8, 257, 258, 228, 156, 01437 256, -1, 321, -1, 187, -1, 198, -1, 321, -1, 01438 88, 175, -1, 321, -1, 9, 156, -1, 321, -1, 01439 282, -1, 279, -1, 281, -1, 262, -1, 62, -1, 01440 263, -1, 262, 263, -1, 99, 271, 106, -1, 100, 01441 272, 106, -1, 101, 273, 65, -1, 102, 146, 106, 01442 -1, 102, 267, 106, -1, -1, 267, 268, 146, -1, 01443 274, -1, 268, 274, -1, 103, 146, 106, -1, 103, 01444 270, 106, -1, -1, 270, 61, 146, -1, -1, 271, 01445 274, -1, -1, 272, 274, -1, -1, 273, 274, -1, 01446 61, -1, -1, 105, 275, 278, -1, -1, -1, 104, 01447 276, 277, 156, 137, -1, 54, -1, 55, -1, 57, 01448 -1, 287, -1, 98, 280, -1, 178, -1, 55, -1, 01449 54, -1, 57, -1, 98, 272, 106, -1, 59, -1, 01450 60, -1, 122, 59, -1, 122, 60, -1, 52, -1, 01451 55, -1, 54, -1, 56, -1, 57, -1, 34, -1, 01452 33, -1, 35, -1, 36, -1, 50, -1, 49, -1, 01453 51, -1, 283, -1, 284, -1, 283, -1, 284, -1, 01454 63, -1, 64, -1, 319, -1, -1, 113, 289, 162, 01455 319, -1, 1, 319, -1, 142, 291, 316, -1, 291, 01456 319, -1, 295, 140, 299, 140, 301, 304, -1, 295, 01457 140, 299, 140, 301, 140, 295, 304, -1, 295, 140, 01458 299, 304, -1, 295, 140, 299, 140, 295, 304, -1, 01459 295, 140, 301, 304, -1, 295, 140, 301, 140, 295, 01460 304, -1, 295, 304, -1, 299, 140, 301, 304, -1, 01461 299, 140, 301, 140, 295, 304, -1, 299, 304, -1, 01462 299, 140, 295, 304, -1, 301, 304, -1, 301, 140, 01463 295, 304, -1, 303, -1, -1, 56, -1, 55, -1, 01464 54, -1, 57, -1, 292, -1, 52, -1, 293, -1, 01465 89, 235, 316, -1, 294, -1, 295, 140, 294, -1, 01466 52, 109, 187, -1, 52, 109, 216, -1, 297, -1, 01467 298, 140, 297, -1, 296, -1, 299, 140, 296, -1, 01468 119, -1, 95, -1, 300, 52, -1, 300, -1, 116, 01469 -1, 96, -1, 302, 52, -1, 140, 303, -1, 321, 01470 -1, 285, -1, -1, 142, 306, 161, 316, -1, 321, 01471 -1, 308, 318, -1, 309, -1, 308, 140, 309, -1, 01472 187, 88, 187, -1, 58, 187, -1, 52, -1, 56, 01473 -1, 53, -1, 52, -1, 56, -1, 53, -1, 183, 01474 -1, 52, -1, 53, -1, 183, -1, 139, -1, 85, 01475 -1, -1, 320, -1, -1, 147, -1, 315, 143, -1, 01476 315, 144, -1, -1, 147, -1, 140, -1, 145, -1, 01477 147, -1, 319, -1, 320, 145, -1, -1 01478 }; 01479 01480 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01481 static const yytype_uint16 yyrline[] = 01482 { 01483 0, 782, 782, 782, 813, 824, 833, 841, 849, 855, 01484 857, 856, 880, 913, 924, 933, 941, 949, 955, 955, 01485 963, 971, 982, 992, 1000, 1009, 1018, 1031, 1044, 1053, 01486 1065, 1066, 1076, 1105, 1126, 1143, 1160, 1171, 1188, 1198, 01487 1207, 1216, 1225, 1228, 1237, 1249, 1250, 1258, 1266, 1274, 01488 1282, 1285, 1297, 1298, 1301, 1302, 1311, 1323, 1322, 1344, 01489 1353, 1365, 1374, 1386, 1395, 1407, 1416, 1425, 1433, 1441, 01490 1451, 1452, 1462, 1463, 1473, 1481, 1489, 1497, 1506, 1514, 01491 1523, 1531, 1540, 1548, 1559, 1560, 1570, 1578, 1588, 1596, 01492 1606, 1610, 1614, 1622, 1630, 1638, 1646, 1658, 1668, 1680, 01493 1689, 1698, 1706, 1714, 1722, 1730, 1743, 1756, 1767, 1775, 01494 1778, 1786, 1794, 1804, 1805, 1806, 1807, 1812, 1823, 1824, 01495 1827, 1835, 1838, 1846, 1846, 1856, 1857, 1858, 1859, 1860, 01496 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 01497 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 01498 1881, 1882, 1883, 1884, 1887, 1887, 1887, 1888, 1888, 1889, 01499 1889, 1889, 1890, 1890, 1890, 1890, 1891, 1891, 1891, 1891, 01500 1892, 1892, 1892, 1893, 1893, 1893, 1893, 1894, 1894, 1894, 01501 1894, 1895, 1895, 1895, 1895, 1896, 1896, 1896, 1896, 1897, 01502 1897, 1897, 1897, 1898, 1898, 1901, 1910, 1920, 1949, 1980, 01503 2006, 2023, 2040, 2057, 2068, 2079, 2090, 2104, 2118, 2126, 01504 2134, 2142, 2150, 2158, 2166, 2175, 2184, 2192, 2200, 2208, 01505 2216, 2224, 2232, 2240, 2248, 2256, 2264, 2272, 2280, 2288, 01506 2299, 2307, 2315, 2323, 2331, 2339, 2347, 2355, 2355, 2365, 01507 2375, 2381, 2393, 2394, 2398, 2406, 2416, 2426, 2427, 2430, 01508 2431, 2432, 2436, 2444, 2454, 2463, 2471, 2481, 2490, 2499, 01509 2499, 2511, 2521, 2525, 2531, 2539, 2547, 2561, 2577, 2591, 01510 2606, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 01511 2633, 2632, 2657, 2657, 2666, 2674, 2682, 2690, 2703, 2711, 01512 2719, 2727, 2735, 2743, 2743, 2753, 2761, 2769, 2780, 2781, 01513 2792, 2796, 2808, 2820, 2820, 2820, 2831, 2831, 2831, 2842, 01514 2853, 2862, 2864, 2861, 2928, 2927, 2949, 2954, 2948, 2973, 01515 2972, 2994, 2993, 3016, 3017, 3016, 3037, 3045, 3053, 3061, 01516 3071, 3083, 3089, 3095, 3101, 3107, 3113, 3119, 3125, 3131, 01517 3137, 3147, 3153, 3158, 3159, 3166, 3171, 3174, 3175, 3188, 01518 3189, 3199, 3200, 3203, 3211, 3221, 3229, 3239, 3247, 3256, 01519 3265, 3273, 3281, 3290, 3302, 3310, 3320, 3328, 3336, 3344, 01520 3352, 3360, 3369, 3377, 3385, 3393, 3401, 3409, 3417, 3425, 01521 3433, 3443, 3444, 3450, 3459, 3468, 3479, 3480, 3490, 3497, 01522 3506, 3514, 3520, 3523, 3520, 3541, 3549, 3559, 3563, 3570, 01523 3569, 3590, 3606, 3615, 3626, 3635, 3645, 3655, 3663, 3674, 01524 3685, 3693, 3701, 3716, 3715, 3735, 3734, 3755, 3767, 3768, 01525 3771, 3790, 3793, 3801, 3809, 3812, 3816, 3819, 3827, 3830, 01526 3831, 3839, 3842, 3859, 3860, 3861, 3871, 3881, 3908, 3973, 01527 3982, 3993, 4000, 4010, 4018, 4028, 4037, 4048, 4055, 4066, 01528 4073, 4084, 4091, 4102, 4109, 4138, 4140, 4139, 4156, 4162, 01529 4155, 4181, 4189, 4197, 4205, 4208, 4219, 4220, 4221, 4222, 01530 4225, 4255, 4256, 4257, 4265, 4275, 4276, 4277, 4278, 4279, 01531 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4291, 4304, 4314, 01532 4322, 4332, 4333, 4336, 4345, 4344, 4352, 4364, 4374, 4382, 01533 4390, 4398, 4406, 4414, 4422, 4430, 4438, 4446, 4454, 4462, 01534 4470, 4478, 4486, 4495, 4504, 4513, 4522, 4531, 4542, 4543, 01535 4550, 4559, 4578, 4585, 4598, 4610, 4622, 4630, 4646, 4654, 01536 4670, 4671, 4674, 4687, 4698, 4699, 4702, 4719, 4723, 4733, 01537 4743, 4743, 4772, 4773, 4783, 4790, 4800, 4808, 4818, 4819, 01538 4820, 4823, 4824, 4825, 4826, 4829, 4830, 4831, 4834, 4839, 01539 4846, 4847, 4850, 4851, 4854, 4857, 4860, 4861, 4862, 4865, 01540 4866, 4869, 4870, 4874 01541 }; 01542 #endif 01543 01544 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01545 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01546 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01547 static const char *const yytname[] = 01548 { 01549 "$end", "error", "$undefined", "keyword_class", "keyword_module", 01550 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", 01551 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", 01552 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", 01553 "keyword_when", "keyword_while", "keyword_until", "keyword_for", 01554 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", 01555 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", 01556 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", 01557 "keyword_self", "keyword_nil", "keyword_true", "keyword_false", 01558 "keyword_and", "keyword_or", "keyword_not", "modifier_if", 01559 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", 01560 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", 01561 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", 01562 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", 01563 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", 01564 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", 01565 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", 01566 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", 01567 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", 01568 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", 01569 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", 01570 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01571 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01572 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", 01573 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias", 01574 "id_core_set_variable_alias", "id_core_undef_method", 01575 "id_core_define_method", "id_core_define_singleton_method", 01576 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','", 01577 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program", 01578 "@1", "top_compstmt", "top_stmts", "top_stmt", "@2", "bodystmt", 01579 "compstmt", "stmts", "stmt", "@3", "command_asgn", "expr", "expr_value", 01580 "command_call", "block_command", "cmd_brace_block", "@4", "command", 01581 "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 01582 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 01583 "fitem", "undef_list", "@5", "op", "reswords", "arg", "@6", "arg_value", 01584 "aref_args", "paren_args", "opt_paren_args", "opt_call_args", 01585 "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args", 01586 "mrhs", "primary", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", 01587 "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "primary_value", 01588 "k_begin", "k_if", "k_unless", "k_while", "k_until", "k_case", "k_for", 01589 "k_class", "k_module", "k_def", "k_end", "then", "do", "if_tail", 01590 "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", "block_param", 01591 "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar", 01592 "lambda", "@24", "@25", "f_larglist", "lambda_body", "do_block", "@26", 01593 "block_call", "method_call", "brace_block", "@27", "@28", "case_body", 01594 "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", 01595 "strings", "string", "string1", "xstring", "regexp", "words", 01596 "word_list", "word", "qwords", "qword_list", "string_contents", 01597 "xstring_contents", "regexp_contents", "string_content", "@29", "@30", 01598 "@31", "string_dvar", "symbol", "sym", "dsym", "numeric", 01599 "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref", 01600 "superclass", "@32", "f_arglist", "f_args", "f_bad_arg", "f_norm_arg", 01601 "f_arg_item", "f_arg", "f_opt", "f_block_opt", "f_block_optarg", 01602 "f_optarg", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", 01603 "opt_f_block_arg", "singleton", "@33", "assoc_list", "assocs", "assoc", 01604 "operation", "operation2", "operation3", "dot_or_colon", "opt_terms", 01605 "opt_nl", "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01606 }; 01607 #endif 01608 01609 # ifdef YYPRINT 01610 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01611 token YYLEX-NUM. */ 01612 static const yytype_uint16 yytoknum[] = 01613 { 01614 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01615 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01616 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01617 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01618 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01619 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01620 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 01621 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 01622 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 01623 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 01624 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, 01625 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, 01626 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, 01627 370, 371, 372, 373, 374, 375, 123, 125, 91, 46, 01628 44, 96, 40, 41, 93, 59, 32, 10 01629 }; 01630 # endif 01631 01632 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01633 static const yytype_uint16 yyr1[] = 01634 { 01635 0, 148, 150, 149, 151, 152, 152, 152, 152, 153, 01636 154, 153, 155, 156, 157, 157, 157, 157, 159, 158, 01637 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01638 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01639 158, 158, 158, 160, 160, 161, 161, 161, 161, 161, 01640 161, 162, 163, 163, 164, 164, 164, 166, 165, 167, 01641 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 01642 168, 168, 169, 169, 170, 170, 170, 170, 170, 170, 01643 170, 170, 170, 170, 171, 171, 172, 172, 173, 173, 01644 174, 174, 174, 174, 174, 174, 174, 174, 174, 175, 01645 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, 01646 177, 177, 177, 178, 178, 178, 178, 178, 179, 179, 01647 180, 180, 181, 182, 181, 183, 183, 183, 183, 183, 01648 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01649 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01650 183, 183, 183, 183, 184, 184, 184, 184, 184, 184, 01651 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01652 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01653 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01654 184, 184, 184, 184, 184, 185, 185, 185, 185, 185, 01655 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01656 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01657 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01658 185, 185, 185, 185, 185, 185, 185, 186, 185, 185, 01659 185, 187, 188, 188, 188, 188, 189, 190, 190, 191, 01660 191, 191, 191, 191, 192, 192, 192, 192, 192, 194, 01661 193, 195, 196, 196, 197, 197, 197, 197, 198, 198, 01662 198, 199, 199, 199, 199, 199, 199, 199, 199, 199, 01663 200, 199, 201, 199, 199, 199, 199, 199, 199, 199, 01664 199, 199, 199, 202, 199, 199, 199, 199, 199, 199, 01665 199, 199, 199, 203, 204, 199, 205, 206, 199, 199, 01666 199, 207, 208, 199, 209, 199, 210, 211, 199, 212, 01667 199, 213, 199, 214, 215, 199, 199, 199, 199, 199, 01668 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01669 226, 227, 228, 228, 228, 229, 229, 230, 230, 231, 01670 231, 232, 232, 233, 233, 234, 234, 235, 235, 235, 01671 235, 235, 235, 235, 235, 235, 236, 236, 236, 236, 01672 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01673 236, 237, 237, 238, 238, 238, 239, 239, 240, 240, 01674 241, 241, 243, 244, 242, 245, 245, 246, 246, 248, 01675 247, 249, 249, 249, 250, 250, 250, 250, 250, 250, 01676 250, 250, 250, 252, 251, 253, 251, 254, 255, 255, 01677 256, 256, 257, 257, 257, 258, 258, 259, 259, 260, 01678 260, 260, 261, 262, 262, 262, 263, 264, 265, 266, 01679 266, 267, 267, 268, 268, 269, 269, 270, 270, 271, 01680 271, 272, 272, 273, 273, 274, 275, 274, 276, 277, 01681 274, 278, 278, 278, 278, 279, 280, 280, 280, 280, 01682 281, 282, 282, 282, 282, 283, 283, 283, 283, 283, 01683 284, 284, 284, 284, 284, 284, 284, 285, 285, 286, 01684 286, 287, 287, 288, 289, 288, 288, 290, 290, 291, 01685 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 01686 291, 291, 291, 291, 292, 292, 292, 292, 293, 293, 01687 294, 294, 295, 295, 296, 297, 298, 298, 299, 299, 01688 300, 300, 301, 301, 302, 302, 303, 304, 304, 305, 01689 306, 305, 307, 307, 308, 308, 309, 309, 310, 310, 01690 310, 311, 311, 311, 311, 312, 312, 312, 313, 313, 01691 314, 314, 315, 315, 316, 317, 318, 318, 318, 319, 01692 319, 320, 320, 321 01693 }; 01694 01695 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01696 static const yytype_uint8 yyr2[] = 01697 { 01698 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01699 0, 5, 4, 2, 1, 1, 3, 2, 0, 4, 01700 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 01701 1, 3, 3, 6, 5, 5, 5, 5, 3, 3, 01702 3, 3, 1, 3, 3, 1, 3, 3, 3, 2, 01703 1, 1, 1, 1, 1, 4, 4, 0, 5, 2, 01704 3, 4, 5, 4, 5, 2, 2, 2, 2, 2, 01705 1, 3, 1, 3, 1, 2, 3, 5, 2, 4, 01706 2, 4, 1, 3, 1, 3, 2, 3, 1, 3, 01707 1, 1, 4, 3, 3, 3, 3, 2, 1, 1, 01708 1, 4, 3, 3, 3, 3, 2, 1, 1, 1, 01709 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 01710 1, 1, 1, 0, 4, 1, 1, 1, 1, 1, 01711 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01712 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01713 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01714 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01715 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01716 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01717 1, 1, 1, 1, 1, 3, 5, 3, 5, 6, 01718 5, 5, 5, 5, 4, 3, 3, 3, 3, 3, 01719 3, 3, 3, 3, 4, 4, 2, 2, 3, 3, 01720 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 01721 3, 2, 2, 3, 3, 3, 3, 0, 4, 6, 01722 1, 1, 1, 2, 4, 2, 3, 1, 1, 1, 01723 1, 2, 4, 2, 1, 2, 2, 4, 1, 0, 01724 2, 2, 2, 1, 1, 2, 3, 4, 3, 4, 01725 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01726 0, 4, 0, 4, 3, 3, 2, 3, 3, 1, 01727 4, 3, 1, 0, 6, 4, 3, 2, 1, 2, 01728 2, 6, 6, 0, 0, 7, 0, 0, 7, 5, 01729 4, 0, 0, 9, 0, 6, 0, 0, 8, 0, 01730 5, 0, 6, 0, 0, 9, 1, 1, 1, 1, 01731 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01732 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 01733 2, 1, 1, 1, 3, 1, 3, 1, 4, 6, 01734 3, 5, 2, 4, 1, 3, 6, 8, 4, 6, 01735 4, 2, 6, 2, 4, 6, 2, 4, 2, 4, 01736 1, 1, 1, 3, 1, 4, 1, 2, 1, 3, 01737 1, 1, 0, 0, 4, 4, 1, 3, 3, 0, 01738 5, 2, 4, 4, 2, 4, 4, 3, 3, 3, 01739 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 01740 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 01741 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 01742 3, 0, 3, 1, 2, 3, 3, 0, 3, 0, 01743 2, 0, 2, 0, 2, 1, 0, 3, 0, 0, 01744 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 01745 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 01746 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01747 1, 1, 1, 1, 0, 4, 2, 3, 2, 6, 01748 8, 4, 6, 4, 6, 2, 4, 6, 2, 4, 01749 2, 4, 1, 0, 1, 1, 1, 1, 1, 1, 01750 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 01751 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 01752 0, 4, 1, 2, 1, 3, 3, 2, 1, 1, 01753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01754 0, 1, 0, 1, 2, 2, 0, 1, 1, 1, 01755 1, 1, 2, 0 01756 }; 01757 01758 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 01759 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 01760 means the default is an error. */ 01761 static const yytype_uint16 yydefact[] = 01762 { 01763 2, 0, 0, 1, 0, 338, 339, 340, 0, 331, 01764 332, 333, 336, 334, 335, 337, 326, 327, 328, 329, 01765 289, 259, 259, 481, 480, 482, 483, 562, 0, 562, 01766 10, 0, 485, 484, 486, 475, 550, 477, 476, 478, 01767 479, 471, 472, 433, 491, 492, 0, 0, 0, 0, 01768 0, 573, 573, 82, 392, 451, 449, 451, 453, 441, 01769 447, 0, 0, 0, 3, 560, 6, 9, 30, 42, 01770 45, 53, 52, 0, 70, 0, 74, 84, 0, 50, 01771 240, 0, 280, 0, 0, 303, 306, 560, 0, 0, 01772 0, 0, 54, 298, 271, 272, 432, 434, 273, 274, 01773 275, 276, 430, 431, 429, 487, 488, 277, 0, 278, 01774 259, 5, 8, 164, 175, 165, 188, 161, 181, 171, 01775 170, 191, 192, 186, 169, 168, 163, 189, 193, 194, 01776 173, 162, 176, 180, 182, 174, 167, 183, 190, 185, 01777 184, 177, 187, 172, 160, 179, 178, 159, 166, 157, 01778 158, 154, 155, 156, 113, 115, 114, 149, 150, 146, 01779 128, 129, 130, 137, 134, 136, 131, 132, 151, 152, 01780 138, 139, 143, 133, 135, 125, 126, 127, 140, 141, 01781 142, 144, 145, 147, 148, 153, 118, 120, 122, 23, 01782 116, 117, 119, 121, 0, 0, 0, 0, 0, 0, 01783 0, 254, 0, 241, 264, 68, 258, 573, 0, 487, 01784 488, 0, 278, 573, 544, 69, 67, 562, 66, 0, 01785 573, 410, 65, 562, 563, 0, 0, 18, 237, 0, 01786 0, 326, 327, 289, 292, 411, 216, 0, 0, 217, 01787 286, 0, 0, 0, 560, 15, 562, 72, 14, 282, 01788 0, 566, 566, 242, 0, 0, 566, 542, 562, 0, 01789 0, 0, 80, 330, 0, 90, 91, 98, 300, 393, 01790 468, 467, 469, 466, 0, 465, 0, 0, 0, 0, 01791 0, 0, 0, 473, 474, 49, 231, 232, 569, 570, 01792 4, 571, 561, 0, 0, 0, 0, 0, 0, 0, 01793 399, 401, 0, 86, 0, 78, 75, 0, 0, 0, 01794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01796 0, 0, 0, 0, 0, 573, 0, 0, 51, 0, 01797 0, 0, 0, 560, 0, 561, 0, 352, 351, 0, 01798 0, 487, 488, 278, 108, 109, 0, 0, 111, 0, 01799 0, 487, 488, 278, 319, 184, 177, 187, 172, 154, 01800 155, 156, 113, 114, 540, 321, 539, 0, 0, 0, 01801 415, 413, 299, 435, 0, 0, 404, 59, 297, 123, 01802 547, 286, 265, 261, 0, 0, 0, 255, 263, 0, 01803 573, 0, 0, 0, 0, 256, 562, 0, 291, 260, 01804 562, 250, 573, 573, 249, 562, 296, 48, 20, 22, 01805 21, 0, 293, 0, 0, 0, 0, 0, 0, 17, 01806 562, 284, 13, 561, 71, 562, 287, 568, 567, 243, 01807 568, 245, 288, 543, 0, 97, 473, 474, 88, 83, 01808 0, 0, 573, 0, 513, 455, 458, 456, 470, 452, 01809 436, 450, 437, 438, 454, 439, 440, 0, 443, 445, 01810 0, 446, 0, 0, 572, 7, 24, 25, 26, 27, 01811 28, 46, 47, 573, 0, 31, 40, 0, 41, 562, 01812 0, 76, 87, 44, 43, 0, 195, 264, 39, 213, 01813 221, 226, 227, 228, 223, 225, 235, 236, 229, 230, 01814 206, 207, 233, 234, 562, 222, 224, 218, 219, 220, 01815 208, 209, 210, 211, 212, 551, 556, 552, 557, 409, 01816 259, 407, 562, 551, 553, 552, 554, 408, 259, 0, 01817 573, 343, 0, 342, 0, 0, 0, 0, 0, 0, 01818 286, 0, 573, 0, 311, 316, 108, 109, 110, 0, 01819 494, 314, 493, 0, 573, 0, 0, 0, 513, 559, 01820 558, 323, 551, 552, 259, 259, 573, 573, 32, 197, 01821 38, 205, 57, 60, 0, 195, 546, 0, 266, 262, 01822 573, 555, 552, 562, 551, 552, 545, 290, 564, 246, 01823 251, 253, 295, 19, 0, 238, 0, 29, 0, 573, 01824 204, 73, 16, 283, 566, 0, 81, 94, 96, 562, 01825 551, 552, 519, 516, 515, 514, 517, 0, 531, 535, 01826 534, 530, 513, 0, 396, 518, 520, 522, 573, 528, 01827 573, 533, 573, 0, 512, 459, 0, 442, 444, 448, 01828 214, 215, 384, 573, 0, 382, 381, 270, 0, 85, 01829 79, 0, 0, 0, 0, 0, 0, 406, 63, 0, 01830 412, 0, 0, 248, 405, 61, 247, 341, 281, 573, 01831 573, 421, 573, 344, 573, 346, 304, 345, 307, 0, 01832 0, 310, 555, 285, 562, 551, 552, 0, 0, 496, 01833 0, 0, 108, 109, 112, 562, 0, 562, 513, 0, 01834 0, 0, 403, 56, 402, 55, 0, 0, 0, 573, 01835 124, 267, 257, 0, 0, 412, 0, 0, 573, 562, 01836 11, 244, 89, 92, 0, 519, 0, 364, 355, 357, 01837 562, 353, 573, 0, 0, 394, 0, 505, 538, 0, 01838 508, 532, 0, 510, 536, 0, 461, 462, 463, 457, 01839 464, 519, 0, 573, 0, 573, 526, 573, 573, 380, 01840 386, 0, 0, 268, 77, 196, 0, 37, 202, 36, 01841 203, 64, 565, 0, 34, 200, 35, 201, 62, 422, 01842 423, 573, 424, 0, 573, 349, 0, 0, 347, 0, 01843 0, 0, 309, 0, 0, 412, 0, 317, 0, 0, 01844 412, 320, 541, 562, 0, 498, 324, 0, 0, 198, 01845 0, 0, 252, 294, 524, 562, 0, 362, 0, 521, 01846 562, 0, 0, 523, 573, 573, 537, 573, 529, 573, 01847 573, 0, 0, 390, 387, 388, 391, 0, 383, 371, 01848 373, 0, 376, 0, 378, 400, 269, 239, 33, 199, 01849 0, 0, 426, 350, 0, 12, 428, 0, 301, 302, 01850 0, 0, 266, 573, 312, 0, 495, 315, 497, 322, 01851 513, 416, 414, 0, 354, 365, 0, 360, 356, 395, 01852 398, 397, 0, 501, 0, 503, 0, 509, 0, 506, 01853 511, 460, 0, 525, 0, 385, 573, 573, 573, 527, 01854 573, 573, 0, 425, 0, 99, 100, 107, 0, 427, 01855 0, 305, 308, 418, 419, 417, 0, 0, 0, 58, 01856 0, 363, 0, 358, 573, 573, 573, 573, 286, 0, 01857 389, 0, 368, 0, 370, 377, 0, 374, 379, 106, 01858 0, 573, 0, 573, 573, 0, 318, 0, 361, 0, 01859 502, 0, 499, 504, 507, 555, 285, 573, 573, 573, 01860 573, 555, 105, 562, 551, 552, 420, 348, 313, 325, 01861 359, 573, 369, 0, 366, 372, 375, 412, 500, 573, 01862 367 01863 }; 01864 01865 /* YYDEFGOTO[NTERM-NUM]. */ 01866 static const yytype_int16 yydefgoto[] = 01867 { 01868 -1, 1, 2, 64, 65, 66, 229, 539, 540, 244, 01869 245, 421, 68, 69, 339, 70, 71, 583, 719, 72, 01870 73, 246, 74, 75, 76, 449, 77, 202, 358, 359, 01871 186, 187, 188, 189, 584, 536, 191, 79, 423, 204, 01872 250, 529, 674, 410, 411, 218, 219, 206, 397, 412, 01873 488, 80, 337, 435, 604, 341, 800, 342, 801, 697, 01874 926, 701, 698, 875, 566, 568, 711, 880, 237, 82, 01875 83, 84, 85, 86, 87, 88, 89, 90, 91, 678, 01876 542, 686, 797, 798, 350, 738, 739, 740, 763, 654, 01877 655, 764, 844, 845, 268, 269, 454, 633, 745, 301, 01878 483, 92, 93, 388, 577, 576, 549, 925, 680, 791, 01879 861, 865, 94, 95, 96, 97, 98, 99, 100, 280, 01880 467, 101, 282, 276, 274, 278, 459, 646, 645, 755, 01881 759, 102, 275, 103, 104, 209, 210, 107, 211, 212, 01882 561, 700, 709, 710, 635, 636, 637, 638, 639, 766, 01883 767, 640, 641, 642, 643, 836, 747, 377, 567, 255, 01884 413, 214, 238, 608, 531, 571, 290, 407, 408, 670, 01885 439, 543, 345, 248 01886 }; 01887 01888 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01889 STATE-NUM. */ 01890 #define YYPACT_NINF -747 01891 static const yytype_int16 yypact[] = 01892 { 01893 -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747, 01894 -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747, 01895 7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31, 01896 -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842, 01897 -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434, 01898 8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24, 01899 29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458, 01900 -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797, 01901 22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056, 01902 9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747, 01903 -747, -747, -747, -747, -747, 25, 58, -747, 179, 613, 01904 51, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01905 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01906 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01907 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01908 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01909 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01910 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01911 -747, -747, -747, -747, -747, -747, -747, -747, -747, 134, 01912 -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519, 01913 8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43, 01914 206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320, 01915 7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287, 01916 4694, -747, -747, -747, 295, 307, -747, 304, 51, 416, 01917 619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458, 01918 419, 221, 300, -747, 260, 430, 300, -747, -31, 497, 01919 501, 9266, 442, -747, 351, 366, 383, 409, -747, -747, 01920 -747, -747, -747, -747, 644, -747, 754, 813, 605, 464, 01921 819, 478, 68, 530, 532, -747, -747, -747, -747, -747, 01922 -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628, 01923 -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519, 01924 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01925 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01926 8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86, 01927 86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454, 01928 601, 54, 76, 99, 331, 349, 8628, 481, -747, 45, 01929 473, -747, -747, -747, -747, 217, 286, 305, 318, 321, 01930 347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549, 01931 -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747, 01932 -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702, 01933 7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747, 01934 -31, -747, 506, 539, -747, 106, -747, -747, -747, -747, 01935 -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104, 01936 -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747, 01937 7865, -747, -747, -747, 272, 510, -747, -747, -747, 543, 01938 9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747, 01939 -747, -747, -747, -747, -747, -747, -747, 313, -747, -747, 01940 491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747, 01941 -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31, 01942 9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416, 01943 2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184, 01944 1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768, 01945 397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747, 01946 307, -747, -31, 647, -747, 660, -747, -747, 3096, 650, 01947 688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650, 01948 112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193, 01949 -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747, 01950 -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608, 01951 -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747, 01952 265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747, 01953 7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307, 01954 2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31, 01955 38, 261, 603, -747, -747, -747, -747, 972, -747, -747, 01956 -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747, 01957 583, 683, 589, 687, -747, -747, 893, -747, -747, -747, 01958 416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747, 01959 543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608, 01960 677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301, 01961 740, -747, 588, -747, 740, -747, -747, -747, -747, 650, 01962 44, -747, 239, 257, -31, 141, 145, 8628, 193, -747, 01963 8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609, 01964 193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32, 01965 -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106, 01966 -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651, 01967 -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223, 01968 -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747, 01969 -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747, 01970 -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747, 01971 2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545, 01972 -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650, 01973 4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650, 01974 -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797, 01975 4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747, 01976 -31, 803, 686, -747, 676, 678, -747, 684, -747, 694, 01977 684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251, 01978 -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797, 01979 9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747, 01980 650, 650, -747, 365, -747, 3609, -747, -747, -747, -747, 01981 1131, -747, -747, 706, -747, 707, 884, 716, -747, -747, 01982 -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747, 01983 -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747, 01984 717, 684, 797, -747, 523, 366, 383, 409, 3609, -747, 01985 3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747, 01986 884, 707, 884, 721, 684, 727, 684, 684, -747, 10318, 01987 -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510, 01988 10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884, 01989 -747, 598, -747, -747, -747, 730, 731, 684, 735, 684, 01990 684, 55, 282, -31, 128, 158, -747, -747, -747, -747, 01991 707, 684, -747, 598, -747, -747, -747, 163, -747, 684, 01992 -747 01993 }; 01994 01995 /* YYPGOTO[NTERM-NUM]. */ 01996 static const yytype_int16 yypgoto[] = 01997 { 01998 -747, -747, -747, 452, -747, 28, -747, -545, 277, -747, 01999 39, -747, -293, 184, -58, 71, -747, -169, -747, -7, 02000 791, -142, -13, -37, -747, -396, -29, 1623, -312, 788, 02001 -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45, 02002 -747, 11, 47, -324, 115, 5, -747, -322, -196, 53, 02003 -295, 8, -747, -747, -747, -747, -747, -747, -747, -747, 02004 -747, -747, -747, -747, -747, -747, -747, -747, 2, -747, 02005 -747, -747, -747, -747, -747, -747, -747, -747, -747, 205, 02006 -338, -516, -72, -618, -747, -722, -671, 147, -747, -489, 02007 -747, -600, -747, -12, -747, -747, -747, -747, -747, -747, 02008 -747, -747, -747, 798, -747, -747, -531, -747, -50, -747, 02009 -747, -747, -747, -747, -747, 811, -747, -747, -747, -747, 02010 -747, -747, -747, -747, 856, -747, -140, -747, -747, -747, 02011 -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575, 02012 -747, -747, 35, -387, -697, -568, -690, 273, -696, -746, 02013 72, 181, -747, -526, -747, -449, 270, -747, -747, -747, 02014 97, -360, 758, -276, -747, -747, -56, -4, 278, -585, 02015 -214, 6, -18, -2 02016 }; 02017 02018 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 02019 positive, shift that token. If negative, reduce the rule which 02020 number is the opposite. If zero, do what YYDEFACT says. 02021 If YYTABLE_NINF, syntax error. */ 02022 #define YYTABLE_NINF -574 02023 static const yytype_int16 yytable[] = 02024 { 02025 111, 273, 544, 227, 81, 644, 81, 254, 725, 201, 02026 201, 532, 498, 201, 493, 192, 689, 405, 208, 208, 02027 193, 706, 208, 225, 262, 228, 340, 222, 190, 343, 02028 688, 344, 112, 221, 733, 192, 247, 375, 441, 306, 02029 193, 67, 443, 67, 596, 558, 559, 292, 190, 253, 02030 257, 81, 208, 838, 616, 264, 833, 541, 530, 741, 02031 538, 263, 794, -93, 208, 846, 799, 634, -103, 207, 02032 207, 291, 380, 207, 589, 190, 593, 380, 264, -99, 02033 596, 3, 589, 685, 263, 208, 208, 716, 717, 208, 02034 349, 360, 360, 291, 660, 743, 263, 263, 263, 541, 02035 430, -100, 574, 575, 251, 909, 888, -330, 652, 805, 02036 230, 190, -489, 213, 213, 387, 224, 213, 378, 644, 02037 810, 386, 279, 530, -107, 538, 334, 768, 619, 470, 02038 -489, 205, 215, 285, -99, 216, 461, -106, 464, 240, 02039 468, -102, 830, 298, 299, -490, 653, -93, 252, 256, 02040 390, 609, -99, 392, 393, 885, 809, 300, 560, 833, 02041 -330, -330, 489, 847, 814, -90, -102, -100, 741, 827, 02042 -104, -104, 379, 744, 471, 281, -101, 609, -93, 335, 02043 336, -93, 381, 644, 803, -93, 302, 381, 432, 288, 02044 288, 289, 289, 220, -90, 909, 838, -551, -91, 81, 02045 -103, 288, -103, 289, 769, 398, 833, 846, 888, 303, 02046 201, 398, 201, 201, -101, 931, -91, 405, 414, 208, 02047 835, 208, 208, 839, 448, 208, 433, 208, 694, 247, 02048 820, 288, 81, 289, 249, 476, 477, 478, 479, -98, 02049 705, 596, 223, 81, 81, 742, 221, 224, 307, 386, 02050 291, 704, -97, 224, 444, 923, 56, 486, 741, 644, 02051 741, 958, 497, 264, -103, 774, 384, 338, 338, 263, 02052 207, 338, 207, -102, 389, -102, 491, 609, 589, 589, 02053 429, -93, -105, 545, 546, -95, -95, 547, 980, 609, 02054 874, 247, 399, -490, 81, 208, 208, 208, 208, 81, 02055 208, 208, -481, -104, 208, -104, 81, 264, -101, 208, 02056 -101, 283, 284, 263, 213, -100, 213, -412, 741, 933, 02057 475, 813, -71, 907, 223, 910, 243, 648, 201, -92, 02058 927, 67, 406, 414, 409, 391, 480, 208, 288, 81, 02059 289, 403, 924, 208, 208, 400, 401, 537, 395, 291, 02060 586, 588, 804, -85, 528, 487, -481, -548, 208, 254, 02061 487, 437, 741, -107, 741, 562, 935, -285, 438, 493, 02062 -95, -480, 394, 485, 455, -549, -412, 396, 494, -94, 02063 793, -551, 548, 957, 790, 402, 208, 208, 987, 426, 02064 -482, 741, 588, 201, 722, 254, 603, -96, 414, -552, 02065 731, -95, 208, -483, -95, 404, -485, 415, -95, 417, 02066 398, 398, 537, 448, 422, 968, -475, 456, 457, 528, 02067 -285, -285, 111, 424, -552, -480, 81, -412, 192, -412, 02068 -412, 644, -484, 193, -478, 81, 451, 217, 537, 657, 02069 440, 190, 400, 427, -482, 201, 528, 438, -486, 220, 02070 414, -487, 264, 448, 208, 578, 580, -483, 263, 647, 02071 -485, -475, 596, 67, 537, 308, -478, -548, -488, -475, 02072 -475, 528, 612, -548, 243, 428, 569, 338, 338, 338, 02073 338, 656, 481, 482, 308, -549, -484, -478, -478, 452, 02074 453, -549, 264, 590, -278, 298, 299, -106, 263, 781, 02075 589, 416, -486, 497, -487, -487, 788, 425, -70, 735, 02076 664, 623, 624, 625, 626, -475, 331, 332, 333, 243, 02077 -478, -488, -488, 918, 434, 338, 338, 431, 669, 920, 02078 570, -555, 722, 556, 614, 668, 676, 557, 681, 551, 02079 555, 667, 721, 675, 81, 201, 81, -278, -278, 673, 02080 414, 687, 687, 445, 208, 588, 254, 201, 563, 720, 02081 446, 447, 414, 436, 537, 699, 208, 442, 81, 208, 02082 465, 528, 676, 676, 656, 656, 537, 726, 732, 713, 02083 715, 243, 450, 528, 469, 673, 673, 727, 398, 669, 02084 -555, 192, 552, 553, 821, -286, 193, 826, 472, -102, 02085 473, 690, 796, 793, 190, 939, 208, 676, 950, -104, 02086 492, 564, 565, 773, 548, 669, -101, 264, 550, 667, 02087 673, 712, 714, 263, 448, 474, 554, 973, 761, 582, 02088 623, 624, 625, 626, 789, 598, 748, 649, 748, 806, 02089 748, -555, 808, -555, -555, 607, 600, -551, -286, -286, 02090 735, 770, 623, 624, 625, 626, 81, 816, 564, 565, 02091 677, 951, 952, 264, 208, 627, 455, 208, 208, 263, 02092 463, 628, 629, 208, 208, 662, 609, 792, 795, 601, 02093 795, -85, 795, 615, 597, -264, 658, 627, 599, 824, 02094 669, 661, 630, 602, 629, 631, 679, 728, 683, 208, 02095 385, 669, 208, 81, 807, 455, 428, 730, 611, 456, 02096 457, 81, 734, 613, 630, 418, 815, 656, 81, 81, 02097 746, 762, -107, 749, 419, 420, 398, 856, -106, 752, 02098 308, 190, 487, 494, 671, 751, 777, 779, 867, 754, 02099 770, 776, 784, 786, -265, 81, 81, 672, 456, 457, 02100 458, 707, 782, -98, 691, 793, -102, 81, 872, -97, 02101 110, 770, 110, 748, 783, 748, 748, 659, 735, -104, 02102 623, 624, 625, 626, 110, 110, 822, 254, 110, 329, 02103 330, 331, 332, 333, 762, 208, -101, -93, 729, 862, 02104 842, 828, 866, 848, 849, 81, 851, 853, 208, 855, 02105 -95, 860, 81, 81, -266, 864, 81, 110, 110, 881, 02106 882, 886, 687, 890, 876, 455, 892, -92, 894, 682, 02107 110, 684, 81, 891, 896, 905, 622, 901, 623, 624, 02108 625, 626, 748, 748, 898, 748, 308, 748, 748, 904, 02109 -267, 110, 110, 929, 903, 110, 938, 930, 941, 308, 02110 263, 321, 322, 949, 858, 943, 932, 946, 456, 457, 02111 460, 959, 914, 627, 321, 322, 81, 961, 263, 628, 02112 629, 795, -551, -552, 455, 983, 606, 81, 364, 347, 02113 455, 338, 977, 825, 338, 329, 330, 331, 332, 333, 02114 630, 382, 940, 631, 802, 326, 327, 328, 329, 330, 02115 331, 332, 333, 976, 748, 748, 748, 383, 748, 748, 02116 750, 811, 753, 277, 376, 928, 632, 456, 457, 462, 02117 81, 906, 81, 456, 457, 466, 765, 834, 81, 0, 02118 81, 771, 748, 748, 748, 748, 735, 0, 623, 624, 02119 625, 626, 0, 0, 201, 0, 0, 756, 757, 414, 02120 758, 681, 795, 208, 0, 110, 44, 45, 0, 528, 02121 0, 0, 0, 537, 0, 748, 748, 748, 748, 669, 02122 528, 0, 0, 736, 0, 110, 0, 110, 110, 748, 02123 338, 110, 0, 110, 0, 812, 0, 748, 110, 0, 02124 0, 0, 0, 817, 818, 308, 0, 0, 0, 110, 02125 110, 0, 868, 0, 869, 0, 0, 823, 0, 0, 02126 321, 322, 0, 0, 877, 0, 0, 0, 829, 879, 02127 831, 832, 837, 0, 735, 840, 623, 624, 625, 626, 02128 0, 0, 841, 0, 0, 850, 0, 852, 854, 0, 02129 0, 0, 0, 328, 329, 330, 331, 332, 333, 0, 02130 110, 110, 110, 110, 110, 110, 110, 110, 0, 0, 02131 110, 736, 110, 0, 0, 110, 0, 737, 0, 843, 02132 863, 623, 624, 625, 626, 921, 922, 870, 871, 0, 02133 0, 873, 203, 203, 0, 0, 203, 0, 0, 0, 02134 0, 878, 0, 110, 0, 110, 0, 883, 0, 110, 02135 110, 0, 0, 884, 893, 895, 0, 897, 889, 899, 02136 900, 0, 236, 239, 110, 0, 0, 203, 203, 0, 02137 0, 0, 0, 0, 908, 0, 911, 0, 286, 287, 02138 0, 735, 956, 623, 624, 625, 626, 0, 0, 0, 02139 0, 919, 110, 110, 293, 294, 295, 296, 297, 0, 02140 0, 0, 0, 0, 0, 0, 0, 0, 110, 0, 02141 978, 0, 979, 0, 0, 934, 0, 936, 736, 0, 02142 0, 937, 0, 0, 887, 0, 942, 944, 945, 0, 02143 947, 948, 110, 622, 0, 623, 624, 625, 626, 0, 02144 0, 110, 0, 0, 0, 953, 0, 954, 0, 0, 02145 0, 0, 0, 955, 960, 962, 963, 964, 0, 0, 02146 110, 0, 0, 0, 967, 0, 969, 0, 0, 970, 02147 627, 0, 0, 0, 0, 0, 628, 629, 0, 0, 02148 0, 0, 0, 0, 981, 0, 0, 982, 984, 985, 02149 986, 0, 0, 0, 0, 0, 0, 630, 0, 0, 02150 631, 988, 0, 0, 0, 0, 989, 0, 0, 990, 02151 0, 203, 0, 0, 203, 203, 286, 0, 0, 0, 02152 105, 0, 105, 708, 0, 622, 0, 623, 624, 625, 02153 626, 0, 0, 203, 0, 203, 203, 0, 0, 0, 02154 0, 108, 0, 108, 0, 0, 0, 0, 0, 0, 02155 110, 0, 110, 761, 0, 623, 624, 625, 626, 0, 02156 110, 0, 627, 0, 0, 0, 0, 105, 628, 629, 02157 0, 265, 110, 0, 110, 110, 0, 0, 0, 0, 02158 0, 0, 0, 0, 0, 0, 0, 0, 108, 630, 02159 627, 0, 631, 0, 265, 0, 628, 629, 0, 0, 02160 0, 0, 0, 0, 0, 0, 351, 361, 361, 361, 02161 0, 0, 110, 0, 0, 0, 0, 630, 203, 0, 02162 631, 0, 0, 496, 499, 500, 501, 502, 503, 504, 02163 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 02164 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 02165 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 02166 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 02167 110, 0, 0, 110, 110, 0, 0, 0, 0, 110, 02168 110, 0, 308, 309, 310, 311, 312, 313, 314, 315, 02169 316, 317, 318, -574, -574, 0, 0, 321, 322, 0, 02170 579, 581, 0, 0, 0, 110, 0, 0, 110, 110, 02171 585, 203, 203, 0, 0, 105, 203, 110, 579, 581, 02172 203, 0, 0, 0, 110, 110, 324, 325, 326, 327, 02173 328, 329, 330, 331, 332, 333, 108, 0, 0, 605, 02174 0, 0, 0, 0, 610, 0, 0, 0, 105, 0, 02175 0, 110, 110, 203, 0, 0, 203, 0, 0, 105, 02176 105, 0, 0, 110, 0, 0, 0, 0, 203, 108, 02177 0, 0, 0, 0, 0, 0, 0, 0, 0, 265, 02178 108, 108, 0, 0, 0, 0, 0, 0, 650, 651, 02179 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 02180 203, 110, 0, 0, 110, 0, 0, 0, 110, 110, 02181 105, 0, 110, 0, 0, 105, 0, 0, 0, 0, 02182 0, 0, 105, 265, 0, 0, 0, 109, 110, 109, 02183 0, 108, 0, 0, 0, 0, 108, 0, 0, 0, 02184 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02185 0, 0, 0, 0, 0, 105, 0, 106, 0, 106, 02186 0, 0, 0, 0, 203, 0, 0, 0, 203, 0, 02187 0, 0, 110, 0, 109, 78, 108, 78, 267, 0, 02188 203, 0, 0, 110, 0, 0, 0, 0, 0, 0, 02189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02190 0, 267, 0, 203, 106, 0, 0, 0, 266, 0, 02191 0, 0, 0, 353, 363, 363, 203, 203, 0, 0, 02192 0, 0, 78, 0, 0, 0, 110, 0, 110, 0, 02193 0, 266, 0, 0, 110, 0, 110, 0, 0, 0, 02194 0, 0, 105, 352, 362, 362, 362, 0, 0, 0, 02195 0, 105, 0, 0, 0, 0, 0, 0, 0, 110, 02196 0, 348, 0, 108, 0, 0, 0, 0, 265, 0, 02197 0, 0, 108, 0, 203, 0, 0, 0, 585, 775, 02198 0, 778, 780, 0, 0, 0, 0, 785, 787, -573, 02199 0, 0, 0, 0, 0, 203, 0, -573, -573, -573, 02200 0, 0, -573, -573, -573, 0, -573, 0, 265, 0, 02201 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02202 0, 0, 109, 0, 0, 0, -573, -573, 0, -573, 02203 -573, -573, -573, -573, 819, 0, 0, 0, 0, 778, 02204 780, 0, 785, 787, 0, 0, 0, 0, 0, 0, 02205 203, 0, 106, 0, 0, 109, 0, 0, 0, 0, 02206 105, 0, 105, 0, 0, 0, 109, 109, 0, 0, 02207 78, 0, 0, 0, -573, 0, 0, 0, 0, 0, 02208 0, 108, 0, 108, 105, 106, 267, 0, 203, 0, 02209 0, 0, 857, 0, 0, 0, 106, 106, 0, 859, 02210 0, 0, 0, 78, 0, 108, 0, 0, 0, 0, 02211 0, 0, 0, 0, 78, 78, 266, 109, 0, 203, 02212 0, 0, 109, 0, 0, 0, -573, 0, -573, 109, 02213 267, 220, -573, 265, -573, 0, -573, 859, 203, 0, 02214 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 02215 0, 0, 106, 0, 0, 0, 0, 0, 0, 106, 02216 266, 0, 109, 0, 0, 78, 0, 0, 0, 0, 02217 78, 0, 105, 0, 0, 0, 0, 78, 0, 265, 02218 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02219 0, 0, 106, 108, 0, 0, 0, 0, 0, 0, 02220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02221 78, 0, 0, 0, 0, 0, 0, 0, 0, 105, 02222 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 02223 0, 0, 0, 0, 105, 105, 0, 0, 0, 0, 02224 108, 0, 0, 0, 0, 0, 0, 0, 108, 109, 02225 0, 0, 0, 0, 0, 108, 108, 0, 109, 0, 02226 0, 105, 105, 0, 0, 0, 0, 203, 0, 0, 02227 0, 0, 0, 105, 0, 267, 0, 0, 0, 106, 02228 0, 0, 108, 108, 0, 0, 0, 0, 106, 0, 02229 0, 0, 0, 0, 108, 0, 0, 78, 0, 0, 02230 0, 0, 0, 0, 0, 266, 78, 0, 0, 0, 02231 0, 105, 0, 0, 0, 267, 0, 0, 105, 105, 02232 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02233 0, 0, 108, 0, 0, 0, 0, 0, 105, 108, 02234 108, 0, 0, 108, 0, 266, 0, 0, 0, 0, 02235 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 02236 361, 0, 0, 0, 0, 0, 0, 109, 0, 109, 02237 0, 0, 0, 0, 0, 0, 0, 0, 915, 0, 02238 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02239 0, 109, 0, 105, 0, 0, 0, 106, 0, 106, 02240 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02241 0, 0, 0, 0, 108, 78, 0, 78, 0, 0, 02242 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 02243 0, 0, 0, 0, 0, 0, 105, 0, 105, 78, 02244 267, 0, 0, 0, 105, 0, 105, 0, 0, 0, 02245 0, 0, 0, 0, 0, 0, 0, 108, 0, 108, 02246 0, 0, 0, 0, 0, 108, 0, 108, 0, 0, 02247 266, 760, 0, 0, 0, 0, 0, 0, 0, 109, 02248 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 02249 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02250 0, 0, 308, -574, -574, -574, -574, 313, 314, 106, 02251 0, -574, -574, 0, 0, 0, 266, 321, 322, 0, 02252 0, 0, 0, 0, 0, 0, 109, 78, 0, 0, 02253 0, 0, 0, 0, 109, 495, 0, 0, 0, 0, 02254 0, 109, 109, 0, 0, 0, 324, 325, 326, 327, 02255 328, 329, 330, 331, 332, 333, 106, 0, 0, 0, 02256 0, 0, 0, 0, 106, 0, 0, 0, 109, 109, 02257 0, 106, 106, 0, 78, 0, 0, 0, 0, 0, 02258 109, 0, 78, 0, 0, 0, 0, 0, 0, 78, 02259 78, 308, 309, 310, 311, 312, 313, 314, 106, 106, 02260 317, 318, 0, 0, 0, 0, 321, 322, 0, 0, 02261 106, 0, 0, 0, 0, 0, 78, 78, 109, 0, 02262 0, 0, 0, 0, 0, 109, 109, 0, 78, 109, 02263 0, 0, 0, 0, 0, 324, 325, 326, 327, 328, 02264 329, 330, 331, 332, 333, 109, 0, 0, 106, 0, 02265 0, 0, 0, 0, 0, 106, 106, 0, 0, 106, 02266 0, 0, 0, 0, 0, 0, 78, 363, 0, 0, 02267 0, 0, 0, 78, 78, 106, 0, 78, 0, 0, 02268 0, 0, 0, 0, 0, 917, 0, 0, 0, 109, 02269 0, 0, 0, 78, 0, 0, 0, 362, 0, 0, 02270 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02271 0, 0, 0, 0, 0, 916, 0, 0, 0, 106, 02272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02273 106, 0, 0, 913, 0, 0, 0, 78, 0, 0, 02274 0, 0, 0, 109, 0, 109, 0, 0, 78, 0, 02275 0, 109, 0, 109, 0, 0, 0, 0, 0, 0, 02276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02277 0, 0, 0, 106, 0, 106, 0, 0, 0, 0, 02278 0, 106, 0, 106, 0, 0, 0, 0, 0, 0, 02279 0, 78, 0, 78, 0, 0, 0, 0, 0, 78, 02280 0, 78, -573, 4, 0, 5, 6, 7, 8, 9, 02281 0, 0, 0, 10, 11, 0, 0, 0, 12, 0, 02282 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02283 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02284 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02285 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02286 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02288 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02289 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02290 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02292 0, 0, 0, -285, 61, 62, 63, 0, 0, 0, 02293 0, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02294 -285, 0, 0, 0, 0, 0, 0, -573, 0, -573, 02295 -285, -285, -285, 0, 0, 0, 0, 0, 0, 0, 02296 -285, -285, 0, -285, -285, -285, -285, -285, 0, 0, 02297 0, 0, 0, 0, 308, 309, 310, 311, 312, 313, 02298 314, 315, 316, 317, 318, 319, 320, 0, 0, 321, 02299 322, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02300 -285, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02301 724, -285, 0, 0, 0, 0, 323, -285, 324, 325, 02302 326, 327, 328, 329, 330, 331, 332, 333, 0, 0, 02303 -285, 0, -105, -285, -285, -285, -285, -285, -285, -285, 02304 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 02305 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 02306 -285, -285, -285, -285, -411, 0, -285, -285, -285, 0, 02307 -285, 0, -411, -411, -411, 0, 0, -411, -411, -411, 02308 0, -411, 0, 0, 0, 0, 0, 0, 0, 0, 02309 -411, -411, -411, 0, 0, 0, 0, 0, 0, 0, 02310 0, -411, -411, 0, -411, -411, -411, -411, -411, 0, 02311 0, 0, 0, 0, 0, 308, 309, 310, 311, 312, 02312 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 02313 321, 322, -411, -411, -411, -411, -411, -411, -411, -411, 02314 -411, -411, -411, -411, -411, 0, 0, -411, -411, -411, 02315 0, 0, -411, 0, 0, 0, 0, 323, -411, 324, 02316 325, 326, 327, 328, 329, 330, 331, 332, 333, 0, 02317 0, 0, 0, 0, -411, 0, -411, -411, -411, -411, 02318 -411, -411, -411, -411, -411, -411, 0, 0, 0, 0, 02319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02320 -411, -411, -411, -411, -411, -279, 220, -411, -411, -411, 02321 0, -411, 0, -279, -279, -279, 0, 0, -279, -279, 02322 -279, 0, -279, 0, 0, 0, 0, 0, 0, 0, 02323 0, 0, -279, -279, -279, 0, 0, 0, 0, 0, 02324 0, 0, -279, -279, 0, -279, -279, -279, -279, -279, 02325 0, 0, 0, 0, 0, 0, 308, 309, 310, 311, 02326 312, 313, 314, 315, 0, 317, 318, 0, 0, 0, 02327 0, 321, 322, -279, -279, -279, -279, -279, -279, -279, 02328 -279, -279, -279, -279, -279, -279, 0, 0, -279, -279, 02329 -279, 0, 0, -279, 0, 0, 0, 0, 0, -279, 02330 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 02331 0, 0, -279, 0, 0, -279, -279, -279, -279, -279, 02332 -279, -279, -279, -279, -279, -279, -279, 0, 0, 0, 02333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02334 0, 0, -279, -279, -279, -279, -573, 0, -279, -279, 02335 -279, 0, -279, 0, -573, -573, -573, 0, 0, -573, 02336 -573, -573, 0, -573, 0, 0, 0, 0, 0, 0, 02337 0, 0, -573, -573, -573, 0, 0, 0, 0, 0, 02338 0, 0, 0, -573, -573, 0, -573, -573, -573, -573, 02339 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02341 0, 0, 0, 0, -573, -573, -573, -573, -573, -573, 02342 -573, -573, -573, -573, -573, -573, -573, 0, 0, -573, 02343 -573, -573, 0, 0, -573, 0, 0, 0, 0, 0, 02344 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02345 0, 0, 0, 0, 0, 0, -573, 0, -573, -573, 02346 -573, -573, -573, -573, -573, -573, -573, -573, 0, 0, 02347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02348 0, 0, -573, -573, -573, -573, -573, -292, 220, -573, 02349 -573, -573, 0, -573, 0, -292, -292, -292, 0, 0, 02350 -292, -292, -292, 0, -292, 0, 0, 0, 0, 0, 02351 0, 0, 0, 0, -292, -292, 0, 0, 0, 0, 02352 0, 0, 0, 0, -292, -292, 0, -292, -292, -292, 02353 -292, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02355 0, 0, 0, 0, 0, -292, -292, -292, -292, -292, 02356 -292, -292, -292, -292, -292, -292, -292, -292, 0, 0, 02357 -292, -292, -292, 0, 0, -292, 0, 0, 0, 0, 02358 0, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02359 0, 0, 0, 0, 0, 0, 0, -292, 0, -292, 02360 -292, -292, -292, -292, -292, -292, -292, -292, -292, 0, 02361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02362 0, 0, 0, 0, -292, -292, -292, -292, -555, 217, 02363 -292, -292, -292, 0, -292, 0, -555, -555, -555, 0, 02364 0, 0, -555, -555, 0, -555, 0, 0, 0, 0, 02365 0, 0, 0, 0, -555, 0, 0, 0, 0, 0, 02366 0, 0, 0, 0, 0, -555, -555, 0, -555, -555, 02367 -555, -555, -555, 0, 0, 0, 0, 0, 0, 0, 02368 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02369 0, 0, 0, 0, 0, 0, -555, -555, -555, -555, 02370 -555, -555, -555, -555, -555, -555, -555, -555, -555, 0, 02371 0, -555, -555, -555, -285, 665, 0, 0, 0, 0, 02372 0, 0, -285, -285, -285, 0, 0, 0, -285, -285, 02373 0, -285, 0, 0, 0, 0, 0, -103, -555, 0, 02374 -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 02375 0, -285, -285, 0, -285, -285, -285, -285, -285, 0, 02376 0, 0, 0, 0, -555, -555, -555, -555, -94, 0, 02377 0, -555, 0, -555, 0, -555, 0, 0, 0, 0, 02378 0, 0, -285, -285, -285, -285, -285, -285, -285, -285, 02379 -285, -285, -285, -285, -285, 0, 0, -285, -285, -285, 02380 0, 666, 0, 0, 0, 0, 0, 0, 0, 0, 02381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02382 0, 0, 0, -105, -285, 0, -285, -285, -285, -285, 02383 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 02384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02385 0, -285, -285, -285, -96, 0, 0, -285, 0, -285, 02386 241, -285, 5, 6, 7, 8, 9, -573, -573, -573, 02387 10, 11, 0, 0, -573, 12, 0, 13, 14, 15, 02388 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02389 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02390 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02391 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02392 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02394 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02395 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02396 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02398 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02400 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02401 8, 9, 0, 0, -573, 10, 11, 0, -573, -573, 02402 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02403 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02404 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02405 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02406 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02407 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02409 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02410 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02412 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02414 0, 0, 0, 0, 0, 0, 0, 0, 0, -573, 02415 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02416 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02417 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02418 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02419 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02420 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02421 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02423 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02424 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02425 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02427 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02428 4, 0, 5, 6, 7, 8, 9, 0, 0, 0, 02429 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02430 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02431 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02432 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, 02433 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02434 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02436 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02437 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02438 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02439 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02440 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02441 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02442 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02443 8, 9, 0, 0, -573, 10, 11, 0, 0, -573, 02444 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02445 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02446 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02447 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02448 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02449 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02451 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02452 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02453 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02454 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02455 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02456 8, 9, 0, -573, -573, 10, 11, 0, 0, -573, 02457 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02458 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02459 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02460 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02461 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02462 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02464 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02465 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02467 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02468 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02469 8, 9, 0, 0, 0, 10, 11, 0, 0, -573, 02470 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02471 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02472 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02473 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02474 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02475 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02477 48, 0, 0, 242, 50, 0, 51, 52, 0, 53, 02478 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02480 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02481 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02482 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02483 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02484 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02485 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02486 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02487 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02488 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02490 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02491 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02493 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02494 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02495 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02496 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02497 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02498 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02499 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02500 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02501 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02503 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02504 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02505 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02506 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02508 0, -573, 0, 0, 0, 0, 0, 0, 0, -573, 02509 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02510 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, 02511 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02512 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02513 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02514 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02515 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02517 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02518 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02519 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02521 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02522 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02523 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02524 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02525 21, 22, 23, 24, 25, 26, 0, 0, 194, 0, 02526 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02527 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02528 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02530 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02531 0, 51, 52, 0, 198, 199, 54, 55, 56, 57, 02532 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02533 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02534 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02535 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02536 22, 23, 24, 25, 26, 0, 224, 27, 0, 0, 02537 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02538 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02539 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02541 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02542 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02543 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02545 61, 62, 63, 0, 0, 0, 0, 0, 0, 0, 02546 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02547 11, 0, 0, 288, 12, 289, 13, 14, 15, 16, 02548 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02549 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02550 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02551 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02552 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02554 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02555 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02556 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02557 5, 6, 7, 8, 9, 0, 0, 0, 10, 11, 02558 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02559 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02560 23, 24, 25, 26, 0, 224, 27, 0, 0, 0, 02561 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, 02562 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02563 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02565 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02566 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02567 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02568 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02569 62, 63, 0, 0, 0, 0, 0, 0, 5, 6, 02570 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, 02571 0, 12, 474, 13, 14, 15, 16, 17, 18, 19, 02572 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02573 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02574 28, 29, 0, 31, 32, 33, 34, 35, 36, 37, 02575 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02576 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02578 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02579 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02581 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, 02582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02584 474, 113, 114, 115, 116, 117, 118, 119, 120, 121, 02585 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 02586 132, 133, 134, 135, 136, 0, 0, 0, 137, 138, 02587 139, 365, 366, 367, 368, 144, 145, 146, 0, 0, 02588 0, 0, 0, 147, 148, 149, 150, 369, 370, 371, 02589 372, 155, 37, 38, 373, 40, 0, 0, 0, 0, 02590 0, 0, 0, 0, 157, 158, 159, 160, 161, 162, 02591 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02592 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02593 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02594 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02595 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02596 0, 183, 184, 0, 0, 0, 0, 0, -548, -548, 02597 -548, 0, -548, 0, 0, 0, -548, -548, 0, 185, 02598 374, -548, 0, -548, -548, -548, -548, -548, -548, -548, 02599 0, -548, 0, 0, 0, -548, -548, -548, -548, -548, 02600 -548, -548, 0, 0, -548, 0, 0, 0, 0, 0, 02601 0, -548, 0, 0, -548, -548, -548, -548, -548, -548, 02602 -548, -548, -548, -548, -548, -548, 0, -548, -548, -548, 02603 0, -548, -548, 0, 0, 0, 0, 0, 0, 0, 02604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02605 0, -548, 0, 0, -548, -548, 0, -548, -548, 0, 02606 -548, -548, -548, -548, -548, -548, -548, -548, -548, 0, 02607 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02608 0, 0, 0, 0, 0, 0, 0, -548, -548, -548, 02609 0, 0, 0, 0, 0, -549, -549, -549, 0, -549, 02610 0, -548, 0, -549, -549, 0, 0, -548, -549, 0, 02611 -549, -549, -549, -549, -549, -549, -549, 0, -549, 0, 02612 0, 0, -549, -549, -549, -549, -549, -549, -549, 0, 02613 0, -549, 0, 0, 0, 0, 0, 0, -549, 0, 02614 0, -549, -549, -549, -549, -549, -549, -549, -549, -549, 02615 -549, -549, -549, 0, -549, -549, -549, 0, -549, -549, 02616 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02617 0, 0, 0, 0, 0, 0, 0, 0, -549, 0, 02618 0, -549, -549, 0, -549, -549, 0, -549, -549, -549, 02619 -549, -549, -549, -549, -549, -549, 0, 0, 0, 0, 02620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02621 0, 0, 0, 0, -549, -549, -549, 0, 0, 0, 02622 0, 0, -551, -551, -551, 0, -551, 0, -549, 0, 02623 -551, -551, 0, 0, -549, -551, 0, -551, -551, -551, 02624 -551, -551, -551, -551, 0, 0, 0, 0, 0, -551, 02625 -551, -551, -551, -551, -551, -551, 0, 0, -551, 0, 02626 0, 0, 0, 0, 0, -551, 0, 0, -551, -551, 02627 -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, 02628 0, -551, -551, -551, 0, -551, -551, 0, 0, 0, 02629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02630 0, 0, 0, 0, 0, -551, 723, 0, -551, -551, 02631 0, -551, -551, 0, -551, -551, -551, -551, -551, -551, 02632 -551, -551, -551, 0, 0, 0, 0, 0, -103, 0, 02633 0, 0, 0, 0, 0, 0, -553, -553, -553, 0, 02634 -553, -551, -551, -551, -553, -553, 0, 0, 0, -553, 02635 0, -553, -553, -553, -553, -553, -553, -553, 0, 0, 02636 0, -551, 0, -553, -553, -553, -553, -553, -553, -553, 02637 0, 0, -553, 0, 0, 0, 0, 0, 0, -553, 02638 0, 0, -553, -553, -553, -553, -553, -553, -553, -553, 02639 -553, -553, -553, -553, 0, -553, -553, -553, 0, -553, 02640 -553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02641 0, 0, 0, 0, 0, 0, 0, 0, 0, -553, 02642 0, 0, -553, -553, 0, -553, -553, 0, -553, -553, 02643 -553, -553, -553, -553, -553, -553, -553, 0, 0, 0, 02644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02645 -554, -554, -554, 0, -554, -553, -553, -553, -554, -554, 02646 0, 0, 0, -554, 0, -554, -554, -554, -554, -554, 02647 -554, -554, 0, 0, 0, -553, 0, -554, -554, -554, 02648 -554, -554, -554, -554, 0, 0, -554, 0, 0, 0, 02649 0, 0, 0, -554, 0, 0, -554, -554, -554, -554, 02650 -554, -554, -554, -554, -554, -554, -554, -554, 0, -554, 02651 -554, -554, 0, -554, -554, 0, 0, 0, 0, 0, 02652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02653 0, 0, 0, -554, 0, 0, -554, -554, 0, -554, 02654 -554, 0, -554, -554, -554, -554, -554, -554, -554, -554, 02655 -554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02656 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02657 -554, -554, 0, 0, 0, 0, 0, 0, 0, 0, 02658 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02659 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 02660 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02661 133, 134, 135, 136, 0, 0, 0, 137, 138, 139, 02662 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 02663 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, 02664 155, 270, 271, 156, 272, 0, 0, 0, 0, 0, 02665 0, 0, 0, 157, 158, 159, 160, 161, 162, 163, 02666 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 02667 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 02668 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 02669 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 02670 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 02671 183, 184, 0, 0, 0, 0, 0, 0, 0, 0, 02672 0, 0, 0, 0, 0, 0, 0, 0, 185, 113, 02673 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 02674 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 02675 134, 135, 136, 0, 0, 0, 137, 138, 139, 140, 02676 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 02677 0, 147, 148, 149, 150, 151, 152, 153, 154, 155, 02678 226, 0, 156, 0, 0, 0, 0, 0, 0, 0, 02679 0, 0, 157, 158, 159, 160, 161, 162, 163, 164, 02680 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 02681 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02682 0, 172, 0, 0, 55, 0, 0, 0, 0, 0, 02683 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 02684 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 02685 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02686 0, 0, 0, 0, 0, 0, 0, 185, 113, 114, 02687 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 02688 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 02689 135, 136, 0, 0, 0, 137, 138, 139, 140, 141, 02690 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 02691 147, 148, 149, 150, 151, 152, 153, 154, 155, 0, 02692 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 02693 0, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02694 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02696 172, 0, 0, 55, 0, 0, 0, 0, 0, 0, 02697 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02698 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02700 0, 0, 0, 0, 0, 0, 185, 113, 114, 115, 02701 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 02702 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 02703 136, 0, 0, 0, 137, 138, 139, 140, 141, 142, 02704 143, 144, 145, 146, 0, 0, 0, 0, 0, 147, 02705 148, 149, 150, 151, 152, 153, 154, 155, 0, 0, 02706 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02707 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 02708 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 02709 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 02710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02711 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 02712 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 02713 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02714 11, 0, 0, 0, 12, 185, 13, 14, 15, 231, 02715 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02716 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02717 0, 0, 0, 0, 258, 0, 0, 32, 33, 34, 02718 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02719 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02721 0, 0, 0, 0, 259, 0, 0, 197, 50, 0, 02722 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02723 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02724 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02725 260, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02726 15, 231, 232, 18, 19, 0, 0, 0, 261, 0, 02727 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02728 0, 0, 0, 0, 0, 0, 258, 0, 0, 32, 02729 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02730 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 02731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02732 0, 0, 0, 0, 0, 0, 259, 0, 0, 197, 02733 50, 0, 51, 52, 0, 0, 0, 54, 55, 56, 02734 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02735 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 02736 0, 0, 260, 10, 11, 0, 0, 0, 12, 0, 02737 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02738 490, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02739 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02740 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02741 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02743 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02744 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02745 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02746 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, 02747 0, 0, 10, 11, 61, 62, 63, 12, 0, 13, 02748 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02749 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02750 27, 0, 0, 0, 0, 0, 28, 29, 0, 31, 02751 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02752 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02754 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02755 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02756 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02757 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02758 0, 10, 11, 61, 62, 63, 12, 0, 13, 14, 02759 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02760 20, 21, 22, 23, 24, 25, 26, 0, 0, 194, 02761 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02762 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, 02763 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02765 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02766 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, 02767 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02768 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02769 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02770 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02771 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02772 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02773 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02774 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02776 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02777 0, 51, 52, 0, 587, 199, 54, 55, 56, 57, 02778 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02779 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02780 11, 61, 200, 63, 12, 0, 13, 14, 15, 231, 02781 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02782 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02783 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02784 35, 36, 37, 38, 39, 40, 195, 41, 42, 0, 02785 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02787 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02788 51, 52, 0, 198, 0, 54, 55, 56, 57, 58, 02789 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02790 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02791 61, 200, 63, 12, 0, 13, 14, 15, 231, 232, 02792 18, 19, 0, 0, 0, 0, 0, 233, 234, 235, 02793 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02794 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02795 36, 37, 38, 39, 40, 195, 41, 42, 0, 43, 02796 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02798 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02799 52, 0, 0, 199, 54, 55, 56, 57, 58, 59, 02800 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02801 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02802 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02803 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02804 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02805 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02806 37, 38, 39, 40, 195, 41, 42, 0, 43, 44, 02807 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02809 0, 0, 196, 0, 0, 197, 50, 0, 51, 52, 02810 0, 587, 0, 54, 55, 56, 57, 58, 59, 60, 02811 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02812 7, 0, 9, 0, 0, 0, 10, 11, 61, 200, 02813 63, 12, 0, 13, 14, 15, 231, 232, 18, 19, 02814 0, 0, 0, 0, 0, 233, 234, 235, 23, 24, 02815 25, 26, 0, 0, 194, 0, 0, 0, 0, 0, 02816 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02817 38, 39, 40, 195, 41, 42, 0, 43, 44, 45, 02818 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02820 0, 196, 0, 0, 197, 50, 0, 51, 52, 0, 02821 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02822 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02823 0, 9, 0, 0, 0, 10, 11, 61, 200, 63, 02824 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02825 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02826 26, 0, 0, 194, 0, 0, 0, 0, 0, 0, 02827 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02828 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02829 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02831 196, 0, 0, 197, 50, 0, 51, 52, 0, 484, 02832 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02833 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02834 9, 0, 0, 0, 10, 11, 61, 200, 63, 12, 02835 0, 13, 14, 15, 231, 232, 18, 19, 0, 0, 02836 0, 0, 0, 233, 234, 235, 23, 24, 25, 26, 02837 0, 0, 194, 0, 0, 0, 0, 0, 0, 29, 02838 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02839 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02840 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02841 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 02842 0, 0, 197, 50, 0, 51, 52, 0, 198, 0, 02843 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 02844 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02845 0, 0, 0, 10, 11, 61, 200, 63, 12, 0, 02846 13, 14, 15, 231, 232, 18, 19, 0, 0, 0, 02847 0, 0, 233, 234, 235, 23, 24, 25, 26, 0, 02848 0, 194, 0, 0, 0, 0, 0, 0, 29, 0, 02849 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02850 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02852 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 02853 0, 197, 50, 0, 51, 52, 0, 772, 0, 54, 02854 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02855 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02856 0, 0, 10, 11, 61, 200, 63, 12, 0, 13, 02857 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02858 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02859 194, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02860 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02861 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02862 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02863 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 02864 197, 50, 0, 51, 52, 0, 484, 0, 54, 55, 02865 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02866 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02867 0, 10, 11, 61, 200, 63, 12, 0, 13, 14, 02868 15, 231, 232, 18, 19, 0, 0, 0, 0, 0, 02869 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02870 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02871 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02872 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02873 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02874 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02875 50, 0, 51, 52, 0, 587, 0, 54, 55, 56, 02876 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02877 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02878 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02879 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02880 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02881 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02882 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02883 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02885 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02886 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, 02887 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02888 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02889 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02890 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02891 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02892 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02893 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02894 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02896 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02897 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02898 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02899 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02900 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02901 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02902 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02903 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02904 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02905 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02906 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02907 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02908 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, 02909 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02910 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02911 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02912 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02913 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02914 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02915 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02916 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02918 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02919 0, 305, 0, 54, 55, 56, 57, 58, 59, 60, 02920 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02921 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02922 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02923 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02924 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02925 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02926 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02927 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02928 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 02929 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02930 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02931 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02932 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02933 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02934 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02935 0, 0, 258, 0, 0, 32, 33, 34, 354, 36, 02936 37, 38, 355, 40, 0, 41, 42, 0, 43, 44, 02937 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02938 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 02939 0, 0, 357, 0, 0, 197, 50, 0, 51, 52, 02940 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02941 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02942 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02943 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02944 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02945 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02946 32, 33, 34, 354, 36, 37, 38, 355, 40, 0, 02947 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02949 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 02950 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02951 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02952 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02953 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02954 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02955 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02956 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02957 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02958 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02960 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02961 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02962 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02963 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02964 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02965 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02966 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02967 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02968 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02970 0, 0, 0, 0, 0, 0, 0, 902, 0, 0, 02971 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02972 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02973 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02974 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02975 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02976 24, 25, 26, 0, 0, 194, 0, 663, 0, 0, 02977 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02978 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02979 45, 308, 309, 310, 311, 312, 313, 314, 315, 316, 02980 317, 318, 319, 320, 0, 0, 321, 322, 0, 0, 02981 0, 0, 912, 0, 0, 197, 50, 0, 51, 52, 02982 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02983 0, 0, 0, 323, 0, 324, 325, 326, 327, 328, 02984 329, 330, 331, 332, 333, 0, 0, 0, 260, 0, 02985 525, 526, 0, 0, 527, 0, 0, 0, 0, 0, 02986 0, 0, 0, -241, 157, 158, 159, 160, 161, 162, 02987 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02988 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02989 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02990 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02991 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02992 0, 183, 184, 0, 0, 0, 0, 533, 534, 0, 02993 0, 535, 0, 0, 0, 0, 0, 0, 0, 185, 02994 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02995 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02997 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02998 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02999 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 03000 0, 0, 0, 0, 591, 526, 0, 0, 592, 0, 03001 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 03002 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 03003 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 03004 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 03005 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03006 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 03007 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 03008 0, 594, 534, 0, 0, 595, 0, 0, 0, 0, 03009 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 03010 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 03011 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 03012 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 03013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03014 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 03015 182, 0, 183, 184, 0, 0, 0, 0, 617, 526, 03016 0, 0, 618, 0, 0, 0, 0, 0, 0, 0, 03017 185, 220, 157, 158, 159, 160, 161, 162, 163, 164, 03018 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 03019 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03020 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 03021 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 03022 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 03023 184, 0, 0, 0, 0, 620, 534, 0, 0, 621, 03024 0, 0, 0, 0, 0, 0, 0, 185, 220, 157, 03025 158, 159, 160, 161, 162, 163, 164, 165, 0, 0, 03026 166, 167, 0, 0, 168, 169, 170, 171, 0, 0, 03027 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 03028 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03029 0, 0, 0, 0, 0, 173, 174, 175, 176, 177, 03030 178, 179, 180, 181, 182, 0, 183, 184, 0, 0, 03031 0, 0, 692, 526, 0, 0, 693, 0, 0, 0, 03032 0, 0, 0, 0, 185, 220, 157, 158, 159, 160, 03033 161, 162, 163, 164, 165, 0, 0, 166, 167, 0, 03034 0, 168, 169, 170, 171, 0, 0, 0, 0, 0, 03035 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 03036 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03037 0, 0, 173, 174, 175, 176, 177, 178, 179, 180, 03038 181, 182, 0, 183, 184, 0, 0, 0, 0, 695, 03039 534, 0, 0, 696, 0, 0, 0, 0, 0, 0, 03040 0, 185, 220, 157, 158, 159, 160, 161, 162, 163, 03041 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 03042 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 03043 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 03044 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 03045 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 03046 183, 184, 0, 0, 0, 0, 702, 526, 0, 0, 03047 703, 0, 0, 0, 0, 0, 0, 0, 185, 220, 03048 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 03049 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 03050 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 03051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03052 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 03053 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 03054 0, 0, 0, 572, 534, 0, 0, 573, 0, 0, 03055 0, 0, 0, 0, 0, 185, 220, 157, 158, 159, 03056 160, 161, 162, 163, 164, 165, 0, 0, 166, 167, 03057 0, 0, 168, 169, 170, 171, 0, 0, 0, 0, 03058 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 03059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03060 0, 0, 0, 173, 174, 175, 176, 177, 178, 179, 03061 180, 181, 182, 0, 183, 184, 0, 0, 0, 0, 03062 965, 526, 0, 0, 966, 0, 0, 0, 0, 0, 03063 0, 0, 185, 220, 157, 158, 159, 160, 161, 162, 03064 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 03065 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 03066 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 03067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03068 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 03069 0, 183, 184, 0, 0, 0, 0, 971, 526, 0, 03070 0, 972, 0, 0, 0, 0, 0, 0, 0, 185, 03071 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 03072 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 03073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03074 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03075 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 03076 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 03077 0, 0, 0, 0, 974, 534, 0, 0, 975, 0, 03078 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 03079 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 03080 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 03081 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 03082 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03083 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 03084 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 03085 0, 572, 534, 0, 0, 573, 0, 0, 0, 0, 03086 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 03087 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 03088 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 03089 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 03090 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 03091 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 03092 182, 663, 183, 184, 0, 0, 308, 309, 310, 311, 03093 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, 03094 185, 321, 322, 0, 0, 308, 309, 310, 311, 312, 03095 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 03096 321, 322, 0, 0, 0, 0, 0, 0, 323, 0, 03097 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03098 0, 0, 0, 0, 0, 0, 0, 323, 0, 324, 03099 325, 326, 327, 328, 329, 330, 331, 332, 333 03100 }; 03101 03102 static const yytype_int16 yycheck[] = 03103 { 03104 2, 55, 340, 28, 2, 454, 4, 52, 593, 16, 03105 17, 335, 307, 20, 307, 8, 547, 213, 16, 17, 03106 8, 566, 20, 27, 53, 29, 84, 22, 8, 87, 03107 546, 87, 4, 22, 619, 28, 49, 91, 252, 76, 03108 28, 2, 256, 4, 404, 357, 1, 65, 28, 51, 03109 52, 49, 50, 749, 450, 53, 746, 13, 334, 627, 03110 336, 53, 680, 25, 62, 762, 684, 454, 13, 16, 03111 17, 65, 26, 20, 396, 55, 400, 26, 76, 25, 03112 440, 0, 404, 27, 76, 83, 84, 576, 577, 87, 03113 88, 89, 90, 87, 490, 29, 88, 89, 90, 13, 03114 242, 25, 378, 379, 51, 851, 828, 85, 76, 694, 03115 136, 91, 87, 16, 17, 110, 147, 20, 85, 568, 03116 705, 110, 146, 399, 25, 401, 85, 653, 452, 61, 03117 87, 16, 17, 62, 109, 20, 276, 25, 278, 56, 03118 280, 13, 742, 37, 38, 87, 114, 109, 51, 52, 03119 195, 427, 109, 198, 199, 826, 701, 28, 113, 849, 03120 138, 139, 304, 763, 709, 140, 25, 109, 736, 737, 03121 25, 13, 139, 107, 106, 146, 13, 453, 140, 138, 03122 139, 143, 136, 632, 140, 147, 109, 136, 244, 145, 03123 145, 147, 147, 142, 140, 941, 892, 142, 140, 197, 03124 145, 145, 147, 147, 653, 207, 896, 904, 930, 140, 03125 217, 213, 219, 220, 25, 886, 140, 413, 220, 217, 03126 746, 219, 220, 749, 261, 223, 244, 225, 552, 242, 03127 719, 145, 230, 147, 50, 293, 294, 295, 296, 140, 03128 564, 601, 142, 241, 242, 632, 235, 147, 109, 238, 03129 244, 563, 140, 147, 258, 873, 99, 302, 826, 708, 03130 828, 932, 307, 261, 25, 661, 87, 83, 84, 261, 03131 217, 87, 219, 145, 140, 147, 305, 553, 600, 601, 03132 241, 140, 25, 341, 342, 140, 25, 343, 959, 565, 03133 806, 304, 85, 87, 292, 293, 294, 295, 296, 297, 03134 298, 299, 85, 145, 302, 147, 304, 305, 145, 307, 03135 147, 59, 60, 305, 217, 109, 219, 26, 886, 887, 03136 292, 708, 109, 849, 142, 851, 49, 467, 335, 140, 03137 875, 292, 217, 335, 219, 56, 297, 335, 145, 337, 03138 147, 87, 873, 341, 342, 138, 139, 336, 88, 343, 03139 395, 396, 690, 140, 334, 302, 139, 26, 356, 404, 03140 307, 140, 930, 109, 932, 359, 892, 85, 147, 662, 03141 109, 85, 109, 302, 61, 26, 85, 140, 307, 140, 03142 15, 142, 17, 928, 679, 87, 384, 385, 973, 85, 03143 85, 959, 437, 400, 590, 440, 421, 140, 400, 142, 03144 614, 140, 400, 85, 143, 140, 85, 223, 147, 225, 03145 412, 413, 401, 450, 142, 941, 85, 104, 105, 399, 03146 138, 139, 424, 136, 142, 139, 424, 136, 421, 138, 03147 139, 880, 85, 421, 85, 433, 85, 142, 427, 484, 03148 140, 421, 138, 139, 139, 452, 426, 147, 85, 142, 03149 452, 85, 450, 490, 452, 384, 385, 139, 450, 146, 03150 139, 85, 822, 424, 453, 68, 85, 136, 85, 138, 03151 139, 451, 433, 142, 197, 87, 85, 293, 294, 295, 03152 296, 483, 298, 299, 68, 136, 139, 138, 139, 138, 03153 139, 142, 490, 396, 85, 37, 38, 109, 490, 668, 03154 822, 223, 139, 548, 138, 139, 675, 230, 109, 52, 03155 514, 54, 55, 56, 57, 139, 119, 120, 121, 242, 03156 139, 138, 139, 861, 246, 341, 342, 143, 532, 867, 03157 139, 26, 728, 52, 437, 530, 538, 56, 540, 85, 03158 356, 530, 587, 538, 542, 552, 544, 138, 139, 538, 03159 552, 545, 546, 56, 552, 600, 601, 564, 85, 584, 03160 59, 60, 564, 144, 553, 559, 564, 137, 566, 567, 03161 106, 551, 574, 575, 576, 577, 565, 87, 615, 574, 03162 575, 304, 140, 563, 106, 574, 575, 87, 590, 593, 03163 85, 584, 138, 139, 87, 85, 584, 140, 68, 109, 03164 68, 548, 14, 15, 584, 85, 604, 609, 85, 109, 03165 140, 138, 139, 658, 17, 619, 109, 615, 56, 608, 03166 609, 574, 575, 615, 661, 145, 25, 951, 52, 94, 03167 54, 55, 56, 57, 679, 143, 638, 146, 640, 697, 03168 642, 136, 700, 138, 139, 137, 140, 142, 138, 139, 03169 52, 653, 54, 55, 56, 57, 654, 711, 138, 139, 03170 10, 138, 139, 661, 662, 89, 61, 665, 666, 661, 03171 65, 95, 96, 671, 672, 109, 952, 679, 680, 140, 03172 682, 140, 684, 140, 406, 140, 140, 89, 410, 734, 03173 694, 140, 116, 415, 96, 119, 8, 600, 13, 697, 03174 87, 705, 700, 701, 698, 61, 87, 137, 430, 104, 03175 105, 709, 109, 435, 116, 54, 710, 719, 716, 717, 03176 140, 145, 109, 140, 63, 64, 728, 772, 109, 140, 03177 68, 711, 679, 662, 87, 52, 665, 666, 796, 52, 03178 742, 111, 671, 672, 140, 743, 744, 87, 104, 105, 03179 106, 567, 144, 140, 549, 15, 109, 755, 803, 140, 03180 2, 763, 4, 765, 87, 767, 768, 489, 52, 109, 03181 54, 55, 56, 57, 16, 17, 140, 822, 20, 117, 03182 118, 119, 120, 121, 145, 783, 109, 140, 604, 791, 03183 109, 140, 794, 114, 140, 793, 140, 140, 796, 10, 03184 140, 88, 800, 801, 140, 9, 804, 49, 50, 10, 03185 137, 140, 806, 10, 808, 61, 140, 140, 140, 542, 03186 62, 544, 820, 137, 140, 114, 52, 137, 54, 55, 03187 56, 57, 834, 835, 140, 837, 68, 839, 840, 140, 03188 140, 83, 84, 137, 842, 87, 56, 140, 140, 68, 03189 842, 83, 84, 56, 783, 140, 140, 140, 104, 105, 03190 106, 140, 860, 89, 83, 84, 864, 140, 860, 95, 03191 96, 873, 142, 142, 61, 140, 424, 875, 90, 88, 03192 61, 697, 954, 736, 700, 117, 118, 119, 120, 121, 03193 116, 93, 904, 119, 689, 114, 115, 116, 117, 118, 03194 119, 120, 121, 953, 906, 907, 908, 96, 910, 911, 03195 640, 706, 642, 57, 91, 880, 142, 104, 105, 106, 03196 918, 849, 920, 104, 105, 106, 653, 746, 926, -1, 03197 928, 654, 934, 935, 936, 937, 52, -1, 54, 55, 03198 56, 57, -1, -1, 951, -1, -1, 54, 55, 951, 03199 57, 953, 954, 951, -1, 197, 63, 64, -1, 939, 03200 -1, -1, -1, 952, -1, 967, 968, 969, 970, 973, 03201 950, -1, -1, 89, -1, 217, -1, 219, 220, 981, 03202 796, 223, -1, 225, -1, 707, -1, 989, 230, -1, 03203 -1, -1, -1, 716, 717, 68, -1, -1, -1, 241, 03204 242, -1, 797, -1, 799, -1, -1, 729, -1, -1, 03205 83, 84, -1, -1, 809, -1, -1, -1, 740, 814, 03206 743, 744, 749, -1, 52, 752, 54, 55, 56, 57, 03207 -1, -1, 755, -1, -1, 765, -1, 767, 768, -1, 03208 -1, -1, -1, 116, 117, 118, 119, 120, 121, -1, 03209 292, 293, 294, 295, 296, 297, 298, 299, -1, -1, 03210 302, 89, 304, -1, -1, 307, -1, 95, -1, 52, 03211 793, 54, 55, 56, 57, 870, 871, 800, 801, -1, 03212 -1, 804, 16, 17, -1, -1, 20, -1, -1, -1, 03213 -1, 813, -1, 335, -1, 337, -1, 820, -1, 341, 03214 342, -1, -1, 825, 834, 835, -1, 837, 830, 839, 03215 840, -1, 46, 47, 356, -1, -1, 51, 52, -1, 03216 -1, -1, -1, -1, 851, -1, 853, -1, 62, 63, 03217 -1, 52, 927, 54, 55, 56, 57, -1, -1, -1, 03218 -1, 864, 384, 385, 40, 41, 42, 43, 44, -1, 03219 -1, -1, -1, -1, -1, -1, -1, -1, 400, -1, 03220 955, -1, 957, -1, -1, 892, -1, 894, 89, -1, 03221 -1, 898, -1, -1, 95, -1, 906, 907, 908, -1, 03222 910, 911, 424, 52, -1, 54, 55, 56, 57, -1, 03223 -1, 433, -1, -1, -1, 918, -1, 920, -1, -1, 03224 -1, -1, -1, 926, 934, 935, 936, 937, -1, -1, 03225 452, -1, -1, -1, 941, -1, 943, -1, -1, 946, 03226 89, -1, -1, -1, -1, -1, 95, 96, -1, -1, 03227 -1, -1, -1, -1, 961, -1, -1, 967, 968, 969, 03228 970, -1, -1, -1, -1, -1, -1, 116, -1, -1, 03229 119, 981, -1, -1, -1, -1, 983, -1, -1, 989, 03230 -1, 195, -1, -1, 198, 199, 200, -1, -1, -1, 03231 2, -1, 4, 142, -1, 52, -1, 54, 55, 56, 03232 57, -1, -1, 217, -1, 219, 220, -1, -1, -1, 03233 -1, 2, -1, 4, -1, -1, -1, -1, -1, -1, 03234 542, -1, 544, 52, -1, 54, 55, 56, 57, -1, 03235 552, -1, 89, -1, -1, -1, -1, 49, 95, 96, 03236 -1, 53, 564, -1, 566, 567, -1, -1, -1, -1, 03237 -1, -1, -1, -1, -1, -1, -1, -1, 49, 116, 03238 89, -1, 119, -1, 76, -1, 95, 96, -1, -1, 03239 -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 03240 -1, -1, 604, -1, -1, -1, -1, 116, 302, -1, 03241 119, -1, -1, 307, 308, 309, 310, 311, 312, 313, 03242 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 03243 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03244 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1, 03245 -1, -1, 654, -1, -1, -1, -1, -1, -1, -1, 03246 662, -1, -1, 665, 666, -1, -1, -1, -1, 671, 03247 672, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03248 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03249 384, 385, -1, -1, -1, 697, -1, -1, 700, 701, 03250 394, 395, 396, -1, -1, 197, 400, 709, 402, 403, 03251 404, -1, -1, -1, 716, 717, 112, 113, 114, 115, 03252 116, 117, 118, 119, 120, 121, 197, -1, -1, 423, 03253 -1, -1, -1, -1, 428, -1, -1, -1, 230, -1, 03254 -1, 743, 744, 437, -1, -1, 440, -1, -1, 241, 03255 242, -1, -1, 755, -1, -1, -1, -1, 452, 230, 03256 -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, 03257 241, 242, -1, -1, -1, -1, -1, -1, 472, 473, 03258 -1, 783, -1, -1, -1, -1, -1, -1, -1, -1, 03259 484, 793, -1, -1, 796, -1, -1, -1, 800, 801, 03260 292, -1, 804, -1, -1, 297, -1, -1, -1, -1, 03261 -1, -1, 304, 305, -1, -1, -1, 2, 820, 4, 03262 -1, 292, -1, -1, -1, -1, 297, -1, -1, -1, 03263 -1, -1, -1, 304, -1, -1, -1, -1, -1, -1, 03264 -1, -1, -1, -1, -1, 337, -1, 2, -1, 4, 03265 -1, -1, -1, -1, 548, -1, -1, -1, 552, -1, 03266 -1, -1, 864, -1, 49, 2, 337, 4, 53, -1, 03267 564, -1, -1, 875, -1, -1, -1, -1, -1, -1, 03268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03269 -1, 76, -1, 587, 49, -1, -1, -1, 53, -1, 03270 -1, -1, -1, 88, 89, 90, 600, 601, -1, -1, 03271 -1, -1, 49, -1, -1, -1, 918, -1, 920, -1, 03272 -1, 76, -1, -1, 926, -1, 928, -1, -1, -1, 03273 -1, -1, 424, 88, 89, 90, 91, -1, -1, -1, 03274 -1, 433, -1, -1, -1, -1, -1, -1, -1, 951, 03275 -1, 88, -1, 424, -1, -1, -1, -1, 450, -1, 03276 -1, -1, 433, -1, 658, -1, -1, -1, 662, 663, 03277 -1, 665, 666, -1, -1, -1, -1, 671, 672, 0, 03278 -1, -1, -1, -1, -1, 679, -1, 8, 9, 10, 03279 -1, -1, 13, 14, 15, -1, 17, -1, 490, -1, 03280 -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, 03281 -1, -1, 197, -1, -1, -1, 37, 38, -1, 40, 03282 41, 42, 43, 44, 718, -1, -1, -1, -1, 723, 03283 724, -1, 726, 727, -1, -1, -1, -1, -1, -1, 03284 734, -1, 197, -1, -1, 230, -1, -1, -1, -1, 03285 542, -1, 544, -1, -1, -1, 241, 242, -1, -1, 03286 197, -1, -1, -1, 85, -1, -1, -1, -1, -1, 03287 -1, 542, -1, 544, 566, 230, 261, -1, 772, -1, 03288 -1, -1, 776, -1, -1, -1, 241, 242, -1, 783, 03289 -1, -1, -1, 230, -1, 566, -1, -1, -1, -1, 03290 -1, -1, -1, -1, 241, 242, 261, 292, -1, 803, 03291 -1, -1, 297, -1, -1, -1, 137, -1, 139, 304, 03292 305, 142, 143, 615, 145, -1, 147, 821, 822, -1, 03293 -1, -1, -1, -1, -1, -1, -1, 292, -1, -1, 03294 -1, -1, 297, -1, -1, -1, -1, -1, -1, 304, 03295 305, -1, 337, -1, -1, 292, -1, -1, -1, -1, 03296 297, -1, 654, -1, -1, -1, -1, 304, -1, 661, 03297 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03298 -1, -1, 337, 654, -1, -1, -1, -1, -1, -1, 03299 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03300 337, -1, -1, -1, -1, -1, -1, -1, -1, 701, 03301 -1, -1, -1, -1, -1, -1, -1, 709, -1, -1, 03302 -1, -1, -1, -1, 716, 717, -1, -1, -1, -1, 03303 701, -1, -1, -1, -1, -1, -1, -1, 709, 424, 03304 -1, -1, -1, -1, -1, 716, 717, -1, 433, -1, 03305 -1, 743, 744, -1, -1, -1, -1, 951, -1, -1, 03306 -1, -1, -1, 755, -1, 450, -1, -1, -1, 424, 03307 -1, -1, 743, 744, -1, -1, -1, -1, 433, -1, 03308 -1, -1, -1, -1, 755, -1, -1, 424, -1, -1, 03309 -1, -1, -1, -1, -1, 450, 433, -1, -1, -1, 03310 -1, 793, -1, -1, -1, 490, -1, -1, 800, 801, 03311 -1, -1, 804, -1, -1, -1, -1, -1, -1, -1, 03312 -1, -1, 793, -1, -1, -1, -1, -1, 820, 800, 03313 801, -1, -1, 804, -1, 490, -1, -1, -1, -1, 03314 -1, -1, -1, -1, -1, -1, -1, -1, -1, 820, 03315 842, -1, -1, -1, -1, -1, -1, 542, -1, 544, 03316 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1, 03317 -1, -1, 864, -1, -1, -1, -1, -1, -1, -1, 03318 -1, 566, -1, 875, -1, -1, -1, 542, -1, 544, 03319 -1, -1, -1, 864, -1, -1, -1, -1, -1, -1, 03320 -1, -1, -1, -1, 875, 542, -1, 544, -1, -1, 03321 -1, 566, -1, -1, -1, -1, -1, -1, -1, -1, 03322 -1, -1, -1, -1, -1, -1, 918, -1, 920, 566, 03323 615, -1, -1, -1, 926, -1, 928, -1, -1, -1, 03324 -1, -1, -1, -1, -1, -1, -1, 918, -1, 920, 03325 -1, -1, -1, -1, -1, 926, -1, 928, -1, -1, 03326 615, 646, -1, -1, -1, -1, -1, -1, -1, 654, 03327 -1, -1, -1, -1, -1, -1, 661, -1, -1, -1, 03328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03329 -1, -1, 68, 69, 70, 71, 72, 73, 74, 654, 03330 -1, 77, 78, -1, -1, -1, 661, 83, 84, -1, 03331 -1, -1, -1, -1, -1, -1, 701, 654, -1, -1, 03332 -1, -1, -1, -1, 709, 662, -1, -1, -1, -1, 03333 -1, 716, 717, -1, -1, -1, 112, 113, 114, 115, 03334 116, 117, 118, 119, 120, 121, 701, -1, -1, -1, 03335 -1, -1, -1, -1, 709, -1, -1, -1, 743, 744, 03336 -1, 716, 717, -1, 701, -1, -1, -1, -1, -1, 03337 755, -1, 709, -1, -1, -1, -1, -1, -1, 716, 03338 717, 68, 69, 70, 71, 72, 73, 74, 743, 744, 03339 77, 78, -1, -1, -1, -1, 83, 84, -1, -1, 03340 755, -1, -1, -1, -1, -1, 743, 744, 793, -1, 03341 -1, -1, -1, -1, -1, 800, 801, -1, 755, 804, 03342 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 03343 117, 118, 119, 120, 121, 820, -1, -1, 793, -1, 03344 -1, -1, -1, -1, -1, 800, 801, -1, -1, 804, 03345 -1, -1, -1, -1, -1, -1, 793, 842, -1, -1, 03346 -1, -1, -1, 800, 801, 820, -1, 804, -1, -1, 03347 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03348 -1, -1, -1, 820, -1, -1, -1, 842, -1, -1, 03349 875, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03350 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03352 875, -1, -1, 860, -1, -1, -1, 864, -1, -1, 03353 -1, -1, -1, 918, -1, 920, -1, -1, 875, -1, 03354 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03356 -1, -1, -1, 918, -1, 920, -1, -1, -1, -1, 03357 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03358 -1, 918, -1, 920, -1, -1, -1, -1, -1, 926, 03359 -1, 928, 0, 1, -1, 3, 4, 5, 6, 7, 03360 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1, 03361 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03362 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03363 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03364 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03365 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03367 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03368 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03369 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03370 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03371 -1, -1, -1, 0, 122, 123, 124, -1, -1, -1, 03372 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03373 17, -1, -1, -1, -1, -1, -1, 145, -1, 147, 03374 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03375 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03376 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03377 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03378 84, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03379 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03380 87, 88, -1, -1, -1, -1, 110, 94, 112, 113, 03381 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03382 107, -1, 109, 110, 111, 112, 113, 114, 115, 116, 03383 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, 03384 -1, -1, -1, 147, -1, -1, -1, -1, -1, -1, 03385 137, 138, 139, 140, 0, -1, 143, 144, 145, -1, 03386 147, -1, 8, 9, 10, -1, -1, 13, 14, 15, 03387 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 03388 26, 27, 28, -1, -1, -1, -1, -1, -1, -1, 03389 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03390 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03391 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03392 83, 84, 68, 69, 70, 71, 72, 73, 74, 75, 03393 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03394 -1, -1, 88, -1, -1, -1, -1, 110, 94, 112, 03395 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03396 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 03397 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03399 136, 137, 138, 139, 140, 0, 142, 143, 144, 145, 03400 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14, 03401 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03402 -1, -1, 27, 28, 29, -1, -1, -1, -1, -1, 03403 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03404 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03405 72, 73, 74, 75, -1, 77, 78, -1, -1, -1, 03406 -1, 83, 84, 68, 69, 70, 71, 72, 73, 74, 03407 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03408 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03409 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03410 -1, -1, 107, -1, -1, 110, 111, 112, 113, 114, 03411 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, 03412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03413 -1, -1, 137, 138, 139, 140, 0, -1, 143, 144, 03414 145, -1, 147, -1, 8, 9, 10, -1, -1, 13, 03415 14, 15, -1, 17, -1, -1, -1, -1, -1, -1, 03416 -1, -1, 26, 27, 28, -1, -1, -1, -1, -1, 03417 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 03418 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03419 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03420 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03421 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03422 84, 85, -1, -1, 88, -1, -1, -1, -1, -1, 03423 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03424 -1, -1, -1, -1, -1, -1, 110, -1, 112, 113, 03425 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03427 -1, -1, 136, 137, 138, 139, 140, 0, 142, 143, 03428 144, 145, -1, 147, -1, 8, 9, 10, -1, -1, 03429 13, 14, 15, -1, 17, -1, -1, -1, -1, -1, 03430 -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, 03431 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, 03432 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, 03433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03434 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03435 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03436 83, 84, 85, -1, -1, 88, -1, -1, -1, -1, 03437 -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, 03438 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 03439 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03441 -1, -1, -1, -1, 137, 138, 139, 140, 0, 142, 03442 143, 144, 145, -1, 147, -1, 8, 9, 10, -1, 03443 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1, 03444 -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, 03445 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03446 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03448 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03449 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03450 -1, 83, 84, 85, 0, 87, -1, -1, -1, -1, 03451 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15, 03452 -1, 17, -1, -1, -1, -1, -1, 109, 110, -1, 03453 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03454 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03455 -1, -1, -1, -1, 136, 137, 138, 139, 140, -1, 03456 -1, 143, -1, 145, -1, 147, -1, -1, -1, -1, 03457 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03458 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03459 -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, 03460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03461 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115, 03462 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03464 -1, 137, 138, 139, 140, -1, -1, 143, -1, 145, 03465 1, 147, 3, 4, 5, 6, 7, 8, 9, 10, 03466 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03467 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03468 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03469 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03470 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03471 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03473 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03474 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03475 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03476 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03477 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03479 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03480 6, 7, -1, -1, 10, 11, 12, -1, 14, 15, 03481 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03482 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03483 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03484 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03485 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03486 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03488 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03489 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03491 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03493 -1, -1, -1, -1, -1, -1, -1, -1, -1, 145, 03494 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03495 11, 12, -1, -1, 15, 16, 17, 18, 19, 20, 03496 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03497 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03498 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03499 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03500 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03502 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03503 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03504 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03506 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03507 1, -1, 3, 4, 5, 6, 7, -1, -1, -1, 03508 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03509 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03510 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03511 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03512 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03513 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03515 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03516 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03517 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03519 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03520 -1, -1, -1, -1, -1, -1, 137, -1, -1, -1, 03521 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03522 6, 7, -1, -1, 10, 11, 12, -1, -1, 15, 03523 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03524 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03525 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03526 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03527 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03528 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03530 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03531 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03533 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03534 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03535 6, 7, -1, 9, 10, 11, 12, -1, -1, 145, 03536 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03537 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03538 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03539 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03540 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03541 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03542 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03543 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03544 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03546 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03547 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03548 6, 7, -1, -1, -1, 11, 12, -1, -1, 145, 03549 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03550 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03551 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03552 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03553 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03554 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03555 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03556 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03557 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03558 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03559 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03560 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03561 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03562 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03563 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03564 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03565 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03566 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03567 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03569 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03570 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03572 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03573 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03574 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03575 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03576 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03577 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03578 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03579 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03580 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03581 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03582 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03583 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03585 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03587 -1, 137, -1, -1, -1, -1, -1, -1, -1, 145, 03588 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03589 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, 03590 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03591 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03592 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03593 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03594 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03595 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03596 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03597 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03598 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03599 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03600 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03601 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03602 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03603 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03604 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03605 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03606 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03607 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03609 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03610 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03611 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03612 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03613 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03614 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03615 32, 33, 34, 35, 36, -1, 147, 39, -1, -1, 03616 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03617 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03618 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03620 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03621 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03622 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03624 122, 123, 124, -1, -1, -1, -1, -1, -1, -1, 03625 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03626 12, -1, -1, 145, 16, 147, 18, 19, 20, 21, 03627 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03628 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03629 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03630 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03631 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03633 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03634 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03635 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03636 3, 4, 5, 6, 7, -1, -1, -1, 11, 12, 03637 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03638 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03639 33, 34, 35, 36, -1, 147, 39, -1, -1, -1, 03640 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03641 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03642 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03643 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03644 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03645 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03646 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03647 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03648 123, 124, -1, -1, -1, -1, -1, -1, 3, 4, 03649 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, 03650 -1, 16, 145, 18, 19, 20, 21, 22, 23, 24, 03651 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03652 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03653 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, 03654 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03655 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03657 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03658 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03659 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03660 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03663 145, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03664 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03665 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03666 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03667 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03668 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, 03669 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03670 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03671 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03672 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 03673 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03674 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03675 -1, 123, 124, -1, -1, -1, -1, -1, 3, 4, 03676 5, -1, 7, -1, -1, -1, 11, 12, -1, 141, 03677 142, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03678 -1, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03679 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03680 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03681 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03682 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03683 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03684 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03685 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, 03686 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03687 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03688 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03689 -1, 136, -1, 11, 12, -1, -1, 142, 16, -1, 03690 18, 19, 20, 21, 22, 23, 24, -1, 26, -1, 03691 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03692 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03693 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03694 58, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03695 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03696 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03697 -1, 89, 90, -1, 92, 93, -1, 95, 96, 97, 03698 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03699 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03700 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03701 -1, -1, 3, 4, 5, -1, 7, -1, 136, -1, 03702 11, 12, -1, -1, 142, 16, -1, 18, 19, 20, 03703 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03704 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03705 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03706 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03707 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03708 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03709 -1, -1, -1, -1, -1, 86, 87, -1, 89, 90, 03710 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03711 101, 102, 103, -1, -1, -1, -1, -1, 109, -1, 03712 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03713 7, 122, 123, 124, 11, 12, -1, -1, -1, 16, 03714 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03715 -1, 142, -1, 30, 31, 32, 33, 34, 35, 36, 03716 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03717 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03718 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03719 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03720 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03721 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96, 03722 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03724 3, 4, 5, -1, 7, 122, 123, 124, 11, 12, 03725 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, 03726 23, 24, -1, -1, -1, 142, -1, 30, 31, 32, 03727 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03728 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03729 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03730 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03732 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03733 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03734 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03735 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03736 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03737 -1, -1, -1, -1, -1, -1, -1, -1, -1, 142, 03738 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 03739 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 03740 23, 24, 25, 26, -1, -1, -1, 30, 31, 32, 03741 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, 03742 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03743 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, 03744 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 03745 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 03746 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 03747 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 03748 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 03749 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03750 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03751 -1, -1, -1, -1, -1, -1, -1, -1, 141, 3, 03752 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 03753 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 03754 24, 25, 26, -1, -1, -1, 30, 31, 32, 33, 03755 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, 03756 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03757 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03758 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 03759 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03760 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03761 -1, 95, -1, -1, 98, -1, -1, -1, -1, -1, 03762 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 03763 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03764 124, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03765 -1, -1, -1, -1, -1, -1, -1, 141, 3, 4, 03766 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03767 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03768 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03769 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03770 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 03771 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03772 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03773 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03774 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03775 95, -1, -1, 98, -1, -1, -1, -1, -1, -1, 03776 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03777 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03778 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03779 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5, 03780 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 03781 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 03782 26, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03783 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 03784 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, 03785 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03786 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 03787 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 03788 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 03789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03790 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 03791 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 03792 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03793 12, -1, -1, -1, 16, 141, 18, 19, 20, 21, 03794 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03795 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03796 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03797 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03798 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 03799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03800 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03801 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03802 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03803 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03804 122, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03805 20, 21, 22, 23, 24, -1, -1, -1, 140, -1, 03806 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03807 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03808 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03809 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 03810 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03811 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03812 90, -1, 92, 93, -1, -1, -1, 97, 98, 99, 03813 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03814 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 03815 -1, -1, 122, 11, 12, -1, -1, -1, 16, -1, 03816 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03817 140, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03818 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03819 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03820 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03821 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03822 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03823 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03824 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03825 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 03826 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03827 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03828 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03829 39, -1, -1, -1, -1, -1, 45, 46, -1, 48, 03830 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03831 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03833 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03834 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03835 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03836 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03837 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03838 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03839 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03840 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03841 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03842 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03843 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03844 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03845 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, 03846 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03847 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03848 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03849 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03850 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03851 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03852 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03853 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03855 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03856 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03857 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03858 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03859 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03860 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03861 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03862 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03863 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 03864 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03866 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03867 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, 03868 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03869 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03870 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03871 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03872 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03873 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03874 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03875 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03877 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03878 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 03879 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03880 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03881 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03882 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03883 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03884 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03885 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03886 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03887 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03888 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03889 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03890 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03891 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, 03892 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03893 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03894 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03895 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03896 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03897 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03898 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03899 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03900 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03901 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03902 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, 03903 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03904 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03905 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03906 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03907 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03908 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03910 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03911 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03912 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03913 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, 03914 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03915 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03916 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03917 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03918 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03919 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03920 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03921 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03922 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03923 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03924 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, 03925 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03926 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03927 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03928 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03929 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03931 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03932 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03933 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03934 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03935 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03936 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03937 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03938 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03939 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03940 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03941 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03942 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03943 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03944 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03945 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03946 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03947 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03948 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03949 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03950 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03951 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03952 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03953 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03954 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, 03955 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03956 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03957 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03958 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03959 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03960 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03961 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03962 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03963 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03964 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03965 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, 03966 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03967 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03968 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03969 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03970 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03971 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03972 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03973 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03974 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03975 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03976 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03977 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03978 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03979 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03980 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03981 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03982 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03983 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03984 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03985 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03986 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03987 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, 03988 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03989 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03990 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03991 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03992 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03993 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03994 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03995 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03996 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03997 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03998 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03999 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04000 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 04001 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04002 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04003 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04004 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04005 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04006 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04007 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04008 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 04009 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 04010 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04011 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 04012 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04013 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04014 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04015 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04016 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04017 -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, 04018 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04019 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 04020 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04021 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 04022 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04023 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04024 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04025 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04026 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04028 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04029 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 04030 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 04031 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04032 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 04033 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04034 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04035 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04036 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04037 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04039 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04040 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 04041 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04042 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 04043 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04044 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04045 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04046 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04047 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04048 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04049 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04050 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 04051 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 04052 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04053 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 04054 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04055 34, 35, 36, -1, -1, 39, -1, 44, -1, -1, 04056 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04057 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04058 64, 68, 69, 70, 71, 72, 73, 74, 75, 76, 04059 77, 78, 79, 80, -1, -1, 83, 84, -1, -1, 04060 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04061 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 04062 -1, -1, -1, 110, -1, 112, 113, 114, 115, 116, 04063 117, 118, 119, 120, 121, -1, -1, -1, 122, -1, 04064 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04065 -1, -1, -1, 140, 66, 67, 68, 69, 70, 71, 04066 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04067 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04068 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04069 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04070 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04071 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04072 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04073 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04074 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04076 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04077 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04078 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04079 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04080 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04081 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04082 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04083 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04084 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04085 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04086 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04087 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04088 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04089 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04090 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04091 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04093 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04094 121, -1, 123, 124, -1, -1, -1, -1, 52, 53, 04095 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, 04096 141, 142, 66, 67, 68, 69, 70, 71, 72, 73, 04097 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04098 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04099 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 04100 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 04101 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 04102 124, -1, -1, -1, -1, 52, 53, -1, -1, 56, 04103 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66, 04104 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04105 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04106 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, 04107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04108 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 04109 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, 04110 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, 04111 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69, 04112 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04113 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04114 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1, 04115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04116 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 04117 120, 121, -1, 123, 124, -1, -1, -1, -1, 52, 04118 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, 04119 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72, 04120 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04121 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04122 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 04123 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 04124 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 04125 123, 124, -1, -1, -1, -1, 52, 53, -1, -1, 04126 56, -1, -1, -1, -1, -1, -1, -1, 141, 142, 04127 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04128 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04129 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04130 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04131 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 04132 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 04133 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, 04134 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68, 04135 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04136 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04137 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, 04138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04139 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 04140 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, 04141 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04142 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71, 04143 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04144 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04145 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04147 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04148 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04149 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04150 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04151 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04152 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04153 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04154 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04155 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04156 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04157 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04158 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04159 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04160 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04162 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04163 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04164 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04165 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04166 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04167 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04168 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04169 -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, 04170 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04171 121, 44, 123, 124, -1, -1, 68, 69, 70, 71, 04172 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 04173 141, 83, 84, -1, -1, 68, 69, 70, 71, 72, 04174 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 04175 83, 84, -1, -1, -1, -1, -1, -1, 110, -1, 04176 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04177 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 04178 113, 114, 115, 116, 117, 118, 119, 120, 121 04179 }; 04180 04181 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04182 symbol of state STATE-NUM. */ 04183 static const yytype_uint16 yystos[] = 04184 { 04185 0, 149, 150, 0, 1, 3, 4, 5, 6, 7, 04186 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04187 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04188 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04189 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04190 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, 04191 103, 122, 123, 124, 151, 152, 153, 158, 160, 161, 04192 163, 164, 167, 168, 170, 171, 172, 174, 175, 185, 04193 199, 216, 217, 218, 219, 220, 221, 222, 223, 224, 04194 225, 226, 249, 250, 260, 261, 262, 263, 264, 265, 04195 266, 269, 279, 281, 282, 283, 284, 285, 286, 287, 04196 310, 321, 153, 3, 4, 5, 6, 7, 8, 9, 04197 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 04198 20, 21, 22, 23, 24, 25, 26, 30, 31, 32, 04199 33, 34, 35, 36, 37, 38, 39, 45, 46, 47, 04200 48, 49, 50, 51, 52, 53, 56, 66, 67, 68, 04201 69, 70, 71, 72, 73, 74, 77, 78, 81, 82, 04202 83, 84, 95, 112, 113, 114, 115, 116, 117, 118, 04203 119, 120, 121, 123, 124, 141, 178, 179, 180, 181, 04204 183, 184, 279, 281, 39, 58, 86, 89, 95, 96, 04205 123, 167, 175, 185, 187, 192, 195, 197, 216, 283, 04206 284, 286, 287, 308, 309, 192, 192, 142, 193, 194, 04207 142, 189, 193, 142, 147, 315, 54, 180, 315, 154, 04208 136, 21, 22, 30, 31, 32, 185, 216, 310, 185, 04209 56, 1, 89, 156, 157, 158, 169, 170, 321, 161, 04210 188, 197, 308, 321, 187, 307, 308, 321, 46, 86, 04211 122, 140, 174, 199, 216, 283, 284, 287, 242, 243, 04212 54, 55, 57, 178, 272, 280, 271, 272, 273, 146, 04213 267, 146, 270, 59, 60, 163, 185, 185, 145, 147, 04214 314, 319, 320, 40, 41, 42, 43, 44, 37, 38, 04215 28, 247, 109, 140, 89, 95, 171, 109, 68, 69, 04216 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 04217 80, 83, 84, 110, 112, 113, 114, 115, 116, 117, 04218 118, 119, 120, 121, 85, 138, 139, 200, 161, 162, 04219 162, 203, 205, 162, 314, 320, 86, 168, 175, 216, 04220 232, 283, 284, 287, 52, 56, 83, 86, 176, 177, 04221 216, 283, 284, 287, 177, 33, 34, 35, 36, 49, 04222 50, 51, 52, 56, 142, 178, 285, 305, 85, 139, 04223 26, 136, 251, 263, 87, 87, 189, 193, 251, 140, 04224 187, 56, 187, 187, 109, 88, 140, 196, 321, 85, 04225 138, 139, 87, 87, 140, 196, 192, 315, 316, 192, 04226 191, 192, 197, 308, 321, 161, 316, 161, 54, 63, 04227 64, 159, 142, 186, 136, 156, 85, 139, 87, 158, 04228 169, 143, 314, 320, 316, 201, 144, 140, 147, 318, 04229 140, 318, 137, 318, 315, 56, 59, 60, 171, 173, 04230 140, 85, 138, 139, 244, 61, 104, 105, 106, 274, 04231 106, 274, 106, 65, 274, 106, 106, 268, 274, 106, 04232 61, 106, 68, 68, 145, 153, 162, 162, 162, 162, 04233 158, 161, 161, 248, 95, 163, 187, 197, 198, 169, 04234 140, 174, 140, 160, 163, 175, 185, 187, 198, 185, 04235 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04236 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04237 185, 185, 185, 185, 185, 52, 53, 56, 183, 189, 04238 311, 312, 191, 52, 53, 56, 183, 189, 311, 155, 04239 156, 13, 228, 319, 228, 162, 162, 314, 17, 254, 04240 56, 85, 138, 139, 25, 161, 52, 56, 176, 1, 04241 113, 288, 319, 85, 138, 139, 212, 306, 213, 85, 04242 139, 313, 52, 56, 311, 311, 253, 252, 163, 185, 04243 163, 185, 94, 165, 182, 185, 187, 95, 187, 195, 04244 308, 52, 56, 191, 52, 56, 309, 316, 143, 316, 04245 140, 140, 316, 180, 202, 185, 151, 137, 311, 311, 04246 185, 316, 158, 316, 308, 140, 173, 52, 56, 191, 04247 52, 56, 52, 54, 55, 56, 57, 89, 95, 96, 04248 116, 119, 142, 245, 291, 292, 293, 294, 295, 296, 04249 299, 300, 301, 302, 303, 276, 275, 146, 274, 146, 04250 185, 185, 76, 114, 237, 238, 321, 187, 140, 316, 04251 173, 140, 109, 44, 315, 87, 87, 189, 193, 315, 04252 317, 87, 87, 189, 190, 193, 321, 10, 227, 8, 04253 256, 321, 156, 13, 156, 27, 229, 319, 229, 254, 04254 197, 227, 52, 56, 191, 52, 56, 207, 210, 319, 04255 289, 209, 52, 56, 176, 191, 155, 161, 142, 290, 04256 291, 214, 190, 193, 190, 193, 237, 237, 44, 166, 04257 180, 187, 196, 87, 87, 317, 87, 87, 308, 161, 04258 137, 318, 171, 317, 109, 52, 89, 95, 233, 234, 04259 235, 293, 291, 29, 107, 246, 140, 304, 321, 140, 04260 304, 52, 140, 304, 52, 277, 54, 55, 57, 278, 04261 287, 52, 145, 236, 239, 295, 297, 298, 301, 303, 04262 321, 156, 95, 187, 173, 185, 111, 163, 185, 163, 04263 185, 165, 144, 87, 163, 185, 163, 185, 165, 187, 04264 198, 257, 321, 15, 231, 321, 14, 230, 231, 231, 04265 204, 206, 227, 140, 228, 317, 162, 319, 162, 155, 04266 317, 227, 316, 291, 155, 319, 178, 156, 156, 185, 04267 237, 87, 140, 316, 187, 235, 140, 293, 140, 316, 04268 239, 156, 156, 294, 299, 301, 303, 295, 296, 301, 04269 295, 156, 109, 52, 240, 241, 292, 239, 114, 140, 04270 304, 140, 304, 140, 304, 10, 187, 185, 163, 185, 04271 88, 258, 321, 156, 9, 259, 321, 162, 227, 227, 04272 156, 156, 187, 156, 229, 211, 319, 227, 316, 227, 04273 215, 10, 137, 156, 316, 234, 140, 95, 233, 316, 04274 10, 137, 140, 304, 140, 304, 140, 304, 140, 304, 04275 304, 137, 86, 216, 140, 114, 298, 301, 295, 297, 04276 301, 295, 86, 175, 216, 283, 284, 287, 228, 156, 04277 228, 227, 227, 231, 254, 255, 208, 155, 290, 137, 04278 140, 234, 140, 293, 295, 301, 295, 295, 56, 85, 04279 241, 140, 304, 140, 304, 304, 140, 304, 304, 56, 04280 85, 138, 139, 156, 156, 156, 227, 155, 234, 140, 04281 304, 140, 304, 304, 304, 52, 56, 295, 301, 295, 04282 295, 52, 56, 191, 52, 56, 256, 230, 227, 227, 04283 234, 295, 304, 140, 304, 304, 304, 317, 304, 295, 04284 304 04285 }; 04286 04287 #define yyerrok (yyerrstatus = 0) 04288 #define yyclearin (yychar = YYEMPTY) 04289 #define YYEMPTY (-2) 04290 #define YYEOF 0 04291 04292 #define YYACCEPT goto yyacceptlab 04293 #define YYABORT goto yyabortlab 04294 #define YYERROR goto yyerrorlab 04295 04296 04297 /* Like YYERROR except do call yyerror. This remains here temporarily 04298 to ease the transition to the new meaning of YYERROR, for GCC. 04299 Once GCC version 2 has supplanted version 1, this can go. */ 04300 04301 #define YYFAIL goto yyerrlab 04302 04303 #define YYRECOVERING() (!!yyerrstatus) 04304 04305 #define YYBACKUP(Token, Value) \ 04306 do \ 04307 if (yychar == YYEMPTY && yylen == 1) \ 04308 { \ 04309 yychar = (Token); \ 04310 yylval = (Value); \ 04311 yytoken = YYTRANSLATE (yychar); \ 04312 YYPOPSTACK (1); \ 04313 goto yybackup; \ 04314 } \ 04315 else \ 04316 { \ 04317 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04318 YYERROR; \ 04319 } \ 04320 while (YYID (0)) 04321 04322 04323 #define YYTERROR 1 04324 #define YYERRCODE 256 04325 04326 04327 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04328 If N is 0, then set CURRENT to the empty location which ends 04329 the previous symbol: RHS[0] (always defined). */ 04330 04331 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04332 #ifndef YYLLOC_DEFAULT 04333 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04334 do \ 04335 if (YYID (N)) \ 04336 { \ 04337 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04338 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04339 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04340 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04341 } \ 04342 else \ 04343 { \ 04344 (Current).first_line = (Current).last_line = \ 04345 YYRHSLOC (Rhs, 0).last_line; \ 04346 (Current).first_column = (Current).last_column = \ 04347 YYRHSLOC (Rhs, 0).last_column; \ 04348 } \ 04349 while (YYID (0)) 04350 #endif 04351 04352 04353 /* YY_LOCATION_PRINT -- Print the location on the stream. 04354 This macro was not mandated originally: define only if we know 04355 we won't break user code: when these are the locations we know. */ 04356 04357 #ifndef YY_LOCATION_PRINT 04358 # if YYLTYPE_IS_TRIVIAL 04359 # define YY_LOCATION_PRINT(File, Loc) \ 04360 fprintf (File, "%d.%d-%d.%d", \ 04361 (Loc).first_line, (Loc).first_column, \ 04362 (Loc).last_line, (Loc).last_column) 04363 # else 04364 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04365 # endif 04366 #endif 04367 04368 04369 /* YYLEX -- calling `yylex' with the right arguments. */ 04370 04371 #ifdef YYLEX_PARAM 04372 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04373 #else 04374 # define YYLEX yylex (&yylval) 04375 #endif 04376 04377 /* Enable debugging if requested. */ 04378 #if YYDEBUG 04379 04380 # ifndef YYFPRINTF 04381 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04382 # define YYFPRINTF fprintf 04383 # endif 04384 04385 # define YYDPRINTF(Args) \ 04386 do { \ 04387 if (yydebug) \ 04388 YYFPRINTF Args; \ 04389 } while (YYID (0)) 04390 04391 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04392 do { \ 04393 if (yydebug) \ 04394 { \ 04395 YYFPRINTF (stderr, "%s ", Title); \ 04396 yy_symbol_print (stderr, \ 04397 Type, Value, parser); \ 04398 YYFPRINTF (stderr, "\n"); \ 04399 } \ 04400 } while (YYID (0)) 04401 04402 04403 /*--------------------------------. 04404 | Print this symbol on YYOUTPUT. | 04405 `--------------------------------*/ 04406 04407 /*ARGSUSED*/ 04408 #if (defined __STDC__ || defined __C99__FUNC__ \ 04409 || defined __cplusplus || defined _MSC_VER) 04410 static void 04411 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04412 #else 04413 static void 04414 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04415 FILE *yyoutput; 04416 int yytype; 04417 YYSTYPE const * const yyvaluep; 04418 struct parser_params *parser; 04419 #endif 04420 { 04421 if (!yyvaluep) 04422 return; 04423 YYUSE (parser); 04424 # ifdef YYPRINT 04425 if (yytype < YYNTOKENS) 04426 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04427 # else 04428 YYUSE (yyoutput); 04429 # endif 04430 switch (yytype) 04431 { 04432 default: 04433 break; 04434 } 04435 } 04436 04437 04438 /*--------------------------------. 04439 | Print this symbol on YYOUTPUT. | 04440 `--------------------------------*/ 04441 04442 #if (defined __STDC__ || defined __C99__FUNC__ \ 04443 || defined __cplusplus || defined _MSC_VER) 04444 static void 04445 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04446 #else 04447 static void 04448 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04449 FILE *yyoutput; 04450 int yytype; 04451 YYSTYPE const * const yyvaluep; 04452 struct parser_params *parser; 04453 #endif 04454 { 04455 if (yytype < YYNTOKENS) 04456 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04457 else 04458 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04459 04460 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04461 YYFPRINTF (yyoutput, ")"); 04462 } 04463 04464 /*------------------------------------------------------------------. 04465 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04466 | TOP (included). | 04467 `------------------------------------------------------------------*/ 04468 04469 #if (defined __STDC__ || defined __C99__FUNC__ \ 04470 || defined __cplusplus || defined _MSC_VER) 04471 static void 04472 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 04473 #else 04474 static void 04475 yy_stack_print (bottom, top) 04476 yytype_int16 *bottom; 04477 yytype_int16 *top; 04478 #endif 04479 { 04480 YYFPRINTF (stderr, "Stack now"); 04481 for (; bottom <= top; ++bottom) 04482 YYFPRINTF (stderr, " %d", *bottom); 04483 YYFPRINTF (stderr, "\n"); 04484 } 04485 04486 # define YY_STACK_PRINT(Bottom, Top) \ 04487 do { \ 04488 if (yydebug) \ 04489 yy_stack_print ((Bottom), (Top)); \ 04490 } while (YYID (0)) 04491 04492 04493 /*------------------------------------------------. 04494 | Report that the YYRULE is going to be reduced. | 04495 `------------------------------------------------*/ 04496 04497 #if (defined __STDC__ || defined __C99__FUNC__ \ 04498 || defined __cplusplus || defined _MSC_VER) 04499 static void 04500 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04501 #else 04502 static void 04503 yy_reduce_print (yyvsp, yyrule, parser) 04504 YYSTYPE *yyvsp; 04505 int yyrule; 04506 struct parser_params *parser; 04507 #endif 04508 { 04509 int yynrhs = yyr2[yyrule]; 04510 int yyi; 04511 unsigned long int yylno = yyrline[yyrule]; 04512 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04513 yyrule - 1, yylno); 04514 /* The symbols being reduced. */ 04515 for (yyi = 0; yyi < yynrhs; yyi++) 04516 { 04517 fprintf (stderr, " $%d = ", yyi + 1); 04518 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04519 &(yyvsp[(yyi + 1) - (yynrhs)]) 04520 , parser); 04521 fprintf (stderr, "\n"); 04522 } 04523 } 04524 04525 # define YY_REDUCE_PRINT(Rule) \ 04526 do { \ 04527 if (yydebug) \ 04528 yy_reduce_print (yyvsp, Rule, parser); \ 04529 } while (YYID (0)) 04530 04531 /* Nonzero means print parse trace. It is left uninitialized so that 04532 multiple parsers can coexist. */ 04533 #ifndef yydebug 04534 int yydebug; 04535 #endif 04536 #else /* !YYDEBUG */ 04537 # define YYDPRINTF(Args) 04538 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04539 # define YY_STACK_PRINT(Bottom, Top) 04540 # define YY_REDUCE_PRINT(Rule) 04541 #endif /* !YYDEBUG */ 04542 04543 04544 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04545 #ifndef YYINITDEPTH 04546 # define YYINITDEPTH 200 04547 #endif 04548 04549 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04550 if the built-in stack extension method is used). 04551 04552 Do not make this value too large; the results are undefined if 04553 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04554 evaluated with infinite-precision integer arithmetic. */ 04555 04556 #ifndef YYMAXDEPTH 04557 # define YYMAXDEPTH 10000 04558 #endif 04559 04560 04561 04562 #if YYERROR_VERBOSE 04563 04564 # ifndef yystrlen 04565 # if defined __GLIBC__ && defined _STRING_H 04566 # define yystrlen strlen 04567 # else 04568 /* Return the length of YYSTR. */ 04569 #if (defined __STDC__ || defined __C99__FUNC__ \ 04570 || defined __cplusplus || defined _MSC_VER) 04571 static YYSIZE_T 04572 yystrlen (const char *yystr) 04573 #else 04574 static YYSIZE_T 04575 yystrlen (yystr) 04576 const char *yystr; 04577 #endif 04578 { 04579 YYSIZE_T yylen; 04580 for (yylen = 0; yystr[yylen]; yylen++) 04581 continue; 04582 return yylen; 04583 } 04584 # endif 04585 # endif 04586 04587 # ifndef yystpcpy 04588 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04589 # define yystpcpy stpcpy 04590 # else 04591 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04592 YYDEST. */ 04593 #if (defined __STDC__ || defined __C99__FUNC__ \ 04594 || defined __cplusplus || defined _MSC_VER) 04595 static char * 04596 yystpcpy (char *yydest, const char *yysrc) 04597 #else 04598 static char * 04599 yystpcpy (yydest, yysrc) 04600 char *yydest; 04601 const char *yysrc; 04602 #endif 04603 { 04604 char *yyd = yydest; 04605 const char *yys = yysrc; 04606 04607 while ((*yyd++ = *yys++) != '\0') 04608 continue; 04609 04610 return yyd - 1; 04611 } 04612 # endif 04613 # endif 04614 04615 # ifndef yytnamerr 04616 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04617 quotes and backslashes, so that it's suitable for yyerror. The 04618 heuristic is that double-quoting is unnecessary unless the string 04619 contains an apostrophe, a comma, or backslash (other than 04620 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04621 null, do not copy; instead, return the length of what the result 04622 would have been. */ 04623 static YYSIZE_T 04624 yytnamerr (char *yyres, const char *yystr) 04625 { 04626 if (*yystr == '"') 04627 { 04628 YYSIZE_T yyn = 0; 04629 char const *yyp = yystr; 04630 04631 for (;;) 04632 switch (*++yyp) 04633 { 04634 case '\'': 04635 case ',': 04636 goto do_not_strip_quotes; 04637 04638 case '\\': 04639 if (*++yyp != '\\') 04640 goto do_not_strip_quotes; 04641 /* Fall through. */ 04642 default: 04643 if (yyres) 04644 yyres[yyn] = *yyp; 04645 yyn++; 04646 break; 04647 04648 case '"': 04649 if (yyres) 04650 yyres[yyn] = '\0'; 04651 return yyn; 04652 } 04653 do_not_strip_quotes: ; 04654 } 04655 04656 if (! yyres) 04657 return yystrlen (yystr); 04658 04659 return yystpcpy (yyres, yystr) - yyres; 04660 } 04661 # endif 04662 04663 /* Copy into YYRESULT an error message about the unexpected token 04664 YYCHAR while in state YYSTATE. Return the number of bytes copied, 04665 including the terminating null byte. If YYRESULT is null, do not 04666 copy anything; just return the number of bytes that would be 04667 copied. As a special case, return 0 if an ordinary "syntax error" 04668 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 04669 size calculation. */ 04670 static YYSIZE_T 04671 yysyntax_error (char *yyresult, int yystate, int yychar) 04672 { 04673 int yyn = yypact[yystate]; 04674 04675 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 04676 return 0; 04677 else 04678 { 04679 int yytype = YYTRANSLATE (yychar); 04680 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 04681 YYSIZE_T yysize = yysize0; 04682 YYSIZE_T yysize1; 04683 int yysize_overflow = 0; 04684 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04685 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04686 int yyx; 04687 04688 # if 0 04689 /* This is so xgettext sees the translatable formats that are 04690 constructed on the fly. */ 04691 YY_("syntax error, unexpected %s"); 04692 YY_("syntax error, unexpected %s, expecting %s"); 04693 YY_("syntax error, unexpected %s, expecting %s or %s"); 04694 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 04695 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 04696 # endif 04697 char *yyfmt; 04698 char const *yyf; 04699 static char const yyunexpected[] = "syntax error, unexpected %s"; 04700 static char const yyexpecting[] = ", expecting %s"; 04701 static char const yyor[] = " or %s"; 04702 char yyformat[sizeof yyunexpected 04703 + sizeof yyexpecting - 1 04704 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 04705 * (sizeof yyor - 1))]; 04706 char const *yyprefix = yyexpecting; 04707 04708 /* Start YYX at -YYN if negative to avoid negative indexes in 04709 YYCHECK. */ 04710 int yyxbegin = yyn < 0 ? -yyn : 0; 04711 04712 /* Stay within bounds of both yycheck and yytname. */ 04713 int yychecklim = YYLAST - yyn + 1; 04714 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04715 int yycount = 1; 04716 04717 yyarg[0] = yytname[yytype]; 04718 yyfmt = yystpcpy (yyformat, yyunexpected); 04719 04720 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04721 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 04722 { 04723 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04724 { 04725 yycount = 1; 04726 yysize = yysize0; 04727 yyformat[sizeof yyunexpected - 1] = '\0'; 04728 break; 04729 } 04730 yyarg[yycount++] = yytname[yyx]; 04731 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04732 yysize_overflow |= (yysize1 < yysize); 04733 yysize = yysize1; 04734 yyfmt = yystpcpy (yyfmt, yyprefix); 04735 yyprefix = yyor; 04736 } 04737 04738 yyf = YY_(yyformat); 04739 yysize1 = yysize + yystrlen (yyf); 04740 yysize_overflow |= (yysize1 < yysize); 04741 yysize = yysize1; 04742 04743 if (yysize_overflow) 04744 return YYSIZE_MAXIMUM; 04745 04746 if (yyresult) 04747 { 04748 /* Avoid sprintf, as that infringes on the user's name space. 04749 Don't have undefined behavior even if the translation 04750 produced a string with the wrong number of "%s"s. */ 04751 char *yyp = yyresult; 04752 int yyi = 0; 04753 while ((*yyp = *yyf) != '\0') 04754 { 04755 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 04756 { 04757 yyp += yytnamerr (yyp, yyarg[yyi++]); 04758 yyf += 2; 04759 } 04760 else 04761 { 04762 yyp++; 04763 yyf++; 04764 } 04765 } 04766 } 04767 return yysize; 04768 } 04769 } 04770 #endif /* YYERROR_VERBOSE */ 04771 04772 04773 /*-----------------------------------------------. 04774 | Release the memory associated to this symbol. | 04775 `-----------------------------------------------*/ 04776 04777 /*ARGSUSED*/ 04778 #if (defined __STDC__ || defined __C99__FUNC__ \ 04779 || defined __cplusplus || defined _MSC_VER) 04780 static void 04781 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04782 #else 04783 static void 04784 yydestruct (yymsg, yytype, yyvaluep, parser) 04785 const char *yymsg; 04786 int yytype; 04787 YYSTYPE *yyvaluep; 04788 struct parser_params *parser; 04789 #endif 04790 { 04791 YYUSE (yyvaluep); 04792 YYUSE (parser); 04793 04794 if (!yymsg) 04795 yymsg = "Deleting"; 04796 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04797 04798 switch (yytype) 04799 { 04800 04801 default: 04802 break; 04803 } 04804 } 04805 04806 04807 /* Prevent warnings from -Wmissing-prototypes. */ 04808 04809 #ifdef YYPARSE_PARAM 04810 #if defined __STDC__ || defined __cplusplus 04811 int yyparse (void *YYPARSE_PARAM); 04812 #else 04813 int yyparse (); 04814 #endif 04815 #else /* ! YYPARSE_PARAM */ 04816 #if defined __STDC__ || defined __cplusplus 04817 int yyparse (struct parser_params *parser); 04818 #else 04819 int yyparse (); 04820 #endif 04821 #endif /* ! YYPARSE_PARAM */ 04822 04823 04824 04825 04826 04827 04828 /*----------. 04829 | yyparse. | 04830 `----------*/ 04831 04832 #ifdef YYPARSE_PARAM 04833 #if (defined __STDC__ || defined __C99__FUNC__ \ 04834 || defined __cplusplus || defined _MSC_VER) 04835 int 04836 yyparse (void *YYPARSE_PARAM) 04837 #else 04838 int 04839 yyparse (YYPARSE_PARAM) 04840 void *YYPARSE_PARAM; 04841 #endif 04842 #else /* ! YYPARSE_PARAM */ 04843 #if (defined __STDC__ || defined __C99__FUNC__ \ 04844 || defined __cplusplus || defined _MSC_VER) 04845 int 04846 yyparse (struct parser_params *parser) 04847 #else 04848 int 04849 yyparse (parser) 04850 struct parser_params *parser; 04851 #endif 04852 #endif 04853 { 04854 /* The look-ahead symbol. */ 04855 int yychar; 04856 04857 /* The semantic value of the look-ahead symbol. */ 04858 YYSTYPE yylval; 04859 04860 /* Number of syntax errors so far. */ 04861 int yynerrs; 04862 04863 int yystate; 04864 int yyn; 04865 int yyresult; 04866 /* Number of tokens to shift before error messages enabled. */ 04867 int yyerrstatus; 04868 /* Look-ahead token as an internal (translated) token number. */ 04869 int yytoken = 0; 04870 #if YYERROR_VERBOSE 04871 /* Buffer for error messages, and its allocated size. */ 04872 char yymsgbuf[128]; 04873 char *yymsg = yymsgbuf; 04874 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 04875 #endif 04876 04877 /* Three stacks and their tools: 04878 `yyss': related to states, 04879 `yyvs': related to semantic values, 04880 `yyls': related to locations. 04881 04882 Refer to the stacks thru separate pointers, to allow yyoverflow 04883 to reallocate them elsewhere. */ 04884 04885 /* The state stack. */ 04886 yytype_int16 yyssa[YYINITDEPTH]; 04887 yytype_int16 *yyss = yyssa; 04888 yytype_int16 *yyssp; 04889 04890 /* The semantic value stack. */ 04891 YYSTYPE yyvsa[YYINITDEPTH]; 04892 YYSTYPE *yyvs = yyvsa; 04893 YYSTYPE *yyvsp; 04894 04895 04896 04897 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 04898 04899 YYSIZE_T yystacksize = YYINITDEPTH; 04900 04901 /* The variables used to return semantic value and location from the 04902 action routines. */ 04903 YYSTYPE yyval; 04904 04905 04906 /* The number of symbols on the RHS of the reduced rule. 04907 Keep to zero when no symbol should be popped. */ 04908 int yylen = 0; 04909 04910 YYDPRINTF ((stderr, "Starting parse\n")); 04911 04912 yystate = 0; 04913 yyerrstatus = 0; 04914 yynerrs = 0; 04915 yychar = YYEMPTY; /* Cause a token to be read. */ 04916 04917 /* Initialize stack pointers. 04918 Waste one element of value and location stack 04919 so that they stay on the same level as the state stack. 04920 The wasted elements are never initialized. */ 04921 04922 yyssp = yyss; 04923 yyvsp = yyvs; 04924 04925 goto yysetstate; 04926 04927 /*------------------------------------------------------------. 04928 | yynewstate -- Push a new state, which is found in yystate. | 04929 `------------------------------------------------------------*/ 04930 yynewstate: 04931 /* In all cases, when you get here, the value and location stacks 04932 have just been pushed. So pushing a state here evens the stacks. */ 04933 yyssp++; 04934 04935 yysetstate: 04936 *yyssp = yystate; 04937 04938 if (yyss + yystacksize - 1 <= yyssp) 04939 { 04940 /* Get the current used size of the three stacks, in elements. */ 04941 YYSIZE_T yysize = yyssp - yyss + 1; 04942 04943 #ifdef yyoverflow 04944 { 04945 /* Give user a chance to reallocate the stack. Use copies of 04946 these so that the &'s don't force the real ones into 04947 memory. */ 04948 YYSTYPE *yyvs1 = yyvs; 04949 yytype_int16 *yyss1 = yyss; 04950 04951 04952 /* Each stack pointer address is followed by the size of the 04953 data in use in that stack, in bytes. This used to be a 04954 conditional around just the two extra args, but that might 04955 be undefined if yyoverflow is a macro. */ 04956 yyoverflow (YY_("memory exhausted"), 04957 &yyss1, yysize * sizeof (*yyssp), 04958 &yyvs1, yysize * sizeof (*yyvsp), 04959 04960 &yystacksize); 04961 04962 yyss = yyss1; 04963 yyvs = yyvs1; 04964 } 04965 #else /* no yyoverflow */ 04966 # ifndef YYSTACK_RELOCATE 04967 goto yyexhaustedlab; 04968 # else 04969 /* Extend the stack our own way. */ 04970 if (YYMAXDEPTH <= yystacksize) 04971 goto yyexhaustedlab; 04972 yystacksize *= 2; 04973 if (YYMAXDEPTH < yystacksize) 04974 yystacksize = YYMAXDEPTH; 04975 04976 { 04977 yytype_int16 *yyss1 = yyss; 04978 union yyalloc *yyptr = 04979 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 04980 if (! yyptr) 04981 goto yyexhaustedlab; 04982 YYSTACK_RELOCATE (yyss); 04983 YYSTACK_RELOCATE (yyvs); 04984 04985 # undef YYSTACK_RELOCATE 04986 if (yyss1 != yyssa) 04987 YYSTACK_FREE (yyss1); 04988 } 04989 # endif 04990 #endif /* no yyoverflow */ 04991 04992 yyssp = yyss + yysize - 1; 04993 yyvsp = yyvs + yysize - 1; 04994 04995 04996 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 04997 (unsigned long int) yystacksize)); 04998 04999 if (yyss + yystacksize - 1 <= yyssp) 05000 YYABORT; 05001 } 05002 05003 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 05004 05005 goto yybackup; 05006 05007 /*-----------. 05008 | yybackup. | 05009 `-----------*/ 05010 yybackup: 05011 05012 /* Do appropriate processing given the current state. Read a 05013 look-ahead token if we need one and don't already have one. */ 05014 05015 /* First try to decide what to do without reference to look-ahead token. */ 05016 yyn = yypact[yystate]; 05017 if (yyn == YYPACT_NINF) 05018 goto yydefault; 05019 05020 /* Not known => get a look-ahead token if don't already have one. */ 05021 05022 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 05023 if (yychar == YYEMPTY) 05024 { 05025 YYDPRINTF ((stderr, "Reading a token: ")); 05026 yychar = YYLEX; 05027 } 05028 05029 if (yychar <= YYEOF) 05030 { 05031 yychar = yytoken = YYEOF; 05032 YYDPRINTF ((stderr, "Now at end of input.\n")); 05033 } 05034 else 05035 { 05036 yytoken = YYTRANSLATE (yychar); 05037 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 05038 } 05039 05040 /* If the proper action on seeing token YYTOKEN is to reduce or to 05041 detect an error, take that action. */ 05042 yyn += yytoken; 05043 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 05044 goto yydefault; 05045 yyn = yytable[yyn]; 05046 if (yyn <= 0) 05047 { 05048 if (yyn == 0 || yyn == YYTABLE_NINF) 05049 goto yyerrlab; 05050 yyn = -yyn; 05051 goto yyreduce; 05052 } 05053 05054 if (yyn == YYFINAL) 05055 YYACCEPT; 05056 05057 /* Count tokens shifted since error; after three, turn off error 05058 status. */ 05059 if (yyerrstatus) 05060 yyerrstatus--; 05061 05062 /* Shift the look-ahead token. */ 05063 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 05064 05065 /* Discard the shifted token unless it is eof. */ 05066 if (yychar != YYEOF) 05067 yychar = YYEMPTY; 05068 05069 yystate = yyn; 05070 *++yyvsp = yylval; 05071 05072 goto yynewstate; 05073 05074 05075 /*-----------------------------------------------------------. 05076 | yydefault -- do the default action for the current state. | 05077 `-----------------------------------------------------------*/ 05078 yydefault: 05079 yyn = yydefact[yystate]; 05080 if (yyn == 0) 05081 goto yyerrlab; 05082 goto yyreduce; 05083 05084 05085 /*-----------------------------. 05086 | yyreduce -- Do a reduction. | 05087 `-----------------------------*/ 05088 yyreduce: 05089 /* yyn is the number of a rule to reduce with. */ 05090 yylen = yyr2[yyn]; 05091 05092 /* If YYLEN is nonzero, implement the default value of the action: 05093 `$$ = $1'. 05094 05095 Otherwise, the following line sets YYVAL to garbage. 05096 This behavior is undocumented and Bison 05097 users should not rely upon it. Assigning to YYVAL 05098 unconditionally makes the parser a bit smaller, and it avoids a 05099 GCC warning that YYVAL may be used uninitialized. */ 05100 yyval = yyvsp[1-yylen]; 05101 05102 05103 YY_REDUCE_PRINT (yyn); 05104 switch (yyn) 05105 { 05106 case 2: 05107 #line 782 "parse.y" 05108 { 05109 lex_state = EXPR_BEG; 05110 /*%%%*/ 05111 local_push(compile_for_eval || rb_parse_in_main()); 05112 /*% 05113 local_push(0); 05114 %*/ 05115 ;} 05116 break; 05117 05118 case 3: 05119 #line 791 "parse.y" 05120 { 05121 /*%%%*/ 05122 if ((yyvsp[(2) - (2)].node) && !compile_for_eval) { 05123 /* last expression should not be void */ 05124 if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node)); 05125 else { 05126 NODE *node = (yyvsp[(2) - (2)].node); 05127 while (node->nd_next) { 05128 node = node->nd_next; 05129 } 05130 void_expr(node->nd_head); 05131 } 05132 } 05133 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node))); 05134 /*% 05135 $$ = $2; 05136 parser->result = dispatch1(program, $$); 05137 %*/ 05138 local_pop(); 05139 ;} 05140 break; 05141 05142 case 4: 05143 #line 814 "parse.y" 05144 { 05145 /*%%%*/ 05146 void_stmts((yyvsp[(1) - (2)].node)); 05147 fixup_nodes(&deferred_nodes); 05148 /*% 05149 %*/ 05150 (yyval.node) = (yyvsp[(1) - (2)].node); 05151 ;} 05152 break; 05153 05154 case 5: 05155 #line 825 "parse.y" 05156 { 05157 /*%%%*/ 05158 (yyval.node) = NEW_BEGIN(0); 05159 /*% 05160 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05161 dispatch0(void_stmt)); 05162 %*/ 05163 ;} 05164 break; 05165 05166 case 6: 05167 #line 834 "parse.y" 05168 { 05169 /*%%%*/ 05170 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05171 /*% 05172 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05173 %*/ 05174 ;} 05175 break; 05176 05177 case 7: 05178 #line 842 "parse.y" 05179 { 05180 /*%%%*/ 05181 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05182 /*% 05183 $$ = dispatch2(stmts_add, $1, $3); 05184 %*/ 05185 ;} 05186 break; 05187 05188 case 8: 05189 #line 850 "parse.y" 05190 { 05191 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05192 ;} 05193 break; 05194 05195 case 10: 05196 #line 857 "parse.y" 05197 { 05198 if (in_def || in_single) { 05199 yyerror("BEGIN in method"); 05200 } 05201 /*%%%*/ 05202 /* local_push(0); */ 05203 /*% 05204 %*/ 05205 ;} 05206 break; 05207 05208 case 11: 05209 #line 867 "parse.y" 05210 { 05211 /*%%%*/ 05212 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05213 (yyvsp[(4) - (5)].node)); 05214 /* NEW_PREEXE($4)); */ 05215 /* local_pop(); */ 05216 (yyval.node) = NEW_BEGIN(0); 05217 /*% 05218 $$ = dispatch1(BEGIN, $4); 05219 %*/ 05220 ;} 05221 break; 05222 05223 case 12: 05224 #line 884 "parse.y" 05225 { 05226 /*%%%*/ 05227 (yyval.node) = (yyvsp[(1) - (4)].node); 05228 if ((yyvsp[(2) - (4)].node)) { 05229 (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node)); 05230 } 05231 else if ((yyvsp[(3) - (4)].node)) { 05232 rb_warn0("else without rescue is useless"); 05233 (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node)); 05234 } 05235 if ((yyvsp[(4) - (4)].node)) { 05236 if ((yyval.node)) { 05237 (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node)); 05238 } 05239 else { 05240 (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL()); 05241 } 05242 } 05243 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05244 /*% 05245 $$ = dispatch4(bodystmt, 05246 escape_Qundef($1), 05247 escape_Qundef($2), 05248 escape_Qundef($3), 05249 escape_Qundef($4)); 05250 %*/ 05251 ;} 05252 break; 05253 05254 case 13: 05255 #line 914 "parse.y" 05256 { 05257 /*%%%*/ 05258 void_stmts((yyvsp[(1) - (2)].node)); 05259 fixup_nodes(&deferred_nodes); 05260 /*% 05261 %*/ 05262 (yyval.node) = (yyvsp[(1) - (2)].node); 05263 ;} 05264 break; 05265 05266 case 14: 05267 #line 925 "parse.y" 05268 { 05269 /*%%%*/ 05270 (yyval.node) = NEW_BEGIN(0); 05271 /*% 05272 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05273 dispatch0(void_stmt)); 05274 %*/ 05275 ;} 05276 break; 05277 05278 case 15: 05279 #line 934 "parse.y" 05280 { 05281 /*%%%*/ 05282 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05283 /*% 05284 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05285 %*/ 05286 ;} 05287 break; 05288 05289 case 16: 05290 #line 942 "parse.y" 05291 { 05292 /*%%%*/ 05293 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05294 /*% 05295 $$ = dispatch2(stmts_add, $1, $3); 05296 %*/ 05297 ;} 05298 break; 05299 05300 case 17: 05301 #line 950 "parse.y" 05302 { 05303 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05304 ;} 05305 break; 05306 05307 case 18: 05308 #line 955 "parse.y" 05309 {lex_state = EXPR_FNAME;;} 05310 break; 05311 05312 case 19: 05313 #line 956 "parse.y" 05314 { 05315 /*%%%*/ 05316 (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); 05317 /*% 05318 $$ = dispatch2(alias, $2, $4); 05319 %*/ 05320 ;} 05321 break; 05322 05323 case 20: 05324 #line 964 "parse.y" 05325 { 05326 /*%%%*/ 05327 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id)); 05328 /*% 05329 $$ = dispatch2(var_alias, $2, $3); 05330 %*/ 05331 ;} 05332 break; 05333 05334 case 21: 05335 #line 972 "parse.y" 05336 { 05337 /*%%%*/ 05338 char buf[2]; 05339 buf[0] = '$'; 05340 buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth; 05341 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2)); 05342 /*% 05343 $$ = dispatch2(var_alias, $2, $3); 05344 %*/ 05345 ;} 05346 break; 05347 05348 case 22: 05349 #line 983 "parse.y" 05350 { 05351 /*%%%*/ 05352 yyerror("can't make alias for the number variables"); 05353 (yyval.node) = NEW_BEGIN(0); 05354 /*% 05355 $$ = dispatch2(var_alias, $2, $3); 05356 $$ = dispatch1(alias_error, $$); 05357 %*/ 05358 ;} 05359 break; 05360 05361 case 23: 05362 #line 993 "parse.y" 05363 { 05364 /*%%%*/ 05365 (yyval.node) = (yyvsp[(2) - (2)].node); 05366 /*% 05367 $$ = dispatch1(undef, $2); 05368 %*/ 05369 ;} 05370 break; 05371 05372 case 24: 05373 #line 1001 "parse.y" 05374 { 05375 /*%%%*/ 05376 (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05377 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05378 /*% 05379 $$ = dispatch2(if_mod, $3, $1); 05380 %*/ 05381 ;} 05382 break; 05383 05384 case 25: 05385 #line 1010 "parse.y" 05386 { 05387 /*%%%*/ 05388 (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05389 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05390 /*% 05391 $$ = dispatch2(unless_mod, $3, $1); 05392 %*/ 05393 ;} 05394 break; 05395 05396 case 26: 05397 #line 1019 "parse.y" 05398 { 05399 /*%%%*/ 05400 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05401 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05402 } 05403 else { 05404 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05405 } 05406 /*% 05407 $$ = dispatch2(while_mod, $3, $1); 05408 %*/ 05409 ;} 05410 break; 05411 05412 case 27: 05413 #line 1032 "parse.y" 05414 { 05415 /*%%%*/ 05416 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05417 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05418 } 05419 else { 05420 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05421 } 05422 /*% 05423 $$ = dispatch2(until_mod, $3, $1); 05424 %*/ 05425 ;} 05426 break; 05427 05428 case 28: 05429 #line 1045 "parse.y" 05430 { 05431 /*%%%*/ 05432 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0); 05433 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0); 05434 /*% 05435 $$ = dispatch2(rescue_mod, $1, $3); 05436 %*/ 05437 ;} 05438 break; 05439 05440 case 29: 05441 #line 1054 "parse.y" 05442 { 05443 if (in_def || in_single) { 05444 rb_warn0("END in method; use at_exit"); 05445 } 05446 /*%%%*/ 05447 (yyval.node) = NEW_POSTEXE(NEW_NODE( 05448 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */)); 05449 /*% 05450 $$ = dispatch1(END, $3); 05451 %*/ 05452 ;} 05453 break; 05454 05455 case 31: 05456 #line 1067 "parse.y" 05457 { 05458 /*%%%*/ 05459 value_expr((yyvsp[(3) - (3)].node)); 05460 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05461 (yyval.node) = (yyvsp[(1) - (3)].node); 05462 /*% 05463 $$ = dispatch2(massign, $1, $3); 05464 %*/ 05465 ;} 05466 break; 05467 05468 case 32: 05469 #line 1077 "parse.y" 05470 { 05471 /*%%%*/ 05472 value_expr((yyvsp[(3) - (3)].node)); 05473 if ((yyvsp[(1) - (3)].node)) { 05474 ID vid = (yyvsp[(1) - (3)].node)->nd_vid; 05475 if ((yyvsp[(2) - (3)].id) == tOROP) { 05476 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05477 (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node)); 05478 if (is_asgn_or_id(vid)) { 05479 (yyval.node)->nd_aid = vid; 05480 } 05481 } 05482 else if ((yyvsp[(2) - (3)].id) == tANDOP) { 05483 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05484 (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node)); 05485 } 05486 else { 05487 (yyval.node) = (yyvsp[(1) - (3)].node); 05488 (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node))); 05489 } 05490 } 05491 else { 05492 (yyval.node) = NEW_BEGIN(0); 05493 } 05494 /*% 05495 $$ = dispatch3(opassign, $1, $2, $3); 05496 %*/ 05497 ;} 05498 break; 05499 05500 case 33: 05501 #line 1106 "parse.y" 05502 { 05503 /*%%%*/ 05504 NODE *args; 05505 05506 value_expr((yyvsp[(6) - (6)].node)); 05507 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 05508 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 05509 if ((yyvsp[(5) - (6)].id) == tOROP) { 05510 (yyvsp[(5) - (6)].id) = 0; 05511 } 05512 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 05513 (yyvsp[(5) - (6)].id) = 1; 05514 } 05515 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 05516 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 05517 /*% 05518 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 05519 $$ = dispatch3(opassign, $$, $5, $6); 05520 %*/ 05521 ;} 05522 break; 05523 05524 case 34: 05525 #line 1127 "parse.y" 05526 { 05527 /*%%%*/ 05528 value_expr((yyvsp[(5) - (5)].node)); 05529 if ((yyvsp[(4) - (5)].id) == tOROP) { 05530 (yyvsp[(4) - (5)].id) = 0; 05531 } 05532 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 05533 (yyvsp[(4) - (5)].id) = 1; 05534 } 05535 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05536 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05537 /*% 05538 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 05539 $$ = dispatch3(opassign, $$, $4, $5); 05540 %*/ 05541 ;} 05542 break; 05543 05544 case 35: 05545 #line 1144 "parse.y" 05546 { 05547 /*%%%*/ 05548 value_expr((yyvsp[(5) - (5)].node)); 05549 if ((yyvsp[(4) - (5)].id) == tOROP) { 05550 (yyvsp[(4) - (5)].id) = 0; 05551 } 05552 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 05553 (yyvsp[(4) - (5)].id) = 1; 05554 } 05555 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05556 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05557 /*% 05558 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 05559 $$ = dispatch3(opassign, $$, $4, $5); 05560 %*/ 05561 ;} 05562 break; 05563 05564 case 36: 05565 #line 1161 "parse.y" 05566 { 05567 /*%%%*/ 05568 yyerror("constant re-assignment"); 05569 (yyval.node) = 0; 05570 /*% 05571 $$ = dispatch2(const_path_field, $1, $3); 05572 $$ = dispatch3(opassign, $$, $4, $5); 05573 $$ = dispatch1(assign_error, $$); 05574 %*/ 05575 ;} 05576 break; 05577 05578 case 37: 05579 #line 1172 "parse.y" 05580 { 05581 /*%%%*/ 05582 value_expr((yyvsp[(5) - (5)].node)); 05583 if ((yyvsp[(4) - (5)].id) == tOROP) { 05584 (yyvsp[(4) - (5)].id) = 0; 05585 } 05586 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 05587 (yyvsp[(4) - (5)].id) = 1; 05588 } 05589 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05590 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05591 /*% 05592 $$ = dispatch3(field, $1, ripper_intern("::"), $3); 05593 $$ = dispatch3(opassign, $$, $4, $5); 05594 %*/ 05595 ;} 05596 break; 05597 05598 case 38: 05599 #line 1189 "parse.y" 05600 { 05601 /*%%%*/ 05602 rb_backref_error((yyvsp[(1) - (3)].node)); 05603 (yyval.node) = NEW_BEGIN(0); 05604 /*% 05605 $$ = dispatch2(assign, dispatch1(var_field, $1), $3); 05606 $$ = dispatch1(assign_error, $$); 05607 %*/ 05608 ;} 05609 break; 05610 05611 case 39: 05612 #line 1199 "parse.y" 05613 { 05614 /*%%%*/ 05615 value_expr((yyvsp[(3) - (3)].node)); 05616 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05617 /*% 05618 $$ = dispatch2(assign, $1, $3); 05619 %*/ 05620 ;} 05621 break; 05622 05623 case 40: 05624 #line 1208 "parse.y" 05625 { 05626 /*%%%*/ 05627 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05628 (yyval.node) = (yyvsp[(1) - (3)].node); 05629 /*% 05630 $$ = dispatch2(massign, $1, $3); 05631 %*/ 05632 ;} 05633 break; 05634 05635 case 41: 05636 #line 1217 "parse.y" 05637 { 05638 /*%%%*/ 05639 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05640 (yyval.node) = (yyvsp[(1) - (3)].node); 05641 /*% 05642 $$ = dispatch2(massign, $1, $3); 05643 %*/ 05644 ;} 05645 break; 05646 05647 case 43: 05648 #line 1229 "parse.y" 05649 { 05650 /*%%%*/ 05651 value_expr((yyvsp[(3) - (3)].node)); 05652 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05653 /*% 05654 $$ = dispatch2(assign, $1, $3); 05655 %*/ 05656 ;} 05657 break; 05658 05659 case 44: 05660 #line 1238 "parse.y" 05661 { 05662 /*%%%*/ 05663 value_expr((yyvsp[(3) - (3)].node)); 05664 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05665 /*% 05666 $$ = dispatch2(assign, $1, $3); 05667 %*/ 05668 ;} 05669 break; 05670 05671 case 46: 05672 #line 1251 "parse.y" 05673 { 05674 /*%%%*/ 05675 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05676 /*% 05677 $$ = dispatch3(binary, $1, ripper_intern("and"), $3); 05678 %*/ 05679 ;} 05680 break; 05681 05682 case 47: 05683 #line 1259 "parse.y" 05684 { 05685 /*%%%*/ 05686 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05687 /*% 05688 $$ = dispatch3(binary, $1, ripper_intern("or"), $3); 05689 %*/ 05690 ;} 05691 break; 05692 05693 case 48: 05694 #line 1267 "parse.y" 05695 { 05696 /*%%%*/ 05697 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!'); 05698 /*% 05699 $$ = dispatch2(unary, ripper_intern("not"), $3); 05700 %*/ 05701 ;} 05702 break; 05703 05704 case 49: 05705 #line 1275 "parse.y" 05706 { 05707 /*%%%*/ 05708 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 05709 /*% 05710 $$ = dispatch2(unary, ripper_id2sym('!'), $2); 05711 %*/ 05712 ;} 05713 break; 05714 05715 case 51: 05716 #line 1286 "parse.y" 05717 { 05718 /*%%%*/ 05719 value_expr((yyvsp[(1) - (1)].node)); 05720 (yyval.node) = (yyvsp[(1) - (1)].node); 05721 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 05722 /*% 05723 $$ = $1; 05724 %*/ 05725 ;} 05726 break; 05727 05728 case 55: 05729 #line 1303 "parse.y" 05730 { 05731 /*%%%*/ 05732 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05733 /*% 05734 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 05735 $$ = method_arg($$, $4); 05736 %*/ 05737 ;} 05738 break; 05739 05740 case 56: 05741 #line 1312 "parse.y" 05742 { 05743 /*%%%*/ 05744 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05745 /*% 05746 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 05747 $$ = method_arg($$, $4); 05748 %*/ 05749 ;} 05750 break; 05751 05752 case 57: 05753 #line 1323 "parse.y" 05754 { 05755 (yyvsp[(1) - (1)].vars) = dyna_push(); 05756 /*%%%*/ 05757 (yyval.num) = ruby_sourceline; 05758 /*% 05759 %*/ 05760 ;} 05761 break; 05762 05763 case 58: 05764 #line 1333 "parse.y" 05765 { 05766 /*%%%*/ 05767 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 05768 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 05769 /*% 05770 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 05771 %*/ 05772 dyna_pop((yyvsp[(1) - (5)].vars)); 05773 ;} 05774 break; 05775 05776 case 59: 05777 #line 1345 "parse.y" 05778 { 05779 /*%%%*/ 05780 (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 05781 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05782 /*% 05783 $$ = dispatch2(command, $1, $2); 05784 %*/ 05785 ;} 05786 break; 05787 05788 case 60: 05789 #line 1354 "parse.y" 05790 { 05791 /*%%%*/ 05792 block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)); 05793 (yyvsp[(3) - (3)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node)); 05794 (yyval.node) = (yyvsp[(3) - (3)].node); 05795 fixpos((yyval.node), (yyvsp[(2) - (3)].node)); 05796 /*% 05797 $$ = dispatch2(command, $1, $2); 05798 $$ = method_add_block($$, $3); 05799 %*/ 05800 ;} 05801 break; 05802 05803 case 61: 05804 #line 1366 "parse.y" 05805 { 05806 /*%%%*/ 05807 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05808 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05809 /*% 05810 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 05811 %*/ 05812 ;} 05813 break; 05814 05815 case 62: 05816 #line 1375 "parse.y" 05817 { 05818 /*%%%*/ 05819 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 05820 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 05821 (yyval.node) = (yyvsp[(5) - (5)].node); 05822 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05823 /*% 05824 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 05825 $$ = method_add_block($$, $5); 05826 %*/ 05827 ;} 05828 break; 05829 05830 case 63: 05831 #line 1387 "parse.y" 05832 { 05833 /*%%%*/ 05834 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05835 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05836 /*% 05837 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 05838 %*/ 05839 ;} 05840 break; 05841 05842 case 64: 05843 #line 1396 "parse.y" 05844 { 05845 /*%%%*/ 05846 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 05847 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 05848 (yyval.node) = (yyvsp[(5) - (5)].node); 05849 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05850 /*% 05851 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 05852 $$ = method_add_block($$, $5); 05853 %*/ 05854 ;} 05855 break; 05856 05857 case 65: 05858 #line 1408 "parse.y" 05859 { 05860 /*%%%*/ 05861 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 05862 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05863 /*% 05864 $$ = dispatch1(super, $2); 05865 %*/ 05866 ;} 05867 break; 05868 05869 case 66: 05870 #line 1417 "parse.y" 05871 { 05872 /*%%%*/ 05873 (yyval.node) = new_yield((yyvsp[(2) - (2)].node)); 05874 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05875 /*% 05876 $$ = dispatch1(yield, $2); 05877 %*/ 05878 ;} 05879 break; 05880 05881 case 67: 05882 #line 1426 "parse.y" 05883 { 05884 /*%%%*/ 05885 (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node))); 05886 /*% 05887 $$ = dispatch1(return, $2); 05888 %*/ 05889 ;} 05890 break; 05891 05892 case 68: 05893 #line 1434 "parse.y" 05894 { 05895 /*%%%*/ 05896 (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node))); 05897 /*% 05898 $$ = dispatch1(break, $2); 05899 %*/ 05900 ;} 05901 break; 05902 05903 case 69: 05904 #line 1442 "parse.y" 05905 { 05906 /*%%%*/ 05907 (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node))); 05908 /*% 05909 $$ = dispatch1(next, $2); 05910 %*/ 05911 ;} 05912 break; 05913 05914 case 71: 05915 #line 1453 "parse.y" 05916 { 05917 /*%%%*/ 05918 (yyval.node) = (yyvsp[(2) - (3)].node); 05919 /*% 05920 $$ = dispatch1(mlhs_paren, $2); 05921 %*/ 05922 ;} 05923 break; 05924 05925 case 73: 05926 #line 1464 "parse.y" 05927 { 05928 /*%%%*/ 05929 (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0); 05930 /*% 05931 $$ = dispatch1(mlhs_paren, $2); 05932 %*/ 05933 ;} 05934 break; 05935 05936 case 74: 05937 #line 1474 "parse.y" 05938 { 05939 /*%%%*/ 05940 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 05941 /*% 05942 $$ = $1; 05943 %*/ 05944 ;} 05945 break; 05946 05947 case 75: 05948 #line 1482 "parse.y" 05949 { 05950 /*%%%*/ 05951 (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0); 05952 /*% 05953 $$ = mlhs_add($1, $2); 05954 %*/ 05955 ;} 05956 break; 05957 05958 case 76: 05959 #line 1490 "parse.y" 05960 { 05961 /*%%%*/ 05962 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05963 /*% 05964 $$ = mlhs_add_star($1, $3); 05965 %*/ 05966 ;} 05967 break; 05968 05969 case 77: 05970 #line 1498 "parse.y" 05971 { 05972 /*%%%*/ 05973 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node))); 05974 /*% 05975 $1 = mlhs_add_star($1, $3); 05976 $$ = mlhs_add($1, $5); 05977 %*/ 05978 ;} 05979 break; 05980 05981 case 78: 05982 #line 1507 "parse.y" 05983 { 05984 /*%%%*/ 05985 (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1); 05986 /*% 05987 $$ = mlhs_add_star($1, Qnil); 05988 %*/ 05989 ;} 05990 break; 05991 05992 case 79: 05993 #line 1515 "parse.y" 05994 { 05995 /*%%%*/ 05996 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node))); 05997 /*% 05998 $1 = mlhs_add_star($1, Qnil); 05999 $$ = mlhs_add($1, $4); 06000 %*/ 06001 ;} 06002 break; 06003 06004 case 80: 06005 #line 1524 "parse.y" 06006 { 06007 /*%%%*/ 06008 (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); 06009 /*% 06010 $$ = mlhs_add_star(mlhs_new(), $2); 06011 %*/ 06012 ;} 06013 break; 06014 06015 case 81: 06016 #line 1532 "parse.y" 06017 { 06018 /*%%%*/ 06019 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node))); 06020 /*% 06021 $2 = mlhs_add_star(mlhs_new(), $2); 06022 $$ = mlhs_add($2, $4); 06023 %*/ 06024 ;} 06025 break; 06026 06027 case 82: 06028 #line 1541 "parse.y" 06029 { 06030 /*%%%*/ 06031 (yyval.node) = NEW_MASGN(0, -1); 06032 /*% 06033 $$ = mlhs_add_star(mlhs_new(), Qnil); 06034 %*/ 06035 ;} 06036 break; 06037 06038 case 83: 06039 #line 1549 "parse.y" 06040 { 06041 /*%%%*/ 06042 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 06043 /*% 06044 $$ = mlhs_add_star(mlhs_new(), Qnil); 06045 $$ = mlhs_add($$, $3); 06046 %*/ 06047 ;} 06048 break; 06049 06050 case 85: 06051 #line 1561 "parse.y" 06052 { 06053 /*%%%*/ 06054 (yyval.node) = (yyvsp[(2) - (3)].node); 06055 /*% 06056 $$ = dispatch1(mlhs_paren, $2); 06057 %*/ 06058 ;} 06059 break; 06060 06061 case 86: 06062 #line 1571 "parse.y" 06063 { 06064 /*%%%*/ 06065 (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); 06066 /*% 06067 $$ = mlhs_add(mlhs_new(), $1); 06068 %*/ 06069 ;} 06070 break; 06071 06072 case 87: 06073 #line 1579 "parse.y" 06074 { 06075 /*%%%*/ 06076 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 06077 /*% 06078 $$ = mlhs_add($1, $2); 06079 %*/ 06080 ;} 06081 break; 06082 06083 case 88: 06084 #line 1589 "parse.y" 06085 { 06086 /*%%%*/ 06087 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 06088 /*% 06089 $$ = mlhs_add(mlhs_new(), $1); 06090 %*/ 06091 ;} 06092 break; 06093 06094 case 89: 06095 #line 1597 "parse.y" 06096 { 06097 /*%%%*/ 06098 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06099 /*% 06100 $$ = mlhs_add($1, $3); 06101 %*/ 06102 ;} 06103 break; 06104 06105 case 90: 06106 #line 1607 "parse.y" 06107 { 06108 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06109 ;} 06110 break; 06111 06112 case 91: 06113 #line 1611 "parse.y" 06114 { 06115 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06116 ;} 06117 break; 06118 06119 case 92: 06120 #line 1615 "parse.y" 06121 { 06122 /*%%%*/ 06123 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06124 /*% 06125 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06126 %*/ 06127 ;} 06128 break; 06129 06130 case 93: 06131 #line 1623 "parse.y" 06132 { 06133 /*%%%*/ 06134 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06135 /*% 06136 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06137 %*/ 06138 ;} 06139 break; 06140 06141 case 94: 06142 #line 1631 "parse.y" 06143 { 06144 /*%%%*/ 06145 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06146 /*% 06147 $$ = dispatch2(const_path_field, $1, $3); 06148 %*/ 06149 ;} 06150 break; 06151 06152 case 95: 06153 #line 1639 "parse.y" 06154 { 06155 /*%%%*/ 06156 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06157 /*% 06158 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06159 %*/ 06160 ;} 06161 break; 06162 06163 case 96: 06164 #line 1647 "parse.y" 06165 { 06166 /*%%%*/ 06167 if (in_def || in_single) 06168 yyerror("dynamic constant assignment"); 06169 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06170 /*% 06171 if (in_def || in_single) 06172 yyerror("dynamic constant assignment"); 06173 $$ = dispatch2(const_path_field, $1, $3); 06174 %*/ 06175 ;} 06176 break; 06177 06178 case 97: 06179 #line 1659 "parse.y" 06180 { 06181 /*%%%*/ 06182 if (in_def || in_single) 06183 yyerror("dynamic constant assignment"); 06184 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06185 /*% 06186 $$ = dispatch1(top_const_field, $2); 06187 %*/ 06188 ;} 06189 break; 06190 06191 case 98: 06192 #line 1669 "parse.y" 06193 { 06194 /*%%%*/ 06195 rb_backref_error((yyvsp[(1) - (1)].node)); 06196 (yyval.node) = NEW_BEGIN(0); 06197 /*% 06198 $$ = dispatch1(var_field, $1); 06199 $$ = dispatch1(assign_error, $$); 06200 %*/ 06201 ;} 06202 break; 06203 06204 case 99: 06205 #line 1681 "parse.y" 06206 { 06207 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06208 /*%%%*/ 06209 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06210 /*% 06211 $$ = dispatch1(var_field, $$); 06212 %*/ 06213 ;} 06214 break; 06215 06216 case 100: 06217 #line 1690 "parse.y" 06218 { 06219 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06220 /*%%%*/ 06221 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06222 /*% 06223 $$ = dispatch1(var_field, $$); 06224 %*/ 06225 ;} 06226 break; 06227 06228 case 101: 06229 #line 1699 "parse.y" 06230 { 06231 /*%%%*/ 06232 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06233 /*% 06234 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06235 %*/ 06236 ;} 06237 break; 06238 06239 case 102: 06240 #line 1707 "parse.y" 06241 { 06242 /*%%%*/ 06243 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06244 /*% 06245 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06246 %*/ 06247 ;} 06248 break; 06249 06250 case 103: 06251 #line 1715 "parse.y" 06252 { 06253 /*%%%*/ 06254 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06255 /*% 06256 $$ = dispatch3(field, $1, ripper_intern("::"), $3); 06257 %*/ 06258 ;} 06259 break; 06260 06261 case 104: 06262 #line 1723 "parse.y" 06263 { 06264 /*%%%*/ 06265 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06266 /*% 06267 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06268 %*/ 06269 ;} 06270 break; 06271 06272 case 105: 06273 #line 1731 "parse.y" 06274 { 06275 /*%%%*/ 06276 if (in_def || in_single) 06277 yyerror("dynamic constant assignment"); 06278 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06279 /*% 06280 $$ = dispatch2(const_path_field, $1, $3); 06281 if (in_def || in_single) { 06282 $$ = dispatch1(assign_error, $$); 06283 } 06284 %*/ 06285 ;} 06286 break; 06287 06288 case 106: 06289 #line 1744 "parse.y" 06290 { 06291 /*%%%*/ 06292 if (in_def || in_single) 06293 yyerror("dynamic constant assignment"); 06294 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06295 /*% 06296 $$ = dispatch1(top_const_field, $2); 06297 if (in_def || in_single) { 06298 $$ = dispatch1(assign_error, $$); 06299 } 06300 %*/ 06301 ;} 06302 break; 06303 06304 case 107: 06305 #line 1757 "parse.y" 06306 { 06307 /*%%%*/ 06308 rb_backref_error((yyvsp[(1) - (1)].node)); 06309 (yyval.node) = NEW_BEGIN(0); 06310 /*% 06311 $$ = dispatch1(assign_error, $1); 06312 %*/ 06313 ;} 06314 break; 06315 06316 case 108: 06317 #line 1768 "parse.y" 06318 { 06319 /*%%%*/ 06320 yyerror("class/module name must be CONSTANT"); 06321 /*% 06322 $$ = dispatch1(class_name_error, $1); 06323 %*/ 06324 ;} 06325 break; 06326 06327 case 110: 06328 #line 1779 "parse.y" 06329 { 06330 /*%%%*/ 06331 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 06332 /*% 06333 $$ = dispatch1(top_const_ref, $2); 06334 %*/ 06335 ;} 06336 break; 06337 06338 case 111: 06339 #line 1787 "parse.y" 06340 { 06341 /*%%%*/ 06342 (yyval.node) = NEW_COLON2(0, (yyval.node)); 06343 /*% 06344 $$ = dispatch1(const_ref, $1); 06345 %*/ 06346 ;} 06347 break; 06348 06349 case 112: 06350 #line 1795 "parse.y" 06351 { 06352 /*%%%*/ 06353 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06354 /*% 06355 $$ = dispatch2(const_path_ref, $1, $3); 06356 %*/ 06357 ;} 06358 break; 06359 06360 case 116: 06361 #line 1808 "parse.y" 06362 { 06363 lex_state = EXPR_ENDFN; 06364 (yyval.id) = (yyvsp[(1) - (1)].id); 06365 ;} 06366 break; 06367 06368 case 117: 06369 #line 1813 "parse.y" 06370 { 06371 lex_state = EXPR_ENDFN; 06372 /*%%%*/ 06373 (yyval.id) = (yyvsp[(1) - (1)].id); 06374 /*% 06375 $$ = $1; 06376 %*/ 06377 ;} 06378 break; 06379 06380 case 120: 06381 #line 1828 "parse.y" 06382 { 06383 /*%%%*/ 06384 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 06385 /*% 06386 $$ = dispatch1(symbol_literal, $1); 06387 %*/ 06388 ;} 06389 break; 06390 06391 case 122: 06392 #line 1839 "parse.y" 06393 { 06394 /*%%%*/ 06395 (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node)); 06396 /*% 06397 $$ = rb_ary_new3(1, $1); 06398 %*/ 06399 ;} 06400 break; 06401 06402 case 123: 06403 #line 1846 "parse.y" 06404 {lex_state = EXPR_FNAME;;} 06405 break; 06406 06407 case 124: 06408 #line 1847 "parse.y" 06409 { 06410 /*%%%*/ 06411 (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node))); 06412 /*% 06413 rb_ary_push($1, $4); 06414 %*/ 06415 ;} 06416 break; 06417 06418 case 125: 06419 #line 1856 "parse.y" 06420 { ifndef_ripper((yyval.id) = '|'); ;} 06421 break; 06422 06423 case 126: 06424 #line 1857 "parse.y" 06425 { ifndef_ripper((yyval.id) = '^'); ;} 06426 break; 06427 06428 case 127: 06429 #line 1858 "parse.y" 06430 { ifndef_ripper((yyval.id) = '&'); ;} 06431 break; 06432 06433 case 128: 06434 #line 1859 "parse.y" 06435 { ifndef_ripper((yyval.id) = tCMP); ;} 06436 break; 06437 06438 case 129: 06439 #line 1860 "parse.y" 06440 { ifndef_ripper((yyval.id) = tEQ); ;} 06441 break; 06442 06443 case 130: 06444 #line 1861 "parse.y" 06445 { ifndef_ripper((yyval.id) = tEQQ); ;} 06446 break; 06447 06448 case 131: 06449 #line 1862 "parse.y" 06450 { ifndef_ripper((yyval.id) = tMATCH); ;} 06451 break; 06452 06453 case 132: 06454 #line 1863 "parse.y" 06455 { ifndef_ripper((yyval.id) = tNMATCH); ;} 06456 break; 06457 06458 case 133: 06459 #line 1864 "parse.y" 06460 { ifndef_ripper((yyval.id) = '>'); ;} 06461 break; 06462 06463 case 134: 06464 #line 1865 "parse.y" 06465 { ifndef_ripper((yyval.id) = tGEQ); ;} 06466 break; 06467 06468 case 135: 06469 #line 1866 "parse.y" 06470 { ifndef_ripper((yyval.id) = '<'); ;} 06471 break; 06472 06473 case 136: 06474 #line 1867 "parse.y" 06475 { ifndef_ripper((yyval.id) = tLEQ); ;} 06476 break; 06477 06478 case 137: 06479 #line 1868 "parse.y" 06480 { ifndef_ripper((yyval.id) = tNEQ); ;} 06481 break; 06482 06483 case 138: 06484 #line 1869 "parse.y" 06485 { ifndef_ripper((yyval.id) = tLSHFT); ;} 06486 break; 06487 06488 case 139: 06489 #line 1870 "parse.y" 06490 { ifndef_ripper((yyval.id) = tRSHFT); ;} 06491 break; 06492 06493 case 140: 06494 #line 1871 "parse.y" 06495 { ifndef_ripper((yyval.id) = '+'); ;} 06496 break; 06497 06498 case 141: 06499 #line 1872 "parse.y" 06500 { ifndef_ripper((yyval.id) = '-'); ;} 06501 break; 06502 06503 case 142: 06504 #line 1873 "parse.y" 06505 { ifndef_ripper((yyval.id) = '*'); ;} 06506 break; 06507 06508 case 143: 06509 #line 1874 "parse.y" 06510 { ifndef_ripper((yyval.id) = '*'); ;} 06511 break; 06512 06513 case 144: 06514 #line 1875 "parse.y" 06515 { ifndef_ripper((yyval.id) = '/'); ;} 06516 break; 06517 06518 case 145: 06519 #line 1876 "parse.y" 06520 { ifndef_ripper((yyval.id) = '%'); ;} 06521 break; 06522 06523 case 146: 06524 #line 1877 "parse.y" 06525 { ifndef_ripper((yyval.id) = tPOW); ;} 06526 break; 06527 06528 case 147: 06529 #line 1878 "parse.y" 06530 { ifndef_ripper((yyval.id) = '!'); ;} 06531 break; 06532 06533 case 148: 06534 #line 1879 "parse.y" 06535 { ifndef_ripper((yyval.id) = '~'); ;} 06536 break; 06537 06538 case 149: 06539 #line 1880 "parse.y" 06540 { ifndef_ripper((yyval.id) = tUPLUS); ;} 06541 break; 06542 06543 case 150: 06544 #line 1881 "parse.y" 06545 { ifndef_ripper((yyval.id) = tUMINUS); ;} 06546 break; 06547 06548 case 151: 06549 #line 1882 "parse.y" 06550 { ifndef_ripper((yyval.id) = tAREF); ;} 06551 break; 06552 06553 case 152: 06554 #line 1883 "parse.y" 06555 { ifndef_ripper((yyval.id) = tASET); ;} 06556 break; 06557 06558 case 153: 06559 #line 1884 "parse.y" 06560 { ifndef_ripper((yyval.id) = '`'); ;} 06561 break; 06562 06563 case 195: 06564 #line 1902 "parse.y" 06565 { 06566 /*%%%*/ 06567 value_expr((yyvsp[(3) - (3)].node)); 06568 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06569 /*% 06570 $$ = dispatch2(assign, $1, $3); 06571 %*/ 06572 ;} 06573 break; 06574 06575 case 196: 06576 #line 1911 "parse.y" 06577 { 06578 /*%%%*/ 06579 value_expr((yyvsp[(3) - (5)].node)); 06580 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06581 (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node)); 06582 /*% 06583 $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); 06584 %*/ 06585 ;} 06586 break; 06587 06588 case 197: 06589 #line 1921 "parse.y" 06590 { 06591 /*%%%*/ 06592 value_expr((yyvsp[(3) - (3)].node)); 06593 if ((yyvsp[(1) - (3)].node)) { 06594 ID vid = (yyvsp[(1) - (3)].node)->nd_vid; 06595 if ((yyvsp[(2) - (3)].id) == tOROP) { 06596 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 06597 (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node)); 06598 if (is_asgn_or_id(vid)) { 06599 (yyval.node)->nd_aid = vid; 06600 } 06601 } 06602 else if ((yyvsp[(2) - (3)].id) == tANDOP) { 06603 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 06604 (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node)); 06605 } 06606 else { 06607 (yyval.node) = (yyvsp[(1) - (3)].node); 06608 (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node))); 06609 } 06610 } 06611 else { 06612 (yyval.node) = NEW_BEGIN(0); 06613 } 06614 /*% 06615 $$ = dispatch3(opassign, $1, $2, $3); 06616 %*/ 06617 ;} 06618 break; 06619 06620 case 198: 06621 #line 1950 "parse.y" 06622 { 06623 /*%%%*/ 06624 value_expr((yyvsp[(3) - (5)].node)); 06625 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06626 if ((yyvsp[(1) - (5)].node)) { 06627 ID vid = (yyvsp[(1) - (5)].node)->nd_vid; 06628 if ((yyvsp[(2) - (5)].id) == tOROP) { 06629 (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node); 06630 (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].node)); 06631 if (is_asgn_or_id(vid)) { 06632 (yyval.node)->nd_aid = vid; 06633 } 06634 } 06635 else if ((yyvsp[(2) - (5)].id) == tANDOP) { 06636 (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node); 06637 (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].node)); 06638 } 06639 else { 06640 (yyval.node) = (yyvsp[(1) - (5)].node); 06641 (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].id), NEW_LIST((yyvsp[(3) - (5)].node))); 06642 } 06643 } 06644 else { 06645 (yyval.node) = NEW_BEGIN(0); 06646 } 06647 /*% 06648 $3 = dispatch2(rescue_mod, $3, $5); 06649 $$ = dispatch3(opassign, $1, $2, $3); 06650 %*/ 06651 ;} 06652 break; 06653 06654 case 199: 06655 #line 1981 "parse.y" 06656 { 06657 /*%%%*/ 06658 NODE *args; 06659 06660 value_expr((yyvsp[(6) - (6)].node)); 06661 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 06662 if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) { 06663 args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06664 } 06665 else { 06666 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06667 } 06668 if ((yyvsp[(5) - (6)].id) == tOROP) { 06669 (yyvsp[(5) - (6)].id) = 0; 06670 } 06671 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 06672 (yyvsp[(5) - (6)].id) = 1; 06673 } 06674 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 06675 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 06676 /*% 06677 $1 = dispatch2(aref_field, $1, escape_Qundef($3)); 06678 $$ = dispatch3(opassign, $1, $5, $6); 06679 %*/ 06680 ;} 06681 break; 06682 06683 case 200: 06684 #line 2007 "parse.y" 06685 { 06686 /*%%%*/ 06687 value_expr((yyvsp[(5) - (5)].node)); 06688 if ((yyvsp[(4) - (5)].id) == tOROP) { 06689 (yyvsp[(4) - (5)].id) = 0; 06690 } 06691 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 06692 (yyvsp[(4) - (5)].id) = 1; 06693 } 06694 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06695 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06696 /*% 06697 $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); 06698 $$ = dispatch3(opassign, $1, $4, $5); 06699 %*/ 06700 ;} 06701 break; 06702 06703 case 201: 06704 #line 2024 "parse.y" 06705 { 06706 /*%%%*/ 06707 value_expr((yyvsp[(5) - (5)].node)); 06708 if ((yyvsp[(4) - (5)].id) == tOROP) { 06709 (yyvsp[(4) - (5)].id) = 0; 06710 } 06711 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 06712 (yyvsp[(4) - (5)].id) = 1; 06713 } 06714 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06715 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06716 /*% 06717 $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); 06718 $$ = dispatch3(opassign, $1, $4, $5); 06719 %*/ 06720 ;} 06721 break; 06722 06723 case 202: 06724 #line 2041 "parse.y" 06725 { 06726 /*%%%*/ 06727 value_expr((yyvsp[(5) - (5)].node)); 06728 if ((yyvsp[(4) - (5)].id) == tOROP) { 06729 (yyvsp[(4) - (5)].id) = 0; 06730 } 06731 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 06732 (yyvsp[(4) - (5)].id) = 1; 06733 } 06734 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06735 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06736 /*% 06737 $1 = dispatch3(field, $1, ripper_intern("::"), $3); 06738 $$ = dispatch3(opassign, $1, $4, $5); 06739 %*/ 06740 ;} 06741 break; 06742 06743 case 203: 06744 #line 2058 "parse.y" 06745 { 06746 /*%%%*/ 06747 yyerror("constant re-assignment"); 06748 (yyval.node) = NEW_BEGIN(0); 06749 /*% 06750 $$ = dispatch2(const_path_field, $1, $3); 06751 $$ = dispatch3(opassign, $$, $4, $5); 06752 $$ = dispatch1(assign_error, $$); 06753 %*/ 06754 ;} 06755 break; 06756 06757 case 204: 06758 #line 2069 "parse.y" 06759 { 06760 /*%%%*/ 06761 yyerror("constant re-assignment"); 06762 (yyval.node) = NEW_BEGIN(0); 06763 /*% 06764 $$ = dispatch1(top_const_field, $2); 06765 $$ = dispatch3(opassign, $$, $3, $4); 06766 $$ = dispatch1(assign_error, $$); 06767 %*/ 06768 ;} 06769 break; 06770 06771 case 205: 06772 #line 2080 "parse.y" 06773 { 06774 /*%%%*/ 06775 rb_backref_error((yyvsp[(1) - (3)].node)); 06776 (yyval.node) = NEW_BEGIN(0); 06777 /*% 06778 $$ = dispatch1(var_field, $1); 06779 $$ = dispatch3(opassign, $$, $2, $3); 06780 $$ = dispatch1(assign_error, $$); 06781 %*/ 06782 ;} 06783 break; 06784 06785 case 206: 06786 #line 2091 "parse.y" 06787 { 06788 /*%%%*/ 06789 value_expr((yyvsp[(1) - (3)].node)); 06790 value_expr((yyvsp[(3) - (3)].node)); 06791 (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06792 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 06793 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 06794 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 06795 } 06796 /*% 06797 $$ = dispatch2(dot2, $1, $3); 06798 %*/ 06799 ;} 06800 break; 06801 06802 case 207: 06803 #line 2105 "parse.y" 06804 { 06805 /*%%%*/ 06806 value_expr((yyvsp[(1) - (3)].node)); 06807 value_expr((yyvsp[(3) - (3)].node)); 06808 (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06809 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 06810 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 06811 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 06812 } 06813 /*% 06814 $$ = dispatch2(dot3, $1, $3); 06815 %*/ 06816 ;} 06817 break; 06818 06819 case 208: 06820 #line 2119 "parse.y" 06821 { 06822 /*%%%*/ 06823 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node)); 06824 /*% 06825 $$ = dispatch3(binary, $1, ID2SYM('+'), $3); 06826 %*/ 06827 ;} 06828 break; 06829 06830 case 209: 06831 #line 2127 "parse.y" 06832 { 06833 /*%%%*/ 06834 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node)); 06835 /*% 06836 $$ = dispatch3(binary, $1, ID2SYM('-'), $3); 06837 %*/ 06838 ;} 06839 break; 06840 06841 case 210: 06842 #line 2135 "parse.y" 06843 { 06844 /*%%%*/ 06845 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node)); 06846 /*% 06847 $$ = dispatch3(binary, $1, ID2SYM('*'), $3); 06848 %*/ 06849 ;} 06850 break; 06851 06852 case 211: 06853 #line 2143 "parse.y" 06854 { 06855 /*%%%*/ 06856 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node)); 06857 /*% 06858 $$ = dispatch3(binary, $1, ID2SYM('/'), $3); 06859 %*/ 06860 ;} 06861 break; 06862 06863 case 212: 06864 #line 2151 "parse.y" 06865 { 06866 /*%%%*/ 06867 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node)); 06868 /*% 06869 $$ = dispatch3(binary, $1, ID2SYM('%'), $3); 06870 %*/ 06871 ;} 06872 break; 06873 06874 case 213: 06875 #line 2159 "parse.y" 06876 { 06877 /*%%%*/ 06878 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node)); 06879 /*% 06880 $$ = dispatch3(binary, $1, ripper_intern("**"), $3); 06881 %*/ 06882 ;} 06883 break; 06884 06885 case 214: 06886 #line 2167 "parse.y" 06887 { 06888 /*%%%*/ 06889 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 06890 /*% 06891 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 06892 $$ = dispatch2(unary, ripper_intern("-@"), $$); 06893 %*/ 06894 ;} 06895 break; 06896 06897 case 215: 06898 #line 2176 "parse.y" 06899 { 06900 /*%%%*/ 06901 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 06902 /*% 06903 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 06904 $$ = dispatch2(unary, ripper_intern("-@"), $$); 06905 %*/ 06906 ;} 06907 break; 06908 06909 case 216: 06910 #line 2185 "parse.y" 06911 { 06912 /*%%%*/ 06913 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS); 06914 /*% 06915 $$ = dispatch2(unary, ripper_intern("+@"), $2); 06916 %*/ 06917 ;} 06918 break; 06919 06920 case 217: 06921 #line 2193 "parse.y" 06922 { 06923 /*%%%*/ 06924 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS); 06925 /*% 06926 $$ = dispatch2(unary, ripper_intern("-@"), $2); 06927 %*/ 06928 ;} 06929 break; 06930 06931 case 218: 06932 #line 2201 "parse.y" 06933 { 06934 /*%%%*/ 06935 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node)); 06936 /*% 06937 $$ = dispatch3(binary, $1, ID2SYM('|'), $3); 06938 %*/ 06939 ;} 06940 break; 06941 06942 case 219: 06943 #line 2209 "parse.y" 06944 { 06945 /*%%%*/ 06946 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node)); 06947 /*% 06948 $$ = dispatch3(binary, $1, ID2SYM('^'), $3); 06949 %*/ 06950 ;} 06951 break; 06952 06953 case 220: 06954 #line 2217 "parse.y" 06955 { 06956 /*%%%*/ 06957 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node)); 06958 /*% 06959 $$ = dispatch3(binary, $1, ID2SYM('&'), $3); 06960 %*/ 06961 ;} 06962 break; 06963 06964 case 221: 06965 #line 2225 "parse.y" 06966 { 06967 /*%%%*/ 06968 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node)); 06969 /*% 06970 $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); 06971 %*/ 06972 ;} 06973 break; 06974 06975 case 222: 06976 #line 2233 "parse.y" 06977 { 06978 /*%%%*/ 06979 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node)); 06980 /*% 06981 $$ = dispatch3(binary, $1, ID2SYM('>'), $3); 06982 %*/ 06983 ;} 06984 break; 06985 06986 case 223: 06987 #line 2241 "parse.y" 06988 { 06989 /*%%%*/ 06990 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node)); 06991 /*% 06992 $$ = dispatch3(binary, $1, ripper_intern(">="), $3); 06993 %*/ 06994 ;} 06995 break; 06996 06997 case 224: 06998 #line 2249 "parse.y" 06999 { 07000 /*%%%*/ 07001 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node)); 07002 /*% 07003 $$ = dispatch3(binary, $1, ID2SYM('<'), $3); 07004 %*/ 07005 ;} 07006 break; 07007 07008 case 225: 07009 #line 2257 "parse.y" 07010 { 07011 /*%%%*/ 07012 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node)); 07013 /*% 07014 $$ = dispatch3(binary, $1, ripper_intern("<="), $3); 07015 %*/ 07016 ;} 07017 break; 07018 07019 case 226: 07020 #line 2265 "parse.y" 07021 { 07022 /*%%%*/ 07023 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node)); 07024 /*% 07025 $$ = dispatch3(binary, $1, ripper_intern("=="), $3); 07026 %*/ 07027 ;} 07028 break; 07029 07030 case 227: 07031 #line 2273 "parse.y" 07032 { 07033 /*%%%*/ 07034 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node)); 07035 /*% 07036 $$ = dispatch3(binary, $1, ripper_intern("==="), $3); 07037 %*/ 07038 ;} 07039 break; 07040 07041 case 228: 07042 #line 2281 "parse.y" 07043 { 07044 /*%%%*/ 07045 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node)); 07046 /*% 07047 $$ = dispatch3(binary, $1, ripper_intern("!="), $3); 07048 %*/ 07049 ;} 07050 break; 07051 07052 case 229: 07053 #line 2289 "parse.y" 07054 { 07055 /*%%%*/ 07056 (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07057 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].node)->nd_lit) == T_REGEXP) { 07058 (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node)); 07059 } 07060 /*% 07061 $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); 07062 %*/ 07063 ;} 07064 break; 07065 07066 case 230: 07067 #line 2300 "parse.y" 07068 { 07069 /*%%%*/ 07070 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node)); 07071 /*% 07072 $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); 07073 %*/ 07074 ;} 07075 break; 07076 07077 case 231: 07078 #line 2308 "parse.y" 07079 { 07080 /*%%%*/ 07081 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 07082 /*% 07083 $$ = dispatch2(unary, ID2SYM('!'), $2); 07084 %*/ 07085 ;} 07086 break; 07087 07088 case 232: 07089 #line 2316 "parse.y" 07090 { 07091 /*%%%*/ 07092 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~'); 07093 /*% 07094 $$ = dispatch2(unary, ID2SYM('~'), $2); 07095 %*/ 07096 ;} 07097 break; 07098 07099 case 233: 07100 #line 2324 "parse.y" 07101 { 07102 /*%%%*/ 07103 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node)); 07104 /*% 07105 $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); 07106 %*/ 07107 ;} 07108 break; 07109 07110 case 234: 07111 #line 2332 "parse.y" 07112 { 07113 /*%%%*/ 07114 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node)); 07115 /*% 07116 $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); 07117 %*/ 07118 ;} 07119 break; 07120 07121 case 235: 07122 #line 2340 "parse.y" 07123 { 07124 /*%%%*/ 07125 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07126 /*% 07127 $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); 07128 %*/ 07129 ;} 07130 break; 07131 07132 case 236: 07133 #line 2348 "parse.y" 07134 { 07135 /*%%%*/ 07136 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07137 /*% 07138 $$ = dispatch3(binary, $1, ripper_intern("||"), $3); 07139 %*/ 07140 ;} 07141 break; 07142 07143 case 237: 07144 #line 2355 "parse.y" 07145 {in_defined = 1;;} 07146 break; 07147 07148 case 238: 07149 #line 2356 "parse.y" 07150 { 07151 /*%%%*/ 07152 in_defined = 0; 07153 (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node)); 07154 /*% 07155 in_defined = 0; 07156 $$ = dispatch1(defined, $4); 07157 %*/ 07158 ;} 07159 break; 07160 07161 case 239: 07162 #line 2366 "parse.y" 07163 { 07164 /*%%%*/ 07165 value_expr((yyvsp[(1) - (6)].node)); 07166 (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 07167 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 07168 /*% 07169 $$ = dispatch3(ifop, $1, $3, $6); 07170 %*/ 07171 ;} 07172 break; 07173 07174 case 240: 07175 #line 2376 "parse.y" 07176 { 07177 (yyval.node) = (yyvsp[(1) - (1)].node); 07178 ;} 07179 break; 07180 07181 case 241: 07182 #line 2382 "parse.y" 07183 { 07184 /*%%%*/ 07185 value_expr((yyvsp[(1) - (1)].node)); 07186 (yyval.node) = (yyvsp[(1) - (1)].node); 07187 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 07188 /*% 07189 $$ = $1; 07190 %*/ 07191 ;} 07192 break; 07193 07194 case 243: 07195 #line 2395 "parse.y" 07196 { 07197 (yyval.node) = (yyvsp[(1) - (2)].node); 07198 ;} 07199 break; 07200 07201 case 244: 07202 #line 2399 "parse.y" 07203 { 07204 /*%%%*/ 07205 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07206 /*% 07207 $$ = arg_add_assocs($1, $3); 07208 %*/ 07209 ;} 07210 break; 07211 07212 case 245: 07213 #line 2407 "parse.y" 07214 { 07215 /*%%%*/ 07216 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07217 /*% 07218 $$ = arg_add_assocs(arg_new(), $1); 07219 %*/ 07220 ;} 07221 break; 07222 07223 case 246: 07224 #line 2417 "parse.y" 07225 { 07226 /*%%%*/ 07227 (yyval.node) = (yyvsp[(2) - (3)].node); 07228 /*% 07229 $$ = dispatch1(arg_paren, escape_Qundef($2)); 07230 %*/ 07231 ;} 07232 break; 07233 07234 case 251: 07235 #line 2433 "parse.y" 07236 { 07237 (yyval.node) = (yyvsp[(1) - (2)].node); 07238 ;} 07239 break; 07240 07241 case 252: 07242 #line 2437 "parse.y" 07243 { 07244 /*%%%*/ 07245 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07246 /*% 07247 $$ = arg_add_assocs($1, $3); 07248 %*/ 07249 ;} 07250 break; 07251 07252 case 253: 07253 #line 2445 "parse.y" 07254 { 07255 /*%%%*/ 07256 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07257 /*% 07258 $$ = arg_add_assocs(arg_new(), $1); 07259 %*/ 07260 ;} 07261 break; 07262 07263 case 254: 07264 #line 2455 "parse.y" 07265 { 07266 /*%%%*/ 07267 value_expr((yyvsp[(1) - (1)].node)); 07268 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07269 /*% 07270 $$ = arg_add(arg_new(), $1); 07271 %*/ 07272 ;} 07273 break; 07274 07275 case 255: 07276 #line 2464 "parse.y" 07277 { 07278 /*%%%*/ 07279 (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 07280 /*% 07281 $$ = arg_add_optblock($1, $2); 07282 %*/ 07283 ;} 07284 break; 07285 07286 case 256: 07287 #line 2472 "parse.y" 07288 { 07289 /*%%%*/ 07290 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07291 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node)); 07292 /*% 07293 $$ = arg_add_assocs(arg_new(), $1); 07294 $$ = arg_add_optblock($$, $2); 07295 %*/ 07296 ;} 07297 break; 07298 07299 case 257: 07300 #line 2482 "parse.y" 07301 { 07302 /*%%%*/ 07303 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07304 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node)); 07305 /*% 07306 $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); 07307 %*/ 07308 ;} 07309 break; 07310 07311 case 259: 07312 #line 2499 "parse.y" 07313 { 07314 (yyval.val) = cmdarg_stack; 07315 CMDARG_PUSH(1); 07316 ;} 07317 break; 07318 07319 case 260: 07320 #line 2504 "parse.y" 07321 { 07322 /* CMDARG_POP() */ 07323 cmdarg_stack = (yyvsp[(1) - (2)].val); 07324 (yyval.node) = (yyvsp[(2) - (2)].node); 07325 ;} 07326 break; 07327 07328 case 261: 07329 #line 2512 "parse.y" 07330 { 07331 /*%%%*/ 07332 (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node)); 07333 /*% 07334 $$ = $2; 07335 %*/ 07336 ;} 07337 break; 07338 07339 case 262: 07340 #line 2522 "parse.y" 07341 { 07342 (yyval.node) = (yyvsp[(2) - (2)].node); 07343 ;} 07344 break; 07345 07346 case 263: 07347 #line 2526 "parse.y" 07348 { 07349 (yyval.node) = 0; 07350 ;} 07351 break; 07352 07353 case 264: 07354 #line 2532 "parse.y" 07355 { 07356 /*%%%*/ 07357 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07358 /*% 07359 $$ = arg_add(arg_new(), $1); 07360 %*/ 07361 ;} 07362 break; 07363 07364 case 265: 07365 #line 2540 "parse.y" 07366 { 07367 /*%%%*/ 07368 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07369 /*% 07370 $$ = arg_add_star(arg_new(), $2); 07371 %*/ 07372 ;} 07373 break; 07374 07375 case 266: 07376 #line 2548 "parse.y" 07377 { 07378 /*%%%*/ 07379 NODE *n1; 07380 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07381 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07382 } 07383 else { 07384 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07385 } 07386 /*% 07387 $$ = arg_add($1, $3); 07388 %*/ 07389 ;} 07390 break; 07391 07392 case 267: 07393 #line 2562 "parse.y" 07394 { 07395 /*%%%*/ 07396 NODE *n1; 07397 if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07398 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07399 } 07400 else { 07401 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07402 } 07403 /*% 07404 $$ = arg_add_star($1, $4); 07405 %*/ 07406 ;} 07407 break; 07408 07409 case 268: 07410 #line 2578 "parse.y" 07411 { 07412 /*%%%*/ 07413 NODE *n1; 07414 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07415 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07416 } 07417 else { 07418 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07419 } 07420 /*% 07421 $$ = mrhs_add(args2mrhs($1), $3); 07422 %*/ 07423 ;} 07424 break; 07425 07426 case 269: 07427 #line 2592 "parse.y" 07428 { 07429 /*%%%*/ 07430 NODE *n1; 07431 if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY && 07432 (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07433 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07434 } 07435 else { 07436 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07437 } 07438 /*% 07439 $$ = mrhs_add_star(args2mrhs($1), $4); 07440 %*/ 07441 ;} 07442 break; 07443 07444 case 270: 07445 #line 2607 "parse.y" 07446 { 07447 /*%%%*/ 07448 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07449 /*% 07450 $$ = mrhs_add_star(mrhs_new(), $2); 07451 %*/ 07452 ;} 07453 break; 07454 07455 case 279: 07456 #line 2625 "parse.y" 07457 { 07458 /*%%%*/ 07459 (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); 07460 /*% 07461 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07462 %*/ 07463 ;} 07464 break; 07465 07466 case 280: 07467 #line 2633 "parse.y" 07468 { 07469 /*%%%*/ 07470 (yyval.num) = ruby_sourceline; 07471 /*% 07472 %*/ 07473 ;} 07474 break; 07475 07476 case 281: 07477 #line 2641 "parse.y" 07478 { 07479 /*%%%*/ 07480 if ((yyvsp[(3) - (4)].node) == NULL) { 07481 (yyval.node) = NEW_NIL(); 07482 } 07483 else { 07484 if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE || 07485 nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE) 07486 nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num)); 07487 (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node)); 07488 } 07489 nd_set_line((yyval.node), (yyvsp[(2) - (4)].num)); 07490 /*% 07491 $$ = dispatch1(begin, $3); 07492 %*/ 07493 ;} 07494 break; 07495 07496 case 282: 07497 #line 2657 "parse.y" 07498 {lex_state = EXPR_ENDARG;;} 07499 break; 07500 07501 case 283: 07502 #line 2658 "parse.y" 07503 { 07504 rb_warning0("(...) interpreted as grouped expression"); 07505 /*%%%*/ 07506 (yyval.node) = (yyvsp[(2) - (4)].node); 07507 /*% 07508 $$ = dispatch1(paren, $2); 07509 %*/ 07510 ;} 07511 break; 07512 07513 case 284: 07514 #line 2667 "parse.y" 07515 { 07516 /*%%%*/ 07517 (yyval.node) = (yyvsp[(2) - (3)].node); 07518 /*% 07519 $$ = dispatch1(paren, $2); 07520 %*/ 07521 ;} 07522 break; 07523 07524 case 285: 07525 #line 2675 "parse.y" 07526 { 07527 /*%%%*/ 07528 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 07529 /*% 07530 $$ = dispatch2(const_path_ref, $1, $3); 07531 %*/ 07532 ;} 07533 break; 07534 07535 case 286: 07536 #line 2683 "parse.y" 07537 { 07538 /*%%%*/ 07539 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 07540 /*% 07541 $$ = dispatch1(top_const_ref, $2); 07542 %*/ 07543 ;} 07544 break; 07545 07546 case 287: 07547 #line 2691 "parse.y" 07548 { 07549 /*%%%*/ 07550 if ((yyvsp[(2) - (3)].node) == 0) { 07551 (yyval.node) = NEW_ZARRAY(); /* zero length array*/ 07552 } 07553 else { 07554 (yyval.node) = (yyvsp[(2) - (3)].node); 07555 } 07556 /*% 07557 $$ = dispatch1(array, escape_Qundef($2)); 07558 %*/ 07559 ;} 07560 break; 07561 07562 case 288: 07563 #line 2704 "parse.y" 07564 { 07565 /*%%%*/ 07566 (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node)); 07567 /*% 07568 $$ = dispatch1(hash, escape_Qundef($2)); 07569 %*/ 07570 ;} 07571 break; 07572 07573 case 289: 07574 #line 2712 "parse.y" 07575 { 07576 /*%%%*/ 07577 (yyval.node) = NEW_RETURN(0); 07578 /*% 07579 $$ = dispatch0(return0); 07580 %*/ 07581 ;} 07582 break; 07583 07584 case 290: 07585 #line 2720 "parse.y" 07586 { 07587 /*%%%*/ 07588 (yyval.node) = new_yield((yyvsp[(3) - (4)].node)); 07589 /*% 07590 $$ = dispatch1(yield, dispatch1(paren, $3)); 07591 %*/ 07592 ;} 07593 break; 07594 07595 case 291: 07596 #line 2728 "parse.y" 07597 { 07598 /*%%%*/ 07599 (yyval.node) = NEW_YIELD(0, Qfalse); 07600 /*% 07601 $$ = dispatch1(yield, dispatch1(paren, arg_new())); 07602 %*/ 07603 ;} 07604 break; 07605 07606 case 292: 07607 #line 2736 "parse.y" 07608 { 07609 /*%%%*/ 07610 (yyval.node) = NEW_YIELD(0, Qfalse); 07611 /*% 07612 $$ = dispatch0(yield0); 07613 %*/ 07614 ;} 07615 break; 07616 07617 case 293: 07618 #line 2743 "parse.y" 07619 {in_defined = 1;;} 07620 break; 07621 07622 case 294: 07623 #line 2744 "parse.y" 07624 { 07625 /*%%%*/ 07626 in_defined = 0; 07627 (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node)); 07628 /*% 07629 in_defined = 0; 07630 $$ = dispatch1(defined, $5); 07631 %*/ 07632 ;} 07633 break; 07634 07635 case 295: 07636 #line 2754 "parse.y" 07637 { 07638 /*%%%*/ 07639 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!'); 07640 /*% 07641 $$ = dispatch2(unary, ripper_intern("not"), $3); 07642 %*/ 07643 ;} 07644 break; 07645 07646 case 296: 07647 #line 2762 "parse.y" 07648 { 07649 /*%%%*/ 07650 (yyval.node) = call_uni_op(cond(NEW_NIL()), '!'); 07651 /*% 07652 $$ = dispatch2(unary, ripper_intern("not"), Qnil); 07653 %*/ 07654 ;} 07655 break; 07656 07657 case 297: 07658 #line 2770 "parse.y" 07659 { 07660 /*%%%*/ 07661 (yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0); 07662 (yyval.node) = (yyvsp[(2) - (2)].node); 07663 fixpos((yyvsp[(2) - (2)].node)->nd_iter, (yyvsp[(2) - (2)].node)); 07664 /*% 07665 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07666 $$ = method_add_block($$, $2); 07667 %*/ 07668 ;} 07669 break; 07670 07671 case 299: 07672 #line 2782 "parse.y" 07673 { 07674 /*%%%*/ 07675 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 07676 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 07677 (yyval.node) = (yyvsp[(2) - (2)].node); 07678 fixpos((yyval.node), (yyvsp[(1) - (2)].node)); 07679 /*% 07680 $$ = method_add_block($1, $2); 07681 %*/ 07682 ;} 07683 break; 07684 07685 case 300: 07686 #line 2793 "parse.y" 07687 { 07688 (yyval.node) = (yyvsp[(2) - (2)].node); 07689 ;} 07690 break; 07691 07692 case 301: 07693 #line 2800 "parse.y" 07694 { 07695 /*%%%*/ 07696 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 07697 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 07698 /*% 07699 $$ = dispatch3(if, $2, $4, escape_Qundef($5)); 07700 %*/ 07701 ;} 07702 break; 07703 07704 case 302: 07705 #line 2812 "parse.y" 07706 { 07707 /*%%%*/ 07708 (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 07709 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 07710 /*% 07711 $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); 07712 %*/ 07713 ;} 07714 break; 07715 07716 case 303: 07717 #line 2820 "parse.y" 07718 {COND_PUSH(1);;} 07719 break; 07720 07721 case 304: 07722 #line 2820 "parse.y" 07723 {COND_POP();;} 07724 break; 07725 07726 case 305: 07727 #line 2823 "parse.y" 07728 { 07729 /*%%%*/ 07730 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 07731 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 07732 /*% 07733 $$ = dispatch2(while, $3, $6); 07734 %*/ 07735 ;} 07736 break; 07737 07738 case 306: 07739 #line 2831 "parse.y" 07740 {COND_PUSH(1);;} 07741 break; 07742 07743 case 307: 07744 #line 2831 "parse.y" 07745 {COND_POP();;} 07746 break; 07747 07748 case 308: 07749 #line 2834 "parse.y" 07750 { 07751 /*%%%*/ 07752 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 07753 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 07754 /*% 07755 $$ = dispatch2(until, $3, $6); 07756 %*/ 07757 ;} 07758 break; 07759 07760 case 309: 07761 #line 2845 "parse.y" 07762 { 07763 /*%%%*/ 07764 (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 07765 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 07766 /*% 07767 $$ = dispatch2(case, $2, $4); 07768 %*/ 07769 ;} 07770 break; 07771 07772 case 310: 07773 #line 2854 "parse.y" 07774 { 07775 /*%%%*/ 07776 (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node)); 07777 /*% 07778 $$ = dispatch2(case, Qnil, $3); 07779 %*/ 07780 ;} 07781 break; 07782 07783 case 311: 07784 #line 2862 "parse.y" 07785 {COND_PUSH(1);;} 07786 break; 07787 07788 case 312: 07789 #line 2864 "parse.y" 07790 {COND_POP();;} 07791 break; 07792 07793 case 313: 07794 #line 2867 "parse.y" 07795 { 07796 /*%%%*/ 07797 /* 07798 * for a, b, c in e 07799 * #=> 07800 * e.each{|*x| a, b, c = x 07801 * 07802 * for a in e 07803 * #=> 07804 * e.each{|x| a, = x} 07805 */ 07806 ID id = internal_id(); 07807 ID *tbl = ALLOC_N(ID, 2); 07808 NODE *m = NEW_ARGS_AUX(0, 0); 07809 NODE *args, *scope; 07810 07811 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) { 07812 /* if args.length == 1 && args[0].kind_of?(Array) 07813 * args = args[0] 07814 * end 07815 */ 07816 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 07817 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 07818 m->nd_next = block_append( 07819 NEW_IF( 07820 NEW_NODE(NODE_AND, 07821 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), 07822 rb_intern("=="), one), 07823 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), 07824 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 07825 0), 07826 NEW_DASGN_CURR(id, 07827 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), 07828 0), 07829 node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id))); 07830 07831 args = new_args(m, 0, id, 0, 0); 07832 } 07833 else { 07834 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN || 07835 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN || 07836 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) { 07837 (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id); 07838 m->nd_plen = 1; 07839 m->nd_next = (yyvsp[(2) - (9)].node); 07840 args = new_args(m, 0, 0, 0, 0); 07841 } 07842 else { 07843 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id)); 07844 args = new_args(m, 0, id, 0, 0); 07845 } 07846 } 07847 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args); 07848 tbl[0] = 1; tbl[1] = id; 07849 (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope); 07850 fixpos((yyval.node), (yyvsp[(2) - (9)].node)); 07851 /*% 07852 $$ = dispatch3(for, $2, $5, $8); 07853 %*/ 07854 ;} 07855 break; 07856 07857 case 314: 07858 #line 2928 "parse.y" 07859 { 07860 if (in_def || in_single) 07861 yyerror("class definition in method body"); 07862 local_push(0); 07863 /*%%%*/ 07864 (yyval.num) = ruby_sourceline; 07865 /*% 07866 %*/ 07867 ;} 07868 break; 07869 07870 case 315: 07871 #line 2939 "parse.y" 07872 { 07873 /*%%%*/ 07874 (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node)); 07875 nd_set_line((yyval.node), (yyvsp[(4) - (6)].num)); 07876 /*% 07877 $$ = dispatch3(class, $2, $3, $5); 07878 %*/ 07879 local_pop(); 07880 ;} 07881 break; 07882 07883 case 316: 07884 #line 2949 "parse.y" 07885 { 07886 (yyval.num) = in_def; 07887 in_def = 0; 07888 ;} 07889 break; 07890 07891 case 317: 07892 #line 2954 "parse.y" 07893 { 07894 (yyval.num) = in_single; 07895 in_single = 0; 07896 local_push(0); 07897 ;} 07898 break; 07899 07900 case 318: 07901 #line 2961 "parse.y" 07902 { 07903 /*%%%*/ 07904 (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node)); 07905 fixpos((yyval.node), (yyvsp[(3) - (8)].node)); 07906 /*% 07907 $$ = dispatch2(sclass, $3, $7); 07908 %*/ 07909 local_pop(); 07910 in_def = (yyvsp[(4) - (8)].num); 07911 in_single = (yyvsp[(6) - (8)].num); 07912 ;} 07913 break; 07914 07915 case 319: 07916 #line 2973 "parse.y" 07917 { 07918 if (in_def || in_single) 07919 yyerror("module definition in method body"); 07920 local_push(0); 07921 /*%%%*/ 07922 (yyval.num) = ruby_sourceline; 07923 /*% 07924 %*/ 07925 ;} 07926 break; 07927 07928 case 320: 07929 #line 2984 "parse.y" 07930 { 07931 /*%%%*/ 07932 (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 07933 nd_set_line((yyval.node), (yyvsp[(3) - (5)].num)); 07934 /*% 07935 $$ = dispatch2(module, $2, $4); 07936 %*/ 07937 local_pop(); 07938 ;} 07939 break; 07940 07941 case 321: 07942 #line 2994 "parse.y" 07943 { 07944 (yyval.id) = cur_mid; 07945 cur_mid = (yyvsp[(2) - (2)].id); 07946 in_def++; 07947 local_push(0); 07948 ;} 07949 break; 07950 07951 case 322: 07952 #line 3003 "parse.y" 07953 { 07954 /*%%%*/ 07955 NODE *body = remove_begin((yyvsp[(5) - (6)].node)); 07956 reduce_nodes(&body); 07957 (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE); 07958 nd_set_line((yyval.node), (yyvsp[(1) - (6)].num)); 07959 /*% 07960 $$ = dispatch3(def, $2, $4, $5); 07961 %*/ 07962 local_pop(); 07963 in_def--; 07964 cur_mid = (yyvsp[(3) - (6)].id); 07965 ;} 07966 break; 07967 07968 case 323: 07969 #line 3016 "parse.y" 07970 {lex_state = EXPR_FNAME;;} 07971 break; 07972 07973 case 324: 07974 #line 3017 "parse.y" 07975 { 07976 in_single++; 07977 lex_state = EXPR_ENDFN; /* force for args */ 07978 local_push(0); 07979 ;} 07980 break; 07981 07982 case 325: 07983 #line 3025 "parse.y" 07984 { 07985 /*%%%*/ 07986 NODE *body = remove_begin((yyvsp[(8) - (9)].node)); 07987 reduce_nodes(&body); 07988 (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body); 07989 nd_set_line((yyval.node), (yyvsp[(1) - (9)].num)); 07990 /*% 07991 $$ = dispatch5(defs, $2, $3, $5, $7, $8); 07992 %*/ 07993 local_pop(); 07994 in_single--; 07995 ;} 07996 break; 07997 07998 case 326: 07999 #line 3038 "parse.y" 08000 { 08001 /*%%%*/ 08002 (yyval.node) = NEW_BREAK(0); 08003 /*% 08004 $$ = dispatch1(break, arg_new()); 08005 %*/ 08006 ;} 08007 break; 08008 08009 case 327: 08010 #line 3046 "parse.y" 08011 { 08012 /*%%%*/ 08013 (yyval.node) = NEW_NEXT(0); 08014 /*% 08015 $$ = dispatch1(next, arg_new()); 08016 %*/ 08017 ;} 08018 break; 08019 08020 case 328: 08021 #line 3054 "parse.y" 08022 { 08023 /*%%%*/ 08024 (yyval.node) = NEW_REDO(); 08025 /*% 08026 $$ = dispatch0(redo); 08027 %*/ 08028 ;} 08029 break; 08030 08031 case 329: 08032 #line 3062 "parse.y" 08033 { 08034 /*%%%*/ 08035 (yyval.node) = NEW_RETRY(); 08036 /*% 08037 $$ = dispatch0(retry); 08038 %*/ 08039 ;} 08040 break; 08041 08042 case 330: 08043 #line 3072 "parse.y" 08044 { 08045 /*%%%*/ 08046 value_expr((yyvsp[(1) - (1)].node)); 08047 (yyval.node) = (yyvsp[(1) - (1)].node); 08048 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 08049 /*% 08050 $$ = $1; 08051 %*/ 08052 ;} 08053 break; 08054 08055 case 331: 08056 #line 3084 "parse.y" 08057 { 08058 token_info_push("begin"); 08059 ;} 08060 break; 08061 08062 case 332: 08063 #line 3090 "parse.y" 08064 { 08065 token_info_push("if"); 08066 ;} 08067 break; 08068 08069 case 333: 08070 #line 3096 "parse.y" 08071 { 08072 token_info_push("unless"); 08073 ;} 08074 break; 08075 08076 case 334: 08077 #line 3102 "parse.y" 08078 { 08079 token_info_push("while"); 08080 ;} 08081 break; 08082 08083 case 335: 08084 #line 3108 "parse.y" 08085 { 08086 token_info_push("until"); 08087 ;} 08088 break; 08089 08090 case 336: 08091 #line 3114 "parse.y" 08092 { 08093 token_info_push("case"); 08094 ;} 08095 break; 08096 08097 case 337: 08098 #line 3120 "parse.y" 08099 { 08100 token_info_push("for"); 08101 ;} 08102 break; 08103 08104 case 338: 08105 #line 3126 "parse.y" 08106 { 08107 token_info_push("class"); 08108 ;} 08109 break; 08110 08111 case 339: 08112 #line 3132 "parse.y" 08113 { 08114 token_info_push("module"); 08115 ;} 08116 break; 08117 08118 case 340: 08119 #line 3138 "parse.y" 08120 { 08121 token_info_push("def"); 08122 /*%%%*/ 08123 (yyval.num) = ruby_sourceline; 08124 /*% 08125 %*/ 08126 ;} 08127 break; 08128 08129 case 341: 08130 #line 3148 "parse.y" 08131 { 08132 token_info_pop("end"); 08133 ;} 08134 break; 08135 08136 case 348: 08137 #line 3178 "parse.y" 08138 { 08139 /*%%%*/ 08140 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08141 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 08142 /*% 08143 $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); 08144 %*/ 08145 ;} 08146 break; 08147 08148 case 350: 08149 #line 3190 "parse.y" 08150 { 08151 /*%%%*/ 08152 (yyval.node) = (yyvsp[(2) - (2)].node); 08153 /*% 08154 $$ = dispatch1(else, $2); 08155 %*/ 08156 ;} 08157 break; 08158 08159 case 353: 08160 #line 3204 "parse.y" 08161 { 08162 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 08163 /*%%%*/ 08164 /*% 08165 $$ = dispatch1(mlhs_paren, $$); 08166 %*/ 08167 ;} 08168 break; 08169 08170 case 354: 08171 #line 3212 "parse.y" 08172 { 08173 /*%%%*/ 08174 (yyval.node) = (yyvsp[(2) - (3)].node); 08175 /*% 08176 $$ = dispatch1(mlhs_paren, $2); 08177 %*/ 08178 ;} 08179 break; 08180 08181 case 355: 08182 #line 3222 "parse.y" 08183 { 08184 /*%%%*/ 08185 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 08186 /*% 08187 $$ = mlhs_add(mlhs_new(), $1); 08188 %*/ 08189 ;} 08190 break; 08191 08192 case 356: 08193 #line 3230 "parse.y" 08194 { 08195 /*%%%*/ 08196 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 08197 /*% 08198 $$ = mlhs_add($1, $3); 08199 %*/ 08200 ;} 08201 break; 08202 08203 case 357: 08204 #line 3240 "parse.y" 08205 { 08206 /*%%%*/ 08207 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 08208 /*% 08209 $$ = $1; 08210 %*/ 08211 ;} 08212 break; 08213 08214 case 358: 08215 #line 3248 "parse.y" 08216 { 08217 (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0); 08218 /*%%%*/ 08219 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyval.node)); 08220 /*% 08221 $$ = mlhs_add_star($1, $$); 08222 %*/ 08223 ;} 08224 break; 08225 08226 case 359: 08227 #line 3257 "parse.y" 08228 { 08229 (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0); 08230 /*%%%*/ 08231 (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG((yyval.node), (yyvsp[(6) - (6)].node))); 08232 /*% 08233 $$ = mlhs_add_star($1, $$); 08234 %*/ 08235 ;} 08236 break; 08237 08238 case 360: 08239 #line 3266 "parse.y" 08240 { 08241 /*%%%*/ 08242 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1); 08243 /*% 08244 $$ = mlhs_add_star($1, Qnil); 08245 %*/ 08246 ;} 08247 break; 08248 08249 case 361: 08250 #line 3274 "parse.y" 08251 { 08252 /*%%%*/ 08253 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node))); 08254 /*% 08255 $$ = mlhs_add_star($1, $5); 08256 %*/ 08257 ;} 08258 break; 08259 08260 case 362: 08261 #line 3282 "parse.y" 08262 { 08263 (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0); 08264 /*%%%*/ 08265 (yyval.node) = NEW_MASGN(0, (yyval.node)); 08266 /*% 08267 $$ = mlhs_add_star(mlhs_new(), $$); 08268 %*/ 08269 ;} 08270 break; 08271 08272 case 363: 08273 #line 3291 "parse.y" 08274 { 08275 (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0); 08276 /*%%%*/ 08277 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyval.node), (yyvsp[(4) - (4)].node))); 08278 /*% 08279 #if 0 08280 TODO: Check me 08281 #endif 08282 $$ = mlhs_add_star($$, $4); 08283 %*/ 08284 ;} 08285 break; 08286 08287 case 364: 08288 #line 3303 "parse.y" 08289 { 08290 /*%%%*/ 08291 (yyval.node) = NEW_MASGN(0, -1); 08292 /*% 08293 $$ = mlhs_add_star(mlhs_new(), Qnil); 08294 %*/ 08295 ;} 08296 break; 08297 08298 case 365: 08299 #line 3311 "parse.y" 08300 { 08301 /*%%%*/ 08302 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 08303 /*% 08304 $$ = mlhs_add_star(mlhs_new(), Qnil); 08305 %*/ 08306 ;} 08307 break; 08308 08309 case 366: 08310 #line 3321 "parse.y" 08311 { 08312 /*%%%*/ 08313 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); 08314 /*% 08315 $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); 08316 %*/ 08317 ;} 08318 break; 08319 08320 case 367: 08321 #line 3329 "parse.y" 08322 { 08323 /*%%%*/ 08324 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id)); 08325 /*% 08326 $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); 08327 %*/ 08328 ;} 08329 break; 08330 08331 case 368: 08332 #line 3337 "parse.y" 08333 { 08334 /*%%%*/ 08335 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id)); 08336 /*% 08337 $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); 08338 %*/ 08339 ;} 08340 break; 08341 08342 case 369: 08343 #line 3345 "parse.y" 08344 { 08345 /*%%%*/ 08346 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 08347 /*% 08348 $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); 08349 %*/ 08350 ;} 08351 break; 08352 08353 case 370: 08354 #line 3353 "parse.y" 08355 { 08356 /*%%%*/ 08357 (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 08358 /*% 08359 $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); 08360 %*/ 08361 ;} 08362 break; 08363 08364 case 371: 08365 #line 3361 "parse.y" 08366 { 08367 /*%%%*/ 08368 (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 1, 0, 0); 08369 /*% 08370 $$ = params_new($1, Qnil, Qnil, Qnil, Qnil); 08371 dispatch1(excessed_comma, $$); 08372 %*/ 08373 ;} 08374 break; 08375 08376 case 372: 08377 #line 3370 "parse.y" 08378 { 08379 /*%%%*/ 08380 (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 08381 /*% 08382 $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); 08383 %*/ 08384 ;} 08385 break; 08386 08387 case 373: 08388 #line 3378 "parse.y" 08389 { 08390 /*%%%*/ 08391 (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id)); 08392 /*% 08393 $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2)); 08394 %*/ 08395 ;} 08396 break; 08397 08398 case 374: 08399 #line 3386 "parse.y" 08400 { 08401 /*%%%*/ 08402 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 08403 /*% 08404 $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); 08405 %*/ 08406 ;} 08407 break; 08408 08409 case 375: 08410 #line 3394 "parse.y" 08411 { 08412 /*%%%*/ 08413 (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 08414 /*% 08415 $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); 08416 %*/ 08417 ;} 08418 break; 08419 08420 case 376: 08421 #line 3402 "parse.y" 08422 { 08423 /*%%%*/ 08424 (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id)); 08425 /*% 08426 $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); 08427 %*/ 08428 ;} 08429 break; 08430 08431 case 377: 08432 #line 3410 "parse.y" 08433 { 08434 /*%%%*/ 08435 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 08436 /*% 08437 $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); 08438 %*/ 08439 ;} 08440 break; 08441 08442 case 378: 08443 #line 3418 "parse.y" 08444 { 08445 /*%%%*/ 08446 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id)); 08447 /*% 08448 $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2)); 08449 %*/ 08450 ;} 08451 break; 08452 08453 case 379: 08454 #line 3426 "parse.y" 08455 { 08456 /*%%%*/ 08457 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 08458 /*% 08459 $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); 08460 %*/ 08461 ;} 08462 break; 08463 08464 case 380: 08465 #line 3434 "parse.y" 08466 { 08467 /*%%%*/ 08468 (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id)); 08469 /*% 08470 $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); 08471 %*/ 08472 ;} 08473 break; 08474 08475 case 382: 08476 #line 3445 "parse.y" 08477 { 08478 command_start = TRUE; 08479 ;} 08480 break; 08481 08482 case 383: 08483 #line 3451 "parse.y" 08484 { 08485 /*%%%*/ 08486 (yyval.node) = 0; 08487 /*% 08488 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08489 escape_Qundef($2)); 08490 %*/ 08491 ;} 08492 break; 08493 08494 case 384: 08495 #line 3460 "parse.y" 08496 { 08497 /*%%%*/ 08498 (yyval.node) = 0; 08499 /*% 08500 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08501 Qnil); 08502 %*/ 08503 ;} 08504 break; 08505 08506 case 385: 08507 #line 3469 "parse.y" 08508 { 08509 /*%%%*/ 08510 (yyval.node) = (yyvsp[(2) - (4)].node); 08511 /*% 08512 $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); 08513 %*/ 08514 ;} 08515 break; 08516 08517 case 387: 08518 #line 3481 "parse.y" 08519 { 08520 /*%%%*/ 08521 (yyval.node) = 0; 08522 /*% 08523 $$ = $2; 08524 %*/ 08525 ;} 08526 break; 08527 08528 case 390: 08529 #line 3507 "parse.y" 08530 { 08531 new_bv(get_id((yyvsp[(1) - (1)].id))); 08532 /*%%%*/ 08533 /*% 08534 $$ = get_value($1); 08535 %*/ 08536 ;} 08537 break; 08538 08539 case 391: 08540 #line 3515 "parse.y" 08541 { 08542 (yyval.node) = 0; 08543 ;} 08544 break; 08545 08546 case 392: 08547 #line 3520 "parse.y" 08548 { 08549 (yyval.vars) = dyna_push(); 08550 ;} 08551 break; 08552 08553 case 393: 08554 #line 3523 "parse.y" 08555 { 08556 (yyval.num) = lpar_beg; 08557 lpar_beg = ++paren_nest; 08558 ;} 08559 break; 08560 08561 case 394: 08562 #line 3529 "parse.y" 08563 { 08564 lpar_beg = (yyvsp[(2) - (4)].num); 08565 /*%%%*/ 08566 (yyval.node) = (yyvsp[(3) - (4)].node); 08567 (yyval.node)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].node)->nd_head, (yyvsp[(4) - (4)].node)); 08568 /*% 08569 $$ = dispatch2(lambda, $3, $4); 08570 %*/ 08571 dyna_pop((yyvsp[(1) - (4)].vars)); 08572 ;} 08573 break; 08574 08575 case 395: 08576 #line 3542 "parse.y" 08577 { 08578 /*%%%*/ 08579 (yyval.node) = NEW_LAMBDA((yyvsp[(2) - (4)].node)); 08580 /*% 08581 $$ = dispatch1(paren, $2); 08582 %*/ 08583 ;} 08584 break; 08585 08586 case 396: 08587 #line 3550 "parse.y" 08588 { 08589 /*%%%*/ 08590 (yyval.node) = NEW_LAMBDA((yyvsp[(1) - (1)].node)); 08591 /*% 08592 $$ = $1; 08593 %*/ 08594 ;} 08595 break; 08596 08597 case 397: 08598 #line 3560 "parse.y" 08599 { 08600 (yyval.node) = (yyvsp[(2) - (3)].node); 08601 ;} 08602 break; 08603 08604 case 398: 08605 #line 3564 "parse.y" 08606 { 08607 (yyval.node) = (yyvsp[(2) - (3)].node); 08608 ;} 08609 break; 08610 08611 case 399: 08612 #line 3570 "parse.y" 08613 { 08614 (yyvsp[(1) - (1)].vars) = dyna_push(); 08615 /*%%%*/ 08616 (yyval.num) = ruby_sourceline; 08617 /*% %*/ 08618 ;} 08619 break; 08620 08621 case 400: 08622 #line 3579 "parse.y" 08623 { 08624 /*%%%*/ 08625 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08626 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08627 /*% 08628 $$ = dispatch2(do_block, escape_Qundef($3), $4); 08629 %*/ 08630 dyna_pop((yyvsp[(1) - (5)].vars)); 08631 ;} 08632 break; 08633 08634 case 401: 08635 #line 3591 "parse.y" 08636 { 08637 /*%%%*/ 08638 if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) { 08639 compile_error(PARSER_ARG "block given to yield"); 08640 } 08641 else { 08642 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 08643 } 08644 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 08645 (yyval.node) = (yyvsp[(2) - (2)].node); 08646 fixpos((yyval.node), (yyvsp[(1) - (2)].node)); 08647 /*% 08648 $$ = method_add_block($1, $2); 08649 %*/ 08650 ;} 08651 break; 08652 08653 case 402: 08654 #line 3607 "parse.y" 08655 { 08656 /*%%%*/ 08657 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08658 /*% 08659 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08660 $$ = method_optarg($$, $4); 08661 %*/ 08662 ;} 08663 break; 08664 08665 case 403: 08666 #line 3616 "parse.y" 08667 { 08668 /*%%%*/ 08669 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08670 /*% 08671 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 08672 $$ = method_optarg($$, $4); 08673 %*/ 08674 ;} 08675 break; 08676 08677 case 404: 08678 #line 3627 "parse.y" 08679 { 08680 /*%%%*/ 08681 (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 08682 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 08683 /*% 08684 $$ = method_arg(dispatch1(fcall, $1), $2); 08685 %*/ 08686 ;} 08687 break; 08688 08689 case 405: 08690 #line 3636 "parse.y" 08691 { 08692 /*%%%*/ 08693 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08694 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 08695 /*% 08696 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08697 $$ = method_optarg($$, $4); 08698 %*/ 08699 ;} 08700 break; 08701 08702 case 406: 08703 #line 3646 "parse.y" 08704 { 08705 /*%%%*/ 08706 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08707 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 08708 /*% 08709 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08710 $$ = method_optarg($$, $4); 08711 %*/ 08712 ;} 08713 break; 08714 08715 case 407: 08716 #line 3656 "parse.y" 08717 { 08718 /*%%%*/ 08719 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0); 08720 /*% 08721 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 08722 %*/ 08723 ;} 08724 break; 08725 08726 case 408: 08727 #line 3664 "parse.y" 08728 { 08729 /*%%%*/ 08730 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node)); 08731 fixpos((yyval.node), (yyvsp[(1) - (3)].node)); 08732 /*% 08733 $$ = dispatch3(call, $1, ripper_id2sym('.'), 08734 ripper_intern("call")); 08735 $$ = method_optarg($$, $3); 08736 %*/ 08737 ;} 08738 break; 08739 08740 case 409: 08741 #line 3675 "parse.y" 08742 { 08743 /*%%%*/ 08744 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node)); 08745 fixpos((yyval.node), (yyvsp[(1) - (3)].node)); 08746 /*% 08747 $$ = dispatch3(call, $1, ripper_intern("::"), 08748 ripper_intern("call")); 08749 $$ = method_optarg($$, $3); 08750 %*/ 08751 ;} 08752 break; 08753 08754 case 410: 08755 #line 3686 "parse.y" 08756 { 08757 /*%%%*/ 08758 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 08759 /*% 08760 $$ = dispatch1(super, $2); 08761 %*/ 08762 ;} 08763 break; 08764 08765 case 411: 08766 #line 3694 "parse.y" 08767 { 08768 /*%%%*/ 08769 (yyval.node) = NEW_ZSUPER(); 08770 /*% 08771 $$ = dispatch0(zsuper); 08772 %*/ 08773 ;} 08774 break; 08775 08776 case 412: 08777 #line 3702 "parse.y" 08778 { 08779 /*%%%*/ 08780 if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) 08781 (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node)); 08782 else 08783 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node)); 08784 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 08785 /*% 08786 $$ = dispatch2(aref, $1, escape_Qundef($3)); 08787 %*/ 08788 ;} 08789 break; 08790 08791 case 413: 08792 #line 3716 "parse.y" 08793 { 08794 (yyvsp[(1) - (1)].vars) = dyna_push(); 08795 /*%%%*/ 08796 (yyval.num) = ruby_sourceline; 08797 /*% 08798 %*/ 08799 ;} 08800 break; 08801 08802 case 414: 08803 #line 3725 "parse.y" 08804 { 08805 /*%%%*/ 08806 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08807 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08808 /*% 08809 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 08810 %*/ 08811 dyna_pop((yyvsp[(1) - (5)].vars)); 08812 ;} 08813 break; 08814 08815 case 415: 08816 #line 3735 "parse.y" 08817 { 08818 (yyvsp[(1) - (1)].vars) = dyna_push(); 08819 /*%%%*/ 08820 (yyval.num) = ruby_sourceline; 08821 /*% 08822 %*/ 08823 ;} 08824 break; 08825 08826 case 416: 08827 #line 3744 "parse.y" 08828 { 08829 /*%%%*/ 08830 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08831 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08832 /*% 08833 $$ = dispatch2(do_block, escape_Qundef($3), $4); 08834 %*/ 08835 dyna_pop((yyvsp[(1) - (5)].vars)); 08836 ;} 08837 break; 08838 08839 case 417: 08840 #line 3758 "parse.y" 08841 { 08842 /*%%%*/ 08843 (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08844 /*% 08845 $$ = dispatch3(when, $2, $4, escape_Qundef($5)); 08846 %*/ 08847 ;} 08848 break; 08849 08850 case 420: 08851 #line 3774 "parse.y" 08852 { 08853 /*%%%*/ 08854 if ((yyvsp[(3) - (6)].node)) { 08855 (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO()); 08856 (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)); 08857 } 08858 (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 08859 fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node)); 08860 /*% 08861 $$ = dispatch4(rescue, 08862 escape_Qundef($2), 08863 escape_Qundef($3), 08864 escape_Qundef($5), 08865 escape_Qundef($6)); 08866 %*/ 08867 ;} 08868 break; 08869 08870 case 422: 08871 #line 3794 "parse.y" 08872 { 08873 /*%%%*/ 08874 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 08875 /*% 08876 $$ = rb_ary_new3(1, $1); 08877 %*/ 08878 ;} 08879 break; 08880 08881 case 423: 08882 #line 3802 "parse.y" 08883 { 08884 /*%%%*/ 08885 if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node); 08886 /*% 08887 $$ = $1; 08888 %*/ 08889 ;} 08890 break; 08891 08892 case 425: 08893 #line 3813 "parse.y" 08894 { 08895 (yyval.node) = (yyvsp[(2) - (2)].node); 08896 ;} 08897 break; 08898 08899 case 427: 08900 #line 3820 "parse.y" 08901 { 08902 /*%%%*/ 08903 (yyval.node) = (yyvsp[(2) - (2)].node); 08904 /*% 08905 $$ = dispatch1(ensure, $2); 08906 %*/ 08907 ;} 08908 break; 08909 08910 case 430: 08911 #line 3832 "parse.y" 08912 { 08913 /*%%%*/ 08914 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 08915 /*% 08916 $$ = dispatch1(symbol_literal, $1); 08917 %*/ 08918 ;} 08919 break; 08920 08921 case 432: 08922 #line 3843 "parse.y" 08923 { 08924 /*%%%*/ 08925 NODE *node = (yyvsp[(1) - (1)].node); 08926 if (!node) { 08927 node = NEW_STR(STR_NEW0()); 08928 } 08929 else { 08930 node = evstr2dstr(node); 08931 } 08932 (yyval.node) = node; 08933 /*% 08934 $$ = $1; 08935 %*/ 08936 ;} 08937 break; 08938 08939 case 435: 08940 #line 3862 "parse.y" 08941 { 08942 /*%%%*/ 08943 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 08944 /*% 08945 $$ = dispatch2(string_concat, $1, $2); 08946 %*/ 08947 ;} 08948 break; 08949 08950 case 436: 08951 #line 3872 "parse.y" 08952 { 08953 /*%%%*/ 08954 (yyval.node) = (yyvsp[(2) - (3)].node); 08955 /*% 08956 $$ = dispatch1(string_literal, $2); 08957 %*/ 08958 ;} 08959 break; 08960 08961 case 437: 08962 #line 3882 "parse.y" 08963 { 08964 /*%%%*/ 08965 NODE *node = (yyvsp[(2) - (3)].node); 08966 if (!node) { 08967 node = NEW_XSTR(STR_NEW0()); 08968 } 08969 else { 08970 switch (nd_type(node)) { 08971 case NODE_STR: 08972 nd_set_type(node, NODE_XSTR); 08973 break; 08974 case NODE_DSTR: 08975 nd_set_type(node, NODE_DXSTR); 08976 break; 08977 default: 08978 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 08979 break; 08980 } 08981 } 08982 (yyval.node) = node; 08983 /*% 08984 $$ = dispatch1(xstring_literal, $2); 08985 %*/ 08986 ;} 08987 break; 08988 08989 case 438: 08990 #line 3909 "parse.y" 08991 { 08992 /*%%%*/ 08993 int options = (yyvsp[(3) - (3)].num); 08994 NODE *node = (yyvsp[(2) - (3)].node); 08995 NODE *list, *prev; 08996 if (!node) { 08997 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 08998 } 08999 else switch (nd_type(node)) { 09000 case NODE_STR: 09001 { 09002 VALUE src = node->nd_lit; 09003 nd_set_type(node, NODE_LIT); 09004 node->nd_lit = reg_compile(src, options); 09005 } 09006 break; 09007 default: 09008 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09009 case NODE_DSTR: 09010 if (options & RE_OPTION_ONCE) { 09011 nd_set_type(node, NODE_DREGX_ONCE); 09012 } 09013 else { 09014 nd_set_type(node, NODE_DREGX); 09015 } 09016 node->nd_cflag = options & RE_OPTION_MASK; 09017 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09018 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09019 if (nd_type(list->nd_head) == NODE_STR) { 09020 VALUE tail = list->nd_head->nd_lit; 09021 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09022 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09023 if (!literal_concat0(parser, lit, tail)) { 09024 node = 0; 09025 break; 09026 } 09027 rb_str_resize(tail, 0); 09028 prev->nd_next = list->nd_next; 09029 rb_gc_force_recycle((VALUE)list->nd_head); 09030 rb_gc_force_recycle((VALUE)list); 09031 list = prev; 09032 } 09033 else { 09034 prev = list; 09035 } 09036 } 09037 else { 09038 prev = 0; 09039 } 09040 } 09041 if (!node->nd_next) { 09042 VALUE src = node->nd_lit; 09043 nd_set_type(node, NODE_LIT); 09044 node->nd_lit = reg_compile(src, options); 09045 } 09046 break; 09047 } 09048 (yyval.node) = node; 09049 /*% 09050 $$ = dispatch2(regexp_literal, $2, $3); 09051 %*/ 09052 ;} 09053 break; 09054 09055 case 439: 09056 #line 3974 "parse.y" 09057 { 09058 /*%%%*/ 09059 (yyval.node) = NEW_ZARRAY(); 09060 /*% 09061 $$ = dispatch0(words_new); 09062 $$ = dispatch1(array, $$); 09063 %*/ 09064 ;} 09065 break; 09066 09067 case 440: 09068 #line 3983 "parse.y" 09069 { 09070 /*%%%*/ 09071 (yyval.node) = (yyvsp[(2) - (3)].node); 09072 /*% 09073 $$ = dispatch1(array, $2); 09074 %*/ 09075 ;} 09076 break; 09077 09078 case 441: 09079 #line 3993 "parse.y" 09080 { 09081 /*%%%*/ 09082 (yyval.node) = 0; 09083 /*% 09084 $$ = dispatch0(words_new); 09085 %*/ 09086 ;} 09087 break; 09088 09089 case 442: 09090 #line 4001 "parse.y" 09091 { 09092 /*%%%*/ 09093 (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node))); 09094 /*% 09095 $$ = dispatch2(words_add, $1, $2); 09096 %*/ 09097 ;} 09098 break; 09099 09100 case 444: 09101 #line 4019 "parse.y" 09102 { 09103 /*%%%*/ 09104 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09105 /*% 09106 $$ = dispatch2(word_add, $1, $2); 09107 %*/ 09108 ;} 09109 break; 09110 09111 case 445: 09112 #line 4029 "parse.y" 09113 { 09114 /*%%%*/ 09115 (yyval.node) = NEW_ZARRAY(); 09116 /*% 09117 $$ = dispatch0(qwords_new); 09118 $$ = dispatch1(array, $$); 09119 %*/ 09120 ;} 09121 break; 09122 09123 case 446: 09124 #line 4038 "parse.y" 09125 { 09126 /*%%%*/ 09127 (yyval.node) = (yyvsp[(2) - (3)].node); 09128 /*% 09129 $$ = dispatch1(array, $2); 09130 %*/ 09131 ;} 09132 break; 09133 09134 case 447: 09135 #line 4048 "parse.y" 09136 { 09137 /*%%%*/ 09138 (yyval.node) = 0; 09139 /*% 09140 $$ = dispatch0(qwords_new); 09141 %*/ 09142 ;} 09143 break; 09144 09145 case 448: 09146 #line 4056 "parse.y" 09147 { 09148 /*%%%*/ 09149 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 09150 /*% 09151 $$ = dispatch2(qwords_add, $1, $2); 09152 %*/ 09153 ;} 09154 break; 09155 09156 case 449: 09157 #line 4066 "parse.y" 09158 { 09159 /*%%%*/ 09160 (yyval.node) = 0; 09161 /*% 09162 $$ = dispatch0(string_content); 09163 %*/ 09164 ;} 09165 break; 09166 09167 case 450: 09168 #line 4074 "parse.y" 09169 { 09170 /*%%%*/ 09171 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09172 /*% 09173 $$ = dispatch2(string_add, $1, $2); 09174 %*/ 09175 ;} 09176 break; 09177 09178 case 451: 09179 #line 4084 "parse.y" 09180 { 09181 /*%%%*/ 09182 (yyval.node) = 0; 09183 /*% 09184 $$ = dispatch0(xstring_new); 09185 %*/ 09186 ;} 09187 break; 09188 09189 case 452: 09190 #line 4092 "parse.y" 09191 { 09192 /*%%%*/ 09193 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09194 /*% 09195 $$ = dispatch2(xstring_add, $1, $2); 09196 %*/ 09197 ;} 09198 break; 09199 09200 case 453: 09201 #line 4102 "parse.y" 09202 { 09203 /*%%%*/ 09204 (yyval.node) = 0; 09205 /*% 09206 $$ = dispatch0(regexp_new); 09207 %*/ 09208 ;} 09209 break; 09210 09211 case 454: 09212 #line 4110 "parse.y" 09213 { 09214 /*%%%*/ 09215 NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node); 09216 if (!head) { 09217 (yyval.node) = tail; 09218 } 09219 else if (!tail) { 09220 (yyval.node) = head; 09221 } 09222 else { 09223 switch (nd_type(head)) { 09224 case NODE_STR: 09225 nd_set_type(head, NODE_DSTR); 09226 break; 09227 case NODE_DSTR: 09228 break; 09229 default: 09230 head = list_append(NEW_DSTR(Qnil), head); 09231 break; 09232 } 09233 (yyval.node) = list_append(head, tail); 09234 } 09235 /*% 09236 $$ = dispatch2(regexp_add, $1, $2); 09237 %*/ 09238 ;} 09239 break; 09240 09241 case 456: 09242 #line 4140 "parse.y" 09243 { 09244 (yyval.node) = lex_strterm; 09245 lex_strterm = 0; 09246 lex_state = EXPR_BEG; 09247 ;} 09248 break; 09249 09250 case 457: 09251 #line 4146 "parse.y" 09252 { 09253 /*%%%*/ 09254 lex_strterm = (yyvsp[(2) - (3)].node); 09255 (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node)); 09256 /*% 09257 lex_strterm = $<node>2; 09258 $$ = dispatch1(string_dvar, $3); 09259 %*/ 09260 ;} 09261 break; 09262 09263 case 458: 09264 #line 4156 "parse.y" 09265 { 09266 (yyvsp[(1) - (1)].val) = cond_stack; 09267 (yyval.val) = cmdarg_stack; 09268 cond_stack = 0; 09269 cmdarg_stack = 0; 09270 ;} 09271 break; 09272 09273 case 459: 09274 #line 4162 "parse.y" 09275 { 09276 (yyval.node) = lex_strterm; 09277 lex_strterm = 0; 09278 lex_state = EXPR_BEG; 09279 ;} 09280 break; 09281 09282 case 460: 09283 #line 4168 "parse.y" 09284 { 09285 cond_stack = (yyvsp[(1) - (5)].val); 09286 cmdarg_stack = (yyvsp[(2) - (5)].val); 09287 lex_strterm = (yyvsp[(3) - (5)].node); 09288 /*%%%*/ 09289 if ((yyvsp[(4) - (5)].node)) (yyvsp[(4) - (5)].node)->flags &= ~NODE_FL_NEWLINE; 09290 (yyval.node) = new_evstr((yyvsp[(4) - (5)].node)); 09291 /*% 09292 $$ = dispatch1(string_embexpr, $4); 09293 %*/ 09294 ;} 09295 break; 09296 09297 case 461: 09298 #line 4182 "parse.y" 09299 { 09300 /*%%%*/ 09301 (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id)); 09302 /*% 09303 $$ = dispatch1(var_ref, $1); 09304 %*/ 09305 ;} 09306 break; 09307 09308 case 462: 09309 #line 4190 "parse.y" 09310 { 09311 /*%%%*/ 09312 (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id)); 09313 /*% 09314 $$ = dispatch1(var_ref, $1); 09315 %*/ 09316 ;} 09317 break; 09318 09319 case 463: 09320 #line 4198 "parse.y" 09321 { 09322 /*%%%*/ 09323 (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id)); 09324 /*% 09325 $$ = dispatch1(var_ref, $1); 09326 %*/ 09327 ;} 09328 break; 09329 09330 case 465: 09331 #line 4209 "parse.y" 09332 { 09333 lex_state = EXPR_END; 09334 /*%%%*/ 09335 (yyval.id) = (yyvsp[(2) - (2)].id); 09336 /*% 09337 $$ = dispatch1(symbol, $2); 09338 %*/ 09339 ;} 09340 break; 09341 09342 case 470: 09343 #line 4226 "parse.y" 09344 { 09345 lex_state = EXPR_END; 09346 /*%%%*/ 09347 if (!((yyval.node) = (yyvsp[(2) - (3)].node))) { 09348 (yyval.node) = NEW_LIT(ID2SYM(rb_intern(""))); 09349 } 09350 else { 09351 VALUE lit; 09352 09353 switch (nd_type((yyval.node))) { 09354 case NODE_DSTR: 09355 nd_set_type((yyval.node), NODE_DSYM); 09356 break; 09357 case NODE_STR: 09358 lit = (yyval.node)->nd_lit; 09359 (yyval.node)->nd_lit = ID2SYM(rb_intern_str(lit)); 09360 nd_set_type((yyval.node), NODE_LIT); 09361 break; 09362 default: 09363 (yyval.node) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.node))); 09364 break; 09365 } 09366 } 09367 /*% 09368 $$ = dispatch1(dyna_symbol, $2); 09369 %*/ 09370 ;} 09371 break; 09372 09373 case 473: 09374 #line 4258 "parse.y" 09375 { 09376 /*%%%*/ 09377 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 09378 /*% 09379 $$ = dispatch2(unary, ripper_intern("-@"), $2); 09380 %*/ 09381 ;} 09382 break; 09383 09384 case 474: 09385 #line 4266 "parse.y" 09386 { 09387 /*%%%*/ 09388 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 09389 /*% 09390 $$ = dispatch2(unary, ripper_intern("-@"), $2); 09391 %*/ 09392 ;} 09393 break; 09394 09395 case 480: 09396 #line 4282 "parse.y" 09397 {ifndef_ripper((yyval.id) = keyword_nil);;} 09398 break; 09399 09400 case 481: 09401 #line 4283 "parse.y" 09402 {ifndef_ripper((yyval.id) = keyword_self);;} 09403 break; 09404 09405 case 482: 09406 #line 4284 "parse.y" 09407 {ifndef_ripper((yyval.id) = keyword_true);;} 09408 break; 09409 09410 case 483: 09411 #line 4285 "parse.y" 09412 {ifndef_ripper((yyval.id) = keyword_false);;} 09413 break; 09414 09415 case 484: 09416 #line 4286 "parse.y" 09417 {ifndef_ripper((yyval.id) = keyword__FILE__);;} 09418 break; 09419 09420 case 485: 09421 #line 4287 "parse.y" 09422 {ifndef_ripper((yyval.id) = keyword__LINE__);;} 09423 break; 09424 09425 case 486: 09426 #line 4288 "parse.y" 09427 {ifndef_ripper((yyval.id) = keyword__ENCODING__);;} 09428 break; 09429 09430 case 487: 09431 #line 4292 "parse.y" 09432 { 09433 /*%%%*/ 09434 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 09435 /*% 09436 if (id_is_var(get_id($1))) { 09437 $$ = dispatch1(var_ref, $1); 09438 } 09439 else { 09440 $$ = dispatch1(vcall, $1); 09441 } 09442 %*/ 09443 ;} 09444 break; 09445 09446 case 488: 09447 #line 4305 "parse.y" 09448 { 09449 /*%%%*/ 09450 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 09451 /*% 09452 $$ = dispatch1(var_ref, $1); 09453 %*/ 09454 ;} 09455 break; 09456 09457 case 489: 09458 #line 4315 "parse.y" 09459 { 09460 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 09461 /*%%%*/ 09462 /*% 09463 $$ = dispatch1(var_field, $$); 09464 %*/ 09465 ;} 09466 break; 09467 09468 case 490: 09469 #line 4323 "parse.y" 09470 { 09471 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 09472 /*%%%*/ 09473 /*% 09474 $$ = dispatch1(var_field, $$); 09475 %*/ 09476 ;} 09477 break; 09478 09479 case 493: 09480 #line 4337 "parse.y" 09481 { 09482 /*%%%*/ 09483 (yyval.node) = 0; 09484 /*% 09485 $$ = Qnil; 09486 %*/ 09487 ;} 09488 break; 09489 09490 case 494: 09491 #line 4345 "parse.y" 09492 { 09493 lex_state = EXPR_BEG; 09494 ;} 09495 break; 09496 09497 case 495: 09498 #line 4349 "parse.y" 09499 { 09500 (yyval.node) = (yyvsp[(3) - (4)].node); 09501 ;} 09502 break; 09503 09504 case 496: 09505 #line 4353 "parse.y" 09506 { 09507 /*%%%*/ 09508 yyerrok; 09509 (yyval.node) = 0; 09510 /*% 09511 yyerrok; 09512 $$ = Qnil; 09513 %*/ 09514 ;} 09515 break; 09516 09517 case 497: 09518 #line 4365 "parse.y" 09519 { 09520 /*%%%*/ 09521 (yyval.node) = (yyvsp[(2) - (3)].node); 09522 /*% 09523 $$ = dispatch1(paren, $2); 09524 %*/ 09525 lex_state = EXPR_BEG; 09526 command_start = TRUE; 09527 ;} 09528 break; 09529 09530 case 498: 09531 #line 4375 "parse.y" 09532 { 09533 (yyval.node) = (yyvsp[(1) - (2)].node); 09534 lex_state = EXPR_BEG; 09535 command_start = TRUE; 09536 ;} 09537 break; 09538 09539 case 499: 09540 #line 4383 "parse.y" 09541 { 09542 /*%%%*/ 09543 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); 09544 /*% 09545 $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); 09546 %*/ 09547 ;} 09548 break; 09549 09550 case 500: 09551 #line 4391 "parse.y" 09552 { 09553 /*%%%*/ 09554 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id)); 09555 /*% 09556 $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); 09557 %*/ 09558 ;} 09559 break; 09560 09561 case 501: 09562 #line 4399 "parse.y" 09563 { 09564 /*%%%*/ 09565 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id)); 09566 /*% 09567 $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); 09568 %*/ 09569 ;} 09570 break; 09571 09572 case 502: 09573 #line 4407 "parse.y" 09574 { 09575 /*%%%*/ 09576 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 09577 /*% 09578 $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); 09579 %*/ 09580 ;} 09581 break; 09582 09583 case 503: 09584 #line 4415 "parse.y" 09585 { 09586 /*%%%*/ 09587 (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 09588 /*% 09589 $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); 09590 %*/ 09591 ;} 09592 break; 09593 09594 case 504: 09595 #line 4423 "parse.y" 09596 { 09597 /*%%%*/ 09598 (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 09599 /*% 09600 $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); 09601 %*/ 09602 ;} 09603 break; 09604 09605 case 505: 09606 #line 4431 "parse.y" 09607 { 09608 /*%%%*/ 09609 (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id)); 09610 /*% 09611 $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2)); 09612 %*/ 09613 ;} 09614 break; 09615 09616 case 506: 09617 #line 4439 "parse.y" 09618 { 09619 /*%%%*/ 09620 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 09621 /*% 09622 $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); 09623 %*/ 09624 ;} 09625 break; 09626 09627 case 507: 09628 #line 4447 "parse.y" 09629 { 09630 /*%%%*/ 09631 (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 09632 /*% 09633 $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); 09634 %*/ 09635 ;} 09636 break; 09637 09638 case 508: 09639 #line 4455 "parse.y" 09640 { 09641 /*%%%*/ 09642 (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id)); 09643 /*% 09644 $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); 09645 %*/ 09646 ;} 09647 break; 09648 09649 case 509: 09650 #line 4463 "parse.y" 09651 { 09652 /*%%%*/ 09653 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 09654 /*% 09655 $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); 09656 %*/ 09657 ;} 09658 break; 09659 09660 case 510: 09661 #line 4471 "parse.y" 09662 { 09663 /*%%%*/ 09664 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id)); 09665 /*% 09666 $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2)); 09667 %*/ 09668 ;} 09669 break; 09670 09671 case 511: 09672 #line 4479 "parse.y" 09673 { 09674 /*%%%*/ 09675 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 09676 /*% 09677 $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); 09678 %*/ 09679 ;} 09680 break; 09681 09682 case 512: 09683 #line 4487 "parse.y" 09684 { 09685 /*%%%*/ 09686 (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id)); 09687 /*% 09688 $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); 09689 %*/ 09690 ;} 09691 break; 09692 09693 case 513: 09694 #line 4495 "parse.y" 09695 { 09696 /*%%%*/ 09697 (yyval.node) = new_args(0, 0, 0, 0, 0); 09698 /*% 09699 $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); 09700 %*/ 09701 ;} 09702 break; 09703 09704 case 514: 09705 #line 4505 "parse.y" 09706 { 09707 /*%%%*/ 09708 yyerror("formal argument cannot be a constant"); 09709 (yyval.id) = 0; 09710 /*% 09711 $$ = dispatch1(param_error, $1); 09712 %*/ 09713 ;} 09714 break; 09715 09716 case 515: 09717 #line 4514 "parse.y" 09718 { 09719 /*%%%*/ 09720 yyerror("formal argument cannot be an instance variable"); 09721 (yyval.id) = 0; 09722 /*% 09723 $$ = dispatch1(param_error, $1); 09724 %*/ 09725 ;} 09726 break; 09727 09728 case 516: 09729 #line 4523 "parse.y" 09730 { 09731 /*%%%*/ 09732 yyerror("formal argument cannot be a global variable"); 09733 (yyval.id) = 0; 09734 /*% 09735 $$ = dispatch1(param_error, $1); 09736 %*/ 09737 ;} 09738 break; 09739 09740 case 517: 09741 #line 4532 "parse.y" 09742 { 09743 /*%%%*/ 09744 yyerror("formal argument cannot be a class variable"); 09745 (yyval.id) = 0; 09746 /*% 09747 $$ = dispatch1(param_error, $1); 09748 %*/ 09749 ;} 09750 break; 09751 09752 case 519: 09753 #line 4544 "parse.y" 09754 { 09755 formal_argument(get_id((yyvsp[(1) - (1)].id))); 09756 (yyval.id) = (yyvsp[(1) - (1)].id); 09757 ;} 09758 break; 09759 09760 case 520: 09761 #line 4551 "parse.y" 09762 { 09763 arg_var(get_id((yyvsp[(1) - (1)].id))); 09764 /*%%%*/ 09765 (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1); 09766 /*% 09767 $$ = get_value($1); 09768 %*/ 09769 ;} 09770 break; 09771 09772 case 521: 09773 #line 4560 "parse.y" 09774 { 09775 ID tid = internal_id(); 09776 arg_var(tid); 09777 /*%%%*/ 09778 if (dyna_in_block()) { 09779 (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid); 09780 } 09781 else { 09782 (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid); 09783 } 09784 (yyval.node) = NEW_ARGS_AUX(tid, 1); 09785 (yyval.node)->nd_next = (yyvsp[(2) - (3)].node); 09786 /*% 09787 $$ = dispatch1(mlhs_paren, $2); 09788 %*/ 09789 ;} 09790 break; 09791 09792 case 523: 09793 #line 4586 "parse.y" 09794 { 09795 /*%%%*/ 09796 (yyval.node) = (yyvsp[(1) - (3)].node); 09797 (yyval.node)->nd_plen++; 09798 (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next); 09799 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node)); 09800 /*% 09801 $$ = rb_ary_push($1, $3); 09802 %*/ 09803 ;} 09804 break; 09805 09806 case 524: 09807 #line 4599 "parse.y" 09808 { 09809 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 09810 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 09811 /*%%%*/ 09812 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 09813 /*% 09814 $$ = rb_assoc_new($$, $3); 09815 %*/ 09816 ;} 09817 break; 09818 09819 case 525: 09820 #line 4611 "parse.y" 09821 { 09822 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 09823 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 09824 /*%%%*/ 09825 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 09826 /*% 09827 $$ = rb_assoc_new($$, $3); 09828 %*/ 09829 ;} 09830 break; 09831 09832 case 526: 09833 #line 4623 "parse.y" 09834 { 09835 /*%%%*/ 09836 (yyval.node) = (yyvsp[(1) - (1)].node); 09837 /*% 09838 $$ = rb_ary_new3(1, $1); 09839 %*/ 09840 ;} 09841 break; 09842 09843 case 527: 09844 #line 4631 "parse.y" 09845 { 09846 /*%%%*/ 09847 NODE *opts = (yyvsp[(1) - (3)].node); 09848 09849 while (opts->nd_next) { 09850 opts = opts->nd_next; 09851 } 09852 opts->nd_next = (yyvsp[(3) - (3)].node); 09853 (yyval.node) = (yyvsp[(1) - (3)].node); 09854 /*% 09855 $$ = rb_ary_push($1, $3); 09856 %*/ 09857 ;} 09858 break; 09859 09860 case 528: 09861 #line 4647 "parse.y" 09862 { 09863 /*%%%*/ 09864 (yyval.node) = (yyvsp[(1) - (1)].node); 09865 /*% 09866 $$ = rb_ary_new3(1, $1); 09867 %*/ 09868 ;} 09869 break; 09870 09871 case 529: 09872 #line 4655 "parse.y" 09873 { 09874 /*%%%*/ 09875 NODE *opts = (yyvsp[(1) - (3)].node); 09876 09877 while (opts->nd_next) { 09878 opts = opts->nd_next; 09879 } 09880 opts->nd_next = (yyvsp[(3) - (3)].node); 09881 (yyval.node) = (yyvsp[(1) - (3)].node); 09882 /*% 09883 $$ = rb_ary_push($1, $3); 09884 %*/ 09885 ;} 09886 break; 09887 09888 case 532: 09889 #line 4675 "parse.y" 09890 { 09891 /*%%%*/ 09892 if (!is_local_id((yyvsp[(2) - (2)].id))) 09893 yyerror("rest argument must be local variable"); 09894 /*% %*/ 09895 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 09896 /*%%%*/ 09897 (yyval.id) = (yyvsp[(2) - (2)].id); 09898 /*% 09899 $$ = dispatch1(rest_param, $2); 09900 %*/ 09901 ;} 09902 break; 09903 09904 case 533: 09905 #line 4688 "parse.y" 09906 { 09907 /*%%%*/ 09908 (yyval.id) = internal_id(); 09909 arg_var((yyval.id)); 09910 /*% 09911 $$ = dispatch1(rest_param, Qnil); 09912 %*/ 09913 ;} 09914 break; 09915 09916 case 536: 09917 #line 4703 "parse.y" 09918 { 09919 /*%%%*/ 09920 if (!is_local_id((yyvsp[(2) - (2)].id))) 09921 yyerror("block argument must be local variable"); 09922 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id))) 09923 yyerror("duplicated block argument name"); 09924 /*% %*/ 09925 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 09926 /*%%%*/ 09927 (yyval.id) = (yyvsp[(2) - (2)].id); 09928 /*% 09929 $$ = dispatch1(blockarg, $2); 09930 %*/ 09931 ;} 09932 break; 09933 09934 case 537: 09935 #line 4720 "parse.y" 09936 { 09937 (yyval.id) = (yyvsp[(2) - (2)].id); 09938 ;} 09939 break; 09940 09941 case 538: 09942 #line 4724 "parse.y" 09943 { 09944 /*%%%*/ 09945 (yyval.id) = 0; 09946 /*% 09947 $$ = Qundef; 09948 %*/ 09949 ;} 09950 break; 09951 09952 case 539: 09953 #line 4734 "parse.y" 09954 { 09955 /*%%%*/ 09956 value_expr((yyvsp[(1) - (1)].node)); 09957 (yyval.node) = (yyvsp[(1) - (1)].node); 09958 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 09959 /*% 09960 $$ = $1; 09961 %*/ 09962 ;} 09963 break; 09964 09965 case 540: 09966 #line 4743 "parse.y" 09967 {lex_state = EXPR_BEG;;} 09968 break; 09969 09970 case 541: 09971 #line 4744 "parse.y" 09972 { 09973 /*%%%*/ 09974 if ((yyvsp[(3) - (4)].node) == 0) { 09975 yyerror("can't define singleton method for ()."); 09976 } 09977 else { 09978 switch (nd_type((yyvsp[(3) - (4)].node))) { 09979 case NODE_STR: 09980 case NODE_DSTR: 09981 case NODE_XSTR: 09982 case NODE_DXSTR: 09983 case NODE_DREGX: 09984 case NODE_LIT: 09985 case NODE_ARRAY: 09986 case NODE_ZARRAY: 09987 yyerror("can't define singleton method for literals"); 09988 default: 09989 value_expr((yyvsp[(3) - (4)].node)); 09990 break; 09991 } 09992 } 09993 (yyval.node) = (yyvsp[(3) - (4)].node); 09994 /*% 09995 $$ = dispatch1(paren, $3); 09996 %*/ 09997 ;} 09998 break; 09999 10000 case 543: 10001 #line 4774 "parse.y" 10002 { 10003 /*%%%*/ 10004 (yyval.node) = (yyvsp[(1) - (2)].node); 10005 /*% 10006 $$ = dispatch1(assoclist_from_args, $1); 10007 %*/ 10008 ;} 10009 break; 10010 10011 case 545: 10012 #line 4791 "parse.y" 10013 { 10014 /*%%%*/ 10015 (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 10016 /*% 10017 $$ = rb_ary_push($1, $3); 10018 %*/ 10019 ;} 10020 break; 10021 10022 case 546: 10023 #line 4801 "parse.y" 10024 { 10025 /*%%%*/ 10026 (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node)); 10027 /*% 10028 $$ = dispatch2(assoc_new, $1, $3); 10029 %*/ 10030 ;} 10031 break; 10032 10033 case 547: 10034 #line 4809 "parse.y" 10035 { 10036 /*%%%*/ 10037 (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node)); 10038 /*% 10039 $$ = dispatch2(assoc_new, $1, $2); 10040 %*/ 10041 ;} 10042 break; 10043 10044 case 569: 10045 #line 4865 "parse.y" 10046 {yyerrok;;} 10047 break; 10048 10049 case 572: 10050 #line 4870 "parse.y" 10051 {yyerrok;;} 10052 break; 10053 10054 case 573: 10055 #line 4874 "parse.y" 10056 { 10057 /*%%%*/ 10058 (yyval.node) = 0; 10059 /*% 10060 $$ = Qundef; 10061 %*/ 10062 ;} 10063 break; 10064 10065 10066 /* Line 1267 of yacc.c. */ 10067 #line 10066 "parse.c" 10068 default: break; 10069 } 10070 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 10071 10072 YYPOPSTACK (yylen); 10073 yylen = 0; 10074 YY_STACK_PRINT (yyss, yyssp); 10075 10076 *++yyvsp = yyval; 10077 10078 10079 /* Now `shift' the result of the reduction. Determine what state 10080 that goes to, based on the state we popped back to and the rule 10081 number reduced by. */ 10082 10083 yyn = yyr1[yyn]; 10084 10085 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 10086 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 10087 yystate = yytable[yystate]; 10088 else 10089 yystate = yydefgoto[yyn - YYNTOKENS]; 10090 10091 goto yynewstate; 10092 10093 10094 /*------------------------------------. 10095 | yyerrlab -- here on detecting error | 10096 `------------------------------------*/ 10097 yyerrlab: 10098 /* If not already recovering from an error, report this error. */ 10099 if (!yyerrstatus) 10100 { 10101 ++yynerrs; 10102 #if ! YYERROR_VERBOSE 10103 parser_yyerror (parser, YY_("syntax error")); 10104 #else 10105 { 10106 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 10107 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 10108 { 10109 YYSIZE_T yyalloc = 2 * yysize; 10110 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 10111 yyalloc = YYSTACK_ALLOC_MAXIMUM; 10112 if (yymsg != yymsgbuf) 10113 YYSTACK_FREE (yymsg); 10114 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 10115 if (yymsg) 10116 yymsg_alloc = yyalloc; 10117 else 10118 { 10119 yymsg = yymsgbuf; 10120 yymsg_alloc = sizeof yymsgbuf; 10121 } 10122 } 10123 10124 if (0 < yysize && yysize <= yymsg_alloc) 10125 { 10126 (void) yysyntax_error (yymsg, yystate, yychar); 10127 parser_yyerror (parser, yymsg); 10128 } 10129 else 10130 { 10131 parser_yyerror (parser, YY_("syntax error")); 10132 if (yysize != 0) 10133 goto yyexhaustedlab; 10134 } 10135 } 10136 #endif 10137 } 10138 10139 10140 10141 if (yyerrstatus == 3) 10142 { 10143 /* If just tried and failed to reuse look-ahead token after an 10144 error, discard it. */ 10145 10146 if (yychar <= YYEOF) 10147 { 10148 /* Return failure if at end of input. */ 10149 if (yychar == YYEOF) 10150 YYABORT; 10151 } 10152 else 10153 { 10154 yydestruct ("Error: discarding", 10155 yytoken, &yylval, parser); 10156 yychar = YYEMPTY; 10157 } 10158 } 10159 10160 /* Else will try to reuse look-ahead token after shifting the error 10161 token. */ 10162 goto yyerrlab1; 10163 10164 10165 /*---------------------------------------------------. 10166 | yyerrorlab -- error raised explicitly by YYERROR. | 10167 `---------------------------------------------------*/ 10168 yyerrorlab: 10169 10170 /* Pacify compilers like GCC when the user code never invokes 10171 YYERROR and the label yyerrorlab therefore never appears in user 10172 code. */ 10173 if (/*CONSTCOND*/ 0) 10174 goto yyerrorlab; 10175 10176 /* Do not reclaim the symbols of the rule which action triggered 10177 this YYERROR. */ 10178 YYPOPSTACK (yylen); 10179 yylen = 0; 10180 YY_STACK_PRINT (yyss, yyssp); 10181 yystate = *yyssp; 10182 goto yyerrlab1; 10183 10184 10185 /*-------------------------------------------------------------. 10186 | yyerrlab1 -- common code for both syntax error and YYERROR. | 10187 `-------------------------------------------------------------*/ 10188 yyerrlab1: 10189 yyerrstatus = 3; /* Each real token shifted decrements this. */ 10190 10191 for (;;) 10192 { 10193 yyn = yypact[yystate]; 10194 if (yyn != YYPACT_NINF) 10195 { 10196 yyn += YYTERROR; 10197 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 10198 { 10199 yyn = yytable[yyn]; 10200 if (0 < yyn) 10201 break; 10202 } 10203 } 10204 10205 /* Pop the current state because it cannot handle the error token. */ 10206 if (yyssp == yyss) 10207 YYABORT; 10208 10209 10210 yydestruct ("Error: popping", 10211 yystos[yystate], yyvsp, parser); 10212 YYPOPSTACK (1); 10213 yystate = *yyssp; 10214 YY_STACK_PRINT (yyss, yyssp); 10215 } 10216 10217 if (yyn == YYFINAL) 10218 YYACCEPT; 10219 10220 *++yyvsp = yylval; 10221 10222 10223 /* Shift the error token. */ 10224 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 10225 10226 yystate = yyn; 10227 goto yynewstate; 10228 10229 10230 /*-------------------------------------. 10231 | yyacceptlab -- YYACCEPT comes here. | 10232 `-------------------------------------*/ 10233 yyacceptlab: 10234 yyresult = 0; 10235 goto yyreturn; 10236 10237 /*-----------------------------------. 10238 | yyabortlab -- YYABORT comes here. | 10239 `-----------------------------------*/ 10240 yyabortlab: 10241 yyresult = 1; 10242 goto yyreturn; 10243 10244 #ifndef yyoverflow 10245 /*-------------------------------------------------. 10246 | yyexhaustedlab -- memory exhaustion comes here. | 10247 `-------------------------------------------------*/ 10248 yyexhaustedlab: 10249 parser_yyerror (parser, YY_("memory exhausted")); 10250 yyresult = 2; 10251 /* Fall through. */ 10252 #endif 10253 10254 yyreturn: 10255 if (yychar != YYEOF && yychar != YYEMPTY) 10256 yydestruct ("Cleanup: discarding lookahead", 10257 yytoken, &yylval, parser); 10258 /* Do not reclaim the symbols of the rule which action triggered 10259 this YYABORT or YYACCEPT. */ 10260 YYPOPSTACK (yylen); 10261 YY_STACK_PRINT (yyss, yyssp); 10262 while (yyssp != yyss) 10263 { 10264 yydestruct ("Cleanup: popping", 10265 yystos[*yyssp], yyvsp, parser); 10266 YYPOPSTACK (1); 10267 } 10268 #ifndef yyoverflow 10269 if (yyss != yyssa) 10270 YYSTACK_FREE (yyss); 10271 #endif 10272 #if YYERROR_VERBOSE 10273 if (yymsg != yymsgbuf) 10274 YYSTACK_FREE (yymsg); 10275 #endif 10276 /* Make sure YYID is used. */ 10277 return YYID (yyresult); 10278 } 10279 10280 10281 #line 4882 "parse.y" 10282 10283 # undef parser 10284 # undef yylex 10285 # undef yylval 10286 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 10287 10288 static int parser_regx_options(struct parser_params*); 10289 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 10290 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 10291 static int parser_parse_string(struct parser_params*,NODE*); 10292 static int parser_here_document(struct parser_params*,NODE*); 10293 10294 10295 # define nextc() parser_nextc(parser) 10296 # define pushback(c) parser_pushback(parser, (c)) 10297 # define newtok() parser_newtok(parser) 10298 # define tokspace(n) parser_tokspace(parser, (n)) 10299 # define tokadd(c) parser_tokadd(parser, (c)) 10300 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 10301 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 10302 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 10303 # define regx_options() parser_regx_options(parser) 10304 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 10305 # define parse_string(n) parser_parse_string(parser,(n)) 10306 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 10307 # define here_document(n) parser_here_document(parser,(n)) 10308 # define heredoc_identifier() parser_heredoc_identifier(parser) 10309 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 10310 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 10311 10312 #ifndef RIPPER 10313 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 10314 # define set_yylval_num(x) (yylval.num = (x)) 10315 # define set_yylval_id(x) (yylval.id = (x)) 10316 # define set_yylval_name(x) (yylval.id = (x)) 10317 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 10318 # define set_yylval_node(x) (yylval.node = (x)) 10319 # define yylval_id() (yylval.id) 10320 #else 10321 static inline VALUE 10322 ripper_yylval_id(ID x) 10323 { 10324 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 10325 } 10326 # define set_yylval_str(x) (void)(x) 10327 # define set_yylval_num(x) (void)(x) 10328 # define set_yylval_id(x) (void)(x) 10329 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 10330 # define set_yylval_literal(x) (void)(x) 10331 # define set_yylval_node(x) (void)(x) 10332 # define yylval_id() yylval.id 10333 #endif 10334 10335 #ifndef RIPPER 10336 #define ripper_flush(p) (void)(p) 10337 #else 10338 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 10339 10340 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 10341 10342 static int 10343 ripper_has_scan_event(struct parser_params *parser) 10344 { 10345 10346 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 10347 return lex_p > parser->tokp; 10348 } 10349 10350 static VALUE 10351 ripper_scan_event_val(struct parser_params *parser, int t) 10352 { 10353 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 10354 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 10355 ripper_flush(parser); 10356 return rval; 10357 } 10358 10359 static void 10360 ripper_dispatch_scan_event(struct parser_params *parser, int t) 10361 { 10362 if (!ripper_has_scan_event(parser)) return; 10363 yylval_rval = ripper_scan_event_val(parser, t); 10364 } 10365 10366 static void 10367 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 10368 { 10369 if (!ripper_has_scan_event(parser)) return; 10370 (void)ripper_scan_event_val(parser, t); 10371 } 10372 10373 static void 10374 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 10375 { 10376 int saved_line = ruby_sourceline; 10377 const char *saved_tokp = parser->tokp; 10378 10379 ruby_sourceline = parser->delayed_line; 10380 parser->tokp = lex_pbeg + parser->delayed_col; 10381 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 10382 parser->delayed = Qnil; 10383 ruby_sourceline = saved_line; 10384 parser->tokp = saved_tokp; 10385 } 10386 #endif /* RIPPER */ 10387 10388 #include "ruby/regex.h" 10389 #include "ruby/util.h" 10390 10391 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 10392 since ours (we hope) works properly with all combinations of 10393 machines, compilers, `char' and `unsigned char' argument types. 10394 (Per Bothner suggested the basic approach.) */ 10395 #undef SIGN_EXTEND_CHAR 10396 #if __STDC__ 10397 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 10398 #else /* not __STDC__ */ 10399 /* As in Harbison and Steele. */ 10400 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 10401 #endif 10402 10403 #define parser_encoding_name() (parser->enc->name) 10404 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) 10405 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) 10406 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 10407 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) 10408 10409 #define parser_isascii() ISASCII(*(lex_p-1)) 10410 10411 #ifndef RIPPER 10412 static int 10413 token_info_get_column(struct parser_params *parser, const char *token) 10414 { 10415 int column = 1; 10416 const char *p, *pend = lex_p - strlen(token); 10417 for (p = lex_pbeg; p < pend; p++) { 10418 if (*p == '\t') { 10419 column = (((column - 1) / 8) + 1) * 8; 10420 } 10421 column++; 10422 } 10423 return column; 10424 } 10425 10426 static int 10427 token_info_has_nonspaces(struct parser_params *parser, const char *token) 10428 { 10429 const char *p, *pend = lex_p - strlen(token); 10430 for (p = lex_pbeg; p < pend; p++) { 10431 if (*p != ' ' && *p != '\t') { 10432 return 1; 10433 } 10434 } 10435 return 0; 10436 } 10437 10438 #undef token_info_push 10439 static void 10440 token_info_push(struct parser_params *parser, const char *token) 10441 { 10442 token_info *ptinfo; 10443 10444 if (!parser->parser_token_info_enabled) return; 10445 ptinfo = ALLOC(token_info); 10446 ptinfo->token = token; 10447 ptinfo->linenum = ruby_sourceline; 10448 ptinfo->column = token_info_get_column(parser, token); 10449 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 10450 ptinfo->next = parser->parser_token_info; 10451 10452 parser->parser_token_info = ptinfo; 10453 } 10454 10455 #undef token_info_pop 10456 static void 10457 token_info_pop(struct parser_params *parser, const char *token) 10458 { 10459 int linenum; 10460 token_info *ptinfo = parser->parser_token_info; 10461 10462 if (!ptinfo) return; 10463 parser->parser_token_info = ptinfo->next; 10464 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 10465 goto finish; 10466 } 10467 linenum = ruby_sourceline; 10468 if (linenum == ptinfo->linenum) { /* SKIP */ 10469 goto finish; 10470 } 10471 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 10472 goto finish; 10473 } 10474 if (parser->parser_token_info_enabled) { 10475 rb_compile_warn(ruby_sourcefile, linenum, 10476 "mismatched indentations at '%s' with '%s' at %d", 10477 token, ptinfo->token, ptinfo->linenum); 10478 } 10479 10480 finish: 10481 xfree(ptinfo); 10482 } 10483 #endif /* RIPPER */ 10484 10485 static int 10486 parser_yyerror(struct parser_params *parser, const char *msg) 10487 { 10488 #ifndef RIPPER 10489 const int max_line_margin = 30; 10490 const char *p, *pe; 10491 char *buf; 10492 long len; 10493 int i; 10494 10495 compile_error(PARSER_ARG "%s", msg); 10496 p = lex_p; 10497 while (lex_pbeg <= p) { 10498 if (*p == '\n') break; 10499 p--; 10500 } 10501 p++; 10502 10503 pe = lex_p; 10504 while (pe < lex_pend) { 10505 if (*pe == '\n') break; 10506 pe++; 10507 } 10508 10509 len = pe - p; 10510 if (len > 4) { 10511 char *p2; 10512 const char *pre = "", *post = ""; 10513 10514 if (len > max_line_margin * 2 + 10) { 10515 if (lex_p - p > max_line_margin) { 10516 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 10517 pre = "..."; 10518 } 10519 if (pe - lex_p > max_line_margin) { 10520 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 10521 post = "..."; 10522 } 10523 len = pe - p; 10524 } 10525 buf = ALLOCA_N(char, len+2); 10526 MEMCPY(buf, p, char, len); 10527 buf[len] = '\0'; 10528 rb_compile_error_append("%s%s%s", pre, buf, post); 10529 10530 i = (int)(lex_p - p); 10531 p2 = buf; pe = buf + len; 10532 10533 while (p2 < pe) { 10534 if (*p2 != '\t') *p2 = ' '; 10535 p2++; 10536 } 10537 buf[i] = '^'; 10538 buf[i+1] = '\0'; 10539 rb_compile_error_append("%s%s", pre, buf); 10540 } 10541 #else 10542 dispatch1(parse_error, STR_NEW2(msg)); 10543 #endif /* !RIPPER */ 10544 return 0; 10545 } 10546 10547 static void parser_prepare(struct parser_params *parser); 10548 10549 #ifndef RIPPER 10550 static VALUE 10551 debug_lines(const char *f) 10552 { 10553 ID script_lines; 10554 CONST_ID(script_lines, "SCRIPT_LINES__"); 10555 if (rb_const_defined_at(rb_cObject, script_lines)) { 10556 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 10557 if (TYPE(hash) == T_HASH) { 10558 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10559 VALUE lines = rb_ary_new(); 10560 rb_hash_aset(hash, fname, lines); 10561 return lines; 10562 } 10563 } 10564 return 0; 10565 } 10566 10567 static VALUE 10568 coverage(const char *f, int n) 10569 { 10570 VALUE coverages = rb_get_coverages(); 10571 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 10572 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10573 VALUE lines = rb_ary_new2(n); 10574 int i; 10575 RBASIC(lines)->klass = 0; 10576 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 10577 RARRAY(lines)->as.heap.len = n; 10578 rb_hash_aset(coverages, fname, lines); 10579 return lines; 10580 } 10581 return 0; 10582 } 10583 10584 static int 10585 e_option_supplied(struct parser_params *parser) 10586 { 10587 return strcmp(ruby_sourcefile, "-e") == 0; 10588 } 10589 10590 static VALUE 10591 yycompile0(VALUE arg, int tracing) 10592 { 10593 int n; 10594 NODE *tree; 10595 struct parser_params *parser = (struct parser_params *)arg; 10596 10597 if (!compile_for_eval && rb_safe_level() == 0) { 10598 ruby_debug_lines = debug_lines(ruby_sourcefile); 10599 if (ruby_debug_lines && ruby_sourceline > 0) { 10600 VALUE str = STR_NEW0(); 10601 n = ruby_sourceline; 10602 do { 10603 rb_ary_push(ruby_debug_lines, str); 10604 } while (--n); 10605 } 10606 10607 if (!e_option_supplied(parser)) { 10608 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); 10609 } 10610 } 10611 10612 parser_prepare(parser); 10613 deferred_nodes = 0; 10614 #ifndef RIPPER 10615 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 10616 #endif 10617 n = yyparse((void*)parser); 10618 ruby_debug_lines = 0; 10619 ruby_coverage = 0; 10620 compile_for_eval = 0; 10621 10622 lex_strterm = 0; 10623 lex_p = lex_pbeg = lex_pend = 0; 10624 lex_lastline = lex_nextline = 0; 10625 if (parser->nerr) { 10626 return 0; 10627 } 10628 tree = ruby_eval_tree; 10629 if (!tree) { 10630 tree = NEW_NIL(); 10631 } 10632 else if (ruby_eval_tree_begin) { 10633 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 10634 } 10635 return (VALUE)tree; 10636 } 10637 10638 static NODE* 10639 yycompile(struct parser_params *parser, const char *f, int line) 10640 { 10641 ruby_sourcefile = ruby_strdup(f); 10642 ruby_sourceline = line - 1; 10643 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE); 10644 } 10645 #endif /* !RIPPER */ 10646 10647 static rb_encoding * 10648 must_be_ascii_compatible(VALUE s) 10649 { 10650 rb_encoding *enc = rb_enc_get(s); 10651 if (!rb_enc_asciicompat(enc)) { 10652 rb_raise(rb_eArgError, "invalid source encoding"); 10653 } 10654 return enc; 10655 } 10656 10657 static VALUE 10658 lex_get_str(struct parser_params *parser, VALUE s) 10659 { 10660 char *beg, *end, *pend; 10661 rb_encoding *enc = must_be_ascii_compatible(s); 10662 10663 beg = RSTRING_PTR(s); 10664 if (lex_gets_ptr) { 10665 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 10666 beg += lex_gets_ptr; 10667 } 10668 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 10669 end = beg; 10670 while (end < pend) { 10671 if (*end++ == '\n') break; 10672 } 10673 lex_gets_ptr = end - RSTRING_PTR(s); 10674 return rb_enc_str_new(beg, end - beg, enc); 10675 } 10676 10677 static VALUE 10678 lex_getline(struct parser_params *parser) 10679 { 10680 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 10681 if (NIL_P(line)) return line; 10682 must_be_ascii_compatible(line); 10683 #ifndef RIPPER 10684 if (ruby_debug_lines) { 10685 rb_enc_associate(line, parser->enc); 10686 rb_ary_push(ruby_debug_lines, line); 10687 } 10688 if (ruby_coverage) { 10689 rb_ary_push(ruby_coverage, Qnil); 10690 } 10691 #endif 10692 return line; 10693 } 10694 10695 #ifdef RIPPER 10696 static rb_data_type_t parser_data_type; 10697 #else 10698 static const rb_data_type_t parser_data_type; 10699 10700 static NODE* 10701 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 10702 { 10703 struct parser_params *parser; 10704 NODE *node; 10705 volatile VALUE tmp; 10706 10707 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 10708 lex_gets = lex_get_str; 10709 lex_gets_ptr = 0; 10710 lex_input = s; 10711 lex_pbeg = lex_p = lex_pend = 0; 10712 compile_for_eval = rb_parse_in_eval(); 10713 10714 node = yycompile(parser, f, line); 10715 tmp = vparser; /* prohibit tail call optimization */ 10716 10717 return node; 10718 } 10719 10720 NODE* 10721 rb_compile_string(const char *f, VALUE s, int line) 10722 { 10723 must_be_ascii_compatible(s); 10724 return parser_compile_string(rb_parser_new(), f, s, line); 10725 } 10726 10727 NODE* 10728 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 10729 { 10730 must_be_ascii_compatible(s); 10731 return parser_compile_string(vparser, f, s, line); 10732 } 10733 10734 NODE* 10735 rb_compile_cstr(const char *f, const char *s, int len, int line) 10736 { 10737 VALUE str = rb_str_new(s, len); 10738 return parser_compile_string(rb_parser_new(), f, str, line); 10739 } 10740 10741 NODE* 10742 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 10743 { 10744 VALUE str = rb_str_new(s, len); 10745 return parser_compile_string(vparser, f, str, line); 10746 } 10747 10748 static VALUE 10749 lex_io_gets(struct parser_params *parser, VALUE io) 10750 { 10751 return rb_io_gets(io); 10752 } 10753 10754 NODE* 10755 rb_compile_file(const char *f, VALUE file, int start) 10756 { 10757 VALUE volatile vparser = rb_parser_new(); 10758 10759 return rb_parser_compile_file(vparser, f, file, start); 10760 } 10761 10762 NODE* 10763 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 10764 { 10765 struct parser_params *parser; 10766 volatile VALUE tmp; 10767 NODE *node; 10768 10769 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 10770 lex_gets = lex_io_gets; 10771 lex_input = file; 10772 lex_pbeg = lex_p = lex_pend = 0; 10773 compile_for_eval = rb_parse_in_eval(); 10774 10775 node = yycompile(parser, f, start); 10776 tmp = vparser; /* prohibit tail call optimization */ 10777 10778 return node; 10779 } 10780 #endif /* !RIPPER */ 10781 10782 #define STR_FUNC_ESCAPE 0x01 10783 #define STR_FUNC_EXPAND 0x02 10784 #define STR_FUNC_REGEXP 0x04 10785 #define STR_FUNC_QWORDS 0x08 10786 #define STR_FUNC_SYMBOL 0x10 10787 #define STR_FUNC_INDENT 0x20 10788 10789 enum string_type { 10790 str_squote = (0), 10791 str_dquote = (STR_FUNC_EXPAND), 10792 str_xquote = (STR_FUNC_EXPAND), 10793 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 10794 str_sword = (STR_FUNC_QWORDS), 10795 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 10796 str_ssym = (STR_FUNC_SYMBOL), 10797 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 10798 }; 10799 10800 static VALUE 10801 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 10802 { 10803 VALUE str; 10804 10805 str = rb_enc_str_new(p, n, enc); 10806 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 10807 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 10808 } 10809 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 10810 rb_enc_associate(str, rb_ascii8bit_encoding()); 10811 } 10812 } 10813 10814 return str; 10815 } 10816 10817 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 10818 #define lex_eol_p() (lex_p >= lex_pend) 10819 #define peek(c) peek_n((c), 0) 10820 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 10821 10822 static inline int 10823 parser_nextc(struct parser_params *parser) 10824 { 10825 int c; 10826 10827 if (lex_p == lex_pend) { 10828 VALUE v = lex_nextline; 10829 lex_nextline = 0; 10830 if (!v) { 10831 if (parser->eofp) 10832 return -1; 10833 10834 if (!lex_input || NIL_P(v = lex_getline(parser))) { 10835 parser->eofp = Qtrue; 10836 lex_goto_eol(parser); 10837 return -1; 10838 } 10839 } 10840 { 10841 #ifdef RIPPER 10842 if (parser->tokp < lex_pend) { 10843 if (NIL_P(parser->delayed)) { 10844 parser->delayed = rb_str_buf_new(1024); 10845 rb_enc_associate(parser->delayed, parser->enc); 10846 rb_str_buf_cat(parser->delayed, 10847 parser->tokp, lex_pend - parser->tokp); 10848 parser->delayed_line = ruby_sourceline; 10849 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 10850 } 10851 else { 10852 rb_str_buf_cat(parser->delayed, 10853 parser->tokp, lex_pend - parser->tokp); 10854 } 10855 } 10856 #endif 10857 if (heredoc_end > 0) { 10858 ruby_sourceline = heredoc_end; 10859 heredoc_end = 0; 10860 } 10861 ruby_sourceline++; 10862 parser->line_count++; 10863 lex_pbeg = lex_p = RSTRING_PTR(v); 10864 lex_pend = lex_p + RSTRING_LEN(v); 10865 ripper_flush(parser); 10866 lex_lastline = v; 10867 } 10868 } 10869 c = (unsigned char)*lex_p++; 10870 if (c == '\r' && peek('\n')) { 10871 lex_p++; 10872 c = '\n'; 10873 } 10874 10875 return c; 10876 } 10877 10878 static void 10879 parser_pushback(struct parser_params *parser, int c) 10880 { 10881 if (c == -1) return; 10882 lex_p--; 10883 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 10884 lex_p--; 10885 } 10886 } 10887 10888 #define was_bol() (lex_p == lex_pbeg + 1) 10889 10890 #define tokfix() (tokenbuf[tokidx]='\0') 10891 #define tok() tokenbuf 10892 #define toklen() tokidx 10893 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 10894 10895 static char* 10896 parser_newtok(struct parser_params *parser) 10897 { 10898 tokidx = 0; 10899 if (!tokenbuf) { 10900 toksiz = 60; 10901 tokenbuf = ALLOC_N(char, 60); 10902 } 10903 if (toksiz > 4096) { 10904 toksiz = 60; 10905 REALLOC_N(tokenbuf, char, 60); 10906 } 10907 return tokenbuf; 10908 } 10909 10910 static char * 10911 parser_tokspace(struct parser_params *parser, int n) 10912 { 10913 tokidx += n; 10914 10915 if (tokidx >= toksiz) { 10916 do {toksiz *= 2;} while (toksiz < tokidx); 10917 REALLOC_N(tokenbuf, char, toksiz); 10918 } 10919 return &tokenbuf[tokidx-n]; 10920 } 10921 10922 static void 10923 parser_tokadd(struct parser_params *parser, int c) 10924 { 10925 tokenbuf[tokidx++] = (char)c; 10926 if (tokidx >= toksiz) { 10927 toksiz *= 2; 10928 REALLOC_N(tokenbuf, char, toksiz); 10929 } 10930 } 10931 10932 static int 10933 parser_tok_hex(struct parser_params *parser, size_t *numlen) 10934 { 10935 int c; 10936 10937 c = scan_hex(lex_p, 2, numlen); 10938 if (!*numlen) { 10939 yyerror("invalid hex escape"); 10940 return 0; 10941 } 10942 lex_p += *numlen; 10943 return c; 10944 } 10945 10946 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 10947 10948 static int 10949 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 10950 int string_literal, int symbol_literal, int regexp_literal) 10951 { 10952 /* 10953 * If string_literal is true, then we allow multiple codepoints 10954 * in \u{}, and add the codepoints to the current token. 10955 * Otherwise we're parsing a character literal and return a single 10956 * codepoint without adding it 10957 */ 10958 10959 int codepoint; 10960 size_t numlen; 10961 10962 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 10963 10964 if (peek('{')) { /* handle \u{...} form */ 10965 do { 10966 if (regexp_literal) { tokadd(*lex_p); } 10967 nextc(); 10968 codepoint = scan_hex(lex_p, 6, &numlen); 10969 if (numlen == 0) { 10970 yyerror("invalid Unicode escape"); 10971 return 0; 10972 } 10973 if (codepoint > 0x10ffff) { 10974 yyerror("invalid Unicode codepoint (too large)"); 10975 return 0; 10976 } 10977 lex_p += numlen; 10978 if (regexp_literal) { 10979 tokcopy((int)numlen); 10980 } 10981 else if (codepoint >= 0x80) { 10982 *encp = UTF8_ENC(); 10983 if (string_literal) tokaddmbc(codepoint, *encp); 10984 } 10985 else if (string_literal) { 10986 tokadd(codepoint); 10987 } 10988 } while (string_literal && (peek(' ') || peek('\t'))); 10989 10990 if (!peek('}')) { 10991 yyerror("unterminated Unicode escape"); 10992 return 0; 10993 } 10994 10995 if (regexp_literal) { tokadd('}'); } 10996 nextc(); 10997 } 10998 else { /* handle \uxxxx form */ 10999 codepoint = scan_hex(lex_p, 4, &numlen); 11000 if (numlen < 4) { 11001 yyerror("invalid Unicode escape"); 11002 return 0; 11003 } 11004 lex_p += 4; 11005 if (regexp_literal) { 11006 tokcopy(4); 11007 } 11008 else if (codepoint >= 0x80) { 11009 *encp = UTF8_ENC(); 11010 if (string_literal) tokaddmbc(codepoint, *encp); 11011 } 11012 else if (string_literal) { 11013 tokadd(codepoint); 11014 } 11015 } 11016 11017 return codepoint; 11018 } 11019 11020 #define ESCAPE_CONTROL 1 11021 #define ESCAPE_META 2 11022 11023 static int 11024 parser_read_escape(struct parser_params *parser, int flags, 11025 rb_encoding **encp) 11026 { 11027 int c; 11028 size_t numlen; 11029 11030 switch (c = nextc()) { 11031 case '\\': /* Backslash */ 11032 return c; 11033 11034 case 'n': /* newline */ 11035 return '\n'; 11036 11037 case 't': /* horizontal tab */ 11038 return '\t'; 11039 11040 case 'r': /* carriage-return */ 11041 return '\r'; 11042 11043 case 'f': /* form-feed */ 11044 return '\f'; 11045 11046 case 'v': /* vertical tab */ 11047 return '\13'; 11048 11049 case 'a': /* alarm(bell) */ 11050 return '\007'; 11051 11052 case 'e': /* escape */ 11053 return 033; 11054 11055 case '0': case '1': case '2': case '3': /* octal constant */ 11056 case '4': case '5': case '6': case '7': 11057 pushback(c); 11058 c = scan_oct(lex_p, 3, &numlen); 11059 lex_p += numlen; 11060 return c; 11061 11062 case 'x': /* hex constant */ 11063 c = tok_hex(&numlen); 11064 if (numlen == 0) return 0; 11065 return c; 11066 11067 case 'b': /* backspace */ 11068 return '\010'; 11069 11070 case 's': /* space */ 11071 return ' '; 11072 11073 case 'M': 11074 if (flags & ESCAPE_META) goto eof; 11075 if ((c = nextc()) != '-') { 11076 pushback(c); 11077 goto eof; 11078 } 11079 if ((c = nextc()) == '\\') { 11080 if (peek('u')) goto eof; 11081 return read_escape(flags|ESCAPE_META, encp) | 0x80; 11082 } 11083 else if (c == -1 || !ISASCII(c)) goto eof; 11084 else { 11085 return ((c & 0xff) | 0x80); 11086 } 11087 11088 case 'C': 11089 if ((c = nextc()) != '-') { 11090 pushback(c); 11091 goto eof; 11092 } 11093 case 'c': 11094 if (flags & ESCAPE_CONTROL) goto eof; 11095 if ((c = nextc())== '\\') { 11096 if (peek('u')) goto eof; 11097 c = read_escape(flags|ESCAPE_CONTROL, encp); 11098 } 11099 else if (c == '?') 11100 return 0177; 11101 else if (c == -1 || !ISASCII(c)) goto eof; 11102 return c & 0x9f; 11103 11104 eof: 11105 case -1: 11106 yyerror("Invalid escape character syntax"); 11107 return '\0'; 11108 11109 default: 11110 return c; 11111 } 11112 } 11113 11114 static void 11115 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 11116 { 11117 int len = rb_enc_codelen(c, enc); 11118 rb_enc_mbcput(c, tokspace(len), enc); 11119 } 11120 11121 static int 11122 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 11123 { 11124 int c; 11125 int flags = 0; 11126 size_t numlen; 11127 11128 first: 11129 switch (c = nextc()) { 11130 case '\n': 11131 return 0; /* just ignore */ 11132 11133 case '0': case '1': case '2': case '3': /* octal constant */ 11134 case '4': case '5': case '6': case '7': 11135 { 11136 ruby_scan_oct(--lex_p, 3, &numlen); 11137 if (numlen == 0) goto eof; 11138 lex_p += numlen; 11139 tokcopy((int)numlen + 1); 11140 } 11141 return 0; 11142 11143 case 'x': /* hex constant */ 11144 { 11145 tok_hex(&numlen); 11146 if (numlen == 0) return -1; 11147 tokcopy((int)numlen + 2); 11148 } 11149 return 0; 11150 11151 case 'M': 11152 if (flags & ESCAPE_META) goto eof; 11153 if ((c = nextc()) != '-') { 11154 pushback(c); 11155 goto eof; 11156 } 11157 tokcopy(3); 11158 flags |= ESCAPE_META; 11159 goto escaped; 11160 11161 case 'C': 11162 if (flags & ESCAPE_CONTROL) goto eof; 11163 if ((c = nextc()) != '-') { 11164 pushback(c); 11165 goto eof; 11166 } 11167 tokcopy(3); 11168 goto escaped; 11169 11170 case 'c': 11171 if (flags & ESCAPE_CONTROL) goto eof; 11172 tokcopy(2); 11173 flags |= ESCAPE_CONTROL; 11174 escaped: 11175 if ((c = nextc()) == '\\') { 11176 goto first; 11177 } 11178 else if (c == -1) goto eof; 11179 tokadd(c); 11180 return 0; 11181 11182 eof: 11183 case -1: 11184 yyerror("Invalid escape character syntax"); 11185 return -1; 11186 11187 default: 11188 tokadd('\\'); 11189 tokadd(c); 11190 } 11191 return 0; 11192 } 11193 11194 static int 11195 parser_regx_options(struct parser_params *parser) 11196 { 11197 int kcode = 0; 11198 int kopt = 0; 11199 int options = 0; 11200 int c, opt, kc; 11201 11202 newtok(); 11203 while (c = nextc(), ISALPHA(c)) { 11204 if (c == 'o') { 11205 options |= RE_OPTION_ONCE; 11206 } 11207 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 11208 if (kc >= 0) { 11209 if (kc != rb_ascii8bit_encindex()) kcode = c; 11210 kopt = opt; 11211 } 11212 else { 11213 options |= opt; 11214 } 11215 } 11216 else { 11217 tokadd(c); 11218 } 11219 } 11220 options |= kopt; 11221 pushback(c); 11222 if (toklen()) { 11223 tokfix(); 11224 compile_error(PARSER_ARG "unknown regexp option%s - %s", 11225 toklen() > 1 ? "s" : "", tok()); 11226 } 11227 return options | RE_OPTION_ENCODING(kcode); 11228 } 11229 11230 static void 11231 dispose_string(VALUE str) 11232 { 11233 /* TODO: should use another API? */ 11234 if (RBASIC(str)->flags & RSTRING_NOEMBED) 11235 xfree(RSTRING_PTR(str)); 11236 rb_gc_force_recycle(str); 11237 } 11238 11239 static int 11240 parser_tokadd_mbchar(struct parser_params *parser, int c) 11241 { 11242 int len = parser_precise_mbclen(); 11243 if (!MBCLEN_CHARFOUND_P(len)) { 11244 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 11245 return -1; 11246 } 11247 tokadd(c); 11248 lex_p += --len; 11249 if (len > 0) tokcopy(len); 11250 return c; 11251 } 11252 11253 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 11254 11255 static int 11256 parser_tokadd_string(struct parser_params *parser, 11257 int func, int term, int paren, long *nest, 11258 rb_encoding **encp) 11259 { 11260 int c; 11261 int has_nonascii = 0; 11262 rb_encoding *enc = *encp; 11263 char *errbuf = 0; 11264 static const char mixed_msg[] = "%s mixed within %s source"; 11265 11266 #define mixed_error(enc1, enc2) if (!errbuf) { \ 11267 size_t len = sizeof(mixed_msg) - 4; \ 11268 len += strlen(rb_enc_name(enc1)); \ 11269 len += strlen(rb_enc_name(enc2)); \ 11270 errbuf = ALLOCA_N(char, len); \ 11271 snprintf(errbuf, len, mixed_msg, \ 11272 rb_enc_name(enc1), \ 11273 rb_enc_name(enc2)); \ 11274 yyerror(errbuf); \ 11275 } 11276 #define mixed_escape(beg, enc1, enc2) do { \ 11277 const char *pos = lex_p; \ 11278 lex_p = (beg); \ 11279 mixed_error((enc1), (enc2)); \ 11280 lex_p = pos; \ 11281 } while (0) 11282 11283 while ((c = nextc()) != -1) { 11284 if (paren && c == paren) { 11285 ++*nest; 11286 } 11287 else if (c == term) { 11288 if (!nest || !*nest) { 11289 pushback(c); 11290 break; 11291 } 11292 --*nest; 11293 } 11294 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 11295 int c2 = *lex_p; 11296 if (c2 == '$' || c2 == '@' || c2 == '{') { 11297 pushback(c); 11298 break; 11299 } 11300 } 11301 else if (c == '\\') { 11302 const char *beg = lex_p - 1; 11303 c = nextc(); 11304 switch (c) { 11305 case '\n': 11306 if (func & STR_FUNC_QWORDS) break; 11307 if (func & STR_FUNC_EXPAND) continue; 11308 tokadd('\\'); 11309 break; 11310 11311 case '\\': 11312 if (func & STR_FUNC_ESCAPE) tokadd(c); 11313 break; 11314 11315 case 'u': 11316 if ((func & STR_FUNC_EXPAND) == 0) { 11317 tokadd('\\'); 11318 break; 11319 } 11320 parser_tokadd_utf8(parser, &enc, 1, 11321 func & STR_FUNC_SYMBOL, 11322 func & STR_FUNC_REGEXP); 11323 if (has_nonascii && enc != *encp) { 11324 mixed_escape(beg, enc, *encp); 11325 } 11326 continue; 11327 11328 default: 11329 if (c == -1) return -1; 11330 if (!ISASCII(c)) { 11331 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 11332 goto non_ascii; 11333 } 11334 if (func & STR_FUNC_REGEXP) { 11335 pushback(c); 11336 if ((c = tokadd_escape(&enc)) < 0) 11337 return -1; 11338 if (has_nonascii && enc != *encp) { 11339 mixed_escape(beg, enc, *encp); 11340 } 11341 continue; 11342 } 11343 else if (func & STR_FUNC_EXPAND) { 11344 pushback(c); 11345 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 11346 c = read_escape(0, &enc); 11347 } 11348 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11349 /* ignore backslashed spaces in %w */ 11350 } 11351 else if (c != term && !(paren && c == paren)) { 11352 tokadd('\\'); 11353 pushback(c); 11354 continue; 11355 } 11356 } 11357 } 11358 else if (!parser_isascii()) { 11359 non_ascii: 11360 has_nonascii = 1; 11361 if (enc != *encp) { 11362 mixed_error(enc, *encp); 11363 continue; 11364 } 11365 if (tokadd_mbchar(c) == -1) return -1; 11366 continue; 11367 } 11368 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11369 pushback(c); 11370 break; 11371 } 11372 if (c & 0x80) { 11373 has_nonascii = 1; 11374 if (enc != *encp) { 11375 mixed_error(enc, *encp); 11376 continue; 11377 } 11378 } 11379 tokadd(c); 11380 } 11381 *encp = enc; 11382 return c; 11383 } 11384 11385 #define NEW_STRTERM(func, term, paren) \ 11386 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 11387 11388 static int 11389 parser_parse_string(struct parser_params *parser, NODE *quote) 11390 { 11391 int func = (int)quote->nd_func; 11392 int term = nd_term(quote); 11393 int paren = nd_paren(quote); 11394 int c, space = 0; 11395 rb_encoding *enc = parser->enc; 11396 11397 if (func == -1) return tSTRING_END; 11398 c = nextc(); 11399 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11400 do {c = nextc();} while (ISSPACE(c)); 11401 space = 1; 11402 } 11403 if (c == term && !quote->nd_nest) { 11404 if (func & STR_FUNC_QWORDS) { 11405 quote->nd_func = -1; 11406 return ' '; 11407 } 11408 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 11409 set_yylval_num(regx_options()); 11410 return tREGEXP_END; 11411 } 11412 if (space) { 11413 pushback(c); 11414 return ' '; 11415 } 11416 newtok(); 11417 if ((func & STR_FUNC_EXPAND) && c == '#') { 11418 switch (c = nextc()) { 11419 case '$': 11420 case '@': 11421 pushback(c); 11422 return tSTRING_DVAR; 11423 case '{': 11424 return tSTRING_DBEG; 11425 } 11426 tokadd('#'); 11427 } 11428 pushback(c); 11429 if (tokadd_string(func, term, paren, "e->nd_nest, 11430 &enc) == -1) { 11431 ruby_sourceline = nd_line(quote); 11432 if (func & STR_FUNC_REGEXP) { 11433 if (parser->eofp) 11434 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 11435 return tREGEXP_END; 11436 } 11437 else { 11438 if (parser->eofp) 11439 compile_error(PARSER_ARG "unterminated string meets end of file"); 11440 return tSTRING_END; 11441 } 11442 } 11443 11444 tokfix(); 11445 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 11446 11447 #ifdef RIPPER 11448 if (!NIL_P(parser->delayed)) { 11449 ptrdiff_t len = lex_p - parser->tokp; 11450 if (len > 0) { 11451 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 11452 } 11453 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11454 parser->tokp = lex_p; 11455 } 11456 #endif 11457 11458 return tSTRING_CONTENT; 11459 } 11460 11461 static int 11462 parser_heredoc_identifier(struct parser_params *parser) 11463 { 11464 int c = nextc(), term, func = 0; 11465 long len; 11466 11467 if (c == '-') { 11468 c = nextc(); 11469 func = STR_FUNC_INDENT; 11470 } 11471 switch (c) { 11472 case '\'': 11473 func |= str_squote; goto quoted; 11474 case '"': 11475 func |= str_dquote; goto quoted; 11476 case '`': 11477 func |= str_xquote; 11478 quoted: 11479 newtok(); 11480 tokadd(func); 11481 term = c; 11482 while ((c = nextc()) != -1 && c != term) { 11483 if (tokadd_mbchar(c) == -1) return 0; 11484 } 11485 if (c == -1) { 11486 compile_error(PARSER_ARG "unterminated here document identifier"); 11487 return 0; 11488 } 11489 break; 11490 11491 default: 11492 if (!parser_is_identchar()) { 11493 pushback(c); 11494 if (func & STR_FUNC_INDENT) { 11495 pushback('-'); 11496 } 11497 return 0; 11498 } 11499 newtok(); 11500 term = '"'; 11501 tokadd(func |= str_dquote); 11502 do { 11503 if (tokadd_mbchar(c) == -1) return 0; 11504 } while ((c = nextc()) != -1 && parser_is_identchar()); 11505 pushback(c); 11506 break; 11507 } 11508 11509 tokfix(); 11510 #ifdef RIPPER 11511 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 11512 #endif 11513 len = lex_p - lex_pbeg; 11514 lex_goto_eol(parser); 11515 lex_strterm = rb_node_newnode(NODE_HEREDOC, 11516 STR_NEW(tok(), toklen()), /* nd_lit */ 11517 len, /* nd_nth */ 11518 lex_lastline); /* nd_orig */ 11519 nd_set_line(lex_strterm, ruby_sourceline); 11520 ripper_flush(parser); 11521 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 11522 } 11523 11524 static void 11525 parser_heredoc_restore(struct parser_params *parser, NODE *here) 11526 { 11527 VALUE line; 11528 11529 line = here->nd_orig; 11530 lex_lastline = line; 11531 lex_pbeg = RSTRING_PTR(line); 11532 lex_pend = lex_pbeg + RSTRING_LEN(line); 11533 lex_p = lex_pbeg + here->nd_nth; 11534 heredoc_end = ruby_sourceline; 11535 ruby_sourceline = nd_line(here); 11536 dispose_string(here->nd_lit); 11537 rb_gc_force_recycle((VALUE)here); 11538 ripper_flush(parser); 11539 } 11540 11541 static int 11542 parser_whole_match_p(struct parser_params *parser, 11543 const char *eos, long len, int indent) 11544 { 11545 const char *p = lex_pbeg; 11546 long n; 11547 11548 if (indent) { 11549 while (*p && ISSPACE(*p)) p++; 11550 } 11551 n = lex_pend - (p + len); 11552 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 11553 return strncmp(eos, p, len) == 0; 11554 } 11555 11556 #ifdef RIPPER 11557 static void 11558 ripper_dispatch_heredoc_end(struct parser_params *parser) 11559 { 11560 if (!NIL_P(parser->delayed)) 11561 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11562 lex_goto_eol(parser); 11563 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 11564 } 11565 11566 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 11567 #else 11568 #define dispatch_heredoc_end() ((void)0) 11569 #endif 11570 11571 static int 11572 parser_here_document(struct parser_params *parser, NODE *here) 11573 { 11574 int c, func, indent = 0; 11575 const char *eos, *p, *pend; 11576 long len; 11577 VALUE str = 0; 11578 rb_encoding *enc = parser->enc; 11579 11580 eos = RSTRING_PTR(here->nd_lit); 11581 len = RSTRING_LEN(here->nd_lit) - 1; 11582 indent = (func = *eos++) & STR_FUNC_INDENT; 11583 11584 if ((c = nextc()) == -1) { 11585 error: 11586 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 11587 #ifdef RIPPER 11588 if (NIL_P(parser->delayed)) { 11589 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 11590 } 11591 else { 11592 if (str || 11593 ((len = lex_p - parser->tokp) > 0 && 11594 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 11595 rb_str_append(parser->delayed, str); 11596 } 11597 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11598 } 11599 lex_goto_eol(parser); 11600 #endif 11601 restore: 11602 heredoc_restore(lex_strterm); 11603 lex_strterm = 0; 11604 return 0; 11605 } 11606 if (was_bol() && whole_match_p(eos, len, indent)) { 11607 dispatch_heredoc_end(); 11608 heredoc_restore(lex_strterm); 11609 return tSTRING_END; 11610 } 11611 11612 if (!(func & STR_FUNC_EXPAND)) { 11613 do { 11614 p = RSTRING_PTR(lex_lastline); 11615 pend = lex_pend; 11616 if (pend > p) { 11617 switch (pend[-1]) { 11618 case '\n': 11619 if (--pend == p || pend[-1] != '\r') { 11620 pend++; 11621 break; 11622 } 11623 case '\r': 11624 --pend; 11625 } 11626 } 11627 if (str) 11628 rb_str_cat(str, p, pend - p); 11629 else 11630 str = STR_NEW(p, pend - p); 11631 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 11632 lex_goto_eol(parser); 11633 if (nextc() == -1) { 11634 if (str) dispose_string(str); 11635 goto error; 11636 } 11637 } while (!whole_match_p(eos, len, indent)); 11638 } 11639 else { 11640 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 11641 newtok(); 11642 if (c == '#') { 11643 switch (c = nextc()) { 11644 case '$': 11645 case '@': 11646 pushback(c); 11647 return tSTRING_DVAR; 11648 case '{': 11649 return tSTRING_DBEG; 11650 } 11651 tokadd('#'); 11652 } 11653 do { 11654 pushback(c); 11655 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 11656 if (parser->eofp) goto error; 11657 goto restore; 11658 } 11659 if (c != '\n') { 11660 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 11661 return tSTRING_CONTENT; 11662 } 11663 tokadd(nextc()); 11664 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 11665 if ((c = nextc()) == -1) goto error; 11666 } while (!whole_match_p(eos, len, indent)); 11667 str = STR_NEW3(tok(), toklen(), enc, func); 11668 } 11669 dispatch_heredoc_end(); 11670 heredoc_restore(lex_strterm); 11671 lex_strterm = NEW_STRTERM(-1, 0, 0); 11672 set_yylval_str(str); 11673 return tSTRING_CONTENT; 11674 } 11675 11676 #include "lex.c" 11677 11678 static void 11679 arg_ambiguous_gen(struct parser_params *parser) 11680 { 11681 #ifndef RIPPER 11682 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 11683 #else 11684 dispatch0(arg_ambiguous); 11685 #endif 11686 } 11687 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 11688 11689 static ID 11690 formal_argument_gen(struct parser_params *parser, ID lhs) 11691 { 11692 #ifndef RIPPER 11693 if (!is_local_id(lhs)) 11694 yyerror("formal argument must be local variable"); 11695 #endif 11696 shadowing_lvar(lhs); 11697 return lhs; 11698 } 11699 11700 static int 11701 lvar_defined_gen(struct parser_params *parser, ID id) 11702 { 11703 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 11704 } 11705 11706 /* emacsen -*- hack */ 11707 static long 11708 parser_encode_length(struct parser_params *parser, const char *name, long len) 11709 { 11710 long nlen; 11711 11712 if (len > 5 && name[nlen = len - 5] == '-') { 11713 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 11714 return nlen; 11715 } 11716 if (len > 4 && name[nlen = len - 4] == '-') { 11717 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 11718 return nlen; 11719 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 11720 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 11721 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 11722 return nlen; 11723 } 11724 return len; 11725 } 11726 11727 static void 11728 parser_set_encode(struct parser_params *parser, const char *name) 11729 { 11730 int idx = rb_enc_find_index(name); 11731 rb_encoding *enc; 11732 VALUE excargs[3]; 11733 11734 if (idx < 0) { 11735 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 11736 error: 11737 excargs[0] = rb_eArgError; 11738 excargs[2] = rb_make_backtrace(); 11739 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 11740 rb_exc_raise(rb_make_exception(3, excargs)); 11741 } 11742 enc = rb_enc_from_index(idx); 11743 if (!rb_enc_asciicompat(enc)) { 11744 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 11745 goto error; 11746 } 11747 parser->enc = enc; 11748 #ifndef RIPPER 11749 if (ruby_debug_lines) { 11750 long i, n = RARRAY_LEN(ruby_debug_lines); 11751 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 11752 for (i = 0; i < n; ++i) { 11753 rb_enc_associate_index(*p, idx); 11754 } 11755 } 11756 #endif 11757 } 11758 11759 static int 11760 comment_at_top(struct parser_params *parser) 11761 { 11762 const char *p = lex_pbeg, *pend = lex_p - 1; 11763 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 11764 while (p < pend) { 11765 if (!ISSPACE(*p)) return 0; 11766 p++; 11767 } 11768 return 1; 11769 } 11770 11771 #ifndef RIPPER 11772 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 11773 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 11774 11775 static void 11776 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 11777 { 11778 if (!comment_at_top(parser)) { 11779 return; 11780 } 11781 parser_set_encode(parser, val); 11782 } 11783 11784 static void 11785 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 11786 { 11787 int *p = &parser->parser_token_info_enabled; 11788 11789 switch (*val) { 11790 case 't': case 'T': 11791 if (strcasecmp(val, "true") == 0) { 11792 *p = TRUE; 11793 return; 11794 } 11795 break; 11796 case 'f': case 'F': 11797 if (strcasecmp(val, "false") == 0) { 11798 *p = FALSE; 11799 return; 11800 } 11801 break; 11802 } 11803 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 11804 } 11805 11806 struct magic_comment { 11807 const char *name; 11808 rb_magic_comment_setter_t func; 11809 rb_magic_comment_length_t length; 11810 }; 11811 11812 static const struct magic_comment magic_comments[] = { 11813 {"coding", magic_comment_encoding, parser_encode_length}, 11814 {"encoding", magic_comment_encoding, parser_encode_length}, 11815 {"warn_indent", parser_set_token_info}, 11816 }; 11817 #endif 11818 11819 static const char * 11820 magic_comment_marker(const char *str, long len) 11821 { 11822 long i = 2; 11823 11824 while (i < len) { 11825 switch (str[i]) { 11826 case '-': 11827 if (str[i-1] == '*' && str[i-2] == '-') { 11828 return str + i + 1; 11829 } 11830 i += 2; 11831 break; 11832 case '*': 11833 if (i + 1 >= len) return 0; 11834 if (str[i+1] != '-') { 11835 i += 4; 11836 } 11837 else if (str[i-1] != '-') { 11838 i += 2; 11839 } 11840 else { 11841 return str + i + 2; 11842 } 11843 break; 11844 default: 11845 i += 3; 11846 break; 11847 } 11848 } 11849 return 0; 11850 } 11851 11852 static int 11853 parser_magic_comment(struct parser_params *parser, const char *str, long len) 11854 { 11855 VALUE name = 0, val = 0; 11856 const char *beg, *end, *vbeg, *vend; 11857 #define str_copy(_s, _p, _n) ((_s) \ 11858 ? (void)(rb_str_resize((_s), (_n)), \ 11859 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 11860 : (void)((_s) = STR_NEW((_p), (_n)))) 11861 11862 if (len <= 7) return FALSE; 11863 if (!(beg = magic_comment_marker(str, len))) return FALSE; 11864 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 11865 str = beg; 11866 len = end - beg - 3; 11867 11868 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 11869 while (len > 0) { 11870 #ifndef RIPPER 11871 const struct magic_comment *p = magic_comments; 11872 #endif 11873 char *s; 11874 int i; 11875 long n = 0; 11876 11877 for (; len > 0 && *str; str++, --len) { 11878 switch (*str) { 11879 case '\'': case '"': case ':': case ';': 11880 continue; 11881 } 11882 if (!ISSPACE(*str)) break; 11883 } 11884 for (beg = str; len > 0; str++, --len) { 11885 switch (*str) { 11886 case '\'': case '"': case ':': case ';': 11887 break; 11888 default: 11889 if (ISSPACE(*str)) break; 11890 continue; 11891 } 11892 break; 11893 } 11894 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 11895 if (!len) break; 11896 if (*str != ':') continue; 11897 11898 do str++; while (--len > 0 && ISSPACE(*str)); 11899 if (!len) break; 11900 if (*str == '"') { 11901 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 11902 if (*str == '\\') { 11903 --len; 11904 ++str; 11905 } 11906 } 11907 vend = str; 11908 if (len) { 11909 --len; 11910 ++str; 11911 } 11912 } 11913 else { 11914 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 11915 vend = str; 11916 } 11917 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 11918 11919 n = end - beg; 11920 str_copy(name, beg, n); 11921 s = RSTRING_PTR(name); 11922 for (i = 0; i < n; ++i) { 11923 if (s[i] == '-') s[i] = '_'; 11924 } 11925 #ifndef RIPPER 11926 do { 11927 if (STRNCASECMP(p->name, s, n) == 0) { 11928 n = vend - vbeg; 11929 if (p->length) { 11930 n = (*p->length)(parser, vbeg, n); 11931 } 11932 str_copy(val, vbeg, n); 11933 (*p->func)(parser, s, RSTRING_PTR(val)); 11934 break; 11935 } 11936 } while (++p < magic_comments + numberof(magic_comments)); 11937 #else 11938 dispatch2(magic_comment, name, val); 11939 #endif 11940 } 11941 11942 return TRUE; 11943 } 11944 11945 static void 11946 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 11947 { 11948 int sep = 0; 11949 const char *beg = str; 11950 VALUE s; 11951 11952 for (;;) { 11953 if (send - str <= 6) return; 11954 switch (str[6]) { 11955 case 'C': case 'c': str += 6; continue; 11956 case 'O': case 'o': str += 5; continue; 11957 case 'D': case 'd': str += 4; continue; 11958 case 'I': case 'i': str += 3; continue; 11959 case 'N': case 'n': str += 2; continue; 11960 case 'G': case 'g': str += 1; continue; 11961 case '=': case ':': 11962 sep = 1; 11963 str += 6; 11964 break; 11965 default: 11966 str += 6; 11967 if (ISSPACE(*str)) break; 11968 continue; 11969 } 11970 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 11971 } 11972 for (;;) { 11973 do { 11974 if (++str >= send) return; 11975 } while (ISSPACE(*str)); 11976 if (sep) break; 11977 if (*str != '=' && *str != ':') return; 11978 sep = 1; 11979 str++; 11980 } 11981 beg = str; 11982 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 11983 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 11984 parser_set_encode(parser, RSTRING_PTR(s)); 11985 rb_str_resize(s, 0); 11986 } 11987 11988 static void 11989 parser_prepare(struct parser_params *parser) 11990 { 11991 int c = nextc(); 11992 switch (c) { 11993 case '#': 11994 if (peek('!')) parser->has_shebang = 1; 11995 break; 11996 case 0xef: /* UTF-8 BOM marker */ 11997 if (lex_pend - lex_p >= 2 && 11998 (unsigned char)lex_p[0] == 0xbb && 11999 (unsigned char)lex_p[1] == 0xbf) { 12000 parser->enc = rb_utf8_encoding(); 12001 lex_p += 2; 12002 lex_pbeg = lex_p; 12003 return; 12004 } 12005 break; 12006 case EOF: 12007 return; 12008 } 12009 pushback(c); 12010 parser->enc = rb_enc_get(lex_lastline); 12011 } 12012 12013 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) 12014 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) 12015 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) 12016 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 12017 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG()) 12018 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 12019 12020 #ifndef RIPPER 12021 #define ambiguous_operator(op, syn) ( \ 12022 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 12023 rb_warning0("even though it seems like "syn"")) 12024 #else 12025 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 12026 #endif 12027 #define warn_balanced(op, syn) ((void) \ 12028 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \ 12029 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \ 12030 last_state != EXPR_ENDARG && \ 12031 space_seen && !ISSPACE(c) && \ 12032 (ambiguous_operator(op, syn), 0))) 12033 12034 static int 12035 parser_yylex(struct parser_params *parser) 12036 { 12037 register int c; 12038 int space_seen = 0; 12039 int cmd_state; 12040 enum lex_state_e last_state; 12041 rb_encoding *enc; 12042 int mb; 12043 #ifdef RIPPER 12044 int fallthru = FALSE; 12045 #endif 12046 12047 if (lex_strterm) { 12048 int token; 12049 if (nd_type(lex_strterm) == NODE_HEREDOC) { 12050 token = here_document(lex_strterm); 12051 if (token == tSTRING_END) { 12052 lex_strterm = 0; 12053 lex_state = EXPR_END; 12054 } 12055 } 12056 else { 12057 token = parse_string(lex_strterm); 12058 if (token == tSTRING_END || token == tREGEXP_END) { 12059 rb_gc_force_recycle((VALUE)lex_strterm); 12060 lex_strterm = 0; 12061 lex_state = EXPR_END; 12062 } 12063 } 12064 return token; 12065 } 12066 cmd_state = command_start; 12067 command_start = FALSE; 12068 retry: 12069 last_state = lex_state; 12070 switch (c = nextc()) { 12071 case '\0': /* NUL */ 12072 case '\004': /* ^D */ 12073 case '\032': /* ^Z */ 12074 case -1: /* end of script. */ 12075 return 0; 12076 12077 /* white spaces */ 12078 case ' ': case '\t': case '\f': case '\r': 12079 case '\13': /* '\v' */ 12080 space_seen = 1; 12081 #ifdef RIPPER 12082 while ((c = nextc())) { 12083 switch (c) { 12084 case ' ': case '\t': case '\f': case '\r': 12085 case '\13': /* '\v' */ 12086 break; 12087 default: 12088 goto outofloop; 12089 } 12090 } 12091 outofloop: 12092 pushback(c); 12093 ripper_dispatch_scan_event(parser, tSP); 12094 #endif 12095 goto retry; 12096 12097 case '#': /* it's a comment */ 12098 /* no magic_comment in shebang line */ 12099 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 12100 if (comment_at_top(parser)) { 12101 set_file_encoding(parser, lex_p, lex_pend); 12102 } 12103 } 12104 lex_p = lex_pend; 12105 #ifdef RIPPER 12106 ripper_dispatch_scan_event(parser, tCOMMENT); 12107 fallthru = TRUE; 12108 #endif 12109 /* fall through */ 12110 case '\n': 12111 switch (lex_state) { 12112 case EXPR_BEG: 12113 case EXPR_FNAME: 12114 case EXPR_DOT: 12115 case EXPR_CLASS: 12116 case EXPR_VALUE: 12117 #ifdef RIPPER 12118 if (!fallthru) { 12119 ripper_dispatch_scan_event(parser, tIGNORED_NL); 12120 } 12121 fallthru = FALSE; 12122 #endif 12123 goto retry; 12124 default: 12125 break; 12126 } 12127 while ((c = nextc())) { 12128 switch (c) { 12129 case ' ': case '\t': case '\f': case '\r': 12130 case '\13': /* '\v' */ 12131 space_seen = 1; 12132 break; 12133 case '.': { 12134 if ((c = nextc()) != '.') { 12135 pushback(c); 12136 pushback('.'); 12137 goto retry; 12138 } 12139 } 12140 default: 12141 --ruby_sourceline; 12142 lex_nextline = lex_lastline; 12143 case -1: /* EOF no decrement*/ 12144 lex_goto_eol(parser); 12145 #ifdef RIPPER 12146 if (c != -1) { 12147 parser->tokp = lex_p; 12148 } 12149 #endif 12150 goto normal_newline; 12151 } 12152 } 12153 normal_newline: 12154 command_start = TRUE; 12155 lex_state = EXPR_BEG; 12156 return '\n'; 12157 12158 case '*': 12159 if ((c = nextc()) == '*') { 12160 if ((c = nextc()) == '=') { 12161 set_yylval_id(tPOW); 12162 lex_state = EXPR_BEG; 12163 return tOP_ASGN; 12164 } 12165 pushback(c); 12166 c = tPOW; 12167 } 12168 else { 12169 if (c == '=') { 12170 set_yylval_id('*'); 12171 lex_state = EXPR_BEG; 12172 return tOP_ASGN; 12173 } 12174 pushback(c); 12175 if (IS_SPCARG(c)) { 12176 rb_warning0("`*' interpreted as argument prefix"); 12177 c = tSTAR; 12178 } 12179 else if (IS_BEG()) { 12180 c = tSTAR; 12181 } 12182 else { 12183 warn_balanced("*", "argument prefix"); 12184 c = '*'; 12185 } 12186 } 12187 switch (lex_state) { 12188 case EXPR_FNAME: case EXPR_DOT: 12189 lex_state = EXPR_ARG; break; 12190 default: 12191 lex_state = EXPR_BEG; break; 12192 } 12193 return c; 12194 12195 case '!': 12196 c = nextc(); 12197 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12198 lex_state = EXPR_ARG; 12199 if (c == '@') { 12200 return '!'; 12201 } 12202 } 12203 else { 12204 lex_state = EXPR_BEG; 12205 } 12206 if (c == '=') { 12207 return tNEQ; 12208 } 12209 if (c == '~') { 12210 return tNMATCH; 12211 } 12212 pushback(c); 12213 return '!'; 12214 12215 case '=': 12216 if (was_bol()) { 12217 /* skip embedded rd document */ 12218 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 12219 #ifdef RIPPER 12220 int first_p = TRUE; 12221 12222 lex_goto_eol(parser); 12223 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 12224 #endif 12225 for (;;) { 12226 lex_goto_eol(parser); 12227 #ifdef RIPPER 12228 if (!first_p) { 12229 ripper_dispatch_scan_event(parser, tEMBDOC); 12230 } 12231 first_p = FALSE; 12232 #endif 12233 c = nextc(); 12234 if (c == -1) { 12235 compile_error(PARSER_ARG "embedded document meets end of file"); 12236 return 0; 12237 } 12238 if (c != '=') continue; 12239 if (strncmp(lex_p, "end", 3) == 0 && 12240 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 12241 break; 12242 } 12243 } 12244 lex_goto_eol(parser); 12245 #ifdef RIPPER 12246 ripper_dispatch_scan_event(parser, tEMBDOC_END); 12247 #endif 12248 goto retry; 12249 } 12250 } 12251 12252 switch (lex_state) { 12253 case EXPR_FNAME: case EXPR_DOT: 12254 lex_state = EXPR_ARG; break; 12255 default: 12256 lex_state = EXPR_BEG; break; 12257 } 12258 if ((c = nextc()) == '=') { 12259 if ((c = nextc()) == '=') { 12260 return tEQQ; 12261 } 12262 pushback(c); 12263 return tEQ; 12264 } 12265 if (c == '~') { 12266 return tMATCH; 12267 } 12268 else if (c == '>') { 12269 return tASSOC; 12270 } 12271 pushback(c); 12272 return '='; 12273 12274 case '<': 12275 last_state = lex_state; 12276 c = nextc(); 12277 if (c == '<' && 12278 lex_state != EXPR_DOT && 12279 lex_state != EXPR_CLASS && 12280 !IS_END() && 12281 (!IS_ARG() || space_seen)) { 12282 int token = heredoc_identifier(); 12283 if (token) return token; 12284 } 12285 switch (lex_state) { 12286 case EXPR_FNAME: case EXPR_DOT: 12287 lex_state = EXPR_ARG; break; 12288 default: 12289 lex_state = EXPR_BEG; break; 12290 } 12291 if (c == '=') { 12292 if ((c = nextc()) == '>') { 12293 return tCMP; 12294 } 12295 pushback(c); 12296 return tLEQ; 12297 } 12298 if (c == '<') { 12299 if ((c = nextc()) == '=') { 12300 set_yylval_id(tLSHFT); 12301 lex_state = EXPR_BEG; 12302 return tOP_ASGN; 12303 } 12304 pushback(c); 12305 warn_balanced("<<", "here document"); 12306 return tLSHFT; 12307 } 12308 pushback(c); 12309 return '<'; 12310 12311 case '>': 12312 switch (lex_state) { 12313 case EXPR_FNAME: case EXPR_DOT: 12314 lex_state = EXPR_ARG; break; 12315 default: 12316 lex_state = EXPR_BEG; break; 12317 } 12318 if ((c = nextc()) == '=') { 12319 return tGEQ; 12320 } 12321 if (c == '>') { 12322 if ((c = nextc()) == '=') { 12323 set_yylval_id(tRSHFT); 12324 lex_state = EXPR_BEG; 12325 return tOP_ASGN; 12326 } 12327 pushback(c); 12328 return tRSHFT; 12329 } 12330 pushback(c); 12331 return '>'; 12332 12333 case '"': 12334 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 12335 return tSTRING_BEG; 12336 12337 case '`': 12338 if (lex_state == EXPR_FNAME) { 12339 lex_state = EXPR_ENDFN; 12340 return c; 12341 } 12342 if (lex_state == EXPR_DOT) { 12343 if (cmd_state) 12344 lex_state = EXPR_CMDARG; 12345 else 12346 lex_state = EXPR_ARG; 12347 return c; 12348 } 12349 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 12350 return tXSTRING_BEG; 12351 12352 case '\'': 12353 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 12354 return tSTRING_BEG; 12355 12356 case '?': 12357 if (IS_END()) { 12358 lex_state = EXPR_VALUE; 12359 return '?'; 12360 } 12361 c = nextc(); 12362 if (c == -1) { 12363 compile_error(PARSER_ARG "incomplete character syntax"); 12364 return 0; 12365 } 12366 if (rb_enc_isspace(c, parser->enc)) { 12367 if (!IS_ARG()) { 12368 int c2 = 0; 12369 switch (c) { 12370 case ' ': 12371 c2 = 's'; 12372 break; 12373 case '\n': 12374 c2 = 'n'; 12375 break; 12376 case '\t': 12377 c2 = 't'; 12378 break; 12379 case '\v': 12380 c2 = 'v'; 12381 break; 12382 case '\r': 12383 c2 = 'r'; 12384 break; 12385 case '\f': 12386 c2 = 'f'; 12387 break; 12388 } 12389 if (c2) { 12390 rb_warnI("invalid character syntax; use ?\\%c", c2); 12391 } 12392 } 12393 ternary: 12394 pushback(c); 12395 lex_state = EXPR_VALUE; 12396 return '?'; 12397 } 12398 newtok(); 12399 enc = parser->enc; 12400 if (!parser_isascii()) { 12401 if (tokadd_mbchar(c) == -1) return 0; 12402 } 12403 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && 12404 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { 12405 goto ternary; 12406 } 12407 else if (c == '\\') { 12408 if (peek('u')) { 12409 nextc(); 12410 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 12411 if (0x80 <= c) { 12412 tokaddmbc(c, enc); 12413 } 12414 else { 12415 tokadd(c); 12416 } 12417 } 12418 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 12419 nextc(); 12420 if (tokadd_mbchar(c) == -1) return 0; 12421 } 12422 else { 12423 c = read_escape(0, &enc); 12424 tokadd(c); 12425 } 12426 } 12427 else { 12428 tokadd(c); 12429 } 12430 tokfix(); 12431 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 12432 lex_state = EXPR_END; 12433 return tCHAR; 12434 12435 case '&': 12436 if ((c = nextc()) == '&') { 12437 lex_state = EXPR_BEG; 12438 if ((c = nextc()) == '=') { 12439 set_yylval_id(tANDOP); 12440 lex_state = EXPR_BEG; 12441 return tOP_ASGN; 12442 } 12443 pushback(c); 12444 return tANDOP; 12445 } 12446 else if (c == '=') { 12447 set_yylval_id('&'); 12448 lex_state = EXPR_BEG; 12449 return tOP_ASGN; 12450 } 12451 pushback(c); 12452 if (IS_SPCARG(c)) { 12453 rb_warning0("`&' interpreted as argument prefix"); 12454 c = tAMPER; 12455 } 12456 else if (IS_BEG()) { 12457 c = tAMPER; 12458 } 12459 else { 12460 warn_balanced("&", "argument prefix"); 12461 c = '&'; 12462 } 12463 switch (lex_state) { 12464 case EXPR_FNAME: case EXPR_DOT: 12465 lex_state = EXPR_ARG; break; 12466 default: 12467 lex_state = EXPR_BEG; 12468 } 12469 return c; 12470 12471 case '|': 12472 if ((c = nextc()) == '|') { 12473 lex_state = EXPR_BEG; 12474 if ((c = nextc()) == '=') { 12475 set_yylval_id(tOROP); 12476 lex_state = EXPR_BEG; 12477 return tOP_ASGN; 12478 } 12479 pushback(c); 12480 return tOROP; 12481 } 12482 if (c == '=') { 12483 set_yylval_id('|'); 12484 lex_state = EXPR_BEG; 12485 return tOP_ASGN; 12486 } 12487 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12488 lex_state = EXPR_ARG; 12489 } 12490 else { 12491 lex_state = EXPR_BEG; 12492 } 12493 pushback(c); 12494 return '|'; 12495 12496 case '+': 12497 c = nextc(); 12498 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12499 lex_state = EXPR_ARG; 12500 if (c == '@') { 12501 return tUPLUS; 12502 } 12503 pushback(c); 12504 return '+'; 12505 } 12506 if (c == '=') { 12507 set_yylval_id('+'); 12508 lex_state = EXPR_BEG; 12509 return tOP_ASGN; 12510 } 12511 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12512 lex_state = EXPR_BEG; 12513 pushback(c); 12514 if (c != -1 && ISDIGIT(c)) { 12515 c = '+'; 12516 goto start_num; 12517 } 12518 return tUPLUS; 12519 } 12520 lex_state = EXPR_BEG; 12521 pushback(c); 12522 warn_balanced("+", "unary operator"); 12523 return '+'; 12524 12525 case '-': 12526 c = nextc(); 12527 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12528 lex_state = EXPR_ARG; 12529 if (c == '@') { 12530 return tUMINUS; 12531 } 12532 pushback(c); 12533 return '-'; 12534 } 12535 if (c == '=') { 12536 set_yylval_id('-'); 12537 lex_state = EXPR_BEG; 12538 return tOP_ASGN; 12539 } 12540 if (c == '>') { 12541 lex_state = EXPR_ARG; 12542 return tLAMBDA; 12543 } 12544 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12545 lex_state = EXPR_BEG; 12546 pushback(c); 12547 if (c != -1 && ISDIGIT(c)) { 12548 return tUMINUS_NUM; 12549 } 12550 return tUMINUS; 12551 } 12552 lex_state = EXPR_BEG; 12553 pushback(c); 12554 warn_balanced("-", "unary operator"); 12555 return '-'; 12556 12557 case '.': 12558 lex_state = EXPR_BEG; 12559 if ((c = nextc()) == '.') { 12560 if ((c = nextc()) == '.') { 12561 return tDOT3; 12562 } 12563 pushback(c); 12564 return tDOT2; 12565 } 12566 pushback(c); 12567 if (c != -1 && ISDIGIT(c)) { 12568 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 12569 } 12570 lex_state = EXPR_DOT; 12571 return '.'; 12572 12573 start_num: 12574 case '0': case '1': case '2': case '3': case '4': 12575 case '5': case '6': case '7': case '8': case '9': 12576 { 12577 int is_float, seen_point, seen_e, nondigit; 12578 12579 is_float = seen_point = seen_e = nondigit = 0; 12580 lex_state = EXPR_END; 12581 newtok(); 12582 if (c == '-' || c == '+') { 12583 tokadd(c); 12584 c = nextc(); 12585 } 12586 if (c == '0') { 12587 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 12588 int start = toklen(); 12589 c = nextc(); 12590 if (c == 'x' || c == 'X') { 12591 /* hexadecimal */ 12592 c = nextc(); 12593 if (c != -1 && ISXDIGIT(c)) { 12594 do { 12595 if (c == '_') { 12596 if (nondigit) break; 12597 nondigit = c; 12598 continue; 12599 } 12600 if (!ISXDIGIT(c)) break; 12601 nondigit = 0; 12602 tokadd(c); 12603 } while ((c = nextc()) != -1); 12604 } 12605 pushback(c); 12606 tokfix(); 12607 if (toklen() == start) { 12608 no_digits(); 12609 } 12610 else if (nondigit) goto trailing_uc; 12611 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 12612 return tINTEGER; 12613 } 12614 if (c == 'b' || c == 'B') { 12615 /* binary */ 12616 c = nextc(); 12617 if (c == '0' || c == '1') { 12618 do { 12619 if (c == '_') { 12620 if (nondigit) break; 12621 nondigit = c; 12622 continue; 12623 } 12624 if (c != '0' && c != '1') break; 12625 nondigit = 0; 12626 tokadd(c); 12627 } while ((c = nextc()) != -1); 12628 } 12629 pushback(c); 12630 tokfix(); 12631 if (toklen() == start) { 12632 no_digits(); 12633 } 12634 else if (nondigit) goto trailing_uc; 12635 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 12636 return tINTEGER; 12637 } 12638 if (c == 'd' || c == 'D') { 12639 /* decimal */ 12640 c = nextc(); 12641 if (c != -1 && ISDIGIT(c)) { 12642 do { 12643 if (c == '_') { 12644 if (nondigit) break; 12645 nondigit = c; 12646 continue; 12647 } 12648 if (!ISDIGIT(c)) break; 12649 nondigit = 0; 12650 tokadd(c); 12651 } while ((c = nextc()) != -1); 12652 } 12653 pushback(c); 12654 tokfix(); 12655 if (toklen() == start) { 12656 no_digits(); 12657 } 12658 else if (nondigit) goto trailing_uc; 12659 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 12660 return tINTEGER; 12661 } 12662 if (c == '_') { 12663 /* 0_0 */ 12664 goto octal_number; 12665 } 12666 if (c == 'o' || c == 'O') { 12667 /* prefixed octal */ 12668 c = nextc(); 12669 if (c == -1 || c == '_' || !ISDIGIT(c)) { 12670 no_digits(); 12671 } 12672 } 12673 if (c >= '0' && c <= '7') { 12674 /* octal */ 12675 octal_number: 12676 do { 12677 if (c == '_') { 12678 if (nondigit) break; 12679 nondigit = c; 12680 continue; 12681 } 12682 if (c < '0' || c > '9') break; 12683 if (c > '7') goto invalid_octal; 12684 nondigit = 0; 12685 tokadd(c); 12686 } while ((c = nextc()) != -1); 12687 if (toklen() > start) { 12688 pushback(c); 12689 tokfix(); 12690 if (nondigit) goto trailing_uc; 12691 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 12692 return tINTEGER; 12693 } 12694 if (nondigit) { 12695 pushback(c); 12696 goto trailing_uc; 12697 } 12698 } 12699 if (c > '7' && c <= '9') { 12700 invalid_octal: 12701 yyerror("Invalid octal digit"); 12702 } 12703 else if (c == '.' || c == 'e' || c == 'E') { 12704 tokadd('0'); 12705 } 12706 else { 12707 pushback(c); 12708 set_yylval_literal(INT2FIX(0)); 12709 return tINTEGER; 12710 } 12711 } 12712 12713 for (;;) { 12714 switch (c) { 12715 case '0': case '1': case '2': case '3': case '4': 12716 case '5': case '6': case '7': case '8': case '9': 12717 nondigit = 0; 12718 tokadd(c); 12719 break; 12720 12721 case '.': 12722 if (nondigit) goto trailing_uc; 12723 if (seen_point || seen_e) { 12724 goto decode_num; 12725 } 12726 else { 12727 int c0 = nextc(); 12728 if (c0 == -1 || !ISDIGIT(c0)) { 12729 pushback(c0); 12730 goto decode_num; 12731 } 12732 c = c0; 12733 } 12734 tokadd('.'); 12735 tokadd(c); 12736 is_float++; 12737 seen_point++; 12738 nondigit = 0; 12739 break; 12740 12741 case 'e': 12742 case 'E': 12743 if (nondigit) { 12744 pushback(c); 12745 c = nondigit; 12746 goto decode_num; 12747 } 12748 if (seen_e) { 12749 goto decode_num; 12750 } 12751 tokadd(c); 12752 seen_e++; 12753 is_float++; 12754 nondigit = c; 12755 c = nextc(); 12756 if (c != '-' && c != '+') continue; 12757 tokadd(c); 12758 nondigit = c; 12759 break; 12760 12761 case '_': /* `_' in number just ignored */ 12762 if (nondigit) goto decode_num; 12763 nondigit = c; 12764 break; 12765 12766 default: 12767 goto decode_num; 12768 } 12769 c = nextc(); 12770 } 12771 12772 decode_num: 12773 pushback(c); 12774 if (nondigit) { 12775 char tmp[30]; 12776 trailing_uc: 12777 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 12778 yyerror(tmp); 12779 } 12780 tokfix(); 12781 if (is_float) { 12782 double d = strtod(tok(), 0); 12783 if (errno == ERANGE) { 12784 rb_warningS("Float %s out of range", tok()); 12785 errno = 0; 12786 } 12787 set_yylval_literal(DBL2NUM(d)); 12788 return tFLOAT; 12789 } 12790 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 12791 return tINTEGER; 12792 } 12793 12794 case ')': 12795 case ']': 12796 paren_nest--; 12797 case '}': 12798 COND_LEXPOP(); 12799 CMDARG_LEXPOP(); 12800 if (c == ')') 12801 lex_state = EXPR_ENDFN; 12802 else 12803 lex_state = EXPR_ENDARG; 12804 return c; 12805 12806 case ':': 12807 c = nextc(); 12808 if (c == ':') { 12809 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) { 12810 lex_state = EXPR_BEG; 12811 return tCOLON3; 12812 } 12813 lex_state = EXPR_DOT; 12814 return tCOLON2; 12815 } 12816 if (IS_END() || ISSPACE(c)) { 12817 pushback(c); 12818 warn_balanced(":", "symbol literal"); 12819 lex_state = EXPR_BEG; 12820 return ':'; 12821 } 12822 switch (c) { 12823 case '\'': 12824 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 12825 break; 12826 case '"': 12827 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 12828 break; 12829 default: 12830 pushback(c); 12831 break; 12832 } 12833 lex_state = EXPR_FNAME; 12834 return tSYMBEG; 12835 12836 case '/': 12837 if (IS_BEG()) { 12838 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 12839 return tREGEXP_BEG; 12840 } 12841 if ((c = nextc()) == '=') { 12842 set_yylval_id('/'); 12843 lex_state = EXPR_BEG; 12844 return tOP_ASGN; 12845 } 12846 pushback(c); 12847 if (IS_SPCARG(c)) { 12848 (void)arg_ambiguous(); 12849 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 12850 return tREGEXP_BEG; 12851 } 12852 switch (lex_state) { 12853 case EXPR_FNAME: case EXPR_DOT: 12854 lex_state = EXPR_ARG; break; 12855 default: 12856 lex_state = EXPR_BEG; break; 12857 } 12858 warn_balanced("/", "regexp literal"); 12859 return '/'; 12860 12861 case '^': 12862 if ((c = nextc()) == '=') { 12863 set_yylval_id('^'); 12864 lex_state = EXPR_BEG; 12865 return tOP_ASGN; 12866 } 12867 switch (lex_state) { 12868 case EXPR_FNAME: case EXPR_DOT: 12869 lex_state = EXPR_ARG; break; 12870 default: 12871 lex_state = EXPR_BEG; break; 12872 } 12873 pushback(c); 12874 return '^'; 12875 12876 case ';': 12877 lex_state = EXPR_BEG; 12878 command_start = TRUE; 12879 return ';'; 12880 12881 case ',': 12882 lex_state = EXPR_BEG; 12883 return ','; 12884 12885 case '~': 12886 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12887 if ((c = nextc()) != '@') { 12888 pushback(c); 12889 } 12890 lex_state = EXPR_ARG; 12891 } 12892 else { 12893 lex_state = EXPR_BEG; 12894 } 12895 return '~'; 12896 12897 case '(': 12898 if (IS_BEG()) { 12899 c = tLPAREN; 12900 } 12901 else if (IS_SPCARG(-1)) { 12902 c = tLPAREN_ARG; 12903 } 12904 paren_nest++; 12905 COND_PUSH(0); 12906 CMDARG_PUSH(0); 12907 lex_state = EXPR_BEG; 12908 return c; 12909 12910 case '[': 12911 paren_nest++; 12912 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12913 lex_state = EXPR_ARG; 12914 if ((c = nextc()) == ']') { 12915 if ((c = nextc()) == '=') { 12916 return tASET; 12917 } 12918 pushback(c); 12919 return tAREF; 12920 } 12921 pushback(c); 12922 return '['; 12923 } 12924 else if (IS_BEG()) { 12925 c = tLBRACK; 12926 } 12927 else if (IS_ARG() && space_seen) { 12928 c = tLBRACK; 12929 } 12930 lex_state = EXPR_BEG; 12931 COND_PUSH(0); 12932 CMDARG_PUSH(0); 12933 return c; 12934 12935 case '{': 12936 if (lpar_beg && lpar_beg == paren_nest) { 12937 lex_state = EXPR_BEG; 12938 lpar_beg = 0; 12939 --paren_nest; 12940 COND_PUSH(0); 12941 CMDARG_PUSH(0); 12942 return tLAMBEG; 12943 } 12944 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN) 12945 c = '{'; /* block (primary) */ 12946 else if (lex_state == EXPR_ENDARG) 12947 c = tLBRACE_ARG; /* block (expr) */ 12948 else 12949 c = tLBRACE; /* hash */ 12950 COND_PUSH(0); 12951 CMDARG_PUSH(0); 12952 lex_state = EXPR_BEG; 12953 if (c != tLBRACE) command_start = TRUE; 12954 return c; 12955 12956 case '\\': 12957 c = nextc(); 12958 if (c == '\n') { 12959 space_seen = 1; 12960 #ifdef RIPPER 12961 ripper_dispatch_scan_event(parser, tSP); 12962 #endif 12963 goto retry; /* skip \\n */ 12964 } 12965 pushback(c); 12966 return '\\'; 12967 12968 case '%': 12969 if (IS_BEG()) { 12970 int term; 12971 int paren; 12972 12973 c = nextc(); 12974 quotation: 12975 if (c == -1 || !ISALNUM(c)) { 12976 term = c; 12977 c = 'Q'; 12978 } 12979 else { 12980 term = nextc(); 12981 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { 12982 yyerror("unknown type of %string"); 12983 return 0; 12984 } 12985 } 12986 if (c == -1 || term == -1) { 12987 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 12988 return 0; 12989 } 12990 paren = term; 12991 if (term == '(') term = ')'; 12992 else if (term == '[') term = ']'; 12993 else if (term == '{') term = '}'; 12994 else if (term == '<') term = '>'; 12995 else paren = 0; 12996 12997 switch (c) { 12998 case 'Q': 12999 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 13000 return tSTRING_BEG; 13001 13002 case 'q': 13003 lex_strterm = NEW_STRTERM(str_squote, term, paren); 13004 return tSTRING_BEG; 13005 13006 case 'W': 13007 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13008 do {c = nextc();} while (ISSPACE(c)); 13009 pushback(c); 13010 return tWORDS_BEG; 13011 13012 case 'w': 13013 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13014 do {c = nextc();} while (ISSPACE(c)); 13015 pushback(c); 13016 return tQWORDS_BEG; 13017 13018 case 'x': 13019 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 13020 return tXSTRING_BEG; 13021 13022 case 'r': 13023 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 13024 return tREGEXP_BEG; 13025 13026 case 's': 13027 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 13028 lex_state = EXPR_FNAME; 13029 return tSYMBEG; 13030 13031 default: 13032 yyerror("unknown type of %string"); 13033 return 0; 13034 } 13035 } 13036 if ((c = nextc()) == '=') { 13037 set_yylval_id('%'); 13038 lex_state = EXPR_BEG; 13039 return tOP_ASGN; 13040 } 13041 if (IS_SPCARG(c)) { 13042 goto quotation; 13043 } 13044 switch (lex_state) { 13045 case EXPR_FNAME: case EXPR_DOT: 13046 lex_state = EXPR_ARG; break; 13047 default: 13048 lex_state = EXPR_BEG; break; 13049 } 13050 pushback(c); 13051 warn_balanced("%%", "string literal"); 13052 return '%'; 13053 13054 case '$': 13055 lex_state = EXPR_END; 13056 newtok(); 13057 c = nextc(); 13058 switch (c) { 13059 case '_': /* $_: last read line string */ 13060 c = nextc(); 13061 if (parser_is_identchar()) { 13062 tokadd('$'); 13063 tokadd('_'); 13064 break; 13065 } 13066 pushback(c); 13067 c = '_'; 13068 /* fall through */ 13069 case '~': /* $~: match-data */ 13070 case '*': /* $*: argv */ 13071 case '$': /* $$: pid */ 13072 case '?': /* $?: last status */ 13073 case '!': /* $!: error string */ 13074 case '@': /* $@: error position */ 13075 case '/': /* $/: input record separator */ 13076 case '\\': /* $\: output record separator */ 13077 case ';': /* $;: field separator */ 13078 case ',': /* $,: output field separator */ 13079 case '.': /* $.: last read line number */ 13080 case '=': /* $=: ignorecase */ 13081 case ':': /* $:: load path */ 13082 case '<': /* $<: reading filename */ 13083 case '>': /* $>: default output handle */ 13084 case '\"': /* $": already loaded files */ 13085 tokadd('$'); 13086 tokadd(c); 13087 tokfix(); 13088 set_yylval_name(rb_intern(tok())); 13089 return tGVAR; 13090 13091 case '-': 13092 tokadd('$'); 13093 tokadd(c); 13094 c = nextc(); 13095 if (parser_is_identchar()) { 13096 if (tokadd_mbchar(c) == -1) return 0; 13097 } 13098 else { 13099 pushback(c); 13100 } 13101 gvar: 13102 tokfix(); 13103 set_yylval_name(rb_intern(tok())); 13104 return tGVAR; 13105 13106 case '&': /* $&: last match */ 13107 case '`': /* $`: string before last match */ 13108 case '\'': /* $': string after last match */ 13109 case '+': /* $+: string matches last paren. */ 13110 if (last_state == EXPR_FNAME) { 13111 tokadd('$'); 13112 tokadd(c); 13113 goto gvar; 13114 } 13115 set_yylval_node(NEW_BACK_REF(c)); 13116 return tBACK_REF; 13117 13118 case '1': case '2': case '3': 13119 case '4': case '5': case '6': 13120 case '7': case '8': case '9': 13121 tokadd('$'); 13122 do { 13123 tokadd(c); 13124 c = nextc(); 13125 } while (c != -1 && ISDIGIT(c)); 13126 pushback(c); 13127 if (last_state == EXPR_FNAME) goto gvar; 13128 tokfix(); 13129 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 13130 return tNTH_REF; 13131 13132 default: 13133 if (!parser_is_identchar()) { 13134 pushback(c); 13135 return '$'; 13136 } 13137 case '0': 13138 tokadd('$'); 13139 } 13140 break; 13141 13142 case '@': 13143 c = nextc(); 13144 newtok(); 13145 tokadd('@'); 13146 if (c == '@') { 13147 tokadd('@'); 13148 c = nextc(); 13149 } 13150 if (c != -1 && ISDIGIT(c)) { 13151 if (tokidx == 1) { 13152 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 13153 } 13154 else { 13155 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 13156 } 13157 return 0; 13158 } 13159 if (!parser_is_identchar()) { 13160 pushback(c); 13161 return '@'; 13162 } 13163 break; 13164 13165 case '_': 13166 if (was_bol() && whole_match_p("__END__", 7, 0)) { 13167 ruby__end__seen = 1; 13168 parser->eofp = Qtrue; 13169 #ifndef RIPPER 13170 return -1; 13171 #else 13172 lex_goto_eol(parser); 13173 ripper_dispatch_scan_event(parser, k__END__); 13174 return 0; 13175 #endif 13176 } 13177 newtok(); 13178 break; 13179 13180 default: 13181 if (!parser_is_identchar()) { 13182 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 13183 goto retry; 13184 } 13185 13186 newtok(); 13187 break; 13188 } 13189 13190 mb = ENC_CODERANGE_7BIT; 13191 do { 13192 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 13193 if (tokadd_mbchar(c) == -1) return 0; 13194 c = nextc(); 13195 } while (parser_is_identchar()); 13196 switch (tok()[0]) { 13197 case '@': case '$': 13198 pushback(c); 13199 break; 13200 default: 13201 if ((c == '!' || c == '?') && !peek('=')) { 13202 tokadd(c); 13203 } 13204 else { 13205 pushback(c); 13206 } 13207 } 13208 tokfix(); 13209 13210 { 13211 int result = 0; 13212 13213 last_state = lex_state; 13214 switch (tok()[0]) { 13215 case '$': 13216 lex_state = EXPR_END; 13217 result = tGVAR; 13218 break; 13219 case '@': 13220 lex_state = EXPR_END; 13221 if (tok()[1] == '@') 13222 result = tCVAR; 13223 else 13224 result = tIVAR; 13225 break; 13226 13227 default: 13228 if (toklast() == '!' || toklast() == '?') { 13229 result = tFID; 13230 } 13231 else { 13232 if (lex_state == EXPR_FNAME) { 13233 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 13234 (!peek('=') || (peek_n('>', 1)))) { 13235 result = tIDENTIFIER; 13236 tokadd(c); 13237 tokfix(); 13238 } 13239 else { 13240 pushback(c); 13241 } 13242 } 13243 if (result == 0 && ISUPPER(tok()[0])) { 13244 result = tCONSTANT; 13245 } 13246 else { 13247 result = tIDENTIFIER; 13248 } 13249 } 13250 13251 if (IS_LABEL_POSSIBLE()) { 13252 if (IS_LABEL_SUFFIX(0)) { 13253 lex_state = EXPR_BEG; 13254 nextc(); 13255 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 13256 return tLABEL; 13257 } 13258 } 13259 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { 13260 const struct kwtable *kw; 13261 13262 /* See if it is a reserved word. */ 13263 kw = rb_reserved_word(tok(), toklen()); 13264 if (kw) { 13265 enum lex_state_e state = lex_state; 13266 lex_state = kw->state; 13267 if (state == EXPR_FNAME) { 13268 set_yylval_name(rb_intern(kw->name)); 13269 return kw->id[0]; 13270 } 13271 if (kw->id[0] == keyword_do) { 13272 command_start = TRUE; 13273 if (lpar_beg && lpar_beg == paren_nest) { 13274 lpar_beg = 0; 13275 --paren_nest; 13276 return keyword_do_LAMBDA; 13277 } 13278 if (COND_P()) return keyword_do_cond; 13279 if (CMDARG_P() && state != EXPR_CMDARG) 13280 return keyword_do_block; 13281 if (state == EXPR_ENDARG || state == EXPR_BEG) 13282 return keyword_do_block; 13283 return keyword_do; 13284 } 13285 if (state == EXPR_BEG || state == EXPR_VALUE) 13286 return kw->id[0]; 13287 else { 13288 if (kw->id[0] != kw->id[1]) 13289 lex_state = EXPR_BEG; 13290 return kw->id[1]; 13291 } 13292 } 13293 } 13294 13295 if (IS_BEG() || 13296 lex_state == EXPR_DOT || 13297 IS_ARG()) { 13298 if (cmd_state) { 13299 lex_state = EXPR_CMDARG; 13300 } 13301 else { 13302 lex_state = EXPR_ARG; 13303 } 13304 } 13305 else if (lex_state == EXPR_FNAME) { 13306 lex_state = EXPR_ENDFN; 13307 } 13308 else { 13309 lex_state = EXPR_END; 13310 } 13311 } 13312 { 13313 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 13314 13315 set_yylval_name(ident); 13316 if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { 13317 lex_state = EXPR_END; 13318 } 13319 } 13320 return result; 13321 } 13322 } 13323 13324 #if YYPURE 13325 static int 13326 yylex(void *lval, void *p) 13327 #else 13328 yylex(void *p) 13329 #endif 13330 { 13331 struct parser_params *parser = (struct parser_params*)p; 13332 int t; 13333 13334 #if YYPURE 13335 parser->parser_yylval = lval; 13336 parser->parser_yylval->val = Qundef; 13337 #endif 13338 t = parser_yylex(parser); 13339 #ifdef RIPPER 13340 if (!NIL_P(parser->delayed)) { 13341 ripper_dispatch_delayed_token(parser, t); 13342 return t; 13343 } 13344 if (t != 0) 13345 ripper_dispatch_scan_event(parser, t); 13346 #endif 13347 13348 return t; 13349 } 13350 13351 #ifndef RIPPER 13352 static NODE* 13353 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 13354 { 13355 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 13356 nd_set_line(n, ruby_sourceline); 13357 return n; 13358 } 13359 13360 enum node_type 13361 nodetype(NODE *node) /* for debug */ 13362 { 13363 return (enum node_type)nd_type(node); 13364 } 13365 13366 int 13367 nodeline(NODE *node) 13368 { 13369 return nd_line(node); 13370 } 13371 13372 static NODE* 13373 newline_node(NODE *node) 13374 { 13375 if (node) { 13376 node = remove_begin(node); 13377 node->flags |= NODE_FL_NEWLINE; 13378 } 13379 return node; 13380 } 13381 13382 static void 13383 fixpos(NODE *node, NODE *orig) 13384 { 13385 if (!node) return; 13386 if (!orig) return; 13387 if (orig == (NODE*)1) return; 13388 nd_set_line(node, nd_line(orig)); 13389 } 13390 13391 static void 13392 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 13393 { 13394 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 13395 } 13396 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 13397 13398 static void 13399 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 13400 { 13401 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 13402 } 13403 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 13404 13405 static NODE* 13406 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 13407 { 13408 NODE *end, *h = head, *nd; 13409 13410 if (tail == 0) return head; 13411 13412 if (h == 0) return tail; 13413 switch (nd_type(h)) { 13414 case NODE_LIT: 13415 case NODE_STR: 13416 case NODE_SELF: 13417 case NODE_TRUE: 13418 case NODE_FALSE: 13419 case NODE_NIL: 13420 parser_warning(h, "unused literal ignored"); 13421 return tail; 13422 default: 13423 h = end = NEW_BLOCK(head); 13424 end->nd_end = end; 13425 fixpos(end, head); 13426 head = end; 13427 break; 13428 case NODE_BLOCK: 13429 end = h->nd_end; 13430 break; 13431 } 13432 13433 nd = end->nd_head; 13434 switch (nd_type(nd)) { 13435 case NODE_RETURN: 13436 case NODE_BREAK: 13437 case NODE_NEXT: 13438 case NODE_REDO: 13439 case NODE_RETRY: 13440 if (RTEST(ruby_verbose)) { 13441 parser_warning(nd, "statement not reached"); 13442 } 13443 break; 13444 13445 default: 13446 break; 13447 } 13448 13449 if (nd_type(tail) != NODE_BLOCK) { 13450 tail = NEW_BLOCK(tail); 13451 tail->nd_end = tail; 13452 } 13453 end->nd_next = tail; 13454 h->nd_end = tail->nd_end; 13455 return head; 13456 } 13457 13458 /* append item to the list */ 13459 static NODE* 13460 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 13461 { 13462 NODE *last; 13463 13464 if (list == 0) return NEW_LIST(item); 13465 if (list->nd_next) { 13466 last = list->nd_next->nd_end; 13467 } 13468 else { 13469 last = list; 13470 } 13471 13472 list->nd_alen += 1; 13473 last->nd_next = NEW_LIST(item); 13474 list->nd_next->nd_end = last->nd_next; 13475 return list; 13476 } 13477 13478 /* concat two lists */ 13479 static NODE* 13480 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13481 { 13482 NODE *last; 13483 13484 if (head->nd_next) { 13485 last = head->nd_next->nd_end; 13486 } 13487 else { 13488 last = head; 13489 } 13490 13491 head->nd_alen += tail->nd_alen; 13492 last->nd_next = tail; 13493 if (tail->nd_next) { 13494 head->nd_next->nd_end = tail->nd_next->nd_end; 13495 } 13496 else { 13497 head->nd_next->nd_end = tail; 13498 } 13499 13500 return head; 13501 } 13502 13503 static int 13504 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 13505 { 13506 if (NIL_P(tail)) return 1; 13507 if (!rb_enc_compatible(head, tail)) { 13508 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 13509 rb_enc_name(rb_enc_get(head)), 13510 rb_enc_name(rb_enc_get(tail))); 13511 rb_str_resize(head, 0); 13512 rb_str_resize(tail, 0); 13513 return 0; 13514 } 13515 rb_str_buf_append(head, tail); 13516 return 1; 13517 } 13518 13519 /* concat two string literals */ 13520 static NODE * 13521 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13522 { 13523 enum node_type htype; 13524 13525 if (!head) return tail; 13526 if (!tail) return head; 13527 13528 htype = nd_type(head); 13529 if (htype == NODE_EVSTR) { 13530 NODE *node = NEW_DSTR(Qnil); 13531 head = list_append(node, head); 13532 } 13533 switch (nd_type(tail)) { 13534 case NODE_STR: 13535 if (htype == NODE_STR) { 13536 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { 13537 error: 13538 rb_gc_force_recycle((VALUE)head); 13539 rb_gc_force_recycle((VALUE)tail); 13540 return 0; 13541 } 13542 rb_gc_force_recycle((VALUE)tail); 13543 } 13544 else { 13545 list_append(head, tail); 13546 } 13547 break; 13548 13549 case NODE_DSTR: 13550 if (htype == NODE_STR) { 13551 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 13552 goto error; 13553 tail->nd_lit = head->nd_lit; 13554 rb_gc_force_recycle((VALUE)head); 13555 head = tail; 13556 } 13557 else if (NIL_P(tail->nd_lit)) { 13558 head->nd_alen += tail->nd_alen - 1; 13559 head->nd_next->nd_end->nd_next = tail->nd_next; 13560 head->nd_next->nd_end = tail->nd_next->nd_end; 13561 rb_gc_force_recycle((VALUE)tail); 13562 } 13563 else { 13564 nd_set_type(tail, NODE_ARRAY); 13565 tail->nd_head = NEW_STR(tail->nd_lit); 13566 list_concat(head, tail); 13567 } 13568 break; 13569 13570 case NODE_EVSTR: 13571 if (htype == NODE_STR) { 13572 nd_set_type(head, NODE_DSTR); 13573 head->nd_alen = 1; 13574 } 13575 list_append(head, tail); 13576 break; 13577 } 13578 return head; 13579 } 13580 13581 static NODE * 13582 evstr2dstr_gen(struct parser_params *parser, NODE *node) 13583 { 13584 if (nd_type(node) == NODE_EVSTR) { 13585 node = list_append(NEW_DSTR(Qnil), node); 13586 } 13587 return node; 13588 } 13589 13590 static NODE * 13591 new_evstr_gen(struct parser_params *parser, NODE *node) 13592 { 13593 NODE *head = node; 13594 13595 if (node) { 13596 switch (nd_type(node)) { 13597 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 13598 return node; 13599 } 13600 } 13601 return NEW_EVSTR(head); 13602 } 13603 13604 static NODE * 13605 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 13606 { 13607 value_expr(recv); 13608 value_expr(arg1); 13609 return NEW_CALL(recv, id, NEW_LIST(arg1)); 13610 } 13611 13612 static NODE * 13613 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 13614 { 13615 value_expr(recv); 13616 return NEW_CALL(recv, id, 0); 13617 } 13618 13619 static NODE* 13620 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13621 { 13622 value_expr(node1); 13623 value_expr(node2); 13624 if (node1) { 13625 switch (nd_type(node1)) { 13626 case NODE_DREGX: 13627 case NODE_DREGX_ONCE: 13628 return NEW_MATCH2(node1, node2); 13629 13630 case NODE_LIT: 13631 if (TYPE(node1->nd_lit) == T_REGEXP) { 13632 return NEW_MATCH2(node1, node2); 13633 } 13634 } 13635 } 13636 13637 if (node2) { 13638 switch (nd_type(node2)) { 13639 case NODE_DREGX: 13640 case NODE_DREGX_ONCE: 13641 return NEW_MATCH3(node2, node1); 13642 13643 case NODE_LIT: 13644 if (TYPE(node2->nd_lit) == T_REGEXP) { 13645 return NEW_MATCH3(node2, node1); 13646 } 13647 } 13648 } 13649 13650 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 13651 } 13652 13653 static NODE* 13654 gettable_gen(struct parser_params *parser, ID id) 13655 { 13656 if (id == keyword_self) { 13657 return NEW_SELF(); 13658 } 13659 else if (id == keyword_nil) { 13660 return NEW_NIL(); 13661 } 13662 else if (id == keyword_true) { 13663 return NEW_TRUE(); 13664 } 13665 else if (id == keyword_false) { 13666 return NEW_FALSE(); 13667 } 13668 else if (id == keyword__FILE__) { 13669 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 13670 rb_filesystem_encoding())); 13671 } 13672 else if (id == keyword__LINE__) { 13673 return NEW_LIT(INT2FIX(ruby_sourceline)); 13674 } 13675 else if (id == keyword__ENCODING__) { 13676 return NEW_LIT(rb_enc_from_encoding(parser->enc)); 13677 } 13678 else if (is_local_id(id)) { 13679 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 13680 if (local_id(id)) return NEW_LVAR(id); 13681 /* method call without arguments */ 13682 return NEW_VCALL(id); 13683 } 13684 else if (is_global_id(id)) { 13685 return NEW_GVAR(id); 13686 } 13687 else if (is_instance_id(id)) { 13688 return NEW_IVAR(id); 13689 } 13690 else if (is_const_id(id)) { 13691 return NEW_CONST(id); 13692 } 13693 else if (is_class_id(id)) { 13694 return NEW_CVAR(id); 13695 } 13696 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 13697 return 0; 13698 } 13699 #else /* !RIPPER */ 13700 static int 13701 id_is_var_gen(struct parser_params *parser, ID id) 13702 { 13703 if (is_notop_id(id)) { 13704 switch (id & ID_SCOPE_MASK) { 13705 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 13706 return 1; 13707 case ID_LOCAL: 13708 if (dyna_in_block() && dvar_defined(id)) return 1; 13709 if (local_id(id)) return 1; 13710 /* method call without arguments */ 13711 return 0; 13712 } 13713 } 13714 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 13715 return 0; 13716 } 13717 #endif /* !RIPPER */ 13718 13719 #ifdef RIPPER 13720 static VALUE 13721 assignable_gen(struct parser_params *parser, VALUE lhs) 13722 #else 13723 static NODE* 13724 assignable_gen(struct parser_params *parser, ID id, NODE *val) 13725 #endif 13726 { 13727 #ifdef RIPPER 13728 ID id = get_id(lhs); 13729 # define assignable_result(x) get_value(lhs) 13730 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 13731 #else 13732 # define assignable_result(x) (x) 13733 #endif 13734 if (!id) return assignable_result(0); 13735 if (id == keyword_self) { 13736 yyerror("Can't change the value of self"); 13737 } 13738 else if (id == keyword_nil) { 13739 yyerror("Can't assign to nil"); 13740 } 13741 else if (id == keyword_true) { 13742 yyerror("Can't assign to true"); 13743 } 13744 else if (id == keyword_false) { 13745 yyerror("Can't assign to false"); 13746 } 13747 else if (id == keyword__FILE__) { 13748 yyerror("Can't assign to __FILE__"); 13749 } 13750 else if (id == keyword__LINE__) { 13751 yyerror("Can't assign to __LINE__"); 13752 } 13753 else if (id == keyword__ENCODING__) { 13754 yyerror("Can't assign to __ENCODING__"); 13755 } 13756 else if (is_local_id(id)) { 13757 if (dyna_in_block()) { 13758 if (dvar_curr(id)) { 13759 return assignable_result(NEW_DASGN_CURR(id, val)); 13760 } 13761 else if (dvar_defined(id)) { 13762 return assignable_result(NEW_DASGN(id, val)); 13763 } 13764 else if (local_id(id)) { 13765 return assignable_result(NEW_LASGN(id, val)); 13766 } 13767 else { 13768 dyna_var(id); 13769 return assignable_result(NEW_DASGN_CURR(id, val)); 13770 } 13771 } 13772 else { 13773 if (!local_id(id)) { 13774 local_var(id); 13775 } 13776 return assignable_result(NEW_LASGN(id, val)); 13777 } 13778 } 13779 else if (is_global_id(id)) { 13780 return assignable_result(NEW_GASGN(id, val)); 13781 } 13782 else if (is_instance_id(id)) { 13783 return assignable_result(NEW_IASGN(id, val)); 13784 } 13785 else if (is_const_id(id)) { 13786 if (!in_def && !in_single) 13787 return assignable_result(NEW_CDECL(id, val, 0)); 13788 yyerror("dynamic constant assignment"); 13789 } 13790 else if (is_class_id(id)) { 13791 return assignable_result(NEW_CVASGN(id, val)); 13792 } 13793 else { 13794 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 13795 } 13796 return assignable_result(0); 13797 #undef assignable_result 13798 #undef parser_yyerror 13799 } 13800 13801 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1)) 13802 13803 static ID 13804 shadowing_lvar_gen(struct parser_params *parser, ID name) 13805 { 13806 if (idUScore == name) return name; 13807 if (dyna_in_block()) { 13808 if (dvar_curr(name)) { 13809 yyerror("duplicated argument name"); 13810 } 13811 else if (dvar_defined_get(name) || local_id(name)) { 13812 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 13813 vtable_add(lvtbl->vars, name); 13814 if (lvtbl->used) { 13815 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 13816 } 13817 } 13818 } 13819 else { 13820 if (local_id(name)) { 13821 yyerror("duplicated argument name"); 13822 } 13823 } 13824 return name; 13825 } 13826 13827 static void 13828 new_bv_gen(struct parser_params *parser, ID name) 13829 { 13830 if (!name) return; 13831 if (!is_local_id(name)) { 13832 compile_error(PARSER_ARG "invalid local variable - %s", 13833 rb_id2name(name)); 13834 return; 13835 } 13836 shadowing_lvar(name); 13837 dyna_var(name); 13838 } 13839 13840 #ifndef RIPPER 13841 static NODE * 13842 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 13843 { 13844 if (recv && nd_type(recv) == NODE_SELF) 13845 recv = (NODE *)1; 13846 return NEW_ATTRASGN(recv, tASET, idx); 13847 } 13848 13849 static void 13850 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13851 { 13852 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 13853 compile_error(PARSER_ARG "both block arg and actual block given"); 13854 } 13855 } 13856 13857 ID 13858 rb_id_attrset(ID id) 13859 { 13860 id &= ~ID_SCOPE_MASK; 13861 id |= ID_ATTRSET; 13862 return id; 13863 } 13864 13865 static NODE * 13866 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 13867 { 13868 if (recv && nd_type(recv) == NODE_SELF) 13869 recv = (NODE *)1; 13870 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 13871 } 13872 13873 static void 13874 rb_backref_error_gen(struct parser_params *parser, NODE *node) 13875 { 13876 switch (nd_type(node)) { 13877 case NODE_NTH_REF: 13878 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 13879 break; 13880 case NODE_BACK_REF: 13881 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 13882 break; 13883 } 13884 } 13885 13886 static NODE * 13887 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13888 { 13889 if (!node2) return node1; 13890 switch (nd_type(node1)) { 13891 case NODE_BLOCK_PASS: 13892 if (node1->nd_head) 13893 node1->nd_head = arg_concat(node1->nd_head, node2); 13894 else 13895 node1->nd_head = NEW_LIST(node2); 13896 return node1; 13897 case NODE_ARGSPUSH: 13898 if (nd_type(node2) != NODE_ARRAY) break; 13899 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 13900 nd_set_type(node1, NODE_ARGSCAT); 13901 return node1; 13902 case NODE_ARGSCAT: 13903 if (nd_type(node2) != NODE_ARRAY || 13904 nd_type(node1->nd_body) != NODE_ARRAY) break; 13905 node1->nd_body = list_concat(node1->nd_body, node2); 13906 return node1; 13907 } 13908 return NEW_ARGSCAT(node1, node2); 13909 } 13910 13911 static NODE * 13912 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13913 { 13914 if (!node1) return NEW_LIST(node2); 13915 switch (nd_type(node1)) { 13916 case NODE_ARRAY: 13917 return list_append(node1, node2); 13918 case NODE_BLOCK_PASS: 13919 node1->nd_head = arg_append(node1->nd_head, node2); 13920 return node1; 13921 case NODE_ARGSPUSH: 13922 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 13923 nd_set_type(node1, NODE_ARGSCAT); 13924 return node1; 13925 } 13926 return NEW_ARGSPUSH(node1, node2); 13927 } 13928 13929 static NODE * 13930 splat_array(NODE* node) 13931 { 13932 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 13933 if (nd_type(node) == NODE_ARRAY) return node; 13934 return 0; 13935 } 13936 13937 static NODE * 13938 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 13939 { 13940 if (!lhs) return 0; 13941 13942 switch (nd_type(lhs)) { 13943 case NODE_GASGN: 13944 case NODE_IASGN: 13945 case NODE_IASGN2: 13946 case NODE_LASGN: 13947 case NODE_DASGN: 13948 case NODE_DASGN_CURR: 13949 case NODE_MASGN: 13950 case NODE_CDECL: 13951 case NODE_CVASGN: 13952 lhs->nd_value = rhs; 13953 break; 13954 13955 case NODE_ATTRASGN: 13956 case NODE_CALL: 13957 lhs->nd_args = arg_append(lhs->nd_args, rhs); 13958 break; 13959 13960 default: 13961 /* should not happen */ 13962 break; 13963 } 13964 13965 return lhs; 13966 } 13967 13968 static int 13969 value_expr_gen(struct parser_params *parser, NODE *node) 13970 { 13971 int cond = 0; 13972 13973 if (!node) { 13974 rb_warning0("empty expression"); 13975 } 13976 while (node) { 13977 switch (nd_type(node)) { 13978 case NODE_DEFN: 13979 case NODE_DEFS: 13980 parser_warning(node, "void value expression"); 13981 return FALSE; 13982 13983 case NODE_RETURN: 13984 case NODE_BREAK: 13985 case NODE_NEXT: 13986 case NODE_REDO: 13987 case NODE_RETRY: 13988 if (!cond) yyerror("void value expression"); 13989 /* or "control never reach"? */ 13990 return FALSE; 13991 13992 case NODE_BLOCK: 13993 while (node->nd_next) { 13994 node = node->nd_next; 13995 } 13996 node = node->nd_head; 13997 break; 13998 13999 case NODE_BEGIN: 14000 node = node->nd_body; 14001 break; 14002 14003 case NODE_IF: 14004 if (!node->nd_body) { 14005 node = node->nd_else; 14006 break; 14007 } 14008 else if (!node->nd_else) { 14009 node = node->nd_body; 14010 break; 14011 } 14012 if (!value_expr(node->nd_body)) return FALSE; 14013 node = node->nd_else; 14014 break; 14015 14016 case NODE_AND: 14017 case NODE_OR: 14018 cond = 1; 14019 node = node->nd_2nd; 14020 break; 14021 14022 default: 14023 return TRUE; 14024 } 14025 } 14026 14027 return TRUE; 14028 } 14029 14030 static void 14031 void_expr_gen(struct parser_params *parser, NODE *node) 14032 { 14033 const char *useless = 0; 14034 14035 if (!RTEST(ruby_verbose)) return; 14036 14037 if (!node) return; 14038 switch (nd_type(node)) { 14039 case NODE_CALL: 14040 switch (node->nd_mid) { 14041 case '+': 14042 case '-': 14043 case '*': 14044 case '/': 14045 case '%': 14046 case tPOW: 14047 case tUPLUS: 14048 case tUMINUS: 14049 case '|': 14050 case '^': 14051 case '&': 14052 case tCMP: 14053 case '>': 14054 case tGEQ: 14055 case '<': 14056 case tLEQ: 14057 case tEQ: 14058 case tNEQ: 14059 useless = rb_id2name(node->nd_mid); 14060 break; 14061 } 14062 break; 14063 14064 case NODE_LVAR: 14065 case NODE_DVAR: 14066 case NODE_GVAR: 14067 case NODE_IVAR: 14068 case NODE_CVAR: 14069 case NODE_NTH_REF: 14070 case NODE_BACK_REF: 14071 useless = "a variable"; 14072 break; 14073 case NODE_CONST: 14074 useless = "a constant"; 14075 break; 14076 case NODE_LIT: 14077 case NODE_STR: 14078 case NODE_DSTR: 14079 case NODE_DREGX: 14080 case NODE_DREGX_ONCE: 14081 useless = "a literal"; 14082 break; 14083 case NODE_COLON2: 14084 case NODE_COLON3: 14085 useless = "::"; 14086 break; 14087 case NODE_DOT2: 14088 useless = ".."; 14089 break; 14090 case NODE_DOT3: 14091 useless = "..."; 14092 break; 14093 case NODE_SELF: 14094 useless = "self"; 14095 break; 14096 case NODE_NIL: 14097 useless = "nil"; 14098 break; 14099 case NODE_TRUE: 14100 useless = "true"; 14101 break; 14102 case NODE_FALSE: 14103 useless = "false"; 14104 break; 14105 case NODE_DEFINED: 14106 useless = "defined?"; 14107 break; 14108 } 14109 14110 if (useless) { 14111 int line = ruby_sourceline; 14112 14113 ruby_sourceline = nd_line(node); 14114 rb_warnS("possibly useless use of %s in void context", useless); 14115 ruby_sourceline = line; 14116 } 14117 } 14118 14119 static void 14120 void_stmts_gen(struct parser_params *parser, NODE *node) 14121 { 14122 if (!RTEST(ruby_verbose)) return; 14123 if (!node) return; 14124 if (nd_type(node) != NODE_BLOCK) return; 14125 14126 for (;;) { 14127 if (!node->nd_next) return; 14128 void_expr0(node->nd_head); 14129 node = node->nd_next; 14130 } 14131 } 14132 14133 static NODE * 14134 remove_begin(NODE *node) 14135 { 14136 NODE **n = &node, *n1 = node; 14137 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 14138 *n = n1 = n1->nd_body; 14139 } 14140 return node; 14141 } 14142 14143 static void 14144 reduce_nodes_gen(struct parser_params *parser, NODE **body) 14145 { 14146 NODE *node = *body; 14147 14148 if (!node) { 14149 *body = NEW_NIL(); 14150 return; 14151 } 14152 #define subnodes(n1, n2) \ 14153 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 14154 (!node->n2) ? (body = &node->n1, 1) : \ 14155 (reduce_nodes(&node->n1), body = &node->n2, 1)) 14156 14157 while (node) { 14158 int newline = (int)(node->flags & NODE_FL_NEWLINE); 14159 switch (nd_type(node)) { 14160 end: 14161 case NODE_NIL: 14162 *body = 0; 14163 return; 14164 case NODE_RETURN: 14165 *body = node = node->nd_stts; 14166 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14167 continue; 14168 case NODE_BEGIN: 14169 *body = node = node->nd_body; 14170 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14171 continue; 14172 case NODE_BLOCK: 14173 body = &node->nd_end->nd_head; 14174 break; 14175 case NODE_IF: 14176 if (subnodes(nd_body, nd_else)) break; 14177 return; 14178 case NODE_CASE: 14179 body = &node->nd_body; 14180 break; 14181 case NODE_WHEN: 14182 if (!subnodes(nd_body, nd_next)) goto end; 14183 break; 14184 case NODE_ENSURE: 14185 if (!subnodes(nd_head, nd_resq)) goto end; 14186 break; 14187 case NODE_RESCUE: 14188 if (node->nd_else) { 14189 body = &node->nd_resq; 14190 break; 14191 } 14192 if (!subnodes(nd_head, nd_resq)) goto end; 14193 break; 14194 default: 14195 return; 14196 } 14197 node = *body; 14198 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14199 } 14200 14201 #undef subnodes 14202 } 14203 14204 static int 14205 assign_in_cond(struct parser_params *parser, NODE *node) 14206 { 14207 switch (nd_type(node)) { 14208 case NODE_MASGN: 14209 yyerror("multiple assignment in conditional"); 14210 return 1; 14211 14212 case NODE_LASGN: 14213 case NODE_DASGN: 14214 case NODE_DASGN_CURR: 14215 case NODE_GASGN: 14216 case NODE_IASGN: 14217 break; 14218 14219 default: 14220 return 0; 14221 } 14222 14223 if (!node->nd_value) return 1; 14224 switch (nd_type(node->nd_value)) { 14225 case NODE_LIT: 14226 case NODE_STR: 14227 case NODE_NIL: 14228 case NODE_TRUE: 14229 case NODE_FALSE: 14230 /* reports always */ 14231 parser_warn(node->nd_value, "found = in conditional, should be =="); 14232 return 1; 14233 14234 case NODE_DSTR: 14235 case NODE_XSTR: 14236 case NODE_DXSTR: 14237 case NODE_EVSTR: 14238 case NODE_DREGX: 14239 default: 14240 break; 14241 } 14242 return 1; 14243 } 14244 14245 static void 14246 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14247 { 14248 if (!e_option_supplied(parser)) parser_warn(node, str); 14249 } 14250 14251 static void 14252 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14253 { 14254 if (!e_option_supplied(parser)) parser_warning(node, str); 14255 } 14256 14257 static void 14258 fixup_nodes(NODE **rootnode) 14259 { 14260 NODE *node, *next, *head; 14261 14262 for (node = *rootnode; node; node = next) { 14263 enum node_type type; 14264 VALUE val; 14265 14266 next = node->nd_next; 14267 head = node->nd_head; 14268 rb_gc_force_recycle((VALUE)node); 14269 *rootnode = next; 14270 switch (type = nd_type(head)) { 14271 case NODE_DOT2: 14272 case NODE_DOT3: 14273 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 14274 type == NODE_DOT3); 14275 rb_gc_force_recycle((VALUE)head->nd_beg); 14276 rb_gc_force_recycle((VALUE)head->nd_end); 14277 nd_set_type(head, NODE_LIT); 14278 head->nd_lit = val; 14279 break; 14280 default: 14281 break; 14282 } 14283 } 14284 } 14285 14286 static NODE *cond0(struct parser_params*,NODE*); 14287 14288 static NODE* 14289 range_op(struct parser_params *parser, NODE *node) 14290 { 14291 enum node_type type; 14292 14293 if (node == 0) return 0; 14294 14295 type = nd_type(node); 14296 value_expr(node); 14297 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 14298 warn_unless_e_option(parser, node, "integer literal in conditional range"); 14299 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 14300 } 14301 return cond0(parser, node); 14302 } 14303 14304 static int 14305 literal_node(NODE *node) 14306 { 14307 if (!node) return 1; /* same as NODE_NIL */ 14308 switch (nd_type(node)) { 14309 case NODE_LIT: 14310 case NODE_STR: 14311 case NODE_DSTR: 14312 case NODE_EVSTR: 14313 case NODE_DREGX: 14314 case NODE_DREGX_ONCE: 14315 case NODE_DSYM: 14316 return 2; 14317 case NODE_TRUE: 14318 case NODE_FALSE: 14319 case NODE_NIL: 14320 return 1; 14321 } 14322 return 0; 14323 } 14324 14325 static NODE* 14326 cond0(struct parser_params *parser, NODE *node) 14327 { 14328 if (node == 0) return 0; 14329 assign_in_cond(parser, node); 14330 14331 switch (nd_type(node)) { 14332 case NODE_DSTR: 14333 case NODE_EVSTR: 14334 case NODE_STR: 14335 rb_warn0("string literal in condition"); 14336 break; 14337 14338 case NODE_DREGX: 14339 case NODE_DREGX_ONCE: 14340 warning_unless_e_option(parser, node, "regex literal in condition"); 14341 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 14342 14343 case NODE_AND: 14344 case NODE_OR: 14345 node->nd_1st = cond0(parser, node->nd_1st); 14346 node->nd_2nd = cond0(parser, node->nd_2nd); 14347 break; 14348 14349 case NODE_DOT2: 14350 case NODE_DOT3: 14351 node->nd_beg = range_op(parser, node->nd_beg); 14352 node->nd_end = range_op(parser, node->nd_end); 14353 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 14354 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 14355 if (!e_option_supplied(parser)) { 14356 int b = literal_node(node->nd_beg); 14357 int e = literal_node(node->nd_end); 14358 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 14359 parser_warn(node, "range literal in condition"); 14360 } 14361 } 14362 break; 14363 14364 case NODE_DSYM: 14365 parser_warning(node, "literal in condition"); 14366 break; 14367 14368 case NODE_LIT: 14369 if (TYPE(node->nd_lit) == T_REGEXP) { 14370 warn_unless_e_option(parser, node, "regex literal in condition"); 14371 nd_set_type(node, NODE_MATCH); 14372 } 14373 else { 14374 parser_warning(node, "literal in condition"); 14375 } 14376 default: 14377 break; 14378 } 14379 return node; 14380 } 14381 14382 static NODE* 14383 cond_gen(struct parser_params *parser, NODE *node) 14384 { 14385 if (node == 0) return 0; 14386 return cond0(parser, node); 14387 } 14388 14389 static NODE* 14390 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 14391 { 14392 value_expr(left); 14393 if (left && (enum node_type)nd_type(left) == type) { 14394 NODE *node = left, *second; 14395 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 14396 node = second; 14397 } 14398 node->nd_2nd = NEW_NODE(type, second, right, 0); 14399 return left; 14400 } 14401 return NEW_NODE(type, left, right, 0); 14402 } 14403 14404 static void 14405 no_blockarg(struct parser_params *parser, NODE *node) 14406 { 14407 if (node && nd_type(node) == NODE_BLOCK_PASS) { 14408 compile_error(PARSER_ARG "block argument should not be given"); 14409 } 14410 } 14411 14412 static NODE * 14413 ret_args_gen(struct parser_params *parser, NODE *node) 14414 { 14415 if (node) { 14416 no_blockarg(parser, node); 14417 if (nd_type(node) == NODE_ARRAY) { 14418 if (node->nd_next == 0) { 14419 node = node->nd_head; 14420 } 14421 else { 14422 nd_set_type(node, NODE_VALUES); 14423 } 14424 } 14425 } 14426 return node; 14427 } 14428 14429 static NODE * 14430 new_yield_gen(struct parser_params *parser, NODE *node) 14431 { 14432 long state = Qtrue; 14433 14434 if (node) { 14435 no_blockarg(parser, node); 14436 if (node && nd_type(node) == NODE_SPLAT) { 14437 state = Qtrue; 14438 } 14439 } 14440 else { 14441 state = Qfalse; 14442 } 14443 return NEW_YIELD(node, state); 14444 } 14445 14446 static NODE* 14447 negate_lit(NODE *node) 14448 { 14449 switch (TYPE(node->nd_lit)) { 14450 case T_FIXNUM: 14451 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 14452 break; 14453 case T_BIGNUM: 14454 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 14455 break; 14456 case T_FLOAT: 14457 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 14458 break; 14459 default: 14460 break; 14461 } 14462 return node; 14463 } 14464 14465 static NODE * 14466 arg_blk_pass(NODE *node1, NODE *node2) 14467 { 14468 if (node2) { 14469 node2->nd_head = node1; 14470 return node2; 14471 } 14472 return node1; 14473 } 14474 14475 static NODE* 14476 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) 14477 { 14478 int saved_line = ruby_sourceline; 14479 NODE *node; 14480 NODE *i1, *i2 = 0; 14481 14482 node = NEW_ARGS(m ? m->nd_plen : 0, o); 14483 i1 = m ? m->nd_next : 0; 14484 node->nd_next = NEW_ARGS_AUX(r, b); 14485 14486 if (p) { 14487 i2 = p->nd_next; 14488 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); 14489 } 14490 else if (i1) { 14491 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); 14492 } 14493 if (i1 || i2) { 14494 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); 14495 } 14496 ruby_sourceline = saved_line; 14497 return node; 14498 } 14499 #endif /* !RIPPER */ 14500 14501 static void 14502 warn_unused_var(struct parser_params *parser, struct local_vars *local) 14503 { 14504 int i, cnt; 14505 ID *v, *u; 14506 14507 if (!local->used) return; 14508 v = local->vars->tbl; 14509 u = local->used->tbl; 14510 cnt = local->used->pos; 14511 if (cnt != local->vars->pos) { 14512 rb_bug("local->used->pos != local->vars->pos"); 14513 } 14514 for (i = 0; i < cnt; ++i) { 14515 if (!v[i] || (u[i] & LVAR_USED)) continue; 14516 if (idUScore == v[i]) continue; 14517 rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 14518 } 14519 } 14520 14521 static void 14522 local_push_gen(struct parser_params *parser, int inherit_dvars) 14523 { 14524 struct local_vars *local; 14525 14526 local = ALLOC(struct local_vars); 14527 local->prev = lvtbl; 14528 local->args = vtable_alloc(0); 14529 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 14530 local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 14531 lvtbl = local; 14532 } 14533 14534 static void 14535 local_pop_gen(struct parser_params *parser) 14536 { 14537 struct local_vars *local = lvtbl->prev; 14538 if (lvtbl->used) { 14539 warn_unused_var(parser, lvtbl); 14540 vtable_free(lvtbl->used); 14541 } 14542 vtable_free(lvtbl->args); 14543 vtable_free(lvtbl->vars); 14544 xfree(lvtbl); 14545 lvtbl = local; 14546 } 14547 14548 #ifndef RIPPER 14549 static ID* 14550 vtable_tblcpy(ID *buf, const struct vtable *src) 14551 { 14552 int i, cnt = vtable_size(src); 14553 14554 if (cnt > 0) { 14555 buf[0] = cnt; 14556 for (i = 0; i < cnt; i++) { 14557 buf[i] = src->tbl[i]; 14558 } 14559 return buf; 14560 } 14561 return 0; 14562 } 14563 14564 static ID* 14565 local_tbl_gen(struct parser_params *parser) 14566 { 14567 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 14568 ID *buf; 14569 14570 if (cnt <= 0) return 0; 14571 buf = ALLOC_N(ID, cnt + 1); 14572 vtable_tblcpy(buf+1, lvtbl->args); 14573 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 14574 buf[0] = cnt; 14575 return buf; 14576 } 14577 #endif 14578 14579 static int 14580 arg_var_gen(struct parser_params *parser, ID id) 14581 { 14582 vtable_add(lvtbl->args, id); 14583 return vtable_size(lvtbl->args) - 1; 14584 } 14585 14586 static int 14587 local_var_gen(struct parser_params *parser, ID id) 14588 { 14589 vtable_add(lvtbl->vars, id); 14590 if (lvtbl->used) { 14591 vtable_add(lvtbl->used, (ID)ruby_sourceline); 14592 } 14593 return vtable_size(lvtbl->vars) - 1; 14594 } 14595 14596 static int 14597 local_id_gen(struct parser_params *parser, ID id) 14598 { 14599 struct vtable *vars, *args, *used; 14600 14601 vars = lvtbl->vars; 14602 args = lvtbl->args; 14603 used = lvtbl->used; 14604 14605 while (vars && POINTER_P(vars->prev)) { 14606 vars = vars->prev; 14607 args = args->prev; 14608 if (used) used = used->prev; 14609 } 14610 14611 if (vars && vars->prev == DVARS_INHERIT) { 14612 return rb_local_defined(id); 14613 } 14614 else if (vtable_included(args, id)) { 14615 return 1; 14616 } 14617 else { 14618 int i = vtable_included(vars, id); 14619 if (i && used) used->tbl[i-1] |= LVAR_USED; 14620 return i != 0; 14621 } 14622 } 14623 14624 static const struct vtable * 14625 dyna_push_gen(struct parser_params *parser) 14626 { 14627 lvtbl->args = vtable_alloc(lvtbl->args); 14628 lvtbl->vars = vtable_alloc(lvtbl->vars); 14629 if (lvtbl->used) { 14630 lvtbl->used = vtable_alloc(lvtbl->used); 14631 } 14632 return lvtbl->args; 14633 } 14634 14635 static void 14636 dyna_pop_1(struct parser_params *parser) 14637 { 14638 struct vtable *tmp; 14639 14640 if ((tmp = lvtbl->used) != 0) { 14641 warn_unused_var(parser, lvtbl); 14642 lvtbl->used = lvtbl->used->prev; 14643 vtable_free(tmp); 14644 } 14645 tmp = lvtbl->args; 14646 lvtbl->args = lvtbl->args->prev; 14647 vtable_free(tmp); 14648 tmp = lvtbl->vars; 14649 lvtbl->vars = lvtbl->vars->prev; 14650 vtable_free(tmp); 14651 } 14652 14653 static void 14654 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 14655 { 14656 while (lvtbl->args != lvargs) { 14657 dyna_pop_1(parser); 14658 if (!lvtbl->args) { 14659 struct local_vars *local = lvtbl->prev; 14660 xfree(lvtbl); 14661 lvtbl = local; 14662 } 14663 } 14664 dyna_pop_1(parser); 14665 } 14666 14667 static int 14668 dyna_in_block_gen(struct parser_params *parser) 14669 { 14670 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 14671 } 14672 14673 static int 14674 dvar_defined_gen(struct parser_params *parser, ID id, int get) 14675 { 14676 struct vtable *vars, *args, *used; 14677 int i; 14678 14679 args = lvtbl->args; 14680 vars = lvtbl->vars; 14681 used = lvtbl->used; 14682 14683 while (POINTER_P(vars)) { 14684 if (vtable_included(args, id)) { 14685 return 1; 14686 } 14687 if ((i = vtable_included(vars, id)) != 0) { 14688 if (used) used->tbl[i-1] |= LVAR_USED; 14689 return 1; 14690 } 14691 args = args->prev; 14692 vars = vars->prev; 14693 if (get) used = 0; 14694 if (used) used = used->prev; 14695 } 14696 14697 if (vars == DVARS_INHERIT) { 14698 return rb_dvar_defined(id); 14699 } 14700 14701 return 0; 14702 } 14703 14704 static int 14705 dvar_curr_gen(struct parser_params *parser, ID id) 14706 { 14707 return (vtable_included(lvtbl->args, id) || 14708 vtable_included(lvtbl->vars, id)); 14709 } 14710 14711 #ifndef RIPPER 14712 static void 14713 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 14714 { 14715 int c = RE_OPTION_ENCODING_IDX(options); 14716 14717 if (c) { 14718 int opt, idx; 14719 rb_char_to_option_kcode(c, &opt, &idx); 14720 if (idx != ENCODING_GET(str) && 14721 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 14722 goto error; 14723 } 14724 ENCODING_SET(str, idx); 14725 } 14726 else if (RE_OPTION_ENCODING_NONE(options)) { 14727 if (!ENCODING_IS_ASCII8BIT(str) && 14728 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 14729 c = 'n'; 14730 goto error; 14731 } 14732 rb_enc_associate(str, rb_ascii8bit_encoding()); 14733 } 14734 else if (parser->enc == rb_usascii_encoding()) { 14735 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 14736 /* raise in re.c */ 14737 rb_enc_associate(str, rb_usascii_encoding()); 14738 } 14739 else { 14740 rb_enc_associate(str, rb_ascii8bit_encoding()); 14741 } 14742 } 14743 return; 14744 14745 error: 14746 compile_error(PARSER_ARG 14747 "regexp encoding option '%c' differs from source encoding '%s'", 14748 c, rb_enc_name(rb_enc_get(str))); 14749 } 14750 14751 static int 14752 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 14753 { 14754 VALUE err; 14755 reg_fragment_setenc(str, options); 14756 err = rb_reg_check_preprocess(str); 14757 if (err != Qnil) { 14758 err = rb_obj_as_string(err); 14759 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 14760 RB_GC_GUARD(err); 14761 return 0; 14762 } 14763 return 1; 14764 } 14765 14766 typedef struct { 14767 struct parser_params* parser; 14768 rb_encoding *enc; 14769 NODE *succ_block; 14770 NODE *fail_block; 14771 int num; 14772 } reg_named_capture_assign_t; 14773 14774 static int 14775 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 14776 int back_num, int *back_refs, OnigRegex regex, void *arg0) 14777 { 14778 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 14779 struct parser_params* parser = arg->parser; 14780 rb_encoding *enc = arg->enc; 14781 long len = name_end - name; 14782 const char *s = (const char *)name; 14783 ID var; 14784 14785 arg->num++; 14786 14787 if (arg->succ_block == 0) { 14788 arg->succ_block = NEW_BEGIN(0); 14789 arg->fail_block = NEW_BEGIN(0); 14790 } 14791 14792 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 14793 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 14794 !rb_enc_symname2_p(s, len, enc)) { 14795 return ST_CONTINUE; 14796 } 14797 var = rb_intern3(s, len, enc); 14798 if (dvar_defined(var) || local_id(var)) { 14799 rb_warningS("named capture conflicts a local variable - %s", 14800 rb_id2name(var)); 14801 } 14802 arg->succ_block = block_append(arg->succ_block, 14803 newline_node(node_assign(assignable(var,0), 14804 NEW_CALL( 14805 gettable(rb_intern("$~")), 14806 idAREF, 14807 NEW_LIST(NEW_LIT(ID2SYM(var)))) 14808 ))); 14809 arg->fail_block = block_append(arg->fail_block, 14810 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 14811 return ST_CONTINUE; 14812 } 14813 14814 static NODE * 14815 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 14816 { 14817 reg_named_capture_assign_t arg; 14818 14819 arg.parser = parser; 14820 arg.enc = rb_enc_get(regexp); 14821 arg.succ_block = 0; 14822 arg.fail_block = 0; 14823 arg.num = 0; 14824 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 14825 14826 if (arg.num == 0) 14827 return match; 14828 14829 return 14830 block_append( 14831 newline_node(match), 14832 NEW_IF(gettable(rb_intern("$~")), 14833 block_append( 14834 newline_node(arg.succ_block), 14835 newline_node( 14836 NEW_CALL( 14837 gettable(rb_intern("$~")), 14838 rb_intern("begin"), 14839 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 14840 block_append( 14841 newline_node(arg.fail_block), 14842 newline_node( 14843 NEW_LIT(Qnil))))); 14844 } 14845 14846 static VALUE 14847 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 14848 { 14849 VALUE re; 14850 VALUE err; 14851 14852 reg_fragment_setenc(str, options); 14853 err = rb_errinfo(); 14854 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 14855 if (NIL_P(re)) { 14856 ID mesg = rb_intern("mesg"); 14857 VALUE m = rb_attr_get(rb_errinfo(), mesg); 14858 rb_set_errinfo(err); 14859 if (!NIL_P(err)) { 14860 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 14861 } 14862 else { 14863 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 14864 } 14865 return Qnil; 14866 } 14867 return re; 14868 } 14869 14870 void 14871 rb_gc_mark_parser(void) 14872 { 14873 } 14874 14875 NODE* 14876 rb_parser_append_print(VALUE vparser, NODE *node) 14877 { 14878 NODE *prelude = 0; 14879 NODE *scope = node; 14880 struct parser_params *parser; 14881 14882 if (!node) return node; 14883 14884 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 14885 14886 node = node->nd_body; 14887 14888 if (nd_type(node) == NODE_PRELUDE) { 14889 prelude = node; 14890 node = node->nd_body; 14891 } 14892 14893 node = block_append(node, 14894 NEW_FCALL(rb_intern("print"), 14895 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 14896 if (prelude) { 14897 prelude->nd_body = node; 14898 scope->nd_body = prelude; 14899 } 14900 else { 14901 scope->nd_body = node; 14902 } 14903 14904 return scope; 14905 } 14906 14907 NODE * 14908 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 14909 { 14910 NODE *prelude = 0; 14911 NODE *scope = node; 14912 struct parser_params *parser; 14913 14914 if (!node) return node; 14915 14916 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 14917 14918 node = node->nd_body; 14919 14920 if (nd_type(node) == NODE_PRELUDE) { 14921 prelude = node; 14922 node = node->nd_body; 14923 } 14924 if (split) { 14925 node = block_append(NEW_GASGN(rb_intern("$F"), 14926 NEW_CALL(NEW_GVAR(rb_intern("$_")), 14927 rb_intern("split"), 0)), 14928 node); 14929 } 14930 if (chop) { 14931 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 14932 rb_intern("chop!"), 0), node); 14933 } 14934 14935 node = NEW_OPT_N(node); 14936 14937 if (prelude) { 14938 prelude->nd_body = node; 14939 scope->nd_body = prelude; 14940 } 14941 else { 14942 scope->nd_body = node; 14943 } 14944 14945 return scope; 14946 } 14947 14948 static const struct { 14949 ID token; 14950 const char *name; 14951 } op_tbl[] = { 14952 {tDOT2, ".."}, 14953 {tDOT3, "..."}, 14954 {'+', "+(binary)"}, 14955 {'-', "-(binary)"}, 14956 {tPOW, "**"}, 14957 {tUPLUS, "+@"}, 14958 {tUMINUS, "-@"}, 14959 {tCMP, "<=>"}, 14960 {tGEQ, ">="}, 14961 {tLEQ, "<="}, 14962 {tEQ, "=="}, 14963 {tEQQ, "==="}, 14964 {tNEQ, "!="}, 14965 {tMATCH, "=~"}, 14966 {tNMATCH, "!~"}, 14967 {tAREF, "[]"}, 14968 {tASET, "[]="}, 14969 {tLSHFT, "<<"}, 14970 {tRSHFT, ">>"}, 14971 {tCOLON2, "::"}, 14972 }; 14973 14974 #define op_tbl_count numberof(op_tbl) 14975 14976 #ifndef ENABLE_SELECTOR_NAMESPACE 14977 #define ENABLE_SELECTOR_NAMESPACE 0 14978 #endif 14979 14980 static struct symbols { 14981 ID last_id; 14982 st_table *sym_id; 14983 st_table *id_str; 14984 #if ENABLE_SELECTOR_NAMESPACE 14985 st_table *ivar2_id; 14986 st_table *id_ivar2; 14987 #endif 14988 VALUE op_sym[tLAST_TOKEN]; 14989 } global_symbols = {tLAST_ID}; 14990 14991 static const struct st_hash_type symhash = { 14992 rb_str_hash_cmp, 14993 rb_str_hash, 14994 }; 14995 14996 #if ENABLE_SELECTOR_NAMESPACE 14997 struct ivar2_key { 14998 ID id; 14999 VALUE klass; 15000 }; 15001 15002 static int 15003 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 15004 { 15005 if (key1->id == key2->id && key1->klass == key2->klass) { 15006 return 0; 15007 } 15008 return 1; 15009 } 15010 15011 static int 15012 ivar2_hash(struct ivar2_key *key) 15013 { 15014 return (key->id << 8) ^ (key->klass >> 2); 15015 } 15016 15017 static const struct st_hash_type ivar2_hash_type = { 15018 ivar2_cmp, 15019 ivar2_hash, 15020 }; 15021 #endif 15022 15023 void 15024 Init_sym(void) 15025 { 15026 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 15027 global_symbols.id_str = st_init_numtable_with_size(1000); 15028 #if ENABLE_SELECTOR_NAMESPACE 15029 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 15030 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 15031 #endif 15032 15033 Init_id(); 15034 } 15035 15036 void 15037 rb_gc_mark_symbols(void) 15038 { 15039 rb_mark_tbl(global_symbols.id_str); 15040 rb_gc_mark_locations(global_symbols.op_sym, 15041 global_symbols.op_sym + tLAST_TOKEN); 15042 } 15043 #endif /* !RIPPER */ 15044 15045 static ID 15046 internal_id_gen(struct parser_params *parser) 15047 { 15048 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 15049 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 15050 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 15051 } 15052 15053 #ifndef RIPPER 15054 static int 15055 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 15056 { 15057 int mb = 0; 15058 15059 if (m >= e) return 0; 15060 switch (*m) { 15061 case '~': case '*': case '$': case '?': case '!': case '@': 15062 case '/': case '\\': case ';': case ',': case '.': case '=': 15063 case ':': case '<': case '>': case '\"': 15064 case '&': case '`': case '\'': case '+': 15065 case '0': 15066 ++m; 15067 break; 15068 case '-': 15069 ++m; 15070 if (m < e && is_identchar(m, e, enc)) { 15071 if (!ISASCII(*m)) mb = 1; 15072 m += rb_enc_mbclen(m, e, enc); 15073 } 15074 break; 15075 default: 15076 if (!rb_enc_isdigit(*m, enc)) return 0; 15077 do { 15078 if (!ISASCII(*m)) mb = 1; 15079 ++m; 15080 } while (m < e && rb_enc_isdigit(*m, enc)); 15081 } 15082 return m == e ? mb + 1 : 0; 15083 } 15084 15085 int 15086 rb_symname_p(const char *name) 15087 { 15088 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 15089 } 15090 15091 int 15092 rb_enc_symname_p(const char *name, rb_encoding *enc) 15093 { 15094 return rb_enc_symname2_p(name, strlen(name), enc); 15095 } 15096 15097 int 15098 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 15099 { 15100 const char *m = name; 15101 const char *e = m + len; 15102 int localid = FALSE; 15103 15104 if (!m || len <= 0) return FALSE; 15105 switch (*m) { 15106 case '\0': 15107 return FALSE; 15108 15109 case '$': 15110 if (is_special_global_name(++m, e, enc)) return TRUE; 15111 goto id; 15112 15113 case '@': 15114 if (*++m == '@') ++m; 15115 goto id; 15116 15117 case '<': 15118 switch (*++m) { 15119 case '<': ++m; break; 15120 case '=': if (*++m == '>') ++m; break; 15121 default: break; 15122 } 15123 break; 15124 15125 case '>': 15126 switch (*++m) { 15127 case '>': case '=': ++m; break; 15128 } 15129 break; 15130 15131 case '=': 15132 switch (*++m) { 15133 case '~': ++m; break; 15134 case '=': if (*++m == '=') ++m; break; 15135 default: return FALSE; 15136 } 15137 break; 15138 15139 case '*': 15140 if (*++m == '*') ++m; 15141 break; 15142 15143 case '+': case '-': 15144 if (*++m == '@') ++m; 15145 break; 15146 15147 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 15148 ++m; 15149 break; 15150 15151 case '[': 15152 if (*++m != ']') return FALSE; 15153 if (*++m == '=') ++m; 15154 break; 15155 15156 case '!': 15157 if (len == 1) return TRUE; 15158 switch (*++m) { 15159 case '=': case '~': ++m; break; 15160 default: return FALSE; 15161 } 15162 break; 15163 15164 default: 15165 localid = !rb_enc_isupper(*m, enc); 15166 id: 15167 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 15168 return FALSE; 15169 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 15170 if (localid) { 15171 switch (*m) { 15172 case '!': case '?': case '=': ++m; 15173 } 15174 } 15175 break; 15176 } 15177 return m == e; 15178 } 15179 15180 static ID 15181 register_symid(ID id, const char *name, long len, rb_encoding *enc) 15182 { 15183 VALUE str = rb_enc_str_new(name, len, enc); 15184 OBJ_FREEZE(str); 15185 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 15186 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 15187 return id; 15188 } 15189 15190 ID 15191 rb_intern3(const char *name, long len, rb_encoding *enc) 15192 { 15193 const char *m = name; 15194 const char *e = m + len; 15195 unsigned char c; 15196 VALUE str; 15197 ID id; 15198 long last; 15199 int mb; 15200 st_data_t data; 15201 struct RString fake_str; 15202 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 15203 fake_str.basic.klass = rb_cString; 15204 fake_str.as.heap.len = len; 15205 fake_str.as.heap.ptr = (char *)name; 15206 fake_str.as.heap.aux.capa = len; 15207 str = (VALUE)&fake_str; 15208 rb_enc_associate(str, enc); 15209 OBJ_FREEZE(str); 15210 15211 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { 15212 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 15213 } 15214 15215 if (st_lookup(global_symbols.sym_id, str, &data)) 15216 return (ID)data; 15217 15218 if (rb_cString && !rb_enc_asciicompat(enc)) { 15219 id = ID_JUNK; 15220 goto new_id; 15221 } 15222 last = len-1; 15223 id = 0; 15224 switch (*m) { 15225 case '$': 15226 id |= ID_GLOBAL; 15227 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 15228 if (!--mb) enc = rb_ascii8bit_encoding(); 15229 goto new_id; 15230 } 15231 break; 15232 case '@': 15233 if (m[1] == '@') { 15234 m++; 15235 id |= ID_CLASS; 15236 } 15237 else { 15238 id |= ID_INSTANCE; 15239 } 15240 m++; 15241 break; 15242 default: 15243 c = m[0]; 15244 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 15245 /* operators */ 15246 int i; 15247 15248 if (len == 1) { 15249 id = c; 15250 goto id_register; 15251 } 15252 for (i = 0; i < op_tbl_count; i++) { 15253 if (*op_tbl[i].name == *m && 15254 strcmp(op_tbl[i].name, m) == 0) { 15255 id = op_tbl[i].token; 15256 goto id_register; 15257 } 15258 } 15259 } 15260 15261 if (m[last] == '=') { 15262 /* attribute assignment */ 15263 id = rb_intern3(name, last, enc); 15264 if (id > tLAST_TOKEN && !is_attrset_id(id)) { 15265 enc = rb_enc_get(rb_id2str(id)); 15266 id = rb_id_attrset(id); 15267 goto id_register; 15268 } 15269 id = ID_ATTRSET; 15270 } 15271 else if (rb_enc_isupper(m[0], enc)) { 15272 id = ID_CONST; 15273 } 15274 else { 15275 id = ID_LOCAL; 15276 } 15277 break; 15278 } 15279 mb = 0; 15280 if (!rb_enc_isdigit(*m, enc)) { 15281 while (m <= name + last && is_identchar(m, e, enc)) { 15282 if (ISASCII(*m)) { 15283 m++; 15284 } 15285 else { 15286 mb = 1; 15287 m += rb_enc_mbclen(m, e, enc); 15288 } 15289 } 15290 } 15291 if (m - name < len) id = ID_JUNK; 15292 if (enc != rb_usascii_encoding()) { 15293 /* 15294 * this clause makes sense only when called from other than 15295 * rb_intern_str() taking care of code-range. 15296 */ 15297 if (!mb) { 15298 for (; m <= name + len; ++m) { 15299 if (!ISASCII(*m)) goto mbstr; 15300 } 15301 enc = rb_usascii_encoding(); 15302 } 15303 mbstr:; 15304 } 15305 new_id: 15306 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 15307 if (len > 20) { 15308 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 15309 name); 15310 } 15311 else { 15312 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 15313 (int)len, name); 15314 } 15315 } 15316 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 15317 id_register: 15318 return register_symid(id, name, len, enc); 15319 } 15320 15321 ID 15322 rb_intern2(const char *name, long len) 15323 { 15324 return rb_intern3(name, len, rb_usascii_encoding()); 15325 } 15326 15327 #undef rb_intern 15328 ID 15329 rb_intern(const char *name) 15330 { 15331 return rb_intern2(name, strlen(name)); 15332 } 15333 15334 ID 15335 rb_intern_str(VALUE str) 15336 { 15337 rb_encoding *enc; 15338 ID id; 15339 15340 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 15341 enc = rb_usascii_encoding(); 15342 } 15343 else { 15344 enc = rb_enc_get(str); 15345 } 15346 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); 15347 RB_GC_GUARD(str); 15348 return id; 15349 } 15350 15351 VALUE 15352 rb_id2str(ID id) 15353 { 15354 st_data_t data; 15355 15356 if (id < tLAST_TOKEN) { 15357 int i = 0; 15358 15359 if (id < INT_MAX && rb_ispunct((int)id)) { 15360 VALUE str = global_symbols.op_sym[i = (int)id]; 15361 if (!str) { 15362 char name[2]; 15363 name[0] = (char)id; 15364 name[1] = 0; 15365 str = rb_usascii_str_new(name, 1); 15366 OBJ_FREEZE(str); 15367 global_symbols.op_sym[i] = str; 15368 } 15369 return str; 15370 } 15371 for (i = 0; i < op_tbl_count; i++) { 15372 if (op_tbl[i].token == id) { 15373 VALUE str = global_symbols.op_sym[i]; 15374 if (!str) { 15375 str = rb_usascii_str_new2(op_tbl[i].name); 15376 OBJ_FREEZE(str); 15377 global_symbols.op_sym[i] = str; 15378 } 15379 return str; 15380 } 15381 } 15382 } 15383 15384 if (st_lookup(global_symbols.id_str, id, &data)) { 15385 VALUE str = (VALUE)data; 15386 if (RBASIC(str)->klass == 0) 15387 RBASIC(str)->klass = rb_cString; 15388 return str; 15389 } 15390 15391 if (is_attrset_id(id)) { 15392 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 15393 VALUE str; 15394 15395 while (!(str = rb_id2str(id2))) { 15396 if (!is_local_id(id2)) return 0; 15397 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 15398 } 15399 str = rb_str_dup(str); 15400 rb_str_cat(str, "=", 1); 15401 rb_intern_str(str); 15402 if (st_lookup(global_symbols.id_str, id, &data)) { 15403 VALUE str = (VALUE)data; 15404 if (RBASIC(str)->klass == 0) 15405 RBASIC(str)->klass = rb_cString; 15406 return str; 15407 } 15408 } 15409 return 0; 15410 } 15411 15412 const char * 15413 rb_id2name(ID id) 15414 { 15415 VALUE str = rb_id2str(id); 15416 15417 if (!str) return 0; 15418 return RSTRING_PTR(str); 15419 } 15420 15421 static int 15422 symbols_i(VALUE sym, ID value, VALUE ary) 15423 { 15424 rb_ary_push(ary, ID2SYM(value)); 15425 return ST_CONTINUE; 15426 } 15427 15428 /* 15429 * call-seq: 15430 * Symbol.all_symbols => array 15431 * 15432 * Returns an array of all the symbols currently in Ruby's symbol 15433 * table. 15434 * 15435 * Symbol.all_symbols.size #=> 903 15436 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 15437 * :chown, :EOFError, :$;, :String, 15438 * :LOCK_SH, :"setuid?", :$<, 15439 * :default_proc, :compact, :extend, 15440 * :Tms, :getwd, :$=, :ThreadGroup, 15441 * :wait2, :$>] 15442 */ 15443 15444 VALUE 15445 rb_sym_all_symbols(void) 15446 { 15447 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 15448 15449 st_foreach(global_symbols.sym_id, symbols_i, ary); 15450 return ary; 15451 } 15452 15453 int 15454 rb_is_const_id(ID id) 15455 { 15456 return is_const_id(id); 15457 } 15458 15459 int 15460 rb_is_class_id(ID id) 15461 { 15462 return is_class_id(id); 15463 } 15464 15465 int 15466 rb_is_instance_id(ID id) 15467 { 15468 return is_instance_id(id); 15469 } 15470 15471 int 15472 rb_is_local_id(ID id) 15473 { 15474 return is_local_id(id); 15475 } 15476 15477 int 15478 rb_is_junk_id(ID id) 15479 { 15480 return is_junk_id(id); 15481 } 15482 15483 #endif /* !RIPPER */ 15484 15485 static void 15486 parser_initialize(struct parser_params *parser) 15487 { 15488 parser->eofp = Qfalse; 15489 15490 parser->parser_lex_strterm = 0; 15491 parser->parser_cond_stack = 0; 15492 parser->parser_cmdarg_stack = 0; 15493 parser->parser_class_nest = 0; 15494 parser->parser_paren_nest = 0; 15495 parser->parser_lpar_beg = 0; 15496 parser->parser_in_single = 0; 15497 parser->parser_in_def = 0; 15498 parser->parser_in_defined = 0; 15499 parser->parser_compile_for_eval = 0; 15500 parser->parser_cur_mid = 0; 15501 parser->parser_tokenbuf = NULL; 15502 parser->parser_tokidx = 0; 15503 parser->parser_toksiz = 0; 15504 parser->parser_heredoc_end = 0; 15505 parser->parser_command_start = TRUE; 15506 parser->parser_deferred_nodes = 0; 15507 parser->parser_lex_pbeg = 0; 15508 parser->parser_lex_p = 0; 15509 parser->parser_lex_pend = 0; 15510 parser->parser_lvtbl = 0; 15511 parser->parser_ruby__end__seen = 0; 15512 parser->parser_ruby_sourcefile = 0; 15513 #ifndef RIPPER 15514 parser->is_ripper = 0; 15515 parser->parser_eval_tree_begin = 0; 15516 parser->parser_eval_tree = 0; 15517 #else 15518 parser->is_ripper = 1; 15519 parser->parser_ruby_sourcefile_string = Qnil; 15520 parser->delayed = Qnil; 15521 15522 parser->result = Qnil; 15523 parser->parsing_thread = Qnil; 15524 parser->toplevel_p = TRUE; 15525 #endif 15526 #ifdef YYMALLOC 15527 parser->heap = NULL; 15528 #endif 15529 parser->enc = rb_usascii_encoding(); 15530 } 15531 15532 #ifdef RIPPER 15533 #define parser_mark ripper_parser_mark 15534 #define parser_free ripper_parser_free 15535 #endif 15536 15537 static void 15538 parser_mark(void *ptr) 15539 { 15540 struct parser_params *p = (struct parser_params*)ptr; 15541 15542 rb_gc_mark((VALUE)p->parser_lex_strterm); 15543 rb_gc_mark((VALUE)p->parser_deferred_nodes); 15544 rb_gc_mark(p->parser_lex_input); 15545 rb_gc_mark(p->parser_lex_lastline); 15546 rb_gc_mark(p->parser_lex_nextline); 15547 #ifndef RIPPER 15548 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 15549 rb_gc_mark((VALUE)p->parser_eval_tree) ; 15550 rb_gc_mark(p->debug_lines); 15551 #else 15552 rb_gc_mark(p->parser_ruby_sourcefile_string); 15553 rb_gc_mark(p->delayed); 15554 rb_gc_mark(p->value); 15555 rb_gc_mark(p->result); 15556 rb_gc_mark(p->parsing_thread); 15557 #endif 15558 #ifdef YYMALLOC 15559 rb_gc_mark((VALUE)p->heap); 15560 #endif 15561 } 15562 15563 static void 15564 parser_free(void *ptr) 15565 { 15566 struct parser_params *p = (struct parser_params*)ptr; 15567 struct local_vars *local, *prev; 15568 15569 if (p->parser_tokenbuf) { 15570 xfree(p->parser_tokenbuf); 15571 } 15572 for (local = p->parser_lvtbl; local; local = prev) { 15573 if (local->vars) xfree(local->vars); 15574 prev = local->prev; 15575 xfree(local); 15576 } 15577 #ifndef RIPPER 15578 xfree(p->parser_ruby_sourcefile); 15579 #endif 15580 xfree(p); 15581 } 15582 15583 static size_t 15584 parser_memsize(const void *ptr) 15585 { 15586 struct parser_params *p = (struct parser_params*)ptr; 15587 struct local_vars *local; 15588 size_t size = sizeof(*p); 15589 15590 if (!ptr) return 0; 15591 size += p->parser_toksiz; 15592 for (local = p->parser_lvtbl; local; local = local->prev) { 15593 size += sizeof(*local); 15594 if (local->vars) size += local->vars->capa * sizeof(ID); 15595 } 15596 #ifndef RIPPER 15597 if (p->parser_ruby_sourcefile) { 15598 size += strlen(p->parser_ruby_sourcefile) + 1; 15599 } 15600 #endif 15601 return size; 15602 } 15603 15604 static 15605 #ifndef RIPPER 15606 const 15607 #endif 15608 rb_data_type_t parser_data_type = { 15609 "parser", 15610 { 15611 parser_mark, 15612 parser_free, 15613 parser_memsize, 15614 }, 15615 }; 15616 15617 #ifndef RIPPER 15618 #undef rb_reserved_word 15619 15620 const struct kwtable * 15621 rb_reserved_word(const char *str, unsigned int len) 15622 { 15623 return reserved_word(str, len); 15624 } 15625 15626 static struct parser_params * 15627 parser_new(void) 15628 { 15629 struct parser_params *p; 15630 15631 p = ALLOC_N(struct parser_params, 1); 15632 MEMZERO(p, struct parser_params, 1); 15633 parser_initialize(p); 15634 return p; 15635 } 15636 15637 VALUE 15638 rb_parser_new(void) 15639 { 15640 struct parser_params *p = parser_new(); 15641 15642 return TypedData_Wrap_Struct(0, &parser_data_type, p); 15643 } 15644 15645 /* 15646 * call-seq: 15647 * ripper#end_seen? -> Boolean 15648 * 15649 * Return true if parsed source ended by +\_\_END\_\_+. 15650 */ 15651 VALUE 15652 rb_parser_end_seen_p(VALUE vparser) 15653 { 15654 struct parser_params *parser; 15655 15656 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15657 return ruby__end__seen ? Qtrue : Qfalse; 15658 } 15659 15660 /* 15661 * call-seq: 15662 * ripper#encoding -> encoding 15663 * 15664 * Return encoding of the source. 15665 */ 15666 VALUE 15667 rb_parser_encoding(VALUE vparser) 15668 { 15669 struct parser_params *parser; 15670 15671 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15672 return rb_enc_from_encoding(parser->enc); 15673 } 15674 15675 /* 15676 * call-seq: 15677 * ripper.yydebug -> true or false 15678 * 15679 * Get yydebug. 15680 */ 15681 VALUE 15682 rb_parser_get_yydebug(VALUE self) 15683 { 15684 struct parser_params *parser; 15685 15686 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 15687 return yydebug ? Qtrue : Qfalse; 15688 } 15689 15690 /* 15691 * call-seq: 15692 * ripper.yydebug = flag 15693 * 15694 * Set yydebug. 15695 */ 15696 VALUE 15697 rb_parser_set_yydebug(VALUE self, VALUE flag) 15698 { 15699 struct parser_params *parser; 15700 15701 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 15702 yydebug = RTEST(flag); 15703 return flag; 15704 } 15705 15706 #ifdef YYMALLOC 15707 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 15708 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 15709 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 15710 (n)->u3.cnt = (c), (p)) 15711 15712 void * 15713 rb_parser_malloc(struct parser_params *parser, size_t size) 15714 { 15715 size_t cnt = HEAPCNT(1, size); 15716 NODE *n = NEWHEAP(); 15717 void *ptr = xmalloc(size); 15718 15719 return ADD2HEAP(n, cnt, ptr); 15720 } 15721 15722 void * 15723 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 15724 { 15725 size_t cnt = HEAPCNT(nelem, size); 15726 NODE *n = NEWHEAP(); 15727 void *ptr = xcalloc(nelem, size); 15728 15729 return ADD2HEAP(n, cnt, ptr); 15730 } 15731 15732 void * 15733 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 15734 { 15735 NODE *n; 15736 size_t cnt = HEAPCNT(1, size); 15737 15738 if (ptr && (n = parser->heap) != NULL) { 15739 do { 15740 if (n->u1.node == ptr) { 15741 n->u1.node = ptr = xrealloc(ptr, size); 15742 if (n->u3.cnt) n->u3.cnt = cnt; 15743 return ptr; 15744 } 15745 } while ((n = n->u2.node) != NULL); 15746 } 15747 n = NEWHEAP(); 15748 ptr = xrealloc(ptr, size); 15749 return ADD2HEAP(n, cnt, ptr); 15750 } 15751 15752 void 15753 rb_parser_free(struct parser_params *parser, void *ptr) 15754 { 15755 NODE **prev = &parser->heap, *n; 15756 15757 while ((n = *prev) != NULL) { 15758 if (n->u1.node == ptr) { 15759 *prev = n->u2.node; 15760 rb_gc_force_recycle((VALUE)n); 15761 break; 15762 } 15763 prev = &n->u2.node; 15764 } 15765 xfree(ptr); 15766 } 15767 #endif 15768 #endif 15769 15770 #ifdef RIPPER 15771 #ifdef RIPPER_DEBUG 15772 extern int rb_is_pointer_to_heap(VALUE); 15773 15774 /* :nodoc: */ 15775 static VALUE 15776 ripper_validate_object(VALUE self, VALUE x) 15777 { 15778 if (x == Qfalse) return x; 15779 if (x == Qtrue) return x; 15780 if (x == Qnil) return x; 15781 if (x == Qundef) 15782 rb_raise(rb_eArgError, "Qundef given"); 15783 if (FIXNUM_P(x)) return x; 15784 if (SYMBOL_P(x)) return x; 15785 if (!rb_is_pointer_to_heap(x)) 15786 rb_raise(rb_eArgError, "invalid pointer: %p", x); 15787 switch (TYPE(x)) { 15788 case T_STRING: 15789 case T_OBJECT: 15790 case T_ARRAY: 15791 case T_BIGNUM: 15792 case T_FLOAT: 15793 return x; 15794 case T_NODE: 15795 if (nd_type(x) != NODE_LASGN) { 15796 rb_raise(rb_eArgError, "NODE given: %p", x); 15797 } 15798 return ((NODE *)x)->nd_rval; 15799 default: 15800 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 15801 x, rb_obj_classname(x)); 15802 } 15803 return x; 15804 } 15805 #endif 15806 15807 #define validate(x) ((x) = get_value(x)) 15808 15809 static VALUE 15810 ripper_dispatch0(struct parser_params *parser, ID mid) 15811 { 15812 return rb_funcall(parser->value, mid, 0); 15813 } 15814 15815 static VALUE 15816 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 15817 { 15818 validate(a); 15819 return rb_funcall(parser->value, mid, 1, a); 15820 } 15821 15822 static VALUE 15823 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 15824 { 15825 validate(a); 15826 validate(b); 15827 return rb_funcall(parser->value, mid, 2, a, b); 15828 } 15829 15830 static VALUE 15831 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 15832 { 15833 validate(a); 15834 validate(b); 15835 validate(c); 15836 return rb_funcall(parser->value, mid, 3, a, b, c); 15837 } 15838 15839 static VALUE 15840 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 15841 { 15842 validate(a); 15843 validate(b); 15844 validate(c); 15845 validate(d); 15846 return rb_funcall(parser->value, mid, 4, a, b, c, d); 15847 } 15848 15849 static VALUE 15850 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 15851 { 15852 validate(a); 15853 validate(b); 15854 validate(c); 15855 validate(d); 15856 validate(e); 15857 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 15858 } 15859 15860 static const struct kw_assoc { 15861 ID id; 15862 const char *name; 15863 } keyword_to_name[] = { 15864 {keyword_class, "class"}, 15865 {keyword_module, "module"}, 15866 {keyword_def, "def"}, 15867 {keyword_undef, "undef"}, 15868 {keyword_begin, "begin"}, 15869 {keyword_rescue, "rescue"}, 15870 {keyword_ensure, "ensure"}, 15871 {keyword_end, "end"}, 15872 {keyword_if, "if"}, 15873 {keyword_unless, "unless"}, 15874 {keyword_then, "then"}, 15875 {keyword_elsif, "elsif"}, 15876 {keyword_else, "else"}, 15877 {keyword_case, "case"}, 15878 {keyword_when, "when"}, 15879 {keyword_while, "while"}, 15880 {keyword_until, "until"}, 15881 {keyword_for, "for"}, 15882 {keyword_break, "break"}, 15883 {keyword_next, "next"}, 15884 {keyword_redo, "redo"}, 15885 {keyword_retry, "retry"}, 15886 {keyword_in, "in"}, 15887 {keyword_do, "do"}, 15888 {keyword_do_cond, "do"}, 15889 {keyword_do_block, "do"}, 15890 {keyword_return, "return"}, 15891 {keyword_yield, "yield"}, 15892 {keyword_super, "super"}, 15893 {keyword_self, "self"}, 15894 {keyword_nil, "nil"}, 15895 {keyword_true, "true"}, 15896 {keyword_false, "false"}, 15897 {keyword_and, "and"}, 15898 {keyword_or, "or"}, 15899 {keyword_not, "not"}, 15900 {modifier_if, "if"}, 15901 {modifier_unless, "unless"}, 15902 {modifier_while, "while"}, 15903 {modifier_until, "until"}, 15904 {modifier_rescue, "rescue"}, 15905 {keyword_alias, "alias"}, 15906 {keyword_defined, "defined?"}, 15907 {keyword_BEGIN, "BEGIN"}, 15908 {keyword_END, "END"}, 15909 {keyword__LINE__, "__LINE__"}, 15910 {keyword__FILE__, "__FILE__"}, 15911 {keyword__ENCODING__, "__ENCODING__"}, 15912 {0, NULL} 15913 }; 15914 15915 static const char* 15916 keyword_id_to_str(ID id) 15917 { 15918 const struct kw_assoc *a; 15919 15920 for (a = keyword_to_name; a->id; a++) { 15921 if (a->id == id) 15922 return a->name; 15923 } 15924 return NULL; 15925 } 15926 15927 #undef ripper_id2sym 15928 static VALUE 15929 ripper_id2sym(ID id) 15930 { 15931 const char *name; 15932 char buf[8]; 15933 15934 if (id <= 256) { 15935 buf[0] = (char)id; 15936 buf[1] = '\0'; 15937 return ID2SYM(rb_intern2(buf, 1)); 15938 } 15939 if ((name = keyword_id_to_str(id))) { 15940 return ID2SYM(rb_intern(name)); 15941 } 15942 switch (id) { 15943 case tOROP: 15944 name = "||"; 15945 break; 15946 case tANDOP: 15947 name = "&&"; 15948 break; 15949 default: 15950 name = rb_id2name(id); 15951 if (!name) { 15952 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 15953 } 15954 return ID2SYM(id); 15955 } 15956 return ID2SYM(rb_intern(name)); 15957 } 15958 15959 static ID 15960 ripper_get_id(VALUE v) 15961 { 15962 NODE *nd; 15963 if (!RB_TYPE_P(v, T_NODE)) return 0; 15964 nd = (NODE *)v; 15965 if (nd_type(nd) != NODE_LASGN) return 0; 15966 return nd->nd_vid; 15967 } 15968 15969 static VALUE 15970 ripper_get_value(VALUE v) 15971 { 15972 NODE *nd; 15973 if (v == Qundef) return Qnil; 15974 if (!RB_TYPE_P(v, T_NODE)) return v; 15975 nd = (NODE *)v; 15976 if (nd_type(nd) != NODE_LASGN) return Qnil; 15977 return nd->nd_rval; 15978 } 15979 15980 static void 15981 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 15982 { 15983 VALUE str; 15984 va_list args; 15985 15986 va_start(args, fmt); 15987 str = rb_vsprintf(fmt, args); 15988 va_end(args); 15989 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 15990 } 15991 15992 static void 15993 ripper_warn0(struct parser_params *parser, const char *fmt) 15994 { 15995 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 15996 } 15997 15998 static void 15999 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 16000 { 16001 rb_funcall(parser->value, rb_intern("warn"), 2, 16002 STR_NEW2(fmt), INT2NUM(a)); 16003 } 16004 16005 #if 0 16006 static void 16007 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 16008 { 16009 rb_funcall(parser->value, rb_intern("warn"), 2, 16010 STR_NEW2(fmt), STR_NEW2(str)); 16011 } 16012 #endif 16013 16014 static void 16015 ripper_warning0(struct parser_params *parser, const char *fmt) 16016 { 16017 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 16018 } 16019 16020 static void 16021 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 16022 { 16023 rb_funcall(parser->value, rb_intern("warning"), 2, 16024 STR_NEW2(fmt), STR_NEW2(str)); 16025 } 16026 16027 static VALUE 16028 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 16029 { 16030 return rb_funcall(src, ripper_id_gets, 0); 16031 } 16032 16033 static VALUE 16034 ripper_s_allocate(VALUE klass) 16035 { 16036 struct parser_params *p; 16037 VALUE self; 16038 16039 p = ALLOC_N(struct parser_params, 1); 16040 MEMZERO(p, struct parser_params, 1); 16041 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 16042 p->value = self; 16043 return self; 16044 } 16045 16046 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 16047 16048 /* 16049 * call-seq: 16050 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 16051 * 16052 * Create a new Ripper object. 16053 * _src_ must be a String, an IO, or an Object which has #gets method. 16054 * 16055 * This method does not starts parsing. 16056 * See also Ripper#parse and Ripper.parse. 16057 */ 16058 static VALUE 16059 ripper_initialize(int argc, VALUE *argv, VALUE self) 16060 { 16061 struct parser_params *parser; 16062 VALUE src, fname, lineno; 16063 16064 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16065 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 16066 if (rb_obj_respond_to(src, ripper_id_gets, 0)) { 16067 parser->parser_lex_gets = ripper_lex_get_generic; 16068 } 16069 else { 16070 StringValue(src); 16071 parser->parser_lex_gets = lex_get_str; 16072 } 16073 parser->parser_lex_input = src; 16074 parser->eofp = Qfalse; 16075 if (NIL_P(fname)) { 16076 fname = STR_NEW2("(ripper)"); 16077 } 16078 else { 16079 StringValue(fname); 16080 } 16081 parser_initialize(parser); 16082 16083 parser->parser_ruby_sourcefile_string = fname; 16084 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 16085 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 16086 16087 return Qnil; 16088 } 16089 16090 struct ripper_args { 16091 struct parser_params *parser; 16092 int argc; 16093 VALUE *argv; 16094 }; 16095 16096 static VALUE 16097 ripper_parse0(VALUE parser_v) 16098 { 16099 struct parser_params *parser; 16100 16101 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16102 parser_prepare(parser); 16103 ripper_yyparse((void*)parser); 16104 return parser->result; 16105 } 16106 16107 static VALUE 16108 ripper_ensure(VALUE parser_v) 16109 { 16110 struct parser_params *parser; 16111 16112 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16113 parser->parsing_thread = Qnil; 16114 return Qnil; 16115 } 16116 16117 /* 16118 * call-seq: 16119 * ripper#parse 16120 * 16121 * Start parsing and returns the value of the root action. 16122 */ 16123 static VALUE 16124 ripper_parse(VALUE self) 16125 { 16126 struct parser_params *parser; 16127 16128 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16129 if (!ripper_initialized_p(parser)) { 16130 rb_raise(rb_eArgError, "method called for uninitialized object"); 16131 } 16132 if (!NIL_P(parser->parsing_thread)) { 16133 if (parser->parsing_thread == rb_thread_current()) 16134 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 16135 else 16136 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 16137 } 16138 parser->parsing_thread = rb_thread_current(); 16139 rb_ensure(ripper_parse0, self, ripper_ensure, self); 16140 16141 return parser->result; 16142 } 16143 16144 /* 16145 * call-seq: 16146 * ripper#column -> Integer 16147 * 16148 * Return column number of current parsing line. 16149 * This number starts from 0. 16150 */ 16151 static VALUE 16152 ripper_column(VALUE self) 16153 { 16154 struct parser_params *parser; 16155 long col; 16156 16157 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16158 if (!ripper_initialized_p(parser)) { 16159 rb_raise(rb_eArgError, "method called for uninitialized object"); 16160 } 16161 if (NIL_P(parser->parsing_thread)) return Qnil; 16162 col = parser->tokp - parser->parser_lex_pbeg; 16163 return LONG2NUM(col); 16164 } 16165 16166 /* 16167 * call-seq: 16168 * ripper#filename -> String 16169 * 16170 * Return current parsing filename. 16171 */ 16172 static VALUE 16173 ripper_filename(VALUE self) 16174 { 16175 struct parser_params *parser; 16176 16177 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16178 if (!ripper_initialized_p(parser)) { 16179 rb_raise(rb_eArgError, "method called for uninitialized object"); 16180 } 16181 return parser->parser_ruby_sourcefile_string; 16182 } 16183 16184 /* 16185 * call-seq: 16186 * ripper#lineno -> Integer 16187 * 16188 * Return line number of current parsing line. 16189 * This number starts from 1. 16190 */ 16191 static VALUE 16192 ripper_lineno(VALUE self) 16193 { 16194 struct parser_params *parser; 16195 16196 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16197 if (!ripper_initialized_p(parser)) { 16198 rb_raise(rb_eArgError, "method called for uninitialized object"); 16199 } 16200 if (NIL_P(parser->parsing_thread)) return Qnil; 16201 return INT2NUM(parser->parser_ruby_sourceline); 16202 } 16203 16204 #ifdef RIPPER_DEBUG 16205 /* :nodoc: */ 16206 static VALUE 16207 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 16208 { 16209 StringValue(msg); 16210 if (obj == Qundef) { 16211 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 16212 } 16213 return Qnil; 16214 } 16215 16216 /* :nodoc: */ 16217 static VALUE 16218 ripper_value(VALUE self, VALUE obj) 16219 { 16220 return ULONG2NUM(obj); 16221 } 16222 #endif 16223 16224 16225 void 16226 InitVM_ripper(void) 16227 { 16228 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 16229 } 16230 16231 void 16232 Init_ripper(void) 16233 { 16234 VALUE Ripper; 16235 16236 InitVM(ripper); 16237 Ripper = rb_define_class("Ripper", rb_cObject); 16238 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 16239 rb_define_alloc_func(Ripper, ripper_s_allocate); 16240 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 16241 rb_define_method(Ripper, "parse", ripper_parse, 0); 16242 rb_define_method(Ripper, "column", ripper_column, 0); 16243 rb_define_method(Ripper, "filename", ripper_filename, 0); 16244 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 16245 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 16246 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 16247 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 16248 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 16249 #ifdef RIPPER_DEBUG 16250 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 16251 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 16252 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 16253 #endif 16254 16255 ripper_id_gets = rb_intern("gets"); 16256 ripper_init_eventids1(Ripper); 16257 ripper_init_eventids2(Ripper); 16258 /* ensure existing in symbol table */ 16259 (void)rb_intern("||"); 16260 (void)rb_intern("&&"); 16261 16262 # if 0 16263 /* Hack to let RDoc document SCRIPT_LINES__ */ 16264 16265 /* 16266 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 16267 * after the assignment will be added as an Array of lines with the file 16268 * name as the key. 16269 */ 16270 rb_define_global_const("SCRIPT_LINES__", Qnil); 16271 #endif 16272 16273 } 16274 #endif /* RIPPER */ 16275 16276