Ruby
2.0.0p247(2013-06-27revision41674)
|
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 END_OF_INPUT = 0, 00070 keyword_class = 258, 00071 keyword_module = 259, 00072 keyword_def = 260, 00073 keyword_undef = 261, 00074 keyword_begin = 262, 00075 keyword_rescue = 263, 00076 keyword_ensure = 264, 00077 keyword_end = 265, 00078 keyword_if = 266, 00079 keyword_unless = 267, 00080 keyword_then = 268, 00081 keyword_elsif = 269, 00082 keyword_else = 270, 00083 keyword_case = 271, 00084 keyword_when = 272, 00085 keyword_while = 273, 00086 keyword_until = 274, 00087 keyword_for = 275, 00088 keyword_break = 276, 00089 keyword_next = 277, 00090 keyword_redo = 278, 00091 keyword_retry = 279, 00092 keyword_in = 280, 00093 keyword_do = 281, 00094 keyword_do_cond = 282, 00095 keyword_do_block = 283, 00096 keyword_do_LAMBDA = 284, 00097 keyword_return = 285, 00098 keyword_yield = 286, 00099 keyword_super = 287, 00100 keyword_self = 288, 00101 keyword_nil = 289, 00102 keyword_true = 290, 00103 keyword_false = 291, 00104 keyword_and = 292, 00105 keyword_or = 293, 00106 keyword_not = 294, 00107 modifier_if = 295, 00108 modifier_unless = 296, 00109 modifier_while = 297, 00110 modifier_until = 298, 00111 modifier_rescue = 299, 00112 keyword_alias = 300, 00113 keyword_defined = 301, 00114 keyword_BEGIN = 302, 00115 keyword_END = 303, 00116 keyword__LINE__ = 304, 00117 keyword__FILE__ = 305, 00118 keyword__ENCODING__ = 306, 00119 tIDENTIFIER = 307, 00120 tFID = 308, 00121 tGVAR = 309, 00122 tIVAR = 310, 00123 tCONSTANT = 311, 00124 tCVAR = 312, 00125 tLABEL = 313, 00126 tINTEGER = 314, 00127 tFLOAT = 315, 00128 tSTRING_CONTENT = 316, 00129 tCHAR = 317, 00130 tNTH_REF = 318, 00131 tBACK_REF = 319, 00132 tREGEXP_END = 320, 00133 tUPLUS = 130, 00134 tUMINUS = 131, 00135 tPOW = 132, 00136 tCMP = 134, 00137 tEQ = 139, 00138 tEQQ = 140, 00139 tNEQ = 141, 00140 tGEQ = 138, 00141 tLEQ = 137, 00142 tANDOP = 321, 00143 tOROP = 322, 00144 tMATCH = 142, 00145 tNMATCH = 143, 00146 tDOT2 = 128, 00147 tDOT3 = 129, 00148 tAREF = 144, 00149 tASET = 145, 00150 tLSHFT = 135, 00151 tRSHFT = 136, 00152 tCOLON2 = 323, 00153 tCOLON3 = 324, 00154 tOP_ASGN = 325, 00155 tASSOC = 326, 00156 tLPAREN = 327, 00157 tLPAREN_ARG = 328, 00158 tRPAREN = 329, 00159 tLBRACK = 330, 00160 tLBRACE = 331, 00161 tLBRACE_ARG = 332, 00162 tSTAR = 333, 00163 tDSTAR = 334, 00164 tAMPER = 335, 00165 tLAMBDA = 336, 00166 tSYMBEG = 337, 00167 tSTRING_BEG = 338, 00168 tXSTRING_BEG = 339, 00169 tREGEXP_BEG = 340, 00170 tWORDS_BEG = 341, 00171 tQWORDS_BEG = 342, 00172 tSYMBOLS_BEG = 343, 00173 tQSYMBOLS_BEG = 344, 00174 tSTRING_DBEG = 345, 00175 tSTRING_DEND = 346, 00176 tSTRING_DVAR = 347, 00177 tSTRING_END = 348, 00178 tLAMBEG = 349, 00179 tLOWEST = 350, 00180 tUMINUS_NUM = 351, 00181 tLAST_TOKEN = 352 00182 }; 00183 #endif 00184 /* Tokens. */ 00185 #define END_OF_INPUT 0 00186 #define keyword_class 258 00187 #define keyword_module 259 00188 #define keyword_def 260 00189 #define keyword_undef 261 00190 #define keyword_begin 262 00191 #define keyword_rescue 263 00192 #define keyword_ensure 264 00193 #define keyword_end 265 00194 #define keyword_if 266 00195 #define keyword_unless 267 00196 #define keyword_then 268 00197 #define keyword_elsif 269 00198 #define keyword_else 270 00199 #define keyword_case 271 00200 #define keyword_when 272 00201 #define keyword_while 273 00202 #define keyword_until 274 00203 #define keyword_for 275 00204 #define keyword_break 276 00205 #define keyword_next 277 00206 #define keyword_redo 278 00207 #define keyword_retry 279 00208 #define keyword_in 280 00209 #define keyword_do 281 00210 #define keyword_do_cond 282 00211 #define keyword_do_block 283 00212 #define keyword_do_LAMBDA 284 00213 #define keyword_return 285 00214 #define keyword_yield 286 00215 #define keyword_super 287 00216 #define keyword_self 288 00217 #define keyword_nil 289 00218 #define keyword_true 290 00219 #define keyword_false 291 00220 #define keyword_and 292 00221 #define keyword_or 293 00222 #define keyword_not 294 00223 #define modifier_if 295 00224 #define modifier_unless 296 00225 #define modifier_while 297 00226 #define modifier_until 298 00227 #define modifier_rescue 299 00228 #define keyword_alias 300 00229 #define keyword_defined 301 00230 #define keyword_BEGIN 302 00231 #define keyword_END 303 00232 #define keyword__LINE__ 304 00233 #define keyword__FILE__ 305 00234 #define keyword__ENCODING__ 306 00235 #define tIDENTIFIER 307 00236 #define tFID 308 00237 #define tGVAR 309 00238 #define tIVAR 310 00239 #define tCONSTANT 311 00240 #define tCVAR 312 00241 #define tLABEL 313 00242 #define tINTEGER 314 00243 #define tFLOAT 315 00244 #define tSTRING_CONTENT 316 00245 #define tCHAR 317 00246 #define tNTH_REF 318 00247 #define tBACK_REF 319 00248 #define tREGEXP_END 320 00249 #define tUPLUS 130 00250 #define tUMINUS 131 00251 #define tPOW 132 00252 #define tCMP 134 00253 #define tEQ 139 00254 #define tEQQ 140 00255 #define tNEQ 141 00256 #define tGEQ 138 00257 #define tLEQ 137 00258 #define tANDOP 321 00259 #define tOROP 322 00260 #define tMATCH 142 00261 #define tNMATCH 143 00262 #define tDOT2 128 00263 #define tDOT3 129 00264 #define tAREF 144 00265 #define tASET 145 00266 #define tLSHFT 135 00267 #define tRSHFT 136 00268 #define tCOLON2 323 00269 #define tCOLON3 324 00270 #define tOP_ASGN 325 00271 #define tASSOC 326 00272 #define tLPAREN 327 00273 #define tLPAREN_ARG 328 00274 #define tRPAREN 329 00275 #define tLBRACK 330 00276 #define tLBRACE 331 00277 #define tLBRACE_ARG 332 00278 #define tSTAR 333 00279 #define tDSTAR 334 00280 #define tAMPER 335 00281 #define tLAMBDA 336 00282 #define tSYMBEG 337 00283 #define tSTRING_BEG 338 00284 #define tXSTRING_BEG 339 00285 #define tREGEXP_BEG 340 00286 #define tWORDS_BEG 341 00287 #define tQWORDS_BEG 342 00288 #define tSYMBOLS_BEG 343 00289 #define tQSYMBOLS_BEG 344 00290 #define tSTRING_DBEG 345 00291 #define tSTRING_DEND 346 00292 #define tSTRING_DVAR 347 00293 #define tSTRING_END 348 00294 #define tLAMBEG 349 00295 #define tLOWEST 350 00296 #define tUMINUS_NUM 351 00297 #define tLAST_TOKEN 352 00298 00299 00300 00301 00302 /* Copy the first part of user declarations. */ 00303 #line 12 "parse.y" 00304 00305 00306 #ifndef PARSER_DEBUG 00307 #define PARSER_DEBUG 0 00308 #endif 00309 #define YYDEBUG 1 00310 #define YYERROR_VERBOSE 1 00311 #define YYSTACK_USE_ALLOCA 0 00312 00313 #include "ruby/ruby.h" 00314 #include "ruby/st.h" 00315 #include "ruby/encoding.h" 00316 #include "internal.h" 00317 #include "node.h" 00318 #include "parse.h" 00319 #include "id.h" 00320 #include "regenc.h" 00321 #include <stdio.h> 00322 #include <errno.h> 00323 #include <ctype.h> 00324 #include "probes.h" 00325 00326 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00327 00328 #define YYMALLOC(size) rb_parser_malloc(parser, (size)) 00329 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 00330 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 00331 #define YYFREE(ptr) rb_parser_free(parser, (ptr)) 00332 #define malloc YYMALLOC 00333 #define realloc YYREALLOC 00334 #define calloc YYCALLOC 00335 #define free YYFREE 00336 00337 #ifndef RIPPER 00338 static ID register_symid(ID, const char *, long, rb_encoding *); 00339 static ID register_symid_str(ID, VALUE); 00340 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 00341 #include "id.c" 00342 #endif 00343 00344 #define is_notop_id(id) ((id)>tLAST_OP_ID) 00345 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00346 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00347 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00348 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00349 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00350 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00351 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00352 #define id_type(id) (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1) 00353 00354 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00355 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00356 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00357 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00358 00359 enum lex_state_bits { 00360 EXPR_BEG_bit, /* ignore newline, +/- is a sign. */ 00361 EXPR_END_bit, /* newline significant, +/- is an operator. */ 00362 EXPR_ENDARG_bit, /* ditto, and unbound braces. */ 00363 EXPR_ENDFN_bit, /* ditto, and unbound braces. */ 00364 EXPR_ARG_bit, /* newline significant, +/- is an operator. */ 00365 EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */ 00366 EXPR_MID_bit, /* newline significant, +/- is an operator. */ 00367 EXPR_FNAME_bit, /* ignore newline, no reserved words. */ 00368 EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */ 00369 EXPR_CLASS_bit, /* immediate after `class', no here document. */ 00370 EXPR_VALUE_bit, /* alike EXPR_BEG but label is disallowed. */ 00371 EXPR_MAX_STATE 00372 }; 00373 /* examine combinations */ 00374 enum lex_state_e { 00375 #define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit) 00376 DEF_EXPR(BEG), 00377 DEF_EXPR(END), 00378 DEF_EXPR(ENDARG), 00379 DEF_EXPR(ENDFN), 00380 DEF_EXPR(ARG), 00381 DEF_EXPR(CMDARG), 00382 DEF_EXPR(MID), 00383 DEF_EXPR(FNAME), 00384 DEF_EXPR(DOT), 00385 DEF_EXPR(CLASS), 00386 DEF_EXPR(VALUE), 00387 EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS), 00388 EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), 00389 EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN) 00390 }; 00391 #define IS_lex_state_for(x, ls) ((x) & (ls)) 00392 #define IS_lex_state(ls) IS_lex_state_for(lex_state, (ls)) 00393 00394 #if PARSER_DEBUG 00395 static const char *lex_state_name(enum lex_state_e state); 00396 #endif 00397 00398 typedef VALUE stack_type; 00399 00400 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 00401 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 00402 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 00403 # define BITSTACK_SET_P(stack) ((stack)&1) 00404 00405 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 00406 #define COND_POP() BITSTACK_POP(cond_stack) 00407 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00408 #define COND_P() BITSTACK_SET_P(cond_stack) 00409 00410 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 00411 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00412 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00413 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00414 00415 struct vtable { 00416 ID *tbl; 00417 int pos; 00418 int capa; 00419 struct vtable *prev; 00420 }; 00421 00422 struct local_vars { 00423 struct vtable *args; 00424 struct vtable *vars; 00425 struct vtable *used; 00426 struct local_vars *prev; 00427 }; 00428 00429 #define DVARS_INHERIT ((void*)1) 00430 #define DVARS_TOPSCOPE NULL 00431 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00432 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00433 00434 static int 00435 vtable_size(const struct vtable *tbl) 00436 { 00437 if (POINTER_P(tbl)) { 00438 return tbl->pos; 00439 } 00440 else { 00441 return 0; 00442 } 00443 } 00444 00445 #define VTBL_DEBUG 0 00446 00447 static struct vtable * 00448 vtable_alloc(struct vtable *prev) 00449 { 00450 struct vtable *tbl = ALLOC(struct vtable); 00451 tbl->pos = 0; 00452 tbl->capa = 8; 00453 tbl->tbl = ALLOC_N(ID, tbl->capa); 00454 tbl->prev = prev; 00455 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00456 return tbl; 00457 } 00458 00459 static void 00460 vtable_free(struct vtable *tbl) 00461 { 00462 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00463 if (POINTER_P(tbl)) { 00464 if (tbl->tbl) { 00465 xfree(tbl->tbl); 00466 } 00467 xfree(tbl); 00468 } 00469 } 00470 00471 static void 00472 vtable_add(struct vtable *tbl, ID id) 00473 { 00474 if (!POINTER_P(tbl)) { 00475 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00476 } 00477 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00478 00479 if (tbl->pos == tbl->capa) { 00480 tbl->capa = tbl->capa * 2; 00481 REALLOC_N(tbl->tbl, ID, tbl->capa); 00482 } 00483 tbl->tbl[tbl->pos++] = id; 00484 } 00485 00486 static int 00487 vtable_included(const struct vtable * tbl, ID id) 00488 { 00489 int i; 00490 00491 if (POINTER_P(tbl)) { 00492 for (i = 0; i < tbl->pos; i++) { 00493 if (tbl->tbl[i] == id) { 00494 return i+1; 00495 } 00496 } 00497 } 00498 return 0; 00499 } 00500 00501 00502 #ifndef RIPPER 00503 typedef struct token_info { 00504 const char *token; 00505 int linenum; 00506 int column; 00507 int nonspc; 00508 struct token_info *next; 00509 } token_info; 00510 #endif 00511 00512 /* 00513 Structure of Lexer Buffer: 00514 00515 lex_pbeg tokp lex_p lex_pend 00516 | | | | 00517 |-----------+--------------+------------| 00518 |<------------>| 00519 token 00520 */ 00521 struct parser_params { 00522 int is_ripper; 00523 NODE *heap; 00524 00525 YYSTYPE *parser_yylval; 00526 VALUE eofp; 00527 00528 NODE *parser_lex_strterm; 00529 enum lex_state_e parser_lex_state; 00530 stack_type parser_cond_stack; 00531 stack_type parser_cmdarg_stack; 00532 int parser_class_nest; 00533 int parser_paren_nest; 00534 int parser_lpar_beg; 00535 int parser_in_single; 00536 int parser_in_def; 00537 int parser_brace_nest; 00538 int parser_compile_for_eval; 00539 VALUE parser_cur_mid; 00540 int parser_in_defined; 00541 char *parser_tokenbuf; 00542 int parser_tokidx; 00543 int parser_toksiz; 00544 int parser_tokline; 00545 VALUE parser_lex_input; 00546 VALUE parser_lex_lastline; 00547 VALUE parser_lex_nextline; 00548 const char *parser_lex_pbeg; 00549 const char *parser_lex_p; 00550 const char *parser_lex_pend; 00551 int parser_heredoc_end; 00552 int parser_command_start; 00553 NODE *parser_deferred_nodes; 00554 long parser_lex_gets_ptr; 00555 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00556 struct local_vars *parser_lvtbl; 00557 int parser_ruby__end__seen; 00558 int line_count; 00559 int has_shebang; 00560 char *parser_ruby_sourcefile; /* current source file */ 00561 int parser_ruby_sourceline; /* current line no. */ 00562 rb_encoding *enc; 00563 00564 int parser_yydebug; 00565 00566 #ifndef RIPPER 00567 /* Ruby core only */ 00568 NODE *parser_eval_tree_begin; 00569 NODE *parser_eval_tree; 00570 VALUE debug_lines; 00571 VALUE coverage; 00572 int nerr; 00573 00574 int parser_token_info_enabled; 00575 token_info *parser_token_info; 00576 #else 00577 /* Ripper only */ 00578 VALUE parser_ruby_sourcefile_string; 00579 const char *tokp; 00580 VALUE delayed; 00581 int delayed_line; 00582 int delayed_col; 00583 00584 VALUE value; 00585 VALUE result; 00586 VALUE parsing_thread; 00587 int toplevel_p; 00588 #endif 00589 }; 00590 00591 #define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc) 00592 #define STR_NEW0() rb_enc_str_new(0,0,current_enc) 00593 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc) 00594 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),current_enc) 00595 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00596 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), current_enc) 00597 00598 static int parser_yyerror(struct parser_params*, const char*); 00599 #define yyerror(msg) parser_yyerror(parser, (msg)) 00600 00601 #define YYLEX_PARAM parser 00602 00603 #define lex_strterm (parser->parser_lex_strterm) 00604 #define lex_state (parser->parser_lex_state) 00605 #define cond_stack (parser->parser_cond_stack) 00606 #define cmdarg_stack (parser->parser_cmdarg_stack) 00607 #define class_nest (parser->parser_class_nest) 00608 #define paren_nest (parser->parser_paren_nest) 00609 #define lpar_beg (parser->parser_lpar_beg) 00610 #define brace_nest (parser->parser_brace_nest) 00611 #define in_single (parser->parser_in_single) 00612 #define in_def (parser->parser_in_def) 00613 #define compile_for_eval (parser->parser_compile_for_eval) 00614 #define cur_mid (parser->parser_cur_mid) 00615 #define in_defined (parser->parser_in_defined) 00616 #define tokenbuf (parser->parser_tokenbuf) 00617 #define tokidx (parser->parser_tokidx) 00618 #define toksiz (parser->parser_toksiz) 00619 #define tokline (parser->parser_tokline) 00620 #define lex_input (parser->parser_lex_input) 00621 #define lex_lastline (parser->parser_lex_lastline) 00622 #define lex_nextline (parser->parser_lex_nextline) 00623 #define lex_pbeg (parser->parser_lex_pbeg) 00624 #define lex_p (parser->parser_lex_p) 00625 #define lex_pend (parser->parser_lex_pend) 00626 #define heredoc_end (parser->parser_heredoc_end) 00627 #define command_start (parser->parser_command_start) 00628 #define deferred_nodes (parser->parser_deferred_nodes) 00629 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00630 #define lex_gets (parser->parser_lex_gets) 00631 #define lvtbl (parser->parser_lvtbl) 00632 #define ruby__end__seen (parser->parser_ruby__end__seen) 00633 #define ruby_sourceline (parser->parser_ruby_sourceline) 00634 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00635 #define current_enc (parser->enc) 00636 #define yydebug (parser->parser_yydebug) 00637 #ifdef RIPPER 00638 #else 00639 #define ruby_eval_tree (parser->parser_eval_tree) 00640 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00641 #define ruby_debug_lines (parser->debug_lines) 00642 #define ruby_coverage (parser->coverage) 00643 #endif 00644 00645 static int yylex(void*, void*); 00646 00647 #ifndef RIPPER 00648 #define yyparse ruby_yyparse 00649 00650 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00651 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 00652 00653 static NODE *cond_gen(struct parser_params*,NODE*); 00654 #define cond(node) cond_gen(parser, (node)) 00655 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00656 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 00657 00658 static NODE *newline_node(NODE*); 00659 static void fixpos(NODE*,NODE*); 00660 00661 static int value_expr_gen(struct parser_params*,NODE*); 00662 static void void_expr_gen(struct parser_params*,NODE*); 00663 static NODE *remove_begin(NODE*); 00664 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00665 #define void_expr0(node) void_expr_gen(parser, (node)) 00666 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00667 static void void_stmts_gen(struct parser_params*,NODE*); 00668 #define void_stmts(node) void_stmts_gen(parser, (node)) 00669 static void reduce_nodes_gen(struct parser_params*,NODE**); 00670 #define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 00671 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00672 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 00673 00674 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00675 #define block_append(h,t) block_append_gen(parser,(h),(t)) 00676 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00677 #define list_append(l,i) list_append_gen(parser,(l),(i)) 00678 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00679 #define list_concat(h,t) list_concat_gen(parser,(h),(t)) 00680 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00681 #define arg_append(h,t) arg_append_gen(parser,(h),(t)) 00682 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00683 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 00684 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00685 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 00686 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00687 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00688 #define new_evstr(n) new_evstr_gen(parser,(n)) 00689 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00690 #define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 00691 static NODE *splat_array(NODE*); 00692 00693 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00694 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 00695 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00696 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 00697 00698 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*); 00699 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 00700 static NODE *new_args_tail_gen(struct parser_params*,NODE*,ID,ID); 00701 #define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 00702 00703 static NODE *negate_lit(NODE*); 00704 static NODE *ret_args_gen(struct parser_params*,NODE*); 00705 #define ret_args(node) ret_args_gen(parser, (node)) 00706 static NODE *arg_blk_pass(NODE*,NODE*); 00707 static NODE *new_yield_gen(struct parser_params*,NODE*); 00708 #define new_yield(node) new_yield_gen(parser, (node)) 00709 static NODE *dsym_node_gen(struct parser_params*,NODE*); 00710 #define dsym_node(node) dsym_node_gen(parser, (node)) 00711 00712 static NODE *gettable_gen(struct parser_params*,ID); 00713 #define gettable(id) gettable_gen(parser,(id)) 00714 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00715 #define assignable(id,node) assignable_gen(parser, (id), (node)) 00716 00717 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00718 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 00719 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00720 #define attrset(node,id) attrset_gen(parser, (node), (id)) 00721 00722 static void rb_backref_error_gen(struct parser_params*,NODE*); 00723 #define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 00724 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00725 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 00726 00727 static NODE *new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 00728 static NODE *new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs); 00729 #define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs)) 00730 static NODE *new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 00731 #define new_const_op_assign(lhs, op, rhs) new_const_op_assign_gen(parser, (lhs), (op), (rhs)) 00732 00733 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00734 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 00735 00736 static ID *local_tbl_gen(struct parser_params*); 00737 #define local_tbl() local_tbl_gen(parser) 00738 00739 static void fixup_nodes(NODE **); 00740 00741 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00742 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 00743 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00744 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 00745 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00746 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 00747 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00748 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 00749 00750 #define get_id(id) (id) 00751 #define get_value(val) (val) 00752 #else 00753 #define value_expr(node) ((void)(node)) 00754 #define remove_begin(node) (node) 00755 #define rb_dvar_defined(id) 0 00756 #define rb_local_defined(id) 0 00757 static ID ripper_get_id(VALUE); 00758 #define get_id(id) ripper_get_id(id) 00759 static VALUE ripper_get_value(VALUE); 00760 #define get_value(val) ripper_get_value(val) 00761 static VALUE assignable_gen(struct parser_params*,VALUE); 00762 #define assignable(lhs,node) assignable_gen(parser, (lhs)) 00763 static int id_is_var_gen(struct parser_params *parser, ID id); 00764 #define id_is_var(id) id_is_var_gen(parser, (id)) 00765 00766 #define node_assign(node1, node2) dispatch2(assign, (node1), (node2)) 00767 00768 static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs); 00769 static VALUE new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs); 00770 #define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs)) 00771 00772 #endif /* !RIPPER */ 00773 00774 #define new_op_assign(lhs, op, rhs) new_op_assign_gen(parser, (lhs), (op), (rhs)) 00775 00776 static ID formal_argument_gen(struct parser_params*, ID); 00777 #define formal_argument(id) formal_argument_gen(parser, (id)) 00778 static ID shadowing_lvar_gen(struct parser_params*,ID); 00779 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 00780 static void new_bv_gen(struct parser_params*,ID); 00781 #define new_bv(id) new_bv_gen(parser, (id)) 00782 00783 static void local_push_gen(struct parser_params*,int); 00784 #define local_push(top) local_push_gen(parser,(top)) 00785 static void local_pop_gen(struct parser_params*); 00786 #define local_pop() local_pop_gen(parser) 00787 static int local_var_gen(struct parser_params*, ID); 00788 #define local_var(id) local_var_gen(parser, (id)) 00789 static int arg_var_gen(struct parser_params*, ID); 00790 #define arg_var(id) arg_var_gen(parser, (id)) 00791 static int local_id_gen(struct parser_params*, ID); 00792 #define local_id(id) local_id_gen(parser, (id)) 00793 static ID internal_id_gen(struct parser_params*); 00794 #define internal_id() internal_id_gen(parser) 00795 00796 static const struct vtable *dyna_push_gen(struct parser_params *); 00797 #define dyna_push() dyna_push_gen(parser) 00798 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00799 #define dyna_pop(node) dyna_pop_gen(parser, (node)) 00800 static int dyna_in_block_gen(struct parser_params*); 00801 #define dyna_in_block() dyna_in_block_gen(parser) 00802 #define dyna_var(id) local_var(id) 00803 static int dvar_defined_gen(struct parser_params*,ID,int); 00804 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 00805 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 00806 static int dvar_curr_gen(struct parser_params*,ID); 00807 #define dvar_curr(id) dvar_curr_gen(parser, (id)) 00808 00809 static int lvar_defined_gen(struct parser_params*, ID); 00810 #define lvar_defined(id) lvar_defined_gen(parser, (id)) 00811 00812 #define RE_OPTION_ONCE (1<<16) 00813 #define RE_OPTION_ENCODING_SHIFT 8 00814 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00815 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00816 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00817 #define RE_OPTION_MASK 0xff 00818 #define RE_OPTION_ARG_ENCODING_NONE 32 00819 00820 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00821 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00822 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00823 #define nd_func u1.id 00824 #if SIZEOF_SHORT == 2 00825 #define nd_term(node) ((signed short)(node)->u2.id) 00826 #else 00827 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00828 #endif 00829 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00830 #define nd_nest u3.cnt 00831 00832 /****** Ripper *******/ 00833 00834 #ifdef RIPPER 00835 #define RIPPER_VERSION "0.1.0" 00836 00837 #include "eventids1.c" 00838 #include "eventids2.c" 00839 00840 static VALUE ripper_dispatch0(struct parser_params*,ID); 00841 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00842 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00843 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00844 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00845 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00846 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE); 00847 00848 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00849 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 00850 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 00851 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 00852 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 00853 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 00854 #define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e), (f), (g)) 00855 00856 #define yyparse ripper_yyparse 00857 00858 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00859 static VALUE ripper_id2sym(ID); 00860 #ifdef __GNUC__ 00861 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00862 ID2SYM(id) : ripper_id2sym(id)) 00863 #endif 00864 00865 #define arg_new() dispatch0(args_new) 00866 #define arg_add(l,a) dispatch2(args_add, (l), (a)) 00867 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 00868 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 00869 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 00870 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 00871 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 00872 00873 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 00874 #define mrhs_new() dispatch0(mrhs_new) 00875 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 00876 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 00877 00878 #define mlhs_new() dispatch0(mlhs_new) 00879 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 00880 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 00881 00882 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \ 00883 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk)) 00884 00885 #define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 00886 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 00887 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 00888 00889 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 00890 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 00891 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 00892 00893 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00894 00895 static inline VALUE 00896 new_args_gen(struct parser_params *parser, VALUE f, VALUE o, VALUE r, VALUE p, VALUE tail) 00897 { 00898 NODE *t = (NODE *)tail; 00899 VALUE k = t->u1.value, kr = t->u2.value, b = t->u3.value; 00900 return params_new(f, o, r, p, k, kr, escape_Qundef(b)); 00901 } 00902 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 00903 00904 static inline VALUE 00905 new_args_tail_gen(struct parser_params *parser, VALUE k, VALUE kr, VALUE b) 00906 { 00907 return (VALUE)rb_node_newnode(NODE_MEMO, k, kr, b); 00908 } 00909 #define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 00910 00911 #define FIXME 0 00912 00913 #endif /* RIPPER */ 00914 00915 #ifndef RIPPER 00916 # define Qnone 0 00917 # define ifndef_ripper(x) (x) 00918 #else 00919 # define Qnone Qnil 00920 # define ifndef_ripper(x) 00921 #endif 00922 00923 #ifndef RIPPER 00924 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 00925 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00926 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00927 # define rb_warn4S(file,line,fmt,a) rb_compile_warn((file), (line), (fmt), (a)) 00928 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 00929 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00930 #else 00931 # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 00932 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 00933 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 00934 # define rb_warn4S(file,line,fmt,a) ripper_warnS(parser, (fmt), (a)) 00935 # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 00936 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 00937 static void ripper_warn0(struct parser_params*, const char*); 00938 static void ripper_warnI(struct parser_params*, const char*, int); 00939 static void ripper_warnS(struct parser_params*, const char*, const char*); 00940 static void ripper_warning0(struct parser_params*, const char*); 00941 static void ripper_warningS(struct parser_params*, const char*, const char*); 00942 #endif 00943 00944 #ifdef RIPPER 00945 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00946 # define rb_compile_error ripper_compile_error 00947 # define compile_error ripper_compile_error 00948 # define PARSER_ARG parser, 00949 #else 00950 # define rb_compile_error rb_compile_error_with_enc 00951 # define compile_error parser->nerr++,rb_compile_error_with_enc 00952 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 00953 #endif 00954 00955 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00956 for instance). This is too low for Ruby to parse some files, such as 00957 date/format.rb, therefore bump the value up to at least Bison's default. */ 00958 #ifdef OLD_YACC 00959 #ifndef YYMAXDEPTH 00960 #define YYMAXDEPTH 10000 00961 #endif 00962 #endif 00963 00964 #ifndef RIPPER 00965 static void token_info_push(struct parser_params*, const char *token); 00966 static void token_info_pop(struct parser_params*, const char *token); 00967 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 00968 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 00969 #else 00970 #define token_info_push(token) /* nothing */ 00971 #define token_info_pop(token) /* nothing */ 00972 #endif 00973 00974 00975 /* Enabling traces. */ 00976 #ifndef YYDEBUG 00977 # define YYDEBUG 0 00978 #endif 00979 00980 /* Enabling verbose error messages. */ 00981 #ifdef YYERROR_VERBOSE 00982 # undef YYERROR_VERBOSE 00983 # define YYERROR_VERBOSE 1 00984 #else 00985 # define YYERROR_VERBOSE 0 00986 #endif 00987 00988 /* Enabling the token table. */ 00989 #ifndef YYTOKEN_TABLE 00990 # define YYTOKEN_TABLE 0 00991 #endif 00992 00993 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00994 typedef union YYSTYPE 00995 #line 686 "parse.y" 00996 { 00997 VALUE val; 00998 NODE *node; 00999 ID id; 01000 int num; 01001 const struct vtable *vars; 01002 } 01003 /* Line 187 of yacc.c. */ 01004 #line 1005 "parse.c" 01005 YYSTYPE; 01006 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 01007 # define YYSTYPE_IS_DECLARED 1 01008 # define YYSTYPE_IS_TRIVIAL 1 01009 #endif 01010 01011 01012 01013 /* Copy the second part of user declarations. */ 01014 01015 01016 /* Line 216 of yacc.c. */ 01017 #line 1018 "parse.c" 01018 01019 #ifdef short 01020 # undef short 01021 #endif 01022 01023 #ifdef YYTYPE_UINT8 01024 typedef YYTYPE_UINT8 yytype_uint8; 01025 #else 01026 typedef unsigned char yytype_uint8; 01027 #endif 01028 01029 #ifdef YYTYPE_INT8 01030 typedef YYTYPE_INT8 yytype_int8; 01031 #elif (defined __STDC__ || defined __C99__FUNC__ \ 01032 || defined __cplusplus || defined _MSC_VER) 01033 typedef signed char yytype_int8; 01034 #else 01035 typedef short int yytype_int8; 01036 #endif 01037 01038 #ifdef YYTYPE_UINT16 01039 typedef YYTYPE_UINT16 yytype_uint16; 01040 #else 01041 typedef unsigned short int yytype_uint16; 01042 #endif 01043 01044 #ifdef YYTYPE_INT16 01045 typedef YYTYPE_INT16 yytype_int16; 01046 #else 01047 typedef short int yytype_int16; 01048 #endif 01049 01050 #ifndef YYSIZE_T 01051 # ifdef __SIZE_TYPE__ 01052 # define YYSIZE_T __SIZE_TYPE__ 01053 # elif defined size_t 01054 # define YYSIZE_T size_t 01055 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 01056 || defined __cplusplus || defined _MSC_VER) 01057 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 01058 # define YYSIZE_T size_t 01059 # else 01060 # define YYSIZE_T unsigned int 01061 # endif 01062 #endif 01063 01064 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 01065 01066 #ifndef YY_ 01067 # if YYENABLE_NLS 01068 # if ENABLE_NLS 01069 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 01070 # define YY_(msgid) dgettext ("bison-runtime", msgid) 01071 # endif 01072 # endif 01073 # ifndef YY_ 01074 # define YY_(msgid) msgid 01075 # endif 01076 #endif 01077 01078 /* Suppress unused-variable warnings by "using" E. */ 01079 #if ! defined lint || defined __GNUC__ 01080 # define YYUSE(e) ((void) (e)) 01081 #else 01082 # define YYUSE(e) /* empty */ 01083 #endif 01084 01085 /* Identity function, used to suppress warnings about constant conditions. */ 01086 #ifndef lint 01087 # define YYID(n) (n) 01088 #else 01089 #if (defined __STDC__ || defined __C99__FUNC__ \ 01090 || defined __cplusplus || defined _MSC_VER) 01091 static int 01092 YYID (int i) 01093 #else 01094 static int 01095 YYID (i) 01096 int i; 01097 #endif 01098 { 01099 return i; 01100 } 01101 #endif 01102 01103 #if ! defined yyoverflow || YYERROR_VERBOSE 01104 01105 /* The parser invokes alloca or malloc; define the necessary symbols. */ 01106 01107 # ifdef YYSTACK_USE_ALLOCA 01108 # if YYSTACK_USE_ALLOCA 01109 # ifdef __GNUC__ 01110 # define YYSTACK_ALLOC __builtin_alloca 01111 # elif defined __BUILTIN_VA_ARG_INCR 01112 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 01113 # elif defined _AIX 01114 # define YYSTACK_ALLOC __alloca 01115 # elif defined _MSC_VER 01116 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 01117 # define alloca _alloca 01118 # else 01119 # define YYSTACK_ALLOC alloca 01120 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01121 || defined __cplusplus || defined _MSC_VER) 01122 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01123 # ifndef _STDLIB_H 01124 # define _STDLIB_H 1 01125 # endif 01126 # endif 01127 # endif 01128 # endif 01129 # endif 01130 01131 # ifdef YYSTACK_ALLOC 01132 /* Pacify GCC's `empty if-body' warning. */ 01133 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 01134 # ifndef YYSTACK_ALLOC_MAXIMUM 01135 /* The OS might guarantee only one guard page at the bottom of the stack, 01136 and a page size can be as small as 4096 bytes. So we cannot safely 01137 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 01138 to allow for a few compiler-allocated temporary stack slots. */ 01139 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 01140 # endif 01141 # else 01142 # define YYSTACK_ALLOC YYMALLOC 01143 # define YYSTACK_FREE YYFREE 01144 # ifndef YYSTACK_ALLOC_MAXIMUM 01145 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 01146 # endif 01147 # if (defined __cplusplus && ! defined _STDLIB_H \ 01148 && ! ((defined YYMALLOC || defined malloc) \ 01149 && (defined YYFREE || defined free))) 01150 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01151 # ifndef _STDLIB_H 01152 # define _STDLIB_H 1 01153 # endif 01154 # endif 01155 # ifndef YYMALLOC 01156 # define YYMALLOC malloc 01157 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01158 || defined __cplusplus || defined _MSC_VER) 01159 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 01160 # endif 01161 # endif 01162 # ifndef YYFREE 01163 # define YYFREE free 01164 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01165 || defined __cplusplus || defined _MSC_VER) 01166 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01167 # endif 01168 # endif 01169 # endif 01170 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01171 01172 01173 #if (! defined yyoverflow \ 01174 && (! defined __cplusplus \ 01175 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01176 01177 /* A type that is properly aligned for any stack member. */ 01178 union yyalloc 01179 { 01180 yytype_int16 yyss; 01181 YYSTYPE yyvs; 01182 }; 01183 01184 /* The size of the maximum gap between one aligned stack and the next. */ 01185 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01186 01187 /* The size of an array large to enough to hold all stacks, each with 01188 N elements. */ 01189 # define YYSTACK_BYTES(N) \ 01190 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01191 + YYSTACK_GAP_MAXIMUM) 01192 01193 /* Copy COUNT objects from FROM to TO. The source and destination do 01194 not overlap. */ 01195 # ifndef YYCOPY 01196 # if defined __GNUC__ && 1 < __GNUC__ 01197 # define YYCOPY(To, From, Count) \ 01198 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01199 # else 01200 # define YYCOPY(To, From, Count) \ 01201 do \ 01202 { \ 01203 YYSIZE_T yyi; \ 01204 for (yyi = 0; yyi < (Count); yyi++) \ 01205 (To)[yyi] = (From)[yyi]; \ 01206 } \ 01207 while (YYID (0)) 01208 # endif 01209 # endif 01210 01211 /* Relocate STACK from its old location to the new one. The 01212 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01213 elements in the stack, and YYPTR gives the new location of the 01214 stack. Advance YYPTR to a properly aligned location for the next 01215 stack. */ 01216 # define YYSTACK_RELOCATE(Stack) \ 01217 do \ 01218 { \ 01219 YYSIZE_T yynewbytes; \ 01220 YYCOPY (&yyptr->Stack, Stack, yysize); \ 01221 Stack = &yyptr->Stack; \ 01222 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01223 yyptr += yynewbytes / sizeof (*yyptr); \ 01224 } \ 01225 while (YYID (0)) 01226 01227 #endif 01228 01229 /* YYFINAL -- State number of the termination state. */ 01230 #define YYFINAL 3 01231 /* YYLAST -- Last index in YYTABLE. */ 01232 #define YYLAST 10982 01233 01234 /* YYNTOKENS -- Number of terminals. */ 01235 #define YYNTOKENS 142 01236 /* YYNNTS -- Number of nonterminals. */ 01237 #define YYNNTS 197 01238 /* YYNRULES -- Number of rules. */ 01239 #define YYNRULES 618 01240 /* YYNRULES -- Number of states. */ 01241 #define YYNSTATES 1055 01242 01243 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01244 #define YYUNDEFTOK 2 01245 #define YYMAXUTOK 352 01246 01247 #define YYTRANSLATE(YYX) \ 01248 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01249 01250 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01251 static const yytype_uint8 yytranslate[] = 01252 { 01253 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01254 141, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01255 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01256 2, 2, 140, 127, 2, 2, 2, 125, 120, 2, 01257 136, 137, 123, 121, 134, 122, 133, 124, 2, 2, 01258 2, 2, 2, 2, 2, 2, 2, 2, 115, 139, 01259 117, 113, 116, 114, 2, 2, 2, 2, 2, 2, 01260 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01261 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01262 2, 132, 2, 138, 119, 2, 135, 2, 2, 2, 01263 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01264 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01265 2, 2, 2, 130, 118, 131, 128, 2, 79, 80, 01266 66, 67, 68, 2, 69, 83, 84, 74, 73, 70, 01267 71, 72, 77, 78, 81, 82, 2, 2, 2, 2, 01268 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01269 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01270 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01271 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01272 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01273 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01274 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01275 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01276 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01277 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01278 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01279 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01280 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01281 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01282 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01283 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01284 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01285 65, 75, 76, 85, 86, 87, 88, 89, 90, 91, 01286 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 01287 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 01288 112, 126, 129 01289 }; 01290 01291 #if YYDEBUG 01292 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01293 YYRHS. */ 01294 static const yytype_uint16 yyprhs[] = 01295 { 01296 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01297 23, 24, 30, 35, 38, 40, 42, 46, 49, 51, 01298 52, 58, 59, 64, 68, 72, 76, 79, 83, 87, 01299 91, 95, 99, 104, 106, 110, 114, 121, 127, 133, 01300 139, 145, 149, 153, 157, 161, 163, 167, 171, 173, 01301 177, 181, 185, 188, 190, 192, 194, 196, 198, 203, 01302 204, 210, 212, 215, 219, 224, 230, 235, 241, 244, 01303 247, 250, 253, 256, 258, 262, 264, 268, 270, 273, 01304 277, 283, 286, 291, 294, 299, 301, 305, 307, 311, 01305 314, 318, 320, 324, 326, 328, 333, 337, 341, 345, 01306 349, 352, 354, 356, 358, 363, 367, 371, 375, 379, 01307 382, 384, 386, 388, 391, 393, 397, 399, 401, 403, 01308 405, 407, 409, 411, 413, 415, 417, 418, 423, 425, 01309 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01310 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01311 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01312 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01313 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01314 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01315 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 01316 569, 575, 579, 585, 592, 598, 604, 610, 616, 621, 01317 625, 629, 633, 637, 641, 645, 649, 653, 657, 662, 01318 667, 670, 673, 677, 681, 685, 689, 693, 697, 701, 01319 705, 709, 713, 717, 721, 725, 728, 731, 735, 739, 01320 743, 747, 748, 753, 760, 762, 764, 766, 769, 774, 01321 777, 781, 783, 785, 787, 789, 792, 797, 800, 802, 01322 805, 808, 813, 815, 816, 819, 822, 825, 827, 829, 01323 832, 836, 841, 845, 850, 853, 855, 857, 859, 861, 01324 863, 865, 867, 869, 871, 873, 875, 876, 881, 882, 01325 886, 887, 892, 896, 900, 903, 907, 911, 913, 918, 01326 922, 924, 925, 932, 937, 941, 944, 946, 949, 952, 01327 959, 966, 967, 968, 976, 977, 978, 986, 992, 997, 01328 998, 999, 1009, 1010, 1017, 1018, 1019, 1028, 1029, 1035, 01329 1036, 1043, 1044, 1045, 1055, 1057, 1059, 1061, 1063, 1065, 01330 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 01331 1087, 1089, 1091, 1094, 1096, 1098, 1100, 1106, 1108, 1111, 01332 1113, 1115, 1117, 1121, 1123, 1127, 1129, 1134, 1141, 1145, 01333 1151, 1154, 1159, 1161, 1165, 1170, 1173, 1176, 1178, 1181, 01334 1182, 1189, 1198, 1203, 1210, 1215, 1218, 1225, 1228, 1233, 01335 1240, 1243, 1248, 1251, 1256, 1258, 1260, 1262, 1266, 1268, 01336 1273, 1275, 1280, 1282, 1286, 1288, 1290, 1291, 1292, 1297, 01337 1302, 1304, 1308, 1312, 1313, 1319, 1322, 1327, 1333, 1339, 01338 1342, 1343, 1349, 1350, 1356, 1360, 1361, 1366, 1367, 1372, 01339 1375, 1377, 1382, 1383, 1389, 1390, 1396, 1402, 1404, 1406, 01340 1413, 1415, 1417, 1419, 1421, 1424, 1426, 1429, 1431, 1433, 01341 1435, 1437, 1439, 1441, 1443, 1446, 1450, 1454, 1458, 1462, 01342 1466, 1467, 1471, 1473, 1476, 1480, 1484, 1485, 1489, 1493, 01343 1497, 1501, 1505, 1506, 1510, 1511, 1515, 1516, 1519, 1520, 01344 1523, 1524, 1527, 1529, 1530, 1534, 1535, 1536, 1537, 1544, 01345 1546, 1548, 1550, 1552, 1555, 1557, 1559, 1561, 1563, 1567, 01346 1569, 1571, 1574, 1577, 1579, 1581, 1583, 1585, 1587, 1589, 01347 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 01348 1611, 1613, 1615, 1616, 1621, 1624, 1628, 1631, 1636, 1639, 01349 1642, 1644, 1647, 1648, 1655, 1664, 1669, 1676, 1681, 1688, 01350 1691, 1696, 1703, 1706, 1711, 1714, 1719, 1721, 1722, 1724, 01351 1726, 1728, 1730, 1732, 1734, 1736, 1740, 1742, 1746, 1749, 01352 1752, 1754, 1758, 1760, 1764, 1766, 1768, 1771, 1773, 1777, 01353 1781, 1783, 1787, 1789, 1793, 1795, 1797, 1800, 1802, 1804, 01354 1806, 1809, 1812, 1814, 1816, 1817, 1822, 1824, 1827, 1829, 01355 1833, 1837, 1840, 1843, 1845, 1847, 1849, 1851, 1853, 1855, 01356 1857, 1859, 1861, 1863, 1865, 1867, 1868, 1870, 1871, 1873, 01357 1876, 1879, 1880, 1882, 1884, 1886, 1888, 1890, 1893 01358 }; 01359 01360 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01361 static const yytype_int16 yyrhs[] = 01362 { 01363 143, 0, -1, -1, 144, 145, -1, 146, 331, -1, 01364 338, -1, 147, -1, 146, 337, 147, -1, 1, 147, 01365 -1, 154, -1, -1, 47, 148, 130, 145, 131, -1, 01366 150, 260, 229, 263, -1, 151, 331, -1, 338, -1, 01367 152, -1, 151, 337, 152, -1, 1, 154, -1, 154, 01368 -1, -1, 47, 153, 130, 145, 131, -1, -1, 45, 01369 177, 155, 177, -1, 45, 54, 54, -1, 45, 54, 01370 64, -1, 45, 54, 63, -1, 6, 178, -1, 154, 01371 40, 158, -1, 154, 41, 158, -1, 154, 42, 158, 01372 -1, 154, 43, 158, -1, 154, 44, 154, -1, 48, 01373 130, 150, 131, -1, 156, -1, 165, 113, 159, -1, 01374 295, 87, 159, -1, 214, 132, 188, 334, 87, 159, 01375 -1, 214, 133, 52, 87, 159, -1, 214, 133, 56, 01376 87, 159, -1, 214, 85, 56, 87, 159, -1, 214, 01377 85, 52, 87, 159, -1, 296, 87, 159, -1, 172, 01378 113, 195, -1, 165, 113, 184, -1, 165, 113, 195, 01379 -1, 157, -1, 172, 113, 159, -1, 172, 113, 156, 01380 -1, 159, -1, 157, 37, 157, -1, 157, 38, 157, 01381 -1, 39, 332, 157, -1, 127, 159, -1, 182, -1, 01382 157, -1, 164, -1, 160, -1, 249, -1, 249, 330, 01383 328, 190, -1, -1, 94, 162, 237, 150, 131, -1, 01384 327, -1, 163, 190, -1, 163, 190, 161, -1, 214, 01385 133, 328, 190, -1, 214, 133, 328, 190, 161, -1, 01386 214, 85, 328, 190, -1, 214, 85, 328, 190, 161, 01387 -1, 32, 190, -1, 31, 190, -1, 30, 189, -1, 01388 21, 189, -1, 22, 189, -1, 167, -1, 89, 166, 01389 333, -1, 167, -1, 89, 166, 333, -1, 169, -1, 01390 169, 168, -1, 169, 95, 171, -1, 169, 95, 171, 01391 134, 170, -1, 169, 95, -1, 169, 95, 134, 170, 01392 -1, 95, 171, -1, 95, 171, 134, 170, -1, 95, 01393 -1, 95, 134, 170, -1, 171, -1, 89, 166, 333, 01394 -1, 168, 134, -1, 169, 168, 134, -1, 168, -1, 01395 170, 134, 168, -1, 292, -1, 293, -1, 214, 132, 01396 188, 334, -1, 214, 133, 52, -1, 214, 85, 52, 01397 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 01398 56, -1, 296, -1, 292, -1, 293, -1, 214, 132, 01399 188, 334, -1, 214, 133, 52, -1, 214, 85, 52, 01400 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 01401 56, -1, 296, -1, 52, -1, 56, -1, 86, 173, 01402 -1, 173, -1, 214, 85, 173, -1, 52, -1, 56, 01403 -1, 53, -1, 180, -1, 181, -1, 175, -1, 288, 01404 -1, 176, -1, 290, -1, 177, -1, -1, 178, 134, 01405 179, 177, -1, 118, -1, 119, -1, 120, -1, 69, 01406 -1, 70, -1, 71, -1, 77, -1, 78, -1, 116, 01407 -1, 73, -1, 117, -1, 74, -1, 72, -1, 83, 01408 -1, 84, -1, 121, -1, 122, -1, 123, -1, 95, 01409 -1, 124, -1, 125, -1, 68, -1, 96, -1, 127, 01410 -1, 128, -1, 66, -1, 67, -1, 81, -1, 82, 01411 -1, 135, -1, 49, -1, 50, -1, 51, -1, 47, 01412 -1, 48, -1, 45, -1, 37, -1, 7, -1, 21, 01413 -1, 16, -1, 3, -1, 5, -1, 46, -1, 26, 01414 -1, 15, -1, 14, -1, 10, -1, 9, -1, 36, 01415 -1, 20, -1, 25, -1, 4, -1, 22, -1, 34, 01416 -1, 39, -1, 38, -1, 23, -1, 8, -1, 24, 01417 -1, 30, -1, 33, -1, 32, -1, 13, -1, 35, 01418 -1, 6, -1, 17, -1, 31, -1, 11, -1, 12, 01419 -1, 18, -1, 19, -1, 172, 113, 182, -1, 172, 01420 113, 182, 44, 182, -1, 295, 87, 182, -1, 295, 01421 87, 182, 44, 182, -1, 214, 132, 188, 334, 87, 01422 182, -1, 214, 133, 52, 87, 182, -1, 214, 133, 01423 56, 87, 182, -1, 214, 85, 52, 87, 182, -1, 01424 214, 85, 56, 87, 182, -1, 86, 56, 87, 182, 01425 -1, 296, 87, 182, -1, 182, 79, 182, -1, 182, 01426 80, 182, -1, 182, 121, 182, -1, 182, 122, 182, 01427 -1, 182, 123, 182, -1, 182, 124, 182, -1, 182, 01428 125, 182, -1, 182, 68, 182, -1, 126, 59, 68, 01429 182, -1, 126, 60, 68, 182, -1, 66, 182, -1, 01430 67, 182, -1, 182, 118, 182, -1, 182, 119, 182, 01431 -1, 182, 120, 182, -1, 182, 69, 182, -1, 182, 01432 116, 182, -1, 182, 73, 182, -1, 182, 117, 182, 01433 -1, 182, 74, 182, -1, 182, 70, 182, -1, 182, 01434 71, 182, -1, 182, 72, 182, -1, 182, 77, 182, 01435 -1, 182, 78, 182, -1, 127, 182, -1, 128, 182, 01436 -1, 182, 83, 182, -1, 182, 84, 182, -1, 182, 01437 75, 182, -1, 182, 76, 182, -1, -1, 46, 332, 01438 183, 182, -1, 182, 114, 182, 332, 115, 182, -1, 01439 196, -1, 182, -1, 338, -1, 194, 335, -1, 194, 01440 134, 325, 335, -1, 325, 335, -1, 136, 188, 333, 01441 -1, 338, -1, 186, -1, 338, -1, 189, -1, 194, 01442 134, -1, 194, 134, 325, 134, -1, 325, 134, -1, 01443 164, -1, 194, 193, -1, 325, 193, -1, 194, 134, 01444 325, 193, -1, 192, -1, -1, 191, 189, -1, 97, 01445 184, -1, 134, 192, -1, 338, -1, 184, -1, 95, 01446 184, -1, 194, 134, 184, -1, 194, 134, 95, 184, 01447 -1, 194, 134, 184, -1, 194, 134, 95, 184, -1, 01448 95, 184, -1, 264, -1, 265, -1, 268, -1, 269, 01449 -1, 270, -1, 275, -1, 273, -1, 276, -1, 294, 01450 -1, 296, -1, 53, -1, -1, 215, 197, 149, 225, 01451 -1, -1, 90, 198, 333, -1, -1, 90, 157, 199, 01452 333, -1, 89, 150, 137, -1, 214, 85, 56, -1, 01453 86, 56, -1, 92, 185, 138, -1, 93, 324, 131, 01454 -1, 30, -1, 31, 136, 189, 333, -1, 31, 136, 01455 333, -1, 31, -1, -1, 46, 332, 136, 200, 157, 01456 333, -1, 39, 136, 157, 333, -1, 39, 136, 333, 01457 -1, 163, 255, -1, 250, -1, 250, 255, -1, 98, 01458 242, -1, 216, 158, 226, 150, 228, 225, -1, 217, 01459 158, 226, 150, 229, 225, -1, -1, -1, 218, 201, 01460 158, 227, 202, 150, 225, -1, -1, -1, 219, 203, 01461 158, 227, 204, 150, 225, -1, 220, 158, 331, 258, 01462 225, -1, 220, 331, 258, 225, -1, -1, -1, 221, 01463 230, 25, 205, 158, 227, 206, 150, 225, -1, -1, 01464 222, 174, 297, 207, 149, 225, -1, -1, -1, 222, 01465 83, 157, 208, 336, 209, 149, 225, -1, -1, 223, 01466 174, 210, 149, 225, -1, -1, 224, 175, 211, 299, 01467 149, 225, -1, -1, -1, 224, 322, 330, 212, 175, 01468 213, 299, 149, 225, -1, 21, -1, 22, -1, 23, 01469 -1, 24, -1, 196, -1, 7, -1, 11, -1, 12, 01470 -1, 18, -1, 19, -1, 16, -1, 20, -1, 3, 01471 -1, 4, -1, 5, -1, 10, -1, 336, -1, 13, 01472 -1, 336, 13, -1, 336, -1, 27, -1, 229, -1, 01473 14, 158, 226, 150, 228, -1, 338, -1, 15, 150, 01474 -1, 172, -1, 165, -1, 304, -1, 89, 233, 333, 01475 -1, 231, -1, 232, 134, 231, -1, 232, -1, 232, 01476 134, 95, 304, -1, 232, 134, 95, 304, 134, 232, 01477 -1, 232, 134, 95, -1, 232, 134, 95, 134, 232, 01478 -1, 95, 304, -1, 95, 304, 134, 232, -1, 95, 01479 -1, 95, 134, 232, -1, 309, 134, 312, 321, -1, 01480 309, 321, -1, 312, 321, -1, 320, -1, 134, 234, 01481 -1, -1, 306, 134, 315, 134, 318, 235, -1, 306, 01482 134, 315, 134, 318, 134, 306, 235, -1, 306, 134, 01483 315, 235, -1, 306, 134, 315, 134, 306, 235, -1, 01484 306, 134, 318, 235, -1, 306, 134, -1, 306, 134, 01485 318, 134, 306, 235, -1, 306, 235, -1, 315, 134, 01486 318, 235, -1, 315, 134, 318, 134, 306, 235, -1, 01487 315, 235, -1, 315, 134, 306, 235, -1, 318, 235, 01488 -1, 318, 134, 306, 235, -1, 234, -1, 338, -1, 01489 238, -1, 118, 239, 118, -1, 76, -1, 118, 236, 01490 239, 118, -1, 332, -1, 332, 139, 240, 332, -1, 01491 241, -1, 240, 134, 241, -1, 52, -1, 303, -1, 01492 -1, -1, 243, 244, 245, 246, -1, 136, 302, 239, 01493 137, -1, 302, -1, 111, 150, 131, -1, 29, 150, 01494 10, -1, -1, 28, 248, 237, 150, 10, -1, 164, 01495 247, -1, 249, 330, 328, 187, -1, 249, 330, 328, 01496 187, 255, -1, 249, 330, 328, 190, 247, -1, 163, 01497 186, -1, -1, 214, 133, 328, 251, 187, -1, -1, 01498 214, 85, 328, 252, 186, -1, 214, 85, 329, -1, 01499 -1, 214, 133, 253, 186, -1, -1, 214, 85, 254, 01500 186, -1, 32, 186, -1, 32, -1, 214, 132, 188, 01501 334, -1, -1, 130, 256, 237, 150, 131, -1, -1, 01502 26, 257, 237, 150, 10, -1, 17, 194, 226, 150, 01503 259, -1, 229, -1, 258, -1, 8, 261, 262, 226, 01504 150, 260, -1, 338, -1, 184, -1, 195, -1, 338, 01505 -1, 88, 172, -1, 338, -1, 9, 150, -1, 338, 01506 -1, 291, -1, 288, -1, 290, -1, 266, -1, 62, 01507 -1, 267, -1, 266, 267, -1, 100, 279, 110, -1, 01508 101, 280, 110, -1, 102, 281, 65, -1, 103, 140, 01509 110, -1, 103, 271, 110, -1, -1, 271, 272, 140, 01510 -1, 282, -1, 272, 282, -1, 105, 140, 110, -1, 01511 105, 274, 110, -1, -1, 274, 272, 140, -1, 104, 01512 140, 110, -1, 104, 277, 110, -1, 106, 140, 110, 01513 -1, 106, 278, 110, -1, -1, 277, 61, 140, -1, 01514 -1, 278, 61, 140, -1, -1, 279, 282, -1, -1, 01515 280, 282, -1, -1, 281, 282, -1, 61, -1, -1, 01516 109, 283, 287, -1, -1, -1, -1, 107, 284, 285, 01517 286, 150, 108, -1, 54, -1, 55, -1, 57, -1, 01518 296, -1, 99, 289, -1, 175, -1, 55, -1, 54, 01519 -1, 57, -1, 99, 280, 110, -1, 59, -1, 60, 01520 -1, 126, 59, -1, 126, 60, -1, 52, -1, 55, 01521 -1, 54, -1, 56, -1, 57, -1, 34, -1, 33, 01522 -1, 35, -1, 36, -1, 50, -1, 49, -1, 51, 01523 -1, 292, -1, 293, -1, 292, -1, 293, -1, 63, 01524 -1, 64, -1, 336, -1, -1, 117, 298, 158, 336, 01525 -1, 1, 336, -1, 136, 302, 333, -1, 302, 336, 01526 -1, 310, 134, 312, 321, -1, 310, 321, -1, 312, 01527 321, -1, 320, -1, 134, 300, -1, -1, 306, 134, 01528 316, 134, 318, 301, -1, 306, 134, 316, 134, 318, 01529 134, 306, 301, -1, 306, 134, 316, 301, -1, 306, 01530 134, 316, 134, 306, 301, -1, 306, 134, 318, 301, 01531 -1, 306, 134, 318, 134, 306, 301, -1, 306, 301, 01532 -1, 316, 134, 318, 301, -1, 316, 134, 318, 134, 01533 306, 301, -1, 316, 301, -1, 316, 134, 306, 301, 01534 -1, 318, 301, -1, 318, 134, 306, 301, -1, 300, 01535 -1, -1, 56, -1, 55, -1, 54, -1, 57, -1, 01536 303, -1, 52, -1, 304, -1, 89, 233, 333, -1, 01537 305, -1, 306, 134, 305, -1, 58, 184, -1, 58, 01538 214, -1, 308, -1, 309, 134, 308, -1, 307, -1, 01539 310, 134, 307, -1, 68, -1, 96, -1, 311, 52, 01540 -1, 311, -1, 52, 113, 184, -1, 52, 113, 214, 01541 -1, 314, -1, 315, 134, 314, -1, 313, -1, 316, 01542 134, 313, -1, 123, -1, 95, -1, 317, 52, -1, 01543 317, -1, 120, -1, 97, -1, 319, 52, -1, 134, 01544 320, -1, 338, -1, 294, -1, -1, 136, 323, 157, 01545 333, -1, 338, -1, 325, 335, -1, 326, -1, 325, 01546 134, 326, -1, 184, 88, 184, -1, 58, 184, -1, 01547 96, 184, -1, 52, -1, 56, -1, 53, -1, 52, 01548 -1, 56, -1, 53, -1, 180, -1, 52, -1, 53, 01549 -1, 180, -1, 133, -1, 85, -1, -1, 337, -1, 01550 -1, 141, -1, 332, 137, -1, 332, 138, -1, -1, 01551 141, -1, 134, -1, 139, -1, 141, -1, 336, -1, 01552 337, 139, -1, -1 01553 }; 01554 01555 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01556 static const yytype_uint16 yyrline[] = 01557 { 01558 0, 850, 850, 850, 881, 892, 901, 909, 917, 923, 01559 925, 924, 945, 978, 989, 998, 1006, 1014, 1020, 1025, 01560 1024, 1045, 1045, 1053, 1061, 1072, 1082, 1090, 1099, 1108, 01561 1121, 1134, 1143, 1155, 1156, 1166, 1171, 1192, 1197, 1202, 01562 1212, 1217, 1227, 1236, 1245, 1254, 1257, 1266, 1278, 1279, 01563 1287, 1295, 1303, 1311, 1314, 1326, 1327, 1330, 1331, 1343, 01564 1342, 1364, 1374, 1383, 1396, 1405, 1417, 1426, 1438, 1447, 01565 1456, 1464, 1472, 1482, 1483, 1493, 1494, 1504, 1512, 1520, 01566 1528, 1537, 1545, 1554, 1562, 1571, 1579, 1590, 1591, 1601, 01567 1609, 1619, 1627, 1637, 1641, 1645, 1653, 1661, 1669, 1677, 01568 1689, 1699, 1711, 1720, 1729, 1737, 1745, 1753, 1761, 1774, 01569 1787, 1798, 1806, 1809, 1817, 1825, 1835, 1836, 1837, 1838, 01570 1843, 1854, 1855, 1858, 1866, 1869, 1877, 1877, 1887, 1888, 01571 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 01572 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 01573 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1919, 1919, 01574 1919, 1920, 1920, 1921, 1921, 1921, 1922, 1922, 1922, 1922, 01575 1923, 1923, 1923, 1923, 1924, 1924, 1924, 1925, 1925, 1925, 01576 1925, 1926, 1926, 1926, 1926, 1927, 1927, 1927, 1927, 1928, 01577 1928, 1928, 1928, 1929, 1929, 1929, 1929, 1930, 1930, 1933, 01578 1942, 1952, 1957, 1967, 1993, 1998, 2003, 2008, 2018, 2028, 01579 2039, 2053, 2067, 2075, 2083, 2091, 2099, 2107, 2115, 2124, 01580 2133, 2141, 2149, 2157, 2165, 2173, 2181, 2189, 2197, 2205, 01581 2213, 2221, 2229, 2237, 2248, 2256, 2264, 2272, 2280, 2288, 01582 2296, 2304, 2304, 2314, 2324, 2330, 2342, 2343, 2347, 2355, 01583 2365, 2375, 2376, 2379, 2380, 2381, 2385, 2393, 2403, 2412, 01584 2420, 2430, 2439, 2448, 2448, 2460, 2470, 2474, 2480, 2488, 01585 2496, 2510, 2526, 2540, 2555, 2565, 2566, 2567, 2568, 2569, 01586 2570, 2571, 2572, 2573, 2574, 2575, 2584, 2583, 2611, 2611, 01587 2619, 2619, 2627, 2635, 2643, 2651, 2664, 2672, 2680, 2688, 01588 2696, 2704, 2704, 2714, 2722, 2730, 2740, 2741, 2751, 2755, 01589 2767, 2779, 2779, 2779, 2790, 2790, 2790, 2801, 2812, 2821, 01590 2823, 2820, 2887, 2886, 2908, 2913, 2907, 2932, 2931, 2953, 01591 2952, 2975, 2976, 2975, 2996, 3004, 3012, 3020, 3030, 3042, 01592 3048, 3054, 3060, 3066, 3072, 3078, 3084, 3090, 3096, 3106, 01593 3112, 3117, 3118, 3125, 3130, 3133, 3134, 3147, 3148, 3158, 01594 3159, 3162, 3170, 3180, 3188, 3198, 3206, 3215, 3224, 3232, 01595 3240, 3249, 3261, 3269, 3280, 3284, 3288, 3292, 3298, 3303, 01596 3308, 3312, 3316, 3320, 3324, 3328, 3336, 3340, 3344, 3348, 01597 3352, 3356, 3360, 3364, 3368, 3374, 3375, 3381, 3390, 3399, 01598 3410, 3414, 3424, 3431, 3440, 3448, 3454, 3457, 3454, 3474, 01599 3482, 3492, 3496, 3503, 3502, 3523, 3539, 3548, 3560, 3574, 01600 3584, 3583, 3600, 3599, 3615, 3624, 3623, 3641, 3640, 3657, 01601 3665, 3673, 3688, 3687, 3707, 3706, 3727, 3739, 3740, 3743, 01602 3762, 3765, 3773, 3781, 3784, 3788, 3791, 3799, 3802, 3803, 01603 3811, 3814, 3831, 3832, 3833, 3843, 3853, 3880, 3945, 3954, 01604 3965, 3972, 3982, 3990, 4000, 4009, 4020, 4027, 4039, 4048, 01605 4058, 4067, 4078, 4085, 4096, 4103, 4118, 4125, 4136, 4143, 01606 4154, 4161, 4190, 4192, 4191, 4208, 4214, 4219, 4207, 4238, 01607 4246, 4254, 4262, 4265, 4276, 4277, 4278, 4279, 4282, 4293, 01608 4294, 4295, 4303, 4313, 4314, 4315, 4316, 4317, 4320, 4321, 01609 4322, 4323, 4324, 4325, 4326, 4329, 4342, 4352, 4360, 4370, 01610 4371, 4374, 4383, 4382, 4391, 4403, 4413, 4421, 4425, 4429, 01611 4433, 4439, 4444, 4449, 4453, 4457, 4461, 4465, 4469, 4473, 01612 4477, 4481, 4485, 4489, 4493, 4497, 4501, 4506, 4512, 4521, 01613 4530, 4539, 4550, 4551, 4558, 4567, 4586, 4593, 4606, 4618, 01614 4630, 4638, 4655, 4663, 4679, 4680, 4683, 4688, 4694, 4706, 01615 4718, 4726, 4742, 4750, 4766, 4767, 4770, 4783, 4794, 4795, 01616 4798, 4815, 4819, 4829, 4839, 4839, 4868, 4869, 4879, 4886, 01617 4896, 4904, 4912, 4924, 4925, 4926, 4929, 4930, 4931, 4932, 01618 4935, 4936, 4937, 4940, 4945, 4952, 4953, 4956, 4957, 4960, 01619 4963, 4966, 4967, 4968, 4971, 4972, 4975, 4976, 4980 01620 }; 01621 #endif 01622 01623 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01624 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01625 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01626 static const char *const yytname[] = 01627 { 01628 "\"end-of-input\"", "error", "$undefined", "keyword_class", 01629 "keyword_module", "keyword_def", "keyword_undef", "keyword_begin", 01630 "keyword_rescue", "keyword_ensure", "keyword_end", "keyword_if", 01631 "keyword_unless", "keyword_then", "keyword_elsif", "keyword_else", 01632 "keyword_case", "keyword_when", "keyword_while", "keyword_until", 01633 "keyword_for", "keyword_break", "keyword_next", "keyword_redo", 01634 "keyword_retry", "keyword_in", "keyword_do", "keyword_do_cond", 01635 "keyword_do_block", "keyword_do_LAMBDA", "keyword_return", 01636 "keyword_yield", "keyword_super", "keyword_self", "keyword_nil", 01637 "keyword_true", "keyword_false", "keyword_and", "keyword_or", 01638 "keyword_not", "modifier_if", "modifier_unless", "modifier_while", 01639 "modifier_until", "modifier_rescue", "keyword_alias", "keyword_defined", 01640 "keyword_BEGIN", "keyword_END", "keyword__LINE__", "keyword__FILE__", 01641 "keyword__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", 01642 "tCONSTANT", "tCVAR", "tLABEL", "tINTEGER", "tFLOAT", "tSTRING_CONTENT", 01643 "tCHAR", "tNTH_REF", "tBACK_REF", "tREGEXP_END", "\"unary+\"", 01644 "\"unary-\"", "\"**\"", "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", 01645 "\">=\"", "\"<=\"", "\"&&\"", "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", 01646 "\"...\"", "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"::\"", 01647 "\":: at EXPR_BEG\"", "tOP_ASGN", "\"=>\"", "\"(\"", "\"( arg\"", 01648 "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"", "\"&\"", 01649 "\"->\"", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", 01650 "tWORDS_BEG", "tQWORDS_BEG", "tSYMBOLS_BEG", "tQSYMBOLS_BEG", 01651 "tSTRING_DBEG", "tSTRING_DEND", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01652 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01653 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", 01654 "'{'", "'}'", "'['", "'.'", "','", "'`'", "'('", "')'", "']'", "';'", 01655 "' '", "'\\n'", "$accept", "program", "@1", "top_compstmt", "top_stmts", 01656 "top_stmt", "@2", "bodystmt", "compstmt", "stmts", "stmt_or_begin", "@3", 01657 "stmt", "@4", "command_asgn", "expr", "expr_value", "command_call", 01658 "block_command", "cmd_brace_block", "@5", "fcall", "command", "mlhs", 01659 "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", 01660 "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", "fitem", 01661 "undef_list", "@6", "op", "reswords", "arg", "@7", "arg_value", 01662 "aref_args", "paren_args", "opt_paren_args", "opt_call_args", 01663 "call_args", "command_args", "@8", "block_arg", "opt_block_arg", "args", 01664 "mrhs", "primary", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", 01665 "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25", 01666 "primary_value", "k_begin", "k_if", "k_unless", "k_while", "k_until", 01667 "k_case", "k_for", "k_class", "k_module", "k_def", "k_end", "then", "do", 01668 "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", 01669 "block_args_tail", "opt_block_args_tail", "block_param", 01670 "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar", 01671 "lambda", "@26", "@27", "f_larglist", "lambda_body", "do_block", "@28", 01672 "block_call", "method_call", "@29", "@30", "@31", "@32", "brace_block", 01673 "@33", "@34", "case_body", "cases", "opt_rescue", "exc_list", "exc_var", 01674 "opt_ensure", "literal", "strings", "string", "string1", "xstring", 01675 "regexp", "words", "word_list", "word", "symbols", "symbol_list", 01676 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents", 01677 "xstring_contents", "regexp_contents", "string_content", "@35", "@36", 01678 "@37", "@38", "string_dvar", "symbol", "sym", "dsym", "numeric", 01679 "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref", 01680 "superclass", "@39", "f_arglist", "args_tail", "opt_args_tail", "f_args", 01681 "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_kw", "f_block_kw", 01682 "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_kwrest", "f_opt", 01683 "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark", 01684 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg", 01685 "singleton", "@40", "assoc_list", "assocs", "assoc", "operation", 01686 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl", 01687 "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01688 }; 01689 #endif 01690 01691 # ifdef YYPRINT 01692 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01693 token YYLEX-NUM. */ 01694 static const yytype_uint16 yytoknum[] = 01695 { 01696 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01697 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01698 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01699 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01700 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01701 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01702 315, 316, 317, 318, 319, 320, 130, 131, 132, 134, 01703 139, 140, 141, 138, 137, 321, 322, 142, 143, 128, 01704 129, 144, 145, 135, 136, 323, 324, 325, 326, 327, 01705 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 01706 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 01707 348, 349, 350, 61, 63, 58, 62, 60, 124, 94, 01708 38, 43, 45, 42, 47, 37, 351, 33, 126, 352, 01709 123, 125, 91, 46, 44, 96, 40, 41, 93, 59, 01710 32, 10 01711 }; 01712 # endif 01713 01714 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01715 static const yytype_uint16 yyr1[] = 01716 { 01717 0, 142, 144, 143, 145, 146, 146, 146, 146, 147, 01718 148, 147, 149, 150, 151, 151, 151, 151, 152, 153, 01719 152, 155, 154, 154, 154, 154, 154, 154, 154, 154, 01720 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 01721 154, 154, 154, 154, 154, 154, 156, 156, 157, 157, 01722 157, 157, 157, 157, 158, 159, 159, 160, 160, 162, 01723 161, 163, 164, 164, 164, 164, 164, 164, 164, 164, 01724 164, 164, 164, 165, 165, 166, 166, 167, 167, 167, 01725 167, 167, 167, 167, 167, 167, 167, 168, 168, 169, 01726 169, 170, 170, 171, 171, 171, 171, 171, 171, 171, 01727 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, 01728 172, 173, 173, 174, 174, 174, 175, 175, 175, 175, 01729 175, 176, 176, 177, 177, 178, 179, 178, 180, 180, 01730 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 01731 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 01732 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 01733 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01734 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01735 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01736 181, 181, 181, 181, 181, 181, 181, 181, 181, 182, 01737 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01738 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01739 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01740 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01741 182, 183, 182, 182, 182, 184, 185, 185, 185, 185, 01742 186, 187, 187, 188, 188, 188, 188, 188, 189, 189, 01743 189, 189, 189, 191, 190, 192, 193, 193, 194, 194, 01744 194, 194, 195, 195, 195, 196, 196, 196, 196, 196, 01745 196, 196, 196, 196, 196, 196, 197, 196, 198, 196, 01746 199, 196, 196, 196, 196, 196, 196, 196, 196, 196, 01747 196, 200, 196, 196, 196, 196, 196, 196, 196, 196, 01748 196, 201, 202, 196, 203, 204, 196, 196, 196, 205, 01749 206, 196, 207, 196, 208, 209, 196, 210, 196, 211, 01750 196, 212, 213, 196, 196, 196, 196, 196, 214, 215, 01751 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01752 226, 226, 226, 227, 227, 228, 228, 229, 229, 230, 01753 230, 231, 231, 232, 232, 233, 233, 233, 233, 233, 01754 233, 233, 233, 233, 234, 234, 234, 234, 235, 235, 01755 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01756 236, 236, 236, 236, 236, 237, 237, 238, 238, 238, 01757 239, 239, 240, 240, 241, 241, 243, 244, 242, 245, 01758 245, 246, 246, 248, 247, 249, 249, 249, 249, 250, 01759 251, 250, 252, 250, 250, 253, 250, 254, 250, 250, 01760 250, 250, 256, 255, 257, 255, 258, 259, 259, 260, 01761 260, 261, 261, 261, 262, 262, 263, 263, 264, 264, 01762 264, 265, 266, 266, 266, 267, 268, 269, 270, 270, 01763 271, 271, 272, 272, 273, 273, 274, 274, 275, 275, 01764 276, 276, 277, 277, 278, 278, 279, 279, 280, 280, 01765 281, 281, 282, 283, 282, 284, 285, 286, 282, 287, 01766 287, 287, 287, 288, 289, 289, 289, 289, 290, 291, 01767 291, 291, 291, 292, 292, 292, 292, 292, 293, 293, 01768 293, 293, 293, 293, 293, 294, 294, 295, 295, 296, 01769 296, 297, 298, 297, 297, 299, 299, 300, 300, 300, 01770 300, 301, 301, 302, 302, 302, 302, 302, 302, 302, 01771 302, 302, 302, 302, 302, 302, 302, 302, 303, 303, 01772 303, 303, 304, 304, 305, 305, 306, 306, 307, 308, 01773 309, 309, 310, 310, 311, 311, 312, 312, 313, 314, 01774 315, 315, 316, 316, 317, 317, 318, 318, 319, 319, 01775 320, 321, 321, 322, 323, 322, 324, 324, 325, 325, 01776 326, 326, 326, 327, 327, 327, 328, 328, 328, 328, 01777 329, 329, 329, 330, 330, 331, 331, 332, 332, 333, 01778 334, 335, 335, 335, 336, 336, 337, 337, 338 01779 }; 01780 01781 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01782 static const yytype_uint8 yyr2[] = 01783 { 01784 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01785 0, 5, 4, 2, 1, 1, 3, 2, 1, 0, 01786 5, 0, 4, 3, 3, 3, 2, 3, 3, 3, 01787 3, 3, 4, 1, 3, 3, 6, 5, 5, 5, 01788 5, 3, 3, 3, 3, 1, 3, 3, 1, 3, 01789 3, 3, 2, 1, 1, 1, 1, 1, 4, 0, 01790 5, 1, 2, 3, 4, 5, 4, 5, 2, 2, 01791 2, 2, 2, 1, 3, 1, 3, 1, 2, 3, 01792 5, 2, 4, 2, 4, 1, 3, 1, 3, 2, 01793 3, 1, 3, 1, 1, 4, 3, 3, 3, 3, 01794 2, 1, 1, 1, 4, 3, 3, 3, 3, 2, 01795 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 01796 1, 1, 1, 1, 1, 1, 0, 4, 1, 1, 01797 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01798 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01799 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01800 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01801 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01802 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01803 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 01804 5, 3, 5, 6, 5, 5, 5, 5, 4, 3, 01805 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 01806 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 01807 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 01808 3, 0, 4, 6, 1, 1, 1, 2, 4, 2, 01809 3, 1, 1, 1, 1, 2, 4, 2, 1, 2, 01810 2, 4, 1, 0, 2, 2, 2, 1, 1, 2, 01811 3, 4, 3, 4, 2, 1, 1, 1, 1, 1, 01812 1, 1, 1, 1, 1, 1, 0, 4, 0, 3, 01813 0, 4, 3, 3, 2, 3, 3, 1, 4, 3, 01814 1, 0, 6, 4, 3, 2, 1, 2, 2, 6, 01815 6, 0, 0, 7, 0, 0, 7, 5, 4, 0, 01816 0, 9, 0, 6, 0, 0, 8, 0, 5, 0, 01817 6, 0, 0, 9, 1, 1, 1, 1, 1, 1, 01818 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01819 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 01820 1, 1, 3, 1, 3, 1, 4, 6, 3, 5, 01821 2, 4, 1, 3, 4, 2, 2, 1, 2, 0, 01822 6, 8, 4, 6, 4, 2, 6, 2, 4, 6, 01823 2, 4, 2, 4, 1, 1, 1, 3, 1, 4, 01824 1, 4, 1, 3, 1, 1, 0, 0, 4, 4, 01825 1, 3, 3, 0, 5, 2, 4, 5, 5, 2, 01826 0, 5, 0, 5, 3, 0, 4, 0, 4, 2, 01827 1, 4, 0, 5, 0, 5, 5, 1, 1, 6, 01828 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 01829 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 01830 0, 3, 1, 2, 3, 3, 0, 3, 3, 3, 01831 3, 3, 0, 3, 0, 3, 0, 2, 0, 2, 01832 0, 2, 1, 0, 3, 0, 0, 0, 6, 1, 01833 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 01834 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 01835 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01836 1, 1, 0, 4, 2, 3, 2, 4, 2, 2, 01837 1, 2, 0, 6, 8, 4, 6, 4, 6, 2, 01838 4, 6, 2, 4, 2, 4, 1, 0, 1, 1, 01839 1, 1, 1, 1, 1, 3, 1, 3, 2, 2, 01840 1, 3, 1, 3, 1, 1, 2, 1, 3, 3, 01841 1, 3, 1, 3, 1, 1, 2, 1, 1, 1, 01842 2, 2, 1, 1, 0, 4, 1, 2, 1, 3, 01843 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 01844 1, 1, 1, 1, 1, 0, 1, 0, 1, 2, 01845 2, 0, 1, 1, 1, 1, 1, 2, 0 01846 }; 01847 01848 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 01849 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 01850 means the default is an error. */ 01851 static const yytype_uint16 yydefact[] = 01852 { 01853 2, 0, 0, 1, 0, 346, 347, 348, 0, 339, 01854 340, 341, 344, 342, 343, 345, 334, 335, 336, 337, 01855 297, 263, 263, 509, 508, 510, 511, 607, 0, 607, 01856 10, 0, 513, 512, 514, 593, 595, 505, 504, 594, 01857 507, 499, 500, 452, 519, 520, 0, 0, 0, 0, 01858 288, 618, 618, 85, 406, 478, 476, 478, 480, 460, 01859 472, 466, 474, 0, 0, 0, 3, 605, 6, 9, 01860 33, 45, 48, 56, 263, 55, 0, 73, 0, 77, 01861 87, 0, 53, 244, 0, 286, 0, 0, 311, 314, 01862 605, 0, 0, 0, 0, 57, 306, 275, 276, 451, 01863 453, 277, 278, 279, 281, 280, 282, 449, 450, 448, 01864 515, 516, 283, 0, 284, 61, 5, 8, 168, 179, 01865 169, 192, 165, 185, 175, 174, 195, 196, 190, 173, 01866 172, 167, 193, 197, 198, 177, 166, 180, 184, 186, 01867 178, 171, 187, 194, 189, 188, 181, 191, 176, 164, 01868 183, 182, 163, 170, 161, 162, 158, 159, 160, 116, 01869 118, 117, 153, 154, 149, 131, 132, 133, 140, 137, 01870 139, 134, 135, 155, 156, 141, 142, 146, 150, 136, 01871 138, 128, 129, 130, 143, 144, 145, 147, 148, 151, 01872 152, 157, 121, 123, 125, 26, 119, 120, 122, 124, 01873 0, 0, 0, 0, 0, 0, 0, 0, 258, 0, 01874 245, 268, 71, 262, 618, 0, 515, 516, 0, 284, 01875 618, 588, 72, 70, 607, 69, 0, 618, 429, 68, 01876 607, 608, 0, 0, 21, 241, 0, 0, 334, 335, 01877 297, 300, 430, 0, 220, 0, 221, 294, 0, 19, 01878 0, 0, 605, 15, 18, 607, 75, 14, 290, 607, 01879 0, 611, 611, 246, 0, 0, 611, 586, 607, 0, 01880 0, 0, 83, 338, 0, 93, 94, 101, 308, 407, 01881 496, 495, 497, 494, 0, 493, 0, 0, 0, 0, 01882 0, 0, 0, 0, 0, 0, 0, 501, 502, 52, 01883 235, 236, 614, 615, 4, 616, 606, 0, 0, 0, 01884 0, 0, 0, 0, 434, 432, 419, 62, 305, 413, 01885 415, 0, 89, 0, 81, 78, 0, 0, 0, 0, 01886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01888 0, 0, 0, 427, 618, 425, 0, 54, 0, 0, 01889 0, 0, 605, 0, 606, 0, 360, 359, 0, 0, 01890 515, 516, 284, 111, 112, 0, 0, 114, 0, 0, 01891 515, 516, 284, 327, 188, 181, 191, 176, 158, 159, 01892 160, 116, 117, 584, 329, 583, 0, 604, 603, 0, 01893 307, 454, 0, 0, 126, 591, 294, 269, 592, 265, 01894 0, 0, 0, 259, 267, 427, 618, 425, 0, 0, 01895 0, 260, 607, 0, 299, 264, 607, 254, 618, 618, 01896 253, 607, 304, 51, 23, 25, 24, 0, 301, 0, 01897 0, 0, 427, 425, 0, 17, 0, 607, 292, 13, 01898 606, 74, 607, 289, 295, 613, 612, 247, 613, 249, 01899 296, 587, 0, 100, 501, 502, 91, 86, 0, 427, 01900 618, 425, 547, 482, 485, 483, 498, 479, 455, 477, 01901 456, 457, 481, 458, 459, 0, 462, 468, 0, 469, 01902 464, 465, 0, 470, 0, 471, 0, 0, 617, 7, 01903 27, 28, 29, 30, 31, 49, 50, 618, 618, 59, 01904 63, 618, 0, 34, 43, 0, 44, 607, 0, 79, 01905 90, 47, 46, 0, 199, 268, 42, 217, 225, 230, 01906 231, 232, 227, 229, 239, 240, 233, 234, 210, 211, 01907 237, 238, 607, 226, 228, 222, 223, 224, 212, 213, 01908 214, 215, 216, 596, 598, 597, 599, 0, 263, 424, 01909 607, 596, 598, 597, 599, 0, 263, 0, 618, 351, 01910 0, 350, 0, 0, 0, 0, 0, 0, 294, 427, 01911 618, 425, 319, 324, 111, 112, 113, 0, 522, 322, 01912 521, 427, 618, 425, 0, 0, 547, 331, 596, 597, 01913 263, 35, 201, 41, 209, 0, 199, 590, 0, 270, 01914 266, 618, 596, 597, 607, 596, 597, 589, 298, 609, 01915 250, 255, 257, 303, 22, 0, 242, 0, 32, 422, 01916 420, 208, 0, 76, 16, 291, 611, 0, 84, 97, 01917 99, 607, 596, 597, 553, 550, 549, 548, 551, 0, 01918 564, 0, 575, 565, 579, 578, 574, 547, 0, 546, 01919 410, 552, 554, 556, 532, 562, 618, 567, 618, 572, 01920 532, 577, 532, 0, 530, 486, 0, 461, 463, 473, 01921 467, 475, 218, 219, 398, 607, 0, 396, 395, 0, 01922 618, 0, 274, 0, 88, 82, 0, 0, 0, 0, 01923 0, 0, 428, 66, 0, 0, 431, 0, 0, 426, 01924 64, 618, 349, 287, 618, 618, 440, 618, 352, 618, 01925 354, 312, 353, 315, 0, 0, 318, 600, 293, 607, 01926 596, 597, 0, 0, 524, 0, 0, 111, 112, 115, 01927 607, 0, 607, 547, 0, 0, 0, 252, 416, 58, 01928 251, 0, 127, 271, 261, 0, 0, 431, 0, 0, 01929 618, 607, 11, 0, 248, 92, 95, 0, 558, 553, 01930 0, 372, 363, 365, 607, 361, 607, 0, 0, 408, 01931 0, 539, 0, 528, 582, 566, 0, 529, 0, 542, 01932 576, 0, 544, 580, 487, 489, 490, 491, 484, 492, 01933 553, 0, 394, 607, 0, 379, 560, 618, 618, 570, 01934 379, 379, 377, 400, 0, 0, 0, 0, 0, 272, 01935 80, 200, 0, 40, 206, 39, 207, 67, 423, 610, 01936 0, 37, 204, 38, 205, 65, 421, 441, 442, 618, 01937 443, 0, 618, 357, 0, 0, 355, 0, 0, 0, 01938 317, 0, 0, 431, 0, 325, 0, 0, 431, 328, 01939 585, 607, 0, 526, 332, 417, 418, 202, 0, 256, 01940 302, 20, 568, 607, 0, 370, 0, 555, 0, 0, 01941 0, 531, 557, 532, 532, 563, 618, 581, 532, 573, 01942 532, 532, 0, 0, 0, 559, 0, 397, 385, 387, 01943 0, 375, 376, 0, 390, 0, 392, 0, 435, 433, 01944 0, 414, 273, 243, 36, 203, 0, 0, 445, 358, 01945 0, 12, 447, 0, 309, 310, 0, 0, 270, 618, 01946 320, 0, 523, 323, 525, 330, 547, 362, 373, 0, 01947 368, 364, 409, 412, 411, 0, 535, 0, 537, 527, 01948 0, 543, 0, 540, 545, 0, 569, 294, 427, 399, 01949 378, 379, 379, 561, 618, 379, 571, 379, 379, 404, 01950 607, 402, 405, 60, 0, 444, 0, 102, 103, 110, 01951 0, 446, 0, 313, 316, 437, 438, 436, 0, 0, 01952 0, 0, 371, 0, 366, 532, 532, 532, 532, 488, 01953 600, 293, 0, 382, 0, 384, 374, 0, 391, 0, 01954 388, 393, 0, 401, 109, 427, 618, 425, 618, 618, 01955 0, 326, 0, 369, 0, 536, 0, 533, 538, 541, 01956 379, 379, 379, 379, 403, 600, 108, 607, 596, 597, 01957 439, 356, 321, 333, 367, 532, 383, 0, 380, 386, 01958 389, 431, 534, 379, 381 01959 }; 01960 01961 /* YYDEFGOTO[NTERM-NUM]. */ 01962 static const yytype_int16 yydefgoto[] = 01963 { 01964 -1, 1, 2, 66, 67, 68, 236, 567, 568, 252, 01965 253, 446, 254, 437, 70, 71, 358, 72, 73, 510, 01966 690, 243, 75, 76, 255, 77, 78, 79, 467, 80, 01967 209, 377, 378, 192, 193, 194, 195, 605, 556, 197, 01968 82, 439, 211, 260, 228, 748, 426, 427, 225, 226, 01969 213, 413, 428, 516, 83, 356, 259, 452, 625, 360, 01970 848, 361, 849, 732, 988, 736, 733, 931, 594, 596, 01971 746, 936, 245, 85, 86, 87, 88, 89, 90, 91, 01972 92, 93, 94, 713, 570, 721, 845, 846, 369, 772, 01973 773, 774, 960, 899, 803, 686, 687, 804, 970, 971, 01974 278, 279, 472, 658, 779, 320, 511, 95, 96, 711, 01975 704, 565, 557, 318, 508, 507, 577, 987, 715, 839, 01976 917, 921, 97, 98, 99, 100, 101, 102, 103, 290, 01977 485, 104, 294, 105, 106, 292, 296, 286, 284, 288, 01978 477, 676, 675, 794, 892, 798, 107, 285, 108, 109, 01979 216, 217, 112, 218, 219, 589, 735, 744, 881, 781, 01980 745, 661, 662, 663, 664, 665, 806, 807, 666, 667, 01981 668, 669, 809, 810, 670, 671, 672, 673, 674, 783, 01982 396, 595, 265, 429, 221, 115, 629, 559, 399, 304, 01983 423, 424, 706, 457, 571, 364, 257 01984 }; 01985 01986 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01987 STATE-NUM. */ 01988 #define YYPACT_NINF -804 01989 static const yytype_int16 yypact[] = 01990 { 01991 -804, 112, 2751, -804, 7365, -804, -804, -804, 6888, -804, 01992 -804, -804, -804, -804, -804, -804, 7478, 7478, -804, -804, 01993 7478, 4073, 3668, -804, -804, -804, -804, 335, 6755, -10, 01994 -804, 15, -804, -804, -804, 2993, 3803, -804, -804, 3128, 01995 -804, -804, -804, -804, -804, -804, 8834, 8834, 92, 5125, 01996 8947, 7817, 8156, 7147, -804, 6622, -804, -804, -804, 44, 01997 56, 182, 209, 544, 9060, 8834, -804, -9, -804, 845, 01998 -804, 130, -804, -804, 138, 266, 238, -804, 219, 9173, 01999 -804, 295, 2612, 398, 405, -804, 8947, 8947, -804, -804, 02000 6012, 9282, 9391, 9500, 6488, 30, 62, -804, -804, 316, 02001 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02002 564, 574, -804, 356, 634, -804, -804, -804, -804, -804, 02003 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02004 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02005 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02006 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02007 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02008 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02009 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02010 -804, -804, -804, -804, -804, 315, -804, -804, -804, -804, 02011 360, 8834, 402, 5264, 8834, 8834, 8834, 8834, -804, 388, 02012 2612, 430, -804, -804, 392, 422, 174, 185, 447, 291, 02013 408, -804, -804, -804, 5899, -804, 7478, 7478, -804, -804, 02014 6125, -804, 8947, 596, -804, 400, 420, 5403, -804, -804, 02015 -804, 423, 432, 138, -804, 546, 515, 720, 7591, -804, 02016 5125, 478, -9, -804, 845, -10, 487, -804, 130, -10, 02017 479, 180, 247, -804, 430, 491, 247, -804, -10, 582, 02018 577, 9609, 499, -804, 573, 578, 600, 654, -804, -804, 02019 -804, -804, -804, -804, 322, -804, 463, 486, 401, 532, 02020 504, 545, 55, 563, 518, 566, 63, 625, 650, -804, 02021 -804, -804, -804, -804, -804, -804, 6238, 8947, 8947, 8947, 02022 8947, 7591, 8947, 8947, -804, -804, -804, 608, -804, -804, 02023 -804, 8269, -804, 5125, 7256, 588, 8269, 8834, 8834, 8834, 02024 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 02025 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 8834, 02026 8834, 8834, 8834, 9888, 7478, 9965, 4482, 130, 116, 116, 02027 8947, 8947, -9, 707, 592, 678, -804, -804, 657, 711, 02028 65, 66, 69, 444, 571, 8947, 129, -804, 257, 670, 02029 -804, -804, -804, -804, 253, 334, 349, 370, 387, 458, 02030 477, 535, 539, -804, -804, -804, 30, -804, -804, 10042, 02031 -804, -804, 9060, 9060, -804, -804, 304, -804, -804, -804, 02032 8834, 8834, 7704, -804, -804, 10119, 7478, 10196, 8834, 8834, 02033 7930, -804, -10, 604, -804, -804, -10, -804, 603, 609, 02034 -804, 89, -804, -804, -804, -804, -804, 6888, -804, 8834, 02035 5534, 617, 10119, 10196, 8834, 845, 621, -10, -804, -804, 02036 6351, 618, -10, -804, -804, 8043, -804, -804, 8156, -804, 02037 -804, -804, 400, 692, -804, -804, -804, 619, 9609, 10273, 02038 7478, 10350, 1377, -804, -804, -804, -804, -804, -804, -804, 02039 -804, -804, -804, -804, -804, 283, -804, -804, 614, -804, 02040 -804, -804, 293, -804, 638, -804, 8834, 8834, -804, -804, 02041 -804, -804, -804, -804, -804, -804, -804, 29, 29, -804, 02042 -804, 29, 8834, -804, 649, 662, -804, -10, 9609, 674, 02043 -804, -804, -804, 691, 2023, -804, -804, 515, 2149, 2149, 02044 2149, 2149, 1118, 1118, 2550, 1796, 2149, 2149, 2837, 2837, 02045 524, 524, 10841, 1118, 1118, 1095, 1095, 1178, 52, 52, 02046 515, 515, 515, 4208, 3263, 4343, 3398, 432, 685, -804, 02047 -10, 722, -804, 732, -804, 432, 3938, 800, 804, -804, 02048 4621, 801, 4899, 70, 70, 707, 8382, 800, 85, 10427, 02049 7478, 10504, -804, 130, -804, 692, -804, -9, -804, -804, 02050 -804, 10581, 7478, 10042, 4482, 8947, 1481, -804, -804, -804, 02051 1147, -804, 2365, -804, 2612, 6888, 2484, -804, 8834, 430, 02052 -804, 408, 2858, 3533, -10, 328, 333, -804, -804, -804, 02053 -804, 7704, 7930, -804, -804, 8947, 2612, 700, -804, -804, 02054 -804, 2612, 5534, 364, -804, -804, 247, 9609, 619, 643, 02055 23, -10, 202, 323, 703, -804, -804, -804, -804, 8834, 02056 -804, 807, -804, -804, -804, -804, -804, 1551, 75, -804, 02057 -804, -804, -804, -804, 689, -804, 694, 780, 702, -804, 02058 717, 806, 733, 817, -804, -804, 789, -804, -804, -804, 02059 -804, -804, 515, 515, -804, 1086, 5673, -804, -804, 5403, 02060 29, 5673, 737, 8495, -804, 619, 9609, 9060, 8834, 726, 02061 9060, 9060, -804, 608, 432, 735, 747, 9060, 9060, -804, 02062 608, 432, -804, -804, 8608, 859, -804, 676, -804, 859, 02063 -804, -804, -804, -804, 800, 74, -804, 57, 61, -10, 02064 100, 108, 8947, -9, -804, 8947, 4482, 643, 23, -804, 02065 -10, 800, 89, 1551, 4482, -9, 7021, -804, 62, 266, 02066 -804, 8834, -804, -804, -804, 8834, 8834, 374, 8834, 8834, 02067 742, 89, -804, 749, -804, -804, 428, 8834, -804, -804, 02068 807, 708, -804, 744, -10, -804, -10, 5673, 5403, -804, 02069 1551, -804, 395, -804, -804, -804, 40, -804, 1551, -804, 02070 -804, 992, -804, -804, -804, -804, -804, -804, -804, -804, 02071 769, 9718, -804, -10, 773, 760, -804, 765, 702, -804, 02072 766, 771, -804, 764, 898, 778, 5403, 901, 8834, 781, 02073 619, 2612, 8834, -804, 2612, -804, 2612, -804, -804, -804, 02074 9060, -804, 2612, -804, 2612, -804, -804, 649, -804, 826, 02075 -804, 5012, 907, -804, 8947, 800, -804, 800, 5673, 5673, 02076 -804, 8721, 4760, 154, 70, -804, -9, 800, -804, -804, 02077 -804, -10, 800, -804, -804, -804, -804, 2612, 8834, 7930, 02078 -804, -804, -804, -10, 892, 784, 877, -804, 783, 912, 02079 792, -804, -804, 791, 802, -804, 702, -804, 809, -804, 02080 811, 809, 5786, 9718, 894, 697, 833, -804, 1627, -804, 02081 436, -804, -804, 1627, -804, 1699, -804, 883, -804, -804, 02082 821, -804, 819, 2612, -804, 2612, 9827, 116, -804, -804, 02083 5673, -804, -804, 116, -804, -804, 800, 800, -804, 289, 02084 -804, 4482, -804, -804, -804, -804, 1481, -804, 820, 892, 02085 743, -804, -804, -804, -804, 1551, -804, 992, -804, -804, 02086 992, -804, 992, -804, -804, 848, 697, -804, 10658, -804, 02087 -804, 823, 824, -804, 702, 825, -804, 829, 825, -804, 02088 277, -804, -804, -804, 904, -804, 706, 578, 600, 654, 02089 4482, -804, 4621, -804, -804, -804, -804, -804, 5673, 800, 02090 4482, 892, 820, 892, 834, 809, 836, 809, 809, -804, 02091 831, 837, 1627, -804, 1699, -804, -804, 1699, -804, 1699, 02092 -804, -804, 883, -804, 692, 10735, 7478, 10812, 804, 676, 02093 800, -804, 800, 820, 892, -804, 992, -804, -804, -804, 02094 825, 841, 825, 825, -804, 169, 23, -10, 139, 170, 02095 -804, -804, -804, -804, 820, 809, -804, 1699, -804, -804, 02096 -804, 241, -804, 825, -804 02097 }; 02098 02099 /* YYPGOTO[NTERM-NUM]. */ 02100 static const yytype_int16 yypgoto[] = 02101 { 02102 -804, -804, -804, -386, -804, 41, -804, -542, 285, -804, 02103 527, -804, 35, -804, -310, -43, -70, 19, -804, -187, 02104 -804, 680, 9, 887, -154, 27, -73, -804, -404, 6, 02105 1733, -328, 886, -52, -804, -24, -804, -804, 13, -804, 02106 1007, -804, 909, -804, -72, 271, -336, 141, 5, -804, 02107 -320, -212, 58, -313, -21, -804, -804, -804, -804, -804, 02108 -804, -804, -804, -804, -804, -804, -804, -804, -804, -804, 02109 -804, -804, 49, -804, -804, -804, -804, -804, -804, -804, 02110 -804, -804, -804, -520, -348, -519, -36, -634, -804, -803, 02111 -773, 214, 300, 37, -804, -405, -804, -653, -804, -18, 02112 -804, -804, -804, -804, -804, 246, -804, -804, -804, -804, 02113 -804, -804, -804, -95, -804, -804, -535, -804, -22, -804, 02114 -804, -804, -804, -804, -804, 908, -804, -804, -804, -804, 02115 714, -804, -804, -804, -804, -804, -804, -804, 940, -804, 02116 -116, -804, -804, -804, -804, -804, 2, -804, 7, -804, 02117 1388, 1539, 906, 1901, 1724, -804, -804, 73, -450, -410, 02118 -412, -769, -627, -718, -134, 228, 111, -804, -804, -804, 02119 -83, -721, -786, 114, 233, -804, -574, -804, -463, -579, 02120 -804, -804, -804, 102, -374, -804, -322, -804, 622, -29, 02121 -15, -221, -578, -243, -62, -11, -2 02122 }; 02123 02124 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 02125 positive, shift that token. If negative, reduce the rule which 02126 number is the opposite. If zero, do what YYDEFACT says. 02127 If YYTABLE_NINF, syntax error. */ 02128 #define YYTABLE_NINF -619 02129 static const yytype_int16 yytable[] = 02130 { 02131 116, 400, 316, 283, 234, 305, 325, 258, 421, 432, 02132 198, 572, 232, 526, 235, 199, 521, 359, 560, 459, 02133 362, 196, 659, 461, 775, 208, 208, 229, 305, 208, 02134 198, 558, 273, 566, 451, 199, 757, 69, 453, 69, 02135 724, 196, 394, 357, 357, 117, 617, 357, 586, 263, 02136 267, 84, 741, 84, 627, 723, 306, 726, 273, 272, 02137 660, 363, 882, 766, 638, 215, 215, 889, 196, 215, 02138 273, 273, 273, 941, 214, 214, 256, 600, 214, 317, 02139 614, 842, -106, 299, 617, 847, -108, 569, 314, 787, 02140 -102, -103, 610, 558, -110, 566, 447, 720, 84, 215, 02141 610, 938, 274, 689, 777, 684, 691, 196, -293, 261, 02142 -109, 811, 3, 215, 695, 397, 488, 966, 220, 220, 02143 327, 630, 220, 878, 494, -105, 312, 313, 274, 569, 02144 302, 231, 303, -107, 641, 215, 215, 654, 972, 215, 02145 368, 379, 379, 775, 875, 237, 659, 685, 247, 630, 02146 896, 853, -105, 262, 266, -293, -293, 212, 222, -597, 02147 655, 223, 858, 398, 314, 489, 992, 312, 313, 517, 02148 479, 316, 482, 495, 486, 350, 351, 352, 486, -104, 02149 882, 584, -106, -107, 289, 585, 778, 431, 941, 433, 02150 305, -97, 315, -596, 857, -99, 291, -597, 466, -93, 02151 -94, 618, 862, -101, 850, 620, 884, 659, 851, 302, 02152 623, 303, 414, 302, 890, 303, 966, 421, 414, -100, 02153 1023, 859, 812, 449, 889, 430, 633, -96, 901, 902, 02154 231, 635, 882, 208, -96, 208, 208, 500, 501, 502, 02155 503, 450, -98, 972, 729, 776, 763, 775, 617, 775, 02156 273, 1044, 84, 462, -104, 302, 740, 303, 587, 630, 02157 789, -517, 792, 739, 357, 357, 357, 357, 315, 505, 02158 506, 630, -518, 215, 227, 215, 215, 256, -105, 215, 02159 -105, 215, 214, 445, 214, 816, 84, -102, -95, 882, 02160 573, 574, 820, 659, 319, 985, 694, 84, -103, 84, 02161 305, 610, 610, 273, 841, -596, 576, 949, -106, -107, 02162 -106, -107, 775, 994, 455, -96, 590, 357, 357, 887, 02163 274, 456, 293, 887, 962, 924, 220, 925, 220, 967, 02164 519, 861, 583, 575, 251, 930, -96, 933, -509, -96, 02165 513, 69, 935, -96, 473, 522, 504, 499, -98, 295, 02166 256, 321, 430, 322, 473, 84, 215, 215, 215, 215, 02167 84, 215, 215, 208, 775, 422, 775, 425, 564, 678, 02168 215, 996, 84, 274, 588, 215, 678, 852, 419, 515, 02169 -104, 458, -104, 473, 515, 1006, -509, 521, 456, 989, 02170 474, 444, 475, 764, 986, 466, 302, 775, 303, 754, 02171 474, 838, 475, 215, -110, 84, 983, 984, 326, 215, 02172 215, 1012, 564, 624, 430, 758, 56, -109, 231, -508, 02173 759, 601, 603, 677, 215, 208, 414, 414, 1031, 474, 02174 564, 475, 476, 680, -510, 812, -98, 887, 116, 198, 02175 812, -105, 812, 402, 199, 466, -107, 273, 1022, 404, 02176 196, 215, 215, 649, -431, -511, 564, -98, 406, 1051, 02177 -98, 868, 473, 650, -98, 215, 481, -508, 430, 1021, 02178 -593, 230, -513, 946, 948, 69, 231, -74, 951, 208, 02179 953, 954, -510, -338, 564, 702, 659, -104, 251, 84, 02180 353, 653, 654, 709, 801, 617, 230, 273, -88, 84, 02181 1042, 410, 1043, -511, 650, 688, 688, 415, 474, 688, 02182 475, 722, 722, -431, 611, 655, 827, 274, 411, 215, 02183 -513, 860, 441, 835, 473, 734, 412, 699, 747, -503, 02184 -338, -338, 653, 654, 418, 251, 438, 354, 355, 812, 02185 870, 812, 420, -512, 812, 705, 812, 473, 754, 610, 02186 440, 805, 742, 877, 416, 417, 655, 636, -431, 224, 02187 -431, -431, -514, 703, 765, 473, 716, 274, 227, 980, 02188 474, 710, 475, 478, -593, 982, -503, -503, 430, 473, 02189 -593, 752, 761, 327, 812, 1025, 1027, 1028, 1029, 208, 02190 430, -512, 327, 474, 564, 475, 480, -594, 750, 705, 02191 -73, 208, 808, 297, 298, 749, 564, 198, 251, 414, 02192 -514, 474, 199, 475, 484, 448, 273, 454, 196, 84, 02193 -503, 84, 460, 466, -506, 474, 705, 475, 491, 215, 02194 116, 442, 828, 468, 725, 1052, 464, 465, 463, 747, 02195 934, 215, 483, 84, 215, 348, 349, 350, 351, 352, 02196 434, -517, 937, 865, 888, 487, -506, 891, 469, 435, 02197 436, -518, 854, -515, 784, 856, 784, 69, -503, -600, 02198 813, 855, -506, 490, 215, 273, 493, -102, 416, 443, 02199 1037, 84, 74, 863, 74, -516, 274, -103, 688, 357, 02200 844, 841, 357, 496, 864, 630, 74, 74, -93, 886, 02201 74, -594, 509, -506, -506, 470, 471, -594, -94, 750, 02202 -515, -515, 840, 843, 705, 843, 522, 843, 497, 823, 02203 825, 403, 520, 760, 576, 705, 831, 833, -600, 74, 02204 74, 498, -516, -516, 578, 84, 582, 621, 84, -284, 02205 84, 619, 579, 622, 74, 274, 215, -110, 628, 215, 02206 215, 632, -88, 637, 679, 591, 215, 215, 414, 196, 02207 769, 813, 645, 646, 647, 648, 74, 74, -101, 965, 02208 74, 968, 515, -600, 923, -600, -600, -294, 681, -596, 02209 273, 215, 958, -268, 215, 84, -284, -284, 813, 580, 02210 581, 1015, 722, 84, 932, 769, 693, 645, 646, 647, 02211 648, 357, 592, 593, 697, 784, 784, 444, 696, 707, 02212 712, 995, 714, 997, 718, 808, 767, 964, 998, 708, 02213 808, -422, 808, 780, -294, -294, 84, 84, 782, 592, 02214 593, 762, 785, -109, 830, -105, 786, 918, 1016, 1017, 02215 922, 822, 874, 795, 796, -107, 797, 904, 906, 914, 02216 895, 788, 44, 45, -100, 717, -96, 719, 790, 769, 02217 -104, 645, 646, 647, 648, 84, -98, 791, 1030, 793, 02218 1032, -269, 273, 829, 841, 1033, 869, 993, 876, 215, 02219 871, -95, 893, 74, 784, 307, 308, 309, 310, 311, 02220 84, 897, 1045, 215, 898, 273, 770, 84, 84, 900, 02221 903, 84, 771, 907, 74, 905, 74, 74, 908, 909, 02222 74, 911, 74, 1053, 916, -270, 920, 74, 939, 808, 02223 942, 808, 943, 944, 808, 945, 808, 843, 74, 769, 02224 74, 645, 646, 647, 648, 969, 947, 645, 646, 647, 02225 648, 84, 956, 950, 769, 952, 645, 646, 647, 648, 02226 957, 959, 973, -271, 991, 1013, 999, 1002, 1004, 1007, 02227 1014, 264, 784, 1009, 808, 976, 770, -596, 1024, 84, 02228 1026, 814, 940, -597, 815, 1047, 817, 634, 366, 383, 02229 84, 770, 836, 1041, 873, 802, 74, 74, 74, 74, 02230 74, 74, 74, 74, 1034, 866, 1040, 287, 1003, 1005, 02231 395, 74, 1008, 74, 1010, 1011, 74, 401, 492, 990, 02232 885, 963, 961, 883, 430, 0, 716, 843, 597, 0, 02233 0, 0, 705, 210, 210, 208, 0, 210, 0, 84, 02234 564, 84, 0, 0, 74, 0, 74, 84, 0, 84, 02235 74, 74, 0, 0, 769, 0, 645, 646, 647, 648, 02236 649, 0, 0, 244, 246, 74, 0, 0, 210, 210, 02237 650, 0, 879, 880, 0, 215, 0, 1046, 1048, 1049, 02238 1050, 300, 301, 0, 0, 0, 0, 0, 0, 0, 02239 0, 651, 74, 74, 0, 0, 0, 0, 653, 654, 02240 1054, 0, 0, 0, 0, 0, 74, 0, 0, 0, 02241 0, 910, 0, 0, 0, 0, 0, 0, 0, 0, 02242 405, 0, 655, 407, 408, 409, 0, 0, 0, 0, 02243 74, 0, 0, 0, 0, 0, 919, 0, 0, 0, 02244 74, 0, 0, 926, 927, 0, 0, 929, 800, 0, 02245 645, 646, 647, 648, 801, 0, 0, -618, 0, 0, 02246 74, 0, 0, 0, 650, -618, -618, -618, 0, 0, 02247 -618, -618, -618, 327, -618, 0, 0, 0, 0, 0, 02248 0, 0, 0, -618, -618, 651, 0, 955, 340, 341, 02249 0, 652, 653, 654, -618, -618, 327, -618, -618, -618, 02250 -618, -618, 0, 0, 0, 0, 0, 0, 0, 0, 02251 0, 340, 341, 0, 0, 981, 655, 0, 210, 656, 02252 0, 210, 210, 210, 300, 347, 348, 349, 350, 351, 02253 352, 0, 0, 0, 0, 0, 0, 231, 0, 0, 02254 514, 210, -618, 210, 210, 525, 345, 346, 347, 348, 02255 349, 350, 351, 352, 0, 0, 327, 0, 0, 0, 02256 74, 0, 74, 0, 0, -618, 0, 0, 0, 0, 02257 74, 340, 341, 0, 0, 1018, 0, 1019, 0, 0, 02258 0, 0, 74, 1020, 74, 74, 0, -618, -618, 0, 02259 -618, 0, 0, 227, -618, 0, -618, 0, -618, 0, 02260 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 02261 349, 350, 351, 352, 0, 74, 0, 0, 0, 0, 02262 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 02263 607, 609, 0, 0, 0, 0, 0, 0, 210, 264, 02264 0, 0, 0, 524, 527, 528, 529, 530, 531, 532, 02265 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 02266 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 02267 0, 210, 0, 0, 609, 0, 74, 264, 0, 74, 02268 0, 74, 0, 0, 0, 0, 0, 74, 0, 0, 02269 74, 74, 0, 0, 0, 0, 0, 74, 74, 0, 02270 110, 0, 110, 0, 0, 0, 0, 0, 0, 0, 02271 0, 0, 0, 0, 0, 0, 0, 0, 0, 602, 02272 604, 0, 74, 0, 0, 74, 74, 606, 210, 210, 02273 0, 692, 0, 210, 74, 602, 604, 210, 0, 644, 02274 0, 645, 646, 647, 648, 649, 0, 110, 0, 0, 02275 0, 275, 0, 0, 0, 650, 626, 0, 0, 0, 02276 0, 631, 0, 0, 0, 0, 0, 74, 74, 0, 02277 0, 0, 210, 0, 0, 210, 651, 275, 0, 0, 02278 0, 0, 652, 653, 654, 0, 0, 210, 0, 370, 02279 380, 380, 380, 0, 0, 525, 0, 0, 0, 0, 02280 0, 0, 0, 0, 0, 0, 74, 655, 0, 0, 02281 656, 0, 0, 682, 683, 0, 0, 0, 0, 0, 02282 74, 0, 0, 657, 0, 0, 0, 753, 0, 210, 02283 0, 74, 0, 0, 74, 0, 0, 0, 74, 74, 02284 609, 264, 74, 644, 0, 645, 646, 647, 648, 649, 02285 0, 111, 0, 111, 0, 0, 0, 0, 0, 650, 02286 0, 0, 0, 0, 0, 0, 0, 0, 768, 0, 02287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02288 651, 0, 74, 0, 0, 0, 652, 653, 654, 0, 02289 0, 0, 0, 210, 0, 0, 0, 210, 111, 0, 02290 0, 110, 276, 0, 0, 0, 0, 0, 0, 210, 02291 74, 655, 819, 644, 656, 645, 646, 647, 648, 649, 02292 0, 74, 0, 0, 0, 210, 0, 743, 276, 650, 02293 0, 0, 0, 837, 0, 110, 0, 0, 210, 210, 02294 371, 381, 381, 381, 0, 0, 110, 0, 110, 0, 02295 651, 0, 0, 0, 0, 0, 652, 653, 654, 0, 02296 0, 0, 0, 0, 0, 0, 210, 0, 0, 275, 02297 74, 0, 74, 0, 0, 0, 0, 0, 74, 0, 02298 74, 655, 0, 0, 656, 0, 872, 0, 0, 800, 02299 0, 645, 646, 647, 648, 801, 0, 0, 0, 0, 02300 0, 0, 0, 0, 110, 650, 74, 0, 0, 110, 02301 210, 0, 0, 0, 606, 821, 0, 824, 826, 0, 02302 0, 110, 275, 0, 832, 834, 651, 0, 0, 0, 02303 0, 210, 652, 653, 654, 0, 114, 912, 114, 0, 02304 0, 0, 0, 0, 0, 81, 0, 81, 0, 0, 02305 0, 0, 111, 0, 110, 0, 0, 655, 0, 0, 02306 656, 769, 0, 645, 646, 647, 648, 801, 867, 0, 02307 928, 0, 824, 826, 0, 832, 834, 650, 0, 0, 02308 0, 0, 0, 114, 210, 0, 111, 277, 264, 0, 02309 0, 0, 81, 0, 0, 0, 0, 111, 651, 111, 02310 0, 0, 0, 0, 0, 653, 654, 0, 0, 0, 02311 0, 0, 0, 277, 0, 0, 0, 0, 0, 0, 02312 276, 0, 0, 0, 0, 372, 382, 382, 0, 655, 02313 0, 0, 0, 0, 367, 210, 0, 0, 110, 913, 02314 0, 0, 0, 0, 0, 0, 0, 915, 110, 0, 02315 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 02316 111, 0, 0, 0, 0, 0, 275, 0, 210, 0, 02317 0, 0, 111, 276, 327, 328, 329, 330, 331, 332, 02318 333, 334, 0, 336, 337, 915, 210, 0, 0, 340, 02319 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02320 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 02321 0, 0, 0, 113, 0, 113, 275, 0, 0, 0, 02322 0, 0, 343, 344, 345, 346, 347, 348, 349, 350, 02323 351, 352, 0, 0, 0, 0, 0, 114, 0, 0, 02324 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 02325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02326 113, 0, 0, 0, 0, 0, 0, 0, 110, 0, 02327 110, 114, 0, 0, 0, 0, 0, 0, 0, 0, 02328 81, 0, 114, 0, 114, 0, 0, 0, 0, 111, 02329 0, 81, 110, 81, 0, 0, 0, 0, 0, 111, 02330 0, 0, 0, 0, 0, 277, 0, 0, 0, 0, 02331 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 02332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02333 110, 0, 0, 210, 0, 275, 0, 0, 0, 0, 02334 114, 0, 0, 0, 0, 114, 0, 0, 0, 81, 02335 0, 0, 0, 0, 81, 0, 0, 114, 277, 0, 02336 0, 0, 0, 0, 0, 0, 81, 276, 0, 523, 02337 0, 0, 0, 0, 0, 0, 0, 698, 0, 0, 02338 0, 0, 0, 0, 110, 0, 0, 110, 0, 110, 02339 114, 0, 0, 0, 275, 0, 0, 0, 0, 81, 02340 0, 327, 328, 329, 330, 331, 332, 333, 334, 335, 02341 336, 337, 338, 339, 113, 0, 340, 341, 0, 111, 02342 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 02343 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 02344 0, 0, 110, 111, 0, 0, 0, 342, 113, 343, 02345 344, 345, 346, 347, 348, 349, 350, 351, 352, 113, 02346 0, 113, 0, 0, 0, 0, 0, -245, 0, 0, 02347 0, 0, 0, 0, 114, 110, 110, 0, 0, 0, 02348 0, 111, 0, 81, 114, 0, 276, 0, 0, 0, 02349 0, 0, 0, 81, 0, 0, 0, 0, 0, 380, 02350 0, 0, 277, 0, 0, 0, 0, 0, 0, 0, 02351 0, 0, 0, 0, 110, 0, 0, 113, 0, 0, 02352 0, 0, 113, 0, 0, 0, 0, 327, -619, -619, 02353 -619, -619, 332, 333, 113, 111, -619, -619, 111, 110, 02354 111, 0, 340, 341, 0, 276, 110, 110, 0, 0, 02355 110, 0, 277, 0, 0, 0, 0, 0, 0, 0, 02356 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 02357 0, 0, 0, 0, 0, 343, 344, 345, 346, 347, 02358 348, 349, 350, 351, 352, 111, 0, 0, 0, 0, 02359 110, 380, 0, 111, 0, 0, 0, 0, 0, 0, 02360 0, 0, 0, 0, 114, 0, 114, 0, 0, 0, 02361 0, 0, 0, 81, 977, 81, 0, 0, 110, 0, 02362 0, 0, 0, 0, 0, 0, 111, 111, 114, 110, 02363 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 02364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02365 381, 113, 0, 0, 0, 0, 0, 0, 0, 0, 02366 0, 113, 0, 0, 0, 111, 114, 0, 0, 0, 02367 0, 277, 0, 0, 0, 81, 0, 0, 110, 0, 02368 110, 0, 0, 0, 0, 0, 110, 0, 110, 0, 02369 111, 0, 0, 0, 0, 0, 0, 111, 111, 0, 02370 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 02371 799, 0, 0, 0, 0, 0, 0, 0, 0, 751, 02372 114, 0, 0, 114, 0, 114, 0, 0, 0, 81, 02373 277, 0, 81, 0, 81, 0, 0, 0, 0, 0, 02374 523, 111, 381, 327, 328, 329, 330, 331, 332, 333, 02375 334, 335, 336, 337, 338, 339, 0, 0, 340, 341, 02376 0, 0, 0, 0, 0, 978, 0, 0, 0, 111, 02377 114, 0, 0, 0, 0, 0, 0, 0, 114, 81, 02378 111, 113, 0, 113, 0, 0, 0, 81, 0, 342, 02379 0, 343, 344, 345, 346, 347, 348, 349, 350, 351, 02380 352, 0, 0, 0, 0, 113, 0, 0, 0, 0, 02381 0, 114, 114, 0, 0, 0, 0, 0, 0, 0, 02382 81, 81, 0, 0, 0, 0, 0, 0, 0, 111, 02383 0, 111, 0, 0, 0, 382, 0, 111, 698, 111, 02384 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 02385 114, 0, 0, 0, 0, 0, 0, 0, 0, 81, 02386 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 02387 335, 336, 337, 338, 339, 114, 0, 340, 341, 0, 02388 0, 0, 114, 114, 81, 0, 114, 0, 0, 0, 02389 0, 81, 81, 0, 0, 81, 0, 113, 0, 0, 02390 113, 0, 113, 0, 0, 0, 0, 0, 342, 0, 02391 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 02392 0, 0, 0, 0, 0, 0, 114, 382, 327, 328, 02393 329, 330, 331, 332, 333, 81, 0, 336, 337, 0, 02394 0, 0, 0, 340, 341, 0, 0, 113, 0, 0, 02395 979, 0, 0, 0, 114, 113, 0, 0, 0, 975, 02396 0, 0, 0, 81, 0, 114, 0, 0, 0, 0, 02397 0, 0, 0, 0, 81, 0, 343, 344, 345, 346, 02398 347, 348, 349, 350, 351, 352, 0, 0, 113, 113, 02399 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 02400 337, 338, 339, 0, 0, 340, 341, 0, 0, 0, 02401 0, 0, 0, 0, 114, 0, 114, 0, 0, 0, 02402 0, 0, 114, 81, 114, 81, 0, 113, 0, 0, 02403 0, 81, 0, 81, 0, 0, 342, 0, 343, 344, 02404 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 02405 0, 0, 113, 0, 0, 0, 0, 0, 0, 113, 02406 113, -618, 4, 113, 5, 6, 7, 8, 9, 0, 02407 0, 0, 10, 11, 0, 0, 0, 12, 0, 13, 02408 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02409 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02410 27, 0, 0, 113, 0, 0, 28, 29, 30, 31, 02411 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02412 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02413 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 02414 0, 0, 113, 0, 0, 0, 0, 48, 0, 0, 02415 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02416 55, 56, 57, 58, 59, 60, 61, 62, -600, 0, 02417 0, 0, 0, 0, 0, 0, -600, -600, -600, 0, 02418 0, -600, -600, -600, 0, -600, 0, 63, 64, 65, 02419 0, 113, 0, 113, -600, -600, -600, -600, 0, 113, 02420 -618, 113, -618, 0, 0, -600, -600, 0, -600, -600, 02421 -600, -600, -600, 0, 0, 327, 328, 329, 330, 331, 02422 332, 333, 334, 335, 336, 337, -619, -619, 0, 0, 02423 340, 341, 0, 0, 0, 0, -600, -600, -600, -600, 02424 -600, -600, -600, -600, -600, -600, -600, -600, -600, 0, 02425 0, -600, -600, -600, 0, 755, -600, 0, 0, 0, 02426 0, 0, -600, 343, 344, 345, 346, 347, 348, 349, 02427 350, 351, 352, 0, 0, 0, -600, 0, 0, -600, 02428 0, -106, -600, -600, -600, -600, -600, -600, -600, -600, 02429 -600, -600, -600, -600, 0, 0, 0, 0, -600, -600, 02430 -600, -600, -600, -503, 0, -600, -600, -600, 0, -600, 02431 0, -503, -503, -503, 0, 0, -503, -503, -503, 0, 02432 -503, 0, 0, 0, 0, 0, 0, 0, -503, 0, 02433 -503, -503, -503, 0, 0, 0, 0, 0, 0, 0, 02434 -503, -503, 0, -503, -503, -503, -503, -503, 0, 0, 02435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02437 0, -503, -503, -503, -503, -503, -503, -503, -503, -503, 02438 -503, -503, -503, -503, 0, 0, -503, -503, -503, 0, 02439 -503, -503, 0, 0, 0, 0, 0, -503, 0, 0, 02440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02441 0, -503, 0, 0, -503, 0, -503, -503, -503, -503, 02442 -503, -503, -503, -503, -503, -503, -503, -503, -503, 0, 02443 0, 0, 0, 0, -503, -503, -503, -503, -506, 0, 02444 -503, -503, -503, 0, -503, 0, -506, -506, -506, 0, 02445 0, -506, -506, -506, 0, -506, 0, 0, 0, 0, 02446 0, 0, 0, -506, 0, -506, -506, -506, 0, 0, 02447 0, 0, 0, 0, 0, -506, -506, 0, -506, -506, 02448 -506, -506, -506, 0, 0, 0, 0, 0, 0, 0, 02449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02450 0, 0, 0, 0, 0, 0, -506, -506, -506, -506, 02451 -506, -506, -506, -506, -506, -506, -506, -506, -506, 0, 02452 0, -506, -506, -506, 0, -506, -506, 0, 0, 0, 02453 0, 0, -506, 0, 0, 0, 0, 0, 0, 0, 02454 0, 0, 0, 0, 0, 0, -506, 0, 0, -506, 02455 0, -506, -506, -506, -506, -506, -506, -506, -506, -506, 02456 -506, -506, -506, -506, 0, 0, 0, 0, 0, -506, 02457 -506, -506, -506, -601, 0, -506, -506, -506, 0, -506, 02458 0, -601, -601, -601, 0, 0, -601, -601, -601, 0, 02459 -601, 0, 0, 0, 0, 0, 0, 0, 0, -601, 02460 -601, -601, -601, 0, 0, 0, 0, 0, 0, 0, 02461 -601, -601, 0, -601, -601, -601, -601, -601, 0, 0, 02462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02464 0, -601, -601, -601, -601, -601, -601, -601, -601, -601, 02465 -601, -601, -601, -601, 0, 0, -601, -601, -601, 0, 02466 0, -601, 0, 0, 0, 0, 0, -601, 0, 0, 02467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02468 0, -601, 0, 0, -601, 0, 0, -601, -601, -601, 02469 -601, -601, -601, -601, -601, -601, -601, -601, -601, 0, 02470 0, 0, 0, -601, -601, -601, -601, -601, -602, 0, 02471 -601, -601, -601, 0, -601, 0, -602, -602, -602, 0, 02472 0, -602, -602, -602, 0, -602, 0, 0, 0, 0, 02473 0, 0, 0, 0, -602, -602, -602, -602, 0, 0, 02474 0, 0, 0, 0, 0, -602, -602, 0, -602, -602, 02475 -602, -602, -602, 0, 0, 0, 0, 0, 0, 0, 02476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02477 0, 0, 0, 0, 0, 0, -602, -602, -602, -602, 02478 -602, -602, -602, -602, -602, -602, -602, -602, -602, 0, 02479 0, -602, -602, -602, 0, 0, -602, 0, 0, 0, 02480 0, 0, -602, 0, 0, 0, 0, 0, 0, 0, 02481 0, 0, 0, 0, 0, 0, -602, 0, 0, -602, 02482 0, 0, -602, -602, -602, -602, -602, -602, -602, -602, 02483 -602, -602, -602, -602, 0, 0, 0, 0, -602, -602, 02484 -602, -602, -602, -293, 0, -602, -602, -602, 0, -602, 02485 0, -293, -293, -293, 0, 0, -293, -293, -293, 0, 02486 -293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02487 -293, -293, -293, 0, 0, 0, 0, 0, 0, 0, 02488 -293, -293, 0, -293, -293, -293, -293, -293, 0, 0, 02489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02491 0, -293, -293, -293, -293, -293, -293, -293, -293, -293, 02492 -293, -293, -293, -293, 0, 0, -293, -293, -293, 0, 02493 756, -293, 0, 0, 0, 0, 0, -293, 0, 0, 02494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02495 0, -293, 0, 0, -293, 0, -108, -293, -293, -293, 02496 -293, -293, -293, -293, -293, -293, -293, -293, -293, 0, 02497 0, 0, 0, 0, -293, -293, -293, -293, -430, 0, 02498 -293, -293, -293, 0, -293, 0, -430, -430, -430, 0, 02499 0, -430, -430, -430, 0, -430, 0, 0, 0, 0, 02500 0, 0, 0, 0, -430, -430, -430, 0, 0, 0, 02501 0, 0, 0, 0, 0, -430, -430, 0, -430, -430, 02502 -430, -430, -430, 0, 0, 0, 0, 0, 0, 0, 02503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02504 0, 0, 0, 0, 0, 0, -430, -430, -430, -430, 02505 -430, -430, -430, -430, -430, -430, -430, -430, -430, 0, 02506 0, -430, -430, -430, 0, 0, -430, 0, 0, 0, 02507 0, 0, -430, 0, 0, 0, 0, 0, 0, 0, 02508 0, 0, 0, 0, 0, 0, -430, 0, 0, 0, 02509 0, 0, -430, 0, -430, -430, -430, -430, -430, -430, 02510 -430, -430, -430, -430, 0, 0, 0, 0, -430, -430, 02511 -430, -430, -430, -285, 227, -430, -430, -430, 0, -430, 02512 0, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02513 -285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02514 -285, -285, -285, 0, 0, 0, 0, 0, 0, 0, 02515 -285, -285, 0, -285, -285, -285, -285, -285, 0, 0, 02516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02518 0, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02519 -285, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02520 0, -285, 0, 0, 0, 0, 0, -285, 0, 0, 02521 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02522 0, -285, 0, 0, -285, 0, 0, -285, -285, -285, 02523 -285, -285, -285, -285, -285, -285, -285, -285, -285, 0, 02524 0, 0, 0, 0, -285, -285, -285, -285, -420, 0, 02525 -285, -285, -285, 0, -285, 0, -420, -420, -420, 0, 02526 0, -420, -420, -420, 0, -420, 0, 0, 0, 0, 02527 0, 0, 0, 0, -420, -420, -420, 0, 0, 0, 02528 0, 0, 0, 0, 0, -420, -420, 0, -420, -420, 02529 -420, -420, -420, 0, 0, 0, 0, 0, 0, 0, 02530 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02531 0, 0, 0, 0, 0, 0, -420, -420, -420, -420, 02532 -420, -420, -420, -420, -420, -420, -420, -420, -420, 0, 02533 0, -420, -420, -420, 0, 0, -420, 0, 0, 0, 02534 0, 0, -420, 0, 0, 0, 0, 0, 0, 0, 02535 0, 0, 0, 0, 0, 0, -420, 0, 0, 0, 02536 0, 0, -420, 0, -420, -420, -420, -420, -420, -420, 02537 -420, -420, -420, -420, 0, 0, 0, 0, -420, -420, 02538 -420, -420, -420, -300, -420, -420, -420, -420, 0, -420, 02539 0, -300, -300, -300, 0, 0, -300, -300, -300, 0, 02540 -300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02541 -300, -300, 0, 0, 0, 0, 0, 0, 0, 0, 02542 -300, -300, 0, -300, -300, -300, -300, -300, 0, 0, 02543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02545 0, -300, -300, -300, -300, -300, -300, -300, -300, -300, 02546 -300, -300, -300, -300, 0, 0, -300, -300, -300, 0, 02547 0, -300, 0, 0, 0, 0, 0, -300, 0, 0, 02548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02549 0, -300, 0, 0, 0, 0, 0, -300, 0, -300, 02550 -300, -300, -300, -300, -300, -300, -300, -300, -300, 0, 02551 0, 0, 0, 0, -300, -300, -300, -300, -600, 224, 02552 -300, -300, -300, 0, -300, 0, -600, -600, -600, 0, 02553 0, 0, -600, -600, 0, -600, 0, 0, 0, 0, 02554 0, 0, 0, 0, -600, 0, 0, 0, 0, 0, 02555 0, 0, 0, 0, 0, -600, -600, 0, -600, -600, 02556 -600, -600, -600, 0, 0, 0, 0, 0, 0, 0, 02557 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02558 0, 0, 0, 0, 0, 0, -600, -600, -600, -600, 02559 -600, -600, -600, -600, -600, -600, -600, -600, -600, 0, 02560 0, -600, -600, -600, 0, 700, 0, 0, 0, 0, 02561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02562 0, 0, 0, 0, 0, 0, -600, 0, 0, 0, 02563 0, -106, -600, 0, -600, -600, -600, -600, -600, -600, 02564 -600, -600, -600, -600, 0, 0, 0, 0, -600, -600, 02565 -600, -600, -97, -293, 0, -600, 0, -600, 0, -600, 02566 0, -293, -293, -293, 0, 0, 0, -293, -293, 0, 02567 -293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02569 -293, -293, 0, -293, -293, -293, -293, -293, 0, 0, 02570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02571 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02572 0, -293, -293, -293, -293, -293, -293, -293, -293, -293, 02573 -293, -293, -293, -293, 0, 0, -293, -293, -293, 0, 02574 701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02575 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02576 0, -293, 0, 0, 0, 0, -108, -293, 0, -293, 02577 -293, -293, -293, -293, -293, -293, -293, -293, -293, 0, 02578 0, 0, 0, 0, -293, -293, -293, -99, 0, 0, 02579 -293, 0, -293, 248, -293, 5, 6, 7, 8, 9, 02580 -618, -618, -618, 10, 11, 0, 0, -618, 12, 0, 02581 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02582 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02583 0, 27, 0, 0, 0, 0, 0, 28, 29, 249, 02584 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02585 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02587 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02588 0, 49, 50, 0, 51, 52, 0, 53, 0, 0, 02589 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02591 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 02592 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02593 0, -618, 248, -618, 5, 6, 7, 8, 9, 0, 02594 0, -618, 10, 11, 0, -618, -618, 12, 0, 13, 02595 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02596 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02597 27, 0, 0, 0, 0, 0, 28, 29, 249, 31, 02598 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02599 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02601 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02602 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02603 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02605 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 02606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02607 -618, 248, -618, 5, 6, 7, 8, 9, 0, 0, 02608 -618, 10, 11, 0, 0, -618, 12, -618, 13, 14, 02609 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02610 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 02611 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 02612 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02613 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02614 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02615 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 02616 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 02617 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02618 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02619 0, 0, 0, 0, 0, 0, 63, 64, 65, 0, 02620 0, 0, 0, 0, 0, 0, 0, 0, 0, -618, 02621 248, -618, 5, 6, 7, 8, 9, 0, 0, -618, 02622 10, 11, 0, 0, -618, 12, 0, 13, 14, 15, 02623 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02624 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02625 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 02626 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02627 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02629 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02630 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02631 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02632 0, 0, 0, 248, 0, 5, 6, 7, 8, 9, 02633 0, -618, -618, 10, 11, 63, 64, 65, 12, 0, 02634 13, 14, 15, 16, 17, 18, 19, 0, -618, 0, 02635 -618, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02636 0, 27, 0, 0, 0, 0, 0, 28, 29, 249, 02637 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02638 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02640 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02641 0, 49, 50, 0, 51, 52, 0, 53, 0, 0, 02642 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02643 0, 0, 0, 0, 0, 0, 248, 0, 5, 6, 02644 7, 8, 9, 0, 0, 0, 10, 11, 63, 64, 02645 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02646 0, -618, 0, -618, 0, 20, 21, 22, 23, 24, 02647 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02648 28, 29, 249, 31, 32, 33, 34, 35, 36, 37, 02649 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02650 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02651 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02652 0, 48, 0, 0, 250, 50, 0, 51, 52, 0, 02653 53, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02654 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02655 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02656 0, 63, 64, 65, 0, 0, 0, 0, 0, 0, 02657 0, 0, -618, 0, -618, 248, -618, 5, 6, 7, 02658 8, 9, 0, 0, 0, 10, 11, 0, 0, 0, 02659 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02660 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02661 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02662 29, 249, 31, 32, 33, 34, 35, 36, 37, 38, 02663 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02664 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02666 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02667 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02668 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02669 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02670 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 02671 0, -618, 0, -618, 248, -618, 5, 6, 7, 8, 02672 9, 0, 0, 0, 10, 11, 0, 0, 0, 12, 02673 0, 13, 14, 15, 16, 17, 18, 19, 0, 0, 02674 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 02675 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, 02676 249, 31, 32, 33, 34, 35, 36, 37, 38, 39, 02677 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02678 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02679 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 02680 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, 02681 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02683 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 02684 64, 65, 0, 0, -618, 4, 0, 5, 6, 7, 02685 8, 9, -618, 0, -618, 10, 11, 0, 0, 0, 02686 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02687 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02688 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02689 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 02690 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02691 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02693 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02694 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02695 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02697 63, 64, 65, 0, 0, -618, 0, 0, 0, 0, 02698 0, 0, 0, -618, 248, -618, 5, 6, 7, 8, 02699 9, 0, 0, -618, 10, 11, 0, 0, 0, 12, 02700 0, 13, 14, 15, 16, 17, 18, 19, 0, 0, 02701 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 02702 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, 02703 249, 31, 32, 33, 34, 35, 36, 37, 38, 39, 02704 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02705 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02706 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 02707 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, 02708 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02709 0, 0, 0, 0, 0, 0, 0, 248, 0, 5, 02710 6, 7, 8, 9, 0, 0, 0, 10, 11, 63, 02711 64, 65, 12, 0, 13, 14, 15, 16, 17, 18, 02712 19, 0, -618, 0, -618, 0, 20, 21, 22, 23, 02713 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 02714 0, 28, 29, 249, 31, 32, 33, 34, 35, 36, 02715 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02716 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02717 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02718 0, 0, 48, 0, 0, 49, 50, 0, 51, 52, 02719 0, 53, 0, 0, 54, 55, 56, 57, 58, 59, 02720 60, 61, 62, 0, -618, 0, 0, 0, 0, 0, 02721 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02722 10, 11, 63, 64, 65, 12, 0, 13, 14, 15, 02723 16, 17, 18, 19, 0, -618, 0, -618, 0, 20, 02724 21, 22, 23, 24, 25, 26, 0, 0, 200, 0, 02725 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02726 34, 35, 36, 37, 38, 39, 40, 201, 41, 42, 02727 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02729 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 02730 0, 51, 52, 0, 204, 205, 206, 54, 55, 56, 02731 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02732 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02733 0, 0, 0, 10, 11, 63, 207, 65, 12, 0, 02734 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02735 231, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02736 0, 27, 0, 0, 0, 0, 0, 0, 29, 0, 02737 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02738 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02740 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 02741 0, 203, 50, 0, 51, 52, 0, 0, 0, 0, 02742 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02743 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02744 7, 0, 9, 0, 0, 0, 10, 11, 63, 64, 02745 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02746 0, 302, 0, 303, 0, 20, 21, 22, 23, 24, 02747 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02748 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02749 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02750 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02751 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02752 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 02753 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02754 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02755 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02756 11, 63, 64, 65, 12, 0, 13, 14, 15, 16, 02757 17, 18, 19, 0, 0, 0, 231, 0, 20, 21, 02758 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02759 0, 0, 0, 28, 29, 30, 31, 32, 33, 34, 02760 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02761 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02763 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02764 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02765 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02766 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, 02767 0, 0, 10, 11, 63, 64, 65, 12, 0, 13, 02768 14, 15, 16, 17, 18, 19, 0, 498, 0, 0, 02769 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02770 27, 0, 0, 0, 0, 0, 28, 29, 249, 31, 02771 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02772 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02774 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02775 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02776 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02778 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 02779 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02780 498, 118, 119, 120, 121, 122, 123, 124, 125, 126, 02781 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 02782 137, 138, 139, 140, 141, 0, 0, 0, 142, 143, 02783 144, 384, 385, 386, 387, 149, 150, 151, 0, 0, 02784 0, 0, 0, 152, 153, 154, 155, 388, 389, 390, 02785 391, 160, 37, 38, 392, 40, 0, 0, 0, 0, 02786 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 02787 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 02788 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 02789 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 02790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02791 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 02792 185, 186, 187, 188, 0, 189, 190, 0, 0, 0, 02793 0, 0, 0, 191, 393, 118, 119, 120, 121, 122, 02794 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02795 133, 134, 135, 136, 137, 138, 139, 140, 141, 0, 02796 0, 0, 142, 143, 144, 145, 146, 147, 148, 149, 02797 150, 151, 0, 0, 0, 0, 0, 152, 153, 154, 02798 155, 156, 157, 158, 159, 160, 280, 281, 161, 282, 02799 0, 0, 0, 0, 0, 0, 0, 0, 162, 163, 02800 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 02801 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 02802 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 02803 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02804 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 02805 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 02806 190, 0, 0, 0, 0, 0, 0, 191, 118, 119, 02807 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 02808 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 02809 140, 141, 0, 0, 0, 142, 143, 144, 145, 146, 02810 147, 148, 149, 150, 151, 0, 0, 0, 0, 0, 02811 152, 153, 154, 155, 156, 157, 158, 159, 160, 233, 02812 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 02813 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 02814 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 02815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02816 177, 178, 0, 0, 55, 0, 0, 0, 0, 0, 02817 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02818 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 02819 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 02820 191, 118, 119, 120, 121, 122, 123, 124, 125, 126, 02821 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 02822 137, 138, 139, 140, 141, 0, 0, 0, 142, 143, 02823 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, 02824 0, 0, 0, 152, 153, 154, 155, 156, 157, 158, 02825 159, 160, 0, 0, 161, 0, 0, 0, 0, 0, 02826 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 02827 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 02828 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 02829 0, 0, 0, 177, 178, 0, 0, 55, 0, 0, 02830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02831 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 02832 185, 186, 187, 188, 0, 189, 190, 0, 0, 0, 02833 0, 0, 0, 191, 118, 119, 120, 121, 122, 123, 02834 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 02835 134, 135, 136, 137, 138, 139, 140, 141, 0, 0, 02836 0, 142, 143, 144, 145, 146, 147, 148, 149, 150, 02837 151, 0, 0, 0, 0, 0, 152, 153, 154, 155, 02838 156, 157, 158, 159, 160, 0, 0, 161, 0, 0, 02839 0, 0, 0, 0, 0, 0, 0, 162, 163, 164, 02840 165, 166, 167, 168, 169, 170, 0, 0, 171, 172, 02841 0, 0, 173, 174, 175, 176, 0, 0, 0, 0, 02842 0, 0, 0, 0, 0, 0, 177, 178, 0, 0, 02843 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02844 0, 0, 0, 0, 0, 0, 0, 179, 180, 181, 02845 182, 183, 184, 185, 186, 187, 188, 0, 189, 190, 02846 5, 6, 7, 0, 9, 0, 191, 0, 10, 11, 02847 0, 0, 0, 12, 0, 13, 14, 15, 238, 239, 02848 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 02849 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 02850 0, 0, 0, 268, 0, 0, 32, 33, 34, 35, 02851 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02852 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 02853 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02854 0, 0, 0, 269, 0, 0, 203, 50, 0, 51, 02855 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 02856 59, 60, 61, 62, 0, 0, 0, 0, 0, 5, 02857 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02858 0, 0, 12, 270, 13, 14, 15, 238, 239, 18, 02859 19, 271, 0, 0, 0, 0, 240, 241, 242, 23, 02860 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 02861 0, 0, 268, 0, 0, 32, 33, 34, 35, 36, 02862 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02863 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02864 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02865 0, 0, 269, 0, 0, 203, 50, 0, 51, 52, 02866 0, 0, 0, 0, 54, 55, 56, 57, 58, 59, 02867 60, 61, 62, 0, 0, 0, 0, 0, 5, 6, 02868 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, 02869 0, 12, 270, 13, 14, 15, 16, 17, 18, 19, 02870 518, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02871 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02872 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 02873 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02874 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02876 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02877 53, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02878 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02879 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02880 11, 63, 64, 65, 12, 0, 13, 14, 15, 16, 02881 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02882 22, 23, 24, 25, 26, 0, 0, 200, 0, 0, 02883 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02884 35, 36, 37, 38, 39, 40, 201, 41, 42, 0, 02885 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02887 0, 0, 0, 0, 202, 0, 0, 203, 50, 0, 02888 51, 52, 0, 204, 205, 206, 54, 55, 56, 57, 02889 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02890 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, 02891 0, 0, 10, 11, 63, 207, 65, 12, 0, 13, 02892 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02893 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02894 27, 0, 0, 0, 0, 0, 28, 29, 0, 31, 02895 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02896 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02898 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02899 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02900 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02901 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02902 0, 9, 0, 0, 0, 10, 11, 63, 64, 65, 02903 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 02904 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 02905 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 02906 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02907 39, 40, 201, 41, 42, 0, 43, 44, 45, 0, 02908 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02910 202, 0, 0, 203, 50, 0, 51, 52, 0, 608, 02911 205, 206, 54, 55, 56, 57, 58, 59, 60, 61, 02912 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02913 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02914 63, 207, 65, 12, 0, 13, 14, 15, 238, 239, 02915 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 02916 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 02917 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02918 36, 37, 38, 39, 40, 201, 41, 42, 0, 43, 02919 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02921 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 02922 52, 0, 204, 205, 0, 54, 55, 56, 57, 58, 02923 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02924 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02925 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 02926 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 02927 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 02928 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02929 33, 34, 35, 36, 37, 38, 39, 40, 201, 41, 02930 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02931 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02932 0, 0, 0, 0, 0, 0, 202, 0, 0, 203, 02933 50, 0, 51, 52, 0, 0, 205, 206, 54, 55, 02934 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02935 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02936 9, 0, 0, 0, 10, 11, 63, 207, 65, 12, 02937 0, 13, 14, 15, 238, 239, 18, 19, 0, 0, 02938 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 02939 0, 0, 200, 0, 0, 0, 0, 0, 0, 29, 02940 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02941 40, 201, 41, 42, 0, 43, 44, 45, 0, 46, 02942 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02943 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 02944 0, 0, 203, 50, 0, 51, 52, 0, 608, 205, 02945 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02946 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02947 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 02948 207, 65, 12, 0, 13, 14, 15, 238, 239, 18, 02949 19, 0, 0, 0, 0, 0, 240, 241, 242, 23, 02950 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 02951 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02952 37, 38, 39, 40, 201, 41, 42, 0, 43, 44, 02953 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02954 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02955 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 02956 0, 0, 205, 0, 54, 55, 56, 57, 58, 59, 02957 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02958 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02959 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 02960 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02961 21, 22, 23, 24, 25, 26, 0, 0, 200, 0, 02962 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02963 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02964 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02966 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 02967 0, 51, 52, 0, 512, 0, 0, 54, 55, 56, 02968 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02969 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02970 0, 0, 0, 10, 11, 63, 207, 65, 12, 0, 02971 13, 14, 15, 238, 239, 18, 19, 0, 0, 0, 02972 0, 0, 240, 241, 242, 23, 24, 25, 26, 0, 02973 0, 200, 0, 0, 0, 0, 0, 0, 29, 0, 02974 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02975 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02977 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 02978 0, 203, 50, 0, 51, 52, 0, 204, 0, 0, 02979 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02980 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02981 7, 0, 9, 0, 0, 0, 10, 11, 63, 207, 02982 65, 12, 0, 13, 14, 15, 238, 239, 18, 19, 02983 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 02984 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 02985 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02986 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02987 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02989 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 02990 818, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02991 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02992 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02993 11, 63, 207, 65, 12, 0, 13, 14, 15, 238, 02994 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 02995 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 02996 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02997 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02998 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03000 0, 0, 0, 0, 202, 0, 0, 203, 50, 0, 03001 51, 52, 0, 512, 0, 0, 54, 55, 56, 57, 03002 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 03003 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 03004 0, 0, 10, 11, 63, 207, 65, 12, 0, 13, 03005 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 03006 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 03007 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 03008 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 03009 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 03010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03011 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 03012 203, 50, 0, 51, 52, 0, 608, 0, 0, 54, 03013 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 03014 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 03015 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 03016 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 03017 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 03018 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 03019 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 03020 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 03021 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 03022 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03023 202, 0, 0, 203, 50, 0, 51, 52, 0, 0, 03024 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 03025 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03026 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 03027 63, 207, 65, 12, 0, 13, 14, 15, 16, 17, 03028 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 03029 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 03030 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 03031 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 03032 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 03033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03034 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 03035 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 03036 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 03037 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 03038 0, 10, 11, 63, 64, 65, 12, 0, 13, 14, 03039 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 03040 20, 21, 22, 23, 24, 25, 26, 0, 0, 200, 03041 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 03042 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 03043 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 03044 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03045 0, 0, 0, 0, 0, 0, 202, 0, 0, 203, 03046 50, 0, 51, 52, 0, 0, 0, 0, 54, 55, 03047 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 03048 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 03049 9, 0, 0, 0, 10, 11, 63, 207, 65, 12, 03050 0, 13, 14, 15, 238, 239, 18, 19, 0, 0, 03051 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 03052 0, 0, 200, 0, 0, 0, 0, 0, 0, 268, 03053 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 03054 40, 0, 41, 42, 0, 43, 44, 45, 0, 0, 03055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03056 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 03057 0, 0, 323, 50, 0, 51, 52, 0, 324, 0, 03058 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 03059 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 03060 0, 0, 0, 10, 11, 0, 0, 0, 12, 270, 03061 13, 14, 15, 238, 239, 18, 19, 0, 0, 0, 03062 0, 0, 240, 241, 242, 23, 24, 25, 26, 0, 03063 0, 200, 0, 0, 0, 0, 0, 0, 268, 0, 03064 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 03065 0, 41, 42, 0, 43, 44, 45, 0, 0, 0, 03066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03067 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 03068 0, 49, 50, 0, 51, 52, 0, 53, 0, 0, 03069 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 03070 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 03071 0, 0, 10, 11, 0, 0, 0, 12, 270, 13, 03072 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 03073 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 03074 200, 0, 0, 0, 0, 0, 0, 268, 0, 0, 03075 32, 33, 34, 373, 36, 37, 38, 374, 40, 0, 03076 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 03077 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03078 0, 0, 0, 0, 375, 0, 0, 376, 0, 0, 03079 203, 50, 0, 51, 52, 0, 0, 0, 0, 54, 03080 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 03081 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 03082 0, 10, 11, 0, 0, 0, 12, 270, 13, 14, 03083 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 03084 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 03085 0, 0, 0, 0, 0, 0, 268, 0, 0, 32, 03086 33, 34, 373, 36, 37, 38, 374, 40, 0, 41, 03087 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 03088 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03089 0, 0, 0, 0, 0, 0, 376, 0, 0, 203, 03090 50, 0, 51, 52, 0, 0, 0, 0, 54, 55, 03091 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 03092 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 03093 10, 11, 0, 0, 0, 12, 270, 13, 14, 15, 03094 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 03095 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 03096 0, 0, 0, 0, 0, 268, 0, 0, 32, 33, 03097 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 03098 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 03099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03100 0, 0, 0, 0, 0, 269, 0, 0, 323, 50, 03101 0, 51, 52, 0, 0, 0, 0, 54, 55, 56, 03102 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 03103 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 03104 11, 0, 0, 0, 12, 270, 13, 14, 15, 238, 03105 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 03106 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 03107 0, 0, 0, 0, 268, 0, 0, 32, 33, 34, 03108 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 03109 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 03110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03111 0, 0, 0, 0, 894, 0, 0, 203, 50, 0, 03112 51, 52, 0, 0, 0, 0, 54, 55, 56, 57, 03113 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 03114 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 03115 0, 0, 0, 12, 270, 13, 14, 15, 238, 239, 03116 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 03117 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 03118 0, 0, 0, 268, 0, 0, 32, 33, 34, 35, 03119 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 03120 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 03121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03122 0, 0, 0, 974, 0, 0, 203, 50, 0, 51, 03123 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 03124 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 03125 553, 554, 0, 0, 555, 0, 0, 0, 0, 0, 03126 0, 0, 0, 270, 162, 163, 164, 165, 166, 167, 03127 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 03128 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 03129 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 03130 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03131 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 03132 185, 186, 187, 188, 0, 189, 190, 561, 562, 0, 03133 0, 563, 0, 191, 0, 0, 0, 0, 0, 0, 03134 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 03135 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 03136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03137 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 03138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03139 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 03140 188, 0, 189, 190, 598, 562, 0, 0, 599, 0, 03141 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 03142 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 03143 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 03144 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 03145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03146 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 03147 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 03148 190, 612, 554, 0, 0, 613, 0, 191, 0, 0, 03149 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 03150 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 03151 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 03152 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 03153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03154 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 03155 184, 185, 186, 187, 188, 0, 189, 190, 615, 562, 03156 0, 0, 616, 0, 191, 0, 0, 0, 0, 0, 03157 0, 0, 162, 163, 164, 165, 166, 167, 168, 169, 03158 170, 0, 0, 171, 172, 0, 0, 173, 174, 175, 03159 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03160 0, 177, 178, 0, 0, 0, 0, 0, 0, 0, 03161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03162 0, 0, 179, 180, 181, 182, 183, 184, 185, 186, 03163 187, 188, 0, 189, 190, 639, 554, 0, 0, 640, 03164 0, 191, 0, 0, 0, 0, 0, 0, 0, 162, 03165 163, 164, 165, 166, 167, 168, 169, 170, 0, 0, 03166 171, 172, 0, 0, 173, 174, 175, 176, 0, 0, 03167 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 03168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03169 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 03170 180, 181, 182, 183, 184, 185, 186, 187, 188, 0, 03171 189, 190, 642, 562, 0, 0, 643, 0, 191, 0, 03172 0, 0, 0, 0, 0, 0, 162, 163, 164, 165, 03173 166, 167, 168, 169, 170, 0, 0, 171, 172, 0, 03174 0, 173, 174, 175, 176, 0, 0, 0, 0, 0, 03175 0, 0, 0, 0, 0, 177, 178, 0, 0, 0, 03176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03177 0, 0, 0, 0, 0, 0, 179, 180, 181, 182, 03178 183, 184, 185, 186, 187, 188, 0, 189, 190, 727, 03179 554, 0, 0, 728, 0, 191, 0, 0, 0, 0, 03180 0, 0, 0, 162, 163, 164, 165, 166, 167, 168, 03181 169, 170, 0, 0, 171, 172, 0, 0, 173, 174, 03182 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 03183 0, 0, 177, 178, 0, 0, 0, 0, 0, 0, 03184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03185 0, 0, 0, 179, 180, 181, 182, 183, 184, 185, 03186 186, 187, 188, 0, 189, 190, 730, 562, 0, 0, 03187 731, 0, 191, 0, 0, 0, 0, 0, 0, 0, 03188 162, 163, 164, 165, 166, 167, 168, 169, 170, 0, 03189 0, 171, 172, 0, 0, 173, 174, 175, 176, 0, 03190 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 03191 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03193 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 03194 0, 189, 190, 737, 554, 0, 0, 738, 0, 191, 03195 0, 0, 0, 0, 0, 0, 0, 162, 163, 164, 03196 165, 166, 167, 168, 169, 170, 0, 0, 171, 172, 03197 0, 0, 173, 174, 175, 176, 0, 0, 0, 0, 03198 0, 0, 0, 0, 0, 0, 177, 178, 0, 0, 03199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03200 0, 0, 0, 0, 0, 0, 0, 179, 180, 181, 03201 182, 183, 184, 185, 186, 187, 188, 0, 189, 190, 03202 1000, 554, 0, 0, 1001, 0, 191, 0, 0, 0, 03203 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 03204 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 03205 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 03206 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 03207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03208 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 03209 185, 186, 187, 188, 0, 189, 190, 1035, 554, 0, 03210 0, 1036, 0, 191, 0, 0, 0, 0, 0, 0, 03211 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 03212 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 03213 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03214 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 03215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03216 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 03217 188, 0, 189, 190, 1038, 562, 0, 0, 1039, 0, 03218 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 03219 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 03220 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 03221 0, 0, 0, 0, 0, 0, 0, 177, 178, 327, 03222 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 03223 338, 339, 0, 0, 340, 341, 0, 0, 179, 180, 03224 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 03225 190, 0, 0, 0, 0, 0, 0, 191, 0, 0, 03226 0, 0, 0, 0, 0, 342, 0, 343, 344, 345, 03227 346, 347, 348, 349, 350, 351, 352, 0, 0, 0, 03228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03229 0, 0, 231 03230 }; 03231 03232 static const yytype_int16 yycheck[] = 03233 { 03234 2, 96, 74, 55, 28, 67, 79, 50, 220, 230, 03235 8, 359, 27, 326, 29, 8, 326, 87, 354, 262, 03236 90, 8, 472, 266, 651, 16, 17, 22, 90, 20, 03237 28, 353, 53, 355, 255, 28, 614, 2, 259, 4, 03238 575, 28, 94, 86, 87, 4, 420, 90, 376, 51, 03239 52, 2, 594, 4, 440, 574, 67, 577, 79, 53, 03240 472, 90, 780, 641, 468, 16, 17, 788, 55, 20, 03241 91, 92, 93, 876, 16, 17, 49, 399, 20, 74, 03242 416, 715, 25, 64, 458, 719, 25, 13, 26, 668, 03243 25, 25, 412, 415, 25, 417, 250, 27, 49, 50, 03244 420, 874, 53, 508, 29, 76, 511, 94, 85, 51, 03245 25, 685, 0, 64, 518, 85, 61, 903, 16, 17, 03246 68, 443, 20, 776, 61, 25, 37, 38, 79, 13, 03247 139, 141, 141, 25, 470, 86, 87, 97, 907, 90, 03248 91, 92, 93, 770, 771, 130, 596, 118, 56, 471, 03249 803, 729, 13, 51, 52, 132, 133, 16, 17, 136, 03250 120, 20, 740, 133, 26, 110, 939, 37, 38, 323, 03251 286, 243, 288, 110, 290, 123, 124, 125, 294, 25, 03252 898, 52, 13, 13, 140, 56, 111, 230, 991, 232, 03253 252, 134, 130, 136, 736, 134, 140, 136, 271, 134, 03254 134, 422, 744, 134, 724, 426, 780, 657, 134, 139, 03255 431, 141, 214, 139, 788, 141, 1002, 429, 220, 134, 03256 993, 741, 685, 252, 945, 227, 447, 25, 807, 808, 03257 141, 452, 950, 224, 134, 226, 227, 307, 308, 309, 03258 310, 252, 134, 1012, 580, 657, 632, 874, 622, 876, 03259 271, 1024, 203, 268, 13, 139, 592, 141, 1, 581, 03260 670, 87, 672, 591, 307, 308, 309, 310, 130, 312, 03261 313, 593, 87, 224, 136, 226, 227, 250, 139, 230, 03262 141, 232, 224, 248, 226, 690, 237, 113, 134, 1007, 03263 360, 361, 696, 743, 28, 929, 517, 248, 113, 250, 03264 362, 621, 622, 324, 15, 136, 17, 886, 139, 139, 03265 141, 141, 939, 940, 134, 113, 378, 360, 361, 782, 03266 271, 141, 140, 786, 898, 845, 224, 847, 226, 903, 03267 324, 743, 375, 362, 49, 854, 134, 857, 85, 137, 03268 321, 306, 862, 141, 61, 326, 311, 306, 25, 140, 03269 323, 113, 354, 134, 61, 306, 307, 308, 309, 310, 03270 311, 312, 313, 354, 991, 224, 993, 226, 355, 485, 03271 321, 945, 323, 324, 117, 326, 492, 725, 87, 321, 03272 139, 134, 141, 61, 326, 964, 133, 697, 141, 931, 03273 107, 87, 109, 636, 929, 468, 139, 1024, 141, 611, 03274 107, 714, 109, 354, 113, 356, 926, 927, 113, 360, 03275 361, 134, 399, 437, 416, 87, 100, 113, 141, 85, 03276 87, 402, 403, 140, 375, 416, 428, 429, 1002, 107, 03277 417, 109, 110, 140, 85, 898, 113, 900, 440, 437, 03278 903, 113, 905, 87, 437, 518, 113, 468, 990, 134, 03279 437, 402, 403, 58, 26, 85, 443, 134, 56, 1037, 03280 137, 87, 61, 68, 141, 416, 65, 133, 470, 989, 03281 26, 136, 85, 883, 884, 440, 141, 113, 888, 470, 03282 890, 891, 133, 85, 471, 557, 936, 113, 203, 440, 03283 85, 96, 97, 565, 58, 869, 136, 518, 134, 450, 03284 1020, 113, 1022, 133, 68, 507, 508, 85, 107, 511, 03285 109, 573, 574, 85, 412, 120, 703, 468, 88, 470, 03286 133, 742, 237, 710, 61, 587, 134, 542, 600, 85, 03287 132, 133, 96, 97, 87, 250, 136, 132, 133, 1002, 03288 761, 1004, 134, 85, 1007, 560, 1009, 61, 760, 869, 03289 130, 685, 595, 774, 132, 133, 120, 455, 130, 136, 03290 132, 133, 85, 558, 637, 61, 568, 518, 136, 917, 03291 107, 566, 109, 110, 130, 923, 132, 133, 580, 61, 03292 136, 605, 625, 68, 1047, 995, 996, 997, 998, 580, 03293 592, 133, 68, 107, 581, 109, 110, 26, 600, 614, 03294 113, 592, 685, 59, 60, 600, 593, 605, 323, 611, 03295 133, 107, 605, 109, 110, 137, 637, 138, 605, 570, 03296 85, 572, 131, 696, 85, 107, 641, 109, 110, 580, 03297 632, 85, 704, 134, 576, 1045, 59, 60, 56, 711, 03298 861, 592, 110, 594, 595, 121, 122, 123, 124, 125, 03299 54, 87, 873, 748, 788, 110, 85, 791, 85, 63, 03300 64, 87, 732, 85, 666, 735, 668, 632, 133, 26, 03301 685, 733, 133, 110, 625, 696, 110, 113, 132, 133, 03302 1016, 632, 2, 745, 4, 85, 637, 113, 690, 732, 03303 14, 15, 735, 68, 746, 1017, 16, 17, 134, 782, 03304 20, 130, 94, 132, 133, 132, 133, 136, 134, 711, 03305 132, 133, 714, 715, 729, 717, 697, 719, 68, 700, 03306 701, 87, 134, 621, 17, 740, 707, 708, 85, 49, 03307 50, 139, 132, 133, 56, 686, 25, 134, 689, 85, 03308 691, 137, 85, 134, 64, 696, 697, 113, 131, 700, 03309 701, 130, 134, 134, 140, 85, 707, 708, 760, 746, 03310 52, 776, 54, 55, 56, 57, 86, 87, 134, 903, 03311 90, 905, 714, 130, 844, 132, 133, 85, 140, 136, 03312 801, 732, 85, 134, 735, 736, 132, 133, 803, 132, 03313 133, 85, 854, 744, 856, 52, 134, 54, 55, 56, 03314 57, 844, 132, 133, 113, 807, 808, 87, 134, 87, 03315 10, 945, 8, 947, 13, 898, 113, 900, 952, 87, 03316 903, 136, 905, 134, 132, 133, 777, 778, 134, 132, 03317 133, 131, 52, 113, 87, 113, 134, 839, 132, 133, 03318 842, 115, 134, 54, 55, 113, 57, 810, 811, 830, 03319 801, 134, 63, 64, 134, 570, 134, 572, 52, 52, 03320 113, 54, 55, 56, 57, 816, 134, 134, 1002, 52, 03321 1004, 134, 893, 138, 15, 1009, 134, 134, 134, 830, 03322 131, 134, 113, 203, 886, 40, 41, 42, 43, 44, 03323 841, 118, 1026, 844, 134, 916, 89, 848, 849, 134, 03324 134, 852, 95, 139, 224, 134, 226, 227, 10, 131, 03325 230, 10, 232, 1047, 88, 134, 9, 237, 134, 1002, 03326 137, 1004, 10, 131, 1007, 134, 1009, 929, 248, 52, 03327 250, 54, 55, 56, 57, 52, 134, 54, 55, 56, 03328 57, 892, 893, 134, 52, 134, 54, 55, 56, 57, 03329 56, 118, 131, 134, 134, 970, 108, 134, 134, 134, 03330 56, 52, 964, 134, 1047, 916, 89, 136, 134, 920, 03331 134, 686, 95, 136, 689, 134, 691, 450, 91, 93, 03332 931, 89, 711, 1019, 770, 685, 306, 307, 308, 309, 03333 310, 311, 312, 313, 1012, 749, 1018, 57, 961, 962, 03334 94, 321, 965, 323, 967, 968, 326, 99, 294, 936, 03335 782, 900, 898, 780, 1016, -1, 1018, 1019, 396, -1, 03336 -1, -1, 1037, 16, 17, 1016, -1, 20, -1, 980, 03337 1017, 982, -1, -1, 354, -1, 356, 988, -1, 990, 03338 360, 361, -1, -1, 52, -1, 54, 55, 56, 57, 03339 58, -1, -1, 46, 47, 375, -1, -1, 51, 52, 03340 68, -1, 777, 778, -1, 1016, -1, 1030, 1031, 1032, 03341 1033, 64, 65, -1, -1, -1, -1, -1, -1, -1, 03342 -1, 89, 402, 403, -1, -1, -1, -1, 96, 97, 03343 1053, -1, -1, -1, -1, -1, 416, -1, -1, -1, 03344 -1, 816, -1, -1, -1, -1, -1, -1, -1, -1, 03345 201, -1, 120, 204, 205, 206, -1, -1, -1, -1, 03346 440, -1, -1, -1, -1, -1, 841, -1, -1, -1, 03347 450, -1, -1, 848, 849, -1, -1, 852, 52, -1, 03348 54, 55, 56, 57, 58, -1, -1, 0, -1, -1, 03349 470, -1, -1, -1, 68, 8, 9, 10, -1, -1, 03350 13, 14, 15, 68, 17, -1, -1, -1, -1, -1, 03351 -1, -1, -1, 26, 27, 89, -1, 892, 83, 84, 03352 -1, 95, 96, 97, 37, 38, 68, 40, 41, 42, 03353 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, 03354 -1, 83, 84, -1, -1, 920, 120, -1, 201, 123, 03355 -1, 204, 205, 206, 207, 120, 121, 122, 123, 124, 03356 125, -1, -1, -1, -1, -1, -1, 141, -1, -1, 03357 321, 224, 85, 226, 227, 326, 118, 119, 120, 121, 03358 122, 123, 124, 125, -1, -1, 68, -1, -1, -1, 03359 570, -1, 572, -1, -1, 108, -1, -1, -1, -1, 03360 580, 83, 84, -1, -1, 980, -1, 982, -1, -1, 03361 -1, -1, 592, 988, 594, 595, -1, 130, 131, -1, 03362 133, -1, -1, 136, 137, -1, 139, -1, 141, -1, 03363 -1, -1, -1, -1, -1, -1, -1, -1, -1, 121, 03364 122, 123, 124, 125, -1, 625, -1, -1, -1, -1, 03365 -1, -1, 632, -1, -1, -1, -1, -1, -1, -1, 03366 411, 412, -1, -1, -1, -1, -1, -1, 321, 420, 03367 -1, -1, -1, 326, 327, 328, 329, 330, 331, 332, 03368 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 03369 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 03370 -1, 354, -1, -1, 455, -1, 686, 458, -1, 689, 03371 -1, 691, -1, -1, -1, -1, -1, 697, -1, -1, 03372 700, 701, -1, -1, -1, -1, -1, 707, 708, -1, 03373 2, -1, 4, -1, -1, -1, -1, -1, -1, -1, 03374 -1, -1, -1, -1, -1, -1, -1, -1, -1, 402, 03375 403, -1, 732, -1, -1, 735, 736, 410, 411, 412, 03376 -1, 512, -1, 416, 744, 418, 419, 420, -1, 52, 03377 -1, 54, 55, 56, 57, 58, -1, 49, -1, -1, 03378 -1, 53, -1, -1, -1, 68, 439, -1, -1, -1, 03379 -1, 444, -1, -1, -1, -1, -1, 777, 778, -1, 03380 -1, -1, 455, -1, -1, 458, 89, 79, -1, -1, 03381 -1, -1, 95, 96, 97, -1, -1, 470, -1, 91, 03382 92, 93, 94, -1, -1, 576, -1, -1, -1, -1, 03383 -1, -1, -1, -1, -1, -1, 816, 120, -1, -1, 03384 123, -1, -1, 496, 497, -1, -1, -1, -1, -1, 03385 830, -1, -1, 136, -1, -1, -1, 608, -1, 512, 03386 -1, 841, -1, -1, 844, -1, -1, -1, 848, 849, 03387 621, 622, 852, 52, -1, 54, 55, 56, 57, 58, 03388 -1, 2, -1, 4, -1, -1, -1, -1, -1, 68, 03389 -1, -1, -1, -1, -1, -1, -1, -1, 649, -1, 03390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03391 89, -1, 892, -1, -1, -1, 95, 96, 97, -1, 03392 -1, -1, -1, 576, -1, -1, -1, 580, 49, -1, 03393 -1, 203, 53, -1, -1, -1, -1, -1, -1, 592, 03394 920, 120, 693, 52, 123, 54, 55, 56, 57, 58, 03395 -1, 931, -1, -1, -1, 608, -1, 136, 79, 68, 03396 -1, -1, -1, 714, -1, 237, -1, -1, 621, 622, 03397 91, 92, 93, 94, -1, -1, 248, -1, 250, -1, 03398 89, -1, -1, -1, -1, -1, 95, 96, 97, -1, 03399 -1, -1, -1, -1, -1, -1, 649, -1, -1, 271, 03400 980, -1, 982, -1, -1, -1, -1, -1, 988, -1, 03401 990, 120, -1, -1, 123, -1, 767, -1, -1, 52, 03402 -1, 54, 55, 56, 57, 58, -1, -1, -1, -1, 03403 -1, -1, -1, -1, 306, 68, 1016, -1, -1, 311, 03404 693, -1, -1, -1, 697, 698, -1, 700, 701, -1, 03405 -1, 323, 324, -1, 707, 708, 89, -1, -1, -1, 03406 -1, 714, 95, 96, 97, -1, 2, 818, 4, -1, 03407 -1, -1, -1, -1, -1, 2, -1, 4, -1, -1, 03408 -1, -1, 203, -1, 356, -1, -1, 120, -1, -1, 03409 123, 52, -1, 54, 55, 56, 57, 58, 751, -1, 03410 851, -1, 755, 756, -1, 758, 759, 68, -1, -1, 03411 -1, -1, -1, 49, 767, -1, 237, 53, 869, -1, 03412 -1, -1, 49, -1, -1, -1, -1, 248, 89, 250, 03413 -1, -1, -1, -1, -1, 96, 97, -1, -1, -1, 03414 -1, -1, -1, 79, -1, -1, -1, -1, -1, -1, 03415 271, -1, -1, -1, -1, 91, 92, 93, -1, 120, 03416 -1, -1, -1, -1, 91, 818, -1, -1, 440, 822, 03417 -1, -1, -1, -1, -1, -1, -1, 830, 450, -1, 03418 -1, -1, -1, -1, -1, 306, -1, -1, -1, -1, 03419 311, -1, -1, -1, -1, -1, 468, -1, 851, -1, 03420 -1, -1, 323, 324, 68, 69, 70, 71, 72, 73, 03421 74, 75, -1, 77, 78, 868, 869, -1, -1, 83, 03422 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03423 -1, -1, -1, -1, -1, 356, -1, -1, -1, -1, 03424 -1, -1, -1, 2, -1, 4, 518, -1, -1, -1, 03425 -1, -1, 116, 117, 118, 119, 120, 121, 122, 123, 03426 124, 125, -1, -1, -1, -1, -1, 203, -1, -1, 03427 -1, -1, -1, -1, -1, -1, 203, -1, -1, -1, 03428 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03429 49, -1, -1, -1, -1, -1, -1, -1, 570, -1, 03430 572, 237, -1, -1, -1, -1, -1, -1, -1, -1, 03431 237, -1, 248, -1, 250, -1, -1, -1, -1, 440, 03432 -1, 248, 594, 250, -1, -1, -1, -1, -1, 450, 03433 -1, -1, -1, -1, -1, 271, -1, -1, -1, -1, 03434 -1, -1, -1, -1, -1, -1, -1, 468, -1, -1, 03435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03436 632, -1, -1, 1016, -1, 637, -1, -1, -1, -1, 03437 306, -1, -1, -1, -1, 311, -1, -1, -1, 306, 03438 -1, -1, -1, -1, 311, -1, -1, 323, 324, -1, 03439 -1, -1, -1, -1, -1, -1, 323, 518, -1, 326, 03440 -1, -1, -1, -1, -1, -1, -1, 44, -1, -1, 03441 -1, -1, -1, -1, 686, -1, -1, 689, -1, 691, 03442 356, -1, -1, -1, 696, -1, -1, -1, -1, 356, 03443 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03444 77, 78, 79, 80, 203, -1, 83, 84, -1, 570, 03445 -1, 572, -1, -1, -1, -1, -1, -1, -1, -1, 03446 -1, -1, -1, -1, 736, -1, -1, -1, -1, -1, 03447 -1, -1, 744, 594, -1, -1, -1, 114, 237, 116, 03448 117, 118, 119, 120, 121, 122, 123, 124, 125, 248, 03449 -1, 250, -1, -1, -1, -1, -1, 134, -1, -1, 03450 -1, -1, -1, -1, 440, 777, 778, -1, -1, -1, 03451 -1, 632, -1, 440, 450, -1, 637, -1, -1, -1, 03452 -1, -1, -1, 450, -1, -1, -1, -1, -1, 801, 03453 -1, -1, 468, -1, -1, -1, -1, -1, -1, -1, 03454 -1, -1, -1, -1, 816, -1, -1, 306, -1, -1, 03455 -1, -1, 311, -1, -1, -1, -1, 68, 69, 70, 03456 71, 72, 73, 74, 323, 686, 77, 78, 689, 841, 03457 691, -1, 83, 84, -1, 696, 848, 849, -1, -1, 03458 852, -1, 518, -1, -1, -1, -1, -1, -1, -1, 03459 -1, -1, -1, -1, -1, -1, -1, 356, -1, -1, 03460 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 03461 121, 122, 123, 124, 125, 736, -1, -1, -1, -1, 03462 892, 893, -1, 744, -1, -1, -1, -1, -1, -1, 03463 -1, -1, -1, -1, 570, -1, 572, -1, -1, -1, 03464 -1, -1, -1, 570, 916, 572, -1, -1, 920, -1, 03465 -1, -1, -1, -1, -1, -1, 777, 778, 594, 931, 03466 -1, -1, -1, -1, -1, -1, -1, 594, -1, -1, 03467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03468 801, 440, -1, -1, -1, -1, -1, -1, -1, -1, 03469 -1, 450, -1, -1, -1, 816, 632, -1, -1, -1, 03470 -1, 637, -1, -1, -1, 632, -1, -1, 980, -1, 03471 982, -1, -1, -1, -1, -1, 988, -1, 990, -1, 03472 841, -1, -1, -1, -1, -1, -1, 848, 849, -1, 03473 -1, 852, -1, -1, -1, -1, -1, -1, -1, -1, 03474 676, -1, -1, -1, -1, -1, -1, -1, -1, 44, 03475 686, -1, -1, 689, -1, 691, -1, -1, -1, 686, 03476 696, -1, 689, -1, 691, -1, -1, -1, -1, -1, 03477 697, 892, 893, 68, 69, 70, 71, 72, 73, 74, 03478 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03479 -1, -1, -1, -1, -1, 916, -1, -1, -1, 920, 03480 736, -1, -1, -1, -1, -1, -1, -1, 744, 736, 03481 931, 570, -1, 572, -1, -1, -1, 744, -1, 114, 03482 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03483 125, -1, -1, -1, -1, 594, -1, -1, -1, -1, 03484 -1, 777, 778, -1, -1, -1, -1, -1, -1, -1, 03485 777, 778, -1, -1, -1, -1, -1, -1, -1, 980, 03486 -1, 982, -1, -1, -1, 801, -1, 988, 44, 990, 03487 -1, -1, -1, 632, -1, -1, -1, -1, -1, -1, 03488 816, -1, -1, -1, -1, -1, -1, -1, -1, 816, 03489 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03490 76, 77, 78, 79, 80, 841, -1, 83, 84, -1, 03491 -1, -1, 848, 849, 841, -1, 852, -1, -1, -1, 03492 -1, 848, 849, -1, -1, 852, -1, 686, -1, -1, 03493 689, -1, 691, -1, -1, -1, -1, -1, 114, -1, 03494 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 03495 -1, -1, -1, -1, -1, -1, 892, 893, 68, 69, 03496 70, 71, 72, 73, 74, 892, -1, 77, 78, -1, 03497 -1, -1, -1, 83, 84, -1, -1, 736, -1, -1, 03498 916, -1, -1, -1, 920, 744, -1, -1, -1, 916, 03499 -1, -1, -1, 920, -1, 931, -1, -1, -1, -1, 03500 -1, -1, -1, -1, 931, -1, 116, 117, 118, 119, 03501 120, 121, 122, 123, 124, 125, -1, -1, 777, 778, 03502 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 03503 78, 79, 80, -1, -1, 83, 84, -1, -1, -1, 03504 -1, -1, -1, -1, 980, -1, 982, -1, -1, -1, 03505 -1, -1, 988, 980, 990, 982, -1, 816, -1, -1, 03506 -1, 988, -1, 990, -1, -1, 114, -1, 116, 117, 03507 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 03508 -1, -1, 841, -1, -1, -1, -1, -1, -1, 848, 03509 849, 0, 1, 852, 3, 4, 5, 6, 7, -1, 03510 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18, 03511 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03512 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03513 39, -1, -1, 892, -1, -1, 45, 46, 47, 48, 03514 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03515 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03516 -1, 920, -1, -1, -1, -1, -1, -1, -1, -1, 03517 -1, -1, 931, -1, -1, -1, -1, 86, -1, -1, 03518 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03519 99, 100, 101, 102, 103, 104, 105, 106, 0, -1, 03520 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1, 03521 -1, 13, 14, 15, -1, 17, -1, 126, 127, 128, 03522 -1, 980, -1, 982, 26, 27, 28, 29, -1, 988, 03523 139, 990, 141, -1, -1, 37, 38, -1, 40, 41, 03524 42, 43, 44, -1, -1, 68, 69, 70, 71, 72, 03525 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03526 83, 84, -1, -1, -1, -1, 68, 69, 70, 71, 03527 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03528 -1, 83, 84, 85, -1, 87, 88, -1, -1, -1, 03529 -1, -1, 94, 116, 117, 118, 119, 120, 121, 122, 03530 123, 124, 125, -1, -1, -1, 108, -1, -1, 111, 03531 -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03532 122, 123, 124, 125, -1, -1, -1, -1, 130, 131, 03533 132, 133, 134, 0, -1, 137, 138, 139, -1, 141, 03534 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03535 17, -1, -1, -1, -1, -1, -1, -1, 25, -1, 03536 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03537 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03540 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03541 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03542 87, 88, -1, -1, -1, -1, -1, 94, -1, -1, 03543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03544 -1, 108, -1, -1, 111, -1, 113, 114, 115, 116, 03545 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 03546 -1, -1, -1, -1, 131, 132, 133, 134, 0, -1, 03547 137, 138, 139, -1, 141, -1, 8, 9, 10, -1, 03548 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1, 03549 -1, -1, -1, 25, -1, 27, 28, 29, -1, -1, 03550 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03551 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03552 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03553 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03554 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03555 -1, 83, 84, 85, -1, 87, 88, -1, -1, -1, 03556 -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, 03557 -1, -1, -1, -1, -1, -1, 108, -1, -1, 111, 03558 -1, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03559 122, 123, 124, 125, -1, -1, -1, -1, -1, 131, 03560 132, 133, 134, 0, -1, 137, 138, 139, -1, 141, 03561 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03562 17, -1, -1, -1, -1, -1, -1, -1, -1, 26, 03563 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03564 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03567 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03568 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03569 -1, 88, -1, -1, -1, -1, -1, 94, -1, -1, 03570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03571 -1, 108, -1, -1, 111, -1, -1, 114, 115, 116, 03572 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 03573 -1, -1, -1, 130, 131, 132, 133, 134, 0, -1, 03574 137, 138, 139, -1, 141, -1, 8, 9, 10, -1, 03575 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1, 03576 -1, -1, -1, -1, 26, 27, 28, 29, -1, -1, 03577 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03578 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03579 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03580 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03581 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03582 -1, 83, 84, 85, -1, -1, 88, -1, -1, -1, 03583 -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, 03584 -1, -1, -1, -1, -1, -1, 108, -1, -1, 111, 03585 -1, -1, 114, 115, 116, 117, 118, 119, 120, 121, 03586 122, 123, 124, 125, -1, -1, -1, -1, 130, 131, 03587 132, 133, 134, 0, -1, 137, 138, 139, -1, 141, 03588 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03589 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03590 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03591 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03592 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03594 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03595 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03596 87, 88, -1, -1, -1, -1, -1, 94, -1, -1, 03597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03598 -1, 108, -1, -1, 111, -1, 113, 114, 115, 116, 03599 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 03600 -1, -1, -1, -1, 131, 132, 133, 134, 0, -1, 03601 137, 138, 139, -1, 141, -1, 8, 9, 10, -1, 03602 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1, 03603 -1, -1, -1, -1, 26, 27, 28, -1, -1, -1, 03604 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03605 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03607 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03608 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03609 -1, 83, 84, 85, -1, -1, 88, -1, -1, -1, 03610 -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, 03611 -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, 03612 -1, -1, 114, -1, 116, 117, 118, 119, 120, 121, 03613 122, 123, 124, 125, -1, -1, -1, -1, 130, 131, 03614 132, 133, 134, 0, 136, 137, 138, 139, -1, 141, 03615 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03616 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03617 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03618 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03621 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03622 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03623 -1, 88, -1, -1, -1, -1, -1, 94, -1, -1, 03624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03625 -1, 108, -1, -1, 111, -1, -1, 114, 115, 116, 03626 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 03627 -1, -1, -1, -1, 131, 132, 133, 134, 0, -1, 03628 137, 138, 139, -1, 141, -1, 8, 9, 10, -1, 03629 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1, 03630 -1, -1, -1, -1, 26, 27, 28, -1, -1, -1, 03631 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03632 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03634 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03635 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03636 -1, 83, 84, 85, -1, -1, 88, -1, -1, -1, 03637 -1, -1, 94, -1, -1, -1, -1, -1, -1, -1, 03638 -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, 03639 -1, -1, 114, -1, 116, 117, 118, 119, 120, 121, 03640 122, 123, 124, 125, -1, -1, -1, -1, 130, 131, 03641 132, 133, 134, 0, 136, 137, 138, 139, -1, 141, 03642 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03643 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03644 27, 28, -1, -1, -1, -1, -1, -1, -1, -1, 03645 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03646 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03648 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03649 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03650 -1, 88, -1, -1, -1, -1, -1, 94, -1, -1, 03651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03652 -1, 108, -1, -1, -1, -1, -1, 114, -1, 116, 03653 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 03654 -1, -1, -1, -1, 131, 132, 133, 134, 0, 136, 03655 137, 138, 139, -1, 141, -1, 8, 9, 10, -1, 03656 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1, 03657 -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, 03658 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03659 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03661 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03662 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03663 -1, 83, 84, 85, -1, 87, -1, -1, -1, -1, 03664 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03665 -1, -1, -1, -1, -1, -1, 108, -1, -1, -1, 03666 -1, 113, 114, -1, 116, 117, 118, 119, 120, 121, 03667 122, 123, 124, 125, -1, -1, -1, -1, 130, 131, 03668 132, 133, 134, 0, -1, 137, -1, 139, -1, 141, 03669 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1, 03670 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03671 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03672 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03673 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03674 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03675 -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03676 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03677 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03679 -1, 108, -1, -1, -1, -1, 113, 114, -1, 116, 03680 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 03681 -1, -1, -1, -1, 131, 132, 133, 134, -1, -1, 03682 137, -1, 139, 1, 141, 3, 4, 5, 6, 7, 03683 8, 9, 10, 11, 12, -1, -1, 15, 16, -1, 03684 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03685 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03686 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03687 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03688 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03689 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03690 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03691 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 03692 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03694 -1, -1, -1, -1, -1, -1, -1, -1, 126, 127, 03695 128, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03696 -1, 139, 1, 141, 3, 4, 5, 6, 7, -1, 03697 -1, 10, 11, 12, -1, 14, 15, 16, -1, 18, 03698 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03699 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03700 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03701 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03702 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03704 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03705 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03706 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03708 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 03709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03710 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 03711 10, 11, 12, -1, -1, 15, 16, 17, 18, 19, 03712 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03713 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03714 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 03715 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03716 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03717 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03718 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03719 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 03720 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03721 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03722 -1, -1, -1, -1, -1, -1, 126, 127, 128, -1, 03723 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139, 03724 1, 141, 3, 4, 5, 6, 7, -1, -1, 10, 03725 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03726 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03727 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03728 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03729 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03730 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03732 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03733 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 03734 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03735 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03736 -1, 9, 10, 11, 12, 126, 127, 128, 16, -1, 03737 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 03738 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03739 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03740 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03741 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03742 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03743 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03744 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 03745 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03746 -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 03747 5, 6, 7, -1, -1, -1, 11, 12, 126, 127, 03748 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03749 -1, 139, -1, 141, -1, 30, 31, 32, 33, 34, 03750 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03751 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03752 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03753 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03755 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03756 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 03757 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03758 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03759 -1, 126, 127, 128, -1, -1, -1, -1, -1, -1, 03760 -1, -1, 137, -1, 139, 1, 141, 3, 4, 5, 03761 6, 7, -1, -1, -1, 11, 12, -1, -1, -1, 03762 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03763 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03764 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03765 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 03766 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03767 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03769 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03770 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 03771 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03772 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03773 126, 127, 128, -1, -1, -1, -1, -1, -1, -1, 03774 -1, 137, -1, 139, 1, 141, 3, 4, 5, 6, 03775 7, -1, -1, -1, 11, 12, -1, -1, -1, 16, 03776 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03777 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03778 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, 03779 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 03780 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03781 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03782 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03783 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03784 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03785 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03786 -1, -1, -1, -1, -1, -1, -1, -1, -1, 126, 03787 127, 128, -1, -1, 131, 1, -1, 3, 4, 5, 03788 6, 7, 139, -1, 141, 11, 12, -1, -1, -1, 03789 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03790 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03791 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03792 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 03793 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03794 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03795 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03796 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03797 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 03798 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03800 126, 127, 128, -1, -1, 131, -1, -1, -1, -1, 03801 -1, -1, -1, 139, 1, 141, 3, 4, 5, 6, 03802 7, -1, -1, 10, 11, 12, -1, -1, -1, 16, 03803 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03804 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03805 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, 03806 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 03807 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03808 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03809 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03810 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03811 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03812 -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 03813 4, 5, 6, 7, -1, -1, -1, 11, 12, 126, 03814 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 03815 24, -1, 139, -1, 141, -1, 30, 31, 32, 33, 03816 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03817 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03818 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03819 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03821 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03822 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 03823 104, 105, 106, -1, 108, -1, -1, -1, -1, -1, 03824 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03825 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 03826 21, 22, 23, 24, -1, 139, -1, 141, -1, 30, 03827 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03828 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03829 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03830 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03832 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03833 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03834 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03835 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03836 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 03837 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03838 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03839 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03840 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03841 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03842 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03843 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03844 -1, 89, 90, -1, 92, 93, -1, -1, -1, -1, 03845 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03846 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03847 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 03848 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03849 -1, 139, -1, 141, -1, 30, 31, 32, 33, 34, 03850 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03851 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03852 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03853 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03855 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03856 -1, -1, -1, 98, 99, 100, 101, 102, 103, 104, 03857 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03858 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03859 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 03860 22, 23, 24, -1, -1, -1, 141, -1, 30, 31, 03861 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03862 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03863 52, 53, 54, 55, 56, 57, -1, 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, -1, 98, 99, 100, 101, 03868 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03869 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 03870 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 03871 19, 20, 21, 22, 23, 24, -1, 139, -1, -1, 03872 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03873 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03874 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03875 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03877 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03878 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03879 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03881 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 03882 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03883 139, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03884 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03885 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03886 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03887 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03888 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, 03889 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03890 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03891 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03892 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 03893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03894 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 03895 122, 123, 124, 125, -1, 127, 128, -1, -1, -1, 03896 -1, -1, -1, 135, 136, 3, 4, 5, 6, 7, 03897 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 03898 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, 03899 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 03900 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03901 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03902 -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 03903 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03904 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 03905 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 03906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03907 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 03908 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 03909 128, -1, -1, -1, -1, -1, -1, 135, 3, 4, 03910 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03911 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03912 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03913 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03914 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03915 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03916 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03917 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03918 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03919 95, 96, -1, -1, 99, -1, -1, -1, -1, -1, 03920 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03921 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03922 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 03923 135, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03924 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03925 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03926 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03927 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03928 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 03929 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03930 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03931 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03932 -1, -1, -1, 95, 96, -1, -1, 99, -1, -1, 03933 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03934 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 03935 122, 123, 124, 125, -1, 127, 128, -1, -1, -1, 03936 -1, -1, -1, 135, 3, 4, 5, 6, 7, 8, 03937 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 03938 19, 20, 21, 22, 23, 24, 25, 26, -1, -1, 03939 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 03940 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03941 49, 50, 51, 52, 53, -1, -1, 56, -1, -1, 03942 -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 03943 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 03944 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 03945 -1, -1, -1, -1, -1, -1, 95, 96, -1, -1, 03946 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03947 -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 03948 119, 120, 121, 122, 123, 124, 125, -1, 127, 128, 03949 3, 4, 5, -1, 7, -1, 135, -1, 11, 12, 03950 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, 03951 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03952 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03953 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03954 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03955 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, 03956 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03957 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03958 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 03959 103, 104, 105, 106, -1, -1, -1, -1, -1, 3, 03960 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03961 -1, -1, 16, 126, 18, 19, 20, 21, 22, 23, 03962 24, 134, -1, -1, -1, -1, 30, 31, 32, 33, 03963 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03964 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03965 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03966 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03968 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03969 -1, -1, -1, -1, 98, 99, 100, 101, 102, 103, 03970 104, 105, 106, -1, -1, -1, -1, -1, 3, 4, 03971 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, 03972 -1, 16, 126, 18, 19, 20, 21, 22, 23, 24, 03973 134, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03974 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03975 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03976 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03977 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03979 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03980 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 03981 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03982 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03983 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 03984 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03985 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03986 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03987 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 03988 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03989 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03990 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03991 92, 93, -1, 95, 96, 97, 98, 99, 100, 101, 03992 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03993 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 03994 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 03995 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03996 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03997 39, -1, -1, -1, -1, -1, 45, 46, -1, 48, 03998 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03999 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 04000 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04001 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04002 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 04003 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 04004 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 04005 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 04006 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 04007 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 04008 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 04009 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 04010 56, 57, 58, 59, 60, -1, 62, 63, 64, -1, 04011 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 04012 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04013 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 04014 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 04015 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04016 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04017 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 04018 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04019 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04020 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04021 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 04022 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 04023 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04024 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04025 93, -1, 95, 96, -1, 98, 99, 100, 101, 102, 04026 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 04027 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 04028 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 04029 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 04030 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 04031 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 04032 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 04033 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 04034 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04035 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 04036 90, -1, 92, 93, -1, -1, 96, 97, 98, 99, 04037 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 04038 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 04039 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 04040 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 04041 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 04042 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 04043 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 04044 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 04045 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04046 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 04047 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96, 04048 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 04049 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 04050 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 04051 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 04052 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04053 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04054 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04055 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 04056 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 04057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04058 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04059 -1, -1, 96, -1, 98, 99, 100, 101, 102, 103, 04060 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 04061 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 04062 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 04063 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 04064 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 04065 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 04066 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 04067 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 04068 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04069 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 04070 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 04071 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 04072 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 04073 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 04074 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 04075 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 04076 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 04077 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 04078 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 04079 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04080 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 04081 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 04082 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 04083 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 04084 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 04085 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 04086 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 04087 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 04088 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 04089 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 04090 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 04091 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04092 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 04093 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 04094 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 04095 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 04096 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 04097 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 04098 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 04099 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 04100 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 04101 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 04102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04103 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 04104 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 04105 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 04106 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04107 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 04108 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04109 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04110 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04111 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04112 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 04113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04114 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04115 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 04116 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 04117 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 04118 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 04119 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 04120 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 04121 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 04122 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 04123 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 04124 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 04125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04126 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 04127 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 04128 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04129 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04130 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 04131 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04132 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04133 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04134 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 04135 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 04136 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04137 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04138 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 04139 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 04140 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 04141 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 04142 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 04143 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 04144 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 04145 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 04146 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 04147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04148 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 04149 90, -1, 92, 93, -1, -1, -1, -1, 98, 99, 04150 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 04151 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 04152 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 04153 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 04154 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 04155 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 04156 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 04157 57, -1, 59, 60, -1, 62, 63, 64, -1, -1, 04158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04159 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 04160 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 04161 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 04162 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 04163 -1, -1, -1, 11, 12, -1, -1, -1, 16, 126, 04164 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 04165 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 04166 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 04167 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 04168 -1, 59, 60, -1, 62, 63, 64, -1, -1, -1, 04169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04170 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 04171 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 04172 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 04173 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04174 -1, -1, 11, 12, -1, -1, -1, 16, 126, 18, 04175 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04176 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04177 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04178 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04179 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04181 -1, -1, -1, -1, 83, -1, -1, 86, -1, -1, 04182 89, 90, -1, 92, 93, -1, -1, -1, -1, 98, 04183 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 04184 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 04185 -1, 11, 12, -1, -1, -1, 16, 126, 18, 19, 04186 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 04187 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 04188 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 04189 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 04190 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 04191 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04192 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 04193 90, -1, 92, 93, -1, -1, -1, -1, 98, 99, 04194 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 04195 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 04196 11, 12, -1, -1, -1, 16, 126, 18, 19, 20, 04197 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 04198 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 04199 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 04200 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 04201 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 04202 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04203 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 04204 -1, 92, 93, -1, -1, -1, -1, 98, 99, 100, 04205 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 04206 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 04207 12, -1, -1, -1, 16, 126, 18, 19, 20, 21, 04208 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 04209 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 04210 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 04211 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 04212 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 04213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04214 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 04215 92, 93, -1, -1, -1, -1, 98, 99, 100, 101, 04216 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 04217 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04218 -1, -1, -1, 16, 126, 18, 19, 20, 21, 22, 04219 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04220 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04221 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04222 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 04223 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, 04224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04225 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04226 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 04227 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 04228 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04229 -1, -1, -1, 126, 66, 67, 68, 69, 70, 71, 04230 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04231 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04232 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 04233 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04234 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 04235 122, 123, 124, 125, -1, 127, 128, 52, 53, -1, 04236 -1, 56, -1, 135, -1, -1, -1, -1, -1, -1, 04237 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04238 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04240 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 04241 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04242 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 04243 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 04244 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 04245 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04246 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04247 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 04248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04249 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 04250 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 04251 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 04252 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 04253 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04254 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04255 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 04256 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04257 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 04258 121, 122, 123, 124, 125, -1, 127, 128, 52, 53, 04259 -1, -1, 56, -1, 135, -1, -1, -1, -1, -1, 04260 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 04261 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04262 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04263 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 04264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04265 -1, -1, 116, 117, 118, 119, 120, 121, 122, 123, 04266 124, 125, -1, 127, 128, 52, 53, -1, -1, 56, 04267 -1, 135, -1, -1, -1, -1, -1, -1, -1, 66, 04268 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04269 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04270 -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 04271 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04272 -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, 04273 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 04274 127, 128, 52, 53, -1, -1, 56, -1, 135, -1, 04275 -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, 04276 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04277 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04278 -1, -1, -1, -1, -1, 95, 96, -1, -1, -1, 04279 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04280 -1, -1, -1, -1, -1, -1, 116, 117, 118, 119, 04281 120, 121, 122, 123, 124, 125, -1, 127, 128, 52, 04282 53, -1, -1, 56, -1, 135, -1, -1, -1, -1, 04283 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 04284 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04285 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04286 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, 04287 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04288 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 04289 123, 124, 125, -1, 127, 128, 52, 53, -1, -1, 04290 56, -1, 135, -1, -1, -1, -1, -1, -1, -1, 04291 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04292 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04293 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04294 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04295 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04296 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 04297 -1, 127, 128, 52, 53, -1, -1, 56, -1, 135, 04298 -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 04299 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04300 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04301 -1, -1, -1, -1, -1, -1, 95, 96, -1, -1, 04302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04303 -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 04304 119, 120, 121, 122, 123, 124, 125, -1, 127, 128, 04305 52, 53, -1, -1, 56, -1, 135, -1, -1, -1, 04306 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 04307 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04308 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04309 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 04310 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04311 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 04312 122, 123, 124, 125, -1, 127, 128, 52, 53, -1, 04313 -1, 56, -1, 135, -1, -1, -1, -1, -1, -1, 04314 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04315 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04316 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04317 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 04318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04319 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 04320 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 04321 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 04322 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04323 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04324 -1, -1, -1, -1, -1, -1, -1, 95, 96, 68, 04325 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 04326 79, 80, -1, -1, 83, 84, -1, -1, 116, 117, 04327 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 04328 128, -1, -1, -1, -1, -1, -1, 135, -1, -1, 04329 -1, -1, -1, -1, -1, 114, -1, 116, 117, 118, 04330 119, 120, 121, 122, 123, 124, 125, -1, -1, -1, 04331 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04332 -1, -1, 141 04333 }; 04334 04335 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04336 symbol of state STATE-NUM. */ 04337 static const yytype_uint16 yystos[] = 04338 { 04339 0, 143, 144, 0, 1, 3, 4, 5, 6, 7, 04340 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04341 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04342 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04343 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04344 90, 92, 93, 95, 98, 99, 100, 101, 102, 103, 04345 104, 105, 106, 126, 127, 128, 145, 146, 147, 154, 04346 156, 157, 159, 160, 163, 164, 165, 167, 168, 169, 04347 171, 172, 182, 196, 214, 215, 216, 217, 218, 219, 04348 220, 221, 222, 223, 224, 249, 250, 264, 265, 266, 04349 267, 268, 269, 270, 273, 275, 276, 288, 290, 291, 04350 292, 293, 294, 295, 296, 327, 338, 147, 3, 4, 04351 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 04352 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 04353 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 04354 38, 39, 45, 46, 47, 48, 49, 50, 51, 52, 04355 53, 56, 66, 67, 68, 69, 70, 71, 72, 73, 04356 74, 77, 78, 81, 82, 83, 84, 95, 96, 116, 04357 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 04358 128, 135, 175, 176, 177, 178, 180, 181, 288, 290, 04359 39, 58, 86, 89, 95, 96, 97, 127, 164, 172, 04360 182, 184, 189, 192, 194, 214, 292, 293, 295, 296, 04361 325, 326, 189, 189, 136, 190, 191, 136, 186, 190, 04362 136, 141, 332, 54, 177, 332, 148, 130, 21, 22, 04363 30, 31, 32, 163, 182, 214, 182, 56, 1, 47, 04364 89, 150, 151, 152, 154, 166, 167, 338, 157, 198, 04365 185, 194, 325, 338, 184, 324, 325, 338, 46, 86, 04366 126, 134, 171, 196, 214, 292, 293, 296, 242, 243, 04367 54, 55, 57, 175, 280, 289, 279, 280, 281, 140, 04368 271, 140, 277, 140, 274, 140, 278, 59, 60, 159, 04369 182, 182, 139, 141, 331, 336, 337, 40, 41, 42, 04370 43, 44, 37, 38, 26, 130, 186, 190, 255, 28, 04371 247, 113, 134, 89, 95, 168, 113, 68, 69, 70, 04372 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 04373 83, 84, 114, 116, 117, 118, 119, 120, 121, 122, 04374 123, 124, 125, 85, 132, 133, 197, 157, 158, 158, 04375 201, 203, 158, 331, 337, 86, 165, 172, 214, 230, 04376 292, 293, 296, 52, 56, 83, 86, 173, 174, 214, 04377 292, 293, 296, 174, 33, 34, 35, 36, 49, 50, 04378 51, 52, 56, 136, 175, 294, 322, 85, 133, 330, 04379 255, 267, 87, 87, 134, 184, 56, 184, 184, 184, 04380 113, 88, 134, 193, 338, 85, 132, 133, 87, 87, 04381 134, 193, 189, 332, 333, 189, 188, 189, 194, 325, 04382 338, 157, 333, 157, 54, 63, 64, 155, 136, 183, 04383 130, 150, 85, 133, 87, 154, 153, 166, 137, 331, 04384 337, 333, 199, 333, 138, 134, 141, 335, 134, 335, 04385 131, 335, 332, 56, 59, 60, 168, 170, 134, 85, 04386 132, 133, 244, 61, 107, 109, 110, 282, 110, 282, 04387 110, 65, 282, 110, 110, 272, 282, 110, 61, 110, 04388 110, 110, 272, 110, 61, 110, 68, 68, 139, 147, 04389 158, 158, 158, 158, 154, 157, 157, 257, 256, 94, 04390 161, 248, 95, 159, 184, 194, 195, 166, 134, 171, 04391 134, 156, 159, 172, 182, 184, 195, 182, 182, 182, 04392 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 04393 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 04394 182, 182, 182, 52, 53, 56, 180, 254, 328, 329, 04395 188, 52, 53, 56, 180, 253, 328, 149, 150, 13, 04396 226, 336, 226, 158, 158, 331, 17, 258, 56, 85, 04397 132, 133, 25, 157, 52, 56, 173, 1, 117, 297, 04398 336, 85, 132, 133, 210, 323, 211, 330, 52, 56, 04399 328, 159, 182, 159, 182, 179, 182, 184, 95, 184, 04400 192, 325, 52, 56, 188, 52, 56, 326, 333, 137, 04401 333, 134, 134, 333, 177, 200, 182, 145, 131, 328, 04402 328, 182, 130, 333, 152, 333, 325, 134, 170, 52, 04403 56, 188, 52, 56, 52, 54, 55, 56, 57, 58, 04404 68, 89, 95, 96, 97, 120, 123, 136, 245, 300, 04405 302, 303, 304, 305, 306, 307, 310, 311, 312, 313, 04406 316, 317, 318, 319, 320, 284, 283, 140, 282, 140, 04407 140, 140, 182, 182, 76, 118, 237, 238, 338, 237, 04408 162, 237, 184, 134, 333, 170, 134, 113, 44, 332, 04409 87, 87, 186, 190, 252, 332, 334, 87, 87, 186, 04410 190, 251, 10, 225, 8, 260, 338, 150, 13, 150, 04411 27, 227, 336, 227, 258, 194, 225, 52, 56, 188, 04412 52, 56, 205, 208, 336, 298, 207, 52, 56, 173, 04413 188, 149, 157, 136, 299, 302, 212, 186, 187, 190, 04414 338, 44, 177, 184, 193, 87, 87, 334, 87, 87, 04415 325, 157, 131, 145, 335, 168, 334, 113, 184, 52, 04416 89, 95, 231, 232, 233, 304, 302, 29, 111, 246, 04417 134, 301, 134, 321, 338, 52, 134, 321, 134, 301, 04418 52, 134, 301, 52, 285, 54, 55, 57, 287, 296, 04419 52, 58, 234, 236, 239, 306, 308, 309, 312, 314, 04420 315, 318, 320, 332, 150, 150, 237, 150, 95, 184, 04421 170, 182, 115, 159, 182, 159, 182, 161, 186, 138, 04422 87, 159, 182, 159, 182, 161, 187, 184, 195, 261, 04423 338, 15, 229, 338, 14, 228, 229, 229, 202, 204, 04424 225, 134, 226, 334, 158, 336, 158, 149, 334, 225, 04425 333, 302, 149, 336, 175, 255, 247, 182, 87, 134, 04426 333, 131, 184, 233, 134, 304, 134, 333, 239, 150, 04427 150, 300, 305, 316, 318, 307, 312, 320, 306, 313, 04428 318, 306, 286, 113, 86, 214, 239, 118, 134, 235, 04429 134, 321, 321, 134, 235, 134, 235, 139, 10, 131, 04430 150, 10, 184, 182, 159, 182, 88, 262, 338, 150, 04431 9, 263, 338, 158, 225, 225, 150, 150, 184, 150, 04432 227, 209, 336, 225, 333, 225, 213, 333, 232, 134, 04433 95, 231, 137, 10, 131, 134, 301, 134, 301, 321, 04434 134, 301, 134, 301, 301, 150, 214, 56, 85, 118, 04435 234, 315, 318, 308, 312, 306, 314, 318, 306, 52, 04436 240, 241, 303, 131, 86, 172, 214, 292, 293, 296, 04437 226, 150, 226, 225, 225, 229, 258, 259, 206, 149, 04438 299, 134, 232, 134, 304, 306, 318, 306, 306, 108, 04439 52, 56, 134, 235, 134, 235, 321, 134, 235, 134, 04440 235, 235, 134, 332, 56, 85, 132, 133, 150, 150, 04441 150, 225, 149, 232, 134, 301, 134, 301, 301, 301, 04442 306, 318, 306, 306, 241, 52, 56, 188, 52, 56, 04443 260, 228, 225, 225, 232, 306, 235, 134, 235, 235, 04444 235, 334, 301, 306, 235 04445 }; 04446 04447 #define yyerrok (yyerrstatus = 0) 04448 #define yyclearin (yychar = YYEMPTY) 04449 #define YYEMPTY (-2) 04450 #define YYEOF 0 04451 04452 #define YYACCEPT goto yyacceptlab 04453 #define YYABORT goto yyabortlab 04454 #define YYERROR goto yyerrorlab 04455 04456 04457 /* Like YYERROR except do call yyerror. This remains here temporarily 04458 to ease the transition to the new meaning of YYERROR, for GCC. 04459 Once GCC version 2 has supplanted version 1, this can go. */ 04460 04461 #define YYFAIL goto yyerrlab 04462 04463 #define YYRECOVERING() (!!yyerrstatus) 04464 04465 #define YYBACKUP(Token, Value) \ 04466 do \ 04467 if (yychar == YYEMPTY && yylen == 1) \ 04468 { \ 04469 yychar = (Token); \ 04470 yylval = (Value); \ 04471 yytoken = YYTRANSLATE (yychar); \ 04472 YYPOPSTACK (1); \ 04473 goto yybackup; \ 04474 } \ 04475 else \ 04476 { \ 04477 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04478 YYERROR; \ 04479 } \ 04480 while (YYID (0)) 04481 04482 04483 #define YYTERROR 1 04484 #define YYERRCODE 256 04485 04486 04487 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04488 If N is 0, then set CURRENT to the empty location which ends 04489 the previous symbol: RHS[0] (always defined). */ 04490 04491 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04492 #ifndef YYLLOC_DEFAULT 04493 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04494 do \ 04495 if (YYID (N)) \ 04496 { \ 04497 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04498 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04499 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04500 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04501 } \ 04502 else \ 04503 { \ 04504 (Current).first_line = (Current).last_line = \ 04505 YYRHSLOC (Rhs, 0).last_line; \ 04506 (Current).first_column = (Current).last_column = \ 04507 YYRHSLOC (Rhs, 0).last_column; \ 04508 } \ 04509 while (YYID (0)) 04510 #endif 04511 04512 04513 /* YY_LOCATION_PRINT -- Print the location on the stream. 04514 This macro was not mandated originally: define only if we know 04515 we won't break user code: when these are the locations we know. */ 04516 04517 #ifndef YY_LOCATION_PRINT 04518 # if YYLTYPE_IS_TRIVIAL 04519 # define YY_LOCATION_PRINT(File, Loc) \ 04520 fprintf (File, "%d.%d-%d.%d", \ 04521 (Loc).first_line, (Loc).first_column, \ 04522 (Loc).last_line, (Loc).last_column) 04523 # else 04524 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04525 # endif 04526 #endif 04527 04528 04529 /* YYLEX -- calling `yylex' with the right arguments. */ 04530 04531 #ifdef YYLEX_PARAM 04532 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04533 #else 04534 # define YYLEX yylex (&yylval) 04535 #endif 04536 04537 /* Enable debugging if requested. */ 04538 #if YYDEBUG 04539 04540 # ifndef YYFPRINTF 04541 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04542 # define YYFPRINTF fprintf 04543 # endif 04544 04545 # define YYDPRINTF(Args) \ 04546 do { \ 04547 if (yydebug) \ 04548 YYFPRINTF Args; \ 04549 } while (YYID (0)) 04550 04551 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04552 do { \ 04553 if (yydebug) \ 04554 { \ 04555 YYFPRINTF (stderr, "%s ", Title); \ 04556 yy_symbol_print (stderr, \ 04557 Type, Value, parser); \ 04558 YYFPRINTF (stderr, "\n"); \ 04559 } \ 04560 } while (YYID (0)) 04561 04562 04563 /*--------------------------------. 04564 | Print this symbol on YYOUTPUT. | 04565 `--------------------------------*/ 04566 04567 /*ARGSUSED*/ 04568 #if (defined __STDC__ || defined __C99__FUNC__ \ 04569 || defined __cplusplus || defined _MSC_VER) 04570 static void 04571 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04572 #else 04573 static void 04574 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04575 FILE *yyoutput; 04576 int yytype; 04577 YYSTYPE const * const yyvaluep; 04578 struct parser_params *parser; 04579 #endif 04580 { 04581 if (!yyvaluep) 04582 return; 04583 YYUSE (parser); 04584 # ifdef YYPRINT 04585 if (yytype < YYNTOKENS) 04586 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04587 # else 04588 YYUSE (yyoutput); 04589 # endif 04590 switch (yytype) 04591 { 04592 default: 04593 break; 04594 } 04595 } 04596 04597 04598 /*--------------------------------. 04599 | Print this symbol on YYOUTPUT. | 04600 `--------------------------------*/ 04601 04602 #if (defined __STDC__ || defined __C99__FUNC__ \ 04603 || defined __cplusplus || defined _MSC_VER) 04604 static void 04605 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04606 #else 04607 static void 04608 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04609 FILE *yyoutput; 04610 int yytype; 04611 YYSTYPE const * const yyvaluep; 04612 struct parser_params *parser; 04613 #endif 04614 { 04615 if (yytype < YYNTOKENS) 04616 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04617 else 04618 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04619 04620 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04621 YYFPRINTF (yyoutput, ")"); 04622 } 04623 04624 /*------------------------------------------------------------------. 04625 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04626 | TOP (included). | 04627 `------------------------------------------------------------------*/ 04628 04629 #if (defined __STDC__ || defined __C99__FUNC__ \ 04630 || defined __cplusplus || defined _MSC_VER) 04631 static void 04632 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 04633 #else 04634 static void 04635 yy_stack_print (bottom, top) 04636 yytype_int16 *bottom; 04637 yytype_int16 *top; 04638 #endif 04639 { 04640 YYFPRINTF (stderr, "Stack now"); 04641 for (; bottom <= top; ++bottom) 04642 YYFPRINTF (stderr, " %d", *bottom); 04643 YYFPRINTF (stderr, "\n"); 04644 } 04645 04646 # define YY_STACK_PRINT(Bottom, Top) \ 04647 do { \ 04648 if (yydebug) \ 04649 yy_stack_print ((Bottom), (Top)); \ 04650 } while (YYID (0)) 04651 04652 04653 /*------------------------------------------------. 04654 | Report that the YYRULE is going to be reduced. | 04655 `------------------------------------------------*/ 04656 04657 #if (defined __STDC__ || defined __C99__FUNC__ \ 04658 || defined __cplusplus || defined _MSC_VER) 04659 static void 04660 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04661 #else 04662 static void 04663 yy_reduce_print (yyvsp, yyrule, parser) 04664 YYSTYPE *yyvsp; 04665 int yyrule; 04666 struct parser_params *parser; 04667 #endif 04668 { 04669 int yynrhs = yyr2[yyrule]; 04670 int yyi; 04671 unsigned long int yylno = yyrline[yyrule]; 04672 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04673 yyrule - 1, yylno); 04674 /* The symbols being reduced. */ 04675 for (yyi = 0; yyi < yynrhs; yyi++) 04676 { 04677 fprintf (stderr, " $%d = ", yyi + 1); 04678 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04679 &(yyvsp[(yyi + 1) - (yynrhs)]) 04680 , parser); 04681 fprintf (stderr, "\n"); 04682 } 04683 } 04684 04685 # define YY_REDUCE_PRINT(Rule) \ 04686 do { \ 04687 if (yydebug) \ 04688 yy_reduce_print (yyvsp, Rule, parser); \ 04689 } while (YYID (0)) 04690 04691 /* Nonzero means print parse trace. It is left uninitialized so that 04692 multiple parsers can coexist. */ 04693 #ifndef yydebug 04694 int yydebug; 04695 #endif 04696 #else /* !YYDEBUG */ 04697 # define YYDPRINTF(Args) 04698 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04699 # define YY_STACK_PRINT(Bottom, Top) 04700 # define YY_REDUCE_PRINT(Rule) 04701 #endif /* !YYDEBUG */ 04702 04703 04704 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04705 #ifndef YYINITDEPTH 04706 # define YYINITDEPTH 200 04707 #endif 04708 04709 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04710 if the built-in stack extension method is used). 04711 04712 Do not make this value too large; the results are undefined if 04713 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04714 evaluated with infinite-precision integer arithmetic. */ 04715 04716 #ifndef YYMAXDEPTH 04717 # define YYMAXDEPTH 10000 04718 #endif 04719 04720 04721 04722 #if YYERROR_VERBOSE 04723 04724 # ifndef yystrlen 04725 # if defined __GLIBC__ && defined _STRING_H 04726 # define yystrlen strlen 04727 # else 04728 /* Return the length of YYSTR. */ 04729 #if (defined __STDC__ || defined __C99__FUNC__ \ 04730 || defined __cplusplus || defined _MSC_VER) 04731 static YYSIZE_T 04732 yystrlen (const char *yystr) 04733 #else 04734 static YYSIZE_T 04735 yystrlen (yystr) 04736 const char *yystr; 04737 #endif 04738 { 04739 YYSIZE_T yylen; 04740 for (yylen = 0; yystr[yylen]; yylen++) 04741 continue; 04742 return yylen; 04743 } 04744 # endif 04745 # endif 04746 04747 # ifndef yystpcpy 04748 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04749 # define yystpcpy stpcpy 04750 # else 04751 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04752 YYDEST. */ 04753 #if (defined __STDC__ || defined __C99__FUNC__ \ 04754 || defined __cplusplus || defined _MSC_VER) 04755 static char * 04756 yystpcpy (char *yydest, const char *yysrc) 04757 #else 04758 static char * 04759 yystpcpy (yydest, yysrc) 04760 char *yydest; 04761 const char *yysrc; 04762 #endif 04763 { 04764 char *yyd = yydest; 04765 const char *yys = yysrc; 04766 04767 while ((*yyd++ = *yys++) != '\0') 04768 continue; 04769 04770 return yyd - 1; 04771 } 04772 # endif 04773 # endif 04774 04775 # ifndef yytnamerr 04776 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04777 quotes and backslashes, so that it's suitable for yyerror. The 04778 heuristic is that double-quoting is unnecessary unless the string 04779 contains an apostrophe, a comma, or backslash (other than 04780 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04781 null, do not copy; instead, return the length of what the result 04782 would have been. */ 04783 static YYSIZE_T 04784 yytnamerr (char *yyres, const char *yystr) 04785 { 04786 if (*yystr == '"') 04787 { 04788 YYSIZE_T yyn = 0; 04789 char const *yyp = yystr; 04790 04791 for (;;) 04792 switch (*++yyp) 04793 { 04794 case '\'': 04795 case ',': 04796 goto do_not_strip_quotes; 04797 04798 case '\\': 04799 if (*++yyp != '\\') 04800 goto do_not_strip_quotes; 04801 /* Fall through. */ 04802 default: 04803 if (yyres) 04804 yyres[yyn] = *yyp; 04805 yyn++; 04806 break; 04807 04808 case '"': 04809 if (yyres) 04810 yyres[yyn] = '\0'; 04811 return yyn; 04812 } 04813 do_not_strip_quotes: ; 04814 } 04815 04816 if (! yyres) 04817 return yystrlen (yystr); 04818 04819 return yystpcpy (yyres, yystr) - yyres; 04820 } 04821 # endif 04822 04823 /* Copy into YYRESULT an error message about the unexpected token 04824 YYCHAR while in state YYSTATE. Return the number of bytes copied, 04825 including the terminating null byte. If YYRESULT is null, do not 04826 copy anything; just return the number of bytes that would be 04827 copied. As a special case, return 0 if an ordinary "syntax error" 04828 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 04829 size calculation. */ 04830 static YYSIZE_T 04831 yysyntax_error (char *yyresult, int yystate, int yychar) 04832 { 04833 int yyn = yypact[yystate]; 04834 04835 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 04836 return 0; 04837 else 04838 { 04839 int yytype = YYTRANSLATE (yychar); 04840 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 04841 YYSIZE_T yysize = yysize0; 04842 YYSIZE_T yysize1; 04843 int yysize_overflow = 0; 04844 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04845 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04846 int yyx; 04847 04848 # if 0 04849 /* This is so xgettext sees the translatable formats that are 04850 constructed on the fly. */ 04851 YY_("syntax error, unexpected %s"); 04852 YY_("syntax error, unexpected %s, expecting %s"); 04853 YY_("syntax error, unexpected %s, expecting %s or %s"); 04854 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 04855 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 04856 # endif 04857 char *yyfmt; 04858 char const *yyf; 04859 static char const yyunexpected[] = "syntax error, unexpected %s"; 04860 static char const yyexpecting[] = ", expecting %s"; 04861 static char const yyor[] = " or %s"; 04862 char yyformat[sizeof yyunexpected 04863 + sizeof yyexpecting - 1 04864 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 04865 * (sizeof yyor - 1))]; 04866 char const *yyprefix = yyexpecting; 04867 04868 /* Start YYX at -YYN if negative to avoid negative indexes in 04869 YYCHECK. */ 04870 int yyxbegin = yyn < 0 ? -yyn : 0; 04871 04872 /* Stay within bounds of both yycheck and yytname. */ 04873 int yychecklim = YYLAST - yyn + 1; 04874 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04875 int yycount = 1; 04876 04877 yyarg[0] = yytname[yytype]; 04878 yyfmt = yystpcpy (yyformat, yyunexpected); 04879 04880 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04881 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 04882 { 04883 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04884 { 04885 yycount = 1; 04886 yysize = yysize0; 04887 yyformat[sizeof yyunexpected - 1] = '\0'; 04888 break; 04889 } 04890 yyarg[yycount++] = yytname[yyx]; 04891 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04892 yysize_overflow |= (yysize1 < yysize); 04893 yysize = yysize1; 04894 yyfmt = yystpcpy (yyfmt, yyprefix); 04895 yyprefix = yyor; 04896 } 04897 04898 yyf = YY_(yyformat); 04899 yysize1 = yysize + yystrlen (yyf); 04900 yysize_overflow |= (yysize1 < yysize); 04901 yysize = yysize1; 04902 04903 if (yysize_overflow) 04904 return YYSIZE_MAXIMUM; 04905 04906 if (yyresult) 04907 { 04908 /* Avoid sprintf, as that infringes on the user's name space. 04909 Don't have undefined behavior even if the translation 04910 produced a string with the wrong number of "%s"s. */ 04911 char *yyp = yyresult; 04912 int yyi = 0; 04913 while ((*yyp = *yyf) != '\0') 04914 { 04915 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 04916 { 04917 yyp += yytnamerr (yyp, yyarg[yyi++]); 04918 yyf += 2; 04919 } 04920 else 04921 { 04922 yyp++; 04923 yyf++; 04924 } 04925 } 04926 } 04927 return yysize; 04928 } 04929 } 04930 #endif /* YYERROR_VERBOSE */ 04931 04932 04933 /*-----------------------------------------------. 04934 | Release the memory associated to this symbol. | 04935 `-----------------------------------------------*/ 04936 04937 /*ARGSUSED*/ 04938 #if (defined __STDC__ || defined __C99__FUNC__ \ 04939 || defined __cplusplus || defined _MSC_VER) 04940 static void 04941 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04942 #else 04943 static void 04944 yydestruct (yymsg, yytype, yyvaluep, parser) 04945 const char *yymsg; 04946 int yytype; 04947 YYSTYPE *yyvaluep; 04948 struct parser_params *parser; 04949 #endif 04950 { 04951 YYUSE (yyvaluep); 04952 YYUSE (parser); 04953 04954 if (!yymsg) 04955 yymsg = "Deleting"; 04956 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04957 04958 switch (yytype) 04959 { 04960 04961 default: 04962 break; 04963 } 04964 } 04965 04966 04967 /* Prevent warnings from -Wmissing-prototypes. */ 04968 04969 #ifdef YYPARSE_PARAM 04970 #if defined __STDC__ || defined __cplusplus 04971 int yyparse (void *YYPARSE_PARAM); 04972 #else 04973 int yyparse (); 04974 #endif 04975 #else /* ! YYPARSE_PARAM */ 04976 #if defined __STDC__ || defined __cplusplus 04977 int yyparse (struct parser_params *parser); 04978 #else 04979 int yyparse (); 04980 #endif 04981 #endif /* ! YYPARSE_PARAM */ 04982 04983 04984 04985 04986 04987 04988 /*----------. 04989 | yyparse. | 04990 `----------*/ 04991 04992 #ifdef YYPARSE_PARAM 04993 #if (defined __STDC__ || defined __C99__FUNC__ \ 04994 || defined __cplusplus || defined _MSC_VER) 04995 int 04996 yyparse (void *YYPARSE_PARAM) 04997 #else 04998 int 04999 yyparse (YYPARSE_PARAM) 05000 void *YYPARSE_PARAM; 05001 #endif 05002 #else /* ! YYPARSE_PARAM */ 05003 #if (defined __STDC__ || defined __C99__FUNC__ \ 05004 || defined __cplusplus || defined _MSC_VER) 05005 int 05006 yyparse (struct parser_params *parser) 05007 #else 05008 int 05009 yyparse (parser) 05010 struct parser_params *parser; 05011 #endif 05012 #endif 05013 { 05014 /* The look-ahead symbol. */ 05015 int yychar; 05016 05017 /* The semantic value of the look-ahead symbol. */ 05018 YYSTYPE yylval; 05019 05020 /* Number of syntax errors so far. */ 05021 int yynerrs; 05022 05023 int yystate; 05024 int yyn; 05025 int yyresult; 05026 /* Number of tokens to shift before error messages enabled. */ 05027 int yyerrstatus; 05028 /* Look-ahead token as an internal (translated) token number. */ 05029 int yytoken = 0; 05030 #if YYERROR_VERBOSE 05031 /* Buffer for error messages, and its allocated size. */ 05032 char yymsgbuf[128]; 05033 char *yymsg = yymsgbuf; 05034 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 05035 #endif 05036 05037 /* Three stacks and their tools: 05038 `yyss': related to states, 05039 `yyvs': related to semantic values, 05040 `yyls': related to locations. 05041 05042 Refer to the stacks thru separate pointers, to allow yyoverflow 05043 to reallocate them elsewhere. */ 05044 05045 /* The state stack. */ 05046 yytype_int16 yyssa[YYINITDEPTH]; 05047 yytype_int16 *yyss = yyssa; 05048 yytype_int16 *yyssp; 05049 05050 /* The semantic value stack. */ 05051 YYSTYPE yyvsa[YYINITDEPTH]; 05052 YYSTYPE *yyvs = yyvsa; 05053 YYSTYPE *yyvsp; 05054 05055 05056 05057 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 05058 05059 YYSIZE_T yystacksize = YYINITDEPTH; 05060 05061 /* The variables used to return semantic value and location from the 05062 action routines. */ 05063 YYSTYPE yyval; 05064 05065 05066 /* The number of symbols on the RHS of the reduced rule. 05067 Keep to zero when no symbol should be popped. */ 05068 int yylen = 0; 05069 05070 YYDPRINTF ((stderr, "Starting parse\n")); 05071 05072 yystate = 0; 05073 yyerrstatus = 0; 05074 yynerrs = 0; 05075 yychar = YYEMPTY; /* Cause a token to be read. */ 05076 05077 /* Initialize stack pointers. 05078 Waste one element of value and location stack 05079 so that they stay on the same level as the state stack. 05080 The wasted elements are never initialized. */ 05081 05082 yyssp = yyss; 05083 yyvsp = yyvs; 05084 05085 goto yysetstate; 05086 05087 /*------------------------------------------------------------. 05088 | yynewstate -- Push a new state, which is found in yystate. | 05089 `------------------------------------------------------------*/ 05090 yynewstate: 05091 /* In all cases, when you get here, the value and location stacks 05092 have just been pushed. So pushing a state here evens the stacks. */ 05093 yyssp++; 05094 05095 yysetstate: 05096 *yyssp = yystate; 05097 05098 if (yyss + yystacksize - 1 <= yyssp) 05099 { 05100 /* Get the current used size of the three stacks, in elements. */ 05101 YYSIZE_T yysize = yyssp - yyss + 1; 05102 05103 #ifdef yyoverflow 05104 { 05105 /* Give user a chance to reallocate the stack. Use copies of 05106 these so that the &'s don't force the real ones into 05107 memory. */ 05108 YYSTYPE *yyvs1 = yyvs; 05109 yytype_int16 *yyss1 = yyss; 05110 05111 05112 /* Each stack pointer address is followed by the size of the 05113 data in use in that stack, in bytes. This used to be a 05114 conditional around just the two extra args, but that might 05115 be undefined if yyoverflow is a macro. */ 05116 yyoverflow (YY_("memory exhausted"), 05117 &yyss1, yysize * sizeof (*yyssp), 05118 &yyvs1, yysize * sizeof (*yyvsp), 05119 05120 &yystacksize); 05121 05122 yyss = yyss1; 05123 yyvs = yyvs1; 05124 } 05125 #else /* no yyoverflow */ 05126 # ifndef YYSTACK_RELOCATE 05127 goto yyexhaustedlab; 05128 # else 05129 /* Extend the stack our own way. */ 05130 if (YYMAXDEPTH <= yystacksize) 05131 goto yyexhaustedlab; 05132 yystacksize *= 2; 05133 if (YYMAXDEPTH < yystacksize) 05134 yystacksize = YYMAXDEPTH; 05135 05136 { 05137 yytype_int16 *yyss1 = yyss; 05138 union yyalloc *yyptr = 05139 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 05140 if (! yyptr) 05141 goto yyexhaustedlab; 05142 YYSTACK_RELOCATE (yyss); 05143 YYSTACK_RELOCATE (yyvs); 05144 05145 # undef YYSTACK_RELOCATE 05146 if (yyss1 != yyssa) 05147 YYSTACK_FREE (yyss1); 05148 } 05149 # endif 05150 #endif /* no yyoverflow */ 05151 05152 yyssp = yyss + yysize - 1; 05153 yyvsp = yyvs + yysize - 1; 05154 05155 05156 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 05157 (unsigned long int) yystacksize)); 05158 05159 if (yyss + yystacksize - 1 <= yyssp) 05160 YYABORT; 05161 } 05162 05163 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 05164 05165 goto yybackup; 05166 05167 /*-----------. 05168 | yybackup. | 05169 `-----------*/ 05170 yybackup: 05171 05172 /* Do appropriate processing given the current state. Read a 05173 look-ahead token if we need one and don't already have one. */ 05174 05175 /* First try to decide what to do without reference to look-ahead token. */ 05176 yyn = yypact[yystate]; 05177 if (yyn == YYPACT_NINF) 05178 goto yydefault; 05179 05180 /* Not known => get a look-ahead token if don't already have one. */ 05181 05182 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 05183 if (yychar == YYEMPTY) 05184 { 05185 YYDPRINTF ((stderr, "Reading a token: ")); 05186 yychar = YYLEX; 05187 } 05188 05189 if (yychar <= YYEOF) 05190 { 05191 yychar = yytoken = YYEOF; 05192 YYDPRINTF ((stderr, "Now at end of input.\n")); 05193 } 05194 else 05195 { 05196 yytoken = YYTRANSLATE (yychar); 05197 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 05198 } 05199 05200 /* If the proper action on seeing token YYTOKEN is to reduce or to 05201 detect an error, take that action. */ 05202 yyn += yytoken; 05203 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 05204 goto yydefault; 05205 yyn = yytable[yyn]; 05206 if (yyn <= 0) 05207 { 05208 if (yyn == 0 || yyn == YYTABLE_NINF) 05209 goto yyerrlab; 05210 yyn = -yyn; 05211 goto yyreduce; 05212 } 05213 05214 if (yyn == YYFINAL) 05215 YYACCEPT; 05216 05217 /* Count tokens shifted since error; after three, turn off error 05218 status. */ 05219 if (yyerrstatus) 05220 yyerrstatus--; 05221 05222 /* Shift the look-ahead token. */ 05223 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 05224 05225 /* Discard the shifted token unless it is eof. */ 05226 if (yychar != YYEOF) 05227 yychar = YYEMPTY; 05228 05229 yystate = yyn; 05230 *++yyvsp = yylval; 05231 05232 goto yynewstate; 05233 05234 05235 /*-----------------------------------------------------------. 05236 | yydefault -- do the default action for the current state. | 05237 `-----------------------------------------------------------*/ 05238 yydefault: 05239 yyn = yydefact[yystate]; 05240 if (yyn == 0) 05241 goto yyerrlab; 05242 goto yyreduce; 05243 05244 05245 /*-----------------------------. 05246 | yyreduce -- Do a reduction. | 05247 `-----------------------------*/ 05248 yyreduce: 05249 /* yyn is the number of a rule to reduce with. */ 05250 yylen = yyr2[yyn]; 05251 05252 /* If YYLEN is nonzero, implement the default value of the action: 05253 `$$ = $1'. 05254 05255 Otherwise, the following line sets YYVAL to garbage. 05256 This behavior is undocumented and Bison 05257 users should not rely upon it. Assigning to YYVAL 05258 unconditionally makes the parser a bit smaller, and it avoids a 05259 GCC warning that YYVAL may be used uninitialized. */ 05260 yyval = yyvsp[1-yylen]; 05261 05262 05263 YY_REDUCE_PRINT (yyn); 05264 switch (yyn) 05265 { 05266 case 2: 05267 #line 850 "parse.y" 05268 { 05269 lex_state = EXPR_BEG; 05270 /*%%%*/ 05271 local_push(compile_for_eval || rb_parse_in_main()); 05272 /*% 05273 local_push(0); 05274 %*/ 05275 ;} 05276 break; 05277 05278 case 3: 05279 #line 859 "parse.y" 05280 { 05281 /*%%%*/ 05282 if ((yyvsp[(2) - (2)].node) && !compile_for_eval) { 05283 /* last expression should not be void */ 05284 if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node)); 05285 else { 05286 NODE *node = (yyvsp[(2) - (2)].node); 05287 while (node->nd_next) { 05288 node = node->nd_next; 05289 } 05290 void_expr(node->nd_head); 05291 } 05292 } 05293 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node))); 05294 /*% 05295 $$ = $2; 05296 parser->result = dispatch1(program, $$); 05297 %*/ 05298 local_pop(); 05299 ;} 05300 break; 05301 05302 case 4: 05303 #line 882 "parse.y" 05304 { 05305 /*%%%*/ 05306 void_stmts((yyvsp[(1) - (2)].node)); 05307 fixup_nodes(&deferred_nodes); 05308 /*% 05309 %*/ 05310 (yyval.node) = (yyvsp[(1) - (2)].node); 05311 ;} 05312 break; 05313 05314 case 5: 05315 #line 893 "parse.y" 05316 { 05317 /*%%%*/ 05318 (yyval.node) = NEW_BEGIN(0); 05319 /*% 05320 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05321 dispatch0(void_stmt)); 05322 %*/ 05323 ;} 05324 break; 05325 05326 case 6: 05327 #line 902 "parse.y" 05328 { 05329 /*%%%*/ 05330 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05331 /*% 05332 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05333 %*/ 05334 ;} 05335 break; 05336 05337 case 7: 05338 #line 910 "parse.y" 05339 { 05340 /*%%%*/ 05341 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05342 /*% 05343 $$ = dispatch2(stmts_add, $1, $3); 05344 %*/ 05345 ;} 05346 break; 05347 05348 case 8: 05349 #line 918 "parse.y" 05350 { 05351 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05352 ;} 05353 break; 05354 05355 case 10: 05356 #line 925 "parse.y" 05357 { 05358 /*%%%*/ 05359 /* local_push(0); */ 05360 /*% 05361 %*/ 05362 ;} 05363 break; 05364 05365 case 11: 05366 #line 932 "parse.y" 05367 { 05368 /*%%%*/ 05369 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05370 (yyvsp[(4) - (5)].node)); 05371 /* NEW_PREEXE($4)); */ 05372 /* local_pop(); */ 05373 (yyval.node) = NEW_BEGIN(0); 05374 /*% 05375 $$ = dispatch1(BEGIN, $4); 05376 %*/ 05377 ;} 05378 break; 05379 05380 case 12: 05381 #line 949 "parse.y" 05382 { 05383 /*%%%*/ 05384 (yyval.node) = (yyvsp[(1) - (4)].node); 05385 if ((yyvsp[(2) - (4)].node)) { 05386 (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node)); 05387 } 05388 else if ((yyvsp[(3) - (4)].node)) { 05389 rb_warn0("else without rescue is useless"); 05390 (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node)); 05391 } 05392 if ((yyvsp[(4) - (4)].node)) { 05393 if ((yyval.node)) { 05394 (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node)); 05395 } 05396 else { 05397 (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL()); 05398 } 05399 } 05400 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05401 /*% 05402 $$ = dispatch4(bodystmt, 05403 escape_Qundef($1), 05404 escape_Qundef($2), 05405 escape_Qundef($3), 05406 escape_Qundef($4)); 05407 %*/ 05408 ;} 05409 break; 05410 05411 case 13: 05412 #line 979 "parse.y" 05413 { 05414 /*%%%*/ 05415 void_stmts((yyvsp[(1) - (2)].node)); 05416 fixup_nodes(&deferred_nodes); 05417 /*% 05418 %*/ 05419 (yyval.node) = (yyvsp[(1) - (2)].node); 05420 ;} 05421 break; 05422 05423 case 14: 05424 #line 990 "parse.y" 05425 { 05426 /*%%%*/ 05427 (yyval.node) = NEW_BEGIN(0); 05428 /*% 05429 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05430 dispatch0(void_stmt)); 05431 %*/ 05432 ;} 05433 break; 05434 05435 case 15: 05436 #line 999 "parse.y" 05437 { 05438 /*%%%*/ 05439 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05440 /*% 05441 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05442 %*/ 05443 ;} 05444 break; 05445 05446 case 16: 05447 #line 1007 "parse.y" 05448 { 05449 /*%%%*/ 05450 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05451 /*% 05452 $$ = dispatch2(stmts_add, $1, $3); 05453 %*/ 05454 ;} 05455 break; 05456 05457 case 17: 05458 #line 1015 "parse.y" 05459 { 05460 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05461 ;} 05462 break; 05463 05464 case 18: 05465 #line 1021 "parse.y" 05466 { 05467 (yyval.node) = (yyvsp[(1) - (1)].node); 05468 ;} 05469 break; 05470 05471 case 19: 05472 #line 1025 "parse.y" 05473 { 05474 yyerror("BEGIN is permitted only at toplevel"); 05475 /*%%%*/ 05476 /* local_push(0); */ 05477 /*% 05478 %*/ 05479 ;} 05480 break; 05481 05482 case 20: 05483 #line 1033 "parse.y" 05484 { 05485 /*%%%*/ 05486 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05487 (yyvsp[(4) - (5)].node)); 05488 /* NEW_PREEXE($4)); */ 05489 /* local_pop(); */ 05490 (yyval.node) = NEW_BEGIN(0); 05491 /*% 05492 $$ = dispatch1(BEGIN, $4); 05493 %*/ 05494 ;} 05495 break; 05496 05497 case 21: 05498 #line 1045 "parse.y" 05499 {lex_state = EXPR_FNAME;;} 05500 break; 05501 05502 case 22: 05503 #line 1046 "parse.y" 05504 { 05505 /*%%%*/ 05506 (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); 05507 /*% 05508 $$ = dispatch2(alias, $2, $4); 05509 %*/ 05510 ;} 05511 break; 05512 05513 case 23: 05514 #line 1054 "parse.y" 05515 { 05516 /*%%%*/ 05517 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id)); 05518 /*% 05519 $$ = dispatch2(var_alias, $2, $3); 05520 %*/ 05521 ;} 05522 break; 05523 05524 case 24: 05525 #line 1062 "parse.y" 05526 { 05527 /*%%%*/ 05528 char buf[2]; 05529 buf[0] = '$'; 05530 buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth; 05531 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2)); 05532 /*% 05533 $$ = dispatch2(var_alias, $2, $3); 05534 %*/ 05535 ;} 05536 break; 05537 05538 case 25: 05539 #line 1073 "parse.y" 05540 { 05541 /*%%%*/ 05542 yyerror("can't make alias for the number variables"); 05543 (yyval.node) = NEW_BEGIN(0); 05544 /*% 05545 $$ = dispatch2(var_alias, $2, $3); 05546 $$ = dispatch1(alias_error, $$); 05547 %*/ 05548 ;} 05549 break; 05550 05551 case 26: 05552 #line 1083 "parse.y" 05553 { 05554 /*%%%*/ 05555 (yyval.node) = (yyvsp[(2) - (2)].node); 05556 /*% 05557 $$ = dispatch1(undef, $2); 05558 %*/ 05559 ;} 05560 break; 05561 05562 case 27: 05563 #line 1091 "parse.y" 05564 { 05565 /*%%%*/ 05566 (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05567 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05568 /*% 05569 $$ = dispatch2(if_mod, $3, $1); 05570 %*/ 05571 ;} 05572 break; 05573 05574 case 28: 05575 #line 1100 "parse.y" 05576 { 05577 /*%%%*/ 05578 (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05579 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05580 /*% 05581 $$ = dispatch2(unless_mod, $3, $1); 05582 %*/ 05583 ;} 05584 break; 05585 05586 case 29: 05587 #line 1109 "parse.y" 05588 { 05589 /*%%%*/ 05590 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05591 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05592 } 05593 else { 05594 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05595 } 05596 /*% 05597 $$ = dispatch2(while_mod, $3, $1); 05598 %*/ 05599 ;} 05600 break; 05601 05602 case 30: 05603 #line 1122 "parse.y" 05604 { 05605 /*%%%*/ 05606 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05607 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05608 } 05609 else { 05610 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05611 } 05612 /*% 05613 $$ = dispatch2(until_mod, $3, $1); 05614 %*/ 05615 ;} 05616 break; 05617 05618 case 31: 05619 #line 1135 "parse.y" 05620 { 05621 /*%%%*/ 05622 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0); 05623 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0); 05624 /*% 05625 $$ = dispatch2(rescue_mod, $1, $3); 05626 %*/ 05627 ;} 05628 break; 05629 05630 case 32: 05631 #line 1144 "parse.y" 05632 { 05633 if (in_def || in_single) { 05634 rb_warn0("END in method; use at_exit"); 05635 } 05636 /*%%%*/ 05637 (yyval.node) = NEW_POSTEXE(NEW_NODE( 05638 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */)); 05639 /*% 05640 $$ = dispatch1(END, $3); 05641 %*/ 05642 ;} 05643 break; 05644 05645 case 34: 05646 #line 1157 "parse.y" 05647 { 05648 /*%%%*/ 05649 value_expr((yyvsp[(3) - (3)].node)); 05650 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05651 (yyval.node) = (yyvsp[(1) - (3)].node); 05652 /*% 05653 $$ = dispatch2(massign, $1, $3); 05654 %*/ 05655 ;} 05656 break; 05657 05658 case 35: 05659 #line 1167 "parse.y" 05660 { 05661 value_expr((yyvsp[(3) - (3)].node)); 05662 (yyval.node) = new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node)); 05663 ;} 05664 break; 05665 05666 case 36: 05667 #line 1172 "parse.y" 05668 { 05669 /*%%%*/ 05670 NODE *args; 05671 05672 value_expr((yyvsp[(6) - (6)].node)); 05673 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 05674 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 05675 if ((yyvsp[(5) - (6)].id) == tOROP) { 05676 (yyvsp[(5) - (6)].id) = 0; 05677 } 05678 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 05679 (yyvsp[(5) - (6)].id) = 1; 05680 } 05681 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 05682 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 05683 /*% 05684 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 05685 $$ = dispatch3(opassign, $$, $5, $6); 05686 %*/ 05687 ;} 05688 break; 05689 05690 case 37: 05691 #line 1193 "parse.y" 05692 { 05693 value_expr((yyvsp[(5) - (5)].node)); 05694 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05695 ;} 05696 break; 05697 05698 case 38: 05699 #line 1198 "parse.y" 05700 { 05701 value_expr((yyvsp[(5) - (5)].node)); 05702 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05703 ;} 05704 break; 05705 05706 case 39: 05707 #line 1203 "parse.y" 05708 { 05709 /*%%%*/ 05710 (yyval.node) = NEW_COLON2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id)); 05711 (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05712 /*% 05713 $$ = dispatch2(const_path_field, $1, $3); 05714 $$ = dispatch3(opassign, $$, $4, $5); 05715 %*/ 05716 ;} 05717 break; 05718 05719 case 40: 05720 #line 1213 "parse.y" 05721 { 05722 value_expr((yyvsp[(5) - (5)].node)); 05723 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_intern("::"), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05724 ;} 05725 break; 05726 05727 case 41: 05728 #line 1218 "parse.y" 05729 { 05730 /*%%%*/ 05731 rb_backref_error((yyvsp[(1) - (3)].node)); 05732 (yyval.node) = NEW_BEGIN(0); 05733 /*% 05734 $$ = dispatch2(assign, dispatch1(var_field, $1), $3); 05735 $$ = dispatch1(assign_error, $$); 05736 %*/ 05737 ;} 05738 break; 05739 05740 case 42: 05741 #line 1228 "parse.y" 05742 { 05743 /*%%%*/ 05744 value_expr((yyvsp[(3) - (3)].node)); 05745 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05746 /*% 05747 $$ = dispatch2(assign, $1, $3); 05748 %*/ 05749 ;} 05750 break; 05751 05752 case 43: 05753 #line 1237 "parse.y" 05754 { 05755 /*%%%*/ 05756 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05757 (yyval.node) = (yyvsp[(1) - (3)].node); 05758 /*% 05759 $$ = dispatch2(massign, $1, $3); 05760 %*/ 05761 ;} 05762 break; 05763 05764 case 44: 05765 #line 1246 "parse.y" 05766 { 05767 /*%%%*/ 05768 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05769 (yyval.node) = (yyvsp[(1) - (3)].node); 05770 /*% 05771 $$ = dispatch2(massign, $1, $3); 05772 %*/ 05773 ;} 05774 break; 05775 05776 case 46: 05777 #line 1258 "parse.y" 05778 { 05779 /*%%%*/ 05780 value_expr((yyvsp[(3) - (3)].node)); 05781 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05782 /*% 05783 $$ = dispatch2(assign, $1, $3); 05784 %*/ 05785 ;} 05786 break; 05787 05788 case 47: 05789 #line 1267 "parse.y" 05790 { 05791 /*%%%*/ 05792 value_expr((yyvsp[(3) - (3)].node)); 05793 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05794 /*% 05795 $$ = dispatch2(assign, $1, $3); 05796 %*/ 05797 ;} 05798 break; 05799 05800 case 49: 05801 #line 1280 "parse.y" 05802 { 05803 /*%%%*/ 05804 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05805 /*% 05806 $$ = dispatch3(binary, $1, ripper_intern("and"), $3); 05807 %*/ 05808 ;} 05809 break; 05810 05811 case 50: 05812 #line 1288 "parse.y" 05813 { 05814 /*%%%*/ 05815 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05816 /*% 05817 $$ = dispatch3(binary, $1, ripper_intern("or"), $3); 05818 %*/ 05819 ;} 05820 break; 05821 05822 case 51: 05823 #line 1296 "parse.y" 05824 { 05825 /*%%%*/ 05826 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!'); 05827 /*% 05828 $$ = dispatch2(unary, ripper_intern("not"), $3); 05829 %*/ 05830 ;} 05831 break; 05832 05833 case 52: 05834 #line 1304 "parse.y" 05835 { 05836 /*%%%*/ 05837 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 05838 /*% 05839 $$ = dispatch2(unary, ripper_id2sym('!'), $2); 05840 %*/ 05841 ;} 05842 break; 05843 05844 case 54: 05845 #line 1315 "parse.y" 05846 { 05847 /*%%%*/ 05848 value_expr((yyvsp[(1) - (1)].node)); 05849 (yyval.node) = (yyvsp[(1) - (1)].node); 05850 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 05851 /*% 05852 $$ = $1; 05853 %*/ 05854 ;} 05855 break; 05856 05857 case 58: 05858 #line 1332 "parse.y" 05859 { 05860 /*%%%*/ 05861 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05862 /*% 05863 $$ = dispatch3(call, $1, $2, $3); 05864 $$ = method_arg($$, $4); 05865 %*/ 05866 ;} 05867 break; 05868 05869 case 59: 05870 #line 1343 "parse.y" 05871 { 05872 (yyvsp[(1) - (1)].vars) = dyna_push(); 05873 /*%%%*/ 05874 (yyval.num) = ruby_sourceline; 05875 /*% 05876 %*/ 05877 ;} 05878 break; 05879 05880 case 60: 05881 #line 1353 "parse.y" 05882 { 05883 /*%%%*/ 05884 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 05885 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 05886 /*% 05887 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 05888 %*/ 05889 dyna_pop((yyvsp[(1) - (5)].vars)); 05890 ;} 05891 break; 05892 05893 case 61: 05894 #line 1365 "parse.y" 05895 { 05896 /*%%%*/ 05897 (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); 05898 nd_set_line((yyval.node), tokline); 05899 /*% 05900 %*/ 05901 ;} 05902 break; 05903 05904 case 62: 05905 #line 1375 "parse.y" 05906 { 05907 /*%%%*/ 05908 (yyval.node) = (yyvsp[(1) - (2)].node); 05909 (yyval.node)->nd_args = (yyvsp[(2) - (2)].node); 05910 /*% 05911 $$ = dispatch2(command, $1, $2); 05912 %*/ 05913 ;} 05914 break; 05915 05916 case 63: 05917 #line 1384 "parse.y" 05918 { 05919 /*%%%*/ 05920 block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)); 05921 (yyvsp[(1) - (3)].node)->nd_args = (yyvsp[(2) - (3)].node); 05922 (yyvsp[(3) - (3)].node)->nd_iter = (yyvsp[(1) - (3)].node); 05923 (yyval.node) = (yyvsp[(3) - (3)].node); 05924 fixpos((yyval.node), (yyvsp[(1) - (3)].node)); 05925 /*% 05926 $$ = dispatch2(command, $1, $2); 05927 $$ = method_add_block($$, $3); 05928 %*/ 05929 ;} 05930 break; 05931 05932 case 64: 05933 #line 1397 "parse.y" 05934 { 05935 /*%%%*/ 05936 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05937 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05938 /*% 05939 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 05940 %*/ 05941 ;} 05942 break; 05943 05944 case 65: 05945 #line 1406 "parse.y" 05946 { 05947 /*%%%*/ 05948 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 05949 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 05950 (yyval.node) = (yyvsp[(5) - (5)].node); 05951 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05952 /*% 05953 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 05954 $$ = method_add_block($$, $5); 05955 %*/ 05956 ;} 05957 break; 05958 05959 case 66: 05960 #line 1418 "parse.y" 05961 { 05962 /*%%%*/ 05963 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05964 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05965 /*% 05966 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 05967 %*/ 05968 ;} 05969 break; 05970 05971 case 67: 05972 #line 1427 "parse.y" 05973 { 05974 /*%%%*/ 05975 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 05976 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 05977 (yyval.node) = (yyvsp[(5) - (5)].node); 05978 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05979 /*% 05980 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 05981 $$ = method_add_block($$, $5); 05982 %*/ 05983 ;} 05984 break; 05985 05986 case 68: 05987 #line 1439 "parse.y" 05988 { 05989 /*%%%*/ 05990 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 05991 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05992 /*% 05993 $$ = dispatch1(super, $2); 05994 %*/ 05995 ;} 05996 break; 05997 05998 case 69: 05999 #line 1448 "parse.y" 06000 { 06001 /*%%%*/ 06002 (yyval.node) = new_yield((yyvsp[(2) - (2)].node)); 06003 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 06004 /*% 06005 $$ = dispatch1(yield, $2); 06006 %*/ 06007 ;} 06008 break; 06009 06010 case 70: 06011 #line 1457 "parse.y" 06012 { 06013 /*%%%*/ 06014 (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node))); 06015 /*% 06016 $$ = dispatch1(return, $2); 06017 %*/ 06018 ;} 06019 break; 06020 06021 case 71: 06022 #line 1465 "parse.y" 06023 { 06024 /*%%%*/ 06025 (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node))); 06026 /*% 06027 $$ = dispatch1(break, $2); 06028 %*/ 06029 ;} 06030 break; 06031 06032 case 72: 06033 #line 1473 "parse.y" 06034 { 06035 /*%%%*/ 06036 (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node))); 06037 /*% 06038 $$ = dispatch1(next, $2); 06039 %*/ 06040 ;} 06041 break; 06042 06043 case 74: 06044 #line 1484 "parse.y" 06045 { 06046 /*%%%*/ 06047 (yyval.node) = (yyvsp[(2) - (3)].node); 06048 /*% 06049 $$ = dispatch1(mlhs_paren, $2); 06050 %*/ 06051 ;} 06052 break; 06053 06054 case 76: 06055 #line 1495 "parse.y" 06056 { 06057 /*%%%*/ 06058 (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0); 06059 /*% 06060 $$ = dispatch1(mlhs_paren, $2); 06061 %*/ 06062 ;} 06063 break; 06064 06065 case 77: 06066 #line 1505 "parse.y" 06067 { 06068 /*%%%*/ 06069 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 06070 /*% 06071 $$ = $1; 06072 %*/ 06073 ;} 06074 break; 06075 06076 case 78: 06077 #line 1513 "parse.y" 06078 { 06079 /*%%%*/ 06080 (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0); 06081 /*% 06082 $$ = mlhs_add($1, $2); 06083 %*/ 06084 ;} 06085 break; 06086 06087 case 79: 06088 #line 1521 "parse.y" 06089 { 06090 /*%%%*/ 06091 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06092 /*% 06093 $$ = mlhs_add_star($1, $3); 06094 %*/ 06095 ;} 06096 break; 06097 06098 case 80: 06099 #line 1529 "parse.y" 06100 { 06101 /*%%%*/ 06102 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node))); 06103 /*% 06104 $1 = mlhs_add_star($1, $3); 06105 $$ = mlhs_add($1, $5); 06106 %*/ 06107 ;} 06108 break; 06109 06110 case 81: 06111 #line 1538 "parse.y" 06112 { 06113 /*%%%*/ 06114 (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1); 06115 /*% 06116 $$ = mlhs_add_star($1, Qnil); 06117 %*/ 06118 ;} 06119 break; 06120 06121 case 82: 06122 #line 1546 "parse.y" 06123 { 06124 /*%%%*/ 06125 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node))); 06126 /*% 06127 $1 = mlhs_add_star($1, Qnil); 06128 $$ = mlhs_add($1, $4); 06129 %*/ 06130 ;} 06131 break; 06132 06133 case 83: 06134 #line 1555 "parse.y" 06135 { 06136 /*%%%*/ 06137 (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); 06138 /*% 06139 $$ = mlhs_add_star(mlhs_new(), $2); 06140 %*/ 06141 ;} 06142 break; 06143 06144 case 84: 06145 #line 1563 "parse.y" 06146 { 06147 /*%%%*/ 06148 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node))); 06149 /*% 06150 $2 = mlhs_add_star(mlhs_new(), $2); 06151 $$ = mlhs_add($2, $4); 06152 %*/ 06153 ;} 06154 break; 06155 06156 case 85: 06157 #line 1572 "parse.y" 06158 { 06159 /*%%%*/ 06160 (yyval.node) = NEW_MASGN(0, -1); 06161 /*% 06162 $$ = mlhs_add_star(mlhs_new(), Qnil); 06163 %*/ 06164 ;} 06165 break; 06166 06167 case 86: 06168 #line 1580 "parse.y" 06169 { 06170 /*%%%*/ 06171 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 06172 /*% 06173 $$ = mlhs_add_star(mlhs_new(), Qnil); 06174 $$ = mlhs_add($$, $3); 06175 %*/ 06176 ;} 06177 break; 06178 06179 case 88: 06180 #line 1592 "parse.y" 06181 { 06182 /*%%%*/ 06183 (yyval.node) = (yyvsp[(2) - (3)].node); 06184 /*% 06185 $$ = dispatch1(mlhs_paren, $2); 06186 %*/ 06187 ;} 06188 break; 06189 06190 case 89: 06191 #line 1602 "parse.y" 06192 { 06193 /*%%%*/ 06194 (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); 06195 /*% 06196 $$ = mlhs_add(mlhs_new(), $1); 06197 %*/ 06198 ;} 06199 break; 06200 06201 case 90: 06202 #line 1610 "parse.y" 06203 { 06204 /*%%%*/ 06205 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 06206 /*% 06207 $$ = mlhs_add($1, $2); 06208 %*/ 06209 ;} 06210 break; 06211 06212 case 91: 06213 #line 1620 "parse.y" 06214 { 06215 /*%%%*/ 06216 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 06217 /*% 06218 $$ = mlhs_add(mlhs_new(), $1); 06219 %*/ 06220 ;} 06221 break; 06222 06223 case 92: 06224 #line 1628 "parse.y" 06225 { 06226 /*%%%*/ 06227 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06228 /*% 06229 $$ = mlhs_add($1, $3); 06230 %*/ 06231 ;} 06232 break; 06233 06234 case 93: 06235 #line 1638 "parse.y" 06236 { 06237 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06238 ;} 06239 break; 06240 06241 case 94: 06242 #line 1642 "parse.y" 06243 { 06244 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06245 ;} 06246 break; 06247 06248 case 95: 06249 #line 1646 "parse.y" 06250 { 06251 /*%%%*/ 06252 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06253 /*% 06254 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06255 %*/ 06256 ;} 06257 break; 06258 06259 case 96: 06260 #line 1654 "parse.y" 06261 { 06262 /*%%%*/ 06263 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06264 /*% 06265 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06266 %*/ 06267 ;} 06268 break; 06269 06270 case 97: 06271 #line 1662 "parse.y" 06272 { 06273 /*%%%*/ 06274 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06275 /*% 06276 $$ = dispatch2(const_path_field, $1, $3); 06277 %*/ 06278 ;} 06279 break; 06280 06281 case 98: 06282 #line 1670 "parse.y" 06283 { 06284 /*%%%*/ 06285 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06286 /*% 06287 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06288 %*/ 06289 ;} 06290 break; 06291 06292 case 99: 06293 #line 1678 "parse.y" 06294 { 06295 /*%%%*/ 06296 if (in_def || in_single) 06297 yyerror("dynamic constant assignment"); 06298 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06299 /*% 06300 if (in_def || in_single) 06301 yyerror("dynamic constant assignment"); 06302 $$ = dispatch2(const_path_field, $1, $3); 06303 %*/ 06304 ;} 06305 break; 06306 06307 case 100: 06308 #line 1690 "parse.y" 06309 { 06310 /*%%%*/ 06311 if (in_def || in_single) 06312 yyerror("dynamic constant assignment"); 06313 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06314 /*% 06315 $$ = dispatch1(top_const_field, $2); 06316 %*/ 06317 ;} 06318 break; 06319 06320 case 101: 06321 #line 1700 "parse.y" 06322 { 06323 /*%%%*/ 06324 rb_backref_error((yyvsp[(1) - (1)].node)); 06325 (yyval.node) = NEW_BEGIN(0); 06326 /*% 06327 $$ = dispatch1(var_field, $1); 06328 $$ = dispatch1(assign_error, $$); 06329 %*/ 06330 ;} 06331 break; 06332 06333 case 102: 06334 #line 1712 "parse.y" 06335 { 06336 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06337 /*%%%*/ 06338 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06339 /*% 06340 $$ = dispatch1(var_field, $$); 06341 %*/ 06342 ;} 06343 break; 06344 06345 case 103: 06346 #line 1721 "parse.y" 06347 { 06348 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06349 /*%%%*/ 06350 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06351 /*% 06352 $$ = dispatch1(var_field, $$); 06353 %*/ 06354 ;} 06355 break; 06356 06357 case 104: 06358 #line 1730 "parse.y" 06359 { 06360 /*%%%*/ 06361 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06362 /*% 06363 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06364 %*/ 06365 ;} 06366 break; 06367 06368 case 105: 06369 #line 1738 "parse.y" 06370 { 06371 /*%%%*/ 06372 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06373 /*% 06374 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06375 %*/ 06376 ;} 06377 break; 06378 06379 case 106: 06380 #line 1746 "parse.y" 06381 { 06382 /*%%%*/ 06383 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06384 /*% 06385 $$ = dispatch3(field, $1, ripper_intern("::"), $3); 06386 %*/ 06387 ;} 06388 break; 06389 06390 case 107: 06391 #line 1754 "parse.y" 06392 { 06393 /*%%%*/ 06394 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06395 /*% 06396 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06397 %*/ 06398 ;} 06399 break; 06400 06401 case 108: 06402 #line 1762 "parse.y" 06403 { 06404 /*%%%*/ 06405 if (in_def || in_single) 06406 yyerror("dynamic constant assignment"); 06407 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06408 /*% 06409 $$ = dispatch2(const_path_field, $1, $3); 06410 if (in_def || in_single) { 06411 $$ = dispatch1(assign_error, $$); 06412 } 06413 %*/ 06414 ;} 06415 break; 06416 06417 case 109: 06418 #line 1775 "parse.y" 06419 { 06420 /*%%%*/ 06421 if (in_def || in_single) 06422 yyerror("dynamic constant assignment"); 06423 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06424 /*% 06425 $$ = dispatch1(top_const_field, $2); 06426 if (in_def || in_single) { 06427 $$ = dispatch1(assign_error, $$); 06428 } 06429 %*/ 06430 ;} 06431 break; 06432 06433 case 110: 06434 #line 1788 "parse.y" 06435 { 06436 /*%%%*/ 06437 rb_backref_error((yyvsp[(1) - (1)].node)); 06438 (yyval.node) = NEW_BEGIN(0); 06439 /*% 06440 $$ = dispatch1(assign_error, $1); 06441 %*/ 06442 ;} 06443 break; 06444 06445 case 111: 06446 #line 1799 "parse.y" 06447 { 06448 /*%%%*/ 06449 yyerror("class/module name must be CONSTANT"); 06450 /*% 06451 $$ = dispatch1(class_name_error, $1); 06452 %*/ 06453 ;} 06454 break; 06455 06456 case 113: 06457 #line 1810 "parse.y" 06458 { 06459 /*%%%*/ 06460 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 06461 /*% 06462 $$ = dispatch1(top_const_ref, $2); 06463 %*/ 06464 ;} 06465 break; 06466 06467 case 114: 06468 #line 1818 "parse.y" 06469 { 06470 /*%%%*/ 06471 (yyval.node) = NEW_COLON2(0, (yyval.node)); 06472 /*% 06473 $$ = dispatch1(const_ref, $1); 06474 %*/ 06475 ;} 06476 break; 06477 06478 case 115: 06479 #line 1826 "parse.y" 06480 { 06481 /*%%%*/ 06482 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06483 /*% 06484 $$ = dispatch2(const_path_ref, $1, $3); 06485 %*/ 06486 ;} 06487 break; 06488 06489 case 119: 06490 #line 1839 "parse.y" 06491 { 06492 lex_state = EXPR_ENDFN; 06493 (yyval.id) = (yyvsp[(1) - (1)].id); 06494 ;} 06495 break; 06496 06497 case 120: 06498 #line 1844 "parse.y" 06499 { 06500 lex_state = EXPR_ENDFN; 06501 /*%%%*/ 06502 (yyval.id) = (yyvsp[(1) - (1)].id); 06503 /*% 06504 $$ = $1; 06505 %*/ 06506 ;} 06507 break; 06508 06509 case 123: 06510 #line 1859 "parse.y" 06511 { 06512 /*%%%*/ 06513 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 06514 /*% 06515 $$ = dispatch1(symbol_literal, $1); 06516 %*/ 06517 ;} 06518 break; 06519 06520 case 125: 06521 #line 1870 "parse.y" 06522 { 06523 /*%%%*/ 06524 (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node)); 06525 /*% 06526 $$ = rb_ary_new3(1, $1); 06527 %*/ 06528 ;} 06529 break; 06530 06531 case 126: 06532 #line 1877 "parse.y" 06533 {lex_state = EXPR_FNAME;;} 06534 break; 06535 06536 case 127: 06537 #line 1878 "parse.y" 06538 { 06539 /*%%%*/ 06540 (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node))); 06541 /*% 06542 rb_ary_push($1, $4); 06543 %*/ 06544 ;} 06545 break; 06546 06547 case 128: 06548 #line 1887 "parse.y" 06549 { ifndef_ripper((yyval.id) = '|'); ;} 06550 break; 06551 06552 case 129: 06553 #line 1888 "parse.y" 06554 { ifndef_ripper((yyval.id) = '^'); ;} 06555 break; 06556 06557 case 130: 06558 #line 1889 "parse.y" 06559 { ifndef_ripper((yyval.id) = '&'); ;} 06560 break; 06561 06562 case 131: 06563 #line 1890 "parse.y" 06564 { ifndef_ripper((yyval.id) = tCMP); ;} 06565 break; 06566 06567 case 132: 06568 #line 1891 "parse.y" 06569 { ifndef_ripper((yyval.id) = tEQ); ;} 06570 break; 06571 06572 case 133: 06573 #line 1892 "parse.y" 06574 { ifndef_ripper((yyval.id) = tEQQ); ;} 06575 break; 06576 06577 case 134: 06578 #line 1893 "parse.y" 06579 { ifndef_ripper((yyval.id) = tMATCH); ;} 06580 break; 06581 06582 case 135: 06583 #line 1894 "parse.y" 06584 { ifndef_ripper((yyval.id) = tNMATCH); ;} 06585 break; 06586 06587 case 136: 06588 #line 1895 "parse.y" 06589 { ifndef_ripper((yyval.id) = '>'); ;} 06590 break; 06591 06592 case 137: 06593 #line 1896 "parse.y" 06594 { ifndef_ripper((yyval.id) = tGEQ); ;} 06595 break; 06596 06597 case 138: 06598 #line 1897 "parse.y" 06599 { ifndef_ripper((yyval.id) = '<'); ;} 06600 break; 06601 06602 case 139: 06603 #line 1898 "parse.y" 06604 { ifndef_ripper((yyval.id) = tLEQ); ;} 06605 break; 06606 06607 case 140: 06608 #line 1899 "parse.y" 06609 { ifndef_ripper((yyval.id) = tNEQ); ;} 06610 break; 06611 06612 case 141: 06613 #line 1900 "parse.y" 06614 { ifndef_ripper((yyval.id) = tLSHFT); ;} 06615 break; 06616 06617 case 142: 06618 #line 1901 "parse.y" 06619 { ifndef_ripper((yyval.id) = tRSHFT); ;} 06620 break; 06621 06622 case 143: 06623 #line 1902 "parse.y" 06624 { ifndef_ripper((yyval.id) = '+'); ;} 06625 break; 06626 06627 case 144: 06628 #line 1903 "parse.y" 06629 { ifndef_ripper((yyval.id) = '-'); ;} 06630 break; 06631 06632 case 145: 06633 #line 1904 "parse.y" 06634 { ifndef_ripper((yyval.id) = '*'); ;} 06635 break; 06636 06637 case 146: 06638 #line 1905 "parse.y" 06639 { ifndef_ripper((yyval.id) = '*'); ;} 06640 break; 06641 06642 case 147: 06643 #line 1906 "parse.y" 06644 { ifndef_ripper((yyval.id) = '/'); ;} 06645 break; 06646 06647 case 148: 06648 #line 1907 "parse.y" 06649 { ifndef_ripper((yyval.id) = '%'); ;} 06650 break; 06651 06652 case 149: 06653 #line 1908 "parse.y" 06654 { ifndef_ripper((yyval.id) = tPOW); ;} 06655 break; 06656 06657 case 150: 06658 #line 1909 "parse.y" 06659 { ifndef_ripper((yyval.id) = tDSTAR); ;} 06660 break; 06661 06662 case 151: 06663 #line 1910 "parse.y" 06664 { ifndef_ripper((yyval.id) = '!'); ;} 06665 break; 06666 06667 case 152: 06668 #line 1911 "parse.y" 06669 { ifndef_ripper((yyval.id) = '~'); ;} 06670 break; 06671 06672 case 153: 06673 #line 1912 "parse.y" 06674 { ifndef_ripper((yyval.id) = tUPLUS); ;} 06675 break; 06676 06677 case 154: 06678 #line 1913 "parse.y" 06679 { ifndef_ripper((yyval.id) = tUMINUS); ;} 06680 break; 06681 06682 case 155: 06683 #line 1914 "parse.y" 06684 { ifndef_ripper((yyval.id) = tAREF); ;} 06685 break; 06686 06687 case 156: 06688 #line 1915 "parse.y" 06689 { ifndef_ripper((yyval.id) = tASET); ;} 06690 break; 06691 06692 case 157: 06693 #line 1916 "parse.y" 06694 { ifndef_ripper((yyval.id) = '`'); ;} 06695 break; 06696 06697 case 199: 06698 #line 1934 "parse.y" 06699 { 06700 /*%%%*/ 06701 value_expr((yyvsp[(3) - (3)].node)); 06702 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06703 /*% 06704 $$ = dispatch2(assign, $1, $3); 06705 %*/ 06706 ;} 06707 break; 06708 06709 case 200: 06710 #line 1943 "parse.y" 06711 { 06712 /*%%%*/ 06713 value_expr((yyvsp[(3) - (5)].node)); 06714 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06715 (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node)); 06716 /*% 06717 $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); 06718 %*/ 06719 ;} 06720 break; 06721 06722 case 201: 06723 #line 1953 "parse.y" 06724 { 06725 value_expr((yyvsp[(3) - (3)].node)); 06726 (yyval.node) = new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node)); 06727 ;} 06728 break; 06729 06730 case 202: 06731 #line 1958 "parse.y" 06732 { 06733 /*%%%*/ 06734 value_expr((yyvsp[(3) - (5)].node)); 06735 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06736 /*% 06737 $3 = dispatch2(rescue_mod, $3, $5); 06738 %*/ 06739 (yyval.node) = new_op_assign((yyvsp[(1) - (5)].node), (yyvsp[(2) - (5)].id), (yyvsp[(3) - (5)].node)); 06740 ;} 06741 break; 06742 06743 case 203: 06744 #line 1968 "parse.y" 06745 { 06746 /*%%%*/ 06747 NODE *args; 06748 06749 value_expr((yyvsp[(6) - (6)].node)); 06750 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 06751 if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) { 06752 args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06753 } 06754 else { 06755 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06756 } 06757 if ((yyvsp[(5) - (6)].id) == tOROP) { 06758 (yyvsp[(5) - (6)].id) = 0; 06759 } 06760 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 06761 (yyvsp[(5) - (6)].id) = 1; 06762 } 06763 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 06764 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 06765 /*% 06766 $1 = dispatch2(aref_field, $1, escape_Qundef($3)); 06767 $$ = dispatch3(opassign, $1, $5, $6); 06768 %*/ 06769 ;} 06770 break; 06771 06772 case 204: 06773 #line 1994 "parse.y" 06774 { 06775 value_expr((yyvsp[(5) - (5)].node)); 06776 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06777 ;} 06778 break; 06779 06780 case 205: 06781 #line 1999 "parse.y" 06782 { 06783 value_expr((yyvsp[(5) - (5)].node)); 06784 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06785 ;} 06786 break; 06787 06788 case 206: 06789 #line 2004 "parse.y" 06790 { 06791 value_expr((yyvsp[(5) - (5)].node)); 06792 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_intern("::"), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06793 ;} 06794 break; 06795 06796 case 207: 06797 #line 2009 "parse.y" 06798 { 06799 /*%%%*/ 06800 (yyval.node) = NEW_COLON2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id)); 06801 (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06802 /*% 06803 $$ = dispatch2(const_path_field, $1, $3); 06804 $$ = dispatch3(opassign, $$, $4, $5); 06805 %*/ 06806 ;} 06807 break; 06808 06809 case 208: 06810 #line 2019 "parse.y" 06811 { 06812 /*%%%*/ 06813 (yyval.node) = NEW_COLON3((yyvsp[(2) - (4)].id)); 06814 (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 06815 /*% 06816 $$ = dispatch1(top_const_field, $2); 06817 $$ = dispatch3(opassign, $$, $3, $4); 06818 %*/ 06819 ;} 06820 break; 06821 06822 case 209: 06823 #line 2029 "parse.y" 06824 { 06825 /*%%%*/ 06826 rb_backref_error((yyvsp[(1) - (3)].node)); 06827 (yyval.node) = NEW_BEGIN(0); 06828 /*% 06829 $$ = dispatch1(var_field, $1); 06830 $$ = dispatch3(opassign, $$, $2, $3); 06831 $$ = dispatch1(assign_error, $$); 06832 %*/ 06833 ;} 06834 break; 06835 06836 case 210: 06837 #line 2040 "parse.y" 06838 { 06839 /*%%%*/ 06840 value_expr((yyvsp[(1) - (3)].node)); 06841 value_expr((yyvsp[(3) - (3)].node)); 06842 (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06843 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 06844 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 06845 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 06846 } 06847 /*% 06848 $$ = dispatch2(dot2, $1, $3); 06849 %*/ 06850 ;} 06851 break; 06852 06853 case 211: 06854 #line 2054 "parse.y" 06855 { 06856 /*%%%*/ 06857 value_expr((yyvsp[(1) - (3)].node)); 06858 value_expr((yyvsp[(3) - (3)].node)); 06859 (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06860 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 06861 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 06862 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 06863 } 06864 /*% 06865 $$ = dispatch2(dot3, $1, $3); 06866 %*/ 06867 ;} 06868 break; 06869 06870 case 212: 06871 #line 2068 "parse.y" 06872 { 06873 /*%%%*/ 06874 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node)); 06875 /*% 06876 $$ = dispatch3(binary, $1, ID2SYM('+'), $3); 06877 %*/ 06878 ;} 06879 break; 06880 06881 case 213: 06882 #line 2076 "parse.y" 06883 { 06884 /*%%%*/ 06885 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node)); 06886 /*% 06887 $$ = dispatch3(binary, $1, ID2SYM('-'), $3); 06888 %*/ 06889 ;} 06890 break; 06891 06892 case 214: 06893 #line 2084 "parse.y" 06894 { 06895 /*%%%*/ 06896 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node)); 06897 /*% 06898 $$ = dispatch3(binary, $1, ID2SYM('*'), $3); 06899 %*/ 06900 ;} 06901 break; 06902 06903 case 215: 06904 #line 2092 "parse.y" 06905 { 06906 /*%%%*/ 06907 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node)); 06908 /*% 06909 $$ = dispatch3(binary, $1, ID2SYM('/'), $3); 06910 %*/ 06911 ;} 06912 break; 06913 06914 case 216: 06915 #line 2100 "parse.y" 06916 { 06917 /*%%%*/ 06918 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node)); 06919 /*% 06920 $$ = dispatch3(binary, $1, ID2SYM('%'), $3); 06921 %*/ 06922 ;} 06923 break; 06924 06925 case 217: 06926 #line 2108 "parse.y" 06927 { 06928 /*%%%*/ 06929 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node)); 06930 /*% 06931 $$ = dispatch3(binary, $1, ripper_intern("**"), $3); 06932 %*/ 06933 ;} 06934 break; 06935 06936 case 218: 06937 #line 2116 "parse.y" 06938 { 06939 /*%%%*/ 06940 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 06941 /*% 06942 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 06943 $$ = dispatch2(unary, ripper_intern("-@"), $$); 06944 %*/ 06945 ;} 06946 break; 06947 06948 case 219: 06949 #line 2125 "parse.y" 06950 { 06951 /*%%%*/ 06952 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 06953 /*% 06954 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 06955 $$ = dispatch2(unary, ripper_intern("-@"), $$); 06956 %*/ 06957 ;} 06958 break; 06959 06960 case 220: 06961 #line 2134 "parse.y" 06962 { 06963 /*%%%*/ 06964 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS); 06965 /*% 06966 $$ = dispatch2(unary, ripper_intern("+@"), $2); 06967 %*/ 06968 ;} 06969 break; 06970 06971 case 221: 06972 #line 2142 "parse.y" 06973 { 06974 /*%%%*/ 06975 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS); 06976 /*% 06977 $$ = dispatch2(unary, ripper_intern("-@"), $2); 06978 %*/ 06979 ;} 06980 break; 06981 06982 case 222: 06983 #line 2150 "parse.y" 06984 { 06985 /*%%%*/ 06986 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node)); 06987 /*% 06988 $$ = dispatch3(binary, $1, ID2SYM('|'), $3); 06989 %*/ 06990 ;} 06991 break; 06992 06993 case 223: 06994 #line 2158 "parse.y" 06995 { 06996 /*%%%*/ 06997 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node)); 06998 /*% 06999 $$ = dispatch3(binary, $1, ID2SYM('^'), $3); 07000 %*/ 07001 ;} 07002 break; 07003 07004 case 224: 07005 #line 2166 "parse.y" 07006 { 07007 /*%%%*/ 07008 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node)); 07009 /*% 07010 $$ = dispatch3(binary, $1, ID2SYM('&'), $3); 07011 %*/ 07012 ;} 07013 break; 07014 07015 case 225: 07016 #line 2174 "parse.y" 07017 { 07018 /*%%%*/ 07019 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node)); 07020 /*% 07021 $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); 07022 %*/ 07023 ;} 07024 break; 07025 07026 case 226: 07027 #line 2182 "parse.y" 07028 { 07029 /*%%%*/ 07030 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node)); 07031 /*% 07032 $$ = dispatch3(binary, $1, ID2SYM('>'), $3); 07033 %*/ 07034 ;} 07035 break; 07036 07037 case 227: 07038 #line 2190 "parse.y" 07039 { 07040 /*%%%*/ 07041 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node)); 07042 /*% 07043 $$ = dispatch3(binary, $1, ripper_intern(">="), $3); 07044 %*/ 07045 ;} 07046 break; 07047 07048 case 228: 07049 #line 2198 "parse.y" 07050 { 07051 /*%%%*/ 07052 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node)); 07053 /*% 07054 $$ = dispatch3(binary, $1, ID2SYM('<'), $3); 07055 %*/ 07056 ;} 07057 break; 07058 07059 case 229: 07060 #line 2206 "parse.y" 07061 { 07062 /*%%%*/ 07063 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node)); 07064 /*% 07065 $$ = dispatch3(binary, $1, ripper_intern("<="), $3); 07066 %*/ 07067 ;} 07068 break; 07069 07070 case 230: 07071 #line 2214 "parse.y" 07072 { 07073 /*%%%*/ 07074 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node)); 07075 /*% 07076 $$ = dispatch3(binary, $1, ripper_intern("=="), $3); 07077 %*/ 07078 ;} 07079 break; 07080 07081 case 231: 07082 #line 2222 "parse.y" 07083 { 07084 /*%%%*/ 07085 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node)); 07086 /*% 07087 $$ = dispatch3(binary, $1, ripper_intern("==="), $3); 07088 %*/ 07089 ;} 07090 break; 07091 07092 case 232: 07093 #line 2230 "parse.y" 07094 { 07095 /*%%%*/ 07096 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node)); 07097 /*% 07098 $$ = dispatch3(binary, $1, ripper_intern("!="), $3); 07099 %*/ 07100 ;} 07101 break; 07102 07103 case 233: 07104 #line 2238 "parse.y" 07105 { 07106 /*%%%*/ 07107 (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07108 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && RB_TYPE_P((yyvsp[(1) - (3)].node)->nd_lit, T_REGEXP)) { 07109 (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node)); 07110 } 07111 /*% 07112 $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); 07113 %*/ 07114 ;} 07115 break; 07116 07117 case 234: 07118 #line 2249 "parse.y" 07119 { 07120 /*%%%*/ 07121 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node)); 07122 /*% 07123 $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); 07124 %*/ 07125 ;} 07126 break; 07127 07128 case 235: 07129 #line 2257 "parse.y" 07130 { 07131 /*%%%*/ 07132 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 07133 /*% 07134 $$ = dispatch2(unary, ID2SYM('!'), $2); 07135 %*/ 07136 ;} 07137 break; 07138 07139 case 236: 07140 #line 2265 "parse.y" 07141 { 07142 /*%%%*/ 07143 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~'); 07144 /*% 07145 $$ = dispatch2(unary, ID2SYM('~'), $2); 07146 %*/ 07147 ;} 07148 break; 07149 07150 case 237: 07151 #line 2273 "parse.y" 07152 { 07153 /*%%%*/ 07154 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node)); 07155 /*% 07156 $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); 07157 %*/ 07158 ;} 07159 break; 07160 07161 case 238: 07162 #line 2281 "parse.y" 07163 { 07164 /*%%%*/ 07165 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node)); 07166 /*% 07167 $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); 07168 %*/ 07169 ;} 07170 break; 07171 07172 case 239: 07173 #line 2289 "parse.y" 07174 { 07175 /*%%%*/ 07176 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07177 /*% 07178 $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); 07179 %*/ 07180 ;} 07181 break; 07182 07183 case 240: 07184 #line 2297 "parse.y" 07185 { 07186 /*%%%*/ 07187 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07188 /*% 07189 $$ = dispatch3(binary, $1, ripper_intern("||"), $3); 07190 %*/ 07191 ;} 07192 break; 07193 07194 case 241: 07195 #line 2304 "parse.y" 07196 {in_defined = 1;;} 07197 break; 07198 07199 case 242: 07200 #line 2305 "parse.y" 07201 { 07202 /*%%%*/ 07203 in_defined = 0; 07204 (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node)); 07205 /*% 07206 in_defined = 0; 07207 $$ = dispatch1(defined, $4); 07208 %*/ 07209 ;} 07210 break; 07211 07212 case 243: 07213 #line 2315 "parse.y" 07214 { 07215 /*%%%*/ 07216 value_expr((yyvsp[(1) - (6)].node)); 07217 (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 07218 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 07219 /*% 07220 $$ = dispatch3(ifop, $1, $3, $6); 07221 %*/ 07222 ;} 07223 break; 07224 07225 case 244: 07226 #line 2325 "parse.y" 07227 { 07228 (yyval.node) = (yyvsp[(1) - (1)].node); 07229 ;} 07230 break; 07231 07232 case 245: 07233 #line 2331 "parse.y" 07234 { 07235 /*%%%*/ 07236 value_expr((yyvsp[(1) - (1)].node)); 07237 (yyval.node) = (yyvsp[(1) - (1)].node); 07238 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 07239 /*% 07240 $$ = $1; 07241 %*/ 07242 ;} 07243 break; 07244 07245 case 247: 07246 #line 2344 "parse.y" 07247 { 07248 (yyval.node) = (yyvsp[(1) - (2)].node); 07249 ;} 07250 break; 07251 07252 case 248: 07253 #line 2348 "parse.y" 07254 { 07255 /*%%%*/ 07256 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07257 /*% 07258 $$ = arg_add_assocs($1, $3); 07259 %*/ 07260 ;} 07261 break; 07262 07263 case 249: 07264 #line 2356 "parse.y" 07265 { 07266 /*%%%*/ 07267 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07268 /*% 07269 $$ = arg_add_assocs(arg_new(), $1); 07270 %*/ 07271 ;} 07272 break; 07273 07274 case 250: 07275 #line 2366 "parse.y" 07276 { 07277 /*%%%*/ 07278 (yyval.node) = (yyvsp[(2) - (3)].node); 07279 /*% 07280 $$ = dispatch1(arg_paren, escape_Qundef($2)); 07281 %*/ 07282 ;} 07283 break; 07284 07285 case 255: 07286 #line 2382 "parse.y" 07287 { 07288 (yyval.node) = (yyvsp[(1) - (2)].node); 07289 ;} 07290 break; 07291 07292 case 256: 07293 #line 2386 "parse.y" 07294 { 07295 /*%%%*/ 07296 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07297 /*% 07298 $$ = arg_add_assocs($1, $3); 07299 %*/ 07300 ;} 07301 break; 07302 07303 case 257: 07304 #line 2394 "parse.y" 07305 { 07306 /*%%%*/ 07307 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07308 /*% 07309 $$ = arg_add_assocs(arg_new(), $1); 07310 %*/ 07311 ;} 07312 break; 07313 07314 case 258: 07315 #line 2404 "parse.y" 07316 { 07317 /*%%%*/ 07318 value_expr((yyvsp[(1) - (1)].node)); 07319 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07320 /*% 07321 $$ = arg_add(arg_new(), $1); 07322 %*/ 07323 ;} 07324 break; 07325 07326 case 259: 07327 #line 2413 "parse.y" 07328 { 07329 /*%%%*/ 07330 (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 07331 /*% 07332 $$ = arg_add_optblock($1, $2); 07333 %*/ 07334 ;} 07335 break; 07336 07337 case 260: 07338 #line 2421 "parse.y" 07339 { 07340 /*%%%*/ 07341 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07342 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node)); 07343 /*% 07344 $$ = arg_add_assocs(arg_new(), $1); 07345 $$ = arg_add_optblock($$, $2); 07346 %*/ 07347 ;} 07348 break; 07349 07350 case 261: 07351 #line 2431 "parse.y" 07352 { 07353 /*%%%*/ 07354 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07355 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node)); 07356 /*% 07357 $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); 07358 %*/ 07359 ;} 07360 break; 07361 07362 case 263: 07363 #line 2448 "parse.y" 07364 { 07365 (yyval.val) = cmdarg_stack; 07366 CMDARG_PUSH(1); 07367 ;} 07368 break; 07369 07370 case 264: 07371 #line 2453 "parse.y" 07372 { 07373 /* CMDARG_POP() */ 07374 cmdarg_stack = (yyvsp[(1) - (2)].val); 07375 (yyval.node) = (yyvsp[(2) - (2)].node); 07376 ;} 07377 break; 07378 07379 case 265: 07380 #line 2461 "parse.y" 07381 { 07382 /*%%%*/ 07383 (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node)); 07384 /*% 07385 $$ = $2; 07386 %*/ 07387 ;} 07388 break; 07389 07390 case 266: 07391 #line 2471 "parse.y" 07392 { 07393 (yyval.node) = (yyvsp[(2) - (2)].node); 07394 ;} 07395 break; 07396 07397 case 267: 07398 #line 2475 "parse.y" 07399 { 07400 (yyval.node) = 0; 07401 ;} 07402 break; 07403 07404 case 268: 07405 #line 2481 "parse.y" 07406 { 07407 /*%%%*/ 07408 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07409 /*% 07410 $$ = arg_add(arg_new(), $1); 07411 %*/ 07412 ;} 07413 break; 07414 07415 case 269: 07416 #line 2489 "parse.y" 07417 { 07418 /*%%%*/ 07419 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07420 /*% 07421 $$ = arg_add_star(arg_new(), $2); 07422 %*/ 07423 ;} 07424 break; 07425 07426 case 270: 07427 #line 2497 "parse.y" 07428 { 07429 /*%%%*/ 07430 NODE *n1; 07431 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07432 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07433 } 07434 else { 07435 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07436 } 07437 /*% 07438 $$ = arg_add($1, $3); 07439 %*/ 07440 ;} 07441 break; 07442 07443 case 271: 07444 #line 2511 "parse.y" 07445 { 07446 /*%%%*/ 07447 NODE *n1; 07448 if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07449 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07450 } 07451 else { 07452 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07453 } 07454 /*% 07455 $$ = arg_add_star($1, $4); 07456 %*/ 07457 ;} 07458 break; 07459 07460 case 272: 07461 #line 2527 "parse.y" 07462 { 07463 /*%%%*/ 07464 NODE *n1; 07465 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07466 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07467 } 07468 else { 07469 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07470 } 07471 /*% 07472 $$ = mrhs_add(args2mrhs($1), $3); 07473 %*/ 07474 ;} 07475 break; 07476 07477 case 273: 07478 #line 2541 "parse.y" 07479 { 07480 /*%%%*/ 07481 NODE *n1; 07482 if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY && 07483 (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07484 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07485 } 07486 else { 07487 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07488 } 07489 /*% 07490 $$ = mrhs_add_star(args2mrhs($1), $4); 07491 %*/ 07492 ;} 07493 break; 07494 07495 case 274: 07496 #line 2556 "parse.y" 07497 { 07498 /*%%%*/ 07499 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07500 /*% 07501 $$ = mrhs_add_star(mrhs_new(), $2); 07502 %*/ 07503 ;} 07504 break; 07505 07506 case 285: 07507 #line 2576 "parse.y" 07508 { 07509 /*%%%*/ 07510 (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); 07511 /*% 07512 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07513 %*/ 07514 ;} 07515 break; 07516 07517 case 286: 07518 #line 2584 "parse.y" 07519 { 07520 (yyvsp[(1) - (1)].val) = cmdarg_stack; 07521 cmdarg_stack = 0; 07522 /*%%%*/ 07523 (yyval.num) = ruby_sourceline; 07524 /*% 07525 %*/ 07526 ;} 07527 break; 07528 07529 case 287: 07530 #line 2594 "parse.y" 07531 { 07532 cmdarg_stack = (yyvsp[(1) - (4)].val); 07533 /*%%%*/ 07534 if ((yyvsp[(3) - (4)].node) == NULL) { 07535 (yyval.node) = NEW_NIL(); 07536 } 07537 else { 07538 if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE || 07539 nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE) 07540 nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num)); 07541 (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node)); 07542 } 07543 nd_set_line((yyval.node), (yyvsp[(2) - (4)].num)); 07544 /*% 07545 $$ = dispatch1(begin, $3); 07546 %*/ 07547 ;} 07548 break; 07549 07550 case 288: 07551 #line 2611 "parse.y" 07552 {lex_state = EXPR_ENDARG;;} 07553 break; 07554 07555 case 289: 07556 #line 2612 "parse.y" 07557 { 07558 /*%%%*/ 07559 (yyval.node) = 0; 07560 /*% 07561 $$ = dispatch1(paren, 0); 07562 %*/ 07563 ;} 07564 break; 07565 07566 case 290: 07567 #line 2619 "parse.y" 07568 {lex_state = EXPR_ENDARG;;} 07569 break; 07570 07571 case 291: 07572 #line 2620 "parse.y" 07573 { 07574 /*%%%*/ 07575 (yyval.node) = (yyvsp[(2) - (4)].node); 07576 /*% 07577 $$ = dispatch1(paren, $2); 07578 %*/ 07579 ;} 07580 break; 07581 07582 case 292: 07583 #line 2628 "parse.y" 07584 { 07585 /*%%%*/ 07586 (yyval.node) = (yyvsp[(2) - (3)].node); 07587 /*% 07588 $$ = dispatch1(paren, $2); 07589 %*/ 07590 ;} 07591 break; 07592 07593 case 293: 07594 #line 2636 "parse.y" 07595 { 07596 /*%%%*/ 07597 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 07598 /*% 07599 $$ = dispatch2(const_path_ref, $1, $3); 07600 %*/ 07601 ;} 07602 break; 07603 07604 case 294: 07605 #line 2644 "parse.y" 07606 { 07607 /*%%%*/ 07608 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 07609 /*% 07610 $$ = dispatch1(top_const_ref, $2); 07611 %*/ 07612 ;} 07613 break; 07614 07615 case 295: 07616 #line 2652 "parse.y" 07617 { 07618 /*%%%*/ 07619 if ((yyvsp[(2) - (3)].node) == 0) { 07620 (yyval.node) = NEW_ZARRAY(); /* zero length array*/ 07621 } 07622 else { 07623 (yyval.node) = (yyvsp[(2) - (3)].node); 07624 } 07625 /*% 07626 $$ = dispatch1(array, escape_Qundef($2)); 07627 %*/ 07628 ;} 07629 break; 07630 07631 case 296: 07632 #line 2665 "parse.y" 07633 { 07634 /*%%%*/ 07635 (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node)); 07636 /*% 07637 $$ = dispatch1(hash, escape_Qundef($2)); 07638 %*/ 07639 ;} 07640 break; 07641 07642 case 297: 07643 #line 2673 "parse.y" 07644 { 07645 /*%%%*/ 07646 (yyval.node) = NEW_RETURN(0); 07647 /*% 07648 $$ = dispatch0(return0); 07649 %*/ 07650 ;} 07651 break; 07652 07653 case 298: 07654 #line 2681 "parse.y" 07655 { 07656 /*%%%*/ 07657 (yyval.node) = new_yield((yyvsp[(3) - (4)].node)); 07658 /*% 07659 $$ = dispatch1(yield, dispatch1(paren, $3)); 07660 %*/ 07661 ;} 07662 break; 07663 07664 case 299: 07665 #line 2689 "parse.y" 07666 { 07667 /*%%%*/ 07668 (yyval.node) = NEW_YIELD(0); 07669 /*% 07670 $$ = dispatch1(yield, dispatch1(paren, arg_new())); 07671 %*/ 07672 ;} 07673 break; 07674 07675 case 300: 07676 #line 2697 "parse.y" 07677 { 07678 /*%%%*/ 07679 (yyval.node) = NEW_YIELD(0); 07680 /*% 07681 $$ = dispatch0(yield0); 07682 %*/ 07683 ;} 07684 break; 07685 07686 case 301: 07687 #line 2704 "parse.y" 07688 {in_defined = 1;;} 07689 break; 07690 07691 case 302: 07692 #line 2705 "parse.y" 07693 { 07694 /*%%%*/ 07695 in_defined = 0; 07696 (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node)); 07697 /*% 07698 in_defined = 0; 07699 $$ = dispatch1(defined, $5); 07700 %*/ 07701 ;} 07702 break; 07703 07704 case 303: 07705 #line 2715 "parse.y" 07706 { 07707 /*%%%*/ 07708 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!'); 07709 /*% 07710 $$ = dispatch2(unary, ripper_intern("not"), $3); 07711 %*/ 07712 ;} 07713 break; 07714 07715 case 304: 07716 #line 2723 "parse.y" 07717 { 07718 /*%%%*/ 07719 (yyval.node) = call_uni_op(cond(NEW_NIL()), '!'); 07720 /*% 07721 $$ = dispatch2(unary, ripper_intern("not"), Qnil); 07722 %*/ 07723 ;} 07724 break; 07725 07726 case 305: 07727 #line 2731 "parse.y" 07728 { 07729 /*%%%*/ 07730 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 07731 (yyval.node) = (yyvsp[(2) - (2)].node); 07732 /*% 07733 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07734 $$ = method_add_block($$, $2); 07735 %*/ 07736 ;} 07737 break; 07738 07739 case 307: 07740 #line 2742 "parse.y" 07741 { 07742 /*%%%*/ 07743 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 07744 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 07745 (yyval.node) = (yyvsp[(2) - (2)].node); 07746 /*% 07747 $$ = method_add_block($1, $2); 07748 %*/ 07749 ;} 07750 break; 07751 07752 case 308: 07753 #line 2752 "parse.y" 07754 { 07755 (yyval.node) = (yyvsp[(2) - (2)].node); 07756 ;} 07757 break; 07758 07759 case 309: 07760 #line 2759 "parse.y" 07761 { 07762 /*%%%*/ 07763 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 07764 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 07765 /*% 07766 $$ = dispatch3(if, $2, $4, escape_Qundef($5)); 07767 %*/ 07768 ;} 07769 break; 07770 07771 case 310: 07772 #line 2771 "parse.y" 07773 { 07774 /*%%%*/ 07775 (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 07776 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 07777 /*% 07778 $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); 07779 %*/ 07780 ;} 07781 break; 07782 07783 case 311: 07784 #line 2779 "parse.y" 07785 {COND_PUSH(1);;} 07786 break; 07787 07788 case 312: 07789 #line 2779 "parse.y" 07790 {COND_POP();;} 07791 break; 07792 07793 case 313: 07794 #line 2782 "parse.y" 07795 { 07796 /*%%%*/ 07797 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 07798 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 07799 /*% 07800 $$ = dispatch2(while, $3, $6); 07801 %*/ 07802 ;} 07803 break; 07804 07805 case 314: 07806 #line 2790 "parse.y" 07807 {COND_PUSH(1);;} 07808 break; 07809 07810 case 315: 07811 #line 2790 "parse.y" 07812 {COND_POP();;} 07813 break; 07814 07815 case 316: 07816 #line 2793 "parse.y" 07817 { 07818 /*%%%*/ 07819 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 07820 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 07821 /*% 07822 $$ = dispatch2(until, $3, $6); 07823 %*/ 07824 ;} 07825 break; 07826 07827 case 317: 07828 #line 2804 "parse.y" 07829 { 07830 /*%%%*/ 07831 (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 07832 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 07833 /*% 07834 $$ = dispatch2(case, $2, $4); 07835 %*/ 07836 ;} 07837 break; 07838 07839 case 318: 07840 #line 2813 "parse.y" 07841 { 07842 /*%%%*/ 07843 (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node)); 07844 /*% 07845 $$ = dispatch2(case, Qnil, $3); 07846 %*/ 07847 ;} 07848 break; 07849 07850 case 319: 07851 #line 2821 "parse.y" 07852 {COND_PUSH(1);;} 07853 break; 07854 07855 case 320: 07856 #line 2823 "parse.y" 07857 {COND_POP();;} 07858 break; 07859 07860 case 321: 07861 #line 2826 "parse.y" 07862 { 07863 /*%%%*/ 07864 /* 07865 * for a, b, c in e 07866 * #=> 07867 * e.each{|*x| a, b, c = x 07868 * 07869 * for a in e 07870 * #=> 07871 * e.each{|x| a, = x} 07872 */ 07873 ID id = internal_id(); 07874 ID *tbl = ALLOC_N(ID, 2); 07875 NODE *m = NEW_ARGS_AUX(0, 0); 07876 NODE *args, *scope; 07877 07878 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) { 07879 /* if args.length == 1 && args[0].kind_of?(Array) 07880 * args = args[0] 07881 * end 07882 */ 07883 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 07884 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 07885 m->nd_next = block_append( 07886 NEW_IF( 07887 NEW_NODE(NODE_AND, 07888 NEW_CALL(NEW_CALL(NEW_DVAR(id), idLength, 0), 07889 idEq, one), 07890 NEW_CALL(NEW_CALL(NEW_DVAR(id), idAREF, zero), 07891 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 07892 0), 07893 NEW_DASGN_CURR(id, 07894 NEW_CALL(NEW_DVAR(id), idAREF, zero)), 07895 0), 07896 node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id))); 07897 07898 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 07899 } 07900 else { 07901 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN || 07902 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN || 07903 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) { 07904 (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id); 07905 m->nd_plen = 1; 07906 m->nd_next = (yyvsp[(2) - (9)].node); 07907 args = new_args(m, 0, 0, 0, new_args_tail(0, 0, 0)); 07908 } 07909 else { 07910 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id)); 07911 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 07912 } 07913 } 07914 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args); 07915 tbl[0] = 1; tbl[1] = id; 07916 (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope); 07917 fixpos((yyval.node), (yyvsp[(2) - (9)].node)); 07918 /*% 07919 $$ = dispatch3(for, $2, $5, $8); 07920 %*/ 07921 ;} 07922 break; 07923 07924 case 322: 07925 #line 2887 "parse.y" 07926 { 07927 if (in_def || in_single) 07928 yyerror("class definition in method body"); 07929 local_push(0); 07930 /*%%%*/ 07931 (yyval.num) = ruby_sourceline; 07932 /*% 07933 %*/ 07934 ;} 07935 break; 07936 07937 case 323: 07938 #line 2898 "parse.y" 07939 { 07940 /*%%%*/ 07941 (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node)); 07942 nd_set_line((yyval.node), (yyvsp[(4) - (6)].num)); 07943 /*% 07944 $$ = dispatch3(class, $2, $3, $5); 07945 %*/ 07946 local_pop(); 07947 ;} 07948 break; 07949 07950 case 324: 07951 #line 2908 "parse.y" 07952 { 07953 (yyval.num) = in_def; 07954 in_def = 0; 07955 ;} 07956 break; 07957 07958 case 325: 07959 #line 2913 "parse.y" 07960 { 07961 (yyval.num) = in_single; 07962 in_single = 0; 07963 local_push(0); 07964 ;} 07965 break; 07966 07967 case 326: 07968 #line 2920 "parse.y" 07969 { 07970 /*%%%*/ 07971 (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node)); 07972 fixpos((yyval.node), (yyvsp[(3) - (8)].node)); 07973 /*% 07974 $$ = dispatch2(sclass, $3, $7); 07975 %*/ 07976 local_pop(); 07977 in_def = (yyvsp[(4) - (8)].num); 07978 in_single = (yyvsp[(6) - (8)].num); 07979 ;} 07980 break; 07981 07982 case 327: 07983 #line 2932 "parse.y" 07984 { 07985 if (in_def || in_single) 07986 yyerror("module definition in method body"); 07987 local_push(0); 07988 /*%%%*/ 07989 (yyval.num) = ruby_sourceline; 07990 /*% 07991 %*/ 07992 ;} 07993 break; 07994 07995 case 328: 07996 #line 2943 "parse.y" 07997 { 07998 /*%%%*/ 07999 (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 08000 nd_set_line((yyval.node), (yyvsp[(3) - (5)].num)); 08001 /*% 08002 $$ = dispatch2(module, $2, $4); 08003 %*/ 08004 local_pop(); 08005 ;} 08006 break; 08007 08008 case 329: 08009 #line 2953 "parse.y" 08010 { 08011 (yyval.id) = cur_mid; 08012 cur_mid = (yyvsp[(2) - (2)].id); 08013 in_def++; 08014 local_push(0); 08015 ;} 08016 break; 08017 08018 case 330: 08019 #line 2962 "parse.y" 08020 { 08021 /*%%%*/ 08022 NODE *body = remove_begin((yyvsp[(5) - (6)].node)); 08023 reduce_nodes(&body); 08024 (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE); 08025 nd_set_line((yyval.node), (yyvsp[(1) - (6)].num)); 08026 /*% 08027 $$ = dispatch3(def, $2, $4, $5); 08028 %*/ 08029 local_pop(); 08030 in_def--; 08031 cur_mid = (yyvsp[(3) - (6)].id); 08032 ;} 08033 break; 08034 08035 case 331: 08036 #line 2975 "parse.y" 08037 {lex_state = EXPR_FNAME;;} 08038 break; 08039 08040 case 332: 08041 #line 2976 "parse.y" 08042 { 08043 in_single++; 08044 lex_state = EXPR_ENDFN; /* force for args */ 08045 local_push(0); 08046 ;} 08047 break; 08048 08049 case 333: 08050 #line 2984 "parse.y" 08051 { 08052 /*%%%*/ 08053 NODE *body = remove_begin((yyvsp[(8) - (9)].node)); 08054 reduce_nodes(&body); 08055 (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body); 08056 nd_set_line((yyval.node), (yyvsp[(1) - (9)].num)); 08057 /*% 08058 $$ = dispatch5(defs, $2, $3, $5, $7, $8); 08059 %*/ 08060 local_pop(); 08061 in_single--; 08062 ;} 08063 break; 08064 08065 case 334: 08066 #line 2997 "parse.y" 08067 { 08068 /*%%%*/ 08069 (yyval.node) = NEW_BREAK(0); 08070 /*% 08071 $$ = dispatch1(break, arg_new()); 08072 %*/ 08073 ;} 08074 break; 08075 08076 case 335: 08077 #line 3005 "parse.y" 08078 { 08079 /*%%%*/ 08080 (yyval.node) = NEW_NEXT(0); 08081 /*% 08082 $$ = dispatch1(next, arg_new()); 08083 %*/ 08084 ;} 08085 break; 08086 08087 case 336: 08088 #line 3013 "parse.y" 08089 { 08090 /*%%%*/ 08091 (yyval.node) = NEW_REDO(); 08092 /*% 08093 $$ = dispatch0(redo); 08094 %*/ 08095 ;} 08096 break; 08097 08098 case 337: 08099 #line 3021 "parse.y" 08100 { 08101 /*%%%*/ 08102 (yyval.node) = NEW_RETRY(); 08103 /*% 08104 $$ = dispatch0(retry); 08105 %*/ 08106 ;} 08107 break; 08108 08109 case 338: 08110 #line 3031 "parse.y" 08111 { 08112 /*%%%*/ 08113 value_expr((yyvsp[(1) - (1)].node)); 08114 (yyval.node) = (yyvsp[(1) - (1)].node); 08115 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 08116 /*% 08117 $$ = $1; 08118 %*/ 08119 ;} 08120 break; 08121 08122 case 339: 08123 #line 3043 "parse.y" 08124 { 08125 token_info_push("begin"); 08126 ;} 08127 break; 08128 08129 case 340: 08130 #line 3049 "parse.y" 08131 { 08132 token_info_push("if"); 08133 ;} 08134 break; 08135 08136 case 341: 08137 #line 3055 "parse.y" 08138 { 08139 token_info_push("unless"); 08140 ;} 08141 break; 08142 08143 case 342: 08144 #line 3061 "parse.y" 08145 { 08146 token_info_push("while"); 08147 ;} 08148 break; 08149 08150 case 343: 08151 #line 3067 "parse.y" 08152 { 08153 token_info_push("until"); 08154 ;} 08155 break; 08156 08157 case 344: 08158 #line 3073 "parse.y" 08159 { 08160 token_info_push("case"); 08161 ;} 08162 break; 08163 08164 case 345: 08165 #line 3079 "parse.y" 08166 { 08167 token_info_push("for"); 08168 ;} 08169 break; 08170 08171 case 346: 08172 #line 3085 "parse.y" 08173 { 08174 token_info_push("class"); 08175 ;} 08176 break; 08177 08178 case 347: 08179 #line 3091 "parse.y" 08180 { 08181 token_info_push("module"); 08182 ;} 08183 break; 08184 08185 case 348: 08186 #line 3097 "parse.y" 08187 { 08188 token_info_push("def"); 08189 /*%%%*/ 08190 (yyval.num) = ruby_sourceline; 08191 /*% 08192 %*/ 08193 ;} 08194 break; 08195 08196 case 349: 08197 #line 3107 "parse.y" 08198 { 08199 token_info_pop("end"); 08200 ;} 08201 break; 08202 08203 case 356: 08204 #line 3137 "parse.y" 08205 { 08206 /*%%%*/ 08207 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08208 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 08209 /*% 08210 $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); 08211 %*/ 08212 ;} 08213 break; 08214 08215 case 358: 08216 #line 3149 "parse.y" 08217 { 08218 /*%%%*/ 08219 (yyval.node) = (yyvsp[(2) - (2)].node); 08220 /*% 08221 $$ = dispatch1(else, $2); 08222 %*/ 08223 ;} 08224 break; 08225 08226 case 361: 08227 #line 3163 "parse.y" 08228 { 08229 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 08230 /*%%%*/ 08231 /*% 08232 $$ = dispatch1(mlhs_paren, $$); 08233 %*/ 08234 ;} 08235 break; 08236 08237 case 362: 08238 #line 3171 "parse.y" 08239 { 08240 /*%%%*/ 08241 (yyval.node) = (yyvsp[(2) - (3)].node); 08242 /*% 08243 $$ = dispatch1(mlhs_paren, $2); 08244 %*/ 08245 ;} 08246 break; 08247 08248 case 363: 08249 #line 3181 "parse.y" 08250 { 08251 /*%%%*/ 08252 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 08253 /*% 08254 $$ = mlhs_add(mlhs_new(), $1); 08255 %*/ 08256 ;} 08257 break; 08258 08259 case 364: 08260 #line 3189 "parse.y" 08261 { 08262 /*%%%*/ 08263 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 08264 /*% 08265 $$ = mlhs_add($1, $3); 08266 %*/ 08267 ;} 08268 break; 08269 08270 case 365: 08271 #line 3199 "parse.y" 08272 { 08273 /*%%%*/ 08274 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 08275 /*% 08276 $$ = $1; 08277 %*/ 08278 ;} 08279 break; 08280 08281 case 366: 08282 #line 3207 "parse.y" 08283 { 08284 (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0); 08285 /*%%%*/ 08286 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyval.node)); 08287 /*% 08288 $$ = mlhs_add_star($1, $$); 08289 %*/ 08290 ;} 08291 break; 08292 08293 case 367: 08294 #line 3216 "parse.y" 08295 { 08296 (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0); 08297 /*%%%*/ 08298 (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG((yyval.node), (yyvsp[(6) - (6)].node))); 08299 /*% 08300 $$ = mlhs_add_star($1, $$); 08301 %*/ 08302 ;} 08303 break; 08304 08305 case 368: 08306 #line 3225 "parse.y" 08307 { 08308 /*%%%*/ 08309 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1); 08310 /*% 08311 $$ = mlhs_add_star($1, Qnil); 08312 %*/ 08313 ;} 08314 break; 08315 08316 case 369: 08317 #line 3233 "parse.y" 08318 { 08319 /*%%%*/ 08320 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node))); 08321 /*% 08322 $$ = mlhs_add_star($1, $5); 08323 %*/ 08324 ;} 08325 break; 08326 08327 case 370: 08328 #line 3241 "parse.y" 08329 { 08330 (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0); 08331 /*%%%*/ 08332 (yyval.node) = NEW_MASGN(0, (yyval.node)); 08333 /*% 08334 $$ = mlhs_add_star(mlhs_new(), $$); 08335 %*/ 08336 ;} 08337 break; 08338 08339 case 371: 08340 #line 3250 "parse.y" 08341 { 08342 (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0); 08343 /*%%%*/ 08344 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyval.node), (yyvsp[(4) - (4)].node))); 08345 /*% 08346 #if 0 08347 TODO: Check me 08348 #endif 08349 $$ = mlhs_add_star($$, $4); 08350 %*/ 08351 ;} 08352 break; 08353 08354 case 372: 08355 #line 3262 "parse.y" 08356 { 08357 /*%%%*/ 08358 (yyval.node) = NEW_MASGN(0, -1); 08359 /*% 08360 $$ = mlhs_add_star(mlhs_new(), Qnil); 08361 %*/ 08362 ;} 08363 break; 08364 08365 case 373: 08366 #line 3270 "parse.y" 08367 { 08368 /*%%%*/ 08369 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 08370 /*% 08371 $$ = mlhs_add_star(mlhs_new(), Qnil); 08372 %*/ 08373 ;} 08374 break; 08375 08376 case 374: 08377 #line 3281 "parse.y" 08378 { 08379 (yyval.node) = new_args_tail((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id)); 08380 ;} 08381 break; 08382 08383 case 375: 08384 #line 3285 "parse.y" 08385 { 08386 (yyval.node) = new_args_tail((yyvsp[(1) - (2)].node), Qnone, (yyvsp[(2) - (2)].id)); 08387 ;} 08388 break; 08389 08390 case 376: 08391 #line 3289 "parse.y" 08392 { 08393 (yyval.node) = new_args_tail(Qnone, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id)); 08394 ;} 08395 break; 08396 08397 case 377: 08398 #line 3293 "parse.y" 08399 { 08400 (yyval.node) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].id)); 08401 ;} 08402 break; 08403 08404 case 378: 08405 #line 3299 "parse.y" 08406 { 08407 (yyval.node) = (yyvsp[(2) - (2)].node); 08408 ;} 08409 break; 08410 08411 case 379: 08412 #line 3303 "parse.y" 08413 { 08414 (yyval.node) = new_args_tail(Qnone, Qnone, Qnone); 08415 ;} 08416 break; 08417 08418 case 380: 08419 #line 3309 "parse.y" 08420 { 08421 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), Qnone, (yyvsp[(6) - (6)].node)); 08422 ;} 08423 break; 08424 08425 case 381: 08426 #line 3313 "parse.y" 08427 { 08428 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].node)); 08429 ;} 08430 break; 08431 08432 case 382: 08433 #line 3317 "parse.y" 08434 { 08435 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), Qnone, Qnone, (yyvsp[(4) - (4)].node)); 08436 ;} 08437 break; 08438 08439 case 383: 08440 #line 3321 "parse.y" 08441 { 08442 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), Qnone, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 08443 ;} 08444 break; 08445 08446 case 384: 08447 #line 3325 "parse.y" 08448 { 08449 (yyval.node) = new_args((yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 08450 ;} 08451 break; 08452 08453 case 385: 08454 #line 3329 "parse.y" 08455 { 08456 (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone)); 08457 /*%%%*/ 08458 /*% 08459 dispatch1(excessed_comma, $$); 08460 %*/ 08461 ;} 08462 break; 08463 08464 case 386: 08465 #line 3337 "parse.y" 08466 { 08467 (yyval.node) = new_args((yyvsp[(1) - (6)].node), Qnone, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 08468 ;} 08469 break; 08470 08471 case 387: 08472 #line 3341 "parse.y" 08473 { 08474 (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].node)); 08475 ;} 08476 break; 08477 08478 case 388: 08479 #line 3345 "parse.y" 08480 { 08481 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 08482 ;} 08483 break; 08484 08485 case 389: 08486 #line 3349 "parse.y" 08487 { 08488 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 08489 ;} 08490 break; 08491 08492 case 390: 08493 #line 3353 "parse.y" 08494 { 08495 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (2)].node), Qnone, Qnone, (yyvsp[(2) - (2)].node)); 08496 ;} 08497 break; 08498 08499 case 391: 08500 #line 3357 "parse.y" 08501 { 08502 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 08503 ;} 08504 break; 08505 08506 case 392: 08507 #line 3361 "parse.y" 08508 { 08509 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].id), Qnone, (yyvsp[(2) - (2)].node)); 08510 ;} 08511 break; 08512 08513 case 393: 08514 #line 3365 "parse.y" 08515 { 08516 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 08517 ;} 08518 break; 08519 08520 case 394: 08521 #line 3369 "parse.y" 08522 { 08523 (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].node)); 08524 ;} 08525 break; 08526 08527 case 396: 08528 #line 3376 "parse.y" 08529 { 08530 command_start = TRUE; 08531 ;} 08532 break; 08533 08534 case 397: 08535 #line 3382 "parse.y" 08536 { 08537 /*%%%*/ 08538 (yyval.node) = 0; 08539 /*% 08540 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 08541 escape_Qundef($2)); 08542 %*/ 08543 ;} 08544 break; 08545 08546 case 398: 08547 #line 3391 "parse.y" 08548 { 08549 /*%%%*/ 08550 (yyval.node) = 0; 08551 /*% 08552 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 08553 Qnil); 08554 %*/ 08555 ;} 08556 break; 08557 08558 case 399: 08559 #line 3400 "parse.y" 08560 { 08561 /*%%%*/ 08562 (yyval.node) = (yyvsp[(2) - (4)].node); 08563 /*% 08564 $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); 08565 %*/ 08566 ;} 08567 break; 08568 08569 case 400: 08570 #line 3411 "parse.y" 08571 { 08572 (yyval.node) = 0; 08573 ;} 08574 break; 08575 08576 case 401: 08577 #line 3415 "parse.y" 08578 { 08579 /*%%%*/ 08580 (yyval.node) = 0; 08581 /*% 08582 $$ = $3; 08583 %*/ 08584 ;} 08585 break; 08586 08587 case 404: 08588 #line 3441 "parse.y" 08589 { 08590 new_bv(get_id((yyvsp[(1) - (1)].id))); 08591 /*%%%*/ 08592 /*% 08593 $$ = get_value($1); 08594 %*/ 08595 ;} 08596 break; 08597 08598 case 405: 08599 #line 3449 "parse.y" 08600 { 08601 (yyval.node) = 0; 08602 ;} 08603 break; 08604 08605 case 406: 08606 #line 3454 "parse.y" 08607 { 08608 (yyval.vars) = dyna_push(); 08609 ;} 08610 break; 08611 08612 case 407: 08613 #line 3457 "parse.y" 08614 { 08615 (yyval.num) = lpar_beg; 08616 lpar_beg = ++paren_nest; 08617 ;} 08618 break; 08619 08620 case 408: 08621 #line 3463 "parse.y" 08622 { 08623 lpar_beg = (yyvsp[(2) - (4)].num); 08624 /*%%%*/ 08625 (yyval.node) = NEW_LAMBDA((yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 08626 /*% 08627 $$ = dispatch2(lambda, $3, $4); 08628 %*/ 08629 dyna_pop((yyvsp[(1) - (4)].vars)); 08630 ;} 08631 break; 08632 08633 case 409: 08634 #line 3475 "parse.y" 08635 { 08636 /*%%%*/ 08637 (yyval.node) = (yyvsp[(2) - (4)].node); 08638 /*% 08639 $$ = dispatch1(paren, $2); 08640 %*/ 08641 ;} 08642 break; 08643 08644 case 410: 08645 #line 3483 "parse.y" 08646 { 08647 /*%%%*/ 08648 (yyval.node) = (yyvsp[(1) - (1)].node); 08649 /*% 08650 $$ = $1; 08651 %*/ 08652 ;} 08653 break; 08654 08655 case 411: 08656 #line 3493 "parse.y" 08657 { 08658 (yyval.node) = (yyvsp[(2) - (3)].node); 08659 ;} 08660 break; 08661 08662 case 412: 08663 #line 3497 "parse.y" 08664 { 08665 (yyval.node) = (yyvsp[(2) - (3)].node); 08666 ;} 08667 break; 08668 08669 case 413: 08670 #line 3503 "parse.y" 08671 { 08672 (yyvsp[(1) - (1)].vars) = dyna_push(); 08673 /*%%%*/ 08674 (yyval.num) = ruby_sourceline; 08675 /*% %*/ 08676 ;} 08677 break; 08678 08679 case 414: 08680 #line 3512 "parse.y" 08681 { 08682 /*%%%*/ 08683 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08684 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08685 /*% 08686 $$ = dispatch2(do_block, escape_Qundef($3), $4); 08687 %*/ 08688 dyna_pop((yyvsp[(1) - (5)].vars)); 08689 ;} 08690 break; 08691 08692 case 415: 08693 #line 3524 "parse.y" 08694 { 08695 /*%%%*/ 08696 if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) { 08697 compile_error(PARSER_ARG "block given to yield"); 08698 } 08699 else { 08700 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 08701 } 08702 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 08703 (yyval.node) = (yyvsp[(2) - (2)].node); 08704 fixpos((yyval.node), (yyvsp[(1) - (2)].node)); 08705 /*% 08706 $$ = method_add_block($1, $2); 08707 %*/ 08708 ;} 08709 break; 08710 08711 case 416: 08712 #line 3540 "parse.y" 08713 { 08714 /*%%%*/ 08715 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08716 /*% 08717 $$ = dispatch3(call, $1, $2, $3); 08718 $$ = method_optarg($$, $4); 08719 %*/ 08720 ;} 08721 break; 08722 08723 case 417: 08724 #line 3549 "parse.y" 08725 { 08726 /*%%%*/ 08727 block_dup_check((yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08728 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 08729 (yyval.node) = (yyvsp[(5) - (5)].node); 08730 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 08731 /*% 08732 $$ = dispatch4(command_call, $1, $2, $3, $4); 08733 $$ = method_add_block($$, $5); 08734 %*/ 08735 ;} 08736 break; 08737 08738 case 418: 08739 #line 3561 "parse.y" 08740 { 08741 /*%%%*/ 08742 block_dup_check((yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08743 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 08744 (yyval.node) = (yyvsp[(5) - (5)].node); 08745 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 08746 /*% 08747 $$ = dispatch4(command_call, $1, $2, $3, $4); 08748 $$ = method_add_block($$, $5); 08749 %*/ 08750 ;} 08751 break; 08752 08753 case 419: 08754 #line 3575 "parse.y" 08755 { 08756 /*%%%*/ 08757 (yyval.node) = (yyvsp[(1) - (2)].node); 08758 (yyval.node)->nd_args = (yyvsp[(2) - (2)].node); 08759 /*% 08760 $$ = method_arg(dispatch1(fcall, $1), $2); 08761 %*/ 08762 ;} 08763 break; 08764 08765 case 420: 08766 #line 3584 "parse.y" 08767 { 08768 /*%%%*/ 08769 (yyval.num) = ruby_sourceline; 08770 /*% %*/ 08771 ;} 08772 break; 08773 08774 case 421: 08775 #line 3590 "parse.y" 08776 { 08777 /*%%%*/ 08778 (yyval.node) = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].node)); 08779 nd_set_line((yyval.node), (yyvsp[(4) - (5)].num)); 08780 /*% 08781 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08782 $$ = method_optarg($$, $5); 08783 %*/ 08784 ;} 08785 break; 08786 08787 case 422: 08788 #line 3600 "parse.y" 08789 { 08790 /*%%%*/ 08791 (yyval.num) = ruby_sourceline; 08792 /*% %*/ 08793 ;} 08794 break; 08795 08796 case 423: 08797 #line 3606 "parse.y" 08798 { 08799 /*%%%*/ 08800 (yyval.node) = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].node)); 08801 nd_set_line((yyval.node), (yyvsp[(4) - (5)].num)); 08802 /*% 08803 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08804 $$ = method_optarg($$, $5); 08805 %*/ 08806 ;} 08807 break; 08808 08809 case 424: 08810 #line 3616 "parse.y" 08811 { 08812 /*%%%*/ 08813 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0); 08814 /*% 08815 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 08816 %*/ 08817 ;} 08818 break; 08819 08820 case 425: 08821 #line 3624 "parse.y" 08822 { 08823 /*%%%*/ 08824 (yyval.num) = ruby_sourceline; 08825 /*% %*/ 08826 ;} 08827 break; 08828 08829 case 426: 08830 #line 3630 "parse.y" 08831 { 08832 /*%%%*/ 08833 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), rb_intern("call"), (yyvsp[(4) - (4)].node)); 08834 nd_set_line((yyval.node), (yyvsp[(3) - (4)].num)); 08835 /*% 08836 $$ = dispatch3(call, $1, ripper_id2sym('.'), 08837 ripper_intern("call")); 08838 $$ = method_optarg($$, $4); 08839 %*/ 08840 ;} 08841 break; 08842 08843 case 427: 08844 #line 3641 "parse.y" 08845 { 08846 /*%%%*/ 08847 (yyval.num) = ruby_sourceline; 08848 /*% %*/ 08849 ;} 08850 break; 08851 08852 case 428: 08853 #line 3647 "parse.y" 08854 { 08855 /*%%%*/ 08856 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), rb_intern("call"), (yyvsp[(4) - (4)].node)); 08857 nd_set_line((yyval.node), (yyvsp[(3) - (4)].num)); 08858 /*% 08859 $$ = dispatch3(call, $1, ripper_intern("::"), 08860 ripper_intern("call")); 08861 $$ = method_optarg($$, $4); 08862 %*/ 08863 ;} 08864 break; 08865 08866 case 429: 08867 #line 3658 "parse.y" 08868 { 08869 /*%%%*/ 08870 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 08871 /*% 08872 $$ = dispatch1(super, $2); 08873 %*/ 08874 ;} 08875 break; 08876 08877 case 430: 08878 #line 3666 "parse.y" 08879 { 08880 /*%%%*/ 08881 (yyval.node) = NEW_ZSUPER(); 08882 /*% 08883 $$ = dispatch0(zsuper); 08884 %*/ 08885 ;} 08886 break; 08887 08888 case 431: 08889 #line 3674 "parse.y" 08890 { 08891 /*%%%*/ 08892 if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) 08893 (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node)); 08894 else 08895 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node)); 08896 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 08897 /*% 08898 $$ = dispatch2(aref, $1, escape_Qundef($3)); 08899 %*/ 08900 ;} 08901 break; 08902 08903 case 432: 08904 #line 3688 "parse.y" 08905 { 08906 (yyvsp[(1) - (1)].vars) = dyna_push(); 08907 /*%%%*/ 08908 (yyval.num) = ruby_sourceline; 08909 /*% 08910 %*/ 08911 ;} 08912 break; 08913 08914 case 433: 08915 #line 3697 "parse.y" 08916 { 08917 /*%%%*/ 08918 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08919 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08920 /*% 08921 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 08922 %*/ 08923 dyna_pop((yyvsp[(1) - (5)].vars)); 08924 ;} 08925 break; 08926 08927 case 434: 08928 #line 3707 "parse.y" 08929 { 08930 (yyvsp[(1) - (1)].vars) = dyna_push(); 08931 /*%%%*/ 08932 (yyval.num) = ruby_sourceline; 08933 /*% 08934 %*/ 08935 ;} 08936 break; 08937 08938 case 435: 08939 #line 3716 "parse.y" 08940 { 08941 /*%%%*/ 08942 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08943 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08944 /*% 08945 $$ = dispatch2(do_block, escape_Qundef($3), $4); 08946 %*/ 08947 dyna_pop((yyvsp[(1) - (5)].vars)); 08948 ;} 08949 break; 08950 08951 case 436: 08952 #line 3730 "parse.y" 08953 { 08954 /*%%%*/ 08955 (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08956 /*% 08957 $$ = dispatch3(when, $2, $4, escape_Qundef($5)); 08958 %*/ 08959 ;} 08960 break; 08961 08962 case 439: 08963 #line 3746 "parse.y" 08964 { 08965 /*%%%*/ 08966 if ((yyvsp[(3) - (6)].node)) { 08967 (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO()); 08968 (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)); 08969 } 08970 (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 08971 fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node)); 08972 /*% 08973 $$ = dispatch4(rescue, 08974 escape_Qundef($2), 08975 escape_Qundef($3), 08976 escape_Qundef($5), 08977 escape_Qundef($6)); 08978 %*/ 08979 ;} 08980 break; 08981 08982 case 441: 08983 #line 3766 "parse.y" 08984 { 08985 /*%%%*/ 08986 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 08987 /*% 08988 $$ = rb_ary_new3(1, $1); 08989 %*/ 08990 ;} 08991 break; 08992 08993 case 442: 08994 #line 3774 "parse.y" 08995 { 08996 /*%%%*/ 08997 if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node); 08998 /*% 08999 $$ = $1; 09000 %*/ 09001 ;} 09002 break; 09003 09004 case 444: 09005 #line 3785 "parse.y" 09006 { 09007 (yyval.node) = (yyvsp[(2) - (2)].node); 09008 ;} 09009 break; 09010 09011 case 446: 09012 #line 3792 "parse.y" 09013 { 09014 /*%%%*/ 09015 (yyval.node) = (yyvsp[(2) - (2)].node); 09016 /*% 09017 $$ = dispatch1(ensure, $2); 09018 %*/ 09019 ;} 09020 break; 09021 09022 case 449: 09023 #line 3804 "parse.y" 09024 { 09025 /*%%%*/ 09026 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 09027 /*% 09028 $$ = dispatch1(symbol_literal, $1); 09029 %*/ 09030 ;} 09031 break; 09032 09033 case 451: 09034 #line 3815 "parse.y" 09035 { 09036 /*%%%*/ 09037 NODE *node = (yyvsp[(1) - (1)].node); 09038 if (!node) { 09039 node = NEW_STR(STR_NEW0()); 09040 } 09041 else { 09042 node = evstr2dstr(node); 09043 } 09044 (yyval.node) = node; 09045 /*% 09046 $$ = $1; 09047 %*/ 09048 ;} 09049 break; 09050 09051 case 454: 09052 #line 3834 "parse.y" 09053 { 09054 /*%%%*/ 09055 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09056 /*% 09057 $$ = dispatch2(string_concat, $1, $2); 09058 %*/ 09059 ;} 09060 break; 09061 09062 case 455: 09063 #line 3844 "parse.y" 09064 { 09065 /*%%%*/ 09066 (yyval.node) = (yyvsp[(2) - (3)].node); 09067 /*% 09068 $$ = dispatch1(string_literal, $2); 09069 %*/ 09070 ;} 09071 break; 09072 09073 case 456: 09074 #line 3854 "parse.y" 09075 { 09076 /*%%%*/ 09077 NODE *node = (yyvsp[(2) - (3)].node); 09078 if (!node) { 09079 node = NEW_XSTR(STR_NEW0()); 09080 } 09081 else { 09082 switch (nd_type(node)) { 09083 case NODE_STR: 09084 nd_set_type(node, NODE_XSTR); 09085 break; 09086 case NODE_DSTR: 09087 nd_set_type(node, NODE_DXSTR); 09088 break; 09089 default: 09090 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09091 break; 09092 } 09093 } 09094 (yyval.node) = node; 09095 /*% 09096 $$ = dispatch1(xstring_literal, $2); 09097 %*/ 09098 ;} 09099 break; 09100 09101 case 457: 09102 #line 3881 "parse.y" 09103 { 09104 /*%%%*/ 09105 int options = (yyvsp[(3) - (3)].num); 09106 NODE *node = (yyvsp[(2) - (3)].node); 09107 NODE *list, *prev; 09108 if (!node) { 09109 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09110 } 09111 else switch (nd_type(node)) { 09112 case NODE_STR: 09113 { 09114 VALUE src = node->nd_lit; 09115 nd_set_type(node, NODE_LIT); 09116 node->nd_lit = reg_compile(src, options); 09117 } 09118 break; 09119 default: 09120 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09121 case NODE_DSTR: 09122 if (options & RE_OPTION_ONCE) { 09123 nd_set_type(node, NODE_DREGX_ONCE); 09124 } 09125 else { 09126 nd_set_type(node, NODE_DREGX); 09127 } 09128 node->nd_cflag = options & RE_OPTION_MASK; 09129 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09130 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09131 if (nd_type(list->nd_head) == NODE_STR) { 09132 VALUE tail = list->nd_head->nd_lit; 09133 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09134 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09135 if (!literal_concat0(parser, lit, tail)) { 09136 node = 0; 09137 break; 09138 } 09139 rb_str_resize(tail, 0); 09140 prev->nd_next = list->nd_next; 09141 rb_gc_force_recycle((VALUE)list->nd_head); 09142 rb_gc_force_recycle((VALUE)list); 09143 list = prev; 09144 } 09145 else { 09146 prev = list; 09147 } 09148 } 09149 else { 09150 prev = 0; 09151 } 09152 } 09153 if (!node->nd_next) { 09154 VALUE src = node->nd_lit; 09155 nd_set_type(node, NODE_LIT); 09156 node->nd_lit = reg_compile(src, options); 09157 } 09158 break; 09159 } 09160 (yyval.node) = node; 09161 /*% 09162 $$ = dispatch2(regexp_literal, $2, $3); 09163 %*/ 09164 ;} 09165 break; 09166 09167 case 458: 09168 #line 3946 "parse.y" 09169 { 09170 /*%%%*/ 09171 (yyval.node) = NEW_ZARRAY(); 09172 /*% 09173 $$ = dispatch0(words_new); 09174 $$ = dispatch1(array, $$); 09175 %*/ 09176 ;} 09177 break; 09178 09179 case 459: 09180 #line 3955 "parse.y" 09181 { 09182 /*%%%*/ 09183 (yyval.node) = (yyvsp[(2) - (3)].node); 09184 /*% 09185 $$ = dispatch1(array, $2); 09186 %*/ 09187 ;} 09188 break; 09189 09190 case 460: 09191 #line 3965 "parse.y" 09192 { 09193 /*%%%*/ 09194 (yyval.node) = 0; 09195 /*% 09196 $$ = dispatch0(words_new); 09197 %*/ 09198 ;} 09199 break; 09200 09201 case 461: 09202 #line 3973 "parse.y" 09203 { 09204 /*%%%*/ 09205 (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node))); 09206 /*% 09207 $$ = dispatch2(words_add, $1, $2); 09208 %*/ 09209 ;} 09210 break; 09211 09212 case 463: 09213 #line 3991 "parse.y" 09214 { 09215 /*%%%*/ 09216 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09217 /*% 09218 $$ = dispatch2(word_add, $1, $2); 09219 %*/ 09220 ;} 09221 break; 09222 09223 case 464: 09224 #line 4001 "parse.y" 09225 { 09226 /*%%%*/ 09227 (yyval.node) = NEW_ZARRAY(); 09228 /*% 09229 $$ = dispatch0(symbols_new); 09230 $$ = dispatch1(array, $$); 09231 %*/ 09232 ;} 09233 break; 09234 09235 case 465: 09236 #line 4010 "parse.y" 09237 { 09238 /*%%%*/ 09239 (yyval.node) = (yyvsp[(2) - (3)].node); 09240 /*% 09241 $$ = dispatch1(array, $2); 09242 %*/ 09243 ;} 09244 break; 09245 09246 case 466: 09247 #line 4020 "parse.y" 09248 { 09249 /*%%%*/ 09250 (yyval.node) = 0; 09251 /*% 09252 $$ = dispatch0(symbols_new); 09253 %*/ 09254 ;} 09255 break; 09256 09257 case 467: 09258 #line 4028 "parse.y" 09259 { 09260 /*%%%*/ 09261 (yyvsp[(2) - (3)].node) = evstr2dstr((yyvsp[(2) - (3)].node)); 09262 nd_set_type((yyvsp[(2) - (3)].node), NODE_DSYM); 09263 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 09264 /*% 09265 $$ = dispatch2(symbols_add, $1, $2); 09266 %*/ 09267 ;} 09268 break; 09269 09270 case 468: 09271 #line 4040 "parse.y" 09272 { 09273 /*%%%*/ 09274 (yyval.node) = NEW_ZARRAY(); 09275 /*% 09276 $$ = dispatch0(qwords_new); 09277 $$ = dispatch1(array, $$); 09278 %*/ 09279 ;} 09280 break; 09281 09282 case 469: 09283 #line 4049 "parse.y" 09284 { 09285 /*%%%*/ 09286 (yyval.node) = (yyvsp[(2) - (3)].node); 09287 /*% 09288 $$ = dispatch1(array, $2); 09289 %*/ 09290 ;} 09291 break; 09292 09293 case 470: 09294 #line 4059 "parse.y" 09295 { 09296 /*%%%*/ 09297 (yyval.node) = NEW_ZARRAY(); 09298 /*% 09299 $$ = dispatch0(qsymbols_new); 09300 $$ = dispatch1(array, $$); 09301 %*/ 09302 ;} 09303 break; 09304 09305 case 471: 09306 #line 4068 "parse.y" 09307 { 09308 /*%%%*/ 09309 (yyval.node) = (yyvsp[(2) - (3)].node); 09310 /*% 09311 $$ = dispatch1(array, $2); 09312 %*/ 09313 ;} 09314 break; 09315 09316 case 472: 09317 #line 4078 "parse.y" 09318 { 09319 /*%%%*/ 09320 (yyval.node) = 0; 09321 /*% 09322 $$ = dispatch0(qwords_new); 09323 %*/ 09324 ;} 09325 break; 09326 09327 case 473: 09328 #line 4086 "parse.y" 09329 { 09330 /*%%%*/ 09331 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 09332 /*% 09333 $$ = dispatch2(qwords_add, $1, $2); 09334 %*/ 09335 ;} 09336 break; 09337 09338 case 474: 09339 #line 4096 "parse.y" 09340 { 09341 /*%%%*/ 09342 (yyval.node) = 0; 09343 /*% 09344 $$ = dispatch0(qsymbols_new); 09345 %*/ 09346 ;} 09347 break; 09348 09349 case 475: 09350 #line 4104 "parse.y" 09351 { 09352 /*%%%*/ 09353 VALUE lit; 09354 lit = (yyvsp[(2) - (3)].node)->nd_lit; 09355 (yyvsp[(2) - (3)].node)->nd_lit = ID2SYM(rb_intern_str(lit)); 09356 nd_set_type((yyvsp[(2) - (3)].node), NODE_LIT); 09357 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 09358 /*% 09359 $$ = dispatch2(qsymbols_add, $1, $2); 09360 %*/ 09361 ;} 09362 break; 09363 09364 case 476: 09365 #line 4118 "parse.y" 09366 { 09367 /*%%%*/ 09368 (yyval.node) = 0; 09369 /*% 09370 $$ = dispatch0(string_content); 09371 %*/ 09372 ;} 09373 break; 09374 09375 case 477: 09376 #line 4126 "parse.y" 09377 { 09378 /*%%%*/ 09379 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09380 /*% 09381 $$ = dispatch2(string_add, $1, $2); 09382 %*/ 09383 ;} 09384 break; 09385 09386 case 478: 09387 #line 4136 "parse.y" 09388 { 09389 /*%%%*/ 09390 (yyval.node) = 0; 09391 /*% 09392 $$ = dispatch0(xstring_new); 09393 %*/ 09394 ;} 09395 break; 09396 09397 case 479: 09398 #line 4144 "parse.y" 09399 { 09400 /*%%%*/ 09401 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09402 /*% 09403 $$ = dispatch2(xstring_add, $1, $2); 09404 %*/ 09405 ;} 09406 break; 09407 09408 case 480: 09409 #line 4154 "parse.y" 09410 { 09411 /*%%%*/ 09412 (yyval.node) = 0; 09413 /*% 09414 $$ = dispatch0(regexp_new); 09415 %*/ 09416 ;} 09417 break; 09418 09419 case 481: 09420 #line 4162 "parse.y" 09421 { 09422 /*%%%*/ 09423 NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node); 09424 if (!head) { 09425 (yyval.node) = tail; 09426 } 09427 else if (!tail) { 09428 (yyval.node) = head; 09429 } 09430 else { 09431 switch (nd_type(head)) { 09432 case NODE_STR: 09433 nd_set_type(head, NODE_DSTR); 09434 break; 09435 case NODE_DSTR: 09436 break; 09437 default: 09438 head = list_append(NEW_DSTR(Qnil), head); 09439 break; 09440 } 09441 (yyval.node) = list_append(head, tail); 09442 } 09443 /*% 09444 $$ = dispatch2(regexp_add, $1, $2); 09445 %*/ 09446 ;} 09447 break; 09448 09449 case 483: 09450 #line 4192 "parse.y" 09451 { 09452 (yyval.node) = lex_strterm; 09453 lex_strterm = 0; 09454 lex_state = EXPR_BEG; 09455 ;} 09456 break; 09457 09458 case 484: 09459 #line 4198 "parse.y" 09460 { 09461 /*%%%*/ 09462 lex_strterm = (yyvsp[(2) - (3)].node); 09463 (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node)); 09464 /*% 09465 lex_strterm = $<node>2; 09466 $$ = dispatch1(string_dvar, $3); 09467 %*/ 09468 ;} 09469 break; 09470 09471 case 485: 09472 #line 4208 "parse.y" 09473 { 09474 (yyvsp[(1) - (1)].val) = cond_stack; 09475 (yyval.val) = cmdarg_stack; 09476 cond_stack = 0; 09477 cmdarg_stack = 0; 09478 ;} 09479 break; 09480 09481 case 486: 09482 #line 4214 "parse.y" 09483 { 09484 (yyval.node) = lex_strterm; 09485 lex_strterm = 0; 09486 lex_state = EXPR_BEG; 09487 ;} 09488 break; 09489 09490 case 487: 09491 #line 4219 "parse.y" 09492 { 09493 (yyval.num) = brace_nest; 09494 brace_nest = 0; 09495 ;} 09496 break; 09497 09498 case 488: 09499 #line 4224 "parse.y" 09500 { 09501 cond_stack = (yyvsp[(1) - (6)].val); 09502 cmdarg_stack = (yyvsp[(2) - (6)].val); 09503 lex_strterm = (yyvsp[(3) - (6)].node); 09504 brace_nest = (yyvsp[(4) - (6)].num); 09505 /*%%%*/ 09506 if ((yyvsp[(5) - (6)].node)) (yyvsp[(5) - (6)].node)->flags &= ~NODE_FL_NEWLINE; 09507 (yyval.node) = new_evstr((yyvsp[(5) - (6)].node)); 09508 /*% 09509 $$ = dispatch1(string_embexpr, $5); 09510 %*/ 09511 ;} 09512 break; 09513 09514 case 489: 09515 #line 4239 "parse.y" 09516 { 09517 /*%%%*/ 09518 (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id)); 09519 /*% 09520 $$ = dispatch1(var_ref, $1); 09521 %*/ 09522 ;} 09523 break; 09524 09525 case 490: 09526 #line 4247 "parse.y" 09527 { 09528 /*%%%*/ 09529 (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id)); 09530 /*% 09531 $$ = dispatch1(var_ref, $1); 09532 %*/ 09533 ;} 09534 break; 09535 09536 case 491: 09537 #line 4255 "parse.y" 09538 { 09539 /*%%%*/ 09540 (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id)); 09541 /*% 09542 $$ = dispatch1(var_ref, $1); 09543 %*/ 09544 ;} 09545 break; 09546 09547 case 493: 09548 #line 4266 "parse.y" 09549 { 09550 lex_state = EXPR_END; 09551 /*%%%*/ 09552 (yyval.id) = (yyvsp[(2) - (2)].id); 09553 /*% 09554 $$ = dispatch1(symbol, $2); 09555 %*/ 09556 ;} 09557 break; 09558 09559 case 498: 09560 #line 4283 "parse.y" 09561 { 09562 lex_state = EXPR_END; 09563 /*%%%*/ 09564 (yyval.node) = dsym_node((yyvsp[(2) - (3)].node)); 09565 /*% 09566 $$ = dispatch1(dyna_symbol, $2); 09567 %*/ 09568 ;} 09569 break; 09570 09571 case 501: 09572 #line 4296 "parse.y" 09573 { 09574 /*%%%*/ 09575 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 09576 /*% 09577 $$ = dispatch2(unary, ripper_intern("-@"), $2); 09578 %*/ 09579 ;} 09580 break; 09581 09582 case 502: 09583 #line 4304 "parse.y" 09584 { 09585 /*%%%*/ 09586 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 09587 /*% 09588 $$ = dispatch2(unary, ripper_intern("-@"), $2); 09589 %*/ 09590 ;} 09591 break; 09592 09593 case 508: 09594 #line 4320 "parse.y" 09595 {ifndef_ripper((yyval.id) = keyword_nil);;} 09596 break; 09597 09598 case 509: 09599 #line 4321 "parse.y" 09600 {ifndef_ripper((yyval.id) = keyword_self);;} 09601 break; 09602 09603 case 510: 09604 #line 4322 "parse.y" 09605 {ifndef_ripper((yyval.id) = keyword_true);;} 09606 break; 09607 09608 case 511: 09609 #line 4323 "parse.y" 09610 {ifndef_ripper((yyval.id) = keyword_false);;} 09611 break; 09612 09613 case 512: 09614 #line 4324 "parse.y" 09615 {ifndef_ripper((yyval.id) = keyword__FILE__);;} 09616 break; 09617 09618 case 513: 09619 #line 4325 "parse.y" 09620 {ifndef_ripper((yyval.id) = keyword__LINE__);;} 09621 break; 09622 09623 case 514: 09624 #line 4326 "parse.y" 09625 {ifndef_ripper((yyval.id) = keyword__ENCODING__);;} 09626 break; 09627 09628 case 515: 09629 #line 4330 "parse.y" 09630 { 09631 /*%%%*/ 09632 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 09633 /*% 09634 if (id_is_var(get_id($1))) { 09635 $$ = dispatch1(var_ref, $1); 09636 } 09637 else { 09638 $$ = dispatch1(vcall, $1); 09639 } 09640 %*/ 09641 ;} 09642 break; 09643 09644 case 516: 09645 #line 4343 "parse.y" 09646 { 09647 /*%%%*/ 09648 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 09649 /*% 09650 $$ = dispatch1(var_ref, $1); 09651 %*/ 09652 ;} 09653 break; 09654 09655 case 517: 09656 #line 4353 "parse.y" 09657 { 09658 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 09659 /*%%%*/ 09660 /*% 09661 $$ = dispatch1(var_field, $$); 09662 %*/ 09663 ;} 09664 break; 09665 09666 case 518: 09667 #line 4361 "parse.y" 09668 { 09669 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 09670 /*%%%*/ 09671 /*% 09672 $$ = dispatch1(var_field, $$); 09673 %*/ 09674 ;} 09675 break; 09676 09677 case 521: 09678 #line 4375 "parse.y" 09679 { 09680 /*%%%*/ 09681 (yyval.node) = 0; 09682 /*% 09683 $$ = Qnil; 09684 %*/ 09685 ;} 09686 break; 09687 09688 case 522: 09689 #line 4383 "parse.y" 09690 { 09691 lex_state = EXPR_BEG; 09692 command_start = TRUE; 09693 ;} 09694 break; 09695 09696 case 523: 09697 #line 4388 "parse.y" 09698 { 09699 (yyval.node) = (yyvsp[(3) - (4)].node); 09700 ;} 09701 break; 09702 09703 case 524: 09704 #line 4392 "parse.y" 09705 { 09706 /*%%%*/ 09707 yyerrok; 09708 (yyval.node) = 0; 09709 /*% 09710 yyerrok; 09711 $$ = Qnil; 09712 %*/ 09713 ;} 09714 break; 09715 09716 case 525: 09717 #line 4404 "parse.y" 09718 { 09719 /*%%%*/ 09720 (yyval.node) = (yyvsp[(2) - (3)].node); 09721 /*% 09722 $$ = dispatch1(paren, $2); 09723 %*/ 09724 lex_state = EXPR_BEG; 09725 command_start = TRUE; 09726 ;} 09727 break; 09728 09729 case 526: 09730 #line 4414 "parse.y" 09731 { 09732 (yyval.node) = (yyvsp[(1) - (2)].node); 09733 lex_state = EXPR_BEG; 09734 command_start = TRUE; 09735 ;} 09736 break; 09737 09738 case 527: 09739 #line 4422 "parse.y" 09740 { 09741 (yyval.node) = new_args_tail((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id)); 09742 ;} 09743 break; 09744 09745 case 528: 09746 #line 4426 "parse.y" 09747 { 09748 (yyval.node) = new_args_tail((yyvsp[(1) - (2)].node), Qnone, (yyvsp[(2) - (2)].id)); 09749 ;} 09750 break; 09751 09752 case 529: 09753 #line 4430 "parse.y" 09754 { 09755 (yyval.node) = new_args_tail(Qnone, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id)); 09756 ;} 09757 break; 09758 09759 case 530: 09760 #line 4434 "parse.y" 09761 { 09762 (yyval.node) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].id)); 09763 ;} 09764 break; 09765 09766 case 531: 09767 #line 4440 "parse.y" 09768 { 09769 (yyval.node) = (yyvsp[(2) - (2)].node); 09770 ;} 09771 break; 09772 09773 case 532: 09774 #line 4444 "parse.y" 09775 { 09776 (yyval.node) = new_args_tail(Qnone, Qnone, Qnone); 09777 ;} 09778 break; 09779 09780 case 533: 09781 #line 4450 "parse.y" 09782 { 09783 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), Qnone, (yyvsp[(6) - (6)].node)); 09784 ;} 09785 break; 09786 09787 case 534: 09788 #line 4454 "parse.y" 09789 { 09790 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].node)); 09791 ;} 09792 break; 09793 09794 case 535: 09795 #line 4458 "parse.y" 09796 { 09797 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), Qnone, Qnone, (yyvsp[(4) - (4)].node)); 09798 ;} 09799 break; 09800 09801 case 536: 09802 #line 4462 "parse.y" 09803 { 09804 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), Qnone, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09805 ;} 09806 break; 09807 09808 case 537: 09809 #line 4466 "parse.y" 09810 { 09811 (yyval.node) = new_args((yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 09812 ;} 09813 break; 09814 09815 case 538: 09816 #line 4470 "parse.y" 09817 { 09818 (yyval.node) = new_args((yyvsp[(1) - (6)].node), Qnone, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09819 ;} 09820 break; 09821 09822 case 539: 09823 #line 4474 "parse.y" 09824 { 09825 (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].node)); 09826 ;} 09827 break; 09828 09829 case 540: 09830 #line 4478 "parse.y" 09831 { 09832 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 09833 ;} 09834 break; 09835 09836 case 541: 09837 #line 4482 "parse.y" 09838 { 09839 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09840 ;} 09841 break; 09842 09843 case 542: 09844 #line 4486 "parse.y" 09845 { 09846 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (2)].node), Qnone, Qnone, (yyvsp[(2) - (2)].node)); 09847 ;} 09848 break; 09849 09850 case 543: 09851 #line 4490 "parse.y" 09852 { 09853 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 09854 ;} 09855 break; 09856 09857 case 544: 09858 #line 4494 "parse.y" 09859 { 09860 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].id), Qnone, (yyvsp[(2) - (2)].node)); 09861 ;} 09862 break; 09863 09864 case 545: 09865 #line 4498 "parse.y" 09866 { 09867 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 09868 ;} 09869 break; 09870 09871 case 546: 09872 #line 4502 "parse.y" 09873 { 09874 (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].node)); 09875 ;} 09876 break; 09877 09878 case 547: 09879 #line 4506 "parse.y" 09880 { 09881 (yyval.node) = new_args_tail(Qnone, Qnone, Qnone); 09882 (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyval.node)); 09883 ;} 09884 break; 09885 09886 case 548: 09887 #line 4513 "parse.y" 09888 { 09889 /*%%%*/ 09890 yyerror("formal argument cannot be a constant"); 09891 (yyval.id) = 0; 09892 /*% 09893 $$ = dispatch1(param_error, $1); 09894 %*/ 09895 ;} 09896 break; 09897 09898 case 549: 09899 #line 4522 "parse.y" 09900 { 09901 /*%%%*/ 09902 yyerror("formal argument cannot be an instance variable"); 09903 (yyval.id) = 0; 09904 /*% 09905 $$ = dispatch1(param_error, $1); 09906 %*/ 09907 ;} 09908 break; 09909 09910 case 550: 09911 #line 4531 "parse.y" 09912 { 09913 /*%%%*/ 09914 yyerror("formal argument cannot be a global variable"); 09915 (yyval.id) = 0; 09916 /*% 09917 $$ = dispatch1(param_error, $1); 09918 %*/ 09919 ;} 09920 break; 09921 09922 case 551: 09923 #line 4540 "parse.y" 09924 { 09925 /*%%%*/ 09926 yyerror("formal argument cannot be a class variable"); 09927 (yyval.id) = 0; 09928 /*% 09929 $$ = dispatch1(param_error, $1); 09930 %*/ 09931 ;} 09932 break; 09933 09934 case 553: 09935 #line 4552 "parse.y" 09936 { 09937 formal_argument(get_id((yyvsp[(1) - (1)].id))); 09938 (yyval.id) = (yyvsp[(1) - (1)].id); 09939 ;} 09940 break; 09941 09942 case 554: 09943 #line 4559 "parse.y" 09944 { 09945 arg_var(get_id((yyvsp[(1) - (1)].id))); 09946 /*%%%*/ 09947 (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1); 09948 /*% 09949 $$ = get_value($1); 09950 %*/ 09951 ;} 09952 break; 09953 09954 case 555: 09955 #line 4568 "parse.y" 09956 { 09957 ID tid = internal_id(); 09958 arg_var(tid); 09959 /*%%%*/ 09960 if (dyna_in_block()) { 09961 (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid); 09962 } 09963 else { 09964 (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid); 09965 } 09966 (yyval.node) = NEW_ARGS_AUX(tid, 1); 09967 (yyval.node)->nd_next = (yyvsp[(2) - (3)].node); 09968 /*% 09969 $$ = dispatch1(mlhs_paren, $2); 09970 %*/ 09971 ;} 09972 break; 09973 09974 case 557: 09975 #line 4594 "parse.y" 09976 { 09977 /*%%%*/ 09978 (yyval.node) = (yyvsp[(1) - (3)].node); 09979 (yyval.node)->nd_plen++; 09980 (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next); 09981 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node)); 09982 /*% 09983 $$ = rb_ary_push($1, $3); 09984 %*/ 09985 ;} 09986 break; 09987 09988 case 558: 09989 #line 4607 "parse.y" 09990 { 09991 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].id)))); 09992 (yyval.node) = assignable((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 09993 /*%%%*/ 09994 (yyval.node) = NEW_KW_ARG(0, (yyval.node)); 09995 /*% 09996 $$ = rb_assoc_new($$, $2); 09997 %*/ 09998 ;} 09999 break; 10000 10001 case 559: 10002 #line 4619 "parse.y" 10003 { 10004 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].id)))); 10005 (yyval.node) = assignable((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 10006 /*%%%*/ 10007 (yyval.node) = NEW_KW_ARG(0, (yyval.node)); 10008 /*% 10009 $$ = rb_assoc_new($$, $2); 10010 %*/ 10011 ;} 10012 break; 10013 10014 case 560: 10015 #line 4631 "parse.y" 10016 { 10017 /*%%%*/ 10018 (yyval.node) = (yyvsp[(1) - (1)].node); 10019 /*% 10020 $$ = rb_ary_new3(1, $1); 10021 %*/ 10022 ;} 10023 break; 10024 10025 case 561: 10026 #line 4639 "parse.y" 10027 { 10028 /*%%%*/ 10029 NODE *kws = (yyvsp[(1) - (3)].node); 10030 10031 while (kws->nd_next) { 10032 kws = kws->nd_next; 10033 } 10034 kws->nd_next = (yyvsp[(3) - (3)].node); 10035 (yyval.node) = (yyvsp[(1) - (3)].node); 10036 /*% 10037 $$ = rb_ary_push($1, $3); 10038 %*/ 10039 ;} 10040 break; 10041 10042 case 562: 10043 #line 4656 "parse.y" 10044 { 10045 /*%%%*/ 10046 (yyval.node) = (yyvsp[(1) - (1)].node); 10047 /*% 10048 $$ = rb_ary_new3(1, $1); 10049 %*/ 10050 ;} 10051 break; 10052 10053 case 563: 10054 #line 4664 "parse.y" 10055 { 10056 /*%%%*/ 10057 NODE *kws = (yyvsp[(1) - (3)].node); 10058 10059 while (kws->nd_next) { 10060 kws = kws->nd_next; 10061 } 10062 kws->nd_next = (yyvsp[(3) - (3)].node); 10063 (yyval.node) = (yyvsp[(1) - (3)].node); 10064 /*% 10065 $$ = rb_ary_push($1, $3); 10066 %*/ 10067 ;} 10068 break; 10069 10070 case 566: 10071 #line 4684 "parse.y" 10072 { 10073 shadowing_lvar(get_id((yyvsp[(2) - (2)].id))); 10074 (yyval.id) = (yyvsp[(2) - (2)].id); 10075 ;} 10076 break; 10077 10078 case 567: 10079 #line 4689 "parse.y" 10080 { 10081 (yyval.id) = internal_id(); 10082 ;} 10083 break; 10084 10085 case 568: 10086 #line 4695 "parse.y" 10087 { 10088 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 10089 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 10090 /*%%%*/ 10091 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 10092 /*% 10093 $$ = rb_assoc_new($$, $3); 10094 %*/ 10095 ;} 10096 break; 10097 10098 case 569: 10099 #line 4707 "parse.y" 10100 { 10101 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 10102 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 10103 /*%%%*/ 10104 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 10105 /*% 10106 $$ = rb_assoc_new($$, $3); 10107 %*/ 10108 ;} 10109 break; 10110 10111 case 570: 10112 #line 4719 "parse.y" 10113 { 10114 /*%%%*/ 10115 (yyval.node) = (yyvsp[(1) - (1)].node); 10116 /*% 10117 $$ = rb_ary_new3(1, $1); 10118 %*/ 10119 ;} 10120 break; 10121 10122 case 571: 10123 #line 4727 "parse.y" 10124 { 10125 /*%%%*/ 10126 NODE *opts = (yyvsp[(1) - (3)].node); 10127 10128 while (opts->nd_next) { 10129 opts = opts->nd_next; 10130 } 10131 opts->nd_next = (yyvsp[(3) - (3)].node); 10132 (yyval.node) = (yyvsp[(1) - (3)].node); 10133 /*% 10134 $$ = rb_ary_push($1, $3); 10135 %*/ 10136 ;} 10137 break; 10138 10139 case 572: 10140 #line 4743 "parse.y" 10141 { 10142 /*%%%*/ 10143 (yyval.node) = (yyvsp[(1) - (1)].node); 10144 /*% 10145 $$ = rb_ary_new3(1, $1); 10146 %*/ 10147 ;} 10148 break; 10149 10150 case 573: 10151 #line 4751 "parse.y" 10152 { 10153 /*%%%*/ 10154 NODE *opts = (yyvsp[(1) - (3)].node); 10155 10156 while (opts->nd_next) { 10157 opts = opts->nd_next; 10158 } 10159 opts->nd_next = (yyvsp[(3) - (3)].node); 10160 (yyval.node) = (yyvsp[(1) - (3)].node); 10161 /*% 10162 $$ = rb_ary_push($1, $3); 10163 %*/ 10164 ;} 10165 break; 10166 10167 case 576: 10168 #line 4771 "parse.y" 10169 { 10170 /*%%%*/ 10171 if (!is_local_id((yyvsp[(2) - (2)].id))) 10172 yyerror("rest argument must be local variable"); 10173 /*% %*/ 10174 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 10175 /*%%%*/ 10176 (yyval.id) = (yyvsp[(2) - (2)].id); 10177 /*% 10178 $$ = dispatch1(rest_param, $2); 10179 %*/ 10180 ;} 10181 break; 10182 10183 case 577: 10184 #line 4784 "parse.y" 10185 { 10186 /*%%%*/ 10187 (yyval.id) = internal_id(); 10188 arg_var((yyval.id)); 10189 /*% 10190 $$ = dispatch1(rest_param, Qnil); 10191 %*/ 10192 ;} 10193 break; 10194 10195 case 580: 10196 #line 4799 "parse.y" 10197 { 10198 /*%%%*/ 10199 if (!is_local_id((yyvsp[(2) - (2)].id))) 10200 yyerror("block argument must be local variable"); 10201 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id))) 10202 yyerror("duplicated block argument name"); 10203 /*% %*/ 10204 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 10205 /*%%%*/ 10206 (yyval.id) = (yyvsp[(2) - (2)].id); 10207 /*% 10208 $$ = dispatch1(blockarg, $2); 10209 %*/ 10210 ;} 10211 break; 10212 10213 case 581: 10214 #line 4816 "parse.y" 10215 { 10216 (yyval.id) = (yyvsp[(2) - (2)].id); 10217 ;} 10218 break; 10219 10220 case 582: 10221 #line 4820 "parse.y" 10222 { 10223 /*%%%*/ 10224 (yyval.id) = 0; 10225 /*% 10226 $$ = Qundef; 10227 %*/ 10228 ;} 10229 break; 10230 10231 case 583: 10232 #line 4830 "parse.y" 10233 { 10234 /*%%%*/ 10235 value_expr((yyvsp[(1) - (1)].node)); 10236 (yyval.node) = (yyvsp[(1) - (1)].node); 10237 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 10238 /*% 10239 $$ = $1; 10240 %*/ 10241 ;} 10242 break; 10243 10244 case 584: 10245 #line 4839 "parse.y" 10246 {lex_state = EXPR_BEG;;} 10247 break; 10248 10249 case 585: 10250 #line 4840 "parse.y" 10251 { 10252 /*%%%*/ 10253 if ((yyvsp[(3) - (4)].node) == 0) { 10254 yyerror("can't define singleton method for ()."); 10255 } 10256 else { 10257 switch (nd_type((yyvsp[(3) - (4)].node))) { 10258 case NODE_STR: 10259 case NODE_DSTR: 10260 case NODE_XSTR: 10261 case NODE_DXSTR: 10262 case NODE_DREGX: 10263 case NODE_LIT: 10264 case NODE_ARRAY: 10265 case NODE_ZARRAY: 10266 yyerror("can't define singleton method for literals"); 10267 default: 10268 value_expr((yyvsp[(3) - (4)].node)); 10269 break; 10270 } 10271 } 10272 (yyval.node) = (yyvsp[(3) - (4)].node); 10273 /*% 10274 $$ = dispatch1(paren, $3); 10275 %*/ 10276 ;} 10277 break; 10278 10279 case 587: 10280 #line 4870 "parse.y" 10281 { 10282 /*%%%*/ 10283 (yyval.node) = (yyvsp[(1) - (2)].node); 10284 /*% 10285 $$ = dispatch1(assoclist_from_args, $1); 10286 %*/ 10287 ;} 10288 break; 10289 10290 case 589: 10291 #line 4887 "parse.y" 10292 { 10293 /*%%%*/ 10294 (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 10295 /*% 10296 $$ = rb_ary_push($1, $3); 10297 %*/ 10298 ;} 10299 break; 10300 10301 case 590: 10302 #line 4897 "parse.y" 10303 { 10304 /*%%%*/ 10305 (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node)); 10306 /*% 10307 $$ = dispatch2(assoc_new, $1, $3); 10308 %*/ 10309 ;} 10310 break; 10311 10312 case 591: 10313 #line 4905 "parse.y" 10314 { 10315 /*%%%*/ 10316 (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node)); 10317 /*% 10318 $$ = dispatch2(assoc_new, $1, $2); 10319 %*/ 10320 ;} 10321 break; 10322 10323 case 592: 10324 #line 4913 "parse.y" 10325 { 10326 /*%%%*/ 10327 (yyval.node) = list_append(NEW_LIST(0), (yyvsp[(2) - (2)].node)); 10328 /*% 10329 $$ = dispatch1(assoc_splat, $2); 10330 %*/ 10331 ;} 10332 break; 10333 10334 case 614: 10335 #line 4971 "parse.y" 10336 {yyerrok;;} 10337 break; 10338 10339 case 617: 10340 #line 4976 "parse.y" 10341 {yyerrok;;} 10342 break; 10343 10344 case 618: 10345 #line 4980 "parse.y" 10346 { 10347 /*%%%*/ 10348 (yyval.node) = 0; 10349 /*% 10350 $$ = Qundef; 10351 %*/ 10352 ;} 10353 break; 10354 10355 10356 /* Line 1267 of yacc.c. */ 10357 #line 10356 "parse.c" 10358 default: break; 10359 } 10360 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 10361 10362 YYPOPSTACK (yylen); 10363 yylen = 0; 10364 YY_STACK_PRINT (yyss, yyssp); 10365 10366 *++yyvsp = yyval; 10367 10368 10369 /* Now `shift' the result of the reduction. Determine what state 10370 that goes to, based on the state we popped back to and the rule 10371 number reduced by. */ 10372 10373 yyn = yyr1[yyn]; 10374 10375 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 10376 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 10377 yystate = yytable[yystate]; 10378 else 10379 yystate = yydefgoto[yyn - YYNTOKENS]; 10380 10381 goto yynewstate; 10382 10383 10384 /*------------------------------------. 10385 | yyerrlab -- here on detecting error | 10386 `------------------------------------*/ 10387 yyerrlab: 10388 /* If not already recovering from an error, report this error. */ 10389 if (!yyerrstatus) 10390 { 10391 ++yynerrs; 10392 #if ! YYERROR_VERBOSE 10393 parser_yyerror (parser, YY_("syntax error")); 10394 #else 10395 { 10396 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 10397 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 10398 { 10399 YYSIZE_T yyalloc = 2 * yysize; 10400 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 10401 yyalloc = YYSTACK_ALLOC_MAXIMUM; 10402 if (yymsg != yymsgbuf) 10403 YYSTACK_FREE (yymsg); 10404 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 10405 if (yymsg) 10406 yymsg_alloc = yyalloc; 10407 else 10408 { 10409 yymsg = yymsgbuf; 10410 yymsg_alloc = sizeof yymsgbuf; 10411 } 10412 } 10413 10414 if (0 < yysize && yysize <= yymsg_alloc) 10415 { 10416 (void) yysyntax_error (yymsg, yystate, yychar); 10417 parser_yyerror (parser, yymsg); 10418 } 10419 else 10420 { 10421 parser_yyerror (parser, YY_("syntax error")); 10422 if (yysize != 0) 10423 goto yyexhaustedlab; 10424 } 10425 } 10426 #endif 10427 } 10428 10429 10430 10431 if (yyerrstatus == 3) 10432 { 10433 /* If just tried and failed to reuse look-ahead token after an 10434 error, discard it. */ 10435 10436 if (yychar <= YYEOF) 10437 { 10438 /* Return failure if at end of input. */ 10439 if (yychar == YYEOF) 10440 YYABORT; 10441 } 10442 else 10443 { 10444 yydestruct ("Error: discarding", 10445 yytoken, &yylval, parser); 10446 yychar = YYEMPTY; 10447 } 10448 } 10449 10450 /* Else will try to reuse look-ahead token after shifting the error 10451 token. */ 10452 goto yyerrlab1; 10453 10454 10455 /*---------------------------------------------------. 10456 | yyerrorlab -- error raised explicitly by YYERROR. | 10457 `---------------------------------------------------*/ 10458 yyerrorlab: 10459 10460 /* Pacify compilers like GCC when the user code never invokes 10461 YYERROR and the label yyerrorlab therefore never appears in user 10462 code. */ 10463 if (/*CONSTCOND*/ 0) 10464 goto yyerrorlab; 10465 10466 /* Do not reclaim the symbols of the rule which action triggered 10467 this YYERROR. */ 10468 YYPOPSTACK (yylen); 10469 yylen = 0; 10470 YY_STACK_PRINT (yyss, yyssp); 10471 yystate = *yyssp; 10472 goto yyerrlab1; 10473 10474 10475 /*-------------------------------------------------------------. 10476 | yyerrlab1 -- common code for both syntax error and YYERROR. | 10477 `-------------------------------------------------------------*/ 10478 yyerrlab1: 10479 yyerrstatus = 3; /* Each real token shifted decrements this. */ 10480 10481 for (;;) 10482 { 10483 yyn = yypact[yystate]; 10484 if (yyn != YYPACT_NINF) 10485 { 10486 yyn += YYTERROR; 10487 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 10488 { 10489 yyn = yytable[yyn]; 10490 if (0 < yyn) 10491 break; 10492 } 10493 } 10494 10495 /* Pop the current state because it cannot handle the error token. */ 10496 if (yyssp == yyss) 10497 YYABORT; 10498 10499 10500 yydestruct ("Error: popping", 10501 yystos[yystate], yyvsp, parser); 10502 YYPOPSTACK (1); 10503 yystate = *yyssp; 10504 YY_STACK_PRINT (yyss, yyssp); 10505 } 10506 10507 if (yyn == YYFINAL) 10508 YYACCEPT; 10509 10510 *++yyvsp = yylval; 10511 10512 10513 /* Shift the error token. */ 10514 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 10515 10516 yystate = yyn; 10517 goto yynewstate; 10518 10519 10520 /*-------------------------------------. 10521 | yyacceptlab -- YYACCEPT comes here. | 10522 `-------------------------------------*/ 10523 yyacceptlab: 10524 yyresult = 0; 10525 goto yyreturn; 10526 10527 /*-----------------------------------. 10528 | yyabortlab -- YYABORT comes here. | 10529 `-----------------------------------*/ 10530 yyabortlab: 10531 yyresult = 1; 10532 goto yyreturn; 10533 10534 #ifndef yyoverflow 10535 /*-------------------------------------------------. 10536 | yyexhaustedlab -- memory exhaustion comes here. | 10537 `-------------------------------------------------*/ 10538 yyexhaustedlab: 10539 parser_yyerror (parser, YY_("memory exhausted")); 10540 yyresult = 2; 10541 /* Fall through. */ 10542 #endif 10543 10544 yyreturn: 10545 if (yychar != YYEOF && yychar != YYEMPTY) 10546 yydestruct ("Cleanup: discarding lookahead", 10547 yytoken, &yylval, parser); 10548 /* Do not reclaim the symbols of the rule which action triggered 10549 this YYABORT or YYACCEPT. */ 10550 YYPOPSTACK (yylen); 10551 YY_STACK_PRINT (yyss, yyssp); 10552 while (yyssp != yyss) 10553 { 10554 yydestruct ("Cleanup: popping", 10555 yystos[*yyssp], yyvsp, parser); 10556 YYPOPSTACK (1); 10557 } 10558 #ifndef yyoverflow 10559 if (yyss != yyssa) 10560 YYSTACK_FREE (yyss); 10561 #endif 10562 #if YYERROR_VERBOSE 10563 if (yymsg != yymsgbuf) 10564 YYSTACK_FREE (yymsg); 10565 #endif 10566 /* Make sure YYID is used. */ 10567 return YYID (yyresult); 10568 } 10569 10570 10571 #line 4988 "parse.y" 10572 10573 # undef parser 10574 # undef yylex 10575 # undef yylval 10576 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 10577 10578 static int parser_regx_options(struct parser_params*); 10579 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 10580 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 10581 static int parser_parse_string(struct parser_params*,NODE*); 10582 static int parser_here_document(struct parser_params*,NODE*); 10583 10584 10585 # define nextc() parser_nextc(parser) 10586 # define pushback(c) parser_pushback(parser, (c)) 10587 # define newtok() parser_newtok(parser) 10588 # define tokspace(n) parser_tokspace(parser, (n)) 10589 # define tokadd(c) parser_tokadd(parser, (c)) 10590 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 10591 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 10592 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 10593 # define regx_options() parser_regx_options(parser) 10594 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 10595 # define parse_string(n) parser_parse_string(parser,(n)) 10596 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 10597 # define here_document(n) parser_here_document(parser,(n)) 10598 # define heredoc_identifier() parser_heredoc_identifier(parser) 10599 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 10600 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 10601 10602 #ifndef RIPPER 10603 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 10604 # define set_yylval_num(x) (yylval.num = (x)) 10605 # define set_yylval_id(x) (yylval.id = (x)) 10606 # define set_yylval_name(x) (yylval.id = (x)) 10607 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 10608 # define set_yylval_node(x) (yylval.node = (x)) 10609 # define yylval_id() (yylval.id) 10610 #else 10611 static inline VALUE 10612 ripper_yylval_id(ID x) 10613 { 10614 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 10615 } 10616 # define set_yylval_str(x) (void)(x) 10617 # define set_yylval_num(x) (void)(x) 10618 # define set_yylval_id(x) (void)(x) 10619 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 10620 # define set_yylval_literal(x) (void)(x) 10621 # define set_yylval_node(x) (void)(x) 10622 # define yylval_id() yylval.id 10623 #endif 10624 10625 #ifndef RIPPER 10626 #define ripper_flush(p) (void)(p) 10627 #else 10628 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 10629 10630 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 10631 10632 static int 10633 ripper_has_scan_event(struct parser_params *parser) 10634 { 10635 10636 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 10637 return lex_p > parser->tokp; 10638 } 10639 10640 static VALUE 10641 ripper_scan_event_val(struct parser_params *parser, int t) 10642 { 10643 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 10644 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 10645 ripper_flush(parser); 10646 return rval; 10647 } 10648 10649 static void 10650 ripper_dispatch_scan_event(struct parser_params *parser, int t) 10651 { 10652 if (!ripper_has_scan_event(parser)) return; 10653 yylval_rval = ripper_scan_event_val(parser, t); 10654 } 10655 10656 static void 10657 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 10658 { 10659 if (!ripper_has_scan_event(parser)) return; 10660 (void)ripper_scan_event_val(parser, t); 10661 } 10662 10663 static void 10664 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 10665 { 10666 int saved_line = ruby_sourceline; 10667 const char *saved_tokp = parser->tokp; 10668 10669 ruby_sourceline = parser->delayed_line; 10670 parser->tokp = lex_pbeg + parser->delayed_col; 10671 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 10672 parser->delayed = Qnil; 10673 ruby_sourceline = saved_line; 10674 parser->tokp = saved_tokp; 10675 } 10676 #endif /* RIPPER */ 10677 10678 #include "ruby/regex.h" 10679 #include "ruby/util.h" 10680 10681 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 10682 since ours (we hope) works properly with all combinations of 10683 machines, compilers, `char' and `unsigned char' argument types. 10684 (Per Bothner suggested the basic approach.) */ 10685 #undef SIGN_EXTEND_CHAR 10686 #if __STDC__ 10687 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 10688 #else /* not __STDC__ */ 10689 /* As in Harbison and Steele. */ 10690 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 10691 #endif 10692 10693 #define parser_encoding_name() (current_enc->name) 10694 #define parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) 10695 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) 10696 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 10697 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) 10698 10699 #define parser_isascii() ISASCII(*(lex_p-1)) 10700 10701 #ifndef RIPPER 10702 static int 10703 token_info_get_column(struct parser_params *parser, const char *token) 10704 { 10705 int column = 1; 10706 const char *p, *pend = lex_p - strlen(token); 10707 for (p = lex_pbeg; p < pend; p++) { 10708 if (*p == '\t') { 10709 column = (((column - 1) / 8) + 1) * 8; 10710 } 10711 column++; 10712 } 10713 return column; 10714 } 10715 10716 static int 10717 token_info_has_nonspaces(struct parser_params *parser, const char *token) 10718 { 10719 const char *p, *pend = lex_p - strlen(token); 10720 for (p = lex_pbeg; p < pend; p++) { 10721 if (*p != ' ' && *p != '\t') { 10722 return 1; 10723 } 10724 } 10725 return 0; 10726 } 10727 10728 #undef token_info_push 10729 static void 10730 token_info_push(struct parser_params *parser, const char *token) 10731 { 10732 token_info *ptinfo; 10733 10734 if (!parser->parser_token_info_enabled) return; 10735 ptinfo = ALLOC(token_info); 10736 ptinfo->token = token; 10737 ptinfo->linenum = ruby_sourceline; 10738 ptinfo->column = token_info_get_column(parser, token); 10739 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 10740 ptinfo->next = parser->parser_token_info; 10741 10742 parser->parser_token_info = ptinfo; 10743 } 10744 10745 #undef token_info_pop 10746 static void 10747 token_info_pop(struct parser_params *parser, const char *token) 10748 { 10749 int linenum; 10750 token_info *ptinfo = parser->parser_token_info; 10751 10752 if (!ptinfo) return; 10753 parser->parser_token_info = ptinfo->next; 10754 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 10755 goto finish; 10756 } 10757 linenum = ruby_sourceline; 10758 if (linenum == ptinfo->linenum) { /* SKIP */ 10759 goto finish; 10760 } 10761 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 10762 goto finish; 10763 } 10764 if (parser->parser_token_info_enabled) { 10765 rb_compile_warn(ruby_sourcefile, linenum, 10766 "mismatched indentations at '%s' with '%s' at %d", 10767 token, ptinfo->token, ptinfo->linenum); 10768 } 10769 10770 finish: 10771 xfree(ptinfo); 10772 } 10773 #endif /* RIPPER */ 10774 10775 static int 10776 parser_yyerror(struct parser_params *parser, const char *msg) 10777 { 10778 #ifndef RIPPER 10779 const int max_line_margin = 30; 10780 const char *p, *pe; 10781 char *buf; 10782 long len; 10783 int i; 10784 10785 compile_error(PARSER_ARG "%s", msg); 10786 p = lex_p; 10787 while (lex_pbeg <= p) { 10788 if (*p == '\n') break; 10789 p--; 10790 } 10791 p++; 10792 10793 pe = lex_p; 10794 while (pe < lex_pend) { 10795 if (*pe == '\n') break; 10796 pe++; 10797 } 10798 10799 len = pe - p; 10800 if (len > 4) { 10801 char *p2; 10802 const char *pre = "", *post = ""; 10803 10804 if (len > max_line_margin * 2 + 10) { 10805 if (lex_p - p > max_line_margin) { 10806 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 10807 pre = "..."; 10808 } 10809 if (pe - lex_p > max_line_margin) { 10810 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 10811 post = "..."; 10812 } 10813 len = pe - p; 10814 } 10815 buf = ALLOCA_N(char, len+2); 10816 MEMCPY(buf, p, char, len); 10817 buf[len] = '\0'; 10818 rb_compile_error_append("%s%s%s", pre, buf, post); 10819 10820 i = (int)(lex_p - p); 10821 p2 = buf; pe = buf + len; 10822 10823 while (p2 < pe) { 10824 if (*p2 != '\t') *p2 = ' '; 10825 p2++; 10826 } 10827 buf[i] = '^'; 10828 buf[i+1] = '\0'; 10829 rb_compile_error_append("%s%s", pre, buf); 10830 } 10831 #else 10832 dispatch1(parse_error, STR_NEW2(msg)); 10833 #endif /* !RIPPER */ 10834 return 0; 10835 } 10836 10837 static void parser_prepare(struct parser_params *parser); 10838 10839 #ifndef RIPPER 10840 static VALUE 10841 debug_lines(const char *f) 10842 { 10843 ID script_lines; 10844 CONST_ID(script_lines, "SCRIPT_LINES__"); 10845 if (rb_const_defined_at(rb_cObject, script_lines)) { 10846 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 10847 if (RB_TYPE_P(hash, T_HASH)) { 10848 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10849 VALUE lines = rb_ary_new(); 10850 rb_hash_aset(hash, fname, lines); 10851 return lines; 10852 } 10853 } 10854 return 0; 10855 } 10856 10857 static VALUE 10858 coverage(const char *f, int n) 10859 { 10860 VALUE coverages = rb_get_coverages(); 10861 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 10862 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10863 VALUE lines = rb_ary_new2(n); 10864 int i; 10865 RBASIC(lines)->klass = 0; 10866 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 10867 RARRAY(lines)->as.heap.len = n; 10868 rb_hash_aset(coverages, fname, lines); 10869 return lines; 10870 } 10871 return 0; 10872 } 10873 10874 static int 10875 e_option_supplied(struct parser_params *parser) 10876 { 10877 return strcmp(ruby_sourcefile, "-e") == 0; 10878 } 10879 10880 static VALUE 10881 yycompile0(VALUE arg) 10882 { 10883 int n; 10884 NODE *tree; 10885 struct parser_params *parser = (struct parser_params *)arg; 10886 10887 if (!compile_for_eval && rb_safe_level() == 0) { 10888 ruby_debug_lines = debug_lines(ruby_sourcefile); 10889 if (ruby_debug_lines && ruby_sourceline > 0) { 10890 VALUE str = STR_NEW0(); 10891 n = ruby_sourceline; 10892 do { 10893 rb_ary_push(ruby_debug_lines, str); 10894 } while (--n); 10895 } 10896 10897 if (!e_option_supplied(parser)) { 10898 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); 10899 } 10900 } 10901 10902 parser_prepare(parser); 10903 deferred_nodes = 0; 10904 #ifndef RIPPER 10905 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 10906 #endif 10907 #ifndef RIPPER 10908 if (RUBY_DTRACE_PARSE_BEGIN_ENABLED()) { 10909 RUBY_DTRACE_PARSE_BEGIN(parser->parser_ruby_sourcefile, 10910 parser->parser_ruby_sourceline); 10911 } 10912 #endif 10913 n = yyparse((void*)parser); 10914 #ifndef RIPPER 10915 if (RUBY_DTRACE_PARSE_END_ENABLED()) { 10916 RUBY_DTRACE_PARSE_END(parser->parser_ruby_sourcefile, 10917 parser->parser_ruby_sourceline); 10918 } 10919 #endif 10920 ruby_debug_lines = 0; 10921 ruby_coverage = 0; 10922 compile_for_eval = 0; 10923 10924 lex_strterm = 0; 10925 lex_p = lex_pbeg = lex_pend = 0; 10926 lex_lastline = lex_nextline = 0; 10927 if (parser->nerr) { 10928 return 0; 10929 } 10930 tree = ruby_eval_tree; 10931 if (!tree) { 10932 tree = NEW_NIL(); 10933 } 10934 else if (ruby_eval_tree_begin) { 10935 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 10936 } 10937 return (VALUE)tree; 10938 } 10939 10940 static NODE* 10941 yycompile(struct parser_params *parser, const char *f, int line) 10942 { 10943 ruby_sourcefile = ruby_strdup(f); 10944 ruby_sourceline = line - 1; 10945 return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser); 10946 } 10947 #endif /* !RIPPER */ 10948 10949 static rb_encoding * 10950 must_be_ascii_compatible(VALUE s) 10951 { 10952 rb_encoding *enc = rb_enc_get(s); 10953 if (!rb_enc_asciicompat(enc)) { 10954 rb_raise(rb_eArgError, "invalid source encoding"); 10955 } 10956 return enc; 10957 } 10958 10959 static VALUE 10960 lex_get_str(struct parser_params *parser, VALUE s) 10961 { 10962 char *beg, *end, *pend; 10963 rb_encoding *enc = must_be_ascii_compatible(s); 10964 10965 beg = RSTRING_PTR(s); 10966 if (lex_gets_ptr) { 10967 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 10968 beg += lex_gets_ptr; 10969 } 10970 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 10971 end = beg; 10972 while (end < pend) { 10973 if (*end++ == '\n') break; 10974 } 10975 lex_gets_ptr = end - RSTRING_PTR(s); 10976 return rb_enc_str_new(beg, end - beg, enc); 10977 } 10978 10979 static VALUE 10980 lex_getline(struct parser_params *parser) 10981 { 10982 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 10983 if (NIL_P(line)) return line; 10984 must_be_ascii_compatible(line); 10985 #ifndef RIPPER 10986 if (ruby_debug_lines) { 10987 rb_enc_associate(line, current_enc); 10988 rb_ary_push(ruby_debug_lines, line); 10989 } 10990 if (ruby_coverage) { 10991 rb_ary_push(ruby_coverage, Qnil); 10992 } 10993 #endif 10994 return line; 10995 } 10996 10997 #ifdef RIPPER 10998 static rb_data_type_t parser_data_type; 10999 #else 11000 static const rb_data_type_t parser_data_type; 11001 11002 static NODE* 11003 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11004 { 11005 struct parser_params *parser; 11006 NODE *node; 11007 11008 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11009 lex_gets = lex_get_str; 11010 lex_gets_ptr = 0; 11011 lex_input = s; 11012 lex_pbeg = lex_p = lex_pend = 0; 11013 compile_for_eval = rb_parse_in_eval(); 11014 11015 node = yycompile(parser, f, line); 11016 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 11017 11018 return node; 11019 } 11020 11021 NODE* 11022 rb_compile_string(const char *f, VALUE s, int line) 11023 { 11024 must_be_ascii_compatible(s); 11025 return parser_compile_string(rb_parser_new(), f, s, line); 11026 } 11027 11028 NODE* 11029 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11030 { 11031 must_be_ascii_compatible(s); 11032 return parser_compile_string(vparser, f, s, line); 11033 } 11034 11035 NODE* 11036 rb_compile_cstr(const char *f, const char *s, int len, int line) 11037 { 11038 VALUE str = rb_str_new(s, len); 11039 return parser_compile_string(rb_parser_new(), f, str, line); 11040 } 11041 11042 NODE* 11043 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 11044 { 11045 VALUE str = rb_str_new(s, len); 11046 return parser_compile_string(vparser, f, str, line); 11047 } 11048 11049 static VALUE 11050 lex_io_gets(struct parser_params *parser, VALUE io) 11051 { 11052 return rb_io_gets(io); 11053 } 11054 11055 NODE* 11056 rb_compile_file(const char *f, VALUE file, int start) 11057 { 11058 VALUE volatile vparser = rb_parser_new(); 11059 11060 return rb_parser_compile_file(vparser, f, file, start); 11061 } 11062 11063 NODE* 11064 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 11065 { 11066 struct parser_params *parser; 11067 NODE *node; 11068 11069 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11070 lex_gets = lex_io_gets; 11071 lex_input = file; 11072 lex_pbeg = lex_p = lex_pend = 0; 11073 compile_for_eval = rb_parse_in_eval(); 11074 11075 node = yycompile(parser, f, start); 11076 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 11077 11078 return node; 11079 } 11080 #endif /* !RIPPER */ 11081 11082 #define STR_FUNC_ESCAPE 0x01 11083 #define STR_FUNC_EXPAND 0x02 11084 #define STR_FUNC_REGEXP 0x04 11085 #define STR_FUNC_QWORDS 0x08 11086 #define STR_FUNC_SYMBOL 0x10 11087 #define STR_FUNC_INDENT 0x20 11088 11089 enum string_type { 11090 str_squote = (0), 11091 str_dquote = (STR_FUNC_EXPAND), 11092 str_xquote = (STR_FUNC_EXPAND), 11093 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 11094 str_sword = (STR_FUNC_QWORDS), 11095 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 11096 str_ssym = (STR_FUNC_SYMBOL), 11097 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 11098 }; 11099 11100 static VALUE 11101 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 11102 { 11103 VALUE str; 11104 11105 str = rb_enc_str_new(p, n, enc); 11106 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 11107 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 11108 } 11109 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 11110 rb_enc_associate(str, rb_ascii8bit_encoding()); 11111 } 11112 } 11113 11114 return str; 11115 } 11116 11117 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 11118 #define lex_eol_p() (lex_p >= lex_pend) 11119 #define peek(c) peek_n((c), 0) 11120 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 11121 11122 static inline int 11123 parser_nextc(struct parser_params *parser) 11124 { 11125 int c; 11126 11127 if (lex_p == lex_pend) { 11128 VALUE v = lex_nextline; 11129 lex_nextline = 0; 11130 if (!v) { 11131 if (parser->eofp) 11132 return -1; 11133 11134 if (!lex_input || NIL_P(v = lex_getline(parser))) { 11135 parser->eofp = Qtrue; 11136 lex_goto_eol(parser); 11137 return -1; 11138 } 11139 } 11140 { 11141 #ifdef RIPPER 11142 if (parser->tokp < lex_pend) { 11143 if (NIL_P(parser->delayed)) { 11144 parser->delayed = rb_str_buf_new(1024); 11145 rb_enc_associate(parser->delayed, current_enc); 11146 rb_str_buf_cat(parser->delayed, 11147 parser->tokp, lex_pend - parser->tokp); 11148 parser->delayed_line = ruby_sourceline; 11149 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 11150 } 11151 else { 11152 rb_str_buf_cat(parser->delayed, 11153 parser->tokp, lex_pend - parser->tokp); 11154 } 11155 } 11156 #endif 11157 if (heredoc_end > 0) { 11158 ruby_sourceline = heredoc_end; 11159 heredoc_end = 0; 11160 } 11161 ruby_sourceline++; 11162 parser->line_count++; 11163 lex_pbeg = lex_p = RSTRING_PTR(v); 11164 lex_pend = lex_p + RSTRING_LEN(v); 11165 ripper_flush(parser); 11166 lex_lastline = v; 11167 } 11168 } 11169 c = (unsigned char)*lex_p++; 11170 if (c == '\r' && peek('\n')) { 11171 lex_p++; 11172 c = '\n'; 11173 } 11174 11175 return c; 11176 } 11177 11178 static void 11179 parser_pushback(struct parser_params *parser, int c) 11180 { 11181 if (c == -1) return; 11182 lex_p--; 11183 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 11184 lex_p--; 11185 } 11186 } 11187 11188 #define was_bol() (lex_p == lex_pbeg + 1) 11189 11190 #define tokfix() (tokenbuf[tokidx]='\0') 11191 #define tok() tokenbuf 11192 #define toklen() tokidx 11193 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 11194 11195 static char* 11196 parser_newtok(struct parser_params *parser) 11197 { 11198 tokidx = 0; 11199 tokline = ruby_sourceline; 11200 if (!tokenbuf) { 11201 toksiz = 60; 11202 tokenbuf = ALLOC_N(char, 60); 11203 } 11204 if (toksiz > 4096) { 11205 toksiz = 60; 11206 REALLOC_N(tokenbuf, char, 60); 11207 } 11208 return tokenbuf; 11209 } 11210 11211 static char * 11212 parser_tokspace(struct parser_params *parser, int n) 11213 { 11214 tokidx += n; 11215 11216 if (tokidx >= toksiz) { 11217 do {toksiz *= 2;} while (toksiz < tokidx); 11218 REALLOC_N(tokenbuf, char, toksiz); 11219 } 11220 return &tokenbuf[tokidx-n]; 11221 } 11222 11223 static void 11224 parser_tokadd(struct parser_params *parser, int c) 11225 { 11226 tokenbuf[tokidx++] = (char)c; 11227 if (tokidx >= toksiz) { 11228 toksiz *= 2; 11229 REALLOC_N(tokenbuf, char, toksiz); 11230 } 11231 } 11232 11233 static int 11234 parser_tok_hex(struct parser_params *parser, size_t *numlen) 11235 { 11236 int c; 11237 11238 c = scan_hex(lex_p, 2, numlen); 11239 if (!*numlen) { 11240 yyerror("invalid hex escape"); 11241 return 0; 11242 } 11243 lex_p += *numlen; 11244 return c; 11245 } 11246 11247 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 11248 11249 /* return value is for ?\u3042 */ 11250 static int 11251 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 11252 int string_literal, int symbol_literal, int regexp_literal) 11253 { 11254 /* 11255 * If string_literal is true, then we allow multiple codepoints 11256 * in \u{}, and add the codepoints to the current token. 11257 * Otherwise we're parsing a character literal and return a single 11258 * codepoint without adding it 11259 */ 11260 11261 int codepoint; 11262 size_t numlen; 11263 11264 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 11265 11266 if (peek('{')) { /* handle \u{...} form */ 11267 do { 11268 if (regexp_literal) { tokadd(*lex_p); } 11269 nextc(); 11270 codepoint = scan_hex(lex_p, 6, &numlen); 11271 if (numlen == 0) { 11272 yyerror("invalid Unicode escape"); 11273 return 0; 11274 } 11275 if (codepoint > 0x10ffff) { 11276 yyerror("invalid Unicode codepoint (too large)"); 11277 return 0; 11278 } 11279 lex_p += numlen; 11280 if (regexp_literal) { 11281 tokcopy((int)numlen); 11282 } 11283 else if (codepoint >= 0x80) { 11284 *encp = rb_utf8_encoding(); 11285 if (string_literal) tokaddmbc(codepoint, *encp); 11286 } 11287 else if (string_literal) { 11288 tokadd(codepoint); 11289 } 11290 } while (string_literal && (peek(' ') || peek('\t'))); 11291 11292 if (!peek('}')) { 11293 yyerror("unterminated Unicode escape"); 11294 return 0; 11295 } 11296 11297 if (regexp_literal) { tokadd('}'); } 11298 nextc(); 11299 } 11300 else { /* handle \uxxxx form */ 11301 codepoint = scan_hex(lex_p, 4, &numlen); 11302 if (numlen < 4) { 11303 yyerror("invalid Unicode escape"); 11304 return 0; 11305 } 11306 lex_p += 4; 11307 if (regexp_literal) { 11308 tokcopy(4); 11309 } 11310 else if (codepoint >= 0x80) { 11311 *encp = rb_utf8_encoding(); 11312 if (string_literal) tokaddmbc(codepoint, *encp); 11313 } 11314 else if (string_literal) { 11315 tokadd(codepoint); 11316 } 11317 } 11318 11319 return codepoint; 11320 } 11321 11322 #define ESCAPE_CONTROL 1 11323 #define ESCAPE_META 2 11324 11325 static int 11326 parser_read_escape(struct parser_params *parser, int flags, 11327 rb_encoding **encp) 11328 { 11329 int c; 11330 size_t numlen; 11331 11332 switch (c = nextc()) { 11333 case '\\': /* Backslash */ 11334 return c; 11335 11336 case 'n': /* newline */ 11337 return '\n'; 11338 11339 case 't': /* horizontal tab */ 11340 return '\t'; 11341 11342 case 'r': /* carriage-return */ 11343 return '\r'; 11344 11345 case 'f': /* form-feed */ 11346 return '\f'; 11347 11348 case 'v': /* vertical tab */ 11349 return '\13'; 11350 11351 case 'a': /* alarm(bell) */ 11352 return '\007'; 11353 11354 case 'e': /* escape */ 11355 return 033; 11356 11357 case '0': case '1': case '2': case '3': /* octal constant */ 11358 case '4': case '5': case '6': case '7': 11359 pushback(c); 11360 c = scan_oct(lex_p, 3, &numlen); 11361 lex_p += numlen; 11362 return c; 11363 11364 case 'x': /* hex constant */ 11365 c = tok_hex(&numlen); 11366 if (numlen == 0) return 0; 11367 return c; 11368 11369 case 'b': /* backspace */ 11370 return '\010'; 11371 11372 case 's': /* space */ 11373 return ' '; 11374 11375 case 'M': 11376 if (flags & ESCAPE_META) goto eof; 11377 if ((c = nextc()) != '-') { 11378 pushback(c); 11379 goto eof; 11380 } 11381 if ((c = nextc()) == '\\') { 11382 if (peek('u')) goto eof; 11383 return read_escape(flags|ESCAPE_META, encp) | 0x80; 11384 } 11385 else if (c == -1 || !ISASCII(c)) goto eof; 11386 else { 11387 return ((c & 0xff) | 0x80); 11388 } 11389 11390 case 'C': 11391 if ((c = nextc()) != '-') { 11392 pushback(c); 11393 goto eof; 11394 } 11395 case 'c': 11396 if (flags & ESCAPE_CONTROL) goto eof; 11397 if ((c = nextc())== '\\') { 11398 if (peek('u')) goto eof; 11399 c = read_escape(flags|ESCAPE_CONTROL, encp); 11400 } 11401 else if (c == '?') 11402 return 0177; 11403 else if (c == -1 || !ISASCII(c)) goto eof; 11404 return c & 0x9f; 11405 11406 eof: 11407 case -1: 11408 yyerror("Invalid escape character syntax"); 11409 return '\0'; 11410 11411 default: 11412 return c; 11413 } 11414 } 11415 11416 static void 11417 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 11418 { 11419 int len = rb_enc_codelen(c, enc); 11420 rb_enc_mbcput(c, tokspace(len), enc); 11421 } 11422 11423 static int 11424 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 11425 { 11426 int c; 11427 int flags = 0; 11428 size_t numlen; 11429 11430 first: 11431 switch (c = nextc()) { 11432 case '\n': 11433 return 0; /* just ignore */ 11434 11435 case '0': case '1': case '2': case '3': /* octal constant */ 11436 case '4': case '5': case '6': case '7': 11437 { 11438 ruby_scan_oct(--lex_p, 3, &numlen); 11439 if (numlen == 0) goto eof; 11440 lex_p += numlen; 11441 tokcopy((int)numlen + 1); 11442 } 11443 return 0; 11444 11445 case 'x': /* hex constant */ 11446 { 11447 tok_hex(&numlen); 11448 if (numlen == 0) return -1; 11449 tokcopy((int)numlen + 2); 11450 } 11451 return 0; 11452 11453 case 'M': 11454 if (flags & ESCAPE_META) goto eof; 11455 if ((c = nextc()) != '-') { 11456 pushback(c); 11457 goto eof; 11458 } 11459 tokcopy(3); 11460 flags |= ESCAPE_META; 11461 goto escaped; 11462 11463 case 'C': 11464 if (flags & ESCAPE_CONTROL) goto eof; 11465 if ((c = nextc()) != '-') { 11466 pushback(c); 11467 goto eof; 11468 } 11469 tokcopy(3); 11470 goto escaped; 11471 11472 case 'c': 11473 if (flags & ESCAPE_CONTROL) goto eof; 11474 tokcopy(2); 11475 flags |= ESCAPE_CONTROL; 11476 escaped: 11477 if ((c = nextc()) == '\\') { 11478 goto first; 11479 } 11480 else if (c == -1) goto eof; 11481 tokadd(c); 11482 return 0; 11483 11484 eof: 11485 case -1: 11486 yyerror("Invalid escape character syntax"); 11487 return -1; 11488 11489 default: 11490 tokadd('\\'); 11491 tokadd(c); 11492 } 11493 return 0; 11494 } 11495 11496 static int 11497 parser_regx_options(struct parser_params *parser) 11498 { 11499 int kcode = 0; 11500 int kopt = 0; 11501 int options = 0; 11502 int c, opt, kc; 11503 11504 newtok(); 11505 while (c = nextc(), ISALPHA(c)) { 11506 if (c == 'o') { 11507 options |= RE_OPTION_ONCE; 11508 } 11509 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 11510 if (kc >= 0) { 11511 if (kc != rb_ascii8bit_encindex()) kcode = c; 11512 kopt = opt; 11513 } 11514 else { 11515 options |= opt; 11516 } 11517 } 11518 else { 11519 tokadd(c); 11520 } 11521 } 11522 options |= kopt; 11523 pushback(c); 11524 if (toklen()) { 11525 tokfix(); 11526 compile_error(PARSER_ARG "unknown regexp option%s - %s", 11527 toklen() > 1 ? "s" : "", tok()); 11528 } 11529 return options | RE_OPTION_ENCODING(kcode); 11530 } 11531 11532 static void 11533 dispose_string(VALUE str) 11534 { 11535 rb_str_free(str); 11536 rb_gc_force_recycle(str); 11537 } 11538 11539 static int 11540 parser_tokadd_mbchar(struct parser_params *parser, int c) 11541 { 11542 int len = parser_precise_mbclen(); 11543 if (!MBCLEN_CHARFOUND_P(len)) { 11544 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 11545 return -1; 11546 } 11547 tokadd(c); 11548 lex_p += --len; 11549 if (len > 0) tokcopy(len); 11550 return c; 11551 } 11552 11553 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 11554 11555 static inline int 11556 simple_re_meta(int c) 11557 { 11558 switch (c) { 11559 case '$': case '*': case '+': case '.': 11560 case '?': case '^': case '|': 11561 case ')': case ']': case '}': case '>': 11562 return TRUE; 11563 default: 11564 return FALSE; 11565 } 11566 } 11567 11568 static int 11569 parser_tokadd_string(struct parser_params *parser, 11570 int func, int term, int paren, long *nest, 11571 rb_encoding **encp) 11572 { 11573 int c; 11574 int has_nonascii = 0; 11575 rb_encoding *enc = *encp; 11576 char *errbuf = 0; 11577 static const char mixed_msg[] = "%s mixed within %s source"; 11578 11579 #define mixed_error(enc1, enc2) if (!errbuf) { \ 11580 size_t len = sizeof(mixed_msg) - 4; \ 11581 len += strlen(rb_enc_name(enc1)); \ 11582 len += strlen(rb_enc_name(enc2)); \ 11583 errbuf = ALLOCA_N(char, len); \ 11584 snprintf(errbuf, len, mixed_msg, \ 11585 rb_enc_name(enc1), \ 11586 rb_enc_name(enc2)); \ 11587 yyerror(errbuf); \ 11588 } 11589 #define mixed_escape(beg, enc1, enc2) do { \ 11590 const char *pos = lex_p; \ 11591 lex_p = (beg); \ 11592 mixed_error((enc1), (enc2)); \ 11593 lex_p = pos; \ 11594 } while (0) 11595 11596 while ((c = nextc()) != -1) { 11597 if (paren && c == paren) { 11598 ++*nest; 11599 } 11600 else if (c == term) { 11601 if (!nest || !*nest) { 11602 pushback(c); 11603 break; 11604 } 11605 --*nest; 11606 } 11607 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 11608 int c2 = *lex_p; 11609 if (c2 == '$' || c2 == '@' || c2 == '{') { 11610 pushback(c); 11611 break; 11612 } 11613 } 11614 else if (c == '\\') { 11615 const char *beg = lex_p - 1; 11616 c = nextc(); 11617 switch (c) { 11618 case '\n': 11619 if (func & STR_FUNC_QWORDS) break; 11620 if (func & STR_FUNC_EXPAND) continue; 11621 tokadd('\\'); 11622 break; 11623 11624 case '\\': 11625 if (func & STR_FUNC_ESCAPE) tokadd(c); 11626 break; 11627 11628 case 'u': 11629 if ((func & STR_FUNC_EXPAND) == 0) { 11630 tokadd('\\'); 11631 break; 11632 } 11633 parser_tokadd_utf8(parser, &enc, 1, 11634 func & STR_FUNC_SYMBOL, 11635 func & STR_FUNC_REGEXP); 11636 if (has_nonascii && enc != *encp) { 11637 mixed_escape(beg, enc, *encp); 11638 } 11639 continue; 11640 11641 default: 11642 if (c == -1) return -1; 11643 if (!ISASCII(c)) { 11644 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 11645 goto non_ascii; 11646 } 11647 if (func & STR_FUNC_REGEXP) { 11648 if (c == term && !simple_re_meta(c)) { 11649 tokadd(c); 11650 continue; 11651 } 11652 pushback(c); 11653 if ((c = tokadd_escape(&enc)) < 0) 11654 return -1; 11655 if (has_nonascii && enc != *encp) { 11656 mixed_escape(beg, enc, *encp); 11657 } 11658 continue; 11659 } 11660 else if (func & STR_FUNC_EXPAND) { 11661 pushback(c); 11662 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 11663 c = read_escape(0, &enc); 11664 } 11665 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11666 /* ignore backslashed spaces in %w */ 11667 } 11668 else if (c != term && !(paren && c == paren)) { 11669 tokadd('\\'); 11670 pushback(c); 11671 continue; 11672 } 11673 } 11674 } 11675 else if (!parser_isascii()) { 11676 non_ascii: 11677 has_nonascii = 1; 11678 if (enc != *encp) { 11679 mixed_error(enc, *encp); 11680 continue; 11681 } 11682 if (tokadd_mbchar(c) == -1) return -1; 11683 continue; 11684 } 11685 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11686 pushback(c); 11687 break; 11688 } 11689 if (c & 0x80) { 11690 has_nonascii = 1; 11691 if (enc != *encp) { 11692 mixed_error(enc, *encp); 11693 continue; 11694 } 11695 } 11696 tokadd(c); 11697 } 11698 *encp = enc; 11699 return c; 11700 } 11701 11702 #define NEW_STRTERM(func, term, paren) \ 11703 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 11704 11705 #ifdef RIPPER 11706 static void 11707 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc) 11708 { 11709 if (!NIL_P(parser->delayed)) { 11710 ptrdiff_t len = lex_p - parser->tokp; 11711 if (len > 0) { 11712 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 11713 } 11714 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11715 parser->tokp = lex_p; 11716 } 11717 } 11718 11719 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc)) 11720 #else 11721 #define flush_string_content(enc) ((void)(enc)) 11722 #endif 11723 11724 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32]; 11725 /* this can be shared with ripper, since it's independent from struct 11726 * parser_params. */ 11727 #ifndef RIPPER 11728 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) 11729 #define SPECIAL_PUNCT(idx) ( \ 11730 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \ 11731 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \ 11732 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \ 11733 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \ 11734 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \ 11735 BIT('0', idx)) 11736 const unsigned int ruby_global_name_punct_bits[] = { 11737 SPECIAL_PUNCT(0), 11738 SPECIAL_PUNCT(1), 11739 SPECIAL_PUNCT(2), 11740 }; 11741 #undef BIT 11742 #undef SPECIAL_PUNCT 11743 #endif 11744 11745 static inline int 11746 is_global_name_punct(const char c) 11747 { 11748 if (c <= 0x20 || 0x7e < c) return 0; 11749 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1; 11750 } 11751 11752 static int 11753 parser_peek_variable_name(struct parser_params *parser) 11754 { 11755 int c; 11756 const char *p = lex_p; 11757 11758 if (p + 1 >= lex_pend) return 0; 11759 c = *p++; 11760 switch (c) { 11761 case '$': 11762 if ((c = *p) == '-') { 11763 if (++p >= lex_pend) return 0; 11764 c = *p; 11765 } 11766 else if (is_global_name_punct(c) || ISDIGIT(c)) { 11767 return tSTRING_DVAR; 11768 } 11769 break; 11770 case '@': 11771 if ((c = *p) == '@') { 11772 if (++p >= lex_pend) return 0; 11773 c = *p; 11774 } 11775 break; 11776 case '{': 11777 lex_p = p; 11778 command_start = TRUE; 11779 return tSTRING_DBEG; 11780 default: 11781 return 0; 11782 } 11783 if (!ISASCII(c) || c == '_' || ISALPHA(c)) 11784 return tSTRING_DVAR; 11785 return 0; 11786 } 11787 11788 static int 11789 parser_parse_string(struct parser_params *parser, NODE *quote) 11790 { 11791 int func = (int)quote->nd_func; 11792 int term = nd_term(quote); 11793 int paren = nd_paren(quote); 11794 int c, space = 0; 11795 rb_encoding *enc = current_enc; 11796 11797 if (func == -1) return tSTRING_END; 11798 c = nextc(); 11799 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11800 do {c = nextc();} while (ISSPACE(c)); 11801 space = 1; 11802 } 11803 if (c == term && !quote->nd_nest) { 11804 if (func & STR_FUNC_QWORDS) { 11805 quote->nd_func = -1; 11806 return ' '; 11807 } 11808 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 11809 set_yylval_num(regx_options()); 11810 return tREGEXP_END; 11811 } 11812 if (space) { 11813 pushback(c); 11814 return ' '; 11815 } 11816 newtok(); 11817 if ((func & STR_FUNC_EXPAND) && c == '#') { 11818 int t = parser_peek_variable_name(parser); 11819 if (t) return t; 11820 tokadd('#'); 11821 c = nextc(); 11822 } 11823 pushback(c); 11824 if (tokadd_string(func, term, paren, "e->nd_nest, 11825 &enc) == -1) { 11826 ruby_sourceline = nd_line(quote); 11827 if (func & STR_FUNC_REGEXP) { 11828 if (parser->eofp) 11829 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 11830 return tREGEXP_END; 11831 } 11832 else { 11833 if (parser->eofp) 11834 compile_error(PARSER_ARG "unterminated string meets end of file"); 11835 return tSTRING_END; 11836 } 11837 } 11838 11839 tokfix(); 11840 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 11841 flush_string_content(enc); 11842 11843 return tSTRING_CONTENT; 11844 } 11845 11846 static int 11847 parser_heredoc_identifier(struct parser_params *parser) 11848 { 11849 int c = nextc(), term, func = 0; 11850 long len; 11851 11852 if (c == '-') { 11853 c = nextc(); 11854 func = STR_FUNC_INDENT; 11855 } 11856 switch (c) { 11857 case '\'': 11858 func |= str_squote; goto quoted; 11859 case '"': 11860 func |= str_dquote; goto quoted; 11861 case '`': 11862 func |= str_xquote; 11863 quoted: 11864 newtok(); 11865 tokadd(func); 11866 term = c; 11867 while ((c = nextc()) != -1 && c != term) { 11868 if (tokadd_mbchar(c) == -1) return 0; 11869 } 11870 if (c == -1) { 11871 compile_error(PARSER_ARG "unterminated here document identifier"); 11872 return 0; 11873 } 11874 break; 11875 11876 default: 11877 if (!parser_is_identchar()) { 11878 pushback(c); 11879 if (func & STR_FUNC_INDENT) { 11880 pushback('-'); 11881 } 11882 return 0; 11883 } 11884 newtok(); 11885 term = '"'; 11886 tokadd(func |= str_dquote); 11887 do { 11888 if (tokadd_mbchar(c) == -1) return 0; 11889 } while ((c = nextc()) != -1 && parser_is_identchar()); 11890 pushback(c); 11891 break; 11892 } 11893 11894 tokfix(); 11895 #ifdef RIPPER 11896 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 11897 #endif 11898 len = lex_p - lex_pbeg; 11899 lex_goto_eol(parser); 11900 lex_strterm = rb_node_newnode(NODE_HEREDOC, 11901 STR_NEW(tok(), toklen()), /* nd_lit */ 11902 len, /* nd_nth */ 11903 lex_lastline); /* nd_orig */ 11904 nd_set_line(lex_strterm, ruby_sourceline); 11905 ripper_flush(parser); 11906 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 11907 } 11908 11909 static void 11910 parser_heredoc_restore(struct parser_params *parser, NODE *here) 11911 { 11912 VALUE line; 11913 11914 line = here->nd_orig; 11915 lex_lastline = line; 11916 lex_pbeg = RSTRING_PTR(line); 11917 lex_pend = lex_pbeg + RSTRING_LEN(line); 11918 lex_p = lex_pbeg + here->nd_nth; 11919 heredoc_end = ruby_sourceline; 11920 ruby_sourceline = nd_line(here); 11921 dispose_string(here->nd_lit); 11922 rb_gc_force_recycle((VALUE)here); 11923 ripper_flush(parser); 11924 } 11925 11926 static int 11927 parser_whole_match_p(struct parser_params *parser, 11928 const char *eos, long len, int indent) 11929 { 11930 const char *p = lex_pbeg; 11931 long n; 11932 11933 if (indent) { 11934 while (*p && ISSPACE(*p)) p++; 11935 } 11936 n = lex_pend - (p + len); 11937 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 11938 return strncmp(eos, p, len) == 0; 11939 } 11940 11941 #ifdef RIPPER 11942 static void 11943 ripper_dispatch_heredoc_end(struct parser_params *parser) 11944 { 11945 if (!NIL_P(parser->delayed)) 11946 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11947 lex_goto_eol(parser); 11948 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 11949 } 11950 11951 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 11952 #else 11953 #define dispatch_heredoc_end() ((void)0) 11954 #endif 11955 11956 static int 11957 parser_here_document(struct parser_params *parser, NODE *here) 11958 { 11959 int c, func, indent = 0; 11960 const char *eos, *p, *pend; 11961 long len; 11962 VALUE str = 0; 11963 rb_encoding *enc = current_enc; 11964 11965 eos = RSTRING_PTR(here->nd_lit); 11966 len = RSTRING_LEN(here->nd_lit) - 1; 11967 indent = (func = *eos++) & STR_FUNC_INDENT; 11968 11969 if ((c = nextc()) == -1) { 11970 error: 11971 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 11972 #ifdef RIPPER 11973 if (NIL_P(parser->delayed)) { 11974 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 11975 } 11976 else { 11977 if (str || 11978 ((len = lex_p - parser->tokp) > 0 && 11979 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 11980 rb_str_append(parser->delayed, str); 11981 } 11982 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11983 } 11984 lex_goto_eol(parser); 11985 #endif 11986 restore: 11987 heredoc_restore(lex_strterm); 11988 lex_strterm = 0; 11989 return 0; 11990 } 11991 if (was_bol() && whole_match_p(eos, len, indent)) { 11992 dispatch_heredoc_end(); 11993 heredoc_restore(lex_strterm); 11994 return tSTRING_END; 11995 } 11996 11997 if (!(func & STR_FUNC_EXPAND)) { 11998 do { 11999 p = RSTRING_PTR(lex_lastline); 12000 pend = lex_pend; 12001 if (pend > p) { 12002 switch (pend[-1]) { 12003 case '\n': 12004 if (--pend == p || pend[-1] != '\r') { 12005 pend++; 12006 break; 12007 } 12008 case '\r': 12009 --pend; 12010 } 12011 } 12012 if (str) 12013 rb_str_cat(str, p, pend - p); 12014 else 12015 str = STR_NEW(p, pend - p); 12016 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 12017 lex_goto_eol(parser); 12018 if (nextc() == -1) { 12019 if (str) dispose_string(str); 12020 goto error; 12021 } 12022 } while (!whole_match_p(eos, len, indent)); 12023 } 12024 else { 12025 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 12026 newtok(); 12027 if (c == '#') { 12028 int t = parser_peek_variable_name(parser); 12029 if (t) return t; 12030 tokadd('#'); 12031 c = nextc(); 12032 } 12033 do { 12034 pushback(c); 12035 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 12036 if (parser->eofp) goto error; 12037 goto restore; 12038 } 12039 if (c != '\n') { 12040 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12041 flush_string_content(enc); 12042 return tSTRING_CONTENT; 12043 } 12044 tokadd(nextc()); 12045 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 12046 if ((c = nextc()) == -1) goto error; 12047 } while (!whole_match_p(eos, len, indent)); 12048 str = STR_NEW3(tok(), toklen(), enc, func); 12049 } 12050 dispatch_heredoc_end(); 12051 heredoc_restore(lex_strterm); 12052 lex_strterm = NEW_STRTERM(-1, 0, 0); 12053 set_yylval_str(str); 12054 return tSTRING_CONTENT; 12055 } 12056 12057 #include "lex.c" 12058 12059 static void 12060 arg_ambiguous_gen(struct parser_params *parser) 12061 { 12062 #ifndef RIPPER 12063 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 12064 #else 12065 dispatch0(arg_ambiguous); 12066 #endif 12067 } 12068 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 12069 12070 static ID 12071 formal_argument_gen(struct parser_params *parser, ID lhs) 12072 { 12073 #ifndef RIPPER 12074 if (!is_local_id(lhs)) 12075 yyerror("formal argument must be local variable"); 12076 #endif 12077 shadowing_lvar(lhs); 12078 return lhs; 12079 } 12080 12081 static int 12082 lvar_defined_gen(struct parser_params *parser, ID id) 12083 { 12084 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 12085 } 12086 12087 /* emacsen -*- hack */ 12088 static long 12089 parser_encode_length(struct parser_params *parser, const char *name, long len) 12090 { 12091 long nlen; 12092 12093 if (len > 5 && name[nlen = len - 5] == '-') { 12094 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 12095 return nlen; 12096 } 12097 if (len > 4 && name[nlen = len - 4] == '-') { 12098 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 12099 return nlen; 12100 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 12101 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 12102 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 12103 return nlen; 12104 } 12105 return len; 12106 } 12107 12108 static void 12109 parser_set_encode(struct parser_params *parser, const char *name) 12110 { 12111 int idx = rb_enc_find_index(name); 12112 rb_encoding *enc; 12113 VALUE excargs[3]; 12114 12115 if (idx < 0) { 12116 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 12117 error: 12118 excargs[0] = rb_eArgError; 12119 excargs[2] = rb_make_backtrace(); 12120 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 12121 rb_exc_raise(rb_make_exception(3, excargs)); 12122 } 12123 enc = rb_enc_from_index(idx); 12124 if (!rb_enc_asciicompat(enc)) { 12125 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 12126 goto error; 12127 } 12128 parser->enc = enc; 12129 #ifndef RIPPER 12130 if (ruby_debug_lines) { 12131 long i, n = RARRAY_LEN(ruby_debug_lines); 12132 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 12133 for (i = 0; i < n; ++i) { 12134 rb_enc_associate_index(*p, idx); 12135 } 12136 } 12137 #endif 12138 } 12139 12140 static int 12141 comment_at_top(struct parser_params *parser) 12142 { 12143 const char *p = lex_pbeg, *pend = lex_p - 1; 12144 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 12145 while (p < pend) { 12146 if (!ISSPACE(*p)) return 0; 12147 p++; 12148 } 12149 return 1; 12150 } 12151 12152 #ifndef RIPPER 12153 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 12154 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 12155 12156 static void 12157 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 12158 { 12159 if (!comment_at_top(parser)) { 12160 return; 12161 } 12162 parser_set_encode(parser, val); 12163 } 12164 12165 static void 12166 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 12167 { 12168 int *p = &parser->parser_token_info_enabled; 12169 12170 switch (*val) { 12171 case 't': case 'T': 12172 if (strcasecmp(val, "true") == 0) { 12173 *p = TRUE; 12174 return; 12175 } 12176 break; 12177 case 'f': case 'F': 12178 if (strcasecmp(val, "false") == 0) { 12179 *p = FALSE; 12180 return; 12181 } 12182 break; 12183 } 12184 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 12185 } 12186 12187 struct magic_comment { 12188 const char *name; 12189 rb_magic_comment_setter_t func; 12190 rb_magic_comment_length_t length; 12191 }; 12192 12193 static const struct magic_comment magic_comments[] = { 12194 {"coding", magic_comment_encoding, parser_encode_length}, 12195 {"encoding", magic_comment_encoding, parser_encode_length}, 12196 {"warn_indent", parser_set_token_info}, 12197 }; 12198 #endif 12199 12200 static const char * 12201 magic_comment_marker(const char *str, long len) 12202 { 12203 long i = 2; 12204 12205 while (i < len) { 12206 switch (str[i]) { 12207 case '-': 12208 if (str[i-1] == '*' && str[i-2] == '-') { 12209 return str + i + 1; 12210 } 12211 i += 2; 12212 break; 12213 case '*': 12214 if (i + 1 >= len) return 0; 12215 if (str[i+1] != '-') { 12216 i += 4; 12217 } 12218 else if (str[i-1] != '-') { 12219 i += 2; 12220 } 12221 else { 12222 return str + i + 2; 12223 } 12224 break; 12225 default: 12226 i += 3; 12227 break; 12228 } 12229 } 12230 return 0; 12231 } 12232 12233 static int 12234 parser_magic_comment(struct parser_params *parser, const char *str, long len) 12235 { 12236 VALUE name = 0, val = 0; 12237 const char *beg, *end, *vbeg, *vend; 12238 #define str_copy(_s, _p, _n) ((_s) \ 12239 ? (void)(rb_str_resize((_s), (_n)), \ 12240 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 12241 : (void)((_s) = STR_NEW((_p), (_n)))) 12242 12243 if (len <= 7) return FALSE; 12244 if (!(beg = magic_comment_marker(str, len))) return FALSE; 12245 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 12246 str = beg; 12247 len = end - beg - 3; 12248 12249 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 12250 while (len > 0) { 12251 #ifndef RIPPER 12252 const struct magic_comment *p = magic_comments; 12253 #endif 12254 char *s; 12255 int i; 12256 long n = 0; 12257 12258 for (; len > 0 && *str; str++, --len) { 12259 switch (*str) { 12260 case '\'': case '"': case ':': case ';': 12261 continue; 12262 } 12263 if (!ISSPACE(*str)) break; 12264 } 12265 for (beg = str; len > 0; str++, --len) { 12266 switch (*str) { 12267 case '\'': case '"': case ':': case ';': 12268 break; 12269 default: 12270 if (ISSPACE(*str)) break; 12271 continue; 12272 } 12273 break; 12274 } 12275 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 12276 if (!len) break; 12277 if (*str != ':') continue; 12278 12279 do str++; while (--len > 0 && ISSPACE(*str)); 12280 if (!len) break; 12281 if (*str == '"') { 12282 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 12283 if (*str == '\\') { 12284 --len; 12285 ++str; 12286 } 12287 } 12288 vend = str; 12289 if (len) { 12290 --len; 12291 ++str; 12292 } 12293 } 12294 else { 12295 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 12296 vend = str; 12297 } 12298 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 12299 12300 n = end - beg; 12301 str_copy(name, beg, n); 12302 s = RSTRING_PTR(name); 12303 for (i = 0; i < n; ++i) { 12304 if (s[i] == '-') s[i] = '_'; 12305 } 12306 #ifndef RIPPER 12307 do { 12308 if (STRNCASECMP(p->name, s, n) == 0) { 12309 n = vend - vbeg; 12310 if (p->length) { 12311 n = (*p->length)(parser, vbeg, n); 12312 } 12313 str_copy(val, vbeg, n); 12314 (*p->func)(parser, s, RSTRING_PTR(val)); 12315 break; 12316 } 12317 } while (++p < magic_comments + numberof(magic_comments)); 12318 #else 12319 str_copy(val, vbeg, vend - vbeg); 12320 dispatch2(magic_comment, name, val); 12321 #endif 12322 } 12323 12324 return TRUE; 12325 } 12326 12327 static void 12328 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 12329 { 12330 int sep = 0; 12331 const char *beg = str; 12332 VALUE s; 12333 12334 for (;;) { 12335 if (send - str <= 6) return; 12336 switch (str[6]) { 12337 case 'C': case 'c': str += 6; continue; 12338 case 'O': case 'o': str += 5; continue; 12339 case 'D': case 'd': str += 4; continue; 12340 case 'I': case 'i': str += 3; continue; 12341 case 'N': case 'n': str += 2; continue; 12342 case 'G': case 'g': str += 1; continue; 12343 case '=': case ':': 12344 sep = 1; 12345 str += 6; 12346 break; 12347 default: 12348 str += 6; 12349 if (ISSPACE(*str)) break; 12350 continue; 12351 } 12352 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 12353 } 12354 for (;;) { 12355 do { 12356 if (++str >= send) return; 12357 } while (ISSPACE(*str)); 12358 if (sep) break; 12359 if (*str != '=' && *str != ':') return; 12360 sep = 1; 12361 str++; 12362 } 12363 beg = str; 12364 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 12365 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 12366 parser_set_encode(parser, RSTRING_PTR(s)); 12367 rb_str_resize(s, 0); 12368 } 12369 12370 static void 12371 parser_prepare(struct parser_params *parser) 12372 { 12373 int c = nextc(); 12374 switch (c) { 12375 case '#': 12376 if (peek('!')) parser->has_shebang = 1; 12377 break; 12378 case 0xef: /* UTF-8 BOM marker */ 12379 if (lex_pend - lex_p >= 2 && 12380 (unsigned char)lex_p[0] == 0xbb && 12381 (unsigned char)lex_p[1] == 0xbf) { 12382 parser->enc = rb_utf8_encoding(); 12383 lex_p += 2; 12384 lex_pbeg = lex_p; 12385 return; 12386 } 12387 break; 12388 case EOF: 12389 return; 12390 } 12391 pushback(c); 12392 parser->enc = rb_enc_get(lex_lastline); 12393 } 12394 12395 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY) 12396 #define IS_END() IS_lex_state(EXPR_END_ANY) 12397 #define IS_BEG() IS_lex_state(EXPR_BEG_ANY) 12398 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 12399 #define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) 12400 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 12401 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) 12402 12403 #ifndef RIPPER 12404 #define ambiguous_operator(op, syn) ( \ 12405 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 12406 rb_warning0("even though it seems like "syn"")) 12407 #else 12408 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 12409 #endif 12410 #define warn_balanced(op, syn) ((void) \ 12411 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \ 12412 space_seen && !ISSPACE(c) && \ 12413 (ambiguous_operator(op, syn), 0))) 12414 12415 static int 12416 parser_yylex(struct parser_params *parser) 12417 { 12418 register int c; 12419 int space_seen = 0; 12420 int cmd_state; 12421 enum lex_state_e last_state; 12422 rb_encoding *enc; 12423 int mb; 12424 #ifdef RIPPER 12425 int fallthru = FALSE; 12426 #endif 12427 12428 if (lex_strterm) { 12429 int token; 12430 if (nd_type(lex_strterm) == NODE_HEREDOC) { 12431 token = here_document(lex_strterm); 12432 if (token == tSTRING_END) { 12433 lex_strterm = 0; 12434 lex_state = EXPR_END; 12435 } 12436 } 12437 else { 12438 token = parse_string(lex_strterm); 12439 if (token == tSTRING_END || token == tREGEXP_END) { 12440 rb_gc_force_recycle((VALUE)lex_strterm); 12441 lex_strterm = 0; 12442 lex_state = EXPR_END; 12443 } 12444 } 12445 return token; 12446 } 12447 cmd_state = command_start; 12448 command_start = FALSE; 12449 retry: 12450 last_state = lex_state; 12451 switch (c = nextc()) { 12452 case '\0': /* NUL */ 12453 case '\004': /* ^D */ 12454 case '\032': /* ^Z */ 12455 case -1: /* end of script. */ 12456 return 0; 12457 12458 /* white spaces */ 12459 case ' ': case '\t': case '\f': case '\r': 12460 case '\13': /* '\v' */ 12461 space_seen = 1; 12462 #ifdef RIPPER 12463 while ((c = nextc())) { 12464 switch (c) { 12465 case ' ': case '\t': case '\f': case '\r': 12466 case '\13': /* '\v' */ 12467 break; 12468 default: 12469 goto outofloop; 12470 } 12471 } 12472 outofloop: 12473 pushback(c); 12474 ripper_dispatch_scan_event(parser, tSP); 12475 #endif 12476 goto retry; 12477 12478 case '#': /* it's a comment */ 12479 /* no magic_comment in shebang line */ 12480 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 12481 if (comment_at_top(parser)) { 12482 set_file_encoding(parser, lex_p, lex_pend); 12483 } 12484 } 12485 lex_p = lex_pend; 12486 #ifdef RIPPER 12487 ripper_dispatch_scan_event(parser, tCOMMENT); 12488 fallthru = TRUE; 12489 #endif 12490 /* fall through */ 12491 case '\n': 12492 if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT)) { 12493 #ifdef RIPPER 12494 if (!fallthru) { 12495 ripper_dispatch_scan_event(parser, tIGNORED_NL); 12496 } 12497 fallthru = FALSE; 12498 #endif 12499 goto retry; 12500 } 12501 while ((c = nextc())) { 12502 switch (c) { 12503 case ' ': case '\t': case '\f': case '\r': 12504 case '\13': /* '\v' */ 12505 space_seen = 1; 12506 break; 12507 case '.': { 12508 if ((c = nextc()) != '.') { 12509 pushback(c); 12510 pushback('.'); 12511 goto retry; 12512 } 12513 } 12514 default: 12515 --ruby_sourceline; 12516 lex_nextline = lex_lastline; 12517 case -1: /* EOF no decrement*/ 12518 lex_goto_eol(parser); 12519 #ifdef RIPPER 12520 if (c != -1) { 12521 parser->tokp = lex_p; 12522 } 12523 #endif 12524 goto normal_newline; 12525 } 12526 } 12527 normal_newline: 12528 command_start = TRUE; 12529 lex_state = EXPR_BEG; 12530 return '\n'; 12531 12532 case '*': 12533 if ((c = nextc()) == '*') { 12534 if ((c = nextc()) == '=') { 12535 set_yylval_id(tPOW); 12536 lex_state = EXPR_BEG; 12537 return tOP_ASGN; 12538 } 12539 pushback(c); 12540 if (IS_SPCARG(c)) { 12541 rb_warning0("`**' interpreted as argument prefix"); 12542 c = tDSTAR; 12543 } 12544 else if (IS_BEG()) { 12545 c = tDSTAR; 12546 } 12547 else { 12548 warn_balanced("**", "argument prefix"); 12549 c = tPOW; 12550 } 12551 } 12552 else { 12553 if (c == '=') { 12554 set_yylval_id('*'); 12555 lex_state = EXPR_BEG; 12556 return tOP_ASGN; 12557 } 12558 pushback(c); 12559 if (IS_SPCARG(c)) { 12560 rb_warning0("`*' interpreted as argument prefix"); 12561 c = tSTAR; 12562 } 12563 else if (IS_BEG()) { 12564 c = tSTAR; 12565 } 12566 else { 12567 warn_balanced("*", "argument prefix"); 12568 c = '*'; 12569 } 12570 } 12571 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 12572 return c; 12573 12574 case '!': 12575 c = nextc(); 12576 if (IS_AFTER_OPERATOR()) { 12577 lex_state = EXPR_ARG; 12578 if (c == '@') { 12579 return '!'; 12580 } 12581 } 12582 else { 12583 lex_state = EXPR_BEG; 12584 } 12585 if (c == '=') { 12586 return tNEQ; 12587 } 12588 if (c == '~') { 12589 return tNMATCH; 12590 } 12591 pushback(c); 12592 return '!'; 12593 12594 case '=': 12595 if (was_bol()) { 12596 /* skip embedded rd document */ 12597 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 12598 #ifdef RIPPER 12599 int first_p = TRUE; 12600 12601 lex_goto_eol(parser); 12602 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 12603 #endif 12604 for (;;) { 12605 lex_goto_eol(parser); 12606 #ifdef RIPPER 12607 if (!first_p) { 12608 ripper_dispatch_scan_event(parser, tEMBDOC); 12609 } 12610 first_p = FALSE; 12611 #endif 12612 c = nextc(); 12613 if (c == -1) { 12614 compile_error(PARSER_ARG "embedded document meets end of file"); 12615 return 0; 12616 } 12617 if (c != '=') continue; 12618 if (strncmp(lex_p, "end", 3) == 0 && 12619 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 12620 break; 12621 } 12622 } 12623 lex_goto_eol(parser); 12624 #ifdef RIPPER 12625 ripper_dispatch_scan_event(parser, tEMBDOC_END); 12626 #endif 12627 goto retry; 12628 } 12629 } 12630 12631 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 12632 if ((c = nextc()) == '=') { 12633 if ((c = nextc()) == '=') { 12634 return tEQQ; 12635 } 12636 pushback(c); 12637 return tEQ; 12638 } 12639 if (c == '~') { 12640 return tMATCH; 12641 } 12642 else if (c == '>') { 12643 return tASSOC; 12644 } 12645 pushback(c); 12646 return '='; 12647 12648 case '<': 12649 last_state = lex_state; 12650 c = nextc(); 12651 if (c == '<' && 12652 !IS_lex_state(EXPR_DOT | EXPR_CLASS) && 12653 !IS_END() && 12654 (!IS_ARG() || space_seen)) { 12655 int token = heredoc_identifier(); 12656 if (token) return token; 12657 } 12658 if (IS_AFTER_OPERATOR()) { 12659 lex_state = EXPR_ARG; 12660 } 12661 else { 12662 if (IS_lex_state(EXPR_CLASS)) 12663 command_start = TRUE; 12664 lex_state = EXPR_BEG; 12665 } 12666 if (c == '=') { 12667 if ((c = nextc()) == '>') { 12668 return tCMP; 12669 } 12670 pushback(c); 12671 return tLEQ; 12672 } 12673 if (c == '<') { 12674 if ((c = nextc()) == '=') { 12675 set_yylval_id(tLSHFT); 12676 lex_state = EXPR_BEG; 12677 return tOP_ASGN; 12678 } 12679 pushback(c); 12680 warn_balanced("<<", "here document"); 12681 return tLSHFT; 12682 } 12683 pushback(c); 12684 return '<'; 12685 12686 case '>': 12687 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 12688 if ((c = nextc()) == '=') { 12689 return tGEQ; 12690 } 12691 if (c == '>') { 12692 if ((c = nextc()) == '=') { 12693 set_yylval_id(tRSHFT); 12694 lex_state = EXPR_BEG; 12695 return tOP_ASGN; 12696 } 12697 pushback(c); 12698 return tRSHFT; 12699 } 12700 pushback(c); 12701 return '>'; 12702 12703 case '"': 12704 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 12705 return tSTRING_BEG; 12706 12707 case '`': 12708 if (IS_lex_state(EXPR_FNAME)) { 12709 lex_state = EXPR_ENDFN; 12710 return c; 12711 } 12712 if (IS_lex_state(EXPR_DOT)) { 12713 if (cmd_state) 12714 lex_state = EXPR_CMDARG; 12715 else 12716 lex_state = EXPR_ARG; 12717 return c; 12718 } 12719 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 12720 return tXSTRING_BEG; 12721 12722 case '\'': 12723 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 12724 return tSTRING_BEG; 12725 12726 case '?': 12727 if (IS_END()) { 12728 lex_state = EXPR_VALUE; 12729 return '?'; 12730 } 12731 c = nextc(); 12732 if (c == -1) { 12733 compile_error(PARSER_ARG "incomplete character syntax"); 12734 return 0; 12735 } 12736 if (rb_enc_isspace(c, current_enc)) { 12737 if (!IS_ARG()) { 12738 int c2 = 0; 12739 switch (c) { 12740 case ' ': 12741 c2 = 's'; 12742 break; 12743 case '\n': 12744 c2 = 'n'; 12745 break; 12746 case '\t': 12747 c2 = 't'; 12748 break; 12749 case '\v': 12750 c2 = 'v'; 12751 break; 12752 case '\r': 12753 c2 = 'r'; 12754 break; 12755 case '\f': 12756 c2 = 'f'; 12757 break; 12758 } 12759 if (c2) { 12760 rb_warnI("invalid character syntax; use ?\\%c", c2); 12761 } 12762 } 12763 ternary: 12764 pushback(c); 12765 lex_state = EXPR_VALUE; 12766 return '?'; 12767 } 12768 newtok(); 12769 enc = current_enc; 12770 if (!parser_isascii()) { 12771 if (tokadd_mbchar(c) == -1) return 0; 12772 } 12773 else if ((rb_enc_isalnum(c, current_enc) || c == '_') && 12774 lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { 12775 goto ternary; 12776 } 12777 else if (c == '\\') { 12778 if (peek('u')) { 12779 nextc(); 12780 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 12781 if (0x80 <= c) { 12782 tokaddmbc(c, enc); 12783 } 12784 else { 12785 tokadd(c); 12786 } 12787 } 12788 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 12789 nextc(); 12790 if (tokadd_mbchar(c) == -1) return 0; 12791 } 12792 else { 12793 c = read_escape(0, &enc); 12794 tokadd(c); 12795 } 12796 } 12797 else { 12798 tokadd(c); 12799 } 12800 tokfix(); 12801 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 12802 lex_state = EXPR_END; 12803 return tCHAR; 12804 12805 case '&': 12806 if ((c = nextc()) == '&') { 12807 lex_state = EXPR_BEG; 12808 if ((c = nextc()) == '=') { 12809 set_yylval_id(tANDOP); 12810 lex_state = EXPR_BEG; 12811 return tOP_ASGN; 12812 } 12813 pushback(c); 12814 return tANDOP; 12815 } 12816 else if (c == '=') { 12817 set_yylval_id('&'); 12818 lex_state = EXPR_BEG; 12819 return tOP_ASGN; 12820 } 12821 pushback(c); 12822 if (IS_SPCARG(c)) { 12823 rb_warning0("`&' interpreted as argument prefix"); 12824 c = tAMPER; 12825 } 12826 else if (IS_BEG()) { 12827 c = tAMPER; 12828 } 12829 else { 12830 warn_balanced("&", "argument prefix"); 12831 c = '&'; 12832 } 12833 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 12834 return c; 12835 12836 case '|': 12837 if ((c = nextc()) == '|') { 12838 lex_state = EXPR_BEG; 12839 if ((c = nextc()) == '=') { 12840 set_yylval_id(tOROP); 12841 lex_state = EXPR_BEG; 12842 return tOP_ASGN; 12843 } 12844 pushback(c); 12845 return tOROP; 12846 } 12847 if (c == '=') { 12848 set_yylval_id('|'); 12849 lex_state = EXPR_BEG; 12850 return tOP_ASGN; 12851 } 12852 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 12853 pushback(c); 12854 return '|'; 12855 12856 case '+': 12857 c = nextc(); 12858 if (IS_AFTER_OPERATOR()) { 12859 lex_state = EXPR_ARG; 12860 if (c == '@') { 12861 return tUPLUS; 12862 } 12863 pushback(c); 12864 return '+'; 12865 } 12866 if (c == '=') { 12867 set_yylval_id('+'); 12868 lex_state = EXPR_BEG; 12869 return tOP_ASGN; 12870 } 12871 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12872 lex_state = EXPR_BEG; 12873 pushback(c); 12874 if (c != -1 && ISDIGIT(c)) { 12875 c = '+'; 12876 goto start_num; 12877 } 12878 return tUPLUS; 12879 } 12880 lex_state = EXPR_BEG; 12881 pushback(c); 12882 warn_balanced("+", "unary operator"); 12883 return '+'; 12884 12885 case '-': 12886 c = nextc(); 12887 if (IS_AFTER_OPERATOR()) { 12888 lex_state = EXPR_ARG; 12889 if (c == '@') { 12890 return tUMINUS; 12891 } 12892 pushback(c); 12893 return '-'; 12894 } 12895 if (c == '=') { 12896 set_yylval_id('-'); 12897 lex_state = EXPR_BEG; 12898 return tOP_ASGN; 12899 } 12900 if (c == '>') { 12901 lex_state = EXPR_ENDFN; 12902 return tLAMBDA; 12903 } 12904 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12905 lex_state = EXPR_BEG; 12906 pushback(c); 12907 if (c != -1 && ISDIGIT(c)) { 12908 return tUMINUS_NUM; 12909 } 12910 return tUMINUS; 12911 } 12912 lex_state = EXPR_BEG; 12913 pushback(c); 12914 warn_balanced("-", "unary operator"); 12915 return '-'; 12916 12917 case '.': 12918 lex_state = EXPR_BEG; 12919 if ((c = nextc()) == '.') { 12920 if ((c = nextc()) == '.') { 12921 return tDOT3; 12922 } 12923 pushback(c); 12924 return tDOT2; 12925 } 12926 pushback(c); 12927 if (c != -1 && ISDIGIT(c)) { 12928 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 12929 } 12930 lex_state = EXPR_DOT; 12931 return '.'; 12932 12933 start_num: 12934 case '0': case '1': case '2': case '3': case '4': 12935 case '5': case '6': case '7': case '8': case '9': 12936 { 12937 int is_float, seen_point, seen_e, nondigit; 12938 12939 is_float = seen_point = seen_e = nondigit = 0; 12940 lex_state = EXPR_END; 12941 newtok(); 12942 if (c == '-' || c == '+') { 12943 tokadd(c); 12944 c = nextc(); 12945 } 12946 if (c == '0') { 12947 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 12948 int start = toklen(); 12949 c = nextc(); 12950 if (c == 'x' || c == 'X') { 12951 /* hexadecimal */ 12952 c = nextc(); 12953 if (c != -1 && ISXDIGIT(c)) { 12954 do { 12955 if (c == '_') { 12956 if (nondigit) break; 12957 nondigit = c; 12958 continue; 12959 } 12960 if (!ISXDIGIT(c)) break; 12961 nondigit = 0; 12962 tokadd(c); 12963 } while ((c = nextc()) != -1); 12964 } 12965 pushback(c); 12966 tokfix(); 12967 if (toklen() == start) { 12968 no_digits(); 12969 } 12970 else if (nondigit) goto trailing_uc; 12971 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 12972 return tINTEGER; 12973 } 12974 if (c == 'b' || c == 'B') { 12975 /* binary */ 12976 c = nextc(); 12977 if (c == '0' || c == '1') { 12978 do { 12979 if (c == '_') { 12980 if (nondigit) break; 12981 nondigit = c; 12982 continue; 12983 } 12984 if (c != '0' && c != '1') break; 12985 nondigit = 0; 12986 tokadd(c); 12987 } while ((c = nextc()) != -1); 12988 } 12989 pushback(c); 12990 tokfix(); 12991 if (toklen() == start) { 12992 no_digits(); 12993 } 12994 else if (nondigit) goto trailing_uc; 12995 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 12996 return tINTEGER; 12997 } 12998 if (c == 'd' || c == 'D') { 12999 /* decimal */ 13000 c = nextc(); 13001 if (c != -1 && ISDIGIT(c)) { 13002 do { 13003 if (c == '_') { 13004 if (nondigit) break; 13005 nondigit = c; 13006 continue; 13007 } 13008 if (!ISDIGIT(c)) break; 13009 nondigit = 0; 13010 tokadd(c); 13011 } while ((c = nextc()) != -1); 13012 } 13013 pushback(c); 13014 tokfix(); 13015 if (toklen() == start) { 13016 no_digits(); 13017 } 13018 else if (nondigit) goto trailing_uc; 13019 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13020 return tINTEGER; 13021 } 13022 if (c == '_') { 13023 /* 0_0 */ 13024 goto octal_number; 13025 } 13026 if (c == 'o' || c == 'O') { 13027 /* prefixed octal */ 13028 c = nextc(); 13029 if (c == -1 || c == '_' || !ISDIGIT(c)) { 13030 no_digits(); 13031 } 13032 } 13033 if (c >= '0' && c <= '7') { 13034 /* octal */ 13035 octal_number: 13036 do { 13037 if (c == '_') { 13038 if (nondigit) break; 13039 nondigit = c; 13040 continue; 13041 } 13042 if (c < '0' || c > '9') break; 13043 if (c > '7') goto invalid_octal; 13044 nondigit = 0; 13045 tokadd(c); 13046 } while ((c = nextc()) != -1); 13047 if (toklen() > start) { 13048 pushback(c); 13049 tokfix(); 13050 if (nondigit) goto trailing_uc; 13051 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 13052 return tINTEGER; 13053 } 13054 if (nondigit) { 13055 pushback(c); 13056 goto trailing_uc; 13057 } 13058 } 13059 if (c > '7' && c <= '9') { 13060 invalid_octal: 13061 yyerror("Invalid octal digit"); 13062 } 13063 else if (c == '.' || c == 'e' || c == 'E') { 13064 tokadd('0'); 13065 } 13066 else { 13067 pushback(c); 13068 set_yylval_literal(INT2FIX(0)); 13069 return tINTEGER; 13070 } 13071 } 13072 13073 for (;;) { 13074 switch (c) { 13075 case '0': case '1': case '2': case '3': case '4': 13076 case '5': case '6': case '7': case '8': case '9': 13077 nondigit = 0; 13078 tokadd(c); 13079 break; 13080 13081 case '.': 13082 if (nondigit) goto trailing_uc; 13083 if (seen_point || seen_e) { 13084 goto decode_num; 13085 } 13086 else { 13087 int c0 = nextc(); 13088 if (c0 == -1 || !ISDIGIT(c0)) { 13089 pushback(c0); 13090 goto decode_num; 13091 } 13092 c = c0; 13093 } 13094 tokadd('.'); 13095 tokadd(c); 13096 is_float++; 13097 seen_point++; 13098 nondigit = 0; 13099 break; 13100 13101 case 'e': 13102 case 'E': 13103 if (nondigit) { 13104 pushback(c); 13105 c = nondigit; 13106 goto decode_num; 13107 } 13108 if (seen_e) { 13109 goto decode_num; 13110 } 13111 tokadd(c); 13112 seen_e++; 13113 is_float++; 13114 nondigit = c; 13115 c = nextc(); 13116 if (c != '-' && c != '+') continue; 13117 tokadd(c); 13118 nondigit = c; 13119 break; 13120 13121 case '_': /* `_' in number just ignored */ 13122 if (nondigit) goto decode_num; 13123 nondigit = c; 13124 break; 13125 13126 default: 13127 goto decode_num; 13128 } 13129 c = nextc(); 13130 } 13131 13132 decode_num: 13133 pushback(c); 13134 if (nondigit) { 13135 char tmp[30]; 13136 trailing_uc: 13137 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 13138 yyerror(tmp); 13139 } 13140 tokfix(); 13141 if (is_float) { 13142 double d = strtod(tok(), 0); 13143 if (errno == ERANGE) { 13144 rb_warningS("Float %s out of range", tok()); 13145 errno = 0; 13146 } 13147 set_yylval_literal(DBL2NUM(d)); 13148 return tFLOAT; 13149 } 13150 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13151 return tINTEGER; 13152 } 13153 13154 case ')': 13155 case ']': 13156 paren_nest--; 13157 case '}': 13158 COND_LEXPOP(); 13159 CMDARG_LEXPOP(); 13160 if (c == ')') 13161 lex_state = EXPR_ENDFN; 13162 else 13163 lex_state = EXPR_ENDARG; 13164 if (c == '}') { 13165 if (!brace_nest--) c = tSTRING_DEND; 13166 } 13167 return c; 13168 13169 case ':': 13170 c = nextc(); 13171 if (c == ':') { 13172 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) { 13173 lex_state = EXPR_BEG; 13174 return tCOLON3; 13175 } 13176 lex_state = EXPR_DOT; 13177 return tCOLON2; 13178 } 13179 if (IS_END() || ISSPACE(c)) { 13180 pushback(c); 13181 warn_balanced(":", "symbol literal"); 13182 lex_state = EXPR_BEG; 13183 return ':'; 13184 } 13185 switch (c) { 13186 case '\'': 13187 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 13188 break; 13189 case '"': 13190 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 13191 break; 13192 default: 13193 pushback(c); 13194 break; 13195 } 13196 lex_state = EXPR_FNAME; 13197 return tSYMBEG; 13198 13199 case '/': 13200 if (IS_lex_state(EXPR_BEG_ANY)) { 13201 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13202 return tREGEXP_BEG; 13203 } 13204 if ((c = nextc()) == '=') { 13205 set_yylval_id('/'); 13206 lex_state = EXPR_BEG; 13207 return tOP_ASGN; 13208 } 13209 pushback(c); 13210 if (IS_SPCARG(c)) { 13211 (void)arg_ambiguous(); 13212 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13213 return tREGEXP_BEG; 13214 } 13215 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13216 warn_balanced("/", "regexp literal"); 13217 return '/'; 13218 13219 case '^': 13220 if ((c = nextc()) == '=') { 13221 set_yylval_id('^'); 13222 lex_state = EXPR_BEG; 13223 return tOP_ASGN; 13224 } 13225 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13226 pushback(c); 13227 return '^'; 13228 13229 case ';': 13230 lex_state = EXPR_BEG; 13231 command_start = TRUE; 13232 return ';'; 13233 13234 case ',': 13235 lex_state = EXPR_BEG; 13236 return ','; 13237 13238 case '~': 13239 if (IS_AFTER_OPERATOR()) { 13240 if ((c = nextc()) != '@') { 13241 pushback(c); 13242 } 13243 lex_state = EXPR_ARG; 13244 } 13245 else { 13246 lex_state = EXPR_BEG; 13247 } 13248 return '~'; 13249 13250 case '(': 13251 if (IS_BEG()) { 13252 c = tLPAREN; 13253 } 13254 else if (IS_SPCARG(-1)) { 13255 c = tLPAREN_ARG; 13256 } 13257 paren_nest++; 13258 COND_PUSH(0); 13259 CMDARG_PUSH(0); 13260 lex_state = EXPR_BEG; 13261 return c; 13262 13263 case '[': 13264 paren_nest++; 13265 if (IS_AFTER_OPERATOR()) { 13266 lex_state = EXPR_ARG; 13267 if ((c = nextc()) == ']') { 13268 if ((c = nextc()) == '=') { 13269 return tASET; 13270 } 13271 pushback(c); 13272 return tAREF; 13273 } 13274 pushback(c); 13275 return '['; 13276 } 13277 else if (IS_BEG()) { 13278 c = tLBRACK; 13279 } 13280 else if (IS_ARG() && space_seen) { 13281 c = tLBRACK; 13282 } 13283 lex_state = EXPR_BEG; 13284 COND_PUSH(0); 13285 CMDARG_PUSH(0); 13286 return c; 13287 13288 case '{': 13289 ++brace_nest; 13290 if (lpar_beg && lpar_beg == paren_nest) { 13291 lex_state = EXPR_BEG; 13292 lpar_beg = 0; 13293 --paren_nest; 13294 COND_PUSH(0); 13295 CMDARG_PUSH(0); 13296 return tLAMBEG; 13297 } 13298 if (IS_ARG() || IS_lex_state(EXPR_END | EXPR_ENDFN)) 13299 c = '{'; /* block (primary) */ 13300 else if (IS_lex_state(EXPR_ENDARG)) 13301 c = tLBRACE_ARG; /* block (expr) */ 13302 else 13303 c = tLBRACE; /* hash */ 13304 COND_PUSH(0); 13305 CMDARG_PUSH(0); 13306 lex_state = EXPR_BEG; 13307 if (c != tLBRACE) command_start = TRUE; 13308 return c; 13309 13310 case '\\': 13311 c = nextc(); 13312 if (c == '\n') { 13313 space_seen = 1; 13314 #ifdef RIPPER 13315 ripper_dispatch_scan_event(parser, tSP); 13316 #endif 13317 goto retry; /* skip \\n */ 13318 } 13319 pushback(c); 13320 return '\\'; 13321 13322 case '%': 13323 if (IS_lex_state(EXPR_BEG_ANY)) { 13324 int term; 13325 int paren; 13326 13327 c = nextc(); 13328 quotation: 13329 if (c == -1 || !ISALNUM(c)) { 13330 term = c; 13331 c = 'Q'; 13332 } 13333 else { 13334 term = nextc(); 13335 if (rb_enc_isalnum(term, current_enc) || !parser_isascii()) { 13336 yyerror("unknown type of %string"); 13337 return 0; 13338 } 13339 } 13340 if (c == -1 || term == -1) { 13341 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 13342 return 0; 13343 } 13344 paren = term; 13345 if (term == '(') term = ')'; 13346 else if (term == '[') term = ']'; 13347 else if (term == '{') term = '}'; 13348 else if (term == '<') term = '>'; 13349 else paren = 0; 13350 13351 switch (c) { 13352 case 'Q': 13353 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 13354 return tSTRING_BEG; 13355 13356 case 'q': 13357 lex_strterm = NEW_STRTERM(str_squote, term, paren); 13358 return tSTRING_BEG; 13359 13360 case 'W': 13361 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13362 do {c = nextc();} while (ISSPACE(c)); 13363 pushback(c); 13364 return tWORDS_BEG; 13365 13366 case 'w': 13367 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13368 do {c = nextc();} while (ISSPACE(c)); 13369 pushback(c); 13370 return tQWORDS_BEG; 13371 13372 case 'I': 13373 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13374 do {c = nextc();} while (ISSPACE(c)); 13375 pushback(c); 13376 return tSYMBOLS_BEG; 13377 13378 case 'i': 13379 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13380 do {c = nextc();} while (ISSPACE(c)); 13381 pushback(c); 13382 return tQSYMBOLS_BEG; 13383 13384 case 'x': 13385 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 13386 return tXSTRING_BEG; 13387 13388 case 'r': 13389 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 13390 return tREGEXP_BEG; 13391 13392 case 's': 13393 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 13394 lex_state = EXPR_FNAME; 13395 return tSYMBEG; 13396 13397 default: 13398 yyerror("unknown type of %string"); 13399 return 0; 13400 } 13401 } 13402 if ((c = nextc()) == '=') { 13403 set_yylval_id('%'); 13404 lex_state = EXPR_BEG; 13405 return tOP_ASGN; 13406 } 13407 if (IS_SPCARG(c)) { 13408 goto quotation; 13409 } 13410 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13411 pushback(c); 13412 warn_balanced("%%", "string literal"); 13413 return '%'; 13414 13415 case '$': 13416 lex_state = EXPR_END; 13417 newtok(); 13418 c = nextc(); 13419 switch (c) { 13420 case '_': /* $_: last read line string */ 13421 c = nextc(); 13422 if (parser_is_identchar()) { 13423 tokadd('$'); 13424 tokadd('_'); 13425 break; 13426 } 13427 pushback(c); 13428 c = '_'; 13429 /* fall through */ 13430 case '~': /* $~: match-data */ 13431 case '*': /* $*: argv */ 13432 case '$': /* $$: pid */ 13433 case '?': /* $?: last status */ 13434 case '!': /* $!: error string */ 13435 case '@': /* $@: error position */ 13436 case '/': /* $/: input record separator */ 13437 case '\\': /* $\: output record separator */ 13438 case ';': /* $;: field separator */ 13439 case ',': /* $,: output field separator */ 13440 case '.': /* $.: last read line number */ 13441 case '=': /* $=: ignorecase */ 13442 case ':': /* $:: load path */ 13443 case '<': /* $<: reading filename */ 13444 case '>': /* $>: default output handle */ 13445 case '\"': /* $": already loaded files */ 13446 tokadd('$'); 13447 tokadd(c); 13448 tokfix(); 13449 set_yylval_name(rb_intern(tok())); 13450 return tGVAR; 13451 13452 case '-': 13453 tokadd('$'); 13454 tokadd(c); 13455 c = nextc(); 13456 if (parser_is_identchar()) { 13457 if (tokadd_mbchar(c) == -1) return 0; 13458 } 13459 else { 13460 pushback(c); 13461 } 13462 gvar: 13463 tokfix(); 13464 set_yylval_name(rb_intern(tok())); 13465 return tGVAR; 13466 13467 case '&': /* $&: last match */ 13468 case '`': /* $`: string before last match */ 13469 case '\'': /* $': string after last match */ 13470 case '+': /* $+: string matches last paren. */ 13471 if (IS_lex_state_for(last_state, EXPR_FNAME)) { 13472 tokadd('$'); 13473 tokadd(c); 13474 goto gvar; 13475 } 13476 set_yylval_node(NEW_BACK_REF(c)); 13477 return tBACK_REF; 13478 13479 case '1': case '2': case '3': 13480 case '4': case '5': case '6': 13481 case '7': case '8': case '9': 13482 tokadd('$'); 13483 do { 13484 tokadd(c); 13485 c = nextc(); 13486 } while (c != -1 && ISDIGIT(c)); 13487 pushback(c); 13488 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar; 13489 tokfix(); 13490 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 13491 return tNTH_REF; 13492 13493 default: 13494 if (!parser_is_identchar()) { 13495 pushback(c); 13496 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c); 13497 return 0; 13498 } 13499 case '0': 13500 tokadd('$'); 13501 } 13502 break; 13503 13504 case '@': 13505 c = nextc(); 13506 newtok(); 13507 tokadd('@'); 13508 if (c == '@') { 13509 tokadd('@'); 13510 c = nextc(); 13511 } 13512 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) { 13513 pushback(c); 13514 if (tokidx == 1) { 13515 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 13516 } 13517 else { 13518 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 13519 } 13520 return 0; 13521 } 13522 break; 13523 13524 case '_': 13525 if (was_bol() && whole_match_p("__END__", 7, 0)) { 13526 ruby__end__seen = 1; 13527 parser->eofp = Qtrue; 13528 #ifndef RIPPER 13529 return -1; 13530 #else 13531 lex_goto_eol(parser); 13532 ripper_dispatch_scan_event(parser, k__END__); 13533 return 0; 13534 #endif 13535 } 13536 newtok(); 13537 break; 13538 13539 default: 13540 if (!parser_is_identchar()) { 13541 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 13542 goto retry; 13543 } 13544 13545 newtok(); 13546 break; 13547 } 13548 13549 mb = ENC_CODERANGE_7BIT; 13550 do { 13551 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 13552 if (tokadd_mbchar(c) == -1) return 0; 13553 c = nextc(); 13554 } while (parser_is_identchar()); 13555 switch (tok()[0]) { 13556 case '@': case '$': 13557 pushback(c); 13558 break; 13559 default: 13560 if ((c == '!' || c == '?') && !peek('=')) { 13561 tokadd(c); 13562 } 13563 else { 13564 pushback(c); 13565 } 13566 } 13567 tokfix(); 13568 13569 { 13570 int result = 0; 13571 13572 last_state = lex_state; 13573 switch (tok()[0]) { 13574 case '$': 13575 lex_state = EXPR_END; 13576 result = tGVAR; 13577 break; 13578 case '@': 13579 lex_state = EXPR_END; 13580 if (tok()[1] == '@') 13581 result = tCVAR; 13582 else 13583 result = tIVAR; 13584 break; 13585 13586 default: 13587 if (toklast() == '!' || toklast() == '?') { 13588 result = tFID; 13589 } 13590 else { 13591 if (IS_lex_state(EXPR_FNAME)) { 13592 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 13593 (!peek('=') || (peek_n('>', 1)))) { 13594 result = tIDENTIFIER; 13595 tokadd(c); 13596 tokfix(); 13597 } 13598 else { 13599 pushback(c); 13600 } 13601 } 13602 if (result == 0 && ISUPPER(tok()[0])) { 13603 result = tCONSTANT; 13604 } 13605 else { 13606 result = tIDENTIFIER; 13607 } 13608 } 13609 13610 if (IS_LABEL_POSSIBLE()) { 13611 if (IS_LABEL_SUFFIX(0)) { 13612 lex_state = EXPR_BEG; 13613 nextc(); 13614 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 13615 return tLABEL; 13616 } 13617 } 13618 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) { 13619 const struct kwtable *kw; 13620 13621 /* See if it is a reserved word. */ 13622 kw = rb_reserved_word(tok(), toklen()); 13623 if (kw) { 13624 enum lex_state_e state = lex_state; 13625 lex_state = kw->state; 13626 if (state == EXPR_FNAME) { 13627 set_yylval_name(rb_intern(kw->name)); 13628 return kw->id[0]; 13629 } 13630 if (lex_state == EXPR_BEG) { 13631 command_start = TRUE; 13632 } 13633 if (kw->id[0] == keyword_do) { 13634 if (lpar_beg && lpar_beg == paren_nest) { 13635 lpar_beg = 0; 13636 --paren_nest; 13637 return keyword_do_LAMBDA; 13638 } 13639 if (COND_P()) return keyword_do_cond; 13640 if (CMDARG_P() && state != EXPR_CMDARG) 13641 return keyword_do_block; 13642 if (state & (EXPR_BEG | EXPR_ENDARG)) 13643 return keyword_do_block; 13644 return keyword_do; 13645 } 13646 if (state & (EXPR_BEG | EXPR_VALUE)) 13647 return kw->id[0]; 13648 else { 13649 if (kw->id[0] != kw->id[1]) 13650 lex_state = EXPR_BEG; 13651 return kw->id[1]; 13652 } 13653 } 13654 } 13655 13656 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) { 13657 if (cmd_state) { 13658 lex_state = EXPR_CMDARG; 13659 } 13660 else { 13661 lex_state = EXPR_ARG; 13662 } 13663 } 13664 else if (lex_state == EXPR_FNAME) { 13665 lex_state = EXPR_ENDFN; 13666 } 13667 else { 13668 lex_state = EXPR_END; 13669 } 13670 } 13671 { 13672 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 13673 13674 set_yylval_name(ident); 13675 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && 13676 is_local_id(ident) && lvar_defined(ident)) { 13677 lex_state = EXPR_END; 13678 } 13679 } 13680 return result; 13681 } 13682 } 13683 13684 #if YYPURE 13685 static int 13686 yylex(void *lval, void *p) 13687 #else 13688 yylex(void *p) 13689 #endif 13690 { 13691 struct parser_params *parser = (struct parser_params*)p; 13692 int t; 13693 13694 #if YYPURE 13695 parser->parser_yylval = lval; 13696 parser->parser_yylval->val = Qundef; 13697 #endif 13698 t = parser_yylex(parser); 13699 #ifdef RIPPER 13700 if (!NIL_P(parser->delayed)) { 13701 ripper_dispatch_delayed_token(parser, t); 13702 return t; 13703 } 13704 if (t != 0) 13705 ripper_dispatch_scan_event(parser, t); 13706 #endif 13707 13708 return t; 13709 } 13710 13711 #ifndef RIPPER 13712 static NODE* 13713 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 13714 { 13715 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 13716 nd_set_line(n, ruby_sourceline); 13717 return n; 13718 } 13719 13720 static enum node_type 13721 nodetype(NODE *node) /* for debug */ 13722 { 13723 return (enum node_type)nd_type(node); 13724 } 13725 13726 static int 13727 nodeline(NODE *node) 13728 { 13729 return nd_line(node); 13730 } 13731 13732 static NODE* 13733 newline_node(NODE *node) 13734 { 13735 if (node) { 13736 node = remove_begin(node); 13737 node->flags |= NODE_FL_NEWLINE; 13738 } 13739 return node; 13740 } 13741 13742 static void 13743 fixpos(NODE *node, NODE *orig) 13744 { 13745 if (!node) return; 13746 if (!orig) return; 13747 if (orig == (NODE*)1) return; 13748 nd_set_line(node, nd_line(orig)); 13749 } 13750 13751 static void 13752 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 13753 { 13754 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 13755 } 13756 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 13757 13758 static void 13759 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 13760 { 13761 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 13762 } 13763 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 13764 13765 static NODE* 13766 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 13767 { 13768 NODE *end, *h = head, *nd; 13769 13770 if (tail == 0) return head; 13771 13772 if (h == 0) return tail; 13773 switch (nd_type(h)) { 13774 case NODE_LIT: 13775 case NODE_STR: 13776 case NODE_SELF: 13777 case NODE_TRUE: 13778 case NODE_FALSE: 13779 case NODE_NIL: 13780 parser_warning(h, "unused literal ignored"); 13781 return tail; 13782 default: 13783 h = end = NEW_BLOCK(head); 13784 end->nd_end = end; 13785 fixpos(end, head); 13786 head = end; 13787 break; 13788 case NODE_BLOCK: 13789 end = h->nd_end; 13790 break; 13791 } 13792 13793 nd = end->nd_head; 13794 switch (nd_type(nd)) { 13795 case NODE_RETURN: 13796 case NODE_BREAK: 13797 case NODE_NEXT: 13798 case NODE_REDO: 13799 case NODE_RETRY: 13800 if (RTEST(ruby_verbose)) { 13801 parser_warning(tail, "statement not reached"); 13802 } 13803 break; 13804 13805 default: 13806 break; 13807 } 13808 13809 if (nd_type(tail) != NODE_BLOCK) { 13810 tail = NEW_BLOCK(tail); 13811 tail->nd_end = tail; 13812 } 13813 end->nd_next = tail; 13814 h->nd_end = tail->nd_end; 13815 return head; 13816 } 13817 13818 /* append item to the list */ 13819 static NODE* 13820 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 13821 { 13822 NODE *last; 13823 13824 if (list == 0) return NEW_LIST(item); 13825 if (list->nd_next) { 13826 last = list->nd_next->nd_end; 13827 } 13828 else { 13829 last = list; 13830 } 13831 13832 list->nd_alen += 1; 13833 last->nd_next = NEW_LIST(item); 13834 list->nd_next->nd_end = last->nd_next; 13835 return list; 13836 } 13837 13838 /* concat two lists */ 13839 static NODE* 13840 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13841 { 13842 NODE *last; 13843 13844 if (head->nd_next) { 13845 last = head->nd_next->nd_end; 13846 } 13847 else { 13848 last = head; 13849 } 13850 13851 head->nd_alen += tail->nd_alen; 13852 last->nd_next = tail; 13853 if (tail->nd_next) { 13854 head->nd_next->nd_end = tail->nd_next->nd_end; 13855 } 13856 else { 13857 head->nd_next->nd_end = tail; 13858 } 13859 13860 return head; 13861 } 13862 13863 static int 13864 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 13865 { 13866 if (NIL_P(tail)) return 1; 13867 if (!rb_enc_compatible(head, tail)) { 13868 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 13869 rb_enc_name(rb_enc_get(head)), 13870 rb_enc_name(rb_enc_get(tail))); 13871 rb_str_resize(head, 0); 13872 rb_str_resize(tail, 0); 13873 return 0; 13874 } 13875 rb_str_buf_append(head, tail); 13876 return 1; 13877 } 13878 13879 /* concat two string literals */ 13880 static NODE * 13881 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13882 { 13883 enum node_type htype; 13884 NODE *headlast; 13885 VALUE lit; 13886 13887 if (!head) return tail; 13888 if (!tail) return head; 13889 13890 htype = nd_type(head); 13891 if (htype == NODE_EVSTR) { 13892 NODE *node = NEW_DSTR(Qnil); 13893 head = list_append(node, head); 13894 htype = NODE_DSTR; 13895 } 13896 switch (nd_type(tail)) { 13897 case NODE_STR: 13898 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 13899 nd_type(headlast) == NODE_STR) { 13900 htype = NODE_STR; 13901 lit = headlast->nd_lit; 13902 } 13903 else { 13904 lit = head->nd_lit; 13905 } 13906 if (htype == NODE_STR) { 13907 if (!literal_concat0(parser, lit, tail->nd_lit)) { 13908 error: 13909 rb_gc_force_recycle((VALUE)head); 13910 rb_gc_force_recycle((VALUE)tail); 13911 return 0; 13912 } 13913 rb_gc_force_recycle((VALUE)tail); 13914 } 13915 else { 13916 list_append(head, tail); 13917 } 13918 break; 13919 13920 case NODE_DSTR: 13921 if (htype == NODE_STR) { 13922 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 13923 goto error; 13924 tail->nd_lit = head->nd_lit; 13925 rb_gc_force_recycle((VALUE)head); 13926 head = tail; 13927 } 13928 else if (NIL_P(tail->nd_lit)) { 13929 append: 13930 head->nd_alen += tail->nd_alen - 1; 13931 head->nd_next->nd_end->nd_next = tail->nd_next; 13932 head->nd_next->nd_end = tail->nd_next->nd_end; 13933 rb_gc_force_recycle((VALUE)tail); 13934 } 13935 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 13936 nd_type(headlast) == NODE_STR) { 13937 lit = headlast->nd_lit; 13938 if (!literal_concat0(parser, lit, tail->nd_lit)) 13939 goto error; 13940 tail->nd_lit = Qnil; 13941 goto append; 13942 } 13943 else { 13944 nd_set_type(tail, NODE_ARRAY); 13945 tail->nd_head = NEW_STR(tail->nd_lit); 13946 list_concat(head, tail); 13947 } 13948 break; 13949 13950 case NODE_EVSTR: 13951 if (htype == NODE_STR) { 13952 nd_set_type(head, NODE_DSTR); 13953 head->nd_alen = 1; 13954 } 13955 list_append(head, tail); 13956 break; 13957 } 13958 return head; 13959 } 13960 13961 static NODE * 13962 evstr2dstr_gen(struct parser_params *parser, NODE *node) 13963 { 13964 if (nd_type(node) == NODE_EVSTR) { 13965 node = list_append(NEW_DSTR(Qnil), node); 13966 } 13967 return node; 13968 } 13969 13970 static NODE * 13971 new_evstr_gen(struct parser_params *parser, NODE *node) 13972 { 13973 NODE *head = node; 13974 13975 if (node) { 13976 switch (nd_type(node)) { 13977 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 13978 return node; 13979 } 13980 } 13981 return NEW_EVSTR(head); 13982 } 13983 13984 static NODE * 13985 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 13986 { 13987 value_expr(recv); 13988 value_expr(arg1); 13989 return NEW_CALL(recv, id, NEW_LIST(arg1)); 13990 } 13991 13992 static NODE * 13993 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 13994 { 13995 value_expr(recv); 13996 return NEW_CALL(recv, id, 0); 13997 } 13998 13999 static NODE* 14000 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14001 { 14002 value_expr(node1); 14003 value_expr(node2); 14004 if (node1) { 14005 switch (nd_type(node1)) { 14006 case NODE_DREGX: 14007 case NODE_DREGX_ONCE: 14008 return NEW_MATCH2(node1, node2); 14009 14010 case NODE_LIT: 14011 if (RB_TYPE_P(node1->nd_lit, T_REGEXP)) { 14012 return NEW_MATCH2(node1, node2); 14013 } 14014 } 14015 } 14016 14017 if (node2) { 14018 switch (nd_type(node2)) { 14019 case NODE_DREGX: 14020 case NODE_DREGX_ONCE: 14021 return NEW_MATCH3(node2, node1); 14022 14023 case NODE_LIT: 14024 if (RB_TYPE_P(node2->nd_lit, T_REGEXP)) { 14025 return NEW_MATCH3(node2, node1); 14026 } 14027 } 14028 } 14029 14030 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 14031 } 14032 14033 static NODE* 14034 gettable_gen(struct parser_params *parser, ID id) 14035 { 14036 switch (id) { 14037 case keyword_self: 14038 return NEW_SELF(); 14039 case keyword_nil: 14040 return NEW_NIL(); 14041 case keyword_true: 14042 return NEW_TRUE(); 14043 case keyword_false: 14044 return NEW_FALSE(); 14045 case keyword__FILE__: 14046 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 14047 rb_filesystem_encoding())); 14048 case keyword__LINE__: 14049 return NEW_LIT(INT2FIX(tokline)); 14050 case keyword__ENCODING__: 14051 return NEW_LIT(rb_enc_from_encoding(current_enc)); 14052 } 14053 switch (id_type(id)) { 14054 case ID_LOCAL: 14055 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 14056 if (local_id(id)) return NEW_LVAR(id); 14057 /* method call without arguments */ 14058 return NEW_VCALL(id); 14059 case ID_GLOBAL: 14060 return NEW_GVAR(id); 14061 case ID_INSTANCE: 14062 return NEW_IVAR(id); 14063 case ID_CONST: 14064 return NEW_CONST(id); 14065 case ID_CLASS: 14066 return NEW_CVAR(id); 14067 } 14068 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14069 return 0; 14070 } 14071 #else /* !RIPPER */ 14072 static int 14073 id_is_var_gen(struct parser_params *parser, ID id) 14074 { 14075 if (is_notop_id(id)) { 14076 switch (id & ID_SCOPE_MASK) { 14077 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 14078 return 1; 14079 case ID_LOCAL: 14080 if (dyna_in_block() && dvar_defined(id)) return 1; 14081 if (local_id(id)) return 1; 14082 /* method call without arguments */ 14083 return 0; 14084 } 14085 } 14086 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14087 return 0; 14088 } 14089 #endif /* !RIPPER */ 14090 14091 #if PARSER_DEBUG 14092 static const char * 14093 lex_state_name(enum lex_state_e state) 14094 { 14095 static const char names[][12] = { 14096 "EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG", 14097 "EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS", 14098 "EXPR_VALUE", 14099 }; 14100 14101 if ((unsigned)state & ~(~0u << EXPR_MAX_STATE)) 14102 return names[ffs(state)]; 14103 return NULL; 14104 } 14105 #endif 14106 14107 #ifdef RIPPER 14108 static VALUE 14109 assignable_gen(struct parser_params *parser, VALUE lhs) 14110 #else 14111 static NODE* 14112 assignable_gen(struct parser_params *parser, ID id, NODE *val) 14113 #endif 14114 { 14115 #ifdef RIPPER 14116 ID id = get_id(lhs); 14117 # define assignable_result(x) get_value(lhs) 14118 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 14119 #else 14120 # define assignable_result(x) (x) 14121 #endif 14122 if (!id) return assignable_result(0); 14123 switch (id) { 14124 case keyword_self: 14125 yyerror("Can't change the value of self"); 14126 goto error; 14127 case keyword_nil: 14128 yyerror("Can't assign to nil"); 14129 goto error; 14130 case keyword_true: 14131 yyerror("Can't assign to true"); 14132 goto error; 14133 case keyword_false: 14134 yyerror("Can't assign to false"); 14135 goto error; 14136 case keyword__FILE__: 14137 yyerror("Can't assign to __FILE__"); 14138 goto error; 14139 case keyword__LINE__: 14140 yyerror("Can't assign to __LINE__"); 14141 goto error; 14142 case keyword__ENCODING__: 14143 yyerror("Can't assign to __ENCODING__"); 14144 goto error; 14145 } 14146 switch (id_type(id)) { 14147 case ID_LOCAL: 14148 if (dyna_in_block()) { 14149 if (dvar_curr(id)) { 14150 return assignable_result(NEW_DASGN_CURR(id, val)); 14151 } 14152 else if (dvar_defined(id)) { 14153 return assignable_result(NEW_DASGN(id, val)); 14154 } 14155 else if (local_id(id)) { 14156 return assignable_result(NEW_LASGN(id, val)); 14157 } 14158 else { 14159 dyna_var(id); 14160 return assignable_result(NEW_DASGN_CURR(id, val)); 14161 } 14162 } 14163 else { 14164 if (!local_id(id)) { 14165 local_var(id); 14166 } 14167 return assignable_result(NEW_LASGN(id, val)); 14168 } 14169 break; 14170 case ID_GLOBAL: 14171 return assignable_result(NEW_GASGN(id, val)); 14172 case ID_INSTANCE: 14173 return assignable_result(NEW_IASGN(id, val)); 14174 case ID_CONST: 14175 if (!in_def && !in_single) 14176 return assignable_result(NEW_CDECL(id, val, 0)); 14177 yyerror("dynamic constant assignment"); 14178 break; 14179 case ID_CLASS: 14180 return assignable_result(NEW_CVASGN(id, val)); 14181 default: 14182 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 14183 } 14184 error: 14185 return assignable_result(0); 14186 #undef assignable_result 14187 #undef parser_yyerror 14188 } 14189 14190 static int 14191 is_private_local_id(ID name) 14192 { 14193 VALUE s; 14194 if (name == idUScore) return 1; 14195 if (!is_local_id(name)) return 0; 14196 s = rb_id2str(name); 14197 if (!s) return 0; 14198 return RSTRING_PTR(s)[0] == '_'; 14199 } 14200 14201 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) 14202 14203 static ID 14204 shadowing_lvar_gen(struct parser_params *parser, ID name) 14205 { 14206 if (is_private_local_id(name)) return name; 14207 if (dyna_in_block()) { 14208 if (dvar_curr(name)) { 14209 yyerror("duplicated argument name"); 14210 } 14211 else if (dvar_defined_get(name) || local_id(name)) { 14212 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 14213 vtable_add(lvtbl->vars, name); 14214 if (lvtbl->used) { 14215 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 14216 } 14217 } 14218 } 14219 else { 14220 if (local_id(name)) { 14221 yyerror("duplicated argument name"); 14222 } 14223 } 14224 return name; 14225 } 14226 14227 static void 14228 new_bv_gen(struct parser_params *parser, ID name) 14229 { 14230 if (!name) return; 14231 if (!is_local_id(name)) { 14232 compile_error(PARSER_ARG "invalid local variable - %s", 14233 rb_id2name(name)); 14234 return; 14235 } 14236 shadowing_lvar(name); 14237 dyna_var(name); 14238 } 14239 14240 #ifndef RIPPER 14241 static NODE * 14242 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 14243 { 14244 if (recv && nd_type(recv) == NODE_SELF) 14245 recv = (NODE *)1; 14246 return NEW_ATTRASGN(recv, tASET, idx); 14247 } 14248 14249 static void 14250 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14251 { 14252 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 14253 compile_error(PARSER_ARG "both block arg and actual block given"); 14254 } 14255 } 14256 14257 ID 14258 rb_id_attrset(ID id) 14259 { 14260 id &= ~ID_SCOPE_MASK; 14261 id |= ID_ATTRSET; 14262 return id; 14263 } 14264 14265 static NODE * 14266 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 14267 { 14268 if (recv && nd_type(recv) == NODE_SELF) 14269 recv = (NODE *)1; 14270 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 14271 } 14272 14273 static void 14274 rb_backref_error_gen(struct parser_params *parser, NODE *node) 14275 { 14276 switch (nd_type(node)) { 14277 case NODE_NTH_REF: 14278 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 14279 break; 14280 case NODE_BACK_REF: 14281 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 14282 break; 14283 } 14284 } 14285 14286 static NODE * 14287 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14288 { 14289 if (!node2) return node1; 14290 switch (nd_type(node1)) { 14291 case NODE_BLOCK_PASS: 14292 if (node1->nd_head) 14293 node1->nd_head = arg_concat(node1->nd_head, node2); 14294 else 14295 node1->nd_head = NEW_LIST(node2); 14296 return node1; 14297 case NODE_ARGSPUSH: 14298 if (nd_type(node2) != NODE_ARRAY) break; 14299 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 14300 nd_set_type(node1, NODE_ARGSCAT); 14301 return node1; 14302 case NODE_ARGSCAT: 14303 if (nd_type(node2) != NODE_ARRAY || 14304 nd_type(node1->nd_body) != NODE_ARRAY) break; 14305 node1->nd_body = list_concat(node1->nd_body, node2); 14306 return node1; 14307 } 14308 return NEW_ARGSCAT(node1, node2); 14309 } 14310 14311 static NODE * 14312 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14313 { 14314 if (!node1) return NEW_LIST(node2); 14315 switch (nd_type(node1)) { 14316 case NODE_ARRAY: 14317 return list_append(node1, node2); 14318 case NODE_BLOCK_PASS: 14319 node1->nd_head = arg_append(node1->nd_head, node2); 14320 return node1; 14321 case NODE_ARGSPUSH: 14322 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 14323 nd_set_type(node1, NODE_ARGSCAT); 14324 return node1; 14325 } 14326 return NEW_ARGSPUSH(node1, node2); 14327 } 14328 14329 static NODE * 14330 splat_array(NODE* node) 14331 { 14332 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 14333 if (nd_type(node) == NODE_ARRAY) return node; 14334 return 0; 14335 } 14336 14337 static NODE * 14338 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 14339 { 14340 if (!lhs) return 0; 14341 14342 switch (nd_type(lhs)) { 14343 case NODE_GASGN: 14344 case NODE_IASGN: 14345 case NODE_IASGN2: 14346 case NODE_LASGN: 14347 case NODE_DASGN: 14348 case NODE_DASGN_CURR: 14349 case NODE_MASGN: 14350 case NODE_CDECL: 14351 case NODE_CVASGN: 14352 lhs->nd_value = rhs; 14353 break; 14354 14355 case NODE_ATTRASGN: 14356 case NODE_CALL: 14357 lhs->nd_args = arg_append(lhs->nd_args, rhs); 14358 break; 14359 14360 default: 14361 /* should not happen */ 14362 break; 14363 } 14364 14365 return lhs; 14366 } 14367 14368 static int 14369 value_expr_gen(struct parser_params *parser, NODE *node) 14370 { 14371 int cond = 0; 14372 14373 if (!node) { 14374 rb_warning0("empty expression"); 14375 } 14376 while (node) { 14377 switch (nd_type(node)) { 14378 case NODE_DEFN: 14379 case NODE_DEFS: 14380 parser_warning(node, "void value expression"); 14381 return FALSE; 14382 14383 case NODE_RETURN: 14384 case NODE_BREAK: 14385 case NODE_NEXT: 14386 case NODE_REDO: 14387 case NODE_RETRY: 14388 if (!cond) yyerror("void value expression"); 14389 /* or "control never reach"? */ 14390 return FALSE; 14391 14392 case NODE_BLOCK: 14393 while (node->nd_next) { 14394 node = node->nd_next; 14395 } 14396 node = node->nd_head; 14397 break; 14398 14399 case NODE_BEGIN: 14400 node = node->nd_body; 14401 break; 14402 14403 case NODE_IF: 14404 if (!node->nd_body) { 14405 node = node->nd_else; 14406 break; 14407 } 14408 else if (!node->nd_else) { 14409 node = node->nd_body; 14410 break; 14411 } 14412 if (!value_expr(node->nd_body)) return FALSE; 14413 node = node->nd_else; 14414 break; 14415 14416 case NODE_AND: 14417 case NODE_OR: 14418 cond = 1; 14419 node = node->nd_2nd; 14420 break; 14421 14422 default: 14423 return TRUE; 14424 } 14425 } 14426 14427 return TRUE; 14428 } 14429 14430 static void 14431 void_expr_gen(struct parser_params *parser, NODE *node) 14432 { 14433 const char *useless = 0; 14434 14435 if (!RTEST(ruby_verbose)) return; 14436 14437 if (!node) return; 14438 switch (nd_type(node)) { 14439 case NODE_CALL: 14440 switch (node->nd_mid) { 14441 case '+': 14442 case '-': 14443 case '*': 14444 case '/': 14445 case '%': 14446 case tPOW: 14447 case tUPLUS: 14448 case tUMINUS: 14449 case '|': 14450 case '^': 14451 case '&': 14452 case tCMP: 14453 case '>': 14454 case tGEQ: 14455 case '<': 14456 case tLEQ: 14457 case tEQ: 14458 case tNEQ: 14459 useless = rb_id2name(node->nd_mid); 14460 break; 14461 } 14462 break; 14463 14464 case NODE_LVAR: 14465 case NODE_DVAR: 14466 case NODE_GVAR: 14467 case NODE_IVAR: 14468 case NODE_CVAR: 14469 case NODE_NTH_REF: 14470 case NODE_BACK_REF: 14471 useless = "a variable"; 14472 break; 14473 case NODE_CONST: 14474 useless = "a constant"; 14475 break; 14476 case NODE_LIT: 14477 case NODE_STR: 14478 case NODE_DSTR: 14479 case NODE_DREGX: 14480 case NODE_DREGX_ONCE: 14481 useless = "a literal"; 14482 break; 14483 case NODE_COLON2: 14484 case NODE_COLON3: 14485 useless = "::"; 14486 break; 14487 case NODE_DOT2: 14488 useless = ".."; 14489 break; 14490 case NODE_DOT3: 14491 useless = "..."; 14492 break; 14493 case NODE_SELF: 14494 useless = "self"; 14495 break; 14496 case NODE_NIL: 14497 useless = "nil"; 14498 break; 14499 case NODE_TRUE: 14500 useless = "true"; 14501 break; 14502 case NODE_FALSE: 14503 useless = "false"; 14504 break; 14505 case NODE_DEFINED: 14506 useless = "defined?"; 14507 break; 14508 } 14509 14510 if (useless) { 14511 int line = ruby_sourceline; 14512 14513 ruby_sourceline = nd_line(node); 14514 rb_warnS("possibly useless use of %s in void context", useless); 14515 ruby_sourceline = line; 14516 } 14517 } 14518 14519 static void 14520 void_stmts_gen(struct parser_params *parser, NODE *node) 14521 { 14522 if (!RTEST(ruby_verbose)) return; 14523 if (!node) return; 14524 if (nd_type(node) != NODE_BLOCK) return; 14525 14526 for (;;) { 14527 if (!node->nd_next) return; 14528 void_expr0(node->nd_head); 14529 node = node->nd_next; 14530 } 14531 } 14532 14533 static NODE * 14534 remove_begin(NODE *node) 14535 { 14536 NODE **n = &node, *n1 = node; 14537 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 14538 *n = n1 = n1->nd_body; 14539 } 14540 return node; 14541 } 14542 14543 static void 14544 reduce_nodes_gen(struct parser_params *parser, NODE **body) 14545 { 14546 NODE *node = *body; 14547 14548 if (!node) { 14549 *body = NEW_NIL(); 14550 return; 14551 } 14552 #define subnodes(n1, n2) \ 14553 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 14554 (!node->n2) ? (body = &node->n1, 1) : \ 14555 (reduce_nodes(&node->n1), body = &node->n2, 1)) 14556 14557 while (node) { 14558 int newline = (int)(node->flags & NODE_FL_NEWLINE); 14559 switch (nd_type(node)) { 14560 end: 14561 case NODE_NIL: 14562 *body = 0; 14563 return; 14564 case NODE_RETURN: 14565 *body = node = node->nd_stts; 14566 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14567 continue; 14568 case NODE_BEGIN: 14569 *body = node = node->nd_body; 14570 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14571 continue; 14572 case NODE_BLOCK: 14573 body = &node->nd_end->nd_head; 14574 break; 14575 case NODE_IF: 14576 if (subnodes(nd_body, nd_else)) break; 14577 return; 14578 case NODE_CASE: 14579 body = &node->nd_body; 14580 break; 14581 case NODE_WHEN: 14582 if (!subnodes(nd_body, nd_next)) goto end; 14583 break; 14584 case NODE_ENSURE: 14585 if (!subnodes(nd_head, nd_resq)) goto end; 14586 break; 14587 case NODE_RESCUE: 14588 if (node->nd_else) { 14589 body = &node->nd_resq; 14590 break; 14591 } 14592 if (!subnodes(nd_head, nd_resq)) goto end; 14593 break; 14594 default: 14595 return; 14596 } 14597 node = *body; 14598 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14599 } 14600 14601 #undef subnodes 14602 } 14603 14604 static int 14605 is_static_content(NODE *node) 14606 { 14607 if (!node) return 1; 14608 switch (nd_type(node)) { 14609 case NODE_HASH: 14610 if (!(node = node->nd_head)) break; 14611 case NODE_ARRAY: 14612 do { 14613 if (!is_static_content(node->nd_head)) return 0; 14614 } while ((node = node->nd_next) != 0); 14615 case NODE_LIT: 14616 case NODE_STR: 14617 case NODE_NIL: 14618 case NODE_TRUE: 14619 case NODE_FALSE: 14620 case NODE_ZARRAY: 14621 break; 14622 default: 14623 return 0; 14624 } 14625 return 1; 14626 } 14627 14628 static int 14629 assign_in_cond(struct parser_params *parser, NODE *node) 14630 { 14631 switch (nd_type(node)) { 14632 case NODE_MASGN: 14633 yyerror("multiple assignment in conditional"); 14634 return 1; 14635 14636 case NODE_LASGN: 14637 case NODE_DASGN: 14638 case NODE_DASGN_CURR: 14639 case NODE_GASGN: 14640 case NODE_IASGN: 14641 break; 14642 14643 default: 14644 return 0; 14645 } 14646 14647 if (!node->nd_value) return 1; 14648 if (is_static_content(node->nd_value)) { 14649 /* reports always */ 14650 parser_warn(node->nd_value, "found = in conditional, should be =="); 14651 } 14652 return 1; 14653 } 14654 14655 static void 14656 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14657 { 14658 if (!e_option_supplied(parser)) parser_warn(node, str); 14659 } 14660 14661 static void 14662 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14663 { 14664 if (!e_option_supplied(parser)) parser_warning(node, str); 14665 } 14666 14667 static void 14668 fixup_nodes(NODE **rootnode) 14669 { 14670 NODE *node, *next, *head; 14671 14672 for (node = *rootnode; node; node = next) { 14673 enum node_type type; 14674 VALUE val; 14675 14676 next = node->nd_next; 14677 head = node->nd_head; 14678 rb_gc_force_recycle((VALUE)node); 14679 *rootnode = next; 14680 switch (type = nd_type(head)) { 14681 case NODE_DOT2: 14682 case NODE_DOT3: 14683 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 14684 type == NODE_DOT3); 14685 rb_gc_force_recycle((VALUE)head->nd_beg); 14686 rb_gc_force_recycle((VALUE)head->nd_end); 14687 nd_set_type(head, NODE_LIT); 14688 head->nd_lit = val; 14689 break; 14690 default: 14691 break; 14692 } 14693 } 14694 } 14695 14696 static NODE *cond0(struct parser_params*,NODE*); 14697 14698 static NODE* 14699 range_op(struct parser_params *parser, NODE *node) 14700 { 14701 enum node_type type; 14702 14703 if (node == 0) return 0; 14704 14705 type = nd_type(node); 14706 value_expr(node); 14707 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 14708 warn_unless_e_option(parser, node, "integer literal in conditional range"); 14709 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 14710 } 14711 return cond0(parser, node); 14712 } 14713 14714 static int 14715 literal_node(NODE *node) 14716 { 14717 if (!node) return 1; /* same as NODE_NIL */ 14718 switch (nd_type(node)) { 14719 case NODE_LIT: 14720 case NODE_STR: 14721 case NODE_DSTR: 14722 case NODE_EVSTR: 14723 case NODE_DREGX: 14724 case NODE_DREGX_ONCE: 14725 case NODE_DSYM: 14726 return 2; 14727 case NODE_TRUE: 14728 case NODE_FALSE: 14729 case NODE_NIL: 14730 return 1; 14731 } 14732 return 0; 14733 } 14734 14735 static NODE* 14736 cond0(struct parser_params *parser, NODE *node) 14737 { 14738 if (node == 0) return 0; 14739 assign_in_cond(parser, node); 14740 14741 switch (nd_type(node)) { 14742 case NODE_DSTR: 14743 case NODE_EVSTR: 14744 case NODE_STR: 14745 rb_warn0("string literal in condition"); 14746 break; 14747 14748 case NODE_DREGX: 14749 case NODE_DREGX_ONCE: 14750 warning_unless_e_option(parser, node, "regex literal in condition"); 14751 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 14752 14753 case NODE_AND: 14754 case NODE_OR: 14755 node->nd_1st = cond0(parser, node->nd_1st); 14756 node->nd_2nd = cond0(parser, node->nd_2nd); 14757 break; 14758 14759 case NODE_DOT2: 14760 case NODE_DOT3: 14761 node->nd_beg = range_op(parser, node->nd_beg); 14762 node->nd_end = range_op(parser, node->nd_end); 14763 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 14764 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 14765 if (!e_option_supplied(parser)) { 14766 int b = literal_node(node->nd_beg); 14767 int e = literal_node(node->nd_end); 14768 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 14769 parser_warn(node, "range literal in condition"); 14770 } 14771 } 14772 break; 14773 14774 case NODE_DSYM: 14775 parser_warning(node, "literal in condition"); 14776 break; 14777 14778 case NODE_LIT: 14779 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) { 14780 warn_unless_e_option(parser, node, "regex literal in condition"); 14781 nd_set_type(node, NODE_MATCH); 14782 } 14783 else { 14784 parser_warning(node, "literal in condition"); 14785 } 14786 default: 14787 break; 14788 } 14789 return node; 14790 } 14791 14792 static NODE* 14793 cond_gen(struct parser_params *parser, NODE *node) 14794 { 14795 if (node == 0) return 0; 14796 return cond0(parser, node); 14797 } 14798 14799 static NODE* 14800 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 14801 { 14802 value_expr(left); 14803 if (left && (enum node_type)nd_type(left) == type) { 14804 NODE *node = left, *second; 14805 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 14806 node = second; 14807 } 14808 node->nd_2nd = NEW_NODE(type, second, right, 0); 14809 return left; 14810 } 14811 return NEW_NODE(type, left, right, 0); 14812 } 14813 14814 static void 14815 no_blockarg(struct parser_params *parser, NODE *node) 14816 { 14817 if (node && nd_type(node) == NODE_BLOCK_PASS) { 14818 compile_error(PARSER_ARG "block argument should not be given"); 14819 } 14820 } 14821 14822 static NODE * 14823 ret_args_gen(struct parser_params *parser, NODE *node) 14824 { 14825 if (node) { 14826 no_blockarg(parser, node); 14827 if (nd_type(node) == NODE_ARRAY) { 14828 if (node->nd_next == 0) { 14829 node = node->nd_head; 14830 } 14831 else { 14832 nd_set_type(node, NODE_VALUES); 14833 } 14834 } 14835 } 14836 return node; 14837 } 14838 14839 static NODE * 14840 new_yield_gen(struct parser_params *parser, NODE *node) 14841 { 14842 if (node) no_blockarg(parser, node); 14843 14844 return NEW_YIELD(node); 14845 } 14846 14847 static NODE* 14848 negate_lit(NODE *node) 14849 { 14850 switch (TYPE(node->nd_lit)) { 14851 case T_FIXNUM: 14852 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 14853 break; 14854 case T_BIGNUM: 14855 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 14856 break; 14857 case T_FLOAT: 14858 #if USE_FLONUM 14859 if (FLONUM_P(node->nd_lit)) { 14860 node->nd_lit = DBL2NUM(-RFLOAT_VALUE(node->nd_lit)); 14861 } 14862 else { 14863 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 14864 } 14865 #else 14866 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 14867 #endif 14868 break; 14869 default: 14870 break; 14871 } 14872 return node; 14873 } 14874 14875 static NODE * 14876 arg_blk_pass(NODE *node1, NODE *node2) 14877 { 14878 if (node2) { 14879 node2->nd_head = node1; 14880 return node2; 14881 } 14882 return node1; 14883 } 14884 14885 14886 static NODE* 14887 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail) 14888 { 14889 int saved_line = ruby_sourceline; 14890 struct rb_args_info *args = tail->nd_ainfo; 14891 14892 args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0; 14893 args->pre_init = m ? m->nd_next : 0; 14894 14895 args->post_args_num = p ? rb_long2int(p->nd_plen) : 0; 14896 args->post_init = p ? p->nd_next : 0; 14897 args->first_post_arg = p ? p->nd_pid : 0; 14898 14899 args->rest_arg = r; 14900 14901 args->opt_args = o; 14902 14903 ruby_sourceline = saved_line; 14904 14905 return tail; 14906 } 14907 14908 static NODE* 14909 new_args_tail_gen(struct parser_params *parser, NODE *k, ID kr, ID b) 14910 { 14911 int saved_line = ruby_sourceline; 14912 struct rb_args_info *args; 14913 NODE *kw_rest_arg = 0; 14914 NODE *node; 14915 14916 args = ALLOC(struct rb_args_info); 14917 MEMZERO(args, struct rb_args_info, 1); 14918 node = NEW_NODE(NODE_ARGS, 0, 0, args); 14919 14920 args->block_arg = b; 14921 args->kw_args = k; 14922 if (k && !kr) kr = internal_id(); 14923 if (kr) { 14924 arg_var(kr); 14925 kw_rest_arg = NEW_DVAR(kr); 14926 } 14927 args->kw_rest_arg = kw_rest_arg; 14928 14929 ruby_sourceline = saved_line; 14930 return node; 14931 } 14932 14933 static NODE* 14934 dsym_node_gen(struct parser_params *parser, NODE *node) 14935 { 14936 VALUE lit; 14937 14938 if (!node) { 14939 return NEW_LIT(ID2SYM(idNULL)); 14940 } 14941 14942 switch (nd_type(node)) { 14943 case NODE_DSTR: 14944 nd_set_type(node, NODE_DSYM); 14945 break; 14946 case NODE_STR: 14947 lit = node->nd_lit; 14948 node->nd_lit = ID2SYM(rb_intern_str(lit)); 14949 nd_set_type(node, NODE_LIT); 14950 break; 14951 default: 14952 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node)); 14953 break; 14954 } 14955 return node; 14956 } 14957 #endif /* !RIPPER */ 14958 14959 #ifndef RIPPER 14960 static NODE * 14961 new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 14962 { 14963 NODE *asgn; 14964 14965 if (lhs) { 14966 ID vid = lhs->nd_vid; 14967 if (op == tOROP) { 14968 lhs->nd_value = rhs; 14969 asgn = NEW_OP_ASGN_OR(gettable(vid), lhs); 14970 if (is_asgn_or_id(vid)) { 14971 asgn->nd_aid = vid; 14972 } 14973 } 14974 else if (op == tANDOP) { 14975 lhs->nd_value = rhs; 14976 asgn = NEW_OP_ASGN_AND(gettable(vid), lhs); 14977 } 14978 else { 14979 asgn = lhs; 14980 asgn->nd_value = NEW_CALL(gettable(vid), op, NEW_LIST(rhs)); 14981 } 14982 } 14983 else { 14984 asgn = NEW_BEGIN(0); 14985 } 14986 return asgn; 14987 } 14988 14989 static NODE * 14990 new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs) 14991 { 14992 NODE *asgn; 14993 14994 if (op == tOROP) { 14995 op = 0; 14996 } 14997 else if (op == tANDOP) { 14998 op = 1; 14999 } 15000 asgn = NEW_OP_ASGN2(lhs, attr, op, rhs); 15001 fixpos(asgn, lhs); 15002 return asgn; 15003 } 15004 15005 static NODE * 15006 new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 15007 { 15008 NODE *asgn; 15009 15010 if (op == tOROP) { 15011 op = 0; 15012 } 15013 else if (op == tANDOP) { 15014 op = 1; 15015 } 15016 if (lhs) { 15017 asgn = NEW_OP_CDECL(lhs, op, rhs); 15018 } 15019 else { 15020 asgn = NEW_BEGIN(0); 15021 } 15022 fixpos(asgn, lhs); 15023 return asgn; 15024 } 15025 #else 15026 static VALUE 15027 new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs) 15028 { 15029 return dispatch3(opassign, lhs, op, rhs); 15030 } 15031 15032 static VALUE 15033 new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs) 15034 { 15035 VALUE recv = dispatch3(field, lhs, type, attr); 15036 return dispatch3(opassign, recv, op, rhs); 15037 } 15038 #endif 15039 15040 static void 15041 warn_unused_var(struct parser_params *parser, struct local_vars *local) 15042 { 15043 int i, cnt; 15044 ID *v, *u; 15045 15046 if (!local->used) return; 15047 v = local->vars->tbl; 15048 u = local->used->tbl; 15049 cnt = local->used->pos; 15050 if (cnt != local->vars->pos) { 15051 rb_bug("local->used->pos != local->vars->pos"); 15052 } 15053 for (i = 0; i < cnt; ++i) { 15054 if (!v[i] || (u[i] & LVAR_USED)) continue; 15055 if (is_private_local_id(v[i])) continue; 15056 rb_warn4S(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 15057 } 15058 } 15059 15060 static void 15061 local_push_gen(struct parser_params *parser, int inherit_dvars) 15062 { 15063 struct local_vars *local; 15064 15065 local = ALLOC(struct local_vars); 15066 local->prev = lvtbl; 15067 local->args = vtable_alloc(0); 15068 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 15069 local->used = !(inherit_dvars && 15070 (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) && 15071 RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 15072 lvtbl = local; 15073 } 15074 15075 static void 15076 local_pop_gen(struct parser_params *parser) 15077 { 15078 struct local_vars *local = lvtbl->prev; 15079 if (lvtbl->used) { 15080 warn_unused_var(parser, lvtbl); 15081 vtable_free(lvtbl->used); 15082 } 15083 vtable_free(lvtbl->args); 15084 vtable_free(lvtbl->vars); 15085 xfree(lvtbl); 15086 lvtbl = local; 15087 } 15088 15089 #ifndef RIPPER 15090 static ID* 15091 vtable_tblcpy(ID *buf, const struct vtable *src) 15092 { 15093 int i, cnt = vtable_size(src); 15094 15095 if (cnt > 0) { 15096 buf[0] = cnt; 15097 for (i = 0; i < cnt; i++) { 15098 buf[i] = src->tbl[i]; 15099 } 15100 return buf; 15101 } 15102 return 0; 15103 } 15104 15105 static ID* 15106 local_tbl_gen(struct parser_params *parser) 15107 { 15108 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 15109 ID *buf; 15110 15111 if (cnt <= 0) return 0; 15112 buf = ALLOC_N(ID, cnt + 1); 15113 vtable_tblcpy(buf+1, lvtbl->args); 15114 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 15115 buf[0] = cnt; 15116 return buf; 15117 } 15118 #endif 15119 15120 static int 15121 arg_var_gen(struct parser_params *parser, ID id) 15122 { 15123 vtable_add(lvtbl->args, id); 15124 return vtable_size(lvtbl->args) - 1; 15125 } 15126 15127 static int 15128 local_var_gen(struct parser_params *parser, ID id) 15129 { 15130 vtable_add(lvtbl->vars, id); 15131 if (lvtbl->used) { 15132 vtable_add(lvtbl->used, (ID)ruby_sourceline); 15133 } 15134 return vtable_size(lvtbl->vars) - 1; 15135 } 15136 15137 static int 15138 local_id_gen(struct parser_params *parser, ID id) 15139 { 15140 struct vtable *vars, *args, *used; 15141 15142 vars = lvtbl->vars; 15143 args = lvtbl->args; 15144 used = lvtbl->used; 15145 15146 while (vars && POINTER_P(vars->prev)) { 15147 vars = vars->prev; 15148 args = args->prev; 15149 if (used) used = used->prev; 15150 } 15151 15152 if (vars && vars->prev == DVARS_INHERIT) { 15153 return rb_local_defined(id); 15154 } 15155 else if (vtable_included(args, id)) { 15156 return 1; 15157 } 15158 else { 15159 int i = vtable_included(vars, id); 15160 if (i && used) used->tbl[i-1] |= LVAR_USED; 15161 return i != 0; 15162 } 15163 } 15164 15165 static const struct vtable * 15166 dyna_push_gen(struct parser_params *parser) 15167 { 15168 lvtbl->args = vtable_alloc(lvtbl->args); 15169 lvtbl->vars = vtable_alloc(lvtbl->vars); 15170 if (lvtbl->used) { 15171 lvtbl->used = vtable_alloc(lvtbl->used); 15172 } 15173 return lvtbl->args; 15174 } 15175 15176 static void 15177 dyna_pop_1(struct parser_params *parser) 15178 { 15179 struct vtable *tmp; 15180 15181 if ((tmp = lvtbl->used) != 0) { 15182 warn_unused_var(parser, lvtbl); 15183 lvtbl->used = lvtbl->used->prev; 15184 vtable_free(tmp); 15185 } 15186 tmp = lvtbl->args; 15187 lvtbl->args = lvtbl->args->prev; 15188 vtable_free(tmp); 15189 tmp = lvtbl->vars; 15190 lvtbl->vars = lvtbl->vars->prev; 15191 vtable_free(tmp); 15192 } 15193 15194 static void 15195 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 15196 { 15197 while (lvtbl->args != lvargs) { 15198 dyna_pop_1(parser); 15199 if (!lvtbl->args) { 15200 struct local_vars *local = lvtbl->prev; 15201 xfree(lvtbl); 15202 lvtbl = local; 15203 } 15204 } 15205 dyna_pop_1(parser); 15206 } 15207 15208 static int 15209 dyna_in_block_gen(struct parser_params *parser) 15210 { 15211 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 15212 } 15213 15214 static int 15215 dvar_defined_gen(struct parser_params *parser, ID id, int get) 15216 { 15217 struct vtable *vars, *args, *used; 15218 int i; 15219 15220 args = lvtbl->args; 15221 vars = lvtbl->vars; 15222 used = lvtbl->used; 15223 15224 while (POINTER_P(vars)) { 15225 if (vtable_included(args, id)) { 15226 return 1; 15227 } 15228 if ((i = vtable_included(vars, id)) != 0) { 15229 if (used) used->tbl[i-1] |= LVAR_USED; 15230 return 1; 15231 } 15232 args = args->prev; 15233 vars = vars->prev; 15234 if (get) used = 0; 15235 if (used) used = used->prev; 15236 } 15237 15238 if (vars == DVARS_INHERIT) { 15239 return rb_dvar_defined(id); 15240 } 15241 15242 return 0; 15243 } 15244 15245 static int 15246 dvar_curr_gen(struct parser_params *parser, ID id) 15247 { 15248 return (vtable_included(lvtbl->args, id) || 15249 vtable_included(lvtbl->vars, id)); 15250 } 15251 15252 #ifndef RIPPER 15253 static void 15254 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 15255 { 15256 int c = RE_OPTION_ENCODING_IDX(options); 15257 15258 if (c) { 15259 int opt, idx; 15260 rb_char_to_option_kcode(c, &opt, &idx); 15261 if (idx != ENCODING_GET(str) && 15262 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15263 goto error; 15264 } 15265 ENCODING_SET(str, idx); 15266 } 15267 else if (RE_OPTION_ENCODING_NONE(options)) { 15268 if (!ENCODING_IS_ASCII8BIT(str) && 15269 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15270 c = 'n'; 15271 goto error; 15272 } 15273 rb_enc_associate(str, rb_ascii8bit_encoding()); 15274 } 15275 else if (current_enc == rb_usascii_encoding()) { 15276 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15277 /* raise in re.c */ 15278 rb_enc_associate(str, rb_usascii_encoding()); 15279 } 15280 else { 15281 rb_enc_associate(str, rb_ascii8bit_encoding()); 15282 } 15283 } 15284 return; 15285 15286 error: 15287 compile_error(PARSER_ARG 15288 "regexp encoding option '%c' differs from source encoding '%s'", 15289 c, rb_enc_name(rb_enc_get(str))); 15290 } 15291 15292 static int 15293 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 15294 { 15295 VALUE err; 15296 reg_fragment_setenc(str, options); 15297 err = rb_reg_check_preprocess(str); 15298 if (err != Qnil) { 15299 err = rb_obj_as_string(err); 15300 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 15301 RB_GC_GUARD(err); 15302 return 0; 15303 } 15304 return 1; 15305 } 15306 15307 typedef struct { 15308 struct parser_params* parser; 15309 rb_encoding *enc; 15310 NODE *succ_block; 15311 NODE *fail_block; 15312 int num; 15313 } reg_named_capture_assign_t; 15314 15315 static int 15316 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 15317 int back_num, int *back_refs, OnigRegex regex, void *arg0) 15318 { 15319 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 15320 struct parser_params* parser = arg->parser; 15321 rb_encoding *enc = arg->enc; 15322 long len = name_end - name; 15323 const char *s = (const char *)name; 15324 ID var; 15325 15326 arg->num++; 15327 15328 if (arg->succ_block == 0) { 15329 arg->succ_block = NEW_BEGIN(0); 15330 arg->fail_block = NEW_BEGIN(0); 15331 } 15332 15333 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 15334 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 15335 !rb_enc_symname2_p(s, len, enc)) { 15336 return ST_CONTINUE; 15337 } 15338 var = rb_intern3(s, len, enc); 15339 if (dvar_defined(var) || local_id(var)) { 15340 rb_warningS("named capture conflicts a local variable - %s", 15341 rb_id2name(var)); 15342 } 15343 arg->succ_block = block_append(arg->succ_block, 15344 newline_node(node_assign(assignable(var,0), 15345 NEW_CALL( 15346 gettable(rb_intern("$~")), 15347 idAREF, 15348 NEW_LIST(NEW_LIT(ID2SYM(var)))) 15349 ))); 15350 arg->fail_block = block_append(arg->fail_block, 15351 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 15352 return ST_CONTINUE; 15353 } 15354 15355 static NODE * 15356 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 15357 { 15358 reg_named_capture_assign_t arg; 15359 15360 arg.parser = parser; 15361 arg.enc = rb_enc_get(regexp); 15362 arg.succ_block = 0; 15363 arg.fail_block = 0; 15364 arg.num = 0; 15365 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 15366 15367 if (arg.num == 0) 15368 return match; 15369 15370 return 15371 block_append( 15372 newline_node(match), 15373 NEW_IF(gettable(rb_intern("$~")), 15374 block_append( 15375 newline_node(arg.succ_block), 15376 newline_node( 15377 NEW_CALL( 15378 gettable(rb_intern("$~")), 15379 rb_intern("begin"), 15380 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 15381 block_append( 15382 newline_node(arg.fail_block), 15383 newline_node( 15384 NEW_LIT(Qnil))))); 15385 } 15386 15387 static VALUE 15388 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 15389 { 15390 VALUE re; 15391 VALUE err; 15392 15393 reg_fragment_setenc(str, options); 15394 err = rb_errinfo(); 15395 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 15396 if (NIL_P(re)) { 15397 ID mesg = rb_intern("mesg"); 15398 VALUE m = rb_attr_get(rb_errinfo(), mesg); 15399 rb_set_errinfo(err); 15400 if (!NIL_P(err)) { 15401 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 15402 } 15403 else { 15404 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 15405 } 15406 return Qnil; 15407 } 15408 return re; 15409 } 15410 15411 void 15412 rb_gc_mark_parser(void) 15413 { 15414 } 15415 15416 NODE* 15417 rb_parser_append_print(VALUE vparser, NODE *node) 15418 { 15419 NODE *prelude = 0; 15420 NODE *scope = node; 15421 struct parser_params *parser; 15422 15423 if (!node) return node; 15424 15425 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15426 15427 node = node->nd_body; 15428 15429 if (nd_type(node) == NODE_PRELUDE) { 15430 prelude = node; 15431 node = node->nd_body; 15432 } 15433 15434 node = block_append(node, 15435 NEW_FCALL(rb_intern("print"), 15436 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 15437 if (prelude) { 15438 prelude->nd_body = node; 15439 scope->nd_body = prelude; 15440 } 15441 else { 15442 scope->nd_body = node; 15443 } 15444 15445 return scope; 15446 } 15447 15448 NODE * 15449 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 15450 { 15451 NODE *prelude = 0; 15452 NODE *scope = node; 15453 struct parser_params *parser; 15454 15455 if (!node) return node; 15456 15457 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15458 15459 node = node->nd_body; 15460 15461 if (nd_type(node) == NODE_PRELUDE) { 15462 prelude = node; 15463 node = node->nd_body; 15464 } 15465 if (split) { 15466 node = block_append(NEW_GASGN(rb_intern("$F"), 15467 NEW_CALL(NEW_GVAR(rb_intern("$_")), 15468 rb_intern("split"), 0)), 15469 node); 15470 } 15471 if (chop) { 15472 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 15473 rb_intern("chop!"), 0), node); 15474 } 15475 15476 node = NEW_OPT_N(node); 15477 15478 if (prelude) { 15479 prelude->nd_body = node; 15480 scope->nd_body = prelude; 15481 } 15482 else { 15483 scope->nd_body = node; 15484 } 15485 15486 return scope; 15487 } 15488 15489 static const struct { 15490 ID token; 15491 const char *name; 15492 } op_tbl[] = { 15493 {tDOT2, ".."}, 15494 {tDOT3, "..."}, 15495 {'+', "+(binary)"}, 15496 {'-', "-(binary)"}, 15497 {tPOW, "**"}, 15498 {tDSTAR, "**"}, 15499 {tUPLUS, "+@"}, 15500 {tUMINUS, "-@"}, 15501 {tCMP, "<=>"}, 15502 {tGEQ, ">="}, 15503 {tLEQ, "<="}, 15504 {tEQ, "=="}, 15505 {tEQQ, "==="}, 15506 {tNEQ, "!="}, 15507 {tMATCH, "=~"}, 15508 {tNMATCH, "!~"}, 15509 {tAREF, "[]"}, 15510 {tASET, "[]="}, 15511 {tLSHFT, "<<"}, 15512 {tRSHFT, ">>"}, 15513 {tCOLON2, "::"}, 15514 }; 15515 15516 #define op_tbl_count numberof(op_tbl) 15517 15518 #ifndef ENABLE_SELECTOR_NAMESPACE 15519 #define ENABLE_SELECTOR_NAMESPACE 0 15520 #endif 15521 15522 static struct symbols { 15523 ID last_id; 15524 st_table *sym_id; 15525 st_table *id_str; 15526 #if ENABLE_SELECTOR_NAMESPACE 15527 st_table *ivar2_id; 15528 st_table *id_ivar2; 15529 #endif 15530 VALUE op_sym[tLAST_OP_ID]; 15531 } global_symbols = {tLAST_TOKEN}; 15532 15533 static const struct st_hash_type symhash = { 15534 rb_str_hash_cmp, 15535 rb_str_hash, 15536 }; 15537 15538 #if ENABLE_SELECTOR_NAMESPACE 15539 struct ivar2_key { 15540 ID id; 15541 VALUE klass; 15542 }; 15543 15544 static int 15545 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 15546 { 15547 if (key1->id == key2->id && key1->klass == key2->klass) { 15548 return 0; 15549 } 15550 return 1; 15551 } 15552 15553 static int 15554 ivar2_hash(struct ivar2_key *key) 15555 { 15556 return (key->id << 8) ^ (key->klass >> 2); 15557 } 15558 15559 static const struct st_hash_type ivar2_hash_type = { 15560 ivar2_cmp, 15561 ivar2_hash, 15562 }; 15563 #endif 15564 15565 void 15566 Init_sym(void) 15567 { 15568 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 15569 global_symbols.id_str = st_init_numtable_with_size(1000); 15570 #if ENABLE_SELECTOR_NAMESPACE 15571 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 15572 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 15573 #endif 15574 15575 (void)nodetype; 15576 (void)nodeline; 15577 #if PARSER_DEBUG 15578 (void)lex_state_name(-1); 15579 #endif 15580 15581 Init_id(); 15582 } 15583 15584 void 15585 rb_gc_mark_symbols(void) 15586 { 15587 rb_mark_tbl(global_symbols.id_str); 15588 rb_gc_mark_locations(global_symbols.op_sym, 15589 global_symbols.op_sym + numberof(global_symbols.op_sym)); 15590 } 15591 #endif /* !RIPPER */ 15592 15593 static ID 15594 internal_id_gen(struct parser_params *parser) 15595 { 15596 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 15597 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 15598 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 15599 } 15600 15601 #ifndef RIPPER 15602 static int 15603 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 15604 { 15605 int mb = 0; 15606 15607 if (m >= e) return 0; 15608 if (is_global_name_punct(*m)) { 15609 ++m; 15610 } 15611 else if (*m == '-') { 15612 ++m; 15613 if (m < e && is_identchar(m, e, enc)) { 15614 if (!ISASCII(*m)) mb = 1; 15615 m += rb_enc_mbclen(m, e, enc); 15616 } 15617 } 15618 else { 15619 if (!rb_enc_isdigit(*m, enc)) return 0; 15620 do { 15621 if (!ISASCII(*m)) mb = 1; 15622 ++m; 15623 } while (m < e && rb_enc_isdigit(*m, enc)); 15624 } 15625 return m == e ? mb + 1 : 0; 15626 } 15627 15628 int 15629 rb_symname_p(const char *name) 15630 { 15631 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 15632 } 15633 15634 int 15635 rb_enc_symname_p(const char *name, rb_encoding *enc) 15636 { 15637 return rb_enc_symname2_p(name, strlen(name), enc); 15638 } 15639 15640 static int 15641 rb_enc_symname_type(const char *name, long len, rb_encoding *enc) 15642 { 15643 const char *m = name; 15644 const char *e = m + len; 15645 int type = ID_JUNK; 15646 15647 if (!m || len <= 0) return -1; 15648 switch (*m) { 15649 case '\0': 15650 return -1; 15651 15652 case '$': 15653 type = ID_GLOBAL; 15654 if (is_special_global_name(++m, e, enc)) return type; 15655 goto id; 15656 15657 case '@': 15658 type = ID_INSTANCE; 15659 if (*++m == '@') { 15660 ++m; 15661 type = ID_CLASS; 15662 } 15663 goto id; 15664 15665 case '<': 15666 switch (*++m) { 15667 case '<': ++m; break; 15668 case '=': if (*++m == '>') ++m; break; 15669 default: break; 15670 } 15671 break; 15672 15673 case '>': 15674 switch (*++m) { 15675 case '>': case '=': ++m; break; 15676 } 15677 break; 15678 15679 case '=': 15680 switch (*++m) { 15681 case '~': ++m; break; 15682 case '=': if (*++m == '=') ++m; break; 15683 default: return -1; 15684 } 15685 break; 15686 15687 case '*': 15688 if (*++m == '*') ++m; 15689 break; 15690 15691 case '+': case '-': 15692 if (*++m == '@') ++m; 15693 break; 15694 15695 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 15696 ++m; 15697 break; 15698 15699 case '[': 15700 if (*++m != ']') return -1; 15701 if (*++m == '=') ++m; 15702 break; 15703 15704 case '!': 15705 if (len == 1) return ID_JUNK; 15706 switch (*++m) { 15707 case '=': case '~': ++m; break; 15708 default: return -1; 15709 } 15710 break; 15711 15712 default: 15713 type = rb_enc_isupper(*m, enc) ? ID_CONST : ID_LOCAL; 15714 id: 15715 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 15716 return -1; 15717 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 15718 switch (*m) { 15719 case '!': case '?': 15720 if (type == ID_GLOBAL || type == ID_CLASS || type == ID_INSTANCE) return -1; 15721 type = ID_JUNK; 15722 ++m; 15723 break; 15724 case '=': 15725 if (type != ID_CONST && type != ID_LOCAL) return -1; 15726 type = ID_ATTRSET; 15727 ++m; 15728 break; 15729 } 15730 break; 15731 } 15732 return m == e ? type : -1; 15733 } 15734 15735 int 15736 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 15737 { 15738 return rb_enc_symname_type(name, len, enc) != -1; 15739 } 15740 15741 static int 15742 rb_str_symname_type(VALUE name) 15743 { 15744 const char *ptr = StringValuePtr(name); 15745 long len = RSTRING_LEN(name); 15746 int type = rb_enc_symname_type(ptr, len, rb_enc_get(name)); 15747 RB_GC_GUARD(name); 15748 return type; 15749 } 15750 15751 static ID 15752 register_symid(ID id, const char *name, long len, rb_encoding *enc) 15753 { 15754 VALUE str = rb_enc_str_new(name, len, enc); 15755 return register_symid_str(id, str); 15756 } 15757 15758 static ID 15759 register_symid_str(ID id, VALUE str) 15760 { 15761 OBJ_FREEZE(str); 15762 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 15763 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 15764 return id; 15765 } 15766 15767 static int 15768 sym_check_asciionly(VALUE str) 15769 { 15770 if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE; 15771 switch (rb_enc_str_coderange(str)) { 15772 case ENC_CODERANGE_BROKEN: 15773 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 15774 case ENC_CODERANGE_7BIT: 15775 return TRUE; 15776 } 15777 return FALSE; 15778 } 15779 15780 /* 15781 * _str_ itself will be registered at the global symbol table. _str_ 15782 * can be modified before the registration, since the encoding will be 15783 * set to ASCII-8BIT if it is a special global name. 15784 */ 15785 static ID intern_str(VALUE str); 15786 15787 ID 15788 rb_intern3(const char *name, long len, rb_encoding *enc) 15789 { 15790 VALUE str; 15791 st_data_t data; 15792 struct RString fake_str; 15793 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 15794 fake_str.basic.klass = rb_cString; 15795 fake_str.as.heap.len = len; 15796 fake_str.as.heap.ptr = (char *)name; 15797 fake_str.as.heap.aux.capa = len; 15798 str = (VALUE)&fake_str; 15799 rb_enc_associate(str, enc); 15800 OBJ_FREEZE(str); 15801 15802 if (st_lookup(global_symbols.sym_id, str, &data)) 15803 return (ID)data; 15804 15805 str = rb_enc_str_new(name, len, enc); /* make true string */ 15806 return intern_str(str); 15807 } 15808 15809 static ID 15810 intern_str(VALUE str) 15811 { 15812 const char *name, *m, *e; 15813 long len, last; 15814 rb_encoding *enc, *symenc; 15815 unsigned char c; 15816 ID id; 15817 int mb; 15818 15819 RSTRING_GETMEM(str, name, len); 15820 m = name; 15821 e = m + len; 15822 enc = rb_enc_get(str); 15823 symenc = enc; 15824 15825 if (rb_cString && !rb_enc_asciicompat(enc)) { 15826 id = ID_JUNK; 15827 goto new_id; 15828 } 15829 last = len-1; 15830 id = 0; 15831 switch (*m) { 15832 case '$': 15833 id |= ID_GLOBAL; 15834 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 15835 if (!--mb) symenc = rb_usascii_encoding(); 15836 goto new_id; 15837 } 15838 break; 15839 case '@': 15840 if (m[1] == '@') { 15841 m++; 15842 id |= ID_CLASS; 15843 } 15844 else { 15845 id |= ID_INSTANCE; 15846 } 15847 m++; 15848 break; 15849 default: 15850 c = m[0]; 15851 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 15852 /* operators */ 15853 int i; 15854 15855 if (len == 1) { 15856 id = c; 15857 goto id_register; 15858 } 15859 for (i = 0; i < op_tbl_count; i++) { 15860 if (*op_tbl[i].name == *m && 15861 strcmp(op_tbl[i].name, m) == 0) { 15862 id = op_tbl[i].token; 15863 goto id_register; 15864 } 15865 } 15866 } 15867 15868 if (m[last] == '=') { 15869 /* attribute assignment */ 15870 id = rb_intern3(name, last, enc); 15871 if (id > tLAST_OP_ID && !is_attrset_id(id)) { 15872 enc = rb_enc_get(rb_id2str(id)); 15873 id = rb_id_attrset(id); 15874 goto id_register; 15875 } 15876 id = ID_ATTRSET; 15877 } 15878 else if (rb_enc_isupper(m[0], enc)) { 15879 id = ID_CONST; 15880 } 15881 else { 15882 id = ID_LOCAL; 15883 } 15884 break; 15885 } 15886 if (!rb_enc_isdigit(*m, enc)) { 15887 while (m <= name + last && is_identchar(m, e, enc)) { 15888 if (ISASCII(*m)) { 15889 m++; 15890 } 15891 else { 15892 m += rb_enc_mbclen(m, e, enc); 15893 } 15894 } 15895 } 15896 if (m - name < len) id = ID_JUNK; 15897 if (sym_check_asciionly(str)) symenc = rb_usascii_encoding(); 15898 new_id: 15899 if (symenc != enc) rb_enc_associate(str, symenc); 15900 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 15901 if (len > 20) { 15902 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 15903 name); 15904 } 15905 else { 15906 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 15907 (int)len, name); 15908 } 15909 } 15910 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 15911 id_register: 15912 return register_symid_str(id, str); 15913 } 15914 15915 ID 15916 rb_intern2(const char *name, long len) 15917 { 15918 return rb_intern3(name, len, rb_usascii_encoding()); 15919 } 15920 15921 #undef rb_intern 15922 ID 15923 rb_intern(const char *name) 15924 { 15925 return rb_intern2(name, strlen(name)); 15926 } 15927 15928 ID 15929 rb_intern_str(VALUE str) 15930 { 15931 st_data_t id; 15932 15933 if (st_lookup(global_symbols.sym_id, str, &id)) 15934 return (ID)id; 15935 return intern_str(rb_str_dup(str)); 15936 } 15937 15938 VALUE 15939 rb_id2str(ID id) 15940 { 15941 st_data_t data; 15942 15943 if (id < tLAST_TOKEN) { 15944 int i = 0; 15945 15946 if (id < INT_MAX && rb_ispunct((int)id)) { 15947 VALUE str = global_symbols.op_sym[i = (int)id]; 15948 if (!str) { 15949 char name[2]; 15950 name[0] = (char)id; 15951 name[1] = 0; 15952 str = rb_usascii_str_new(name, 1); 15953 OBJ_FREEZE(str); 15954 global_symbols.op_sym[i] = str; 15955 } 15956 return str; 15957 } 15958 for (i = 0; i < op_tbl_count; i++) { 15959 if (op_tbl[i].token == id) { 15960 VALUE str = global_symbols.op_sym[i]; 15961 if (!str) { 15962 str = rb_usascii_str_new2(op_tbl[i].name); 15963 OBJ_FREEZE(str); 15964 global_symbols.op_sym[i] = str; 15965 } 15966 return str; 15967 } 15968 } 15969 } 15970 15971 if (st_lookup(global_symbols.id_str, id, &data)) { 15972 VALUE str = (VALUE)data; 15973 if (RBASIC(str)->klass == 0) 15974 RBASIC(str)->klass = rb_cString; 15975 return str; 15976 } 15977 15978 if (is_attrset_id(id)) { 15979 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 15980 VALUE str; 15981 15982 while (!(str = rb_id2str(id2))) { 15983 if (!is_local_id(id2)) return 0; 15984 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 15985 } 15986 str = rb_str_dup(str); 15987 rb_str_cat(str, "=", 1); 15988 rb_intern_str(str); 15989 if (st_lookup(global_symbols.id_str, id, &data)) { 15990 VALUE str = (VALUE)data; 15991 if (RBASIC(str)->klass == 0) 15992 RBASIC(str)->klass = rb_cString; 15993 return str; 15994 } 15995 } 15996 return 0; 15997 } 15998 15999 const char * 16000 rb_id2name(ID id) 16001 { 16002 VALUE str = rb_id2str(id); 16003 16004 if (!str) return 0; 16005 return RSTRING_PTR(str); 16006 } 16007 16008 static int 16009 symbols_i(VALUE sym, ID value, VALUE ary) 16010 { 16011 rb_ary_push(ary, ID2SYM(value)); 16012 return ST_CONTINUE; 16013 } 16014 16015 /* 16016 * call-seq: 16017 * Symbol.all_symbols => array 16018 * 16019 * Returns an array of all the symbols currently in Ruby's symbol 16020 * table. 16021 * 16022 * Symbol.all_symbols.size #=> 903 16023 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 16024 * :chown, :EOFError, :$;, :String, 16025 * :LOCK_SH, :"setuid?", :$<, 16026 * :default_proc, :compact, :extend, 16027 * :Tms, :getwd, :$=, :ThreadGroup, 16028 * :wait2, :$>] 16029 */ 16030 16031 VALUE 16032 rb_sym_all_symbols(void) 16033 { 16034 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 16035 16036 st_foreach(global_symbols.sym_id, symbols_i, ary); 16037 return ary; 16038 } 16039 16040 int 16041 rb_is_const_id(ID id) 16042 { 16043 return is_const_id(id); 16044 } 16045 16046 int 16047 rb_is_class_id(ID id) 16048 { 16049 return is_class_id(id); 16050 } 16051 16052 int 16053 rb_is_global_id(ID id) 16054 { 16055 return is_global_id(id); 16056 } 16057 16058 int 16059 rb_is_instance_id(ID id) 16060 { 16061 return is_instance_id(id); 16062 } 16063 16064 int 16065 rb_is_attrset_id(ID id) 16066 { 16067 return is_attrset_id(id); 16068 } 16069 16070 int 16071 rb_is_local_id(ID id) 16072 { 16073 return is_local_id(id); 16074 } 16075 16076 int 16077 rb_is_junk_id(ID id) 16078 { 16079 return is_junk_id(id); 16080 } 16081 16093 ID 16094 rb_check_id(volatile VALUE *namep) 16095 { 16096 st_data_t id; 16097 VALUE tmp; 16098 VALUE name = *namep; 16099 16100 if (SYMBOL_P(name)) { 16101 return SYM2ID(name); 16102 } 16103 else if (!RB_TYPE_P(name, T_STRING)) { 16104 tmp = rb_check_string_type(name); 16105 if (NIL_P(tmp)) { 16106 tmp = rb_inspect(name); 16107 rb_raise(rb_eTypeError, "%s is not a symbol", 16108 RSTRING_PTR(tmp)); 16109 } 16110 name = tmp; 16111 *namep = name; 16112 } 16113 16114 sym_check_asciionly(name); 16115 16116 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 16117 return (ID)id; 16118 16119 if (rb_is_attrset_name(name)) { 16120 struct RString fake_str; 16121 const VALUE localname = (VALUE)&fake_str; 16122 /* make local name by chopping '=' */ 16123 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16124 fake_str.basic.klass = rb_cString; 16125 fake_str.as.heap.len = RSTRING_LEN(name) - 1; 16126 fake_str.as.heap.ptr = RSTRING_PTR(name); 16127 fake_str.as.heap.aux.capa = fake_str.as.heap.len; 16128 rb_enc_copy(localname, name); 16129 OBJ_FREEZE(localname); 16130 16131 if (st_lookup(global_symbols.sym_id, (st_data_t)localname, &id)) { 16132 return rb_id_attrset((ID)id); 16133 } 16134 RB_GC_GUARD(name); 16135 } 16136 16137 return (ID)0; 16138 } 16139 16140 ID 16141 rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc) 16142 { 16143 st_data_t id; 16144 struct RString fake_str; 16145 const VALUE name = (VALUE)&fake_str; 16146 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16147 fake_str.basic.klass = rb_cString; 16148 fake_str.as.heap.len = len; 16149 fake_str.as.heap.ptr = (char *)ptr; 16150 fake_str.as.heap.aux.capa = len; 16151 rb_enc_associate(name, enc); 16152 16153 sym_check_asciionly(name); 16154 16155 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 16156 return (ID)id; 16157 16158 if (rb_is_attrset_name(name)) { 16159 fake_str.as.heap.len = len - 1; 16160 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) { 16161 return rb_id_attrset((ID)id); 16162 } 16163 } 16164 16165 return (ID)0; 16166 } 16167 16168 int 16169 rb_is_const_name(VALUE name) 16170 { 16171 return rb_str_symname_type(name) == ID_CONST; 16172 } 16173 16174 int 16175 rb_is_class_name(VALUE name) 16176 { 16177 return rb_str_symname_type(name) == ID_CLASS; 16178 } 16179 16180 int 16181 rb_is_global_name(VALUE name) 16182 { 16183 return rb_str_symname_type(name) == ID_GLOBAL; 16184 } 16185 16186 int 16187 rb_is_instance_name(VALUE name) 16188 { 16189 return rb_str_symname_type(name) == ID_INSTANCE; 16190 } 16191 16192 int 16193 rb_is_attrset_name(VALUE name) 16194 { 16195 return rb_str_symname_type(name) == ID_ATTRSET; 16196 } 16197 16198 int 16199 rb_is_local_name(VALUE name) 16200 { 16201 return rb_str_symname_type(name) == ID_LOCAL; 16202 } 16203 16204 int 16205 rb_is_method_name(VALUE name) 16206 { 16207 switch (rb_str_symname_type(name)) { 16208 case ID_LOCAL: case ID_ATTRSET: case ID_JUNK: 16209 return TRUE; 16210 } 16211 return FALSE; 16212 } 16213 16214 int 16215 rb_is_junk_name(VALUE name) 16216 { 16217 return rb_str_symname_type(name) == -1; 16218 } 16219 16220 #endif /* !RIPPER */ 16221 16222 static void 16223 parser_initialize(struct parser_params *parser) 16224 { 16225 parser->eofp = Qfalse; 16226 16227 parser->parser_lex_strterm = 0; 16228 parser->parser_cond_stack = 0; 16229 parser->parser_cmdarg_stack = 0; 16230 parser->parser_class_nest = 0; 16231 parser->parser_paren_nest = 0; 16232 parser->parser_lpar_beg = 0; 16233 parser->parser_brace_nest = 0; 16234 parser->parser_in_single = 0; 16235 parser->parser_in_def = 0; 16236 parser->parser_in_defined = 0; 16237 parser->parser_compile_for_eval = 0; 16238 parser->parser_cur_mid = 0; 16239 parser->parser_tokenbuf = NULL; 16240 parser->parser_tokidx = 0; 16241 parser->parser_toksiz = 0; 16242 parser->parser_heredoc_end = 0; 16243 parser->parser_command_start = TRUE; 16244 parser->parser_deferred_nodes = 0; 16245 parser->parser_lex_pbeg = 0; 16246 parser->parser_lex_p = 0; 16247 parser->parser_lex_pend = 0; 16248 parser->parser_lvtbl = 0; 16249 parser->parser_ruby__end__seen = 0; 16250 parser->parser_ruby_sourcefile = 0; 16251 #ifndef RIPPER 16252 parser->is_ripper = 0; 16253 parser->parser_eval_tree_begin = 0; 16254 parser->parser_eval_tree = 0; 16255 #else 16256 parser->is_ripper = 1; 16257 parser->parser_ruby_sourcefile_string = Qnil; 16258 parser->delayed = Qnil; 16259 16260 parser->result = Qnil; 16261 parser->parsing_thread = Qnil; 16262 parser->toplevel_p = TRUE; 16263 #endif 16264 #ifdef YYMALLOC 16265 parser->heap = NULL; 16266 #endif 16267 parser->enc = rb_utf8_encoding(); 16268 } 16269 16270 #ifdef RIPPER 16271 #define parser_mark ripper_parser_mark 16272 #define parser_free ripper_parser_free 16273 #endif 16274 16275 static void 16276 parser_mark(void *ptr) 16277 { 16278 struct parser_params *p = (struct parser_params*)ptr; 16279 16280 rb_gc_mark((VALUE)p->parser_lex_strterm); 16281 rb_gc_mark((VALUE)p->parser_deferred_nodes); 16282 rb_gc_mark(p->parser_lex_input); 16283 rb_gc_mark(p->parser_lex_lastline); 16284 rb_gc_mark(p->parser_lex_nextline); 16285 #ifndef RIPPER 16286 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 16287 rb_gc_mark((VALUE)p->parser_eval_tree) ; 16288 rb_gc_mark(p->debug_lines); 16289 #else 16290 rb_gc_mark(p->parser_ruby_sourcefile_string); 16291 rb_gc_mark(p->delayed); 16292 rb_gc_mark(p->value); 16293 rb_gc_mark(p->result); 16294 rb_gc_mark(p->parsing_thread); 16295 #endif 16296 #ifdef YYMALLOC 16297 rb_gc_mark((VALUE)p->heap); 16298 #endif 16299 } 16300 16301 static void 16302 parser_free(void *ptr) 16303 { 16304 struct parser_params *p = (struct parser_params*)ptr; 16305 struct local_vars *local, *prev; 16306 16307 if (p->parser_tokenbuf) { 16308 xfree(p->parser_tokenbuf); 16309 } 16310 for (local = p->parser_lvtbl; local; local = prev) { 16311 if (local->vars) xfree(local->vars); 16312 prev = local->prev; 16313 xfree(local); 16314 } 16315 #ifndef RIPPER 16316 xfree(p->parser_ruby_sourcefile); 16317 #endif 16318 xfree(p); 16319 } 16320 16321 static size_t 16322 parser_memsize(const void *ptr) 16323 { 16324 struct parser_params *p = (struct parser_params*)ptr; 16325 struct local_vars *local; 16326 size_t size = sizeof(*p); 16327 16328 if (!ptr) return 0; 16329 size += p->parser_toksiz; 16330 for (local = p->parser_lvtbl; local; local = local->prev) { 16331 size += sizeof(*local); 16332 if (local->vars) size += local->vars->capa * sizeof(ID); 16333 } 16334 #ifndef RIPPER 16335 if (p->parser_ruby_sourcefile) { 16336 size += strlen(p->parser_ruby_sourcefile) + 1; 16337 } 16338 #endif 16339 return size; 16340 } 16341 16342 static 16343 #ifndef RIPPER 16344 const 16345 #endif 16346 rb_data_type_t parser_data_type = { 16347 "parser", 16348 { 16349 parser_mark, 16350 parser_free, 16351 parser_memsize, 16352 }, 16353 }; 16354 16355 #ifndef RIPPER 16356 #undef rb_reserved_word 16357 16358 const struct kwtable * 16359 rb_reserved_word(const char *str, unsigned int len) 16360 { 16361 return reserved_word(str, len); 16362 } 16363 16364 static struct parser_params * 16365 parser_new(void) 16366 { 16367 struct parser_params *p; 16368 16369 p = ALLOC_N(struct parser_params, 1); 16370 MEMZERO(p, struct parser_params, 1); 16371 parser_initialize(p); 16372 return p; 16373 } 16374 16375 VALUE 16376 rb_parser_new(void) 16377 { 16378 struct parser_params *p = parser_new(); 16379 16380 return TypedData_Wrap_Struct(0, &parser_data_type, p); 16381 } 16382 16383 /* 16384 * call-seq: 16385 * ripper#end_seen? -> Boolean 16386 * 16387 * Return true if parsed source ended by +\_\_END\_\_+. 16388 */ 16389 VALUE 16390 rb_parser_end_seen_p(VALUE vparser) 16391 { 16392 struct parser_params *parser; 16393 16394 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16395 return ruby__end__seen ? Qtrue : Qfalse; 16396 } 16397 16398 /* 16399 * call-seq: 16400 * ripper#encoding -> encoding 16401 * 16402 * Return encoding of the source. 16403 */ 16404 VALUE 16405 rb_parser_encoding(VALUE vparser) 16406 { 16407 struct parser_params *parser; 16408 16409 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16410 return rb_enc_from_encoding(current_enc); 16411 } 16412 16413 /* 16414 * call-seq: 16415 * ripper.yydebug -> true or false 16416 * 16417 * Get yydebug. 16418 */ 16419 VALUE 16420 rb_parser_get_yydebug(VALUE self) 16421 { 16422 struct parser_params *parser; 16423 16424 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16425 return yydebug ? Qtrue : Qfalse; 16426 } 16427 16428 /* 16429 * call-seq: 16430 * ripper.yydebug = flag 16431 * 16432 * Set yydebug. 16433 */ 16434 VALUE 16435 rb_parser_set_yydebug(VALUE self, VALUE flag) 16436 { 16437 struct parser_params *parser; 16438 16439 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16440 yydebug = RTEST(flag); 16441 return flag; 16442 } 16443 16444 #ifdef YYMALLOC 16445 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 16446 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 16447 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 16448 (n)->u3.cnt = (c), (p)) 16449 16450 void * 16451 rb_parser_malloc(struct parser_params *parser, size_t size) 16452 { 16453 size_t cnt = HEAPCNT(1, size); 16454 NODE *n = NEWHEAP(); 16455 void *ptr = xmalloc(size); 16456 16457 return ADD2HEAP(n, cnt, ptr); 16458 } 16459 16460 void * 16461 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 16462 { 16463 size_t cnt = HEAPCNT(nelem, size); 16464 NODE *n = NEWHEAP(); 16465 void *ptr = xcalloc(nelem, size); 16466 16467 return ADD2HEAP(n, cnt, ptr); 16468 } 16469 16470 void * 16471 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 16472 { 16473 NODE *n; 16474 size_t cnt = HEAPCNT(1, size); 16475 16476 if (ptr && (n = parser->heap) != NULL) { 16477 do { 16478 if (n->u1.node == ptr) { 16479 n->u1.node = ptr = xrealloc(ptr, size); 16480 if (n->u3.cnt) n->u3.cnt = cnt; 16481 return ptr; 16482 } 16483 } while ((n = n->u2.node) != NULL); 16484 } 16485 n = NEWHEAP(); 16486 ptr = xrealloc(ptr, size); 16487 return ADD2HEAP(n, cnt, ptr); 16488 } 16489 16490 void 16491 rb_parser_free(struct parser_params *parser, void *ptr) 16492 { 16493 NODE **prev = &parser->heap, *n; 16494 16495 while ((n = *prev) != NULL) { 16496 if (n->u1.node == ptr) { 16497 *prev = n->u2.node; 16498 rb_gc_force_recycle((VALUE)n); 16499 break; 16500 } 16501 prev = &n->u2.node; 16502 } 16503 xfree(ptr); 16504 } 16505 #endif 16506 #endif 16507 16508 #ifdef RIPPER 16509 #ifdef RIPPER_DEBUG 16510 extern int rb_is_pointer_to_heap(VALUE); 16511 16512 /* :nodoc: */ 16513 static VALUE 16514 ripper_validate_object(VALUE self, VALUE x) 16515 { 16516 if (x == Qfalse) return x; 16517 if (x == Qtrue) return x; 16518 if (x == Qnil) return x; 16519 if (x == Qundef) 16520 rb_raise(rb_eArgError, "Qundef given"); 16521 if (FIXNUM_P(x)) return x; 16522 if (SYMBOL_P(x)) return x; 16523 if (!rb_is_pointer_to_heap(x)) 16524 rb_raise(rb_eArgError, "invalid pointer: %p", x); 16525 switch (TYPE(x)) { 16526 case T_STRING: 16527 case T_OBJECT: 16528 case T_ARRAY: 16529 case T_BIGNUM: 16530 case T_FLOAT: 16531 return x; 16532 case T_NODE: 16533 if (nd_type(x) != NODE_LASGN) { 16534 rb_raise(rb_eArgError, "NODE given: %p", x); 16535 } 16536 return ((NODE *)x)->nd_rval; 16537 default: 16538 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 16539 x, rb_obj_classname(x)); 16540 } 16541 return x; 16542 } 16543 #endif 16544 16545 #define validate(x) ((x) = get_value(x)) 16546 16547 static VALUE 16548 ripper_dispatch0(struct parser_params *parser, ID mid) 16549 { 16550 return rb_funcall(parser->value, mid, 0); 16551 } 16552 16553 static VALUE 16554 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 16555 { 16556 validate(a); 16557 return rb_funcall(parser->value, mid, 1, a); 16558 } 16559 16560 static VALUE 16561 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 16562 { 16563 validate(a); 16564 validate(b); 16565 return rb_funcall(parser->value, mid, 2, a, b); 16566 } 16567 16568 static VALUE 16569 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 16570 { 16571 validate(a); 16572 validate(b); 16573 validate(c); 16574 return rb_funcall(parser->value, mid, 3, a, b, c); 16575 } 16576 16577 static VALUE 16578 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 16579 { 16580 validate(a); 16581 validate(b); 16582 validate(c); 16583 validate(d); 16584 return rb_funcall(parser->value, mid, 4, a, b, c, d); 16585 } 16586 16587 static VALUE 16588 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 16589 { 16590 validate(a); 16591 validate(b); 16592 validate(c); 16593 validate(d); 16594 validate(e); 16595 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 16596 } 16597 16598 static VALUE 16599 ripper_dispatch7(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g) 16600 { 16601 validate(a); 16602 validate(b); 16603 validate(c); 16604 validate(d); 16605 validate(e); 16606 validate(f); 16607 validate(g); 16608 return rb_funcall(parser->value, mid, 7, a, b, c, d, e, f, g); 16609 } 16610 16611 static const struct kw_assoc { 16612 ID id; 16613 const char *name; 16614 } keyword_to_name[] = { 16615 {keyword_class, "class"}, 16616 {keyword_module, "module"}, 16617 {keyword_def, "def"}, 16618 {keyword_undef, "undef"}, 16619 {keyword_begin, "begin"}, 16620 {keyword_rescue, "rescue"}, 16621 {keyword_ensure, "ensure"}, 16622 {keyword_end, "end"}, 16623 {keyword_if, "if"}, 16624 {keyword_unless, "unless"}, 16625 {keyword_then, "then"}, 16626 {keyword_elsif, "elsif"}, 16627 {keyword_else, "else"}, 16628 {keyword_case, "case"}, 16629 {keyword_when, "when"}, 16630 {keyword_while, "while"}, 16631 {keyword_until, "until"}, 16632 {keyword_for, "for"}, 16633 {keyword_break, "break"}, 16634 {keyword_next, "next"}, 16635 {keyword_redo, "redo"}, 16636 {keyword_retry, "retry"}, 16637 {keyword_in, "in"}, 16638 {keyword_do, "do"}, 16639 {keyword_do_cond, "do"}, 16640 {keyword_do_block, "do"}, 16641 {keyword_return, "return"}, 16642 {keyword_yield, "yield"}, 16643 {keyword_super, "super"}, 16644 {keyword_self, "self"}, 16645 {keyword_nil, "nil"}, 16646 {keyword_true, "true"}, 16647 {keyword_false, "false"}, 16648 {keyword_and, "and"}, 16649 {keyword_or, "or"}, 16650 {keyword_not, "not"}, 16651 {modifier_if, "if"}, 16652 {modifier_unless, "unless"}, 16653 {modifier_while, "while"}, 16654 {modifier_until, "until"}, 16655 {modifier_rescue, "rescue"}, 16656 {keyword_alias, "alias"}, 16657 {keyword_defined, "defined?"}, 16658 {keyword_BEGIN, "BEGIN"}, 16659 {keyword_END, "END"}, 16660 {keyword__LINE__, "__LINE__"}, 16661 {keyword__FILE__, "__FILE__"}, 16662 {keyword__ENCODING__, "__ENCODING__"}, 16663 {0, NULL} 16664 }; 16665 16666 static const char* 16667 keyword_id_to_str(ID id) 16668 { 16669 const struct kw_assoc *a; 16670 16671 for (a = keyword_to_name; a->id; a++) { 16672 if (a->id == id) 16673 return a->name; 16674 } 16675 return NULL; 16676 } 16677 16678 #undef ripper_id2sym 16679 static VALUE 16680 ripper_id2sym(ID id) 16681 { 16682 const char *name; 16683 char buf[8]; 16684 16685 if (id <= 256) { 16686 buf[0] = (char)id; 16687 buf[1] = '\0'; 16688 return ID2SYM(rb_intern2(buf, 1)); 16689 } 16690 if ((name = keyword_id_to_str(id))) { 16691 return ID2SYM(rb_intern(name)); 16692 } 16693 switch (id) { 16694 case tOROP: 16695 name = "||"; 16696 break; 16697 case tANDOP: 16698 name = "&&"; 16699 break; 16700 default: 16701 name = rb_id2name(id); 16702 if (!name) { 16703 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 16704 } 16705 return ID2SYM(id); 16706 } 16707 return ID2SYM(rb_intern(name)); 16708 } 16709 16710 static ID 16711 ripper_get_id(VALUE v) 16712 { 16713 NODE *nd; 16714 if (!RB_TYPE_P(v, T_NODE)) return 0; 16715 nd = (NODE *)v; 16716 if (nd_type(nd) != NODE_LASGN) return 0; 16717 return nd->nd_vid; 16718 } 16719 16720 static VALUE 16721 ripper_get_value(VALUE v) 16722 { 16723 NODE *nd; 16724 if (v == Qundef) return Qnil; 16725 if (!RB_TYPE_P(v, T_NODE)) return v; 16726 nd = (NODE *)v; 16727 if (nd_type(nd) != NODE_LASGN) return Qnil; 16728 return nd->nd_rval; 16729 } 16730 16731 static void 16732 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 16733 { 16734 VALUE str; 16735 va_list args; 16736 16737 va_start(args, fmt); 16738 str = rb_vsprintf(fmt, args); 16739 va_end(args); 16740 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 16741 } 16742 16743 static void 16744 ripper_warn0(struct parser_params *parser, const char *fmt) 16745 { 16746 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 16747 } 16748 16749 static void 16750 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 16751 { 16752 rb_funcall(parser->value, rb_intern("warn"), 2, 16753 STR_NEW2(fmt), INT2NUM(a)); 16754 } 16755 16756 static void 16757 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 16758 { 16759 rb_funcall(parser->value, rb_intern("warn"), 2, 16760 STR_NEW2(fmt), STR_NEW2(str)); 16761 } 16762 16763 static void 16764 ripper_warning0(struct parser_params *parser, const char *fmt) 16765 { 16766 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 16767 } 16768 16769 static void 16770 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 16771 { 16772 rb_funcall(parser->value, rb_intern("warning"), 2, 16773 STR_NEW2(fmt), STR_NEW2(str)); 16774 } 16775 16776 static VALUE 16777 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 16778 { 16779 return rb_io_gets(src); 16780 } 16781 16782 static VALUE 16783 ripper_s_allocate(VALUE klass) 16784 { 16785 struct parser_params *p; 16786 VALUE self; 16787 16788 p = ALLOC_N(struct parser_params, 1); 16789 MEMZERO(p, struct parser_params, 1); 16790 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 16791 p->value = self; 16792 return self; 16793 } 16794 16795 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 16796 16797 /* 16798 * call-seq: 16799 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 16800 * 16801 * Create a new Ripper object. 16802 * _src_ must be a String, an IO, or an Object which has #gets method. 16803 * 16804 * This method does not starts parsing. 16805 * See also Ripper#parse and Ripper.parse. 16806 */ 16807 static VALUE 16808 ripper_initialize(int argc, VALUE *argv, VALUE self) 16809 { 16810 struct parser_params *parser; 16811 VALUE src, fname, lineno; 16812 16813 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16814 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 16815 if (RB_TYPE_P(src, T_FILE)) { 16816 parser->parser_lex_gets = ripper_lex_get_generic; 16817 } 16818 else { 16819 StringValue(src); 16820 parser->parser_lex_gets = lex_get_str; 16821 } 16822 parser->parser_lex_input = src; 16823 parser->eofp = Qfalse; 16824 if (NIL_P(fname)) { 16825 fname = STR_NEW2("(ripper)"); 16826 } 16827 else { 16828 StringValue(fname); 16829 } 16830 parser_initialize(parser); 16831 16832 parser->parser_ruby_sourcefile_string = fname; 16833 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 16834 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 16835 16836 return Qnil; 16837 } 16838 16839 struct ripper_args { 16840 struct parser_params *parser; 16841 int argc; 16842 VALUE *argv; 16843 }; 16844 16845 static VALUE 16846 ripper_parse0(VALUE parser_v) 16847 { 16848 struct parser_params *parser; 16849 16850 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16851 parser_prepare(parser); 16852 ripper_yyparse((void*)parser); 16853 return parser->result; 16854 } 16855 16856 static VALUE 16857 ripper_ensure(VALUE parser_v) 16858 { 16859 struct parser_params *parser; 16860 16861 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16862 parser->parsing_thread = Qnil; 16863 return Qnil; 16864 } 16865 16866 /* 16867 * call-seq: 16868 * ripper#parse 16869 * 16870 * Start parsing and returns the value of the root action. 16871 */ 16872 static VALUE 16873 ripper_parse(VALUE self) 16874 { 16875 struct parser_params *parser; 16876 16877 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16878 if (!ripper_initialized_p(parser)) { 16879 rb_raise(rb_eArgError, "method called for uninitialized object"); 16880 } 16881 if (!NIL_P(parser->parsing_thread)) { 16882 if (parser->parsing_thread == rb_thread_current()) 16883 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 16884 else 16885 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 16886 } 16887 parser->parsing_thread = rb_thread_current(); 16888 rb_ensure(ripper_parse0, self, ripper_ensure, self); 16889 16890 return parser->result; 16891 } 16892 16893 /* 16894 * call-seq: 16895 * ripper#column -> Integer 16896 * 16897 * Return column number of current parsing line. 16898 * This number starts from 0. 16899 */ 16900 static VALUE 16901 ripper_column(VALUE self) 16902 { 16903 struct parser_params *parser; 16904 long col; 16905 16906 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16907 if (!ripper_initialized_p(parser)) { 16908 rb_raise(rb_eArgError, "method called for uninitialized object"); 16909 } 16910 if (NIL_P(parser->parsing_thread)) return Qnil; 16911 col = parser->tokp - parser->parser_lex_pbeg; 16912 return LONG2NUM(col); 16913 } 16914 16915 /* 16916 * call-seq: 16917 * ripper#filename -> String 16918 * 16919 * Return current parsing filename. 16920 */ 16921 static VALUE 16922 ripper_filename(VALUE self) 16923 { 16924 struct parser_params *parser; 16925 16926 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16927 if (!ripper_initialized_p(parser)) { 16928 rb_raise(rb_eArgError, "method called for uninitialized object"); 16929 } 16930 return parser->parser_ruby_sourcefile_string; 16931 } 16932 16933 /* 16934 * call-seq: 16935 * ripper#lineno -> Integer 16936 * 16937 * Return line number of current parsing line. 16938 * This number starts from 1. 16939 */ 16940 static VALUE 16941 ripper_lineno(VALUE self) 16942 { 16943 struct parser_params *parser; 16944 16945 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16946 if (!ripper_initialized_p(parser)) { 16947 rb_raise(rb_eArgError, "method called for uninitialized object"); 16948 } 16949 if (NIL_P(parser->parsing_thread)) return Qnil; 16950 return INT2NUM(parser->parser_ruby_sourceline); 16951 } 16952 16953 #ifdef RIPPER_DEBUG 16954 /* :nodoc: */ 16955 static VALUE 16956 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 16957 { 16958 StringValue(msg); 16959 if (obj == Qundef) { 16960 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 16961 } 16962 return Qnil; 16963 } 16964 16965 /* :nodoc: */ 16966 static VALUE 16967 ripper_value(VALUE self, VALUE obj) 16968 { 16969 return ULONG2NUM(obj); 16970 } 16971 #endif 16972 16973 16974 void 16975 Init_ripper(void) 16976 { 16977 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 16978 16979 ripper_init_eventids1(); 16980 ripper_init_eventids2(); 16981 /* ensure existing in symbol table */ 16982 (void)rb_intern("||"); 16983 (void)rb_intern("&&"); 16984 16985 InitVM(ripper); 16986 } 16987 16988 void 16989 InitVM_ripper(void) 16990 { 16991 VALUE Ripper; 16992 16993 Ripper = rb_define_class("Ripper", rb_cObject); 16994 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 16995 rb_define_alloc_func(Ripper, ripper_s_allocate); 16996 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 16997 rb_define_method(Ripper, "parse", ripper_parse, 0); 16998 rb_define_method(Ripper, "column", ripper_column, 0); 16999 rb_define_method(Ripper, "filename", ripper_filename, 0); 17000 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 17001 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 17002 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 17003 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 17004 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 17005 #ifdef RIPPER_DEBUG 17006 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 17007 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 17008 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 17009 #endif 17010 17011 ripper_init_eventids1_table(Ripper); 17012 ripper_init_eventids2_table(Ripper); 17013 17014 # if 0 17015 /* Hack to let RDoc document SCRIPT_LINES__ */ 17016 17017 /* 17018 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 17019 * after the assignment will be added as an Array of lines with the file 17020 * name as the key. 17021 */ 17022 rb_define_global_const("SCRIPT_LINES__", Qnil); 17023 #endif 17024 17025 } 17026 #endif /* RIPPER */ 17027 17028