Ruby 1.9.3p327(2012-11-10revision37606)
|
00001 /* A Bison parser, made by GNU Bison 2.3. */ 00002 00003 /* Skeleton implementation for Bison's Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00006 Free Software Foundation, Inc. 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2, or (at your option) 00011 any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. */ 00022 00023 /* As a special exception, you may create a larger work that contains 00024 part or all of the Bison parser skeleton and distribute that work 00025 under terms of your choice, so long as that work isn't itself a 00026 parser generator using the skeleton or a modified version thereof 00027 as a parser skeleton. Alternatively, if you modify or redistribute 00028 the parser skeleton itself, you may (at your option) remove this 00029 special exception, which will cause the skeleton and the resulting 00030 Bison output files to be licensed under the GNU General Public 00031 License without this special exception. 00032 00033 This special exception was added by the Free Software Foundation in 00034 version 2.2 of Bison. */ 00035 00036 /* C LALR(1) parser skeleton written by Richard Stallman, by 00037 simplifying the original so-called "semantic" parser. */ 00038 00039 /* All symbols defined below should begin with yy or YY, to avoid 00040 infringing on user name space. This should be done even for local 00041 variables, as they might otherwise be expanded by user macros. 00042 There are some unavoidable exceptions within include files to 00043 define necessary library symbols; they are noted "INFRINGES ON 00044 USER NAME SPACE" below. */ 00045 00046 /* Identify Bison output. */ 00047 #define YYBISON 1 00048 00049 /* Bison version. */ 00050 #define YYBISON_VERSION "2.3" 00051 00052 /* Skeleton name. */ 00053 #define YYSKELETON_NAME "yacc.c" 00054 00055 /* Pure parsers. */ 00056 #define YYPURE 1 00057 00058 /* Using locations. */ 00059 #define YYLSP_NEEDED 0 00060 00061 00062 00063 /* Tokens. */ 00064 #ifndef YYTOKENTYPE 00065 # define YYTOKENTYPE 00066 /* Put the tokens into the symbol table, so that GDB and other debuggers 00067 know about them. */ 00068 enum yytokentype { 00069 keyword_class = 258, 00070 keyword_module = 259, 00071 keyword_def = 260, 00072 keyword_undef = 261, 00073 keyword_begin = 262, 00074 keyword_rescue = 263, 00075 keyword_ensure = 264, 00076 keyword_end = 265, 00077 keyword_if = 266, 00078 keyword_unless = 267, 00079 keyword_then = 268, 00080 keyword_elsif = 269, 00081 keyword_else = 270, 00082 keyword_case = 271, 00083 keyword_when = 272, 00084 keyword_while = 273, 00085 keyword_until = 274, 00086 keyword_for = 275, 00087 keyword_break = 276, 00088 keyword_next = 277, 00089 keyword_redo = 278, 00090 keyword_retry = 279, 00091 keyword_in = 280, 00092 keyword_do = 281, 00093 keyword_do_cond = 282, 00094 keyword_do_block = 283, 00095 keyword_do_LAMBDA = 284, 00096 keyword_return = 285, 00097 keyword_yield = 286, 00098 keyword_super = 287, 00099 keyword_self = 288, 00100 keyword_nil = 289, 00101 keyword_true = 290, 00102 keyword_false = 291, 00103 keyword_and = 292, 00104 keyword_or = 293, 00105 keyword_not = 294, 00106 modifier_if = 295, 00107 modifier_unless = 296, 00108 modifier_while = 297, 00109 modifier_until = 298, 00110 modifier_rescue = 299, 00111 keyword_alias = 300, 00112 keyword_defined = 301, 00113 keyword_BEGIN = 302, 00114 keyword_END = 303, 00115 keyword__LINE__ = 304, 00116 keyword__FILE__ = 305, 00117 keyword__ENCODING__ = 306, 00118 tIDENTIFIER = 307, 00119 tFID = 308, 00120 tGVAR = 309, 00121 tIVAR = 310, 00122 tCONSTANT = 311, 00123 tCVAR = 312, 00124 tLABEL = 313, 00125 tINTEGER = 314, 00126 tFLOAT = 315, 00127 tSTRING_CONTENT = 316, 00128 tCHAR = 317, 00129 tNTH_REF = 318, 00130 tBACK_REF = 319, 00131 tREGEXP_END = 320, 00132 tUPLUS = 321, 00133 tUMINUS = 322, 00134 tPOW = 323, 00135 tCMP = 324, 00136 tEQ = 325, 00137 tEQQ = 326, 00138 tNEQ = 327, 00139 tGEQ = 328, 00140 tLEQ = 329, 00141 tANDOP = 330, 00142 tOROP = 331, 00143 tMATCH = 332, 00144 tNMATCH = 333, 00145 tDOT2 = 334, 00146 tDOT3 = 335, 00147 tAREF = 336, 00148 tASET = 337, 00149 tLSHFT = 338, 00150 tRSHFT = 339, 00151 tCOLON2 = 340, 00152 tCOLON3 = 341, 00153 tOP_ASGN = 342, 00154 tASSOC = 343, 00155 tLPAREN = 344, 00156 tLPAREN_ARG = 345, 00157 tRPAREN = 346, 00158 tLBRACK = 347, 00159 tLBRACE = 348, 00160 tLBRACE_ARG = 349, 00161 tSTAR = 350, 00162 tAMPER = 351, 00163 tLAMBDA = 352, 00164 tSYMBEG = 353, 00165 tSTRING_BEG = 354, 00166 tXSTRING_BEG = 355, 00167 tREGEXP_BEG = 356, 00168 tWORDS_BEG = 357, 00169 tQWORDS_BEG = 358, 00170 tSTRING_DBEG = 359, 00171 tSTRING_DVAR = 360, 00172 tSTRING_END = 361, 00173 tLAMBEG = 362, 00174 tLOWEST = 363, 00175 tUMINUS_NUM = 364, 00176 idNULL = 365, 00177 idRespond_to = 366, 00178 idIFUNC = 367, 00179 idCFUNC = 368, 00180 id_core_set_method_alias = 369, 00181 id_core_set_variable_alias = 370, 00182 id_core_undef_method = 371, 00183 id_core_define_method = 372, 00184 id_core_define_singleton_method = 373, 00185 id_core_set_postexe = 374, 00186 tLAST_TOKEN = 375 00187 }; 00188 #endif 00189 /* Tokens. */ 00190 #define keyword_class 258 00191 #define keyword_module 259 00192 #define keyword_def 260 00193 #define keyword_undef 261 00194 #define keyword_begin 262 00195 #define keyword_rescue 263 00196 #define keyword_ensure 264 00197 #define keyword_end 265 00198 #define keyword_if 266 00199 #define keyword_unless 267 00200 #define keyword_then 268 00201 #define keyword_elsif 269 00202 #define keyword_else 270 00203 #define keyword_case 271 00204 #define keyword_when 272 00205 #define keyword_while 273 00206 #define keyword_until 274 00207 #define keyword_for 275 00208 #define keyword_break 276 00209 #define keyword_next 277 00210 #define keyword_redo 278 00211 #define keyword_retry 279 00212 #define keyword_in 280 00213 #define keyword_do 281 00214 #define keyword_do_cond 282 00215 #define keyword_do_block 283 00216 #define keyword_do_LAMBDA 284 00217 #define keyword_return 285 00218 #define keyword_yield 286 00219 #define keyword_super 287 00220 #define keyword_self 288 00221 #define keyword_nil 289 00222 #define keyword_true 290 00223 #define keyword_false 291 00224 #define keyword_and 292 00225 #define keyword_or 293 00226 #define keyword_not 294 00227 #define modifier_if 295 00228 #define modifier_unless 296 00229 #define modifier_while 297 00230 #define modifier_until 298 00231 #define modifier_rescue 299 00232 #define keyword_alias 300 00233 #define keyword_defined 301 00234 #define keyword_BEGIN 302 00235 #define keyword_END 303 00236 #define keyword__LINE__ 304 00237 #define keyword__FILE__ 305 00238 #define keyword__ENCODING__ 306 00239 #define tIDENTIFIER 307 00240 #define tFID 308 00241 #define tGVAR 309 00242 #define tIVAR 310 00243 #define tCONSTANT 311 00244 #define tCVAR 312 00245 #define tLABEL 313 00246 #define tINTEGER 314 00247 #define tFLOAT 315 00248 #define tSTRING_CONTENT 316 00249 #define tCHAR 317 00250 #define tNTH_REF 318 00251 #define tBACK_REF 319 00252 #define tREGEXP_END 320 00253 #define tUPLUS 321 00254 #define tUMINUS 322 00255 #define tPOW 323 00256 #define tCMP 324 00257 #define tEQ 325 00258 #define tEQQ 326 00259 #define tNEQ 327 00260 #define tGEQ 328 00261 #define tLEQ 329 00262 #define tANDOP 330 00263 #define tOROP 331 00264 #define tMATCH 332 00265 #define tNMATCH 333 00266 #define tDOT2 334 00267 #define tDOT3 335 00268 #define tAREF 336 00269 #define tASET 337 00270 #define tLSHFT 338 00271 #define tRSHFT 339 00272 #define tCOLON2 340 00273 #define tCOLON3 341 00274 #define tOP_ASGN 342 00275 #define tASSOC 343 00276 #define tLPAREN 344 00277 #define tLPAREN_ARG 345 00278 #define tRPAREN 346 00279 #define tLBRACK 347 00280 #define tLBRACE 348 00281 #define tLBRACE_ARG 349 00282 #define tSTAR 350 00283 #define tAMPER 351 00284 #define tLAMBDA 352 00285 #define tSYMBEG 353 00286 #define tSTRING_BEG 354 00287 #define tXSTRING_BEG 355 00288 #define tREGEXP_BEG 356 00289 #define tWORDS_BEG 357 00290 #define tQWORDS_BEG 358 00291 #define tSTRING_DBEG 359 00292 #define tSTRING_DVAR 360 00293 #define tSTRING_END 361 00294 #define tLAMBEG 362 00295 #define tLOWEST 363 00296 #define tUMINUS_NUM 364 00297 #define idNULL 365 00298 #define idRespond_to 366 00299 #define idIFUNC 367 00300 #define idCFUNC 368 00301 #define id_core_set_method_alias 369 00302 #define id_core_set_variable_alias 370 00303 #define id_core_undef_method 371 00304 #define id_core_define_method 372 00305 #define id_core_define_singleton_method 373 00306 #define id_core_set_postexe 374 00307 #define tLAST_TOKEN 375 00308 00309 00310 00311 00312 /* Copy the first part of user declarations. */ 00313 #line 12 "ripper.y" 00314 00315 00316 #define YYDEBUG 1 00317 #define YYERROR_VERBOSE 1 00318 #define YYSTACK_USE_ALLOCA 0 00319 00320 #include "ruby/ruby.h" 00321 #include "ruby/st.h" 00322 #include "ruby/encoding.h" 00323 #include "internal.h" 00324 #include "node.h" 00325 #include "parse.h" 00326 #include "id.h" 00327 #include "regenc.h" 00328 #include <stdio.h> 00329 #include <errno.h> 00330 #include <ctype.h> 00331 00332 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00333 00334 #define YYMALLOC(size) rb_parser_malloc(parser, (size)) 00335 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 00336 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 00337 #define YYFREE(ptr) rb_parser_free(parser, (ptr)) 00338 #define malloc YYMALLOC 00339 #define realloc YYREALLOC 00340 #define calloc YYCALLOC 00341 #define free YYFREE 00342 00343 #ifndef RIPPER 00344 static ID register_symid(ID, const char *, long, rb_encoding *); 00345 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 00346 #include "id.c" 00347 #endif 00348 00349 #define is_notop_id(id) ((id)>tLAST_TOKEN) 00350 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00351 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00352 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00353 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00354 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00355 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00356 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00357 00358 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00359 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00360 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00361 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00362 00363 enum lex_state_e { 00364 EXPR_BEG, /* ignore newline, +/- is a sign. */ 00365 EXPR_END, /* newline significant, +/- is an operator. */ 00366 EXPR_ENDARG, /* ditto, and unbound braces. */ 00367 EXPR_ENDFN, /* ditto, and unbound braces. */ 00368 EXPR_ARG, /* newline significant, +/- is an operator. */ 00369 EXPR_CMDARG, /* newline significant, +/- is an operator. */ 00370 EXPR_MID, /* newline significant, +/- is an operator. */ 00371 EXPR_FNAME, /* ignore newline, no reserved words. */ 00372 EXPR_DOT, /* right after `.' or `::', no reserved words. */ 00373 EXPR_CLASS, /* immediate after `class', no here document. */ 00374 EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */ 00375 EXPR_MAX_STATE 00376 }; 00377 00378 typedef VALUE stack_type; 00379 00380 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 00381 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 00382 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 00383 # define BITSTACK_SET_P(stack) ((stack)&1) 00384 00385 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 00386 #define COND_POP() BITSTACK_POP(cond_stack) 00387 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00388 #define COND_P() BITSTACK_SET_P(cond_stack) 00389 00390 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 00391 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00392 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00393 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00394 00395 struct vtable { 00396 ID *tbl; 00397 int pos; 00398 int capa; 00399 struct vtable *prev; 00400 }; 00401 00402 struct local_vars { 00403 struct vtable *args; 00404 struct vtable *vars; 00405 struct vtable *used; 00406 struct local_vars *prev; 00407 }; 00408 00409 #define DVARS_INHERIT ((void*)1) 00410 #define DVARS_TOPSCOPE NULL 00411 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00412 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00413 00414 static int 00415 vtable_size(const struct vtable *tbl) 00416 { 00417 if (POINTER_P(tbl)) { 00418 return tbl->pos; 00419 } 00420 else { 00421 return 0; 00422 } 00423 } 00424 00425 #define VTBL_DEBUG 0 00426 00427 static struct vtable * 00428 vtable_alloc(struct vtable *prev) 00429 { 00430 struct vtable *tbl = ALLOC(struct vtable); 00431 tbl->pos = 0; 00432 tbl->capa = 8; 00433 tbl->tbl = ALLOC_N(ID, tbl->capa); 00434 tbl->prev = prev; 00435 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00436 return tbl; 00437 } 00438 00439 static void 00440 vtable_free(struct vtable *tbl) 00441 { 00442 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00443 if (POINTER_P(tbl)) { 00444 if (tbl->tbl) { 00445 xfree(tbl->tbl); 00446 } 00447 xfree(tbl); 00448 } 00449 } 00450 00451 static void 00452 vtable_add(struct vtable *tbl, ID id) 00453 { 00454 if (!POINTER_P(tbl)) { 00455 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00456 } 00457 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00458 00459 if (tbl->pos == tbl->capa) { 00460 tbl->capa = tbl->capa * 2; 00461 REALLOC_N(tbl->tbl, ID, tbl->capa); 00462 } 00463 tbl->tbl[tbl->pos++] = id; 00464 } 00465 00466 static int 00467 vtable_included(const struct vtable * tbl, ID id) 00468 { 00469 int i; 00470 00471 if (POINTER_P(tbl)) { 00472 for (i = 0; i < tbl->pos; i++) { 00473 if (tbl->tbl[i] == id) { 00474 return i+1; 00475 } 00476 } 00477 } 00478 return 0; 00479 } 00480 00481 00482 #ifndef RIPPER 00483 typedef struct token_info { 00484 const char *token; 00485 int linenum; 00486 int column; 00487 int nonspc; 00488 struct token_info *next; 00489 } token_info; 00490 #endif 00491 00492 /* 00493 Structure of Lexer Buffer: 00494 00495 lex_pbeg tokp lex_p lex_pend 00496 | | | | 00497 |-----------+--------------+------------| 00498 |<------------>| 00499 token 00500 */ 00501 struct parser_params { 00502 int is_ripper; 00503 NODE *heap; 00504 00505 YYSTYPE *parser_yylval; 00506 VALUE eofp; 00507 00508 NODE *parser_lex_strterm; 00509 enum lex_state_e parser_lex_state; 00510 stack_type parser_cond_stack; 00511 stack_type parser_cmdarg_stack; 00512 int parser_class_nest; 00513 int parser_paren_nest; 00514 int parser_lpar_beg; 00515 int parser_in_single; 00516 int parser_in_def; 00517 int parser_compile_for_eval; 00518 VALUE parser_cur_mid; 00519 int parser_in_defined; 00520 char *parser_tokenbuf; 00521 int parser_tokidx; 00522 int parser_toksiz; 00523 VALUE parser_lex_input; 00524 VALUE parser_lex_lastline; 00525 VALUE parser_lex_nextline; 00526 const char *parser_lex_pbeg; 00527 const char *parser_lex_p; 00528 const char *parser_lex_pend; 00529 int parser_heredoc_end; 00530 int parser_command_start; 00531 NODE *parser_deferred_nodes; 00532 long parser_lex_gets_ptr; 00533 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00534 struct local_vars *parser_lvtbl; 00535 int parser_ruby__end__seen; 00536 int line_count; 00537 int has_shebang; 00538 char *parser_ruby_sourcefile; /* current source file */ 00539 int parser_ruby_sourceline; /* current line no. */ 00540 rb_encoding *enc; 00541 rb_encoding *utf8; 00542 00543 int parser_yydebug; 00544 00545 #ifndef RIPPER 00546 /* Ruby core only */ 00547 NODE *parser_eval_tree_begin; 00548 NODE *parser_eval_tree; 00549 VALUE debug_lines; 00550 VALUE coverage; 00551 int nerr; 00552 00553 int parser_token_info_enabled; 00554 token_info *parser_token_info; 00555 #else 00556 /* Ripper only */ 00557 VALUE parser_ruby_sourcefile_string; 00558 const char *tokp; 00559 VALUE delayed; 00560 int delayed_line; 00561 int delayed_col; 00562 00563 VALUE value; 00564 VALUE result; 00565 VALUE parsing_thread; 00566 int toplevel_p; 00567 #endif 00568 }; 00569 00570 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ 00571 (parser->utf8 = rb_utf8_encoding())) 00572 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) 00573 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc) 00574 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) 00575 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) 00576 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00577 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) 00578 00579 static int parser_yyerror(struct parser_params*, const char*); 00580 #define yyerror(msg) parser_yyerror(parser, (msg)) 00581 00582 #define YYLEX_PARAM parser 00583 00584 #define lex_strterm (parser->parser_lex_strterm) 00585 #define lex_state (parser->parser_lex_state) 00586 #define cond_stack (parser->parser_cond_stack) 00587 #define cmdarg_stack (parser->parser_cmdarg_stack) 00588 #define class_nest (parser->parser_class_nest) 00589 #define paren_nest (parser->parser_paren_nest) 00590 #define lpar_beg (parser->parser_lpar_beg) 00591 #define in_single (parser->parser_in_single) 00592 #define in_def (parser->parser_in_def) 00593 #define compile_for_eval (parser->parser_compile_for_eval) 00594 #define cur_mid (parser->parser_cur_mid) 00595 #define in_defined (parser->parser_in_defined) 00596 #define tokenbuf (parser->parser_tokenbuf) 00597 #define tokidx (parser->parser_tokidx) 00598 #define toksiz (parser->parser_toksiz) 00599 #define lex_input (parser->parser_lex_input) 00600 #define lex_lastline (parser->parser_lex_lastline) 00601 #define lex_nextline (parser->parser_lex_nextline) 00602 #define lex_pbeg (parser->parser_lex_pbeg) 00603 #define lex_p (parser->parser_lex_p) 00604 #define lex_pend (parser->parser_lex_pend) 00605 #define heredoc_end (parser->parser_heredoc_end) 00606 #define command_start (parser->parser_command_start) 00607 #define deferred_nodes (parser->parser_deferred_nodes) 00608 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00609 #define lex_gets (parser->parser_lex_gets) 00610 #define lvtbl (parser->parser_lvtbl) 00611 #define ruby__end__seen (parser->parser_ruby__end__seen) 00612 #define ruby_sourceline (parser->parser_ruby_sourceline) 00613 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00614 #define current_enc (parser->enc) 00615 #define yydebug (parser->parser_yydebug) 00616 #ifdef RIPPER 00617 #else 00618 #define ruby_eval_tree (parser->parser_eval_tree) 00619 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00620 #define ruby_debug_lines (parser->debug_lines) 00621 #define ruby_coverage (parser->coverage) 00622 #endif 00623 00624 static int yylex(void*, void*); 00625 00626 #ifndef RIPPER 00627 #define yyparse ruby_yyparse 00628 00629 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00630 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 00631 00632 static NODE *cond_gen(struct parser_params*,NODE*); 00633 #define cond(node) cond_gen(parser, (node)) 00634 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00635 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 00636 00637 static NODE *newline_node(NODE*); 00638 static void fixpos(NODE*,NODE*); 00639 00640 static int value_expr_gen(struct parser_params*,NODE*); 00641 static void void_expr_gen(struct parser_params*,NODE*); 00642 static NODE *remove_begin(NODE*); 00643 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00644 #define void_expr0(node) void_expr_gen(parser, (node)) 00645 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00646 static void void_stmts_gen(struct parser_params*,NODE*); 00647 #define void_stmts(node) void_stmts_gen(parser, (node)) 00648 static void reduce_nodes_gen(struct parser_params*,NODE**); 00649 #define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 00650 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00651 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 00652 00653 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00654 #define block_append(h,t) block_append_gen(parser,(h),(t)) 00655 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00656 #define list_append(l,i) list_append_gen(parser,(l),(i)) 00657 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00658 #define list_concat(h,t) list_concat_gen(parser,(h),(t)) 00659 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00660 #define arg_append(h,t) arg_append_gen(parser,(h),(t)) 00661 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00662 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 00663 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00664 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 00665 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00666 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00667 #define new_evstr(n) new_evstr_gen(parser,(n)) 00668 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00669 #define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 00670 static NODE *splat_array(NODE*); 00671 00672 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00673 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 00674 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00675 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 00676 00677 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); 00678 #define new_args(f,o,r,p,b) new_args_gen(parser, (f),(o),(r),(p),(b)) 00679 00680 static NODE *negate_lit(NODE*); 00681 static NODE *ret_args_gen(struct parser_params*,NODE*); 00682 #define ret_args(node) ret_args_gen(parser, (node)) 00683 static NODE *arg_blk_pass(NODE*,NODE*); 00684 static NODE *new_yield_gen(struct parser_params*,NODE*); 00685 #define new_yield(node) new_yield_gen(parser, (node)) 00686 00687 static NODE *gettable_gen(struct parser_params*,ID); 00688 #define gettable(id) gettable_gen(parser,(id)) 00689 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00690 #define assignable(id,node) assignable_gen(parser, (id), (node)) 00691 00692 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00693 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 00694 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00695 #define attrset(node,id) attrset_gen(parser, (node), (id)) 00696 00697 static void rb_backref_error_gen(struct parser_params*,NODE*); 00698 #define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 00699 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00700 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 00701 00702 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00703 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 00704 00705 static ID *local_tbl_gen(struct parser_params*); 00706 #define local_tbl() local_tbl_gen(parser) 00707 00708 static void fixup_nodes(NODE **); 00709 00710 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00711 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 00712 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00713 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 00714 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00715 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 00716 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00717 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 00718 00719 #define get_id(id) (id) 00720 #define get_value(val) (val) 00721 #else 00722 #define remove_begin(node) (node) 00723 #define rb_dvar_defined(id) 0 00724 #define rb_local_defined(id) 0 00725 static ID ripper_get_id(VALUE); 00726 #define get_id(id) ripper_get_id(id) 00727 static VALUE ripper_get_value(VALUE); 00728 #define get_value(val) ripper_get_value(val) 00729 static VALUE assignable_gen(struct parser_params*,VALUE); 00730 #define assignable(lhs,node) assignable_gen(parser, (lhs)) 00731 static int id_is_var_gen(struct parser_params *parser, ID id); 00732 #define id_is_var(id) id_is_var_gen(parser, (id)) 00733 #endif /* !RIPPER */ 00734 00735 static ID formal_argument_gen(struct parser_params*, ID); 00736 #define formal_argument(id) formal_argument_gen(parser, (id)) 00737 static ID shadowing_lvar_gen(struct parser_params*,ID); 00738 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 00739 static void new_bv_gen(struct parser_params*,ID); 00740 #define new_bv(id) new_bv_gen(parser, (id)) 00741 00742 static void local_push_gen(struct parser_params*,int); 00743 #define local_push(top) local_push_gen(parser,(top)) 00744 static void local_pop_gen(struct parser_params*); 00745 #define local_pop() local_pop_gen(parser) 00746 static int local_var_gen(struct parser_params*, ID); 00747 #define local_var(id) local_var_gen(parser, (id)); 00748 static int arg_var_gen(struct parser_params*, ID); 00749 #define arg_var(id) arg_var_gen(parser, (id)) 00750 static int local_id_gen(struct parser_params*, ID); 00751 #define local_id(id) local_id_gen(parser, (id)) 00752 static ID internal_id_gen(struct parser_params*); 00753 #define internal_id() internal_id_gen(parser) 00754 00755 static const struct vtable *dyna_push_gen(struct parser_params *); 00756 #define dyna_push() dyna_push_gen(parser) 00757 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00758 #define dyna_pop(node) dyna_pop_gen(parser, (node)) 00759 static int dyna_in_block_gen(struct parser_params*); 00760 #define dyna_in_block() dyna_in_block_gen(parser) 00761 #define dyna_var(id) local_var(id) 00762 static int dvar_defined_gen(struct parser_params*,ID,int); 00763 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 00764 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 00765 static int dvar_curr_gen(struct parser_params*,ID); 00766 #define dvar_curr(id) dvar_curr_gen(parser, (id)) 00767 00768 static int lvar_defined_gen(struct parser_params*, ID); 00769 #define lvar_defined(id) lvar_defined_gen(parser, (id)) 00770 00771 #define RE_OPTION_ONCE (1<<16) 00772 #define RE_OPTION_ENCODING_SHIFT 8 00773 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00774 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00775 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00776 #define RE_OPTION_MASK 0xff 00777 #define RE_OPTION_ARG_ENCODING_NONE 32 00778 00779 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00780 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00781 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00782 #define nd_func u1.id 00783 #if SIZEOF_SHORT == 2 00784 #define nd_term(node) ((signed short)(node)->u2.id) 00785 #else 00786 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00787 #endif 00788 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00789 #define nd_nest u3.cnt 00790 00791 /****** Ripper *******/ 00792 00793 #ifdef RIPPER 00794 #define RIPPER_VERSION "0.1.0" 00795 00796 #include "eventids1.c" 00797 #include "eventids2.c" 00798 static ID ripper_id_gets; 00799 00800 static VALUE ripper_dispatch0(struct parser_params*,ID); 00801 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00802 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00803 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00804 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00805 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00806 00807 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00808 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 00809 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 00810 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 00811 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 00812 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 00813 00814 #define yyparse ripper_yyparse 00815 00816 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00817 static VALUE ripper_id2sym(ID); 00818 #ifdef __GNUC__ 00819 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00820 ID2SYM(id) : ripper_id2sym(id)) 00821 #endif 00822 00823 #define arg_new() dispatch0(args_new) 00824 #define arg_add(l,a) dispatch2(args_add, (l), (a)) 00825 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 00826 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 00827 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 00828 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 00829 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 00830 00831 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 00832 #define mrhs_new() dispatch0(mrhs_new) 00833 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 00834 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 00835 00836 #define mlhs_new() dispatch0(mlhs_new) 00837 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 00838 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 00839 00840 #define params_new(pars, opts, rest, pars2, blk) \ 00841 dispatch5(params, (pars), (opts), (rest), (pars2), (blk)) 00842 00843 #define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 00844 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 00845 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 00846 00847 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 00848 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 00849 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 00850 00851 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00852 00853 #define FIXME 0 00854 00855 #endif /* RIPPER */ 00856 00857 #ifndef RIPPER 00858 # define ifndef_ripper(x) (x) 00859 #else 00860 # define ifndef_ripper(x) 00861 #endif 00862 00863 #ifndef RIPPER 00864 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 00865 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00866 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00867 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 00868 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00869 #else 00870 # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 00871 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 00872 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 00873 # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 00874 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 00875 static void ripper_warn0(struct parser_params*, const char*); 00876 static void ripper_warnI(struct parser_params*, const char*, int); 00877 #if 0 00878 static void ripper_warnS(struct parser_params*, const char*, const char*); 00879 #endif 00880 static void ripper_warning0(struct parser_params*, const char*); 00881 static void ripper_warningS(struct parser_params*, const char*, const char*); 00882 #endif 00883 00884 #ifdef RIPPER 00885 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00886 # define rb_compile_error ripper_compile_error 00887 # define compile_error ripper_compile_error 00888 # define PARSER_ARG parser, 00889 #else 00890 # define rb_compile_error rb_compile_error_with_enc 00891 # define compile_error parser->nerr++,rb_compile_error_with_enc 00892 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 00893 #endif 00894 00895 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00896 for instance). This is too low for Ruby to parse some files, such as 00897 date/format.rb, therefore bump the value up to at least Bison's default. */ 00898 #ifdef OLD_YACC 00899 #ifndef YYMAXDEPTH 00900 #define YYMAXDEPTH 10000 00901 #endif 00902 #endif 00903 00904 #ifndef RIPPER 00905 static void token_info_push(struct parser_params*, const char *token); 00906 static void token_info_pop(struct parser_params*, const char *token); 00907 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 00908 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 00909 #else 00910 #define token_info_push(token) /* nothing */ 00911 #define token_info_pop(token) /* nothing */ 00912 #endif 00913 00914 00915 /* Enabling traces. */ 00916 #ifndef YYDEBUG 00917 # define YYDEBUG 1 00918 #endif 00919 00920 /* Enabling verbose error messages. */ 00921 #ifdef YYERROR_VERBOSE 00922 # undef YYERROR_VERBOSE 00923 # define YYERROR_VERBOSE 1 00924 #else 00925 # define YYERROR_VERBOSE 0 00926 #endif 00927 00928 /* Enabling the token table. */ 00929 #ifndef YYTOKEN_TABLE 00930 # define YYTOKEN_TABLE 0 00931 #endif 00932 00933 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00934 typedef union YYSTYPE 00935 #line 616 "ripper.y" 00936 { 00937 VALUE val; 00938 NODE *node; 00939 ID id; 00940 int num; 00941 const struct vtable *vars; 00942 } 00943 /* Line 187 of yacc.c. */ 00944 #line 945 "parse.c" 00945 YYSTYPE; 00946 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00947 # define YYSTYPE_IS_DECLARED 1 00948 # define YYSTYPE_IS_TRIVIAL 1 00949 #endif 00950 00951 00952 00953 /* Copy the second part of user declarations. */ 00954 00955 00956 /* Line 216 of yacc.c. */ 00957 #line 958 "parse.c" 00958 00959 #ifdef short 00960 # undef short 00961 #endif 00962 00963 #ifdef YYTYPE_UINT8 00964 typedef YYTYPE_UINT8 yytype_uint8; 00965 #else 00966 typedef unsigned char yytype_uint8; 00967 #endif 00968 00969 #ifdef YYTYPE_INT8 00970 typedef YYTYPE_INT8 yytype_int8; 00971 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00972 || defined __cplusplus || defined _MSC_VER) 00973 typedef signed char yytype_int8; 00974 #else 00975 typedef short int yytype_int8; 00976 #endif 00977 00978 #ifdef YYTYPE_UINT16 00979 typedef YYTYPE_UINT16 yytype_uint16; 00980 #else 00981 typedef unsigned short int yytype_uint16; 00982 #endif 00983 00984 #ifdef YYTYPE_INT16 00985 typedef YYTYPE_INT16 yytype_int16; 00986 #else 00987 typedef short int yytype_int16; 00988 #endif 00989 00990 #ifndef YYSIZE_T 00991 # ifdef __SIZE_TYPE__ 00992 # define YYSIZE_T __SIZE_TYPE__ 00993 # elif defined size_t 00994 # define YYSIZE_T size_t 00995 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00996 || defined __cplusplus || defined _MSC_VER) 00997 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00998 # define YYSIZE_T size_t 00999 # else 01000 # define YYSIZE_T unsigned int 01001 # endif 01002 #endif 01003 01004 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 01005 01006 #ifndef YY_ 01007 # if YYENABLE_NLS 01008 # if ENABLE_NLS 01009 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 01010 # define YY_(msgid) dgettext ("bison-runtime", msgid) 01011 # endif 01012 # endif 01013 # ifndef YY_ 01014 # define YY_(msgid) msgid 01015 # endif 01016 #endif 01017 01018 /* Suppress unused-variable warnings by "using" E. */ 01019 #if ! defined lint || defined __GNUC__ 01020 # define YYUSE(e) ((void) (e)) 01021 #else 01022 # define YYUSE(e) /* empty */ 01023 #endif 01024 01025 /* Identity function, used to suppress warnings about constant conditions. */ 01026 #ifndef lint 01027 # define YYID(n) (n) 01028 #else 01029 #if (defined __STDC__ || defined __C99__FUNC__ \ 01030 || defined __cplusplus || defined _MSC_VER) 01031 static int 01032 YYID (int i) 01033 #else 01034 static int 01035 YYID (i) 01036 int i; 01037 #endif 01038 { 01039 return i; 01040 } 01041 #endif 01042 01043 #if ! defined yyoverflow || YYERROR_VERBOSE 01044 01045 /* The parser invokes alloca or malloc; define the necessary symbols. */ 01046 01047 # ifdef YYSTACK_USE_ALLOCA 01048 # if YYSTACK_USE_ALLOCA 01049 # ifdef __GNUC__ 01050 # define YYSTACK_ALLOC __builtin_alloca 01051 # elif defined __BUILTIN_VA_ARG_INCR 01052 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 01053 # elif defined _AIX 01054 # define YYSTACK_ALLOC __alloca 01055 # elif defined _MSC_VER 01056 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 01057 # define alloca _alloca 01058 # else 01059 # define YYSTACK_ALLOC alloca 01060 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01061 || defined __cplusplus || defined _MSC_VER) 01062 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01063 # ifndef _STDLIB_H 01064 # define _STDLIB_H 1 01065 # endif 01066 # endif 01067 # endif 01068 # endif 01069 # endif 01070 01071 # ifdef YYSTACK_ALLOC 01072 /* Pacify GCC's `empty if-body' warning. */ 01073 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 01074 # ifndef YYSTACK_ALLOC_MAXIMUM 01075 /* The OS might guarantee only one guard page at the bottom of the stack, 01076 and a page size can be as small as 4096 bytes. So we cannot safely 01077 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 01078 to allow for a few compiler-allocated temporary stack slots. */ 01079 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 01080 # endif 01081 # else 01082 # define YYSTACK_ALLOC YYMALLOC 01083 # define YYSTACK_FREE YYFREE 01084 # ifndef YYSTACK_ALLOC_MAXIMUM 01085 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 01086 # endif 01087 # if (defined __cplusplus && ! defined _STDLIB_H \ 01088 && ! ((defined YYMALLOC || defined malloc) \ 01089 && (defined YYFREE || defined free))) 01090 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01091 # ifndef _STDLIB_H 01092 # define _STDLIB_H 1 01093 # endif 01094 # endif 01095 # ifndef YYMALLOC 01096 # define YYMALLOC malloc 01097 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01098 || defined __cplusplus || defined _MSC_VER) 01099 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 01100 # endif 01101 # endif 01102 # ifndef YYFREE 01103 # define YYFREE free 01104 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01105 || defined __cplusplus || defined _MSC_VER) 01106 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01107 # endif 01108 # endif 01109 # endif 01110 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01111 01112 01113 #if (! defined yyoverflow \ 01114 && (! defined __cplusplus \ 01115 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01116 01117 /* A type that is properly aligned for any stack member. */ 01118 union yyalloc 01119 { 01120 yytype_int16 yyss; 01121 YYSTYPE yyvs; 01122 }; 01123 01124 /* The size of the maximum gap between one aligned stack and the next. */ 01125 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01126 01127 /* The size of an array large to enough to hold all stacks, each with 01128 N elements. */ 01129 # define YYSTACK_BYTES(N) \ 01130 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01131 + YYSTACK_GAP_MAXIMUM) 01132 01133 /* Copy COUNT objects from FROM to TO. The source and destination do 01134 not overlap. */ 01135 # ifndef YYCOPY 01136 # if defined __GNUC__ && 1 < __GNUC__ 01137 # define YYCOPY(To, From, Count) \ 01138 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01139 # else 01140 # define YYCOPY(To, From, Count) \ 01141 do \ 01142 { \ 01143 YYSIZE_T yyi; \ 01144 for (yyi = 0; yyi < (Count); yyi++) \ 01145 (To)[yyi] = (From)[yyi]; \ 01146 } \ 01147 while (YYID (0)) 01148 # endif 01149 # endif 01150 01151 /* Relocate STACK from its old location to the new one. The 01152 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01153 elements in the stack, and YYPTR gives the new location of the 01154 stack. Advance YYPTR to a properly aligned location for the next 01155 stack. */ 01156 # define YYSTACK_RELOCATE(Stack) \ 01157 do \ 01158 { \ 01159 YYSIZE_T yynewbytes; \ 01160 YYCOPY (&yyptr->Stack, Stack, yysize); \ 01161 Stack = &yyptr->Stack; \ 01162 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01163 yyptr += yynewbytes / sizeof (*yyptr); \ 01164 } \ 01165 while (YYID (0)) 01166 01167 #endif 01168 01169 /* YYFINAL -- State number of the termination state. */ 01170 #define YYFINAL 3 01171 /* YYLAST -- Last index in YYTABLE. */ 01172 #define YYLAST 10748 01173 01174 /* YYNTOKENS -- Number of terminals. */ 01175 #define YYNTOKENS 148 01176 /* YYNNTS -- Number of nonterminals. */ 01177 #define YYNNTS 174 01178 /* YYNRULES -- Number of rules. */ 01179 #define YYNRULES 573 01180 /* YYNRULES -- Number of states. */ 01181 #define YYNSTATES 991 01182 01183 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01184 #define YYUNDEFTOK 2 01185 #define YYMAXUTOK 375 01186 01187 #define YYTRANSLATE(YYX) \ 01188 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01189 01190 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01191 static const yytype_uint8 yytranslate[] = 01192 { 01193 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01194 147, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01196 2, 2, 146, 123, 2, 2, 2, 121, 116, 2, 01197 142, 143, 119, 117, 140, 118, 139, 120, 2, 2, 01198 2, 2, 2, 2, 2, 2, 2, 2, 111, 145, 01199 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, 01200 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01201 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01202 2, 138, 2, 144, 115, 2, 141, 2, 2, 2, 01203 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01204 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01205 2, 2, 2, 136, 114, 137, 124, 2, 2, 2, 01206 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01207 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01208 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01209 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01210 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01211 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01212 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01213 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01214 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01215 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01216 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01217 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01218 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01219 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01220 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01221 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01222 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01223 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01224 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01225 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 01226 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 01227 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 01228 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 01229 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, 01230 130, 131, 132, 133, 134, 135 01231 }; 01232 01233 #if YYDEBUG 01234 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01235 YYRHS. */ 01236 static const yytype_uint16 yyprhs[] = 01237 { 01238 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01239 23, 24, 30, 35, 38, 40, 42, 46, 49, 50, 01240 55, 59, 63, 67, 70, 74, 78, 82, 86, 90, 01241 95, 97, 101, 105, 112, 118, 124, 130, 136, 140, 01242 144, 148, 152, 154, 158, 162, 164, 168, 172, 176, 01243 179, 181, 183, 185, 187, 189, 194, 199, 200, 206, 01244 209, 213, 218, 224, 229, 235, 238, 241, 244, 247, 01245 250, 252, 256, 258, 262, 264, 267, 271, 277, 280, 01246 285, 288, 293, 295, 299, 301, 305, 308, 312, 314, 01247 318, 320, 322, 327, 331, 335, 339, 343, 346, 348, 01248 350, 352, 357, 361, 365, 369, 373, 376, 378, 380, 01249 382, 385, 387, 391, 393, 395, 397, 399, 401, 403, 01250 405, 407, 409, 411, 412, 417, 419, 421, 423, 425, 01251 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01252 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01253 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01254 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01255 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01256 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01257 547, 549, 551, 553, 555, 557, 561, 567, 571, 577, 01258 584, 590, 596, 602, 608, 613, 617, 621, 625, 629, 01259 633, 637, 641, 645, 649, 654, 659, 662, 665, 669, 01260 673, 677, 681, 685, 689, 693, 697, 701, 705, 709, 01261 713, 717, 720, 723, 727, 731, 735, 739, 740, 745, 01262 752, 754, 756, 758, 761, 766, 769, 773, 775, 777, 01263 779, 781, 784, 789, 792, 794, 797, 800, 805, 807, 01264 808, 811, 814, 817, 819, 821, 824, 828, 833, 837, 01265 842, 845, 847, 849, 851, 853, 855, 857, 859, 861, 01266 863, 864, 869, 870, 875, 879, 883, 886, 890, 894, 01267 896, 901, 905, 907, 908, 915, 920, 924, 927, 929, 01268 932, 935, 942, 949, 950, 951, 959, 960, 961, 969, 01269 975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011, 01270 1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044, 01271 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 01272 1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089, 01273 1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117, 01274 1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169, 01275 1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217, 01276 1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246, 01277 1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276, 01278 1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317, 01279 1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353, 01280 1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380, 01281 1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407, 01282 1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438, 01283 1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458, 01284 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482, 01285 1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506, 01286 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 01287 1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552, 01288 1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610, 01289 1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636, 01290 1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666, 01291 1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691, 01292 1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719, 01293 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 01294 1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758, 01295 1760, 1762, 1764, 1767 01296 }; 01297 01298 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01299 static const yytype_int16 yyrhs[] = 01300 { 01301 149, 0, -1, -1, 150, 151, -1, 152, 314, -1, 01302 321, -1, 153, -1, 152, 320, 153, -1, 1, 153, 01303 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1, 01304 156, 256, 231, 259, -1, 157, 314, -1, 321, -1, 01305 158, -1, 157, 320, 158, -1, 1, 158, -1, -1, 01306 45, 180, 159, 180, -1, 45, 54, 54, -1, 45, 01307 54, 64, -1, 45, 54, 63, -1, 6, 181, -1, 01308 158, 40, 162, -1, 158, 41, 162, -1, 158, 42, 01309 162, -1, 158, 43, 162, -1, 158, 44, 158, -1, 01310 48, 136, 156, 137, -1, 160, -1, 168, 109, 163, 01311 -1, 286, 87, 163, -1, 216, 138, 191, 317, 87, 01312 163, -1, 216, 139, 52, 87, 163, -1, 216, 139, 01313 56, 87, 163, -1, 216, 85, 56, 87, 163, -1, 01314 216, 85, 52, 87, 163, -1, 287, 87, 163, -1, 01315 175, 109, 198, -1, 168, 109, 187, -1, 168, 109, 01316 198, -1, 161, -1, 175, 109, 163, -1, 175, 109, 01317 160, -1, 163, -1, 161, 37, 161, -1, 161, 38, 01318 161, -1, 39, 315, 161, -1, 123, 163, -1, 185, 01319 -1, 161, -1, 167, -1, 164, -1, 249, -1, 249, 01320 139, 311, 193, -1, 249, 85, 311, 193, -1, -1, 01321 94, 166, 237, 156, 137, -1, 310, 193, -1, 310, 01322 193, 165, -1, 216, 139, 311, 193, -1, 216, 139, 01323 311, 193, 165, -1, 216, 85, 311, 193, -1, 216, 01324 85, 311, 193, 165, -1, 32, 193, -1, 31, 193, 01325 -1, 30, 192, -1, 21, 192, -1, 22, 192, -1, 01326 170, -1, 89, 169, 316, -1, 170, -1, 89, 169, 01327 316, -1, 172, -1, 172, 171, -1, 172, 95, 174, 01328 -1, 172, 95, 174, 140, 173, -1, 172, 95, -1, 01329 172, 95, 140, 173, -1, 95, 174, -1, 95, 174, 01330 140, 173, -1, 95, -1, 95, 140, 173, -1, 174, 01331 -1, 89, 169, 316, -1, 171, 140, -1, 172, 171, 01332 140, -1, 171, -1, 173, 140, 171, -1, 283, -1, 01333 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01334 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01335 85, 56, -1, 86, 56, -1, 287, -1, 283, -1, 01336 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01337 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01338 85, 56, -1, 86, 56, -1, 287, -1, 52, -1, 01339 56, -1, 86, 176, -1, 176, -1, 216, 85, 176, 01340 -1, 52, -1, 56, -1, 53, -1, 183, -1, 184, 01341 -1, 178, -1, 279, -1, 179, -1, 281, -1, 180, 01342 -1, -1, 181, 140, 182, 180, -1, 114, -1, 115, 01343 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77, 01344 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74, 01345 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118, 01346 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68, 01347 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81, 01348 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51, 01349 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7, 01350 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46, 01351 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9, 01352 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22, 01353 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8, 01354 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13, 01355 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11, 01356 -1, 12, -1, 18, -1, 19, -1, 175, 109, 185, 01357 -1, 175, 109, 185, 44, 185, -1, 286, 87, 185, 01358 -1, 286, 87, 185, 44, 185, -1, 216, 138, 191, 01359 317, 87, 185, -1, 216, 139, 52, 87, 185, -1, 01360 216, 139, 56, 87, 185, -1, 216, 85, 52, 87, 01361 185, -1, 216, 85, 56, 87, 185, -1, 86, 56, 01362 87, 185, -1, 287, 87, 185, -1, 185, 79, 185, 01363 -1, 185, 80, 185, -1, 185, 117, 185, -1, 185, 01364 118, 185, -1, 185, 119, 185, -1, 185, 120, 185, 01365 -1, 185, 121, 185, -1, 185, 68, 185, -1, 122, 01366 59, 68, 185, -1, 122, 60, 68, 185, -1, 66, 01367 185, -1, 67, 185, -1, 185, 114, 185, -1, 185, 01368 115, 185, -1, 185, 116, 185, -1, 185, 69, 185, 01369 -1, 185, 112, 185, -1, 185, 73, 185, -1, 185, 01370 113, 185, -1, 185, 74, 185, -1, 185, 70, 185, 01371 -1, 185, 71, 185, -1, 185, 72, 185, -1, 185, 01372 77, 185, -1, 185, 78, 185, -1, 123, 185, -1, 01373 124, 185, -1, 185, 83, 185, -1, 185, 84, 185, 01374 -1, 185, 75, 185, -1, 185, 76, 185, -1, -1, 01375 46, 315, 186, 185, -1, 185, 110, 185, 315, 111, 01376 185, -1, 199, -1, 185, -1, 321, -1, 197, 318, 01377 -1, 197, 140, 308, 318, -1, 308, 318, -1, 142, 01378 191, 316, -1, 321, -1, 189, -1, 321, -1, 192, 01379 -1, 197, 140, -1, 197, 140, 308, 140, -1, 308, 01380 140, -1, 167, -1, 197, 196, -1, 308, 196, -1, 01381 197, 140, 308, 196, -1, 195, -1, -1, 194, 192, 01382 -1, 96, 187, -1, 140, 195, -1, 321, -1, 187, 01383 -1, 95, 187, -1, 197, 140, 187, -1, 197, 140, 01384 95, 187, -1, 197, 140, 187, -1, 197, 140, 95, 01385 187, -1, 95, 187, -1, 260, -1, 261, -1, 264, 01386 -1, 265, -1, 266, -1, 269, -1, 285, -1, 287, 01387 -1, 53, -1, -1, 217, 200, 155, 227, -1, -1, 01388 90, 161, 201, 316, -1, 89, 156, 143, -1, 216, 01389 85, 56, -1, 86, 56, -1, 92, 188, 144, -1, 01390 93, 307, 137, -1, 30, -1, 31, 142, 192, 316, 01391 -1, 31, 142, 316, -1, 31, -1, -1, 46, 315, 01392 142, 202, 161, 316, -1, 39, 142, 161, 316, -1, 01393 39, 142, 316, -1, 310, 251, -1, 250, -1, 250, 01394 251, -1, 97, 242, -1, 218, 162, 228, 156, 230, 01395 227, -1, 219, 162, 228, 156, 231, 227, -1, -1, 01396 -1, 220, 203, 162, 229, 204, 156, 227, -1, -1, 01397 -1, 221, 205, 162, 229, 206, 156, 227, -1, 222, 01398 162, 314, 254, 227, -1, 222, 314, 254, 227, -1, 01399 -1, -1, 223, 232, 25, 207, 162, 229, 208, 156, 01400 227, -1, -1, 224, 177, 288, 209, 155, 227, -1, 01401 -1, -1, 224, 83, 161, 210, 319, 211, 155, 227, 01402 -1, -1, 225, 177, 212, 155, 227, -1, -1, 226, 01403 178, 213, 290, 155, 227, -1, -1, -1, 226, 305, 01404 313, 214, 178, 215, 290, 155, 227, -1, 21, -1, 01405 22, -1, 23, -1, 24, -1, 199, -1, 7, -1, 01406 11, -1, 12, -1, 18, -1, 19, -1, 16, -1, 01407 20, -1, 3, -1, 4, -1, 5, -1, 10, -1, 01408 319, -1, 13, -1, 319, 13, -1, 319, -1, 27, 01409 -1, 231, -1, 14, 162, 228, 156, 230, -1, 321, 01410 -1, 15, 156, -1, 175, -1, 168, -1, 293, -1, 01411 89, 235, 316, -1, 233, -1, 234, 140, 233, -1, 01412 234, -1, 234, 140, 95, 293, -1, 234, 140, 95, 01413 293, 140, 234, -1, 234, 140, 95, -1, 234, 140, 01414 95, 140, 234, -1, 95, 293, -1, 95, 293, 140, 01415 234, -1, 95, -1, 95, 140, 234, -1, 295, 140, 01416 298, 140, 301, 304, -1, 295, 140, 298, 140, 301, 01417 140, 295, 304, -1, 295, 140, 298, 304, -1, 295, 01418 140, 298, 140, 295, 304, -1, 295, 140, 301, 304, 01419 -1, 295, 140, -1, 295, 140, 301, 140, 295, 304, 01420 -1, 295, 304, -1, 298, 140, 301, 304, -1, 298, 01421 140, 301, 140, 295, 304, -1, 298, 304, -1, 298, 01422 140, 295, 304, -1, 301, 304, -1, 301, 140, 295, 01423 304, -1, 303, -1, 321, -1, 238, -1, 114, 239, 01424 114, -1, 76, -1, 114, 236, 239, 114, -1, 321, 01425 -1, 145, 240, -1, 241, -1, 240, 140, 241, -1, 01426 52, -1, 292, -1, -1, -1, 243, 244, 245, 246, 01427 -1, 142, 291, 239, 316, -1, 291, -1, 107, 156, 01428 137, -1, 29, 156, 10, -1, -1, 28, 248, 237, 01429 156, 10, -1, 167, 247, -1, 249, 139, 311, 190, 01430 -1, 249, 85, 311, 190, -1, 310, 189, -1, 216, 01431 139, 311, 190, -1, 216, 85, 311, 189, -1, 216, 01432 85, 312, -1, 216, 139, 189, -1, 216, 85, 189, 01433 -1, 32, 189, -1, 32, -1, 216, 138, 191, 317, 01434 -1, -1, 136, 252, 237, 156, 137, -1, -1, 26, 01435 253, 237, 156, 10, -1, 17, 197, 228, 156, 255, 01436 -1, 231, -1, 254, -1, 8, 257, 258, 228, 156, 01437 256, -1, 321, -1, 187, -1, 198, -1, 321, -1, 01438 88, 175, -1, 321, -1, 9, 156, -1, 321, -1, 01439 282, -1, 279, -1, 281, -1, 262, -1, 62, -1, 01440 263, -1, 262, 263, -1, 99, 271, 106, -1, 100, 01441 272, 106, -1, 101, 273, 65, -1, 102, 146, 106, 01442 -1, 102, 267, 106, -1, -1, 267, 268, 146, -1, 01443 274, -1, 268, 274, -1, 103, 146, 106, -1, 103, 01444 270, 106, -1, -1, 270, 61, 146, -1, -1, 271, 01445 274, -1, -1, 272, 274, -1, -1, 273, 274, -1, 01446 61, -1, -1, 105, 275, 278, -1, -1, -1, 104, 01447 276, 277, 156, 137, -1, 54, -1, 55, -1, 57, 01448 -1, 287, -1, 98, 280, -1, 178, -1, 55, -1, 01449 54, -1, 57, -1, 98, 272, 106, -1, 59, -1, 01450 60, -1, 122, 59, -1, 122, 60, -1, 52, -1, 01451 55, -1, 54, -1, 56, -1, 57, -1, 34, -1, 01452 33, -1, 35, -1, 36, -1, 50, -1, 49, -1, 01453 51, -1, 283, -1, 284, -1, 283, -1, 284, -1, 01454 63, -1, 64, -1, 319, -1, -1, 113, 289, 162, 01455 319, -1, 1, 319, -1, 142, 291, 316, -1, 291, 01456 319, -1, 295, 140, 299, 140, 301, 304, -1, 295, 01457 140, 299, 140, 301, 140, 295, 304, -1, 295, 140, 01458 299, 304, -1, 295, 140, 299, 140, 295, 304, -1, 01459 295, 140, 301, 304, -1, 295, 140, 301, 140, 295, 01460 304, -1, 295, 304, -1, 299, 140, 301, 304, -1, 01461 299, 140, 301, 140, 295, 304, -1, 299, 304, -1, 01462 299, 140, 295, 304, -1, 301, 304, -1, 301, 140, 01463 295, 304, -1, 303, -1, -1, 56, -1, 55, -1, 01464 54, -1, 57, -1, 292, -1, 52, -1, 293, -1, 01465 89, 235, 316, -1, 294, -1, 295, 140, 294, -1, 01466 52, 109, 187, -1, 52, 109, 216, -1, 297, -1, 01467 298, 140, 297, -1, 296, -1, 299, 140, 296, -1, 01468 119, -1, 95, -1, 300, 52, -1, 300, -1, 116, 01469 -1, 96, -1, 302, 52, -1, 140, 303, -1, 321, 01470 -1, 285, -1, -1, 142, 306, 161, 316, -1, 321, 01471 -1, 308, 318, -1, 309, -1, 308, 140, 309, -1, 01472 187, 88, 187, -1, 58, 187, -1, 52, -1, 56, 01473 -1, 53, -1, 52, -1, 56, -1, 53, -1, 183, 01474 -1, 52, -1, 53, -1, 183, -1, 139, -1, 85, 01475 -1, -1, 320, -1, -1, 147, -1, 315, 143, -1, 01476 315, 144, -1, -1, 147, -1, 140, -1, 145, -1, 01477 147, -1, 319, -1, 320, 145, -1, -1 01478 }; 01479 01480 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01481 static const yytype_uint16 yyrline[] = 01482 { 01483 0, 782, 782, 782, 813, 824, 833, 841, 849, 855, 01484 857, 856, 880, 913, 924, 933, 941, 949, 955, 955, 01485 963, 971, 982, 992, 1000, 1009, 1018, 1031, 1044, 1053, 01486 1065, 1066, 1076, 1105, 1126, 1143, 1160, 1171, 1188, 1198, 01487 1207, 1216, 1225, 1228, 1237, 1249, 1250, 1258, 1266, 1274, 01488 1282, 1285, 1297, 1298, 1301, 1302, 1311, 1323, 1322, 1344, 01489 1353, 1365, 1374, 1386, 1395, 1407, 1416, 1425, 1433, 1441, 01490 1451, 1452, 1462, 1463, 1473, 1481, 1489, 1497, 1506, 1514, 01491 1523, 1531, 1540, 1548, 1559, 1560, 1570, 1578, 1588, 1596, 01492 1606, 1610, 1614, 1622, 1630, 1638, 1646, 1658, 1668, 1680, 01493 1689, 1698, 1706, 1714, 1722, 1730, 1743, 1756, 1767, 1775, 01494 1778, 1786, 1794, 1804, 1805, 1806, 1807, 1812, 1823, 1824, 01495 1827, 1835, 1838, 1846, 1846, 1856, 1857, 1858, 1859, 1860, 01496 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 01497 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 01498 1881, 1882, 1883, 1884, 1887, 1887, 1887, 1888, 1888, 1889, 01499 1889, 1889, 1890, 1890, 1890, 1890, 1891, 1891, 1891, 1891, 01500 1892, 1892, 1892, 1893, 1893, 1893, 1893, 1894, 1894, 1894, 01501 1894, 1895, 1895, 1895, 1895, 1896, 1896, 1896, 1896, 1897, 01502 1897, 1897, 1897, 1898, 1898, 1901, 1910, 1920, 1949, 1980, 01503 2006, 2023, 2040, 2057, 2068, 2079, 2090, 2104, 2118, 2126, 01504 2134, 2142, 2150, 2158, 2166, 2175, 2184, 2192, 2200, 2208, 01505 2216, 2224, 2232, 2240, 2248, 2256, 2264, 2272, 2280, 2288, 01506 2299, 2307, 2315, 2323, 2331, 2339, 2347, 2355, 2355, 2365, 01507 2375, 2381, 2393, 2394, 2398, 2406, 2416, 2426, 2427, 2430, 01508 2431, 2432, 2436, 2444, 2454, 2463, 2471, 2481, 2490, 2499, 01509 2499, 2511, 2521, 2525, 2531, 2539, 2547, 2561, 2577, 2591, 01510 2606, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 01511 2633, 2632, 2657, 2657, 2666, 2674, 2682, 2690, 2703, 2711, 01512 2719, 2727, 2735, 2743, 2743, 2753, 2761, 2769, 2780, 2781, 01513 2792, 2796, 2808, 2820, 2820, 2820, 2831, 2831, 2831, 2842, 01514 2853, 2862, 2864, 2861, 2928, 2927, 2949, 2954, 2948, 2973, 01515 2972, 2994, 2993, 3016, 3017, 3016, 3037, 3045, 3053, 3061, 01516 3071, 3083, 3089, 3095, 3101, 3107, 3113, 3119, 3125, 3131, 01517 3137, 3147, 3153, 3158, 3159, 3166, 3171, 3174, 3175, 3188, 01518 3189, 3199, 3200, 3203, 3211, 3221, 3229, 3239, 3247, 3256, 01519 3265, 3273, 3281, 3290, 3302, 3310, 3320, 3328, 3336, 3344, 01520 3352, 3360, 3369, 3377, 3385, 3393, 3401, 3409, 3417, 3425, 01521 3433, 3443, 3444, 3450, 3459, 3468, 3479, 3480, 3490, 3497, 01522 3506, 3514, 3520, 3523, 3520, 3541, 3549, 3559, 3563, 3570, 01523 3569, 3590, 3606, 3615, 3626, 3635, 3645, 3655, 3663, 3674, 01524 3685, 3693, 3701, 3716, 3715, 3735, 3734, 3755, 3767, 3768, 01525 3771, 3790, 3793, 3801, 3809, 3812, 3816, 3819, 3827, 3830, 01526 3831, 3839, 3842, 3859, 3860, 3861, 3871, 3881, 3908, 3973, 01527 3982, 3993, 4000, 4010, 4018, 4028, 4037, 4048, 4055, 4066, 01528 4073, 4084, 4091, 4102, 4109, 4138, 4140, 4139, 4156, 4162, 01529 4155, 4181, 4189, 4197, 4205, 4208, 4219, 4220, 4221, 4222, 01530 4225, 4255, 4256, 4257, 4265, 4275, 4276, 4277, 4278, 4279, 01531 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4291, 4304, 4314, 01532 4322, 4332, 4333, 4336, 4345, 4344, 4352, 4364, 4374, 4382, 01533 4390, 4398, 4406, 4414, 4422, 4430, 4438, 4446, 4454, 4462, 01534 4470, 4478, 4486, 4495, 4504, 4513, 4522, 4531, 4542, 4543, 01535 4550, 4559, 4578, 4585, 4598, 4610, 4622, 4630, 4646, 4654, 01536 4670, 4671, 4674, 4687, 4698, 4699, 4702, 4719, 4723, 4733, 01537 4743, 4743, 4772, 4773, 4783, 4790, 4800, 4808, 4818, 4819, 01538 4820, 4823, 4824, 4825, 4826, 4829, 4830, 4831, 4834, 4839, 01539 4846, 4847, 4850, 4851, 4854, 4857, 4860, 4861, 4862, 4865, 01540 4866, 4869, 4870, 4874 01541 }; 01542 #endif 01543 01544 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01545 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01546 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01547 static const char *const yytname[] = 01548 { 01549 "$end", "error", "$undefined", "keyword_class", "keyword_module", 01550 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", 01551 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", 01552 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", 01553 "keyword_when", "keyword_while", "keyword_until", "keyword_for", 01554 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", 01555 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", 01556 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", 01557 "keyword_self", "keyword_nil", "keyword_true", "keyword_false", 01558 "keyword_and", "keyword_or", "keyword_not", "modifier_if", 01559 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", 01560 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", 01561 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", 01562 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", 01563 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", 01564 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", 01565 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", 01566 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", 01567 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", 01568 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", 01569 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", 01570 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01571 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01572 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", 01573 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias", 01574 "id_core_set_variable_alias", "id_core_undef_method", 01575 "id_core_define_method", "id_core_define_singleton_method", 01576 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','", 01577 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program", 01578 "@1", "top_compstmt", "top_stmts", "top_stmt", "@2", "bodystmt", 01579 "compstmt", "stmts", "stmt", "@3", "command_asgn", "expr", "expr_value", 01580 "command_call", "block_command", "cmd_brace_block", "@4", "command", 01581 "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 01582 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 01583 "fitem", "undef_list", "@5", "op", "reswords", "arg", "@6", "arg_value", 01584 "aref_args", "paren_args", "opt_paren_args", "opt_call_args", 01585 "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args", 01586 "mrhs", "primary", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", 01587 "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "primary_value", 01588 "k_begin", "k_if", "k_unless", "k_while", "k_until", "k_case", "k_for", 01589 "k_class", "k_module", "k_def", "k_end", "then", "do", "if_tail", 01590 "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", "block_param", 01591 "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar", 01592 "lambda", "@24", "@25", "f_larglist", "lambda_body", "do_block", "@26", 01593 "block_call", "method_call", "brace_block", "@27", "@28", "case_body", 01594 "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", 01595 "strings", "string", "string1", "xstring", "regexp", "words", 01596 "word_list", "word", "qwords", "qword_list", "string_contents", 01597 "xstring_contents", "regexp_contents", "string_content", "@29", "@30", 01598 "@31", "string_dvar", "symbol", "sym", "dsym", "numeric", 01599 "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref", 01600 "superclass", "@32", "f_arglist", "f_args", "f_bad_arg", "f_norm_arg", 01601 "f_arg_item", "f_arg", "f_opt", "f_block_opt", "f_block_optarg", 01602 "f_optarg", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", 01603 "opt_f_block_arg", "singleton", "@33", "assoc_list", "assocs", "assoc", 01604 "operation", "operation2", "operation3", "dot_or_colon", "opt_terms", 01605 "opt_nl", "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01606 }; 01607 #endif 01608 01609 # ifdef YYPRINT 01610 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01611 token YYLEX-NUM. */ 01612 static const yytype_uint16 yytoknum[] = 01613 { 01614 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01615 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01616 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01617 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01618 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01619 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01620 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 01621 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 01622 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 01623 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 01624 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, 01625 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, 01626 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, 01627 370, 371, 372, 373, 374, 375, 123, 125, 91, 46, 01628 44, 96, 40, 41, 93, 59, 32, 10 01629 }; 01630 # endif 01631 01632 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01633 static const yytype_uint16 yyr1[] = 01634 { 01635 0, 148, 150, 149, 151, 152, 152, 152, 152, 153, 01636 154, 153, 155, 156, 157, 157, 157, 157, 159, 158, 01637 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01638 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01639 158, 158, 158, 160, 160, 161, 161, 161, 161, 161, 01640 161, 162, 163, 163, 164, 164, 164, 166, 165, 167, 01641 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 01642 168, 168, 169, 169, 170, 170, 170, 170, 170, 170, 01643 170, 170, 170, 170, 171, 171, 172, 172, 173, 173, 01644 174, 174, 174, 174, 174, 174, 174, 174, 174, 175, 01645 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, 01646 177, 177, 177, 178, 178, 178, 178, 178, 179, 179, 01647 180, 180, 181, 182, 181, 183, 183, 183, 183, 183, 01648 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01649 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01650 183, 183, 183, 183, 184, 184, 184, 184, 184, 184, 01651 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01652 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01653 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01654 184, 184, 184, 184, 184, 185, 185, 185, 185, 185, 01655 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01656 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01657 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01658 185, 185, 185, 185, 185, 185, 185, 186, 185, 185, 01659 185, 187, 188, 188, 188, 188, 189, 190, 190, 191, 01660 191, 191, 191, 191, 192, 192, 192, 192, 192, 194, 01661 193, 195, 196, 196, 197, 197, 197, 197, 198, 198, 01662 198, 199, 199, 199, 199, 199, 199, 199, 199, 199, 01663 200, 199, 201, 199, 199, 199, 199, 199, 199, 199, 01664 199, 199, 199, 202, 199, 199, 199, 199, 199, 199, 01665 199, 199, 199, 203, 204, 199, 205, 206, 199, 199, 01666 199, 207, 208, 199, 209, 199, 210, 211, 199, 212, 01667 199, 213, 199, 214, 215, 199, 199, 199, 199, 199, 01668 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01669 226, 227, 228, 228, 228, 229, 229, 230, 230, 231, 01670 231, 232, 232, 233, 233, 234, 234, 235, 235, 235, 01671 235, 235, 235, 235, 235, 235, 236, 236, 236, 236, 01672 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01673 236, 237, 237, 238, 238, 238, 239, 239, 240, 240, 01674 241, 241, 243, 244, 242, 245, 245, 246, 246, 248, 01675 247, 249, 249, 249, 250, 250, 250, 250, 250, 250, 01676 250, 250, 250, 252, 251, 253, 251, 254, 255, 255, 01677 256, 256, 257, 257, 257, 258, 258, 259, 259, 260, 01678 260, 260, 261, 262, 262, 262, 263, 264, 265, 266, 01679 266, 267, 267, 268, 268, 269, 269, 270, 270, 271, 01680 271, 272, 272, 273, 273, 274, 275, 274, 276, 277, 01681 274, 278, 278, 278, 278, 279, 280, 280, 280, 280, 01682 281, 282, 282, 282, 282, 283, 283, 283, 283, 283, 01683 284, 284, 284, 284, 284, 284, 284, 285, 285, 286, 01684 286, 287, 287, 288, 289, 288, 288, 290, 290, 291, 01685 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 01686 291, 291, 291, 291, 292, 292, 292, 292, 293, 293, 01687 294, 294, 295, 295, 296, 297, 298, 298, 299, 299, 01688 300, 300, 301, 301, 302, 302, 303, 304, 304, 305, 01689 306, 305, 307, 307, 308, 308, 309, 309, 310, 310, 01690 310, 311, 311, 311, 311, 312, 312, 312, 313, 313, 01691 314, 314, 315, 315, 316, 317, 318, 318, 318, 319, 01692 319, 320, 320, 321 01693 }; 01694 01695 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01696 static const yytype_uint8 yyr2[] = 01697 { 01698 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01699 0, 5, 4, 2, 1, 1, 3, 2, 0, 4, 01700 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 01701 1, 3, 3, 6, 5, 5, 5, 5, 3, 3, 01702 3, 3, 1, 3, 3, 1, 3, 3, 3, 2, 01703 1, 1, 1, 1, 1, 4, 4, 0, 5, 2, 01704 3, 4, 5, 4, 5, 2, 2, 2, 2, 2, 01705 1, 3, 1, 3, 1, 2, 3, 5, 2, 4, 01706 2, 4, 1, 3, 1, 3, 2, 3, 1, 3, 01707 1, 1, 4, 3, 3, 3, 3, 2, 1, 1, 01708 1, 4, 3, 3, 3, 3, 2, 1, 1, 1, 01709 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 01710 1, 1, 1, 0, 4, 1, 1, 1, 1, 1, 01711 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01712 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01713 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01714 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01715 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01716 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01717 1, 1, 1, 1, 1, 3, 5, 3, 5, 6, 01718 5, 5, 5, 5, 4, 3, 3, 3, 3, 3, 01719 3, 3, 3, 3, 4, 4, 2, 2, 3, 3, 01720 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 01721 3, 2, 2, 3, 3, 3, 3, 0, 4, 6, 01722 1, 1, 1, 2, 4, 2, 3, 1, 1, 1, 01723 1, 2, 4, 2, 1, 2, 2, 4, 1, 0, 01724 2, 2, 2, 1, 1, 2, 3, 4, 3, 4, 01725 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01726 0, 4, 0, 4, 3, 3, 2, 3, 3, 1, 01727 4, 3, 1, 0, 6, 4, 3, 2, 1, 2, 01728 2, 6, 6, 0, 0, 7, 0, 0, 7, 5, 01729 4, 0, 0, 9, 0, 6, 0, 0, 8, 0, 01730 5, 0, 6, 0, 0, 9, 1, 1, 1, 1, 01731 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01732 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 01733 2, 1, 1, 1, 3, 1, 3, 1, 4, 6, 01734 3, 5, 2, 4, 1, 3, 6, 8, 4, 6, 01735 4, 2, 6, 2, 4, 6, 2, 4, 2, 4, 01736 1, 1, 1, 3, 1, 4, 1, 2, 1, 3, 01737 1, 1, 0, 0, 4, 4, 1, 3, 3, 0, 01738 5, 2, 4, 4, 2, 4, 4, 3, 3, 3, 01739 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 01740 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 01741 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 01742 3, 0, 3, 1, 2, 3, 3, 0, 3, 0, 01743 2, 0, 2, 0, 2, 1, 0, 3, 0, 0, 01744 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 01745 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 01746 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01747 1, 1, 1, 1, 0, 4, 2, 3, 2, 6, 01748 8, 4, 6, 4, 6, 2, 4, 6, 2, 4, 01749 2, 4, 1, 0, 1, 1, 1, 1, 1, 1, 01750 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 01751 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 01752 0, 4, 1, 2, 1, 3, 3, 2, 1, 1, 01753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01754 0, 1, 0, 1, 2, 2, 0, 1, 1, 1, 01755 1, 1, 2, 0 01756 }; 01757 01758 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 01759 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 01760 means the default is an error. */ 01761 static const yytype_uint16 yydefact[] = 01762 { 01763 2, 0, 0, 1, 0, 338, 339, 340, 0, 331, 01764 332, 333, 336, 334, 335, 337, 326, 327, 328, 329, 01765 289, 259, 259, 481, 480, 482, 483, 562, 0, 562, 01766 10, 0, 485, 484, 486, 475, 550, 477, 476, 478, 01767 479, 471, 472, 433, 491, 492, 0, 0, 0, 0, 01768 0, 573, 573, 82, 392, 451, 449, 451, 453, 441, 01769 447, 0, 0, 0, 3, 560, 6, 9, 30, 42, 01770 45, 53, 52, 0, 70, 0, 74, 84, 0, 50, 01771 240, 0, 280, 0, 0, 303, 306, 560, 0, 0, 01772 0, 0, 54, 298, 271, 272, 432, 434, 273, 274, 01773 275, 276, 430, 431, 429, 487, 488, 277, 0, 278, 01774 259, 5, 8, 164, 175, 165, 188, 161, 181, 171, 01775 170, 191, 192, 186, 169, 168, 163, 189, 193, 194, 01776 173, 162, 176, 180, 182, 174, 167, 183, 190, 185, 01777 184, 177, 187, 172, 160, 179, 178, 159, 166, 157, 01778 158, 154, 155, 156, 113, 115, 114, 149, 150, 146, 01779 128, 129, 130, 137, 134, 136, 131, 132, 151, 152, 01780 138, 139, 143, 133, 135, 125, 126, 127, 140, 141, 01781 142, 144, 145, 147, 148, 153, 118, 120, 122, 23, 01782 116, 117, 119, 121, 0, 0, 0, 0, 0, 0, 01783 0, 254, 0, 241, 264, 68, 258, 573, 0, 487, 01784 488, 0, 278, 573, 544, 69, 67, 562, 66, 0, 01785 573, 410, 65, 562, 563, 0, 0, 18, 237, 0, 01786 0, 326, 327, 289, 292, 411, 216, 0, 0, 217, 01787 286, 0, 0, 0, 560, 15, 562, 72, 14, 282, 01788 0, 566, 566, 242, 0, 0, 566, 542, 562, 0, 01789 0, 0, 80, 330, 0, 90, 91, 98, 300, 393, 01790 468, 467, 469, 466, 0, 465, 0, 0, 0, 0, 01791 0, 0, 0, 473, 474, 49, 231, 232, 569, 570, 01792 4, 571, 561, 0, 0, 0, 0, 0, 0, 0, 01793 399, 401, 0, 86, 0, 78, 75, 0, 0, 0, 01794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01796 0, 0, 0, 0, 0, 573, 0, 0, 51, 0, 01797 0, 0, 0, 560, 0, 561, 0, 352, 351, 0, 01798 0, 487, 488, 278, 108, 109, 0, 0, 111, 0, 01799 0, 487, 488, 278, 319, 184, 177, 187, 172, 154, 01800 155, 156, 113, 114, 540, 321, 539, 0, 0, 0, 01801 415, 413, 299, 435, 0, 0, 404, 59, 297, 123, 01802 547, 286, 265, 261, 0, 0, 0, 255, 263, 0, 01803 573, 0, 0, 0, 0, 256, 562, 0, 291, 260, 01804 562, 250, 573, 573, 249, 562, 296, 48, 20, 22, 01805 21, 0, 293, 0, 0, 0, 0, 0, 0, 17, 01806 562, 284, 13, 561, 71, 562, 287, 568, 567, 243, 01807 568, 245, 288, 543, 0, 97, 473, 474, 88, 83, 01808 0, 0, 573, 0, 513, 455, 458, 456, 470, 452, 01809 436, 450, 437, 438, 454, 439, 440, 0, 443, 445, 01810 0, 446, 0, 0, 572, 7, 24, 25, 26, 27, 01811 28, 46, 47, 573, 0, 31, 40, 0, 41, 562, 01812 0, 76, 87, 44, 43, 0, 195, 264, 39, 213, 01813 221, 226, 227, 228, 223, 225, 235, 236, 229, 230, 01814 206, 207, 233, 234, 562, 222, 224, 218, 219, 220, 01815 208, 209, 210, 211, 212, 551, 556, 552, 557, 409, 01816 259, 407, 562, 551, 553, 552, 554, 408, 259, 0, 01817 573, 343, 0, 342, 0, 0, 0, 0, 0, 0, 01818 286, 0, 573, 0, 311, 316, 108, 109, 110, 0, 01819 494, 314, 493, 0, 573, 0, 0, 0, 513, 559, 01820 558, 323, 551, 552, 259, 259, 573, 573, 32, 197, 01821 38, 205, 57, 60, 0, 195, 546, 0, 266, 262, 01822 573, 555, 552, 562, 551, 552, 545, 290, 564, 246, 01823 251, 253, 295, 19, 0, 238, 0, 29, 0, 573, 01824 204, 73, 16, 283, 566, 0, 81, 94, 96, 562, 01825 551, 552, 519, 516, 515, 514, 517, 0, 531, 535, 01826 534, 530, 513, 0, 396, 518, 520, 522, 573, 528, 01827 573, 533, 573, 0, 512, 459, 0, 442, 444, 448, 01828 214, 215, 384, 573, 0, 382, 381, 270, 0, 85, 01829 79, 0, 0, 0, 0, 0, 0, 406, 63, 0, 01830 412, 0, 0, 248, 405, 61, 247, 341, 281, 573, 01831 573, 421, 573, 344, 573, 346, 304, 345, 307, 0, 01832 0, 310, 555, 285, 562, 551, 552, 0, 0, 496, 01833 0, 0, 108, 109, 112, 562, 0, 562, 513, 0, 01834 0, 0, 403, 56, 402, 55, 0, 0, 0, 573, 01835 124, 267, 257, 0, 0, 412, 0, 0, 573, 562, 01836 11, 244, 89, 92, 0, 519, 0, 364, 355, 357, 01837 562, 353, 573, 0, 0, 394, 0, 505, 538, 0, 01838 508, 532, 0, 510, 536, 0, 461, 462, 463, 457, 01839 464, 519, 0, 573, 0, 573, 526, 573, 573, 380, 01840 386, 0, 0, 268, 77, 196, 0, 37, 202, 36, 01841 203, 64, 565, 0, 34, 200, 35, 201, 62, 422, 01842 423, 573, 424, 0, 573, 349, 0, 0, 347, 0, 01843 0, 0, 309, 0, 0, 412, 0, 317, 0, 0, 01844 412, 320, 541, 562, 0, 498, 324, 0, 0, 198, 01845 0, 0, 252, 294, 524, 562, 0, 362, 0, 521, 01846 562, 0, 0, 523, 573, 573, 537, 573, 529, 573, 01847 573, 0, 0, 390, 387, 388, 391, 0, 383, 371, 01848 373, 0, 376, 0, 378, 400, 269, 239, 33, 199, 01849 0, 0, 426, 350, 0, 12, 428, 0, 301, 302, 01850 0, 0, 266, 573, 312, 0, 495, 315, 497, 322, 01851 513, 416, 414, 0, 354, 365, 0, 360, 356, 395, 01852 398, 397, 0, 501, 0, 503, 0, 509, 0, 506, 01853 511, 460, 0, 525, 0, 385, 573, 573, 573, 527, 01854 573, 573, 0, 425, 0, 99, 100, 107, 0, 427, 01855 0, 305, 308, 418, 419, 417, 0, 0, 0, 58, 01856 0, 363, 0, 358, 573, 573, 573, 573, 286, 0, 01857 389, 0, 368, 0, 370, 377, 0, 374, 379, 106, 01858 0, 573, 0, 573, 573, 0, 318, 0, 361, 0, 01859 502, 0, 499, 504, 507, 555, 285, 573, 573, 573, 01860 573, 555, 105, 562, 551, 552, 420, 348, 313, 325, 01861 359, 573, 369, 0, 366, 372, 375, 412, 500, 573, 01862 367 01863 }; 01864 01865 /* YYDEFGOTO[NTERM-NUM]. */ 01866 static const yytype_int16 yydefgoto[] = 01867 { 01868 -1, 1, 2, 64, 65, 66, 229, 539, 540, 244, 01869 245, 421, 68, 69, 339, 70, 71, 583, 719, 72, 01870 73, 246, 74, 75, 76, 449, 77, 202, 358, 359, 01871 186, 187, 188, 189, 584, 536, 191, 79, 423, 204, 01872 250, 529, 674, 410, 411, 218, 219, 206, 397, 412, 01873 488, 80, 337, 435, 604, 341, 800, 342, 801, 697, 01874 926, 701, 698, 875, 566, 568, 711, 880, 237, 82, 01875 83, 84, 85, 86, 87, 88, 89, 90, 91, 678, 01876 542, 686, 797, 798, 350, 738, 739, 740, 763, 654, 01877 655, 764, 844, 845, 268, 269, 454, 633, 745, 301, 01878 483, 92, 93, 388, 577, 576, 549, 925, 680, 791, 01879 861, 865, 94, 95, 96, 97, 98, 99, 100, 280, 01880 467, 101, 282, 276, 274, 278, 459, 646, 645, 755, 01881 759, 102, 275, 103, 104, 209, 210, 107, 211, 212, 01882 561, 700, 709, 710, 635, 636, 637, 638, 639, 766, 01883 767, 640, 641, 642, 643, 836, 747, 377, 567, 255, 01884 413, 214, 238, 608, 531, 571, 290, 407, 408, 670, 01885 439, 543, 345, 248 01886 }; 01887 01888 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01889 STATE-NUM. */ 01890 #define YYPACT_NINF -747 01891 static const yytype_int16 yypact[] = 01892 { 01893 -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747, 01894 -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747, 01895 7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31, 01896 -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842, 01897 -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434, 01898 8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24, 01899 29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458, 01900 -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797, 01901 22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056, 01902 9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747, 01903 -747, -747, -747, -747, -747, 25, 58, -747, 179, 613, 01904 51, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01905 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01906 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01907 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01908 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01909 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01910 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01911 -747, -747, -747, -747, -747, -747, -747, -747, -747, 134, 01912 -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519, 01913 8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43, 01914 206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320, 01915 7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287, 01916 4694, -747, -747, -747, 295, 307, -747, 304, 51, 416, 01917 619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458, 01918 419, 221, 300, -747, 260, 430, 300, -747, -31, 497, 01919 501, 9266, 442, -747, 351, 366, 383, 409, -747, -747, 01920 -747, -747, -747, -747, 644, -747, 754, 813, 605, 464, 01921 819, 478, 68, 530, 532, -747, -747, -747, -747, -747, 01922 -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628, 01923 -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519, 01924 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01925 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01926 8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86, 01927 86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454, 01928 601, 54, 76, 99, 331, 349, 8628, 481, -747, 45, 01929 473, -747, -747, -747, -747, 217, 286, 305, 318, 321, 01930 347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549, 01931 -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747, 01932 -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702, 01933 7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747, 01934 -31, -747, 506, 539, -747, 106, -747, -747, -747, -747, 01935 -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104, 01936 -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747, 01937 7865, -747, -747, -747, 272, 510, -747, -747, -747, 543, 01938 9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747, 01939 -747, -747, -747, -747, -747, -747, -747, 313, -747, -747, 01940 491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747, 01941 -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31, 01942 9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416, 01943 2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184, 01944 1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768, 01945 397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747, 01946 307, -747, -31, 647, -747, 660, -747, -747, 3096, 650, 01947 688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650, 01948 112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193, 01949 -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747, 01950 -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608, 01951 -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747, 01952 265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747, 01953 7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307, 01954 2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31, 01955 38, 261, 603, -747, -747, -747, -747, 972, -747, -747, 01956 -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747, 01957 583, 683, 589, 687, -747, -747, 893, -747, -747, -747, 01958 416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747, 01959 543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608, 01960 677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301, 01961 740, -747, 588, -747, 740, -747, -747, -747, -747, 650, 01962 44, -747, 239, 257, -31, 141, 145, 8628, 193, -747, 01963 8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609, 01964 193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32, 01965 -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106, 01966 -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651, 01967 -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223, 01968 -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747, 01969 -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747, 01970 -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747, 01971 2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545, 01972 -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650, 01973 4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650, 01974 -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797, 01975 4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747, 01976 -31, 803, 686, -747, 676, 678, -747, 684, -747, 694, 01977 684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251, 01978 -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797, 01979 9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747, 01980 650, 650, -747, 365, -747, 3609, -747, -747, -747, -747, 01981 1131, -747, -747, 706, -747, 707, 884, 716, -747, -747, 01982 -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747, 01983 -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747, 01984 717, 684, 797, -747, 523, 366, 383, 409, 3609, -747, 01985 3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747, 01986 884, 707, 884, 721, 684, 727, 684, 684, -747, 10318, 01987 -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510, 01988 10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884, 01989 -747, 598, -747, -747, -747, 730, 731, 684, 735, 684, 01990 684, 55, 282, -31, 128, 158, -747, -747, -747, -747, 01991 707, 684, -747, 598, -747, -747, -747, 163, -747, 684, 01992 -747 01993 }; 01994 01995 /* YYPGOTO[NTERM-NUM]. */ 01996 static const yytype_int16 yypgoto[] = 01997 { 01998 -747, -747, -747, 452, -747, 28, -747, -545, 277, -747, 01999 39, -747, -293, 184, -58, 71, -747, -169, -747, -7, 02000 791, -142, -13, -37, -747, -396, -29, 1623, -312, 788, 02001 -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45, 02002 -747, 11, 47, -324, 115, 5, -747, -322, -196, 53, 02003 -295, 8, -747, -747, -747, -747, -747, -747, -747, -747, 02004 -747, -747, -747, -747, -747, -747, -747, -747, 2, -747, 02005 -747, -747, -747, -747, -747, -747, -747, -747, -747, 205, 02006 -338, -516, -72, -618, -747, -722, -671, 147, -747, -489, 02007 -747, -600, -747, -12, -747, -747, -747, -747, -747, -747, 02008 -747, -747, -747, 798, -747, -747, -531, -747, -50, -747, 02009 -747, -747, -747, -747, -747, 811, -747, -747, -747, -747, 02010 -747, -747, -747, -747, 856, -747, -140, -747, -747, -747, 02011 -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575, 02012 -747, -747, 35, -387, -697, -568, -690, 273, -696, -746, 02013 72, 181, -747, -526, -747, -449, 270, -747, -747, -747, 02014 97, -360, 758, -276, -747, -747, -56, -4, 278, -585, 02015 -214, 6, -18, -2 02016 }; 02017 02018 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 02019 positive, shift that token. If negative, reduce the rule which 02020 number is the opposite. If zero, do what YYDEFACT says. 02021 If YYTABLE_NINF, syntax error. */ 02022 #define YYTABLE_NINF -574 02023 static const yytype_int16 yytable[] = 02024 { 02025 111, 273, 544, 227, 81, 644, 81, 254, 725, 201, 02026 201, 532, 498, 201, 493, 192, 689, 405, 208, 208, 02027 193, 706, 208, 225, 262, 228, 340, 222, 190, 343, 02028 688, 344, 112, 221, 733, 192, 247, 375, 441, 306, 02029 193, 67, 443, 67, 596, 558, 559, 292, 190, 253, 02030 257, 81, 208, 838, 616, 264, 833, 541, 530, 741, 02031 538, 263, 794, -93, 208, 846, 799, 634, -103, 207, 02032 207, 291, 380, 207, 589, 190, 593, 380, 264, -99, 02033 596, 3, 589, 685, 263, 208, 208, 716, 717, 208, 02034 349, 360, 360, 291, 660, 743, 263, 263, 263, 541, 02035 430, -100, 574, 575, 251, 909, 888, -330, 652, 805, 02036 230, 190, -489, 213, 213, 387, 224, 213, 378, 644, 02037 810, 386, 279, 530, -107, 538, 334, 768, 619, 470, 02038 -489, 205, 215, 285, -99, 216, 461, -106, 464, 240, 02039 468, -102, 830, 298, 299, -490, 653, -93, 252, 256, 02040 390, 609, -99, 392, 393, 885, 809, 300, 560, 833, 02041 -330, -330, 489, 847, 814, -90, -102, -100, 741, 827, 02042 -104, -104, 379, 744, 471, 281, -101, 609, -93, 335, 02043 336, -93, 381, 644, 803, -93, 302, 381, 432, 288, 02044 288, 289, 289, 220, -90, 909, 838, -551, -91, 81, 02045 -103, 288, -103, 289, 769, 398, 833, 846, 888, 303, 02046 201, 398, 201, 201, -101, 931, -91, 405, 414, 208, 02047 835, 208, 208, 839, 448, 208, 433, 208, 694, 247, 02048 820, 288, 81, 289, 249, 476, 477, 478, 479, -98, 02049 705, 596, 223, 81, 81, 742, 221, 224, 307, 386, 02050 291, 704, -97, 224, 444, 923, 56, 486, 741, 644, 02051 741, 958, 497, 264, -103, 774, 384, 338, 338, 263, 02052 207, 338, 207, -102, 389, -102, 491, 609, 589, 589, 02053 429, -93, -105, 545, 546, -95, -95, 547, 980, 609, 02054 874, 247, 399, -490, 81, 208, 208, 208, 208, 81, 02055 208, 208, -481, -104, 208, -104, 81, 264, -101, 208, 02056 -101, 283, 284, 263, 213, -100, 213, -412, 741, 933, 02057 475, 813, -71, 907, 223, 910, 243, 648, 201, -92, 02058 927, 67, 406, 414, 409, 391, 480, 208, 288, 81, 02059 289, 403, 924, 208, 208, 400, 401, 537, 395, 291, 02060 586, 588, 804, -85, 528, 487, -481, -548, 208, 254, 02061 487, 437, 741, -107, 741, 562, 935, -285, 438, 493, 02062 -95, -480, 394, 485, 455, -549, -412, 396, 494, -94, 02063 793, -551, 548, 957, 790, 402, 208, 208, 987, 426, 02064 -482, 741, 588, 201, 722, 254, 603, -96, 414, -552, 02065 731, -95, 208, -483, -95, 404, -485, 415, -95, 417, 02066 398, 398, 537, 448, 422, 968, -475, 456, 457, 528, 02067 -285, -285, 111, 424, -552, -480, 81, -412, 192, -412, 02068 -412, 644, -484, 193, -478, 81, 451, 217, 537, 657, 02069 440, 190, 400, 427, -482, 201, 528, 438, -486, 220, 02070 414, -487, 264, 448, 208, 578, 580, -483, 263, 647, 02071 -485, -475, 596, 67, 537, 308, -478, -548, -488, -475, 02072 -475, 528, 612, -548, 243, 428, 569, 338, 338, 338, 02073 338, 656, 481, 482, 308, -549, -484, -478, -478, 452, 02074 453, -549, 264, 590, -278, 298, 299, -106, 263, 781, 02075 589, 416, -486, 497, -487, -487, 788, 425, -70, 735, 02076 664, 623, 624, 625, 626, -475, 331, 332, 333, 243, 02077 -478, -488, -488, 918, 434, 338, 338, 431, 669, 920, 02078 570, -555, 722, 556, 614, 668, 676, 557, 681, 551, 02079 555, 667, 721, 675, 81, 201, 81, -278, -278, 673, 02080 414, 687, 687, 445, 208, 588, 254, 201, 563, 720, 02081 446, 447, 414, 436, 537, 699, 208, 442, 81, 208, 02082 465, 528, 676, 676, 656, 656, 537, 726, 732, 713, 02083 715, 243, 450, 528, 469, 673, 673, 727, 398, 669, 02084 -555, 192, 552, 553, 821, -286, 193, 826, 472, -102, 02085 473, 690, 796, 793, 190, 939, 208, 676, 950, -104, 02086 492, 564, 565, 773, 548, 669, -101, 264, 550, 667, 02087 673, 712, 714, 263, 448, 474, 554, 973, 761, 582, 02088 623, 624, 625, 626, 789, 598, 748, 649, 748, 806, 02089 748, -555, 808, -555, -555, 607, 600, -551, -286, -286, 02090 735, 770, 623, 624, 625, 626, 81, 816, 564, 565, 02091 677, 951, 952, 264, 208, 627, 455, 208, 208, 263, 02092 463, 628, 629, 208, 208, 662, 609, 792, 795, 601, 02093 795, -85, 795, 615, 597, -264, 658, 627, 599, 824, 02094 669, 661, 630, 602, 629, 631, 679, 728, 683, 208, 02095 385, 669, 208, 81, 807, 455, 428, 730, 611, 456, 02096 457, 81, 734, 613, 630, 418, 815, 656, 81, 81, 02097 746, 762, -107, 749, 419, 420, 398, 856, -106, 752, 02098 308, 190, 487, 494, 671, 751, 777, 779, 867, 754, 02099 770, 776, 784, 786, -265, 81, 81, 672, 456, 457, 02100 458, 707, 782, -98, 691, 793, -102, 81, 872, -97, 02101 110, 770, 110, 748, 783, 748, 748, 659, 735, -104, 02102 623, 624, 625, 626, 110, 110, 822, 254, 110, 329, 02103 330, 331, 332, 333, 762, 208, -101, -93, 729, 862, 02104 842, 828, 866, 848, 849, 81, 851, 853, 208, 855, 02105 -95, 860, 81, 81, -266, 864, 81, 110, 110, 881, 02106 882, 886, 687, 890, 876, 455, 892, -92, 894, 682, 02107 110, 684, 81, 891, 896, 905, 622, 901, 623, 624, 02108 625, 626, 748, 748, 898, 748, 308, 748, 748, 904, 02109 -267, 110, 110, 929, 903, 110, 938, 930, 941, 308, 02110 263, 321, 322, 949, 858, 943, 932, 946, 456, 457, 02111 460, 959, 914, 627, 321, 322, 81, 961, 263, 628, 02112 629, 795, -551, -552, 455, 983, 606, 81, 364, 347, 02113 455, 338, 977, 825, 338, 329, 330, 331, 332, 333, 02114 630, 382, 940, 631, 802, 326, 327, 328, 329, 330, 02115 331, 332, 333, 976, 748, 748, 748, 383, 748, 748, 02116 750, 811, 753, 277, 376, 928, 632, 456, 457, 462, 02117 81, 906, 81, 456, 457, 466, 765, 834, 81, 0, 02118 81, 771, 748, 748, 748, 748, 735, 0, 623, 624, 02119 625, 626, 0, 0, 201, 0, 0, 756, 757, 414, 02120 758, 681, 795, 208, 0, 110, 44, 45, 0, 528, 02121 0, 0, 0, 537, 0, 748, 748, 748, 748, 669, 02122 528, 0, 0, 736, 0, 110, 0, 110, 110, 748, 02123 338, 110, 0, 110, 0, 812, 0, 748, 110, 0, 02124 0, 0, 0, 817, 818, 308, 0, 0, 0, 110, 02125 110, 0, 868, 0, 869, 0, 0, 823, 0, 0, 02126 321, 322, 0, 0, 877, 0, 0, 0, 829, 879, 02127 831, 832, 837, 0, 735, 840, 623, 624, 625, 626, 02128 0, 0, 841, 0, 0, 850, 0, 852, 854, 0, 02129 0, 0, 0, 328, 329, 330, 331, 332, 333, 0, 02130 110, 110, 110, 110, 110, 110, 110, 110, 0, 0, 02131 110, 736, 110, 0, 0, 110, 0, 737, 0, 843, 02132 863, 623, 624, 625, 626, 921, 922, 870, 871, 0, 02133 0, 873, 203, 203, 0, 0, 203, 0, 0, 0, 02134 0, 878, 0, 110, 0, 110, 0, 883, 0, 110, 02135 110, 0, 0, 884, 893, 895, 0, 897, 889, 899, 02136 900, 0, 236, 239, 110, 0, 0, 203, 203, 0, 02137 0, 0, 0, 0, 908, 0, 911, 0, 286, 287, 02138 0, 735, 956, 623, 624, 625, 626, 0, 0, 0, 02139 0, 919, 110, 110, 293, 294, 295, 296, 297, 0, 02140 0, 0, 0, 0, 0, 0, 0, 0, 110, 0, 02141 978, 0, 979, 0, 0, 934, 0, 936, 736, 0, 02142 0, 937, 0, 0, 887, 0, 942, 944, 945, 0, 02143 947, 948, 110, 622, 0, 623, 624, 625, 626, 0, 02144 0, 110, 0, 0, 0, 953, 0, 954, 0, 0, 02145 0, 0, 0, 955, 960, 962, 963, 964, 0, 0, 02146 110, 0, 0, 0, 967, 0, 969, 0, 0, 970, 02147 627, 0, 0, 0, 0, 0, 628, 629, 0, 0, 02148 0, 0, 0, 0, 981, 0, 0, 982, 984, 985, 02149 986, 0, 0, 0, 0, 0, 0, 630, 0, 0, 02150 631, 988, 0, 0, 0, 0, 989, 0, 0, 990, 02151 0, 203, 0, 0, 203, 203, 286, 0, 0, 0, 02152 105, 0, 105, 708, 0, 622, 0, 623, 624, 625, 02153 626, 0, 0, 203, 0, 203, 203, 0, 0, 0, 02154 0, 108, 0, 108, 0, 0, 0, 0, 0, 0, 02155 110, 0, 110, 761, 0, 623, 624, 625, 626, 0, 02156 110, 0, 627, 0, 0, 0, 0, 105, 628, 629, 02157 0, 265, 110, 0, 110, 110, 0, 0, 0, 0, 02158 0, 0, 0, 0, 0, 0, 0, 0, 108, 630, 02159 627, 0, 631, 0, 265, 0, 628, 629, 0, 0, 02160 0, 0, 0, 0, 0, 0, 351, 361, 361, 361, 02161 0, 0, 110, 0, 0, 0, 0, 630, 203, 0, 02162 631, 0, 0, 496, 499, 500, 501, 502, 503, 504, 02163 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 02164 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 02165 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 02166 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 02167 110, 0, 0, 110, 110, 0, 0, 0, 0, 110, 02168 110, 0, 308, 309, 310, 311, 312, 313, 314, 315, 02169 316, 317, 318, -574, -574, 0, 0, 321, 322, 0, 02170 579, 581, 0, 0, 0, 110, 0, 0, 110, 110, 02171 585, 203, 203, 0, 0, 105, 203, 110, 579, 581, 02172 203, 0, 0, 0, 110, 110, 324, 325, 326, 327, 02173 328, 329, 330, 331, 332, 333, 108, 0, 0, 605, 02174 0, 0, 0, 0, 610, 0, 0, 0, 105, 0, 02175 0, 110, 110, 203, 0, 0, 203, 0, 0, 105, 02176 105, 0, 0, 110, 0, 0, 0, 0, 203, 108, 02177 0, 0, 0, 0, 0, 0, 0, 0, 0, 265, 02178 108, 108, 0, 0, 0, 0, 0, 0, 650, 651, 02179 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 02180 203, 110, 0, 0, 110, 0, 0, 0, 110, 110, 02181 105, 0, 110, 0, 0, 105, 0, 0, 0, 0, 02182 0, 0, 105, 265, 0, 0, 0, 109, 110, 109, 02183 0, 108, 0, 0, 0, 0, 108, 0, 0, 0, 02184 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02185 0, 0, 0, 0, 0, 105, 0, 106, 0, 106, 02186 0, 0, 0, 0, 203, 0, 0, 0, 203, 0, 02187 0, 0, 110, 0, 109, 78, 108, 78, 267, 0, 02188 203, 0, 0, 110, 0, 0, 0, 0, 0, 0, 02189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02190 0, 267, 0, 203, 106, 0, 0, 0, 266, 0, 02191 0, 0, 0, 353, 363, 363, 203, 203, 0, 0, 02192 0, 0, 78, 0, 0, 0, 110, 0, 110, 0, 02193 0, 266, 0, 0, 110, 0, 110, 0, 0, 0, 02194 0, 0, 105, 352, 362, 362, 362, 0, 0, 0, 02195 0, 105, 0, 0, 0, 0, 0, 0, 0, 110, 02196 0, 348, 0, 108, 0, 0, 0, 0, 265, 0, 02197 0, 0, 108, 0, 203, 0, 0, 0, 585, 775, 02198 0, 778, 780, 0, 0, 0, 0, 785, 787, -573, 02199 0, 0, 0, 0, 0, 203, 0, -573, -573, -573, 02200 0, 0, -573, -573, -573, 0, -573, 0, 265, 0, 02201 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02202 0, 0, 109, 0, 0, 0, -573, -573, 0, -573, 02203 -573, -573, -573, -573, 819, 0, 0, 0, 0, 778, 02204 780, 0, 785, 787, 0, 0, 0, 0, 0, 0, 02205 203, 0, 106, 0, 0, 109, 0, 0, 0, 0, 02206 105, 0, 105, 0, 0, 0, 109, 109, 0, 0, 02207 78, 0, 0, 0, -573, 0, 0, 0, 0, 0, 02208 0, 108, 0, 108, 105, 106, 267, 0, 203, 0, 02209 0, 0, 857, 0, 0, 0, 106, 106, 0, 859, 02210 0, 0, 0, 78, 0, 108, 0, 0, 0, 0, 02211 0, 0, 0, 0, 78, 78, 266, 109, 0, 203, 02212 0, 0, 109, 0, 0, 0, -573, 0, -573, 109, 02213 267, 220, -573, 265, -573, 0, -573, 859, 203, 0, 02214 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 02215 0, 0, 106, 0, 0, 0, 0, 0, 0, 106, 02216 266, 0, 109, 0, 0, 78, 0, 0, 0, 0, 02217 78, 0, 105, 0, 0, 0, 0, 78, 0, 265, 02218 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02219 0, 0, 106, 108, 0, 0, 0, 0, 0, 0, 02220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02221 78, 0, 0, 0, 0, 0, 0, 0, 0, 105, 02222 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 02223 0, 0, 0, 0, 105, 105, 0, 0, 0, 0, 02224 108, 0, 0, 0, 0, 0, 0, 0, 108, 109, 02225 0, 0, 0, 0, 0, 108, 108, 0, 109, 0, 02226 0, 105, 105, 0, 0, 0, 0, 203, 0, 0, 02227 0, 0, 0, 105, 0, 267, 0, 0, 0, 106, 02228 0, 0, 108, 108, 0, 0, 0, 0, 106, 0, 02229 0, 0, 0, 0, 108, 0, 0, 78, 0, 0, 02230 0, 0, 0, 0, 0, 266, 78, 0, 0, 0, 02231 0, 105, 0, 0, 0, 267, 0, 0, 105, 105, 02232 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02233 0, 0, 108, 0, 0, 0, 0, 0, 105, 108, 02234 108, 0, 0, 108, 0, 266, 0, 0, 0, 0, 02235 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 02236 361, 0, 0, 0, 0, 0, 0, 109, 0, 109, 02237 0, 0, 0, 0, 0, 0, 0, 0, 915, 0, 02238 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02239 0, 109, 0, 105, 0, 0, 0, 106, 0, 106, 02240 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02241 0, 0, 0, 0, 108, 78, 0, 78, 0, 0, 02242 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 02243 0, 0, 0, 0, 0, 0, 105, 0, 105, 78, 02244 267, 0, 0, 0, 105, 0, 105, 0, 0, 0, 02245 0, 0, 0, 0, 0, 0, 0, 108, 0, 108, 02246 0, 0, 0, 0, 0, 108, 0, 108, 0, 0, 02247 266, 760, 0, 0, 0, 0, 0, 0, 0, 109, 02248 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 02249 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02250 0, 0, 308, -574, -574, -574, -574, 313, 314, 106, 02251 0, -574, -574, 0, 0, 0, 266, 321, 322, 0, 02252 0, 0, 0, 0, 0, 0, 109, 78, 0, 0, 02253 0, 0, 0, 0, 109, 495, 0, 0, 0, 0, 02254 0, 109, 109, 0, 0, 0, 324, 325, 326, 327, 02255 328, 329, 330, 331, 332, 333, 106, 0, 0, 0, 02256 0, 0, 0, 0, 106, 0, 0, 0, 109, 109, 02257 0, 106, 106, 0, 78, 0, 0, 0, 0, 0, 02258 109, 0, 78, 0, 0, 0, 0, 0, 0, 78, 02259 78, 308, 309, 310, 311, 312, 313, 314, 106, 106, 02260 317, 318, 0, 0, 0, 0, 321, 322, 0, 0, 02261 106, 0, 0, 0, 0, 0, 78, 78, 109, 0, 02262 0, 0, 0, 0, 0, 109, 109, 0, 78, 109, 02263 0, 0, 0, 0, 0, 324, 325, 326, 327, 328, 02264 329, 330, 331, 332, 333, 109, 0, 0, 106, 0, 02265 0, 0, 0, 0, 0, 106, 106, 0, 0, 106, 02266 0, 0, 0, 0, 0, 0, 78, 363, 0, 0, 02267 0, 0, 0, 78, 78, 106, 0, 78, 0, 0, 02268 0, 0, 0, 0, 0, 917, 0, 0, 0, 109, 02269 0, 0, 0, 78, 0, 0, 0, 362, 0, 0, 02270 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02271 0, 0, 0, 0, 0, 916, 0, 0, 0, 106, 02272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02273 106, 0, 0, 913, 0, 0, 0, 78, 0, 0, 02274 0, 0, 0, 109, 0, 109, 0, 0, 78, 0, 02275 0, 109, 0, 109, 0, 0, 0, 0, 0, 0, 02276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02277 0, 0, 0, 106, 0, 106, 0, 0, 0, 0, 02278 0, 106, 0, 106, 0, 0, 0, 0, 0, 0, 02279 0, 78, 0, 78, 0, 0, 0, 0, 0, 78, 02280 0, 78, -573, 4, 0, 5, 6, 7, 8, 9, 02281 0, 0, 0, 10, 11, 0, 0, 0, 12, 0, 02282 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02283 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02284 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02285 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02286 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02288 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02289 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02290 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02292 0, 0, 0, -285, 61, 62, 63, 0, 0, 0, 02293 0, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02294 -285, 0, 0, 0, 0, 0, 0, -573, 0, -573, 02295 -285, -285, -285, 0, 0, 0, 0, 0, 0, 0, 02296 -285, -285, 0, -285, -285, -285, -285, -285, 0, 0, 02297 0, 0, 0, 0, 308, 309, 310, 311, 312, 313, 02298 314, 315, 316, 317, 318, 319, 320, 0, 0, 321, 02299 322, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02300 -285, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02301 724, -285, 0, 0, 0, 0, 323, -285, 324, 325, 02302 326, 327, 328, 329, 330, 331, 332, 333, 0, 0, 02303 -285, 0, -105, -285, -285, -285, -285, -285, -285, -285, 02304 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 02305 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 02306 -285, -285, -285, -285, -411, 0, -285, -285, -285, 0, 02307 -285, 0, -411, -411, -411, 0, 0, -411, -411, -411, 02308 0, -411, 0, 0, 0, 0, 0, 0, 0, 0, 02309 -411, -411, -411, 0, 0, 0, 0, 0, 0, 0, 02310 0, -411, -411, 0, -411, -411, -411, -411, -411, 0, 02311 0, 0, 0, 0, 0, 308, 309, 310, 311, 312, 02312 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 02313 321, 322, -411, -411, -411, -411, -411, -411, -411, -411, 02314 -411, -411, -411, -411, -411, 0, 0, -411, -411, -411, 02315 0, 0, -411, 0, 0, 0, 0, 323, -411, 324, 02316 325, 326, 327, 328, 329, 330, 331, 332, 333, 0, 02317 0, 0, 0, 0, -411, 0, -411, -411, -411, -411, 02318 -411, -411, -411, -411, -411, -411, 0, 0, 0, 0, 02319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02320 -411, -411, -411, -411, -411, -279, 220, -411, -411, -411, 02321 0, -411, 0, -279, -279, -279, 0, 0, -279, -279, 02322 -279, 0, -279, 0, 0, 0, 0, 0, 0, 0, 02323 0, 0, -279, -279, -279, 0, 0, 0, 0, 0, 02324 0, 0, -279, -279, 0, -279, -279, -279, -279, -279, 02325 0, 0, 0, 0, 0, 0, 308, 309, 310, 311, 02326 312, 313, 314, 315, 0, 317, 318, 0, 0, 0, 02327 0, 321, 322, -279, -279, -279, -279, -279, -279, -279, 02328 -279, -279, -279, -279, -279, -279, 0, 0, -279, -279, 02329 -279, 0, 0, -279, 0, 0, 0, 0, 0, -279, 02330 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 02331 0, 0, -279, 0, 0, -279, -279, -279, -279, -279, 02332 -279, -279, -279, -279, -279, -279, -279, 0, 0, 0, 02333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02334 0, 0, -279, -279, -279, -279, -573, 0, -279, -279, 02335 -279, 0, -279, 0, -573, -573, -573, 0, 0, -573, 02336 -573, -573, 0, -573, 0, 0, 0, 0, 0, 0, 02337 0, 0, -573, -573, -573, 0, 0, 0, 0, 0, 02338 0, 0, 0, -573, -573, 0, -573, -573, -573, -573, 02339 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02341 0, 0, 0, 0, -573, -573, -573, -573, -573, -573, 02342 -573, -573, -573, -573, -573, -573, -573, 0, 0, -573, 02343 -573, -573, 0, 0, -573, 0, 0, 0, 0, 0, 02344 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02345 0, 0, 0, 0, 0, 0, -573, 0, -573, -573, 02346 -573, -573, -573, -573, -573, -573, -573, -573, 0, 0, 02347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02348 0, 0, -573, -573, -573, -573, -573, -292, 220, -573, 02349 -573, -573, 0, -573, 0, -292, -292, -292, 0, 0, 02350 -292, -292, -292, 0, -292, 0, 0, 0, 0, 0, 02351 0, 0, 0, 0, -292, -292, 0, 0, 0, 0, 02352 0, 0, 0, 0, -292, -292, 0, -292, -292, -292, 02353 -292, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02355 0, 0, 0, 0, 0, -292, -292, -292, -292, -292, 02356 -292, -292, -292, -292, -292, -292, -292, -292, 0, 0, 02357 -292, -292, -292, 0, 0, -292, 0, 0, 0, 0, 02358 0, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02359 0, 0, 0, 0, 0, 0, 0, -292, 0, -292, 02360 -292, -292, -292, -292, -292, -292, -292, -292, -292, 0, 02361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02362 0, 0, 0, 0, -292, -292, -292, -292, -555, 217, 02363 -292, -292, -292, 0, -292, 0, -555, -555, -555, 0, 02364 0, 0, -555, -555, 0, -555, 0, 0, 0, 0, 02365 0, 0, 0, 0, -555, 0, 0, 0, 0, 0, 02366 0, 0, 0, 0, 0, -555, -555, 0, -555, -555, 02367 -555, -555, -555, 0, 0, 0, 0, 0, 0, 0, 02368 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02369 0, 0, 0, 0, 0, 0, -555, -555, -555, -555, 02370 -555, -555, -555, -555, -555, -555, -555, -555, -555, 0, 02371 0, -555, -555, -555, -285, 665, 0, 0, 0, 0, 02372 0, 0, -285, -285, -285, 0, 0, 0, -285, -285, 02373 0, -285, 0, 0, 0, 0, 0, -103, -555, 0, 02374 -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 02375 0, -285, -285, 0, -285, -285, -285, -285, -285, 0, 02376 0, 0, 0, 0, -555, -555, -555, -555, -94, 0, 02377 0, -555, 0, -555, 0, -555, 0, 0, 0, 0, 02378 0, 0, -285, -285, -285, -285, -285, -285, -285, -285, 02379 -285, -285, -285, -285, -285, 0, 0, -285, -285, -285, 02380 0, 666, 0, 0, 0, 0, 0, 0, 0, 0, 02381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02382 0, 0, 0, -105, -285, 0, -285, -285, -285, -285, 02383 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 02384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02385 0, -285, -285, -285, -96, 0, 0, -285, 0, -285, 02386 241, -285, 5, 6, 7, 8, 9, -573, -573, -573, 02387 10, 11, 0, 0, -573, 12, 0, 13, 14, 15, 02388 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02389 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02390 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02391 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02392 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02394 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02395 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02396 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02398 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02400 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02401 8, 9, 0, 0, -573, 10, 11, 0, -573, -573, 02402 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02403 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02404 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02405 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02406 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02407 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02409 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02410 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02412 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02414 0, 0, 0, 0, 0, 0, 0, 0, 0, -573, 02415 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02416 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02417 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02418 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02419 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02420 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02421 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02423 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02424 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02425 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02427 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02428 4, 0, 5, 6, 7, 8, 9, 0, 0, 0, 02429 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02430 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02431 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02432 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, 02433 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02434 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02436 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02437 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02438 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02439 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02440 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02441 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02442 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02443 8, 9, 0, 0, -573, 10, 11, 0, 0, -573, 02444 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02445 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02446 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02447 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02448 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02449 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02451 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02452 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02453 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02454 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02455 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02456 8, 9, 0, -573, -573, 10, 11, 0, 0, -573, 02457 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02458 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02459 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02460 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02461 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02462 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02464 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02465 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02467 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02468 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02469 8, 9, 0, 0, 0, 10, 11, 0, 0, -573, 02470 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02471 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02472 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02473 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02474 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02475 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02477 48, 0, 0, 242, 50, 0, 51, 52, 0, 53, 02478 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02480 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02481 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02482 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02483 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02484 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02485 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02486 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02487 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02488 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02490 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02491 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02493 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02494 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02495 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02496 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02497 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02498 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02499 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02500 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02501 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02503 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02504 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02505 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02506 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02508 0, -573, 0, 0, 0, 0, 0, 0, 0, -573, 02509 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02510 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, 02511 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02512 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02513 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02514 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02515 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02517 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02518 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02519 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02521 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02522 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02523 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02524 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02525 21, 22, 23, 24, 25, 26, 0, 0, 194, 0, 02526 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02527 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02528 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02530 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02531 0, 51, 52, 0, 198, 199, 54, 55, 56, 57, 02532 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02533 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02534 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02535 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02536 22, 23, 24, 25, 26, 0, 224, 27, 0, 0, 02537 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02538 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02539 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02541 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02542 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02543 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02545 61, 62, 63, 0, 0, 0, 0, 0, 0, 0, 02546 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02547 11, 0, 0, 288, 12, 289, 13, 14, 15, 16, 02548 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02549 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02550 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02551 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02552 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02554 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02555 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02556 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02557 5, 6, 7, 8, 9, 0, 0, 0, 10, 11, 02558 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02559 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02560 23, 24, 25, 26, 0, 224, 27, 0, 0, 0, 02561 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, 02562 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02563 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02565 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02566 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02567 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02568 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02569 62, 63, 0, 0, 0, 0, 0, 0, 5, 6, 02570 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, 02571 0, 12, 474, 13, 14, 15, 16, 17, 18, 19, 02572 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02573 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02574 28, 29, 0, 31, 32, 33, 34, 35, 36, 37, 02575 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02576 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02578 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02579 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02581 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, 02582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02584 474, 113, 114, 115, 116, 117, 118, 119, 120, 121, 02585 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 02586 132, 133, 134, 135, 136, 0, 0, 0, 137, 138, 02587 139, 365, 366, 367, 368, 144, 145, 146, 0, 0, 02588 0, 0, 0, 147, 148, 149, 150, 369, 370, 371, 02589 372, 155, 37, 38, 373, 40, 0, 0, 0, 0, 02590 0, 0, 0, 0, 157, 158, 159, 160, 161, 162, 02591 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02592 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02593 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02594 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02595 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02596 0, 183, 184, 0, 0, 0, 0, 0, -548, -548, 02597 -548, 0, -548, 0, 0, 0, -548, -548, 0, 185, 02598 374, -548, 0, -548, -548, -548, -548, -548, -548, -548, 02599 0, -548, 0, 0, 0, -548, -548, -548, -548, -548, 02600 -548, -548, 0, 0, -548, 0, 0, 0, 0, 0, 02601 0, -548, 0, 0, -548, -548, -548, -548, -548, -548, 02602 -548, -548, -548, -548, -548, -548, 0, -548, -548, -548, 02603 0, -548, -548, 0, 0, 0, 0, 0, 0, 0, 02604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02605 0, -548, 0, 0, -548, -548, 0, -548, -548, 0, 02606 -548, -548, -548, -548, -548, -548, -548, -548, -548, 0, 02607 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02608 0, 0, 0, 0, 0, 0, 0, -548, -548, -548, 02609 0, 0, 0, 0, 0, -549, -549, -549, 0, -549, 02610 0, -548, 0, -549, -549, 0, 0, -548, -549, 0, 02611 -549, -549, -549, -549, -549, -549, -549, 0, -549, 0, 02612 0, 0, -549, -549, -549, -549, -549, -549, -549, 0, 02613 0, -549, 0, 0, 0, 0, 0, 0, -549, 0, 02614 0, -549, -549, -549, -549, -549, -549, -549, -549, -549, 02615 -549, -549, -549, 0, -549, -549, -549, 0, -549, -549, 02616 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02617 0, 0, 0, 0, 0, 0, 0, 0, -549, 0, 02618 0, -549, -549, 0, -549, -549, 0, -549, -549, -549, 02619 -549, -549, -549, -549, -549, -549, 0, 0, 0, 0, 02620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02621 0, 0, 0, 0, -549, -549, -549, 0, 0, 0, 02622 0, 0, -551, -551, -551, 0, -551, 0, -549, 0, 02623 -551, -551, 0, 0, -549, -551, 0, -551, -551, -551, 02624 -551, -551, -551, -551, 0, 0, 0, 0, 0, -551, 02625 -551, -551, -551, -551, -551, -551, 0, 0, -551, 0, 02626 0, 0, 0, 0, 0, -551, 0, 0, -551, -551, 02627 -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, 02628 0, -551, -551, -551, 0, -551, -551, 0, 0, 0, 02629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02630 0, 0, 0, 0, 0, -551, 723, 0, -551, -551, 02631 0, -551, -551, 0, -551, -551, -551, -551, -551, -551, 02632 -551, -551, -551, 0, 0, 0, 0, 0, -103, 0, 02633 0, 0, 0, 0, 0, 0, -553, -553, -553, 0, 02634 -553, -551, -551, -551, -553, -553, 0, 0, 0, -553, 02635 0, -553, -553, -553, -553, -553, -553, -553, 0, 0, 02636 0, -551, 0, -553, -553, -553, -553, -553, -553, -553, 02637 0, 0, -553, 0, 0, 0, 0, 0, 0, -553, 02638 0, 0, -553, -553, -553, -553, -553, -553, -553, -553, 02639 -553, -553, -553, -553, 0, -553, -553, -553, 0, -553, 02640 -553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02641 0, 0, 0, 0, 0, 0, 0, 0, 0, -553, 02642 0, 0, -553, -553, 0, -553, -553, 0, -553, -553, 02643 -553, -553, -553, -553, -553, -553, -553, 0, 0, 0, 02644 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02645 -554, -554, -554, 0, -554, -553, -553, -553, -554, -554, 02646 0, 0, 0, -554, 0, -554, -554, -554, -554, -554, 02647 -554, -554, 0, 0, 0, -553, 0, -554, -554, -554, 02648 -554, -554, -554, -554, 0, 0, -554, 0, 0, 0, 02649 0, 0, 0, -554, 0, 0, -554, -554, -554, -554, 02650 -554, -554, -554, -554, -554, -554, -554, -554, 0, -554, 02651 -554, -554, 0, -554, -554, 0, 0, 0, 0, 0, 02652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02653 0, 0, 0, -554, 0, 0, -554, -554, 0, -554, 02654 -554, 0, -554, -554, -554, -554, -554, -554, -554, -554, 02655 -554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02656 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02657 -554, -554, 0, 0, 0, 0, 0, 0, 0, 0, 02658 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02659 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 02660 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02661 133, 134, 135, 136, 0, 0, 0, 137, 138, 139, 02662 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 02663 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, 02664 155, 270, 271, 156, 272, 0, 0, 0, 0, 0, 02665 0, 0, 0, 157, 158, 159, 160, 161, 162, 163, 02666 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 02667 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 02668 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 02669 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 02670 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 02671 183, 184, 0, 0, 0, 0, 0, 0, 0, 0, 02672 0, 0, 0, 0, 0, 0, 0, 0, 185, 113, 02673 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 02674 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 02675 134, 135, 136, 0, 0, 0, 137, 138, 139, 140, 02676 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 02677 0, 147, 148, 149, 150, 151, 152, 153, 154, 155, 02678 226, 0, 156, 0, 0, 0, 0, 0, 0, 0, 02679 0, 0, 157, 158, 159, 160, 161, 162, 163, 164, 02680 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 02681 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02682 0, 172, 0, 0, 55, 0, 0, 0, 0, 0, 02683 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 02684 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 02685 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02686 0, 0, 0, 0, 0, 0, 0, 185, 113, 114, 02687 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 02688 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 02689 135, 136, 0, 0, 0, 137, 138, 139, 140, 141, 02690 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 02691 147, 148, 149, 150, 151, 152, 153, 154, 155, 0, 02692 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 02693 0, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02694 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02696 172, 0, 0, 55, 0, 0, 0, 0, 0, 0, 02697 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02698 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02700 0, 0, 0, 0, 0, 0, 185, 113, 114, 115, 02701 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 02702 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 02703 136, 0, 0, 0, 137, 138, 139, 140, 141, 142, 02704 143, 144, 145, 146, 0, 0, 0, 0, 0, 147, 02705 148, 149, 150, 151, 152, 153, 154, 155, 0, 0, 02706 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02707 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 02708 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 02709 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 02710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02711 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 02712 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 02713 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02714 11, 0, 0, 0, 12, 185, 13, 14, 15, 231, 02715 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02716 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02717 0, 0, 0, 0, 258, 0, 0, 32, 33, 34, 02718 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02719 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02721 0, 0, 0, 0, 259, 0, 0, 197, 50, 0, 02722 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02723 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02724 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02725 260, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02726 15, 231, 232, 18, 19, 0, 0, 0, 261, 0, 02727 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02728 0, 0, 0, 0, 0, 0, 258, 0, 0, 32, 02729 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02730 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 02731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02732 0, 0, 0, 0, 0, 0, 259, 0, 0, 197, 02733 50, 0, 51, 52, 0, 0, 0, 54, 55, 56, 02734 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02735 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 02736 0, 0, 260, 10, 11, 0, 0, 0, 12, 0, 02737 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02738 490, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02739 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02740 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02741 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02743 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02744 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02745 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02746 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, 02747 0, 0, 10, 11, 61, 62, 63, 12, 0, 13, 02748 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02749 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02750 27, 0, 0, 0, 0, 0, 28, 29, 0, 31, 02751 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02752 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02753 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02754 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02755 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02756 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02757 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02758 0, 10, 11, 61, 62, 63, 12, 0, 13, 14, 02759 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02760 20, 21, 22, 23, 24, 25, 26, 0, 0, 194, 02761 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02762 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, 02763 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02765 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02766 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, 02767 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02768 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02769 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02770 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02771 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02772 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02773 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02774 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02776 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02777 0, 51, 52, 0, 587, 199, 54, 55, 56, 57, 02778 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02779 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02780 11, 61, 200, 63, 12, 0, 13, 14, 15, 231, 02781 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02782 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02783 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02784 35, 36, 37, 38, 39, 40, 195, 41, 42, 0, 02785 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02787 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02788 51, 52, 0, 198, 0, 54, 55, 56, 57, 58, 02789 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02790 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02791 61, 200, 63, 12, 0, 13, 14, 15, 231, 232, 02792 18, 19, 0, 0, 0, 0, 0, 233, 234, 235, 02793 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02794 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02795 36, 37, 38, 39, 40, 195, 41, 42, 0, 43, 02796 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02798 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02799 52, 0, 0, 199, 54, 55, 56, 57, 58, 59, 02800 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02801 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02802 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02803 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02804 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02805 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02806 37, 38, 39, 40, 195, 41, 42, 0, 43, 44, 02807 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02809 0, 0, 196, 0, 0, 197, 50, 0, 51, 52, 02810 0, 587, 0, 54, 55, 56, 57, 58, 59, 60, 02811 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02812 7, 0, 9, 0, 0, 0, 10, 11, 61, 200, 02813 63, 12, 0, 13, 14, 15, 231, 232, 18, 19, 02814 0, 0, 0, 0, 0, 233, 234, 235, 23, 24, 02815 25, 26, 0, 0, 194, 0, 0, 0, 0, 0, 02816 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02817 38, 39, 40, 195, 41, 42, 0, 43, 44, 45, 02818 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02820 0, 196, 0, 0, 197, 50, 0, 51, 52, 0, 02821 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02822 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02823 0, 9, 0, 0, 0, 10, 11, 61, 200, 63, 02824 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02825 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02826 26, 0, 0, 194, 0, 0, 0, 0, 0, 0, 02827 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02828 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02829 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02831 196, 0, 0, 197, 50, 0, 51, 52, 0, 484, 02832 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02833 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02834 9, 0, 0, 0, 10, 11, 61, 200, 63, 12, 02835 0, 13, 14, 15, 231, 232, 18, 19, 0, 0, 02836 0, 0, 0, 233, 234, 235, 23, 24, 25, 26, 02837 0, 0, 194, 0, 0, 0, 0, 0, 0, 29, 02838 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02839 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02840 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02841 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 02842 0, 0, 197, 50, 0, 51, 52, 0, 198, 0, 02843 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 02844 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02845 0, 0, 0, 10, 11, 61, 200, 63, 12, 0, 02846 13, 14, 15, 231, 232, 18, 19, 0, 0, 0, 02847 0, 0, 233, 234, 235, 23, 24, 25, 26, 0, 02848 0, 194, 0, 0, 0, 0, 0, 0, 29, 0, 02849 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02850 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02852 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 02853 0, 197, 50, 0, 51, 52, 0, 772, 0, 54, 02854 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02855 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02856 0, 0, 10, 11, 61, 200, 63, 12, 0, 13, 02857 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02858 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02859 194, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02860 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02861 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02862 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02863 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 02864 197, 50, 0, 51, 52, 0, 484, 0, 54, 55, 02865 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02866 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02867 0, 10, 11, 61, 200, 63, 12, 0, 13, 14, 02868 15, 231, 232, 18, 19, 0, 0, 0, 0, 0, 02869 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02870 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02871 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02872 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02873 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02874 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02875 50, 0, 51, 52, 0, 587, 0, 54, 55, 56, 02876 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02877 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02878 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02879 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02880 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02881 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02882 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02883 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02885 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02886 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, 02887 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02888 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02889 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02890 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02891 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02892 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02893 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02894 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02896 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02897 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02898 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02899 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02900 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02901 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02902 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02903 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02904 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02905 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02906 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02907 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02908 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, 02909 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02910 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02911 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02912 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02913 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02914 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02915 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02916 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02918 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02919 0, 305, 0, 54, 55, 56, 57, 58, 59, 60, 02920 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02921 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02922 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02923 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02924 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02925 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02926 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02927 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02928 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 02929 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02930 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02931 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02932 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02933 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02934 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02935 0, 0, 258, 0, 0, 32, 33, 34, 354, 36, 02936 37, 38, 355, 40, 0, 41, 42, 0, 43, 44, 02937 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02938 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 02939 0, 0, 357, 0, 0, 197, 50, 0, 51, 52, 02940 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02941 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02942 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02943 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02944 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02945 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02946 32, 33, 34, 354, 36, 37, 38, 355, 40, 0, 02947 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02949 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 02950 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02951 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02952 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02953 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02954 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02955 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02956 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02957 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02958 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02960 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02961 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02962 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02963 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02964 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02965 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02966 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02967 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02968 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02970 0, 0, 0, 0, 0, 0, 0, 902, 0, 0, 02971 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02972 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02973 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02974 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02975 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02976 24, 25, 26, 0, 0, 194, 0, 663, 0, 0, 02977 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02978 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02979 45, 308, 309, 310, 311, 312, 313, 314, 315, 316, 02980 317, 318, 319, 320, 0, 0, 321, 322, 0, 0, 02981 0, 0, 912, 0, 0, 197, 50, 0, 51, 52, 02982 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02983 0, 0, 0, 323, 0, 324, 325, 326, 327, 328, 02984 329, 330, 331, 332, 333, 0, 0, 0, 260, 0, 02985 525, 526, 0, 0, 527, 0, 0, 0, 0, 0, 02986 0, 0, 0, -241, 157, 158, 159, 160, 161, 162, 02987 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02988 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02989 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02990 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02991 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02992 0, 183, 184, 0, 0, 0, 0, 533, 534, 0, 02993 0, 535, 0, 0, 0, 0, 0, 0, 0, 185, 02994 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02995 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02997 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02998 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02999 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 03000 0, 0, 0, 0, 591, 526, 0, 0, 592, 0, 03001 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 03002 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 03003 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 03004 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 03005 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03006 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 03007 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 03008 0, 594, 534, 0, 0, 595, 0, 0, 0, 0, 03009 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 03010 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 03011 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 03012 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 03013 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03014 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 03015 182, 0, 183, 184, 0, 0, 0, 0, 617, 526, 03016 0, 0, 618, 0, 0, 0, 0, 0, 0, 0, 03017 185, 220, 157, 158, 159, 160, 161, 162, 163, 164, 03018 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 03019 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03020 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 03021 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 03022 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 03023 184, 0, 0, 0, 0, 620, 534, 0, 0, 621, 03024 0, 0, 0, 0, 0, 0, 0, 185, 220, 157, 03025 158, 159, 160, 161, 162, 163, 164, 165, 0, 0, 03026 166, 167, 0, 0, 168, 169, 170, 171, 0, 0, 03027 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 03028 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03029 0, 0, 0, 0, 0, 173, 174, 175, 176, 177, 03030 178, 179, 180, 181, 182, 0, 183, 184, 0, 0, 03031 0, 0, 692, 526, 0, 0, 693, 0, 0, 0, 03032 0, 0, 0, 0, 185, 220, 157, 158, 159, 160, 03033 161, 162, 163, 164, 165, 0, 0, 166, 167, 0, 03034 0, 168, 169, 170, 171, 0, 0, 0, 0, 0, 03035 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 03036 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03037 0, 0, 173, 174, 175, 176, 177, 178, 179, 180, 03038 181, 182, 0, 183, 184, 0, 0, 0, 0, 695, 03039 534, 0, 0, 696, 0, 0, 0, 0, 0, 0, 03040 0, 185, 220, 157, 158, 159, 160, 161, 162, 163, 03041 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 03042 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 03043 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 03044 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 03045 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 03046 183, 184, 0, 0, 0, 0, 702, 526, 0, 0, 03047 703, 0, 0, 0, 0, 0, 0, 0, 185, 220, 03048 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 03049 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 03050 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 03051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03052 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 03053 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 03054 0, 0, 0, 572, 534, 0, 0, 573, 0, 0, 03055 0, 0, 0, 0, 0, 185, 220, 157, 158, 159, 03056 160, 161, 162, 163, 164, 165, 0, 0, 166, 167, 03057 0, 0, 168, 169, 170, 171, 0, 0, 0, 0, 03058 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 03059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03060 0, 0, 0, 173, 174, 175, 176, 177, 178, 179, 03061 180, 181, 182, 0, 183, 184, 0, 0, 0, 0, 03062 965, 526, 0, 0, 966, 0, 0, 0, 0, 0, 03063 0, 0, 185, 220, 157, 158, 159, 160, 161, 162, 03064 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 03065 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 03066 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 03067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03068 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 03069 0, 183, 184, 0, 0, 0, 0, 971, 526, 0, 03070 0, 972, 0, 0, 0, 0, 0, 0, 0, 185, 03071 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 03072 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 03073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03074 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03075 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 03076 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 03077 0, 0, 0, 0, 974, 534, 0, 0, 975, 0, 03078 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 03079 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 03080 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 03081 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 03082 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03083 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 03084 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 03085 0, 572, 534, 0, 0, 573, 0, 0, 0, 0, 03086 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 03087 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 03088 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 03089 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 03090 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 03091 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 03092 182, 663, 183, 184, 0, 0, 308, 309, 310, 311, 03093 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, 03094 185, 321, 322, 0, 0, 308, 309, 310, 311, 312, 03095 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 03096 321, 322, 0, 0, 0, 0, 0, 0, 323, 0, 03097 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03098 0, 0, 0, 0, 0, 0, 0, 323, 0, 324, 03099 325, 326, 327, 328, 329, 330, 331, 332, 333 03100 }; 03101 03102 static const yytype_int16 yycheck[] = 03103 { 03104 2, 55, 340, 28, 2, 454, 4, 52, 593, 16, 03105 17, 335, 307, 20, 307, 8, 547, 213, 16, 17, 03106 8, 566, 20, 27, 53, 29, 84, 22, 8, 87, 03107 546, 87, 4, 22, 619, 28, 49, 91, 252, 76, 03108 28, 2, 256, 4, 404, 357, 1, 65, 28, 51, 03109 52, 49, 50, 749, 450, 53, 746, 13, 334, 627, 03110 336, 53, 680, 25, 62, 762, 684, 454, 13, 16, 03111 17, 65, 26, 20, 396, 55, 400, 26, 76, 25, 03112 440, 0, 404, 27, 76, 83, 84, 576, 577, 87, 03113 88, 89, 90, 87, 490, 29, 88, 89, 90, 13, 03114 242, 25, 378, 379, 51, 851, 828, 85, 76, 694, 03115 136, 91, 87, 16, 17, 110, 147, 20, 85, 568, 03116 705, 110, 146, 399, 25, 401, 85, 653, 452, 61, 03117 87, 16, 17, 62, 109, 20, 276, 25, 278, 56, 03118 280, 13, 742, 37, 38, 87, 114, 109, 51, 52, 03119 195, 427, 109, 198, 199, 826, 701, 28, 113, 849, 03120 138, 139, 304, 763, 709, 140, 25, 109, 736, 737, 03121 25, 13, 139, 107, 106, 146, 13, 453, 140, 138, 03122 139, 143, 136, 632, 140, 147, 109, 136, 244, 145, 03123 145, 147, 147, 142, 140, 941, 892, 142, 140, 197, 03124 145, 145, 147, 147, 653, 207, 896, 904, 930, 140, 03125 217, 213, 219, 220, 25, 886, 140, 413, 220, 217, 03126 746, 219, 220, 749, 261, 223, 244, 225, 552, 242, 03127 719, 145, 230, 147, 50, 293, 294, 295, 296, 140, 03128 564, 601, 142, 241, 242, 632, 235, 147, 109, 238, 03129 244, 563, 140, 147, 258, 873, 99, 302, 826, 708, 03130 828, 932, 307, 261, 25, 661, 87, 83, 84, 261, 03131 217, 87, 219, 145, 140, 147, 305, 553, 600, 601, 03132 241, 140, 25, 341, 342, 140, 25, 343, 959, 565, 03133 806, 304, 85, 87, 292, 293, 294, 295, 296, 297, 03134 298, 299, 85, 145, 302, 147, 304, 305, 145, 307, 03135 147, 59, 60, 305, 217, 109, 219, 26, 886, 887, 03136 292, 708, 109, 849, 142, 851, 49, 467, 335, 140, 03137 875, 292, 217, 335, 219, 56, 297, 335, 145, 337, 03138 147, 87, 873, 341, 342, 138, 139, 336, 88, 343, 03139 395, 396, 690, 140, 334, 302, 139, 26, 356, 404, 03140 307, 140, 930, 109, 932, 359, 892, 85, 147, 662, 03141 109, 85, 109, 302, 61, 26, 85, 140, 307, 140, 03142 15, 142, 17, 928, 679, 87, 384, 385, 973, 85, 03143 85, 959, 437, 400, 590, 440, 421, 140, 400, 142, 03144 614, 140, 400, 85, 143, 140, 85, 223, 147, 225, 03145 412, 413, 401, 450, 142, 941, 85, 104, 105, 399, 03146 138, 139, 424, 136, 142, 139, 424, 136, 421, 138, 03147 139, 880, 85, 421, 85, 433, 85, 142, 427, 484, 03148 140, 421, 138, 139, 139, 452, 426, 147, 85, 142, 03149 452, 85, 450, 490, 452, 384, 385, 139, 450, 146, 03150 139, 85, 822, 424, 453, 68, 85, 136, 85, 138, 03151 139, 451, 433, 142, 197, 87, 85, 293, 294, 295, 03152 296, 483, 298, 299, 68, 136, 139, 138, 139, 138, 03153 139, 142, 490, 396, 85, 37, 38, 109, 490, 668, 03154 822, 223, 139, 548, 138, 139, 675, 230, 109, 52, 03155 514, 54, 55, 56, 57, 139, 119, 120, 121, 242, 03156 139, 138, 139, 861, 246, 341, 342, 143, 532, 867, 03157 139, 26, 728, 52, 437, 530, 538, 56, 540, 85, 03158 356, 530, 587, 538, 542, 552, 544, 138, 139, 538, 03159 552, 545, 546, 56, 552, 600, 601, 564, 85, 584, 03160 59, 60, 564, 144, 553, 559, 564, 137, 566, 567, 03161 106, 551, 574, 575, 576, 577, 565, 87, 615, 574, 03162 575, 304, 140, 563, 106, 574, 575, 87, 590, 593, 03163 85, 584, 138, 139, 87, 85, 584, 140, 68, 109, 03164 68, 548, 14, 15, 584, 85, 604, 609, 85, 109, 03165 140, 138, 139, 658, 17, 619, 109, 615, 56, 608, 03166 609, 574, 575, 615, 661, 145, 25, 951, 52, 94, 03167 54, 55, 56, 57, 679, 143, 638, 146, 640, 697, 03168 642, 136, 700, 138, 139, 137, 140, 142, 138, 139, 03169 52, 653, 54, 55, 56, 57, 654, 711, 138, 139, 03170 10, 138, 139, 661, 662, 89, 61, 665, 666, 661, 03171 65, 95, 96, 671, 672, 109, 952, 679, 680, 140, 03172 682, 140, 684, 140, 406, 140, 140, 89, 410, 734, 03173 694, 140, 116, 415, 96, 119, 8, 600, 13, 697, 03174 87, 705, 700, 701, 698, 61, 87, 137, 430, 104, 03175 105, 709, 109, 435, 116, 54, 710, 719, 716, 717, 03176 140, 145, 109, 140, 63, 64, 728, 772, 109, 140, 03177 68, 711, 679, 662, 87, 52, 665, 666, 796, 52, 03178 742, 111, 671, 672, 140, 743, 744, 87, 104, 105, 03179 106, 567, 144, 140, 549, 15, 109, 755, 803, 140, 03180 2, 763, 4, 765, 87, 767, 768, 489, 52, 109, 03181 54, 55, 56, 57, 16, 17, 140, 822, 20, 117, 03182 118, 119, 120, 121, 145, 783, 109, 140, 604, 791, 03183 109, 140, 794, 114, 140, 793, 140, 140, 796, 10, 03184 140, 88, 800, 801, 140, 9, 804, 49, 50, 10, 03185 137, 140, 806, 10, 808, 61, 140, 140, 140, 542, 03186 62, 544, 820, 137, 140, 114, 52, 137, 54, 55, 03187 56, 57, 834, 835, 140, 837, 68, 839, 840, 140, 03188 140, 83, 84, 137, 842, 87, 56, 140, 140, 68, 03189 842, 83, 84, 56, 783, 140, 140, 140, 104, 105, 03190 106, 140, 860, 89, 83, 84, 864, 140, 860, 95, 03191 96, 873, 142, 142, 61, 140, 424, 875, 90, 88, 03192 61, 697, 954, 736, 700, 117, 118, 119, 120, 121, 03193 116, 93, 904, 119, 689, 114, 115, 116, 117, 118, 03194 119, 120, 121, 953, 906, 907, 908, 96, 910, 911, 03195 640, 706, 642, 57, 91, 880, 142, 104, 105, 106, 03196 918, 849, 920, 104, 105, 106, 653, 746, 926, -1, 03197 928, 654, 934, 935, 936, 937, 52, -1, 54, 55, 03198 56, 57, -1, -1, 951, -1, -1, 54, 55, 951, 03199 57, 953, 954, 951, -1, 197, 63, 64, -1, 939, 03200 -1, -1, -1, 952, -1, 967, 968, 969, 970, 973, 03201 950, -1, -1, 89, -1, 217, -1, 219, 220, 981, 03202 796, 223, -1, 225, -1, 707, -1, 989, 230, -1, 03203 -1, -1, -1, 716, 717, 68, -1, -1, -1, 241, 03204 242, -1, 797, -1, 799, -1, -1, 729, -1, -1, 03205 83, 84, -1, -1, 809, -1, -1, -1, 740, 814, 03206 743, 744, 749, -1, 52, 752, 54, 55, 56, 57, 03207 -1, -1, 755, -1, -1, 765, -1, 767, 768, -1, 03208 -1, -1, -1, 116, 117, 118, 119, 120, 121, -1, 03209 292, 293, 294, 295, 296, 297, 298, 299, -1, -1, 03210 302, 89, 304, -1, -1, 307, -1, 95, -1, 52, 03211 793, 54, 55, 56, 57, 870, 871, 800, 801, -1, 03212 -1, 804, 16, 17, -1, -1, 20, -1, -1, -1, 03213 -1, 813, -1, 335, -1, 337, -1, 820, -1, 341, 03214 342, -1, -1, 825, 834, 835, -1, 837, 830, 839, 03215 840, -1, 46, 47, 356, -1, -1, 51, 52, -1, 03216 -1, -1, -1, -1, 851, -1, 853, -1, 62, 63, 03217 -1, 52, 927, 54, 55, 56, 57, -1, -1, -1, 03218 -1, 864, 384, 385, 40, 41, 42, 43, 44, -1, 03219 -1, -1, -1, -1, -1, -1, -1, -1, 400, -1, 03220 955, -1, 957, -1, -1, 892, -1, 894, 89, -1, 03221 -1, 898, -1, -1, 95, -1, 906, 907, 908, -1, 03222 910, 911, 424, 52, -1, 54, 55, 56, 57, -1, 03223 -1, 433, -1, -1, -1, 918, -1, 920, -1, -1, 03224 -1, -1, -1, 926, 934, 935, 936, 937, -1, -1, 03225 452, -1, -1, -1, 941, -1, 943, -1, -1, 946, 03226 89, -1, -1, -1, -1, -1, 95, 96, -1, -1, 03227 -1, -1, -1, -1, 961, -1, -1, 967, 968, 969, 03228 970, -1, -1, -1, -1, -1, -1, 116, -1, -1, 03229 119, 981, -1, -1, -1, -1, 983, -1, -1, 989, 03230 -1, 195, -1, -1, 198, 199, 200, -1, -1, -1, 03231 2, -1, 4, 142, -1, 52, -1, 54, 55, 56, 03232 57, -1, -1, 217, -1, 219, 220, -1, -1, -1, 03233 -1, 2, -1, 4, -1, -1, -1, -1, -1, -1, 03234 542, -1, 544, 52, -1, 54, 55, 56, 57, -1, 03235 552, -1, 89, -1, -1, -1, -1, 49, 95, 96, 03236 -1, 53, 564, -1, 566, 567, -1, -1, -1, -1, 03237 -1, -1, -1, -1, -1, -1, -1, -1, 49, 116, 03238 89, -1, 119, -1, 76, -1, 95, 96, -1, -1, 03239 -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 03240 -1, -1, 604, -1, -1, -1, -1, 116, 302, -1, 03241 119, -1, -1, 307, 308, 309, 310, 311, 312, 313, 03242 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 03243 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03244 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1, 03245 -1, -1, 654, -1, -1, -1, -1, -1, -1, -1, 03246 662, -1, -1, 665, 666, -1, -1, -1, -1, 671, 03247 672, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03248 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03249 384, 385, -1, -1, -1, 697, -1, -1, 700, 701, 03250 394, 395, 396, -1, -1, 197, 400, 709, 402, 403, 03251 404, -1, -1, -1, 716, 717, 112, 113, 114, 115, 03252 116, 117, 118, 119, 120, 121, 197, -1, -1, 423, 03253 -1, -1, -1, -1, 428, -1, -1, -1, 230, -1, 03254 -1, 743, 744, 437, -1, -1, 440, -1, -1, 241, 03255 242, -1, -1, 755, -1, -1, -1, -1, 452, 230, 03256 -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, 03257 241, 242, -1, -1, -1, -1, -1, -1, 472, 473, 03258 -1, 783, -1, -1, -1, -1, -1, -1, -1, -1, 03259 484, 793, -1, -1, 796, -1, -1, -1, 800, 801, 03260 292, -1, 804, -1, -1, 297, -1, -1, -1, -1, 03261 -1, -1, 304, 305, -1, -1, -1, 2, 820, 4, 03262 -1, 292, -1, -1, -1, -1, 297, -1, -1, -1, 03263 -1, -1, -1, 304, -1, -1, -1, -1, -1, -1, 03264 -1, -1, -1, -1, -1, 337, -1, 2, -1, 4, 03265 -1, -1, -1, -1, 548, -1, -1, -1, 552, -1, 03266 -1, -1, 864, -1, 49, 2, 337, 4, 53, -1, 03267 564, -1, -1, 875, -1, -1, -1, -1, -1, -1, 03268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03269 -1, 76, -1, 587, 49, -1, -1, -1, 53, -1, 03270 -1, -1, -1, 88, 89, 90, 600, 601, -1, -1, 03271 -1, -1, 49, -1, -1, -1, 918, -1, 920, -1, 03272 -1, 76, -1, -1, 926, -1, 928, -1, -1, -1, 03273 -1, -1, 424, 88, 89, 90, 91, -1, -1, -1, 03274 -1, 433, -1, -1, -1, -1, -1, -1, -1, 951, 03275 -1, 88, -1, 424, -1, -1, -1, -1, 450, -1, 03276 -1, -1, 433, -1, 658, -1, -1, -1, 662, 663, 03277 -1, 665, 666, -1, -1, -1, -1, 671, 672, 0, 03278 -1, -1, -1, -1, -1, 679, -1, 8, 9, 10, 03279 -1, -1, 13, 14, 15, -1, 17, -1, 490, -1, 03280 -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, 03281 -1, -1, 197, -1, -1, -1, 37, 38, -1, 40, 03282 41, 42, 43, 44, 718, -1, -1, -1, -1, 723, 03283 724, -1, 726, 727, -1, -1, -1, -1, -1, -1, 03284 734, -1, 197, -1, -1, 230, -1, -1, -1, -1, 03285 542, -1, 544, -1, -1, -1, 241, 242, -1, -1, 03286 197, -1, -1, -1, 85, -1, -1, -1, -1, -1, 03287 -1, 542, -1, 544, 566, 230, 261, -1, 772, -1, 03288 -1, -1, 776, -1, -1, -1, 241, 242, -1, 783, 03289 -1, -1, -1, 230, -1, 566, -1, -1, -1, -1, 03290 -1, -1, -1, -1, 241, 242, 261, 292, -1, 803, 03291 -1, -1, 297, -1, -1, -1, 137, -1, 139, 304, 03292 305, 142, 143, 615, 145, -1, 147, 821, 822, -1, 03293 -1, -1, -1, -1, -1, -1, -1, 292, -1, -1, 03294 -1, -1, 297, -1, -1, -1, -1, -1, -1, 304, 03295 305, -1, 337, -1, -1, 292, -1, -1, -1, -1, 03296 297, -1, 654, -1, -1, -1, -1, 304, -1, 661, 03297 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03298 -1, -1, 337, 654, -1, -1, -1, -1, -1, -1, 03299 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03300 337, -1, -1, -1, -1, -1, -1, -1, -1, 701, 03301 -1, -1, -1, -1, -1, -1, -1, 709, -1, -1, 03302 -1, -1, -1, -1, 716, 717, -1, -1, -1, -1, 03303 701, -1, -1, -1, -1, -1, -1, -1, 709, 424, 03304 -1, -1, -1, -1, -1, 716, 717, -1, 433, -1, 03305 -1, 743, 744, -1, -1, -1, -1, 951, -1, -1, 03306 -1, -1, -1, 755, -1, 450, -1, -1, -1, 424, 03307 -1, -1, 743, 744, -1, -1, -1, -1, 433, -1, 03308 -1, -1, -1, -1, 755, -1, -1, 424, -1, -1, 03309 -1, -1, -1, -1, -1, 450, 433, -1, -1, -1, 03310 -1, 793, -1, -1, -1, 490, -1, -1, 800, 801, 03311 -1, -1, 804, -1, -1, -1, -1, -1, -1, -1, 03312 -1, -1, 793, -1, -1, -1, -1, -1, 820, 800, 03313 801, -1, -1, 804, -1, 490, -1, -1, -1, -1, 03314 -1, -1, -1, -1, -1, -1, -1, -1, -1, 820, 03315 842, -1, -1, -1, -1, -1, -1, 542, -1, 544, 03316 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1, 03317 -1, -1, 864, -1, -1, -1, -1, -1, -1, -1, 03318 -1, 566, -1, 875, -1, -1, -1, 542, -1, 544, 03319 -1, -1, -1, 864, -1, -1, -1, -1, -1, -1, 03320 -1, -1, -1, -1, 875, 542, -1, 544, -1, -1, 03321 -1, 566, -1, -1, -1, -1, -1, -1, -1, -1, 03322 -1, -1, -1, -1, -1, -1, 918, -1, 920, 566, 03323 615, -1, -1, -1, 926, -1, 928, -1, -1, -1, 03324 -1, -1, -1, -1, -1, -1, -1, 918, -1, 920, 03325 -1, -1, -1, -1, -1, 926, -1, 928, -1, -1, 03326 615, 646, -1, -1, -1, -1, -1, -1, -1, 654, 03327 -1, -1, -1, -1, -1, -1, 661, -1, -1, -1, 03328 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03329 -1, -1, 68, 69, 70, 71, 72, 73, 74, 654, 03330 -1, 77, 78, -1, -1, -1, 661, 83, 84, -1, 03331 -1, -1, -1, -1, -1, -1, 701, 654, -1, -1, 03332 -1, -1, -1, -1, 709, 662, -1, -1, -1, -1, 03333 -1, 716, 717, -1, -1, -1, 112, 113, 114, 115, 03334 116, 117, 118, 119, 120, 121, 701, -1, -1, -1, 03335 -1, -1, -1, -1, 709, -1, -1, -1, 743, 744, 03336 -1, 716, 717, -1, 701, -1, -1, -1, -1, -1, 03337 755, -1, 709, -1, -1, -1, -1, -1, -1, 716, 03338 717, 68, 69, 70, 71, 72, 73, 74, 743, 744, 03339 77, 78, -1, -1, -1, -1, 83, 84, -1, -1, 03340 755, -1, -1, -1, -1, -1, 743, 744, 793, -1, 03341 -1, -1, -1, -1, -1, 800, 801, -1, 755, 804, 03342 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 03343 117, 118, 119, 120, 121, 820, -1, -1, 793, -1, 03344 -1, -1, -1, -1, -1, 800, 801, -1, -1, 804, 03345 -1, -1, -1, -1, -1, -1, 793, 842, -1, -1, 03346 -1, -1, -1, 800, 801, 820, -1, 804, -1, -1, 03347 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03348 -1, -1, -1, 820, -1, -1, -1, 842, -1, -1, 03349 875, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03350 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03352 875, -1, -1, 860, -1, -1, -1, 864, -1, -1, 03353 -1, -1, -1, 918, -1, 920, -1, -1, 875, -1, 03354 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03356 -1, -1, -1, 918, -1, 920, -1, -1, -1, -1, 03357 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03358 -1, 918, -1, 920, -1, -1, -1, -1, -1, 926, 03359 -1, 928, 0, 1, -1, 3, 4, 5, 6, 7, 03360 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1, 03361 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03362 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03363 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03364 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03365 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03367 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03368 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03369 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03370 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03371 -1, -1, -1, 0, 122, 123, 124, -1, -1, -1, 03372 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03373 17, -1, -1, -1, -1, -1, -1, 145, -1, 147, 03374 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03375 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03376 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03377 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03378 84, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03379 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03380 87, 88, -1, -1, -1, -1, 110, 94, 112, 113, 03381 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03382 107, -1, 109, 110, 111, 112, 113, 114, 115, 116, 03383 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, 03384 -1, -1, -1, 147, -1, -1, -1, -1, -1, -1, 03385 137, 138, 139, 140, 0, -1, 143, 144, 145, -1, 03386 147, -1, 8, 9, 10, -1, -1, 13, 14, 15, 03387 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 03388 26, 27, 28, -1, -1, -1, -1, -1, -1, -1, 03389 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03390 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03391 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03392 83, 84, 68, 69, 70, 71, 72, 73, 74, 75, 03393 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03394 -1, -1, 88, -1, -1, -1, -1, 110, 94, 112, 03395 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03396 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 03397 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03399 136, 137, 138, 139, 140, 0, 142, 143, 144, 145, 03400 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14, 03401 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03402 -1, -1, 27, 28, 29, -1, -1, -1, -1, -1, 03403 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03404 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03405 72, 73, 74, 75, -1, 77, 78, -1, -1, -1, 03406 -1, 83, 84, 68, 69, 70, 71, 72, 73, 74, 03407 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03408 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03409 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03410 -1, -1, 107, -1, -1, 110, 111, 112, 113, 114, 03411 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, 03412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03413 -1, -1, 137, 138, 139, 140, 0, -1, 143, 144, 03414 145, -1, 147, -1, 8, 9, 10, -1, -1, 13, 03415 14, 15, -1, 17, -1, -1, -1, -1, -1, -1, 03416 -1, -1, 26, 27, 28, -1, -1, -1, -1, -1, 03417 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 03418 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03419 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03420 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03421 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03422 84, 85, -1, -1, 88, -1, -1, -1, -1, -1, 03423 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03424 -1, -1, -1, -1, -1, -1, 110, -1, 112, 113, 03425 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03427 -1, -1, 136, 137, 138, 139, 140, 0, 142, 143, 03428 144, 145, -1, 147, -1, 8, 9, 10, -1, -1, 03429 13, 14, 15, -1, 17, -1, -1, -1, -1, -1, 03430 -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, 03431 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, 03432 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, 03433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03434 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03435 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03436 83, 84, 85, -1, -1, 88, -1, -1, -1, -1, 03437 -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, 03438 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 03439 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03441 -1, -1, -1, -1, 137, 138, 139, 140, 0, 142, 03442 143, 144, 145, -1, 147, -1, 8, 9, 10, -1, 03443 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1, 03444 -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, 03445 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03446 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03448 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03449 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03450 -1, 83, 84, 85, 0, 87, -1, -1, -1, -1, 03451 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15, 03452 -1, 17, -1, -1, -1, -1, -1, 109, 110, -1, 03453 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03454 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03455 -1, -1, -1, -1, 136, 137, 138, 139, 140, -1, 03456 -1, 143, -1, 145, -1, 147, -1, -1, -1, -1, 03457 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03458 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03459 -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, 03460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03461 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115, 03462 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03464 -1, 137, 138, 139, 140, -1, -1, 143, -1, 145, 03465 1, 147, 3, 4, 5, 6, 7, 8, 9, 10, 03466 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03467 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03468 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03469 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03470 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03471 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03472 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03473 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03474 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03475 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03476 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03477 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03479 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03480 6, 7, -1, -1, 10, 11, 12, -1, 14, 15, 03481 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03482 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03483 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03484 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03485 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03486 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03488 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03489 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03491 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03493 -1, -1, -1, -1, -1, -1, -1, -1, -1, 145, 03494 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03495 11, 12, -1, -1, 15, 16, 17, 18, 19, 20, 03496 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03497 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03498 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03499 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03500 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03502 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03503 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03504 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03506 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03507 1, -1, 3, 4, 5, 6, 7, -1, -1, -1, 03508 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03509 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03510 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03511 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03512 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03513 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03515 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03516 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03517 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03519 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03520 -1, -1, -1, -1, -1, -1, 137, -1, -1, -1, 03521 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03522 6, 7, -1, -1, 10, 11, 12, -1, -1, 15, 03523 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03524 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03525 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03526 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03527 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03528 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03530 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03531 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03533 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03534 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03535 6, 7, -1, 9, 10, 11, 12, -1, -1, 145, 03536 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03537 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03538 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03539 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03540 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03541 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03542 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03543 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03544 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03546 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03547 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03548 6, 7, -1, -1, -1, 11, 12, -1, -1, 145, 03549 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03550 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03551 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03552 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03553 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03554 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03555 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03556 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03557 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03558 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03559 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03560 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03561 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03562 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03563 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03564 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03565 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03566 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03567 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03569 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03570 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03572 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03573 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03574 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03575 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03576 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03577 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03578 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03579 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03580 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03581 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03582 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03583 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03585 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03587 -1, 137, -1, -1, -1, -1, -1, -1, -1, 145, 03588 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03589 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, 03590 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03591 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03592 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03593 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03594 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03595 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03596 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03597 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03598 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03599 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03600 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03601 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03602 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03603 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03604 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03605 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03606 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03607 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03609 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03610 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03611 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03612 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03613 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03614 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03615 32, 33, 34, 35, 36, -1, 147, 39, -1, -1, 03616 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03617 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03618 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03620 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03621 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03622 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03624 122, 123, 124, -1, -1, -1, -1, -1, -1, -1, 03625 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03626 12, -1, -1, 145, 16, 147, 18, 19, 20, 21, 03627 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03628 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03629 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03630 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03631 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03633 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03634 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03635 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03636 3, 4, 5, 6, 7, -1, -1, -1, 11, 12, 03637 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03638 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03639 33, 34, 35, 36, -1, 147, 39, -1, -1, -1, 03640 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03641 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03642 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03643 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03644 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03645 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03646 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03647 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03648 123, 124, -1, -1, -1, -1, -1, -1, 3, 4, 03649 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, 03650 -1, 16, 145, 18, 19, 20, 21, 22, 23, 24, 03651 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03652 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03653 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, 03654 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03655 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03657 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03658 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03659 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03660 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03663 145, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03664 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03665 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03666 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03667 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03668 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, 03669 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03670 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03671 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03672 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 03673 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03674 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03675 -1, 123, 124, -1, -1, -1, -1, -1, 3, 4, 03676 5, -1, 7, -1, -1, -1, 11, 12, -1, 141, 03677 142, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03678 -1, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03679 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03680 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03681 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03682 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03683 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03684 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03685 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, 03686 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03687 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03688 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03689 -1, 136, -1, 11, 12, -1, -1, 142, 16, -1, 03690 18, 19, 20, 21, 22, 23, 24, -1, 26, -1, 03691 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03692 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03693 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03694 58, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03695 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03696 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03697 -1, 89, 90, -1, 92, 93, -1, 95, 96, 97, 03698 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03699 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03700 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03701 -1, -1, 3, 4, 5, -1, 7, -1, 136, -1, 03702 11, 12, -1, -1, 142, 16, -1, 18, 19, 20, 03703 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03704 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03705 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03706 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03707 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03708 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03709 -1, -1, -1, -1, -1, 86, 87, -1, 89, 90, 03710 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03711 101, 102, 103, -1, -1, -1, -1, -1, 109, -1, 03712 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03713 7, 122, 123, 124, 11, 12, -1, -1, -1, 16, 03714 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03715 -1, 142, -1, 30, 31, 32, 33, 34, 35, 36, 03716 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03717 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03718 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03719 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03720 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03721 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96, 03722 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03724 3, 4, 5, -1, 7, 122, 123, 124, 11, 12, 03725 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, 03726 23, 24, -1, -1, -1, 142, -1, 30, 31, 32, 03727 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03728 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03729 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03730 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03732 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03733 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03734 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03735 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03736 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03737 -1, -1, -1, -1, -1, -1, -1, -1, -1, 142, 03738 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 03739 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 03740 23, 24, 25, 26, -1, -1, -1, 30, 31, 32, 03741 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, 03742 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03743 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, 03744 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 03745 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 03746 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 03747 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 03748 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 03749 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03750 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03751 -1, -1, -1, -1, -1, -1, -1, -1, 141, 3, 03752 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 03753 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 03754 24, 25, 26, -1, -1, -1, 30, 31, 32, 33, 03755 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, 03756 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03757 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03758 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 03759 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03760 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03761 -1, 95, -1, -1, 98, -1, -1, -1, -1, -1, 03762 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 03763 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03764 124, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03765 -1, -1, -1, -1, -1, -1, -1, 141, 3, 4, 03766 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03767 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03768 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03769 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03770 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 03771 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03772 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03773 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03774 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03775 95, -1, -1, 98, -1, -1, -1, -1, -1, -1, 03776 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03777 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03778 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03779 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5, 03780 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 03781 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 03782 26, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03783 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 03784 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, 03785 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03786 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 03787 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 03788 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 03789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03790 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 03791 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 03792 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03793 12, -1, -1, -1, 16, 141, 18, 19, 20, 21, 03794 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03795 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03796 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03797 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03798 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 03799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03800 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03801 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03802 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03803 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03804 122, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03805 20, 21, 22, 23, 24, -1, -1, -1, 140, -1, 03806 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03807 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03808 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03809 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 03810 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03811 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03812 90, -1, 92, 93, -1, -1, -1, 97, 98, 99, 03813 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03814 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 03815 -1, -1, 122, 11, 12, -1, -1, -1, 16, -1, 03816 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03817 140, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03818 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03819 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03820 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03821 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03822 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03823 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03824 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03825 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 03826 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03827 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03828 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03829 39, -1, -1, -1, -1, -1, 45, 46, -1, 48, 03830 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03831 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03833 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03834 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03835 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03836 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03837 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03838 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03839 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03840 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03841 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03842 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03843 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03844 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03845 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, 03846 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03847 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03848 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03849 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03850 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03851 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03852 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03853 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03855 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03856 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03857 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03858 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03859 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03860 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03861 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03862 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03863 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 03864 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03866 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03867 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, 03868 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03869 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03870 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03871 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03872 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03873 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03874 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03875 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03877 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03878 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 03879 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03880 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03881 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03882 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03883 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03884 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03885 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03886 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03887 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03888 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03889 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03890 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03891 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, 03892 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03893 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03894 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03895 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03896 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03897 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03898 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03899 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03900 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03901 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03902 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, 03903 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03904 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03905 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03906 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03907 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03908 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03910 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03911 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03912 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03913 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, 03914 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03915 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03916 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03917 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03918 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03919 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03920 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03921 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03922 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03923 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03924 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, 03925 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03926 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03927 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03928 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03929 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03931 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03932 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03933 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03934 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03935 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03936 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03937 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03938 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03939 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03940 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03941 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03942 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03943 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03944 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03945 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03946 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03947 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03948 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03949 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03950 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03951 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03952 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03953 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03954 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, 03955 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03956 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03957 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03958 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03959 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03960 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03961 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03962 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03963 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03964 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03965 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, 03966 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03967 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03968 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03969 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03970 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03971 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03972 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03973 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03974 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03975 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03976 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03977 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03978 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03979 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03980 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03981 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03982 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03983 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03984 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03985 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03986 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03987 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, 03988 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03989 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03990 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03991 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03992 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03993 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03994 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03995 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03996 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03997 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03998 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03999 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04000 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 04001 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04002 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04003 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04004 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04005 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04006 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04007 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04008 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 04009 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 04010 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04011 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 04012 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04013 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04014 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04015 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04016 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04017 -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, 04018 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04019 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 04020 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04021 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 04022 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04023 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04024 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04025 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04026 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04028 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04029 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 04030 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 04031 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04032 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 04033 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04034 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04035 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04036 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04037 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04039 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04040 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 04041 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04042 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 04043 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04044 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04045 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04046 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04047 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 04048 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04049 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04050 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 04051 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 04052 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04053 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 04054 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04055 34, 35, 36, -1, -1, 39, -1, 44, -1, -1, 04056 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04057 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04058 64, 68, 69, 70, 71, 72, 73, 74, 75, 76, 04059 77, 78, 79, 80, -1, -1, 83, 84, -1, -1, 04060 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04061 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 04062 -1, -1, -1, 110, -1, 112, 113, 114, 115, 116, 04063 117, 118, 119, 120, 121, -1, -1, -1, 122, -1, 04064 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04065 -1, -1, -1, 140, 66, 67, 68, 69, 70, 71, 04066 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04067 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04068 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04069 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04070 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04071 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04072 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04073 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04074 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04076 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04077 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04078 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04079 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04080 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04081 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04082 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04083 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04084 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04085 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04086 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04087 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04088 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04089 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04090 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04091 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04093 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04094 121, -1, 123, 124, -1, -1, -1, -1, 52, 53, 04095 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, 04096 141, 142, 66, 67, 68, 69, 70, 71, 72, 73, 04097 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04098 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04099 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 04100 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 04101 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 04102 124, -1, -1, -1, -1, 52, 53, -1, -1, 56, 04103 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66, 04104 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04105 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04106 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, 04107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04108 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 04109 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, 04110 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, 04111 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69, 04112 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04113 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04114 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1, 04115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04116 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 04117 120, 121, -1, 123, 124, -1, -1, -1, -1, 52, 04118 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, 04119 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72, 04120 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04121 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04122 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 04123 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 04124 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 04125 123, 124, -1, -1, -1, -1, 52, 53, -1, -1, 04126 56, -1, -1, -1, -1, -1, -1, -1, 141, 142, 04127 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04128 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04129 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04130 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04131 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 04132 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 04133 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, 04134 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68, 04135 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04136 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04137 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, 04138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04139 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 04140 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, 04141 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04142 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71, 04143 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04144 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04145 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04147 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04148 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04149 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04150 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04151 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04152 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04153 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04154 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04155 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04156 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04157 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04158 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04159 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04160 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04162 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04163 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04164 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04165 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04166 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04167 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04168 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04169 -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, 04170 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04171 121, 44, 123, 124, -1, -1, 68, 69, 70, 71, 04172 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 04173 141, 83, 84, -1, -1, 68, 69, 70, 71, 72, 04174 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 04175 83, 84, -1, -1, -1, -1, -1, -1, 110, -1, 04176 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04177 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 04178 113, 114, 115, 116, 117, 118, 119, 120, 121 04179 }; 04180 04181 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04182 symbol of state STATE-NUM. */ 04183 static const yytype_uint16 yystos[] = 04184 { 04185 0, 149, 150, 0, 1, 3, 4, 5, 6, 7, 04186 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04187 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04188 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04189 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04190 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, 04191 103, 122, 123, 124, 151, 152, 153, 158, 160, 161, 04192 163, 164, 167, 168, 170, 171, 172, 174, 175, 185, 04193 199, 216, 217, 218, 219, 220, 221, 222, 223, 224, 04194 225, 226, 249, 250, 260, 261, 262, 263, 264, 265, 04195 266, 269, 279, 281, 282, 283, 284, 285, 286, 287, 04196 310, 321, 153, 3, 4, 5, 6, 7, 8, 9, 04197 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 04198 20, 21, 22, 23, 24, 25, 26, 30, 31, 32, 04199 33, 34, 35, 36, 37, 38, 39, 45, 46, 47, 04200 48, 49, 50, 51, 52, 53, 56, 66, 67, 68, 04201 69, 70, 71, 72, 73, 74, 77, 78, 81, 82, 04202 83, 84, 95, 112, 113, 114, 115, 116, 117, 118, 04203 119, 120, 121, 123, 124, 141, 178, 179, 180, 181, 04204 183, 184, 279, 281, 39, 58, 86, 89, 95, 96, 04205 123, 167, 175, 185, 187, 192, 195, 197, 216, 283, 04206 284, 286, 287, 308, 309, 192, 192, 142, 193, 194, 04207 142, 189, 193, 142, 147, 315, 54, 180, 315, 154, 04208 136, 21, 22, 30, 31, 32, 185, 216, 310, 185, 04209 56, 1, 89, 156, 157, 158, 169, 170, 321, 161, 04210 188, 197, 308, 321, 187, 307, 308, 321, 46, 86, 04211 122, 140, 174, 199, 216, 283, 284, 287, 242, 243, 04212 54, 55, 57, 178, 272, 280, 271, 272, 273, 146, 04213 267, 146, 270, 59, 60, 163, 185, 185, 145, 147, 04214 314, 319, 320, 40, 41, 42, 43, 44, 37, 38, 04215 28, 247, 109, 140, 89, 95, 171, 109, 68, 69, 04216 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 04217 80, 83, 84, 110, 112, 113, 114, 115, 116, 117, 04218 118, 119, 120, 121, 85, 138, 139, 200, 161, 162, 04219 162, 203, 205, 162, 314, 320, 86, 168, 175, 216, 04220 232, 283, 284, 287, 52, 56, 83, 86, 176, 177, 04221 216, 283, 284, 287, 177, 33, 34, 35, 36, 49, 04222 50, 51, 52, 56, 142, 178, 285, 305, 85, 139, 04223 26, 136, 251, 263, 87, 87, 189, 193, 251, 140, 04224 187, 56, 187, 187, 109, 88, 140, 196, 321, 85, 04225 138, 139, 87, 87, 140, 196, 192, 315, 316, 192, 04226 191, 192, 197, 308, 321, 161, 316, 161, 54, 63, 04227 64, 159, 142, 186, 136, 156, 85, 139, 87, 158, 04228 169, 143, 314, 320, 316, 201, 144, 140, 147, 318, 04229 140, 318, 137, 318, 315, 56, 59, 60, 171, 173, 04230 140, 85, 138, 139, 244, 61, 104, 105, 106, 274, 04231 106, 274, 106, 65, 274, 106, 106, 268, 274, 106, 04232 61, 106, 68, 68, 145, 153, 162, 162, 162, 162, 04233 158, 161, 161, 248, 95, 163, 187, 197, 198, 169, 04234 140, 174, 140, 160, 163, 175, 185, 187, 198, 185, 04235 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04236 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04237 185, 185, 185, 185, 185, 52, 53, 56, 183, 189, 04238 311, 312, 191, 52, 53, 56, 183, 189, 311, 155, 04239 156, 13, 228, 319, 228, 162, 162, 314, 17, 254, 04240 56, 85, 138, 139, 25, 161, 52, 56, 176, 1, 04241 113, 288, 319, 85, 138, 139, 212, 306, 213, 85, 04242 139, 313, 52, 56, 311, 311, 253, 252, 163, 185, 04243 163, 185, 94, 165, 182, 185, 187, 95, 187, 195, 04244 308, 52, 56, 191, 52, 56, 309, 316, 143, 316, 04245 140, 140, 316, 180, 202, 185, 151, 137, 311, 311, 04246 185, 316, 158, 316, 308, 140, 173, 52, 56, 191, 04247 52, 56, 52, 54, 55, 56, 57, 89, 95, 96, 04248 116, 119, 142, 245, 291, 292, 293, 294, 295, 296, 04249 299, 300, 301, 302, 303, 276, 275, 146, 274, 146, 04250 185, 185, 76, 114, 237, 238, 321, 187, 140, 316, 04251 173, 140, 109, 44, 315, 87, 87, 189, 193, 315, 04252 317, 87, 87, 189, 190, 193, 321, 10, 227, 8, 04253 256, 321, 156, 13, 156, 27, 229, 319, 229, 254, 04254 197, 227, 52, 56, 191, 52, 56, 207, 210, 319, 04255 289, 209, 52, 56, 176, 191, 155, 161, 142, 290, 04256 291, 214, 190, 193, 190, 193, 237, 237, 44, 166, 04257 180, 187, 196, 87, 87, 317, 87, 87, 308, 161, 04258 137, 318, 171, 317, 109, 52, 89, 95, 233, 234, 04259 235, 293, 291, 29, 107, 246, 140, 304, 321, 140, 04260 304, 52, 140, 304, 52, 277, 54, 55, 57, 278, 04261 287, 52, 145, 236, 239, 295, 297, 298, 301, 303, 04262 321, 156, 95, 187, 173, 185, 111, 163, 185, 163, 04263 185, 165, 144, 87, 163, 185, 163, 185, 165, 187, 04264 198, 257, 321, 15, 231, 321, 14, 230, 231, 231, 04265 204, 206, 227, 140, 228, 317, 162, 319, 162, 155, 04266 317, 227, 316, 291, 155, 319, 178, 156, 156, 185, 04267 237, 87, 140, 316, 187, 235, 140, 293, 140, 316, 04268 239, 156, 156, 294, 299, 301, 303, 295, 296, 301, 04269 295, 156, 109, 52, 240, 241, 292, 239, 114, 140, 04270 304, 140, 304, 140, 304, 10, 187, 185, 163, 185, 04271 88, 258, 321, 156, 9, 259, 321, 162, 227, 227, 04272 156, 156, 187, 156, 229, 211, 319, 227, 316, 227, 04273 215, 10, 137, 156, 316, 234, 140, 95, 233, 316, 04274 10, 137, 140, 304, 140, 304, 140, 304, 140, 304, 04275 304, 137, 86, 216, 140, 114, 298, 301, 295, 297, 04276 301, 295, 86, 175, 216, 283, 284, 287, 228, 156, 04277 228, 227, 227, 231, 254, 255, 208, 155, 290, 137, 04278 140, 234, 140, 293, 295, 301, 295, 295, 56, 85, 04279 241, 140, 304, 140, 304, 304, 140, 304, 304, 56, 04280 85, 138, 139, 156, 156, 156, 227, 155, 234, 140, 04281 304, 140, 304, 304, 304, 52, 56, 295, 301, 295, 04282 295, 52, 56, 191, 52, 56, 256, 230, 227, 227, 04283 234, 295, 304, 140, 304, 304, 304, 317, 304, 295, 04284 304 04285 }; 04286 04287 #define yyerrok (yyerrstatus = 0) 04288 #define yyclearin (yychar = YYEMPTY) 04289 #define YYEMPTY (-2) 04290 #define YYEOF 0 04291 04292 #define YYACCEPT goto yyacceptlab 04293 #define YYABORT goto yyabortlab 04294 #define YYERROR goto yyerrorlab 04295 04296 04297 /* Like YYERROR except do call yyerror. This remains here temporarily 04298 to ease the transition to the new meaning of YYERROR, for GCC. 04299 Once GCC version 2 has supplanted version 1, this can go. */ 04300 04301 #define YYFAIL goto yyerrlab 04302 04303 #define YYRECOVERING() (!!yyerrstatus) 04304 04305 #define YYBACKUP(Token, Value) \ 04306 do \ 04307 if (yychar == YYEMPTY && yylen == 1) \ 04308 { \ 04309 yychar = (Token); \ 04310 yylval = (Value); \ 04311 yytoken = YYTRANSLATE (yychar); \ 04312 YYPOPSTACK (1); \ 04313 goto yybackup; \ 04314 } \ 04315 else \ 04316 { \ 04317 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04318 YYERROR; \ 04319 } \ 04320 while (YYID (0)) 04321 04322 04323 #define YYTERROR 1 04324 #define YYERRCODE 256 04325 04326 04327 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04328 If N is 0, then set CURRENT to the empty location which ends 04329 the previous symbol: RHS[0] (always defined). */ 04330 04331 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04332 #ifndef YYLLOC_DEFAULT 04333 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04334 do \ 04335 if (YYID (N)) \ 04336 { \ 04337 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04338 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04339 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04340 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04341 } \ 04342 else \ 04343 { \ 04344 (Current).first_line = (Current).last_line = \ 04345 YYRHSLOC (Rhs, 0).last_line; \ 04346 (Current).first_column = (Current).last_column = \ 04347 YYRHSLOC (Rhs, 0).last_column; \ 04348 } \ 04349 while (YYID (0)) 04350 #endif 04351 04352 04353 /* YY_LOCATION_PRINT -- Print the location on the stream. 04354 This macro was not mandated originally: define only if we know 04355 we won't break user code: when these are the locations we know. */ 04356 04357 #ifndef YY_LOCATION_PRINT 04358 # if YYLTYPE_IS_TRIVIAL 04359 # define YY_LOCATION_PRINT(File, Loc) \ 04360 fprintf (File, "%d.%d-%d.%d", \ 04361 (Loc).first_line, (Loc).first_column, \ 04362 (Loc).last_line, (Loc).last_column) 04363 # else 04364 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04365 # endif 04366 #endif 04367 04368 04369 /* YYLEX -- calling `yylex' with the right arguments. */ 04370 04371 #ifdef YYLEX_PARAM 04372 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04373 #else 04374 # define YYLEX yylex (&yylval) 04375 #endif 04376 04377 /* Enable debugging if requested. */ 04378 #if YYDEBUG 04379 04380 # ifndef YYFPRINTF 04381 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04382 # define YYFPRINTF fprintf 04383 # endif 04384 04385 # define YYDPRINTF(Args) \ 04386 do { \ 04387 if (yydebug) \ 04388 YYFPRINTF Args; \ 04389 } while (YYID (0)) 04390 04391 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04392 do { \ 04393 if (yydebug) \ 04394 { \ 04395 YYFPRINTF (stderr, "%s ", Title); \ 04396 yy_symbol_print (stderr, \ 04397 Type, Value, parser); \ 04398 YYFPRINTF (stderr, "\n"); \ 04399 } \ 04400 } while (YYID (0)) 04401 04402 04403 /*--------------------------------. 04404 | Print this symbol on YYOUTPUT. | 04405 `--------------------------------*/ 04406 04407 /*ARGSUSED*/ 04408 #if (defined __STDC__ || defined __C99__FUNC__ \ 04409 || defined __cplusplus || defined _MSC_VER) 04410 static void 04411 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04412 #else 04413 static void 04414 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04415 FILE *yyoutput; 04416 int yytype; 04417 YYSTYPE const * const yyvaluep; 04418 struct parser_params *parser; 04419 #endif 04420 { 04421 if (!yyvaluep) 04422 return; 04423 YYUSE (parser); 04424 # ifdef YYPRINT 04425 if (yytype < YYNTOKENS) 04426 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04427 # else 04428 YYUSE (yyoutput); 04429 # endif 04430 switch (yytype) 04431 { 04432 default: 04433 break; 04434 } 04435 } 04436 04437 04438 /*--------------------------------. 04439 | Print this symbol on YYOUTPUT. | 04440 `--------------------------------*/ 04441 04442 #if (defined __STDC__ || defined __C99__FUNC__ \ 04443 || defined __cplusplus || defined _MSC_VER) 04444 static void 04445 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04446 #else 04447 static void 04448 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04449 FILE *yyoutput; 04450 int yytype; 04451 YYSTYPE const * const yyvaluep; 04452 struct parser_params *parser; 04453 #endif 04454 { 04455 if (yytype < YYNTOKENS) 04456 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04457 else 04458 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04459 04460 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04461 YYFPRINTF (yyoutput, ")"); 04462 } 04463 04464 /*------------------------------------------------------------------. 04465 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04466 | TOP (included). | 04467 `------------------------------------------------------------------*/ 04468 04469 #if (defined __STDC__ || defined __C99__FUNC__ \ 04470 || defined __cplusplus || defined _MSC_VER) 04471 static void 04472 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 04473 #else 04474 static void 04475 yy_stack_print (bottom, top) 04476 yytype_int16 *bottom; 04477 yytype_int16 *top; 04478 #endif 04479 { 04480 YYFPRINTF (stderr, "Stack now"); 04481 for (; bottom <= top; ++bottom) 04482 YYFPRINTF (stderr, " %d", *bottom); 04483 YYFPRINTF (stderr, "\n"); 04484 } 04485 04486 # define YY_STACK_PRINT(Bottom, Top) \ 04487 do { \ 04488 if (yydebug) \ 04489 yy_stack_print ((Bottom), (Top)); \ 04490 } while (YYID (0)) 04491 04492 04493 /*------------------------------------------------. 04494 | Report that the YYRULE is going to be reduced. | 04495 `------------------------------------------------*/ 04496 04497 #if (defined __STDC__ || defined __C99__FUNC__ \ 04498 || defined __cplusplus || defined _MSC_VER) 04499 static void 04500 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04501 #else 04502 static void 04503 yy_reduce_print (yyvsp, yyrule, parser) 04504 YYSTYPE *yyvsp; 04505 int yyrule; 04506 struct parser_params *parser; 04507 #endif 04508 { 04509 int yynrhs = yyr2[yyrule]; 04510 int yyi; 04511 unsigned long int yylno = yyrline[yyrule]; 04512 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04513 yyrule - 1, yylno); 04514 /* The symbols being reduced. */ 04515 for (yyi = 0; yyi < yynrhs; yyi++) 04516 { 04517 fprintf (stderr, " $%d = ", yyi + 1); 04518 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04519 &(yyvsp[(yyi + 1) - (yynrhs)]) 04520 , parser); 04521 fprintf (stderr, "\n"); 04522 } 04523 } 04524 04525 # define YY_REDUCE_PRINT(Rule) \ 04526 do { \ 04527 if (yydebug) \ 04528 yy_reduce_print (yyvsp, Rule, parser); \ 04529 } while (YYID (0)) 04530 04531 /* Nonzero means print parse trace. It is left uninitialized so that 04532 multiple parsers can coexist. */ 04533 #ifndef yydebug 04534 int yydebug; 04535 #endif 04536 #else /* !YYDEBUG */ 04537 # define YYDPRINTF(Args) 04538 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04539 # define YY_STACK_PRINT(Bottom, Top) 04540 # define YY_REDUCE_PRINT(Rule) 04541 #endif /* !YYDEBUG */ 04542 04543 04544 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04545 #ifndef YYINITDEPTH 04546 # define YYINITDEPTH 200 04547 #endif 04548 04549 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04550 if the built-in stack extension method is used). 04551 04552 Do not make this value too large; the results are undefined if 04553 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04554 evaluated with infinite-precision integer arithmetic. */ 04555 04556 #ifndef YYMAXDEPTH 04557 # define YYMAXDEPTH 10000 04558 #endif 04559 04560 04561 04562 #if YYERROR_VERBOSE 04563 04564 # ifndef yystrlen 04565 # if defined __GLIBC__ && defined _STRING_H 04566 # define yystrlen strlen 04567 # else 04568 /* Return the length of YYSTR. */ 04569 #if (defined __STDC__ || defined __C99__FUNC__ \ 04570 || defined __cplusplus || defined _MSC_VER) 04571 static YYSIZE_T 04572 yystrlen (const char *yystr) 04573 #else 04574 static YYSIZE_T 04575 yystrlen (yystr) 04576 const char *yystr; 04577 #endif 04578 { 04579 YYSIZE_T yylen; 04580 for (yylen = 0; yystr[yylen]; yylen++) 04581 continue; 04582 return yylen; 04583 } 04584 # endif 04585 # endif 04586 04587 # ifndef yystpcpy 04588 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04589 # define yystpcpy stpcpy 04590 # else 04591 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04592 YYDEST. */ 04593 #if (defined __STDC__ || defined __C99__FUNC__ \ 04594 || defined __cplusplus || defined _MSC_VER) 04595 static char * 04596 yystpcpy (char *yydest, const char *yysrc) 04597 #else 04598 static char * 04599 yystpcpy (yydest, yysrc) 04600 char *yydest; 04601 const char *yysrc; 04602 #endif 04603 { 04604 char *yyd = yydest; 04605 const char *yys = yysrc; 04606 04607 while ((*yyd++ = *yys++) != '\0') 04608 continue; 04609 04610 return yyd - 1; 04611 } 04612 # endif 04613 # endif 04614 04615 # ifndef yytnamerr 04616 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04617 quotes and backslashes, so that it's suitable for yyerror. The 04618 heuristic is that double-quoting is unnecessary unless the string 04619 contains an apostrophe, a comma, or backslash (other than 04620 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04621 null, do not copy; instead, return the length of what the result 04622 would have been. */ 04623 static YYSIZE_T 04624 yytnamerr (char *yyres, const char *yystr) 04625 { 04626 if (*yystr == '"') 04627 { 04628 YYSIZE_T yyn = 0; 04629 char const *yyp = yystr; 04630 04631 for (;;) 04632 switch (*++yyp) 04633 { 04634 case '\'': 04635 case ',': 04636 goto do_not_strip_quotes; 04637 04638 case '\\': 04639 if (*++yyp != '\\') 04640 goto do_not_strip_quotes; 04641 /* Fall through. */ 04642 default: 04643 if (yyres) 04644 yyres[yyn] = *yyp; 04645 yyn++; 04646 break; 04647 04648 case '"': 04649 if (yyres) 04650 yyres[yyn] = '\0'; 04651 return yyn; 04652 } 04653 do_not_strip_quotes: ; 04654 } 04655 04656 if (! yyres) 04657 return yystrlen (yystr); 04658 04659 return yystpcpy (yyres, yystr) - yyres; 04660 } 04661 # endif 04662 04663 /* Copy into YYRESULT an error message about the unexpected token 04664 YYCHAR while in state YYSTATE. Return the number of bytes copied, 04665 including the terminating null byte. If YYRESULT is null, do not 04666 copy anything; just return the number of bytes that would be 04667 copied. As a special case, return 0 if an ordinary "syntax error" 04668 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 04669 size calculation. */ 04670 static YYSIZE_T 04671 yysyntax_error (char *yyresult, int yystate, int yychar) 04672 { 04673 int yyn = yypact[yystate]; 04674 04675 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 04676 return 0; 04677 else 04678 { 04679 int yytype = YYTRANSLATE (yychar); 04680 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 04681 YYSIZE_T yysize = yysize0; 04682 YYSIZE_T yysize1; 04683 int yysize_overflow = 0; 04684 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04685 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04686 int yyx; 04687 04688 # if 0 04689 /* This is so xgettext sees the translatable formats that are 04690 constructed on the fly. */ 04691 YY_("syntax error, unexpected %s"); 04692 YY_("syntax error, unexpected %s, expecting %s"); 04693 YY_("syntax error, unexpected %s, expecting %s or %s"); 04694 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 04695 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 04696 # endif 04697 char *yyfmt; 04698 char const *yyf; 04699 static char const yyunexpected[] = "syntax error, unexpected %s"; 04700 static char const yyexpecting[] = ", expecting %s"; 04701 static char const yyor[] = " or %s"; 04702 char yyformat[sizeof yyunexpected 04703 + sizeof yyexpecting - 1 04704 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 04705 * (sizeof yyor - 1))]; 04706 char const *yyprefix = yyexpecting; 04707 04708 /* Start YYX at -YYN if negative to avoid negative indexes in 04709 YYCHECK. */ 04710 int yyxbegin = yyn < 0 ? -yyn : 0; 04711 04712 /* Stay within bounds of both yycheck and yytname. */ 04713 int yychecklim = YYLAST - yyn + 1; 04714 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04715 int yycount = 1; 04716 04717 yyarg[0] = yytname[yytype]; 04718 yyfmt = yystpcpy (yyformat, yyunexpected); 04719 04720 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04721 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 04722 { 04723 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04724 { 04725 yycount = 1; 04726 yysize = yysize0; 04727 yyformat[sizeof yyunexpected - 1] = '\0'; 04728 break; 04729 } 04730 yyarg[yycount++] = yytname[yyx]; 04731 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04732 yysize_overflow |= (yysize1 < yysize); 04733 yysize = yysize1; 04734 yyfmt = yystpcpy (yyfmt, yyprefix); 04735 yyprefix = yyor; 04736 } 04737 04738 yyf = YY_(yyformat); 04739 yysize1 = yysize + yystrlen (yyf); 04740 yysize_overflow |= (yysize1 < yysize); 04741 yysize = yysize1; 04742 04743 if (yysize_overflow) 04744 return YYSIZE_MAXIMUM; 04745 04746 if (yyresult) 04747 { 04748 /* Avoid sprintf, as that infringes on the user's name space. 04749 Don't have undefined behavior even if the translation 04750 produced a string with the wrong number of "%s"s. */ 04751 char *yyp = yyresult; 04752 int yyi = 0; 04753 while ((*yyp = *yyf) != '\0') 04754 { 04755 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 04756 { 04757 yyp += yytnamerr (yyp, yyarg[yyi++]); 04758 yyf += 2; 04759 } 04760 else 04761 { 04762 yyp++; 04763 yyf++; 04764 } 04765 } 04766 } 04767 return yysize; 04768 } 04769 } 04770 #endif /* YYERROR_VERBOSE */ 04771 04772 04773 /*-----------------------------------------------. 04774 | Release the memory associated to this symbol. | 04775 `-----------------------------------------------*/ 04776 04777 /*ARGSUSED*/ 04778 #if (defined __STDC__ || defined __C99__FUNC__ \ 04779 || defined __cplusplus || defined _MSC_VER) 04780 static void 04781 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04782 #else 04783 static void 04784 yydestruct (yymsg, yytype, yyvaluep, parser) 04785 const char *yymsg; 04786 int yytype; 04787 YYSTYPE *yyvaluep; 04788 struct parser_params *parser; 04789 #endif 04790 { 04791 YYUSE (yyvaluep); 04792 YYUSE (parser); 04793 04794 if (!yymsg) 04795 yymsg = "Deleting"; 04796 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04797 04798 switch (yytype) 04799 { 04800 04801 default: 04802 break; 04803 } 04804 } 04805 04806 04807 /* Prevent warnings from -Wmissing-prototypes. */ 04808 04809 #ifdef YYPARSE_PARAM 04810 #if defined __STDC__ || defined __cplusplus 04811 int yyparse (void *YYPARSE_PARAM); 04812 #else 04813 int yyparse (); 04814 #endif 04815 #else /* ! YYPARSE_PARAM */ 04816 #if defined __STDC__ || defined __cplusplus 04817 int yyparse (struct parser_params *parser); 04818 #else 04819 int yyparse (); 04820 #endif 04821 #endif /* ! YYPARSE_PARAM */ 04822 04823 04824 04825 04826 04827 04828 /*----------. 04829 | yyparse. | 04830 `----------*/ 04831 04832 #ifdef YYPARSE_PARAM 04833 #if (defined __STDC__ || defined __C99__FUNC__ \ 04834 || defined __cplusplus || defined _MSC_VER) 04835 int 04836 yyparse (void *YYPARSE_PARAM) 04837 #else 04838 int 04839 yyparse (YYPARSE_PARAM) 04840 void *YYPARSE_PARAM; 04841 #endif 04842 #else /* ! YYPARSE_PARAM */ 04843 #if (defined __STDC__ || defined __C99__FUNC__ \ 04844 || defined __cplusplus || defined _MSC_VER) 04845 int 04846 yyparse (struct parser_params *parser) 04847 #else 04848 int 04849 yyparse (parser) 04850 struct parser_params *parser; 04851 #endif 04852 #endif 04853 { 04854 /* The look-ahead symbol. */ 04855 int yychar; 04856 04857 /* The semantic value of the look-ahead symbol. */ 04858 YYSTYPE yylval; 04859 04860 /* Number of syntax errors so far. */ 04861 int yynerrs; 04862 04863 int yystate; 04864 int yyn; 04865 int yyresult; 04866 /* Number of tokens to shift before error messages enabled. */ 04867 int yyerrstatus; 04868 /* Look-ahead token as an internal (translated) token number. */ 04869 int yytoken = 0; 04870 #if YYERROR_VERBOSE 04871 /* Buffer for error messages, and its allocated size. */ 04872 char yymsgbuf[128]; 04873 char *yymsg = yymsgbuf; 04874 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 04875 #endif 04876 04877 /* Three stacks and their tools: 04878 `yyss': related to states, 04879 `yyvs': related to semantic values, 04880 `yyls': related to locations. 04881 04882 Refer to the stacks thru separate pointers, to allow yyoverflow 04883 to reallocate them elsewhere. */ 04884 04885 /* The state stack. */ 04886 yytype_int16 yyssa[YYINITDEPTH]; 04887 yytype_int16 *yyss = yyssa; 04888 yytype_int16 *yyssp; 04889 04890 /* The semantic value stack. */ 04891 YYSTYPE yyvsa[YYINITDEPTH]; 04892 YYSTYPE *yyvs = yyvsa; 04893 YYSTYPE *yyvsp; 04894 04895 04896 04897 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 04898 04899 YYSIZE_T yystacksize = YYINITDEPTH; 04900 04901 /* The variables used to return semantic value and location from the 04902 action routines. */ 04903 YYSTYPE yyval; 04904 04905 04906 /* The number of symbols on the RHS of the reduced rule. 04907 Keep to zero when no symbol should be popped. */ 04908 int yylen = 0; 04909 04910 YYDPRINTF ((stderr, "Starting parse\n")); 04911 04912 yystate = 0; 04913 yyerrstatus = 0; 04914 yynerrs = 0; 04915 yychar = YYEMPTY; /* Cause a token to be read. */ 04916 04917 /* Initialize stack pointers. 04918 Waste one element of value and location stack 04919 so that they stay on the same level as the state stack. 04920 The wasted elements are never initialized. */ 04921 04922 yyssp = yyss; 04923 yyvsp = yyvs; 04924 04925 goto yysetstate; 04926 04927 /*------------------------------------------------------------. 04928 | yynewstate -- Push a new state, which is found in yystate. | 04929 `------------------------------------------------------------*/ 04930 yynewstate: 04931 /* In all cases, when you get here, the value and location stacks 04932 have just been pushed. So pushing a state here evens the stacks. */ 04933 yyssp++; 04934 04935 yysetstate: 04936 *yyssp = yystate; 04937 04938 if (yyss + yystacksize - 1 <= yyssp) 04939 { 04940 /* Get the current used size of the three stacks, in elements. */ 04941 YYSIZE_T yysize = yyssp - yyss + 1; 04942 04943 #ifdef yyoverflow 04944 { 04945 /* Give user a chance to reallocate the stack. Use copies of 04946 these so that the &'s don't force the real ones into 04947 memory. */ 04948 YYSTYPE *yyvs1 = yyvs; 04949 yytype_int16 *yyss1 = yyss; 04950 04951 04952 /* Each stack pointer address is followed by the size of the 04953 data in use in that stack, in bytes. This used to be a 04954 conditional around just the two extra args, but that might 04955 be undefined if yyoverflow is a macro. */ 04956 yyoverflow (YY_("memory exhausted"), 04957 &yyss1, yysize * sizeof (*yyssp), 04958 &yyvs1, yysize * sizeof (*yyvsp), 04959 04960 &yystacksize); 04961 04962 yyss = yyss1; 04963 yyvs = yyvs1; 04964 } 04965 #else /* no yyoverflow */ 04966 # ifndef YYSTACK_RELOCATE 04967 goto yyexhaustedlab; 04968 # else 04969 /* Extend the stack our own way. */ 04970 if (YYMAXDEPTH <= yystacksize) 04971 goto yyexhaustedlab; 04972 yystacksize *= 2; 04973 if (YYMAXDEPTH < yystacksize) 04974 yystacksize = YYMAXDEPTH; 04975 04976 { 04977 yytype_int16 *yyss1 = yyss; 04978 union yyalloc *yyptr = 04979 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 04980 if (! yyptr) 04981 goto yyexhaustedlab; 04982 YYSTACK_RELOCATE (yyss); 04983 YYSTACK_RELOCATE (yyvs); 04984 04985 # undef YYSTACK_RELOCATE 04986 if (yyss1 != yyssa) 04987 YYSTACK_FREE (yyss1); 04988 } 04989 # endif 04990 #endif /* no yyoverflow */ 04991 04992 yyssp = yyss + yysize - 1; 04993 yyvsp = yyvs + yysize - 1; 04994 04995 04996 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 04997 (unsigned long int) yystacksize)); 04998 04999 if (yyss + yystacksize - 1 <= yyssp) 05000 YYABORT; 05001 } 05002 05003 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 05004 05005 goto yybackup; 05006 05007 /*-----------. 05008 | yybackup. | 05009 `-----------*/ 05010 yybackup: 05011 05012 /* Do appropriate processing given the current state. Read a 05013 look-ahead token if we need one and don't already have one. */ 05014 05015 /* First try to decide what to do without reference to look-ahead token. */ 05016 yyn = yypact[yystate]; 05017 if (yyn == YYPACT_NINF) 05018 goto yydefault; 05019 05020 /* Not known => get a look-ahead token if don't already have one. */ 05021 05022 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 05023 if (yychar == YYEMPTY) 05024 { 05025 YYDPRINTF ((stderr, "Reading a token: ")); 05026 yychar = YYLEX; 05027 } 05028 05029 if (yychar <= YYEOF) 05030 { 05031 yychar = yytoken = YYEOF; 05032 YYDPRINTF ((stderr, "Now at end of input.\n")); 05033 } 05034 else 05035 { 05036 yytoken = YYTRANSLATE (yychar); 05037 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 05038 } 05039 05040 /* If the proper action on seeing token YYTOKEN is to reduce or to 05041 detect an error, take that action. */ 05042 yyn += yytoken; 05043 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 05044 goto yydefault; 05045 yyn = yytable[yyn]; 05046 if (yyn <= 0) 05047 { 05048 if (yyn == 0 || yyn == YYTABLE_NINF) 05049 goto yyerrlab; 05050 yyn = -yyn; 05051 goto yyreduce; 05052 } 05053 05054 if (yyn == YYFINAL) 05055 YYACCEPT; 05056 05057 /* Count tokens shifted since error; after three, turn off error 05058 status. */ 05059 if (yyerrstatus) 05060 yyerrstatus--; 05061 05062 /* Shift the look-ahead token. */ 05063 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 05064 05065 /* Discard the shifted token unless it is eof. */ 05066 if (yychar != YYEOF) 05067 yychar = YYEMPTY; 05068 05069 yystate = yyn; 05070 *++yyvsp = yylval; 05071 05072 goto yynewstate; 05073 05074 05075 /*-----------------------------------------------------------. 05076 | yydefault -- do the default action for the current state. | 05077 `-----------------------------------------------------------*/ 05078 yydefault: 05079 yyn = yydefact[yystate]; 05080 if (yyn == 0) 05081 goto yyerrlab; 05082 goto yyreduce; 05083 05084 05085 /*-----------------------------. 05086 | yyreduce -- Do a reduction. | 05087 `-----------------------------*/ 05088 yyreduce: 05089 /* yyn is the number of a rule to reduce with. */ 05090 yylen = yyr2[yyn]; 05091 05092 /* If YYLEN is nonzero, implement the default value of the action: 05093 `$$ = $1'. 05094 05095 Otherwise, the following line sets YYVAL to garbage. 05096 This behavior is undocumented and Bison 05097 users should not rely upon it. Assigning to YYVAL 05098 unconditionally makes the parser a bit smaller, and it avoids a 05099 GCC warning that YYVAL may be used uninitialized. */ 05100 yyval = yyvsp[1-yylen]; 05101 05102 05103 YY_REDUCE_PRINT (yyn); 05104 switch (yyn) 05105 { 05106 case 2: 05107 #line 782 "ripper.y" 05108 { 05109 lex_state = EXPR_BEG; 05110 #if 0 05111 local_push(compile_for_eval || rb_parse_in_main()); 05112 #endif 05113 local_push(0); 05114 05115 ;} 05116 break; 05117 05118 case 3: 05119 #line 791 "ripper.y" 05120 { 05121 #if 0 05122 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { 05123 /* last expression should not be void */ 05124 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); 05125 else { 05126 NODE *node = (yyvsp[(2) - (2)].val); 05127 while (node->nd_next) { 05128 node = node->nd_next; 05129 } 05130 void_expr(node->nd_head); 05131 } 05132 } 05133 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val))); 05134 #endif 05135 (yyval.val) = (yyvsp[(2) - (2)].val); 05136 parser->result = dispatch1(program, (yyval.val)); 05137 05138 local_pop(); 05139 ;} 05140 break; 05141 05142 case 4: 05143 #line 814 "ripper.y" 05144 { 05145 #if 0 05146 void_stmts((yyvsp[(1) - (2)].val)); 05147 fixup_nodes(&deferred_nodes); 05148 #endif 05149 05150 (yyval.val) = (yyvsp[(1) - (2)].val); 05151 ;} 05152 break; 05153 05154 case 5: 05155 #line 825 "ripper.y" 05156 { 05157 #if 0 05158 (yyval.val) = NEW_BEGIN(0); 05159 #endif 05160 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05161 dispatch0(void_stmt)); 05162 05163 ;} 05164 break; 05165 05166 case 6: 05167 #line 834 "ripper.y" 05168 { 05169 #if 0 05170 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05171 #endif 05172 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05173 05174 ;} 05175 break; 05176 05177 case 7: 05178 #line 842 "ripper.y" 05179 { 05180 #if 0 05181 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05182 #endif 05183 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05184 05185 ;} 05186 break; 05187 05188 case 8: 05189 #line 850 "ripper.y" 05190 { 05191 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05192 ;} 05193 break; 05194 05195 case 10: 05196 #line 857 "ripper.y" 05197 { 05198 if (in_def || in_single) { 05199 yyerror("BEGIN in method"); 05200 } 05201 #if 0 05202 /* local_push(0); */ 05203 #endif 05204 05205 ;} 05206 break; 05207 05208 case 11: 05209 #line 867 "ripper.y" 05210 { 05211 #if 0 05212 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05213 (yyvsp[(4) - (5)].val)); 05214 /* NEW_PREEXE($4)); */ 05215 /* local_pop(); */ 05216 (yyval.val) = NEW_BEGIN(0); 05217 #endif 05218 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05219 05220 ;} 05221 break; 05222 05223 case 12: 05224 #line 884 "ripper.y" 05225 { 05226 #if 0 05227 (yyval.val) = (yyvsp[(1) - (4)].val); 05228 if ((yyvsp[(2) - (4)].val)) { 05229 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05230 } 05231 else if ((yyvsp[(3) - (4)].val)) { 05232 rb_warn0("else without rescue is useless"); 05233 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); 05234 } 05235 if ((yyvsp[(4) - (4)].val)) { 05236 if ((yyval.val)) { 05237 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); 05238 } 05239 else { 05240 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); 05241 } 05242 } 05243 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05244 #endif 05245 (yyval.val) = dispatch4(bodystmt, 05246 escape_Qundef((yyvsp[(1) - (4)].val)), 05247 escape_Qundef((yyvsp[(2) - (4)].val)), 05248 escape_Qundef((yyvsp[(3) - (4)].val)), 05249 escape_Qundef((yyvsp[(4) - (4)].val))); 05250 05251 ;} 05252 break; 05253 05254 case 13: 05255 #line 914 "ripper.y" 05256 { 05257 #if 0 05258 void_stmts((yyvsp[(1) - (2)].val)); 05259 fixup_nodes(&deferred_nodes); 05260 #endif 05261 05262 (yyval.val) = (yyvsp[(1) - (2)].val); 05263 ;} 05264 break; 05265 05266 case 14: 05267 #line 925 "ripper.y" 05268 { 05269 #if 0 05270 (yyval.val) = NEW_BEGIN(0); 05271 #endif 05272 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05273 dispatch0(void_stmt)); 05274 05275 ;} 05276 break; 05277 05278 case 15: 05279 #line 934 "ripper.y" 05280 { 05281 #if 0 05282 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05283 #endif 05284 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05285 05286 ;} 05287 break; 05288 05289 case 16: 05290 #line 942 "ripper.y" 05291 { 05292 #if 0 05293 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05294 #endif 05295 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05296 05297 ;} 05298 break; 05299 05300 case 17: 05301 #line 950 "ripper.y" 05302 { 05303 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05304 ;} 05305 break; 05306 05307 case 18: 05308 #line 955 "ripper.y" 05309 {lex_state = EXPR_FNAME;;} 05310 break; 05311 05312 case 19: 05313 #line 956 "ripper.y" 05314 { 05315 #if 0 05316 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05317 #endif 05318 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05319 05320 ;} 05321 break; 05322 05323 case 20: 05324 #line 964 "ripper.y" 05325 { 05326 #if 0 05327 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05328 #endif 05329 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05330 05331 ;} 05332 break; 05333 05334 case 21: 05335 #line 972 "ripper.y" 05336 { 05337 #if 0 05338 char buf[2]; 05339 buf[0] = '$'; 05340 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth; 05341 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2)); 05342 #endif 05343 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05344 05345 ;} 05346 break; 05347 05348 case 22: 05349 #line 983 "ripper.y" 05350 { 05351 #if 0 05352 yyerror("can't make alias for the number variables"); 05353 (yyval.val) = NEW_BEGIN(0); 05354 #endif 05355 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05356 (yyval.val) = dispatch1(alias_error, (yyval.val)); 05357 05358 ;} 05359 break; 05360 05361 case 23: 05362 #line 993 "ripper.y" 05363 { 05364 #if 0 05365 (yyval.val) = (yyvsp[(2) - (2)].val); 05366 #endif 05367 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); 05368 05369 ;} 05370 break; 05371 05372 case 24: 05373 #line 1001 "ripper.y" 05374 { 05375 #if 0 05376 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05377 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05378 #endif 05379 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05380 05381 ;} 05382 break; 05383 05384 case 25: 05385 #line 1010 "ripper.y" 05386 { 05387 #if 0 05388 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05389 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05390 #endif 05391 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05392 05393 ;} 05394 break; 05395 05396 case 26: 05397 #line 1019 "ripper.y" 05398 { 05399 #if 0 05400 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05401 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05402 } 05403 else { 05404 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05405 } 05406 #endif 05407 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05408 05409 ;} 05410 break; 05411 05412 case 27: 05413 #line 1032 "ripper.y" 05414 { 05415 #if 0 05416 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05417 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05418 } 05419 else { 05420 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05421 } 05422 #endif 05423 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05424 05425 ;} 05426 break; 05427 05428 case 28: 05429 #line 1045 "ripper.y" 05430 { 05431 #if 0 05432 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); 05433 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); 05434 #endif 05435 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05436 05437 ;} 05438 break; 05439 05440 case 29: 05441 #line 1054 "ripper.y" 05442 { 05443 if (in_def || in_single) { 05444 rb_warn0("END in method; use at_exit"); 05445 } 05446 #if 0 05447 (yyval.val) = NEW_POSTEXE(NEW_NODE( 05448 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); 05449 #endif 05450 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); 05451 05452 ;} 05453 break; 05454 05455 case 31: 05456 #line 1067 "ripper.y" 05457 { 05458 #if 0 05459 value_expr((yyvsp[(3) - (3)].val)); 05460 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05461 (yyval.val) = (yyvsp[(1) - (3)].val); 05462 #endif 05463 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05464 05465 ;} 05466 break; 05467 05468 case 32: 05469 #line 1077 "ripper.y" 05470 { 05471 #if 0 05472 value_expr((yyvsp[(3) - (3)].val)); 05473 if ((yyvsp[(1) - (3)].val)) { 05474 ID vid = (yyvsp[(1) - (3)].val)->nd_vid; 05475 if ((yyvsp[(2) - (3)].val) == tOROP) { 05476 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05477 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); 05478 if (is_asgn_or_id(vid)) { 05479 (yyval.val)->nd_aid = vid; 05480 } 05481 } 05482 else if ((yyvsp[(2) - (3)].val) == tANDOP) { 05483 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05484 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); 05485 } 05486 else { 05487 (yyval.val) = (yyvsp[(1) - (3)].val); 05488 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); 05489 } 05490 } 05491 else { 05492 (yyval.val) = NEW_BEGIN(0); 05493 } 05494 #endif 05495 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05496 05497 ;} 05498 break; 05499 05500 case 33: 05501 #line 1106 "ripper.y" 05502 { 05503 #if 0 05504 NODE *args; 05505 05506 value_expr((yyvsp[(6) - (6)].val)); 05507 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 05508 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 05509 if ((yyvsp[(5) - (6)].val) == tOROP) { 05510 (yyvsp[(5) - (6)].val) = 0; 05511 } 05512 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 05513 (yyvsp[(5) - (6)].val) = 1; 05514 } 05515 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 05516 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 05517 #endif 05518 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 05519 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 05520 05521 ;} 05522 break; 05523 05524 case 34: 05525 #line 1127 "ripper.y" 05526 { 05527 #if 0 05528 value_expr((yyvsp[(5) - (5)].val)); 05529 if ((yyvsp[(4) - (5)].val) == tOROP) { 05530 (yyvsp[(4) - (5)].val) = 0; 05531 } 05532 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05533 (yyvsp[(4) - (5)].val) = 1; 05534 } 05535 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05536 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05537 #endif 05538 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 05539 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05540 05541 ;} 05542 break; 05543 05544 case 35: 05545 #line 1144 "ripper.y" 05546 { 05547 #if 0 05548 value_expr((yyvsp[(5) - (5)].val)); 05549 if ((yyvsp[(4) - (5)].val) == tOROP) { 05550 (yyvsp[(4) - (5)].val) = 0; 05551 } 05552 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05553 (yyvsp[(4) - (5)].val) = 1; 05554 } 05555 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05556 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05557 #endif 05558 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 05559 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05560 05561 ;} 05562 break; 05563 05564 case 36: 05565 #line 1161 "ripper.y" 05566 { 05567 #if 0 05568 yyerror("constant re-assignment"); 05569 (yyval.val) = 0; 05570 #endif 05571 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05572 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05573 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05574 05575 ;} 05576 break; 05577 05578 case 37: 05579 #line 1172 "ripper.y" 05580 { 05581 #if 0 05582 value_expr((yyvsp[(5) - (5)].val)); 05583 if ((yyvsp[(4) - (5)].val) == tOROP) { 05584 (yyvsp[(4) - (5)].val) = 0; 05585 } 05586 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05587 (yyvsp[(4) - (5)].val) = 1; 05588 } 05589 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05590 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05591 #endif 05592 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); 05593 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05594 05595 ;} 05596 break; 05597 05598 case 38: 05599 #line 1189 "ripper.y" 05600 { 05601 #if 0 05602 rb_backref_error((yyvsp[(1) - (3)].val)); 05603 (yyval.val) = NEW_BEGIN(0); 05604 #endif 05605 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 05606 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05607 05608 ;} 05609 break; 05610 05611 case 39: 05612 #line 1199 "ripper.y" 05613 { 05614 #if 0 05615 value_expr((yyvsp[(3) - (3)].val)); 05616 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05617 #endif 05618 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05619 05620 ;} 05621 break; 05622 05623 case 40: 05624 #line 1208 "ripper.y" 05625 { 05626 #if 0 05627 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05628 (yyval.val) = (yyvsp[(1) - (3)].val); 05629 #endif 05630 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05631 05632 ;} 05633 break; 05634 05635 case 41: 05636 #line 1217 "ripper.y" 05637 { 05638 #if 0 05639 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05640 (yyval.val) = (yyvsp[(1) - (3)].val); 05641 #endif 05642 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05643 05644 ;} 05645 break; 05646 05647 case 43: 05648 #line 1229 "ripper.y" 05649 { 05650 #if 0 05651 value_expr((yyvsp[(3) - (3)].val)); 05652 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05653 #endif 05654 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05655 05656 ;} 05657 break; 05658 05659 case 44: 05660 #line 1238 "ripper.y" 05661 { 05662 #if 0 05663 value_expr((yyvsp[(3) - (3)].val)); 05664 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05665 #endif 05666 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05667 05668 ;} 05669 break; 05670 05671 case 46: 05672 #line 1251 "ripper.y" 05673 { 05674 #if 0 05675 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05676 #endif 05677 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); 05678 05679 ;} 05680 break; 05681 05682 case 47: 05683 #line 1259 "ripper.y" 05684 { 05685 #if 0 05686 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05687 #endif 05688 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); 05689 05690 ;} 05691 break; 05692 05693 case 48: 05694 #line 1267 "ripper.y" 05695 { 05696 #if 0 05697 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); 05698 #endif 05699 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); 05700 05701 ;} 05702 break; 05703 05704 case 49: 05705 #line 1275 "ripper.y" 05706 { 05707 #if 0 05708 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 05709 #endif 05710 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); 05711 05712 ;} 05713 break; 05714 05715 case 51: 05716 #line 1286 "ripper.y" 05717 { 05718 #if 0 05719 value_expr((yyvsp[(1) - (1)].val)); 05720 (yyval.val) = (yyvsp[(1) - (1)].val); 05721 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 05722 #endif 05723 (yyval.val) = (yyvsp[(1) - (1)].val); 05724 05725 ;} 05726 break; 05727 05728 case 55: 05729 #line 1303 "ripper.y" 05730 { 05731 #if 0 05732 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05733 #endif 05734 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 05735 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05736 05737 ;} 05738 break; 05739 05740 case 56: 05741 #line 1312 "ripper.y" 05742 { 05743 #if 0 05744 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05745 #endif 05746 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); 05747 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05748 05749 ;} 05750 break; 05751 05752 case 57: 05753 #line 1323 "ripper.y" 05754 { 05755 (yyvsp[(1) - (1)].vars) = dyna_push(); 05756 #if 0 05757 (yyval.num) = ruby_sourceline; 05758 #endif 05759 05760 ;} 05761 break; 05762 05763 case 58: 05764 #line 1333 "ripper.y" 05765 { 05766 #if 0 05767 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 05768 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 05769 #endif 05770 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 05771 05772 dyna_pop((yyvsp[(1) - (5)].vars)); 05773 ;} 05774 break; 05775 05776 case 59: 05777 #line 1345 "ripper.y" 05778 { 05779 #if 0 05780 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05781 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05782 #endif 05783 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05784 05785 ;} 05786 break; 05787 05788 case 60: 05789 #line 1354 "ripper.y" 05790 { 05791 #if 0 05792 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); 05793 (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05794 (yyval.val) = (yyvsp[(3) - (3)].val); 05795 fixpos((yyval.val), (yyvsp[(2) - (3)].val)); 05796 #endif 05797 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05798 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); 05799 05800 ;} 05801 break; 05802 05803 case 61: 05804 #line 1366 "ripper.y" 05805 { 05806 #if 0 05807 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05808 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05809 #endif 05810 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05811 05812 ;} 05813 break; 05814 05815 case 62: 05816 #line 1375 "ripper.y" 05817 { 05818 #if 0 05819 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 05820 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05821 (yyval.val) = (yyvsp[(5) - (5)].val); 05822 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05823 #endif 05824 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05825 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 05826 05827 ;} 05828 break; 05829 05830 case 63: 05831 #line 1387 "ripper.y" 05832 { 05833 #if 0 05834 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05835 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05836 #endif 05837 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05838 05839 ;} 05840 break; 05841 05842 case 64: 05843 #line 1396 "ripper.y" 05844 { 05845 #if 0 05846 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 05847 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05848 (yyval.val) = (yyvsp[(5) - (5)].val); 05849 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05850 #endif 05851 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05852 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 05853 05854 ;} 05855 break; 05856 05857 case 65: 05858 #line 1408 "ripper.y" 05859 { 05860 #if 0 05861 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 05862 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05863 #endif 05864 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 05865 05866 ;} 05867 break; 05868 05869 case 66: 05870 #line 1417 "ripper.y" 05871 { 05872 #if 0 05873 (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); 05874 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05875 #endif 05876 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); 05877 05878 ;} 05879 break; 05880 05881 case 67: 05882 #line 1426 "ripper.y" 05883 { 05884 #if 0 05885 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); 05886 #endif 05887 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); 05888 05889 ;} 05890 break; 05891 05892 case 68: 05893 #line 1434 "ripper.y" 05894 { 05895 #if 0 05896 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); 05897 #endif 05898 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); 05899 05900 ;} 05901 break; 05902 05903 case 69: 05904 #line 1442 "ripper.y" 05905 { 05906 #if 0 05907 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); 05908 #endif 05909 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); 05910 05911 ;} 05912 break; 05913 05914 case 71: 05915 #line 1453 "ripper.y" 05916 { 05917 #if 0 05918 (yyval.val) = (yyvsp[(2) - (3)].val); 05919 #endif 05920 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 05921 05922 ;} 05923 break; 05924 05925 case 73: 05926 #line 1464 "ripper.y" 05927 { 05928 #if 0 05929 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); 05930 #endif 05931 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 05932 05933 ;} 05934 break; 05935 05936 case 74: 05937 #line 1474 "ripper.y" 05938 { 05939 #if 0 05940 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 05941 #endif 05942 (yyval.val) = (yyvsp[(1) - (1)].val); 05943 05944 ;} 05945 break; 05946 05947 case 75: 05948 #line 1482 "ripper.y" 05949 { 05950 #if 0 05951 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); 05952 #endif 05953 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05954 05955 ;} 05956 break; 05957 05958 case 76: 05959 #line 1490 "ripper.y" 05960 { 05961 #if 0 05962 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05963 #endif 05964 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05965 05966 ;} 05967 break; 05968 05969 case 77: 05970 #line 1498 "ripper.y" 05971 { 05972 #if 0 05973 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); 05974 #endif 05975 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05976 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 05977 05978 ;} 05979 break; 05980 05981 case 78: 05982 #line 1507 "ripper.y" 05983 { 05984 #if 0 05985 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); 05986 #endif 05987 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); 05988 05989 ;} 05990 break; 05991 05992 case 79: 05993 #line 1515 "ripper.y" 05994 { 05995 #if 0 05996 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); 05997 #endif 05998 (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); 05999 (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06000 06001 ;} 06002 break; 06003 06004 case 80: 06005 #line 1524 "ripper.y" 06006 { 06007 #if 0 06008 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); 06009 #endif 06010 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); 06011 06012 ;} 06013 break; 06014 06015 case 81: 06016 #line 1532 "ripper.y" 06017 { 06018 #if 0 06019 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); 06020 #endif 06021 (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); 06022 (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 06023 06024 ;} 06025 break; 06026 06027 case 82: 06028 #line 1541 "ripper.y" 06029 { 06030 #if 0 06031 (yyval.val) = NEW_MASGN(0, -1); 06032 #endif 06033 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06034 06035 ;} 06036 break; 06037 06038 case 83: 06039 #line 1549 "ripper.y" 06040 { 06041 #if 0 06042 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 06043 #endif 06044 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06045 (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val)); 06046 06047 ;} 06048 break; 06049 06050 case 85: 06051 #line 1561 "ripper.y" 06052 { 06053 #if 0 06054 (yyval.val) = (yyvsp[(2) - (3)].val); 06055 #endif 06056 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06057 06058 ;} 06059 break; 06060 06061 case 86: 06062 #line 1571 "ripper.y" 06063 { 06064 #if 0 06065 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); 06066 #endif 06067 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); 06068 06069 ;} 06070 break; 06071 06072 case 87: 06073 #line 1579 "ripper.y" 06074 { 06075 #if 0 06076 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06077 #endif 06078 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06079 06080 ;} 06081 break; 06082 06083 case 88: 06084 #line 1589 "ripper.y" 06085 { 06086 #if 0 06087 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 06088 #endif 06089 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 06090 06091 ;} 06092 break; 06093 06094 case 89: 06095 #line 1597 "ripper.y" 06096 { 06097 #if 0 06098 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06099 #endif 06100 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06101 06102 ;} 06103 break; 06104 06105 case 90: 06106 #line 1607 "ripper.y" 06107 { 06108 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06109 ;} 06110 break; 06111 06112 case 91: 06113 #line 1611 "ripper.y" 06114 { 06115 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06116 ;} 06117 break; 06118 06119 case 92: 06120 #line 1615 "ripper.y" 06121 { 06122 #if 0 06123 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06124 #endif 06125 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06126 06127 ;} 06128 break; 06129 06130 case 93: 06131 #line 1623 "ripper.y" 06132 { 06133 #if 0 06134 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06135 #endif 06136 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06137 06138 ;} 06139 break; 06140 06141 case 94: 06142 #line 1631 "ripper.y" 06143 { 06144 #if 0 06145 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06146 #endif 06147 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06148 06149 ;} 06150 break; 06151 06152 case 95: 06153 #line 1639 "ripper.y" 06154 { 06155 #if 0 06156 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06157 #endif 06158 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06159 06160 ;} 06161 break; 06162 06163 case 96: 06164 #line 1647 "ripper.y" 06165 { 06166 #if 0 06167 if (in_def || in_single) 06168 yyerror("dynamic constant assignment"); 06169 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06170 #endif 06171 if (in_def || in_single) 06172 yyerror("dynamic constant assignment"); 06173 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06174 06175 ;} 06176 break; 06177 06178 case 97: 06179 #line 1659 "ripper.y" 06180 { 06181 #if 0 06182 if (in_def || in_single) 06183 yyerror("dynamic constant assignment"); 06184 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06185 #endif 06186 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06187 06188 ;} 06189 break; 06190 06191 case 98: 06192 #line 1669 "ripper.y" 06193 { 06194 #if 0 06195 rb_backref_error((yyvsp[(1) - (1)].val)); 06196 (yyval.val) = NEW_BEGIN(0); 06197 #endif 06198 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); 06199 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06200 06201 ;} 06202 break; 06203 06204 case 99: 06205 #line 1681 "ripper.y" 06206 { 06207 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06208 #if 0 06209 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06210 #endif 06211 (yyval.val) = dispatch1(var_field, (yyval.val)); 06212 06213 ;} 06214 break; 06215 06216 case 100: 06217 #line 1690 "ripper.y" 06218 { 06219 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06220 #if 0 06221 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06222 #endif 06223 (yyval.val) = dispatch1(var_field, (yyval.val)); 06224 06225 ;} 06226 break; 06227 06228 case 101: 06229 #line 1699 "ripper.y" 06230 { 06231 #if 0 06232 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06233 #endif 06234 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06235 06236 ;} 06237 break; 06238 06239 case 102: 06240 #line 1707 "ripper.y" 06241 { 06242 #if 0 06243 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06244 #endif 06245 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06246 06247 ;} 06248 break; 06249 06250 case 103: 06251 #line 1715 "ripper.y" 06252 { 06253 #if 0 06254 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06255 #endif 06256 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 06257 06258 ;} 06259 break; 06260 06261 case 104: 06262 #line 1723 "ripper.y" 06263 { 06264 #if 0 06265 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06266 #endif 06267 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06268 06269 ;} 06270 break; 06271 06272 case 105: 06273 #line 1731 "ripper.y" 06274 { 06275 #if 0 06276 if (in_def || in_single) 06277 yyerror("dynamic constant assignment"); 06278 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06279 #endif 06280 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06281 if (in_def || in_single) { 06282 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06283 } 06284 06285 ;} 06286 break; 06287 06288 case 106: 06289 #line 1744 "ripper.y" 06290 { 06291 #if 0 06292 if (in_def || in_single) 06293 yyerror("dynamic constant assignment"); 06294 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06295 #endif 06296 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06297 if (in_def || in_single) { 06298 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06299 } 06300 06301 ;} 06302 break; 06303 06304 case 107: 06305 #line 1757 "ripper.y" 06306 { 06307 #if 0 06308 rb_backref_error((yyvsp[(1) - (1)].val)); 06309 (yyval.val) = NEW_BEGIN(0); 06310 #endif 06311 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); 06312 06313 ;} 06314 break; 06315 06316 case 108: 06317 #line 1768 "ripper.y" 06318 { 06319 #if 0 06320 yyerror("class/module name must be CONSTANT"); 06321 #endif 06322 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); 06323 06324 ;} 06325 break; 06326 06327 case 110: 06328 #line 1779 "ripper.y" 06329 { 06330 #if 0 06331 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 06332 #endif 06333 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 06334 06335 ;} 06336 break; 06337 06338 case 111: 06339 #line 1787 "ripper.y" 06340 { 06341 #if 0 06342 (yyval.val) = NEW_COLON2(0, (yyval.val)); 06343 #endif 06344 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); 06345 06346 ;} 06347 break; 06348 06349 case 112: 06350 #line 1795 "ripper.y" 06351 { 06352 #if 0 06353 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06354 #endif 06355 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06356 06357 ;} 06358 break; 06359 06360 case 116: 06361 #line 1808 "ripper.y" 06362 { 06363 lex_state = EXPR_ENDFN; 06364 (yyval.val) = (yyvsp[(1) - (1)].val); 06365 ;} 06366 break; 06367 06368 case 117: 06369 #line 1813 "ripper.y" 06370 { 06371 lex_state = EXPR_ENDFN; 06372 #if 0 06373 (yyval.val) = (yyvsp[(1) - (1)].id); 06374 #endif 06375 (yyval.val) = (yyvsp[(1) - (1)].val); 06376 06377 ;} 06378 break; 06379 06380 case 120: 06381 #line 1828 "ripper.y" 06382 { 06383 #if 0 06384 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 06385 #endif 06386 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 06387 06388 ;} 06389 break; 06390 06391 case 122: 06392 #line 1839 "ripper.y" 06393 { 06394 #if 0 06395 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); 06396 #endif 06397 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 06398 06399 ;} 06400 break; 06401 06402 case 123: 06403 #line 1846 "ripper.y" 06404 {lex_state = EXPR_FNAME;;} 06405 break; 06406 06407 case 124: 06408 #line 1847 "ripper.y" 06409 { 06410 #if 0 06411 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); 06412 #endif 06413 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06414 06415 ;} 06416 break; 06417 06418 case 125: 06419 #line 1856 "ripper.y" 06420 { ifndef_ripper((yyval.val) = '|'); ;} 06421 break; 06422 06423 case 126: 06424 #line 1857 "ripper.y" 06425 { ifndef_ripper((yyval.val) = '^'); ;} 06426 break; 06427 06428 case 127: 06429 #line 1858 "ripper.y" 06430 { ifndef_ripper((yyval.val) = '&'); ;} 06431 break; 06432 06433 case 128: 06434 #line 1859 "ripper.y" 06435 { ifndef_ripper((yyval.val) = tCMP); ;} 06436 break; 06437 06438 case 129: 06439 #line 1860 "ripper.y" 06440 { ifndef_ripper((yyval.val) = tEQ); ;} 06441 break; 06442 06443 case 130: 06444 #line 1861 "ripper.y" 06445 { ifndef_ripper((yyval.val) = tEQQ); ;} 06446 break; 06447 06448 case 131: 06449 #line 1862 "ripper.y" 06450 { ifndef_ripper((yyval.val) = tMATCH); ;} 06451 break; 06452 06453 case 132: 06454 #line 1863 "ripper.y" 06455 { ifndef_ripper((yyval.val) = tNMATCH); ;} 06456 break; 06457 06458 case 133: 06459 #line 1864 "ripper.y" 06460 { ifndef_ripper((yyval.val) = '>'); ;} 06461 break; 06462 06463 case 134: 06464 #line 1865 "ripper.y" 06465 { ifndef_ripper((yyval.val) = tGEQ); ;} 06466 break; 06467 06468 case 135: 06469 #line 1866 "ripper.y" 06470 { ifndef_ripper((yyval.val) = '<'); ;} 06471 break; 06472 06473 case 136: 06474 #line 1867 "ripper.y" 06475 { ifndef_ripper((yyval.val) = tLEQ); ;} 06476 break; 06477 06478 case 137: 06479 #line 1868 "ripper.y" 06480 { ifndef_ripper((yyval.val) = tNEQ); ;} 06481 break; 06482 06483 case 138: 06484 #line 1869 "ripper.y" 06485 { ifndef_ripper((yyval.val) = tLSHFT); ;} 06486 break; 06487 06488 case 139: 06489 #line 1870 "ripper.y" 06490 { ifndef_ripper((yyval.val) = tRSHFT); ;} 06491 break; 06492 06493 case 140: 06494 #line 1871 "ripper.y" 06495 { ifndef_ripper((yyval.val) = '+'); ;} 06496 break; 06497 06498 case 141: 06499 #line 1872 "ripper.y" 06500 { ifndef_ripper((yyval.val) = '-'); ;} 06501 break; 06502 06503 case 142: 06504 #line 1873 "ripper.y" 06505 { ifndef_ripper((yyval.val) = '*'); ;} 06506 break; 06507 06508 case 143: 06509 #line 1874 "ripper.y" 06510 { ifndef_ripper((yyval.val) = '*'); ;} 06511 break; 06512 06513 case 144: 06514 #line 1875 "ripper.y" 06515 { ifndef_ripper((yyval.val) = '/'); ;} 06516 break; 06517 06518 case 145: 06519 #line 1876 "ripper.y" 06520 { ifndef_ripper((yyval.val) = '%'); ;} 06521 break; 06522 06523 case 146: 06524 #line 1877 "ripper.y" 06525 { ifndef_ripper((yyval.val) = tPOW); ;} 06526 break; 06527 06528 case 147: 06529 #line 1878 "ripper.y" 06530 { ifndef_ripper((yyval.val) = '!'); ;} 06531 break; 06532 06533 case 148: 06534 #line 1879 "ripper.y" 06535 { ifndef_ripper((yyval.val) = '~'); ;} 06536 break; 06537 06538 case 149: 06539 #line 1880 "ripper.y" 06540 { ifndef_ripper((yyval.val) = tUPLUS); ;} 06541 break; 06542 06543 case 150: 06544 #line 1881 "ripper.y" 06545 { ifndef_ripper((yyval.val) = tUMINUS); ;} 06546 break; 06547 06548 case 151: 06549 #line 1882 "ripper.y" 06550 { ifndef_ripper((yyval.val) = tAREF); ;} 06551 break; 06552 06553 case 152: 06554 #line 1883 "ripper.y" 06555 { ifndef_ripper((yyval.val) = tASET); ;} 06556 break; 06557 06558 case 153: 06559 #line 1884 "ripper.y" 06560 { ifndef_ripper((yyval.val) = '`'); ;} 06561 break; 06562 06563 case 195: 06564 #line 1902 "ripper.y" 06565 { 06566 #if 0 06567 value_expr((yyvsp[(3) - (3)].val)); 06568 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06569 #endif 06570 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06571 06572 ;} 06573 break; 06574 06575 case 196: 06576 #line 1911 "ripper.y" 06577 { 06578 #if 0 06579 value_expr((yyvsp[(3) - (5)].val)); 06580 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06581 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06582 #endif 06583 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); 06584 06585 ;} 06586 break; 06587 06588 case 197: 06589 #line 1921 "ripper.y" 06590 { 06591 #if 0 06592 value_expr((yyvsp[(3) - (3)].val)); 06593 if ((yyvsp[(1) - (3)].val)) { 06594 ID vid = (yyvsp[(1) - (3)].val)->nd_vid; 06595 if ((yyvsp[(2) - (3)].val) == tOROP) { 06596 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 06597 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); 06598 if (is_asgn_or_id(vid)) { 06599 (yyval.val)->nd_aid = vid; 06600 } 06601 } 06602 else if ((yyvsp[(2) - (3)].val) == tANDOP) { 06603 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 06604 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); 06605 } 06606 else { 06607 (yyval.val) = (yyvsp[(1) - (3)].val); 06608 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); 06609 } 06610 } 06611 else { 06612 (yyval.val) = NEW_BEGIN(0); 06613 } 06614 #endif 06615 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06616 06617 ;} 06618 break; 06619 06620 case 198: 06621 #line 1950 "ripper.y" 06622 { 06623 #if 0 06624 value_expr((yyvsp[(3) - (5)].val)); 06625 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06626 if ((yyvsp[(1) - (5)].val)) { 06627 ID vid = (yyvsp[(1) - (5)].val)->nd_vid; 06628 if ((yyvsp[(2) - (5)].val) == tOROP) { 06629 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); 06630 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val)); 06631 if (is_asgn_or_id(vid)) { 06632 (yyval.val)->nd_aid = vid; 06633 } 06634 } 06635 else if ((yyvsp[(2) - (5)].val) == tANDOP) { 06636 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); 06637 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val)); 06638 } 06639 else { 06640 (yyval.val) = (yyvsp[(1) - (5)].val); 06641 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val))); 06642 } 06643 } 06644 else { 06645 (yyval.val) = NEW_BEGIN(0); 06646 } 06647 #endif 06648 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 06649 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); 06650 06651 ;} 06652 break; 06653 06654 case 199: 06655 #line 1981 "ripper.y" 06656 { 06657 #if 0 06658 NODE *args; 06659 06660 value_expr((yyvsp[(6) - (6)].val)); 06661 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 06662 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) { 06663 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06664 } 06665 else { 06666 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06667 } 06668 if ((yyvsp[(5) - (6)].val) == tOROP) { 06669 (yyvsp[(5) - (6)].val) = 0; 06670 } 06671 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 06672 (yyvsp[(5) - (6)].val) = 1; 06673 } 06674 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 06675 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 06676 #endif 06677 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 06678 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 06679 06680 ;} 06681 break; 06682 06683 case 200: 06684 #line 2007 "ripper.y" 06685 { 06686 #if 0 06687 value_expr((yyvsp[(5) - (5)].val)); 06688 if ((yyvsp[(4) - (5)].val) == tOROP) { 06689 (yyvsp[(4) - (5)].val) = 0; 06690 } 06691 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06692 (yyvsp[(4) - (5)].val) = 1; 06693 } 06694 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06695 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06696 #endif 06697 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 06698 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06699 06700 ;} 06701 break; 06702 06703 case 201: 06704 #line 2024 "ripper.y" 06705 { 06706 #if 0 06707 value_expr((yyvsp[(5) - (5)].val)); 06708 if ((yyvsp[(4) - (5)].val) == tOROP) { 06709 (yyvsp[(4) - (5)].val) = 0; 06710 } 06711 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06712 (yyvsp[(4) - (5)].val) = 1; 06713 } 06714 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06715 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06716 #endif 06717 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 06718 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06719 06720 ;} 06721 break; 06722 06723 case 202: 06724 #line 2041 "ripper.y" 06725 { 06726 #if 0 06727 value_expr((yyvsp[(5) - (5)].val)); 06728 if ((yyvsp[(4) - (5)].val) == tOROP) { 06729 (yyvsp[(4) - (5)].val) = 0; 06730 } 06731 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06732 (yyvsp[(4) - (5)].val) = 1; 06733 } 06734 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06735 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06736 #endif 06737 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); 06738 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06739 06740 ;} 06741 break; 06742 06743 case 203: 06744 #line 2058 "ripper.y" 06745 { 06746 #if 0 06747 yyerror("constant re-assignment"); 06748 (yyval.val) = NEW_BEGIN(0); 06749 #endif 06750 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06751 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06752 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06753 06754 ;} 06755 break; 06756 06757 case 204: 06758 #line 2069 "ripper.y" 06759 { 06760 #if 0 06761 yyerror("constant re-assignment"); 06762 (yyval.val) = NEW_BEGIN(0); 06763 #endif 06764 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); 06765 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06766 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06767 06768 ;} 06769 break; 06770 06771 case 205: 06772 #line 2080 "ripper.y" 06773 { 06774 #if 0 06775 rb_backref_error((yyvsp[(1) - (3)].val)); 06776 (yyval.val) = NEW_BEGIN(0); 06777 #endif 06778 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); 06779 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06780 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06781 06782 ;} 06783 break; 06784 06785 case 206: 06786 #line 2091 "ripper.y" 06787 { 06788 #if 0 06789 value_expr((yyvsp[(1) - (3)].val)); 06790 value_expr((yyvsp[(3) - (3)].val)); 06791 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06792 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 06793 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 06794 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 06795 } 06796 #endif 06797 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06798 06799 ;} 06800 break; 06801 06802 case 207: 06803 #line 2105 "ripper.y" 06804 { 06805 #if 0 06806 value_expr((yyvsp[(1) - (3)].val)); 06807 value_expr((yyvsp[(3) - (3)].val)); 06808 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06809 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 06810 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 06811 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 06812 } 06813 #endif 06814 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06815 06816 ;} 06817 break; 06818 06819 case 208: 06820 #line 2119 "ripper.y" 06821 { 06822 #if 0 06823 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); 06824 #endif 06825 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); 06826 06827 ;} 06828 break; 06829 06830 case 209: 06831 #line 2127 "ripper.y" 06832 { 06833 #if 0 06834 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); 06835 #endif 06836 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); 06837 06838 ;} 06839 break; 06840 06841 case 210: 06842 #line 2135 "ripper.y" 06843 { 06844 #if 0 06845 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); 06846 #endif 06847 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); 06848 06849 ;} 06850 break; 06851 06852 case 211: 06853 #line 2143 "ripper.y" 06854 { 06855 #if 0 06856 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); 06857 #endif 06858 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); 06859 06860 ;} 06861 break; 06862 06863 case 212: 06864 #line 2151 "ripper.y" 06865 { 06866 #if 0 06867 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); 06868 #endif 06869 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); 06870 06871 ;} 06872 break; 06873 06874 case 213: 06875 #line 2159 "ripper.y" 06876 { 06877 #if 0 06878 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); 06879 #endif 06880 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); 06881 06882 ;} 06883 break; 06884 06885 case 214: 06886 #line 2167 "ripper.y" 06887 { 06888 #if 0 06889 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 06890 #endif 06891 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 06892 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 06893 06894 ;} 06895 break; 06896 06897 case 215: 06898 #line 2176 "ripper.y" 06899 { 06900 #if 0 06901 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 06902 #endif 06903 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 06904 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 06905 06906 ;} 06907 break; 06908 06909 case 216: 06910 #line 2185 "ripper.y" 06911 { 06912 #if 0 06913 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); 06914 #endif 06915 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); 06916 06917 ;} 06918 break; 06919 06920 case 217: 06921 #line 2193 "ripper.y" 06922 { 06923 #if 0 06924 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); 06925 #endif 06926 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 06927 06928 ;} 06929 break; 06930 06931 case 218: 06932 #line 2201 "ripper.y" 06933 { 06934 #if 0 06935 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); 06936 #endif 06937 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); 06938 06939 ;} 06940 break; 06941 06942 case 219: 06943 #line 2209 "ripper.y" 06944 { 06945 #if 0 06946 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); 06947 #endif 06948 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); 06949 06950 ;} 06951 break; 06952 06953 case 220: 06954 #line 2217 "ripper.y" 06955 { 06956 #if 0 06957 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); 06958 #endif 06959 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); 06960 06961 ;} 06962 break; 06963 06964 case 221: 06965 #line 2225 "ripper.y" 06966 { 06967 #if 0 06968 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); 06969 #endif 06970 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); 06971 06972 ;} 06973 break; 06974 06975 case 222: 06976 #line 2233 "ripper.y" 06977 { 06978 #if 0 06979 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); 06980 #endif 06981 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); 06982 06983 ;} 06984 break; 06985 06986 case 223: 06987 #line 2241 "ripper.y" 06988 { 06989 #if 0 06990 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); 06991 #endif 06992 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); 06993 06994 ;} 06995 break; 06996 06997 case 224: 06998 #line 2249 "ripper.y" 06999 { 07000 #if 0 07001 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); 07002 #endif 07003 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); 07004 07005 ;} 07006 break; 07007 07008 case 225: 07009 #line 2257 "ripper.y" 07010 { 07011 #if 0 07012 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); 07013 #endif 07014 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); 07015 07016 ;} 07017 break; 07018 07019 case 226: 07020 #line 2265 "ripper.y" 07021 { 07022 #if 0 07023 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); 07024 #endif 07025 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); 07026 07027 ;} 07028 break; 07029 07030 case 227: 07031 #line 2273 "ripper.y" 07032 { 07033 #if 0 07034 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); 07035 #endif 07036 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); 07037 07038 ;} 07039 break; 07040 07041 case 228: 07042 #line 2281 "ripper.y" 07043 { 07044 #if 0 07045 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); 07046 #endif 07047 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); 07048 07049 ;} 07050 break; 07051 07052 case 229: 07053 #line 2289 "ripper.y" 07054 { 07055 #if 0 07056 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07057 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) { 07058 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); 07059 } 07060 #endif 07061 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); 07062 07063 ;} 07064 break; 07065 07066 case 230: 07067 #line 2300 "ripper.y" 07068 { 07069 #if 0 07070 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); 07071 #endif 07072 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); 07073 07074 ;} 07075 break; 07076 07077 case 231: 07078 #line 2308 "ripper.y" 07079 { 07080 #if 0 07081 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 07082 #endif 07083 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); 07084 07085 ;} 07086 break; 07087 07088 case 232: 07089 #line 2316 "ripper.y" 07090 { 07091 #if 0 07092 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); 07093 #endif 07094 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); 07095 07096 ;} 07097 break; 07098 07099 case 233: 07100 #line 2324 "ripper.y" 07101 { 07102 #if 0 07103 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); 07104 #endif 07105 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); 07106 07107 ;} 07108 break; 07109 07110 case 234: 07111 #line 2332 "ripper.y" 07112 { 07113 #if 0 07114 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); 07115 #endif 07116 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); 07117 07118 ;} 07119 break; 07120 07121 case 235: 07122 #line 2340 "ripper.y" 07123 { 07124 #if 0 07125 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07126 #endif 07127 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); 07128 07129 ;} 07130 break; 07131 07132 case 236: 07133 #line 2348 "ripper.y" 07134 { 07135 #if 0 07136 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07137 #endif 07138 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); 07139 07140 ;} 07141 break; 07142 07143 case 237: 07144 #line 2355 "ripper.y" 07145 {in_defined = 1;;} 07146 break; 07147 07148 case 238: 07149 #line 2356 "ripper.y" 07150 { 07151 #if 0 07152 in_defined = 0; 07153 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); 07154 #endif 07155 in_defined = 0; 07156 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); 07157 07158 ;} 07159 break; 07160 07161 case 239: 07162 #line 2366 "ripper.y" 07163 { 07164 #if 0 07165 value_expr((yyvsp[(1) - (6)].val)); 07166 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07167 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07168 #endif 07169 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07170 07171 ;} 07172 break; 07173 07174 case 240: 07175 #line 2376 "ripper.y" 07176 { 07177 (yyval.val) = (yyvsp[(1) - (1)].val); 07178 ;} 07179 break; 07180 07181 case 241: 07182 #line 2382 "ripper.y" 07183 { 07184 #if 0 07185 value_expr((yyvsp[(1) - (1)].val)); 07186 (yyval.val) = (yyvsp[(1) - (1)].val); 07187 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 07188 #endif 07189 (yyval.val) = (yyvsp[(1) - (1)].val); 07190 07191 ;} 07192 break; 07193 07194 case 243: 07195 #line 2395 "ripper.y" 07196 { 07197 (yyval.val) = (yyvsp[(1) - (2)].val); 07198 ;} 07199 break; 07200 07201 case 244: 07202 #line 2399 "ripper.y" 07203 { 07204 #if 0 07205 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07206 #endif 07207 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07208 07209 ;} 07210 break; 07211 07212 case 245: 07213 #line 2407 "ripper.y" 07214 { 07215 #if 0 07216 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07217 #endif 07218 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07219 07220 ;} 07221 break; 07222 07223 case 246: 07224 #line 2417 "ripper.y" 07225 { 07226 #if 0 07227 (yyval.val) = (yyvsp[(2) - (3)].val); 07228 #endif 07229 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); 07230 07231 ;} 07232 break; 07233 07234 case 251: 07235 #line 2433 "ripper.y" 07236 { 07237 (yyval.val) = (yyvsp[(1) - (2)].val); 07238 ;} 07239 break; 07240 07241 case 252: 07242 #line 2437 "ripper.y" 07243 { 07244 #if 0 07245 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07246 #endif 07247 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07248 07249 ;} 07250 break; 07251 07252 case 253: 07253 #line 2445 "ripper.y" 07254 { 07255 #if 0 07256 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07257 #endif 07258 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07259 07260 ;} 07261 break; 07262 07263 case 254: 07264 #line 2455 "ripper.y" 07265 { 07266 #if 0 07267 value_expr((yyvsp[(1) - (1)].val)); 07268 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07269 #endif 07270 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07271 07272 ;} 07273 break; 07274 07275 case 255: 07276 #line 2464 "ripper.y" 07277 { 07278 #if 0 07279 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07280 #endif 07281 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07282 07283 ;} 07284 break; 07285 07286 case 256: 07287 #line 2472 "ripper.y" 07288 { 07289 #if 0 07290 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07291 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); 07292 #endif 07293 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07294 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); 07295 07296 ;} 07297 break; 07298 07299 case 257: 07300 #line 2482 "ripper.y" 07301 { 07302 #if 0 07303 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07304 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); 07305 #endif 07306 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); 07307 07308 ;} 07309 break; 07310 07311 case 258: 07312 #line 2493 "ripper.y" 07313 { 07314 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); 07315 ;} 07316 break; 07317 07318 case 259: 07319 #line 2499 "ripper.y" 07320 { 07321 (yyval.val) = cmdarg_stack; 07322 CMDARG_PUSH(1); 07323 ;} 07324 break; 07325 07326 case 260: 07327 #line 2504 "ripper.y" 07328 { 07329 /* CMDARG_POP() */ 07330 cmdarg_stack = (yyvsp[(1) - (2)].val); 07331 (yyval.val) = (yyvsp[(2) - (2)].val); 07332 ;} 07333 break; 07334 07335 case 261: 07336 #line 2512 "ripper.y" 07337 { 07338 #if 0 07339 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); 07340 #endif 07341 (yyval.val) = (yyvsp[(2) - (2)].val); 07342 07343 ;} 07344 break; 07345 07346 case 262: 07347 #line 2522 "ripper.y" 07348 { 07349 (yyval.val) = (yyvsp[(2) - (2)].val); 07350 ;} 07351 break; 07352 07353 case 263: 07354 #line 2526 "ripper.y" 07355 { 07356 (yyval.val) = 0; 07357 ;} 07358 break; 07359 07360 case 264: 07361 #line 2532 "ripper.y" 07362 { 07363 #if 0 07364 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07365 #endif 07366 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07367 07368 ;} 07369 break; 07370 07371 case 265: 07372 #line 2540 "ripper.y" 07373 { 07374 #if 0 07375 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07376 #endif 07377 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); 07378 07379 ;} 07380 break; 07381 07382 case 266: 07383 #line 2548 "ripper.y" 07384 { 07385 #if 0 07386 NODE *n1; 07387 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07388 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07389 } 07390 else { 07391 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07392 } 07393 #endif 07394 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07395 07396 ;} 07397 break; 07398 07399 case 267: 07400 #line 2562 "ripper.y" 07401 { 07402 #if 0 07403 NODE *n1; 07404 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07405 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07406 } 07407 else { 07408 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07409 } 07410 #endif 07411 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07412 07413 ;} 07414 break; 07415 07416 case 268: 07417 #line 2578 "ripper.y" 07418 { 07419 #if 0 07420 NODE *n1; 07421 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07422 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07423 } 07424 else { 07425 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07426 } 07427 #endif 07428 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 07429 07430 ;} 07431 break; 07432 07433 case 269: 07434 #line 2592 "ripper.y" 07435 { 07436 #if 0 07437 NODE *n1; 07438 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && 07439 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07440 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07441 } 07442 else { 07443 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07444 } 07445 #endif 07446 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); 07447 07448 ;} 07449 break; 07450 07451 case 270: 07452 #line 2607 "ripper.y" 07453 { 07454 #if 0 07455 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07456 #endif 07457 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); 07458 07459 ;} 07460 break; 07461 07462 case 279: 07463 #line 2625 "ripper.y" 07464 { 07465 #if 0 07466 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 07467 #endif 07468 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); 07469 07470 ;} 07471 break; 07472 07473 case 280: 07474 #line 2633 "ripper.y" 07475 { 07476 #if 0 07477 (yyval.num) = ruby_sourceline; 07478 #endif 07479 07480 ;} 07481 break; 07482 07483 case 281: 07484 #line 2641 "ripper.y" 07485 { 07486 #if 0 07487 if ((yyvsp[(3) - (4)].val) == NULL) { 07488 (yyval.val) = NEW_NIL(); 07489 } 07490 else { 07491 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || 07492 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) 07493 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); 07494 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); 07495 } 07496 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); 07497 #endif 07498 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); 07499 07500 ;} 07501 break; 07502 07503 case 282: 07504 #line 2657 "ripper.y" 07505 {lex_state = EXPR_ENDARG;;} 07506 break; 07507 07508 case 283: 07509 #line 2658 "ripper.y" 07510 { 07511 rb_warning0("(...) interpreted as grouped expression"); 07512 #if 0 07513 (yyval.val) = (yyvsp[(2) - (4)].val); 07514 #endif 07515 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 07516 07517 ;} 07518 break; 07519 07520 case 284: 07521 #line 2667 "ripper.y" 07522 { 07523 #if 0 07524 (yyval.val) = (yyvsp[(2) - (3)].val); 07525 #endif 07526 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 07527 07528 ;} 07529 break; 07530 07531 case 285: 07532 #line 2675 "ripper.y" 07533 { 07534 #if 0 07535 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07536 #endif 07537 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07538 07539 ;} 07540 break; 07541 07542 case 286: 07543 #line 2683 "ripper.y" 07544 { 07545 #if 0 07546 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 07547 #endif 07548 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 07549 07550 ;} 07551 break; 07552 07553 case 287: 07554 #line 2691 "ripper.y" 07555 { 07556 #if 0 07557 if ((yyvsp[(2) - (3)].val) == 0) { 07558 (yyval.val) = NEW_ZARRAY(); /* zero length array*/ 07559 } 07560 else { 07561 (yyval.val) = (yyvsp[(2) - (3)].val); 07562 } 07563 #endif 07564 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); 07565 07566 ;} 07567 break; 07568 07569 case 288: 07570 #line 2704 "ripper.y" 07571 { 07572 #if 0 07573 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); 07574 #endif 07575 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); 07576 07577 ;} 07578 break; 07579 07580 case 289: 07581 #line 2712 "ripper.y" 07582 { 07583 #if 0 07584 (yyval.val) = NEW_RETURN(0); 07585 #endif 07586 (yyval.val) = dispatch0(return0); 07587 07588 ;} 07589 break; 07590 07591 case 290: 07592 #line 2720 "ripper.y" 07593 { 07594 #if 0 07595 (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); 07596 #endif 07597 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); 07598 07599 ;} 07600 break; 07601 07602 case 291: 07603 #line 2728 "ripper.y" 07604 { 07605 #if 0 07606 (yyval.val) = NEW_YIELD(0, Qfalse); 07607 #endif 07608 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); 07609 07610 ;} 07611 break; 07612 07613 case 292: 07614 #line 2736 "ripper.y" 07615 { 07616 #if 0 07617 (yyval.val) = NEW_YIELD(0, Qfalse); 07618 #endif 07619 (yyval.val) = dispatch0(yield0); 07620 07621 ;} 07622 break; 07623 07624 case 293: 07625 #line 2743 "ripper.y" 07626 {in_defined = 1;;} 07627 break; 07628 07629 case 294: 07630 #line 2744 "ripper.y" 07631 { 07632 #if 0 07633 in_defined = 0; 07634 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); 07635 #endif 07636 in_defined = 0; 07637 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); 07638 07639 ;} 07640 break; 07641 07642 case 295: 07643 #line 2754 "ripper.y" 07644 { 07645 #if 0 07646 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); 07647 #endif 07648 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); 07649 07650 ;} 07651 break; 07652 07653 case 296: 07654 #line 2762 "ripper.y" 07655 { 07656 #if 0 07657 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); 07658 #endif 07659 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); 07660 07661 ;} 07662 break; 07663 07664 case 297: 07665 #line 2770 "ripper.y" 07666 { 07667 #if 0 07668 (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0); 07669 (yyval.val) = (yyvsp[(2) - (2)].val); 07670 fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val)); 07671 #endif 07672 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); 07673 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); 07674 07675 ;} 07676 break; 07677 07678 case 299: 07679 #line 2782 "ripper.y" 07680 { 07681 #if 0 07682 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 07683 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 07684 (yyval.val) = (yyvsp[(2) - (2)].val); 07685 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 07686 #endif 07687 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07688 07689 ;} 07690 break; 07691 07692 case 300: 07693 #line 2793 "ripper.y" 07694 { 07695 (yyval.val) = (yyvsp[(2) - (2)].val); 07696 ;} 07697 break; 07698 07699 case 301: 07700 #line 2800 "ripper.y" 07701 { 07702 #if 0 07703 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 07704 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 07705 #endif 07706 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 07707 07708 ;} 07709 break; 07710 07711 case 302: 07712 #line 2812 "ripper.y" 07713 { 07714 #if 0 07715 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 07716 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 07717 #endif 07718 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 07719 07720 ;} 07721 break; 07722 07723 case 303: 07724 #line 2820 "ripper.y" 07725 {COND_PUSH(1);;} 07726 break; 07727 07728 case 304: 07729 #line 2820 "ripper.y" 07730 {COND_POP();;} 07731 break; 07732 07733 case 305: 07734 #line 2823 "ripper.y" 07735 { 07736 #if 0 07737 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 07738 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 07739 #endif 07740 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 07741 07742 ;} 07743 break; 07744 07745 case 306: 07746 #line 2831 "ripper.y" 07747 {COND_PUSH(1);;} 07748 break; 07749 07750 case 307: 07751 #line 2831 "ripper.y" 07752 {COND_POP();;} 07753 break; 07754 07755 case 308: 07756 #line 2834 "ripper.y" 07757 { 07758 #if 0 07759 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 07760 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 07761 #endif 07762 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 07763 07764 ;} 07765 break; 07766 07767 case 309: 07768 #line 2845 "ripper.y" 07769 { 07770 #if 0 07771 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 07772 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 07773 #endif 07774 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 07775 07776 ;} 07777 break; 07778 07779 case 310: 07780 #line 2854 "ripper.y" 07781 { 07782 #if 0 07783 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); 07784 #endif 07785 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); 07786 07787 ;} 07788 break; 07789 07790 case 311: 07791 #line 2862 "ripper.y" 07792 {COND_PUSH(1);;} 07793 break; 07794 07795 case 312: 07796 #line 2864 "ripper.y" 07797 {COND_POP();;} 07798 break; 07799 07800 case 313: 07801 #line 2867 "ripper.y" 07802 { 07803 #if 0 07804 /* 07805 * for a, b, c in e 07806 * #=> 07807 * e.each{|*x| a, b, c = x 07808 * 07809 * for a in e 07810 * #=> 07811 * e.each{|x| a, = x} 07812 */ 07813 ID id = internal_id(); 07814 ID *tbl = ALLOC_N(ID, 2); 07815 NODE *m = NEW_ARGS_AUX(0, 0); 07816 NODE *args, *scope; 07817 07818 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { 07819 /* if args.length == 1 && args[0].kind_of?(Array) 07820 * args = args[0] 07821 * end 07822 */ 07823 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 07824 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 07825 m->nd_next = block_append( 07826 NEW_IF( 07827 NEW_NODE(NODE_AND, 07828 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), 07829 rb_intern("=="), one), 07830 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), 07831 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 07832 0), 07833 NEW_DASGN_CURR(id, 07834 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), 07835 0), 07836 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); 07837 07838 args = new_args(m, 0, id, 0, 0); 07839 } 07840 else { 07841 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || 07842 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || 07843 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { 07844 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); 07845 m->nd_plen = 1; 07846 m->nd_next = (yyvsp[(2) - (9)].val); 07847 args = new_args(m, 0, 0, 0, 0); 07848 } 07849 else { 07850 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); 07851 args = new_args(m, 0, id, 0, 0); 07852 } 07853 } 07854 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); 07855 tbl[0] = 1; tbl[1] = id; 07856 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); 07857 fixpos((yyval.val), (yyvsp[(2) - (9)].val)); 07858 #endif 07859 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); 07860 07861 ;} 07862 break; 07863 07864 case 314: 07865 #line 2928 "ripper.y" 07866 { 07867 if (in_def || in_single) 07868 yyerror("class definition in method body"); 07869 local_push(0); 07870 #if 0 07871 (yyval.num) = ruby_sourceline; 07872 #endif 07873 07874 ;} 07875 break; 07876 07877 case 315: 07878 #line 2939 "ripper.y" 07879 { 07880 #if 0 07881 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); 07882 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); 07883 #endif 07884 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 07885 07886 local_pop(); 07887 ;} 07888 break; 07889 07890 case 316: 07891 #line 2949 "ripper.y" 07892 { 07893 (yyval.num) = in_def; 07894 in_def = 0; 07895 ;} 07896 break; 07897 07898 case 317: 07899 #line 2954 "ripper.y" 07900 { 07901 (yyval.num) = in_single; 07902 in_single = 0; 07903 local_push(0); 07904 ;} 07905 break; 07906 07907 case 318: 07908 #line 2961 "ripper.y" 07909 { 07910 #if 0 07911 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 07912 fixpos((yyval.val), (yyvsp[(3) - (8)].val)); 07913 #endif 07914 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 07915 07916 local_pop(); 07917 in_def = (yyvsp[(4) - (8)].num); 07918 in_single = (yyvsp[(6) - (8)].num); 07919 ;} 07920 break; 07921 07922 case 319: 07923 #line 2973 "ripper.y" 07924 { 07925 if (in_def || in_single) 07926 yyerror("module definition in method body"); 07927 local_push(0); 07928 #if 0 07929 (yyval.num) = ruby_sourceline; 07930 #endif 07931 07932 ;} 07933 break; 07934 07935 case 320: 07936 #line 2984 "ripper.y" 07937 { 07938 #if 0 07939 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 07940 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); 07941 #endif 07942 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 07943 07944 local_pop(); 07945 ;} 07946 break; 07947 07948 case 321: 07949 #line 2994 "ripper.y" 07950 { 07951 (yyval.id) = cur_mid; 07952 cur_mid = (yyvsp[(2) - (2)].val); 07953 in_def++; 07954 local_push(0); 07955 ;} 07956 break; 07957 07958 case 322: 07959 #line 3003 "ripper.y" 07960 { 07961 #if 0 07962 NODE *body = remove_begin((yyvsp[(5) - (6)].val)); 07963 reduce_nodes(&body); 07964 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); 07965 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num)); 07966 #endif 07967 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 07968 07969 local_pop(); 07970 in_def--; 07971 cur_mid = (yyvsp[(3) - (6)].id); 07972 ;} 07973 break; 07974 07975 case 323: 07976 #line 3016 "ripper.y" 07977 {lex_state = EXPR_FNAME;;} 07978 break; 07979 07980 case 324: 07981 #line 3017 "ripper.y" 07982 { 07983 in_single++; 07984 lex_state = EXPR_ENDFN; /* force for args */ 07985 local_push(0); 07986 ;} 07987 break; 07988 07989 case 325: 07990 #line 3025 "ripper.y" 07991 { 07992 #if 0 07993 NODE *body = remove_begin((yyvsp[(8) - (9)].val)); 07994 reduce_nodes(&body); 07995 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); 07996 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num)); 07997 #endif 07998 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); 07999 08000 local_pop(); 08001 in_single--; 08002 ;} 08003 break; 08004 08005 case 326: 08006 #line 3038 "ripper.y" 08007 { 08008 #if 0 08009 (yyval.val) = NEW_BREAK(0); 08010 #endif 08011 (yyval.val) = dispatch1(break, arg_new()); 08012 08013 ;} 08014 break; 08015 08016 case 327: 08017 #line 3046 "ripper.y" 08018 { 08019 #if 0 08020 (yyval.val) = NEW_NEXT(0); 08021 #endif 08022 (yyval.val) = dispatch1(next, arg_new()); 08023 08024 ;} 08025 break; 08026 08027 case 328: 08028 #line 3054 "ripper.y" 08029 { 08030 #if 0 08031 (yyval.val) = NEW_REDO(); 08032 #endif 08033 (yyval.val) = dispatch0(redo); 08034 08035 ;} 08036 break; 08037 08038 case 329: 08039 #line 3062 "ripper.y" 08040 { 08041 #if 0 08042 (yyval.val) = NEW_RETRY(); 08043 #endif 08044 (yyval.val) = dispatch0(retry); 08045 08046 ;} 08047 break; 08048 08049 case 330: 08050 #line 3072 "ripper.y" 08051 { 08052 #if 0 08053 value_expr((yyvsp[(1) - (1)].val)); 08054 (yyval.val) = (yyvsp[(1) - (1)].val); 08055 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 08056 #endif 08057 (yyval.val) = (yyvsp[(1) - (1)].val); 08058 08059 ;} 08060 break; 08061 08062 case 331: 08063 #line 3084 "ripper.y" 08064 { 08065 token_info_push("begin"); 08066 ;} 08067 break; 08068 08069 case 332: 08070 #line 3090 "ripper.y" 08071 { 08072 token_info_push("if"); 08073 ;} 08074 break; 08075 08076 case 333: 08077 #line 3096 "ripper.y" 08078 { 08079 token_info_push("unless"); 08080 ;} 08081 break; 08082 08083 case 334: 08084 #line 3102 "ripper.y" 08085 { 08086 token_info_push("while"); 08087 ;} 08088 break; 08089 08090 case 335: 08091 #line 3108 "ripper.y" 08092 { 08093 token_info_push("until"); 08094 ;} 08095 break; 08096 08097 case 336: 08098 #line 3114 "ripper.y" 08099 { 08100 token_info_push("case"); 08101 ;} 08102 break; 08103 08104 case 337: 08105 #line 3120 "ripper.y" 08106 { 08107 token_info_push("for"); 08108 ;} 08109 break; 08110 08111 case 338: 08112 #line 3126 "ripper.y" 08113 { 08114 token_info_push("class"); 08115 ;} 08116 break; 08117 08118 case 339: 08119 #line 3132 "ripper.y" 08120 { 08121 token_info_push("module"); 08122 ;} 08123 break; 08124 08125 case 340: 08126 #line 3138 "ripper.y" 08127 { 08128 token_info_push("def"); 08129 #if 0 08130 (yyval.num) = ruby_sourceline; 08131 #endif 08132 08133 ;} 08134 break; 08135 08136 case 341: 08137 #line 3148 "ripper.y" 08138 { 08139 token_info_pop("end"); 08140 ;} 08141 break; 08142 08143 case 342: 08144 #line 3156 "ripper.y" 08145 { (yyval.val) = Qnil; ;} 08146 break; 08147 08148 case 344: 08149 #line 3162 "ripper.y" 08150 { (yyval.val) = (yyvsp[(2) - (2)].val); ;} 08151 break; 08152 08153 case 345: 08154 #line 3169 "ripper.y" 08155 { (yyval.val) = Qnil; ;} 08156 break; 08157 08158 case 348: 08159 #line 3178 "ripper.y" 08160 { 08161 #if 0 08162 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 08163 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08164 #endif 08165 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 08166 08167 ;} 08168 break; 08169 08170 case 350: 08171 #line 3190 "ripper.y" 08172 { 08173 #if 0 08174 (yyval.val) = (yyvsp[(2) - (2)].val); 08175 #endif 08176 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); 08177 08178 ;} 08179 break; 08180 08181 case 353: 08182 #line 3204 "ripper.y" 08183 { 08184 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 08185 #if 0 08186 #endif 08187 (yyval.val) = dispatch1(mlhs_paren, (yyval.val)); 08188 08189 ;} 08190 break; 08191 08192 case 354: 08193 #line 3212 "ripper.y" 08194 { 08195 #if 0 08196 (yyval.val) = (yyvsp[(2) - (3)].val); 08197 #endif 08198 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 08199 08200 ;} 08201 break; 08202 08203 case 355: 08204 #line 3222 "ripper.y" 08205 { 08206 #if 0 08207 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 08208 #endif 08209 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 08210 08211 ;} 08212 break; 08213 08214 case 356: 08215 #line 3230 "ripper.y" 08216 { 08217 #if 0 08218 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08219 #endif 08220 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08221 08222 ;} 08223 break; 08224 08225 case 357: 08226 #line 3240 "ripper.y" 08227 { 08228 #if 0 08229 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 08230 #endif 08231 (yyval.val) = (yyvsp[(1) - (1)].val); 08232 08233 ;} 08234 break; 08235 08236 case 358: 08237 #line 3248 "ripper.y" 08238 { 08239 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0); 08240 #if 0 08241 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val)); 08242 #endif 08243 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val)); 08244 08245 ;} 08246 break; 08247 08248 case 359: 08249 #line 3257 "ripper.y" 08250 { 08251 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0); 08252 #if 0 08253 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val))); 08254 #endif 08255 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val)); 08256 08257 ;} 08258 break; 08259 08260 case 360: 08261 #line 3266 "ripper.y" 08262 { 08263 #if 0 08264 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); 08265 #endif 08266 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); 08267 08268 ;} 08269 break; 08270 08271 case 361: 08272 #line 3274 "ripper.y" 08273 { 08274 #if 0 08275 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); 08276 #endif 08277 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 08278 08279 ;} 08280 break; 08281 08282 case 362: 08283 #line 3282 "ripper.y" 08284 { 08285 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0); 08286 #if 0 08287 (yyval.val) = NEW_MASGN(0, (yyval.val)); 08288 #endif 08289 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val)); 08290 08291 ;} 08292 break; 08293 08294 case 363: 08295 #line 3291 "ripper.y" 08296 { 08297 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0); 08298 #if 0 08299 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val))); 08300 #endif 08301 #if 0 08302 TODO: Check me 08303 #endif 08304 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val)); 08305 08306 ;} 08307 break; 08308 08309 case 364: 08310 #line 3303 "ripper.y" 08311 { 08312 #if 0 08313 (yyval.val) = NEW_MASGN(0, -1); 08314 #endif 08315 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08316 08317 ;} 08318 break; 08319 08320 case 365: 08321 #line 3311 "ripper.y" 08322 { 08323 #if 0 08324 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 08325 #endif 08326 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08327 08328 ;} 08329 break; 08330 08331 case 366: 08332 #line 3321 "ripper.y" 08333 { 08334 #if 0 08335 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); 08336 #endif 08337 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); 08338 08339 ;} 08340 break; 08341 08342 case 367: 08343 #line 3329 "ripper.y" 08344 { 08345 #if 0 08346 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 08347 #endif 08348 (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val))); 08349 08350 ;} 08351 break; 08352 08353 case 368: 08354 #line 3337 "ripper.y" 08355 { 08356 #if 0 08357 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); 08358 #endif 08359 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08360 08361 ;} 08362 break; 08363 08364 case 369: 08365 #line 3345 "ripper.y" 08366 { 08367 #if 0 08368 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08369 #endif 08370 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08371 08372 ;} 08373 break; 08374 08375 case 370: 08376 #line 3353 "ripper.y" 08377 { 08378 #if 0 08379 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 08380 #endif 08381 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08382 08383 ;} 08384 break; 08385 08386 case 371: 08387 #line 3361 "ripper.y" 08388 { 08389 #if 0 08390 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0); 08391 #endif 08392 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil); 08393 dispatch1(excessed_comma, (yyval.val)); 08394 08395 ;} 08396 break; 08397 08398 case 372: 08399 #line 3370 "ripper.y" 08400 { 08401 #if 0 08402 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08403 #endif 08404 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08405 08406 ;} 08407 break; 08408 08409 case 373: 08410 #line 3378 "ripper.y" 08411 { 08412 #if 0 08413 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); 08414 #endif 08415 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); 08416 08417 ;} 08418 break; 08419 08420 case 374: 08421 #line 3386 "ripper.y" 08422 { 08423 #if 0 08424 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 08425 #endif 08426 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08427 08428 ;} 08429 break; 08430 08431 case 375: 08432 #line 3394 "ripper.y" 08433 { 08434 #if 0 08435 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08436 #endif 08437 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08438 08439 ;} 08440 break; 08441 08442 case 376: 08443 #line 3402 "ripper.y" 08444 { 08445 #if 0 08446 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); 08447 #endif 08448 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 08449 08450 ;} 08451 break; 08452 08453 case 377: 08454 #line 3410 "ripper.y" 08455 { 08456 #if 0 08457 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08458 #endif 08459 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 08460 08461 ;} 08462 break; 08463 08464 case 378: 08465 #line 3418 "ripper.y" 08466 { 08467 #if 0 08468 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); 08469 #endif 08470 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); 08471 08472 ;} 08473 break; 08474 08475 case 379: 08476 #line 3426 "ripper.y" 08477 { 08478 #if 0 08479 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08480 #endif 08481 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 08482 08483 ;} 08484 break; 08485 08486 case 380: 08487 #line 3434 "ripper.y" 08488 { 08489 #if 0 08490 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); 08491 #endif 08492 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); 08493 08494 ;} 08495 break; 08496 08497 case 382: 08498 #line 3445 "ripper.y" 08499 { 08500 command_start = TRUE; 08501 ;} 08502 break; 08503 08504 case 383: 08505 #line 3451 "ripper.y" 08506 { 08507 #if 0 08508 (yyval.val) = 0; 08509 #endif 08510 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08511 escape_Qundef((yyvsp[(2) - (3)].val))); 08512 08513 ;} 08514 break; 08515 08516 case 384: 08517 #line 3460 "ripper.y" 08518 { 08519 #if 0 08520 (yyval.val) = 0; 08521 #endif 08522 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08523 Qnil); 08524 08525 ;} 08526 break; 08527 08528 case 385: 08529 #line 3469 "ripper.y" 08530 { 08531 #if 0 08532 (yyval.val) = (yyvsp[(2) - (4)].val); 08533 #endif 08534 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); 08535 08536 ;} 08537 break; 08538 08539 case 387: 08540 #line 3481 "ripper.y" 08541 { 08542 #if 0 08543 (yyval.val) = 0; 08544 #endif 08545 (yyval.val) = (yyvsp[(2) - (2)].val); 08546 08547 ;} 08548 break; 08549 08550 case 388: 08551 #line 3493 "ripper.y" 08552 { 08553 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 08554 ;} 08555 break; 08556 08557 case 389: 08558 #line 3500 "ripper.y" 08559 { 08560 rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val)); 08561 ;} 08562 break; 08563 08564 case 390: 08565 #line 3507 "ripper.y" 08566 { 08567 new_bv(get_id((yyvsp[(1) - (1)].val))); 08568 #if 0 08569 #endif 08570 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 08571 08572 ;} 08573 break; 08574 08575 case 391: 08576 #line 3515 "ripper.y" 08577 { 08578 (yyval.val) = 0; 08579 ;} 08580 break; 08581 08582 case 392: 08583 #line 3520 "ripper.y" 08584 { 08585 (yyval.vars) = dyna_push(); 08586 ;} 08587 break; 08588 08589 case 393: 08590 #line 3523 "ripper.y" 08591 { 08592 (yyval.num) = lpar_beg; 08593 lpar_beg = ++paren_nest; 08594 ;} 08595 break; 08596 08597 case 394: 08598 #line 3529 "ripper.y" 08599 { 08600 lpar_beg = (yyvsp[(2) - (4)].num); 08601 #if 0 08602 (yyval.val) = (yyvsp[(3) - (4)].val); 08603 (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].val)->nd_head, (yyvsp[(4) - (4)].val)); 08604 #endif 08605 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08606 08607 dyna_pop((yyvsp[(1) - (4)].vars)); 08608 ;} 08609 break; 08610 08611 case 395: 08612 #line 3542 "ripper.y" 08613 { 08614 #if 0 08615 (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val)); 08616 #endif 08617 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 08618 08619 ;} 08620 break; 08621 08622 case 396: 08623 #line 3550 "ripper.y" 08624 { 08625 #if 0 08626 (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val)); 08627 #endif 08628 (yyval.val) = (yyvsp[(1) - (1)].val); 08629 08630 ;} 08631 break; 08632 08633 case 397: 08634 #line 3560 "ripper.y" 08635 { 08636 (yyval.val) = (yyvsp[(2) - (3)].val); 08637 ;} 08638 break; 08639 08640 case 398: 08641 #line 3564 "ripper.y" 08642 { 08643 (yyval.val) = (yyvsp[(2) - (3)].val); 08644 ;} 08645 break; 08646 08647 case 399: 08648 #line 3570 "ripper.y" 08649 { 08650 (yyvsp[(1) - (1)].vars) = dyna_push(); 08651 #if 0 08652 (yyval.num) = ruby_sourceline; 08653 #endif 08654 ;} 08655 break; 08656 08657 case 400: 08658 #line 3579 "ripper.y" 08659 { 08660 #if 0 08661 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 08662 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 08663 #endif 08664 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 08665 08666 dyna_pop((yyvsp[(1) - (5)].vars)); 08667 ;} 08668 break; 08669 08670 case 401: 08671 #line 3591 "ripper.y" 08672 { 08673 #if 0 08674 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { 08675 compile_error(PARSER_ARG "block given to yield"); 08676 } 08677 else { 08678 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 08679 } 08680 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 08681 (yyval.val) = (yyvsp[(2) - (2)].val); 08682 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 08683 #endif 08684 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08685 08686 ;} 08687 break; 08688 08689 case 402: 08690 #line 3607 "ripper.y" 08691 { 08692 #if 0 08693 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08694 #endif 08695 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 08696 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 08697 08698 ;} 08699 break; 08700 08701 case 403: 08702 #line 3616 "ripper.y" 08703 { 08704 #if 0 08705 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08706 #endif 08707 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); 08708 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 08709 08710 ;} 08711 break; 08712 08713 case 404: 08714 #line 3627 "ripper.y" 08715 { 08716 #if 0 08717 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08718 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 08719 #endif 08720 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); 08721 08722 ;} 08723 break; 08724 08725 case 405: 08726 #line 3636 "ripper.y" 08727 { 08728 #if 0 08729 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08730 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 08731 #endif 08732 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 08733 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 08734 08735 ;} 08736 break; 08737 08738 case 406: 08739 #line 3646 "ripper.y" 08740 { 08741 #if 0 08742 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08743 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 08744 #endif 08745 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 08746 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 08747 08748 ;} 08749 break; 08750 08751 case 407: 08752 #line 3656 "ripper.y" 08753 { 08754 #if 0 08755 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); 08756 #endif 08757 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 08758 08759 ;} 08760 break; 08761 08762 case 408: 08763 #line 3664 "ripper.y" 08764 { 08765 #if 0 08766 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); 08767 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 08768 #endif 08769 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), 08770 ripper_intern("call")); 08771 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); 08772 08773 ;} 08774 break; 08775 08776 case 409: 08777 #line 3675 "ripper.y" 08778 { 08779 #if 0 08780 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); 08781 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 08782 #endif 08783 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), 08784 ripper_intern("call")); 08785 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); 08786 08787 ;} 08788 break; 08789 08790 case 410: 08791 #line 3686 "ripper.y" 08792 { 08793 #if 0 08794 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 08795 #endif 08796 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 08797 08798 ;} 08799 break; 08800 08801 case 411: 08802 #line 3694 "ripper.y" 08803 { 08804 #if 0 08805 (yyval.val) = NEW_ZSUPER(); 08806 #endif 08807 (yyval.val) = dispatch0(zsuper); 08808 08809 ;} 08810 break; 08811 08812 case 412: 08813 #line 3702 "ripper.y" 08814 { 08815 #if 0 08816 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) 08817 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); 08818 else 08819 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); 08820 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 08821 #endif 08822 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 08823 08824 ;} 08825 break; 08826 08827 case 413: 08828 #line 3716 "ripper.y" 08829 { 08830 (yyvsp[(1) - (1)].vars) = dyna_push(); 08831 #if 0 08832 (yyval.num) = ruby_sourceline; 08833 #endif 08834 08835 ;} 08836 break; 08837 08838 case 414: 08839 #line 3725 "ripper.y" 08840 { 08841 #if 0 08842 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 08843 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 08844 #endif 08845 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 08846 08847 dyna_pop((yyvsp[(1) - (5)].vars)); 08848 ;} 08849 break; 08850 08851 case 415: 08852 #line 3735 "ripper.y" 08853 { 08854 (yyvsp[(1) - (1)].vars) = dyna_push(); 08855 #if 0 08856 (yyval.num) = ruby_sourceline; 08857 #endif 08858 08859 ;} 08860 break; 08861 08862 case 416: 08863 #line 3744 "ripper.y" 08864 { 08865 #if 0 08866 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 08867 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 08868 #endif 08869 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 08870 08871 dyna_pop((yyvsp[(1) - (5)].vars)); 08872 ;} 08873 break; 08874 08875 case 417: 08876 #line 3758 "ripper.y" 08877 { 08878 #if 0 08879 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 08880 #endif 08881 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 08882 08883 ;} 08884 break; 08885 08886 case 420: 08887 #line 3774 "ripper.y" 08888 { 08889 #if 0 08890 if ((yyvsp[(3) - (6)].val)) { 08891 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); 08892 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 08893 } 08894 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08895 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); 08896 #endif 08897 (yyval.val) = dispatch4(rescue, 08898 escape_Qundef((yyvsp[(2) - (6)].val)), 08899 escape_Qundef((yyvsp[(3) - (6)].val)), 08900 escape_Qundef((yyvsp[(5) - (6)].val)), 08901 escape_Qundef((yyvsp[(6) - (6)].val))); 08902 08903 ;} 08904 break; 08905 08906 case 422: 08907 #line 3794 "ripper.y" 08908 { 08909 #if 0 08910 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 08911 #endif 08912 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 08913 08914 ;} 08915 break; 08916 08917 case 423: 08918 #line 3802 "ripper.y" 08919 { 08920 #if 0 08921 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); 08922 #endif 08923 (yyval.val) = (yyvsp[(1) - (1)].val); 08924 08925 ;} 08926 break; 08927 08928 case 425: 08929 #line 3813 "ripper.y" 08930 { 08931 (yyval.val) = (yyvsp[(2) - (2)].val); 08932 ;} 08933 break; 08934 08935 case 427: 08936 #line 3820 "ripper.y" 08937 { 08938 #if 0 08939 (yyval.val) = (yyvsp[(2) - (2)].val); 08940 #endif 08941 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); 08942 08943 ;} 08944 break; 08945 08946 case 430: 08947 #line 3832 "ripper.y" 08948 { 08949 #if 0 08950 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 08951 #endif 08952 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 08953 08954 ;} 08955 break; 08956 08957 case 432: 08958 #line 3843 "ripper.y" 08959 { 08960 #if 0 08961 NODE *node = (yyvsp[(1) - (1)].val); 08962 if (!node) { 08963 node = NEW_STR(STR_NEW0()); 08964 } 08965 else { 08966 node = evstr2dstr(node); 08967 } 08968 (yyval.val) = node; 08969 #endif 08970 (yyval.val) = (yyvsp[(1) - (1)].val); 08971 08972 ;} 08973 break; 08974 08975 case 435: 08976 #line 3862 "ripper.y" 08977 { 08978 #if 0 08979 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08980 #endif 08981 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08982 08983 ;} 08984 break; 08985 08986 case 436: 08987 #line 3872 "ripper.y" 08988 { 08989 #if 0 08990 (yyval.val) = (yyvsp[(2) - (3)].val); 08991 #endif 08992 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); 08993 08994 ;} 08995 break; 08996 08997 case 437: 08998 #line 3882 "ripper.y" 08999 { 09000 #if 0 09001 NODE *node = (yyvsp[(2) - (3)].val); 09002 if (!node) { 09003 node = NEW_XSTR(STR_NEW0()); 09004 } 09005 else { 09006 switch (nd_type(node)) { 09007 case NODE_STR: 09008 nd_set_type(node, NODE_XSTR); 09009 break; 09010 case NODE_DSTR: 09011 nd_set_type(node, NODE_DXSTR); 09012 break; 09013 default: 09014 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09015 break; 09016 } 09017 } 09018 (yyval.val) = node; 09019 #endif 09020 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); 09021 09022 ;} 09023 break; 09024 09025 case 438: 09026 #line 3909 "ripper.y" 09027 { 09028 #if 0 09029 int options = (yyvsp[(3) - (3)].val); 09030 NODE *node = (yyvsp[(2) - (3)].val); 09031 NODE *list, *prev; 09032 if (!node) { 09033 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09034 } 09035 else switch (nd_type(node)) { 09036 case NODE_STR: 09037 { 09038 VALUE src = node->nd_lit; 09039 nd_set_type(node, NODE_LIT); 09040 node->nd_lit = reg_compile(src, options); 09041 } 09042 break; 09043 default: 09044 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09045 case NODE_DSTR: 09046 if (options & RE_OPTION_ONCE) { 09047 nd_set_type(node, NODE_DREGX_ONCE); 09048 } 09049 else { 09050 nd_set_type(node, NODE_DREGX); 09051 } 09052 node->nd_cflag = options & RE_OPTION_MASK; 09053 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09054 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09055 if (nd_type(list->nd_head) == NODE_STR) { 09056 VALUE tail = list->nd_head->nd_lit; 09057 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09058 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09059 if (!literal_concat0(parser, lit, tail)) { 09060 node = 0; 09061 break; 09062 } 09063 rb_str_resize(tail, 0); 09064 prev->nd_next = list->nd_next; 09065 rb_gc_force_recycle((VALUE)list->nd_head); 09066 rb_gc_force_recycle((VALUE)list); 09067 list = prev; 09068 } 09069 else { 09070 prev = list; 09071 } 09072 } 09073 else { 09074 prev = 0; 09075 } 09076 } 09077 if (!node->nd_next) { 09078 VALUE src = node->nd_lit; 09079 nd_set_type(node, NODE_LIT); 09080 node->nd_lit = reg_compile(src, options); 09081 } 09082 break; 09083 } 09084 (yyval.val) = node; 09085 #endif 09086 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 09087 09088 ;} 09089 break; 09090 09091 case 439: 09092 #line 3974 "ripper.y" 09093 { 09094 #if 0 09095 (yyval.val) = NEW_ZARRAY(); 09096 #endif 09097 (yyval.val) = dispatch0(words_new); 09098 (yyval.val) = dispatch1(array, (yyval.val)); 09099 09100 ;} 09101 break; 09102 09103 case 440: 09104 #line 3983 "ripper.y" 09105 { 09106 #if 0 09107 (yyval.val) = (yyvsp[(2) - (3)].val); 09108 #endif 09109 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09110 09111 ;} 09112 break; 09113 09114 case 441: 09115 #line 3993 "ripper.y" 09116 { 09117 #if 0 09118 (yyval.val) = 0; 09119 #endif 09120 (yyval.val) = dispatch0(words_new); 09121 09122 ;} 09123 break; 09124 09125 case 442: 09126 #line 4001 "ripper.y" 09127 { 09128 #if 0 09129 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); 09130 #endif 09131 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09132 09133 ;} 09134 break; 09135 09136 case 443: 09137 #line 4013 "ripper.y" 09138 { 09139 (yyval.val) = dispatch0(word_new); 09140 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); 09141 ;} 09142 break; 09143 09144 case 444: 09145 #line 4019 "ripper.y" 09146 { 09147 #if 0 09148 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09149 #endif 09150 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09151 09152 ;} 09153 break; 09154 09155 case 445: 09156 #line 4029 "ripper.y" 09157 { 09158 #if 0 09159 (yyval.val) = NEW_ZARRAY(); 09160 #endif 09161 (yyval.val) = dispatch0(qwords_new); 09162 (yyval.val) = dispatch1(array, (yyval.val)); 09163 09164 ;} 09165 break; 09166 09167 case 446: 09168 #line 4038 "ripper.y" 09169 { 09170 #if 0 09171 (yyval.val) = (yyvsp[(2) - (3)].val); 09172 #endif 09173 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09174 09175 ;} 09176 break; 09177 09178 case 447: 09179 #line 4048 "ripper.y" 09180 { 09181 #if 0 09182 (yyval.val) = 0; 09183 #endif 09184 (yyval.val) = dispatch0(qwords_new); 09185 09186 ;} 09187 break; 09188 09189 case 448: 09190 #line 4056 "ripper.y" 09191 { 09192 #if 0 09193 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09194 #endif 09195 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09196 09197 ;} 09198 break; 09199 09200 case 449: 09201 #line 4066 "ripper.y" 09202 { 09203 #if 0 09204 (yyval.val) = 0; 09205 #endif 09206 (yyval.val) = dispatch0(string_content); 09207 09208 ;} 09209 break; 09210 09211 case 450: 09212 #line 4074 "ripper.y" 09213 { 09214 #if 0 09215 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09216 #endif 09217 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09218 09219 ;} 09220 break; 09221 09222 case 451: 09223 #line 4084 "ripper.y" 09224 { 09225 #if 0 09226 (yyval.val) = 0; 09227 #endif 09228 (yyval.val) = dispatch0(xstring_new); 09229 09230 ;} 09231 break; 09232 09233 case 452: 09234 #line 4092 "ripper.y" 09235 { 09236 #if 0 09237 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09238 #endif 09239 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09240 09241 ;} 09242 break; 09243 09244 case 453: 09245 #line 4102 "ripper.y" 09246 { 09247 #if 0 09248 (yyval.val) = 0; 09249 #endif 09250 (yyval.val) = dispatch0(regexp_new); 09251 09252 ;} 09253 break; 09254 09255 case 454: 09256 #line 4110 "ripper.y" 09257 { 09258 #if 0 09259 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val); 09260 if (!head) { 09261 (yyval.val) = tail; 09262 } 09263 else if (!tail) { 09264 (yyval.val) = head; 09265 } 09266 else { 09267 switch (nd_type(head)) { 09268 case NODE_STR: 09269 nd_set_type(head, NODE_DSTR); 09270 break; 09271 case NODE_DSTR: 09272 break; 09273 default: 09274 head = list_append(NEW_DSTR(Qnil), head); 09275 break; 09276 } 09277 (yyval.val) = list_append(head, tail); 09278 } 09279 #endif 09280 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09281 09282 ;} 09283 break; 09284 09285 case 456: 09286 #line 4140 "ripper.y" 09287 { 09288 (yyval.node) = lex_strterm; 09289 lex_strterm = 0; 09290 lex_state = EXPR_BEG; 09291 ;} 09292 break; 09293 09294 case 457: 09295 #line 4146 "ripper.y" 09296 { 09297 #if 0 09298 lex_strterm = (yyvsp[(2) - (3)].node); 09299 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); 09300 #endif 09301 lex_strterm = (yyvsp[(2) - (3)].node); 09302 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); 09303 09304 ;} 09305 break; 09306 09307 case 458: 09308 #line 4156 "ripper.y" 09309 { 09310 (yyvsp[(1) - (1)].val) = cond_stack; 09311 (yyval.val) = cmdarg_stack; 09312 cond_stack = 0; 09313 cmdarg_stack = 0; 09314 ;} 09315 break; 09316 09317 case 459: 09318 #line 4162 "ripper.y" 09319 { 09320 (yyval.node) = lex_strterm; 09321 lex_strterm = 0; 09322 lex_state = EXPR_BEG; 09323 ;} 09324 break; 09325 09326 case 460: 09327 #line 4168 "ripper.y" 09328 { 09329 cond_stack = (yyvsp[(1) - (5)].val); 09330 cmdarg_stack = (yyvsp[(2) - (5)].val); 09331 lex_strterm = (yyvsp[(3) - (5)].node); 09332 #if 0 09333 if ((yyvsp[(4) - (5)].val)) (yyvsp[(4) - (5)].val)->flags &= ~NODE_FL_NEWLINE; 09334 (yyval.val) = new_evstr((yyvsp[(4) - (5)].val)); 09335 #endif 09336 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(4) - (5)].val)); 09337 09338 ;} 09339 break; 09340 09341 case 461: 09342 #line 4182 "ripper.y" 09343 { 09344 #if 0 09345 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); 09346 #endif 09347 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09348 09349 ;} 09350 break; 09351 09352 case 462: 09353 #line 4190 "ripper.y" 09354 { 09355 #if 0 09356 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); 09357 #endif 09358 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09359 09360 ;} 09361 break; 09362 09363 case 463: 09364 #line 4198 "ripper.y" 09365 { 09366 #if 0 09367 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); 09368 #endif 09369 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09370 09371 ;} 09372 break; 09373 09374 case 465: 09375 #line 4209 "ripper.y" 09376 { 09377 lex_state = EXPR_END; 09378 #if 0 09379 (yyval.val) = (yyvsp[(2) - (2)].val); 09380 #endif 09381 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); 09382 09383 ;} 09384 break; 09385 09386 case 470: 09387 #line 4226 "ripper.y" 09388 { 09389 lex_state = EXPR_END; 09390 #if 0 09391 if (!((yyval.val) = (yyvsp[(2) - (3)].val))) { 09392 (yyval.val) = NEW_LIT(ID2SYM(rb_intern(""))); 09393 } 09394 else { 09395 VALUE lit; 09396 09397 switch (nd_type((yyval.val))) { 09398 case NODE_DSTR: 09399 nd_set_type((yyval.val), NODE_DSYM); 09400 break; 09401 case NODE_STR: 09402 lit = (yyval.val)->nd_lit; 09403 (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit)); 09404 nd_set_type((yyval.val), NODE_LIT); 09405 break; 09406 default: 09407 (yyval.val) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.val))); 09408 break; 09409 } 09410 } 09411 #endif 09412 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); 09413 09414 ;} 09415 break; 09416 09417 case 473: 09418 #line 4258 "ripper.y" 09419 { 09420 #if 0 09421 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 09422 #endif 09423 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 09424 09425 ;} 09426 break; 09427 09428 case 474: 09429 #line 4266 "ripper.y" 09430 { 09431 #if 0 09432 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 09433 #endif 09434 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 09435 09436 ;} 09437 break; 09438 09439 case 480: 09440 #line 4282 "ripper.y" 09441 {ifndef_ripper((yyval.val) = keyword_nil);;} 09442 break; 09443 09444 case 481: 09445 #line 4283 "ripper.y" 09446 {ifndef_ripper((yyval.val) = keyword_self);;} 09447 break; 09448 09449 case 482: 09450 #line 4284 "ripper.y" 09451 {ifndef_ripper((yyval.val) = keyword_true);;} 09452 break; 09453 09454 case 483: 09455 #line 4285 "ripper.y" 09456 {ifndef_ripper((yyval.val) = keyword_false);;} 09457 break; 09458 09459 case 484: 09460 #line 4286 "ripper.y" 09461 {ifndef_ripper((yyval.val) = keyword__FILE__);;} 09462 break; 09463 09464 case 485: 09465 #line 4287 "ripper.y" 09466 {ifndef_ripper((yyval.val) = keyword__LINE__);;} 09467 break; 09468 09469 case 486: 09470 #line 4288 "ripper.y" 09471 {ifndef_ripper((yyval.val) = keyword__ENCODING__);;} 09472 break; 09473 09474 case 487: 09475 #line 4292 "ripper.y" 09476 { 09477 #if 0 09478 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 09479 #endif 09480 if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) { 09481 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09482 } 09483 else { 09484 (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val)); 09485 } 09486 09487 ;} 09488 break; 09489 09490 case 488: 09491 #line 4305 "ripper.y" 09492 { 09493 #if 0 09494 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 09495 #endif 09496 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09497 09498 ;} 09499 break; 09500 09501 case 489: 09502 #line 4315 "ripper.y" 09503 { 09504 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 09505 #if 0 09506 #endif 09507 (yyval.val) = dispatch1(var_field, (yyval.val)); 09508 09509 ;} 09510 break; 09511 09512 case 490: 09513 #line 4323 "ripper.y" 09514 { 09515 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 09516 #if 0 09517 #endif 09518 (yyval.val) = dispatch1(var_field, (yyval.val)); 09519 09520 ;} 09521 break; 09522 09523 case 493: 09524 #line 4337 "ripper.y" 09525 { 09526 #if 0 09527 (yyval.val) = 0; 09528 #endif 09529 (yyval.val) = Qnil; 09530 09531 ;} 09532 break; 09533 09534 case 494: 09535 #line 4345 "ripper.y" 09536 { 09537 lex_state = EXPR_BEG; 09538 ;} 09539 break; 09540 09541 case 495: 09542 #line 4349 "ripper.y" 09543 { 09544 (yyval.val) = (yyvsp[(3) - (4)].val); 09545 ;} 09546 break; 09547 09548 case 496: 09549 #line 4353 "ripper.y" 09550 { 09551 #if 0 09552 yyerrok; 09553 (yyval.val) = 0; 09554 #endif 09555 yyerrok; 09556 (yyval.val) = Qnil; 09557 09558 ;} 09559 break; 09560 09561 case 497: 09562 #line 4365 "ripper.y" 09563 { 09564 #if 0 09565 (yyval.val) = (yyvsp[(2) - (3)].val); 09566 #endif 09567 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 09568 09569 lex_state = EXPR_BEG; 09570 command_start = TRUE; 09571 ;} 09572 break; 09573 09574 case 498: 09575 #line 4375 "ripper.y" 09576 { 09577 (yyval.val) = (yyvsp[(1) - (2)].val); 09578 lex_state = EXPR_BEG; 09579 command_start = TRUE; 09580 ;} 09581 break; 09582 09583 case 499: 09584 #line 4383 "ripper.y" 09585 { 09586 #if 0 09587 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); 09588 #endif 09589 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); 09590 09591 ;} 09592 break; 09593 09594 case 500: 09595 #line 4391 "ripper.y" 09596 { 09597 #if 0 09598 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 09599 #endif 09600 (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val))); 09601 09602 ;} 09603 break; 09604 09605 case 501: 09606 #line 4399 "ripper.y" 09607 { 09608 #if 0 09609 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); 09610 #endif 09611 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 09612 09613 ;} 09614 break; 09615 09616 case 502: 09617 #line 4407 "ripper.y" 09618 { 09619 #if 0 09620 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09621 #endif 09622 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 09623 09624 ;} 09625 break; 09626 09627 case 503: 09628 #line 4415 "ripper.y" 09629 { 09630 #if 0 09631 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 09632 #endif 09633 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 09634 09635 ;} 09636 break; 09637 09638 case 504: 09639 #line 4423 "ripper.y" 09640 { 09641 #if 0 09642 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09643 #endif 09644 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 09645 09646 ;} 09647 break; 09648 09649 case 505: 09650 #line 4431 "ripper.y" 09651 { 09652 #if 0 09653 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); 09654 #endif 09655 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 09656 09657 ;} 09658 break; 09659 09660 case 506: 09661 #line 4439 "ripper.y" 09662 { 09663 #if 0 09664 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 09665 #endif 09666 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 09667 09668 ;} 09669 break; 09670 09671 case 507: 09672 #line 4447 "ripper.y" 09673 { 09674 #if 0 09675 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09676 #endif 09677 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 09678 09679 ;} 09680 break; 09681 09682 case 508: 09683 #line 4455 "ripper.y" 09684 { 09685 #if 0 09686 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); 09687 #endif 09688 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 09689 09690 ;} 09691 break; 09692 09693 case 509: 09694 #line 4463 "ripper.y" 09695 { 09696 #if 0 09697 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09698 #endif 09699 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 09700 09701 ;} 09702 break; 09703 09704 case 510: 09705 #line 4471 "ripper.y" 09706 { 09707 #if 0 09708 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); 09709 #endif 09710 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 09711 09712 ;} 09713 break; 09714 09715 case 511: 09716 #line 4479 "ripper.y" 09717 { 09718 #if 0 09719 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09720 #endif 09721 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 09722 09723 ;} 09724 break; 09725 09726 case 512: 09727 #line 4487 "ripper.y" 09728 { 09729 #if 0 09730 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); 09731 #endif 09732 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); 09733 09734 ;} 09735 break; 09736 09737 case 513: 09738 #line 4495 "ripper.y" 09739 { 09740 #if 0 09741 (yyval.val) = new_args(0, 0, 0, 0, 0); 09742 #endif 09743 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); 09744 09745 ;} 09746 break; 09747 09748 case 514: 09749 #line 4505 "ripper.y" 09750 { 09751 #if 0 09752 yyerror("formal argument cannot be a constant"); 09753 (yyval.val) = 0; 09754 #endif 09755 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 09756 09757 ;} 09758 break; 09759 09760 case 515: 09761 #line 4514 "ripper.y" 09762 { 09763 #if 0 09764 yyerror("formal argument cannot be an instance variable"); 09765 (yyval.val) = 0; 09766 #endif 09767 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 09768 09769 ;} 09770 break; 09771 09772 case 516: 09773 #line 4523 "ripper.y" 09774 { 09775 #if 0 09776 yyerror("formal argument cannot be a global variable"); 09777 (yyval.val) = 0; 09778 #endif 09779 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 09780 09781 ;} 09782 break; 09783 09784 case 517: 09785 #line 4532 "ripper.y" 09786 { 09787 #if 0 09788 yyerror("formal argument cannot be a class variable"); 09789 (yyval.val) = 0; 09790 #endif 09791 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 09792 09793 ;} 09794 break; 09795 09796 case 519: 09797 #line 4544 "ripper.y" 09798 { 09799 formal_argument(get_id((yyvsp[(1) - (1)].val))); 09800 (yyval.val) = (yyvsp[(1) - (1)].val); 09801 ;} 09802 break; 09803 09804 case 520: 09805 #line 4551 "ripper.y" 09806 { 09807 arg_var(get_id((yyvsp[(1) - (1)].val))); 09808 #if 0 09809 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); 09810 #endif 09811 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 09812 09813 ;} 09814 break; 09815 09816 case 521: 09817 #line 4560 "ripper.y" 09818 { 09819 ID tid = internal_id(); 09820 arg_var(tid); 09821 #if 0 09822 if (dyna_in_block()) { 09823 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); 09824 } 09825 else { 09826 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); 09827 } 09828 (yyval.val) = NEW_ARGS_AUX(tid, 1); 09829 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); 09830 #endif 09831 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 09832 09833 ;} 09834 break; 09835 09836 case 522: 09837 #line 4581 "ripper.y" 09838 { 09839 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09840 ;} 09841 break; 09842 09843 case 523: 09844 #line 4586 "ripper.y" 09845 { 09846 #if 0 09847 (yyval.val) = (yyvsp[(1) - (3)].val); 09848 (yyval.val)->nd_plen++; 09849 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); 09850 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); 09851 #endif 09852 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09853 09854 ;} 09855 break; 09856 09857 case 524: 09858 #line 4599 "ripper.y" 09859 { 09860 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 09861 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09862 #if 0 09863 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 09864 #endif 09865 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 09866 09867 ;} 09868 break; 09869 09870 case 525: 09871 #line 4611 "ripper.y" 09872 { 09873 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 09874 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09875 #if 0 09876 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 09877 #endif 09878 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 09879 09880 ;} 09881 break; 09882 09883 case 526: 09884 #line 4623 "ripper.y" 09885 { 09886 #if 0 09887 (yyval.val) = (yyvsp[(1) - (1)].val); 09888 #endif 09889 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09890 09891 ;} 09892 break; 09893 09894 case 527: 09895 #line 4631 "ripper.y" 09896 { 09897 #if 0 09898 NODE *opts = (yyvsp[(1) - (3)].val); 09899 09900 while (opts->nd_next) { 09901 opts = opts->nd_next; 09902 } 09903 opts->nd_next = (yyvsp[(3) - (3)].val); 09904 (yyval.val) = (yyvsp[(1) - (3)].val); 09905 #endif 09906 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09907 09908 ;} 09909 break; 09910 09911 case 528: 09912 #line 4647 "ripper.y" 09913 { 09914 #if 0 09915 (yyval.val) = (yyvsp[(1) - (1)].val); 09916 #endif 09917 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09918 09919 ;} 09920 break; 09921 09922 case 529: 09923 #line 4655 "ripper.y" 09924 { 09925 #if 0 09926 NODE *opts = (yyvsp[(1) - (3)].val); 09927 09928 while (opts->nd_next) { 09929 opts = opts->nd_next; 09930 } 09931 opts->nd_next = (yyvsp[(3) - (3)].val); 09932 (yyval.val) = (yyvsp[(1) - (3)].val); 09933 #endif 09934 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09935 09936 ;} 09937 break; 09938 09939 case 532: 09940 #line 4675 "ripper.y" 09941 { 09942 #if 0 09943 if (!is_local_id((yyvsp[(2) - (2)].val))) 09944 yyerror("rest argument must be local variable"); 09945 #endif 09946 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 09947 #if 0 09948 (yyval.val) = (yyvsp[(2) - (2)].val); 09949 #endif 09950 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); 09951 09952 ;} 09953 break; 09954 09955 case 533: 09956 #line 4688 "ripper.y" 09957 { 09958 #if 0 09959 (yyval.val) = internal_id(); 09960 arg_var((yyval.val)); 09961 #endif 09962 (yyval.val) = dispatch1(rest_param, Qnil); 09963 09964 ;} 09965 break; 09966 09967 case 536: 09968 #line 4703 "ripper.y" 09969 { 09970 #if 0 09971 if (!is_local_id((yyvsp[(2) - (2)].val))) 09972 yyerror("block argument must be local variable"); 09973 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) 09974 yyerror("duplicated block argument name"); 09975 #endif 09976 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 09977 #if 0 09978 (yyval.val) = (yyvsp[(2) - (2)].val); 09979 #endif 09980 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); 09981 09982 ;} 09983 break; 09984 09985 case 537: 09986 #line 4720 "ripper.y" 09987 { 09988 (yyval.val) = (yyvsp[(2) - (2)].val); 09989 ;} 09990 break; 09991 09992 case 538: 09993 #line 4724 "ripper.y" 09994 { 09995 #if 0 09996 (yyval.val) = 0; 09997 #endif 09998 (yyval.val) = Qundef; 09999 10000 ;} 10001 break; 10002 10003 case 539: 10004 #line 4734 "ripper.y" 10005 { 10006 #if 0 10007 value_expr((yyvsp[(1) - (1)].val)); 10008 (yyval.val) = (yyvsp[(1) - (1)].val); 10009 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 10010 #endif 10011 (yyval.val) = (yyvsp[(1) - (1)].val); 10012 10013 ;} 10014 break; 10015 10016 case 540: 10017 #line 4743 "ripper.y" 10018 {lex_state = EXPR_BEG;;} 10019 break; 10020 10021 case 541: 10022 #line 4744 "ripper.y" 10023 { 10024 #if 0 10025 if ((yyvsp[(3) - (4)].val) == 0) { 10026 yyerror("can't define singleton method for ()."); 10027 } 10028 else { 10029 switch (nd_type((yyvsp[(3) - (4)].val))) { 10030 case NODE_STR: 10031 case NODE_DSTR: 10032 case NODE_XSTR: 10033 case NODE_DXSTR: 10034 case NODE_DREGX: 10035 case NODE_LIT: 10036 case NODE_ARRAY: 10037 case NODE_ZARRAY: 10038 yyerror("can't define singleton method for literals"); 10039 default: 10040 value_expr((yyvsp[(3) - (4)].val)); 10041 break; 10042 } 10043 } 10044 (yyval.val) = (yyvsp[(3) - (4)].val); 10045 #endif 10046 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); 10047 10048 ;} 10049 break; 10050 10051 case 543: 10052 #line 4774 "ripper.y" 10053 { 10054 #if 0 10055 (yyval.val) = (yyvsp[(1) - (2)].val); 10056 #endif 10057 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); 10058 10059 ;} 10060 break; 10061 10062 case 544: 10063 #line 4786 "ripper.y" 10064 { 10065 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10066 ;} 10067 break; 10068 10069 case 545: 10070 #line 4791 "ripper.y" 10071 { 10072 #if 0 10073 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10074 #endif 10075 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10076 10077 ;} 10078 break; 10079 10080 case 546: 10081 #line 4801 "ripper.y" 10082 { 10083 #if 0 10084 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 10085 #endif 10086 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10087 10088 ;} 10089 break; 10090 10091 case 547: 10092 #line 4809 "ripper.y" 10093 { 10094 #if 0 10095 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); 10096 #endif 10097 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10098 10099 ;} 10100 break; 10101 10102 case 558: 10103 #line 4837 "ripper.y" 10104 { (yyval.val) = (yyvsp[(1) - (1)].val); ;} 10105 break; 10106 10107 case 559: 10108 #line 4842 "ripper.y" 10109 { (yyval.val) = (yyvsp[(1) - (1)].val); ;} 10110 break; 10111 10112 case 569: 10113 #line 4865 "ripper.y" 10114 {yyerrok;;} 10115 break; 10116 10117 case 572: 10118 #line 4870 "ripper.y" 10119 {yyerrok;;} 10120 break; 10121 10122 case 573: 10123 #line 4874 "ripper.y" 10124 { 10125 #if 0 10126 (yyval.val) = 0; 10127 #endif 10128 (yyval.val) = Qundef; 10129 10130 ;} 10131 break; 10132 10133 10134 /* Line 1267 of yacc.c. */ 10135 #line 10134 "parse.c" 10136 default: break; 10137 } 10138 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 10139 10140 YYPOPSTACK (yylen); 10141 yylen = 0; 10142 YY_STACK_PRINT (yyss, yyssp); 10143 10144 *++yyvsp = yyval; 10145 10146 10147 /* Now `shift' the result of the reduction. Determine what state 10148 that goes to, based on the state we popped back to and the rule 10149 number reduced by. */ 10150 10151 yyn = yyr1[yyn]; 10152 10153 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 10154 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 10155 yystate = yytable[yystate]; 10156 else 10157 yystate = yydefgoto[yyn - YYNTOKENS]; 10158 10159 goto yynewstate; 10160 10161 10162 /*------------------------------------. 10163 | yyerrlab -- here on detecting error | 10164 `------------------------------------*/ 10165 yyerrlab: 10166 /* If not already recovering from an error, report this error. */ 10167 if (!yyerrstatus) 10168 { 10169 ++yynerrs; 10170 #if ! YYERROR_VERBOSE 10171 parser_yyerror (parser, YY_("syntax error")); 10172 #else 10173 { 10174 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 10175 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 10176 { 10177 YYSIZE_T yyalloc = 2 * yysize; 10178 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 10179 yyalloc = YYSTACK_ALLOC_MAXIMUM; 10180 if (yymsg != yymsgbuf) 10181 YYSTACK_FREE (yymsg); 10182 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 10183 if (yymsg) 10184 yymsg_alloc = yyalloc; 10185 else 10186 { 10187 yymsg = yymsgbuf; 10188 yymsg_alloc = sizeof yymsgbuf; 10189 } 10190 } 10191 10192 if (0 < yysize && yysize <= yymsg_alloc) 10193 { 10194 (void) yysyntax_error (yymsg, yystate, yychar); 10195 parser_yyerror (parser, yymsg); 10196 } 10197 else 10198 { 10199 parser_yyerror (parser, YY_("syntax error")); 10200 if (yysize != 0) 10201 goto yyexhaustedlab; 10202 } 10203 } 10204 #endif 10205 } 10206 10207 10208 10209 if (yyerrstatus == 3) 10210 { 10211 /* If just tried and failed to reuse look-ahead token after an 10212 error, discard it. */ 10213 10214 if (yychar <= YYEOF) 10215 { 10216 /* Return failure if at end of input. */ 10217 if (yychar == YYEOF) 10218 YYABORT; 10219 } 10220 else 10221 { 10222 yydestruct ("Error: discarding", 10223 yytoken, &yylval, parser); 10224 yychar = YYEMPTY; 10225 } 10226 } 10227 10228 /* Else will try to reuse look-ahead token after shifting the error 10229 token. */ 10230 goto yyerrlab1; 10231 10232 10233 /*---------------------------------------------------. 10234 | yyerrorlab -- error raised explicitly by YYERROR. | 10235 `---------------------------------------------------*/ 10236 yyerrorlab: 10237 10238 /* Pacify compilers like GCC when the user code never invokes 10239 YYERROR and the label yyerrorlab therefore never appears in user 10240 code. */ 10241 if (/*CONSTCOND*/ 0) 10242 goto yyerrorlab; 10243 10244 /* Do not reclaim the symbols of the rule which action triggered 10245 this YYERROR. */ 10246 YYPOPSTACK (yylen); 10247 yylen = 0; 10248 YY_STACK_PRINT (yyss, yyssp); 10249 yystate = *yyssp; 10250 goto yyerrlab1; 10251 10252 10253 /*-------------------------------------------------------------. 10254 | yyerrlab1 -- common code for both syntax error and YYERROR. | 10255 `-------------------------------------------------------------*/ 10256 yyerrlab1: 10257 yyerrstatus = 3; /* Each real token shifted decrements this. */ 10258 10259 for (;;) 10260 { 10261 yyn = yypact[yystate]; 10262 if (yyn != YYPACT_NINF) 10263 { 10264 yyn += YYTERROR; 10265 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 10266 { 10267 yyn = yytable[yyn]; 10268 if (0 < yyn) 10269 break; 10270 } 10271 } 10272 10273 /* Pop the current state because it cannot handle the error token. */ 10274 if (yyssp == yyss) 10275 YYABORT; 10276 10277 10278 yydestruct ("Error: popping", 10279 yystos[yystate], yyvsp, parser); 10280 YYPOPSTACK (1); 10281 yystate = *yyssp; 10282 YY_STACK_PRINT (yyss, yyssp); 10283 } 10284 10285 if (yyn == YYFINAL) 10286 YYACCEPT; 10287 10288 *++yyvsp = yylval; 10289 10290 10291 /* Shift the error token. */ 10292 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 10293 10294 yystate = yyn; 10295 goto yynewstate; 10296 10297 10298 /*-------------------------------------. 10299 | yyacceptlab -- YYACCEPT comes here. | 10300 `-------------------------------------*/ 10301 yyacceptlab: 10302 yyresult = 0; 10303 goto yyreturn; 10304 10305 /*-----------------------------------. 10306 | yyabortlab -- YYABORT comes here. | 10307 `-----------------------------------*/ 10308 yyabortlab: 10309 yyresult = 1; 10310 goto yyreturn; 10311 10312 #ifndef yyoverflow 10313 /*-------------------------------------------------. 10314 | yyexhaustedlab -- memory exhaustion comes here. | 10315 `-------------------------------------------------*/ 10316 yyexhaustedlab: 10317 parser_yyerror (parser, YY_("memory exhausted")); 10318 yyresult = 2; 10319 /* Fall through. */ 10320 #endif 10321 10322 yyreturn: 10323 if (yychar != YYEOF && yychar != YYEMPTY) 10324 yydestruct ("Cleanup: discarding lookahead", 10325 yytoken, &yylval, parser); 10326 /* Do not reclaim the symbols of the rule which action triggered 10327 this YYABORT or YYACCEPT. */ 10328 YYPOPSTACK (yylen); 10329 YY_STACK_PRINT (yyss, yyssp); 10330 while (yyssp != yyss) 10331 { 10332 yydestruct ("Cleanup: popping", 10333 yystos[*yyssp], yyvsp, parser); 10334 YYPOPSTACK (1); 10335 } 10336 #ifndef yyoverflow 10337 if (yyss != yyssa) 10338 YYSTACK_FREE (yyss); 10339 #endif 10340 #if YYERROR_VERBOSE 10341 if (yymsg != yymsgbuf) 10342 YYSTACK_FREE (yymsg); 10343 #endif 10344 /* Make sure YYID is used. */ 10345 return YYID (yyresult); 10346 } 10347 10348 10349 #line 4882 "ripper.y" 10350 10351 # undef parser 10352 # undef yylex 10353 # undef yylval 10354 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 10355 10356 static int parser_regx_options(struct parser_params*); 10357 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 10358 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 10359 static int parser_parse_string(struct parser_params*,NODE*); 10360 static int parser_here_document(struct parser_params*,NODE*); 10361 10362 10363 # define nextc() parser_nextc(parser) 10364 # define pushback(c) parser_pushback(parser, (c)) 10365 # define newtok() parser_newtok(parser) 10366 # define tokspace(n) parser_tokspace(parser, (n)) 10367 # define tokadd(c) parser_tokadd(parser, (c)) 10368 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 10369 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 10370 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 10371 # define regx_options() parser_regx_options(parser) 10372 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 10373 # define parse_string(n) parser_parse_string(parser,(n)) 10374 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 10375 # define here_document(n) parser_here_document(parser,(n)) 10376 # define heredoc_identifier() parser_heredoc_identifier(parser) 10377 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 10378 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 10379 10380 #ifndef RIPPER 10381 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 10382 # define set_yylval_num(x) (yylval.num = (x)) 10383 # define set_yylval_id(x) (yylval.id = (x)) 10384 # define set_yylval_name(x) (yylval.id = (x)) 10385 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 10386 # define set_yylval_node(x) (yylval.node = (x)) 10387 # define yylval_id() (yylval.id) 10388 #else 10389 static inline VALUE 10390 ripper_yylval_id(ID x) 10391 { 10392 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 10393 } 10394 # define set_yylval_str(x) (void)(x) 10395 # define set_yylval_num(x) (void)(x) 10396 # define set_yylval_id(x) (void)(x) 10397 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 10398 # define set_yylval_literal(x) (void)(x) 10399 # define set_yylval_node(x) (void)(x) 10400 # define yylval_id() yylval.id 10401 #endif 10402 10403 #ifndef RIPPER 10404 #define ripper_flush(p) (void)(p) 10405 #else 10406 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 10407 10408 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 10409 10410 static int 10411 ripper_has_scan_event(struct parser_params *parser) 10412 { 10413 10414 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 10415 return lex_p > parser->tokp; 10416 } 10417 10418 static VALUE 10419 ripper_scan_event_val(struct parser_params *parser, int t) 10420 { 10421 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 10422 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 10423 ripper_flush(parser); 10424 return rval; 10425 } 10426 10427 static void 10428 ripper_dispatch_scan_event(struct parser_params *parser, int t) 10429 { 10430 if (!ripper_has_scan_event(parser)) return; 10431 yylval_rval = ripper_scan_event_val(parser, t); 10432 } 10433 10434 static void 10435 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 10436 { 10437 if (!ripper_has_scan_event(parser)) return; 10438 (void)ripper_scan_event_val(parser, t); 10439 } 10440 10441 static void 10442 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 10443 { 10444 int saved_line = ruby_sourceline; 10445 const char *saved_tokp = parser->tokp; 10446 10447 ruby_sourceline = parser->delayed_line; 10448 parser->tokp = lex_pbeg + parser->delayed_col; 10449 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 10450 parser->delayed = Qnil; 10451 ruby_sourceline = saved_line; 10452 parser->tokp = saved_tokp; 10453 } 10454 #endif /* RIPPER */ 10455 10456 #include "ruby/regex.h" 10457 #include "ruby/util.h" 10458 10459 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 10460 since ours (we hope) works properly with all combinations of 10461 machines, compilers, `char' and `unsigned char' argument types. 10462 (Per Bothner suggested the basic approach.) */ 10463 #undef SIGN_EXTEND_CHAR 10464 #if __STDC__ 10465 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 10466 #else /* not __STDC__ */ 10467 /* As in Harbison and Steele. */ 10468 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 10469 #endif 10470 10471 #define parser_encoding_name() (parser->enc->name) 10472 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) 10473 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) 10474 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 10475 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) 10476 10477 #define parser_isascii() ISASCII(*(lex_p-1)) 10478 10479 #ifndef RIPPER 10480 static int 10481 token_info_get_column(struct parser_params *parser, const char *token) 10482 { 10483 int column = 1; 10484 const char *p, *pend = lex_p - strlen(token); 10485 for (p = lex_pbeg; p < pend; p++) { 10486 if (*p == '\t') { 10487 column = (((column - 1) / 8) + 1) * 8; 10488 } 10489 column++; 10490 } 10491 return column; 10492 } 10493 10494 static int 10495 token_info_has_nonspaces(struct parser_params *parser, const char *token) 10496 { 10497 const char *p, *pend = lex_p - strlen(token); 10498 for (p = lex_pbeg; p < pend; p++) { 10499 if (*p != ' ' && *p != '\t') { 10500 return 1; 10501 } 10502 } 10503 return 0; 10504 } 10505 10506 #undef token_info_push 10507 static void 10508 token_info_push(struct parser_params *parser, const char *token) 10509 { 10510 token_info *ptinfo; 10511 10512 if (!parser->parser_token_info_enabled) return; 10513 ptinfo = ALLOC(token_info); 10514 ptinfo->token = token; 10515 ptinfo->linenum = ruby_sourceline; 10516 ptinfo->column = token_info_get_column(parser, token); 10517 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 10518 ptinfo->next = parser->parser_token_info; 10519 10520 parser->parser_token_info = ptinfo; 10521 } 10522 10523 #undef token_info_pop 10524 static void 10525 token_info_pop(struct parser_params *parser, const char *token) 10526 { 10527 int linenum; 10528 token_info *ptinfo = parser->parser_token_info; 10529 10530 if (!ptinfo) return; 10531 parser->parser_token_info = ptinfo->next; 10532 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 10533 goto finish; 10534 } 10535 linenum = ruby_sourceline; 10536 if (linenum == ptinfo->linenum) { /* SKIP */ 10537 goto finish; 10538 } 10539 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 10540 goto finish; 10541 } 10542 if (parser->parser_token_info_enabled) { 10543 rb_compile_warn(ruby_sourcefile, linenum, 10544 "mismatched indentations at '%s' with '%s' at %d", 10545 token, ptinfo->token, ptinfo->linenum); 10546 } 10547 10548 finish: 10549 xfree(ptinfo); 10550 } 10551 #endif /* RIPPER */ 10552 10553 static int 10554 parser_yyerror(struct parser_params *parser, const char *msg) 10555 { 10556 #ifndef RIPPER 10557 const int max_line_margin = 30; 10558 const char *p, *pe; 10559 char *buf; 10560 long len; 10561 int i; 10562 10563 compile_error(PARSER_ARG "%s", msg); 10564 p = lex_p; 10565 while (lex_pbeg <= p) { 10566 if (*p == '\n') break; 10567 p--; 10568 } 10569 p++; 10570 10571 pe = lex_p; 10572 while (pe < lex_pend) { 10573 if (*pe == '\n') break; 10574 pe++; 10575 } 10576 10577 len = pe - p; 10578 if (len > 4) { 10579 char *p2; 10580 const char *pre = "", *post = ""; 10581 10582 if (len > max_line_margin * 2 + 10) { 10583 if (lex_p - p > max_line_margin) { 10584 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 10585 pre = "..."; 10586 } 10587 if (pe - lex_p > max_line_margin) { 10588 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 10589 post = "..."; 10590 } 10591 len = pe - p; 10592 } 10593 buf = ALLOCA_N(char, len+2); 10594 MEMCPY(buf, p, char, len); 10595 buf[len] = '\0'; 10596 rb_compile_error_append("%s%s%s", pre, buf, post); 10597 10598 i = (int)(lex_p - p); 10599 p2 = buf; pe = buf + len; 10600 10601 while (p2 < pe) { 10602 if (*p2 != '\t') *p2 = ' '; 10603 p2++; 10604 } 10605 buf[i] = '^'; 10606 buf[i+1] = '\0'; 10607 rb_compile_error_append("%s%s", pre, buf); 10608 } 10609 #else 10610 dispatch1(parse_error, STR_NEW2(msg)); 10611 #endif /* !RIPPER */ 10612 return 0; 10613 } 10614 10615 static void parser_prepare(struct parser_params *parser); 10616 10617 #ifndef RIPPER 10618 static VALUE 10619 debug_lines(const char *f) 10620 { 10621 ID script_lines; 10622 CONST_ID(script_lines, "SCRIPT_LINES__"); 10623 if (rb_const_defined_at(rb_cObject, script_lines)) { 10624 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 10625 if (TYPE(hash) == T_HASH) { 10626 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10627 VALUE lines = rb_ary_new(); 10628 rb_hash_aset(hash, fname, lines); 10629 return lines; 10630 } 10631 } 10632 return 0; 10633 } 10634 10635 static VALUE 10636 coverage(const char *f, int n) 10637 { 10638 VALUE coverages = rb_get_coverages(); 10639 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 10640 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10641 VALUE lines = rb_ary_new2(n); 10642 int i; 10643 RBASIC(lines)->klass = 0; 10644 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 10645 RARRAY(lines)->as.heap.len = n; 10646 rb_hash_aset(coverages, fname, lines); 10647 return lines; 10648 } 10649 return 0; 10650 } 10651 10652 static int 10653 e_option_supplied(struct parser_params *parser) 10654 { 10655 return strcmp(ruby_sourcefile, "-e") == 0; 10656 } 10657 10658 static VALUE 10659 yycompile0(VALUE arg, int tracing) 10660 { 10661 int n; 10662 NODE *tree; 10663 struct parser_params *parser = (struct parser_params *)arg; 10664 10665 if (!compile_for_eval && rb_safe_level() == 0) { 10666 ruby_debug_lines = debug_lines(ruby_sourcefile); 10667 if (ruby_debug_lines && ruby_sourceline > 0) { 10668 VALUE str = STR_NEW0(); 10669 n = ruby_sourceline; 10670 do { 10671 rb_ary_push(ruby_debug_lines, str); 10672 } while (--n); 10673 } 10674 10675 if (!e_option_supplied(parser)) { 10676 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); 10677 } 10678 } 10679 10680 parser_prepare(parser); 10681 deferred_nodes = 0; 10682 #ifndef RIPPER 10683 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 10684 #endif 10685 n = yyparse((void*)parser); 10686 ruby_debug_lines = 0; 10687 ruby_coverage = 0; 10688 compile_for_eval = 0; 10689 10690 lex_strterm = 0; 10691 lex_p = lex_pbeg = lex_pend = 0; 10692 lex_lastline = lex_nextline = 0; 10693 if (parser->nerr) { 10694 return 0; 10695 } 10696 tree = ruby_eval_tree; 10697 if (!tree) { 10698 tree = NEW_NIL(); 10699 } 10700 else if (ruby_eval_tree_begin) { 10701 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 10702 } 10703 return (VALUE)tree; 10704 } 10705 10706 static NODE* 10707 yycompile(struct parser_params *parser, const char *f, int line) 10708 { 10709 ruby_sourcefile = ruby_strdup(f); 10710 ruby_sourceline = line - 1; 10711 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE); 10712 } 10713 #endif /* !RIPPER */ 10714 10715 static rb_encoding * 10716 must_be_ascii_compatible(VALUE s) 10717 { 10718 rb_encoding *enc = rb_enc_get(s); 10719 if (!rb_enc_asciicompat(enc)) { 10720 rb_raise(rb_eArgError, "invalid source encoding"); 10721 } 10722 return enc; 10723 } 10724 10725 static VALUE 10726 lex_get_str(struct parser_params *parser, VALUE s) 10727 { 10728 char *beg, *end, *pend; 10729 rb_encoding *enc = must_be_ascii_compatible(s); 10730 10731 beg = RSTRING_PTR(s); 10732 if (lex_gets_ptr) { 10733 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 10734 beg += lex_gets_ptr; 10735 } 10736 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 10737 end = beg; 10738 while (end < pend) { 10739 if (*end++ == '\n') break; 10740 } 10741 lex_gets_ptr = end - RSTRING_PTR(s); 10742 return rb_enc_str_new(beg, end - beg, enc); 10743 } 10744 10745 static VALUE 10746 lex_getline(struct parser_params *parser) 10747 { 10748 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 10749 if (NIL_P(line)) return line; 10750 must_be_ascii_compatible(line); 10751 #ifndef RIPPER 10752 if (ruby_debug_lines) { 10753 rb_enc_associate(line, parser->enc); 10754 rb_ary_push(ruby_debug_lines, line); 10755 } 10756 if (ruby_coverage) { 10757 rb_ary_push(ruby_coverage, Qnil); 10758 } 10759 #endif 10760 return line; 10761 } 10762 10763 #ifdef RIPPER 10764 static rb_data_type_t parser_data_type; 10765 #else 10766 static const rb_data_type_t parser_data_type; 10767 10768 static NODE* 10769 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 10770 { 10771 struct parser_params *parser; 10772 NODE *node; 10773 volatile VALUE tmp; 10774 10775 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 10776 lex_gets = lex_get_str; 10777 lex_gets_ptr = 0; 10778 lex_input = s; 10779 lex_pbeg = lex_p = lex_pend = 0; 10780 compile_for_eval = rb_parse_in_eval(); 10781 10782 node = yycompile(parser, f, line); 10783 tmp = vparser; /* prohibit tail call optimization */ 10784 10785 return node; 10786 } 10787 10788 NODE* 10789 rb_compile_string(const char *f, VALUE s, int line) 10790 { 10791 must_be_ascii_compatible(s); 10792 return parser_compile_string(rb_parser_new(), f, s, line); 10793 } 10794 10795 NODE* 10796 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 10797 { 10798 must_be_ascii_compatible(s); 10799 return parser_compile_string(vparser, f, s, line); 10800 } 10801 10802 NODE* 10803 rb_compile_cstr(const char *f, const char *s, int len, int line) 10804 { 10805 VALUE str = rb_str_new(s, len); 10806 return parser_compile_string(rb_parser_new(), f, str, line); 10807 } 10808 10809 NODE* 10810 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 10811 { 10812 VALUE str = rb_str_new(s, len); 10813 return parser_compile_string(vparser, f, str, line); 10814 } 10815 10816 static VALUE 10817 lex_io_gets(struct parser_params *parser, VALUE io) 10818 { 10819 return rb_io_gets(io); 10820 } 10821 10822 NODE* 10823 rb_compile_file(const char *f, VALUE file, int start) 10824 { 10825 VALUE volatile vparser = rb_parser_new(); 10826 10827 return rb_parser_compile_file(vparser, f, file, start); 10828 } 10829 10830 NODE* 10831 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 10832 { 10833 struct parser_params *parser; 10834 volatile VALUE tmp; 10835 NODE *node; 10836 10837 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 10838 lex_gets = lex_io_gets; 10839 lex_input = file; 10840 lex_pbeg = lex_p = lex_pend = 0; 10841 compile_for_eval = rb_parse_in_eval(); 10842 10843 node = yycompile(parser, f, start); 10844 tmp = vparser; /* prohibit tail call optimization */ 10845 10846 return node; 10847 } 10848 #endif /* !RIPPER */ 10849 10850 #define STR_FUNC_ESCAPE 0x01 10851 #define STR_FUNC_EXPAND 0x02 10852 #define STR_FUNC_REGEXP 0x04 10853 #define STR_FUNC_QWORDS 0x08 10854 #define STR_FUNC_SYMBOL 0x10 10855 #define STR_FUNC_INDENT 0x20 10856 10857 enum string_type { 10858 str_squote = (0), 10859 str_dquote = (STR_FUNC_EXPAND), 10860 str_xquote = (STR_FUNC_EXPAND), 10861 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 10862 str_sword = (STR_FUNC_QWORDS), 10863 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 10864 str_ssym = (STR_FUNC_SYMBOL), 10865 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 10866 }; 10867 10868 static VALUE 10869 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 10870 { 10871 VALUE str; 10872 10873 str = rb_enc_str_new(p, n, enc); 10874 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 10875 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 10876 } 10877 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 10878 rb_enc_associate(str, rb_ascii8bit_encoding()); 10879 } 10880 } 10881 10882 return str; 10883 } 10884 10885 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 10886 #define lex_eol_p() (lex_p >= lex_pend) 10887 #define peek(c) peek_n((c), 0) 10888 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 10889 10890 static inline int 10891 parser_nextc(struct parser_params *parser) 10892 { 10893 int c; 10894 10895 if (lex_p == lex_pend) { 10896 VALUE v = lex_nextline; 10897 lex_nextline = 0; 10898 if (!v) { 10899 if (parser->eofp) 10900 return -1; 10901 10902 if (!lex_input || NIL_P(v = lex_getline(parser))) { 10903 parser->eofp = Qtrue; 10904 lex_goto_eol(parser); 10905 return -1; 10906 } 10907 } 10908 { 10909 #ifdef RIPPER 10910 if (parser->tokp < lex_pend) { 10911 if (NIL_P(parser->delayed)) { 10912 parser->delayed = rb_str_buf_new(1024); 10913 rb_enc_associate(parser->delayed, parser->enc); 10914 rb_str_buf_cat(parser->delayed, 10915 parser->tokp, lex_pend - parser->tokp); 10916 parser->delayed_line = ruby_sourceline; 10917 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 10918 } 10919 else { 10920 rb_str_buf_cat(parser->delayed, 10921 parser->tokp, lex_pend - parser->tokp); 10922 } 10923 } 10924 #endif 10925 if (heredoc_end > 0) { 10926 ruby_sourceline = heredoc_end; 10927 heredoc_end = 0; 10928 } 10929 ruby_sourceline++; 10930 parser->line_count++; 10931 lex_pbeg = lex_p = RSTRING_PTR(v); 10932 lex_pend = lex_p + RSTRING_LEN(v); 10933 ripper_flush(parser); 10934 lex_lastline = v; 10935 } 10936 } 10937 c = (unsigned char)*lex_p++; 10938 if (c == '\r' && peek('\n')) { 10939 lex_p++; 10940 c = '\n'; 10941 } 10942 10943 return c; 10944 } 10945 10946 static void 10947 parser_pushback(struct parser_params *parser, int c) 10948 { 10949 if (c == -1) return; 10950 lex_p--; 10951 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 10952 lex_p--; 10953 } 10954 } 10955 10956 #define was_bol() (lex_p == lex_pbeg + 1) 10957 10958 #define tokfix() (tokenbuf[tokidx]='\0') 10959 #define tok() tokenbuf 10960 #define toklen() tokidx 10961 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 10962 10963 static char* 10964 parser_newtok(struct parser_params *parser) 10965 { 10966 tokidx = 0; 10967 if (!tokenbuf) { 10968 toksiz = 60; 10969 tokenbuf = ALLOC_N(char, 60); 10970 } 10971 if (toksiz > 4096) { 10972 toksiz = 60; 10973 REALLOC_N(tokenbuf, char, 60); 10974 } 10975 return tokenbuf; 10976 } 10977 10978 static char * 10979 parser_tokspace(struct parser_params *parser, int n) 10980 { 10981 tokidx += n; 10982 10983 if (tokidx >= toksiz) { 10984 do {toksiz *= 2;} while (toksiz < tokidx); 10985 REALLOC_N(tokenbuf, char, toksiz); 10986 } 10987 return &tokenbuf[tokidx-n]; 10988 } 10989 10990 static void 10991 parser_tokadd(struct parser_params *parser, int c) 10992 { 10993 tokenbuf[tokidx++] = (char)c; 10994 if (tokidx >= toksiz) { 10995 toksiz *= 2; 10996 REALLOC_N(tokenbuf, char, toksiz); 10997 } 10998 } 10999 11000 static int 11001 parser_tok_hex(struct parser_params *parser, size_t *numlen) 11002 { 11003 int c; 11004 11005 c = scan_hex(lex_p, 2, numlen); 11006 if (!*numlen) { 11007 yyerror("invalid hex escape"); 11008 return 0; 11009 } 11010 lex_p += *numlen; 11011 return c; 11012 } 11013 11014 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 11015 11016 static int 11017 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 11018 int string_literal, int symbol_literal, int regexp_literal) 11019 { 11020 /* 11021 * If string_literal is true, then we allow multiple codepoints 11022 * in \u{}, and add the codepoints to the current token. 11023 * Otherwise we're parsing a character literal and return a single 11024 * codepoint without adding it 11025 */ 11026 11027 int codepoint; 11028 size_t numlen; 11029 11030 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 11031 11032 if (peek('{')) { /* handle \u{...} form */ 11033 do { 11034 if (regexp_literal) { tokadd(*lex_p); } 11035 nextc(); 11036 codepoint = scan_hex(lex_p, 6, &numlen); 11037 if (numlen == 0) { 11038 yyerror("invalid Unicode escape"); 11039 return 0; 11040 } 11041 if (codepoint > 0x10ffff) { 11042 yyerror("invalid Unicode codepoint (too large)"); 11043 return 0; 11044 } 11045 lex_p += numlen; 11046 if (regexp_literal) { 11047 tokcopy((int)numlen); 11048 } 11049 else if (codepoint >= 0x80) { 11050 *encp = UTF8_ENC(); 11051 if (string_literal) tokaddmbc(codepoint, *encp); 11052 } 11053 else if (string_literal) { 11054 tokadd(codepoint); 11055 } 11056 } while (string_literal && (peek(' ') || peek('\t'))); 11057 11058 if (!peek('}')) { 11059 yyerror("unterminated Unicode escape"); 11060 return 0; 11061 } 11062 11063 if (regexp_literal) { tokadd('}'); } 11064 nextc(); 11065 } 11066 else { /* handle \uxxxx form */ 11067 codepoint = scan_hex(lex_p, 4, &numlen); 11068 if (numlen < 4) { 11069 yyerror("invalid Unicode escape"); 11070 return 0; 11071 } 11072 lex_p += 4; 11073 if (regexp_literal) { 11074 tokcopy(4); 11075 } 11076 else if (codepoint >= 0x80) { 11077 *encp = UTF8_ENC(); 11078 if (string_literal) tokaddmbc(codepoint, *encp); 11079 } 11080 else if (string_literal) { 11081 tokadd(codepoint); 11082 } 11083 } 11084 11085 return codepoint; 11086 } 11087 11088 #define ESCAPE_CONTROL 1 11089 #define ESCAPE_META 2 11090 11091 static int 11092 parser_read_escape(struct parser_params *parser, int flags, 11093 rb_encoding **encp) 11094 { 11095 int c; 11096 size_t numlen; 11097 11098 switch (c = nextc()) { 11099 case '\\': /* Backslash */ 11100 return c; 11101 11102 case 'n': /* newline */ 11103 return '\n'; 11104 11105 case 't': /* horizontal tab */ 11106 return '\t'; 11107 11108 case 'r': /* carriage-return */ 11109 return '\r'; 11110 11111 case 'f': /* form-feed */ 11112 return '\f'; 11113 11114 case 'v': /* vertical tab */ 11115 return '\13'; 11116 11117 case 'a': /* alarm(bell) */ 11118 return '\007'; 11119 11120 case 'e': /* escape */ 11121 return 033; 11122 11123 case '0': case '1': case '2': case '3': /* octal constant */ 11124 case '4': case '5': case '6': case '7': 11125 pushback(c); 11126 c = scan_oct(lex_p, 3, &numlen); 11127 lex_p += numlen; 11128 return c; 11129 11130 case 'x': /* hex constant */ 11131 c = tok_hex(&numlen); 11132 if (numlen == 0) return 0; 11133 return c; 11134 11135 case 'b': /* backspace */ 11136 return '\010'; 11137 11138 case 's': /* space */ 11139 return ' '; 11140 11141 case 'M': 11142 if (flags & ESCAPE_META) goto eof; 11143 if ((c = nextc()) != '-') { 11144 pushback(c); 11145 goto eof; 11146 } 11147 if ((c = nextc()) == '\\') { 11148 if (peek('u')) goto eof; 11149 return read_escape(flags|ESCAPE_META, encp) | 0x80; 11150 } 11151 else if (c == -1 || !ISASCII(c)) goto eof; 11152 else { 11153 return ((c & 0xff) | 0x80); 11154 } 11155 11156 case 'C': 11157 if ((c = nextc()) != '-') { 11158 pushback(c); 11159 goto eof; 11160 } 11161 case 'c': 11162 if (flags & ESCAPE_CONTROL) goto eof; 11163 if ((c = nextc())== '\\') { 11164 if (peek('u')) goto eof; 11165 c = read_escape(flags|ESCAPE_CONTROL, encp); 11166 } 11167 else if (c == '?') 11168 return 0177; 11169 else if (c == -1 || !ISASCII(c)) goto eof; 11170 return c & 0x9f; 11171 11172 eof: 11173 case -1: 11174 yyerror("Invalid escape character syntax"); 11175 return '\0'; 11176 11177 default: 11178 return c; 11179 } 11180 } 11181 11182 static void 11183 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 11184 { 11185 int len = rb_enc_codelen(c, enc); 11186 rb_enc_mbcput(c, tokspace(len), enc); 11187 } 11188 11189 static int 11190 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 11191 { 11192 int c; 11193 int flags = 0; 11194 size_t numlen; 11195 11196 first: 11197 switch (c = nextc()) { 11198 case '\n': 11199 return 0; /* just ignore */ 11200 11201 case '0': case '1': case '2': case '3': /* octal constant */ 11202 case '4': case '5': case '6': case '7': 11203 { 11204 ruby_scan_oct(--lex_p, 3, &numlen); 11205 if (numlen == 0) goto eof; 11206 lex_p += numlen; 11207 tokcopy((int)numlen + 1); 11208 } 11209 return 0; 11210 11211 case 'x': /* hex constant */ 11212 { 11213 tok_hex(&numlen); 11214 if (numlen == 0) return -1; 11215 tokcopy((int)numlen + 2); 11216 } 11217 return 0; 11218 11219 case 'M': 11220 if (flags & ESCAPE_META) goto eof; 11221 if ((c = nextc()) != '-') { 11222 pushback(c); 11223 goto eof; 11224 } 11225 tokcopy(3); 11226 flags |= ESCAPE_META; 11227 goto escaped; 11228 11229 case 'C': 11230 if (flags & ESCAPE_CONTROL) goto eof; 11231 if ((c = nextc()) != '-') { 11232 pushback(c); 11233 goto eof; 11234 } 11235 tokcopy(3); 11236 goto escaped; 11237 11238 case 'c': 11239 if (flags & ESCAPE_CONTROL) goto eof; 11240 tokcopy(2); 11241 flags |= ESCAPE_CONTROL; 11242 escaped: 11243 if ((c = nextc()) == '\\') { 11244 goto first; 11245 } 11246 else if (c == -1) goto eof; 11247 tokadd(c); 11248 return 0; 11249 11250 eof: 11251 case -1: 11252 yyerror("Invalid escape character syntax"); 11253 return -1; 11254 11255 default: 11256 tokadd('\\'); 11257 tokadd(c); 11258 } 11259 return 0; 11260 } 11261 11262 static int 11263 parser_regx_options(struct parser_params *parser) 11264 { 11265 int kcode = 0; 11266 int kopt = 0; 11267 int options = 0; 11268 int c, opt, kc; 11269 11270 newtok(); 11271 while (c = nextc(), ISALPHA(c)) { 11272 if (c == 'o') { 11273 options |= RE_OPTION_ONCE; 11274 } 11275 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 11276 if (kc >= 0) { 11277 if (kc != rb_ascii8bit_encindex()) kcode = c; 11278 kopt = opt; 11279 } 11280 else { 11281 options |= opt; 11282 } 11283 } 11284 else { 11285 tokadd(c); 11286 } 11287 } 11288 options |= kopt; 11289 pushback(c); 11290 if (toklen()) { 11291 tokfix(); 11292 compile_error(PARSER_ARG "unknown regexp option%s - %s", 11293 toklen() > 1 ? "s" : "", tok()); 11294 } 11295 return options | RE_OPTION_ENCODING(kcode); 11296 } 11297 11298 static void 11299 dispose_string(VALUE str) 11300 { 11301 /* TODO: should use another API? */ 11302 if (RBASIC(str)->flags & RSTRING_NOEMBED) 11303 xfree(RSTRING_PTR(str)); 11304 rb_gc_force_recycle(str); 11305 } 11306 11307 static int 11308 parser_tokadd_mbchar(struct parser_params *parser, int c) 11309 { 11310 int len = parser_precise_mbclen(); 11311 if (!MBCLEN_CHARFOUND_P(len)) { 11312 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 11313 return -1; 11314 } 11315 tokadd(c); 11316 lex_p += --len; 11317 if (len > 0) tokcopy(len); 11318 return c; 11319 } 11320 11321 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 11322 11323 static int 11324 parser_tokadd_string(struct parser_params *parser, 11325 int func, int term, int paren, long *nest, 11326 rb_encoding **encp) 11327 { 11328 int c; 11329 int has_nonascii = 0; 11330 rb_encoding *enc = *encp; 11331 char *errbuf = 0; 11332 static const char mixed_msg[] = "%s mixed within %s source"; 11333 11334 #define mixed_error(enc1, enc2) if (!errbuf) { \ 11335 size_t len = sizeof(mixed_msg) - 4; \ 11336 len += strlen(rb_enc_name(enc1)); \ 11337 len += strlen(rb_enc_name(enc2)); \ 11338 errbuf = ALLOCA_N(char, len); \ 11339 snprintf(errbuf, len, mixed_msg, \ 11340 rb_enc_name(enc1), \ 11341 rb_enc_name(enc2)); \ 11342 yyerror(errbuf); \ 11343 } 11344 #define mixed_escape(beg, enc1, enc2) do { \ 11345 const char *pos = lex_p; \ 11346 lex_p = (beg); \ 11347 mixed_error((enc1), (enc2)); \ 11348 lex_p = pos; \ 11349 } while (0) 11350 11351 while ((c = nextc()) != -1) { 11352 if (paren && c == paren) { 11353 ++*nest; 11354 } 11355 else if (c == term) { 11356 if (!nest || !*nest) { 11357 pushback(c); 11358 break; 11359 } 11360 --*nest; 11361 } 11362 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 11363 int c2 = *lex_p; 11364 if (c2 == '$' || c2 == '@' || c2 == '{') { 11365 pushback(c); 11366 break; 11367 } 11368 } 11369 else if (c == '\\') { 11370 const char *beg = lex_p - 1; 11371 c = nextc(); 11372 switch (c) { 11373 case '\n': 11374 if (func & STR_FUNC_QWORDS) break; 11375 if (func & STR_FUNC_EXPAND) continue; 11376 tokadd('\\'); 11377 break; 11378 11379 case '\\': 11380 if (func & STR_FUNC_ESCAPE) tokadd(c); 11381 break; 11382 11383 case 'u': 11384 if ((func & STR_FUNC_EXPAND) == 0) { 11385 tokadd('\\'); 11386 break; 11387 } 11388 parser_tokadd_utf8(parser, &enc, 1, 11389 func & STR_FUNC_SYMBOL, 11390 func & STR_FUNC_REGEXP); 11391 if (has_nonascii && enc != *encp) { 11392 mixed_escape(beg, enc, *encp); 11393 } 11394 continue; 11395 11396 default: 11397 if (c == -1) return -1; 11398 if (!ISASCII(c)) { 11399 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 11400 goto non_ascii; 11401 } 11402 if (func & STR_FUNC_REGEXP) { 11403 pushback(c); 11404 if ((c = tokadd_escape(&enc)) < 0) 11405 return -1; 11406 if (has_nonascii && enc != *encp) { 11407 mixed_escape(beg, enc, *encp); 11408 } 11409 continue; 11410 } 11411 else if (func & STR_FUNC_EXPAND) { 11412 pushback(c); 11413 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 11414 c = read_escape(0, &enc); 11415 } 11416 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11417 /* ignore backslashed spaces in %w */ 11418 } 11419 else if (c != term && !(paren && c == paren)) { 11420 tokadd('\\'); 11421 pushback(c); 11422 continue; 11423 } 11424 } 11425 } 11426 else if (!parser_isascii()) { 11427 non_ascii: 11428 has_nonascii = 1; 11429 if (enc != *encp) { 11430 mixed_error(enc, *encp); 11431 continue; 11432 } 11433 if (tokadd_mbchar(c) == -1) return -1; 11434 continue; 11435 } 11436 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11437 pushback(c); 11438 break; 11439 } 11440 if (c & 0x80) { 11441 has_nonascii = 1; 11442 if (enc != *encp) { 11443 mixed_error(enc, *encp); 11444 continue; 11445 } 11446 } 11447 tokadd(c); 11448 } 11449 *encp = enc; 11450 return c; 11451 } 11452 11453 #define NEW_STRTERM(func, term, paren) \ 11454 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 11455 11456 static int 11457 parser_parse_string(struct parser_params *parser, NODE *quote) 11458 { 11459 int func = (int)quote->nd_func; 11460 int term = nd_term(quote); 11461 int paren = nd_paren(quote); 11462 int c, space = 0; 11463 rb_encoding *enc = parser->enc; 11464 11465 if (func == -1) return tSTRING_END; 11466 c = nextc(); 11467 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11468 do {c = nextc();} while (ISSPACE(c)); 11469 space = 1; 11470 } 11471 if (c == term && !quote->nd_nest) { 11472 if (func & STR_FUNC_QWORDS) { 11473 quote->nd_func = -1; 11474 return ' '; 11475 } 11476 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 11477 set_yylval_num(regx_options()); 11478 return tREGEXP_END; 11479 } 11480 if (space) { 11481 pushback(c); 11482 return ' '; 11483 } 11484 newtok(); 11485 if ((func & STR_FUNC_EXPAND) && c == '#') { 11486 switch (c = nextc()) { 11487 case '$': 11488 case '@': 11489 pushback(c); 11490 return tSTRING_DVAR; 11491 case '{': 11492 return tSTRING_DBEG; 11493 } 11494 tokadd('#'); 11495 } 11496 pushback(c); 11497 if (tokadd_string(func, term, paren, "e->nd_nest, 11498 &enc) == -1) { 11499 ruby_sourceline = nd_line(quote); 11500 if (func & STR_FUNC_REGEXP) { 11501 if (parser->eofp) 11502 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 11503 return tREGEXP_END; 11504 } 11505 else { 11506 if (parser->eofp) 11507 compile_error(PARSER_ARG "unterminated string meets end of file"); 11508 return tSTRING_END; 11509 } 11510 } 11511 11512 tokfix(); 11513 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 11514 11515 #ifdef RIPPER 11516 if (!NIL_P(parser->delayed)) { 11517 ptrdiff_t len = lex_p - parser->tokp; 11518 if (len > 0) { 11519 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 11520 } 11521 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11522 parser->tokp = lex_p; 11523 } 11524 #endif 11525 11526 return tSTRING_CONTENT; 11527 } 11528 11529 static int 11530 parser_heredoc_identifier(struct parser_params *parser) 11531 { 11532 int c = nextc(), term, func = 0; 11533 long len; 11534 11535 if (c == '-') { 11536 c = nextc(); 11537 func = STR_FUNC_INDENT; 11538 } 11539 switch (c) { 11540 case '\'': 11541 func |= str_squote; goto quoted; 11542 case '"': 11543 func |= str_dquote; goto quoted; 11544 case '`': 11545 func |= str_xquote; 11546 quoted: 11547 newtok(); 11548 tokadd(func); 11549 term = c; 11550 while ((c = nextc()) != -1 && c != term) { 11551 if (tokadd_mbchar(c) == -1) return 0; 11552 } 11553 if (c == -1) { 11554 compile_error(PARSER_ARG "unterminated here document identifier"); 11555 return 0; 11556 } 11557 break; 11558 11559 default: 11560 if (!parser_is_identchar()) { 11561 pushback(c); 11562 if (func & STR_FUNC_INDENT) { 11563 pushback('-'); 11564 } 11565 return 0; 11566 } 11567 newtok(); 11568 term = '"'; 11569 tokadd(func |= str_dquote); 11570 do { 11571 if (tokadd_mbchar(c) == -1) return 0; 11572 } while ((c = nextc()) != -1 && parser_is_identchar()); 11573 pushback(c); 11574 break; 11575 } 11576 11577 tokfix(); 11578 #ifdef RIPPER 11579 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 11580 #endif 11581 len = lex_p - lex_pbeg; 11582 lex_goto_eol(parser); 11583 lex_strterm = rb_node_newnode(NODE_HEREDOC, 11584 STR_NEW(tok(), toklen()), /* nd_lit */ 11585 len, /* nd_nth */ 11586 lex_lastline); /* nd_orig */ 11587 nd_set_line(lex_strterm, ruby_sourceline); 11588 ripper_flush(parser); 11589 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 11590 } 11591 11592 static void 11593 parser_heredoc_restore(struct parser_params *parser, NODE *here) 11594 { 11595 VALUE line; 11596 11597 line = here->nd_orig; 11598 lex_lastline = line; 11599 lex_pbeg = RSTRING_PTR(line); 11600 lex_pend = lex_pbeg + RSTRING_LEN(line); 11601 lex_p = lex_pbeg + here->nd_nth; 11602 heredoc_end = ruby_sourceline; 11603 ruby_sourceline = nd_line(here); 11604 dispose_string(here->nd_lit); 11605 rb_gc_force_recycle((VALUE)here); 11606 ripper_flush(parser); 11607 } 11608 11609 static int 11610 parser_whole_match_p(struct parser_params *parser, 11611 const char *eos, long len, int indent) 11612 { 11613 const char *p = lex_pbeg; 11614 long n; 11615 11616 if (indent) { 11617 while (*p && ISSPACE(*p)) p++; 11618 } 11619 n = lex_pend - (p + len); 11620 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 11621 return strncmp(eos, p, len) == 0; 11622 } 11623 11624 #ifdef RIPPER 11625 static void 11626 ripper_dispatch_heredoc_end(struct parser_params *parser) 11627 { 11628 if (!NIL_P(parser->delayed)) 11629 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11630 lex_goto_eol(parser); 11631 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 11632 } 11633 11634 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 11635 #else 11636 #define dispatch_heredoc_end() ((void)0) 11637 #endif 11638 11639 static int 11640 parser_here_document(struct parser_params *parser, NODE *here) 11641 { 11642 int c, func, indent = 0; 11643 const char *eos, *p, *pend; 11644 long len; 11645 VALUE str = 0; 11646 rb_encoding *enc = parser->enc; 11647 11648 eos = RSTRING_PTR(here->nd_lit); 11649 len = RSTRING_LEN(here->nd_lit) - 1; 11650 indent = (func = *eos++) & STR_FUNC_INDENT; 11651 11652 if ((c = nextc()) == -1) { 11653 error: 11654 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 11655 #ifdef RIPPER 11656 if (NIL_P(parser->delayed)) { 11657 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 11658 } 11659 else { 11660 if (str || 11661 ((len = lex_p - parser->tokp) > 0 && 11662 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 11663 rb_str_append(parser->delayed, str); 11664 } 11665 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11666 } 11667 lex_goto_eol(parser); 11668 #endif 11669 restore: 11670 heredoc_restore(lex_strterm); 11671 lex_strterm = 0; 11672 return 0; 11673 } 11674 if (was_bol() && whole_match_p(eos, len, indent)) { 11675 dispatch_heredoc_end(); 11676 heredoc_restore(lex_strterm); 11677 return tSTRING_END; 11678 } 11679 11680 if (!(func & STR_FUNC_EXPAND)) { 11681 do { 11682 p = RSTRING_PTR(lex_lastline); 11683 pend = lex_pend; 11684 if (pend > p) { 11685 switch (pend[-1]) { 11686 case '\n': 11687 if (--pend == p || pend[-1] != '\r') { 11688 pend++; 11689 break; 11690 } 11691 case '\r': 11692 --pend; 11693 } 11694 } 11695 if (str) 11696 rb_str_cat(str, p, pend - p); 11697 else 11698 str = STR_NEW(p, pend - p); 11699 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 11700 lex_goto_eol(parser); 11701 if (nextc() == -1) { 11702 if (str) dispose_string(str); 11703 goto error; 11704 } 11705 } while (!whole_match_p(eos, len, indent)); 11706 } 11707 else { 11708 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 11709 newtok(); 11710 if (c == '#') { 11711 switch (c = nextc()) { 11712 case '$': 11713 case '@': 11714 pushback(c); 11715 return tSTRING_DVAR; 11716 case '{': 11717 return tSTRING_DBEG; 11718 } 11719 tokadd('#'); 11720 } 11721 do { 11722 pushback(c); 11723 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 11724 if (parser->eofp) goto error; 11725 goto restore; 11726 } 11727 if (c != '\n') { 11728 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 11729 return tSTRING_CONTENT; 11730 } 11731 tokadd(nextc()); 11732 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 11733 if ((c = nextc()) == -1) goto error; 11734 } while (!whole_match_p(eos, len, indent)); 11735 str = STR_NEW3(tok(), toklen(), enc, func); 11736 } 11737 dispatch_heredoc_end(); 11738 heredoc_restore(lex_strterm); 11739 lex_strterm = NEW_STRTERM(-1, 0, 0); 11740 set_yylval_str(str); 11741 return tSTRING_CONTENT; 11742 } 11743 11744 #include "lex.c" 11745 11746 static void 11747 arg_ambiguous_gen(struct parser_params *parser) 11748 { 11749 #ifndef RIPPER 11750 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 11751 #else 11752 dispatch0(arg_ambiguous); 11753 #endif 11754 } 11755 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 11756 11757 static ID 11758 formal_argument_gen(struct parser_params *parser, ID lhs) 11759 { 11760 #ifndef RIPPER 11761 if (!is_local_id(lhs)) 11762 yyerror("formal argument must be local variable"); 11763 #endif 11764 shadowing_lvar(lhs); 11765 return lhs; 11766 } 11767 11768 static int 11769 lvar_defined_gen(struct parser_params *parser, ID id) 11770 { 11771 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 11772 } 11773 11774 /* emacsen -*- hack */ 11775 static long 11776 parser_encode_length(struct parser_params *parser, const char *name, long len) 11777 { 11778 long nlen; 11779 11780 if (len > 5 && name[nlen = len - 5] == '-') { 11781 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 11782 return nlen; 11783 } 11784 if (len > 4 && name[nlen = len - 4] == '-') { 11785 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 11786 return nlen; 11787 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 11788 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 11789 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 11790 return nlen; 11791 } 11792 return len; 11793 } 11794 11795 static void 11796 parser_set_encode(struct parser_params *parser, const char *name) 11797 { 11798 int idx = rb_enc_find_index(name); 11799 rb_encoding *enc; 11800 VALUE excargs[3]; 11801 11802 if (idx < 0) { 11803 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 11804 error: 11805 excargs[0] = rb_eArgError; 11806 excargs[2] = rb_make_backtrace(); 11807 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 11808 rb_exc_raise(rb_make_exception(3, excargs)); 11809 } 11810 enc = rb_enc_from_index(idx); 11811 if (!rb_enc_asciicompat(enc)) { 11812 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 11813 goto error; 11814 } 11815 parser->enc = enc; 11816 #ifndef RIPPER 11817 if (ruby_debug_lines) { 11818 long i, n = RARRAY_LEN(ruby_debug_lines); 11819 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 11820 for (i = 0; i < n; ++i) { 11821 rb_enc_associate_index(*p, idx); 11822 } 11823 } 11824 #endif 11825 } 11826 11827 static int 11828 comment_at_top(struct parser_params *parser) 11829 { 11830 const char *p = lex_pbeg, *pend = lex_p - 1; 11831 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 11832 while (p < pend) { 11833 if (!ISSPACE(*p)) return 0; 11834 p++; 11835 } 11836 return 1; 11837 } 11838 11839 #ifndef RIPPER 11840 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 11841 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 11842 11843 static void 11844 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 11845 { 11846 if (!comment_at_top(parser)) { 11847 return; 11848 } 11849 parser_set_encode(parser, val); 11850 } 11851 11852 static void 11853 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 11854 { 11855 int *p = &parser->parser_token_info_enabled; 11856 11857 switch (*val) { 11858 case 't': case 'T': 11859 if (strcasecmp(val, "true") == 0) { 11860 *p = TRUE; 11861 return; 11862 } 11863 break; 11864 case 'f': case 'F': 11865 if (strcasecmp(val, "false") == 0) { 11866 *p = FALSE; 11867 return; 11868 } 11869 break; 11870 } 11871 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 11872 } 11873 11874 struct magic_comment { 11875 const char *name; 11876 rb_magic_comment_setter_t func; 11877 rb_magic_comment_length_t length; 11878 }; 11879 11880 static const struct magic_comment magic_comments[] = { 11881 {"coding", magic_comment_encoding, parser_encode_length}, 11882 {"encoding", magic_comment_encoding, parser_encode_length}, 11883 {"warn_indent", parser_set_token_info}, 11884 }; 11885 #endif 11886 11887 static const char * 11888 magic_comment_marker(const char *str, long len) 11889 { 11890 long i = 2; 11891 11892 while (i < len) { 11893 switch (str[i]) { 11894 case '-': 11895 if (str[i-1] == '*' && str[i-2] == '-') { 11896 return str + i + 1; 11897 } 11898 i += 2; 11899 break; 11900 case '*': 11901 if (i + 1 >= len) return 0; 11902 if (str[i+1] != '-') { 11903 i += 4; 11904 } 11905 else if (str[i-1] != '-') { 11906 i += 2; 11907 } 11908 else { 11909 return str + i + 2; 11910 } 11911 break; 11912 default: 11913 i += 3; 11914 break; 11915 } 11916 } 11917 return 0; 11918 } 11919 11920 static int 11921 parser_magic_comment(struct parser_params *parser, const char *str, long len) 11922 { 11923 VALUE name = 0, val = 0; 11924 const char *beg, *end, *vbeg, *vend; 11925 #define str_copy(_s, _p, _n) ((_s) \ 11926 ? (void)(rb_str_resize((_s), (_n)), \ 11927 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 11928 : (void)((_s) = STR_NEW((_p), (_n)))) 11929 11930 if (len <= 7) return FALSE; 11931 if (!(beg = magic_comment_marker(str, len))) return FALSE; 11932 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 11933 str = beg; 11934 len = end - beg - 3; 11935 11936 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 11937 while (len > 0) { 11938 #ifndef RIPPER 11939 const struct magic_comment *p = magic_comments; 11940 #endif 11941 char *s; 11942 int i; 11943 long n = 0; 11944 11945 for (; len > 0 && *str; str++, --len) { 11946 switch (*str) { 11947 case '\'': case '"': case ':': case ';': 11948 continue; 11949 } 11950 if (!ISSPACE(*str)) break; 11951 } 11952 for (beg = str; len > 0; str++, --len) { 11953 switch (*str) { 11954 case '\'': case '"': case ':': case ';': 11955 break; 11956 default: 11957 if (ISSPACE(*str)) break; 11958 continue; 11959 } 11960 break; 11961 } 11962 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 11963 if (!len) break; 11964 if (*str != ':') continue; 11965 11966 do str++; while (--len > 0 && ISSPACE(*str)); 11967 if (!len) break; 11968 if (*str == '"') { 11969 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 11970 if (*str == '\\') { 11971 --len; 11972 ++str; 11973 } 11974 } 11975 vend = str; 11976 if (len) { 11977 --len; 11978 ++str; 11979 } 11980 } 11981 else { 11982 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 11983 vend = str; 11984 } 11985 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 11986 11987 n = end - beg; 11988 str_copy(name, beg, n); 11989 s = RSTRING_PTR(name); 11990 for (i = 0; i < n; ++i) { 11991 if (s[i] == '-') s[i] = '_'; 11992 } 11993 #ifndef RIPPER 11994 do { 11995 if (STRNCASECMP(p->name, s, n) == 0) { 11996 n = vend - vbeg; 11997 if (p->length) { 11998 n = (*p->length)(parser, vbeg, n); 11999 } 12000 str_copy(val, vbeg, n); 12001 (*p->func)(parser, s, RSTRING_PTR(val)); 12002 break; 12003 } 12004 } while (++p < magic_comments + numberof(magic_comments)); 12005 #else 12006 dispatch2(magic_comment, name, val); 12007 #endif 12008 } 12009 12010 return TRUE; 12011 } 12012 12013 static void 12014 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 12015 { 12016 int sep = 0; 12017 const char *beg = str; 12018 VALUE s; 12019 12020 for (;;) { 12021 if (send - str <= 6) return; 12022 switch (str[6]) { 12023 case 'C': case 'c': str += 6; continue; 12024 case 'O': case 'o': str += 5; continue; 12025 case 'D': case 'd': str += 4; continue; 12026 case 'I': case 'i': str += 3; continue; 12027 case 'N': case 'n': str += 2; continue; 12028 case 'G': case 'g': str += 1; continue; 12029 case '=': case ':': 12030 sep = 1; 12031 str += 6; 12032 break; 12033 default: 12034 str += 6; 12035 if (ISSPACE(*str)) break; 12036 continue; 12037 } 12038 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 12039 } 12040 for (;;) { 12041 do { 12042 if (++str >= send) return; 12043 } while (ISSPACE(*str)); 12044 if (sep) break; 12045 if (*str != '=' && *str != ':') return; 12046 sep = 1; 12047 str++; 12048 } 12049 beg = str; 12050 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 12051 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 12052 parser_set_encode(parser, RSTRING_PTR(s)); 12053 rb_str_resize(s, 0); 12054 } 12055 12056 static void 12057 parser_prepare(struct parser_params *parser) 12058 { 12059 int c = nextc(); 12060 switch (c) { 12061 case '#': 12062 if (peek('!')) parser->has_shebang = 1; 12063 break; 12064 case 0xef: /* UTF-8 BOM marker */ 12065 if (lex_pend - lex_p >= 2 && 12066 (unsigned char)lex_p[0] == 0xbb && 12067 (unsigned char)lex_p[1] == 0xbf) { 12068 parser->enc = rb_utf8_encoding(); 12069 lex_p += 2; 12070 lex_pbeg = lex_p; 12071 return; 12072 } 12073 break; 12074 case EOF: 12075 return; 12076 } 12077 pushback(c); 12078 parser->enc = rb_enc_get(lex_lastline); 12079 } 12080 12081 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) 12082 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) 12083 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) 12084 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 12085 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG()) 12086 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 12087 12088 #ifndef RIPPER 12089 #define ambiguous_operator(op, syn) ( \ 12090 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 12091 rb_warning0("even though it seems like "syn"")) 12092 #else 12093 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 12094 #endif 12095 #define warn_balanced(op, syn) ((void) \ 12096 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \ 12097 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \ 12098 last_state != EXPR_ENDARG && \ 12099 space_seen && !ISSPACE(c) && \ 12100 (ambiguous_operator(op, syn), 0))) 12101 12102 static int 12103 parser_yylex(struct parser_params *parser) 12104 { 12105 register int c; 12106 int space_seen = 0; 12107 int cmd_state; 12108 enum lex_state_e last_state; 12109 rb_encoding *enc; 12110 int mb; 12111 #ifdef RIPPER 12112 int fallthru = FALSE; 12113 #endif 12114 12115 if (lex_strterm) { 12116 int token; 12117 if (nd_type(lex_strterm) == NODE_HEREDOC) { 12118 token = here_document(lex_strterm); 12119 if (token == tSTRING_END) { 12120 lex_strterm = 0; 12121 lex_state = EXPR_END; 12122 } 12123 } 12124 else { 12125 token = parse_string(lex_strterm); 12126 if (token == tSTRING_END || token == tREGEXP_END) { 12127 rb_gc_force_recycle((VALUE)lex_strterm); 12128 lex_strterm = 0; 12129 lex_state = EXPR_END; 12130 } 12131 } 12132 return token; 12133 } 12134 cmd_state = command_start; 12135 command_start = FALSE; 12136 retry: 12137 last_state = lex_state; 12138 switch (c = nextc()) { 12139 case '\0': /* NUL */ 12140 case '\004': /* ^D */ 12141 case '\032': /* ^Z */ 12142 case -1: /* end of script. */ 12143 return 0; 12144 12145 /* white spaces */ 12146 case ' ': case '\t': case '\f': case '\r': 12147 case '\13': /* '\v' */ 12148 space_seen = 1; 12149 #ifdef RIPPER 12150 while ((c = nextc())) { 12151 switch (c) { 12152 case ' ': case '\t': case '\f': case '\r': 12153 case '\13': /* '\v' */ 12154 break; 12155 default: 12156 goto outofloop; 12157 } 12158 } 12159 outofloop: 12160 pushback(c); 12161 ripper_dispatch_scan_event(parser, tSP); 12162 #endif 12163 goto retry; 12164 12165 case '#': /* it's a comment */ 12166 /* no magic_comment in shebang line */ 12167 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 12168 if (comment_at_top(parser)) { 12169 set_file_encoding(parser, lex_p, lex_pend); 12170 } 12171 } 12172 lex_p = lex_pend; 12173 #ifdef RIPPER 12174 ripper_dispatch_scan_event(parser, tCOMMENT); 12175 fallthru = TRUE; 12176 #endif 12177 /* fall through */ 12178 case '\n': 12179 switch (lex_state) { 12180 case EXPR_BEG: 12181 case EXPR_FNAME: 12182 case EXPR_DOT: 12183 case EXPR_CLASS: 12184 case EXPR_VALUE: 12185 #ifdef RIPPER 12186 if (!fallthru) { 12187 ripper_dispatch_scan_event(parser, tIGNORED_NL); 12188 } 12189 fallthru = FALSE; 12190 #endif 12191 goto retry; 12192 default: 12193 break; 12194 } 12195 while ((c = nextc())) { 12196 switch (c) { 12197 case ' ': case '\t': case '\f': case '\r': 12198 case '\13': /* '\v' */ 12199 space_seen = 1; 12200 break; 12201 case '.': { 12202 if ((c = nextc()) != '.') { 12203 pushback(c); 12204 pushback('.'); 12205 goto retry; 12206 } 12207 } 12208 default: 12209 --ruby_sourceline; 12210 lex_nextline = lex_lastline; 12211 case -1: /* EOF no decrement*/ 12212 lex_goto_eol(parser); 12213 #ifdef RIPPER 12214 if (c != -1) { 12215 parser->tokp = lex_p; 12216 } 12217 #endif 12218 goto normal_newline; 12219 } 12220 } 12221 normal_newline: 12222 command_start = TRUE; 12223 lex_state = EXPR_BEG; 12224 return '\n'; 12225 12226 case '*': 12227 if ((c = nextc()) == '*') { 12228 if ((c = nextc()) == '=') { 12229 set_yylval_id(tPOW); 12230 lex_state = EXPR_BEG; 12231 return tOP_ASGN; 12232 } 12233 pushback(c); 12234 c = tPOW; 12235 } 12236 else { 12237 if (c == '=') { 12238 set_yylval_id('*'); 12239 lex_state = EXPR_BEG; 12240 return tOP_ASGN; 12241 } 12242 pushback(c); 12243 if (IS_SPCARG(c)) { 12244 rb_warning0("`*' interpreted as argument prefix"); 12245 c = tSTAR; 12246 } 12247 else if (IS_BEG()) { 12248 c = tSTAR; 12249 } 12250 else { 12251 warn_balanced("*", "argument prefix"); 12252 c = '*'; 12253 } 12254 } 12255 switch (lex_state) { 12256 case EXPR_FNAME: case EXPR_DOT: 12257 lex_state = EXPR_ARG; break; 12258 default: 12259 lex_state = EXPR_BEG; break; 12260 } 12261 return c; 12262 12263 case '!': 12264 c = nextc(); 12265 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12266 lex_state = EXPR_ARG; 12267 if (c == '@') { 12268 return '!'; 12269 } 12270 } 12271 else { 12272 lex_state = EXPR_BEG; 12273 } 12274 if (c == '=') { 12275 return tNEQ; 12276 } 12277 if (c == '~') { 12278 return tNMATCH; 12279 } 12280 pushback(c); 12281 return '!'; 12282 12283 case '=': 12284 if (was_bol()) { 12285 /* skip embedded rd document */ 12286 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 12287 #ifdef RIPPER 12288 int first_p = TRUE; 12289 12290 lex_goto_eol(parser); 12291 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 12292 #endif 12293 for (;;) { 12294 lex_goto_eol(parser); 12295 #ifdef RIPPER 12296 if (!first_p) { 12297 ripper_dispatch_scan_event(parser, tEMBDOC); 12298 } 12299 first_p = FALSE; 12300 #endif 12301 c = nextc(); 12302 if (c == -1) { 12303 compile_error(PARSER_ARG "embedded document meets end of file"); 12304 return 0; 12305 } 12306 if (c != '=') continue; 12307 if (strncmp(lex_p, "end", 3) == 0 && 12308 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 12309 break; 12310 } 12311 } 12312 lex_goto_eol(parser); 12313 #ifdef RIPPER 12314 ripper_dispatch_scan_event(parser, tEMBDOC_END); 12315 #endif 12316 goto retry; 12317 } 12318 } 12319 12320 switch (lex_state) { 12321 case EXPR_FNAME: case EXPR_DOT: 12322 lex_state = EXPR_ARG; break; 12323 default: 12324 lex_state = EXPR_BEG; break; 12325 } 12326 if ((c = nextc()) == '=') { 12327 if ((c = nextc()) == '=') { 12328 return tEQQ; 12329 } 12330 pushback(c); 12331 return tEQ; 12332 } 12333 if (c == '~') { 12334 return tMATCH; 12335 } 12336 else if (c == '>') { 12337 return tASSOC; 12338 } 12339 pushback(c); 12340 return '='; 12341 12342 case '<': 12343 last_state = lex_state; 12344 c = nextc(); 12345 if (c == '<' && 12346 lex_state != EXPR_DOT && 12347 lex_state != EXPR_CLASS && 12348 !IS_END() && 12349 (!IS_ARG() || space_seen)) { 12350 int token = heredoc_identifier(); 12351 if (token) return token; 12352 } 12353 switch (lex_state) { 12354 case EXPR_FNAME: case EXPR_DOT: 12355 lex_state = EXPR_ARG; break; 12356 default: 12357 lex_state = EXPR_BEG; break; 12358 } 12359 if (c == '=') { 12360 if ((c = nextc()) == '>') { 12361 return tCMP; 12362 } 12363 pushback(c); 12364 return tLEQ; 12365 } 12366 if (c == '<') { 12367 if ((c = nextc()) == '=') { 12368 set_yylval_id(tLSHFT); 12369 lex_state = EXPR_BEG; 12370 return tOP_ASGN; 12371 } 12372 pushback(c); 12373 warn_balanced("<<", "here document"); 12374 return tLSHFT; 12375 } 12376 pushback(c); 12377 return '<'; 12378 12379 case '>': 12380 switch (lex_state) { 12381 case EXPR_FNAME: case EXPR_DOT: 12382 lex_state = EXPR_ARG; break; 12383 default: 12384 lex_state = EXPR_BEG; break; 12385 } 12386 if ((c = nextc()) == '=') { 12387 return tGEQ; 12388 } 12389 if (c == '>') { 12390 if ((c = nextc()) == '=') { 12391 set_yylval_id(tRSHFT); 12392 lex_state = EXPR_BEG; 12393 return tOP_ASGN; 12394 } 12395 pushback(c); 12396 return tRSHFT; 12397 } 12398 pushback(c); 12399 return '>'; 12400 12401 case '"': 12402 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 12403 return tSTRING_BEG; 12404 12405 case '`': 12406 if (lex_state == EXPR_FNAME) { 12407 lex_state = EXPR_ENDFN; 12408 return c; 12409 } 12410 if (lex_state == EXPR_DOT) { 12411 if (cmd_state) 12412 lex_state = EXPR_CMDARG; 12413 else 12414 lex_state = EXPR_ARG; 12415 return c; 12416 } 12417 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 12418 return tXSTRING_BEG; 12419 12420 case '\'': 12421 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 12422 return tSTRING_BEG; 12423 12424 case '?': 12425 if (IS_END()) { 12426 lex_state = EXPR_VALUE; 12427 return '?'; 12428 } 12429 c = nextc(); 12430 if (c == -1) { 12431 compile_error(PARSER_ARG "incomplete character syntax"); 12432 return 0; 12433 } 12434 if (rb_enc_isspace(c, parser->enc)) { 12435 if (!IS_ARG()) { 12436 int c2 = 0; 12437 switch (c) { 12438 case ' ': 12439 c2 = 's'; 12440 break; 12441 case '\n': 12442 c2 = 'n'; 12443 break; 12444 case '\t': 12445 c2 = 't'; 12446 break; 12447 case '\v': 12448 c2 = 'v'; 12449 break; 12450 case '\r': 12451 c2 = 'r'; 12452 break; 12453 case '\f': 12454 c2 = 'f'; 12455 break; 12456 } 12457 if (c2) { 12458 rb_warnI("invalid character syntax; use ?\\%c", c2); 12459 } 12460 } 12461 ternary: 12462 pushback(c); 12463 lex_state = EXPR_VALUE; 12464 return '?'; 12465 } 12466 newtok(); 12467 enc = parser->enc; 12468 if (!parser_isascii()) { 12469 if (tokadd_mbchar(c) == -1) return 0; 12470 } 12471 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && 12472 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { 12473 goto ternary; 12474 } 12475 else if (c == '\\') { 12476 if (peek('u')) { 12477 nextc(); 12478 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 12479 if (0x80 <= c) { 12480 tokaddmbc(c, enc); 12481 } 12482 else { 12483 tokadd(c); 12484 } 12485 } 12486 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 12487 nextc(); 12488 if (tokadd_mbchar(c) == -1) return 0; 12489 } 12490 else { 12491 c = read_escape(0, &enc); 12492 tokadd(c); 12493 } 12494 } 12495 else { 12496 tokadd(c); 12497 } 12498 tokfix(); 12499 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 12500 lex_state = EXPR_END; 12501 return tCHAR; 12502 12503 case '&': 12504 if ((c = nextc()) == '&') { 12505 lex_state = EXPR_BEG; 12506 if ((c = nextc()) == '=') { 12507 set_yylval_id(tANDOP); 12508 lex_state = EXPR_BEG; 12509 return tOP_ASGN; 12510 } 12511 pushback(c); 12512 return tANDOP; 12513 } 12514 else if (c == '=') { 12515 set_yylval_id('&'); 12516 lex_state = EXPR_BEG; 12517 return tOP_ASGN; 12518 } 12519 pushback(c); 12520 if (IS_SPCARG(c)) { 12521 rb_warning0("`&' interpreted as argument prefix"); 12522 c = tAMPER; 12523 } 12524 else if (IS_BEG()) { 12525 c = tAMPER; 12526 } 12527 else { 12528 warn_balanced("&", "argument prefix"); 12529 c = '&'; 12530 } 12531 switch (lex_state) { 12532 case EXPR_FNAME: case EXPR_DOT: 12533 lex_state = EXPR_ARG; break; 12534 default: 12535 lex_state = EXPR_BEG; 12536 } 12537 return c; 12538 12539 case '|': 12540 if ((c = nextc()) == '|') { 12541 lex_state = EXPR_BEG; 12542 if ((c = nextc()) == '=') { 12543 set_yylval_id(tOROP); 12544 lex_state = EXPR_BEG; 12545 return tOP_ASGN; 12546 } 12547 pushback(c); 12548 return tOROP; 12549 } 12550 if (c == '=') { 12551 set_yylval_id('|'); 12552 lex_state = EXPR_BEG; 12553 return tOP_ASGN; 12554 } 12555 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12556 lex_state = EXPR_ARG; 12557 } 12558 else { 12559 lex_state = EXPR_BEG; 12560 } 12561 pushback(c); 12562 return '|'; 12563 12564 case '+': 12565 c = nextc(); 12566 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12567 lex_state = EXPR_ARG; 12568 if (c == '@') { 12569 return tUPLUS; 12570 } 12571 pushback(c); 12572 return '+'; 12573 } 12574 if (c == '=') { 12575 set_yylval_id('+'); 12576 lex_state = EXPR_BEG; 12577 return tOP_ASGN; 12578 } 12579 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12580 lex_state = EXPR_BEG; 12581 pushback(c); 12582 if (c != -1 && ISDIGIT(c)) { 12583 c = '+'; 12584 goto start_num; 12585 } 12586 return tUPLUS; 12587 } 12588 lex_state = EXPR_BEG; 12589 pushback(c); 12590 warn_balanced("+", "unary operator"); 12591 return '+'; 12592 12593 case '-': 12594 c = nextc(); 12595 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12596 lex_state = EXPR_ARG; 12597 if (c == '@') { 12598 return tUMINUS; 12599 } 12600 pushback(c); 12601 return '-'; 12602 } 12603 if (c == '=') { 12604 set_yylval_id('-'); 12605 lex_state = EXPR_BEG; 12606 return tOP_ASGN; 12607 } 12608 if (c == '>') { 12609 lex_state = EXPR_ARG; 12610 return tLAMBDA; 12611 } 12612 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12613 lex_state = EXPR_BEG; 12614 pushback(c); 12615 if (c != -1 && ISDIGIT(c)) { 12616 return tUMINUS_NUM; 12617 } 12618 return tUMINUS; 12619 } 12620 lex_state = EXPR_BEG; 12621 pushback(c); 12622 warn_balanced("-", "unary operator"); 12623 return '-'; 12624 12625 case '.': 12626 lex_state = EXPR_BEG; 12627 if ((c = nextc()) == '.') { 12628 if ((c = nextc()) == '.') { 12629 return tDOT3; 12630 } 12631 pushback(c); 12632 return tDOT2; 12633 } 12634 pushback(c); 12635 if (c != -1 && ISDIGIT(c)) { 12636 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 12637 } 12638 lex_state = EXPR_DOT; 12639 return '.'; 12640 12641 start_num: 12642 case '0': case '1': case '2': case '3': case '4': 12643 case '5': case '6': case '7': case '8': case '9': 12644 { 12645 int is_float, seen_point, seen_e, nondigit; 12646 12647 is_float = seen_point = seen_e = nondigit = 0; 12648 lex_state = EXPR_END; 12649 newtok(); 12650 if (c == '-' || c == '+') { 12651 tokadd(c); 12652 c = nextc(); 12653 } 12654 if (c == '0') { 12655 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 12656 int start = toklen(); 12657 c = nextc(); 12658 if (c == 'x' || c == 'X') { 12659 /* hexadecimal */ 12660 c = nextc(); 12661 if (c != -1 && ISXDIGIT(c)) { 12662 do { 12663 if (c == '_') { 12664 if (nondigit) break; 12665 nondigit = c; 12666 continue; 12667 } 12668 if (!ISXDIGIT(c)) break; 12669 nondigit = 0; 12670 tokadd(c); 12671 } while ((c = nextc()) != -1); 12672 } 12673 pushback(c); 12674 tokfix(); 12675 if (toklen() == start) { 12676 no_digits(); 12677 } 12678 else if (nondigit) goto trailing_uc; 12679 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 12680 return tINTEGER; 12681 } 12682 if (c == 'b' || c == 'B') { 12683 /* binary */ 12684 c = nextc(); 12685 if (c == '0' || c == '1') { 12686 do { 12687 if (c == '_') { 12688 if (nondigit) break; 12689 nondigit = c; 12690 continue; 12691 } 12692 if (c != '0' && c != '1') break; 12693 nondigit = 0; 12694 tokadd(c); 12695 } while ((c = nextc()) != -1); 12696 } 12697 pushback(c); 12698 tokfix(); 12699 if (toklen() == start) { 12700 no_digits(); 12701 } 12702 else if (nondigit) goto trailing_uc; 12703 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 12704 return tINTEGER; 12705 } 12706 if (c == 'd' || c == 'D') { 12707 /* decimal */ 12708 c = nextc(); 12709 if (c != -1 && ISDIGIT(c)) { 12710 do { 12711 if (c == '_') { 12712 if (nondigit) break; 12713 nondigit = c; 12714 continue; 12715 } 12716 if (!ISDIGIT(c)) break; 12717 nondigit = 0; 12718 tokadd(c); 12719 } while ((c = nextc()) != -1); 12720 } 12721 pushback(c); 12722 tokfix(); 12723 if (toklen() == start) { 12724 no_digits(); 12725 } 12726 else if (nondigit) goto trailing_uc; 12727 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 12728 return tINTEGER; 12729 } 12730 if (c == '_') { 12731 /* 0_0 */ 12732 goto octal_number; 12733 } 12734 if (c == 'o' || c == 'O') { 12735 /* prefixed octal */ 12736 c = nextc(); 12737 if (c == -1 || c == '_' || !ISDIGIT(c)) { 12738 no_digits(); 12739 } 12740 } 12741 if (c >= '0' && c <= '7') { 12742 /* octal */ 12743 octal_number: 12744 do { 12745 if (c == '_') { 12746 if (nondigit) break; 12747 nondigit = c; 12748 continue; 12749 } 12750 if (c < '0' || c > '9') break; 12751 if (c > '7') goto invalid_octal; 12752 nondigit = 0; 12753 tokadd(c); 12754 } while ((c = nextc()) != -1); 12755 if (toklen() > start) { 12756 pushback(c); 12757 tokfix(); 12758 if (nondigit) goto trailing_uc; 12759 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 12760 return tINTEGER; 12761 } 12762 if (nondigit) { 12763 pushback(c); 12764 goto trailing_uc; 12765 } 12766 } 12767 if (c > '7' && c <= '9') { 12768 invalid_octal: 12769 yyerror("Invalid octal digit"); 12770 } 12771 else if (c == '.' || c == 'e' || c == 'E') { 12772 tokadd('0'); 12773 } 12774 else { 12775 pushback(c); 12776 set_yylval_literal(INT2FIX(0)); 12777 return tINTEGER; 12778 } 12779 } 12780 12781 for (;;) { 12782 switch (c) { 12783 case '0': case '1': case '2': case '3': case '4': 12784 case '5': case '6': case '7': case '8': case '9': 12785 nondigit = 0; 12786 tokadd(c); 12787 break; 12788 12789 case '.': 12790 if (nondigit) goto trailing_uc; 12791 if (seen_point || seen_e) { 12792 goto decode_num; 12793 } 12794 else { 12795 int c0 = nextc(); 12796 if (c0 == -1 || !ISDIGIT(c0)) { 12797 pushback(c0); 12798 goto decode_num; 12799 } 12800 c = c0; 12801 } 12802 tokadd('.'); 12803 tokadd(c); 12804 is_float++; 12805 seen_point++; 12806 nondigit = 0; 12807 break; 12808 12809 case 'e': 12810 case 'E': 12811 if (nondigit) { 12812 pushback(c); 12813 c = nondigit; 12814 goto decode_num; 12815 } 12816 if (seen_e) { 12817 goto decode_num; 12818 } 12819 tokadd(c); 12820 seen_e++; 12821 is_float++; 12822 nondigit = c; 12823 c = nextc(); 12824 if (c != '-' && c != '+') continue; 12825 tokadd(c); 12826 nondigit = c; 12827 break; 12828 12829 case '_': /* `_' in number just ignored */ 12830 if (nondigit) goto decode_num; 12831 nondigit = c; 12832 break; 12833 12834 default: 12835 goto decode_num; 12836 } 12837 c = nextc(); 12838 } 12839 12840 decode_num: 12841 pushback(c); 12842 if (nondigit) { 12843 char tmp[30]; 12844 trailing_uc: 12845 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 12846 yyerror(tmp); 12847 } 12848 tokfix(); 12849 if (is_float) { 12850 double d = strtod(tok(), 0); 12851 if (errno == ERANGE) { 12852 rb_warningS("Float %s out of range", tok()); 12853 errno = 0; 12854 } 12855 set_yylval_literal(DBL2NUM(d)); 12856 return tFLOAT; 12857 } 12858 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 12859 return tINTEGER; 12860 } 12861 12862 case ')': 12863 case ']': 12864 paren_nest--; 12865 case '}': 12866 COND_LEXPOP(); 12867 CMDARG_LEXPOP(); 12868 if (c == ')') 12869 lex_state = EXPR_ENDFN; 12870 else 12871 lex_state = EXPR_ENDARG; 12872 return c; 12873 12874 case ':': 12875 c = nextc(); 12876 if (c == ':') { 12877 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) { 12878 lex_state = EXPR_BEG; 12879 return tCOLON3; 12880 } 12881 lex_state = EXPR_DOT; 12882 return tCOLON2; 12883 } 12884 if (IS_END() || ISSPACE(c)) { 12885 pushback(c); 12886 warn_balanced(":", "symbol literal"); 12887 lex_state = EXPR_BEG; 12888 return ':'; 12889 } 12890 switch (c) { 12891 case '\'': 12892 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 12893 break; 12894 case '"': 12895 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 12896 break; 12897 default: 12898 pushback(c); 12899 break; 12900 } 12901 lex_state = EXPR_FNAME; 12902 return tSYMBEG; 12903 12904 case '/': 12905 if (IS_BEG()) { 12906 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 12907 return tREGEXP_BEG; 12908 } 12909 if ((c = nextc()) == '=') { 12910 set_yylval_id('/'); 12911 lex_state = EXPR_BEG; 12912 return tOP_ASGN; 12913 } 12914 pushback(c); 12915 if (IS_SPCARG(c)) { 12916 (void)arg_ambiguous(); 12917 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 12918 return tREGEXP_BEG; 12919 } 12920 switch (lex_state) { 12921 case EXPR_FNAME: case EXPR_DOT: 12922 lex_state = EXPR_ARG; break; 12923 default: 12924 lex_state = EXPR_BEG; break; 12925 } 12926 warn_balanced("/", "regexp literal"); 12927 return '/'; 12928 12929 case '^': 12930 if ((c = nextc()) == '=') { 12931 set_yylval_id('^'); 12932 lex_state = EXPR_BEG; 12933 return tOP_ASGN; 12934 } 12935 switch (lex_state) { 12936 case EXPR_FNAME: case EXPR_DOT: 12937 lex_state = EXPR_ARG; break; 12938 default: 12939 lex_state = EXPR_BEG; break; 12940 } 12941 pushback(c); 12942 return '^'; 12943 12944 case ';': 12945 lex_state = EXPR_BEG; 12946 command_start = TRUE; 12947 return ';'; 12948 12949 case ',': 12950 lex_state = EXPR_BEG; 12951 return ','; 12952 12953 case '~': 12954 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12955 if ((c = nextc()) != '@') { 12956 pushback(c); 12957 } 12958 lex_state = EXPR_ARG; 12959 } 12960 else { 12961 lex_state = EXPR_BEG; 12962 } 12963 return '~'; 12964 12965 case '(': 12966 if (IS_BEG()) { 12967 c = tLPAREN; 12968 } 12969 else if (IS_SPCARG(-1)) { 12970 c = tLPAREN_ARG; 12971 } 12972 paren_nest++; 12973 COND_PUSH(0); 12974 CMDARG_PUSH(0); 12975 lex_state = EXPR_BEG; 12976 return c; 12977 12978 case '[': 12979 paren_nest++; 12980 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12981 lex_state = EXPR_ARG; 12982 if ((c = nextc()) == ']') { 12983 if ((c = nextc()) == '=') { 12984 return tASET; 12985 } 12986 pushback(c); 12987 return tAREF; 12988 } 12989 pushback(c); 12990 return '['; 12991 } 12992 else if (IS_BEG()) { 12993 c = tLBRACK; 12994 } 12995 else if (IS_ARG() && space_seen) { 12996 c = tLBRACK; 12997 } 12998 lex_state = EXPR_BEG; 12999 COND_PUSH(0); 13000 CMDARG_PUSH(0); 13001 return c; 13002 13003 case '{': 13004 if (lpar_beg && lpar_beg == paren_nest) { 13005 lex_state = EXPR_BEG; 13006 lpar_beg = 0; 13007 --paren_nest; 13008 COND_PUSH(0); 13009 CMDARG_PUSH(0); 13010 return tLAMBEG; 13011 } 13012 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN) 13013 c = '{'; /* block (primary) */ 13014 else if (lex_state == EXPR_ENDARG) 13015 c = tLBRACE_ARG; /* block (expr) */ 13016 else 13017 c = tLBRACE; /* hash */ 13018 COND_PUSH(0); 13019 CMDARG_PUSH(0); 13020 lex_state = EXPR_BEG; 13021 if (c != tLBRACE) command_start = TRUE; 13022 return c; 13023 13024 case '\\': 13025 c = nextc(); 13026 if (c == '\n') { 13027 space_seen = 1; 13028 #ifdef RIPPER 13029 ripper_dispatch_scan_event(parser, tSP); 13030 #endif 13031 goto retry; /* skip \\n */ 13032 } 13033 pushback(c); 13034 return '\\'; 13035 13036 case '%': 13037 if (IS_BEG()) { 13038 int term; 13039 int paren; 13040 13041 c = nextc(); 13042 quotation: 13043 if (c == -1 || !ISALNUM(c)) { 13044 term = c; 13045 c = 'Q'; 13046 } 13047 else { 13048 term = nextc(); 13049 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { 13050 yyerror("unknown type of %string"); 13051 return 0; 13052 } 13053 } 13054 if (c == -1 || term == -1) { 13055 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 13056 return 0; 13057 } 13058 paren = term; 13059 if (term == '(') term = ')'; 13060 else if (term == '[') term = ']'; 13061 else if (term == '{') term = '}'; 13062 else if (term == '<') term = '>'; 13063 else paren = 0; 13064 13065 switch (c) { 13066 case 'Q': 13067 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 13068 return tSTRING_BEG; 13069 13070 case 'q': 13071 lex_strterm = NEW_STRTERM(str_squote, term, paren); 13072 return tSTRING_BEG; 13073 13074 case 'W': 13075 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13076 do {c = nextc();} while (ISSPACE(c)); 13077 pushback(c); 13078 return tWORDS_BEG; 13079 13080 case 'w': 13081 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13082 do {c = nextc();} while (ISSPACE(c)); 13083 pushback(c); 13084 return tQWORDS_BEG; 13085 13086 case 'x': 13087 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 13088 return tXSTRING_BEG; 13089 13090 case 'r': 13091 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 13092 return tREGEXP_BEG; 13093 13094 case 's': 13095 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 13096 lex_state = EXPR_FNAME; 13097 return tSYMBEG; 13098 13099 default: 13100 yyerror("unknown type of %string"); 13101 return 0; 13102 } 13103 } 13104 if ((c = nextc()) == '=') { 13105 set_yylval_id('%'); 13106 lex_state = EXPR_BEG; 13107 return tOP_ASGN; 13108 } 13109 if (IS_SPCARG(c)) { 13110 goto quotation; 13111 } 13112 switch (lex_state) { 13113 case EXPR_FNAME: case EXPR_DOT: 13114 lex_state = EXPR_ARG; break; 13115 default: 13116 lex_state = EXPR_BEG; break; 13117 } 13118 pushback(c); 13119 warn_balanced("%%", "string literal"); 13120 return '%'; 13121 13122 case '$': 13123 lex_state = EXPR_END; 13124 newtok(); 13125 c = nextc(); 13126 switch (c) { 13127 case '_': /* $_: last read line string */ 13128 c = nextc(); 13129 if (parser_is_identchar()) { 13130 tokadd('$'); 13131 tokadd('_'); 13132 break; 13133 } 13134 pushback(c); 13135 c = '_'; 13136 /* fall through */ 13137 case '~': /* $~: match-data */ 13138 case '*': /* $*: argv */ 13139 case '$': /* $$: pid */ 13140 case '?': /* $?: last status */ 13141 case '!': /* $!: error string */ 13142 case '@': /* $@: error position */ 13143 case '/': /* $/: input record separator */ 13144 case '\\': /* $\: output record separator */ 13145 case ';': /* $;: field separator */ 13146 case ',': /* $,: output field separator */ 13147 case '.': /* $.: last read line number */ 13148 case '=': /* $=: ignorecase */ 13149 case ':': /* $:: load path */ 13150 case '<': /* $<: reading filename */ 13151 case '>': /* $>: default output handle */ 13152 case '\"': /* $": already loaded files */ 13153 tokadd('$'); 13154 tokadd(c); 13155 tokfix(); 13156 set_yylval_name(rb_intern(tok())); 13157 return tGVAR; 13158 13159 case '-': 13160 tokadd('$'); 13161 tokadd(c); 13162 c = nextc(); 13163 if (parser_is_identchar()) { 13164 if (tokadd_mbchar(c) == -1) return 0; 13165 } 13166 else { 13167 pushback(c); 13168 } 13169 gvar: 13170 tokfix(); 13171 set_yylval_name(rb_intern(tok())); 13172 return tGVAR; 13173 13174 case '&': /* $&: last match */ 13175 case '`': /* $`: string before last match */ 13176 case '\'': /* $': string after last match */ 13177 case '+': /* $+: string matches last paren. */ 13178 if (last_state == EXPR_FNAME) { 13179 tokadd('$'); 13180 tokadd(c); 13181 goto gvar; 13182 } 13183 set_yylval_node(NEW_BACK_REF(c)); 13184 return tBACK_REF; 13185 13186 case '1': case '2': case '3': 13187 case '4': case '5': case '6': 13188 case '7': case '8': case '9': 13189 tokadd('$'); 13190 do { 13191 tokadd(c); 13192 c = nextc(); 13193 } while (c != -1 && ISDIGIT(c)); 13194 pushback(c); 13195 if (last_state == EXPR_FNAME) goto gvar; 13196 tokfix(); 13197 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 13198 return tNTH_REF; 13199 13200 default: 13201 if (!parser_is_identchar()) { 13202 pushback(c); 13203 return '$'; 13204 } 13205 case '0': 13206 tokadd('$'); 13207 } 13208 break; 13209 13210 case '@': 13211 c = nextc(); 13212 newtok(); 13213 tokadd('@'); 13214 if (c == '@') { 13215 tokadd('@'); 13216 c = nextc(); 13217 } 13218 if (c != -1 && ISDIGIT(c)) { 13219 if (tokidx == 1) { 13220 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 13221 } 13222 else { 13223 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 13224 } 13225 return 0; 13226 } 13227 if (!parser_is_identchar()) { 13228 pushback(c); 13229 return '@'; 13230 } 13231 break; 13232 13233 case '_': 13234 if (was_bol() && whole_match_p("__END__", 7, 0)) { 13235 ruby__end__seen = 1; 13236 parser->eofp = Qtrue; 13237 #ifndef RIPPER 13238 return -1; 13239 #else 13240 lex_goto_eol(parser); 13241 ripper_dispatch_scan_event(parser, k__END__); 13242 return 0; 13243 #endif 13244 } 13245 newtok(); 13246 break; 13247 13248 default: 13249 if (!parser_is_identchar()) { 13250 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 13251 goto retry; 13252 } 13253 13254 newtok(); 13255 break; 13256 } 13257 13258 mb = ENC_CODERANGE_7BIT; 13259 do { 13260 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 13261 if (tokadd_mbchar(c) == -1) return 0; 13262 c = nextc(); 13263 } while (parser_is_identchar()); 13264 switch (tok()[0]) { 13265 case '@': case '$': 13266 pushback(c); 13267 break; 13268 default: 13269 if ((c == '!' || c == '?') && !peek('=')) { 13270 tokadd(c); 13271 } 13272 else { 13273 pushback(c); 13274 } 13275 } 13276 tokfix(); 13277 13278 { 13279 int result = 0; 13280 13281 last_state = lex_state; 13282 switch (tok()[0]) { 13283 case '$': 13284 lex_state = EXPR_END; 13285 result = tGVAR; 13286 break; 13287 case '@': 13288 lex_state = EXPR_END; 13289 if (tok()[1] == '@') 13290 result = tCVAR; 13291 else 13292 result = tIVAR; 13293 break; 13294 13295 default: 13296 if (toklast() == '!' || toklast() == '?') { 13297 result = tFID; 13298 } 13299 else { 13300 if (lex_state == EXPR_FNAME) { 13301 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 13302 (!peek('=') || (peek_n('>', 1)))) { 13303 result = tIDENTIFIER; 13304 tokadd(c); 13305 tokfix(); 13306 } 13307 else { 13308 pushback(c); 13309 } 13310 } 13311 if (result == 0 && ISUPPER(tok()[0])) { 13312 result = tCONSTANT; 13313 } 13314 else { 13315 result = tIDENTIFIER; 13316 } 13317 } 13318 13319 if (IS_LABEL_POSSIBLE()) { 13320 if (IS_LABEL_SUFFIX(0)) { 13321 lex_state = EXPR_BEG; 13322 nextc(); 13323 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 13324 return tLABEL; 13325 } 13326 } 13327 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { 13328 const struct kwtable *kw; 13329 13330 /* See if it is a reserved word. */ 13331 kw = rb_reserved_word(tok(), toklen()); 13332 if (kw) { 13333 enum lex_state_e state = lex_state; 13334 lex_state = kw->state; 13335 if (state == EXPR_FNAME) { 13336 set_yylval_name(rb_intern(kw->name)); 13337 return kw->id[0]; 13338 } 13339 if (kw->id[0] == keyword_do) { 13340 command_start = TRUE; 13341 if (lpar_beg && lpar_beg == paren_nest) { 13342 lpar_beg = 0; 13343 --paren_nest; 13344 return keyword_do_LAMBDA; 13345 } 13346 if (COND_P()) return keyword_do_cond; 13347 if (CMDARG_P() && state != EXPR_CMDARG) 13348 return keyword_do_block; 13349 if (state == EXPR_ENDARG || state == EXPR_BEG) 13350 return keyword_do_block; 13351 return keyword_do; 13352 } 13353 if (state == EXPR_BEG || state == EXPR_VALUE) 13354 return kw->id[0]; 13355 else { 13356 if (kw->id[0] != kw->id[1]) 13357 lex_state = EXPR_BEG; 13358 return kw->id[1]; 13359 } 13360 } 13361 } 13362 13363 if (IS_BEG() || 13364 lex_state == EXPR_DOT || 13365 IS_ARG()) { 13366 if (cmd_state) { 13367 lex_state = EXPR_CMDARG; 13368 } 13369 else { 13370 lex_state = EXPR_ARG; 13371 } 13372 } 13373 else if (lex_state == EXPR_FNAME) { 13374 lex_state = EXPR_ENDFN; 13375 } 13376 else { 13377 lex_state = EXPR_END; 13378 } 13379 } 13380 { 13381 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 13382 13383 set_yylval_name(ident); 13384 if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { 13385 lex_state = EXPR_END; 13386 } 13387 } 13388 return result; 13389 } 13390 } 13391 13392 #if YYPURE 13393 static int 13394 yylex(void *lval, void *p) 13395 #else 13396 yylex(void *p) 13397 #endif 13398 { 13399 struct parser_params *parser = (struct parser_params*)p; 13400 int t; 13401 13402 #if YYPURE 13403 parser->parser_yylval = lval; 13404 parser->parser_yylval->val = Qundef; 13405 #endif 13406 t = parser_yylex(parser); 13407 #ifdef RIPPER 13408 if (!NIL_P(parser->delayed)) { 13409 ripper_dispatch_delayed_token(parser, t); 13410 return t; 13411 } 13412 if (t != 0) 13413 ripper_dispatch_scan_event(parser, t); 13414 #endif 13415 13416 return t; 13417 } 13418 13419 #ifndef RIPPER 13420 static NODE* 13421 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 13422 { 13423 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 13424 nd_set_line(n, ruby_sourceline); 13425 return n; 13426 } 13427 13428 enum node_type 13429 nodetype(NODE *node) /* for debug */ 13430 { 13431 return (enum node_type)nd_type(node); 13432 } 13433 13434 int 13435 nodeline(NODE *node) 13436 { 13437 return nd_line(node); 13438 } 13439 13440 static NODE* 13441 newline_node(NODE *node) 13442 { 13443 if (node) { 13444 node = remove_begin(node); 13445 node->flags |= NODE_FL_NEWLINE; 13446 } 13447 return node; 13448 } 13449 13450 static void 13451 fixpos(NODE *node, NODE *orig) 13452 { 13453 if (!node) return; 13454 if (!orig) return; 13455 if (orig == (NODE*)1) return; 13456 nd_set_line(node, nd_line(orig)); 13457 } 13458 13459 static void 13460 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 13461 { 13462 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 13463 } 13464 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 13465 13466 static void 13467 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 13468 { 13469 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 13470 } 13471 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 13472 13473 static NODE* 13474 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 13475 { 13476 NODE *end, *h = head, *nd; 13477 13478 if (tail == 0) return head; 13479 13480 if (h == 0) return tail; 13481 switch (nd_type(h)) { 13482 case NODE_LIT: 13483 case NODE_STR: 13484 case NODE_SELF: 13485 case NODE_TRUE: 13486 case NODE_FALSE: 13487 case NODE_NIL: 13488 parser_warning(h, "unused literal ignored"); 13489 return tail; 13490 default: 13491 h = end = NEW_BLOCK(head); 13492 end->nd_end = end; 13493 fixpos(end, head); 13494 head = end; 13495 break; 13496 case NODE_BLOCK: 13497 end = h->nd_end; 13498 break; 13499 } 13500 13501 nd = end->nd_head; 13502 switch (nd_type(nd)) { 13503 case NODE_RETURN: 13504 case NODE_BREAK: 13505 case NODE_NEXT: 13506 case NODE_REDO: 13507 case NODE_RETRY: 13508 if (RTEST(ruby_verbose)) { 13509 parser_warning(nd, "statement not reached"); 13510 } 13511 break; 13512 13513 default: 13514 break; 13515 } 13516 13517 if (nd_type(tail) != NODE_BLOCK) { 13518 tail = NEW_BLOCK(tail); 13519 tail->nd_end = tail; 13520 } 13521 end->nd_next = tail; 13522 h->nd_end = tail->nd_end; 13523 return head; 13524 } 13525 13526 /* append item to the list */ 13527 static NODE* 13528 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 13529 { 13530 NODE *last; 13531 13532 if (list == 0) return NEW_LIST(item); 13533 if (list->nd_next) { 13534 last = list->nd_next->nd_end; 13535 } 13536 else { 13537 last = list; 13538 } 13539 13540 list->nd_alen += 1; 13541 last->nd_next = NEW_LIST(item); 13542 list->nd_next->nd_end = last->nd_next; 13543 return list; 13544 } 13545 13546 /* concat two lists */ 13547 static NODE* 13548 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13549 { 13550 NODE *last; 13551 13552 if (head->nd_next) { 13553 last = head->nd_next->nd_end; 13554 } 13555 else { 13556 last = head; 13557 } 13558 13559 head->nd_alen += tail->nd_alen; 13560 last->nd_next = tail; 13561 if (tail->nd_next) { 13562 head->nd_next->nd_end = tail->nd_next->nd_end; 13563 } 13564 else { 13565 head->nd_next->nd_end = tail; 13566 } 13567 13568 return head; 13569 } 13570 13571 static int 13572 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 13573 { 13574 if (NIL_P(tail)) return 1; 13575 if (!rb_enc_compatible(head, tail)) { 13576 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 13577 rb_enc_name(rb_enc_get(head)), 13578 rb_enc_name(rb_enc_get(tail))); 13579 rb_str_resize(head, 0); 13580 rb_str_resize(tail, 0); 13581 return 0; 13582 } 13583 rb_str_buf_append(head, tail); 13584 return 1; 13585 } 13586 13587 /* concat two string literals */ 13588 static NODE * 13589 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13590 { 13591 enum node_type htype; 13592 13593 if (!head) return tail; 13594 if (!tail) return head; 13595 13596 htype = nd_type(head); 13597 if (htype == NODE_EVSTR) { 13598 NODE *node = NEW_DSTR(Qnil); 13599 head = list_append(node, head); 13600 } 13601 switch (nd_type(tail)) { 13602 case NODE_STR: 13603 if (htype == NODE_STR) { 13604 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { 13605 error: 13606 rb_gc_force_recycle((VALUE)head); 13607 rb_gc_force_recycle((VALUE)tail); 13608 return 0; 13609 } 13610 rb_gc_force_recycle((VALUE)tail); 13611 } 13612 else { 13613 list_append(head, tail); 13614 } 13615 break; 13616 13617 case NODE_DSTR: 13618 if (htype == NODE_STR) { 13619 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 13620 goto error; 13621 tail->nd_lit = head->nd_lit; 13622 rb_gc_force_recycle((VALUE)head); 13623 head = tail; 13624 } 13625 else if (NIL_P(tail->nd_lit)) { 13626 head->nd_alen += tail->nd_alen - 1; 13627 head->nd_next->nd_end->nd_next = tail->nd_next; 13628 head->nd_next->nd_end = tail->nd_next->nd_end; 13629 rb_gc_force_recycle((VALUE)tail); 13630 } 13631 else { 13632 nd_set_type(tail, NODE_ARRAY); 13633 tail->nd_head = NEW_STR(tail->nd_lit); 13634 list_concat(head, tail); 13635 } 13636 break; 13637 13638 case NODE_EVSTR: 13639 if (htype == NODE_STR) { 13640 nd_set_type(head, NODE_DSTR); 13641 head->nd_alen = 1; 13642 } 13643 list_append(head, tail); 13644 break; 13645 } 13646 return head; 13647 } 13648 13649 static NODE * 13650 evstr2dstr_gen(struct parser_params *parser, NODE *node) 13651 { 13652 if (nd_type(node) == NODE_EVSTR) { 13653 node = list_append(NEW_DSTR(Qnil), node); 13654 } 13655 return node; 13656 } 13657 13658 static NODE * 13659 new_evstr_gen(struct parser_params *parser, NODE *node) 13660 { 13661 NODE *head = node; 13662 13663 if (node) { 13664 switch (nd_type(node)) { 13665 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 13666 return node; 13667 } 13668 } 13669 return NEW_EVSTR(head); 13670 } 13671 13672 static NODE * 13673 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 13674 { 13675 value_expr(recv); 13676 value_expr(arg1); 13677 return NEW_CALL(recv, id, NEW_LIST(arg1)); 13678 } 13679 13680 static NODE * 13681 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 13682 { 13683 value_expr(recv); 13684 return NEW_CALL(recv, id, 0); 13685 } 13686 13687 static NODE* 13688 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13689 { 13690 value_expr(node1); 13691 value_expr(node2); 13692 if (node1) { 13693 switch (nd_type(node1)) { 13694 case NODE_DREGX: 13695 case NODE_DREGX_ONCE: 13696 return NEW_MATCH2(node1, node2); 13697 13698 case NODE_LIT: 13699 if (TYPE(node1->nd_lit) == T_REGEXP) { 13700 return NEW_MATCH2(node1, node2); 13701 } 13702 } 13703 } 13704 13705 if (node2) { 13706 switch (nd_type(node2)) { 13707 case NODE_DREGX: 13708 case NODE_DREGX_ONCE: 13709 return NEW_MATCH3(node2, node1); 13710 13711 case NODE_LIT: 13712 if (TYPE(node2->nd_lit) == T_REGEXP) { 13713 return NEW_MATCH3(node2, node1); 13714 } 13715 } 13716 } 13717 13718 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 13719 } 13720 13721 static NODE* 13722 gettable_gen(struct parser_params *parser, ID id) 13723 { 13724 if (id == keyword_self) { 13725 return NEW_SELF(); 13726 } 13727 else if (id == keyword_nil) { 13728 return NEW_NIL(); 13729 } 13730 else if (id == keyword_true) { 13731 return NEW_TRUE(); 13732 } 13733 else if (id == keyword_false) { 13734 return NEW_FALSE(); 13735 } 13736 else if (id == keyword__FILE__) { 13737 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 13738 rb_filesystem_encoding())); 13739 } 13740 else if (id == keyword__LINE__) { 13741 return NEW_LIT(INT2FIX(ruby_sourceline)); 13742 } 13743 else if (id == keyword__ENCODING__) { 13744 return NEW_LIT(rb_enc_from_encoding(parser->enc)); 13745 } 13746 else if (is_local_id(id)) { 13747 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 13748 if (local_id(id)) return NEW_LVAR(id); 13749 /* method call without arguments */ 13750 return NEW_VCALL(id); 13751 } 13752 else if (is_global_id(id)) { 13753 return NEW_GVAR(id); 13754 } 13755 else if (is_instance_id(id)) { 13756 return NEW_IVAR(id); 13757 } 13758 else if (is_const_id(id)) { 13759 return NEW_CONST(id); 13760 } 13761 else if (is_class_id(id)) { 13762 return NEW_CVAR(id); 13763 } 13764 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 13765 return 0; 13766 } 13767 #else /* !RIPPER */ 13768 static int 13769 id_is_var_gen(struct parser_params *parser, ID id) 13770 { 13771 if (is_notop_id(id)) { 13772 switch (id & ID_SCOPE_MASK) { 13773 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 13774 return 1; 13775 case ID_LOCAL: 13776 if (dyna_in_block() && dvar_defined(id)) return 1; 13777 if (local_id(id)) return 1; 13778 /* method call without arguments */ 13779 return 0; 13780 } 13781 } 13782 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 13783 return 0; 13784 } 13785 #endif /* !RIPPER */ 13786 13787 #ifdef RIPPER 13788 static VALUE 13789 assignable_gen(struct parser_params *parser, VALUE lhs) 13790 #else 13791 static NODE* 13792 assignable_gen(struct parser_params *parser, ID id, NODE *val) 13793 #endif 13794 { 13795 #ifdef RIPPER 13796 ID id = get_id(lhs); 13797 # define assignable_result(x) get_value(lhs) 13798 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 13799 #else 13800 # define assignable_result(x) (x) 13801 #endif 13802 if (!id) return assignable_result(0); 13803 if (id == keyword_self) { 13804 yyerror("Can't change the value of self"); 13805 } 13806 else if (id == keyword_nil) { 13807 yyerror("Can't assign to nil"); 13808 } 13809 else if (id == keyword_true) { 13810 yyerror("Can't assign to true"); 13811 } 13812 else if (id == keyword_false) { 13813 yyerror("Can't assign to false"); 13814 } 13815 else if (id == keyword__FILE__) { 13816 yyerror("Can't assign to __FILE__"); 13817 } 13818 else if (id == keyword__LINE__) { 13819 yyerror("Can't assign to __LINE__"); 13820 } 13821 else if (id == keyword__ENCODING__) { 13822 yyerror("Can't assign to __ENCODING__"); 13823 } 13824 else if (is_local_id(id)) { 13825 if (dyna_in_block()) { 13826 if (dvar_curr(id)) { 13827 return assignable_result(NEW_DASGN_CURR(id, val)); 13828 } 13829 else if (dvar_defined(id)) { 13830 return assignable_result(NEW_DASGN(id, val)); 13831 } 13832 else if (local_id(id)) { 13833 return assignable_result(NEW_LASGN(id, val)); 13834 } 13835 else { 13836 dyna_var(id); 13837 return assignable_result(NEW_DASGN_CURR(id, val)); 13838 } 13839 } 13840 else { 13841 if (!local_id(id)) { 13842 local_var(id); 13843 } 13844 return assignable_result(NEW_LASGN(id, val)); 13845 } 13846 } 13847 else if (is_global_id(id)) { 13848 return assignable_result(NEW_GASGN(id, val)); 13849 } 13850 else if (is_instance_id(id)) { 13851 return assignable_result(NEW_IASGN(id, val)); 13852 } 13853 else if (is_const_id(id)) { 13854 if (!in_def && !in_single) 13855 return assignable_result(NEW_CDECL(id, val, 0)); 13856 yyerror("dynamic constant assignment"); 13857 } 13858 else if (is_class_id(id)) { 13859 return assignable_result(NEW_CVASGN(id, val)); 13860 } 13861 else { 13862 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 13863 } 13864 return assignable_result(0); 13865 #undef assignable_result 13866 #undef parser_yyerror 13867 } 13868 13869 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1)) 13870 13871 static ID 13872 shadowing_lvar_gen(struct parser_params *parser, ID name) 13873 { 13874 if (idUScore == name) return name; 13875 if (dyna_in_block()) { 13876 if (dvar_curr(name)) { 13877 yyerror("duplicated argument name"); 13878 } 13879 else if (dvar_defined_get(name) || local_id(name)) { 13880 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 13881 vtable_add(lvtbl->vars, name); 13882 if (lvtbl->used) { 13883 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 13884 } 13885 } 13886 } 13887 else { 13888 if (local_id(name)) { 13889 yyerror("duplicated argument name"); 13890 } 13891 } 13892 return name; 13893 } 13894 13895 static void 13896 new_bv_gen(struct parser_params *parser, ID name) 13897 { 13898 if (!name) return; 13899 if (!is_local_id(name)) { 13900 compile_error(PARSER_ARG "invalid local variable - %s", 13901 rb_id2name(name)); 13902 return; 13903 } 13904 shadowing_lvar(name); 13905 dyna_var(name); 13906 } 13907 13908 #ifndef RIPPER 13909 static NODE * 13910 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 13911 { 13912 if (recv && nd_type(recv) == NODE_SELF) 13913 recv = (NODE *)1; 13914 return NEW_ATTRASGN(recv, tASET, idx); 13915 } 13916 13917 static void 13918 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13919 { 13920 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 13921 compile_error(PARSER_ARG "both block arg and actual block given"); 13922 } 13923 } 13924 13925 ID 13926 rb_id_attrset(ID id) 13927 { 13928 id &= ~ID_SCOPE_MASK; 13929 id |= ID_ATTRSET; 13930 return id; 13931 } 13932 13933 static NODE * 13934 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 13935 { 13936 if (recv && nd_type(recv) == NODE_SELF) 13937 recv = (NODE *)1; 13938 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 13939 } 13940 13941 static void 13942 rb_backref_error_gen(struct parser_params *parser, NODE *node) 13943 { 13944 switch (nd_type(node)) { 13945 case NODE_NTH_REF: 13946 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 13947 break; 13948 case NODE_BACK_REF: 13949 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 13950 break; 13951 } 13952 } 13953 13954 static NODE * 13955 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13956 { 13957 if (!node2) return node1; 13958 switch (nd_type(node1)) { 13959 case NODE_BLOCK_PASS: 13960 if (node1->nd_head) 13961 node1->nd_head = arg_concat(node1->nd_head, node2); 13962 else 13963 node1->nd_head = NEW_LIST(node2); 13964 return node1; 13965 case NODE_ARGSPUSH: 13966 if (nd_type(node2) != NODE_ARRAY) break; 13967 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 13968 nd_set_type(node1, NODE_ARGSCAT); 13969 return node1; 13970 case NODE_ARGSCAT: 13971 if (nd_type(node2) != NODE_ARRAY || 13972 nd_type(node1->nd_body) != NODE_ARRAY) break; 13973 node1->nd_body = list_concat(node1->nd_body, node2); 13974 return node1; 13975 } 13976 return NEW_ARGSCAT(node1, node2); 13977 } 13978 13979 static NODE * 13980 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 13981 { 13982 if (!node1) return NEW_LIST(node2); 13983 switch (nd_type(node1)) { 13984 case NODE_ARRAY: 13985 return list_append(node1, node2); 13986 case NODE_BLOCK_PASS: 13987 node1->nd_head = arg_append(node1->nd_head, node2); 13988 return node1; 13989 case NODE_ARGSPUSH: 13990 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 13991 nd_set_type(node1, NODE_ARGSCAT); 13992 return node1; 13993 } 13994 return NEW_ARGSPUSH(node1, node2); 13995 } 13996 13997 static NODE * 13998 splat_array(NODE* node) 13999 { 14000 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 14001 if (nd_type(node) == NODE_ARRAY) return node; 14002 return 0; 14003 } 14004 14005 static NODE * 14006 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 14007 { 14008 if (!lhs) return 0; 14009 14010 switch (nd_type(lhs)) { 14011 case NODE_GASGN: 14012 case NODE_IASGN: 14013 case NODE_IASGN2: 14014 case NODE_LASGN: 14015 case NODE_DASGN: 14016 case NODE_DASGN_CURR: 14017 case NODE_MASGN: 14018 case NODE_CDECL: 14019 case NODE_CVASGN: 14020 lhs->nd_value = rhs; 14021 break; 14022 14023 case NODE_ATTRASGN: 14024 case NODE_CALL: 14025 lhs->nd_args = arg_append(lhs->nd_args, rhs); 14026 break; 14027 14028 default: 14029 /* should not happen */ 14030 break; 14031 } 14032 14033 return lhs; 14034 } 14035 14036 static int 14037 value_expr_gen(struct parser_params *parser, NODE *node) 14038 { 14039 int cond = 0; 14040 14041 if (!node) { 14042 rb_warning0("empty expression"); 14043 } 14044 while (node) { 14045 switch (nd_type(node)) { 14046 case NODE_DEFN: 14047 case NODE_DEFS: 14048 parser_warning(node, "void value expression"); 14049 return FALSE; 14050 14051 case NODE_RETURN: 14052 case NODE_BREAK: 14053 case NODE_NEXT: 14054 case NODE_REDO: 14055 case NODE_RETRY: 14056 if (!cond) yyerror("void value expression"); 14057 /* or "control never reach"? */ 14058 return FALSE; 14059 14060 case NODE_BLOCK: 14061 while (node->nd_next) { 14062 node = node->nd_next; 14063 } 14064 node = node->nd_head; 14065 break; 14066 14067 case NODE_BEGIN: 14068 node = node->nd_body; 14069 break; 14070 14071 case NODE_IF: 14072 if (!node->nd_body) { 14073 node = node->nd_else; 14074 break; 14075 } 14076 else if (!node->nd_else) { 14077 node = node->nd_body; 14078 break; 14079 } 14080 if (!value_expr(node->nd_body)) return FALSE; 14081 node = node->nd_else; 14082 break; 14083 14084 case NODE_AND: 14085 case NODE_OR: 14086 cond = 1; 14087 node = node->nd_2nd; 14088 break; 14089 14090 default: 14091 return TRUE; 14092 } 14093 } 14094 14095 return TRUE; 14096 } 14097 14098 static void 14099 void_expr_gen(struct parser_params *parser, NODE *node) 14100 { 14101 const char *useless = 0; 14102 14103 if (!RTEST(ruby_verbose)) return; 14104 14105 if (!node) return; 14106 switch (nd_type(node)) { 14107 case NODE_CALL: 14108 switch (node->nd_mid) { 14109 case '+': 14110 case '-': 14111 case '*': 14112 case '/': 14113 case '%': 14114 case tPOW: 14115 case tUPLUS: 14116 case tUMINUS: 14117 case '|': 14118 case '^': 14119 case '&': 14120 case tCMP: 14121 case '>': 14122 case tGEQ: 14123 case '<': 14124 case tLEQ: 14125 case tEQ: 14126 case tNEQ: 14127 useless = rb_id2name(node->nd_mid); 14128 break; 14129 } 14130 break; 14131 14132 case NODE_LVAR: 14133 case NODE_DVAR: 14134 case NODE_GVAR: 14135 case NODE_IVAR: 14136 case NODE_CVAR: 14137 case NODE_NTH_REF: 14138 case NODE_BACK_REF: 14139 useless = "a variable"; 14140 break; 14141 case NODE_CONST: 14142 useless = "a constant"; 14143 break; 14144 case NODE_LIT: 14145 case NODE_STR: 14146 case NODE_DSTR: 14147 case NODE_DREGX: 14148 case NODE_DREGX_ONCE: 14149 useless = "a literal"; 14150 break; 14151 case NODE_COLON2: 14152 case NODE_COLON3: 14153 useless = "::"; 14154 break; 14155 case NODE_DOT2: 14156 useless = ".."; 14157 break; 14158 case NODE_DOT3: 14159 useless = "..."; 14160 break; 14161 case NODE_SELF: 14162 useless = "self"; 14163 break; 14164 case NODE_NIL: 14165 useless = "nil"; 14166 break; 14167 case NODE_TRUE: 14168 useless = "true"; 14169 break; 14170 case NODE_FALSE: 14171 useless = "false"; 14172 break; 14173 case NODE_DEFINED: 14174 useless = "defined?"; 14175 break; 14176 } 14177 14178 if (useless) { 14179 int line = ruby_sourceline; 14180 14181 ruby_sourceline = nd_line(node); 14182 rb_warnS("possibly useless use of %s in void context", useless); 14183 ruby_sourceline = line; 14184 } 14185 } 14186 14187 static void 14188 void_stmts_gen(struct parser_params *parser, NODE *node) 14189 { 14190 if (!RTEST(ruby_verbose)) return; 14191 if (!node) return; 14192 if (nd_type(node) != NODE_BLOCK) return; 14193 14194 for (;;) { 14195 if (!node->nd_next) return; 14196 void_expr0(node->nd_head); 14197 node = node->nd_next; 14198 } 14199 } 14200 14201 static NODE * 14202 remove_begin(NODE *node) 14203 { 14204 NODE **n = &node, *n1 = node; 14205 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 14206 *n = n1 = n1->nd_body; 14207 } 14208 return node; 14209 } 14210 14211 static void 14212 reduce_nodes_gen(struct parser_params *parser, NODE **body) 14213 { 14214 NODE *node = *body; 14215 14216 if (!node) { 14217 *body = NEW_NIL(); 14218 return; 14219 } 14220 #define subnodes(n1, n2) \ 14221 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 14222 (!node->n2) ? (body = &node->n1, 1) : \ 14223 (reduce_nodes(&node->n1), body = &node->n2, 1)) 14224 14225 while (node) { 14226 int newline = (int)(node->flags & NODE_FL_NEWLINE); 14227 switch (nd_type(node)) { 14228 end: 14229 case NODE_NIL: 14230 *body = 0; 14231 return; 14232 case NODE_RETURN: 14233 *body = node = node->nd_stts; 14234 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14235 continue; 14236 case NODE_BEGIN: 14237 *body = node = node->nd_body; 14238 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14239 continue; 14240 case NODE_BLOCK: 14241 body = &node->nd_end->nd_head; 14242 break; 14243 case NODE_IF: 14244 if (subnodes(nd_body, nd_else)) break; 14245 return; 14246 case NODE_CASE: 14247 body = &node->nd_body; 14248 break; 14249 case NODE_WHEN: 14250 if (!subnodes(nd_body, nd_next)) goto end; 14251 break; 14252 case NODE_ENSURE: 14253 if (!subnodes(nd_head, nd_resq)) goto end; 14254 break; 14255 case NODE_RESCUE: 14256 if (node->nd_else) { 14257 body = &node->nd_resq; 14258 break; 14259 } 14260 if (!subnodes(nd_head, nd_resq)) goto end; 14261 break; 14262 default: 14263 return; 14264 } 14265 node = *body; 14266 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14267 } 14268 14269 #undef subnodes 14270 } 14271 14272 static int 14273 assign_in_cond(struct parser_params *parser, NODE *node) 14274 { 14275 switch (nd_type(node)) { 14276 case NODE_MASGN: 14277 yyerror("multiple assignment in conditional"); 14278 return 1; 14279 14280 case NODE_LASGN: 14281 case NODE_DASGN: 14282 case NODE_DASGN_CURR: 14283 case NODE_GASGN: 14284 case NODE_IASGN: 14285 break; 14286 14287 default: 14288 return 0; 14289 } 14290 14291 if (!node->nd_value) return 1; 14292 switch (nd_type(node->nd_value)) { 14293 case NODE_LIT: 14294 case NODE_STR: 14295 case NODE_NIL: 14296 case NODE_TRUE: 14297 case NODE_FALSE: 14298 /* reports always */ 14299 parser_warn(node->nd_value, "found = in conditional, should be =="); 14300 return 1; 14301 14302 case NODE_DSTR: 14303 case NODE_XSTR: 14304 case NODE_DXSTR: 14305 case NODE_EVSTR: 14306 case NODE_DREGX: 14307 default: 14308 break; 14309 } 14310 return 1; 14311 } 14312 14313 static void 14314 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14315 { 14316 if (!e_option_supplied(parser)) parser_warn(node, str); 14317 } 14318 14319 static void 14320 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14321 { 14322 if (!e_option_supplied(parser)) parser_warning(node, str); 14323 } 14324 14325 static void 14326 fixup_nodes(NODE **rootnode) 14327 { 14328 NODE *node, *next, *head; 14329 14330 for (node = *rootnode; node; node = next) { 14331 enum node_type type; 14332 VALUE val; 14333 14334 next = node->nd_next; 14335 head = node->nd_head; 14336 rb_gc_force_recycle((VALUE)node); 14337 *rootnode = next; 14338 switch (type = nd_type(head)) { 14339 case NODE_DOT2: 14340 case NODE_DOT3: 14341 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 14342 type == NODE_DOT3); 14343 rb_gc_force_recycle((VALUE)head->nd_beg); 14344 rb_gc_force_recycle((VALUE)head->nd_end); 14345 nd_set_type(head, NODE_LIT); 14346 head->nd_lit = val; 14347 break; 14348 default: 14349 break; 14350 } 14351 } 14352 } 14353 14354 static NODE *cond0(struct parser_params*,NODE*); 14355 14356 static NODE* 14357 range_op(struct parser_params *parser, NODE *node) 14358 { 14359 enum node_type type; 14360 14361 if (node == 0) return 0; 14362 14363 type = nd_type(node); 14364 value_expr(node); 14365 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 14366 warn_unless_e_option(parser, node, "integer literal in conditional range"); 14367 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 14368 } 14369 return cond0(parser, node); 14370 } 14371 14372 static int 14373 literal_node(NODE *node) 14374 { 14375 if (!node) return 1; /* same as NODE_NIL */ 14376 switch (nd_type(node)) { 14377 case NODE_LIT: 14378 case NODE_STR: 14379 case NODE_DSTR: 14380 case NODE_EVSTR: 14381 case NODE_DREGX: 14382 case NODE_DREGX_ONCE: 14383 case NODE_DSYM: 14384 return 2; 14385 case NODE_TRUE: 14386 case NODE_FALSE: 14387 case NODE_NIL: 14388 return 1; 14389 } 14390 return 0; 14391 } 14392 14393 static NODE* 14394 cond0(struct parser_params *parser, NODE *node) 14395 { 14396 if (node == 0) return 0; 14397 assign_in_cond(parser, node); 14398 14399 switch (nd_type(node)) { 14400 case NODE_DSTR: 14401 case NODE_EVSTR: 14402 case NODE_STR: 14403 rb_warn0("string literal in condition"); 14404 break; 14405 14406 case NODE_DREGX: 14407 case NODE_DREGX_ONCE: 14408 warning_unless_e_option(parser, node, "regex literal in condition"); 14409 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 14410 14411 case NODE_AND: 14412 case NODE_OR: 14413 node->nd_1st = cond0(parser, node->nd_1st); 14414 node->nd_2nd = cond0(parser, node->nd_2nd); 14415 break; 14416 14417 case NODE_DOT2: 14418 case NODE_DOT3: 14419 node->nd_beg = range_op(parser, node->nd_beg); 14420 node->nd_end = range_op(parser, node->nd_end); 14421 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 14422 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 14423 if (!e_option_supplied(parser)) { 14424 int b = literal_node(node->nd_beg); 14425 int e = literal_node(node->nd_end); 14426 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 14427 parser_warn(node, "range literal in condition"); 14428 } 14429 } 14430 break; 14431 14432 case NODE_DSYM: 14433 parser_warning(node, "literal in condition"); 14434 break; 14435 14436 case NODE_LIT: 14437 if (TYPE(node->nd_lit) == T_REGEXP) { 14438 warn_unless_e_option(parser, node, "regex literal in condition"); 14439 nd_set_type(node, NODE_MATCH); 14440 } 14441 else { 14442 parser_warning(node, "literal in condition"); 14443 } 14444 default: 14445 break; 14446 } 14447 return node; 14448 } 14449 14450 static NODE* 14451 cond_gen(struct parser_params *parser, NODE *node) 14452 { 14453 if (node == 0) return 0; 14454 return cond0(parser, node); 14455 } 14456 14457 static NODE* 14458 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 14459 { 14460 value_expr(left); 14461 if (left && (enum node_type)nd_type(left) == type) { 14462 NODE *node = left, *second; 14463 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 14464 node = second; 14465 } 14466 node->nd_2nd = NEW_NODE(type, second, right, 0); 14467 return left; 14468 } 14469 return NEW_NODE(type, left, right, 0); 14470 } 14471 14472 static void 14473 no_blockarg(struct parser_params *parser, NODE *node) 14474 { 14475 if (node && nd_type(node) == NODE_BLOCK_PASS) { 14476 compile_error(PARSER_ARG "block argument should not be given"); 14477 } 14478 } 14479 14480 static NODE * 14481 ret_args_gen(struct parser_params *parser, NODE *node) 14482 { 14483 if (node) { 14484 no_blockarg(parser, node); 14485 if (nd_type(node) == NODE_ARRAY) { 14486 if (node->nd_next == 0) { 14487 node = node->nd_head; 14488 } 14489 else { 14490 nd_set_type(node, NODE_VALUES); 14491 } 14492 } 14493 } 14494 return node; 14495 } 14496 14497 static NODE * 14498 new_yield_gen(struct parser_params *parser, NODE *node) 14499 { 14500 long state = Qtrue; 14501 14502 if (node) { 14503 no_blockarg(parser, node); 14504 if (node && nd_type(node) == NODE_SPLAT) { 14505 state = Qtrue; 14506 } 14507 } 14508 else { 14509 state = Qfalse; 14510 } 14511 return NEW_YIELD(node, state); 14512 } 14513 14514 static NODE* 14515 negate_lit(NODE *node) 14516 { 14517 switch (TYPE(node->nd_lit)) { 14518 case T_FIXNUM: 14519 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 14520 break; 14521 case T_BIGNUM: 14522 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 14523 break; 14524 case T_FLOAT: 14525 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 14526 break; 14527 default: 14528 break; 14529 } 14530 return node; 14531 } 14532 14533 static NODE * 14534 arg_blk_pass(NODE *node1, NODE *node2) 14535 { 14536 if (node2) { 14537 node2->nd_head = node1; 14538 return node2; 14539 } 14540 return node1; 14541 } 14542 14543 static NODE* 14544 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) 14545 { 14546 int saved_line = ruby_sourceline; 14547 NODE *node; 14548 NODE *i1, *i2 = 0; 14549 14550 node = NEW_ARGS(m ? m->nd_plen : 0, o); 14551 i1 = m ? m->nd_next : 0; 14552 node->nd_next = NEW_ARGS_AUX(r, b); 14553 14554 if (p) { 14555 i2 = p->nd_next; 14556 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); 14557 } 14558 else if (i1) { 14559 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); 14560 } 14561 if (i1 || i2) { 14562 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); 14563 } 14564 ruby_sourceline = saved_line; 14565 return node; 14566 } 14567 #endif /* !RIPPER */ 14568 14569 static void 14570 warn_unused_var(struct parser_params *parser, struct local_vars *local) 14571 { 14572 int i, cnt; 14573 ID *v, *u; 14574 14575 if (!local->used) return; 14576 v = local->vars->tbl; 14577 u = local->used->tbl; 14578 cnt = local->used->pos; 14579 if (cnt != local->vars->pos) { 14580 rb_bug("local->used->pos != local->vars->pos"); 14581 } 14582 for (i = 0; i < cnt; ++i) { 14583 if (!v[i] || (u[i] & LVAR_USED)) continue; 14584 if (idUScore == v[i]) continue; 14585 rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 14586 } 14587 } 14588 14589 static void 14590 local_push_gen(struct parser_params *parser, int inherit_dvars) 14591 { 14592 struct local_vars *local; 14593 14594 local = ALLOC(struct local_vars); 14595 local->prev = lvtbl; 14596 local->args = vtable_alloc(0); 14597 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 14598 local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 14599 lvtbl = local; 14600 } 14601 14602 static void 14603 local_pop_gen(struct parser_params *parser) 14604 { 14605 struct local_vars *local = lvtbl->prev; 14606 if (lvtbl->used) { 14607 warn_unused_var(parser, lvtbl); 14608 vtable_free(lvtbl->used); 14609 } 14610 vtable_free(lvtbl->args); 14611 vtable_free(lvtbl->vars); 14612 xfree(lvtbl); 14613 lvtbl = local; 14614 } 14615 14616 #ifndef RIPPER 14617 static ID* 14618 vtable_tblcpy(ID *buf, const struct vtable *src) 14619 { 14620 int i, cnt = vtable_size(src); 14621 14622 if (cnt > 0) { 14623 buf[0] = cnt; 14624 for (i = 0; i < cnt; i++) { 14625 buf[i] = src->tbl[i]; 14626 } 14627 return buf; 14628 } 14629 return 0; 14630 } 14631 14632 static ID* 14633 local_tbl_gen(struct parser_params *parser) 14634 { 14635 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 14636 ID *buf; 14637 14638 if (cnt <= 0) return 0; 14639 buf = ALLOC_N(ID, cnt + 1); 14640 vtable_tblcpy(buf+1, lvtbl->args); 14641 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 14642 buf[0] = cnt; 14643 return buf; 14644 } 14645 #endif 14646 14647 static int 14648 arg_var_gen(struct parser_params *parser, ID id) 14649 { 14650 vtable_add(lvtbl->args, id); 14651 return vtable_size(lvtbl->args) - 1; 14652 } 14653 14654 static int 14655 local_var_gen(struct parser_params *parser, ID id) 14656 { 14657 vtable_add(lvtbl->vars, id); 14658 if (lvtbl->used) { 14659 vtable_add(lvtbl->used, (ID)ruby_sourceline); 14660 } 14661 return vtable_size(lvtbl->vars) - 1; 14662 } 14663 14664 static int 14665 local_id_gen(struct parser_params *parser, ID id) 14666 { 14667 struct vtable *vars, *args, *used; 14668 14669 vars = lvtbl->vars; 14670 args = lvtbl->args; 14671 used = lvtbl->used; 14672 14673 while (vars && POINTER_P(vars->prev)) { 14674 vars = vars->prev; 14675 args = args->prev; 14676 if (used) used = used->prev; 14677 } 14678 14679 if (vars && vars->prev == DVARS_INHERIT) { 14680 return rb_local_defined(id); 14681 } 14682 else if (vtable_included(args, id)) { 14683 return 1; 14684 } 14685 else { 14686 int i = vtable_included(vars, id); 14687 if (i && used) used->tbl[i-1] |= LVAR_USED; 14688 return i != 0; 14689 } 14690 } 14691 14692 static const struct vtable * 14693 dyna_push_gen(struct parser_params *parser) 14694 { 14695 lvtbl->args = vtable_alloc(lvtbl->args); 14696 lvtbl->vars = vtable_alloc(lvtbl->vars); 14697 if (lvtbl->used) { 14698 lvtbl->used = vtable_alloc(lvtbl->used); 14699 } 14700 return lvtbl->args; 14701 } 14702 14703 static void 14704 dyna_pop_1(struct parser_params *parser) 14705 { 14706 struct vtable *tmp; 14707 14708 if ((tmp = lvtbl->used) != 0) { 14709 warn_unused_var(parser, lvtbl); 14710 lvtbl->used = lvtbl->used->prev; 14711 vtable_free(tmp); 14712 } 14713 tmp = lvtbl->args; 14714 lvtbl->args = lvtbl->args->prev; 14715 vtable_free(tmp); 14716 tmp = lvtbl->vars; 14717 lvtbl->vars = lvtbl->vars->prev; 14718 vtable_free(tmp); 14719 } 14720 14721 static void 14722 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 14723 { 14724 while (lvtbl->args != lvargs) { 14725 dyna_pop_1(parser); 14726 if (!lvtbl->args) { 14727 struct local_vars *local = lvtbl->prev; 14728 xfree(lvtbl); 14729 lvtbl = local; 14730 } 14731 } 14732 dyna_pop_1(parser); 14733 } 14734 14735 static int 14736 dyna_in_block_gen(struct parser_params *parser) 14737 { 14738 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 14739 } 14740 14741 static int 14742 dvar_defined_gen(struct parser_params *parser, ID id, int get) 14743 { 14744 struct vtable *vars, *args, *used; 14745 int i; 14746 14747 args = lvtbl->args; 14748 vars = lvtbl->vars; 14749 used = lvtbl->used; 14750 14751 while (POINTER_P(vars)) { 14752 if (vtable_included(args, id)) { 14753 return 1; 14754 } 14755 if ((i = vtable_included(vars, id)) != 0) { 14756 if (used) used->tbl[i-1] |= LVAR_USED; 14757 return 1; 14758 } 14759 args = args->prev; 14760 vars = vars->prev; 14761 if (get) used = 0; 14762 if (used) used = used->prev; 14763 } 14764 14765 if (vars == DVARS_INHERIT) { 14766 return rb_dvar_defined(id); 14767 } 14768 14769 return 0; 14770 } 14771 14772 static int 14773 dvar_curr_gen(struct parser_params *parser, ID id) 14774 { 14775 return (vtable_included(lvtbl->args, id) || 14776 vtable_included(lvtbl->vars, id)); 14777 } 14778 14779 #ifndef RIPPER 14780 static void 14781 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 14782 { 14783 int c = RE_OPTION_ENCODING_IDX(options); 14784 14785 if (c) { 14786 int opt, idx; 14787 rb_char_to_option_kcode(c, &opt, &idx); 14788 if (idx != ENCODING_GET(str) && 14789 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 14790 goto error; 14791 } 14792 ENCODING_SET(str, idx); 14793 } 14794 else if (RE_OPTION_ENCODING_NONE(options)) { 14795 if (!ENCODING_IS_ASCII8BIT(str) && 14796 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 14797 c = 'n'; 14798 goto error; 14799 } 14800 rb_enc_associate(str, rb_ascii8bit_encoding()); 14801 } 14802 else if (parser->enc == rb_usascii_encoding()) { 14803 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 14804 /* raise in re.c */ 14805 rb_enc_associate(str, rb_usascii_encoding()); 14806 } 14807 else { 14808 rb_enc_associate(str, rb_ascii8bit_encoding()); 14809 } 14810 } 14811 return; 14812 14813 error: 14814 compile_error(PARSER_ARG 14815 "regexp encoding option '%c' differs from source encoding '%s'", 14816 c, rb_enc_name(rb_enc_get(str))); 14817 } 14818 14819 static int 14820 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 14821 { 14822 VALUE err; 14823 reg_fragment_setenc(str, options); 14824 err = rb_reg_check_preprocess(str); 14825 if (err != Qnil) { 14826 err = rb_obj_as_string(err); 14827 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 14828 RB_GC_GUARD(err); 14829 return 0; 14830 } 14831 return 1; 14832 } 14833 14834 typedef struct { 14835 struct parser_params* parser; 14836 rb_encoding *enc; 14837 NODE *succ_block; 14838 NODE *fail_block; 14839 int num; 14840 } reg_named_capture_assign_t; 14841 14842 static int 14843 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 14844 int back_num, int *back_refs, OnigRegex regex, void *arg0) 14845 { 14846 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 14847 struct parser_params* parser = arg->parser; 14848 rb_encoding *enc = arg->enc; 14849 long len = name_end - name; 14850 const char *s = (const char *)name; 14851 ID var; 14852 14853 arg->num++; 14854 14855 if (arg->succ_block == 0) { 14856 arg->succ_block = NEW_BEGIN(0); 14857 arg->fail_block = NEW_BEGIN(0); 14858 } 14859 14860 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 14861 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 14862 !rb_enc_symname2_p(s, len, enc)) { 14863 return ST_CONTINUE; 14864 } 14865 var = rb_intern3(s, len, enc); 14866 if (dvar_defined(var) || local_id(var)) { 14867 rb_warningS("named capture conflicts a local variable - %s", 14868 rb_id2name(var)); 14869 } 14870 arg->succ_block = block_append(arg->succ_block, 14871 newline_node(node_assign(assignable(var,0), 14872 NEW_CALL( 14873 gettable(rb_intern("$~")), 14874 idAREF, 14875 NEW_LIST(NEW_LIT(ID2SYM(var)))) 14876 ))); 14877 arg->fail_block = block_append(arg->fail_block, 14878 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 14879 return ST_CONTINUE; 14880 } 14881 14882 static NODE * 14883 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 14884 { 14885 reg_named_capture_assign_t arg; 14886 14887 arg.parser = parser; 14888 arg.enc = rb_enc_get(regexp); 14889 arg.succ_block = 0; 14890 arg.fail_block = 0; 14891 arg.num = 0; 14892 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 14893 14894 if (arg.num == 0) 14895 return match; 14896 14897 return 14898 block_append( 14899 newline_node(match), 14900 NEW_IF(gettable(rb_intern("$~")), 14901 block_append( 14902 newline_node(arg.succ_block), 14903 newline_node( 14904 NEW_CALL( 14905 gettable(rb_intern("$~")), 14906 rb_intern("begin"), 14907 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 14908 block_append( 14909 newline_node(arg.fail_block), 14910 newline_node( 14911 NEW_LIT(Qnil))))); 14912 } 14913 14914 static VALUE 14915 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 14916 { 14917 VALUE re; 14918 VALUE err; 14919 14920 reg_fragment_setenc(str, options); 14921 err = rb_errinfo(); 14922 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 14923 if (NIL_P(re)) { 14924 ID mesg = rb_intern("mesg"); 14925 VALUE m = rb_attr_get(rb_errinfo(), mesg); 14926 rb_set_errinfo(err); 14927 if (!NIL_P(err)) { 14928 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 14929 } 14930 else { 14931 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 14932 } 14933 return Qnil; 14934 } 14935 return re; 14936 } 14937 14938 void 14939 rb_gc_mark_parser(void) 14940 { 14941 } 14942 14943 NODE* 14944 rb_parser_append_print(VALUE vparser, NODE *node) 14945 { 14946 NODE *prelude = 0; 14947 NODE *scope = node; 14948 struct parser_params *parser; 14949 14950 if (!node) return node; 14951 14952 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 14953 14954 node = node->nd_body; 14955 14956 if (nd_type(node) == NODE_PRELUDE) { 14957 prelude = node; 14958 node = node->nd_body; 14959 } 14960 14961 node = block_append(node, 14962 NEW_FCALL(rb_intern("print"), 14963 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 14964 if (prelude) { 14965 prelude->nd_body = node; 14966 scope->nd_body = prelude; 14967 } 14968 else { 14969 scope->nd_body = node; 14970 } 14971 14972 return scope; 14973 } 14974 14975 NODE * 14976 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 14977 { 14978 NODE *prelude = 0; 14979 NODE *scope = node; 14980 struct parser_params *parser; 14981 14982 if (!node) return node; 14983 14984 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 14985 14986 node = node->nd_body; 14987 14988 if (nd_type(node) == NODE_PRELUDE) { 14989 prelude = node; 14990 node = node->nd_body; 14991 } 14992 if (split) { 14993 node = block_append(NEW_GASGN(rb_intern("$F"), 14994 NEW_CALL(NEW_GVAR(rb_intern("$_")), 14995 rb_intern("split"), 0)), 14996 node); 14997 } 14998 if (chop) { 14999 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 15000 rb_intern("chop!"), 0), node); 15001 } 15002 15003 node = NEW_OPT_N(node); 15004 15005 if (prelude) { 15006 prelude->nd_body = node; 15007 scope->nd_body = prelude; 15008 } 15009 else { 15010 scope->nd_body = node; 15011 } 15012 15013 return scope; 15014 } 15015 15016 static const struct { 15017 ID token; 15018 const char *name; 15019 } op_tbl[] = { 15020 {tDOT2, ".."}, 15021 {tDOT3, "..."}, 15022 {'+', "+(binary)"}, 15023 {'-', "-(binary)"}, 15024 {tPOW, "**"}, 15025 {tUPLUS, "+@"}, 15026 {tUMINUS, "-@"}, 15027 {tCMP, "<=>"}, 15028 {tGEQ, ">="}, 15029 {tLEQ, "<="}, 15030 {tEQ, "=="}, 15031 {tEQQ, "==="}, 15032 {tNEQ, "!="}, 15033 {tMATCH, "=~"}, 15034 {tNMATCH, "!~"}, 15035 {tAREF, "[]"}, 15036 {tASET, "[]="}, 15037 {tLSHFT, "<<"}, 15038 {tRSHFT, ">>"}, 15039 {tCOLON2, "::"}, 15040 }; 15041 15042 #define op_tbl_count numberof(op_tbl) 15043 15044 #ifndef ENABLE_SELECTOR_NAMESPACE 15045 #define ENABLE_SELECTOR_NAMESPACE 0 15046 #endif 15047 15048 static struct symbols { 15049 ID last_id; 15050 st_table *sym_id; 15051 st_table *id_str; 15052 #if ENABLE_SELECTOR_NAMESPACE 15053 st_table *ivar2_id; 15054 st_table *id_ivar2; 15055 #endif 15056 VALUE op_sym[tLAST_TOKEN]; 15057 } global_symbols = {tLAST_ID}; 15058 15059 static const struct st_hash_type symhash = { 15060 rb_str_hash_cmp, 15061 rb_str_hash, 15062 }; 15063 15064 #if ENABLE_SELECTOR_NAMESPACE 15065 struct ivar2_key { 15066 ID id; 15067 VALUE klass; 15068 }; 15069 15070 static int 15071 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 15072 { 15073 if (key1->id == key2->id && key1->klass == key2->klass) { 15074 return 0; 15075 } 15076 return 1; 15077 } 15078 15079 static int 15080 ivar2_hash(struct ivar2_key *key) 15081 { 15082 return (key->id << 8) ^ (key->klass >> 2); 15083 } 15084 15085 static const struct st_hash_type ivar2_hash_type = { 15086 ivar2_cmp, 15087 ivar2_hash, 15088 }; 15089 #endif 15090 15091 void 15092 Init_sym(void) 15093 { 15094 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 15095 global_symbols.id_str = st_init_numtable_with_size(1000); 15096 #if ENABLE_SELECTOR_NAMESPACE 15097 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 15098 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 15099 #endif 15100 15101 Init_id(); 15102 } 15103 15104 void 15105 rb_gc_mark_symbols(void) 15106 { 15107 rb_mark_tbl(global_symbols.id_str); 15108 rb_gc_mark_locations(global_symbols.op_sym, 15109 global_symbols.op_sym + tLAST_TOKEN); 15110 } 15111 #endif /* !RIPPER */ 15112 15113 static ID 15114 internal_id_gen(struct parser_params *parser) 15115 { 15116 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 15117 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 15118 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 15119 } 15120 15121 #ifndef RIPPER 15122 static int 15123 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 15124 { 15125 int mb = 0; 15126 15127 if (m >= e) return 0; 15128 switch (*m) { 15129 case '~': case '*': case '$': case '?': case '!': case '@': 15130 case '/': case '\\': case ';': case ',': case '.': case '=': 15131 case ':': case '<': case '>': case '\"': 15132 case '&': case '`': case '\'': case '+': 15133 case '0': 15134 ++m; 15135 break; 15136 case '-': 15137 ++m; 15138 if (m < e && is_identchar(m, e, enc)) { 15139 if (!ISASCII(*m)) mb = 1; 15140 m += rb_enc_mbclen(m, e, enc); 15141 } 15142 break; 15143 default: 15144 if (!rb_enc_isdigit(*m, enc)) return 0; 15145 do { 15146 if (!ISASCII(*m)) mb = 1; 15147 ++m; 15148 } while (m < e && rb_enc_isdigit(*m, enc)); 15149 } 15150 return m == e ? mb + 1 : 0; 15151 } 15152 15153 int 15154 rb_symname_p(const char *name) 15155 { 15156 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 15157 } 15158 15159 int 15160 rb_enc_symname_p(const char *name, rb_encoding *enc) 15161 { 15162 return rb_enc_symname2_p(name, strlen(name), enc); 15163 } 15164 15165 int 15166 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 15167 { 15168 const char *m = name; 15169 const char *e = m + len; 15170 int localid = FALSE; 15171 15172 if (!m || len <= 0) return FALSE; 15173 switch (*m) { 15174 case '\0': 15175 return FALSE; 15176 15177 case '$': 15178 if (is_special_global_name(++m, e, enc)) return TRUE; 15179 goto id; 15180 15181 case '@': 15182 if (*++m == '@') ++m; 15183 goto id; 15184 15185 case '<': 15186 switch (*++m) { 15187 case '<': ++m; break; 15188 case '=': if (*++m == '>') ++m; break; 15189 default: break; 15190 } 15191 break; 15192 15193 case '>': 15194 switch (*++m) { 15195 case '>': case '=': ++m; break; 15196 } 15197 break; 15198 15199 case '=': 15200 switch (*++m) { 15201 case '~': ++m; break; 15202 case '=': if (*++m == '=') ++m; break; 15203 default: return FALSE; 15204 } 15205 break; 15206 15207 case '*': 15208 if (*++m == '*') ++m; 15209 break; 15210 15211 case '+': case '-': 15212 if (*++m == '@') ++m; 15213 break; 15214 15215 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 15216 ++m; 15217 break; 15218 15219 case '[': 15220 if (*++m != ']') return FALSE; 15221 if (*++m == '=') ++m; 15222 break; 15223 15224 case '!': 15225 if (len == 1) return TRUE; 15226 switch (*++m) { 15227 case '=': case '~': ++m; break; 15228 default: return FALSE; 15229 } 15230 break; 15231 15232 default: 15233 localid = !rb_enc_isupper(*m, enc); 15234 id: 15235 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 15236 return FALSE; 15237 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 15238 if (localid) { 15239 switch (*m) { 15240 case '!': case '?': case '=': ++m; 15241 } 15242 } 15243 break; 15244 } 15245 return m == e; 15246 } 15247 15248 static ID 15249 register_symid(ID id, const char *name, long len, rb_encoding *enc) 15250 { 15251 VALUE str = rb_enc_str_new(name, len, enc); 15252 OBJ_FREEZE(str); 15253 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 15254 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 15255 return id; 15256 } 15257 15258 ID 15259 rb_intern3(const char *name, long len, rb_encoding *enc) 15260 { 15261 const char *m = name; 15262 const char *e = m + len; 15263 unsigned char c; 15264 VALUE str; 15265 ID id; 15266 long last; 15267 int mb; 15268 st_data_t data; 15269 struct RString fake_str; 15270 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 15271 fake_str.basic.klass = rb_cString; 15272 fake_str.as.heap.len = len; 15273 fake_str.as.heap.ptr = (char *)name; 15274 fake_str.as.heap.aux.capa = len; 15275 str = (VALUE)&fake_str; 15276 rb_enc_associate(str, enc); 15277 OBJ_FREEZE(str); 15278 15279 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { 15280 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 15281 } 15282 15283 if (st_lookup(global_symbols.sym_id, str, &data)) 15284 return (ID)data; 15285 15286 if (rb_cString && !rb_enc_asciicompat(enc)) { 15287 id = ID_JUNK; 15288 goto new_id; 15289 } 15290 last = len-1; 15291 id = 0; 15292 switch (*m) { 15293 case '$': 15294 id |= ID_GLOBAL; 15295 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 15296 if (!--mb) enc = rb_ascii8bit_encoding(); 15297 goto new_id; 15298 } 15299 break; 15300 case '@': 15301 if (m[1] == '@') { 15302 m++; 15303 id |= ID_CLASS; 15304 } 15305 else { 15306 id |= ID_INSTANCE; 15307 } 15308 m++; 15309 break; 15310 default: 15311 c = m[0]; 15312 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 15313 /* operators */ 15314 int i; 15315 15316 if (len == 1) { 15317 id = c; 15318 goto id_register; 15319 } 15320 for (i = 0; i < op_tbl_count; i++) { 15321 if (*op_tbl[i].name == *m && 15322 strcmp(op_tbl[i].name, m) == 0) { 15323 id = op_tbl[i].token; 15324 goto id_register; 15325 } 15326 } 15327 } 15328 15329 if (m[last] == '=') { 15330 /* attribute assignment */ 15331 id = rb_intern3(name, last, enc); 15332 if (id > tLAST_TOKEN && !is_attrset_id(id)) { 15333 enc = rb_enc_get(rb_id2str(id)); 15334 id = rb_id_attrset(id); 15335 goto id_register; 15336 } 15337 id = ID_ATTRSET; 15338 } 15339 else if (rb_enc_isupper(m[0], enc)) { 15340 id = ID_CONST; 15341 } 15342 else { 15343 id = ID_LOCAL; 15344 } 15345 break; 15346 } 15347 mb = 0; 15348 if (!rb_enc_isdigit(*m, enc)) { 15349 while (m <= name + last && is_identchar(m, e, enc)) { 15350 if (ISASCII(*m)) { 15351 m++; 15352 } 15353 else { 15354 mb = 1; 15355 m += rb_enc_mbclen(m, e, enc); 15356 } 15357 } 15358 } 15359 if (m - name < len) id = ID_JUNK; 15360 if (enc != rb_usascii_encoding()) { 15361 /* 15362 * this clause makes sense only when called from other than 15363 * rb_intern_str() taking care of code-range. 15364 */ 15365 if (!mb) { 15366 for (; m <= name + len; ++m) { 15367 if (!ISASCII(*m)) goto mbstr; 15368 } 15369 enc = rb_usascii_encoding(); 15370 } 15371 mbstr:; 15372 } 15373 new_id: 15374 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 15375 if (len > 20) { 15376 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 15377 name); 15378 } 15379 else { 15380 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 15381 (int)len, name); 15382 } 15383 } 15384 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 15385 id_register: 15386 return register_symid(id, name, len, enc); 15387 } 15388 15389 ID 15390 rb_intern2(const char *name, long len) 15391 { 15392 return rb_intern3(name, len, rb_usascii_encoding()); 15393 } 15394 15395 #undef rb_intern 15396 ID 15397 rb_intern(const char *name) 15398 { 15399 return rb_intern2(name, strlen(name)); 15400 } 15401 15402 ID 15403 rb_intern_str(VALUE str) 15404 { 15405 rb_encoding *enc; 15406 ID id; 15407 15408 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 15409 enc = rb_usascii_encoding(); 15410 } 15411 else { 15412 enc = rb_enc_get(str); 15413 } 15414 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); 15415 RB_GC_GUARD(str); 15416 return id; 15417 } 15418 15419 VALUE 15420 rb_id2str(ID id) 15421 { 15422 st_data_t data; 15423 15424 if (id < tLAST_TOKEN) { 15425 int i = 0; 15426 15427 if (id < INT_MAX && rb_ispunct((int)id)) { 15428 VALUE str = global_symbols.op_sym[i = (int)id]; 15429 if (!str) { 15430 char name[2]; 15431 name[0] = (char)id; 15432 name[1] = 0; 15433 str = rb_usascii_str_new(name, 1); 15434 OBJ_FREEZE(str); 15435 global_symbols.op_sym[i] = str; 15436 } 15437 return str; 15438 } 15439 for (i = 0; i < op_tbl_count; i++) { 15440 if (op_tbl[i].token == id) { 15441 VALUE str = global_symbols.op_sym[i]; 15442 if (!str) { 15443 str = rb_usascii_str_new2(op_tbl[i].name); 15444 OBJ_FREEZE(str); 15445 global_symbols.op_sym[i] = str; 15446 } 15447 return str; 15448 } 15449 } 15450 } 15451 15452 if (st_lookup(global_symbols.id_str, id, &data)) { 15453 VALUE str = (VALUE)data; 15454 if (RBASIC(str)->klass == 0) 15455 RBASIC(str)->klass = rb_cString; 15456 return str; 15457 } 15458 15459 if (is_attrset_id(id)) { 15460 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 15461 VALUE str; 15462 15463 while (!(str = rb_id2str(id2))) { 15464 if (!is_local_id(id2)) return 0; 15465 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 15466 } 15467 str = rb_str_dup(str); 15468 rb_str_cat(str, "=", 1); 15469 rb_intern_str(str); 15470 if (st_lookup(global_symbols.id_str, id, &data)) { 15471 VALUE str = (VALUE)data; 15472 if (RBASIC(str)->klass == 0) 15473 RBASIC(str)->klass = rb_cString; 15474 return str; 15475 } 15476 } 15477 return 0; 15478 } 15479 15480 const char * 15481 rb_id2name(ID id) 15482 { 15483 VALUE str = rb_id2str(id); 15484 15485 if (!str) return 0; 15486 return RSTRING_PTR(str); 15487 } 15488 15489 static int 15490 symbols_i(VALUE sym, ID value, VALUE ary) 15491 { 15492 rb_ary_push(ary, ID2SYM(value)); 15493 return ST_CONTINUE; 15494 } 15495 15496 /* 15497 * call-seq: 15498 * Symbol.all_symbols => array 15499 * 15500 * Returns an array of all the symbols currently in Ruby's symbol 15501 * table. 15502 * 15503 * Symbol.all_symbols.size #=> 903 15504 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 15505 * :chown, :EOFError, :$;, :String, 15506 * :LOCK_SH, :"setuid?", :$<, 15507 * :default_proc, :compact, :extend, 15508 * :Tms, :getwd, :$=, :ThreadGroup, 15509 * :wait2, :$>] 15510 */ 15511 15512 VALUE 15513 rb_sym_all_symbols(void) 15514 { 15515 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 15516 15517 st_foreach(global_symbols.sym_id, symbols_i, ary); 15518 return ary; 15519 } 15520 15521 int 15522 rb_is_const_id(ID id) 15523 { 15524 return is_const_id(id); 15525 } 15526 15527 int 15528 rb_is_class_id(ID id) 15529 { 15530 return is_class_id(id); 15531 } 15532 15533 int 15534 rb_is_instance_id(ID id) 15535 { 15536 return is_instance_id(id); 15537 } 15538 15539 int 15540 rb_is_local_id(ID id) 15541 { 15542 return is_local_id(id); 15543 } 15544 15545 int 15546 rb_is_junk_id(ID id) 15547 { 15548 return is_junk_id(id); 15549 } 15550 15551 #endif /* !RIPPER */ 15552 15553 static void 15554 parser_initialize(struct parser_params *parser) 15555 { 15556 parser->eofp = Qfalse; 15557 15558 parser->parser_lex_strterm = 0; 15559 parser->parser_cond_stack = 0; 15560 parser->parser_cmdarg_stack = 0; 15561 parser->parser_class_nest = 0; 15562 parser->parser_paren_nest = 0; 15563 parser->parser_lpar_beg = 0; 15564 parser->parser_in_single = 0; 15565 parser->parser_in_def = 0; 15566 parser->parser_in_defined = 0; 15567 parser->parser_compile_for_eval = 0; 15568 parser->parser_cur_mid = 0; 15569 parser->parser_tokenbuf = NULL; 15570 parser->parser_tokidx = 0; 15571 parser->parser_toksiz = 0; 15572 parser->parser_heredoc_end = 0; 15573 parser->parser_command_start = TRUE; 15574 parser->parser_deferred_nodes = 0; 15575 parser->parser_lex_pbeg = 0; 15576 parser->parser_lex_p = 0; 15577 parser->parser_lex_pend = 0; 15578 parser->parser_lvtbl = 0; 15579 parser->parser_ruby__end__seen = 0; 15580 parser->parser_ruby_sourcefile = 0; 15581 #ifndef RIPPER 15582 parser->is_ripper = 0; 15583 parser->parser_eval_tree_begin = 0; 15584 parser->parser_eval_tree = 0; 15585 #else 15586 parser->is_ripper = 1; 15587 parser->parser_ruby_sourcefile_string = Qnil; 15588 parser->delayed = Qnil; 15589 15590 parser->result = Qnil; 15591 parser->parsing_thread = Qnil; 15592 parser->toplevel_p = TRUE; 15593 #endif 15594 #ifdef YYMALLOC 15595 parser->heap = NULL; 15596 #endif 15597 parser->enc = rb_usascii_encoding(); 15598 } 15599 15600 #ifdef RIPPER 15601 #define parser_mark ripper_parser_mark 15602 #define parser_free ripper_parser_free 15603 #endif 15604 15605 static void 15606 parser_mark(void *ptr) 15607 { 15608 struct parser_params *p = (struct parser_params*)ptr; 15609 15610 rb_gc_mark((VALUE)p->parser_lex_strterm); 15611 rb_gc_mark((VALUE)p->parser_deferred_nodes); 15612 rb_gc_mark(p->parser_lex_input); 15613 rb_gc_mark(p->parser_lex_lastline); 15614 rb_gc_mark(p->parser_lex_nextline); 15615 #ifndef RIPPER 15616 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 15617 rb_gc_mark((VALUE)p->parser_eval_tree) ; 15618 rb_gc_mark(p->debug_lines); 15619 #else 15620 rb_gc_mark(p->parser_ruby_sourcefile_string); 15621 rb_gc_mark(p->delayed); 15622 rb_gc_mark(p->value); 15623 rb_gc_mark(p->result); 15624 rb_gc_mark(p->parsing_thread); 15625 #endif 15626 #ifdef YYMALLOC 15627 rb_gc_mark((VALUE)p->heap); 15628 #endif 15629 } 15630 15631 static void 15632 parser_free(void *ptr) 15633 { 15634 struct parser_params *p = (struct parser_params*)ptr; 15635 struct local_vars *local, *prev; 15636 15637 if (p->parser_tokenbuf) { 15638 xfree(p->parser_tokenbuf); 15639 } 15640 for (local = p->parser_lvtbl; local; local = prev) { 15641 if (local->vars) xfree(local->vars); 15642 prev = local->prev; 15643 xfree(local); 15644 } 15645 #ifndef RIPPER 15646 xfree(p->parser_ruby_sourcefile); 15647 #endif 15648 xfree(p); 15649 } 15650 15651 static size_t 15652 parser_memsize(const void *ptr) 15653 { 15654 struct parser_params *p = (struct parser_params*)ptr; 15655 struct local_vars *local; 15656 size_t size = sizeof(*p); 15657 15658 if (!ptr) return 0; 15659 size += p->parser_toksiz; 15660 for (local = p->parser_lvtbl; local; local = local->prev) { 15661 size += sizeof(*local); 15662 if (local->vars) size += local->vars->capa * sizeof(ID); 15663 } 15664 #ifndef RIPPER 15665 if (p->parser_ruby_sourcefile) { 15666 size += strlen(p->parser_ruby_sourcefile) + 1; 15667 } 15668 #endif 15669 return size; 15670 } 15671 15672 static 15673 #ifndef RIPPER 15674 const 15675 #endif 15676 rb_data_type_t parser_data_type = { 15677 "parser", 15678 { 15679 parser_mark, 15680 parser_free, 15681 parser_memsize, 15682 }, 15683 }; 15684 15685 #ifndef RIPPER 15686 #undef rb_reserved_word 15687 15688 const struct kwtable * 15689 rb_reserved_word(const char *str, unsigned int len) 15690 { 15691 return reserved_word(str, len); 15692 } 15693 15694 static struct parser_params * 15695 parser_new(void) 15696 { 15697 struct parser_params *p; 15698 15699 p = ALLOC_N(struct parser_params, 1); 15700 MEMZERO(p, struct parser_params, 1); 15701 parser_initialize(p); 15702 return p; 15703 } 15704 15705 VALUE 15706 rb_parser_new(void) 15707 { 15708 struct parser_params *p = parser_new(); 15709 15710 return TypedData_Wrap_Struct(0, &parser_data_type, p); 15711 } 15712 15713 /* 15714 * call-seq: 15715 * ripper#end_seen? -> Boolean 15716 * 15717 * Return true if parsed source ended by +\_\_END\_\_+. 15718 */ 15719 VALUE 15720 rb_parser_end_seen_p(VALUE vparser) 15721 { 15722 struct parser_params *parser; 15723 15724 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15725 return ruby__end__seen ? Qtrue : Qfalse; 15726 } 15727 15728 /* 15729 * call-seq: 15730 * ripper#encoding -> encoding 15731 * 15732 * Return encoding of the source. 15733 */ 15734 VALUE 15735 rb_parser_encoding(VALUE vparser) 15736 { 15737 struct parser_params *parser; 15738 15739 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15740 return rb_enc_from_encoding(parser->enc); 15741 } 15742 15743 /* 15744 * call-seq: 15745 * ripper.yydebug -> true or false 15746 * 15747 * Get yydebug. 15748 */ 15749 VALUE 15750 rb_parser_get_yydebug(VALUE self) 15751 { 15752 struct parser_params *parser; 15753 15754 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 15755 return yydebug ? Qtrue : Qfalse; 15756 } 15757 15758 /* 15759 * call-seq: 15760 * ripper.yydebug = flag 15761 * 15762 * Set yydebug. 15763 */ 15764 VALUE 15765 rb_parser_set_yydebug(VALUE self, VALUE flag) 15766 { 15767 struct parser_params *parser; 15768 15769 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 15770 yydebug = RTEST(flag); 15771 return flag; 15772 } 15773 15774 #ifdef YYMALLOC 15775 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 15776 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 15777 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 15778 (n)->u3.cnt = (c), (p)) 15779 15780 void * 15781 rb_parser_malloc(struct parser_params *parser, size_t size) 15782 { 15783 size_t cnt = HEAPCNT(1, size); 15784 NODE *n = NEWHEAP(); 15785 void *ptr = xmalloc(size); 15786 15787 return ADD2HEAP(n, cnt, ptr); 15788 } 15789 15790 void * 15791 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 15792 { 15793 size_t cnt = HEAPCNT(nelem, size); 15794 NODE *n = NEWHEAP(); 15795 void *ptr = xcalloc(nelem, size); 15796 15797 return ADD2HEAP(n, cnt, ptr); 15798 } 15799 15800 void * 15801 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 15802 { 15803 NODE *n; 15804 size_t cnt = HEAPCNT(1, size); 15805 15806 if (ptr && (n = parser->heap) != NULL) { 15807 do { 15808 if (n->u1.node == ptr) { 15809 n->u1.node = ptr = xrealloc(ptr, size); 15810 if (n->u3.cnt) n->u3.cnt = cnt; 15811 return ptr; 15812 } 15813 } while ((n = n->u2.node) != NULL); 15814 } 15815 n = NEWHEAP(); 15816 ptr = xrealloc(ptr, size); 15817 return ADD2HEAP(n, cnt, ptr); 15818 } 15819 15820 void 15821 rb_parser_free(struct parser_params *parser, void *ptr) 15822 { 15823 NODE **prev = &parser->heap, *n; 15824 15825 while ((n = *prev) != NULL) { 15826 if (n->u1.node == ptr) { 15827 *prev = n->u2.node; 15828 rb_gc_force_recycle((VALUE)n); 15829 break; 15830 } 15831 prev = &n->u2.node; 15832 } 15833 xfree(ptr); 15834 } 15835 #endif 15836 #endif 15837 15838 #ifdef RIPPER 15839 #ifdef RIPPER_DEBUG 15840 extern int rb_is_pointer_to_heap(VALUE); 15841 15842 /* :nodoc: */ 15843 static VALUE 15844 ripper_validate_object(VALUE self, VALUE x) 15845 { 15846 if (x == Qfalse) return x; 15847 if (x == Qtrue) return x; 15848 if (x == Qnil) return x; 15849 if (x == Qundef) 15850 rb_raise(rb_eArgError, "Qundef given"); 15851 if (FIXNUM_P(x)) return x; 15852 if (SYMBOL_P(x)) return x; 15853 if (!rb_is_pointer_to_heap(x)) 15854 rb_raise(rb_eArgError, "invalid pointer: %p", x); 15855 switch (TYPE(x)) { 15856 case T_STRING: 15857 case T_OBJECT: 15858 case T_ARRAY: 15859 case T_BIGNUM: 15860 case T_FLOAT: 15861 return x; 15862 case T_NODE: 15863 if (nd_type(x) != NODE_LASGN) { 15864 rb_raise(rb_eArgError, "NODE given: %p", x); 15865 } 15866 return ((NODE *)x)->nd_rval; 15867 default: 15868 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 15869 x, rb_obj_classname(x)); 15870 } 15871 return x; 15872 } 15873 #endif 15874 15875 #define validate(x) ((x) = get_value(x)) 15876 15877 static VALUE 15878 ripper_dispatch0(struct parser_params *parser, ID mid) 15879 { 15880 return rb_funcall(parser->value, mid, 0); 15881 } 15882 15883 static VALUE 15884 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 15885 { 15886 validate(a); 15887 return rb_funcall(parser->value, mid, 1, a); 15888 } 15889 15890 static VALUE 15891 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 15892 { 15893 validate(a); 15894 validate(b); 15895 return rb_funcall(parser->value, mid, 2, a, b); 15896 } 15897 15898 static VALUE 15899 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 15900 { 15901 validate(a); 15902 validate(b); 15903 validate(c); 15904 return rb_funcall(parser->value, mid, 3, a, b, c); 15905 } 15906 15907 static VALUE 15908 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 15909 { 15910 validate(a); 15911 validate(b); 15912 validate(c); 15913 validate(d); 15914 return rb_funcall(parser->value, mid, 4, a, b, c, d); 15915 } 15916 15917 static VALUE 15918 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 15919 { 15920 validate(a); 15921 validate(b); 15922 validate(c); 15923 validate(d); 15924 validate(e); 15925 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 15926 } 15927 15928 static const struct kw_assoc { 15929 ID id; 15930 const char *name; 15931 } keyword_to_name[] = { 15932 {keyword_class, "class"}, 15933 {keyword_module, "module"}, 15934 {keyword_def, "def"}, 15935 {keyword_undef, "undef"}, 15936 {keyword_begin, "begin"}, 15937 {keyword_rescue, "rescue"}, 15938 {keyword_ensure, "ensure"}, 15939 {keyword_end, "end"}, 15940 {keyword_if, "if"}, 15941 {keyword_unless, "unless"}, 15942 {keyword_then, "then"}, 15943 {keyword_elsif, "elsif"}, 15944 {keyword_else, "else"}, 15945 {keyword_case, "case"}, 15946 {keyword_when, "when"}, 15947 {keyword_while, "while"}, 15948 {keyword_until, "until"}, 15949 {keyword_for, "for"}, 15950 {keyword_break, "break"}, 15951 {keyword_next, "next"}, 15952 {keyword_redo, "redo"}, 15953 {keyword_retry, "retry"}, 15954 {keyword_in, "in"}, 15955 {keyword_do, "do"}, 15956 {keyword_do_cond, "do"}, 15957 {keyword_do_block, "do"}, 15958 {keyword_return, "return"}, 15959 {keyword_yield, "yield"}, 15960 {keyword_super, "super"}, 15961 {keyword_self, "self"}, 15962 {keyword_nil, "nil"}, 15963 {keyword_true, "true"}, 15964 {keyword_false, "false"}, 15965 {keyword_and, "and"}, 15966 {keyword_or, "or"}, 15967 {keyword_not, "not"}, 15968 {modifier_if, "if"}, 15969 {modifier_unless, "unless"}, 15970 {modifier_while, "while"}, 15971 {modifier_until, "until"}, 15972 {modifier_rescue, "rescue"}, 15973 {keyword_alias, "alias"}, 15974 {keyword_defined, "defined?"}, 15975 {keyword_BEGIN, "BEGIN"}, 15976 {keyword_END, "END"}, 15977 {keyword__LINE__, "__LINE__"}, 15978 {keyword__FILE__, "__FILE__"}, 15979 {keyword__ENCODING__, "__ENCODING__"}, 15980 {0, NULL} 15981 }; 15982 15983 static const char* 15984 keyword_id_to_str(ID id) 15985 { 15986 const struct kw_assoc *a; 15987 15988 for (a = keyword_to_name; a->id; a++) { 15989 if (a->id == id) 15990 return a->name; 15991 } 15992 return NULL; 15993 } 15994 15995 #undef ripper_id2sym 15996 static VALUE 15997 ripper_id2sym(ID id) 15998 { 15999 const char *name; 16000 char buf[8]; 16001 16002 if (id <= 256) { 16003 buf[0] = (char)id; 16004 buf[1] = '\0'; 16005 return ID2SYM(rb_intern2(buf, 1)); 16006 } 16007 if ((name = keyword_id_to_str(id))) { 16008 return ID2SYM(rb_intern(name)); 16009 } 16010 switch (id) { 16011 case tOROP: 16012 name = "||"; 16013 break; 16014 case tANDOP: 16015 name = "&&"; 16016 break; 16017 default: 16018 name = rb_id2name(id); 16019 if (!name) { 16020 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 16021 } 16022 return ID2SYM(id); 16023 } 16024 return ID2SYM(rb_intern(name)); 16025 } 16026 16027 static ID 16028 ripper_get_id(VALUE v) 16029 { 16030 NODE *nd; 16031 if (!RB_TYPE_P(v, T_NODE)) return 0; 16032 nd = (NODE *)v; 16033 if (nd_type(nd) != NODE_LASGN) return 0; 16034 return nd->nd_vid; 16035 } 16036 16037 static VALUE 16038 ripper_get_value(VALUE v) 16039 { 16040 NODE *nd; 16041 if (v == Qundef) return Qnil; 16042 if (!RB_TYPE_P(v, T_NODE)) return v; 16043 nd = (NODE *)v; 16044 if (nd_type(nd) != NODE_LASGN) return Qnil; 16045 return nd->nd_rval; 16046 } 16047 16048 static void 16049 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 16050 { 16051 VALUE str; 16052 va_list args; 16053 16054 va_start(args, fmt); 16055 str = rb_vsprintf(fmt, args); 16056 va_end(args); 16057 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 16058 } 16059 16060 static void 16061 ripper_warn0(struct parser_params *parser, const char *fmt) 16062 { 16063 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 16064 } 16065 16066 static void 16067 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 16068 { 16069 rb_funcall(parser->value, rb_intern("warn"), 2, 16070 STR_NEW2(fmt), INT2NUM(a)); 16071 } 16072 16073 #if 0 16074 static void 16075 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 16076 { 16077 rb_funcall(parser->value, rb_intern("warn"), 2, 16078 STR_NEW2(fmt), STR_NEW2(str)); 16079 } 16080 #endif 16081 16082 static void 16083 ripper_warning0(struct parser_params *parser, const char *fmt) 16084 { 16085 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 16086 } 16087 16088 static void 16089 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 16090 { 16091 rb_funcall(parser->value, rb_intern("warning"), 2, 16092 STR_NEW2(fmt), STR_NEW2(str)); 16093 } 16094 16095 static VALUE 16096 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 16097 { 16098 return rb_funcall(src, ripper_id_gets, 0); 16099 } 16100 16101 static VALUE 16102 ripper_s_allocate(VALUE klass) 16103 { 16104 struct parser_params *p; 16105 VALUE self; 16106 16107 p = ALLOC_N(struct parser_params, 1); 16108 MEMZERO(p, struct parser_params, 1); 16109 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 16110 p->value = self; 16111 return self; 16112 } 16113 16114 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 16115 16116 /* 16117 * call-seq: 16118 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 16119 * 16120 * Create a new Ripper object. 16121 * _src_ must be a String, an IO, or an Object which has #gets method. 16122 * 16123 * This method does not starts parsing. 16124 * See also Ripper#parse and Ripper.parse. 16125 */ 16126 static VALUE 16127 ripper_initialize(int argc, VALUE *argv, VALUE self) 16128 { 16129 struct parser_params *parser; 16130 VALUE src, fname, lineno; 16131 16132 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16133 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 16134 if (rb_obj_respond_to(src, ripper_id_gets, 0)) { 16135 parser->parser_lex_gets = ripper_lex_get_generic; 16136 } 16137 else { 16138 StringValue(src); 16139 parser->parser_lex_gets = lex_get_str; 16140 } 16141 parser->parser_lex_input = src; 16142 parser->eofp = Qfalse; 16143 if (NIL_P(fname)) { 16144 fname = STR_NEW2("(ripper)"); 16145 } 16146 else { 16147 StringValue(fname); 16148 } 16149 parser_initialize(parser); 16150 16151 parser->parser_ruby_sourcefile_string = fname; 16152 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 16153 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 16154 16155 return Qnil; 16156 } 16157 16158 struct ripper_args { 16159 struct parser_params *parser; 16160 int argc; 16161 VALUE *argv; 16162 }; 16163 16164 static VALUE 16165 ripper_parse0(VALUE parser_v) 16166 { 16167 struct parser_params *parser; 16168 16169 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16170 parser_prepare(parser); 16171 ripper_yyparse((void*)parser); 16172 return parser->result; 16173 } 16174 16175 static VALUE 16176 ripper_ensure(VALUE parser_v) 16177 { 16178 struct parser_params *parser; 16179 16180 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16181 parser->parsing_thread = Qnil; 16182 return Qnil; 16183 } 16184 16185 /* 16186 * call-seq: 16187 * ripper#parse 16188 * 16189 * Start parsing and returns the value of the root action. 16190 */ 16191 static VALUE 16192 ripper_parse(VALUE self) 16193 { 16194 struct parser_params *parser; 16195 16196 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16197 if (!ripper_initialized_p(parser)) { 16198 rb_raise(rb_eArgError, "method called for uninitialized object"); 16199 } 16200 if (!NIL_P(parser->parsing_thread)) { 16201 if (parser->parsing_thread == rb_thread_current()) 16202 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 16203 else 16204 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 16205 } 16206 parser->parsing_thread = rb_thread_current(); 16207 rb_ensure(ripper_parse0, self, ripper_ensure, self); 16208 16209 return parser->result; 16210 } 16211 16212 /* 16213 * call-seq: 16214 * ripper#column -> Integer 16215 * 16216 * Return column number of current parsing line. 16217 * This number starts from 0. 16218 */ 16219 static VALUE 16220 ripper_column(VALUE self) 16221 { 16222 struct parser_params *parser; 16223 long col; 16224 16225 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16226 if (!ripper_initialized_p(parser)) { 16227 rb_raise(rb_eArgError, "method called for uninitialized object"); 16228 } 16229 if (NIL_P(parser->parsing_thread)) return Qnil; 16230 col = parser->tokp - parser->parser_lex_pbeg; 16231 return LONG2NUM(col); 16232 } 16233 16234 /* 16235 * call-seq: 16236 * ripper#filename -> String 16237 * 16238 * Return current parsing filename. 16239 */ 16240 static VALUE 16241 ripper_filename(VALUE self) 16242 { 16243 struct parser_params *parser; 16244 16245 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16246 if (!ripper_initialized_p(parser)) { 16247 rb_raise(rb_eArgError, "method called for uninitialized object"); 16248 } 16249 return parser->parser_ruby_sourcefile_string; 16250 } 16251 16252 /* 16253 * call-seq: 16254 * ripper#lineno -> Integer 16255 * 16256 * Return line number of current parsing line. 16257 * This number starts from 1. 16258 */ 16259 static VALUE 16260 ripper_lineno(VALUE self) 16261 { 16262 struct parser_params *parser; 16263 16264 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16265 if (!ripper_initialized_p(parser)) { 16266 rb_raise(rb_eArgError, "method called for uninitialized object"); 16267 } 16268 if (NIL_P(parser->parsing_thread)) return Qnil; 16269 return INT2NUM(parser->parser_ruby_sourceline); 16270 } 16271 16272 #ifdef RIPPER_DEBUG 16273 /* :nodoc: */ 16274 static VALUE 16275 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 16276 { 16277 StringValue(msg); 16278 if (obj == Qundef) { 16279 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 16280 } 16281 return Qnil; 16282 } 16283 16284 /* :nodoc: */ 16285 static VALUE 16286 ripper_value(VALUE self, VALUE obj) 16287 { 16288 return ULONG2NUM(obj); 16289 } 16290 #endif 16291 16292 16293 void 16294 InitVM_ripper(void) 16295 { 16296 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 16297 } 16298 16299 void 16300 Init_ripper(void) 16301 { 16302 VALUE Ripper; 16303 16304 InitVM(ripper); 16305 Ripper = rb_define_class("Ripper", rb_cObject); 16306 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 16307 rb_define_alloc_func(Ripper, ripper_s_allocate); 16308 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 16309 rb_define_method(Ripper, "parse", ripper_parse, 0); 16310 rb_define_method(Ripper, "column", ripper_column, 0); 16311 rb_define_method(Ripper, "filename", ripper_filename, 0); 16312 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 16313 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 16314 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 16315 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 16316 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 16317 #ifdef RIPPER_DEBUG 16318 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 16319 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 16320 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 16321 #endif 16322 16323 ripper_id_gets = rb_intern("gets"); 16324 ripper_init_eventids1(Ripper); 16325 ripper_init_eventids2(Ripper); 16326 /* ensure existing in symbol table */ 16327 (void)rb_intern("||"); 16328 (void)rb_intern("&&"); 16329 16330 # if 0 16331 /* Hack to let RDoc document SCRIPT_LINES__ */ 16332 16333 /* 16334 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 16335 * after the assignment will be added as an Array of lines with the file 16336 * name as the key. 16337 */ 16338 rb_define_global_const("SCRIPT_LINES__", Qnil); 16339 #endif 16340 16341 } 16342 #endif /* RIPPER */ 16343 16344