|
Ruby 1.9.2p180(2011-02-18revision30909)
|
00001 /* A Bison parser, made by GNU Bison 2.4.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 2009, 2010 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 3 of the License, or 00011 (at your option) 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, see <http://www.gnu.org/licenses/>. */ 00020 00021 /* As a special exception, you may create a larger work that contains 00022 part or all of the Bison parser skeleton and distribute that work 00023 under terms of your choice, so long as that work isn't itself a 00024 parser generator using the skeleton or a modified version thereof 00025 as a parser skeleton. Alternatively, if you modify or redistribute 00026 the parser skeleton itself, you may (at your option) remove this 00027 special exception, which will cause the skeleton and the resulting 00028 Bison output files to be licensed under the GNU General Public 00029 License without this special exception. 00030 00031 This special exception was added by the Free Software Foundation in 00032 version 2.2 of Bison. */ 00033 00034 /* C LALR(1) parser skeleton written by Richard Stallman, by 00035 simplifying the original so-called "semantic" parser. */ 00036 00037 /* All symbols defined below should begin with yy or YY, to avoid 00038 infringing on user name space. This should be done even for local 00039 variables, as they might otherwise be expanded by user macros. 00040 There are some unavoidable exceptions within include files to 00041 define necessary library symbols; they are noted "INFRINGES ON 00042 USER NAME SPACE" below. */ 00043 00044 /* Identify Bison output. */ 00045 #define YYBISON 1 00046 00047 /* Bison version. */ 00048 #define YYBISON_VERSION "2.4.3" 00049 00050 /* Skeleton name. */ 00051 #define YYSKELETON_NAME "yacc.c" 00052 00053 /* Pure parsers. */ 00054 #define YYPURE 1 00055 00056 /* Push parsers. */ 00057 #define YYPUSH 0 00058 00059 /* Pull parsers. */ 00060 #define YYPULL 1 00061 00062 /* Using locations. */ 00063 #define YYLSP_NEEDED 0 00064 00065 00066 00067 /* Copy the first part of user declarations. */ 00068 00069 /* Line 189 of yacc.c */ 00070 #line 12 "ripper.y" 00071 00072 00073 #define YYDEBUG 1 00074 #define YYERROR_VERBOSE 1 00075 #define YYSTACK_USE_ALLOCA 0 00076 00077 #include "ruby/ruby.h" 00078 #include "ruby/st.h" 00079 #include "ruby/encoding.h" 00080 #include "node.h" 00081 #include "parse.h" 00082 #include "id.h" 00083 #include "regenc.h" 00084 #include <stdio.h> 00085 #include <errno.h> 00086 #include <ctype.h> 00087 00088 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00089 00090 #define YYMALLOC(size) rb_parser_malloc(parser, size) 00091 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size) 00092 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) 00093 #define YYFREE(ptr) rb_parser_free(parser, ptr) 00094 #define malloc YYMALLOC 00095 #define realloc YYREALLOC 00096 #define calloc YYCALLOC 00097 #define free YYFREE 00098 00099 #ifndef RIPPER 00100 static ID register_symid(ID, const char *, long, rb_encoding *); 00101 #define REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc) 00102 #include "id.c" 00103 #endif 00104 00105 #define is_notop_id(id) ((id)>tLAST_TOKEN) 00106 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00107 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00108 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00109 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00110 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00111 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00112 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00113 00114 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00115 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00116 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00117 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00118 00119 enum lex_state_e { 00120 EXPR_BEG, /* ignore newline, +/- is a sign. */ 00121 EXPR_END, /* newline significant, +/- is an operator. */ 00122 EXPR_ENDARG, /* ditto, and unbound braces. */ 00123 EXPR_ENDFN, /* ditto, and unbound braces. */ 00124 EXPR_ARG, /* newline significant, +/- is an operator. */ 00125 EXPR_CMDARG, /* newline significant, +/- is an operator. */ 00126 EXPR_MID, /* newline significant, +/- is an operator. */ 00127 EXPR_FNAME, /* ignore newline, no reserved words. */ 00128 EXPR_DOT, /* right after `.' or `::', no reserved words. */ 00129 EXPR_CLASS, /* immediate after `class', no here document. */ 00130 EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */ 00131 EXPR_MAX_STATE 00132 }; 00133 00134 typedef VALUE stack_type; 00135 00136 # define BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1)) 00137 # define BITSTACK_POP(stack) (stack = stack >> 1) 00138 # define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1)) 00139 # define BITSTACK_SET_P(stack) (stack&1) 00140 00141 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, n) 00142 #define COND_POP() BITSTACK_POP(cond_stack) 00143 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00144 #define COND_P() BITSTACK_SET_P(cond_stack) 00145 00146 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n) 00147 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00148 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00149 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00150 00151 struct vtable { 00152 ID *tbl; 00153 int pos; 00154 int capa; 00155 struct vtable *prev; 00156 }; 00157 00158 struct local_vars { 00159 struct vtable *args; 00160 struct vtable *vars; 00161 struct local_vars *prev; 00162 }; 00163 00164 #define DVARS_INHERIT ((void*)1) 00165 #define DVARS_TOPSCOPE NULL 00166 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00167 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00168 00169 static int 00170 vtable_size(const struct vtable *tbl) 00171 { 00172 if (POINTER_P(tbl)) { 00173 return tbl->pos; 00174 } 00175 else { 00176 return 0; 00177 } 00178 } 00179 00180 #define VTBL_DEBUG 0 00181 00182 static struct vtable * 00183 vtable_alloc(struct vtable *prev) 00184 { 00185 struct vtable *tbl = ALLOC(struct vtable); 00186 tbl->pos = 0; 00187 tbl->capa = 8; 00188 tbl->tbl = ALLOC_N(ID, tbl->capa); 00189 tbl->prev = prev; 00190 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00191 return tbl; 00192 } 00193 00194 static void 00195 vtable_free(struct vtable *tbl) 00196 { 00197 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00198 if (POINTER_P(tbl)) { 00199 if (tbl->tbl) { 00200 xfree(tbl->tbl); 00201 } 00202 xfree(tbl); 00203 } 00204 } 00205 00206 static void 00207 vtable_add(struct vtable *tbl, ID id) 00208 { 00209 if (!POINTER_P(tbl)) { 00210 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00211 } 00212 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00213 00214 if (tbl->pos == tbl->capa) { 00215 tbl->capa = tbl->capa * 2; 00216 REALLOC_N(tbl->tbl, ID, tbl->capa); 00217 } 00218 tbl->tbl[tbl->pos++] = id; 00219 } 00220 00221 static int 00222 vtable_included(const struct vtable * tbl, ID id) 00223 { 00224 int i; 00225 00226 if (POINTER_P(tbl)) { 00227 for (i = 0; i < tbl->pos; i++) { 00228 if (tbl->tbl[i] == id) { 00229 return 1; 00230 } 00231 } 00232 } 00233 return 0; 00234 } 00235 00236 00237 #ifndef RIPPER 00238 typedef struct token_info { 00239 const char *token; 00240 int linenum; 00241 int column; 00242 int nonspc; 00243 struct token_info *next; 00244 } token_info; 00245 #endif 00246 00247 /* 00248 Structure of Lexer Buffer: 00249 00250 lex_pbeg tokp lex_p lex_pend 00251 | | | | 00252 |-----------+--------------+------------| 00253 |<------------>| 00254 token 00255 */ 00256 struct parser_params { 00257 int is_ripper; 00258 NODE *heap; 00259 00260 YYSTYPE *parser_yylval; 00261 VALUE eofp; 00262 00263 NODE *parser_lex_strterm; 00264 enum lex_state_e parser_lex_state; 00265 stack_type parser_cond_stack; 00266 stack_type parser_cmdarg_stack; 00267 int parser_class_nest; 00268 int parser_paren_nest; 00269 int parser_lpar_beg; 00270 int parser_in_single; 00271 int parser_in_def; 00272 int parser_compile_for_eval; 00273 VALUE parser_cur_mid; 00274 int parser_in_defined; 00275 char *parser_tokenbuf; 00276 int parser_tokidx; 00277 int parser_toksiz; 00278 VALUE parser_lex_input; 00279 VALUE parser_lex_lastline; 00280 VALUE parser_lex_nextline; 00281 const char *parser_lex_pbeg; 00282 const char *parser_lex_p; 00283 const char *parser_lex_pend; 00284 int parser_heredoc_end; 00285 int parser_command_start; 00286 NODE *parser_deferred_nodes; 00287 long parser_lex_gets_ptr; 00288 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00289 struct local_vars *parser_lvtbl; 00290 int parser_ruby__end__seen; 00291 int line_count; 00292 int has_shebang; 00293 char *parser_ruby_sourcefile; /* current source file */ 00294 int parser_ruby_sourceline; /* current line no. */ 00295 rb_encoding *enc; 00296 rb_encoding *utf8; 00297 00298 int parser_yydebug; 00299 00300 #ifndef RIPPER 00301 /* Ruby core only */ 00302 NODE *parser_eval_tree_begin; 00303 NODE *parser_eval_tree; 00304 VALUE debug_lines; 00305 VALUE coverage; 00306 int nerr; 00307 00308 token_info *parser_token_info; 00309 #else 00310 /* Ripper only */ 00311 VALUE parser_ruby_sourcefile_string; 00312 const char *tokp; 00313 VALUE delayed; 00314 int delayed_line; 00315 int delayed_col; 00316 00317 VALUE value; 00318 VALUE result; 00319 VALUE parsing_thread; 00320 int toplevel_p; 00321 #endif 00322 }; 00323 00324 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ 00325 (parser->utf8 = rb_utf8_encoding())) 00326 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) 00327 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc) 00328 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) 00329 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) 00330 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00331 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) 00332 00333 #ifdef YYMALLOC 00334 void *rb_parser_malloc(struct parser_params *, size_t); 00335 void *rb_parser_realloc(struct parser_params *, void *, size_t); 00336 void *rb_parser_calloc(struct parser_params *, size_t, size_t); 00337 void rb_parser_free(struct parser_params *, void *); 00338 #endif 00339 00340 static int parser_yyerror(struct parser_params*, const char*); 00341 #define yyerror(msg) parser_yyerror(parser, msg) 00342 00343 #define YYLEX_PARAM parser 00344 00345 #define lex_strterm (parser->parser_lex_strterm) 00346 #define lex_state (parser->parser_lex_state) 00347 #define cond_stack (parser->parser_cond_stack) 00348 #define cmdarg_stack (parser->parser_cmdarg_stack) 00349 #define class_nest (parser->parser_class_nest) 00350 #define paren_nest (parser->parser_paren_nest) 00351 #define lpar_beg (parser->parser_lpar_beg) 00352 #define in_single (parser->parser_in_single) 00353 #define in_def (parser->parser_in_def) 00354 #define compile_for_eval (parser->parser_compile_for_eval) 00355 #define cur_mid (parser->parser_cur_mid) 00356 #define in_defined (parser->parser_in_defined) 00357 #define tokenbuf (parser->parser_tokenbuf) 00358 #define tokidx (parser->parser_tokidx) 00359 #define toksiz (parser->parser_toksiz) 00360 #define lex_input (parser->parser_lex_input) 00361 #define lex_lastline (parser->parser_lex_lastline) 00362 #define lex_nextline (parser->parser_lex_nextline) 00363 #define lex_pbeg (parser->parser_lex_pbeg) 00364 #define lex_p (parser->parser_lex_p) 00365 #define lex_pend (parser->parser_lex_pend) 00366 #define heredoc_end (parser->parser_heredoc_end) 00367 #define command_start (parser->parser_command_start) 00368 #define deferred_nodes (parser->parser_deferred_nodes) 00369 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00370 #define lex_gets (parser->parser_lex_gets) 00371 #define lvtbl (parser->parser_lvtbl) 00372 #define ruby__end__seen (parser->parser_ruby__end__seen) 00373 #define ruby_sourceline (parser->parser_ruby_sourceline) 00374 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00375 #define yydebug (parser->parser_yydebug) 00376 #ifdef RIPPER 00377 #else 00378 #define ruby_eval_tree (parser->parser_eval_tree) 00379 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00380 #define ruby_debug_lines (parser->debug_lines) 00381 #define ruby_coverage (parser->coverage) 00382 #endif 00383 00384 static int yylex(void*, void*); 00385 00386 #ifndef RIPPER 00387 #define yyparse ruby_yyparse 00388 00389 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00390 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3) 00391 00392 static NODE *cond_gen(struct parser_params*,NODE*); 00393 #define cond(node) cond_gen(parser, node) 00394 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00395 #define logop(type,node1,node2) logop_gen(parser, type, node1, node2) 00396 00397 static NODE *newline_node(NODE*); 00398 static void fixpos(NODE*,NODE*); 00399 00400 static int value_expr_gen(struct parser_params*,NODE*); 00401 static void void_expr_gen(struct parser_params*,NODE*); 00402 static NODE *remove_begin(NODE*); 00403 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00404 #define void_expr0(node) void_expr_gen(parser, (node)) 00405 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00406 static void void_stmts_gen(struct parser_params*,NODE*); 00407 #define void_stmts(node) void_stmts_gen(parser, node) 00408 static void reduce_nodes_gen(struct parser_params*,NODE**); 00409 #define reduce_nodes(n) reduce_nodes_gen(parser,n) 00410 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00411 #define block_dup_check(n1,n2) block_dup_check_gen(parser,n1,n2) 00412 00413 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00414 #define block_append(h,t) block_append_gen(parser,h,t) 00415 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00416 #define list_append(l,i) list_append_gen(parser,l,i) 00417 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00418 #define list_concat(h,t) list_concat_gen(parser,h,t) 00419 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00420 #define arg_append(h,t) arg_append_gen(parser,h,t) 00421 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00422 #define arg_concat(h,t) arg_concat_gen(parser,h,t) 00423 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00424 #define literal_concat(h,t) literal_concat_gen(parser,h,t) 00425 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00426 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00427 #define new_evstr(n) new_evstr_gen(parser,n) 00428 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00429 #define evstr2dstr(n) evstr2dstr_gen(parser,n) 00430 static NODE *splat_array(NODE*); 00431 00432 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00433 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, recv,id,arg1) 00434 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00435 #define call_uni_op(recv,id) call_uni_op_gen(parser, recv,id) 00436 00437 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); 00438 #define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b) 00439 00440 static NODE *negate_lit(NODE*); 00441 static NODE *ret_args_gen(struct parser_params*,NODE*); 00442 #define ret_args(node) ret_args_gen(parser, node) 00443 static NODE *arg_blk_pass(NODE*,NODE*); 00444 static NODE *new_yield_gen(struct parser_params*,NODE*); 00445 #define new_yield(node) new_yield_gen(parser, node) 00446 00447 static NODE *gettable_gen(struct parser_params*,ID); 00448 #define gettable(id) gettable_gen(parser,id) 00449 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00450 #define assignable(id,node) assignable_gen(parser, id, node) 00451 00452 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00453 #define aryset(node1,node2) aryset_gen(parser, node1, node2) 00454 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00455 #define attrset(node,id) attrset_gen(parser, node, id) 00456 00457 static void rb_backref_error_gen(struct parser_params*,NODE*); 00458 #define rb_backref_error(n) rb_backref_error_gen(parser,n) 00459 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00460 #define node_assign(node1, node2) node_assign_gen(parser, node1, node2) 00461 00462 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00463 #define match_op(node1,node2) match_op_gen(parser, node1, node2) 00464 00465 static ID *local_tbl_gen(struct parser_params*); 00466 #define local_tbl() local_tbl_gen(parser) 00467 00468 static void fixup_nodes(NODE **); 00469 00470 extern int rb_dvar_defined(ID); 00471 extern int rb_local_defined(ID); 00472 extern int rb_parse_in_eval(void); 00473 extern int rb_parse_in_main(void); 00474 00475 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00476 #define reg_compile(str,options) reg_compile_gen(parser, str, options) 00477 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00478 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, str, options) 00479 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00480 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, str, options) 00481 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00482 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,regexp,match) 00483 00484 #define get_id(id) (id) 00485 #define get_value(val) (val) 00486 #else 00487 #define remove_begin(node) (node) 00488 #define rb_dvar_defined(id) 0 00489 #define rb_local_defined(id) 0 00490 static ID ripper_get_id(VALUE); 00491 #define get_id(id) ripper_get_id(id) 00492 static VALUE ripper_get_value(VALUE); 00493 #define get_value(val) ripper_get_value(val) 00494 static VALUE assignable_gen(struct parser_params*,VALUE); 00495 #define assignable(lhs,node) assignable_gen(parser, lhs) 00496 #endif /* !RIPPER */ 00497 00498 static ID formal_argument_gen(struct parser_params*, ID); 00499 #define formal_argument(id) formal_argument_gen(parser, id) 00500 static ID shadowing_lvar_gen(struct parser_params*,ID); 00501 #define shadowing_lvar(name) shadowing_lvar_gen(parser, name) 00502 static void new_bv_gen(struct parser_params*,ID); 00503 #define new_bv(id) new_bv_gen(parser, id) 00504 00505 static void local_push_gen(struct parser_params*,int); 00506 #define local_push(top) local_push_gen(parser,top) 00507 static void local_pop_gen(struct parser_params*); 00508 #define local_pop() local_pop_gen(parser) 00509 static int local_var_gen(struct parser_params*, ID); 00510 #define local_var(id) local_var_gen(parser, id); 00511 static int arg_var_gen(struct parser_params*, ID); 00512 #define arg_var(id) arg_var_gen(parser, id) 00513 static int local_id_gen(struct parser_params*, ID); 00514 #define local_id(id) local_id_gen(parser, id) 00515 static ID internal_id_gen(struct parser_params*); 00516 #define internal_id() internal_id_gen(parser) 00517 00518 static const struct vtable *dyna_push_gen(struct parser_params *); 00519 #define dyna_push() dyna_push_gen(parser) 00520 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00521 #define dyna_pop(node) dyna_pop_gen(parser, node) 00522 static int dyna_in_block_gen(struct parser_params*); 00523 #define dyna_in_block() dyna_in_block_gen(parser) 00524 #define dyna_var(id) local_var(id) 00525 static int dvar_defined_gen(struct parser_params*,ID); 00526 #define dvar_defined(id) dvar_defined_gen(parser, id) 00527 static int dvar_curr_gen(struct parser_params*,ID); 00528 #define dvar_curr(id) dvar_curr_gen(parser, id) 00529 00530 static int lvar_defined_gen(struct parser_params*, ID); 00531 #define lvar_defined(id) lvar_defined_gen(parser, id) 00532 00533 #define RE_OPTION_ONCE (1<<16) 00534 #define RE_OPTION_ENCODING_SHIFT 8 00535 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00536 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00537 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00538 #define RE_OPTION_MASK 0xff 00539 #define RE_OPTION_ARG_ENCODING_NONE 32 00540 00541 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00542 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00543 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00544 #define nd_func u1.id 00545 #if SIZEOF_SHORT == 2 00546 #define nd_term(node) ((signed short)(node)->u2.id) 00547 #else 00548 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00549 #endif 00550 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00551 #define nd_nest u3.cnt 00552 00553 /****** Ripper *******/ 00554 00555 #ifdef RIPPER 00556 #define RIPPER_VERSION "0.1.0" 00557 00558 #include "eventids1.c" 00559 #include "eventids2.c" 00560 static ID ripper_id_gets; 00561 00562 static VALUE ripper_dispatch0(struct parser_params*,ID); 00563 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00564 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00565 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00566 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00567 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00568 00569 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00570 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a) 00571 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b) 00572 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c) 00573 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d) 00574 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e) 00575 00576 #define yyparse ripper_yyparse 00577 00578 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00579 static VALUE ripper_id2sym(ID); 00580 #ifdef __GNUC__ 00581 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00582 ID2SYM(id) : ripper_id2sym(id)) 00583 #endif 00584 00585 #define arg_new() dispatch0(args_new) 00586 #define arg_add(l,a) dispatch2(args_add, l, a) 00587 #define arg_add_star(l,a) dispatch2(args_add_star, l, a) 00588 #define arg_add_block(l,b) dispatch2(args_add_block, l, b) 00589 #define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(args_add_block, l, b)) 00590 #define bare_assoc(v) dispatch1(bare_assoc_hash, v) 00591 #define arg_add_assocs(l,b) arg_add(l, bare_assoc(b)) 00592 00593 #define args2mrhs(a) dispatch1(mrhs_new_from_args, a) 00594 #define mrhs_new() dispatch0(mrhs_new) 00595 #define mrhs_add(l,a) dispatch2(mrhs_add, l, a) 00596 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a) 00597 00598 #define mlhs_new() dispatch0(mlhs_new) 00599 #define mlhs_add(l,a) dispatch2(mlhs_add, l, a) 00600 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a) 00601 00602 #define params_new(pars, opts, rest, pars2, blk) \ 00603 dispatch5(params, pars, opts, rest, pars2, blk) 00604 00605 #define blockvar_new(p,v) dispatch2(block_var, p, v) 00606 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, l, a) 00607 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, l, a) 00608 00609 #define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a)) 00610 #define method_arg(m,a) dispatch2(method_add_arg,m,a) 00611 #define method_add_block(m,b) dispatch2(method_add_block, m, b) 00612 00613 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00614 00615 #define FIXME 0 00616 00617 #endif /* RIPPER */ 00618 00619 #ifndef RIPPER 00620 # define ifndef_ripper(x) x 00621 #else 00622 # define ifndef_ripper(x) 00623 #endif 00624 00625 #ifndef RIPPER 00626 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt) 00627 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) 00628 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a) 00629 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt) 00630 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a) 00631 #else 00632 # define rb_warn0(fmt) ripper_warn0(parser, fmt) 00633 # define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a) 00634 # define rb_warnS(fmt,a) ripper_warnS(parser, fmt, a) 00635 # define rb_warning0(fmt) ripper_warning0(parser, fmt) 00636 # define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a) 00637 static void ripper_warn0(struct parser_params*, const char*); 00638 static void ripper_warnI(struct parser_params*, const char*, int); 00639 #if 0 00640 static void ripper_warnS(struct parser_params*, const char*, const char*); 00641 #endif 00642 static void ripper_warning0(struct parser_params*, const char*); 00643 static void ripper_warningS(struct parser_params*, const char*, const char*); 00644 #endif 00645 00646 #ifdef RIPPER 00647 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00648 # define rb_compile_error ripper_compile_error 00649 # define compile_error ripper_compile_error 00650 # define PARSER_ARG parser, 00651 #else 00652 # define compile_error parser->nerr++,rb_compile_error 00653 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, 00654 #endif 00655 00656 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00657 for instance). This is too low for Ruby to parse some files, such as 00658 date/format.rb, therefore bump the value up to at least Bison's default. */ 00659 #ifdef OLD_YACC 00660 #ifndef YYMAXDEPTH 00661 #define YYMAXDEPTH 10000 00662 #endif 00663 #endif 00664 00665 #ifndef RIPPER 00666 static void token_info_push(struct parser_params*, const char *token); 00667 static void token_info_pop(struct parser_params*, const char *token); 00668 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, token) : (void)0) 00669 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, token) : (void)0) 00670 #else 00671 #define token_info_push(token) /* nothing */ 00672 #define token_info_pop(token) /* nothing */ 00673 #endif 00674 00675 00676 /* Line 189 of yacc.c */ 00677 #line 678 "parse.c" 00678 00679 /* Enabling traces. */ 00680 #ifndef YYDEBUG 00681 # define YYDEBUG 1 00682 #endif 00683 00684 /* Enabling verbose error messages. */ 00685 #ifdef YYERROR_VERBOSE 00686 # undef YYERROR_VERBOSE 00687 # define YYERROR_VERBOSE 1 00688 #else 00689 # define YYERROR_VERBOSE 0 00690 #endif 00691 00692 /* Enabling the token table. */ 00693 #ifndef YYTOKEN_TABLE 00694 # define YYTOKEN_TABLE 0 00695 #endif 00696 00697 00698 /* Tokens. */ 00699 #ifndef YYTOKENTYPE 00700 # define YYTOKENTYPE 00701 /* Put the tokens into the symbol table, so that GDB and other debuggers 00702 know about them. */ 00703 enum yytokentype { 00704 keyword_class = 258, 00705 keyword_module = 259, 00706 keyword_def = 260, 00707 keyword_undef = 261, 00708 keyword_begin = 262, 00709 keyword_rescue = 263, 00710 keyword_ensure = 264, 00711 keyword_end = 265, 00712 keyword_if = 266, 00713 keyword_unless = 267, 00714 keyword_then = 268, 00715 keyword_elsif = 269, 00716 keyword_else = 270, 00717 keyword_case = 271, 00718 keyword_when = 272, 00719 keyword_while = 273, 00720 keyword_until = 274, 00721 keyword_for = 275, 00722 keyword_break = 276, 00723 keyword_next = 277, 00724 keyword_redo = 278, 00725 keyword_retry = 279, 00726 keyword_in = 280, 00727 keyword_do = 281, 00728 keyword_do_cond = 282, 00729 keyword_do_block = 283, 00730 keyword_do_LAMBDA = 284, 00731 keyword_return = 285, 00732 keyword_yield = 286, 00733 keyword_super = 287, 00734 keyword_self = 288, 00735 keyword_nil = 289, 00736 keyword_true = 290, 00737 keyword_false = 291, 00738 keyword_and = 292, 00739 keyword_or = 293, 00740 keyword_not = 294, 00741 modifier_if = 295, 00742 modifier_unless = 296, 00743 modifier_while = 297, 00744 modifier_until = 298, 00745 modifier_rescue = 299, 00746 keyword_alias = 300, 00747 keyword_defined = 301, 00748 keyword_BEGIN = 302, 00749 keyword_END = 303, 00750 keyword__LINE__ = 304, 00751 keyword__FILE__ = 305, 00752 keyword__ENCODING__ = 306, 00753 tIDENTIFIER = 307, 00754 tFID = 308, 00755 tGVAR = 309, 00756 tIVAR = 310, 00757 tCONSTANT = 311, 00758 tCVAR = 312, 00759 tLABEL = 313, 00760 tINTEGER = 314, 00761 tFLOAT = 315, 00762 tSTRING_CONTENT = 316, 00763 tCHAR = 317, 00764 tNTH_REF = 318, 00765 tBACK_REF = 319, 00766 tREGEXP_END = 320, 00767 tUPLUS = 321, 00768 tUMINUS = 322, 00769 tPOW = 323, 00770 tCMP = 324, 00771 tEQ = 325, 00772 tEQQ = 326, 00773 tNEQ = 327, 00774 tGEQ = 328, 00775 tLEQ = 329, 00776 tANDOP = 330, 00777 tOROP = 331, 00778 tMATCH = 332, 00779 tNMATCH = 333, 00780 tDOT2 = 334, 00781 tDOT3 = 335, 00782 tAREF = 336, 00783 tASET = 337, 00784 tLSHFT = 338, 00785 tRSHFT = 339, 00786 tCOLON2 = 340, 00787 tCOLON3 = 341, 00788 tOP_ASGN = 342, 00789 tASSOC = 343, 00790 tLPAREN = 344, 00791 tLPAREN_ARG = 345, 00792 tRPAREN = 346, 00793 tLBRACK = 347, 00794 tLBRACE = 348, 00795 tLBRACE_ARG = 349, 00796 tSTAR = 350, 00797 tAMPER = 351, 00798 tLAMBDA = 352, 00799 tSYMBEG = 353, 00800 tSTRING_BEG = 354, 00801 tXSTRING_BEG = 355, 00802 tREGEXP_BEG = 356, 00803 tWORDS_BEG = 357, 00804 tQWORDS_BEG = 358, 00805 tSTRING_DBEG = 359, 00806 tSTRING_DVAR = 360, 00807 tSTRING_END = 361, 00808 tLAMBEG = 362, 00809 tLOWEST = 363, 00810 tUMINUS_NUM = 364, 00811 idNULL = 365, 00812 idRespond_to = 366, 00813 idIFUNC = 367, 00814 idCFUNC = 368, 00815 id_core_set_method_alias = 369, 00816 id_core_set_variable_alias = 370, 00817 id_core_undef_method = 371, 00818 id_core_define_method = 372, 00819 id_core_define_singleton_method = 373, 00820 id_core_set_postexe = 374, 00821 tLAST_TOKEN = 375 00822 }; 00823 #endif 00824 00825 00826 00827 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00828 typedef union YYSTYPE 00829 { 00830 00831 /* Line 214 of yacc.c */ 00832 #line 620 "ripper.y" 00833 00834 VALUE val; 00835 NODE *node; 00836 ID id; 00837 int num; 00838 const struct vtable *vars; 00839 00840 00841 00842 /* Line 214 of yacc.c */ 00843 #line 844 "parse.c" 00844 } YYSTYPE; 00845 # define YYSTYPE_IS_TRIVIAL 1 00846 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00847 # define YYSTYPE_IS_DECLARED 1 00848 #endif 00849 00850 00851 /* Copy the second part of user declarations. */ 00852 00853 00854 /* Line 264 of yacc.c */ 00855 #line 856 "parse.c" 00856 00857 #ifdef short 00858 # undef short 00859 #endif 00860 00861 #ifdef YYTYPE_UINT8 00862 typedef YYTYPE_UINT8 yytype_uint8; 00863 #else 00864 typedef unsigned char yytype_uint8; 00865 #endif 00866 00867 #ifdef YYTYPE_INT8 00868 typedef YYTYPE_INT8 yytype_int8; 00869 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00870 || defined __cplusplus || defined _MSC_VER) 00871 typedef signed char yytype_int8; 00872 #else 00873 typedef short int yytype_int8; 00874 #endif 00875 00876 #ifdef YYTYPE_UINT16 00877 typedef YYTYPE_UINT16 yytype_uint16; 00878 #else 00879 typedef unsigned short int yytype_uint16; 00880 #endif 00881 00882 #ifdef YYTYPE_INT16 00883 typedef YYTYPE_INT16 yytype_int16; 00884 #else 00885 typedef short int yytype_int16; 00886 #endif 00887 00888 #ifndef YYSIZE_T 00889 # ifdef __SIZE_TYPE__ 00890 # define YYSIZE_T __SIZE_TYPE__ 00891 # elif defined size_t 00892 # define YYSIZE_T size_t 00893 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00894 || defined __cplusplus || defined _MSC_VER) 00895 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00896 # define YYSIZE_T size_t 00897 # else 00898 # define YYSIZE_T unsigned int 00899 # endif 00900 #endif 00901 00902 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00903 00904 #ifndef YY_ 00905 # if defined YYENABLE_NLS && YYENABLE_NLS 00906 # if ENABLE_NLS 00907 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00908 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00909 # endif 00910 # endif 00911 # ifndef YY_ 00912 # define YY_(msgid) msgid 00913 # endif 00914 #endif 00915 00916 /* Suppress unused-variable warnings by "using" E. */ 00917 #if ! defined lint || defined __GNUC__ 00918 # define YYUSE(e) ((void) (e)) 00919 #else 00920 # define YYUSE(e) /* empty */ 00921 #endif 00922 00923 /* Identity function, used to suppress warnings about constant conditions. */ 00924 #ifndef lint 00925 # define YYID(n) (n) 00926 #else 00927 #if (defined __STDC__ || defined __C99__FUNC__ \ 00928 || defined __cplusplus || defined _MSC_VER) 00929 static int 00930 YYID (int yyi) 00931 #else 00932 static int 00933 YYID (yyi) 00934 int yyi; 00935 #endif 00936 { 00937 return yyi; 00938 } 00939 #endif 00940 00941 #if ! defined yyoverflow || YYERROR_VERBOSE 00942 00943 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00944 00945 # ifdef YYSTACK_USE_ALLOCA 00946 # if YYSTACK_USE_ALLOCA 00947 # ifdef __GNUC__ 00948 # define YYSTACK_ALLOC __builtin_alloca 00949 # elif defined __BUILTIN_VA_ARG_INCR 00950 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00951 # elif defined _AIX 00952 # define YYSTACK_ALLOC __alloca 00953 # elif defined _MSC_VER 00954 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 00955 # define alloca _alloca 00956 # else 00957 # define YYSTACK_ALLOC alloca 00958 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00959 || defined __cplusplus || defined _MSC_VER) 00960 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00961 # ifndef _STDLIB_H 00962 # define _STDLIB_H 1 00963 # endif 00964 # endif 00965 # endif 00966 # endif 00967 # endif 00968 00969 # ifdef YYSTACK_ALLOC 00970 /* Pacify GCC's `empty if-body' warning. */ 00971 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00972 # ifndef YYSTACK_ALLOC_MAXIMUM 00973 /* The OS might guarantee only one guard page at the bottom of the stack, 00974 and a page size can be as small as 4096 bytes. So we cannot safely 00975 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 00976 to allow for a few compiler-allocated temporary stack slots. */ 00977 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 00978 # endif 00979 # else 00980 # define YYSTACK_ALLOC YYMALLOC 00981 # define YYSTACK_FREE YYFREE 00982 # ifndef YYSTACK_ALLOC_MAXIMUM 00983 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 00984 # endif 00985 # if (defined __cplusplus && ! defined _STDLIB_H \ 00986 && ! ((defined YYMALLOC || defined malloc) \ 00987 && (defined YYFREE || defined free))) 00988 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00989 # ifndef _STDLIB_H 00990 # define _STDLIB_H 1 00991 # endif 00992 # endif 00993 # ifndef YYMALLOC 00994 # define YYMALLOC malloc 00995 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00996 || defined __cplusplus || defined _MSC_VER) 00997 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 00998 # endif 00999 # endif 01000 # ifndef YYFREE 01001 # define YYFREE free 01002 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 01003 || defined __cplusplus || defined _MSC_VER) 01004 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01005 # endif 01006 # endif 01007 # endif 01008 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01009 01010 01011 #if (! defined yyoverflow \ 01012 && (! defined __cplusplus \ 01013 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01014 01015 /* A type that is properly aligned for any stack member. */ 01016 union yyalloc 01017 { 01018 yytype_int16 yyss_alloc; 01019 YYSTYPE yyvs_alloc; 01020 }; 01021 01022 /* The size of the maximum gap between one aligned stack and the next. */ 01023 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01024 01025 /* The size of an array large to enough to hold all stacks, each with 01026 N elements. */ 01027 # define YYSTACK_BYTES(N) \ 01028 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01029 + YYSTACK_GAP_MAXIMUM) 01030 01031 /* Copy COUNT objects from FROM to TO. The source and destination do 01032 not overlap. */ 01033 # ifndef YYCOPY 01034 # if defined __GNUC__ && 1 < __GNUC__ 01035 # define YYCOPY(To, From, Count) \ 01036 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01037 # else 01038 # define YYCOPY(To, From, Count) \ 01039 do \ 01040 { \ 01041 YYSIZE_T yyi; \ 01042 for (yyi = 0; yyi < (Count); yyi++) \ 01043 (To)[yyi] = (From)[yyi]; \ 01044 } \ 01045 while (YYID (0)) 01046 # endif 01047 # endif 01048 01049 /* Relocate STACK from its old location to the new one. The 01050 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01051 elements in the stack, and YYPTR gives the new location of the 01052 stack. Advance YYPTR to a properly aligned location for the next 01053 stack. */ 01054 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 01055 do \ 01056 { \ 01057 YYSIZE_T yynewbytes; \ 01058 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 01059 Stack = &yyptr->Stack_alloc; \ 01060 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01061 yyptr += yynewbytes / sizeof (*yyptr); \ 01062 } \ 01063 while (YYID (0)) 01064 01065 #endif 01066 01067 /* YYFINAL -- State number of the termination state. */ 01068 #define YYFINAL 3 01069 /* YYLAST -- Last index in YYTABLE. */ 01070 #define YYLAST 10410 01071 01072 /* YYNTOKENS -- Number of terminals. */ 01073 #define YYNTOKENS 148 01074 /* YYNNTS -- Number of nonterminals. */ 01075 #define YYNNTS 172 01076 /* YYNRULES -- Number of rules. */ 01077 #define YYNRULES 565 01078 /* YYNRULES -- Number of states. */ 01079 #define YYNSTATES 975 01080 01081 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01082 #define YYUNDEFTOK 2 01083 #define YYMAXUTOK 375 01084 01085 #define YYTRANSLATE(YYX) \ 01086 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01087 01088 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01089 static const yytype_uint8 yytranslate[] = 01090 { 01091 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01092 147, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01093 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01094 2, 2, 146, 123, 2, 2, 2, 121, 116, 2, 01095 142, 143, 119, 117, 140, 118, 139, 120, 2, 2, 01096 2, 2, 2, 2, 2, 2, 2, 2, 111, 145, 01097 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, 01098 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01099 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01100 2, 138, 2, 144, 115, 2, 141, 2, 2, 2, 01101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01103 2, 2, 2, 136, 114, 137, 124, 2, 2, 2, 01104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01107 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01108 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01109 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01110 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01111 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01112 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01113 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01114 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01115 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01116 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01117 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01118 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01119 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01120 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01121 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01122 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01123 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 01124 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 01125 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 01126 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 01127 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, 01128 130, 131, 132, 133, 134, 135 01129 }; 01130 01131 #if YYDEBUG 01132 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01133 YYRHS. */ 01134 static const yytype_uint16 yyprhs[] = 01135 { 01136 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01137 23, 24, 30, 35, 38, 40, 42, 46, 49, 50, 01138 55, 59, 63, 67, 70, 74, 78, 82, 86, 90, 01139 95, 99, 103, 107, 114, 120, 126, 132, 138, 142, 01140 146, 150, 154, 156, 158, 162, 166, 170, 173, 175, 01141 177, 179, 181, 183, 188, 193, 194, 200, 203, 207, 01142 212, 218, 223, 229, 232, 235, 238, 241, 244, 246, 01143 250, 252, 256, 258, 261, 265, 271, 274, 279, 282, 01144 287, 289, 293, 295, 299, 302, 306, 308, 312, 314, 01145 319, 323, 327, 331, 335, 338, 340, 342, 347, 351, 01146 355, 359, 363, 366, 368, 370, 372, 375, 377, 381, 01147 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 01148 402, 407, 409, 411, 413, 415, 417, 419, 421, 423, 01149 425, 427, 429, 431, 433, 435, 437, 439, 441, 443, 01150 445, 447, 449, 451, 453, 455, 457, 459, 461, 463, 01151 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 01152 485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 01153 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, 01154 525, 527, 529, 531, 533, 535, 537, 539, 541, 543, 01155 545, 547, 551, 557, 561, 567, 574, 580, 586, 592, 01156 598, 603, 607, 611, 615, 619, 623, 627, 631, 635, 01157 639, 644, 649, 652, 655, 659, 663, 667, 671, 675, 01158 679, 683, 687, 691, 695, 699, 703, 707, 710, 713, 01159 717, 721, 725, 729, 730, 735, 742, 744, 746, 748, 01160 751, 756, 759, 763, 765, 767, 769, 771, 773, 776, 01161 779, 784, 786, 787, 790, 793, 796, 798, 800, 802, 01162 805, 809, 814, 818, 823, 826, 828, 830, 832, 834, 01163 836, 838, 840, 842, 844, 845, 850, 851, 856, 860, 01164 864, 867, 871, 875, 877, 882, 886, 888, 889, 896, 01165 901, 905, 908, 910, 913, 916, 923, 930, 931, 932, 01166 940, 941, 942, 950, 956, 961, 962, 963, 973, 974, 01167 981, 982, 983, 992, 993, 999, 1000, 1007, 1008, 1009, 01168 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037, 01169 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1058, 01170 1060, 1062, 1064, 1070, 1072, 1075, 1077, 1079, 1081, 1085, 01171 1087, 1091, 1093, 1098, 1105, 1109, 1115, 1118, 1123, 1125, 01172 1129, 1136, 1145, 1150, 1157, 1162, 1165, 1172, 1175, 1180, 01173 1187, 1190, 1195, 1198, 1203, 1205, 1207, 1209, 1213, 1215, 01174 1220, 1222, 1225, 1227, 1231, 1233, 1235, 1236, 1237, 1242, 01175 1247, 1249, 1253, 1257, 1258, 1264, 1267, 1272, 1277, 1280, 01176 1285, 1290, 1294, 1298, 1302, 1305, 1307, 1312, 1313, 1319, 01177 1320, 1326, 1332, 1334, 1336, 1343, 1345, 1347, 1349, 1351, 01178 1354, 1356, 1359, 1361, 1363, 1365, 1367, 1369, 1371, 1373, 01179 1376, 1380, 1384, 1388, 1392, 1396, 1397, 1401, 1403, 1406, 01180 1410, 1414, 1415, 1419, 1420, 1423, 1424, 1427, 1428, 1431, 01181 1433, 1434, 1438, 1439, 1440, 1446, 1448, 1450, 1452, 1454, 01182 1457, 1459, 1461, 1463, 1465, 1469, 1471, 1473, 1476, 1479, 01183 1481, 1483, 1485, 1487, 1489, 1491, 1493, 1495, 1497, 1499, 01184 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1514, 1519, 1522, 01185 1526, 1529, 1536, 1545, 1550, 1557, 1562, 1569, 1572, 1577, 01186 1584, 1587, 1592, 1595, 1600, 1602, 1603, 1605, 1607, 1609, 01187 1611, 1613, 1615, 1617, 1621, 1623, 1627, 1631, 1635, 1637, 01188 1641, 1643, 1647, 1649, 1651, 1654, 1656, 1658, 1660, 1663, 01189 1666, 1668, 1670, 1671, 1676, 1678, 1681, 1683, 1687, 1691, 01190 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1710, 1712, 01191 1714, 1716, 1718, 1719, 1721, 1722, 1724, 1727, 1730, 1731, 01192 1733, 1735, 1737, 1739, 1741, 1744 01193 }; 01194 01195 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01196 static const yytype_int16 yyrhs[] = 01197 { 01198 149, 0, -1, -1, 150, 151, -1, 152, 312, -1, 01199 319, -1, 153, -1, 152, 318, 153, -1, 1, 153, 01200 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1, 01201 156, 255, 230, 258, -1, 157, 312, -1, 319, -1, 01202 158, -1, 157, 318, 158, -1, 1, 158, -1, -1, 01203 45, 179, 159, 179, -1, 45, 54, 54, -1, 45, 01204 54, 64, -1, 45, 54, 63, -1, 6, 180, -1, 01205 158, 40, 161, -1, 158, 41, 161, -1, 158, 42, 01206 161, -1, 158, 43, 161, -1, 158, 44, 158, -1, 01207 48, 136, 156, 137, -1, 174, 109, 162, -1, 167, 01208 109, 162, -1, 284, 87, 162, -1, 215, 138, 190, 01209 315, 87, 162, -1, 215, 139, 52, 87, 162, -1, 01210 215, 139, 56, 87, 162, -1, 215, 85, 56, 87, 01211 162, -1, 215, 85, 52, 87, 162, -1, 285, 87, 01212 162, -1, 174, 109, 197, -1, 167, 109, 186, -1, 01213 167, 109, 197, -1, 160, -1, 162, -1, 160, 37, 01214 160, -1, 160, 38, 160, -1, 39, 313, 160, -1, 01215 123, 162, -1, 184, -1, 160, -1, 166, -1, 163, 01216 -1, 248, -1, 248, 139, 309, 192, -1, 248, 85, 01217 309, 192, -1, -1, 94, 165, 236, 156, 137, -1, 01218 308, 192, -1, 308, 192, 164, -1, 215, 139, 309, 01219 192, -1, 215, 139, 309, 192, 164, -1, 215, 85, 01220 309, 192, -1, 215, 85, 309, 192, 164, -1, 32, 01221 192, -1, 31, 192, -1, 30, 191, -1, 21, 191, 01222 -1, 22, 191, -1, 169, -1, 89, 168, 314, -1, 01223 169, -1, 89, 168, 314, -1, 171, -1, 171, 170, 01224 -1, 171, 95, 173, -1, 171, 95, 173, 140, 172, 01225 -1, 171, 95, -1, 171, 95, 140, 172, -1, 95, 01226 173, -1, 95, 173, 140, 172, -1, 95, -1, 95, 01227 140, 172, -1, 173, -1, 89, 168, 314, -1, 170, 01228 140, -1, 171, 170, 140, -1, 170, -1, 172, 140, 01229 170, -1, 282, -1, 215, 138, 190, 315, -1, 215, 01230 139, 52, -1, 215, 85, 52, -1, 215, 139, 56, 01231 -1, 215, 85, 56, -1, 86, 56, -1, 285, -1, 01232 282, -1, 215, 138, 190, 315, -1, 215, 139, 52, 01233 -1, 215, 85, 52, -1, 215, 139, 56, -1, 215, 01234 85, 56, -1, 86, 56, -1, 285, -1, 52, -1, 01235 56, -1, 86, 175, -1, 175, -1, 215, 85, 175, 01236 -1, 52, -1, 56, -1, 53, -1, 182, -1, 183, 01237 -1, 177, -1, 278, -1, 178, -1, 280, -1, 179, 01238 -1, -1, 180, 140, 181, 179, -1, 114, -1, 115, 01239 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77, 01240 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74, 01241 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118, 01242 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68, 01243 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81, 01244 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51, 01245 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7, 01246 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46, 01247 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9, 01248 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22, 01249 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8, 01250 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13, 01251 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11, 01252 -1, 12, -1, 18, -1, 19, -1, 174, 109, 184, 01253 -1, 174, 109, 184, 44, 184, -1, 284, 87, 184, 01254 -1, 284, 87, 184, 44, 184, -1, 215, 138, 190, 01255 315, 87, 184, -1, 215, 139, 52, 87, 184, -1, 01256 215, 139, 56, 87, 184, -1, 215, 85, 52, 87, 01257 184, -1, 215, 85, 56, 87, 184, -1, 86, 56, 01258 87, 184, -1, 285, 87, 184, -1, 184, 79, 184, 01259 -1, 184, 80, 184, -1, 184, 117, 184, -1, 184, 01260 118, 184, -1, 184, 119, 184, -1, 184, 120, 184, 01261 -1, 184, 121, 184, -1, 184, 68, 184, -1, 122, 01262 59, 68, 184, -1, 122, 60, 68, 184, -1, 66, 01263 184, -1, 67, 184, -1, 184, 114, 184, -1, 184, 01264 115, 184, -1, 184, 116, 184, -1, 184, 69, 184, 01265 -1, 184, 112, 184, -1, 184, 73, 184, -1, 184, 01266 113, 184, -1, 184, 74, 184, -1, 184, 70, 184, 01267 -1, 184, 71, 184, -1, 184, 72, 184, -1, 184, 01268 77, 184, -1, 184, 78, 184, -1, 123, 184, -1, 01269 124, 184, -1, 184, 83, 184, -1, 184, 84, 184, 01270 -1, 184, 75, 184, -1, 184, 76, 184, -1, -1, 01271 46, 313, 185, 184, -1, 184, 110, 184, 313, 111, 01272 184, -1, 198, -1, 184, -1, 319, -1, 196, 316, 01273 -1, 196, 140, 306, 316, -1, 306, 316, -1, 142, 01274 190, 314, -1, 319, -1, 188, -1, 319, -1, 191, 01275 -1, 166, -1, 196, 195, -1, 306, 195, -1, 196, 01276 140, 306, 195, -1, 194, -1, -1, 193, 191, -1, 01277 96, 186, -1, 140, 194, -1, 140, -1, 319, -1, 01278 186, -1, 95, 186, -1, 196, 140, 186, -1, 196, 01279 140, 95, 186, -1, 196, 140, 186, -1, 196, 140, 01280 95, 186, -1, 95, 186, -1, 259, -1, 260, -1, 01281 263, -1, 264, -1, 265, -1, 268, -1, 283, -1, 01282 285, -1, 53, -1, -1, 216, 199, 155, 226, -1, 01283 -1, 90, 160, 200, 314, -1, 89, 156, 143, -1, 01284 215, 85, 56, -1, 86, 56, -1, 92, 187, 144, 01285 -1, 93, 305, 137, -1, 30, -1, 31, 142, 191, 01286 314, -1, 31, 142, 314, -1, 31, -1, -1, 46, 01287 313, 142, 201, 160, 314, -1, 39, 142, 160, 314, 01288 -1, 39, 142, 314, -1, 308, 250, -1, 249, -1, 01289 249, 250, -1, 97, 241, -1, 217, 161, 227, 156, 01290 229, 226, -1, 218, 161, 227, 156, 230, 226, -1, 01291 -1, -1, 219, 202, 161, 228, 203, 156, 226, -1, 01292 -1, -1, 220, 204, 161, 228, 205, 156, 226, -1, 01293 221, 161, 312, 253, 226, -1, 221, 312, 253, 226, 01294 -1, -1, -1, 222, 231, 25, 206, 161, 228, 207, 01295 156, 226, -1, -1, 223, 176, 286, 208, 155, 226, 01296 -1, -1, -1, 223, 83, 160, 209, 317, 210, 155, 01297 226, -1, -1, 224, 176, 211, 155, 226, -1, -1, 01298 225, 177, 212, 288, 155, 226, -1, -1, -1, 225, 01299 303, 311, 213, 177, 214, 288, 155, 226, -1, 21, 01300 -1, 22, -1, 23, -1, 24, -1, 198, -1, 7, 01301 -1, 11, -1, 12, -1, 18, -1, 19, -1, 16, 01302 -1, 20, -1, 3, -1, 4, -1, 5, -1, 10, 01303 -1, 317, -1, 13, -1, 317, 13, -1, 317, -1, 01304 27, -1, 230, -1, 14, 161, 227, 156, 229, -1, 01305 319, -1, 15, 156, -1, 174, -1, 167, -1, 291, 01306 -1, 89, 234, 314, -1, 232, -1, 233, 140, 232, 01307 -1, 233, -1, 233, 140, 95, 291, -1, 233, 140, 01308 95, 291, 140, 233, -1, 233, 140, 95, -1, 233, 01309 140, 95, 140, 233, -1, 95, 291, -1, 95, 291, 01310 140, 233, -1, 95, -1, 95, 140, 233, -1, 293, 01311 140, 296, 140, 299, 302, -1, 293, 140, 296, 140, 01312 299, 140, 293, 302, -1, 293, 140, 296, 302, -1, 01313 293, 140, 296, 140, 293, 302, -1, 293, 140, 299, 01314 302, -1, 293, 140, -1, 293, 140, 299, 140, 293, 01315 302, -1, 293, 302, -1, 296, 140, 299, 302, -1, 01316 296, 140, 299, 140, 293, 302, -1, 296, 302, -1, 01317 296, 140, 293, 302, -1, 299, 302, -1, 299, 140, 01318 293, 302, -1, 301, -1, 319, -1, 237, -1, 114, 01319 238, 114, -1, 76, -1, 114, 235, 238, 114, -1, 01320 319, -1, 145, 239, -1, 240, -1, 239, 140, 240, 01321 -1, 52, -1, 290, -1, -1, -1, 242, 243, 244, 01322 245, -1, 142, 289, 238, 314, -1, 289, -1, 107, 01323 156, 137, -1, 29, 156, 10, -1, -1, 28, 247, 01324 236, 156, 10, -1, 166, 246, -1, 248, 139, 309, 01325 189, -1, 248, 85, 309, 189, -1, 308, 188, -1, 01326 215, 139, 309, 189, -1, 215, 85, 309, 188, -1, 01327 215, 85, 310, -1, 215, 139, 188, -1, 215, 85, 01328 188, -1, 32, 188, -1, 32, -1, 215, 138, 190, 01329 315, -1, -1, 136, 251, 236, 156, 137, -1, -1, 01330 26, 252, 236, 156, 10, -1, 17, 196, 227, 156, 01331 254, -1, 230, -1, 253, -1, 8, 256, 257, 227, 01332 156, 255, -1, 319, -1, 186, -1, 197, -1, 319, 01333 -1, 88, 174, -1, 319, -1, 9, 156, -1, 319, 01334 -1, 281, -1, 278, -1, 280, -1, 261, -1, 62, 01335 -1, 262, -1, 261, 262, -1, 99, 270, 106, -1, 01336 100, 271, 106, -1, 101, 272, 65, -1, 102, 146, 01337 106, -1, 102, 266, 106, -1, -1, 266, 267, 146, 01338 -1, 273, -1, 267, 273, -1, 103, 146, 106, -1, 01339 103, 269, 106, -1, -1, 269, 61, 146, -1, -1, 01340 270, 273, -1, -1, 271, 273, -1, -1, 272, 273, 01341 -1, 61, -1, -1, 105, 274, 277, -1, -1, -1, 01342 104, 275, 276, 156, 137, -1, 54, -1, 55, -1, 01343 57, -1, 285, -1, 98, 279, -1, 177, -1, 55, 01344 -1, 54, -1, 57, -1, 98, 271, 106, -1, 59, 01345 -1, 60, -1, 122, 59, -1, 122, 60, -1, 52, 01346 -1, 55, -1, 54, -1, 56, -1, 57, -1, 34, 01347 -1, 33, -1, 35, -1, 36, -1, 50, -1, 49, 01348 -1, 51, -1, 282, -1, 282, -1, 63, -1, 64, 01349 -1, 317, -1, -1, 113, 287, 161, 317, -1, 1, 01350 317, -1, 142, 289, 314, -1, 289, 317, -1, 293, 01351 140, 297, 140, 299, 302, -1, 293, 140, 297, 140, 01352 299, 140, 293, 302, -1, 293, 140, 297, 302, -1, 01353 293, 140, 297, 140, 293, 302, -1, 293, 140, 299, 01354 302, -1, 293, 140, 299, 140, 293, 302, -1, 293, 01355 302, -1, 297, 140, 299, 302, -1, 297, 140, 299, 01356 140, 293, 302, -1, 297, 302, -1, 297, 140, 293, 01357 302, -1, 299, 302, -1, 299, 140, 293, 302, -1, 01358 301, -1, -1, 56, -1, 55, -1, 54, -1, 57, 01359 -1, 290, -1, 52, -1, 291, -1, 89, 234, 314, 01360 -1, 292, -1, 293, 140, 292, -1, 52, 109, 186, 01361 -1, 52, 109, 215, -1, 295, -1, 296, 140, 295, 01362 -1, 294, -1, 297, 140, 294, -1, 119, -1, 95, 01363 -1, 298, 52, -1, 298, -1, 116, -1, 96, -1, 01364 300, 52, -1, 140, 301, -1, 319, -1, 283, -1, 01365 -1, 142, 304, 160, 314, -1, 319, -1, 306, 316, 01366 -1, 307, -1, 306, 140, 307, -1, 186, 88, 186, 01367 -1, 58, 186, -1, 52, -1, 56, -1, 53, -1, 01368 52, -1, 56, -1, 53, -1, 182, -1, 52, -1, 01369 53, -1, 182, -1, 139, -1, 85, -1, -1, 318, 01370 -1, -1, 147, -1, 313, 143, -1, 313, 144, -1, 01371 -1, 147, -1, 140, -1, 145, -1, 147, -1, 317, 01372 -1, 318, 145, -1, -1 01373 }; 01374 01375 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01376 static const yytype_uint16 yyrline[] = 01377 { 01378 0, 786, 786, 786, 817, 828, 837, 845, 853, 859, 01379 861, 860, 884, 917, 928, 937, 945, 953, 959, 959, 01380 967, 975, 986, 996, 1004, 1013, 1022, 1035, 1048, 1057, 01381 1069, 1078, 1088, 1117, 1138, 1155, 1172, 1183, 1200, 1210, 01382 1219, 1228, 1237, 1240, 1241, 1249, 1257, 1265, 1273, 1276, 01383 1288, 1289, 1292, 1293, 1302, 1314, 1313, 1335, 1344, 1356, 01384 1365, 1377, 1386, 1398, 1407, 1416, 1424, 1432, 1442, 1443, 01385 1453, 1454, 1464, 1472, 1480, 1488, 1497, 1505, 1513, 1521, 01386 1529, 1537, 1547, 1548, 1558, 1566, 1576, 1584, 1594, 1598, 01387 1606, 1614, 1622, 1630, 1642, 1652, 1664, 1673, 1681, 1689, 01388 1697, 1705, 1718, 1731, 1742, 1750, 1753, 1761, 1769, 1779, 01389 1780, 1781, 1782, 1787, 1798, 1799, 1802, 1810, 1813, 1821, 01390 1821, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 01391 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 01392 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 01393 1862, 1862, 1862, 1863, 1863, 1864, 1864, 1864, 1865, 1865, 01394 1865, 1865, 1866, 1866, 1866, 1866, 1867, 1867, 1867, 1868, 01395 1868, 1868, 1868, 1869, 1869, 1869, 1869, 1870, 1870, 1870, 01396 1870, 1871, 1871, 1871, 1871, 1872, 1872, 1872, 1872, 1873, 01397 1873, 1876, 1885, 1895, 1924, 1955, 1981, 1998, 2015, 2032, 01398 2043, 2054, 2065, 2079, 2093, 2101, 2109, 2117, 2125, 2133, 01399 2141, 2150, 2159, 2167, 2175, 2183, 2191, 2199, 2207, 2215, 01400 2223, 2231, 2239, 2247, 2255, 2263, 2274, 2282, 2290, 2298, 01401 2306, 2314, 2322, 2330, 2330, 2340, 2350, 2356, 2368, 2369, 01402 2373, 2381, 2391, 2401, 2402, 2405, 2406, 2409, 2418, 2426, 01403 2436, 2445, 2454, 2454, 2466, 2476, 2480, 2484, 2490, 2498, 01404 2506, 2520, 2536, 2550, 2565, 2575, 2576, 2577, 2578, 2579, 01405 2580, 2581, 2582, 2583, 2592, 2591, 2616, 2616, 2625, 2633, 01406 2641, 2649, 2662, 2670, 2678, 2686, 2694, 2702, 2702, 2712, 01407 2720, 2728, 2739, 2740, 2751, 2755, 2767, 2779, 2779, 2779, 01408 2790, 2790, 2790, 2801, 2812, 2821, 2823, 2820, 2887, 2886, 01409 2908, 2913, 2907, 2932, 2931, 2953, 2952, 2975, 2976, 2975, 01410 2996, 3004, 3012, 3020, 3030, 3042, 3048, 3054, 3060, 3066, 01411 3072, 3078, 3084, 3090, 3096, 3106, 3112, 3117, 3118, 3125, 01412 3130, 3133, 3134, 3147, 3148, 3158, 3159, 3162, 3170, 3180, 01413 3188, 3198, 3206, 3215, 3224, 3232, 3240, 3249, 3261, 3269, 01414 3279, 3287, 3295, 3303, 3311, 3319, 3328, 3336, 3344, 3352, 01415 3360, 3368, 3376, 3384, 3392, 3402, 3403, 3409, 3418, 3427, 01416 3438, 3439, 3449, 3456, 3465, 3473, 3479, 3482, 3479, 3500, 01417 3508, 3518, 3522, 3529, 3528, 3549, 3565, 3574, 3585, 3594, 01418 3604, 3614, 3622, 3633, 3644, 3652, 3660, 3675, 3674, 3694, 01419 3693, 3714, 3726, 3727, 3730, 3749, 3752, 3760, 3768, 3771, 01420 3775, 3778, 3786, 3789, 3790, 3798, 3801, 3818, 3819, 3820, 01421 3830, 3840, 3867, 3932, 3940, 3947, 3954, 3964, 3972, 3982, 01422 3990, 3997, 4004, 4015, 4022, 4033, 4040, 4051, 4058, 4087, 01423 4089, 4088, 4105, 4111, 4104, 4130, 4138, 4146, 4154, 4157, 01424 4168, 4169, 4170, 4171, 4174, 4204, 4205, 4206, 4214, 4224, 01425 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 01426 4235, 4238, 4248, 4258, 4259, 4262, 4271, 4270, 4278, 4290, 01427 4300, 4306, 4314, 4322, 4330, 4338, 4346, 4354, 4362, 4370, 01428 4378, 4386, 4394, 4402, 4410, 4419, 4428, 4437, 4446, 4455, 01429 4466, 4467, 4474, 4483, 4502, 4509, 4522, 4534, 4546, 4554, 01430 4570, 4578, 4594, 4595, 4598, 4611, 4622, 4623, 4626, 4643, 01431 4647, 4657, 4667, 4667, 4696, 4697, 4707, 4714, 4724, 4732, 01432 4742, 4743, 4744, 4747, 4748, 4749, 4750, 4753, 4754, 4755, 01433 4758, 4763, 4770, 4771, 4774, 4775, 4778, 4781, 4784, 4785, 01434 4786, 4789, 4790, 4793, 4794, 4798 01435 }; 01436 #endif 01437 01438 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01439 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01440 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01441 static const char *const yytname[] = 01442 { 01443 "$end", "error", "$undefined", "keyword_class", "keyword_module", 01444 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", 01445 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", 01446 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", 01447 "keyword_when", "keyword_while", "keyword_until", "keyword_for", 01448 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", 01449 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", 01450 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", 01451 "keyword_self", "keyword_nil", "keyword_true", "keyword_false", 01452 "keyword_and", "keyword_or", "keyword_not", "modifier_if", 01453 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", 01454 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", 01455 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", 01456 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", 01457 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", 01458 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", 01459 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", 01460 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", 01461 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", 01462 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", 01463 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", 01464 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01465 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01466 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", 01467 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias", 01468 "id_core_set_variable_alias", "id_core_undef_method", 01469 "id_core_define_method", "id_core_define_singleton_method", 01470 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','", 01471 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program", 01472 "$@1", "top_compstmt", "top_stmts", "top_stmt", "$@2", "bodystmt", 01473 "compstmt", "stmts", "stmt", "$@3", "expr", "expr_value", "command_call", 01474 "block_command", "cmd_brace_block", "@4", "command", "mlhs", 01475 "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", 01476 "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", "fitem", 01477 "undef_list", "$@5", "op", "reswords", "arg", "$@6", "arg_value", 01478 "aref_args", "paren_args", "opt_paren_args", "opt_call_args", 01479 "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args", 01480 "mrhs", "primary", "@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14", 01481 "$@15", "$@16", "@17", "@18", "@19", "@20", "@21", "$@22", "$@23", 01482 "primary_value", "k_begin", "k_if", "k_unless", "k_while", "k_until", 01483 "k_case", "k_for", "k_class", "k_module", "k_def", "k_end", "then", "do", 01484 "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs", 01485 "block_param", "opt_block_param", "block_param_def", "opt_bv_decl", 01486 "bv_decls", "bvar", "lambda", "@24", "@25", "f_larglist", "lambda_body", 01487 "do_block", "@26", "block_call", "method_call", "brace_block", "@27", 01488 "@28", "case_body", "cases", "opt_rescue", "exc_list", "exc_var", 01489 "opt_ensure", "literal", "strings", "string", "string1", "xstring", 01490 "regexp", "words", "word_list", "word", "qwords", "qword_list", 01491 "string_contents", "xstring_contents", "regexp_contents", 01492 "string_content", "@29", "@30", "@31", "string_dvar", "symbol", "sym", 01493 "dsym", "numeric", "variable", "var_ref", "var_lhs", "backref", 01494 "superclass", "$@32", "f_arglist", "f_args", "f_bad_arg", "f_norm_arg", 01495 "f_arg_item", "f_arg", "f_opt", "f_block_opt", "f_block_optarg", 01496 "f_optarg", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg", 01497 "opt_f_block_arg", "singleton", "$@33", "assoc_list", "assocs", "assoc", 01498 "operation", "operation2", "operation3", "dot_or_colon", "opt_terms", 01499 "opt_nl", "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01500 }; 01501 #endif 01502 01503 # ifdef YYPRINT 01504 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01505 token YYLEX-NUM. */ 01506 static const yytype_uint16 yytoknum[] = 01507 { 01508 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01509 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01510 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01511 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01512 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01513 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01514 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 01515 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 01516 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 01517 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 01518 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, 01519 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, 01520 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, 01521 370, 371, 372, 373, 374, 375, 123, 125, 91, 46, 01522 44, 96, 40, 41, 93, 59, 32, 10 01523 }; 01524 # endif 01525 01526 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01527 static const yytype_uint16 yyr1[] = 01528 { 01529 0, 148, 150, 149, 151, 152, 152, 152, 152, 153, 01530 154, 153, 155, 156, 157, 157, 157, 157, 159, 158, 01531 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01532 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01533 158, 158, 158, 160, 160, 160, 160, 160, 160, 161, 01534 162, 162, 163, 163, 163, 165, 164, 166, 166, 166, 01535 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, 01536 168, 168, 169, 169, 169, 169, 169, 169, 169, 169, 01537 169, 169, 170, 170, 171, 171, 172, 172, 173, 173, 01538 173, 173, 173, 173, 173, 173, 174, 174, 174, 174, 01539 174, 174, 174, 174, 175, 175, 176, 176, 176, 177, 01540 177, 177, 177, 177, 178, 178, 179, 179, 180, 181, 01541 180, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01542 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01543 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01544 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01545 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01546 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01547 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01548 183, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01549 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01550 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01551 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01552 184, 184, 184, 185, 184, 184, 184, 186, 187, 187, 01553 187, 187, 188, 189, 189, 190, 190, 191, 191, 191, 01554 191, 191, 193, 192, 194, 195, 195, 195, 196, 196, 01555 196, 196, 197, 197, 197, 198, 198, 198, 198, 198, 01556 198, 198, 198, 198, 199, 198, 200, 198, 198, 198, 01557 198, 198, 198, 198, 198, 198, 198, 201, 198, 198, 01558 198, 198, 198, 198, 198, 198, 198, 202, 203, 198, 01559 204, 205, 198, 198, 198, 206, 207, 198, 208, 198, 01560 209, 210, 198, 211, 198, 212, 198, 213, 214, 198, 01561 198, 198, 198, 198, 215, 216, 217, 218, 219, 220, 01562 221, 222, 223, 224, 225, 226, 227, 227, 227, 228, 01563 228, 229, 229, 230, 230, 231, 231, 232, 232, 233, 01564 233, 234, 234, 234, 234, 234, 234, 234, 234, 234, 01565 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 01566 235, 235, 235, 235, 235, 236, 236, 237, 237, 237, 01567 238, 238, 239, 239, 240, 240, 242, 243, 241, 244, 01568 244, 245, 245, 247, 246, 248, 248, 248, 249, 249, 01569 249, 249, 249, 249, 249, 249, 249, 251, 250, 252, 01570 250, 253, 254, 254, 255, 255, 256, 256, 256, 257, 01571 257, 258, 258, 259, 259, 259, 260, 261, 261, 261, 01572 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, 01573 268, 269, 269, 270, 270, 271, 271, 272, 272, 273, 01574 274, 273, 275, 276, 273, 277, 277, 277, 277, 278, 01575 279, 279, 279, 279, 280, 281, 281, 281, 281, 282, 01576 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 01577 282, 283, 284, 285, 285, 286, 287, 286, 286, 288, 01578 288, 289, 289, 289, 289, 289, 289, 289, 289, 289, 01579 289, 289, 289, 289, 289, 289, 290, 290, 290, 290, 01580 291, 291, 292, 292, 293, 293, 294, 295, 296, 296, 01581 297, 297, 298, 298, 299, 299, 300, 300, 301, 302, 01582 302, 303, 304, 303, 305, 305, 306, 306, 307, 307, 01583 308, 308, 308, 309, 309, 309, 309, 310, 310, 310, 01584 311, 311, 312, 312, 313, 313, 314, 315, 316, 316, 01585 316, 317, 317, 318, 318, 319 01586 }; 01587 01588 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01589 static const yytype_uint8 yyr2[] = 01590 { 01591 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01592 0, 5, 4, 2, 1, 1, 3, 2, 0, 4, 01593 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 01594 3, 3, 3, 6, 5, 5, 5, 5, 3, 3, 01595 3, 3, 1, 1, 3, 3, 3, 2, 1, 1, 01596 1, 1, 1, 4, 4, 0, 5, 2, 3, 4, 01597 5, 4, 5, 2, 2, 2, 2, 2, 1, 3, 01598 1, 3, 1, 2, 3, 5, 2, 4, 2, 4, 01599 1, 3, 1, 3, 2, 3, 1, 3, 1, 4, 01600 3, 3, 3, 3, 2, 1, 1, 4, 3, 3, 01601 3, 3, 2, 1, 1, 1, 2, 1, 3, 1, 01602 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 01603 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01604 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01605 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01606 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01607 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01608 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01610 1, 3, 5, 3, 5, 6, 5, 5, 5, 5, 01611 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 01612 4, 4, 2, 2, 3, 3, 3, 3, 3, 3, 01613 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 01614 3, 3, 3, 0, 4, 6, 1, 1, 1, 2, 01615 4, 2, 3, 1, 1, 1, 1, 1, 2, 2, 01616 4, 1, 0, 2, 2, 2, 1, 1, 1, 2, 01617 3, 4, 3, 4, 2, 1, 1, 1, 1, 1, 01618 1, 1, 1, 1, 0, 4, 0, 4, 3, 3, 01619 2, 3, 3, 1, 4, 3, 1, 0, 6, 4, 01620 3, 2, 1, 2, 2, 6, 6, 0, 0, 7, 01621 0, 0, 7, 5, 4, 0, 0, 9, 0, 6, 01622 0, 0, 8, 0, 5, 0, 6, 0, 0, 9, 01623 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01624 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 01625 1, 1, 5, 1, 2, 1, 1, 1, 3, 1, 01626 3, 1, 4, 6, 3, 5, 2, 4, 1, 3, 01627 6, 8, 4, 6, 4, 2, 6, 2, 4, 6, 01628 2, 4, 2, 4, 1, 1, 1, 3, 1, 4, 01629 1, 2, 1, 3, 1, 1, 0, 0, 4, 4, 01630 1, 3, 3, 0, 5, 2, 4, 4, 2, 4, 01631 4, 3, 3, 3, 2, 1, 4, 0, 5, 0, 01632 5, 5, 1, 1, 6, 1, 1, 1, 1, 2, 01633 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 01634 3, 3, 3, 3, 3, 0, 3, 1, 2, 3, 01635 3, 0, 3, 0, 2, 0, 2, 0, 2, 1, 01636 0, 3, 0, 0, 5, 1, 1, 1, 1, 2, 01637 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 01638 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01639 1, 1, 1, 1, 1, 1, 0, 4, 2, 3, 01640 2, 6, 8, 4, 6, 4, 6, 2, 4, 6, 01641 2, 4, 2, 4, 1, 0, 1, 1, 1, 1, 01642 1, 1, 1, 3, 1, 3, 3, 3, 1, 3, 01643 1, 3, 1, 1, 2, 1, 1, 1, 2, 2, 01644 1, 1, 0, 4, 1, 2, 1, 3, 3, 2, 01645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01646 1, 1, 0, 1, 0, 1, 2, 2, 0, 1, 01647 1, 1, 1, 1, 2, 0 01648 }; 01649 01650 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 01651 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 01652 means the default is an error. */ 01653 static const yytype_uint16 yydefact[] = 01654 { 01655 2, 0, 0, 1, 0, 332, 333, 334, 0, 325, 01656 326, 327, 330, 328, 329, 331, 320, 321, 322, 323, 01657 283, 252, 252, 475, 474, 476, 477, 554, 0, 554, 01658 10, 0, 479, 478, 480, 469, 542, 471, 470, 472, 01659 473, 465, 466, 427, 483, 484, 0, 0, 0, 0, 01660 0, 565, 565, 80, 386, 445, 443, 445, 447, 435, 01661 441, 0, 0, 0, 3, 552, 6, 9, 42, 43, 01662 51, 50, 0, 68, 0, 72, 82, 0, 48, 236, 01663 0, 274, 0, 0, 297, 300, 552, 0, 0, 0, 01664 0, 52, 292, 265, 266, 426, 428, 267, 268, 269, 01665 270, 424, 425, 423, 481, 271, 0, 272, 252, 5, 01666 8, 160, 171, 161, 184, 157, 177, 167, 166, 187, 01667 188, 182, 165, 164, 159, 185, 189, 190, 169, 158, 01668 172, 176, 178, 170, 163, 179, 186, 181, 180, 173, 01669 183, 168, 156, 175, 174, 155, 162, 153, 154, 150, 01670 151, 152, 109, 111, 110, 145, 146, 142, 124, 125, 01671 126, 133, 130, 132, 127, 128, 147, 148, 134, 135, 01672 139, 129, 131, 121, 122, 123, 136, 137, 138, 140, 01673 141, 143, 144, 149, 114, 116, 118, 23, 112, 113, 01674 115, 117, 0, 0, 0, 0, 0, 0, 0, 247, 01675 0, 237, 258, 66, 251, 565, 0, 481, 0, 272, 01676 565, 536, 67, 65, 554, 64, 0, 565, 404, 63, 01677 554, 555, 0, 0, 18, 233, 0, 0, 320, 321, 01678 283, 286, 405, 212, 0, 0, 213, 280, 0, 0, 01679 0, 552, 15, 554, 70, 14, 276, 0, 558, 558, 01680 238, 0, 0, 558, 534, 554, 0, 0, 0, 78, 01681 324, 0, 88, 95, 294, 387, 462, 461, 463, 460, 01682 0, 459, 0, 0, 0, 0, 0, 0, 0, 467, 01683 468, 47, 227, 228, 561, 562, 4, 563, 553, 0, 01684 0, 0, 0, 0, 0, 0, 393, 395, 0, 84, 01685 0, 76, 73, 0, 0, 0, 0, 0, 0, 0, 01686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01688 0, 565, 0, 0, 49, 0, 0, 0, 0, 552, 01689 0, 553, 0, 346, 345, 0, 0, 481, 272, 104, 01690 105, 0, 0, 107, 0, 0, 481, 272, 313, 180, 01691 173, 183, 168, 150, 151, 152, 109, 110, 532, 315, 01692 531, 0, 0, 0, 409, 407, 293, 429, 0, 0, 01693 398, 57, 291, 119, 539, 280, 259, 254, 0, 0, 01694 256, 248, 257, 0, 565, 0, 0, 0, 256, 249, 01695 554, 0, 285, 253, 554, 246, 245, 554, 290, 46, 01696 20, 22, 21, 0, 287, 0, 0, 0, 0, 0, 01697 0, 17, 554, 278, 13, 553, 69, 554, 281, 560, 01698 559, 239, 560, 241, 282, 535, 0, 94, 467, 468, 01699 86, 81, 0, 0, 565, 0, 505, 449, 452, 450, 01700 464, 446, 430, 444, 431, 432, 448, 433, 434, 0, 01701 437, 439, 0, 440, 0, 0, 564, 7, 24, 25, 01702 26, 27, 28, 44, 45, 565, 0, 31, 40, 0, 01703 41, 554, 0, 74, 85, 30, 191, 258, 39, 209, 01704 217, 222, 223, 224, 219, 221, 231, 232, 225, 226, 01705 202, 203, 229, 230, 554, 218, 220, 214, 215, 216, 01706 204, 205, 206, 207, 208, 543, 548, 544, 549, 403, 01707 252, 401, 554, 543, 545, 544, 546, 402, 252, 0, 01708 565, 337, 0, 336, 0, 0, 0, 0, 0, 0, 01709 280, 0, 565, 0, 305, 310, 104, 105, 106, 0, 01710 486, 308, 485, 0, 565, 0, 0, 0, 505, 551, 01711 550, 317, 543, 544, 252, 252, 565, 565, 32, 193, 01712 38, 201, 55, 58, 0, 191, 538, 0, 260, 255, 01713 565, 547, 544, 554, 543, 544, 537, 284, 556, 242, 01714 289, 19, 0, 234, 0, 29, 0, 565, 200, 71, 01715 16, 277, 558, 0, 79, 91, 93, 554, 543, 544, 01716 511, 508, 507, 506, 509, 0, 523, 527, 526, 522, 01717 505, 0, 390, 510, 512, 514, 565, 520, 565, 525, 01718 565, 0, 504, 453, 0, 436, 438, 442, 210, 211, 01719 378, 565, 0, 376, 375, 264, 0, 83, 77, 0, 01720 0, 0, 0, 0, 400, 61, 0, 406, 0, 0, 01721 244, 399, 59, 243, 335, 275, 565, 565, 415, 565, 01722 338, 565, 340, 298, 339, 301, 0, 0, 304, 547, 01723 279, 554, 543, 544, 0, 0, 488, 0, 0, 104, 01724 105, 108, 554, 0, 554, 505, 0, 0, 0, 397, 01725 54, 396, 53, 0, 0, 0, 565, 120, 261, 250, 01726 0, 0, 406, 0, 0, 554, 11, 240, 87, 89, 01727 0, 511, 0, 358, 349, 351, 554, 347, 565, 0, 01728 0, 388, 0, 497, 530, 0, 500, 524, 0, 502, 01729 528, 0, 455, 456, 457, 451, 458, 511, 0, 565, 01730 0, 565, 518, 565, 565, 374, 380, 0, 0, 262, 01731 75, 192, 0, 37, 198, 36, 199, 62, 557, 0, 01732 34, 196, 35, 197, 60, 416, 417, 565, 418, 0, 01733 565, 343, 0, 0, 341, 0, 0, 0, 303, 0, 01734 0, 406, 0, 311, 0, 0, 406, 314, 533, 554, 01735 0, 490, 318, 0, 0, 194, 0, 0, 288, 516, 01736 554, 0, 356, 0, 513, 554, 0, 0, 515, 565, 01737 565, 529, 565, 521, 565, 565, 0, 0, 384, 381, 01738 382, 385, 0, 377, 365, 367, 0, 370, 0, 372, 01739 394, 263, 235, 33, 195, 0, 0, 420, 344, 0, 01740 12, 422, 0, 295, 296, 0, 0, 260, 565, 306, 01741 0, 487, 309, 489, 316, 505, 410, 408, 0, 348, 01742 359, 0, 354, 350, 389, 392, 391, 0, 493, 0, 01743 495, 0, 501, 0, 498, 503, 454, 0, 517, 0, 01744 379, 565, 565, 565, 519, 565, 565, 0, 419, 0, 01745 96, 103, 0, 421, 0, 299, 302, 412, 413, 411, 01746 0, 0, 0, 56, 0, 357, 0, 352, 565, 565, 01747 565, 565, 280, 0, 383, 0, 362, 0, 364, 371, 01748 0, 368, 373, 102, 0, 565, 0, 565, 565, 0, 01749 312, 0, 355, 0, 494, 0, 491, 496, 499, 547, 01750 279, 565, 565, 565, 565, 547, 101, 554, 543, 544, 01751 414, 342, 307, 319, 353, 565, 363, 0, 360, 366, 01752 369, 406, 492, 565, 361 01753 }; 01754 01755 /* YYDEFGOTO[NTERM-NUM]. */ 01756 static const yytype_int16 yydefgoto[] = 01757 { 01758 -1, 1, 2, 64, 65, 66, 226, 529, 530, 241, 01759 242, 413, 68, 335, 69, 70, 573, 706, 71, 72, 01760 243, 73, 74, 75, 441, 76, 200, 353, 354, 184, 01761 185, 186, 187, 574, 526, 189, 78, 415, 202, 247, 01762 519, 661, 404, 405, 215, 216, 204, 391, 205, 480, 01763 79, 333, 427, 592, 337, 786, 338, 787, 684, 910, 01764 688, 685, 860, 556, 558, 698, 865, 234, 81, 82, 01765 83, 84, 85, 86, 87, 88, 89, 90, 665, 532, 01766 673, 783, 784, 346, 724, 725, 726, 749, 642, 643, 01767 750, 829, 830, 264, 265, 446, 621, 731, 297, 475, 01768 91, 92, 382, 567, 566, 539, 909, 667, 777, 846, 01769 850, 93, 94, 95, 96, 97, 98, 99, 276, 459, 01770 100, 278, 272, 270, 274, 451, 634, 633, 741, 745, 01771 101, 271, 102, 103, 207, 105, 208, 209, 551, 687, 01772 696, 697, 623, 624, 625, 626, 627, 752, 753, 628, 01773 629, 630, 631, 821, 733, 371, 557, 252, 210, 211, 01774 108, 596, 521, 561, 286, 401, 402, 657, 431, 533, 01775 341, 245 01776 }; 01777 01778 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01779 STATE-NUM. */ 01780 #define YYPACT_NINF -778 01781 static const yytype_int16 yypact[] = 01782 { 01783 -778, 133, 2394, -778, 7010, -778, -778, -778, 6523, -778, 01784 -778, -778, -778, -778, -778, -778, 7228, 7228, -778, -778, 01785 7228, 3145, 2722, -778, -778, -778, -778, 164, 6384, -11, 01786 -778, 69, -778, -778, -778, 5623, 2863, -778, -778, 5750, 01787 -778, -778, -778, -778, -778, -778, 8427, 8427, 96, 4342, 01788 8536, 7446, 7773, 6786, -778, 6245, -778, -778, -778, 74, 01789 93, 122, 8645, 8427, -778, 187, -778, 698, 288, -778, 01790 -778, 230, 167, -778, 180, 8754, -778, 234, 2846, 273, 01791 310, -778, 8536, 8536, -778, -778, 4986, 8859, 8964, 9069, 01792 5496, 16, 60, -778, -778, 174, -778, -778, -778, -778, 01793 -778, -778, -778, -778, 201, -778, 258, 282, 206, -778, 01794 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01795 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01796 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01797 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01798 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01799 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01800 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01801 -778, -778, -778, -778, -778, -778, -778, 212, -778, -778, 01802 -778, -778, 215, 8427, 303, 4472, 8427, 8427, 8427, -778, 01803 257, 2846, 285, -778, -778, 281, 343, 38, 337, 263, 01804 290, -778, -778, -778, 4877, -778, 7228, 7228, -778, -778, 01805 5116, -778, 8536, 599, -778, 296, 315, 4602, -778, -778, 01806 -778, 311, 328, -778, 347, 206, 396, 446, 7119, 4342, 01807 329, 187, 698, -11, 370, -778, 288, 339, -30, 30, 01808 -778, 285, 356, 30, -778, -11, 442, 375, 9174, 390, 01809 -778, 351, 373, 383, -778, -778, -778, -778, -778, -778, 01810 515, -778, 552, 587, 620, 397, 607, 407, 34, 473, 01811 474, -778, -778, -778, -778, -778, -778, -778, 5225, 8536, 01812 8536, 8536, 8536, 7119, 8536, 8536, -778, -778, 7882, -778, 01813 4342, 6898, 413, 7882, 8427, 8427, 8427, 8427, 8427, 8427, 01814 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 01815 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 01816 1712, 7228, 2060, 3517, 288, 80, 80, 8536, 8536, 187, 01817 534, 416, 516, -778, -778, 386, 568, 50, 72, 301, 01818 321, 8536, 363, -778, 66, 393, -778, -778, -778, 36, 01819 41, 103, 224, 259, 266, 322, 348, 369, -778, -778, 01820 -778, 377, 10211, 10211, -778, -778, -778, -778, 8645, 8645, 01821 -778, 483, -778, -778, -778, 268, -778, -778, 8427, 8427, 01822 7337, -778, -778, 2216, 7228, 9441, 8427, 8427, 7555, -778, 01823 -11, 454, -778, -778, -11, -778, -778, 70, -778, -778, 01824 -778, -778, -778, 6523, -778, 8427, 3937, 463, 2216, 9441, 01825 8427, 698, -11, -778, -778, 5353, 462, -11, -778, 7664, 01826 -778, -778, 7773, -778, -778, -778, 296, 411, -778, -778, 01827 -778, 467, 9174, 9518, 7228, 9595, 1033, -778, -778, -778, 01828 -778, -778, -778, -778, -778, -778, -778, -778, -778, 39, 01829 -778, -778, 472, -778, 8427, 8427, -778, -778, -778, -778, 01830 -778, -778, -778, -778, -778, 28, 8427, -778, 468, 487, 01831 -778, -11, 9174, 496, -778, -778, 1576, -778, -778, 396, 01832 1512, 1512, 1512, 1512, 1223, 1223, 1879, 2079, 1512, 1512, 01833 2146, 2146, 582, 582, 2705, 1223, 1223, 1098, 1098, 790, 01834 514, 514, 396, 396, 396, 3286, 5991, 3372, 6105, -778, 01835 328, -778, -11, 448, -778, 451, -778, -778, 3004, 639, 01836 644, -778, 3662, 646, 4082, 42, 42, 534, 7991, 639, 01837 109, 9672, 7228, 9749, -778, 288, -778, 411, -778, 187, 01838 -778, -778, -778, 9826, 7228, 9903, 3517, 8536, 1115, -778, 01839 -778, -778, -778, -778, 1235, 1235, 28, 28, -778, 10270, 01840 -778, 2846, -778, -778, 6523, 10289, -778, 8427, 285, -778, 01841 290, 5877, 2581, -11, 410, 529, -778, -778, -778, -778, 01842 -778, -778, 8536, 2846, 535, -778, 328, 328, 2846, 20, 01843 698, -778, 30, 9174, 467, 338, 271, -11, 228, 261, 01844 557, -778, -778, -778, -778, 666, -778, -778, -778, -778, 01845 923, 43, -778, -778, -778, -778, 543, -778, 544, 623, 01846 547, 642, -778, -778, 722, -778, -778, -778, 396, 396, 01847 -778, 904, 4747, -778, -778, 555, 8100, -778, 467, 9174, 01848 8427, 598, 8645, 8645, -778, 483, 570, 538, 8645, 8645, 01849 -778, -778, 483, -778, -778, -778, 8209, 701, -778, 441, 01850 -778, 701, -778, -778, -778, -778, 639, 31, -778, 110, 01851 132, -11, 126, 144, 8536, 187, -778, 8536, 3517, 338, 01852 271, -778, -11, 639, 70, 923, 3517, 187, 6662, -778, 01853 -778, -778, -778, 4747, 4602, 8427, 28, -778, -778, -778, 01854 8427, 8427, 536, 8427, 8427, 70, -778, -778, -778, 251, 01855 8427, -778, 666, 450, -778, 579, -11, -778, 583, 4747, 01856 4602, -778, 923, -778, -778, 923, -778, -778, 779, -778, 01857 -778, 4602, -778, -778, -778, -778, -778, 625, 809, 583, 01858 615, 595, -778, 604, 605, -778, -778, 740, 8427, 619, 01859 467, 2846, 8427, -778, 2846, -778, 2846, -778, -778, 8645, 01860 -778, 2846, -778, 2846, -778, 468, -778, 675, -778, 4212, 01861 757, -778, 8536, 639, -778, 639, 4747, 4747, -778, 8318, 01862 3807, 147, 42, -778, 187, 639, -778, -778, -778, -11, 01863 639, -778, -778, 759, 630, 2846, 4602, 8427, -778, -778, 01864 -11, 845, 632, 826, -778, -11, 760, 637, -778, 640, 01865 643, -778, 647, -778, 651, 647, 656, 9279, -778, 657, 01866 -778, -778, 682, -778, 1199, -778, 1199, -778, 779, -778, 01867 -778, 658, 2846, -778, 2846, 9384, 80, -778, -778, 4747, 01868 -778, -778, 80, -778, -778, 639, 639, -778, 115, -778, 01869 3517, -778, -778, -778, -778, 1115, -778, -778, 664, -778, 01870 662, 845, 491, -778, -778, -778, -778, 923, -778, 779, 01871 -778, 779, -778, 779, -778, -778, -778, 751, 429, 809, 01872 -778, 672, 673, 647, -778, 679, 647, 765, -778, 432, 01873 373, 383, 3517, -778, 3662, -778, -778, -778, -778, -778, 01874 4747, 639, 3517, -778, 845, 662, 845, 685, 647, 686, 01875 647, 647, -778, 9980, -778, 1199, -778, 779, -778, -778, 01876 779, -778, -778, 411, 10057, 7228, 10134, 644, 441, 639, 01877 -778, 639, 662, 845, -778, 779, -778, -778, -778, 688, 01878 690, 647, 687, 647, 647, 81, 271, -11, 86, 118, 01879 -778, -778, -778, -778, 662, 647, -778, 779, -778, -778, 01880 -778, 124, -778, 647, -778 01881 }; 01882 01883 /* YYPGOTO[NTERM-NUM]. */ 01884 static const yytype_int16 yypgoto[] = 01885 { 01886 -778, -778, -778, 399, -778, 33, -778, -530, -33, -778, 01887 159, -778, 23, -55, 21, -778, -462, -778, -15, 741, 01888 -136, -1, -66, -778, -403, -26, 1181, -306, 750, -52, 01889 -778, -20, -778, -778, 32, -778, 748, -778, 540, -778, 01890 46, -98, -298, 54, 76, -778, -278, -196, -44, -283, 01891 27, -778, -778, -778, -778, -778, -778, -778, -778, -778, 01892 -778, -778, -778, -778, -778, -778, -778, 2, -778, -778, 01893 -778, -778, -778, -778, -778, -778, -778, -778, 298, -323, 01894 -512, -97, -610, -778, -755, -748, 120, -778, -485, -778, 01895 -636, -778, -49, -778, -778, -778, -778, -778, -778, -778, 01896 -778, -778, 752, -778, -778, -520, -778, -92, -778, -778, 01897 -778, -778, -778, -778, 753, -778, -778, -778, -778, -778, 01898 -778, -778, -778, 792, -778, -229, -778, -778, -778, -778, 01899 7, -778, 13, -778, 1031, 762, 1198, 1109, -778, -778, 01900 -12, -416, -706, -549, -667, -121, -679, -777, 25, 128, 01901 -778, -579, -778, -434, 531, -778, -778, -778, -41, -287, 01902 1927, -254, -778, -778, -32, -4, 88, -554, -217, 63, 01903 -31, -2 01904 }; 01905 01906 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 01907 positive, shift that token. If negative, reduce the rule which 01908 number is the opposite. If zero, do what YYDEFACT says. 01909 If YYTABLE_NINF, syntax error. */ 01910 #define YYTABLE_NINF -566 01911 static const yytype_int16 yytable[] = 01912 { 01913 109, 199, 199, 269, 80, 199, 80, 248, 224, 302, 01914 249, 253, 632, 534, 399, 190, 240, 676, 206, 206, 01915 488, 191, 206, 222, 675, 225, 693, 259, 336, 712, 01916 622, 339, 433, 522, 288, 190, 435, 110, 369, 604, 01917 188, 191, 831, 453, 531, 456, 548, 460, 244, 250, 01918 254, 80, 206, 719, 340, 261, 823, 780, 873, 894, 01919 188, 785, 754, 870, 206, 818, 727, 549, 218, 672, 01920 203, 212, 729, 246, 213, -96, 520, 261, 528, 648, 01921 260, 703, 704, 281, 206, 206, 374, 188, 206, 345, 01922 355, 355, 815, 531, -99, 462, 583, -103, 219, -98, 01923 447, 372, 260, 422, 640, 334, 334, 294, 295, 334, 01924 429, 586, 579, 832, 260, 260, 260, 430, 564, 565, 01925 579, -475, 188, 915, 632, -482, -474, 791, 287, -69, 01926 779, -100, 538, 3, -102, -99, 221, -97, 796, 520, 01927 463, 528, 641, 448, 449, 586, 607, -96, 894, 287, 01928 730, -98, 237, 820, 380, 373, 824, -101, 795, 873, 01929 -83, 67, 240, 67, 481, 597, 800, 818, 942, -100, 01930 432, 789, -97, 727, 812, -475, 284, 430, 285, 550, 01931 -474, 279, 280, 831, 381, 635, 632, 284, -476, 285, 01932 -88, 597, 440, 767, 417, 964, 375, 80, 823, 199, 01933 774, 199, 199, 392, 728, 227, 240, 755, 392, 424, 01934 425, 284, -95, 285, 818, 406, 206, 221, 206, 206, 01935 275, 806, 206, -543, 206, 284, -99, 285, -99, 80, 01936 636, -98, 374, -98, 468, 469, 470, 471, 244, 277, 01937 80, 80, -476, 407, 681, 409, 760, 691, 907, -94, 01938 -91, 436, -543, -90, 479, 892, 692, 895, 296, 479, 01939 261, 632, 727, -100, 727, -100, -90, 240, 400, -97, 01940 403, -97, -93, 56, -544, 483, 298, -406, 218, 799, 01941 859, 380, 535, 536, -92, 260, -92, -89, -482, 597, 01942 80, 206, 206, 206, 206, 80, 206, 206, 919, 244, 01943 206, 597, 80, 261, 287, 206, 220, 537, 408, -477, 01944 -96, 221, 334, 334, 334, 334, 199, 473, 474, 477, 01945 299, 467, 727, 917, 485, 294, 295, -540, 260, 406, 01946 911, 426, 284, 206, 285, 80, -406, -90, 908, 206, 01947 206, -88, 375, 303, -479, 378, 952, -541, 217, 580, 01948 397, -478, 383, 206, 790, 420, -279, 220, -324, 385, 01949 334, 334, 518, -477, -547, 727, 388, 727, -90, 379, 01950 -92, -90, -103, 389, 545, -90, 440, -102, 527, 199, 01951 206, 206, 941, 776, 709, 717, -469, -406, 602, -406, 01952 -406, -103, 406, 591, 727, 330, 206, 421, -479, 568, 01953 570, -92, 287, 971, -92, -478, -472, -480, -92, -279, 01954 -279, -324, -324, -544, 109, 546, 440, 552, 80, 547, 01955 190, 390, -95, -547, 396, 518, 191, 80, 393, 199, 01956 398, 632, 418, -469, 438, 439, 443, -540, 414, -469, 01957 -469, 527, 406, -540, 261, 188, 206, 67, 331, 332, 01958 518, 416, 472, 214, -472, 782, 779, -541, -481, -472, 01959 -472, -480, 559, -541, 304, 527, 699, 701, -272, 260, 01960 217, 541, 423, 644, -547, 518, -547, -547, 553, -68, 01961 -543, 394, 395, 428, 261, 394, 419, -469, 587, 444, 01962 445, 527, 589, 434, 677, 590, -280, 713, 437, 669, 01963 651, 671, 721, 457, 611, 612, 613, 614, -472, 260, 01964 599, -481, -481, 461, 923, 601, 560, 934, 656, -98, 01965 751, -272, -272, 902, 542, 543, 663, 199, 668, 904, 01966 442, 554, 555, 420, 80, 658, 80, 718, 659, 199, 01967 406, 464, 465, 721, 206, 611, 612, 613, 614, -280, 01968 -280, 538, 406, 484, 707, -102, 206, -98, 80, 206, 01969 -100, 466, 663, 663, 644, 644, 654, 554, 555, 647, 01970 935, 936, 540, 518, 660, 67, 447, 572, 392, 656, 01971 694, 190, 304, 440, 600, 518, -94, 191, -90, 527, 01972 811, -92, 251, 544, 206, 663, 655, 588, 674, 674, 01973 595, 527, -83, 656, 662, 261, 188, 603, -258, 757, 01974 660, 660, 686, 447, 822, 715, 714, 825, 637, 448, 01975 449, 450, 479, 807, 734, 769, 734, 646, 734, 792, 01976 260, 916, 794, 327, 328, 329, 649, 957, -100, 756, 01977 700, 702, 654, 660, 80, -97, 802, -97, 447, 664, 01978 304, 261, 666, 410, 206, 206, 448, 449, 452, 670, 01979 206, 206, 411, 412, 778, 781, 720, 781, 447, 781, 01980 803, 804, 716, 763, 765, 737, 260, 656, -89, 770, 01981 772, 447, 597, 732, 735, 455, 206, 738, 656, 206, 01982 80, 448, 449, 454, 740, -259, 816, 817, 80, 325, 01983 326, 327, 328, 329, 644, 80, 80, 334, 826, 762, 01984 334, 448, 449, 458, 768, 893, 779, 896, 721, 813, 01985 611, 612, 613, 614, 448, 449, 756, 852, 748, 833, 01986 188, 80, 80, 384, 827, 834, 386, 387, 289, 290, 01987 291, 292, 293, 80, 836, 838, 848, 756, 793, 734, 01988 840, 734, 734, 855, 856, 722, 918, 858, 920, -260, 01989 801, 723, 921, 845, 201, 201, 849, 867, 201, 866, 01990 875, 206, 871, 868, 876, 847, 742, 743, 851, 744, 01991 877, 80, 798, 879, 206, 44, 45, 881, 80, 80, 01992 843, 883, 80, 886, 233, 236, 890, 889, -261, 201, 01993 201, 913, 914, 808, 951, 334, 953, 922, 80, 954, 01994 282, 283, 925, 927, 814, 594, 903, 734, 734, 930, 01995 734, 933, 734, 734, 965, 943, 945, 967, 343, 888, 01996 -543, 721, -544, 611, 612, 613, 614, 678, 478, 358, 01997 924, 961, 810, 487, 376, 960, 973, 899, 377, 273, 01998 0, 80, 370, 912, 260, 674, 781, 861, 304, 891, 01999 819, 828, 80, 611, 612, 613, 614, 0, 615, 937, 02000 0, 938, 260, 317, 318, 617, 0, 939, 721, 0, 02001 611, 612, 613, 614, 0, 0, 0, 863, 0, 734, 02002 734, 734, 0, 734, 734, 618, 0, 721, 869, 611, 02003 612, 613, 614, 874, 80, 0, 80, 325, 326, 327, 02004 328, 329, 80, 0, 80, 722, 734, 734, 734, 734, 02005 199, 872, 0, 0, 0, 0, 0, 0, 0, 576, 02006 578, 0, 0, 406, 722, 668, 781, 206, 251, 0, 02007 0, 201, 0, 0, 201, 201, 282, 0, 0, 734, 02008 734, 734, 734, 656, 0, 518, 747, 0, 611, 612, 02009 613, 614, 201, 734, 201, 201, 518, 0, 0, 578, 02010 0, 734, 251, 0, 788, 610, 0, 611, 612, 613, 02011 614, 0, 527, 0, 0, 0, 0, 0, 0, 0, 02012 0, 797, 0, 615, 0, 0, 0, 0, 0, 616, 02013 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02014 0, 0, 615, 0, 0, 0, 645, 0, 616, 617, 02015 618, 0, 0, 619, 0, 0, 0, 0, 0, 0, 02016 0, 0, 0, 104, 0, 104, 0, 0, 0, 618, 02017 0, 0, 619, 0, 0, 0, 201, 0, 0, 748, 02018 0, 486, 489, 490, 491, 492, 493, 494, 495, 496, 02019 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 02020 507, 508, 509, 510, 511, 512, 513, 514, 487, 201, 02021 104, 853, 0, 854, 262, 610, 0, 611, 612, 613, 02022 614, 0, 0, 862, 0, 0, 0, 0, 864, 0, 02023 0, 0, 0, 0, 0, 0, 262, 0, 0, 0, 02024 0, 107, 0, 107, 0, 0, 0, 708, 347, 356, 02025 356, 356, 615, 0, 0, 0, 569, 571, 616, 617, 02026 0, 0, 0, 0, 0, 0, 575, 201, 201, 0, 02027 0, 0, 201, 0, 569, 571, 201, 0, 0, 618, 02028 0, 0, 619, 905, 906, 0, 0, 0, 107, 736, 02029 0, 739, 263, 593, 0, 0, 304, 610, 598, 611, 02030 612, 613, 614, 0, 0, 620, 0, 201, 0, 0, 02031 201, 317, 318, 77, 263, 77, 759, 0, 0, 0, 02032 0, 0, 201, 0, 0, 0, 348, 357, 357, 0, 02033 106, 0, 106, 0, 615, 0, 775, 0, 0, 940, 02034 616, 617, 638, 639, 324, 325, 326, 327, 328, 329, 02035 0, 0, 0, 0, 201, 0, 104, 0, 0, 0, 02036 77, 618, 0, 0, 619, -565, 0, 962, 0, 963, 02037 0, 0, 0, -565, -565, -565, 0, 106, -565, -565, 02038 -565, 747, -565, 611, 612, 613, 614, 695, 104, 0, 02039 809, 0, -565, 0, 0, 0, 0, 0, 344, 104, 02040 104, 0, -565, -565, 0, -565, -565, -565, -565, -565, 02041 0, 0, 835, 0, 837, 839, 201, 0, 615, 262, 02042 201, 304, 0, 0, 616, 617, 0, 0, 841, 0, 02043 0, 0, 201, 0, 107, 0, 317, 318, 0, 0, 02044 0, 0, 0, 0, 0, 618, 0, 0, 619, 104, 02045 -565, 0, 0, 0, 104, 201, 0, 0, 0, 857, 02046 0, 104, 262, 0, 0, 0, 107, 322, 323, 324, 02047 325, 326, 327, 328, 329, 0, 0, 107, 107, 0, 02048 878, 880, 0, 882, 0, 884, 885, 0, 0, 0, 02049 0, 0, 0, 0, 104, 0, 0, 263, 0, 0, 02050 0, 0, -565, 0, -565, 0, 77, 217, -565, 0, 02051 -565, 0, -565, 0, 0, 0, 0, 0, 0, 0, 02052 0, 0, 0, 106, 201, 0, 0, 107, 761, 0, 02053 764, 766, 107, 0, 0, 0, 771, 773, 77, 107, 02054 263, 0, 0, 0, 201, 0, 0, 0, 0, 77, 02055 77, 0, 926, 928, 929, 106, 931, 932, 0, 0, 02056 0, 0, 0, 0, 0, 0, 106, 106, 0, 0, 02057 0, 0, 107, 0, 0, 0, 0, 104, 0, 944, 02058 946, 947, 948, 805, 0, 0, 104, 0, 764, 766, 02059 0, 771, 773, 0, 0, 0, 0, 0, 201, 77, 02060 0, 0, 0, 262, 77, 0, 0, 0, 0, 0, 02061 0, 77, 966, 968, 969, 970, 106, 0, 0, 0, 02062 0, 106, 0, 0, 0, 0, 972, 0, 106, 0, 02063 0, 0, 0, 0, 974, 0, 201, 0, 0, 0, 02064 842, 0, 0, 262, 77, 0, 0, 844, 0, 0, 02065 0, 0, 0, 0, 0, 107, 0, 0, 0, 0, 02066 0, 106, 0, 0, 107, 0, 0, 201, 0, 0, 02067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02068 0, 263, 0, 0, 0, 844, 0, 0, 0, 0, 02069 0, 0, 0, 104, 0, 104, 0, 0, 0, 0, 02070 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02071 304, -566, -566, -566, -566, 309, 310, 104, 0, -566, 02072 -566, 263, 0, 0, 0, 317, 318, 77, 0, 0, 02073 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 02074 0, 0, 0, 0, 106, 0, 0, 0, 0, 0, 02075 650, 0, 0, 106, 320, 321, 322, 323, 324, 325, 02076 326, 327, 328, 329, 262, 0, 0, 0, 0, 0, 02077 0, 107, 0, 107, 304, 305, 306, 307, 308, 309, 02078 310, 311, 312, 313, 314, 315, 316, 0, 0, 317, 02079 318, 0, 0, 0, 0, 107, 0, 0, 0, 0, 02080 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 02081 262, 0, 0, 201, 0, 0, 319, 0, 320, 321, 02082 322, 323, 324, 325, 326, 327, 328, 329, 0, 0, 02083 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02084 0, 0, 263, 77, 0, 77, -237, 0, 0, 104, 02085 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 02086 106, 0, 106, 0, 104, 104, 0, 77, 0, 0, 02087 0, 0, 0, 746, 0, 0, 0, 0, 0, 0, 02088 0, 107, 0, 0, 106, 0, 0, 0, 263, 0, 02089 104, 104, 0, 0, 515, 516, 0, 0, 517, 0, 02090 0, 0, 104, 0, 0, 0, 0, 0, 155, 156, 02091 157, 158, 159, 160, 161, 162, 163, 0, 0, 164, 02092 165, 0, 0, 166, 167, 168, 169, 107, 0, 0, 02093 0, 0, 0, 0, 0, 107, 0, 170, 0, 0, 02094 104, 0, 107, 107, 0, 0, 0, 104, 104, 0, 02095 0, 104, 0, 77, 171, 172, 173, 174, 175, 176, 02096 177, 178, 179, 180, 0, 181, 182, 104, 107, 107, 02097 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02098 107, 0, 0, 183, 217, 0, 0, 0, 356, 0, 02099 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 02100 0, 0, 0, 0, 0, 0, 900, 77, 0, 0, 02101 104, 0, 0, 0, 77, 77, 106, 0, 107, 0, 02102 0, 104, 0, 0, 106, 107, 107, 0, 0, 107, 02103 0, 106, 106, 0, 0, 0, 0, 0, 0, 0, 02104 77, 77, 0, 0, 0, 107, 0, 0, 0, 0, 02105 0, 0, 77, 0, 0, 0, 0, 106, 106, 0, 02106 0, 0, 0, 104, 0, 104, 357, 0, 0, 106, 02107 0, 104, 0, 104, 0, 0, 0, 304, 305, 306, 02108 307, 308, 309, 310, 901, 0, 313, 314, 107, 0, 02109 77, 0, 317, 318, 0, 0, 0, 77, 77, 107, 02110 0, 77, 0, 235, 235, 0, 0, 106, 235, 235, 02111 235, 0, 0, 0, 106, 106, 0, 77, 106, 0, 02112 235, 320, 321, 322, 323, 324, 325, 326, 327, 328, 02113 329, 0, 235, 0, 106, 0, 0, 0, 0, 0, 02114 0, 107, 0, 107, 235, 235, 235, 0, 0, 107, 02115 0, 107, 0, 0, 0, 0, 898, 0, 0, 0, 02116 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02117 0, 77, 0, 0, 0, 0, 0, 106, 0, 0, 02118 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 02119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02121 0, 0, 0, 77, 0, 77, 0, 0, 0, 0, 02122 0, 77, 0, 77, 0, 0, 0, 0, 0, 0, 02123 106, 0, 106, 0, 0, 0, 0, 0, 106, 0, 02124 106, 0, 523, 524, 0, 0, 525, 0, 0, 0, 02125 235, 0, 0, 235, 235, 235, 155, 156, 157, 158, 02126 159, 160, 161, 162, 163, 0, 0, 164, 165, 0, 02127 0, 166, 167, 168, 169, 0, 0, 304, 305, 306, 02128 307, 308, 309, 310, 311, 170, 313, 314, 0, 0, 02129 0, 0, 317, 318, 0, 0, 0, 0, 0, 0, 02130 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 02131 179, 180, 0, 181, 182, 235, 0, 0, 0, 0, 02132 0, 320, 321, 322, 323, 324, 325, 326, 327, 328, 02133 329, 183, 217, 0, 0, 0, 0, 0, 0, 0, 02134 0, 0, 0, 0, 304, 305, 306, 307, 308, 309, 02135 310, 311, 312, 313, 314, -566, -566, 0, 235, 317, 02136 318, 235, 235, 235, 235, 235, 235, 235, 235, 235, 02137 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 02138 235, 235, 235, 235, 235, 235, 235, 0, 320, 321, 02139 322, 323, 324, 325, 326, 327, 328, 329, 581, 516, 02140 0, 0, 582, 0, 0, 0, 0, 0, 0, 0, 02141 0, 0, 155, 156, 157, 158, 159, 160, 161, 162, 02142 163, 0, 0, 164, 165, 0, 0, 166, 167, 168, 02143 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02144 0, 170, 0, 0, 0, 235, 235, 235, 0, 0, 02145 0, 0, 0, 235, 235, 235, 0, 0, 171, 172, 02146 173, 174, 175, 176, 177, 178, 179, 180, 0, 181, 02147 182, 0, 235, 0, 0, 0, 0, 235, 0, 0, 02148 0, 0, 0, 0, 0, 0, 235, 183, 217, 235, 02149 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 02150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02152 0, 235, 235, 0, -565, 4, 0, 5, 6, 7, 02153 8, 9, 0, 235, 0, 10, 11, 0, 0, 235, 02154 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02155 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02156 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02157 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 02158 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02159 46, 47, 0, 0, 0, 235, 0, 0, 0, 0, 02160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02161 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02162 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02163 0, 0, 0, 0, 235, 0, 0, 0, 0, 0, 02164 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02166 235, 0, 0, 0, 0, 0, 0, 0, 0, -565, 02167 0, -565, 0, 0, 0, 0, 0, 0, 0, 0, 02168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02170 0, 0, 0, 235, 0, 0, 235, 235, 0, 0, 02171 0, -279, 0, 0, 0, 0, 0, 0, 0, -279, 02172 -279, -279, 0, 235, -279, -279, -279, 0, -279, 0, 02173 0, 0, 0, 0, 0, 0, 0, 0, -279, -279, 02174 -279, 0, 0, 0, 0, 0, 0, 0, -279, -279, 02175 0, -279, -279, -279, -279, -279, 0, 0, 0, 0, 02176 0, 0, 235, 0, 0, 0, 0, 235, 235, 0, 02177 235, 235, 0, 0, 0, 0, 0, 235, 0, -279, 02178 -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, 02179 -279, -279, 0, 0, -279, -279, -279, 0, 711, -279, 02180 0, 0, 0, 0, 0, -279, 0, 0, 0, 0, 02181 0, 0, 0, 0, 0, 235, 0, 0, -279, 235, 02182 -101, -279, -279, -279, -279, -279, -279, -279, -279, -279, 02183 -279, -279, -279, 0, 0, 0, 0, 0, 0, 0, 02184 0, 0, 0, 0, 0, 0, 235, 0, -279, -279, 02185 -279, -279, -405, 0, -279, -279, -279, 0, -279, 0, 02186 -405, -405, -405, 0, 235, -405, -405, -405, 0, -405, 02187 0, 0, 0, 0, 0, 0, 0, 0, -405, -405, 02188 -405, 0, 0, 0, 235, 0, 0, 0, 0, -405, 02189 -405, 0, -405, -405, -405, -405, -405, 0, 0, 0, 02190 0, 0, 235, 304, 305, 306, 307, 308, 309, 310, 02191 311, 312, 313, 314, 315, 316, 0, 0, 317, 318, 02192 -405, -405, -405, -405, -405, -405, -405, -405, -405, -405, 02193 -405, -405, -405, 0, 0, -405, -405, -405, 0, 0, 02194 -405, 0, 0, 0, 0, 319, -405, 320, 321, 322, 02195 323, 324, 325, 326, 327, 328, 329, 0, 0, 0, 02196 0, 0, -405, 0, -405, -405, -405, -405, -405, -405, 02197 -405, -405, -405, -405, 0, 0, 0, 0, 0, 0, 02198 0, 0, 221, 0, 0, 0, 0, 0, -405, -405, 02199 -405, -405, -405, -273, 217, -405, -405, -405, 0, -405, 02200 0, -273, -273, -273, 0, 0, -273, -273, -273, 0, 02201 -273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02202 -273, -273, -273, 0, 0, 0, 0, 0, 0, 0, 02203 -273, -273, 0, -273, -273, -273, -273, -273, 0, 0, 02204 0, 0, 0, 0, 304, 305, 306, 307, 308, 309, 02205 310, 311, 312, 313, 314, 315, 316, 0, 0, 317, 02206 318, -273, -273, -273, -273, -273, -273, -273, -273, -273, 02207 -273, -273, -273, -273, 0, 0, -273, -273, -273, 0, 02208 0, -273, 0, 0, 0, 0, 319, -273, 320, 321, 02209 322, 323, 324, 325, 326, 327, 328, 329, 0, 0, 02210 -273, 0, 0, -273, -273, -273, -273, -273, -273, -273, 02211 -273, -273, -273, -273, -273, 0, 0, 0, 0, 0, 02212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02213 -273, -273, -273, -273, -565, 0, -273, -273, -273, 0, 02214 -273, 0, -565, -565, -565, 0, 0, -565, -565, -565, 02215 0, -565, 0, 0, 0, 0, 0, 0, 0, 0, 02216 -565, -565, -565, 0, 0, 0, 0, 0, 0, 0, 02217 0, -565, -565, 0, -565, -565, -565, -565, -565, 0, 02218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02220 0, 0, -565, -565, -565, -565, -565, -565, -565, -565, 02221 -565, -565, -565, -565, -565, 0, 0, -565, -565, -565, 02222 0, 0, -565, 0, 0, 0, 0, 0, -565, 0, 02223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02224 0, 0, 0, 0, -565, 0, -565, -565, -565, -565, 02225 -565, -565, -565, -565, -565, -565, 0, 0, 0, 0, 02226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02227 -565, -565, -565, -565, -565, -286, 217, -565, -565, -565, 02228 0, -565, 0, -286, -286, -286, 0, 0, -286, -286, 02229 -286, 0, -286, 0, 0, 0, 0, 0, 0, 0, 02230 0, 0, -286, -286, 0, 0, 0, 0, 0, 0, 02231 0, 0, -286, -286, 0, -286, -286, -286, -286, -286, 02232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02234 0, 0, 0, -286, -286, -286, -286, -286, -286, -286, 02235 -286, -286, -286, -286, -286, -286, 0, 0, -286, -286, 02236 -286, 0, 0, -286, 0, 0, 0, 0, 0, -286, 02237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02238 0, 0, 0, 0, 0, -286, 0, -286, -286, -286, 02239 -286, -286, -286, -286, -286, -286, -286, 0, 0, 0, 02240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02241 0, 0, -286, -286, -286, -286, -547, 214, -286, -286, 02242 -286, 0, -286, 0, -547, -547, -547, 0, 0, 0, 02243 -547, -547, 0, -547, 0, 0, 0, 0, 0, 0, 02244 0, 0, -547, 0, 0, 0, 0, 0, 0, 0, 02245 0, 0, 0, -547, -547, 0, -547, -547, -547, -547, 02246 -547, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02247 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02248 0, 0, 0, 0, -547, -547, -547, -547, -547, -547, 02249 -547, -547, -547, -547, -547, -547, -547, 0, 0, -547, 02250 -547, -547, -279, 652, 0, 0, 0, 0, 0, 0, 02251 -279, -279, -279, 0, 0, 0, -279, -279, 0, -279, 02252 0, 0, 0, 0, 0, -99, -547, 0, -547, -547, 02253 -547, -547, -547, -547, -547, -547, -547, -547, 0, -279, 02254 -279, 0, -279, -279, -279, -279, -279, 0, 0, 0, 02255 0, 0, -547, -547, -547, -547, -91, 0, 0, -547, 02256 0, -547, 0, -547, 0, 0, 0, 0, 0, 0, 02257 -279, -279, -279, -279, -279, -279, -279, -279, -279, -279, 02258 -279, -279, -279, 0, 0, -279, -279, -279, 0, 653, 02259 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02261 0, -101, -279, 0, -279, -279, -279, -279, -279, -279, 02262 -279, -279, -279, -279, 0, 0, 0, 0, 0, 0, 02263 0, 0, 0, 0, 0, 0, 0, 0, 0, -279, 02264 -279, -279, -93, 0, 0, -279, 0, -279, 238, -279, 02265 5, 6, 7, 8, 9, -565, -565, -565, 10, 11, 02266 0, 0, -565, 12, 0, 13, 14, 15, 16, 17, 02267 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02268 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 02269 0, 0, 28, 29, 0, 31, 32, 33, 34, 35, 02270 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02271 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02273 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02274 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02275 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02276 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02277 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, 02278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02279 0, 0, -565, 238, -565, 5, 6, 7, 8, 9, 02280 0, 0, -565, 10, 11, 0, -565, -565, 12, 0, 02281 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02282 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02283 0, 27, 0, 0, 0, 0, 0, 28, 29, 0, 02284 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02285 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02286 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02287 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02288 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02289 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02291 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, 02292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02293 0, 0, 0, 0, 0, 0, 0, -565, 238, -565, 02294 5, 6, 7, 8, 9, 0, 0, -565, 10, 11, 02295 0, 0, -565, 12, -565, 13, 14, 15, 16, 17, 02296 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02297 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 02298 0, 0, 28, 29, 0, 31, 32, 33, 34, 35, 02299 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02300 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02302 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02303 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02304 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02305 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02306 62, 63, 0, 0, 0, 0, 0, 0, 4, 0, 02307 5, 6, 7, 8, 9, 0, 0, 0, 10, 11, 02308 0, 0, -565, 12, -565, 13, 14, 15, 16, 17, 02309 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02310 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 02311 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, 02312 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02313 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02315 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02316 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02317 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02318 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02319 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, 02320 0, 0, 0, 0, -565, 0, 0, 0, 0, 0, 02321 0, 0, -565, 238, -565, 5, 6, 7, 8, 9, 02322 0, 0, -565, 10, 11, 0, 0, -565, 12, 0, 02323 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02324 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02325 0, 27, 0, 0, 0, 0, 0, 28, 29, 0, 02326 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02327 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02329 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02330 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02331 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02333 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, 02334 0, 0, 0, 238, 0, 5, 6, 7, 8, 9, 02335 0, -565, -565, 10, 11, 0, 0, -565, 12, -565, 02336 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02337 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02338 0, 27, 0, 0, 0, 0, 0, 28, 29, 0, 02339 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02340 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02342 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02343 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02344 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02346 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, 02347 0, 0, 0, 238, 0, 5, 6, 7, 8, 9, 02348 0, 0, 0, 10, 11, 0, 0, -565, 12, -565, 02349 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02350 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02351 0, 27, 0, 0, 0, 0, 0, 28, 29, 0, 02352 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02353 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02355 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02356 0, 239, 50, 0, 51, 52, 0, 53, 0, 54, 02357 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02359 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, 02360 0, 0, 0, 238, 0, 5, 6, 7, 8, 9, 02361 0, 0, 0, 10, 11, -565, 0, -565, 12, -565, 02362 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02363 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02364 0, 27, 0, 0, 0, 0, 0, 28, 29, 0, 02365 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02366 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02368 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02369 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02370 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02372 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, 02373 0, 0, 0, 238, 0, 5, 6, 7, 8, 9, 02374 0, 0, 0, 10, 11, -565, 0, -565, 12, -565, 02375 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02376 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02377 0, 27, 0, 0, 0, 0, 0, 28, 29, 0, 02378 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02379 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02381 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02382 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02383 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02385 0, 0, 0, 0, 61, 62, 63, 0, 0, 0, 02386 0, 0, 0, 0, 0, 0, 0, 0, 0, -565, 02387 0, 0, 0, 0, 0, 0, 0, -565, 238, -565, 02388 5, 6, 7, 8, 9, 0, 0, -565, 10, 11, 02389 0, 0, 0, 12, 0, 13, 14, 15, 16, 17, 02390 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02391 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 02392 0, 0, 28, 29, 0, 31, 32, 33, 34, 35, 02393 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02394 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02396 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02397 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02398 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02399 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02400 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, 02401 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02402 0, 0, -565, 12, -565, 13, 14, 15, 16, 17, 02403 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02404 23, 24, 25, 26, 0, 0, 192, 0, 0, 0, 02405 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02406 36, 37, 38, 39, 40, 193, 41, 42, 0, 43, 02407 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02409 0, 0, 0, 194, 0, 0, 195, 50, 0, 51, 02410 52, 0, 196, 197, 54, 55, 56, 57, 58, 59, 02411 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02412 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02413 198, 63, 12, 0, 13, 14, 15, 16, 17, 18, 02414 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02415 24, 25, 26, 0, 221, 27, 0, 0, 0, 0, 02416 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02417 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02418 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02419 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02420 0, 0, 194, 0, 0, 195, 50, 0, 51, 52, 02421 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02423 0, 0, 0, 0, 0, 0, 0, 0, 61, 62, 02424 63, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02425 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02426 0, 284, 12, 285, 13, 14, 15, 16, 17, 18, 02427 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02428 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 02429 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02430 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02431 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02433 0, 0, 194, 0, 0, 195, 50, 0, 51, 52, 02434 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02435 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02436 7, 8, 9, 0, 0, 0, 10, 11, 61, 62, 02437 63, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02438 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02439 25, 26, 0, 221, 27, 0, 0, 0, 0, 0, 02440 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 02441 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02442 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02444 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02445 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02446 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02447 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, 02448 0, 0, 0, 0, 0, 0, 5, 6, 7, 8, 02449 9, 0, 0, 0, 10, 11, 0, 0, 0, 12, 02450 466, 13, 14, 15, 16, 17, 18, 19, 0, 0, 02451 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 02452 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, 02453 0, 31, 32, 33, 34, 35, 36, 37, 38, 39, 02454 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02455 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02456 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 02457 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, 02458 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 02459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02460 0, 0, 0, 0, 0, 61, 62, 63, 0, 0, 02461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02462 0, 0, 0, 0, 0, 0, 0, 0, 466, 111, 02463 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 02464 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 02465 132, 133, 134, 0, 0, 0, 135, 136, 137, 359, 02466 360, 361, 362, 142, 143, 144, 0, 0, 0, 0, 02467 0, 145, 146, 147, 148, 363, 364, 365, 366, 153, 02468 37, 38, 367, 40, 0, 0, 0, 0, 0, 0, 02469 0, 0, 155, 156, 157, 158, 159, 160, 161, 162, 02470 163, 0, 0, 164, 165, 0, 0, 166, 167, 168, 02471 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02472 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 02473 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 02474 173, 174, 175, 176, 177, 178, 179, 180, 0, 181, 02475 182, 0, 0, 0, 0, 0, -540, -540, -540, 0, 02476 -540, 0, 0, 0, -540, -540, 0, 183, 368, -540, 02477 0, -540, -540, -540, -540, -540, -540, -540, 0, -540, 02478 0, 0, 0, -540, -540, -540, -540, -540, -540, -540, 02479 0, 0, -540, 0, 0, 0, 0, 0, 0, -540, 02480 0, 0, -540, -540, -540, -540, -540, -540, -540, -540, 02481 -540, -540, -540, -540, 0, -540, -540, -540, 0, -540, 02482 -540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02483 0, 0, 0, 0, 0, 0, 0, 0, 0, -540, 02484 0, 0, -540, -540, 0, -540, -540, 0, -540, -540, 02485 -540, -540, -540, -540, -540, -540, -540, 0, 0, 0, 02486 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02487 0, 0, 0, 0, 0, -540, -540, -540, 0, 0, 02488 0, 0, 0, -541, -541, -541, 0, -541, 0, -540, 02489 0, -541, -541, 0, 0, -540, -541, 0, -541, -541, 02490 -541, -541, -541, -541, -541, 0, -541, 0, 0, 0, 02491 -541, -541, -541, -541, -541, -541, -541, 0, 0, -541, 02492 0, 0, 0, 0, 0, 0, -541, 0, 0, -541, 02493 -541, -541, -541, -541, -541, -541, -541, -541, -541, -541, 02494 -541, 0, -541, -541, -541, 0, -541, -541, 0, 0, 02495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02496 0, 0, 0, 0, 0, 0, -541, 0, 0, -541, 02497 -541, 0, -541, -541, 0, -541, -541, -541, -541, -541, 02498 -541, -541, -541, -541, 0, 0, 0, 0, 0, 0, 02499 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02500 0, 0, -541, -541, -541, 0, 0, 0, 0, 0, 02501 -543, -543, -543, 0, -543, 0, -541, 0, -543, -543, 02502 0, 0, -541, -543, 0, -543, -543, -543, -543, -543, 02503 -543, -543, 0, 0, 0, 0, 0, -543, -543, -543, 02504 -543, -543, -543, -543, 0, 0, -543, 0, 0, 0, 02505 0, 0, 0, -543, 0, 0, -543, -543, -543, -543, 02506 -543, -543, -543, -543, -543, -543, -543, -543, 0, -543, 02507 -543, -543, 0, -543, -543, 0, 0, 0, 0, 0, 02508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02509 0, 0, 0, -543, 710, 0, -543, -543, 0, -543, 02510 -543, 0, -543, -543, -543, -543, -543, -543, -543, -543, 02511 -543, 0, 0, 0, 0, 0, -99, 0, 0, 0, 02512 0, 0, 0, 0, -545, -545, -545, 0, -545, -543, 02513 -543, -543, -545, -545, 0, 0, 0, -545, 0, -545, 02514 -545, -545, -545, -545, -545, -545, 0, 0, 0, -543, 02515 0, -545, -545, -545, -545, -545, -545, -545, 0, 0, 02516 -545, 0, 0, 0, 0, 0, 0, -545, 0, 0, 02517 -545, -545, -545, -545, -545, -545, -545, -545, -545, -545, 02518 -545, -545, 0, -545, -545, -545, 0, -545, -545, 0, 02519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02520 0, 0, 0, 0, 0, 0, 0, -545, 0, 0, 02521 -545, -545, 0, -545, -545, 0, -545, -545, -545, -545, 02522 -545, -545, -545, -545, -545, 0, 0, 0, 0, 0, 02523 0, 0, 0, 0, 0, 0, 0, 0, -546, -546, 02524 -546, 0, -546, -545, -545, -545, -546, -546, 0, 0, 02525 0, -546, 0, -546, -546, -546, -546, -546, -546, -546, 02526 0, 0, 0, -545, 0, -546, -546, -546, -546, -546, 02527 -546, -546, 0, 0, -546, 0, 0, 0, 0, 0, 02528 0, -546, 0, 0, -546, -546, -546, -546, -546, -546, 02529 -546, -546, -546, -546, -546, -546, 0, -546, -546, -546, 02530 0, -546, -546, 0, 0, 0, 0, 0, 0, 0, 02531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02532 0, -546, 0, 0, -546, -546, 0, -546, -546, 0, 02533 -546, -546, -546, -546, -546, -546, -546, -546, -546, 0, 02534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02535 0, 0, 0, 0, 0, 0, 0, -546, -546, -546, 02536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02537 0, 0, 0, 0, 0, 0, 0, -546, 111, 112, 02538 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 02539 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02540 133, 134, 0, 0, 0, 135, 136, 137, 138, 139, 02541 140, 141, 142, 143, 144, 0, 0, 0, 0, 0, 02542 145, 146, 147, 148, 149, 150, 151, 152, 153, 266, 02543 267, 154, 268, 0, 0, 0, 0, 0, 0, 0, 02544 0, 155, 156, 157, 158, 159, 160, 161, 162, 163, 02545 0, 0, 164, 165, 0, 0, 166, 167, 168, 169, 02546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02547 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02548 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 02549 174, 175, 176, 177, 178, 179, 180, 0, 181, 182, 02550 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02551 0, 0, 0, 0, 0, 0, 183, 111, 112, 113, 02552 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 02553 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 02554 134, 0, 0, 0, 135, 136, 137, 138, 139, 140, 02555 141, 142, 143, 144, 0, 0, 0, 0, 0, 145, 02556 146, 147, 148, 149, 150, 151, 152, 153, 223, 0, 02557 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02558 155, 156, 157, 158, 159, 160, 161, 162, 163, 0, 02559 0, 164, 165, 0, 0, 166, 167, 168, 169, 0, 02560 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 02561 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 02562 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 02563 175, 176, 177, 178, 179, 180, 0, 181, 182, 0, 02564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02565 0, 0, 0, 0, 0, 183, 111, 112, 113, 114, 02566 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 02567 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 02568 0, 0, 0, 135, 136, 137, 138, 139, 140, 141, 02569 142, 143, 144, 0, 0, 0, 0, 0, 145, 146, 02570 147, 148, 149, 150, 151, 152, 153, 0, 0, 154, 02571 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 02572 156, 157, 158, 159, 160, 161, 162, 163, 0, 0, 02573 164, 165, 0, 0, 166, 167, 168, 169, 0, 0, 02574 0, 0, 0, 0, 0, 0, 0, 0, 170, 0, 02575 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 02576 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 02577 176, 177, 178, 179, 180, 0, 181, 182, 0, 0, 02578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02579 0, 0, 0, 0, 183, 111, 112, 113, 114, 115, 02580 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 02581 126, 127, 128, 129, 130, 131, 132, 133, 134, 0, 02582 0, 0, 135, 136, 137, 138, 139, 140, 141, 142, 02583 143, 144, 0, 0, 0, 0, 0, 145, 146, 147, 02584 148, 149, 150, 151, 152, 153, 0, 0, 154, 0, 02585 0, 0, 0, 0, 0, 0, 0, 0, 155, 156, 02586 157, 158, 159, 160, 161, 162, 163, 0, 0, 164, 02587 165, 0, 0, 166, 167, 168, 169, 0, 0, 0, 02588 0, 0, 0, 0, 0, 0, 0, 170, 0, 0, 02589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02590 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 02591 177, 178, 179, 180, 0, 181, 182, 0, 0, 5, 02592 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02593 0, 0, 12, 183, 13, 14, 15, 228, 229, 18, 02594 19, 0, 0, 0, 0, 0, 230, 231, 232, 23, 02595 24, 25, 26, 0, 0, 192, 0, 0, 0, 0, 02596 0, 0, 255, 0, 0, 32, 33, 34, 35, 36, 02597 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02598 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02600 0, 0, 256, 0, 0, 195, 50, 0, 51, 52, 02601 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02603 0, 5, 6, 7, 0, 9, 0, 0, 257, 10, 02604 11, 0, 0, 0, 12, 0, 13, 14, 15, 228, 02605 229, 18, 19, 0, 0, 0, 258, 0, 230, 231, 02606 232, 23, 24, 25, 26, 0, 0, 192, 0, 0, 02607 0, 0, 0, 0, 255, 0, 0, 32, 33, 34, 02608 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02609 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02611 0, 0, 0, 0, 256, 0, 0, 195, 50, 0, 02612 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02613 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02614 0, 0, 0, 5, 6, 7, 8, 9, 0, 0, 02615 257, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02616 15, 16, 17, 18, 19, 0, 0, 0, 482, 0, 02617 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 02618 0, 0, 0, 0, 0, 28, 29, 30, 31, 32, 02619 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02620 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02622 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 02623 50, 0, 51, 52, 0, 53, 0, 54, 55, 56, 02624 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02625 0, 0, 5, 6, 7, 8, 9, 0, 0, 0, 02626 10, 11, 61, 62, 63, 12, 0, 13, 14, 15, 02627 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02628 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02629 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02630 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02631 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02633 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02634 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02635 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02636 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02637 11, 61, 62, 63, 12, 0, 13, 14, 15, 16, 02638 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02639 22, 23, 24, 25, 26, 0, 0, 192, 0, 0, 02640 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02641 35, 36, 37, 38, 39, 40, 193, 41, 42, 0, 02642 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02644 0, 0, 0, 0, 194, 0, 0, 195, 50, 0, 02645 51, 52, 0, 196, 197, 54, 55, 56, 57, 58, 02646 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02647 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02648 61, 198, 63, 12, 0, 13, 14, 15, 228, 229, 02649 18, 19, 0, 0, 0, 0, 0, 230, 231, 232, 02650 23, 24, 25, 26, 0, 0, 192, 0, 0, 0, 02651 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02652 36, 37, 38, 39, 40, 193, 41, 42, 0, 43, 02653 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02655 0, 0, 0, 194, 0, 0, 195, 50, 0, 51, 02656 52, 0, 577, 197, 54, 55, 56, 57, 58, 59, 02657 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02658 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02659 198, 63, 12, 0, 13, 14, 15, 228, 229, 18, 02660 19, 0, 0, 0, 0, 0, 230, 231, 232, 23, 02661 24, 25, 26, 0, 0, 192, 0, 0, 0, 0, 02662 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02663 37, 38, 39, 40, 193, 41, 42, 0, 43, 44, 02664 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02666 0, 0, 194, 0, 0, 195, 50, 0, 51, 52, 02667 0, 196, 0, 54, 55, 56, 57, 58, 59, 60, 02668 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02669 7, 0, 9, 0, 0, 0, 10, 11, 61, 198, 02670 63, 12, 0, 13, 14, 15, 228, 229, 18, 19, 02671 0, 0, 0, 0, 0, 230, 231, 232, 23, 24, 02672 25, 26, 0, 0, 192, 0, 0, 0, 0, 0, 02673 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02674 38, 39, 40, 193, 41, 42, 0, 43, 44, 45, 02675 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02677 0, 194, 0, 0, 195, 50, 0, 51, 52, 0, 02678 0, 197, 54, 55, 56, 57, 58, 59, 60, 0, 02679 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02680 0, 9, 0, 0, 0, 10, 11, 61, 198, 63, 02681 12, 0, 13, 14, 15, 228, 229, 18, 19, 0, 02682 0, 0, 0, 0, 230, 231, 232, 23, 24, 25, 02683 26, 0, 0, 192, 0, 0, 0, 0, 0, 0, 02684 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02685 39, 40, 193, 41, 42, 0, 43, 44, 45, 0, 02686 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02688 194, 0, 0, 195, 50, 0, 51, 52, 0, 577, 02689 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02690 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02691 9, 0, 0, 0, 10, 11, 61, 198, 63, 12, 02692 0, 13, 14, 15, 228, 229, 18, 19, 0, 0, 02693 0, 0, 0, 230, 231, 232, 23, 24, 25, 26, 02694 0, 0, 192, 0, 0, 0, 0, 0, 0, 29, 02695 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02696 40, 193, 41, 42, 0, 43, 44, 45, 0, 46, 02697 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02698 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 02699 0, 0, 195, 50, 0, 51, 52, 0, 0, 0, 02700 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 02701 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02702 0, 0, 0, 10, 11, 61, 198, 63, 12, 0, 02703 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02704 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02705 0, 192, 0, 0, 0, 0, 0, 0, 29, 0, 02706 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02707 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02709 0, 0, 0, 0, 0, 0, 0, 0, 194, 0, 02710 0, 195, 50, 0, 51, 52, 0, 476, 0, 54, 02711 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02712 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02713 0, 0, 10, 11, 61, 198, 63, 12, 0, 13, 02714 14, 15, 228, 229, 18, 19, 0, 0, 0, 0, 02715 0, 230, 231, 232, 23, 24, 25, 26, 0, 0, 02716 192, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02717 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02718 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02720 0, 0, 0, 0, 0, 0, 0, 194, 0, 0, 02721 195, 50, 0, 51, 52, 0, 196, 0, 54, 55, 02722 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02723 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02724 0, 10, 11, 61, 198, 63, 12, 0, 13, 14, 02725 15, 228, 229, 18, 19, 0, 0, 0, 0, 0, 02726 230, 231, 232, 23, 24, 25, 26, 0, 0, 192, 02727 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02728 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02729 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02731 0, 0, 0, 0, 0, 0, 194, 0, 0, 195, 02732 50, 0, 51, 52, 0, 758, 0, 54, 55, 56, 02733 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02734 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02735 10, 11, 61, 198, 63, 12, 0, 13, 14, 15, 02736 228, 229, 18, 19, 0, 0, 0, 0, 0, 230, 02737 231, 232, 23, 24, 25, 26, 0, 0, 192, 0, 02738 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02739 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02740 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02742 0, 0, 0, 0, 0, 194, 0, 0, 195, 50, 02743 0, 51, 52, 0, 476, 0, 54, 55, 56, 57, 02744 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02745 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02746 11, 61, 198, 63, 12, 0, 13, 14, 15, 228, 02747 229, 18, 19, 0, 0, 0, 0, 0, 230, 231, 02748 232, 23, 24, 25, 26, 0, 0, 192, 0, 0, 02749 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02750 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02751 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02753 0, 0, 0, 0, 194, 0, 0, 195, 50, 0, 02754 51, 52, 0, 577, 0, 54, 55, 56, 57, 58, 02755 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02756 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02757 61, 198, 63, 12, 0, 13, 14, 15, 228, 229, 02758 18, 19, 0, 0, 0, 0, 0, 230, 231, 232, 02759 23, 24, 25, 26, 0, 0, 192, 0, 0, 0, 02760 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02761 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02762 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02764 0, 0, 0, 194, 0, 0, 195, 50, 0, 51, 02765 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, 02766 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02767 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02768 198, 63, 12, 0, 13, 14, 15, 16, 17, 18, 02769 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02770 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 02771 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02772 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02773 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02775 0, 0, 194, 0, 0, 195, 50, 0, 51, 52, 02776 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02777 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02778 7, 0, 9, 0, 0, 0, 10, 11, 61, 62, 02779 63, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02780 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02781 25, 26, 0, 0, 192, 0, 0, 0, 0, 0, 02782 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02783 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02784 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02786 0, 194, 0, 0, 195, 50, 0, 51, 52, 0, 02787 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02788 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02789 0, 9, 0, 0, 0, 10, 11, 61, 198, 63, 02790 12, 0, 13, 14, 15, 228, 229, 18, 19, 0, 02791 0, 0, 0, 0, 230, 231, 232, 23, 24, 25, 02792 26, 0, 0, 192, 0, 0, 0, 0, 0, 0, 02793 255, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02794 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02797 256, 0, 0, 300, 50, 0, 51, 52, 0, 301, 02798 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02799 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02800 10, 11, 0, 0, 0, 12, 257, 13, 14, 15, 02801 228, 229, 18, 19, 0, 0, 0, 0, 0, 230, 02802 231, 232, 23, 24, 25, 26, 0, 0, 192, 0, 02803 0, 0, 0, 0, 0, 255, 0, 0, 32, 33, 02804 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02805 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 02806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02807 0, 0, 0, 0, 0, 342, 0, 0, 49, 50, 02808 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02809 58, 59, 60, 0, 0, 0, 0, 5, 6, 7, 02810 0, 9, 0, 0, 0, 10, 11, 0, 0, 0, 02811 12, 257, 13, 14, 15, 228, 229, 18, 19, 0, 02812 0, 0, 0, 0, 230, 231, 232, 23, 24, 25, 02813 26, 0, 0, 192, 0, 0, 0, 0, 0, 0, 02814 255, 0, 0, 32, 33, 34, 349, 36, 37, 38, 02815 350, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02817 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 02818 352, 0, 0, 195, 50, 0, 51, 52, 0, 0, 02819 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02820 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02821 10, 11, 0, 0, 0, 12, 257, 13, 14, 15, 02822 228, 229, 18, 19, 0, 0, 0, 0, 0, 230, 02823 231, 232, 23, 24, 25, 26, 0, 0, 192, 0, 02824 0, 0, 0, 0, 0, 255, 0, 0, 32, 33, 02825 34, 349, 36, 37, 38, 350, 40, 0, 41, 42, 02826 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 02827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02828 0, 0, 0, 0, 0, 352, 0, 0, 195, 50, 02829 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, 02830 58, 59, 60, 0, 0, 0, 0, 5, 6, 7, 02831 0, 9, 0, 0, 0, 10, 11, 0, 0, 0, 02832 12, 257, 13, 14, 15, 228, 229, 18, 19, 0, 02833 0, 0, 0, 0, 230, 231, 232, 23, 24, 25, 02834 26, 0, 0, 192, 0, 0, 0, 0, 0, 0, 02835 255, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02836 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02839 256, 0, 0, 300, 50, 0, 51, 52, 0, 0, 02840 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02841 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02842 10, 11, 0, 0, 0, 12, 257, 13, 14, 15, 02843 228, 229, 18, 19, 0, 0, 0, 0, 0, 230, 02844 231, 232, 23, 24, 25, 26, 0, 0, 192, 0, 02845 0, 0, 0, 0, 0, 255, 0, 0, 32, 33, 02846 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02847 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 02848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02849 0, 0, 0, 0, 0, 887, 0, 0, 195, 50, 02850 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, 02851 58, 59, 60, 0, 0, 0, 0, 5, 6, 7, 02852 0, 9, 0, 0, 0, 10, 11, 0, 0, 0, 02853 12, 257, 13, 14, 15, 228, 229, 18, 19, 0, 02854 0, 0, 0, 0, 230, 231, 232, 23, 24, 25, 02855 26, 0, 0, 192, 0, 0, 0, 0, 0, 0, 02856 255, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02857 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02858 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02860 897, 0, 0, 195, 50, 0, 51, 52, 0, 0, 02861 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02862 0, 0, 0, 584, 524, 0, 0, 585, 0, 0, 02863 0, 0, 0, 0, 0, 0, 257, 155, 156, 157, 02864 158, 159, 160, 161, 162, 163, 0, 0, 164, 165, 02865 0, 0, 166, 167, 168, 169, 0, 0, 0, 0, 02866 0, 0, 0, 0, 0, 0, 170, 0, 0, 0, 02867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02868 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 02869 178, 179, 180, 0, 181, 182, 0, 0, 0, 0, 02870 605, 516, 0, 0, 606, 0, 0, 0, 0, 0, 02871 0, 0, 183, 217, 155, 156, 157, 158, 159, 160, 02872 161, 162, 163, 0, 0, 164, 165, 0, 0, 166, 02873 167, 168, 169, 0, 0, 0, 0, 0, 0, 0, 02874 0, 0, 0, 170, 0, 0, 0, 0, 0, 0, 02875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02876 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 02877 0, 181, 182, 0, 0, 0, 0, 608, 524, 0, 02878 0, 609, 0, 0, 0, 0, 0, 0, 0, 183, 02879 217, 155, 156, 157, 158, 159, 160, 161, 162, 163, 02880 0, 0, 164, 165, 0, 0, 166, 167, 168, 169, 02881 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02882 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02883 0, 0, 0, 0, 0, 0, 0, 171, 172, 173, 02884 174, 175, 176, 177, 178, 179, 180, 0, 181, 182, 02885 0, 0, 0, 0, 679, 516, 0, 0, 680, 0, 02886 0, 0, 0, 0, 0, 0, 183, 217, 155, 156, 02887 157, 158, 159, 160, 161, 162, 163, 0, 0, 164, 02888 165, 0, 0, 166, 167, 168, 169, 0, 0, 0, 02889 0, 0, 0, 0, 0, 0, 0, 170, 0, 0, 02890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02891 0, 0, 0, 0, 171, 172, 173, 174, 175, 176, 02892 177, 178, 179, 180, 0, 181, 182, 0, 0, 0, 02893 0, 682, 524, 0, 0, 683, 0, 0, 0, 0, 02894 0, 0, 0, 183, 217, 155, 156, 157, 158, 159, 02895 160, 161, 162, 163, 0, 0, 164, 165, 0, 0, 02896 166, 167, 168, 169, 0, 0, 0, 0, 0, 0, 02897 0, 0, 0, 0, 170, 0, 0, 0, 0, 0, 02898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02899 0, 171, 172, 173, 174, 175, 176, 177, 178, 179, 02900 180, 0, 181, 182, 0, 0, 0, 0, 689, 516, 02901 0, 0, 690, 0, 0, 0, 0, 0, 0, 0, 02902 183, 217, 155, 156, 157, 158, 159, 160, 161, 162, 02903 163, 0, 0, 164, 165, 0, 0, 166, 167, 168, 02904 169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02905 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 02906 0, 0, 0, 0, 0, 0, 0, 0, 171, 172, 02907 173, 174, 175, 176, 177, 178, 179, 180, 0, 181, 02908 182, 0, 0, 0, 0, 562, 524, 0, 0, 563, 02909 0, 0, 0, 0, 0, 0, 0, 183, 217, 155, 02910 156, 157, 158, 159, 160, 161, 162, 163, 0, 0, 02911 164, 165, 0, 0, 166, 167, 168, 169, 0, 0, 02912 0, 0, 0, 0, 0, 0, 0, 0, 170, 0, 02913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02914 0, 0, 0, 0, 0, 171, 172, 173, 174, 175, 02915 176, 177, 178, 179, 180, 0, 181, 182, 0, 0, 02916 0, 0, 949, 516, 0, 0, 950, 0, 0, 0, 02917 0, 0, 0, 0, 183, 217, 155, 156, 157, 158, 02918 159, 160, 161, 162, 163, 0, 0, 164, 165, 0, 02919 0, 166, 167, 168, 169, 0, 0, 0, 0, 0, 02920 0, 0, 0, 0, 0, 170, 0, 0, 0, 0, 02921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02922 0, 0, 171, 172, 173, 174, 175, 176, 177, 178, 02923 179, 180, 0, 181, 182, 0, 0, 0, 0, 955, 02924 516, 0, 0, 956, 0, 0, 0, 0, 0, 0, 02925 0, 183, 217, 155, 156, 157, 158, 159, 160, 161, 02926 162, 163, 0, 0, 164, 165, 0, 0, 166, 167, 02927 168, 169, 0, 0, 0, 0, 0, 0, 0, 0, 02928 0, 0, 170, 0, 0, 0, 0, 0, 0, 0, 02929 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 02930 172, 173, 174, 175, 176, 177, 178, 179, 180, 0, 02931 181, 182, 0, 0, 0, 0, 958, 524, 0, 0, 02932 959, 0, 0, 0, 0, 0, 0, 0, 183, 217, 02933 155, 156, 157, 158, 159, 160, 161, 162, 163, 0, 02934 0, 164, 165, 0, 0, 166, 167, 168, 169, 0, 02935 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 02936 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02937 0, 0, 0, 0, 0, 0, 171, 172, 173, 174, 02938 175, 176, 177, 178, 179, 180, 0, 181, 182, 0, 02939 0, 0, 0, 562, 524, 0, 0, 563, 0, 0, 02940 0, 0, 0, 0, 0, 183, 217, 155, 156, 157, 02941 158, 159, 160, 161, 162, 163, 0, 0, 164, 165, 02942 0, 0, 166, 167, 168, 169, 0, 0, 0, 0, 02943 0, 0, 0, 0, 0, 0, 170, 0, 0, 0, 02944 0, 0, 0, 0, 705, 0, 0, 0, 0, 0, 02945 0, 0, 0, 171, 172, 173, 174, 175, 176, 177, 02946 178, 179, 180, 650, 181, 182, 0, 0, 304, 305, 02947 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 02948 316, 0, 183, 317, 318, 0, 0, 304, 305, 306, 02949 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 02950 0, 0, 317, 318, 0, 0, 0, 0, 0, 0, 02951 319, 0, 320, 321, 322, 323, 324, 325, 326, 327, 02952 328, 329, 0, 0, 0, 0, 0, 0, 0, 319, 02953 0, 320, 321, 322, 323, 324, 325, 326, 327, 328, 02954 329 02955 }; 02956 02957 static const yytype_int16 yycheck[] = 02958 { 02959 2, 16, 17, 55, 2, 20, 4, 51, 28, 75, 02960 51, 52, 446, 336, 210, 8, 49, 537, 16, 17, 02961 303, 8, 20, 27, 536, 29, 556, 53, 83, 583, 02962 446, 86, 249, 331, 65, 28, 253, 4, 90, 442, 02963 8, 28, 748, 272, 13, 274, 352, 276, 49, 51, 02964 52, 49, 50, 607, 86, 53, 735, 667, 813, 836, 02965 28, 671, 641, 811, 62, 732, 615, 1, 22, 27, 02966 16, 17, 29, 50, 20, 25, 330, 75, 332, 482, 02967 53, 566, 567, 62, 82, 83, 26, 55, 86, 87, 02968 88, 89, 728, 13, 13, 61, 394, 25, 22, 13, 02969 61, 85, 75, 239, 76, 82, 83, 37, 38, 86, 02970 140, 398, 390, 749, 87, 88, 89, 147, 372, 373, 02971 398, 85, 90, 871, 558, 87, 85, 681, 65, 109, 02972 15, 13, 17, 0, 25, 25, 147, 13, 692, 393, 02973 106, 395, 114, 104, 105, 432, 444, 109, 925, 86, 02974 107, 25, 56, 732, 108, 139, 735, 25, 688, 914, 02975 140, 2, 195, 4, 300, 419, 696, 834, 916, 25, 02976 140, 140, 25, 722, 723, 139, 145, 147, 147, 113, 02977 139, 59, 60, 889, 108, 146, 620, 145, 85, 147, 02978 140, 445, 258, 655, 227, 943, 136, 195, 877, 214, 02979 662, 216, 217, 205, 620, 136, 239, 641, 210, 241, 02980 241, 145, 140, 147, 881, 217, 214, 147, 216, 217, 02981 146, 706, 220, 142, 222, 145, 145, 147, 147, 227, 02982 459, 145, 26, 147, 289, 290, 291, 292, 239, 146, 02983 238, 239, 139, 220, 542, 222, 649, 553, 858, 140, 02984 140, 255, 142, 25, 298, 834, 554, 836, 28, 303, 02985 258, 695, 811, 145, 813, 147, 140, 300, 214, 145, 02986 216, 147, 140, 99, 142, 301, 109, 26, 232, 695, 02987 792, 235, 337, 338, 140, 258, 25, 140, 87, 543, 02988 288, 289, 290, 291, 292, 293, 294, 295, 877, 300, 02989 298, 555, 300, 301, 241, 303, 142, 339, 220, 85, 02990 109, 147, 289, 290, 291, 292, 331, 294, 295, 298, 02991 140, 288, 871, 872, 303, 37, 38, 26, 301, 331, 02992 860, 243, 145, 331, 147, 333, 85, 109, 858, 337, 02993 338, 140, 136, 109, 85, 87, 925, 26, 142, 390, 02994 87, 85, 140, 351, 677, 87, 85, 142, 85, 56, 02995 337, 338, 330, 139, 26, 914, 109, 916, 140, 87, 02996 109, 143, 109, 88, 351, 147, 442, 109, 332, 394, 02997 378, 379, 912, 666, 580, 602, 85, 136, 429, 138, 02998 139, 109, 394, 413, 943, 85, 394, 238, 139, 378, 02999 379, 140, 339, 957, 143, 139, 85, 85, 147, 138, 03000 139, 138, 139, 142, 416, 52, 482, 354, 416, 56, 03001 413, 140, 140, 85, 87, 393, 413, 425, 85, 444, 03002 140, 865, 85, 85, 59, 60, 85, 136, 142, 138, 03003 139, 395, 444, 142, 442, 413, 444, 288, 138, 139, 03004 418, 136, 293, 142, 85, 14, 15, 136, 85, 138, 03005 139, 139, 85, 142, 68, 419, 564, 565, 85, 442, 03006 142, 85, 143, 475, 136, 443, 138, 139, 85, 109, 03007 142, 138, 139, 144, 482, 138, 139, 139, 400, 138, 03008 139, 445, 404, 137, 538, 407, 85, 87, 56, 532, 03009 504, 534, 52, 106, 54, 55, 56, 57, 139, 482, 03010 422, 138, 139, 106, 85, 427, 139, 85, 522, 109, 03011 641, 138, 139, 846, 138, 139, 528, 542, 530, 852, 03012 140, 138, 139, 87, 532, 87, 534, 603, 87, 554, 03013 542, 68, 68, 52, 542, 54, 55, 56, 57, 138, 03014 139, 17, 554, 140, 574, 109, 554, 109, 556, 557, 03015 109, 145, 564, 565, 566, 567, 520, 138, 139, 481, 03016 138, 139, 56, 541, 528, 416, 61, 94, 580, 583, 03017 557, 574, 68, 649, 425, 553, 140, 574, 140, 543, 03018 140, 140, 52, 25, 592, 597, 520, 143, 535, 536, 03019 137, 555, 140, 607, 528, 603, 574, 140, 140, 642, 03020 564, 565, 549, 61, 735, 592, 87, 738, 146, 104, 03021 105, 106, 666, 87, 626, 87, 628, 140, 630, 684, 03022 603, 140, 687, 119, 120, 121, 140, 935, 109, 641, 03023 564, 565, 596, 597, 642, 109, 698, 109, 61, 10, 03024 68, 649, 8, 54, 652, 653, 104, 105, 106, 13, 03025 658, 659, 63, 64, 666, 667, 109, 669, 61, 671, 03026 703, 704, 137, 652, 653, 52, 649, 681, 140, 658, 03027 659, 61, 936, 140, 140, 65, 684, 140, 692, 687, 03028 688, 104, 105, 106, 52, 140, 729, 730, 696, 117, 03029 118, 119, 120, 121, 706, 703, 704, 684, 741, 111, 03030 687, 104, 105, 106, 144, 836, 15, 838, 52, 140, 03031 54, 55, 56, 57, 104, 105, 728, 782, 145, 114, 03032 698, 729, 730, 193, 109, 140, 196, 197, 40, 41, 03033 42, 43, 44, 741, 140, 140, 779, 749, 685, 751, 03034 10, 753, 754, 786, 787, 89, 877, 790, 879, 140, 03035 697, 95, 883, 88, 16, 17, 9, 137, 20, 10, 03036 10, 769, 140, 806, 137, 777, 54, 55, 780, 57, 03037 140, 779, 694, 140, 782, 63, 64, 140, 786, 787, 03038 769, 140, 790, 137, 46, 47, 114, 140, 140, 51, 03039 52, 137, 140, 715, 925, 782, 927, 56, 806, 930, 03040 62, 63, 140, 140, 726, 416, 849, 819, 820, 140, 03041 822, 56, 824, 825, 945, 140, 140, 140, 87, 827, 03042 142, 52, 142, 54, 55, 56, 57, 539, 298, 89, 03043 889, 938, 722, 303, 92, 937, 967, 845, 95, 57, 03044 -1, 849, 90, 865, 827, 792, 858, 794, 68, 834, 03045 732, 52, 860, 54, 55, 56, 57, -1, 89, 902, 03046 -1, 904, 845, 83, 84, 96, -1, 910, 52, -1, 03047 54, 55, 56, 57, -1, -1, -1, 799, -1, 891, 03048 892, 893, -1, 895, 896, 116, -1, 52, 810, 54, 03049 55, 56, 57, 815, 902, -1, 904, 117, 118, 119, 03050 120, 121, 910, -1, 912, 89, 918, 919, 920, 921, 03051 935, 95, -1, -1, -1, -1, -1, -1, -1, 389, 03052 390, -1, -1, 935, 89, 937, 938, 935, 398, -1, 03053 -1, 193, -1, -1, 196, 197, 198, -1, -1, 951, 03054 952, 953, 954, 957, -1, 923, 52, -1, 54, 55, 03055 56, 57, 214, 965, 216, 217, 934, -1, -1, 429, 03056 -1, 973, 432, -1, 676, 52, -1, 54, 55, 56, 03057 57, -1, 936, -1, -1, -1, -1, -1, -1, -1, 03058 -1, 693, -1, 89, -1, -1, -1, -1, -1, 95, 03059 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03060 -1, -1, 89, -1, -1, -1, 476, -1, 95, 96, 03061 116, -1, -1, 119, -1, -1, -1, -1, -1, -1, 03062 -1, -1, -1, 2, -1, 4, -1, -1, -1, 116, 03063 -1, -1, 119, -1, -1, -1, 298, -1, -1, 145, 03064 -1, 303, 304, 305, 306, 307, 308, 309, 310, 311, 03065 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 03066 322, 323, 324, 325, 326, 327, 328, 329, 538, 331, 03067 49, 783, -1, 785, 53, 52, -1, 54, 55, 56, 03068 57, -1, -1, 795, -1, -1, -1, -1, 800, -1, 03069 -1, -1, -1, -1, -1, -1, 75, -1, -1, -1, 03070 -1, 2, -1, 4, -1, -1, -1, 577, 87, 88, 03071 89, 90, 89, -1, -1, -1, 378, 379, 95, 96, 03072 -1, -1, -1, -1, -1, -1, 388, 389, 390, -1, 03073 -1, -1, 394, -1, 396, 397, 398, -1, -1, 116, 03074 -1, -1, 119, 855, 856, -1, -1, -1, 49, 628, 03075 -1, 630, 53, 415, -1, -1, 68, 52, 420, 54, 03076 55, 56, 57, -1, -1, 142, -1, 429, -1, -1, 03077 432, 83, 84, 2, 75, 4, 646, -1, -1, -1, 03078 -1, -1, 444, -1, -1, -1, 87, 88, 89, -1, 03079 2, -1, 4, -1, 89, -1, 666, -1, -1, 911, 03080 95, 96, 464, 465, 116, 117, 118, 119, 120, 121, 03081 -1, -1, -1, -1, 476, -1, 195, -1, -1, -1, 03082 49, 116, -1, -1, 119, 0, -1, 939, -1, 941, 03083 -1, -1, -1, 8, 9, 10, -1, 49, 13, 14, 03084 15, 52, 17, 54, 55, 56, 57, 142, 227, -1, 03085 720, -1, 27, -1, -1, -1, -1, -1, 87, 238, 03086 239, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03087 -1, -1, 751, -1, 753, 754, 538, -1, 89, 258, 03088 542, 68, -1, -1, 95, 96, -1, -1, 758, -1, 03089 -1, -1, 554, -1, 195, -1, 83, 84, -1, -1, 03090 -1, -1, -1, -1, -1, 116, -1, -1, 119, 288, 03091 85, -1, -1, -1, 293, 577, -1, -1, -1, 789, 03092 -1, 300, 301, -1, -1, -1, 227, 114, 115, 116, 03093 117, 118, 119, 120, 121, -1, -1, 238, 239, -1, 03094 819, 820, -1, 822, -1, 824, 825, -1, -1, -1, 03095 -1, -1, -1, -1, 333, -1, -1, 258, -1, -1, 03096 -1, -1, 137, -1, 139, -1, 195, 142, 143, -1, 03097 145, -1, 147, -1, -1, -1, -1, -1, -1, -1, 03098 -1, -1, -1, 195, 646, -1, -1, 288, 650, -1, 03099 652, 653, 293, -1, -1, -1, 658, 659, 227, 300, 03100 301, -1, -1, -1, 666, -1, -1, -1, -1, 238, 03101 239, -1, 891, 892, 893, 227, 895, 896, -1, -1, 03102 -1, -1, -1, -1, -1, -1, 238, 239, -1, -1, 03103 -1, -1, 333, -1, -1, -1, -1, 416, -1, 918, 03104 919, 920, 921, 705, -1, -1, 425, -1, 710, 711, 03105 -1, 713, 714, -1, -1, -1, -1, -1, 720, 288, 03106 -1, -1, -1, 442, 293, -1, -1, -1, -1, -1, 03107 -1, 300, 951, 952, 953, 954, 288, -1, -1, -1, 03108 -1, 293, -1, -1, -1, -1, 965, -1, 300, -1, 03109 -1, -1, -1, -1, 973, -1, 758, -1, -1, -1, 03110 762, -1, -1, 482, 333, -1, -1, 769, -1, -1, 03111 -1, -1, -1, -1, -1, 416, -1, -1, -1, -1, 03112 -1, 333, -1, -1, 425, -1, -1, 789, -1, -1, 03113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03114 -1, 442, -1, -1, -1, 807, -1, -1, -1, -1, 03115 -1, -1, -1, 532, -1, 534, -1, -1, -1, -1, 03116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03117 68, 69, 70, 71, 72, 73, 74, 556, -1, 77, 03118 78, 482, -1, -1, -1, 83, 84, 416, -1, -1, 03119 -1, -1, -1, -1, -1, -1, 425, -1, -1, -1, 03120 -1, -1, -1, -1, 416, -1, -1, -1, -1, -1, 03121 44, -1, -1, 425, 112, 113, 114, 115, 116, 117, 03122 118, 119, 120, 121, 603, -1, -1, -1, -1, -1, 03123 -1, 532, -1, 534, 68, 69, 70, 71, 72, 73, 03124 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03125 84, -1, -1, -1, -1, 556, -1, -1, -1, -1, 03126 -1, -1, -1, 642, -1, -1, -1, -1, -1, -1, 03127 649, -1, -1, 935, -1, -1, 110, -1, 112, 113, 03128 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03130 -1, -1, 603, 532, -1, 534, 140, -1, -1, 688, 03131 -1, -1, -1, -1, -1, -1, -1, 696, -1, -1, 03132 532, -1, 534, -1, 703, 704, -1, 556, -1, -1, 03133 -1, -1, -1, 634, -1, -1, -1, -1, -1, -1, 03134 -1, 642, -1, -1, 556, -1, -1, -1, 649, -1, 03135 729, 730, -1, -1, 52, 53, -1, -1, 56, -1, 03136 -1, -1, 741, -1, -1, -1, -1, -1, 66, 67, 03137 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03138 78, -1, -1, 81, 82, 83, 84, 688, -1, -1, 03139 -1, -1, -1, -1, -1, 696, -1, 95, -1, -1, 03140 779, -1, 703, 704, -1, -1, -1, 786, 787, -1, 03141 -1, 790, -1, 642, 112, 113, 114, 115, 116, 117, 03142 118, 119, 120, 121, -1, 123, 124, 806, 729, 730, 03143 642, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03144 741, -1, -1, 141, 142, -1, -1, -1, 827, -1, 03145 -1, -1, -1, -1, -1, -1, -1, -1, -1, 688, 03146 -1, -1, -1, -1, -1, -1, 845, 696, -1, -1, 03147 849, -1, -1, -1, 703, 704, 688, -1, 779, -1, 03148 -1, 860, -1, -1, 696, 786, 787, -1, -1, 790, 03149 -1, 703, 704, -1, -1, -1, -1, -1, -1, -1, 03150 729, 730, -1, -1, -1, 806, -1, -1, -1, -1, 03151 -1, -1, 741, -1, -1, -1, -1, 729, 730, -1, 03152 -1, -1, -1, 902, -1, 904, 827, -1, -1, 741, 03153 -1, 910, -1, 912, -1, -1, -1, 68, 69, 70, 03154 71, 72, 73, 74, 845, -1, 77, 78, 849, -1, 03155 779, -1, 83, 84, -1, -1, -1, 786, 787, 860, 03156 -1, 790, -1, 46, 47, -1, -1, 779, 51, 52, 03157 53, -1, -1, -1, 786, 787, -1, 806, 790, -1, 03158 63, 112, 113, 114, 115, 116, 117, 118, 119, 120, 03159 121, -1, 75, -1, 806, -1, -1, -1, -1, -1, 03160 -1, 902, -1, 904, 87, 88, 89, -1, -1, 910, 03161 -1, 912, -1, -1, -1, -1, 845, -1, -1, -1, 03162 849, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03163 -1, 860, -1, -1, -1, -1, -1, 849, -1, -1, 03164 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1, 03165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03167 -1, -1, -1, 902, -1, 904, -1, -1, -1, -1, 03168 -1, 910, -1, 912, -1, -1, -1, -1, -1, -1, 03169 902, -1, 904, -1, -1, -1, -1, -1, 910, -1, 03170 912, -1, 52, 53, -1, -1, 56, -1, -1, -1, 03171 193, -1, -1, 196, 197, 198, 66, 67, 68, 69, 03172 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 03173 -1, 81, 82, 83, 84, -1, -1, 68, 69, 70, 03174 71, 72, 73, 74, 75, 95, 77, 78, -1, -1, 03175 -1, -1, 83, 84, -1, -1, -1, -1, -1, -1, 03176 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 03177 120, 121, -1, 123, 124, 258, -1, -1, -1, -1, 03178 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 03179 121, 141, 142, -1, -1, -1, -1, -1, -1, -1, 03180 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03181 74, 75, 76, 77, 78, 79, 80, -1, 301, 83, 03182 84, 304, 305, 306, 307, 308, 309, 310, 311, 312, 03183 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 03184 323, 324, 325, 326, 327, 328, 329, -1, 112, 113, 03185 114, 115, 116, 117, 118, 119, 120, 121, 52, 53, 03186 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03187 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 03188 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03189 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03190 -1, 95, -1, -1, -1, 388, 389, 390, -1, -1, 03191 -1, -1, -1, 396, 397, 398, -1, -1, 112, 113, 03192 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03193 124, -1, 415, -1, -1, -1, -1, 420, -1, -1, 03194 -1, -1, -1, -1, -1, -1, 429, 141, 142, 432, 03195 -1, -1, -1, -1, -1, -1, -1, -1, -1, 442, 03196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03198 -1, 464, 465, -1, 0, 1, -1, 3, 4, 5, 03199 6, 7, -1, 476, -1, 11, 12, -1, -1, 482, 03200 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03201 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03202 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03203 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 03204 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03205 66, 67, -1, -1, -1, 538, -1, -1, -1, -1, 03206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03207 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03208 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03209 -1, -1, -1, -1, 577, -1, -1, -1, -1, -1, 03210 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03212 603, -1, -1, -1, -1, -1, -1, -1, -1, 145, 03213 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1, 03214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03216 -1, -1, -1, 646, -1, -1, 649, 650, -1, -1, 03217 -1, 0, -1, -1, -1, -1, -1, -1, -1, 8, 03218 9, 10, -1, 666, 13, 14, 15, -1, 17, -1, 03219 -1, -1, -1, -1, -1, -1, -1, -1, 27, 28, 03220 29, -1, -1, -1, -1, -1, -1, -1, 37, 38, 03221 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1, 03222 -1, -1, 705, -1, -1, -1, -1, 710, 711, -1, 03223 713, 714, -1, -1, -1, -1, -1, 720, -1, 68, 03224 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 03225 79, 80, -1, -1, 83, 84, 85, -1, 87, 88, 03226 -1, -1, -1, -1, -1, 94, -1, -1, -1, -1, 03227 -1, -1, -1, -1, -1, 758, -1, -1, 107, 762, 03228 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 03229 119, 120, 121, -1, -1, -1, -1, -1, -1, -1, 03230 -1, -1, -1, -1, -1, -1, 789, -1, 137, 138, 03231 139, 140, 0, -1, 143, 144, 145, -1, 147, -1, 03232 8, 9, 10, -1, 807, 13, 14, 15, -1, 17, 03233 -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 03234 28, -1, -1, -1, 827, -1, -1, -1, -1, 37, 03235 38, -1, 40, 41, 42, 43, 44, -1, -1, -1, 03236 -1, -1, 845, 68, 69, 70, 71, 72, 73, 74, 03237 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03238 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 03239 78, 79, 80, -1, -1, 83, 84, 85, -1, -1, 03240 88, -1, -1, -1, -1, 110, 94, 112, 113, 114, 03241 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, 03242 -1, -1, 110, -1, 112, 113, 114, 115, 116, 117, 03243 118, 119, 120, 121, -1, -1, -1, -1, -1, -1, 03244 -1, -1, 147, -1, -1, -1, -1, -1, 136, 137, 03245 138, 139, 140, 0, 142, 143, 144, 145, -1, 147, 03246 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03247 17, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03248 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03249 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03250 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03251 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03252 84, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03253 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03254 -1, 88, -1, -1, -1, -1, 110, 94, 112, 113, 03255 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03256 107, -1, -1, 110, 111, 112, 113, 114, 115, 116, 03257 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, 03258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03259 137, 138, 139, 140, 0, -1, 143, 144, 145, -1, 03260 147, -1, 8, 9, 10, -1, -1, 13, 14, 15, 03261 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 03262 26, 27, 28, -1, -1, -1, -1, -1, -1, -1, 03263 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03266 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03267 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03268 -1, -1, 88, -1, -1, -1, -1, -1, 94, -1, 03269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03270 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 03271 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03273 136, 137, 138, 139, 140, 0, 142, 143, 144, 145, 03274 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14, 03275 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03276 -1, -1, 27, 28, -1, -1, -1, -1, -1, -1, 03277 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03279 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03280 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03281 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03282 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03283 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03284 -1, -1, -1, -1, -1, 110, -1, 112, 113, 114, 03285 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, 03286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03287 -1, -1, 137, 138, 139, 140, 0, 142, 143, 144, 03288 145, -1, 147, -1, 8, 9, 10, -1, -1, -1, 03289 14, 15, -1, 17, -1, -1, -1, -1, -1, -1, 03290 -1, -1, 26, -1, -1, -1, -1, -1, -1, -1, 03291 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 03292 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03294 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03295 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03296 84, 85, 0, 87, -1, -1, -1, -1, -1, -1, 03297 8, 9, 10, -1, -1, -1, 14, 15, -1, 17, 03298 -1, -1, -1, -1, -1, 109, 110, -1, 112, 113, 03299 114, 115, 116, 117, 118, 119, 120, 121, -1, 37, 03300 38, -1, 40, 41, 42, 43, 44, -1, -1, -1, 03301 -1, -1, 136, 137, 138, 139, 140, -1, -1, 143, 03302 -1, 145, -1, 147, -1, -1, -1, -1, -1, -1, 03303 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 03304 78, 79, 80, -1, -1, 83, 84, 85, -1, 87, 03305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03306 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03307 -1, 109, 110, -1, 112, 113, 114, 115, 116, 117, 03308 118, 119, 120, 121, -1, -1, -1, -1, -1, -1, 03309 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137, 03310 138, 139, 140, -1, -1, 143, -1, 145, 1, 147, 03311 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 03312 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22, 03313 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03314 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03315 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52, 03316 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03317 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03319 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03320 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03321 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03322 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03323 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03325 -1, -1, 145, 1, 147, 3, 4, 5, 6, 7, 03326 -1, -1, 10, 11, 12, -1, 14, 15, 16, -1, 03327 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03328 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03329 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1, 03330 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03331 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03333 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03334 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03335 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03337 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03338 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03339 -1, -1, -1, -1, -1, -1, -1, 145, 1, 147, 03340 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, 03341 -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, 03342 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03343 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03344 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52, 03345 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03346 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03348 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03349 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03350 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03351 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03352 123, 124, -1, -1, -1, -1, -1, -1, 1, -1, 03353 3, 4, 5, 6, 7, -1, -1, -1, 11, 12, 03354 -1, -1, 145, 16, 147, 18, 19, 20, 21, 22, 03355 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03356 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03357 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03358 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03359 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03361 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03362 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03363 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03364 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03365 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03366 -1, -1, -1, -1, 137, -1, -1, -1, -1, -1, 03367 -1, -1, 145, 1, 147, 3, 4, 5, 6, 7, 03368 -1, -1, 10, 11, 12, -1, -1, 15, 16, -1, 03369 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03370 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03371 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1, 03372 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03373 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03375 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03376 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03377 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03379 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03380 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03381 -1, 9, 10, 11, 12, -1, -1, 145, 16, 147, 03382 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03383 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03384 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1, 03385 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03386 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03388 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03389 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03390 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03392 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03393 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03394 -1, -1, -1, 11, 12, -1, -1, 145, 16, 147, 03395 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03396 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03397 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1, 03398 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03399 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03401 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03402 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03403 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03404 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03405 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03406 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03407 -1, -1, -1, 11, 12, 143, -1, 145, 16, 147, 03408 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03409 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03410 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1, 03411 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03412 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03414 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03415 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03416 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03418 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03419 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03420 -1, -1, -1, 11, 12, 143, -1, 145, 16, 147, 03421 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03422 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03423 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1, 03424 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03425 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03427 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03428 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03429 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03431 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03432 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137, 03433 -1, -1, -1, -1, -1, -1, -1, 145, 1, 147, 03434 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, 03435 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, 03436 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03437 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03438 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52, 03439 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03440 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03442 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03443 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03444 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03445 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03446 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03447 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03448 -1, -1, 145, 16, 147, 18, 19, 20, 21, 22, 03449 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03450 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03451 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03452 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03453 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03455 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03456 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03457 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03458 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03459 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03460 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03461 34, 35, 36, -1, 147, 39, -1, -1, -1, -1, 03462 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03463 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03464 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03466 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03467 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03469 -1, -1, -1, -1, -1, -1, -1, -1, 122, 123, 03470 124, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03471 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03472 -1, 145, 16, 147, 18, 19, 20, 21, 22, 23, 03473 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03474 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03475 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03476 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03477 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03479 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03480 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03481 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03482 5, 6, 7, -1, -1, -1, 11, 12, 122, 123, 03483 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03484 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03485 35, 36, -1, 147, 39, -1, -1, -1, -1, -1, 03486 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03487 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03488 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03490 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03491 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03493 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03494 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 03495 7, -1, -1, -1, 11, 12, -1, -1, -1, 16, 03496 145, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03497 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03498 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, 03499 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, 03500 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03501 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03502 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03503 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03504 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03506 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1, 03507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03508 -1, -1, -1, -1, -1, -1, -1, -1, 145, 3, 03509 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 03510 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 03511 24, 25, 26, -1, -1, -1, 30, 31, 32, 33, 03512 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, 03513 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03514 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, 03515 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 03516 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03517 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03518 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 03519 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 03520 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03521 124, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03522 7, -1, -1, -1, 11, 12, -1, 141, 142, 16, 03523 -1, 18, 19, 20, 21, 22, 23, 24, -1, 26, 03524 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03525 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03526 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03527 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03528 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03529 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03530 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96, 03531 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03533 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1, 03534 -1, -1, -1, 3, 4, 5, -1, 7, -1, 136, 03535 -1, 11, 12, -1, -1, 142, 16, -1, 18, 19, 03536 20, 21, 22, 23, 24, -1, 26, -1, -1, -1, 03537 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03538 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03539 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03540 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03541 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03542 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03543 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, 03544 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03546 -1, -1, 122, 123, 124, -1, -1, -1, -1, -1, 03547 3, 4, 5, -1, 7, -1, 136, -1, 11, 12, 03548 -1, -1, 142, 16, -1, 18, 19, 20, 21, 22, 03549 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03550 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03551 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03552 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03553 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03554 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03555 -1, -1, -1, 86, 87, -1, 89, 90, -1, 92, 03556 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03557 103, -1, -1, -1, -1, -1, 109, -1, -1, -1, 03558 -1, -1, -1, -1, 3, 4, 5, -1, 7, 122, 03559 123, 124, 11, 12, -1, -1, -1, 16, -1, 18, 03560 19, 20, 21, 22, 23, 24, -1, -1, -1, 142, 03561 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03562 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03563 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 03564 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03566 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03567 89, 90, -1, 92, 93, -1, 95, 96, 97, 98, 03568 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03569 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03570 5, -1, 7, 122, 123, 124, 11, 12, -1, -1, 03571 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03572 -1, -1, -1, 142, -1, 30, 31, 32, 33, 34, 03573 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03574 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03575 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03576 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03578 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03579 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, 03580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03581 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03583 -1, -1, -1, -1, -1, -1, -1, 142, 3, 4, 03584 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03585 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03586 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03587 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03588 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03589 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, 03590 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03591 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03592 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03593 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03594 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03595 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03597 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5, 03598 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 03599 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 03600 26, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03601 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 03602 46, 47, 48, 49, 50, 51, 52, 53, 54, -1, 03603 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03604 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 03605 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 03606 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 03607 -1, -1, 98, -1, -1, -1, -1, -1, -1, -1, 03608 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 03609 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 03610 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03611 -1, -1, -1, -1, -1, 141, 3, 4, 5, 6, 03612 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 03613 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 03614 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03615 37, 38, 39, -1, -1, -1, -1, -1, 45, 46, 03616 47, 48, 49, 50, 51, 52, 53, -1, -1, 56, 03617 -1, -1, -1, -1, -1, -1, -1, -1, -1, 66, 03618 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 03619 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 03620 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, 03621 -1, 98, -1, -1, -1, -1, -1, -1, -1, -1, 03622 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 03623 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, 03624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03625 -1, -1, -1, -1, 141, 3, 4, 5, 6, 7, 03626 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 03627 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, 03628 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 03629 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03630 48, 49, 50, 51, 52, 53, -1, -1, 56, -1, 03631 -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 03632 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03633 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 03634 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 03635 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03636 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 03637 118, 119, 120, 121, -1, 123, 124, -1, -1, 3, 03638 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03639 -1, -1, 16, 141, 18, 19, 20, 21, 22, 23, 03640 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03641 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03642 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03643 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03644 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03646 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03647 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03648 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03649 -1, 3, 4, 5, -1, 7, -1, -1, 122, 11, 03650 12, -1, -1, -1, 16, -1, 18, 19, 20, 21, 03651 22, 23, 24, -1, -1, -1, 140, -1, 30, 31, 03652 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03653 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03654 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03655 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 03656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03657 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03658 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03659 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03660 -1, -1, -1, 3, 4, 5, 6, 7, -1, -1, 03661 122, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03662 20, 21, 22, 23, 24, -1, -1, -1, 140, -1, 03663 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03664 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 03665 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03666 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03668 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03669 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, 03670 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03671 -1, -1, 3, 4, 5, 6, 7, -1, -1, -1, 03672 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03673 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03674 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03675 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03676 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03677 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03679 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03680 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03681 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03682 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03683 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03684 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03685 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03686 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03687 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 03688 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03689 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03690 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03691 92, 93, -1, 95, 96, 97, 98, 99, 100, 101, 03692 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03693 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03694 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03695 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03696 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03697 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03698 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03699 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03700 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03701 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03702 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03703 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03704 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03705 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03706 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03707 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03708 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03709 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03710 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03711 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03712 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03713 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03714 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03715 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, 03716 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03717 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03718 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03719 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03720 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03721 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03722 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03723 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03724 -1, 96, 97, 98, 99, 100, 101, 102, 103, -1, 03725 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03726 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, 03727 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03728 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03729 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03730 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03731 56, 57, 58, 59, 60, -1, 62, 63, 64, -1, 03732 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03733 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03734 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03735 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03736 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03737 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, 03738 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03739 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03740 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03741 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03742 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03743 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03744 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03745 -1, -1, 89, 90, -1, 92, 93, -1, -1, -1, 03746 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03747 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03748 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, 03749 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03750 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03751 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03752 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03753 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03755 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03756 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03757 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03758 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03759 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03760 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03761 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03762 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03763 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03764 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03765 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03766 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03767 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03768 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03769 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03770 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03771 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03772 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03773 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03774 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03775 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03777 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03778 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, 03779 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03780 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03781 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03782 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03783 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03784 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03785 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03786 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03788 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03789 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03790 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03791 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03792 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03793 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03794 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03795 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03796 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03797 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03798 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03799 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03800 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, 03801 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03802 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03803 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03804 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03805 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03806 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03807 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03808 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03809 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03810 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03811 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, 03812 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03813 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03814 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03815 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03816 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03817 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03818 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03819 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03821 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03822 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03823 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03824 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, 03825 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03826 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03827 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03828 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03829 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03830 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03832 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03833 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03834 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03835 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, 03836 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03837 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03838 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03839 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03840 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03841 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03842 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03843 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03844 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03845 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03846 11, 12, -1, -1, -1, 16, 122, 18, 19, 20, 03847 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03848 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03849 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03850 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03851 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 03852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03853 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03854 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03855 101, 102, 103, -1, -1, -1, -1, 3, 4, 5, 03856 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1, 03857 16, 122, 18, 19, 20, 21, 22, 23, 24, -1, 03858 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03859 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03860 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03861 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03863 -1, -1, -1, -1, -1, -1, -1, 83, -1, -1, 03864 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 03865 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03866 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03867 11, 12, -1, -1, -1, 16, 122, 18, 19, 20, 03868 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03869 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03870 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03871 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03872 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 03873 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03874 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03875 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, 03876 101, 102, 103, -1, -1, -1, -1, 3, 4, 5, 03877 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1, 03878 16, 122, 18, 19, 20, 21, 22, 23, 24, -1, 03879 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03880 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03881 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03882 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03885 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 03886 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03887 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03888 11, 12, -1, -1, -1, 16, 122, 18, 19, 20, 03889 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03890 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03891 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03892 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03893 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 03894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03895 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03896 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, 03897 101, 102, 103, -1, -1, -1, -1, 3, 4, 5, 03898 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1, 03899 16, 122, 18, 19, 20, 21, 22, 23, 24, -1, 03900 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03901 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03902 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03903 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03904 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03905 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03906 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 03907 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03908 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, 03909 -1, -1, -1, -1, -1, -1, 122, 66, 67, 68, 03910 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 03911 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 03912 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, 03913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03914 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 03915 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, 03916 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 03917 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71, 03918 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03919 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03920 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 03921 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03922 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03923 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 03924 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 03925 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03926 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03927 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03928 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03929 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03930 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03931 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 03932 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 03933 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03934 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 03935 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 03936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03937 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 03938 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 03939 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 03940 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 03941 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 03942 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 03943 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 03944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03945 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 03946 121, -1, 123, 124, -1, -1, -1, -1, 52, 53, 03947 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03948 141, 142, 66, 67, 68, 69, 70, 71, 72, 73, 03949 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03950 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03951 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 03952 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 03953 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03954 124, -1, -1, -1, -1, 52, 53, -1, -1, 56, 03955 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66, 03956 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 03957 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 03958 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, 03959 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03960 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 03961 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, 03962 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, 03963 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69, 03964 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 03965 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 03966 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1, 03967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03968 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 03969 120, 121, -1, 123, 124, -1, -1, -1, -1, 52, 03970 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, 03971 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72, 03972 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 03973 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 03974 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 03975 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 03976 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03977 123, 124, -1, -1, -1, -1, 52, 53, -1, -1, 03978 56, -1, -1, -1, -1, -1, -1, -1, 141, 142, 03979 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 03980 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 03981 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 03982 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03983 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 03984 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 03985 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, 03986 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68, 03987 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 03988 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 03989 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, 03990 -1, -1, -1, -1, 44, -1, -1, -1, -1, -1, 03991 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 03992 119, 120, 121, 44, 123, 124, -1, -1, 68, 69, 03993 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03994 80, -1, 141, 83, 84, -1, -1, 68, 69, 70, 03995 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 03996 -1, -1, 83, 84, -1, -1, -1, -1, -1, -1, 03997 110, -1, 112, 113, 114, 115, 116, 117, 118, 119, 03998 120, 121, -1, -1, -1, -1, -1, -1, -1, 110, 03999 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04000 121 04001 }; 04002 04003 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04004 symbol of state STATE-NUM. */ 04005 static const yytype_uint16 yystos[] = 04006 { 04007 0, 149, 150, 0, 1, 3, 4, 5, 6, 7, 04008 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04009 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04010 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04011 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04012 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, 04013 103, 122, 123, 124, 151, 152, 153, 158, 160, 162, 04014 163, 166, 167, 169, 170, 171, 173, 174, 184, 198, 04015 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 04016 225, 248, 249, 259, 260, 261, 262, 263, 264, 265, 04017 268, 278, 280, 281, 282, 283, 284, 285, 308, 319, 04018 153, 3, 4, 5, 6, 7, 8, 9, 10, 11, 04019 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 04020 22, 23, 24, 25, 26, 30, 31, 32, 33, 34, 04021 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 04022 50, 51, 52, 53, 56, 66, 67, 68, 69, 70, 04023 71, 72, 73, 74, 77, 78, 81, 82, 83, 84, 04024 95, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04025 121, 123, 124, 141, 177, 178, 179, 180, 182, 183, 04026 278, 280, 39, 58, 86, 89, 95, 96, 123, 166, 04027 174, 184, 186, 191, 194, 196, 215, 282, 284, 285, 04028 306, 307, 191, 191, 142, 192, 193, 142, 188, 192, 04029 142, 147, 313, 54, 179, 313, 154, 136, 21, 22, 04030 30, 31, 32, 184, 215, 308, 184, 56, 1, 89, 04031 156, 157, 158, 168, 169, 319, 160, 187, 196, 306, 04032 319, 186, 305, 306, 319, 46, 86, 122, 140, 173, 04033 198, 215, 282, 285, 241, 242, 54, 55, 57, 177, 04034 271, 279, 270, 271, 272, 146, 266, 146, 269, 59, 04035 60, 162, 184, 184, 145, 147, 312, 317, 318, 40, 04036 41, 42, 43, 44, 37, 38, 28, 246, 109, 140, 04037 89, 95, 170, 109, 68, 69, 70, 71, 72, 73, 04038 74, 75, 76, 77, 78, 79, 80, 83, 84, 110, 04039 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04040 85, 138, 139, 199, 160, 161, 161, 202, 204, 161, 04041 312, 318, 86, 167, 174, 215, 231, 282, 285, 52, 04042 56, 83, 86, 175, 176, 215, 282, 285, 176, 33, 04043 34, 35, 36, 49, 50, 51, 52, 56, 142, 177, 04044 283, 303, 85, 139, 26, 136, 250, 262, 87, 87, 04045 188, 192, 250, 140, 186, 56, 186, 186, 109, 88, 04046 140, 195, 319, 85, 138, 139, 87, 87, 140, 195, 04047 191, 313, 314, 191, 190, 191, 319, 160, 314, 160, 04048 54, 63, 64, 159, 142, 185, 136, 156, 85, 139, 04049 87, 158, 168, 143, 312, 318, 314, 200, 144, 140, 04050 147, 316, 140, 316, 137, 316, 313, 56, 59, 60, 04051 170, 172, 140, 85, 138, 139, 243, 61, 104, 105, 04052 106, 273, 106, 273, 106, 65, 273, 106, 106, 267, 04053 273, 106, 61, 106, 68, 68, 145, 153, 161, 161, 04054 161, 161, 158, 160, 160, 247, 95, 162, 186, 196, 04055 197, 168, 140, 173, 140, 162, 184, 186, 197, 184, 04056 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 04057 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 04058 184, 184, 184, 184, 184, 52, 53, 56, 182, 188, 04059 309, 310, 190, 52, 53, 56, 182, 188, 309, 155, 04060 156, 13, 227, 317, 227, 161, 161, 312, 17, 253, 04061 56, 85, 138, 139, 25, 160, 52, 56, 175, 1, 04062 113, 286, 317, 85, 138, 139, 211, 304, 212, 85, 04063 139, 311, 52, 56, 309, 309, 252, 251, 162, 184, 04064 162, 184, 94, 164, 181, 184, 186, 95, 186, 194, 04065 306, 52, 56, 190, 52, 56, 307, 314, 143, 314, 04066 314, 179, 201, 184, 151, 137, 309, 309, 184, 314, 04067 158, 314, 306, 140, 172, 52, 56, 190, 52, 56, 04068 52, 54, 55, 56, 57, 89, 95, 96, 116, 119, 04069 142, 244, 289, 290, 291, 292, 293, 294, 297, 298, 04070 299, 300, 301, 275, 274, 146, 273, 146, 184, 184, 04071 76, 114, 236, 237, 319, 186, 140, 314, 172, 140, 04072 44, 313, 87, 87, 188, 192, 313, 315, 87, 87, 04073 188, 189, 192, 319, 10, 226, 8, 255, 319, 156, 04074 13, 156, 27, 228, 317, 228, 253, 196, 226, 52, 04075 56, 190, 52, 56, 206, 209, 317, 287, 208, 52, 04076 56, 175, 190, 155, 160, 142, 288, 289, 213, 189, 04077 192, 189, 192, 236, 236, 44, 165, 179, 186, 195, 04078 87, 87, 315, 87, 87, 160, 137, 316, 170, 315, 04079 109, 52, 89, 95, 232, 233, 234, 291, 289, 29, 04080 107, 245, 140, 302, 319, 140, 302, 52, 140, 302, 04081 52, 276, 54, 55, 57, 277, 285, 52, 145, 235, 04082 238, 293, 295, 296, 299, 301, 319, 156, 95, 186, 04083 172, 184, 111, 162, 184, 162, 184, 164, 144, 87, 04084 162, 184, 162, 184, 164, 186, 197, 256, 319, 15, 04085 230, 319, 14, 229, 230, 230, 203, 205, 226, 140, 04086 227, 315, 161, 317, 161, 155, 315, 226, 314, 289, 04087 155, 317, 177, 156, 156, 184, 236, 87, 314, 186, 04088 234, 140, 291, 140, 314, 238, 156, 156, 292, 297, 04089 299, 301, 293, 294, 299, 293, 156, 109, 52, 239, 04090 240, 290, 238, 114, 140, 302, 140, 302, 140, 302, 04091 10, 186, 184, 162, 184, 88, 257, 319, 156, 9, 04092 258, 319, 161, 226, 226, 156, 156, 186, 156, 228, 04093 210, 317, 226, 314, 226, 214, 10, 137, 156, 314, 04094 233, 140, 95, 232, 314, 10, 137, 140, 302, 140, 04095 302, 140, 302, 140, 302, 302, 137, 86, 215, 140, 04096 114, 296, 299, 293, 295, 299, 293, 86, 174, 215, 04097 282, 285, 227, 156, 227, 226, 226, 230, 253, 254, 04098 207, 155, 288, 137, 140, 233, 140, 291, 293, 299, 04099 293, 293, 56, 85, 240, 140, 302, 140, 302, 302, 04100 140, 302, 302, 56, 85, 138, 139, 156, 156, 156, 04101 226, 155, 233, 140, 302, 140, 302, 302, 302, 52, 04102 56, 293, 299, 293, 293, 52, 56, 190, 52, 56, 04103 255, 229, 226, 226, 233, 293, 302, 140, 302, 302, 04104 302, 315, 302, 293, 302 04105 }; 04106 04107 #define yyerrok (yyerrstatus = 0) 04108 #define yyclearin (yychar = YYEMPTY) 04109 #define YYEMPTY (-2) 04110 #define YYEOF 0 04111 04112 #define YYACCEPT goto yyacceptlab 04113 #define YYABORT goto yyabortlab 04114 #define YYERROR goto yyerrorlab 04115 04116 04117 /* Like YYERROR except do call yyerror. This remains here temporarily 04118 to ease the transition to the new meaning of YYERROR, for GCC. 04119 Once GCC version 2 has supplanted version 1, this can go. However, 04120 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 04121 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 04122 discussed. */ 04123 04124 #define YYFAIL goto yyerrlab 04125 #if defined YYFAIL 04126 /* This is here to suppress warnings from the GCC cpp's 04127 -Wunused-macros. Normally we don't worry about that warning, but 04128 some users do, and we want to make it easy for users to remove 04129 YYFAIL uses, which will produce warnings from Bison 2.5. */ 04130 #endif 04131 04132 #define YYRECOVERING() (!!yyerrstatus) 04133 04134 #define YYBACKUP(Token, Value) \ 04135 do \ 04136 if (yychar == YYEMPTY && yylen == 1) \ 04137 { \ 04138 yychar = (Token); \ 04139 yylval = (Value); \ 04140 yytoken = YYTRANSLATE (yychar); \ 04141 YYPOPSTACK (1); \ 04142 goto yybackup; \ 04143 } \ 04144 else \ 04145 { \ 04146 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04147 YYERROR; \ 04148 } \ 04149 while (YYID (0)) 04150 04151 04152 #define YYTERROR 1 04153 #define YYERRCODE 256 04154 04155 04156 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04157 If N is 0, then set CURRENT to the empty location which ends 04158 the previous symbol: RHS[0] (always defined). */ 04159 04160 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04161 #ifndef YYLLOC_DEFAULT 04162 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04163 do \ 04164 if (YYID (N)) \ 04165 { \ 04166 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04167 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04168 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04169 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04170 } \ 04171 else \ 04172 { \ 04173 (Current).first_line = (Current).last_line = \ 04174 YYRHSLOC (Rhs, 0).last_line; \ 04175 (Current).first_column = (Current).last_column = \ 04176 YYRHSLOC (Rhs, 0).last_column; \ 04177 } \ 04178 while (YYID (0)) 04179 #endif 04180 04181 04182 /* YY_LOCATION_PRINT -- Print the location on the stream. 04183 This macro was not mandated originally: define only if we know 04184 we won't break user code: when these are the locations we know. */ 04185 04186 #ifndef YY_LOCATION_PRINT 04187 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 04188 # define YY_LOCATION_PRINT(File, Loc) \ 04189 fprintf (File, "%d.%d-%d.%d", \ 04190 (Loc).first_line, (Loc).first_column, \ 04191 (Loc).last_line, (Loc).last_column) 04192 # else 04193 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04194 # endif 04195 #endif 04196 04197 04198 /* YYLEX -- calling `yylex' with the right arguments. */ 04199 04200 #ifdef YYLEX_PARAM 04201 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04202 #else 04203 # define YYLEX yylex (&yylval) 04204 #endif 04205 04206 /* Enable debugging if requested. */ 04207 #if YYDEBUG 04208 04209 # ifndef YYFPRINTF 04210 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04211 # define YYFPRINTF fprintf 04212 # endif 04213 04214 # define YYDPRINTF(Args) \ 04215 do { \ 04216 if (yydebug) \ 04217 YYFPRINTF Args; \ 04218 } while (YYID (0)) 04219 04220 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04221 do { \ 04222 if (yydebug) \ 04223 { \ 04224 YYFPRINTF (stderr, "%s ", Title); \ 04225 yy_symbol_print (stderr, \ 04226 Type, Value, parser); \ 04227 YYFPRINTF (stderr, "\n"); \ 04228 } \ 04229 } while (YYID (0)) 04230 04231 04232 /*--------------------------------. 04233 | Print this symbol on YYOUTPUT. | 04234 `--------------------------------*/ 04235 04236 /*ARGSUSED*/ 04237 #if (defined __STDC__ || defined __C99__FUNC__ \ 04238 || defined __cplusplus || defined _MSC_VER) 04239 static void 04240 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04241 #else 04242 static void 04243 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04244 FILE *yyoutput; 04245 int yytype; 04246 YYSTYPE const * const yyvaluep; 04247 struct parser_params *parser; 04248 #endif 04249 { 04250 if (!yyvaluep) 04251 return; 04252 YYUSE (parser); 04253 # ifdef YYPRINT 04254 if (yytype < YYNTOKENS) 04255 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04256 # else 04257 YYUSE (yyoutput); 04258 # endif 04259 switch (yytype) 04260 { 04261 default: 04262 break; 04263 } 04264 } 04265 04266 04267 /*--------------------------------. 04268 | Print this symbol on YYOUTPUT. | 04269 `--------------------------------*/ 04270 04271 #if (defined __STDC__ || defined __C99__FUNC__ \ 04272 || defined __cplusplus || defined _MSC_VER) 04273 static void 04274 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04275 #else 04276 static void 04277 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04278 FILE *yyoutput; 04279 int yytype; 04280 YYSTYPE const * const yyvaluep; 04281 struct parser_params *parser; 04282 #endif 04283 { 04284 if (yytype < YYNTOKENS) 04285 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04286 else 04287 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04288 04289 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04290 YYFPRINTF (yyoutput, ")"); 04291 } 04292 04293 /*------------------------------------------------------------------. 04294 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04295 | TOP (included). | 04296 `------------------------------------------------------------------*/ 04297 04298 #if (defined __STDC__ || defined __C99__FUNC__ \ 04299 || defined __cplusplus || defined _MSC_VER) 04300 static void 04301 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 04302 #else 04303 static void 04304 yy_stack_print (yybottom, yytop) 04305 yytype_int16 *yybottom; 04306 yytype_int16 *yytop; 04307 #endif 04308 { 04309 YYFPRINTF (stderr, "Stack now"); 04310 for (; yybottom <= yytop; yybottom++) 04311 { 04312 int yybot = *yybottom; 04313 YYFPRINTF (stderr, " %d", yybot); 04314 } 04315 YYFPRINTF (stderr, "\n"); 04316 } 04317 04318 # define YY_STACK_PRINT(Bottom, Top) \ 04319 do { \ 04320 if (yydebug) \ 04321 yy_stack_print ((Bottom), (Top)); \ 04322 } while (YYID (0)) 04323 04324 04325 /*------------------------------------------------. 04326 | Report that the YYRULE is going to be reduced. | 04327 `------------------------------------------------*/ 04328 04329 #if (defined __STDC__ || defined __C99__FUNC__ \ 04330 || defined __cplusplus || defined _MSC_VER) 04331 static void 04332 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04333 #else 04334 static void 04335 yy_reduce_print (yyvsp, yyrule, parser) 04336 YYSTYPE *yyvsp; 04337 int yyrule; 04338 struct parser_params *parser; 04339 #endif 04340 { 04341 int yynrhs = yyr2[yyrule]; 04342 int yyi; 04343 unsigned long int yylno = yyrline[yyrule]; 04344 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04345 yyrule - 1, yylno); 04346 /* The symbols being reduced. */ 04347 for (yyi = 0; yyi < yynrhs; yyi++) 04348 { 04349 YYFPRINTF (stderr, " $%d = ", yyi + 1); 04350 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04351 &(yyvsp[(yyi + 1) - (yynrhs)]) 04352 , parser); 04353 YYFPRINTF (stderr, "\n"); 04354 } 04355 } 04356 04357 # define YY_REDUCE_PRINT(Rule) \ 04358 do { \ 04359 if (yydebug) \ 04360 yy_reduce_print (yyvsp, Rule, parser); \ 04361 } while (YYID (0)) 04362 04363 /* Nonzero means print parse trace. It is left uninitialized so that 04364 multiple parsers can coexist. */ 04365 #ifndef yydebug 04366 int yydebug; 04367 #endif 04368 #else /* !YYDEBUG */ 04369 # define YYDPRINTF(Args) 04370 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04371 # define YY_STACK_PRINT(Bottom, Top) 04372 # define YY_REDUCE_PRINT(Rule) 04373 #endif /* !YYDEBUG */ 04374 04375 04376 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04377 #ifndef YYINITDEPTH 04378 # define YYINITDEPTH 200 04379 #endif 04380 04381 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04382 if the built-in stack extension method is used). 04383 04384 Do not make this value too large; the results are undefined if 04385 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04386 evaluated with infinite-precision integer arithmetic. */ 04387 04388 #ifndef YYMAXDEPTH 04389 # define YYMAXDEPTH 10000 04390 #endif 04391 04392 04393 04394 #if YYERROR_VERBOSE 04395 04396 # ifndef yystrlen 04397 # if defined __GLIBC__ && defined _STRING_H 04398 # define yystrlen strlen 04399 # else 04400 /* Return the length of YYSTR. */ 04401 #if (defined __STDC__ || defined __C99__FUNC__ \ 04402 || defined __cplusplus || defined _MSC_VER) 04403 static YYSIZE_T 04404 yystrlen (const char *yystr) 04405 #else 04406 static YYSIZE_T 04407 yystrlen (yystr) 04408 const char *yystr; 04409 #endif 04410 { 04411 YYSIZE_T yylen; 04412 for (yylen = 0; yystr[yylen]; yylen++) 04413 continue; 04414 return yylen; 04415 } 04416 # endif 04417 # endif 04418 04419 # ifndef yystpcpy 04420 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04421 # define yystpcpy stpcpy 04422 # else 04423 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04424 YYDEST. */ 04425 #if (defined __STDC__ || defined __C99__FUNC__ \ 04426 || defined __cplusplus || defined _MSC_VER) 04427 static char * 04428 yystpcpy (char *yydest, const char *yysrc) 04429 #else 04430 static char * 04431 yystpcpy (yydest, yysrc) 04432 char *yydest; 04433 const char *yysrc; 04434 #endif 04435 { 04436 char *yyd = yydest; 04437 const char *yys = yysrc; 04438 04439 while ((*yyd++ = *yys++) != '\0') 04440 continue; 04441 04442 return yyd - 1; 04443 } 04444 # endif 04445 # endif 04446 04447 # ifndef yytnamerr 04448 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04449 quotes and backslashes, so that it's suitable for yyerror. The 04450 heuristic is that double-quoting is unnecessary unless the string 04451 contains an apostrophe, a comma, or backslash (other than 04452 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04453 null, do not copy; instead, return the length of what the result 04454 would have been. */ 04455 static YYSIZE_T 04456 yytnamerr (char *yyres, const char *yystr) 04457 { 04458 if (*yystr == '"') 04459 { 04460 YYSIZE_T yyn = 0; 04461 char const *yyp = yystr; 04462 04463 for (;;) 04464 switch (*++yyp) 04465 { 04466 case '\'': 04467 case ',': 04468 goto do_not_strip_quotes; 04469 04470 case '\\': 04471 if (*++yyp != '\\') 04472 goto do_not_strip_quotes; 04473 /* Fall through. */ 04474 default: 04475 if (yyres) 04476 yyres[yyn] = *yyp; 04477 yyn++; 04478 break; 04479 04480 case '"': 04481 if (yyres) 04482 yyres[yyn] = '\0'; 04483 return yyn; 04484 } 04485 do_not_strip_quotes: ; 04486 } 04487 04488 if (! yyres) 04489 return yystrlen (yystr); 04490 04491 return yystpcpy (yyres, yystr) - yyres; 04492 } 04493 # endif 04494 04495 /* Copy into YYRESULT an error message about the unexpected token 04496 YYCHAR while in state YYSTATE. Return the number of bytes copied, 04497 including the terminating null byte. If YYRESULT is null, do not 04498 copy anything; just return the number of bytes that would be 04499 copied. As a special case, return 0 if an ordinary "syntax error" 04500 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 04501 size calculation. */ 04502 static YYSIZE_T 04503 yysyntax_error (char *yyresult, int yystate, int yychar) 04504 { 04505 int yyn = yypact[yystate]; 04506 04507 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 04508 return 0; 04509 else 04510 { 04511 int yytype = YYTRANSLATE (yychar); 04512 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 04513 YYSIZE_T yysize = yysize0; 04514 YYSIZE_T yysize1; 04515 int yysize_overflow = 0; 04516 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04517 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04518 int yyx; 04519 04520 # if 0 04521 /* This is so xgettext sees the translatable formats that are 04522 constructed on the fly. */ 04523 YY_("syntax error, unexpected %s"); 04524 YY_("syntax error, unexpected %s, expecting %s"); 04525 YY_("syntax error, unexpected %s, expecting %s or %s"); 04526 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 04527 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 04528 # endif 04529 char *yyfmt; 04530 char const *yyf; 04531 static char const yyunexpected[] = "syntax error, unexpected %s"; 04532 static char const yyexpecting[] = ", expecting %s"; 04533 static char const yyor[] = " or %s"; 04534 char yyformat[sizeof yyunexpected 04535 + sizeof yyexpecting - 1 04536 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 04537 * (sizeof yyor - 1))]; 04538 char const *yyprefix = yyexpecting; 04539 04540 /* Start YYX at -YYN if negative to avoid negative indexes in 04541 YYCHECK. */ 04542 int yyxbegin = yyn < 0 ? -yyn : 0; 04543 04544 /* Stay within bounds of both yycheck and yytname. */ 04545 int yychecklim = YYLAST - yyn + 1; 04546 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04547 int yycount = 1; 04548 04549 yyarg[0] = yytname[yytype]; 04550 yyfmt = yystpcpy (yyformat, yyunexpected); 04551 04552 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04553 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 04554 { 04555 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04556 { 04557 yycount = 1; 04558 yysize = yysize0; 04559 yyformat[sizeof yyunexpected - 1] = '\0'; 04560 break; 04561 } 04562 yyarg[yycount++] = yytname[yyx]; 04563 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04564 yysize_overflow |= (yysize1 < yysize); 04565 yysize = yysize1; 04566 yyfmt = yystpcpy (yyfmt, yyprefix); 04567 yyprefix = yyor; 04568 } 04569 04570 yyf = YY_(yyformat); 04571 yysize1 = yysize + yystrlen (yyf); 04572 yysize_overflow |= (yysize1 < yysize); 04573 yysize = yysize1; 04574 04575 if (yysize_overflow) 04576 return YYSIZE_MAXIMUM; 04577 04578 if (yyresult) 04579 { 04580 /* Avoid sprintf, as that infringes on the user's name space. 04581 Don't have undefined behavior even if the translation 04582 produced a string with the wrong number of "%s"s. */ 04583 char *yyp = yyresult; 04584 int yyi = 0; 04585 while ((*yyp = *yyf) != '\0') 04586 { 04587 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 04588 { 04589 yyp += yytnamerr (yyp, yyarg[yyi++]); 04590 yyf += 2; 04591 } 04592 else 04593 { 04594 yyp++; 04595 yyf++; 04596 } 04597 } 04598 } 04599 return yysize; 04600 } 04601 } 04602 #endif /* YYERROR_VERBOSE */ 04603 04604 04605 /*-----------------------------------------------. 04606 | Release the memory associated to this symbol. | 04607 `-----------------------------------------------*/ 04608 04609 /*ARGSUSED*/ 04610 #if (defined __STDC__ || defined __C99__FUNC__ \ 04611 || defined __cplusplus || defined _MSC_VER) 04612 static void 04613 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04614 #else 04615 static void 04616 yydestruct (yymsg, yytype, yyvaluep, parser) 04617 const char *yymsg; 04618 int yytype; 04619 YYSTYPE *yyvaluep; 04620 struct parser_params *parser; 04621 #endif 04622 { 04623 YYUSE (yyvaluep); 04624 YYUSE (parser); 04625 04626 if (!yymsg) 04627 yymsg = "Deleting"; 04628 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04629 04630 switch (yytype) 04631 { 04632 04633 default: 04634 break; 04635 } 04636 } 04637 04638 /* Prevent warnings from -Wmissing-prototypes. */ 04639 #ifdef YYPARSE_PARAM 04640 #if defined __STDC__ || defined __cplusplus 04641 int yyparse (void *YYPARSE_PARAM); 04642 #else 04643 int yyparse (); 04644 #endif 04645 #else /* ! YYPARSE_PARAM */ 04646 #if defined __STDC__ || defined __cplusplus 04647 int yyparse (struct parser_params *parser); 04648 #else 04649 int yyparse (); 04650 #endif 04651 #endif /* ! YYPARSE_PARAM */ 04652 04653 04654 04655 04656 04657 /*-------------------------. 04658 | yyparse or yypush_parse. | 04659 `-------------------------*/ 04660 04661 #ifdef YYPARSE_PARAM 04662 #if (defined __STDC__ || defined __C99__FUNC__ \ 04663 || defined __cplusplus || defined _MSC_VER) 04664 int 04665 yyparse (void *YYPARSE_PARAM) 04666 #else 04667 int 04668 yyparse (YYPARSE_PARAM) 04669 void *YYPARSE_PARAM; 04670 #endif 04671 #else /* ! YYPARSE_PARAM */ 04672 #if (defined __STDC__ || defined __C99__FUNC__ \ 04673 || defined __cplusplus || defined _MSC_VER) 04674 int 04675 yyparse (struct parser_params *parser) 04676 #else 04677 int 04678 yyparse (parser) 04679 struct parser_params *parser; 04680 #endif 04681 #endif 04682 { 04683 /* The lookahead symbol. */ 04684 int yychar; 04685 04686 /* The semantic value of the lookahead symbol. */ 04687 YYSTYPE yylval; 04688 04689 /* Number of syntax errors so far. */ 04690 int yynerrs; 04691 04692 int yystate; 04693 /* Number of tokens to shift before error messages enabled. */ 04694 int yyerrstatus; 04695 04696 /* The stacks and their tools: 04697 `yyss': related to states. 04698 `yyvs': related to semantic values. 04699 04700 Refer to the stacks thru separate pointers, to allow yyoverflow 04701 to reallocate them elsewhere. */ 04702 04703 /* The state stack. */ 04704 yytype_int16 yyssa[YYINITDEPTH]; 04705 yytype_int16 *yyss; 04706 yytype_int16 *yyssp; 04707 04708 /* The semantic value stack. */ 04709 YYSTYPE yyvsa[YYINITDEPTH]; 04710 YYSTYPE *yyvs; 04711 YYSTYPE *yyvsp; 04712 04713 YYSIZE_T yystacksize; 04714 04715 int yyn; 04716 int yyresult; 04717 /* Lookahead token as an internal (translated) token number. */ 04718 int yytoken; 04719 /* The variables used to return semantic value and location from the 04720 action routines. */ 04721 YYSTYPE yyval; 04722 04723 #if YYERROR_VERBOSE 04724 /* Buffer for error messages, and its allocated size. */ 04725 char yymsgbuf[128]; 04726 char *yymsg = yymsgbuf; 04727 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 04728 #endif 04729 04730 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 04731 04732 /* The number of symbols on the RHS of the reduced rule. 04733 Keep to zero when no symbol should be popped. */ 04734 int yylen = 0; 04735 04736 yytoken = 0; 04737 yyss = yyssa; 04738 yyvs = yyvsa; 04739 yystacksize = YYINITDEPTH; 04740 04741 YYDPRINTF ((stderr, "Starting parse\n")); 04742 04743 yystate = 0; 04744 yyerrstatus = 0; 04745 yynerrs = 0; 04746 yychar = YYEMPTY; /* Cause a token to be read. */ 04747 04748 /* Initialize stack pointers. 04749 Waste one element of value and location stack 04750 so that they stay on the same level as the state stack. 04751 The wasted elements are never initialized. */ 04752 yyssp = yyss; 04753 yyvsp = yyvs; 04754 04755 goto yysetstate; 04756 04757 /*------------------------------------------------------------. 04758 | yynewstate -- Push a new state, which is found in yystate. | 04759 `------------------------------------------------------------*/ 04760 yynewstate: 04761 /* In all cases, when you get here, the value and location stacks 04762 have just been pushed. So pushing a state here evens the stacks. */ 04763 yyssp++; 04764 04765 yysetstate: 04766 *yyssp = yystate; 04767 04768 if (yyss + yystacksize - 1 <= yyssp) 04769 { 04770 /* Get the current used size of the three stacks, in elements. */ 04771 YYSIZE_T yysize = yyssp - yyss + 1; 04772 04773 #ifdef yyoverflow 04774 { 04775 /* Give user a chance to reallocate the stack. Use copies of 04776 these so that the &'s don't force the real ones into 04777 memory. */ 04778 YYSTYPE *yyvs1 = yyvs; 04779 yytype_int16 *yyss1 = yyss; 04780 04781 /* Each stack pointer address is followed by the size of the 04782 data in use in that stack, in bytes. This used to be a 04783 conditional around just the two extra args, but that might 04784 be undefined if yyoverflow is a macro. */ 04785 yyoverflow (YY_("memory exhausted"), 04786 &yyss1, yysize * sizeof (*yyssp), 04787 &yyvs1, yysize * sizeof (*yyvsp), 04788 &yystacksize); 04789 04790 yyss = yyss1; 04791 yyvs = yyvs1; 04792 } 04793 #else /* no yyoverflow */ 04794 # ifndef YYSTACK_RELOCATE 04795 goto yyexhaustedlab; 04796 # else 04797 /* Extend the stack our own way. */ 04798 if (YYMAXDEPTH <= yystacksize) 04799 goto yyexhaustedlab; 04800 yystacksize *= 2; 04801 if (YYMAXDEPTH < yystacksize) 04802 yystacksize = YYMAXDEPTH; 04803 04804 { 04805 yytype_int16 *yyss1 = yyss; 04806 union yyalloc *yyptr = 04807 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 04808 if (! yyptr) 04809 goto yyexhaustedlab; 04810 YYSTACK_RELOCATE (yyss_alloc, yyss); 04811 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 04812 # undef YYSTACK_RELOCATE 04813 if (yyss1 != yyssa) 04814 YYSTACK_FREE (yyss1); 04815 } 04816 # endif 04817 #endif /* no yyoverflow */ 04818 04819 yyssp = yyss + yysize - 1; 04820 yyvsp = yyvs + yysize - 1; 04821 04822 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 04823 (unsigned long int) yystacksize)); 04824 04825 if (yyss + yystacksize - 1 <= yyssp) 04826 YYABORT; 04827 } 04828 04829 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 04830 04831 if (yystate == YYFINAL) 04832 YYACCEPT; 04833 04834 goto yybackup; 04835 04836 /*-----------. 04837 | yybackup. | 04838 `-----------*/ 04839 yybackup: 04840 04841 /* Do appropriate processing given the current state. Read a 04842 lookahead token if we need one and don't already have one. */ 04843 04844 /* First try to decide what to do without reference to lookahead token. */ 04845 yyn = yypact[yystate]; 04846 if (yyn == YYPACT_NINF) 04847 goto yydefault; 04848 04849 /* Not known => get a lookahead token if don't already have one. */ 04850 04851 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 04852 if (yychar == YYEMPTY) 04853 { 04854 YYDPRINTF ((stderr, "Reading a token: ")); 04855 yychar = YYLEX; 04856 } 04857 04858 if (yychar <= YYEOF) 04859 { 04860 yychar = yytoken = YYEOF; 04861 YYDPRINTF ((stderr, "Now at end of input.\n")); 04862 } 04863 else 04864 { 04865 yytoken = YYTRANSLATE (yychar); 04866 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 04867 } 04868 04869 /* If the proper action on seeing token YYTOKEN is to reduce or to 04870 detect an error, take that action. */ 04871 yyn += yytoken; 04872 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 04873 goto yydefault; 04874 yyn = yytable[yyn]; 04875 if (yyn <= 0) 04876 { 04877 if (yyn == 0 || yyn == YYTABLE_NINF) 04878 goto yyerrlab; 04879 yyn = -yyn; 04880 goto yyreduce; 04881 } 04882 04883 /* Count tokens shifted since error; after three, turn off error 04884 status. */ 04885 if (yyerrstatus) 04886 yyerrstatus--; 04887 04888 /* Shift the lookahead token. */ 04889 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 04890 04891 /* Discard the shifted token. */ 04892 yychar = YYEMPTY; 04893 04894 yystate = yyn; 04895 *++yyvsp = yylval; 04896 04897 goto yynewstate; 04898 04899 04900 /*-----------------------------------------------------------. 04901 | yydefault -- do the default action for the current state. | 04902 `-----------------------------------------------------------*/ 04903 yydefault: 04904 yyn = yydefact[yystate]; 04905 if (yyn == 0) 04906 goto yyerrlab; 04907 goto yyreduce; 04908 04909 04910 /*-----------------------------. 04911 | yyreduce -- Do a reduction. | 04912 `-----------------------------*/ 04913 yyreduce: 04914 /* yyn is the number of a rule to reduce with. */ 04915 yylen = yyr2[yyn]; 04916 04917 /* If YYLEN is nonzero, implement the default value of the action: 04918 `$$ = $1'. 04919 04920 Otherwise, the following line sets YYVAL to garbage. 04921 This behavior is undocumented and Bison 04922 users should not rely upon it. Assigning to YYVAL 04923 unconditionally makes the parser a bit smaller, and it avoids a 04924 GCC warning that YYVAL may be used uninitialized. */ 04925 yyval = yyvsp[1-yylen]; 04926 04927 04928 YY_REDUCE_PRINT (yyn); 04929 switch (yyn) 04930 { 04931 case 2: 04932 04933 /* Line 1464 of yacc.c */ 04934 #line 786 "ripper.y" 04935 { 04936 lex_state = EXPR_BEG; 04937 #if 0 04938 local_push(compile_for_eval || rb_parse_in_main()); 04939 #endif 04940 local_push(0); 04941 04942 ;} 04943 break; 04944 04945 case 3: 04946 04947 /* Line 1464 of yacc.c */ 04948 #line 795 "ripper.y" 04949 { 04950 #if 0 04951 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { 04952 /* last expression should not be void */ 04953 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); 04954 else { 04955 NODE *node = (yyvsp[(2) - (2)].val); 04956 while (node->nd_next) { 04957 node = node->nd_next; 04958 } 04959 void_expr(node->nd_head); 04960 } 04961 } 04962 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val))); 04963 #endif 04964 (yyval.val) = (yyvsp[(2) - (2)].val); 04965 parser->result = dispatch1(program, (yyval.val)); 04966 04967 local_pop(); 04968 ;} 04969 break; 04970 04971 case 4: 04972 04973 /* Line 1464 of yacc.c */ 04974 #line 818 "ripper.y" 04975 { 04976 #if 0 04977 void_stmts((yyvsp[(1) - (2)].val)); 04978 fixup_nodes(&deferred_nodes); 04979 #endif 04980 04981 (yyval.val) = (yyvsp[(1) - (2)].val); 04982 ;} 04983 break; 04984 04985 case 5: 04986 04987 /* Line 1464 of yacc.c */ 04988 #line 829 "ripper.y" 04989 { 04990 #if 0 04991 (yyval.val) = NEW_BEGIN(0); 04992 #endif 04993 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 04994 dispatch0(void_stmt)); 04995 04996 ;} 04997 break; 04998 04999 case 6: 05000 05001 /* Line 1464 of yacc.c */ 05002 #line 838 "ripper.y" 05003 { 05004 #if 0 05005 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05006 #endif 05007 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05008 05009 ;} 05010 break; 05011 05012 case 7: 05013 05014 /* Line 1464 of yacc.c */ 05015 #line 846 "ripper.y" 05016 { 05017 #if 0 05018 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05019 #endif 05020 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05021 05022 ;} 05023 break; 05024 05025 case 8: 05026 05027 /* Line 1464 of yacc.c */ 05028 #line 854 "ripper.y" 05029 { 05030 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05031 ;} 05032 break; 05033 05034 case 10: 05035 05036 /* Line 1464 of yacc.c */ 05037 #line 861 "ripper.y" 05038 { 05039 if (in_def || in_single) { 05040 yyerror("BEGIN in method"); 05041 } 05042 #if 0 05043 /* local_push(0); */ 05044 #endif 05045 05046 ;} 05047 break; 05048 05049 case 11: 05050 05051 /* Line 1464 of yacc.c */ 05052 #line 871 "ripper.y" 05053 { 05054 #if 0 05055 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05056 (yyvsp[(4) - (5)].val)); 05057 /* NEW_PREEXE($4)); */ 05058 /* local_pop(); */ 05059 (yyval.val) = NEW_BEGIN(0); 05060 #endif 05061 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05062 05063 ;} 05064 break; 05065 05066 case 12: 05067 05068 /* Line 1464 of yacc.c */ 05069 #line 888 "ripper.y" 05070 { 05071 #if 0 05072 (yyval.val) = (yyvsp[(1) - (4)].val); 05073 if ((yyvsp[(2) - (4)].val)) { 05074 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05075 } 05076 else if ((yyvsp[(3) - (4)].val)) { 05077 rb_warn0("else without rescue is useless"); 05078 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); 05079 } 05080 if ((yyvsp[(4) - (4)].val)) { 05081 if ((yyval.val)) { 05082 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); 05083 } 05084 else { 05085 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); 05086 } 05087 } 05088 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05089 #endif 05090 (yyval.val) = dispatch4(bodystmt, 05091 escape_Qundef((yyvsp[(1) - (4)].val)), 05092 escape_Qundef((yyvsp[(2) - (4)].val)), 05093 escape_Qundef((yyvsp[(3) - (4)].val)), 05094 escape_Qundef((yyvsp[(4) - (4)].val))); 05095 05096 ;} 05097 break; 05098 05099 case 13: 05100 05101 /* Line 1464 of yacc.c */ 05102 #line 918 "ripper.y" 05103 { 05104 #if 0 05105 void_stmts((yyvsp[(1) - (2)].val)); 05106 fixup_nodes(&deferred_nodes); 05107 #endif 05108 05109 (yyval.val) = (yyvsp[(1) - (2)].val); 05110 ;} 05111 break; 05112 05113 case 14: 05114 05115 /* Line 1464 of yacc.c */ 05116 #line 929 "ripper.y" 05117 { 05118 #if 0 05119 (yyval.val) = NEW_BEGIN(0); 05120 #endif 05121 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05122 dispatch0(void_stmt)); 05123 05124 ;} 05125 break; 05126 05127 case 15: 05128 05129 /* Line 1464 of yacc.c */ 05130 #line 938 "ripper.y" 05131 { 05132 #if 0 05133 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05134 #endif 05135 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05136 05137 ;} 05138 break; 05139 05140 case 16: 05141 05142 /* Line 1464 of yacc.c */ 05143 #line 946 "ripper.y" 05144 { 05145 #if 0 05146 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05147 #endif 05148 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05149 05150 ;} 05151 break; 05152 05153 case 17: 05154 05155 /* Line 1464 of yacc.c */ 05156 #line 954 "ripper.y" 05157 { 05158 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05159 ;} 05160 break; 05161 05162 case 18: 05163 05164 /* Line 1464 of yacc.c */ 05165 #line 959 "ripper.y" 05166 {lex_state = EXPR_FNAME;;} 05167 break; 05168 05169 case 19: 05170 05171 /* Line 1464 of yacc.c */ 05172 #line 960 "ripper.y" 05173 { 05174 #if 0 05175 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05176 #endif 05177 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05178 05179 ;} 05180 break; 05181 05182 case 20: 05183 05184 /* Line 1464 of yacc.c */ 05185 #line 968 "ripper.y" 05186 { 05187 #if 0 05188 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05189 #endif 05190 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05191 05192 ;} 05193 break; 05194 05195 case 21: 05196 05197 /* Line 1464 of yacc.c */ 05198 #line 976 "ripper.y" 05199 { 05200 #if 0 05201 char buf[2]; 05202 buf[0] = '$'; 05203 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth; 05204 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2)); 05205 #endif 05206 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05207 05208 ;} 05209 break; 05210 05211 case 22: 05212 05213 /* Line 1464 of yacc.c */ 05214 #line 987 "ripper.y" 05215 { 05216 #if 0 05217 yyerror("can't make alias for the number variables"); 05218 (yyval.val) = NEW_BEGIN(0); 05219 #endif 05220 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05221 (yyval.val) = dispatch1(alias_error, (yyval.val)); 05222 05223 ;} 05224 break; 05225 05226 case 23: 05227 05228 /* Line 1464 of yacc.c */ 05229 #line 997 "ripper.y" 05230 { 05231 #if 0 05232 (yyval.val) = (yyvsp[(2) - (2)].val); 05233 #endif 05234 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); 05235 05236 ;} 05237 break; 05238 05239 case 24: 05240 05241 /* Line 1464 of yacc.c */ 05242 #line 1005 "ripper.y" 05243 { 05244 #if 0 05245 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05246 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05247 #endif 05248 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05249 05250 ;} 05251 break; 05252 05253 case 25: 05254 05255 /* Line 1464 of yacc.c */ 05256 #line 1014 "ripper.y" 05257 { 05258 #if 0 05259 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05260 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05261 #endif 05262 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05263 05264 ;} 05265 break; 05266 05267 case 26: 05268 05269 /* Line 1464 of yacc.c */ 05270 #line 1023 "ripper.y" 05271 { 05272 #if 0 05273 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05274 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05275 } 05276 else { 05277 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05278 } 05279 #endif 05280 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05281 05282 ;} 05283 break; 05284 05285 case 27: 05286 05287 /* Line 1464 of yacc.c */ 05288 #line 1036 "ripper.y" 05289 { 05290 #if 0 05291 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05292 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05293 } 05294 else { 05295 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05296 } 05297 #endif 05298 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05299 05300 ;} 05301 break; 05302 05303 case 28: 05304 05305 /* Line 1464 of yacc.c */ 05306 #line 1049 "ripper.y" 05307 { 05308 #if 0 05309 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); 05310 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); 05311 #endif 05312 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05313 05314 ;} 05315 break; 05316 05317 case 29: 05318 05319 /* Line 1464 of yacc.c */ 05320 #line 1058 "ripper.y" 05321 { 05322 if (in_def || in_single) { 05323 rb_warn0("END in method; use at_exit"); 05324 } 05325 #if 0 05326 (yyval.val) = NEW_POSTEXE(NEW_NODE( 05327 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); 05328 #endif 05329 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); 05330 05331 ;} 05332 break; 05333 05334 case 30: 05335 05336 /* Line 1464 of yacc.c */ 05337 #line 1070 "ripper.y" 05338 { 05339 #if 0 05340 value_expr((yyvsp[(3) - (3)].val)); 05341 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05342 #endif 05343 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05344 05345 ;} 05346 break; 05347 05348 case 31: 05349 05350 /* Line 1464 of yacc.c */ 05351 #line 1079 "ripper.y" 05352 { 05353 #if 0 05354 value_expr((yyvsp[(3) - (3)].val)); 05355 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05356 (yyval.val) = (yyvsp[(1) - (3)].val); 05357 #endif 05358 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05359 05360 ;} 05361 break; 05362 05363 case 32: 05364 05365 /* Line 1464 of yacc.c */ 05366 #line 1089 "ripper.y" 05367 { 05368 #if 0 05369 value_expr((yyvsp[(3) - (3)].val)); 05370 if ((yyvsp[(1) - (3)].val)) { 05371 ID vid = (yyvsp[(1) - (3)].val)->nd_vid; 05372 if ((yyvsp[(2) - (3)].val) == tOROP) { 05373 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05374 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); 05375 if (is_asgn_or_id(vid)) { 05376 (yyval.val)->nd_aid = vid; 05377 } 05378 } 05379 else if ((yyvsp[(2) - (3)].val) == tANDOP) { 05380 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05381 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); 05382 } 05383 else { 05384 (yyval.val) = (yyvsp[(1) - (3)].val); 05385 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); 05386 } 05387 } 05388 else { 05389 (yyval.val) = NEW_BEGIN(0); 05390 } 05391 #endif 05392 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05393 05394 ;} 05395 break; 05396 05397 case 33: 05398 05399 /* Line 1464 of yacc.c */ 05400 #line 1118 "ripper.y" 05401 { 05402 #if 0 05403 NODE *args; 05404 05405 value_expr((yyvsp[(6) - (6)].val)); 05406 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 05407 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 05408 if ((yyvsp[(5) - (6)].val) == tOROP) { 05409 (yyvsp[(5) - (6)].val) = 0; 05410 } 05411 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 05412 (yyvsp[(5) - (6)].val) = 1; 05413 } 05414 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 05415 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 05416 #endif 05417 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 05418 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 05419 05420 ;} 05421 break; 05422 05423 case 34: 05424 05425 /* Line 1464 of yacc.c */ 05426 #line 1139 "ripper.y" 05427 { 05428 #if 0 05429 value_expr((yyvsp[(5) - (5)].val)); 05430 if ((yyvsp[(4) - (5)].val) == tOROP) { 05431 (yyvsp[(4) - (5)].val) = 0; 05432 } 05433 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05434 (yyvsp[(4) - (5)].val) = 1; 05435 } 05436 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05437 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05438 #endif 05439 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 05440 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05441 05442 ;} 05443 break; 05444 05445 case 35: 05446 05447 /* Line 1464 of yacc.c */ 05448 #line 1156 "ripper.y" 05449 { 05450 #if 0 05451 value_expr((yyvsp[(5) - (5)].val)); 05452 if ((yyvsp[(4) - (5)].val) == tOROP) { 05453 (yyvsp[(4) - (5)].val) = 0; 05454 } 05455 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05456 (yyvsp[(4) - (5)].val) = 1; 05457 } 05458 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05459 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05460 #endif 05461 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 05462 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05463 05464 ;} 05465 break; 05466 05467 case 36: 05468 05469 /* Line 1464 of yacc.c */ 05470 #line 1173 "ripper.y" 05471 { 05472 #if 0 05473 yyerror("constant re-assignment"); 05474 (yyval.val) = 0; 05475 #endif 05476 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05477 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05478 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05479 05480 ;} 05481 break; 05482 05483 case 37: 05484 05485 /* Line 1464 of yacc.c */ 05486 #line 1184 "ripper.y" 05487 { 05488 #if 0 05489 value_expr((yyvsp[(5) - (5)].val)); 05490 if ((yyvsp[(4) - (5)].val) == tOROP) { 05491 (yyvsp[(4) - (5)].val) = 0; 05492 } 05493 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05494 (yyvsp[(4) - (5)].val) = 1; 05495 } 05496 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05497 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05498 #endif 05499 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); 05500 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05501 05502 ;} 05503 break; 05504 05505 case 38: 05506 05507 /* Line 1464 of yacc.c */ 05508 #line 1201 "ripper.y" 05509 { 05510 #if 0 05511 rb_backref_error((yyvsp[(1) - (3)].val)); 05512 (yyval.val) = NEW_BEGIN(0); 05513 #endif 05514 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 05515 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05516 05517 ;} 05518 break; 05519 05520 case 39: 05521 05522 /* Line 1464 of yacc.c */ 05523 #line 1211 "ripper.y" 05524 { 05525 #if 0 05526 value_expr((yyvsp[(3) - (3)].val)); 05527 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05528 #endif 05529 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05530 05531 ;} 05532 break; 05533 05534 case 40: 05535 05536 /* Line 1464 of yacc.c */ 05537 #line 1220 "ripper.y" 05538 { 05539 #if 0 05540 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05541 (yyval.val) = (yyvsp[(1) - (3)].val); 05542 #endif 05543 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05544 05545 ;} 05546 break; 05547 05548 case 41: 05549 05550 /* Line 1464 of yacc.c */ 05551 #line 1229 "ripper.y" 05552 { 05553 #if 0 05554 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05555 (yyval.val) = (yyvsp[(1) - (3)].val); 05556 #endif 05557 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05558 05559 ;} 05560 break; 05561 05562 case 44: 05563 05564 /* Line 1464 of yacc.c */ 05565 #line 1242 "ripper.y" 05566 { 05567 #if 0 05568 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05569 #endif 05570 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); 05571 05572 ;} 05573 break; 05574 05575 case 45: 05576 05577 /* Line 1464 of yacc.c */ 05578 #line 1250 "ripper.y" 05579 { 05580 #if 0 05581 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05582 #endif 05583 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); 05584 05585 ;} 05586 break; 05587 05588 case 46: 05589 05590 /* Line 1464 of yacc.c */ 05591 #line 1258 "ripper.y" 05592 { 05593 #if 0 05594 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); 05595 #endif 05596 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); 05597 05598 ;} 05599 break; 05600 05601 case 47: 05602 05603 /* Line 1464 of yacc.c */ 05604 #line 1266 "ripper.y" 05605 { 05606 #if 0 05607 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 05608 #endif 05609 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); 05610 05611 ;} 05612 break; 05613 05614 case 49: 05615 05616 /* Line 1464 of yacc.c */ 05617 #line 1277 "ripper.y" 05618 { 05619 #if 0 05620 value_expr((yyvsp[(1) - (1)].val)); 05621 (yyval.val) = (yyvsp[(1) - (1)].val); 05622 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 05623 #endif 05624 (yyval.val) = (yyvsp[(1) - (1)].val); 05625 05626 ;} 05627 break; 05628 05629 case 53: 05630 05631 /* Line 1464 of yacc.c */ 05632 #line 1294 "ripper.y" 05633 { 05634 #if 0 05635 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05636 #endif 05637 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 05638 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05639 05640 ;} 05641 break; 05642 05643 case 54: 05644 05645 /* Line 1464 of yacc.c */ 05646 #line 1303 "ripper.y" 05647 { 05648 #if 0 05649 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05650 #endif 05651 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); 05652 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05653 05654 ;} 05655 break; 05656 05657 case 55: 05658 05659 /* Line 1464 of yacc.c */ 05660 #line 1314 "ripper.y" 05661 { 05662 (yyvsp[(1) - (1)].vars) = dyna_push(); 05663 #if 0 05664 (yyval.num) = ruby_sourceline; 05665 #endif 05666 05667 ;} 05668 break; 05669 05670 case 56: 05671 05672 /* Line 1464 of yacc.c */ 05673 #line 1324 "ripper.y" 05674 { 05675 #if 0 05676 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 05677 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 05678 #endif 05679 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 05680 05681 dyna_pop((yyvsp[(1) - (5)].vars)); 05682 ;} 05683 break; 05684 05685 case 57: 05686 05687 /* Line 1464 of yacc.c */ 05688 #line 1336 "ripper.y" 05689 { 05690 #if 0 05691 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05692 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05693 #endif 05694 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05695 05696 ;} 05697 break; 05698 05699 case 58: 05700 05701 /* Line 1464 of yacc.c */ 05702 #line 1345 "ripper.y" 05703 { 05704 #if 0 05705 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); 05706 (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05707 (yyval.val) = (yyvsp[(3) - (3)].val); 05708 fixpos((yyval.val), (yyvsp[(2) - (3)].val)); 05709 #endif 05710 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05711 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); 05712 05713 ;} 05714 break; 05715 05716 case 59: 05717 05718 /* Line 1464 of yacc.c */ 05719 #line 1357 "ripper.y" 05720 { 05721 #if 0 05722 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05723 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05724 #endif 05725 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05726 05727 ;} 05728 break; 05729 05730 case 60: 05731 05732 /* Line 1464 of yacc.c */ 05733 #line 1366 "ripper.y" 05734 { 05735 #if 0 05736 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 05737 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05738 (yyval.val) = (yyvsp[(5) - (5)].val); 05739 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05740 #endif 05741 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05742 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 05743 05744 ;} 05745 break; 05746 05747 case 61: 05748 05749 /* Line 1464 of yacc.c */ 05750 #line 1378 "ripper.y" 05751 { 05752 #if 0 05753 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05754 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05755 #endif 05756 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05757 05758 ;} 05759 break; 05760 05761 case 62: 05762 05763 /* Line 1464 of yacc.c */ 05764 #line 1387 "ripper.y" 05765 { 05766 #if 0 05767 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 05768 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05769 (yyval.val) = (yyvsp[(5) - (5)].val); 05770 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05771 #endif 05772 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05773 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 05774 05775 ;} 05776 break; 05777 05778 case 63: 05779 05780 /* Line 1464 of yacc.c */ 05781 #line 1399 "ripper.y" 05782 { 05783 #if 0 05784 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 05785 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05786 #endif 05787 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 05788 05789 ;} 05790 break; 05791 05792 case 64: 05793 05794 /* Line 1464 of yacc.c */ 05795 #line 1408 "ripper.y" 05796 { 05797 #if 0 05798 (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); 05799 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05800 #endif 05801 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); 05802 05803 ;} 05804 break; 05805 05806 case 65: 05807 05808 /* Line 1464 of yacc.c */ 05809 #line 1417 "ripper.y" 05810 { 05811 #if 0 05812 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); 05813 #endif 05814 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); 05815 05816 ;} 05817 break; 05818 05819 case 66: 05820 05821 /* Line 1464 of yacc.c */ 05822 #line 1425 "ripper.y" 05823 { 05824 #if 0 05825 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); 05826 #endif 05827 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); 05828 05829 ;} 05830 break; 05831 05832 case 67: 05833 05834 /* Line 1464 of yacc.c */ 05835 #line 1433 "ripper.y" 05836 { 05837 #if 0 05838 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); 05839 #endif 05840 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); 05841 05842 ;} 05843 break; 05844 05845 case 69: 05846 05847 /* Line 1464 of yacc.c */ 05848 #line 1444 "ripper.y" 05849 { 05850 #if 0 05851 (yyval.val) = (yyvsp[(2) - (3)].val); 05852 #endif 05853 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 05854 05855 ;} 05856 break; 05857 05858 case 71: 05859 05860 /* Line 1464 of yacc.c */ 05861 #line 1455 "ripper.y" 05862 { 05863 #if 0 05864 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); 05865 #endif 05866 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 05867 05868 ;} 05869 break; 05870 05871 case 72: 05872 05873 /* Line 1464 of yacc.c */ 05874 #line 1465 "ripper.y" 05875 { 05876 #if 0 05877 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 05878 #endif 05879 (yyval.val) = (yyvsp[(1) - (1)].val); 05880 05881 ;} 05882 break; 05883 05884 case 73: 05885 05886 /* Line 1464 of yacc.c */ 05887 #line 1473 "ripper.y" 05888 { 05889 #if 0 05890 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); 05891 #endif 05892 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05893 05894 ;} 05895 break; 05896 05897 case 74: 05898 05899 /* Line 1464 of yacc.c */ 05900 #line 1481 "ripper.y" 05901 { 05902 #if 0 05903 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05904 #endif 05905 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05906 05907 ;} 05908 break; 05909 05910 case 75: 05911 05912 /* Line 1464 of yacc.c */ 05913 #line 1489 "ripper.y" 05914 { 05915 #if 0 05916 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); 05917 #endif 05918 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05919 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 05920 05921 ;} 05922 break; 05923 05924 case 76: 05925 05926 /* Line 1464 of yacc.c */ 05927 #line 1498 "ripper.y" 05928 { 05929 #if 0 05930 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); 05931 #endif 05932 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); 05933 05934 ;} 05935 break; 05936 05937 case 77: 05938 05939 /* Line 1464 of yacc.c */ 05940 #line 1506 "ripper.y" 05941 { 05942 #if 0 05943 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); 05944 #endif 05945 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); 05946 05947 ;} 05948 break; 05949 05950 case 78: 05951 05952 /* Line 1464 of yacc.c */ 05953 #line 1514 "ripper.y" 05954 { 05955 #if 0 05956 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); 05957 #endif 05958 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); 05959 05960 ;} 05961 break; 05962 05963 case 79: 05964 05965 /* Line 1464 of yacc.c */ 05966 #line 1522 "ripper.y" 05967 { 05968 #if 0 05969 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); 05970 #endif 05971 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); 05972 05973 ;} 05974 break; 05975 05976 case 80: 05977 05978 /* Line 1464 of yacc.c */ 05979 #line 1530 "ripper.y" 05980 { 05981 #if 0 05982 (yyval.val) = NEW_MASGN(0, -1); 05983 #endif 05984 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 05985 05986 ;} 05987 break; 05988 05989 case 81: 05990 05991 /* Line 1464 of yacc.c */ 05992 #line 1538 "ripper.y" 05993 { 05994 #if 0 05995 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 05996 #endif 05997 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 05998 05999 ;} 06000 break; 06001 06002 case 83: 06003 06004 /* Line 1464 of yacc.c */ 06005 #line 1549 "ripper.y" 06006 { 06007 #if 0 06008 (yyval.val) = (yyvsp[(2) - (3)].val); 06009 #endif 06010 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06011 06012 ;} 06013 break; 06014 06015 case 84: 06016 06017 /* Line 1464 of yacc.c */ 06018 #line 1559 "ripper.y" 06019 { 06020 #if 0 06021 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); 06022 #endif 06023 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); 06024 06025 ;} 06026 break; 06027 06028 case 85: 06029 06030 /* Line 1464 of yacc.c */ 06031 #line 1567 "ripper.y" 06032 { 06033 #if 0 06034 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06035 #endif 06036 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06037 06038 ;} 06039 break; 06040 06041 case 86: 06042 06043 /* Line 1464 of yacc.c */ 06044 #line 1577 "ripper.y" 06045 { 06046 #if 0 06047 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 06048 #endif 06049 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 06050 06051 ;} 06052 break; 06053 06054 case 87: 06055 06056 /* Line 1464 of yacc.c */ 06057 #line 1585 "ripper.y" 06058 { 06059 #if 0 06060 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06061 #endif 06062 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06063 06064 ;} 06065 break; 06066 06067 case 88: 06068 06069 /* Line 1464 of yacc.c */ 06070 #line 1595 "ripper.y" 06071 { 06072 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06073 ;} 06074 break; 06075 06076 case 89: 06077 06078 /* Line 1464 of yacc.c */ 06079 #line 1599 "ripper.y" 06080 { 06081 #if 0 06082 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06083 #endif 06084 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06085 06086 ;} 06087 break; 06088 06089 case 90: 06090 06091 /* Line 1464 of yacc.c */ 06092 #line 1607 "ripper.y" 06093 { 06094 #if 0 06095 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06096 #endif 06097 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06098 06099 ;} 06100 break; 06101 06102 case 91: 06103 06104 /* Line 1464 of yacc.c */ 06105 #line 1615 "ripper.y" 06106 { 06107 #if 0 06108 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06109 #endif 06110 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06111 06112 ;} 06113 break; 06114 06115 case 92: 06116 06117 /* Line 1464 of yacc.c */ 06118 #line 1623 "ripper.y" 06119 { 06120 #if 0 06121 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06122 #endif 06123 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06124 06125 ;} 06126 break; 06127 06128 case 93: 06129 06130 /* Line 1464 of yacc.c */ 06131 #line 1631 "ripper.y" 06132 { 06133 #if 0 06134 if (in_def || in_single) 06135 yyerror("dynamic constant assignment"); 06136 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06137 #endif 06138 if (in_def || in_single) 06139 yyerror("dynamic constant assignment"); 06140 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06141 06142 ;} 06143 break; 06144 06145 case 94: 06146 06147 /* Line 1464 of yacc.c */ 06148 #line 1643 "ripper.y" 06149 { 06150 #if 0 06151 if (in_def || in_single) 06152 yyerror("dynamic constant assignment"); 06153 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06154 #endif 06155 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06156 06157 ;} 06158 break; 06159 06160 case 95: 06161 06162 /* Line 1464 of yacc.c */ 06163 #line 1653 "ripper.y" 06164 { 06165 #if 0 06166 rb_backref_error((yyvsp[(1) - (1)].val)); 06167 (yyval.val) = NEW_BEGIN(0); 06168 #endif 06169 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); 06170 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06171 06172 ;} 06173 break; 06174 06175 case 96: 06176 06177 /* Line 1464 of yacc.c */ 06178 #line 1665 "ripper.y" 06179 { 06180 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06181 #if 0 06182 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06183 #endif 06184 (yyval.val) = dispatch1(var_field, (yyval.val)); 06185 06186 ;} 06187 break; 06188 06189 case 97: 06190 06191 /* Line 1464 of yacc.c */ 06192 #line 1674 "ripper.y" 06193 { 06194 #if 0 06195 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06196 #endif 06197 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06198 06199 ;} 06200 break; 06201 06202 case 98: 06203 06204 /* Line 1464 of yacc.c */ 06205 #line 1682 "ripper.y" 06206 { 06207 #if 0 06208 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06209 #endif 06210 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06211 06212 ;} 06213 break; 06214 06215 case 99: 06216 06217 /* Line 1464 of yacc.c */ 06218 #line 1690 "ripper.y" 06219 { 06220 #if 0 06221 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06222 #endif 06223 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 06224 06225 ;} 06226 break; 06227 06228 case 100: 06229 06230 /* Line 1464 of yacc.c */ 06231 #line 1698 "ripper.y" 06232 { 06233 #if 0 06234 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06235 #endif 06236 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06237 06238 ;} 06239 break; 06240 06241 case 101: 06242 06243 /* Line 1464 of yacc.c */ 06244 #line 1706 "ripper.y" 06245 { 06246 #if 0 06247 if (in_def || in_single) 06248 yyerror("dynamic constant assignment"); 06249 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06250 #endif 06251 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06252 if (in_def || in_single) { 06253 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06254 } 06255 06256 ;} 06257 break; 06258 06259 case 102: 06260 06261 /* Line 1464 of yacc.c */ 06262 #line 1719 "ripper.y" 06263 { 06264 #if 0 06265 if (in_def || in_single) 06266 yyerror("dynamic constant assignment"); 06267 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06268 #endif 06269 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06270 if (in_def || in_single) { 06271 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06272 } 06273 06274 ;} 06275 break; 06276 06277 case 103: 06278 06279 /* Line 1464 of yacc.c */ 06280 #line 1732 "ripper.y" 06281 { 06282 #if 0 06283 rb_backref_error((yyvsp[(1) - (1)].val)); 06284 (yyval.val) = NEW_BEGIN(0); 06285 #endif 06286 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); 06287 06288 ;} 06289 break; 06290 06291 case 104: 06292 06293 /* Line 1464 of yacc.c */ 06294 #line 1743 "ripper.y" 06295 { 06296 #if 0 06297 yyerror("class/module name must be CONSTANT"); 06298 #endif 06299 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); 06300 06301 ;} 06302 break; 06303 06304 case 106: 06305 06306 /* Line 1464 of yacc.c */ 06307 #line 1754 "ripper.y" 06308 { 06309 #if 0 06310 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 06311 #endif 06312 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 06313 06314 ;} 06315 break; 06316 06317 case 107: 06318 06319 /* Line 1464 of yacc.c */ 06320 #line 1762 "ripper.y" 06321 { 06322 #if 0 06323 (yyval.val) = NEW_COLON2(0, (yyval.val)); 06324 #endif 06325 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); 06326 06327 ;} 06328 break; 06329 06330 case 108: 06331 06332 /* Line 1464 of yacc.c */ 06333 #line 1770 "ripper.y" 06334 { 06335 #if 0 06336 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06337 #endif 06338 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06339 06340 ;} 06341 break; 06342 06343 case 112: 06344 06345 /* Line 1464 of yacc.c */ 06346 #line 1783 "ripper.y" 06347 { 06348 lex_state = EXPR_ENDFN; 06349 (yyval.val) = (yyvsp[(1) - (1)].val); 06350 ;} 06351 break; 06352 06353 case 113: 06354 06355 /* Line 1464 of yacc.c */ 06356 #line 1788 "ripper.y" 06357 { 06358 lex_state = EXPR_ENDFN; 06359 #if 0 06360 (yyval.val) = (yyvsp[(1) - (1)].id); 06361 #endif 06362 (yyval.val) = (yyvsp[(1) - (1)].val); 06363 06364 ;} 06365 break; 06366 06367 case 116: 06368 06369 /* Line 1464 of yacc.c */ 06370 #line 1803 "ripper.y" 06371 { 06372 #if 0 06373 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 06374 #endif 06375 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 06376 06377 ;} 06378 break; 06379 06380 case 118: 06381 06382 /* Line 1464 of yacc.c */ 06383 #line 1814 "ripper.y" 06384 { 06385 #if 0 06386 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); 06387 #endif 06388 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 06389 06390 ;} 06391 break; 06392 06393 case 119: 06394 06395 /* Line 1464 of yacc.c */ 06396 #line 1821 "ripper.y" 06397 {lex_state = EXPR_FNAME;;} 06398 break; 06399 06400 case 120: 06401 06402 /* Line 1464 of yacc.c */ 06403 #line 1822 "ripper.y" 06404 { 06405 #if 0 06406 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); 06407 #endif 06408 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06409 06410 ;} 06411 break; 06412 06413 case 121: 06414 06415 /* Line 1464 of yacc.c */ 06416 #line 1831 "ripper.y" 06417 { ifndef_ripper((yyval.val) = '|'); ;} 06418 break; 06419 06420 case 122: 06421 06422 /* Line 1464 of yacc.c */ 06423 #line 1832 "ripper.y" 06424 { ifndef_ripper((yyval.val) = '^'); ;} 06425 break; 06426 06427 case 123: 06428 06429 /* Line 1464 of yacc.c */ 06430 #line 1833 "ripper.y" 06431 { ifndef_ripper((yyval.val) = '&'); ;} 06432 break; 06433 06434 case 124: 06435 06436 /* Line 1464 of yacc.c */ 06437 #line 1834 "ripper.y" 06438 { ifndef_ripper((yyval.val) = tCMP); ;} 06439 break; 06440 06441 case 125: 06442 06443 /* Line 1464 of yacc.c */ 06444 #line 1835 "ripper.y" 06445 { ifndef_ripper((yyval.val) = tEQ); ;} 06446 break; 06447 06448 case 126: 06449 06450 /* Line 1464 of yacc.c */ 06451 #line 1836 "ripper.y" 06452 { ifndef_ripper((yyval.val) = tEQQ); ;} 06453 break; 06454 06455 case 127: 06456 06457 /* Line 1464 of yacc.c */ 06458 #line 1837 "ripper.y" 06459 { ifndef_ripper((yyval.val) = tMATCH); ;} 06460 break; 06461 06462 case 128: 06463 06464 /* Line 1464 of yacc.c */ 06465 #line 1838 "ripper.y" 06466 { ifndef_ripper((yyval.val) = tNMATCH); ;} 06467 break; 06468 06469 case 129: 06470 06471 /* Line 1464 of yacc.c */ 06472 #line 1839 "ripper.y" 06473 { ifndef_ripper((yyval.val) = '>'); ;} 06474 break; 06475 06476 case 130: 06477 06478 /* Line 1464 of yacc.c */ 06479 #line 1840 "ripper.y" 06480 { ifndef_ripper((yyval.val) = tGEQ); ;} 06481 break; 06482 06483 case 131: 06484 06485 /* Line 1464 of yacc.c */ 06486 #line 1841 "ripper.y" 06487 { ifndef_ripper((yyval.val) = '<'); ;} 06488 break; 06489 06490 case 132: 06491 06492 /* Line 1464 of yacc.c */ 06493 #line 1842 "ripper.y" 06494 { ifndef_ripper((yyval.val) = tLEQ); ;} 06495 break; 06496 06497 case 133: 06498 06499 /* Line 1464 of yacc.c */ 06500 #line 1843 "ripper.y" 06501 { ifndef_ripper((yyval.val) = tNEQ); ;} 06502 break; 06503 06504 case 134: 06505 06506 /* Line 1464 of yacc.c */ 06507 #line 1844 "ripper.y" 06508 { ifndef_ripper((yyval.val) = tLSHFT); ;} 06509 break; 06510 06511 case 135: 06512 06513 /* Line 1464 of yacc.c */ 06514 #line 1845 "ripper.y" 06515 { ifndef_ripper((yyval.val) = tRSHFT); ;} 06516 break; 06517 06518 case 136: 06519 06520 /* Line 1464 of yacc.c */ 06521 #line 1846 "ripper.y" 06522 { ifndef_ripper((yyval.val) = '+'); ;} 06523 break; 06524 06525 case 137: 06526 06527 /* Line 1464 of yacc.c */ 06528 #line 1847 "ripper.y" 06529 { ifndef_ripper((yyval.val) = '-'); ;} 06530 break; 06531 06532 case 138: 06533 06534 /* Line 1464 of yacc.c */ 06535 #line 1848 "ripper.y" 06536 { ifndef_ripper((yyval.val) = '*'); ;} 06537 break; 06538 06539 case 139: 06540 06541 /* Line 1464 of yacc.c */ 06542 #line 1849 "ripper.y" 06543 { ifndef_ripper((yyval.val) = '*'); ;} 06544 break; 06545 06546 case 140: 06547 06548 /* Line 1464 of yacc.c */ 06549 #line 1850 "ripper.y" 06550 { ifndef_ripper((yyval.val) = '/'); ;} 06551 break; 06552 06553 case 141: 06554 06555 /* Line 1464 of yacc.c */ 06556 #line 1851 "ripper.y" 06557 { ifndef_ripper((yyval.val) = '%'); ;} 06558 break; 06559 06560 case 142: 06561 06562 /* Line 1464 of yacc.c */ 06563 #line 1852 "ripper.y" 06564 { ifndef_ripper((yyval.val) = tPOW); ;} 06565 break; 06566 06567 case 143: 06568 06569 /* Line 1464 of yacc.c */ 06570 #line 1853 "ripper.y" 06571 { ifndef_ripper((yyval.val) = '!'); ;} 06572 break; 06573 06574 case 144: 06575 06576 /* Line 1464 of yacc.c */ 06577 #line 1854 "ripper.y" 06578 { ifndef_ripper((yyval.val) = '~'); ;} 06579 break; 06580 06581 case 145: 06582 06583 /* Line 1464 of yacc.c */ 06584 #line 1855 "ripper.y" 06585 { ifndef_ripper((yyval.val) = tUPLUS); ;} 06586 break; 06587 06588 case 146: 06589 06590 /* Line 1464 of yacc.c */ 06591 #line 1856 "ripper.y" 06592 { ifndef_ripper((yyval.val) = tUMINUS); ;} 06593 break; 06594 06595 case 147: 06596 06597 /* Line 1464 of yacc.c */ 06598 #line 1857 "ripper.y" 06599 { ifndef_ripper((yyval.val) = tAREF); ;} 06600 break; 06601 06602 case 148: 06603 06604 /* Line 1464 of yacc.c */ 06605 #line 1858 "ripper.y" 06606 { ifndef_ripper((yyval.val) = tASET); ;} 06607 break; 06608 06609 case 149: 06610 06611 /* Line 1464 of yacc.c */ 06612 #line 1859 "ripper.y" 06613 { ifndef_ripper((yyval.val) = '`'); ;} 06614 break; 06615 06616 case 191: 06617 06618 /* Line 1464 of yacc.c */ 06619 #line 1877 "ripper.y" 06620 { 06621 #if 0 06622 value_expr((yyvsp[(3) - (3)].val)); 06623 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06624 #endif 06625 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06626 06627 ;} 06628 break; 06629 06630 case 192: 06631 06632 /* Line 1464 of yacc.c */ 06633 #line 1886 "ripper.y" 06634 { 06635 #if 0 06636 value_expr((yyvsp[(3) - (5)].val)); 06637 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06638 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06639 #endif 06640 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); 06641 06642 ;} 06643 break; 06644 06645 case 193: 06646 06647 /* Line 1464 of yacc.c */ 06648 #line 1896 "ripper.y" 06649 { 06650 #if 0 06651 value_expr((yyvsp[(3) - (3)].val)); 06652 if ((yyvsp[(1) - (3)].val)) { 06653 ID vid = (yyvsp[(1) - (3)].val)->nd_vid; 06654 if ((yyvsp[(2) - (3)].val) == tOROP) { 06655 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 06656 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); 06657 if (is_asgn_or_id(vid)) { 06658 (yyval.val)->nd_aid = vid; 06659 } 06660 } 06661 else if ((yyvsp[(2) - (3)].val) == tANDOP) { 06662 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 06663 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); 06664 } 06665 else { 06666 (yyval.val) = (yyvsp[(1) - (3)].val); 06667 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); 06668 } 06669 } 06670 else { 06671 (yyval.val) = NEW_BEGIN(0); 06672 } 06673 #endif 06674 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06675 06676 ;} 06677 break; 06678 06679 case 194: 06680 06681 /* Line 1464 of yacc.c */ 06682 #line 1925 "ripper.y" 06683 { 06684 #if 0 06685 value_expr((yyvsp[(3) - (5)].val)); 06686 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06687 if ((yyvsp[(1) - (5)].val)) { 06688 ID vid = (yyvsp[(1) - (5)].val)->nd_vid; 06689 if ((yyvsp[(2) - (5)].val) == tOROP) { 06690 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); 06691 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val)); 06692 if (is_asgn_or_id(vid)) { 06693 (yyval.val)->nd_aid = vid; 06694 } 06695 } 06696 else if ((yyvsp[(2) - (5)].val) == tANDOP) { 06697 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); 06698 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val)); 06699 } 06700 else { 06701 (yyval.val) = (yyvsp[(1) - (5)].val); 06702 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val))); 06703 } 06704 } 06705 else { 06706 (yyval.val) = NEW_BEGIN(0); 06707 } 06708 #endif 06709 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 06710 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); 06711 06712 ;} 06713 break; 06714 06715 case 195: 06716 06717 /* Line 1464 of yacc.c */ 06718 #line 1956 "ripper.y" 06719 { 06720 #if 0 06721 NODE *args; 06722 06723 value_expr((yyvsp[(6) - (6)].val)); 06724 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 06725 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) { 06726 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06727 } 06728 else { 06729 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06730 } 06731 if ((yyvsp[(5) - (6)].val) == tOROP) { 06732 (yyvsp[(5) - (6)].val) = 0; 06733 } 06734 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 06735 (yyvsp[(5) - (6)].val) = 1; 06736 } 06737 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 06738 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 06739 #endif 06740 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 06741 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 06742 06743 ;} 06744 break; 06745 06746 case 196: 06747 06748 /* Line 1464 of yacc.c */ 06749 #line 1982 "ripper.y" 06750 { 06751 #if 0 06752 value_expr((yyvsp[(5) - (5)].val)); 06753 if ((yyvsp[(4) - (5)].val) == tOROP) { 06754 (yyvsp[(4) - (5)].val) = 0; 06755 } 06756 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06757 (yyvsp[(4) - (5)].val) = 1; 06758 } 06759 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06760 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06761 #endif 06762 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 06763 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06764 06765 ;} 06766 break; 06767 06768 case 197: 06769 06770 /* Line 1464 of yacc.c */ 06771 #line 1999 "ripper.y" 06772 { 06773 #if 0 06774 value_expr((yyvsp[(5) - (5)].val)); 06775 if ((yyvsp[(4) - (5)].val) == tOROP) { 06776 (yyvsp[(4) - (5)].val) = 0; 06777 } 06778 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06779 (yyvsp[(4) - (5)].val) = 1; 06780 } 06781 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06782 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06783 #endif 06784 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 06785 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06786 06787 ;} 06788 break; 06789 06790 case 198: 06791 06792 /* Line 1464 of yacc.c */ 06793 #line 2016 "ripper.y" 06794 { 06795 #if 0 06796 value_expr((yyvsp[(5) - (5)].val)); 06797 if ((yyvsp[(4) - (5)].val) == tOROP) { 06798 (yyvsp[(4) - (5)].val) = 0; 06799 } 06800 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06801 (yyvsp[(4) - (5)].val) = 1; 06802 } 06803 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06804 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06805 #endif 06806 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); 06807 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06808 06809 ;} 06810 break; 06811 06812 case 199: 06813 06814 /* Line 1464 of yacc.c */ 06815 #line 2033 "ripper.y" 06816 { 06817 #if 0 06818 yyerror("constant re-assignment"); 06819 (yyval.val) = NEW_BEGIN(0); 06820 #endif 06821 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06822 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06823 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06824 06825 ;} 06826 break; 06827 06828 case 200: 06829 06830 /* Line 1464 of yacc.c */ 06831 #line 2044 "ripper.y" 06832 { 06833 #if 0 06834 yyerror("constant re-assignment"); 06835 (yyval.val) = NEW_BEGIN(0); 06836 #endif 06837 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); 06838 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06839 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06840 06841 ;} 06842 break; 06843 06844 case 201: 06845 06846 /* Line 1464 of yacc.c */ 06847 #line 2055 "ripper.y" 06848 { 06849 #if 0 06850 rb_backref_error((yyvsp[(1) - (3)].val)); 06851 (yyval.val) = NEW_BEGIN(0); 06852 #endif 06853 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); 06854 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06855 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06856 06857 ;} 06858 break; 06859 06860 case 202: 06861 06862 /* Line 1464 of yacc.c */ 06863 #line 2066 "ripper.y" 06864 { 06865 #if 0 06866 value_expr((yyvsp[(1) - (3)].val)); 06867 value_expr((yyvsp[(3) - (3)].val)); 06868 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06869 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 06870 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 06871 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 06872 } 06873 #endif 06874 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06875 06876 ;} 06877 break; 06878 06879 case 203: 06880 06881 /* Line 1464 of yacc.c */ 06882 #line 2080 "ripper.y" 06883 { 06884 #if 0 06885 value_expr((yyvsp[(1) - (3)].val)); 06886 value_expr((yyvsp[(3) - (3)].val)); 06887 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06888 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 06889 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 06890 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 06891 } 06892 #endif 06893 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06894 06895 ;} 06896 break; 06897 06898 case 204: 06899 06900 /* Line 1464 of yacc.c */ 06901 #line 2094 "ripper.y" 06902 { 06903 #if 0 06904 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); 06905 #endif 06906 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); 06907 06908 ;} 06909 break; 06910 06911 case 205: 06912 06913 /* Line 1464 of yacc.c */ 06914 #line 2102 "ripper.y" 06915 { 06916 #if 0 06917 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); 06918 #endif 06919 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); 06920 06921 ;} 06922 break; 06923 06924 case 206: 06925 06926 /* Line 1464 of yacc.c */ 06927 #line 2110 "ripper.y" 06928 { 06929 #if 0 06930 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); 06931 #endif 06932 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); 06933 06934 ;} 06935 break; 06936 06937 case 207: 06938 06939 /* Line 1464 of yacc.c */ 06940 #line 2118 "ripper.y" 06941 { 06942 #if 0 06943 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); 06944 #endif 06945 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); 06946 06947 ;} 06948 break; 06949 06950 case 208: 06951 06952 /* Line 1464 of yacc.c */ 06953 #line 2126 "ripper.y" 06954 { 06955 #if 0 06956 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); 06957 #endif 06958 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); 06959 06960 ;} 06961 break; 06962 06963 case 209: 06964 06965 /* Line 1464 of yacc.c */ 06966 #line 2134 "ripper.y" 06967 { 06968 #if 0 06969 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); 06970 #endif 06971 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); 06972 06973 ;} 06974 break; 06975 06976 case 210: 06977 06978 /* Line 1464 of yacc.c */ 06979 #line 2142 "ripper.y" 06980 { 06981 #if 0 06982 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 06983 #endif 06984 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 06985 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 06986 06987 ;} 06988 break; 06989 06990 case 211: 06991 06992 /* Line 1464 of yacc.c */ 06993 #line 2151 "ripper.y" 06994 { 06995 #if 0 06996 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 06997 #endif 06998 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 06999 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07000 07001 ;} 07002 break; 07003 07004 case 212: 07005 07006 /* Line 1464 of yacc.c */ 07007 #line 2160 "ripper.y" 07008 { 07009 #if 0 07010 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); 07011 #endif 07012 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); 07013 07014 ;} 07015 break; 07016 07017 case 213: 07018 07019 /* Line 1464 of yacc.c */ 07020 #line 2168 "ripper.y" 07021 { 07022 #if 0 07023 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); 07024 #endif 07025 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 07026 07027 ;} 07028 break; 07029 07030 case 214: 07031 07032 /* Line 1464 of yacc.c */ 07033 #line 2176 "ripper.y" 07034 { 07035 #if 0 07036 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); 07037 #endif 07038 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); 07039 07040 ;} 07041 break; 07042 07043 case 215: 07044 07045 /* Line 1464 of yacc.c */ 07046 #line 2184 "ripper.y" 07047 { 07048 #if 0 07049 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); 07050 #endif 07051 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); 07052 07053 ;} 07054 break; 07055 07056 case 216: 07057 07058 /* Line 1464 of yacc.c */ 07059 #line 2192 "ripper.y" 07060 { 07061 #if 0 07062 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); 07063 #endif 07064 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); 07065 07066 ;} 07067 break; 07068 07069 case 217: 07070 07071 /* Line 1464 of yacc.c */ 07072 #line 2200 "ripper.y" 07073 { 07074 #if 0 07075 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); 07076 #endif 07077 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); 07078 07079 ;} 07080 break; 07081 07082 case 218: 07083 07084 /* Line 1464 of yacc.c */ 07085 #line 2208 "ripper.y" 07086 { 07087 #if 0 07088 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); 07089 #endif 07090 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); 07091 07092 ;} 07093 break; 07094 07095 case 219: 07096 07097 /* Line 1464 of yacc.c */ 07098 #line 2216 "ripper.y" 07099 { 07100 #if 0 07101 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); 07102 #endif 07103 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); 07104 07105 ;} 07106 break; 07107 07108 case 220: 07109 07110 /* Line 1464 of yacc.c */ 07111 #line 2224 "ripper.y" 07112 { 07113 #if 0 07114 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); 07115 #endif 07116 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); 07117 07118 ;} 07119 break; 07120 07121 case 221: 07122 07123 /* Line 1464 of yacc.c */ 07124 #line 2232 "ripper.y" 07125 { 07126 #if 0 07127 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); 07128 #endif 07129 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); 07130 07131 ;} 07132 break; 07133 07134 case 222: 07135 07136 /* Line 1464 of yacc.c */ 07137 #line 2240 "ripper.y" 07138 { 07139 #if 0 07140 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); 07141 #endif 07142 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); 07143 07144 ;} 07145 break; 07146 07147 case 223: 07148 07149 /* Line 1464 of yacc.c */ 07150 #line 2248 "ripper.y" 07151 { 07152 #if 0 07153 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); 07154 #endif 07155 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); 07156 07157 ;} 07158 break; 07159 07160 case 224: 07161 07162 /* Line 1464 of yacc.c */ 07163 #line 2256 "ripper.y" 07164 { 07165 #if 0 07166 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); 07167 #endif 07168 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); 07169 07170 ;} 07171 break; 07172 07173 case 225: 07174 07175 /* Line 1464 of yacc.c */ 07176 #line 2264 "ripper.y" 07177 { 07178 #if 0 07179 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07180 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) { 07181 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); 07182 } 07183 #endif 07184 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); 07185 07186 ;} 07187 break; 07188 07189 case 226: 07190 07191 /* Line 1464 of yacc.c */ 07192 #line 2275 "ripper.y" 07193 { 07194 #if 0 07195 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); 07196 #endif 07197 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); 07198 07199 ;} 07200 break; 07201 07202 case 227: 07203 07204 /* Line 1464 of yacc.c */ 07205 #line 2283 "ripper.y" 07206 { 07207 #if 0 07208 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 07209 #endif 07210 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); 07211 07212 ;} 07213 break; 07214 07215 case 228: 07216 07217 /* Line 1464 of yacc.c */ 07218 #line 2291 "ripper.y" 07219 { 07220 #if 0 07221 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); 07222 #endif 07223 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); 07224 07225 ;} 07226 break; 07227 07228 case 229: 07229 07230 /* Line 1464 of yacc.c */ 07231 #line 2299 "ripper.y" 07232 { 07233 #if 0 07234 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); 07235 #endif 07236 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); 07237 07238 ;} 07239 break; 07240 07241 case 230: 07242 07243 /* Line 1464 of yacc.c */ 07244 #line 2307 "ripper.y" 07245 { 07246 #if 0 07247 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); 07248 #endif 07249 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); 07250 07251 ;} 07252 break; 07253 07254 case 231: 07255 07256 /* Line 1464 of yacc.c */ 07257 #line 2315 "ripper.y" 07258 { 07259 #if 0 07260 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07261 #endif 07262 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); 07263 07264 ;} 07265 break; 07266 07267 case 232: 07268 07269 /* Line 1464 of yacc.c */ 07270 #line 2323 "ripper.y" 07271 { 07272 #if 0 07273 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07274 #endif 07275 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); 07276 07277 ;} 07278 break; 07279 07280 case 233: 07281 07282 /* Line 1464 of yacc.c */ 07283 #line 2330 "ripper.y" 07284 {in_defined = 1;;} 07285 break; 07286 07287 case 234: 07288 07289 /* Line 1464 of yacc.c */ 07290 #line 2331 "ripper.y" 07291 { 07292 #if 0 07293 in_defined = 0; 07294 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); 07295 #endif 07296 in_defined = 0; 07297 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); 07298 07299 ;} 07300 break; 07301 07302 case 235: 07303 07304 /* Line 1464 of yacc.c */ 07305 #line 2341 "ripper.y" 07306 { 07307 #if 0 07308 value_expr((yyvsp[(1) - (6)].val)); 07309 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07310 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07311 #endif 07312 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07313 07314 ;} 07315 break; 07316 07317 case 236: 07318 07319 /* Line 1464 of yacc.c */ 07320 #line 2351 "ripper.y" 07321 { 07322 (yyval.val) = (yyvsp[(1) - (1)].val); 07323 ;} 07324 break; 07325 07326 case 237: 07327 07328 /* Line 1464 of yacc.c */ 07329 #line 2357 "ripper.y" 07330 { 07331 #if 0 07332 value_expr((yyvsp[(1) - (1)].val)); 07333 (yyval.val) = (yyvsp[(1) - (1)].val); 07334 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 07335 #endif 07336 (yyval.val) = (yyvsp[(1) - (1)].val); 07337 07338 ;} 07339 break; 07340 07341 case 239: 07342 07343 /* Line 1464 of yacc.c */ 07344 #line 2370 "ripper.y" 07345 { 07346 (yyval.val) = (yyvsp[(1) - (2)].val); 07347 ;} 07348 break; 07349 07350 case 240: 07351 07352 /* Line 1464 of yacc.c */ 07353 #line 2374 "ripper.y" 07354 { 07355 #if 0 07356 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07357 #endif 07358 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07359 07360 ;} 07361 break; 07362 07363 case 241: 07364 07365 /* Line 1464 of yacc.c */ 07366 #line 2382 "ripper.y" 07367 { 07368 #if 0 07369 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07370 #endif 07371 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07372 07373 ;} 07374 break; 07375 07376 case 242: 07377 07378 /* Line 1464 of yacc.c */ 07379 #line 2392 "ripper.y" 07380 { 07381 #if 0 07382 (yyval.val) = (yyvsp[(2) - (3)].val); 07383 #endif 07384 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); 07385 07386 ;} 07387 break; 07388 07389 case 247: 07390 07391 /* Line 1464 of yacc.c */ 07392 #line 2410 "ripper.y" 07393 { 07394 #if 0 07395 value_expr((yyvsp[(1) - (1)].val)); 07396 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07397 #endif 07398 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07399 07400 ;} 07401 break; 07402 07403 case 248: 07404 07405 /* Line 1464 of yacc.c */ 07406 #line 2419 "ripper.y" 07407 { 07408 #if 0 07409 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07410 #endif 07411 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07412 07413 ;} 07414 break; 07415 07416 case 249: 07417 07418 /* Line 1464 of yacc.c */ 07419 #line 2427 "ripper.y" 07420 { 07421 #if 0 07422 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07423 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); 07424 #endif 07425 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07426 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); 07427 07428 ;} 07429 break; 07430 07431 case 250: 07432 07433 /* Line 1464 of yacc.c */ 07434 #line 2437 "ripper.y" 07435 { 07436 #if 0 07437 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07438 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); 07439 #endif 07440 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); 07441 07442 ;} 07443 break; 07444 07445 case 251: 07446 07447 /* Line 1464 of yacc.c */ 07448 #line 2448 "ripper.y" 07449 { 07450 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); 07451 ;} 07452 break; 07453 07454 case 252: 07455 07456 /* Line 1464 of yacc.c */ 07457 #line 2454 "ripper.y" 07458 { 07459 (yyval.val) = cmdarg_stack; 07460 CMDARG_PUSH(1); 07461 ;} 07462 break; 07463 07464 case 253: 07465 07466 /* Line 1464 of yacc.c */ 07467 #line 2459 "ripper.y" 07468 { 07469 /* CMDARG_POP() */ 07470 cmdarg_stack = (yyvsp[(1) - (2)].val); 07471 (yyval.val) = (yyvsp[(2) - (2)].val); 07472 ;} 07473 break; 07474 07475 case 254: 07476 07477 /* Line 1464 of yacc.c */ 07478 #line 2467 "ripper.y" 07479 { 07480 #if 0 07481 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); 07482 #endif 07483 (yyval.val) = (yyvsp[(2) - (2)].val); 07484 07485 ;} 07486 break; 07487 07488 case 255: 07489 07490 /* Line 1464 of yacc.c */ 07491 #line 2477 "ripper.y" 07492 { 07493 (yyval.val) = (yyvsp[(2) - (2)].val); 07494 ;} 07495 break; 07496 07497 case 256: 07498 07499 /* Line 1464 of yacc.c */ 07500 #line 2481 "ripper.y" 07501 { 07502 (yyval.val) = 0; 07503 ;} 07504 break; 07505 07506 case 257: 07507 07508 /* Line 1464 of yacc.c */ 07509 #line 2485 "ripper.y" 07510 { 07511 (yyval.val) = 0; 07512 ;} 07513 break; 07514 07515 case 258: 07516 07517 /* Line 1464 of yacc.c */ 07518 #line 2491 "ripper.y" 07519 { 07520 #if 0 07521 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07522 #endif 07523 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07524 07525 ;} 07526 break; 07527 07528 case 259: 07529 07530 /* Line 1464 of yacc.c */ 07531 #line 2499 "ripper.y" 07532 { 07533 #if 0 07534 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07535 #endif 07536 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); 07537 07538 ;} 07539 break; 07540 07541 case 260: 07542 07543 /* Line 1464 of yacc.c */ 07544 #line 2507 "ripper.y" 07545 { 07546 #if 0 07547 NODE *n1; 07548 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07549 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07550 } 07551 else { 07552 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07553 } 07554 #endif 07555 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07556 07557 ;} 07558 break; 07559 07560 case 261: 07561 07562 /* Line 1464 of yacc.c */ 07563 #line 2521 "ripper.y" 07564 { 07565 #if 0 07566 NODE *n1; 07567 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07568 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07569 } 07570 else { 07571 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07572 } 07573 #endif 07574 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07575 07576 ;} 07577 break; 07578 07579 case 262: 07580 07581 /* Line 1464 of yacc.c */ 07582 #line 2537 "ripper.y" 07583 { 07584 #if 0 07585 NODE *n1; 07586 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07587 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07588 } 07589 else { 07590 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07591 } 07592 #endif 07593 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 07594 07595 ;} 07596 break; 07597 07598 case 263: 07599 07600 /* Line 1464 of yacc.c */ 07601 #line 2551 "ripper.y" 07602 { 07603 #if 0 07604 NODE *n1; 07605 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && 07606 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07607 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07608 } 07609 else { 07610 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07611 } 07612 #endif 07613 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); 07614 07615 ;} 07616 break; 07617 07618 case 264: 07619 07620 /* Line 1464 of yacc.c */ 07621 #line 2566 "ripper.y" 07622 { 07623 #if 0 07624 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07625 #endif 07626 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); 07627 07628 ;} 07629 break; 07630 07631 case 273: 07632 07633 /* Line 1464 of yacc.c */ 07634 #line 2584 "ripper.y" 07635 { 07636 #if 0 07637 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 07638 #endif 07639 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); 07640 07641 ;} 07642 break; 07643 07644 case 274: 07645 07646 /* Line 1464 of yacc.c */ 07647 #line 2592 "ripper.y" 07648 { 07649 #if 0 07650 (yyval.num) = ruby_sourceline; 07651 #endif 07652 07653 ;} 07654 break; 07655 07656 case 275: 07657 07658 /* Line 1464 of yacc.c */ 07659 #line 2600 "ripper.y" 07660 { 07661 #if 0 07662 if ((yyvsp[(3) - (4)].val) == NULL) { 07663 (yyval.val) = NEW_NIL(); 07664 } 07665 else { 07666 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || 07667 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) 07668 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); 07669 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); 07670 } 07671 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); 07672 #endif 07673 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); 07674 07675 ;} 07676 break; 07677 07678 case 276: 07679 07680 /* Line 1464 of yacc.c */ 07681 #line 2616 "ripper.y" 07682 {lex_state = EXPR_ENDARG;;} 07683 break; 07684 07685 case 277: 07686 07687 /* Line 1464 of yacc.c */ 07688 #line 2617 "ripper.y" 07689 { 07690 rb_warning0("(...) interpreted as grouped expression"); 07691 #if 0 07692 (yyval.val) = (yyvsp[(2) - (4)].val); 07693 #endif 07694 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 07695 07696 ;} 07697 break; 07698 07699 case 278: 07700 07701 /* Line 1464 of yacc.c */ 07702 #line 2626 "ripper.y" 07703 { 07704 #if 0 07705 (yyval.val) = (yyvsp[(2) - (3)].val); 07706 #endif 07707 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 07708 07709 ;} 07710 break; 07711 07712 case 279: 07713 07714 /* Line 1464 of yacc.c */ 07715 #line 2634 "ripper.y" 07716 { 07717 #if 0 07718 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07719 #endif 07720 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07721 07722 ;} 07723 break; 07724 07725 case 280: 07726 07727 /* Line 1464 of yacc.c */ 07728 #line 2642 "ripper.y" 07729 { 07730 #if 0 07731 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 07732 #endif 07733 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 07734 07735 ;} 07736 break; 07737 07738 case 281: 07739 07740 /* Line 1464 of yacc.c */ 07741 #line 2650 "ripper.y" 07742 { 07743 #if 0 07744 if ((yyvsp[(2) - (3)].val) == 0) { 07745 (yyval.val) = NEW_ZARRAY(); /* zero length array*/ 07746 } 07747 else { 07748 (yyval.val) = (yyvsp[(2) - (3)].val); 07749 } 07750 #endif 07751 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); 07752 07753 ;} 07754 break; 07755 07756 case 282: 07757 07758 /* Line 1464 of yacc.c */ 07759 #line 2663 "ripper.y" 07760 { 07761 #if 0 07762 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); 07763 #endif 07764 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); 07765 07766 ;} 07767 break; 07768 07769 case 283: 07770 07771 /* Line 1464 of yacc.c */ 07772 #line 2671 "ripper.y" 07773 { 07774 #if 0 07775 (yyval.val) = NEW_RETURN(0); 07776 #endif 07777 (yyval.val) = dispatch0(return0); 07778 07779 ;} 07780 break; 07781 07782 case 284: 07783 07784 /* Line 1464 of yacc.c */ 07785 #line 2679 "ripper.y" 07786 { 07787 #if 0 07788 (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); 07789 #endif 07790 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); 07791 07792 ;} 07793 break; 07794 07795 case 285: 07796 07797 /* Line 1464 of yacc.c */ 07798 #line 2687 "ripper.y" 07799 { 07800 #if 0 07801 (yyval.val) = NEW_YIELD(0, Qfalse); 07802 #endif 07803 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); 07804 07805 ;} 07806 break; 07807 07808 case 286: 07809 07810 /* Line 1464 of yacc.c */ 07811 #line 2695 "ripper.y" 07812 { 07813 #if 0 07814 (yyval.val) = NEW_YIELD(0, Qfalse); 07815 #endif 07816 (yyval.val) = dispatch0(yield0); 07817 07818 ;} 07819 break; 07820 07821 case 287: 07822 07823 /* Line 1464 of yacc.c */ 07824 #line 2702 "ripper.y" 07825 {in_defined = 1;;} 07826 break; 07827 07828 case 288: 07829 07830 /* Line 1464 of yacc.c */ 07831 #line 2703 "ripper.y" 07832 { 07833 #if 0 07834 in_defined = 0; 07835 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); 07836 #endif 07837 in_defined = 0; 07838 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); 07839 07840 ;} 07841 break; 07842 07843 case 289: 07844 07845 /* Line 1464 of yacc.c */ 07846 #line 2713 "ripper.y" 07847 { 07848 #if 0 07849 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); 07850 #endif 07851 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); 07852 07853 ;} 07854 break; 07855 07856 case 290: 07857 07858 /* Line 1464 of yacc.c */ 07859 #line 2721 "ripper.y" 07860 { 07861 #if 0 07862 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); 07863 #endif 07864 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); 07865 07866 ;} 07867 break; 07868 07869 case 291: 07870 07871 /* Line 1464 of yacc.c */ 07872 #line 2729 "ripper.y" 07873 { 07874 #if 0 07875 (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0); 07876 (yyval.val) = (yyvsp[(2) - (2)].val); 07877 fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val)); 07878 #endif 07879 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); 07880 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); 07881 07882 ;} 07883 break; 07884 07885 case 293: 07886 07887 /* Line 1464 of yacc.c */ 07888 #line 2741 "ripper.y" 07889 { 07890 #if 0 07891 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 07892 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 07893 (yyval.val) = (yyvsp[(2) - (2)].val); 07894 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 07895 #endif 07896 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07897 07898 ;} 07899 break; 07900 07901 case 294: 07902 07903 /* Line 1464 of yacc.c */ 07904 #line 2752 "ripper.y" 07905 { 07906 (yyval.val) = (yyvsp[(2) - (2)].val); 07907 ;} 07908 break; 07909 07910 case 295: 07911 07912 /* Line 1464 of yacc.c */ 07913 #line 2759 "ripper.y" 07914 { 07915 #if 0 07916 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 07917 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 07918 #endif 07919 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 07920 07921 ;} 07922 break; 07923 07924 case 296: 07925 07926 /* Line 1464 of yacc.c */ 07927 #line 2771 "ripper.y" 07928 { 07929 #if 0 07930 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 07931 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 07932 #endif 07933 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 07934 07935 ;} 07936 break; 07937 07938 case 297: 07939 07940 /* Line 1464 of yacc.c */ 07941 #line 2779 "ripper.y" 07942 {COND_PUSH(1);;} 07943 break; 07944 07945 case 298: 07946 07947 /* Line 1464 of yacc.c */ 07948 #line 2779 "ripper.y" 07949 {COND_POP();;} 07950 break; 07951 07952 case 299: 07953 07954 /* Line 1464 of yacc.c */ 07955 #line 2782 "ripper.y" 07956 { 07957 #if 0 07958 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 07959 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 07960 #endif 07961 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 07962 07963 ;} 07964 break; 07965 07966 case 300: 07967 07968 /* Line 1464 of yacc.c */ 07969 #line 2790 "ripper.y" 07970 {COND_PUSH(1);;} 07971 break; 07972 07973 case 301: 07974 07975 /* Line 1464 of yacc.c */ 07976 #line 2790 "ripper.y" 07977 {COND_POP();;} 07978 break; 07979 07980 case 302: 07981 07982 /* Line 1464 of yacc.c */ 07983 #line 2793 "ripper.y" 07984 { 07985 #if 0 07986 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 07987 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 07988 #endif 07989 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 07990 07991 ;} 07992 break; 07993 07994 case 303: 07995 07996 /* Line 1464 of yacc.c */ 07997 #line 2804 "ripper.y" 07998 { 07999 #if 0 08000 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08001 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08002 #endif 08003 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08004 08005 ;} 08006 break; 08007 08008 case 304: 08009 08010 /* Line 1464 of yacc.c */ 08011 #line 2813 "ripper.y" 08012 { 08013 #if 0 08014 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); 08015 #endif 08016 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); 08017 08018 ;} 08019 break; 08020 08021 case 305: 08022 08023 /* Line 1464 of yacc.c */ 08024 #line 2821 "ripper.y" 08025 {COND_PUSH(1);;} 08026 break; 08027 08028 case 306: 08029 08030 /* Line 1464 of yacc.c */ 08031 #line 2823 "ripper.y" 08032 {COND_POP();;} 08033 break; 08034 08035 case 307: 08036 08037 /* Line 1464 of yacc.c */ 08038 #line 2826 "ripper.y" 08039 { 08040 #if 0 08041 /* 08042 * for a, b, c in e 08043 * #=> 08044 * e.each{|*x| a, b, c = x 08045 * 08046 * for a in e 08047 * #=> 08048 * e.each{|x| a, = x} 08049 */ 08050 ID id = internal_id(); 08051 ID *tbl = ALLOC_N(ID, 2); 08052 NODE *m = NEW_ARGS_AUX(0, 0); 08053 NODE *args, *scope; 08054 08055 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { 08056 /* if args.length == 1 && args[0].kind_of?(Array) 08057 * args = args[0] 08058 * end 08059 */ 08060 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 08061 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 08062 m->nd_next = block_append( 08063 NEW_IF( 08064 NEW_NODE(NODE_AND, 08065 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), 08066 rb_intern("=="), one), 08067 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), 08068 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 08069 0), 08070 NEW_DASGN_CURR(id, 08071 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), 08072 0), 08073 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); 08074 08075 args = new_args(m, 0, id, 0, 0); 08076 } 08077 else { 08078 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || 08079 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || 08080 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { 08081 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); 08082 m->nd_plen = 1; 08083 m->nd_next = (yyvsp[(2) - (9)].val); 08084 args = new_args(m, 0, 0, 0, 0); 08085 } 08086 else { 08087 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); 08088 args = new_args(m, 0, id, 0, 0); 08089 } 08090 } 08091 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); 08092 tbl[0] = 1; tbl[1] = id; 08093 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); 08094 fixpos((yyval.val), (yyvsp[(2) - (9)].val)); 08095 #endif 08096 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); 08097 08098 ;} 08099 break; 08100 08101 case 308: 08102 08103 /* Line 1464 of yacc.c */ 08104 #line 2887 "ripper.y" 08105 { 08106 if (in_def || in_single) 08107 yyerror("class definition in method body"); 08108 local_push(0); 08109 #if 0 08110 (yyval.num) = ruby_sourceline; 08111 #endif 08112 08113 ;} 08114 break; 08115 08116 case 309: 08117 08118 /* Line 1464 of yacc.c */ 08119 #line 2898 "ripper.y" 08120 { 08121 #if 0 08122 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); 08123 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); 08124 #endif 08125 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 08126 08127 local_pop(); 08128 ;} 08129 break; 08130 08131 case 310: 08132 08133 /* Line 1464 of yacc.c */ 08134 #line 2908 "ripper.y" 08135 { 08136 (yyval.num) = in_def; 08137 in_def = 0; 08138 ;} 08139 break; 08140 08141 case 311: 08142 08143 /* Line 1464 of yacc.c */ 08144 #line 2913 "ripper.y" 08145 { 08146 (yyval.num) = in_single; 08147 in_single = 0; 08148 local_push(0); 08149 ;} 08150 break; 08151 08152 case 312: 08153 08154 /* Line 1464 of yacc.c */ 08155 #line 2920 "ripper.y" 08156 { 08157 #if 0 08158 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08159 fixpos((yyval.val), (yyvsp[(3) - (8)].val)); 08160 #endif 08161 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08162 08163 local_pop(); 08164 in_def = (yyvsp[(4) - (8)].num); 08165 in_single = (yyvsp[(6) - (8)].num); 08166 ;} 08167 break; 08168 08169 case 313: 08170 08171 /* Line 1464 of yacc.c */ 08172 #line 2932 "ripper.y" 08173 { 08174 if (in_def || in_single) 08175 yyerror("module definition in method body"); 08176 local_push(0); 08177 #if 0 08178 (yyval.num) = ruby_sourceline; 08179 #endif 08180 08181 ;} 08182 break; 08183 08184 case 314: 08185 08186 /* Line 1464 of yacc.c */ 08187 #line 2943 "ripper.y" 08188 { 08189 #if 0 08190 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08191 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); 08192 #endif 08193 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08194 08195 local_pop(); 08196 ;} 08197 break; 08198 08199 case 315: 08200 08201 /* Line 1464 of yacc.c */ 08202 #line 2953 "ripper.y" 08203 { 08204 (yyval.id) = cur_mid; 08205 cur_mid = (yyvsp[(2) - (2)].val); 08206 in_def++; 08207 local_push(0); 08208 ;} 08209 break; 08210 08211 case 316: 08212 08213 /* Line 1464 of yacc.c */ 08214 #line 2962 "ripper.y" 08215 { 08216 #if 0 08217 NODE *body = remove_begin((yyvsp[(5) - (6)].val)); 08218 reduce_nodes(&body); 08219 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); 08220 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num)); 08221 #endif 08222 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08223 08224 local_pop(); 08225 in_def--; 08226 cur_mid = (yyvsp[(3) - (6)].id); 08227 ;} 08228 break; 08229 08230 case 317: 08231 08232 /* Line 1464 of yacc.c */ 08233 #line 2975 "ripper.y" 08234 {lex_state = EXPR_FNAME;;} 08235 break; 08236 08237 case 318: 08238 08239 /* Line 1464 of yacc.c */ 08240 #line 2976 "ripper.y" 08241 { 08242 in_single++; 08243 lex_state = EXPR_ENDFN; /* force for args */ 08244 local_push(0); 08245 ;} 08246 break; 08247 08248 case 319: 08249 08250 /* Line 1464 of yacc.c */ 08251 #line 2984 "ripper.y" 08252 { 08253 #if 0 08254 NODE *body = remove_begin((yyvsp[(8) - (9)].val)); 08255 reduce_nodes(&body); 08256 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); 08257 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num)); 08258 #endif 08259 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); 08260 08261 local_pop(); 08262 in_single--; 08263 ;} 08264 break; 08265 08266 case 320: 08267 08268 /* Line 1464 of yacc.c */ 08269 #line 2997 "ripper.y" 08270 { 08271 #if 0 08272 (yyval.val) = NEW_BREAK(0); 08273 #endif 08274 (yyval.val) = dispatch1(break, arg_new()); 08275 08276 ;} 08277 break; 08278 08279 case 321: 08280 08281 /* Line 1464 of yacc.c */ 08282 #line 3005 "ripper.y" 08283 { 08284 #if 0 08285 (yyval.val) = NEW_NEXT(0); 08286 #endif 08287 (yyval.val) = dispatch1(next, arg_new()); 08288 08289 ;} 08290 break; 08291 08292 case 322: 08293 08294 /* Line 1464 of yacc.c */ 08295 #line 3013 "ripper.y" 08296 { 08297 #if 0 08298 (yyval.val) = NEW_REDO(); 08299 #endif 08300 (yyval.val) = dispatch0(redo); 08301 08302 ;} 08303 break; 08304 08305 case 323: 08306 08307 /* Line 1464 of yacc.c */ 08308 #line 3021 "ripper.y" 08309 { 08310 #if 0 08311 (yyval.val) = NEW_RETRY(); 08312 #endif 08313 (yyval.val) = dispatch0(retry); 08314 08315 ;} 08316 break; 08317 08318 case 324: 08319 08320 /* Line 1464 of yacc.c */ 08321 #line 3031 "ripper.y" 08322 { 08323 #if 0 08324 value_expr((yyvsp[(1) - (1)].val)); 08325 (yyval.val) = (yyvsp[(1) - (1)].val); 08326 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 08327 #endif 08328 (yyval.val) = (yyvsp[(1) - (1)].val); 08329 08330 ;} 08331 break; 08332 08333 case 325: 08334 08335 /* Line 1464 of yacc.c */ 08336 #line 3043 "ripper.y" 08337 { 08338 token_info_push("begin"); 08339 ;} 08340 break; 08341 08342 case 326: 08343 08344 /* Line 1464 of yacc.c */ 08345 #line 3049 "ripper.y" 08346 { 08347 token_info_push("if"); 08348 ;} 08349 break; 08350 08351 case 327: 08352 08353 /* Line 1464 of yacc.c */ 08354 #line 3055 "ripper.y" 08355 { 08356 token_info_push("unless"); 08357 ;} 08358 break; 08359 08360 case 328: 08361 08362 /* Line 1464 of yacc.c */ 08363 #line 3061 "ripper.y" 08364 { 08365 token_info_push("while"); 08366 ;} 08367 break; 08368 08369 case 329: 08370 08371 /* Line 1464 of yacc.c */ 08372 #line 3067 "ripper.y" 08373 { 08374 token_info_push("until"); 08375 ;} 08376 break; 08377 08378 case 330: 08379 08380 /* Line 1464 of yacc.c */ 08381 #line 3073 "ripper.y" 08382 { 08383 token_info_push("case"); 08384 ;} 08385 break; 08386 08387 case 331: 08388 08389 /* Line 1464 of yacc.c */ 08390 #line 3079 "ripper.y" 08391 { 08392 token_info_push("for"); 08393 ;} 08394 break; 08395 08396 case 332: 08397 08398 /* Line 1464 of yacc.c */ 08399 #line 3085 "ripper.y" 08400 { 08401 token_info_push("class"); 08402 ;} 08403 break; 08404 08405 case 333: 08406 08407 /* Line 1464 of yacc.c */ 08408 #line 3091 "ripper.y" 08409 { 08410 token_info_push("module"); 08411 ;} 08412 break; 08413 08414 case 334: 08415 08416 /* Line 1464 of yacc.c */ 08417 #line 3097 "ripper.y" 08418 { 08419 token_info_push("def"); 08420 #if 0 08421 (yyval.num) = ruby_sourceline; 08422 #endif 08423 08424 ;} 08425 break; 08426 08427 case 335: 08428 08429 /* Line 1464 of yacc.c */ 08430 #line 3107 "ripper.y" 08431 { 08432 token_info_pop("end"); 08433 ;} 08434 break; 08435 08436 case 336: 08437 08438 /* Line 1464 of yacc.c */ 08439 #line 3115 "ripper.y" 08440 { (yyval.val) = Qnil; ;} 08441 break; 08442 08443 case 338: 08444 08445 /* Line 1464 of yacc.c */ 08446 #line 3121 "ripper.y" 08447 { (yyval.val) = (yyvsp[(2) - (2)].val); ;} 08448 break; 08449 08450 case 339: 08451 08452 /* Line 1464 of yacc.c */ 08453 #line 3128 "ripper.y" 08454 { (yyval.val) = Qnil; ;} 08455 break; 08456 08457 case 342: 08458 08459 /* Line 1464 of yacc.c */ 08460 #line 3137 "ripper.y" 08461 { 08462 #if 0 08463 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 08464 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08465 #endif 08466 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 08467 08468 ;} 08469 break; 08470 08471 case 344: 08472 08473 /* Line 1464 of yacc.c */ 08474 #line 3149 "ripper.y" 08475 { 08476 #if 0 08477 (yyval.val) = (yyvsp[(2) - (2)].val); 08478 #endif 08479 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); 08480 08481 ;} 08482 break; 08483 08484 case 347: 08485 08486 /* Line 1464 of yacc.c */ 08487 #line 3163 "ripper.y" 08488 { 08489 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 08490 #if 0 08491 #endif 08492 (yyval.val) = dispatch1(mlhs_paren, (yyval.val)); 08493 08494 ;} 08495 break; 08496 08497 case 348: 08498 08499 /* Line 1464 of yacc.c */ 08500 #line 3171 "ripper.y" 08501 { 08502 #if 0 08503 (yyval.val) = (yyvsp[(2) - (3)].val); 08504 #endif 08505 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 08506 08507 ;} 08508 break; 08509 08510 case 349: 08511 08512 /* Line 1464 of yacc.c */ 08513 #line 3181 "ripper.y" 08514 { 08515 #if 0 08516 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 08517 #endif 08518 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 08519 08520 ;} 08521 break; 08522 08523 case 350: 08524 08525 /* Line 1464 of yacc.c */ 08526 #line 3189 "ripper.y" 08527 { 08528 #if 0 08529 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08530 #endif 08531 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08532 08533 ;} 08534 break; 08535 08536 case 351: 08537 08538 /* Line 1464 of yacc.c */ 08539 #line 3199 "ripper.y" 08540 { 08541 #if 0 08542 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 08543 #endif 08544 (yyval.val) = (yyvsp[(1) - (1)].val); 08545 08546 ;} 08547 break; 08548 08549 case 352: 08550 08551 /* Line 1464 of yacc.c */ 08552 #line 3207 "ripper.y" 08553 { 08554 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0); 08555 #if 0 08556 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val)); 08557 #endif 08558 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val)); 08559 08560 ;} 08561 break; 08562 08563 case 353: 08564 08565 /* Line 1464 of yacc.c */ 08566 #line 3216 "ripper.y" 08567 { 08568 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0); 08569 #if 0 08570 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val))); 08571 #endif 08572 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val)); 08573 08574 ;} 08575 break; 08576 08577 case 354: 08578 08579 /* Line 1464 of yacc.c */ 08580 #line 3225 "ripper.y" 08581 { 08582 #if 0 08583 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); 08584 #endif 08585 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); 08586 08587 ;} 08588 break; 08589 08590 case 355: 08591 08592 /* Line 1464 of yacc.c */ 08593 #line 3233 "ripper.y" 08594 { 08595 #if 0 08596 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); 08597 #endif 08598 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 08599 08600 ;} 08601 break; 08602 08603 case 356: 08604 08605 /* Line 1464 of yacc.c */ 08606 #line 3241 "ripper.y" 08607 { 08608 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0); 08609 #if 0 08610 (yyval.val) = NEW_MASGN(0, (yyval.val)); 08611 #endif 08612 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val)); 08613 08614 ;} 08615 break; 08616 08617 case 357: 08618 08619 /* Line 1464 of yacc.c */ 08620 #line 3250 "ripper.y" 08621 { 08622 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0); 08623 #if 0 08624 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val))); 08625 #endif 08626 #if 0 08627 TODO: Check me 08628 #endif 08629 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val)); 08630 08631 ;} 08632 break; 08633 08634 case 358: 08635 08636 /* Line 1464 of yacc.c */ 08637 #line 3262 "ripper.y" 08638 { 08639 #if 0 08640 (yyval.val) = NEW_MASGN(0, -1); 08641 #endif 08642 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08643 08644 ;} 08645 break; 08646 08647 case 359: 08648 08649 /* Line 1464 of yacc.c */ 08650 #line 3270 "ripper.y" 08651 { 08652 #if 0 08653 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 08654 #endif 08655 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08656 08657 ;} 08658 break; 08659 08660 case 360: 08661 08662 /* Line 1464 of yacc.c */ 08663 #line 3280 "ripper.y" 08664 { 08665 #if 0 08666 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); 08667 #endif 08668 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); 08669 08670 ;} 08671 break; 08672 08673 case 361: 08674 08675 /* Line 1464 of yacc.c */ 08676 #line 3288 "ripper.y" 08677 { 08678 #if 0 08679 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 08680 #endif 08681 (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))); 08682 08683 ;} 08684 break; 08685 08686 case 362: 08687 08688 /* Line 1464 of yacc.c */ 08689 #line 3296 "ripper.y" 08690 { 08691 #if 0 08692 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); 08693 #endif 08694 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08695 08696 ;} 08697 break; 08698 08699 case 363: 08700 08701 /* Line 1464 of yacc.c */ 08702 #line 3304 "ripper.y" 08703 { 08704 #if 0 08705 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08706 #endif 08707 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08708 08709 ;} 08710 break; 08711 08712 case 364: 08713 08714 /* Line 1464 of yacc.c */ 08715 #line 3312 "ripper.y" 08716 { 08717 #if 0 08718 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 08719 #endif 08720 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08721 08722 ;} 08723 break; 08724 08725 case 365: 08726 08727 /* Line 1464 of yacc.c */ 08728 #line 3320 "ripper.y" 08729 { 08730 #if 0 08731 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0); 08732 #endif 08733 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil); 08734 dispatch1(excessed_comma, (yyval.val)); 08735 08736 ;} 08737 break; 08738 08739 case 366: 08740 08741 /* Line 1464 of yacc.c */ 08742 #line 3329 "ripper.y" 08743 { 08744 #if 0 08745 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08746 #endif 08747 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08748 08749 ;} 08750 break; 08751 08752 case 367: 08753 08754 /* Line 1464 of yacc.c */ 08755 #line 3337 "ripper.y" 08756 { 08757 #if 0 08758 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); 08759 #endif 08760 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); 08761 08762 ;} 08763 break; 08764 08765 case 368: 08766 08767 /* Line 1464 of yacc.c */ 08768 #line 3345 "ripper.y" 08769 { 08770 #if 0 08771 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 08772 #endif 08773 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08774 08775 ;} 08776 break; 08777 08778 case 369: 08779 08780 /* Line 1464 of yacc.c */ 08781 #line 3353 "ripper.y" 08782 { 08783 #if 0 08784 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08785 #endif 08786 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08787 08788 ;} 08789 break; 08790 08791 case 370: 08792 08793 /* Line 1464 of yacc.c */ 08794 #line 3361 "ripper.y" 08795 { 08796 #if 0 08797 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); 08798 #endif 08799 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 08800 08801 ;} 08802 break; 08803 08804 case 371: 08805 08806 /* Line 1464 of yacc.c */ 08807 #line 3369 "ripper.y" 08808 { 08809 #if 0 08810 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08811 #endif 08812 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 08813 08814 ;} 08815 break; 08816 08817 case 372: 08818 08819 /* Line 1464 of yacc.c */ 08820 #line 3377 "ripper.y" 08821 { 08822 #if 0 08823 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); 08824 #endif 08825 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); 08826 08827 ;} 08828 break; 08829 08830 case 373: 08831 08832 /* Line 1464 of yacc.c */ 08833 #line 3385 "ripper.y" 08834 { 08835 #if 0 08836 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08837 #endif 08838 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 08839 08840 ;} 08841 break; 08842 08843 case 374: 08844 08845 /* Line 1464 of yacc.c */ 08846 #line 3393 "ripper.y" 08847 { 08848 #if 0 08849 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); 08850 #endif 08851 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); 08852 08853 ;} 08854 break; 08855 08856 case 376: 08857 08858 /* Line 1464 of yacc.c */ 08859 #line 3404 "ripper.y" 08860 { 08861 command_start = TRUE; 08862 ;} 08863 break; 08864 08865 case 377: 08866 08867 /* Line 1464 of yacc.c */ 08868 #line 3410 "ripper.y" 08869 { 08870 #if 0 08871 (yyval.val) = 0; 08872 #endif 08873 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08874 escape_Qundef((yyvsp[(2) - (3)].val))); 08875 08876 ;} 08877 break; 08878 08879 case 378: 08880 08881 /* Line 1464 of yacc.c */ 08882 #line 3419 "ripper.y" 08883 { 08884 #if 0 08885 (yyval.val) = 0; 08886 #endif 08887 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08888 Qnil); 08889 08890 ;} 08891 break; 08892 08893 case 379: 08894 08895 /* Line 1464 of yacc.c */ 08896 #line 3428 "ripper.y" 08897 { 08898 #if 0 08899 (yyval.val) = (yyvsp[(2) - (4)].val); 08900 #endif 08901 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); 08902 08903 ;} 08904 break; 08905 08906 case 381: 08907 08908 /* Line 1464 of yacc.c */ 08909 #line 3440 "ripper.y" 08910 { 08911 #if 0 08912 (yyval.val) = 0; 08913 #endif 08914 (yyval.val) = (yyvsp[(2) - (2)].val); 08915 08916 ;} 08917 break; 08918 08919 case 382: 08920 08921 /* Line 1464 of yacc.c */ 08922 #line 3452 "ripper.y" 08923 { 08924 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 08925 ;} 08926 break; 08927 08928 case 383: 08929 08930 /* Line 1464 of yacc.c */ 08931 #line 3459 "ripper.y" 08932 { 08933 rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val)); 08934 ;} 08935 break; 08936 08937 case 384: 08938 08939 /* Line 1464 of yacc.c */ 08940 #line 3466 "ripper.y" 08941 { 08942 new_bv(get_id((yyvsp[(1) - (1)].val))); 08943 #if 0 08944 #endif 08945 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 08946 08947 ;} 08948 break; 08949 08950 case 385: 08951 08952 /* Line 1464 of yacc.c */ 08953 #line 3474 "ripper.y" 08954 { 08955 (yyval.val) = 0; 08956 ;} 08957 break; 08958 08959 case 386: 08960 08961 /* Line 1464 of yacc.c */ 08962 #line 3479 "ripper.y" 08963 { 08964 (yyval.vars) = dyna_push(); 08965 ;} 08966 break; 08967 08968 case 387: 08969 08970 /* Line 1464 of yacc.c */ 08971 #line 3482 "ripper.y" 08972 { 08973 (yyval.num) = lpar_beg; 08974 lpar_beg = ++paren_nest; 08975 ;} 08976 break; 08977 08978 case 388: 08979 08980 /* Line 1464 of yacc.c */ 08981 #line 3488 "ripper.y" 08982 { 08983 lpar_beg = (yyvsp[(2) - (4)].num); 08984 #if 0 08985 (yyval.val) = (yyvsp[(3) - (4)].val); 08986 (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].val)->nd_head, (yyvsp[(4) - (4)].val)); 08987 #endif 08988 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08989 08990 dyna_pop((yyvsp[(1) - (4)].vars)); 08991 ;} 08992 break; 08993 08994 case 389: 08995 08996 /* Line 1464 of yacc.c */ 08997 #line 3501 "ripper.y" 08998 { 08999 #if 0 09000 (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val)); 09001 #endif 09002 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 09003 09004 ;} 09005 break; 09006 09007 case 390: 09008 09009 /* Line 1464 of yacc.c */ 09010 #line 3509 "ripper.y" 09011 { 09012 #if 0 09013 (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val)); 09014 #endif 09015 (yyval.val) = (yyvsp[(1) - (1)].val); 09016 09017 ;} 09018 break; 09019 09020 case 391: 09021 09022 /* Line 1464 of yacc.c */ 09023 #line 3519 "ripper.y" 09024 { 09025 (yyval.val) = (yyvsp[(2) - (3)].val); 09026 ;} 09027 break; 09028 09029 case 392: 09030 09031 /* Line 1464 of yacc.c */ 09032 #line 3523 "ripper.y" 09033 { 09034 (yyval.val) = (yyvsp[(2) - (3)].val); 09035 ;} 09036 break; 09037 09038 case 393: 09039 09040 /* Line 1464 of yacc.c */ 09041 #line 3529 "ripper.y" 09042 { 09043 (yyvsp[(1) - (1)].vars) = dyna_push(); 09044 #if 0 09045 (yyval.num) = ruby_sourceline; 09046 #endif 09047 ;} 09048 break; 09049 09050 case 394: 09051 09052 /* Line 1464 of yacc.c */ 09053 #line 3538 "ripper.y" 09054 { 09055 #if 0 09056 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09057 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09058 #endif 09059 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09060 09061 dyna_pop((yyvsp[(1) - (5)].vars)); 09062 ;} 09063 break; 09064 09065 case 395: 09066 09067 /* Line 1464 of yacc.c */ 09068 #line 3550 "ripper.y" 09069 { 09070 #if 0 09071 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { 09072 compile_error(PARSER_ARG "block given to yield"); 09073 } 09074 else { 09075 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 09076 } 09077 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 09078 (yyval.val) = (yyvsp[(2) - (2)].val); 09079 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 09080 #endif 09081 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09082 09083 ;} 09084 break; 09085 09086 case 396: 09087 09088 /* Line 1464 of yacc.c */ 09089 #line 3566 "ripper.y" 09090 { 09091 #if 0 09092 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09093 #endif 09094 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 09095 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09096 09097 ;} 09098 break; 09099 09100 case 397: 09101 09102 /* Line 1464 of yacc.c */ 09103 #line 3575 "ripper.y" 09104 { 09105 #if 0 09106 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09107 #endif 09108 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); 09109 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09110 09111 ;} 09112 break; 09113 09114 case 398: 09115 09116 /* Line 1464 of yacc.c */ 09117 #line 3586 "ripper.y" 09118 { 09119 #if 0 09120 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09121 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 09122 #endif 09123 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); 09124 09125 ;} 09126 break; 09127 09128 case 399: 09129 09130 /* Line 1464 of yacc.c */ 09131 #line 3595 "ripper.y" 09132 { 09133 #if 0 09134 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09135 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09136 #endif 09137 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 09138 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09139 09140 ;} 09141 break; 09142 09143 case 400: 09144 09145 /* Line 1464 of yacc.c */ 09146 #line 3605 "ripper.y" 09147 { 09148 #if 0 09149 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09150 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09151 #endif 09152 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 09153 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09154 09155 ;} 09156 break; 09157 09158 case 401: 09159 09160 /* Line 1464 of yacc.c */ 09161 #line 3615 "ripper.y" 09162 { 09163 #if 0 09164 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); 09165 #endif 09166 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 09167 09168 ;} 09169 break; 09170 09171 case 402: 09172 09173 /* Line 1464 of yacc.c */ 09174 #line 3623 "ripper.y" 09175 { 09176 #if 0 09177 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); 09178 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 09179 #endif 09180 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), 09181 ripper_intern("call")); 09182 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); 09183 09184 ;} 09185 break; 09186 09187 case 403: 09188 09189 /* Line 1464 of yacc.c */ 09190 #line 3634 "ripper.y" 09191 { 09192 #if 0 09193 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); 09194 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 09195 #endif 09196 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), 09197 ripper_intern("call")); 09198 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); 09199 09200 ;} 09201 break; 09202 09203 case 404: 09204 09205 /* Line 1464 of yacc.c */ 09206 #line 3645 "ripper.y" 09207 { 09208 #if 0 09209 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 09210 #endif 09211 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 09212 09213 ;} 09214 break; 09215 09216 case 405: 09217 09218 /* Line 1464 of yacc.c */ 09219 #line 3653 "ripper.y" 09220 { 09221 #if 0 09222 (yyval.val) = NEW_ZSUPER(); 09223 #endif 09224 (yyval.val) = dispatch0(zsuper); 09225 09226 ;} 09227 break; 09228 09229 case 406: 09230 09231 /* Line 1464 of yacc.c */ 09232 #line 3661 "ripper.y" 09233 { 09234 #if 0 09235 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) 09236 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); 09237 else 09238 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); 09239 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09240 #endif 09241 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 09242 09243 ;} 09244 break; 09245 09246 case 407: 09247 09248 /* Line 1464 of yacc.c */ 09249 #line 3675 "ripper.y" 09250 { 09251 (yyvsp[(1) - (1)].vars) = dyna_push(); 09252 #if 0 09253 (yyval.num) = ruby_sourceline; 09254 #endif 09255 09256 ;} 09257 break; 09258 09259 case 408: 09260 09261 /* Line 1464 of yacc.c */ 09262 #line 3684 "ripper.y" 09263 { 09264 #if 0 09265 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09266 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09267 #endif 09268 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09269 09270 dyna_pop((yyvsp[(1) - (5)].vars)); 09271 ;} 09272 break; 09273 09274 case 409: 09275 09276 /* Line 1464 of yacc.c */ 09277 #line 3694 "ripper.y" 09278 { 09279 (yyvsp[(1) - (1)].vars) = dyna_push(); 09280 #if 0 09281 (yyval.num) = ruby_sourceline; 09282 #endif 09283 09284 ;} 09285 break; 09286 09287 case 410: 09288 09289 /* Line 1464 of yacc.c */ 09290 #line 3703 "ripper.y" 09291 { 09292 #if 0 09293 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09294 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09295 #endif 09296 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09297 09298 dyna_pop((yyvsp[(1) - (5)].vars)); 09299 ;} 09300 break; 09301 09302 case 411: 09303 09304 /* Line 1464 of yacc.c */ 09305 #line 3717 "ripper.y" 09306 { 09307 #if 0 09308 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09309 #endif 09310 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 09311 09312 ;} 09313 break; 09314 09315 case 414: 09316 09317 /* Line 1464 of yacc.c */ 09318 #line 3733 "ripper.y" 09319 { 09320 #if 0 09321 if ((yyvsp[(3) - (6)].val)) { 09322 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); 09323 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 09324 } 09325 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09326 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); 09327 #endif 09328 (yyval.val) = dispatch4(rescue, 09329 escape_Qundef((yyvsp[(2) - (6)].val)), 09330 escape_Qundef((yyvsp[(3) - (6)].val)), 09331 escape_Qundef((yyvsp[(5) - (6)].val)), 09332 escape_Qundef((yyvsp[(6) - (6)].val))); 09333 09334 ;} 09335 break; 09336 09337 case 416: 09338 09339 /* Line 1464 of yacc.c */ 09340 #line 3753 "ripper.y" 09341 { 09342 #if 0 09343 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 09344 #endif 09345 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09346 09347 ;} 09348 break; 09349 09350 case 417: 09351 09352 /* Line 1464 of yacc.c */ 09353 #line 3761 "ripper.y" 09354 { 09355 #if 0 09356 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); 09357 #endif 09358 (yyval.val) = (yyvsp[(1) - (1)].val); 09359 09360 ;} 09361 break; 09362 09363 case 419: 09364 09365 /* Line 1464 of yacc.c */ 09366 #line 3772 "ripper.y" 09367 { 09368 (yyval.val) = (yyvsp[(2) - (2)].val); 09369 ;} 09370 break; 09371 09372 case 421: 09373 09374 /* Line 1464 of yacc.c */ 09375 #line 3779 "ripper.y" 09376 { 09377 #if 0 09378 (yyval.val) = (yyvsp[(2) - (2)].val); 09379 #endif 09380 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); 09381 09382 ;} 09383 break; 09384 09385 case 424: 09386 09387 /* Line 1464 of yacc.c */ 09388 #line 3791 "ripper.y" 09389 { 09390 #if 0 09391 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 09392 #endif 09393 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 09394 09395 ;} 09396 break; 09397 09398 case 426: 09399 09400 /* Line 1464 of yacc.c */ 09401 #line 3802 "ripper.y" 09402 { 09403 #if 0 09404 NODE *node = (yyvsp[(1) - (1)].val); 09405 if (!node) { 09406 node = NEW_STR(STR_NEW0()); 09407 } 09408 else { 09409 node = evstr2dstr(node); 09410 } 09411 (yyval.val) = node; 09412 #endif 09413 (yyval.val) = (yyvsp[(1) - (1)].val); 09414 09415 ;} 09416 break; 09417 09418 case 429: 09419 09420 /* Line 1464 of yacc.c */ 09421 #line 3821 "ripper.y" 09422 { 09423 #if 0 09424 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09425 #endif 09426 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09427 09428 ;} 09429 break; 09430 09431 case 430: 09432 09433 /* Line 1464 of yacc.c */ 09434 #line 3831 "ripper.y" 09435 { 09436 #if 0 09437 (yyval.val) = (yyvsp[(2) - (3)].val); 09438 #endif 09439 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); 09440 09441 ;} 09442 break; 09443 09444 case 431: 09445 09446 /* Line 1464 of yacc.c */ 09447 #line 3841 "ripper.y" 09448 { 09449 #if 0 09450 NODE *node = (yyvsp[(2) - (3)].val); 09451 if (!node) { 09452 node = NEW_XSTR(STR_NEW0()); 09453 } 09454 else { 09455 switch (nd_type(node)) { 09456 case NODE_STR: 09457 nd_set_type(node, NODE_XSTR); 09458 break; 09459 case NODE_DSTR: 09460 nd_set_type(node, NODE_DXSTR); 09461 break; 09462 default: 09463 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09464 break; 09465 } 09466 } 09467 (yyval.val) = node; 09468 #endif 09469 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); 09470 09471 ;} 09472 break; 09473 09474 case 432: 09475 09476 /* Line 1464 of yacc.c */ 09477 #line 3868 "ripper.y" 09478 { 09479 #if 0 09480 int options = (yyvsp[(3) - (3)].val); 09481 NODE *node = (yyvsp[(2) - (3)].val); 09482 NODE *list, *prev; 09483 if (!node) { 09484 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09485 } 09486 else switch (nd_type(node)) { 09487 case NODE_STR: 09488 { 09489 VALUE src = node->nd_lit; 09490 nd_set_type(node, NODE_LIT); 09491 node->nd_lit = reg_compile(src, options); 09492 } 09493 break; 09494 default: 09495 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09496 case NODE_DSTR: 09497 if (options & RE_OPTION_ONCE) { 09498 nd_set_type(node, NODE_DREGX_ONCE); 09499 } 09500 else { 09501 nd_set_type(node, NODE_DREGX); 09502 } 09503 node->nd_cflag = options & RE_OPTION_MASK; 09504 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09505 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09506 if (nd_type(list->nd_head) == NODE_STR) { 09507 VALUE tail = list->nd_head->nd_lit; 09508 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09509 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09510 if (!literal_concat0(parser, lit, tail)) { 09511 node = 0; 09512 break; 09513 } 09514 rb_str_resize(tail, 0); 09515 prev->nd_next = list->nd_next; 09516 rb_gc_force_recycle((VALUE)list->nd_head); 09517 rb_gc_force_recycle((VALUE)list); 09518 list = prev; 09519 } 09520 else { 09521 prev = list; 09522 } 09523 } 09524 else { 09525 prev = 0; 09526 } 09527 } 09528 if (!node->nd_next) { 09529 VALUE src = node->nd_lit; 09530 nd_set_type(node, NODE_LIT); 09531 node->nd_lit = reg_compile(src, options); 09532 } 09533 break; 09534 } 09535 (yyval.val) = node; 09536 #endif 09537 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 09538 09539 ;} 09540 break; 09541 09542 case 433: 09543 09544 /* Line 1464 of yacc.c */ 09545 #line 3933 "ripper.y" 09546 { 09547 #if 0 09548 (yyval.val) = NEW_ZARRAY(); 09549 #endif 09550 (yyval.val) = dispatch0(words_new); 09551 09552 ;} 09553 break; 09554 09555 case 434: 09556 09557 /* Line 1464 of yacc.c */ 09558 #line 3941 "ripper.y" 09559 { 09560 (yyval.val) = (yyvsp[(2) - (3)].val); 09561 ;} 09562 break; 09563 09564 case 435: 09565 09566 /* Line 1464 of yacc.c */ 09567 #line 3947 "ripper.y" 09568 { 09569 #if 0 09570 (yyval.val) = 0; 09571 #endif 09572 (yyval.val) = dispatch0(words_new); 09573 09574 ;} 09575 break; 09576 09577 case 436: 09578 09579 /* Line 1464 of yacc.c */ 09580 #line 3955 "ripper.y" 09581 { 09582 #if 0 09583 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); 09584 #endif 09585 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09586 09587 ;} 09588 break; 09589 09590 case 437: 09591 09592 /* Line 1464 of yacc.c */ 09593 #line 3967 "ripper.y" 09594 { 09595 (yyval.val) = dispatch0(word_new); 09596 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); 09597 ;} 09598 break; 09599 09600 case 438: 09601 09602 /* Line 1464 of yacc.c */ 09603 #line 3973 "ripper.y" 09604 { 09605 #if 0 09606 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09607 #endif 09608 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09609 09610 ;} 09611 break; 09612 09613 case 439: 09614 09615 /* Line 1464 of yacc.c */ 09616 #line 3983 "ripper.y" 09617 { 09618 #if 0 09619 (yyval.val) = NEW_ZARRAY(); 09620 #endif 09621 (yyval.val) = dispatch0(qwords_new); 09622 09623 ;} 09624 break; 09625 09626 case 440: 09627 09628 /* Line 1464 of yacc.c */ 09629 #line 3991 "ripper.y" 09630 { 09631 (yyval.val) = (yyvsp[(2) - (3)].val); 09632 ;} 09633 break; 09634 09635 case 441: 09636 09637 /* Line 1464 of yacc.c */ 09638 #line 3997 "ripper.y" 09639 { 09640 #if 0 09641 (yyval.val) = 0; 09642 #endif 09643 (yyval.val) = dispatch0(qwords_new); 09644 09645 ;} 09646 break; 09647 09648 case 442: 09649 09650 /* Line 1464 of yacc.c */ 09651 #line 4005 "ripper.y" 09652 { 09653 #if 0 09654 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09655 #endif 09656 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09657 09658 ;} 09659 break; 09660 09661 case 443: 09662 09663 /* Line 1464 of yacc.c */ 09664 #line 4015 "ripper.y" 09665 { 09666 #if 0 09667 (yyval.val) = 0; 09668 #endif 09669 (yyval.val) = dispatch0(string_content); 09670 09671 ;} 09672 break; 09673 09674 case 444: 09675 09676 /* Line 1464 of yacc.c */ 09677 #line 4023 "ripper.y" 09678 { 09679 #if 0 09680 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09681 #endif 09682 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09683 09684 ;} 09685 break; 09686 09687 case 445: 09688 09689 /* Line 1464 of yacc.c */ 09690 #line 4033 "ripper.y" 09691 { 09692 #if 0 09693 (yyval.val) = 0; 09694 #endif 09695 (yyval.val) = dispatch0(xstring_new); 09696 09697 ;} 09698 break; 09699 09700 case 446: 09701 09702 /* Line 1464 of yacc.c */ 09703 #line 4041 "ripper.y" 09704 { 09705 #if 0 09706 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09707 #endif 09708 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09709 09710 ;} 09711 break; 09712 09713 case 447: 09714 09715 /* Line 1464 of yacc.c */ 09716 #line 4051 "ripper.y" 09717 { 09718 #if 0 09719 (yyval.val) = 0; 09720 #endif 09721 (yyval.val) = dispatch0(regexp_new); 09722 09723 ;} 09724 break; 09725 09726 case 448: 09727 09728 /* Line 1464 of yacc.c */ 09729 #line 4059 "ripper.y" 09730 { 09731 #if 0 09732 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val); 09733 if (!head) { 09734 (yyval.val) = tail; 09735 } 09736 else if (!tail) { 09737 (yyval.val) = head; 09738 } 09739 else { 09740 switch (nd_type(head)) { 09741 case NODE_STR: 09742 nd_set_type(head, NODE_DSTR); 09743 break; 09744 case NODE_DSTR: 09745 break; 09746 default: 09747 head = list_append(NEW_DSTR(Qnil), head); 09748 break; 09749 } 09750 (yyval.val) = list_append(head, tail); 09751 } 09752 #endif 09753 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09754 09755 ;} 09756 break; 09757 09758 case 450: 09759 09760 /* Line 1464 of yacc.c */ 09761 #line 4089 "ripper.y" 09762 { 09763 (yyval.node) = lex_strterm; 09764 lex_strterm = 0; 09765 lex_state = EXPR_BEG; 09766 ;} 09767 break; 09768 09769 case 451: 09770 09771 /* Line 1464 of yacc.c */ 09772 #line 4095 "ripper.y" 09773 { 09774 #if 0 09775 lex_strterm = (yyvsp[(2) - (3)].node); 09776 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); 09777 #endif 09778 lex_strterm = (yyvsp[(2) - (3)].node); 09779 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); 09780 09781 ;} 09782 break; 09783 09784 case 452: 09785 09786 /* Line 1464 of yacc.c */ 09787 #line 4105 "ripper.y" 09788 { 09789 (yyvsp[(1) - (1)].val) = cond_stack; 09790 (yyval.val) = cmdarg_stack; 09791 cond_stack = 0; 09792 cmdarg_stack = 0; 09793 ;} 09794 break; 09795 09796 case 453: 09797 09798 /* Line 1464 of yacc.c */ 09799 #line 4111 "ripper.y" 09800 { 09801 (yyval.node) = lex_strterm; 09802 lex_strterm = 0; 09803 lex_state = EXPR_BEG; 09804 ;} 09805 break; 09806 09807 case 454: 09808 09809 /* Line 1464 of yacc.c */ 09810 #line 4117 "ripper.y" 09811 { 09812 cond_stack = (yyvsp[(1) - (5)].val); 09813 cmdarg_stack = (yyvsp[(2) - (5)].val); 09814 lex_strterm = (yyvsp[(3) - (5)].node); 09815 #if 0 09816 if ((yyvsp[(4) - (5)].val)) (yyvsp[(4) - (5)].val)->flags &= ~NODE_FL_NEWLINE; 09817 (yyval.val) = new_evstr((yyvsp[(4) - (5)].val)); 09818 #endif 09819 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(4) - (5)].val)); 09820 09821 ;} 09822 break; 09823 09824 case 455: 09825 09826 /* Line 1464 of yacc.c */ 09827 #line 4131 "ripper.y" 09828 { 09829 #if 0 09830 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); 09831 #endif 09832 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09833 09834 ;} 09835 break; 09836 09837 case 456: 09838 09839 /* Line 1464 of yacc.c */ 09840 #line 4139 "ripper.y" 09841 { 09842 #if 0 09843 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); 09844 #endif 09845 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09846 09847 ;} 09848 break; 09849 09850 case 457: 09851 09852 /* Line 1464 of yacc.c */ 09853 #line 4147 "ripper.y" 09854 { 09855 #if 0 09856 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); 09857 #endif 09858 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09859 09860 ;} 09861 break; 09862 09863 case 459: 09864 09865 /* Line 1464 of yacc.c */ 09866 #line 4158 "ripper.y" 09867 { 09868 lex_state = EXPR_END; 09869 #if 0 09870 (yyval.val) = (yyvsp[(2) - (2)].val); 09871 #endif 09872 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); 09873 09874 ;} 09875 break; 09876 09877 case 464: 09878 09879 /* Line 1464 of yacc.c */ 09880 #line 4175 "ripper.y" 09881 { 09882 lex_state = EXPR_END; 09883 #if 0 09884 if (!((yyval.val) = (yyvsp[(2) - (3)].val))) { 09885 (yyval.val) = NEW_LIT(ID2SYM(rb_intern(""))); 09886 } 09887 else { 09888 VALUE lit; 09889 09890 switch (nd_type((yyval.val))) { 09891 case NODE_DSTR: 09892 nd_set_type((yyval.val), NODE_DSYM); 09893 break; 09894 case NODE_STR: 09895 lit = (yyval.val)->nd_lit; 09896 (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit)); 09897 nd_set_type((yyval.val), NODE_LIT); 09898 break; 09899 default: 09900 (yyval.val) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.val))); 09901 break; 09902 } 09903 } 09904 #endif 09905 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); 09906 09907 ;} 09908 break; 09909 09910 case 467: 09911 09912 /* Line 1464 of yacc.c */ 09913 #line 4207 "ripper.y" 09914 { 09915 #if 0 09916 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 09917 #endif 09918 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 09919 09920 ;} 09921 break; 09922 09923 case 468: 09924 09925 /* Line 1464 of yacc.c */ 09926 #line 4215 "ripper.y" 09927 { 09928 #if 0 09929 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 09930 #endif 09931 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 09932 09933 ;} 09934 break; 09935 09936 case 474: 09937 09938 /* Line 1464 of yacc.c */ 09939 #line 4229 "ripper.y" 09940 {ifndef_ripper((yyval.val) = keyword_nil);;} 09941 break; 09942 09943 case 475: 09944 09945 /* Line 1464 of yacc.c */ 09946 #line 4230 "ripper.y" 09947 {ifndef_ripper((yyval.val) = keyword_self);;} 09948 break; 09949 09950 case 476: 09951 09952 /* Line 1464 of yacc.c */ 09953 #line 4231 "ripper.y" 09954 {ifndef_ripper((yyval.val) = keyword_true);;} 09955 break; 09956 09957 case 477: 09958 09959 /* Line 1464 of yacc.c */ 09960 #line 4232 "ripper.y" 09961 {ifndef_ripper((yyval.val) = keyword_false);;} 09962 break; 09963 09964 case 478: 09965 09966 /* Line 1464 of yacc.c */ 09967 #line 4233 "ripper.y" 09968 {ifndef_ripper((yyval.val) = keyword__FILE__);;} 09969 break; 09970 09971 case 479: 09972 09973 /* Line 1464 of yacc.c */ 09974 #line 4234 "ripper.y" 09975 {ifndef_ripper((yyval.val) = keyword__LINE__);;} 09976 break; 09977 09978 case 480: 09979 09980 /* Line 1464 of yacc.c */ 09981 #line 4235 "ripper.y" 09982 {ifndef_ripper((yyval.val) = keyword__ENCODING__);;} 09983 break; 09984 09985 case 481: 09986 09987 /* Line 1464 of yacc.c */ 09988 #line 4239 "ripper.y" 09989 { 09990 #if 0 09991 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 09992 #endif 09993 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 09994 09995 ;} 09996 break; 09997 09998 case 482: 09999 10000 /* Line 1464 of yacc.c */ 10001 #line 4249 "ripper.y" 10002 { 10003 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10004 #if 0 10005 #endif 10006 (yyval.val) = dispatch1(var_field, (yyval.val)); 10007 10008 ;} 10009 break; 10010 10011 case 485: 10012 10013 /* Line 1464 of yacc.c */ 10014 #line 4263 "ripper.y" 10015 { 10016 #if 0 10017 (yyval.val) = 0; 10018 #endif 10019 (yyval.val) = Qnil; 10020 10021 ;} 10022 break; 10023 10024 case 486: 10025 10026 /* Line 1464 of yacc.c */ 10027 #line 4271 "ripper.y" 10028 { 10029 lex_state = EXPR_BEG; 10030 ;} 10031 break; 10032 10033 case 487: 10034 10035 /* Line 1464 of yacc.c */ 10036 #line 4275 "ripper.y" 10037 { 10038 (yyval.val) = (yyvsp[(3) - (4)].val); 10039 ;} 10040 break; 10041 10042 case 488: 10043 10044 /* Line 1464 of yacc.c */ 10045 #line 4279 "ripper.y" 10046 { 10047 #if 0 10048 yyerrok; 10049 (yyval.val) = 0; 10050 #endif 10051 yyerrok; 10052 (yyval.val) = Qnil; 10053 10054 ;} 10055 break; 10056 10057 case 489: 10058 10059 /* Line 1464 of yacc.c */ 10060 #line 4291 "ripper.y" 10061 { 10062 #if 0 10063 (yyval.val) = (yyvsp[(2) - (3)].val); 10064 #endif 10065 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 10066 10067 lex_state = EXPR_BEG; 10068 command_start = TRUE; 10069 ;} 10070 break; 10071 10072 case 490: 10073 10074 /* Line 1464 of yacc.c */ 10075 #line 4301 "ripper.y" 10076 { 10077 (yyval.val) = (yyvsp[(1) - (2)].val); 10078 ;} 10079 break; 10080 10081 case 491: 10082 10083 /* Line 1464 of yacc.c */ 10084 #line 4307 "ripper.y" 10085 { 10086 #if 0 10087 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); 10088 #endif 10089 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); 10090 10091 ;} 10092 break; 10093 10094 case 492: 10095 10096 /* Line 1464 of yacc.c */ 10097 #line 4315 "ripper.y" 10098 { 10099 #if 0 10100 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 10101 #endif 10102 (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))); 10103 10104 ;} 10105 break; 10106 10107 case 493: 10108 10109 /* Line 1464 of yacc.c */ 10110 #line 4323 "ripper.y" 10111 { 10112 #if 0 10113 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); 10114 #endif 10115 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 10116 10117 ;} 10118 break; 10119 10120 case 494: 10121 10122 /* Line 1464 of yacc.c */ 10123 #line 4331 "ripper.y" 10124 { 10125 #if 0 10126 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10127 #endif 10128 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 10129 10130 ;} 10131 break; 10132 10133 case 495: 10134 10135 /* Line 1464 of yacc.c */ 10136 #line 4339 "ripper.y" 10137 { 10138 #if 0 10139 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 10140 #endif 10141 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 10142 10143 ;} 10144 break; 10145 10146 case 496: 10147 10148 /* Line 1464 of yacc.c */ 10149 #line 4347 "ripper.y" 10150 { 10151 #if 0 10152 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10153 #endif 10154 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 10155 10156 ;} 10157 break; 10158 10159 case 497: 10160 10161 /* Line 1464 of yacc.c */ 10162 #line 4355 "ripper.y" 10163 { 10164 #if 0 10165 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); 10166 #endif 10167 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 10168 10169 ;} 10170 break; 10171 10172 case 498: 10173 10174 /* Line 1464 of yacc.c */ 10175 #line 4363 "ripper.y" 10176 { 10177 #if 0 10178 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 10179 #endif 10180 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 10181 10182 ;} 10183 break; 10184 10185 case 499: 10186 10187 /* Line 1464 of yacc.c */ 10188 #line 4371 "ripper.y" 10189 { 10190 #if 0 10191 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10192 #endif 10193 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 10194 10195 ;} 10196 break; 10197 10198 case 500: 10199 10200 /* Line 1464 of yacc.c */ 10201 #line 4379 "ripper.y" 10202 { 10203 #if 0 10204 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); 10205 #endif 10206 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 10207 10208 ;} 10209 break; 10210 10211 case 501: 10212 10213 /* Line 1464 of yacc.c */ 10214 #line 4387 "ripper.y" 10215 { 10216 #if 0 10217 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10218 #endif 10219 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 10220 10221 ;} 10222 break; 10223 10224 case 502: 10225 10226 /* Line 1464 of yacc.c */ 10227 #line 4395 "ripper.y" 10228 { 10229 #if 0 10230 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); 10231 #endif 10232 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 10233 10234 ;} 10235 break; 10236 10237 case 503: 10238 10239 /* Line 1464 of yacc.c */ 10240 #line 4403 "ripper.y" 10241 { 10242 #if 0 10243 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10244 #endif 10245 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 10246 10247 ;} 10248 break; 10249 10250 case 504: 10251 10252 /* Line 1464 of yacc.c */ 10253 #line 4411 "ripper.y" 10254 { 10255 #if 0 10256 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); 10257 #endif 10258 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); 10259 10260 ;} 10261 break; 10262 10263 case 505: 10264 10265 /* Line 1464 of yacc.c */ 10266 #line 4419 "ripper.y" 10267 { 10268 #if 0 10269 (yyval.val) = new_args(0, 0, 0, 0, 0); 10270 #endif 10271 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); 10272 10273 ;} 10274 break; 10275 10276 case 506: 10277 10278 /* Line 1464 of yacc.c */ 10279 #line 4429 "ripper.y" 10280 { 10281 #if 0 10282 yyerror("formal argument cannot be a constant"); 10283 (yyval.val) = 0; 10284 #endif 10285 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10286 10287 ;} 10288 break; 10289 10290 case 507: 10291 10292 /* Line 1464 of yacc.c */ 10293 #line 4438 "ripper.y" 10294 { 10295 #if 0 10296 yyerror("formal argument cannot be an instance variable"); 10297 (yyval.val) = 0; 10298 #endif 10299 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10300 10301 ;} 10302 break; 10303 10304 case 508: 10305 10306 /* Line 1464 of yacc.c */ 10307 #line 4447 "ripper.y" 10308 { 10309 #if 0 10310 yyerror("formal argument cannot be a global variable"); 10311 (yyval.val) = 0; 10312 #endif 10313 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10314 10315 ;} 10316 break; 10317 10318 case 509: 10319 10320 /* Line 1464 of yacc.c */ 10321 #line 4456 "ripper.y" 10322 { 10323 #if 0 10324 yyerror("formal argument cannot be a class variable"); 10325 (yyval.val) = 0; 10326 #endif 10327 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10328 10329 ;} 10330 break; 10331 10332 case 511: 10333 10334 /* Line 1464 of yacc.c */ 10335 #line 4468 "ripper.y" 10336 { 10337 formal_argument(get_id((yyvsp[(1) - (1)].val))); 10338 (yyval.val) = (yyvsp[(1) - (1)].val); 10339 ;} 10340 break; 10341 10342 case 512: 10343 10344 /* Line 1464 of yacc.c */ 10345 #line 4475 "ripper.y" 10346 { 10347 arg_var(get_id((yyvsp[(1) - (1)].val))); 10348 #if 0 10349 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); 10350 #endif 10351 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 10352 10353 ;} 10354 break; 10355 10356 case 513: 10357 10358 /* Line 1464 of yacc.c */ 10359 #line 4484 "ripper.y" 10360 { 10361 ID tid = internal_id(); 10362 arg_var(tid); 10363 #if 0 10364 if (dyna_in_block()) { 10365 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); 10366 } 10367 else { 10368 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); 10369 } 10370 (yyval.val) = NEW_ARGS_AUX(tid, 1); 10371 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); 10372 #endif 10373 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 10374 10375 ;} 10376 break; 10377 10378 case 514: 10379 10380 /* Line 1464 of yacc.c */ 10381 #line 4505 "ripper.y" 10382 { 10383 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10384 ;} 10385 break; 10386 10387 case 515: 10388 10389 /* Line 1464 of yacc.c */ 10390 #line 4510 "ripper.y" 10391 { 10392 #if 0 10393 (yyval.val) = (yyvsp[(1) - (3)].val); 10394 (yyval.val)->nd_plen++; 10395 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); 10396 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); 10397 #endif 10398 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10399 10400 ;} 10401 break; 10402 10403 case 516: 10404 10405 /* Line 1464 of yacc.c */ 10406 #line 4523 "ripper.y" 10407 { 10408 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 10409 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10410 #if 0 10411 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 10412 #endif 10413 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 10414 10415 ;} 10416 break; 10417 10418 case 517: 10419 10420 /* Line 1464 of yacc.c */ 10421 #line 4535 "ripper.y" 10422 { 10423 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 10424 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10425 #if 0 10426 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 10427 #endif 10428 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 10429 10430 ;} 10431 break; 10432 10433 case 518: 10434 10435 /* Line 1464 of yacc.c */ 10436 #line 4547 "ripper.y" 10437 { 10438 #if 0 10439 (yyval.val) = (yyvsp[(1) - (1)].val); 10440 #endif 10441 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10442 10443 ;} 10444 break; 10445 10446 case 519: 10447 10448 /* Line 1464 of yacc.c */ 10449 #line 4555 "ripper.y" 10450 { 10451 #if 0 10452 NODE *opts = (yyvsp[(1) - (3)].val); 10453 10454 while (opts->nd_next) { 10455 opts = opts->nd_next; 10456 } 10457 opts->nd_next = (yyvsp[(3) - (3)].val); 10458 (yyval.val) = (yyvsp[(1) - (3)].val); 10459 #endif 10460 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10461 10462 ;} 10463 break; 10464 10465 case 520: 10466 10467 /* Line 1464 of yacc.c */ 10468 #line 4571 "ripper.y" 10469 { 10470 #if 0 10471 (yyval.val) = (yyvsp[(1) - (1)].val); 10472 #endif 10473 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10474 10475 ;} 10476 break; 10477 10478 case 521: 10479 10480 /* Line 1464 of yacc.c */ 10481 #line 4579 "ripper.y" 10482 { 10483 #if 0 10484 NODE *opts = (yyvsp[(1) - (3)].val); 10485 10486 while (opts->nd_next) { 10487 opts = opts->nd_next; 10488 } 10489 opts->nd_next = (yyvsp[(3) - (3)].val); 10490 (yyval.val) = (yyvsp[(1) - (3)].val); 10491 #endif 10492 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10493 10494 ;} 10495 break; 10496 10497 case 524: 10498 10499 /* Line 1464 of yacc.c */ 10500 #line 4599 "ripper.y" 10501 { 10502 #if 0 10503 if (!is_local_id((yyvsp[(2) - (2)].val))) 10504 yyerror("rest argument must be local variable"); 10505 #endif 10506 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 10507 #if 0 10508 (yyval.val) = (yyvsp[(2) - (2)].val); 10509 #endif 10510 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); 10511 10512 ;} 10513 break; 10514 10515 case 525: 10516 10517 /* Line 1464 of yacc.c */ 10518 #line 4612 "ripper.y" 10519 { 10520 #if 0 10521 (yyval.val) = internal_id(); 10522 arg_var((yyval.val)); 10523 #endif 10524 (yyval.val) = dispatch1(rest_param, Qnil); 10525 10526 ;} 10527 break; 10528 10529 case 528: 10530 10531 /* Line 1464 of yacc.c */ 10532 #line 4627 "ripper.y" 10533 { 10534 #if 0 10535 if (!is_local_id((yyvsp[(2) - (2)].val))) 10536 yyerror("block argument must be local variable"); 10537 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) 10538 yyerror("duplicated block argument name"); 10539 #endif 10540 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 10541 #if 0 10542 (yyval.val) = (yyvsp[(2) - (2)].val); 10543 #endif 10544 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); 10545 10546 ;} 10547 break; 10548 10549 case 529: 10550 10551 /* Line 1464 of yacc.c */ 10552 #line 4644 "ripper.y" 10553 { 10554 (yyval.val) = (yyvsp[(2) - (2)].val); 10555 ;} 10556 break; 10557 10558 case 530: 10559 10560 /* Line 1464 of yacc.c */ 10561 #line 4648 "ripper.y" 10562 { 10563 #if 0 10564 (yyval.val) = 0; 10565 #endif 10566 (yyval.val) = Qundef; 10567 10568 ;} 10569 break; 10570 10571 case 531: 10572 10573 /* Line 1464 of yacc.c */ 10574 #line 4658 "ripper.y" 10575 { 10576 #if 0 10577 value_expr((yyvsp[(1) - (1)].val)); 10578 (yyval.val) = (yyvsp[(1) - (1)].val); 10579 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 10580 #endif 10581 (yyval.val) = (yyvsp[(1) - (1)].val); 10582 10583 ;} 10584 break; 10585 10586 case 532: 10587 10588 /* Line 1464 of yacc.c */ 10589 #line 4667 "ripper.y" 10590 {lex_state = EXPR_BEG;;} 10591 break; 10592 10593 case 533: 10594 10595 /* Line 1464 of yacc.c */ 10596 #line 4668 "ripper.y" 10597 { 10598 #if 0 10599 if ((yyvsp[(3) - (4)].val) == 0) { 10600 yyerror("can't define singleton method for ()."); 10601 } 10602 else { 10603 switch (nd_type((yyvsp[(3) - (4)].val))) { 10604 case NODE_STR: 10605 case NODE_DSTR: 10606 case NODE_XSTR: 10607 case NODE_DXSTR: 10608 case NODE_DREGX: 10609 case NODE_LIT: 10610 case NODE_ARRAY: 10611 case NODE_ZARRAY: 10612 yyerror("can't define singleton method for literals"); 10613 default: 10614 value_expr((yyvsp[(3) - (4)].val)); 10615 break; 10616 } 10617 } 10618 (yyval.val) = (yyvsp[(3) - (4)].val); 10619 #endif 10620 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); 10621 10622 ;} 10623 break; 10624 10625 case 535: 10626 10627 /* Line 1464 of yacc.c */ 10628 #line 4698 "ripper.y" 10629 { 10630 #if 0 10631 (yyval.val) = (yyvsp[(1) - (2)].val); 10632 #endif 10633 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); 10634 10635 ;} 10636 break; 10637 10638 case 536: 10639 10640 /* Line 1464 of yacc.c */ 10641 #line 4710 "ripper.y" 10642 { 10643 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10644 ;} 10645 break; 10646 10647 case 537: 10648 10649 /* Line 1464 of yacc.c */ 10650 #line 4715 "ripper.y" 10651 { 10652 #if 0 10653 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10654 #endif 10655 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10656 10657 ;} 10658 break; 10659 10660 case 538: 10661 10662 /* Line 1464 of yacc.c */ 10663 #line 4725 "ripper.y" 10664 { 10665 #if 0 10666 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 10667 #endif 10668 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10669 10670 ;} 10671 break; 10672 10673 case 539: 10674 10675 /* Line 1464 of yacc.c */ 10676 #line 4733 "ripper.y" 10677 { 10678 #if 0 10679 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); 10680 #endif 10681 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10682 10683 ;} 10684 break; 10685 10686 case 550: 10687 10688 /* Line 1464 of yacc.c */ 10689 #line 4761 "ripper.y" 10690 { (yyval.val) = (yyvsp[(1) - (1)].val); ;} 10691 break; 10692 10693 case 551: 10694 10695 /* Line 1464 of yacc.c */ 10696 #line 4766 "ripper.y" 10697 { (yyval.val) = (yyvsp[(1) - (1)].val); ;} 10698 break; 10699 10700 case 561: 10701 10702 /* Line 1464 of yacc.c */ 10703 #line 4789 "ripper.y" 10704 {yyerrok;;} 10705 break; 10706 10707 case 564: 10708 10709 /* Line 1464 of yacc.c */ 10710 #line 4794 "ripper.y" 10711 {yyerrok;;} 10712 break; 10713 10714 case 565: 10715 10716 /* Line 1464 of yacc.c */ 10717 #line 4798 "ripper.y" 10718 { 10719 #if 0 10720 (yyval.val) = 0; 10721 #endif 10722 (yyval.val) = Qundef; 10723 10724 ;} 10725 break; 10726 10727 10728 10729 /* Line 1464 of yacc.c */ 10730 #line 10729 "parse.c" 10731 default: break; 10732 } 10733 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 10734 10735 YYPOPSTACK (yylen); 10736 yylen = 0; 10737 YY_STACK_PRINT (yyss, yyssp); 10738 10739 *++yyvsp = yyval; 10740 10741 /* Now `shift' the result of the reduction. Determine what state 10742 that goes to, based on the state we popped back to and the rule 10743 number reduced by. */ 10744 10745 yyn = yyr1[yyn]; 10746 10747 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 10748 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 10749 yystate = yytable[yystate]; 10750 else 10751 yystate = yydefgoto[yyn - YYNTOKENS]; 10752 10753 goto yynewstate; 10754 10755 10756 /*------------------------------------. 10757 | yyerrlab -- here on detecting error | 10758 `------------------------------------*/ 10759 yyerrlab: 10760 /* If not already recovering from an error, report this error. */ 10761 if (!yyerrstatus) 10762 { 10763 ++yynerrs; 10764 #if ! YYERROR_VERBOSE 10765 parser_yyerror (parser, YY_("syntax error")); 10766 #else 10767 { 10768 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 10769 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 10770 { 10771 YYSIZE_T yyalloc = 2 * yysize; 10772 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 10773 yyalloc = YYSTACK_ALLOC_MAXIMUM; 10774 if (yymsg != yymsgbuf) 10775 YYSTACK_FREE (yymsg); 10776 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 10777 if (yymsg) 10778 yymsg_alloc = yyalloc; 10779 else 10780 { 10781 yymsg = yymsgbuf; 10782 yymsg_alloc = sizeof yymsgbuf; 10783 } 10784 } 10785 10786 if (0 < yysize && yysize <= yymsg_alloc) 10787 { 10788 (void) yysyntax_error (yymsg, yystate, yychar); 10789 parser_yyerror (parser, yymsg); 10790 } 10791 else 10792 { 10793 parser_yyerror (parser, YY_("syntax error")); 10794 if (yysize != 0) 10795 goto yyexhaustedlab; 10796 } 10797 } 10798 #endif 10799 } 10800 10801 10802 10803 if (yyerrstatus == 3) 10804 { 10805 /* If just tried and failed to reuse lookahead token after an 10806 error, discard it. */ 10807 10808 if (yychar <= YYEOF) 10809 { 10810 /* Return failure if at end of input. */ 10811 if (yychar == YYEOF) 10812 YYABORT; 10813 } 10814 else 10815 { 10816 yydestruct ("Error: discarding", 10817 yytoken, &yylval, parser); 10818 yychar = YYEMPTY; 10819 } 10820 } 10821 10822 /* Else will try to reuse lookahead token after shifting the error 10823 token. */ 10824 goto yyerrlab1; 10825 10826 10827 /*---------------------------------------------------. 10828 | yyerrorlab -- error raised explicitly by YYERROR. | 10829 `---------------------------------------------------*/ 10830 yyerrorlab: 10831 10832 /* Pacify compilers like GCC when the user code never invokes 10833 YYERROR and the label yyerrorlab therefore never appears in user 10834 code. */ 10835 if (/*CONSTCOND*/ 0) 10836 goto yyerrorlab; 10837 10838 /* Do not reclaim the symbols of the rule which action triggered 10839 this YYERROR. */ 10840 YYPOPSTACK (yylen); 10841 yylen = 0; 10842 YY_STACK_PRINT (yyss, yyssp); 10843 yystate = *yyssp; 10844 goto yyerrlab1; 10845 10846 10847 /*-------------------------------------------------------------. 10848 | yyerrlab1 -- common code for both syntax error and YYERROR. | 10849 `-------------------------------------------------------------*/ 10850 yyerrlab1: 10851 yyerrstatus = 3; /* Each real token shifted decrements this. */ 10852 10853 for (;;) 10854 { 10855 yyn = yypact[yystate]; 10856 if (yyn != YYPACT_NINF) 10857 { 10858 yyn += YYTERROR; 10859 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 10860 { 10861 yyn = yytable[yyn]; 10862 if (0 < yyn) 10863 break; 10864 } 10865 } 10866 10867 /* Pop the current state because it cannot handle the error token. */ 10868 if (yyssp == yyss) 10869 YYABORT; 10870 10871 10872 yydestruct ("Error: popping", 10873 yystos[yystate], yyvsp, parser); 10874 YYPOPSTACK (1); 10875 yystate = *yyssp; 10876 YY_STACK_PRINT (yyss, yyssp); 10877 } 10878 10879 *++yyvsp = yylval; 10880 10881 10882 /* Shift the error token. */ 10883 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 10884 10885 yystate = yyn; 10886 goto yynewstate; 10887 10888 10889 /*-------------------------------------. 10890 | yyacceptlab -- YYACCEPT comes here. | 10891 `-------------------------------------*/ 10892 yyacceptlab: 10893 yyresult = 0; 10894 goto yyreturn; 10895 10896 /*-----------------------------------. 10897 | yyabortlab -- YYABORT comes here. | 10898 `-----------------------------------*/ 10899 yyabortlab: 10900 yyresult = 1; 10901 goto yyreturn; 10902 10903 #if !defined(yyoverflow) || YYERROR_VERBOSE 10904 /*-------------------------------------------------. 10905 | yyexhaustedlab -- memory exhaustion comes here. | 10906 `-------------------------------------------------*/ 10907 yyexhaustedlab: 10908 parser_yyerror (parser, YY_("memory exhausted")); 10909 yyresult = 2; 10910 /* Fall through. */ 10911 #endif 10912 10913 yyreturn: 10914 if (yychar != YYEMPTY) 10915 yydestruct ("Cleanup: discarding lookahead", 10916 yytoken, &yylval, parser); 10917 /* Do not reclaim the symbols of the rule which action triggered 10918 this YYABORT or YYACCEPT. */ 10919 YYPOPSTACK (yylen); 10920 YY_STACK_PRINT (yyss, yyssp); 10921 while (yyssp != yyss) 10922 { 10923 yydestruct ("Cleanup: popping", 10924 yystos[*yyssp], yyvsp, parser); 10925 YYPOPSTACK (1); 10926 } 10927 #ifndef yyoverflow 10928 if (yyss != yyssa) 10929 YYSTACK_FREE (yyss); 10930 #endif 10931 #if YYERROR_VERBOSE 10932 if (yymsg != yymsgbuf) 10933 YYSTACK_FREE (yymsg); 10934 #endif 10935 /* Make sure YYID is used. */ 10936 return YYID (yyresult); 10937 } 10938 10939 10940 10941 /* Line 1684 of yacc.c */ 10942 #line 4806 "ripper.y" 10943 10944 # undef parser 10945 # undef yylex 10946 # undef yylval 10947 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 10948 10949 static int parser_regx_options(struct parser_params*); 10950 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 10951 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 10952 static int parser_parse_string(struct parser_params*,NODE*); 10953 static int parser_here_document(struct parser_params*,NODE*); 10954 10955 10956 # define nextc() parser_nextc(parser) 10957 # define pushback(c) parser_pushback(parser, c) 10958 # define newtok() parser_newtok(parser) 10959 # define tokspace(n) parser_tokspace(parser, n) 10960 # define tokadd(c) parser_tokadd(parser, c) 10961 # define tok_hex(numlen) parser_tok_hex(parser, numlen) 10962 # define read_escape(flags,e) parser_read_escape(parser, flags, e) 10963 # define tokadd_escape(e) parser_tokadd_escape(parser, e) 10964 # define regx_options() parser_regx_options(parser) 10965 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,f,t,p,n,e) 10966 # define parse_string(n) parser_parse_string(parser,n) 10967 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc) 10968 # define here_document(n) parser_here_document(parser,n) 10969 # define heredoc_identifier() parser_heredoc_identifier(parser) 10970 # define heredoc_restore(n) parser_heredoc_restore(parser,n) 10971 # define whole_match_p(e,l,i) parser_whole_match_p(parser,e,l,i) 10972 10973 #ifndef RIPPER 10974 # define set_yylval_str(x) yylval.node = NEW_STR(x) 10975 # define set_yylval_num(x) yylval.num = x 10976 # define set_yylval_id(x) yylval.id = x 10977 # define set_yylval_name(x) yylval.id = x 10978 # define set_yylval_literal(x) yylval.node = NEW_LIT(x) 10979 # define set_yylval_node(x) yylval.node = x 10980 # define yylval_id() yylval.id 10981 #else 10982 static inline VALUE 10983 ripper_yylval_id(ID x) 10984 { 10985 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 10986 } 10987 # define set_yylval_str(x) (void)(x) 10988 # define set_yylval_num(x) (void)(x) 10989 # define set_yylval_id(x) (void)(x) 10990 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 10991 # define set_yylval_literal(x) (void)(x) 10992 # define set_yylval_node(x) (void)(x) 10993 # define yylval_id() yylval.id 10994 #endif 10995 10996 #ifndef RIPPER 10997 #define ripper_flush(p) (void)(p) 10998 #else 10999 #define ripper_flush(p) (p->tokp = p->parser_lex_p) 11000 11001 #define yylval_rval *(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val) 11002 11003 static int 11004 ripper_has_scan_event(struct parser_params *parser) 11005 { 11006 11007 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 11008 return lex_p > parser->tokp; 11009 } 11010 11011 static VALUE 11012 ripper_scan_event_val(struct parser_params *parser, int t) 11013 { 11014 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 11015 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 11016 ripper_flush(parser); 11017 return rval; 11018 } 11019 11020 static void 11021 ripper_dispatch_scan_event(struct parser_params *parser, int t) 11022 { 11023 if (!ripper_has_scan_event(parser)) return; 11024 yylval_rval = ripper_scan_event_val(parser, t); 11025 } 11026 11027 static void 11028 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 11029 { 11030 if (!ripper_has_scan_event(parser)) return; 11031 (void)ripper_scan_event_val(parser, t); 11032 } 11033 11034 static void 11035 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 11036 { 11037 int saved_line = ruby_sourceline; 11038 const char *saved_tokp = parser->tokp; 11039 11040 ruby_sourceline = parser->delayed_line; 11041 parser->tokp = lex_pbeg + parser->delayed_col; 11042 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 11043 parser->delayed = Qnil; 11044 ruby_sourceline = saved_line; 11045 parser->tokp = saved_tokp; 11046 } 11047 #endif /* RIPPER */ 11048 11049 #include "ruby/regex.h" 11050 #include "ruby/util.h" 11051 11052 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 11053 since ours (we hope) works properly with all combinations of 11054 machines, compilers, `char' and `unsigned char' argument types. 11055 (Per Bothner suggested the basic approach.) */ 11056 #undef SIGN_EXTEND_CHAR 11057 #if __STDC__ 11058 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 11059 #else /* not __STDC__ */ 11060 /* As in Harbison and Steele. */ 11061 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 11062 #endif 11063 11064 #define parser_encoding_name() (parser->enc->name) 11065 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) 11066 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) 11067 #define is_identchar(p,e,enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p)) 11068 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) 11069 11070 #define parser_isascii() ISASCII(*(lex_p-1)) 11071 11072 #ifndef RIPPER 11073 static int 11074 token_info_get_column(struct parser_params *parser, const char *token) 11075 { 11076 int column = 1; 11077 const char *p, *pend = lex_p - strlen(token); 11078 for (p = lex_pbeg; p < pend; p++) { 11079 if (*p == '\t') { 11080 column = (((column - 1) / 8) + 1) * 8; 11081 } 11082 column++; 11083 } 11084 return column; 11085 } 11086 11087 static int 11088 token_info_has_nonspaces(struct parser_params *parser, const char *token) 11089 { 11090 const char *p, *pend = lex_p - strlen(token); 11091 for (p = lex_pbeg; p < pend; p++) { 11092 if (*p != ' ' && *p != '\t') { 11093 return 1; 11094 } 11095 } 11096 return 0; 11097 } 11098 11099 #undef token_info_push 11100 static void 11101 token_info_push(struct parser_params *parser, const char *token) 11102 { 11103 token_info *ptinfo; 11104 11105 if (compile_for_eval) return; 11106 ptinfo = ALLOC(token_info); 11107 ptinfo->token = token; 11108 ptinfo->linenum = ruby_sourceline; 11109 ptinfo->column = token_info_get_column(parser, token); 11110 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 11111 ptinfo->next = parser->parser_token_info; 11112 11113 parser->parser_token_info = ptinfo; 11114 } 11115 11116 #undef token_info_pop 11117 static void 11118 token_info_pop(struct parser_params *parser, const char *token) 11119 { 11120 int linenum; 11121 token_info *ptinfo = parser->parser_token_info; 11122 11123 if (!ptinfo) return; 11124 parser->parser_token_info = ptinfo->next; 11125 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 11126 goto finish; 11127 } 11128 linenum = ruby_sourceline; 11129 if (linenum == ptinfo->linenum) { /* SKIP */ 11130 goto finish; 11131 } 11132 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 11133 goto finish; 11134 } 11135 rb_compile_warning(ruby_sourcefile, linenum, 11136 "mismatched indentations at '%s' with '%s' at %d", 11137 token, ptinfo->token, ptinfo->linenum); 11138 11139 finish: 11140 xfree(ptinfo); 11141 } 11142 #endif /* RIPPER */ 11143 11144 static int 11145 parser_yyerror(struct parser_params *parser, const char *msg) 11146 { 11147 #ifndef RIPPER 11148 const int max_line_margin = 30; 11149 const char *p, *pe; 11150 char *buf; 11151 long len; 11152 int i; 11153 11154 compile_error(PARSER_ARG "%s", msg); 11155 p = lex_p; 11156 while (lex_pbeg <= p) { 11157 if (*p == '\n') break; 11158 p--; 11159 } 11160 p++; 11161 11162 pe = lex_p; 11163 while (pe < lex_pend) { 11164 if (*pe == '\n') break; 11165 pe++; 11166 } 11167 11168 len = pe - p; 11169 if (len > 4) { 11170 char *p2; 11171 const char *pre = "", *post = ""; 11172 11173 if (len > max_line_margin * 2 + 10) { 11174 if (lex_p - p > max_line_margin) { 11175 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 11176 pre = "..."; 11177 } 11178 if (pe - lex_p > max_line_margin) { 11179 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 11180 post = "..."; 11181 } 11182 len = pe - p; 11183 } 11184 buf = ALLOCA_N(char, len+2); 11185 MEMCPY(buf, p, char, len); 11186 buf[len] = '\0'; 11187 rb_compile_error_append("%s%s%s", pre, buf, post); 11188 11189 i = (int)(lex_p - p); 11190 p2 = buf; pe = buf + len; 11191 11192 while (p2 < pe) { 11193 if (*p2 != '\t') *p2 = ' '; 11194 p2++; 11195 } 11196 buf[i] = '^'; 11197 buf[i+1] = '\0'; 11198 rb_compile_error_append("%s%s", pre, buf); 11199 } 11200 #else 11201 dispatch1(parse_error, STR_NEW2(msg)); 11202 #endif /* !RIPPER */ 11203 return 0; 11204 } 11205 11206 static void parser_prepare(struct parser_params *parser); 11207 11208 #ifndef RIPPER 11209 VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always); 11210 11211 static VALUE 11212 debug_lines(const char *f) 11213 { 11214 ID script_lines; 11215 CONST_ID(script_lines, "SCRIPT_LINES__"); 11216 if (rb_const_defined_at(rb_cObject, script_lines)) { 11217 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 11218 if (TYPE(hash) == T_HASH) { 11219 VALUE fname = rb_str_new2(f); 11220 VALUE lines = rb_ary_new(); 11221 rb_hash_aset(hash, fname, lines); 11222 return lines; 11223 } 11224 } 11225 return 0; 11226 } 11227 11228 static VALUE 11229 coverage(const char *f, int n) 11230 { 11231 extern VALUE rb_get_coverages(void); 11232 VALUE coverages = rb_get_coverages(); 11233 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 11234 VALUE fname = rb_str_new2(f); 11235 VALUE lines = rb_ary_new2(n); 11236 int i; 11237 RBASIC(lines)->klass = 0; 11238 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 11239 RARRAY(lines)->as.heap.len = n; 11240 rb_hash_aset(coverages, fname, lines); 11241 return lines; 11242 } 11243 return 0; 11244 } 11245 11246 static int 11247 e_option_supplied(struct parser_params *parser) 11248 { 11249 return strcmp(ruby_sourcefile, "-e") == 0; 11250 } 11251 11252 static VALUE 11253 yycompile0(VALUE arg, int tracing) 11254 { 11255 int n; 11256 NODE *tree; 11257 struct parser_params *parser = (struct parser_params *)arg; 11258 11259 if (!compile_for_eval && rb_safe_level() == 0) { 11260 ruby_debug_lines = debug_lines(ruby_sourcefile); 11261 if (ruby_debug_lines && ruby_sourceline > 0) { 11262 VALUE str = STR_NEW0(); 11263 n = ruby_sourceline; 11264 do { 11265 rb_ary_push(ruby_debug_lines, str); 11266 } while (--n); 11267 } 11268 11269 if (!e_option_supplied(parser)) { 11270 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); 11271 } 11272 } 11273 11274 parser_prepare(parser); 11275 deferred_nodes = 0; 11276 n = yyparse((void*)parser); 11277 ruby_debug_lines = 0; 11278 ruby_coverage = 0; 11279 compile_for_eval = 0; 11280 11281 lex_strterm = 0; 11282 lex_p = lex_pbeg = lex_pend = 0; 11283 lex_lastline = lex_nextline = 0; 11284 if (parser->nerr) { 11285 return 0; 11286 } 11287 tree = ruby_eval_tree; 11288 if (!tree) { 11289 tree = NEW_NIL(); 11290 } 11291 else if (ruby_eval_tree_begin) { 11292 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 11293 } 11294 return (VALUE)tree; 11295 } 11296 11297 static NODE* 11298 yycompile(struct parser_params *parser, const char *f, int line) 11299 { 11300 ruby_sourcefile = ruby_strdup(f); 11301 ruby_sourceline = line - 1; 11302 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE); 11303 } 11304 #endif /* !RIPPER */ 11305 11306 static rb_encoding * 11307 must_be_ascii_compatible(VALUE s) 11308 { 11309 rb_encoding *enc = rb_enc_get(s); 11310 if (!rb_enc_asciicompat(enc)) { 11311 rb_raise(rb_eArgError, "invalid source encoding"); 11312 } 11313 return enc; 11314 } 11315 11316 static VALUE 11317 lex_get_str(struct parser_params *parser, VALUE s) 11318 { 11319 char *beg, *end, *pend; 11320 rb_encoding *enc = must_be_ascii_compatible(s); 11321 11322 beg = RSTRING_PTR(s); 11323 if (lex_gets_ptr) { 11324 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11325 beg += lex_gets_ptr; 11326 } 11327 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11328 end = beg; 11329 while (end < pend) { 11330 if (*end++ == '\n') break; 11331 } 11332 lex_gets_ptr = end - RSTRING_PTR(s); 11333 return rb_enc_str_new(beg, end - beg, enc); 11334 } 11335 11336 static VALUE 11337 lex_getline(struct parser_params *parser) 11338 { 11339 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11340 if (NIL_P(line)) return line; 11341 must_be_ascii_compatible(line); 11342 #ifndef RIPPER 11343 if (ruby_debug_lines) { 11344 rb_ary_push(ruby_debug_lines, line); 11345 } 11346 if (ruby_coverage) { 11347 rb_ary_push(ruby_coverage, Qnil); 11348 } 11349 #endif 11350 return line; 11351 } 11352 11353 static const rb_data_type_t parser_data_type; 11354 11355 #ifndef RIPPER 11356 static NODE* 11357 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11358 { 11359 struct parser_params *parser; 11360 NODE *node; 11361 volatile VALUE tmp; 11362 11363 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11364 lex_gets = lex_get_str; 11365 lex_gets_ptr = 0; 11366 lex_input = s; 11367 lex_pbeg = lex_p = lex_pend = 0; 11368 compile_for_eval = rb_parse_in_eval(); 11369 11370 node = yycompile(parser, f, line); 11371 tmp = vparser; /* prohibit tail call optimization */ 11372 11373 return node; 11374 } 11375 11376 NODE* 11377 rb_compile_string(const char *f, VALUE s, int line) 11378 { 11379 must_be_ascii_compatible(s); 11380 return parser_compile_string(rb_parser_new(), f, s, line); 11381 } 11382 11383 NODE* 11384 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11385 { 11386 must_be_ascii_compatible(s); 11387 return parser_compile_string(vparser, f, s, line); 11388 } 11389 11390 NODE* 11391 rb_compile_cstr(const char *f, const char *s, int len, int line) 11392 { 11393 VALUE str = rb_str_new(s, len); 11394 return parser_compile_string(rb_parser_new(), f, str, line); 11395 } 11396 11397 NODE* 11398 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 11399 { 11400 VALUE str = rb_str_new(s, len); 11401 return parser_compile_string(vparser, f, str, line); 11402 } 11403 11404 static VALUE 11405 lex_io_gets(struct parser_params *parser, VALUE io) 11406 { 11407 return rb_io_gets(io); 11408 } 11409 11410 NODE* 11411 rb_compile_file(const char *f, VALUE file, int start) 11412 { 11413 VALUE volatile vparser = rb_parser_new(); 11414 11415 return rb_parser_compile_file(vparser, f, file, start); 11416 } 11417 11418 NODE* 11419 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 11420 { 11421 struct parser_params *parser; 11422 volatile VALUE tmp; 11423 NODE *node; 11424 11425 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11426 lex_gets = lex_io_gets; 11427 lex_input = file; 11428 lex_pbeg = lex_p = lex_pend = 0; 11429 compile_for_eval = rb_parse_in_eval(); 11430 11431 node = yycompile(parser, f, start); 11432 tmp = vparser; /* prohibit tail call optimization */ 11433 11434 return node; 11435 } 11436 #endif /* !RIPPER */ 11437 11438 #define STR_FUNC_ESCAPE 0x01 11439 #define STR_FUNC_EXPAND 0x02 11440 #define STR_FUNC_REGEXP 0x04 11441 #define STR_FUNC_QWORDS 0x08 11442 #define STR_FUNC_SYMBOL 0x10 11443 #define STR_FUNC_INDENT 0x20 11444 11445 enum string_type { 11446 str_squote = (0), 11447 str_dquote = (STR_FUNC_EXPAND), 11448 str_xquote = (STR_FUNC_EXPAND), 11449 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 11450 str_sword = (STR_FUNC_QWORDS), 11451 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 11452 str_ssym = (STR_FUNC_SYMBOL), 11453 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 11454 }; 11455 11456 static VALUE 11457 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 11458 { 11459 VALUE str; 11460 11461 str = rb_enc_str_new(p, n, enc); 11462 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 11463 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 11464 } 11465 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 11466 rb_enc_associate(str, rb_ascii8bit_encoding()); 11467 } 11468 } 11469 11470 return str; 11471 } 11472 11473 #define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend) 11474 #define peek(c) (lex_p < lex_pend && (c) == *lex_p) 11475 11476 static inline int 11477 parser_nextc(struct parser_params *parser) 11478 { 11479 int c; 11480 11481 if (lex_p == lex_pend) { 11482 VALUE v = lex_nextline; 11483 lex_nextline = 0; 11484 if (!v) { 11485 if (parser->eofp) 11486 return -1; 11487 11488 if (!lex_input || NIL_P(v = lex_getline(parser))) { 11489 parser->eofp = Qtrue; 11490 lex_goto_eol(parser); 11491 return -1; 11492 } 11493 } 11494 { 11495 #ifdef RIPPER 11496 if (parser->tokp < lex_pend) { 11497 if (NIL_P(parser->delayed)) { 11498 parser->delayed = rb_str_buf_new(1024); 11499 rb_str_buf_cat(parser->delayed, 11500 parser->tokp, lex_pend - parser->tokp); 11501 parser->delayed_line = ruby_sourceline; 11502 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 11503 } 11504 else { 11505 rb_str_buf_cat(parser->delayed, 11506 parser->tokp, lex_pend - parser->tokp); 11507 } 11508 } 11509 #endif 11510 if (heredoc_end > 0) { 11511 ruby_sourceline = heredoc_end; 11512 heredoc_end = 0; 11513 } 11514 ruby_sourceline++; 11515 parser->line_count++; 11516 lex_pbeg = lex_p = RSTRING_PTR(v); 11517 lex_pend = lex_p + RSTRING_LEN(v); 11518 ripper_flush(parser); 11519 lex_lastline = v; 11520 } 11521 } 11522 c = (unsigned char)*lex_p++; 11523 if (c == '\r' && peek('\n')) { 11524 lex_p++; 11525 c = '\n'; 11526 } 11527 11528 return c; 11529 } 11530 11531 static void 11532 parser_pushback(struct parser_params *parser, int c) 11533 { 11534 if (c == -1) return; 11535 lex_p--; 11536 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 11537 lex_p--; 11538 } 11539 } 11540 11541 #define was_bol() (lex_p == lex_pbeg + 1) 11542 11543 #define tokfix() (tokenbuf[tokidx]='\0') 11544 #define tok() tokenbuf 11545 #define toklen() tokidx 11546 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 11547 11548 static char* 11549 parser_newtok(struct parser_params *parser) 11550 { 11551 tokidx = 0; 11552 if (!tokenbuf) { 11553 toksiz = 60; 11554 tokenbuf = ALLOC_N(char, 60); 11555 } 11556 if (toksiz > 4096) { 11557 toksiz = 60; 11558 REALLOC_N(tokenbuf, char, 60); 11559 } 11560 return tokenbuf; 11561 } 11562 11563 static char * 11564 parser_tokspace(struct parser_params *parser, int n) 11565 { 11566 tokidx += n; 11567 11568 if (tokidx >= toksiz) { 11569 do {toksiz *= 2;} while (toksiz < tokidx); 11570 REALLOC_N(tokenbuf, char, toksiz); 11571 } 11572 return &tokenbuf[tokidx-n]; 11573 } 11574 11575 static void 11576 parser_tokadd(struct parser_params *parser, int c) 11577 { 11578 tokenbuf[tokidx++] = (char)c; 11579 if (tokidx >= toksiz) { 11580 toksiz *= 2; 11581 REALLOC_N(tokenbuf, char, toksiz); 11582 } 11583 } 11584 11585 static int 11586 parser_tok_hex(struct parser_params *parser, size_t *numlen) 11587 { 11588 int c; 11589 11590 c = scan_hex(lex_p, 2, numlen); 11591 if (!*numlen) { 11592 yyerror("invalid hex escape"); 11593 return 0; 11594 } 11595 lex_p += *numlen; 11596 return c; 11597 } 11598 11599 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 11600 11601 static int 11602 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 11603 int string_literal, int symbol_literal, int regexp_literal) 11604 { 11605 /* 11606 * If string_literal is true, then we allow multiple codepoints 11607 * in \u{}, and add the codepoints to the current token. 11608 * Otherwise we're parsing a character literal and return a single 11609 * codepoint without adding it 11610 */ 11611 11612 int codepoint; 11613 size_t numlen; 11614 11615 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 11616 11617 if (peek('{')) { /* handle \u{...} form */ 11618 do { 11619 if (regexp_literal) { tokadd(*lex_p); } 11620 nextc(); 11621 codepoint = scan_hex(lex_p, 6, &numlen); 11622 if (numlen == 0) { 11623 yyerror("invalid Unicode escape"); 11624 return 0; 11625 } 11626 if (codepoint > 0x10ffff) { 11627 yyerror("invalid Unicode codepoint (too large)"); 11628 return 0; 11629 } 11630 lex_p += numlen; 11631 if (regexp_literal) { 11632 tokcopy((int)numlen); 11633 } 11634 else if (codepoint >= 0x80) { 11635 *encp = UTF8_ENC(); 11636 if (string_literal) tokaddmbc(codepoint, *encp); 11637 } 11638 else if (string_literal) { 11639 tokadd(codepoint); 11640 } 11641 } while (string_literal && (peek(' ') || peek('\t'))); 11642 11643 if (!peek('}')) { 11644 yyerror("unterminated Unicode escape"); 11645 return 0; 11646 } 11647 11648 if (regexp_literal) { tokadd('}'); } 11649 nextc(); 11650 } 11651 else { /* handle \uxxxx form */ 11652 codepoint = scan_hex(lex_p, 4, &numlen); 11653 if (numlen < 4) { 11654 yyerror("invalid Unicode escape"); 11655 return 0; 11656 } 11657 lex_p += 4; 11658 if (regexp_literal) { 11659 tokcopy(4); 11660 } 11661 else if (codepoint >= 0x80) { 11662 *encp = UTF8_ENC(); 11663 if (string_literal) tokaddmbc(codepoint, *encp); 11664 } 11665 else if (string_literal) { 11666 tokadd(codepoint); 11667 } 11668 } 11669 11670 return codepoint; 11671 } 11672 11673 #define ESCAPE_CONTROL 1 11674 #define ESCAPE_META 2 11675 11676 static int 11677 parser_read_escape(struct parser_params *parser, int flags, 11678 rb_encoding **encp) 11679 { 11680 int c; 11681 size_t numlen; 11682 11683 switch (c = nextc()) { 11684 case '\\': /* Backslash */ 11685 return c; 11686 11687 case 'n': /* newline */ 11688 return '\n'; 11689 11690 case 't': /* horizontal tab */ 11691 return '\t'; 11692 11693 case 'r': /* carriage-return */ 11694 return '\r'; 11695 11696 case 'f': /* form-feed */ 11697 return '\f'; 11698 11699 case 'v': /* vertical tab */ 11700 return '\13'; 11701 11702 case 'a': /* alarm(bell) */ 11703 return '\007'; 11704 11705 case 'e': /* escape */ 11706 return 033; 11707 11708 case '0': case '1': case '2': case '3': /* octal constant */ 11709 case '4': case '5': case '6': case '7': 11710 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; 11711 pushback(c); 11712 c = scan_oct(lex_p, 3, &numlen); 11713 lex_p += numlen; 11714 return c; 11715 11716 case 'x': /* hex constant */ 11717 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; 11718 c = tok_hex(&numlen); 11719 if (numlen == 0) return 0; 11720 return c; 11721 11722 case 'b': /* backspace */ 11723 return '\010'; 11724 11725 case 's': /* space */ 11726 return ' '; 11727 11728 case 'M': 11729 if (flags & ESCAPE_META) goto eof; 11730 if ((c = nextc()) != '-') { 11731 pushback(c); 11732 goto eof; 11733 } 11734 if ((c = nextc()) == '\\') { 11735 if (peek('u')) goto eof; 11736 return read_escape(flags|ESCAPE_META, encp) | 0x80; 11737 } 11738 else if (c == -1 || !ISASCII(c)) goto eof; 11739 else { 11740 return ((c & 0xff) | 0x80); 11741 } 11742 11743 case 'C': 11744 if ((c = nextc()) != '-') { 11745 pushback(c); 11746 goto eof; 11747 } 11748 case 'c': 11749 if (flags & ESCAPE_CONTROL) goto eof; 11750 if ((c = nextc())== '\\') { 11751 if (peek('u')) goto eof; 11752 c = read_escape(flags|ESCAPE_CONTROL, encp); 11753 } 11754 else if (c == '?') 11755 return 0177; 11756 else if (c == -1 || !ISASCII(c)) goto eof; 11757 return c & 0x9f; 11758 11759 eof: 11760 case -1: 11761 yyerror("Invalid escape character syntax"); 11762 return '\0'; 11763 11764 default: 11765 return c; 11766 } 11767 } 11768 11769 static void 11770 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 11771 { 11772 int len = rb_enc_codelen(c, enc); 11773 rb_enc_mbcput(c, tokspace(len), enc); 11774 } 11775 11776 static int 11777 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 11778 { 11779 int c; 11780 int flags = 0; 11781 size_t numlen; 11782 11783 first: 11784 switch (c = nextc()) { 11785 case '\n': 11786 return 0; /* just ignore */ 11787 11788 case '0': case '1': case '2': case '3': /* octal constant */ 11789 case '4': case '5': case '6': case '7': 11790 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; 11791 { 11792 ruby_scan_oct(--lex_p, 3, &numlen); 11793 if (numlen == 0) goto eof; 11794 lex_p += numlen; 11795 tokcopy((int)numlen + 1); 11796 } 11797 return 0; 11798 11799 case 'x': /* hex constant */ 11800 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof; 11801 { 11802 tok_hex(&numlen); 11803 if (numlen == 0) goto eof; 11804 tokcopy((int)numlen + 2); 11805 } 11806 return 0; 11807 11808 case 'M': 11809 if (flags & ESCAPE_META) goto eof; 11810 if ((c = nextc()) != '-') { 11811 pushback(c); 11812 goto eof; 11813 } 11814 tokcopy(3); 11815 flags |= ESCAPE_META; 11816 goto escaped; 11817 11818 case 'C': 11819 if (flags & ESCAPE_CONTROL) goto eof; 11820 if ((c = nextc()) != '-') { 11821 pushback(c); 11822 goto eof; 11823 } 11824 tokcopy(3); 11825 goto escaped; 11826 11827 case 'c': 11828 if (flags & ESCAPE_CONTROL) goto eof; 11829 tokcopy(2); 11830 flags |= ESCAPE_CONTROL; 11831 escaped: 11832 if ((c = nextc()) == '\\') { 11833 goto first; 11834 } 11835 else if (c == -1) goto eof; 11836 tokadd(c); 11837 return 0; 11838 11839 eof: 11840 case -1: 11841 yyerror("Invalid escape character syntax"); 11842 return -1; 11843 11844 default: 11845 tokadd('\\'); 11846 tokadd(c); 11847 } 11848 return 0; 11849 } 11850 11851 extern int rb_char_to_option_kcode(int c, int *option, int *kcode); 11852 11853 static int 11854 parser_regx_options(struct parser_params *parser) 11855 { 11856 int kcode = 0; 11857 int kopt = 0; 11858 int options = 0; 11859 int c, opt, kc; 11860 11861 newtok(); 11862 while (c = nextc(), ISALPHA(c)) { 11863 if (c == 'o') { 11864 options |= RE_OPTION_ONCE; 11865 } 11866 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 11867 if (kc >= 0) { 11868 if (kc != rb_ascii8bit_encindex()) kcode = c; 11869 kopt = opt; 11870 } 11871 else { 11872 options |= opt; 11873 } 11874 } 11875 else { 11876 tokadd(c); 11877 } 11878 } 11879 options |= kopt; 11880 pushback(c); 11881 if (toklen()) { 11882 tokfix(); 11883 compile_error(PARSER_ARG "unknown regexp option%s - %s", 11884 toklen() > 1 ? "s" : "", tok()); 11885 } 11886 return options | RE_OPTION_ENCODING(kcode); 11887 } 11888 11889 static void 11890 dispose_string(VALUE str) 11891 { 11892 /* TODO: should use another API? */ 11893 if (RBASIC(str)->flags & RSTRING_NOEMBED) 11894 xfree(RSTRING_PTR(str)); 11895 rb_gc_force_recycle(str); 11896 } 11897 11898 static int 11899 parser_tokadd_mbchar(struct parser_params *parser, int c) 11900 { 11901 int len = parser_precise_mbclen(); 11902 if (!MBCLEN_CHARFOUND_P(len)) { 11903 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 11904 return -1; 11905 } 11906 tokadd(c); 11907 lex_p += --len; 11908 if (len > 0) tokcopy(len); 11909 return c; 11910 } 11911 11912 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, c) 11913 11914 static int 11915 parser_tokadd_string(struct parser_params *parser, 11916 int func, int term, int paren, long *nest, 11917 rb_encoding **encp) 11918 { 11919 int c; 11920 int has_nonascii = 0; 11921 rb_encoding *enc = *encp; 11922 char *errbuf = 0; 11923 static const char mixed_msg[] = "%s mixed within %s source"; 11924 11925 #define mixed_error(enc1, enc2) if (!errbuf) { \ 11926 size_t len = sizeof(mixed_msg) - 4; \ 11927 len += strlen(rb_enc_name(enc1)); \ 11928 len += strlen(rb_enc_name(enc2)); \ 11929 errbuf = ALLOCA_N(char, len); \ 11930 snprintf(errbuf, len, mixed_msg, \ 11931 rb_enc_name(enc1), \ 11932 rb_enc_name(enc2)); \ 11933 yyerror(errbuf); \ 11934 } 11935 #define mixed_escape(beg, enc1, enc2) do { \ 11936 const char *pos = lex_p; \ 11937 lex_p = beg; \ 11938 mixed_error(enc1, enc2); \ 11939 lex_p = pos; \ 11940 } while (0) 11941 11942 while ((c = nextc()) != -1) { 11943 if (paren && c == paren) { 11944 ++*nest; 11945 } 11946 else if (c == term) { 11947 if (!nest || !*nest) { 11948 pushback(c); 11949 break; 11950 } 11951 --*nest; 11952 } 11953 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 11954 int c2 = *lex_p; 11955 if (c2 == '$' || c2 == '@' || c2 == '{') { 11956 pushback(c); 11957 break; 11958 } 11959 } 11960 else if (c == '\\') { 11961 const char *beg = lex_p - 1; 11962 c = nextc(); 11963 switch (c) { 11964 case '\n': 11965 if (func & STR_FUNC_QWORDS) break; 11966 if (func & STR_FUNC_EXPAND) continue; 11967 tokadd('\\'); 11968 break; 11969 11970 case '\\': 11971 if (func & STR_FUNC_ESCAPE) tokadd(c); 11972 break; 11973 11974 case 'u': 11975 if ((func & STR_FUNC_EXPAND) == 0) { 11976 tokadd('\\'); 11977 break; 11978 } 11979 parser_tokadd_utf8(parser, &enc, 1, 11980 func & STR_FUNC_SYMBOL, 11981 func & STR_FUNC_REGEXP); 11982 if (has_nonascii && enc != *encp) { 11983 mixed_escape(beg, enc, *encp); 11984 } 11985 continue; 11986 11987 default: 11988 if (func & STR_FUNC_REGEXP) { 11989 pushback(c); 11990 if ((c = tokadd_escape(&enc)) < 0) 11991 return -1; 11992 if (has_nonascii && enc != *encp) { 11993 mixed_escape(beg, enc, *encp); 11994 } 11995 continue; 11996 } 11997 else if (func & STR_FUNC_EXPAND) { 11998 pushback(c); 11999 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 12000 c = read_escape(0, &enc); 12001 } 12002 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12003 /* ignore backslashed spaces in %w */ 12004 } 12005 else if (c != term && !(paren && c == paren)) { 12006 tokadd('\\'); 12007 pushback(c); 12008 continue; 12009 } 12010 } 12011 } 12012 else if (!parser_isascii()) { 12013 has_nonascii = 1; 12014 if (enc != *encp) { 12015 mixed_error(enc, *encp); 12016 continue; 12017 } 12018 if (tokadd_mbchar(c) == -1) return -1; 12019 continue; 12020 } 12021 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12022 pushback(c); 12023 break; 12024 } 12025 if (c & 0x80) { 12026 has_nonascii = 1; 12027 if (enc != *encp) { 12028 mixed_error(enc, *encp); 12029 continue; 12030 } 12031 } 12032 tokadd(c); 12033 } 12034 *encp = enc; 12035 return c; 12036 } 12037 12038 #define NEW_STRTERM(func, term, paren) \ 12039 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 12040 12041 static int 12042 parser_parse_string(struct parser_params *parser, NODE *quote) 12043 { 12044 int func = (int)quote->nd_func; 12045 int term = nd_term(quote); 12046 int paren = nd_paren(quote); 12047 int c, space = 0; 12048 rb_encoding *enc = parser->enc; 12049 12050 if (func == -1) return tSTRING_END; 12051 c = nextc(); 12052 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12053 do {c = nextc();} while (ISSPACE(c)); 12054 space = 1; 12055 } 12056 if (c == term && !quote->nd_nest) { 12057 if (func & STR_FUNC_QWORDS) { 12058 quote->nd_func = -1; 12059 return ' '; 12060 } 12061 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 12062 set_yylval_num(regx_options()); 12063 return tREGEXP_END; 12064 } 12065 if (space) { 12066 pushback(c); 12067 return ' '; 12068 } 12069 newtok(); 12070 if ((func & STR_FUNC_EXPAND) && c == '#') { 12071 switch (c = nextc()) { 12072 case '$': 12073 case '@': 12074 pushback(c); 12075 return tSTRING_DVAR; 12076 case '{': 12077 return tSTRING_DBEG; 12078 } 12079 tokadd('#'); 12080 } 12081 pushback(c); 12082 if (tokadd_string(func, term, paren, "e->nd_nest, 12083 &enc) == -1) { 12084 ruby_sourceline = nd_line(quote); 12085 if (func & STR_FUNC_REGEXP) { 12086 if (parser->eofp) 12087 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 12088 return tREGEXP_END; 12089 } 12090 else { 12091 if (parser->eofp) 12092 compile_error(PARSER_ARG "unterminated string meets end of file"); 12093 return tSTRING_END; 12094 } 12095 } 12096 12097 tokfix(); 12098 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12099 return tSTRING_CONTENT; 12100 } 12101 12102 static int 12103 parser_heredoc_identifier(struct parser_params *parser) 12104 { 12105 int c = nextc(), term, func = 0; 12106 long len; 12107 12108 if (c == '-') { 12109 c = nextc(); 12110 func = STR_FUNC_INDENT; 12111 } 12112 switch (c) { 12113 case '\'': 12114 func |= str_squote; goto quoted; 12115 case '"': 12116 func |= str_dquote; goto quoted; 12117 case '`': 12118 func |= str_xquote; 12119 quoted: 12120 newtok(); 12121 tokadd(func); 12122 term = c; 12123 while ((c = nextc()) != -1 && c != term) { 12124 if (tokadd_mbchar(c) == -1) return 0; 12125 } 12126 if (c == -1) { 12127 compile_error(PARSER_ARG "unterminated here document identifier"); 12128 return 0; 12129 } 12130 break; 12131 12132 default: 12133 if (!parser_is_identchar()) { 12134 pushback(c); 12135 if (func & STR_FUNC_INDENT) { 12136 pushback('-'); 12137 } 12138 return 0; 12139 } 12140 newtok(); 12141 term = '"'; 12142 tokadd(func |= str_dquote); 12143 do { 12144 if (tokadd_mbchar(c) == -1) return 0; 12145 } while ((c = nextc()) != -1 && parser_is_identchar()); 12146 pushback(c); 12147 break; 12148 } 12149 12150 tokfix(); 12151 #ifdef RIPPER 12152 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 12153 #endif 12154 len = lex_p - lex_pbeg; 12155 lex_goto_eol(parser); 12156 lex_strterm = rb_node_newnode(NODE_HEREDOC, 12157 STR_NEW(tok(), toklen()), /* nd_lit */ 12158 len, /* nd_nth */ 12159 lex_lastline); /* nd_orig */ 12160 nd_set_line(lex_strterm, ruby_sourceline); 12161 ripper_flush(parser); 12162 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 12163 } 12164 12165 static void 12166 parser_heredoc_restore(struct parser_params *parser, NODE *here) 12167 { 12168 VALUE line; 12169 12170 line = here->nd_orig; 12171 lex_lastline = line; 12172 lex_pbeg = RSTRING_PTR(line); 12173 lex_pend = lex_pbeg + RSTRING_LEN(line); 12174 lex_p = lex_pbeg + here->nd_nth; 12175 heredoc_end = ruby_sourceline; 12176 ruby_sourceline = nd_line(here); 12177 dispose_string(here->nd_lit); 12178 rb_gc_force_recycle((VALUE)here); 12179 ripper_flush(parser); 12180 } 12181 12182 static int 12183 parser_whole_match_p(struct parser_params *parser, 12184 const char *eos, long len, int indent) 12185 { 12186 const char *p = lex_pbeg; 12187 long n; 12188 12189 if (indent) { 12190 while (*p && ISSPACE(*p)) p++; 12191 } 12192 n = lex_pend - (p + len); 12193 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 12194 return strncmp(eos, p, len) == 0; 12195 } 12196 12197 static int 12198 parser_here_document(struct parser_params *parser, NODE *here) 12199 { 12200 int c, func, indent = 0; 12201 const char *eos, *p, *pend; 12202 long len; 12203 VALUE str = 0; 12204 rb_encoding *enc = parser->enc; 12205 12206 eos = RSTRING_PTR(here->nd_lit); 12207 len = RSTRING_LEN(here->nd_lit) - 1; 12208 indent = (func = *eos++) & STR_FUNC_INDENT; 12209 12210 if ((c = nextc()) == -1) { 12211 error: 12212 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12213 #ifdef RIPPER 12214 if (NIL_P(parser->delayed)) { 12215 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12216 } 12217 else { 12218 if (str || 12219 ((len = lex_p - parser->tokp) > 0 && 12220 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 12221 rb_str_append(parser->delayed, str); 12222 } 12223 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12224 } 12225 lex_goto_eol(parser); 12226 #endif 12227 restore: 12228 heredoc_restore(lex_strterm); 12229 lex_strterm = 0; 12230 return 0; 12231 } 12232 if (was_bol() && whole_match_p(eos, len, indent)) { 12233 heredoc_restore(lex_strterm); 12234 return tSTRING_END; 12235 } 12236 12237 if (!(func & STR_FUNC_EXPAND)) { 12238 do { 12239 p = RSTRING_PTR(lex_lastline); 12240 pend = lex_pend; 12241 if (pend > p) { 12242 switch (pend[-1]) { 12243 case '\n': 12244 if (--pend == p || pend[-1] != '\r') { 12245 pend++; 12246 break; 12247 } 12248 case '\r': 12249 --pend; 12250 } 12251 } 12252 if (str) 12253 rb_str_cat(str, p, pend - p); 12254 else 12255 str = STR_NEW(p, pend - p); 12256 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 12257 lex_goto_eol(parser); 12258 if (nextc() == -1) { 12259 if (str) dispose_string(str); 12260 goto error; 12261 } 12262 } while (!whole_match_p(eos, len, indent)); 12263 } 12264 else { 12265 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 12266 newtok(); 12267 if (c == '#') { 12268 switch (c = nextc()) { 12269 case '$': 12270 case '@': 12271 pushback(c); 12272 return tSTRING_DVAR; 12273 case '{': 12274 return tSTRING_DBEG; 12275 } 12276 tokadd('#'); 12277 } 12278 do { 12279 pushback(c); 12280 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 12281 if (parser->eofp) goto error; 12282 goto restore; 12283 } 12284 if (c != '\n') { 12285 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12286 return tSTRING_CONTENT; 12287 } 12288 tokadd(nextc()); 12289 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 12290 if ((c = nextc()) == -1) goto error; 12291 } while (!whole_match_p(eos, len, indent)); 12292 str = STR_NEW3(tok(), toklen(), enc, func); 12293 } 12294 #ifdef RIPPER 12295 if (!NIL_P(parser->delayed)) 12296 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12297 lex_goto_eol(parser); 12298 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12299 #endif 12300 heredoc_restore(lex_strterm); 12301 lex_strterm = NEW_STRTERM(-1, 0, 0); 12302 set_yylval_str(str); 12303 return tSTRING_CONTENT; 12304 } 12305 12306 #include "lex.c" 12307 12308 static void 12309 arg_ambiguous_gen(struct parser_params *parser) 12310 { 12311 #ifndef RIPPER 12312 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 12313 #else 12314 dispatch0(arg_ambiguous); 12315 #endif 12316 } 12317 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 12318 12319 static ID 12320 formal_argument_gen(struct parser_params *parser, ID lhs) 12321 { 12322 #ifndef RIPPER 12323 if (!is_local_id(lhs)) 12324 yyerror("formal argument must be local variable"); 12325 #endif 12326 shadowing_lvar(lhs); 12327 return lhs; 12328 } 12329 12330 static int 12331 lvar_defined_gen(struct parser_params *parser, ID id) 12332 { 12333 return (dyna_in_block() && dvar_defined(id)) || local_id(id); 12334 } 12335 12336 /* emacsen -*- hack */ 12337 static long 12338 parser_encode_length(struct parser_params *parser, const char *name, long len) 12339 { 12340 long nlen; 12341 12342 if (len > 5 && name[nlen = len - 5] == '-') { 12343 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 12344 return nlen; 12345 } 12346 if (len > 4 && name[nlen = len - 5] == '-') { 12347 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 12348 return nlen; 12349 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0) 12350 return nlen; 12351 } 12352 return len; 12353 } 12354 12355 static void 12356 parser_set_encode(struct parser_params *parser, const char *name) 12357 { 12358 int idx = rb_enc_find_index(name); 12359 rb_encoding *enc; 12360 VALUE excargs[3]; 12361 12362 if (idx < 0) { 12363 VALUE rb_make_backtrace(void); 12364 VALUE rb_make_exception(int, VALUE*); 12365 12366 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 12367 error: 12368 excargs[0] = rb_eArgError; 12369 excargs[2] = rb_make_backtrace(); 12370 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 12371 rb_exc_raise(rb_make_exception(3, excargs)); 12372 } 12373 enc = rb_enc_from_index(idx); 12374 if (!rb_enc_asciicompat(enc)) { 12375 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 12376 goto error; 12377 } 12378 parser->enc = enc; 12379 } 12380 12381 static int 12382 comment_at_top(struct parser_params *parser) 12383 { 12384 const char *p = lex_pbeg, *pend = lex_p - 1; 12385 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 12386 while (p < pend) { 12387 if (!ISSPACE(*p)) return 0; 12388 p++; 12389 } 12390 return 1; 12391 } 12392 12393 #ifndef RIPPER 12394 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 12395 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 12396 12397 static void 12398 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 12399 { 12400 if (!comment_at_top(parser)) { 12401 return; 12402 } 12403 parser_set_encode(parser, val); 12404 } 12405 12406 struct magic_comment { 12407 const char *name; 12408 rb_magic_comment_setter_t func; 12409 rb_magic_comment_length_t length; 12410 }; 12411 12412 static const struct magic_comment magic_comments[] = { 12413 {"coding", magic_comment_encoding, parser_encode_length}, 12414 {"encoding", magic_comment_encoding, parser_encode_length}, 12415 }; 12416 #endif 12417 12418 static const char * 12419 magic_comment_marker(const char *str, long len) 12420 { 12421 long i = 2; 12422 12423 while (i < len) { 12424 switch (str[i]) { 12425 case '-': 12426 if (str[i-1] == '*' && str[i-2] == '-') { 12427 return str + i + 1; 12428 } 12429 i += 2; 12430 break; 12431 case '*': 12432 if (i + 1 >= len) return 0; 12433 if (str[i+1] != '-') { 12434 i += 4; 12435 } 12436 else if (str[i-1] != '-') { 12437 i += 2; 12438 } 12439 else { 12440 return str + i + 2; 12441 } 12442 break; 12443 default: 12444 i += 3; 12445 break; 12446 } 12447 } 12448 return 0; 12449 } 12450 12451 static int 12452 parser_magic_comment(struct parser_params *parser, const char *str, long len) 12453 { 12454 VALUE name = 0, val = 0; 12455 const char *beg, *end, *vbeg, *vend; 12456 #define str_copy(_s, _p, _n) ((_s) \ 12457 ? (rb_str_resize((_s), (_n)), \ 12458 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 12459 : ((_s) = STR_NEW((_p), (_n)))) 12460 12461 if (len <= 7) return FALSE; 12462 if (!(beg = magic_comment_marker(str, len))) return FALSE; 12463 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 12464 str = beg; 12465 len = end - beg - 3; 12466 12467 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 12468 while (len > 0) { 12469 #ifndef RIPPER 12470 const struct magic_comment *p = magic_comments; 12471 #endif 12472 char *s; 12473 int i; 12474 long n = 0; 12475 12476 for (; len > 0 && *str; str++, --len) { 12477 switch (*str) { 12478 case '\'': case '"': case ':': case ';': 12479 continue; 12480 } 12481 if (!ISSPACE(*str)) break; 12482 } 12483 for (beg = str; len > 0; str++, --len) { 12484 switch (*str) { 12485 case '\'': case '"': case ':': case ';': 12486 break; 12487 default: 12488 if (ISSPACE(*str)) break; 12489 continue; 12490 } 12491 break; 12492 } 12493 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 12494 if (!len) break; 12495 if (*str != ':') continue; 12496 12497 do str++; while (--len > 0 && ISSPACE(*str)); 12498 if (!len) break; 12499 if (*str == '"') { 12500 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 12501 if (*str == '\\') { 12502 --len; 12503 ++str; 12504 } 12505 } 12506 vend = str; 12507 if (len) { 12508 --len; 12509 ++str; 12510 } 12511 } 12512 else { 12513 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 12514 vend = str; 12515 } 12516 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 12517 12518 n = end - beg; 12519 str_copy(name, beg, n); 12520 s = RSTRING_PTR(name); 12521 for (i = 0; i < n; ++i) { 12522 if (s[i] == '-') s[i] = '_'; 12523 } 12524 #ifndef RIPPER 12525 do { 12526 if (STRNCASECMP(p->name, s, n) == 0) { 12527 n = vend - vbeg; 12528 if (p->length) { 12529 n = (*p->length)(parser, vbeg, n); 12530 } 12531 str_copy(val, vbeg, n); 12532 (*p->func)(parser, s, RSTRING_PTR(val)); 12533 break; 12534 } 12535 } while (++p < magic_comments + numberof(magic_comments)); 12536 #else 12537 dispatch2(magic_comment, name, val); 12538 #endif 12539 } 12540 12541 return TRUE; 12542 } 12543 12544 static void 12545 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 12546 { 12547 int sep = 0; 12548 const char *beg = str; 12549 VALUE s; 12550 12551 for (;;) { 12552 if (send - str <= 6) return; 12553 switch (str[6]) { 12554 case 'C': case 'c': str += 6; continue; 12555 case 'O': case 'o': str += 5; continue; 12556 case 'D': case 'd': str += 4; continue; 12557 case 'I': case 'i': str += 3; continue; 12558 case 'N': case 'n': str += 2; continue; 12559 case 'G': case 'g': str += 1; continue; 12560 case '=': case ':': 12561 sep = 1; 12562 str += 6; 12563 break; 12564 default: 12565 str += 6; 12566 if (ISSPACE(*str)) break; 12567 continue; 12568 } 12569 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 12570 } 12571 for (;;) { 12572 do { 12573 if (++str >= send) return; 12574 } while (ISSPACE(*str)); 12575 if (sep) break; 12576 if (*str != '=' && *str != ':') return; 12577 sep = 1; 12578 str++; 12579 } 12580 beg = str; 12581 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 12582 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 12583 parser_set_encode(parser, RSTRING_PTR(s)); 12584 rb_str_resize(s, 0); 12585 } 12586 12587 static void 12588 parser_prepare(struct parser_params *parser) 12589 { 12590 int c = nextc(); 12591 switch (c) { 12592 case '#': 12593 if (peek('!')) parser->has_shebang = 1; 12594 break; 12595 case 0xef: /* UTF-8 BOM marker */ 12596 if (lex_pend - lex_p >= 2 && 12597 (unsigned char)lex_p[0] == 0xbb && 12598 (unsigned char)lex_p[1] == 0xbf) { 12599 parser->enc = rb_utf8_encoding(); 12600 lex_p += 2; 12601 lex_pbeg = lex_p; 12602 return; 12603 } 12604 break; 12605 case EOF: 12606 return; 12607 } 12608 pushback(c); 12609 parser->enc = rb_enc_get(lex_lastline); 12610 } 12611 12612 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) 12613 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) 12614 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) 12615 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 12616 12617 #ifndef RIPPER 12618 #define ambiguous_operator(op, syn) ( \ 12619 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 12620 rb_warning0("even though it seems like "syn"")) 12621 #else 12622 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 12623 #endif 12624 #define warn_balanced(op, syn) \ 12625 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \ 12626 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \ 12627 last_state != EXPR_ENDARG && \ 12628 space_seen && !ISSPACE(c) && \ 12629 (ambiguous_operator(op, syn), 0)) 12630 12631 static int 12632 parser_yylex(struct parser_params *parser) 12633 { 12634 register int c; 12635 int space_seen = 0; 12636 int cmd_state; 12637 enum lex_state_e last_state; 12638 rb_encoding *enc; 12639 int mb; 12640 #ifdef RIPPER 12641 int fallthru = FALSE; 12642 #endif 12643 12644 if (lex_strterm) { 12645 int token; 12646 if (nd_type(lex_strterm) == NODE_HEREDOC) { 12647 token = here_document(lex_strterm); 12648 if (token == tSTRING_END) { 12649 lex_strterm = 0; 12650 lex_state = EXPR_END; 12651 } 12652 } 12653 else { 12654 token = parse_string(lex_strterm); 12655 if (token == tSTRING_END || token == tREGEXP_END) { 12656 rb_gc_force_recycle((VALUE)lex_strterm); 12657 lex_strterm = 0; 12658 lex_state = EXPR_END; 12659 } 12660 } 12661 return token; 12662 } 12663 cmd_state = command_start; 12664 command_start = FALSE; 12665 retry: 12666 last_state = lex_state; 12667 switch (c = nextc()) { 12668 case '\0': /* NUL */ 12669 case '\004': /* ^D */ 12670 case '\032': /* ^Z */ 12671 case -1: /* end of script. */ 12672 return 0; 12673 12674 /* white spaces */ 12675 case ' ': case '\t': case '\f': case '\r': 12676 case '\13': /* '\v' */ 12677 space_seen = 1; 12678 #ifdef RIPPER 12679 while ((c = nextc())) { 12680 switch (c) { 12681 case ' ': case '\t': case '\f': case '\r': 12682 case '\13': /* '\v' */ 12683 break; 12684 default: 12685 goto outofloop; 12686 } 12687 } 12688 outofloop: 12689 pushback(c); 12690 ripper_dispatch_scan_event(parser, tSP); 12691 #endif 12692 goto retry; 12693 12694 case '#': /* it's a comment */ 12695 /* no magic_comment in shebang line */ 12696 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 12697 if (comment_at_top(parser)) { 12698 set_file_encoding(parser, lex_p, lex_pend); 12699 } 12700 } 12701 lex_p = lex_pend; 12702 #ifdef RIPPER 12703 ripper_dispatch_scan_event(parser, tCOMMENT); 12704 fallthru = TRUE; 12705 #endif 12706 /* fall through */ 12707 case '\n': 12708 switch (lex_state) { 12709 case EXPR_BEG: 12710 case EXPR_FNAME: 12711 case EXPR_DOT: 12712 case EXPR_CLASS: 12713 case EXPR_VALUE: 12714 #ifdef RIPPER 12715 if (!fallthru) { 12716 ripper_dispatch_scan_event(parser, tIGNORED_NL); 12717 } 12718 fallthru = FALSE; 12719 #endif 12720 goto retry; 12721 default: 12722 break; 12723 } 12724 while ((c = nextc())) { 12725 switch (c) { 12726 case ' ': case '\t': case '\f': case '\r': 12727 case '\13': /* '\v' */ 12728 space_seen = 1; 12729 break; 12730 case '.': { 12731 if ((c = nextc()) != '.') { 12732 pushback(c); 12733 pushback('.'); 12734 goto retry; 12735 } 12736 } 12737 default: 12738 --ruby_sourceline; 12739 lex_nextline = lex_lastline; 12740 case -1: /* EOF no decrement*/ 12741 lex_goto_eol(parser); 12742 #ifdef RIPPER 12743 if (c != -1) { 12744 parser->tokp = lex_p; 12745 } 12746 #endif 12747 goto normal_newline; 12748 } 12749 } 12750 normal_newline: 12751 command_start = TRUE; 12752 lex_state = EXPR_BEG; 12753 return '\n'; 12754 12755 case '*': 12756 if ((c = nextc()) == '*') { 12757 if ((c = nextc()) == '=') { 12758 set_yylval_id(tPOW); 12759 lex_state = EXPR_BEG; 12760 return tOP_ASGN; 12761 } 12762 pushback(c); 12763 c = tPOW; 12764 } 12765 else { 12766 if (c == '=') { 12767 set_yylval_id('*'); 12768 lex_state = EXPR_BEG; 12769 return tOP_ASGN; 12770 } 12771 pushback(c); 12772 if (IS_SPCARG(c)) { 12773 rb_warning0("`*' interpreted as argument prefix"); 12774 c = tSTAR; 12775 } 12776 else if (IS_BEG()) { 12777 c = tSTAR; 12778 } 12779 else { 12780 warn_balanced("*", "argument prefix"); 12781 c = '*'; 12782 } 12783 } 12784 switch (lex_state) { 12785 case EXPR_FNAME: case EXPR_DOT: 12786 lex_state = EXPR_ARG; break; 12787 default: 12788 lex_state = EXPR_BEG; break; 12789 } 12790 return c; 12791 12792 case '!': 12793 c = nextc(); 12794 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12795 lex_state = EXPR_ARG; 12796 if (c == '@') { 12797 return '!'; 12798 } 12799 } 12800 else { 12801 lex_state = EXPR_BEG; 12802 } 12803 if (c == '=') { 12804 return tNEQ; 12805 } 12806 if (c == '~') { 12807 return tNMATCH; 12808 } 12809 pushback(c); 12810 return '!'; 12811 12812 case '=': 12813 if (was_bol()) { 12814 /* skip embedded rd document */ 12815 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 12816 #ifdef RIPPER 12817 int first_p = TRUE; 12818 12819 lex_goto_eol(parser); 12820 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 12821 #endif 12822 for (;;) { 12823 lex_goto_eol(parser); 12824 #ifdef RIPPER 12825 if (!first_p) { 12826 ripper_dispatch_scan_event(parser, tEMBDOC); 12827 } 12828 first_p = FALSE; 12829 #endif 12830 c = nextc(); 12831 if (c == -1) { 12832 compile_error(PARSER_ARG "embedded document meets end of file"); 12833 return 0; 12834 } 12835 if (c != '=') continue; 12836 if (strncmp(lex_p, "end", 3) == 0 && 12837 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 12838 break; 12839 } 12840 } 12841 lex_goto_eol(parser); 12842 #ifdef RIPPER 12843 ripper_dispatch_scan_event(parser, tEMBDOC_END); 12844 #endif 12845 goto retry; 12846 } 12847 } 12848 12849 switch (lex_state) { 12850 case EXPR_FNAME: case EXPR_DOT: 12851 lex_state = EXPR_ARG; break; 12852 default: 12853 lex_state = EXPR_BEG; break; 12854 } 12855 if ((c = nextc()) == '=') { 12856 if ((c = nextc()) == '=') { 12857 return tEQQ; 12858 } 12859 pushback(c); 12860 return tEQ; 12861 } 12862 if (c == '~') { 12863 return tMATCH; 12864 } 12865 else if (c == '>') { 12866 return tASSOC; 12867 } 12868 pushback(c); 12869 return '='; 12870 12871 case '<': 12872 last_state = lex_state; 12873 c = nextc(); 12874 if (c == '<' && 12875 lex_state != EXPR_DOT && 12876 lex_state != EXPR_CLASS && 12877 !IS_END() && 12878 (!IS_ARG() || space_seen)) { 12879 int token = heredoc_identifier(); 12880 if (token) return token; 12881 } 12882 switch (lex_state) { 12883 case EXPR_FNAME: case EXPR_DOT: 12884 lex_state = EXPR_ARG; break; 12885 default: 12886 lex_state = EXPR_BEG; break; 12887 } 12888 if (c == '=') { 12889 if ((c = nextc()) == '>') { 12890 return tCMP; 12891 } 12892 pushback(c); 12893 return tLEQ; 12894 } 12895 if (c == '<') { 12896 if ((c = nextc()) == '=') { 12897 set_yylval_id(tLSHFT); 12898 lex_state = EXPR_BEG; 12899 return tOP_ASGN; 12900 } 12901 pushback(c); 12902 warn_balanced("<<", "here document"); 12903 return tLSHFT; 12904 } 12905 pushback(c); 12906 return '<'; 12907 12908 case '>': 12909 switch (lex_state) { 12910 case EXPR_FNAME: case EXPR_DOT: 12911 lex_state = EXPR_ARG; break; 12912 default: 12913 lex_state = EXPR_BEG; break; 12914 } 12915 if ((c = nextc()) == '=') { 12916 return tGEQ; 12917 } 12918 if (c == '>') { 12919 if ((c = nextc()) == '=') { 12920 set_yylval_id(tRSHFT); 12921 lex_state = EXPR_BEG; 12922 return tOP_ASGN; 12923 } 12924 pushback(c); 12925 return tRSHFT; 12926 } 12927 pushback(c); 12928 return '>'; 12929 12930 case '"': 12931 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 12932 return tSTRING_BEG; 12933 12934 case '`': 12935 if (lex_state == EXPR_FNAME) { 12936 lex_state = EXPR_ENDFN; 12937 return c; 12938 } 12939 if (lex_state == EXPR_DOT) { 12940 if (cmd_state) 12941 lex_state = EXPR_CMDARG; 12942 else 12943 lex_state = EXPR_ARG; 12944 return c; 12945 } 12946 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 12947 return tXSTRING_BEG; 12948 12949 case '\'': 12950 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 12951 return tSTRING_BEG; 12952 12953 case '?': 12954 if (IS_END()) { 12955 lex_state = EXPR_VALUE; 12956 return '?'; 12957 } 12958 c = nextc(); 12959 if (c == -1) { 12960 compile_error(PARSER_ARG "incomplete character syntax"); 12961 return 0; 12962 } 12963 if (rb_enc_isspace(c, parser->enc)) { 12964 if (!IS_ARG()) { 12965 int c2 = 0; 12966 switch (c) { 12967 case ' ': 12968 c2 = 's'; 12969 break; 12970 case '\n': 12971 c2 = 'n'; 12972 break; 12973 case '\t': 12974 c2 = 't'; 12975 break; 12976 case '\v': 12977 c2 = 'v'; 12978 break; 12979 case '\r': 12980 c2 = 'r'; 12981 break; 12982 case '\f': 12983 c2 = 'f'; 12984 break; 12985 } 12986 if (c2) { 12987 rb_warnI("invalid character syntax; use ?\\%c", c2); 12988 } 12989 } 12990 ternary: 12991 pushback(c); 12992 lex_state = EXPR_VALUE; 12993 return '?'; 12994 } 12995 newtok(); 12996 enc = parser->enc; 12997 if (!parser_isascii()) { 12998 if (tokadd_mbchar(c) == -1) return 0; 12999 } 13000 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && 13001 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { 13002 goto ternary; 13003 } 13004 else if (c == '\\') { 13005 if (peek('u')) { 13006 nextc(); 13007 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 13008 if (0x80 <= c) { 13009 tokaddmbc(c, enc); 13010 } 13011 else { 13012 tokadd(c); 13013 } 13014 } 13015 else { 13016 c = read_escape(0, &enc); 13017 tokadd(c); 13018 } 13019 } 13020 else { 13021 tokadd(c); 13022 } 13023 tokfix(); 13024 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 13025 lex_state = EXPR_END; 13026 return tCHAR; 13027 13028 case '&': 13029 if ((c = nextc()) == '&') { 13030 lex_state = EXPR_BEG; 13031 if ((c = nextc()) == '=') { 13032 set_yylval_id(tANDOP); 13033 lex_state = EXPR_BEG; 13034 return tOP_ASGN; 13035 } 13036 pushback(c); 13037 return tANDOP; 13038 } 13039 else if (c == '=') { 13040 set_yylval_id('&'); 13041 lex_state = EXPR_BEG; 13042 return tOP_ASGN; 13043 } 13044 pushback(c); 13045 if (IS_SPCARG(c)) { 13046 rb_warning0("`&' interpreted as argument prefix"); 13047 c = tAMPER; 13048 } 13049 else if (IS_BEG()) { 13050 c = tAMPER; 13051 } 13052 else { 13053 warn_balanced("&", "argument prefix"); 13054 c = '&'; 13055 } 13056 switch (lex_state) { 13057 case EXPR_FNAME: case EXPR_DOT: 13058 lex_state = EXPR_ARG; break; 13059 default: 13060 lex_state = EXPR_BEG; 13061 } 13062 return c; 13063 13064 case '|': 13065 if ((c = nextc()) == '|') { 13066 lex_state = EXPR_BEG; 13067 if ((c = nextc()) == '=') { 13068 set_yylval_id(tOROP); 13069 lex_state = EXPR_BEG; 13070 return tOP_ASGN; 13071 } 13072 pushback(c); 13073 return tOROP; 13074 } 13075 if (c == '=') { 13076 set_yylval_id('|'); 13077 lex_state = EXPR_BEG; 13078 return tOP_ASGN; 13079 } 13080 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13081 lex_state = EXPR_ARG; 13082 } 13083 else { 13084 lex_state = EXPR_BEG; 13085 } 13086 pushback(c); 13087 return '|'; 13088 13089 case '+': 13090 c = nextc(); 13091 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13092 lex_state = EXPR_ARG; 13093 if (c == '@') { 13094 return tUPLUS; 13095 } 13096 pushback(c); 13097 return '+'; 13098 } 13099 if (c == '=') { 13100 set_yylval_id('+'); 13101 lex_state = EXPR_BEG; 13102 return tOP_ASGN; 13103 } 13104 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13105 lex_state = EXPR_BEG; 13106 pushback(c); 13107 if (c != -1 && ISDIGIT(c)) { 13108 c = '+'; 13109 goto start_num; 13110 } 13111 return tUPLUS; 13112 } 13113 lex_state = EXPR_BEG; 13114 pushback(c); 13115 warn_balanced("+", "unary operator"); 13116 return '+'; 13117 13118 case '-': 13119 c = nextc(); 13120 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13121 lex_state = EXPR_ARG; 13122 if (c == '@') { 13123 return tUMINUS; 13124 } 13125 pushback(c); 13126 return '-'; 13127 } 13128 if (c == '=') { 13129 set_yylval_id('-'); 13130 lex_state = EXPR_BEG; 13131 return tOP_ASGN; 13132 } 13133 if (c == '>') { 13134 lex_state = EXPR_ARG; 13135 return tLAMBDA; 13136 } 13137 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13138 lex_state = EXPR_BEG; 13139 pushback(c); 13140 if (c != -1 && ISDIGIT(c)) { 13141 return tUMINUS_NUM; 13142 } 13143 return tUMINUS; 13144 } 13145 lex_state = EXPR_BEG; 13146 pushback(c); 13147 warn_balanced("-", "unary operator"); 13148 return '-'; 13149 13150 case '.': 13151 lex_state = EXPR_BEG; 13152 if ((c = nextc()) == '.') { 13153 if ((c = nextc()) == '.') { 13154 return tDOT3; 13155 } 13156 pushback(c); 13157 return tDOT2; 13158 } 13159 pushback(c); 13160 if (c != -1 && ISDIGIT(c)) { 13161 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13162 } 13163 lex_state = EXPR_DOT; 13164 return '.'; 13165 13166 start_num: 13167 case '0': case '1': case '2': case '3': case '4': 13168 case '5': case '6': case '7': case '8': case '9': 13169 { 13170 int is_float, seen_point, seen_e, nondigit; 13171 13172 is_float = seen_point = seen_e = nondigit = 0; 13173 lex_state = EXPR_END; 13174 newtok(); 13175 if (c == '-' || c == '+') { 13176 tokadd(c); 13177 c = nextc(); 13178 } 13179 if (c == '0') { 13180 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13181 int start = toklen(); 13182 c = nextc(); 13183 if (c == 'x' || c == 'X') { 13184 /* hexadecimal */ 13185 c = nextc(); 13186 if (c != -1 && ISXDIGIT(c)) { 13187 do { 13188 if (c == '_') { 13189 if (nondigit) break; 13190 nondigit = c; 13191 continue; 13192 } 13193 if (!ISXDIGIT(c)) break; 13194 nondigit = 0; 13195 tokadd(c); 13196 } while ((c = nextc()) != -1); 13197 } 13198 pushback(c); 13199 tokfix(); 13200 if (toklen() == start) { 13201 no_digits(); 13202 } 13203 else if (nondigit) goto trailing_uc; 13204 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13205 return tINTEGER; 13206 } 13207 if (c == 'b' || c == 'B') { 13208 /* binary */ 13209 c = nextc(); 13210 if (c == '0' || c == '1') { 13211 do { 13212 if (c == '_') { 13213 if (nondigit) break; 13214 nondigit = c; 13215 continue; 13216 } 13217 if (c != '0' && c != '1') break; 13218 nondigit = 0; 13219 tokadd(c); 13220 } while ((c = nextc()) != -1); 13221 } 13222 pushback(c); 13223 tokfix(); 13224 if (toklen() == start) { 13225 no_digits(); 13226 } 13227 else if (nondigit) goto trailing_uc; 13228 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 13229 return tINTEGER; 13230 } 13231 if (c == 'd' || c == 'D') { 13232 /* decimal */ 13233 c = nextc(); 13234 if (c != -1 && ISDIGIT(c)) { 13235 do { 13236 if (c == '_') { 13237 if (nondigit) break; 13238 nondigit = c; 13239 continue; 13240 } 13241 if (!ISDIGIT(c)) break; 13242 nondigit = 0; 13243 tokadd(c); 13244 } while ((c = nextc()) != -1); 13245 } 13246 pushback(c); 13247 tokfix(); 13248 if (toklen() == start) { 13249 no_digits(); 13250 } 13251 else if (nondigit) goto trailing_uc; 13252 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13253 return tINTEGER; 13254 } 13255 if (c == '_') { 13256 /* 0_0 */ 13257 goto octal_number; 13258 } 13259 if (c == 'o' || c == 'O') { 13260 /* prefixed octal */ 13261 c = nextc(); 13262 if (c == -1 || c == '_' || !ISDIGIT(c)) { 13263 no_digits(); 13264 } 13265 } 13266 if (c >= '0' && c <= '7') { 13267 /* octal */ 13268 octal_number: 13269 do { 13270 if (c == '_') { 13271 if (nondigit) break; 13272 nondigit = c; 13273 continue; 13274 } 13275 if (c < '0' || c > '9') break; 13276 if (c > '7') goto invalid_octal; 13277 nondigit = 0; 13278 tokadd(c); 13279 } while ((c = nextc()) != -1); 13280 if (toklen() > start) { 13281 pushback(c); 13282 tokfix(); 13283 if (nondigit) goto trailing_uc; 13284 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 13285 return tINTEGER; 13286 } 13287 if (nondigit) { 13288 pushback(c); 13289 goto trailing_uc; 13290 } 13291 } 13292 if (c > '7' && c <= '9') { 13293 invalid_octal: 13294 yyerror("Invalid octal digit"); 13295 } 13296 else if (c == '.' || c == 'e' || c == 'E') { 13297 tokadd('0'); 13298 } 13299 else { 13300 pushback(c); 13301 set_yylval_literal(INT2FIX(0)); 13302 return tINTEGER; 13303 } 13304 } 13305 13306 for (;;) { 13307 switch (c) { 13308 case '0': case '1': case '2': case '3': case '4': 13309 case '5': case '6': case '7': case '8': case '9': 13310 nondigit = 0; 13311 tokadd(c); 13312 break; 13313 13314 case '.': 13315 if (nondigit) goto trailing_uc; 13316 if (seen_point || seen_e) { 13317 goto decode_num; 13318 } 13319 else { 13320 int c0 = nextc(); 13321 if (c0 == -1 || !ISDIGIT(c0)) { 13322 pushback(c0); 13323 goto decode_num; 13324 } 13325 c = c0; 13326 } 13327 tokadd('.'); 13328 tokadd(c); 13329 is_float++; 13330 seen_point++; 13331 nondigit = 0; 13332 break; 13333 13334 case 'e': 13335 case 'E': 13336 if (nondigit) { 13337 pushback(c); 13338 c = nondigit; 13339 goto decode_num; 13340 } 13341 if (seen_e) { 13342 goto decode_num; 13343 } 13344 tokadd(c); 13345 seen_e++; 13346 is_float++; 13347 nondigit = c; 13348 c = nextc(); 13349 if (c != '-' && c != '+') continue; 13350 tokadd(c); 13351 nondigit = c; 13352 break; 13353 13354 case '_': /* `_' in number just ignored */ 13355 if (nondigit) goto decode_num; 13356 nondigit = c; 13357 break; 13358 13359 default: 13360 goto decode_num; 13361 } 13362 c = nextc(); 13363 } 13364 13365 decode_num: 13366 pushback(c); 13367 if (nondigit) { 13368 char tmp[30]; 13369 trailing_uc: 13370 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 13371 yyerror(tmp); 13372 } 13373 tokfix(); 13374 if (is_float) { 13375 double d = strtod(tok(), 0); 13376 if (errno == ERANGE) { 13377 rb_warningS("Float %s out of range", tok()); 13378 errno = 0; 13379 } 13380 set_yylval_literal(DBL2NUM(d)); 13381 return tFLOAT; 13382 } 13383 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13384 return tINTEGER; 13385 } 13386 13387 case ')': 13388 case ']': 13389 paren_nest--; 13390 case '}': 13391 COND_LEXPOP(); 13392 CMDARG_LEXPOP(); 13393 if (c == ')') 13394 lex_state = EXPR_ENDFN; 13395 else 13396 lex_state = EXPR_ENDARG; 13397 return c; 13398 13399 case ':': 13400 c = nextc(); 13401 if (c == ':') { 13402 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) { 13403 lex_state = EXPR_BEG; 13404 return tCOLON3; 13405 } 13406 lex_state = EXPR_DOT; 13407 return tCOLON2; 13408 } 13409 if (IS_END() || ISSPACE(c)) { 13410 pushback(c); 13411 warn_balanced(":", "symbol literal"); 13412 lex_state = EXPR_BEG; 13413 return ':'; 13414 } 13415 switch (c) { 13416 case '\'': 13417 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 13418 break; 13419 case '"': 13420 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 13421 break; 13422 default: 13423 pushback(c); 13424 break; 13425 } 13426 lex_state = EXPR_FNAME; 13427 return tSYMBEG; 13428 13429 case '/': 13430 if (IS_BEG()) { 13431 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13432 return tREGEXP_BEG; 13433 } 13434 if ((c = nextc()) == '=') { 13435 set_yylval_id('/'); 13436 lex_state = EXPR_BEG; 13437 return tOP_ASGN; 13438 } 13439 pushback(c); 13440 if (IS_SPCARG(c)) { 13441 arg_ambiguous(); 13442 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13443 return tREGEXP_BEG; 13444 } 13445 switch (lex_state) { 13446 case EXPR_FNAME: case EXPR_DOT: 13447 lex_state = EXPR_ARG; break; 13448 default: 13449 lex_state = EXPR_BEG; break; 13450 } 13451 warn_balanced("/", "regexp literal"); 13452 return '/'; 13453 13454 case '^': 13455 if ((c = nextc()) == '=') { 13456 set_yylval_id('^'); 13457 lex_state = EXPR_BEG; 13458 return tOP_ASGN; 13459 } 13460 switch (lex_state) { 13461 case EXPR_FNAME: case EXPR_DOT: 13462 lex_state = EXPR_ARG; break; 13463 default: 13464 lex_state = EXPR_BEG; break; 13465 } 13466 pushback(c); 13467 return '^'; 13468 13469 case ';': 13470 lex_state = EXPR_BEG; 13471 command_start = TRUE; 13472 return ';'; 13473 13474 case ',': 13475 lex_state = EXPR_BEG; 13476 return ','; 13477 13478 case '~': 13479 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13480 if ((c = nextc()) != '@') { 13481 pushback(c); 13482 } 13483 lex_state = EXPR_ARG; 13484 } 13485 else { 13486 lex_state = EXPR_BEG; 13487 } 13488 return '~'; 13489 13490 case '(': 13491 if (IS_BEG()) { 13492 c = tLPAREN; 13493 } 13494 else if (IS_SPCARG(-1)) { 13495 c = tLPAREN_ARG; 13496 } 13497 paren_nest++; 13498 COND_PUSH(0); 13499 CMDARG_PUSH(0); 13500 lex_state = EXPR_BEG; 13501 return c; 13502 13503 case '[': 13504 paren_nest++; 13505 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13506 lex_state = EXPR_ARG; 13507 if ((c = nextc()) == ']') { 13508 if ((c = nextc()) == '=') { 13509 return tASET; 13510 } 13511 pushback(c); 13512 return tAREF; 13513 } 13514 pushback(c); 13515 return '['; 13516 } 13517 else if (IS_BEG()) { 13518 c = tLBRACK; 13519 } 13520 else if (IS_ARG() && space_seen) { 13521 c = tLBRACK; 13522 } 13523 lex_state = EXPR_BEG; 13524 COND_PUSH(0); 13525 CMDARG_PUSH(0); 13526 return c; 13527 13528 case '{': 13529 if (lpar_beg && lpar_beg == paren_nest) { 13530 lex_state = EXPR_BEG; 13531 lpar_beg = 0; 13532 --paren_nest; 13533 COND_PUSH(0); 13534 CMDARG_PUSH(0); 13535 return tLAMBEG; 13536 } 13537 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN) 13538 c = '{'; /* block (primary) */ 13539 else if (lex_state == EXPR_ENDARG) 13540 c = tLBRACE_ARG; /* block (expr) */ 13541 else 13542 c = tLBRACE; /* hash */ 13543 COND_PUSH(0); 13544 CMDARG_PUSH(0); 13545 lex_state = EXPR_BEG; 13546 if (c != tLBRACE) command_start = TRUE; 13547 return c; 13548 13549 case '\\': 13550 c = nextc(); 13551 if (c == '\n') { 13552 space_seen = 1; 13553 #ifdef RIPPER 13554 ripper_dispatch_scan_event(parser, tSP); 13555 #endif 13556 goto retry; /* skip \\n */ 13557 } 13558 pushback(c); 13559 return '\\'; 13560 13561 case '%': 13562 if (IS_BEG()) { 13563 int term; 13564 int paren; 13565 13566 c = nextc(); 13567 quotation: 13568 if (c == -1 || !ISALNUM(c)) { 13569 term = c; 13570 c = 'Q'; 13571 } 13572 else { 13573 term = nextc(); 13574 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { 13575 yyerror("unknown type of %string"); 13576 return 0; 13577 } 13578 } 13579 if (c == -1 || term == -1) { 13580 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 13581 return 0; 13582 } 13583 paren = term; 13584 if (term == '(') term = ')'; 13585 else if (term == '[') term = ']'; 13586 else if (term == '{') term = '}'; 13587 else if (term == '<') term = '>'; 13588 else paren = 0; 13589 13590 switch (c) { 13591 case 'Q': 13592 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 13593 return tSTRING_BEG; 13594 13595 case 'q': 13596 lex_strterm = NEW_STRTERM(str_squote, term, paren); 13597 return tSTRING_BEG; 13598 13599 case 'W': 13600 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13601 do {c = nextc();} while (ISSPACE(c)); 13602 pushback(c); 13603 return tWORDS_BEG; 13604 13605 case 'w': 13606 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13607 do {c = nextc();} while (ISSPACE(c)); 13608 pushback(c); 13609 return tQWORDS_BEG; 13610 13611 case 'x': 13612 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 13613 return tXSTRING_BEG; 13614 13615 case 'r': 13616 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 13617 return tREGEXP_BEG; 13618 13619 case 's': 13620 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 13621 lex_state = EXPR_FNAME; 13622 return tSYMBEG; 13623 13624 default: 13625 yyerror("unknown type of %string"); 13626 return 0; 13627 } 13628 } 13629 if ((c = nextc()) == '=') { 13630 set_yylval_id('%'); 13631 lex_state = EXPR_BEG; 13632 return tOP_ASGN; 13633 } 13634 if (IS_SPCARG(c)) { 13635 goto quotation; 13636 } 13637 switch (lex_state) { 13638 case EXPR_FNAME: case EXPR_DOT: 13639 lex_state = EXPR_ARG; break; 13640 default: 13641 lex_state = EXPR_BEG; break; 13642 } 13643 pushback(c); 13644 warn_balanced("%%", "string literal"); 13645 return '%'; 13646 13647 case '$': 13648 lex_state = EXPR_END; 13649 newtok(); 13650 c = nextc(); 13651 switch (c) { 13652 case '_': /* $_: last read line string */ 13653 c = nextc(); 13654 if (parser_is_identchar()) { 13655 tokadd('$'); 13656 tokadd('_'); 13657 break; 13658 } 13659 pushback(c); 13660 c = '_'; 13661 /* fall through */ 13662 case '~': /* $~: match-data */ 13663 case '*': /* $*: argv */ 13664 case '$': /* $$: pid */ 13665 case '?': /* $?: last status */ 13666 case '!': /* $!: error string */ 13667 case '@': /* $@: error position */ 13668 case '/': /* $/: input record separator */ 13669 case '\\': /* $\: output record separator */ 13670 case ';': /* $;: field separator */ 13671 case ',': /* $,: output field separator */ 13672 case '.': /* $.: last read line number */ 13673 case '=': /* $=: ignorecase */ 13674 case ':': /* $:: load path */ 13675 case '<': /* $<: reading filename */ 13676 case '>': /* $>: default output handle */ 13677 case '\"': /* $": already loaded files */ 13678 tokadd('$'); 13679 tokadd(c); 13680 tokfix(); 13681 set_yylval_name(rb_intern(tok())); 13682 return tGVAR; 13683 13684 case '-': 13685 tokadd('$'); 13686 tokadd(c); 13687 c = nextc(); 13688 if (parser_is_identchar()) { 13689 if (tokadd_mbchar(c) == -1) return 0; 13690 } 13691 else { 13692 pushback(c); 13693 } 13694 gvar: 13695 tokfix(); 13696 set_yylval_name(rb_intern(tok())); 13697 return tGVAR; 13698 13699 case '&': /* $&: last match */ 13700 case '`': /* $`: string before last match */ 13701 case '\'': /* $': string after last match */ 13702 case '+': /* $+: string matches last paren. */ 13703 if (last_state == EXPR_FNAME) { 13704 tokadd('$'); 13705 tokadd(c); 13706 goto gvar; 13707 } 13708 set_yylval_node(NEW_BACK_REF(c)); 13709 return tBACK_REF; 13710 13711 case '1': case '2': case '3': 13712 case '4': case '5': case '6': 13713 case '7': case '8': case '9': 13714 tokadd('$'); 13715 do { 13716 tokadd(c); 13717 c = nextc(); 13718 } while (c != -1 && ISDIGIT(c)); 13719 pushback(c); 13720 if (last_state == EXPR_FNAME) goto gvar; 13721 tokfix(); 13722 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 13723 return tNTH_REF; 13724 13725 default: 13726 if (!parser_is_identchar()) { 13727 pushback(c); 13728 return '$'; 13729 } 13730 case '0': 13731 tokadd('$'); 13732 } 13733 break; 13734 13735 case '@': 13736 c = nextc(); 13737 newtok(); 13738 tokadd('@'); 13739 if (c == '@') { 13740 tokadd('@'); 13741 c = nextc(); 13742 } 13743 if (c != -1 && ISDIGIT(c)) { 13744 if (tokidx == 1) { 13745 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 13746 } 13747 else { 13748 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 13749 } 13750 return 0; 13751 } 13752 if (!parser_is_identchar()) { 13753 pushback(c); 13754 return '@'; 13755 } 13756 break; 13757 13758 case '_': 13759 if (was_bol() && whole_match_p("__END__", 7, 0)) { 13760 ruby__end__seen = 1; 13761 parser->eofp = Qtrue; 13762 #ifndef RIPPER 13763 return -1; 13764 #else 13765 lex_goto_eol(parser); 13766 ripper_dispatch_scan_event(parser, k__END__); 13767 return 0; 13768 #endif 13769 } 13770 newtok(); 13771 break; 13772 13773 default: 13774 if (!parser_is_identchar()) { 13775 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 13776 goto retry; 13777 } 13778 13779 newtok(); 13780 break; 13781 } 13782 13783 mb = ENC_CODERANGE_7BIT; 13784 do { 13785 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 13786 if (tokadd_mbchar(c) == -1) return 0; 13787 c = nextc(); 13788 } while (parser_is_identchar()); 13789 switch (tok()[0]) { 13790 case '@': case '$': 13791 pushback(c); 13792 break; 13793 default: 13794 if ((c == '!' || c == '?') && !peek('=')) { 13795 tokadd(c); 13796 } 13797 else { 13798 pushback(c); 13799 } 13800 } 13801 tokfix(); 13802 13803 { 13804 int result = 0; 13805 13806 last_state = lex_state; 13807 switch (tok()[0]) { 13808 case '$': 13809 lex_state = EXPR_END; 13810 result = tGVAR; 13811 break; 13812 case '@': 13813 lex_state = EXPR_END; 13814 if (tok()[1] == '@') 13815 result = tCVAR; 13816 else 13817 result = tIVAR; 13818 break; 13819 13820 default: 13821 if (toklast() == '!' || toklast() == '?') { 13822 result = tFID; 13823 } 13824 else { 13825 if (lex_state == EXPR_FNAME) { 13826 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 13827 (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) { 13828 result = tIDENTIFIER; 13829 tokadd(c); 13830 tokfix(); 13831 } 13832 else { 13833 pushback(c); 13834 } 13835 } 13836 if (result == 0 && ISUPPER(tok()[0])) { 13837 result = tCONSTANT; 13838 } 13839 else { 13840 result = tIDENTIFIER; 13841 } 13842 } 13843 13844 if ((lex_state == EXPR_BEG && !cmd_state) || 13845 IS_ARG()) { 13846 if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) { 13847 lex_state = EXPR_BEG; 13848 nextc(); 13849 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 13850 return tLABEL; 13851 } 13852 } 13853 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { 13854 const struct kwtable *kw; 13855 13856 /* See if it is a reserved word. */ 13857 kw = rb_reserved_word(tok(), toklen()); 13858 if (kw) { 13859 enum lex_state_e state = lex_state; 13860 lex_state = kw->state; 13861 if (state == EXPR_FNAME) { 13862 set_yylval_name(rb_intern(kw->name)); 13863 return kw->id[0]; 13864 } 13865 if (kw->id[0] == keyword_do) { 13866 command_start = TRUE; 13867 if (lpar_beg && lpar_beg == paren_nest) { 13868 lpar_beg = 0; 13869 --paren_nest; 13870 return keyword_do_LAMBDA; 13871 } 13872 if (COND_P()) return keyword_do_cond; 13873 if (CMDARG_P() && state != EXPR_CMDARG) 13874 return keyword_do_block; 13875 if (state == EXPR_ENDARG || state == EXPR_BEG) 13876 return keyword_do_block; 13877 return keyword_do; 13878 } 13879 if (state == EXPR_BEG || state == EXPR_VALUE) 13880 return kw->id[0]; 13881 else { 13882 if (kw->id[0] != kw->id[1]) 13883 lex_state = EXPR_BEG; 13884 return kw->id[1]; 13885 } 13886 } 13887 } 13888 13889 if (IS_BEG() || 13890 lex_state == EXPR_DOT || 13891 IS_ARG()) { 13892 if (cmd_state) { 13893 lex_state = EXPR_CMDARG; 13894 } 13895 else { 13896 lex_state = EXPR_ARG; 13897 } 13898 } 13899 else if (lex_state == EXPR_FNAME) { 13900 lex_state = EXPR_ENDFN; 13901 } 13902 else { 13903 lex_state = EXPR_END; 13904 } 13905 } 13906 { 13907 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 13908 13909 set_yylval_name(ident); 13910 if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { 13911 lex_state = EXPR_END; 13912 } 13913 } 13914 return result; 13915 } 13916 } 13917 13918 #if YYPURE 13919 static int 13920 yylex(void *lval, void *p) 13921 #else 13922 yylex(void *p) 13923 #endif 13924 { 13925 struct parser_params *parser = (struct parser_params*)p; 13926 int t; 13927 13928 #if YYPURE 13929 parser->parser_yylval = lval; 13930 parser->parser_yylval->val = Qundef; 13931 #endif 13932 t = parser_yylex(parser); 13933 #ifdef RIPPER 13934 if (!NIL_P(parser->delayed)) { 13935 ripper_dispatch_delayed_token(parser, t); 13936 } 13937 if (t != 0) 13938 ripper_dispatch_scan_event(parser, t); 13939 #endif 13940 13941 return t; 13942 } 13943 13944 #ifndef RIPPER 13945 static NODE* 13946 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 13947 { 13948 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 13949 nd_set_line(n, ruby_sourceline); 13950 return n; 13951 } 13952 13953 enum node_type 13954 nodetype(NODE *node) /* for debug */ 13955 { 13956 return (enum node_type)nd_type(node); 13957 } 13958 13959 int 13960 nodeline(NODE *node) 13961 { 13962 return nd_line(node); 13963 } 13964 13965 static NODE* 13966 newline_node(NODE *node) 13967 { 13968 if (node) { 13969 node = remove_begin(node); 13970 node->flags |= NODE_FL_NEWLINE; 13971 } 13972 return node; 13973 } 13974 13975 static void 13976 fixpos(NODE *node, NODE *orig) 13977 { 13978 if (!node) return; 13979 if (!orig) return; 13980 if (orig == (NODE*)1) return; 13981 nd_set_line(node, nd_line(orig)); 13982 } 13983 13984 static void 13985 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 13986 { 13987 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 13988 } 13989 #define parser_warning(node, mesg) parser_warning(parser, node, mesg) 13990 13991 static void 13992 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 13993 { 13994 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 13995 } 13996 #define parser_warn(node, mesg) parser_warn(parser, node, mesg) 13997 13998 static NODE* 13999 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 14000 { 14001 NODE *end, *h = head, *nd; 14002 14003 if (tail == 0) return head; 14004 14005 if (h == 0) return tail; 14006 switch (nd_type(h)) { 14007 case NODE_LIT: 14008 case NODE_STR: 14009 case NODE_SELF: 14010 case NODE_TRUE: 14011 case NODE_FALSE: 14012 case NODE_NIL: 14013 parser_warning(h, "unused literal ignored"); 14014 return tail; 14015 default: 14016 h = end = NEW_BLOCK(head); 14017 end->nd_end = end; 14018 fixpos(end, head); 14019 head = end; 14020 break; 14021 case NODE_BLOCK: 14022 end = h->nd_end; 14023 break; 14024 } 14025 14026 nd = end->nd_head; 14027 switch (nd_type(nd)) { 14028 case NODE_RETURN: 14029 case NODE_BREAK: 14030 case NODE_NEXT: 14031 case NODE_REDO: 14032 case NODE_RETRY: 14033 if (RTEST(ruby_verbose)) { 14034 parser_warning(nd, "statement not reached"); 14035 } 14036 break; 14037 14038 default: 14039 break; 14040 } 14041 14042 if (nd_type(tail) != NODE_BLOCK) { 14043 tail = NEW_BLOCK(tail); 14044 tail->nd_end = tail; 14045 } 14046 end->nd_next = tail; 14047 h->nd_end = tail->nd_end; 14048 return head; 14049 } 14050 14051 /* append item to the list */ 14052 static NODE* 14053 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 14054 { 14055 NODE *last; 14056 14057 if (list == 0) return NEW_LIST(item); 14058 if (list->nd_next) { 14059 last = list->nd_next->nd_end; 14060 } 14061 else { 14062 last = list; 14063 } 14064 14065 list->nd_alen += 1; 14066 last->nd_next = NEW_LIST(item); 14067 list->nd_next->nd_end = last->nd_next; 14068 return list; 14069 } 14070 14071 /* concat two lists */ 14072 static NODE* 14073 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14074 { 14075 NODE *last; 14076 14077 if (head->nd_next) { 14078 last = head->nd_next->nd_end; 14079 } 14080 else { 14081 last = head; 14082 } 14083 14084 head->nd_alen += tail->nd_alen; 14085 last->nd_next = tail; 14086 if (tail->nd_next) { 14087 head->nd_next->nd_end = tail->nd_next->nd_end; 14088 } 14089 else { 14090 head->nd_next->nd_end = tail; 14091 } 14092 14093 return head; 14094 } 14095 14096 static int 14097 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 14098 { 14099 if (NIL_P(tail)) return 1; 14100 if (!rb_enc_compatible(head, tail)) { 14101 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 14102 rb_enc_name(rb_enc_get(head)), 14103 rb_enc_name(rb_enc_get(tail))); 14104 rb_str_resize(head, 0); 14105 rb_str_resize(tail, 0); 14106 return 0; 14107 } 14108 rb_str_buf_append(head, tail); 14109 return 1; 14110 } 14111 14112 /* concat two string literals */ 14113 static NODE * 14114 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14115 { 14116 enum node_type htype; 14117 14118 if (!head) return tail; 14119 if (!tail) return head; 14120 14121 htype = nd_type(head); 14122 if (htype == NODE_EVSTR) { 14123 NODE *node = NEW_DSTR(Qnil); 14124 head = list_append(node, head); 14125 } 14126 switch (nd_type(tail)) { 14127 case NODE_STR: 14128 if (htype == NODE_STR) { 14129 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { 14130 error: 14131 rb_gc_force_recycle((VALUE)head); 14132 rb_gc_force_recycle((VALUE)tail); 14133 return 0; 14134 } 14135 rb_gc_force_recycle((VALUE)tail); 14136 } 14137 else { 14138 list_append(head, tail); 14139 } 14140 break; 14141 14142 case NODE_DSTR: 14143 if (htype == NODE_STR) { 14144 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 14145 goto error; 14146 tail->nd_lit = head->nd_lit; 14147 rb_gc_force_recycle((VALUE)head); 14148 head = tail; 14149 } 14150 else if (NIL_P(tail->nd_lit)) { 14151 head->nd_alen += tail->nd_alen - 1; 14152 head->nd_next->nd_end->nd_next = tail->nd_next; 14153 head->nd_next->nd_end = tail->nd_next->nd_end; 14154 rb_gc_force_recycle((VALUE)tail); 14155 } 14156 else { 14157 nd_set_type(tail, NODE_ARRAY); 14158 tail->nd_head = NEW_STR(tail->nd_lit); 14159 list_concat(head, tail); 14160 } 14161 break; 14162 14163 case NODE_EVSTR: 14164 if (htype == NODE_STR) { 14165 nd_set_type(head, NODE_DSTR); 14166 head->nd_alen = 1; 14167 } 14168 list_append(head, tail); 14169 break; 14170 } 14171 return head; 14172 } 14173 14174 static NODE * 14175 evstr2dstr_gen(struct parser_params *parser, NODE *node) 14176 { 14177 if (nd_type(node) == NODE_EVSTR) { 14178 node = list_append(NEW_DSTR(Qnil), node); 14179 } 14180 return node; 14181 } 14182 14183 static NODE * 14184 new_evstr_gen(struct parser_params *parser, NODE *node) 14185 { 14186 NODE *head = node; 14187 14188 if (node) { 14189 switch (nd_type(node)) { 14190 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 14191 return node; 14192 } 14193 } 14194 return NEW_EVSTR(head); 14195 } 14196 14197 static NODE * 14198 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 14199 { 14200 value_expr(recv); 14201 value_expr(arg1); 14202 return NEW_CALL(recv, id, NEW_LIST(arg1)); 14203 } 14204 14205 static NODE * 14206 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 14207 { 14208 value_expr(recv); 14209 return NEW_CALL(recv, id, 0); 14210 } 14211 14212 static NODE* 14213 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14214 { 14215 value_expr(node1); 14216 value_expr(node2); 14217 if (node1) { 14218 switch (nd_type(node1)) { 14219 case NODE_DREGX: 14220 case NODE_DREGX_ONCE: 14221 return NEW_MATCH2(node1, node2); 14222 14223 case NODE_LIT: 14224 if (TYPE(node1->nd_lit) == T_REGEXP) { 14225 return NEW_MATCH2(node1, node2); 14226 } 14227 } 14228 } 14229 14230 if (node2) { 14231 switch (nd_type(node2)) { 14232 case NODE_DREGX: 14233 case NODE_DREGX_ONCE: 14234 return NEW_MATCH3(node2, node1); 14235 14236 case NODE_LIT: 14237 if (TYPE(node2->nd_lit) == T_REGEXP) { 14238 return NEW_MATCH3(node2, node1); 14239 } 14240 } 14241 } 14242 14243 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 14244 } 14245 14246 static NODE* 14247 gettable_gen(struct parser_params *parser, ID id) 14248 { 14249 if (id == keyword_self) { 14250 return NEW_SELF(); 14251 } 14252 else if (id == keyword_nil) { 14253 return NEW_NIL(); 14254 } 14255 else if (id == keyword_true) { 14256 return NEW_TRUE(); 14257 } 14258 else if (id == keyword_false) { 14259 return NEW_FALSE(); 14260 } 14261 else if (id == keyword__FILE__) { 14262 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 14263 rb_filesystem_encoding())); 14264 } 14265 else if (id == keyword__LINE__) { 14266 return NEW_LIT(INT2FIX(ruby_sourceline)); 14267 } 14268 else if (id == keyword__ENCODING__) { 14269 return NEW_LIT(rb_enc_from_encoding(parser->enc)); 14270 } 14271 else if (is_local_id(id)) { 14272 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 14273 if (local_id(id)) return NEW_LVAR(id); 14274 /* method call without arguments */ 14275 return NEW_VCALL(id); 14276 } 14277 else if (is_global_id(id)) { 14278 return NEW_GVAR(id); 14279 } 14280 else if (is_instance_id(id)) { 14281 return NEW_IVAR(id); 14282 } 14283 else if (is_const_id(id)) { 14284 return NEW_CONST(id); 14285 } 14286 else if (is_class_id(id)) { 14287 return NEW_CVAR(id); 14288 } 14289 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14290 return 0; 14291 } 14292 #endif /* !RIPPER */ 14293 14294 #ifdef RIPPER 14295 static VALUE 14296 assignable_gen(struct parser_params *parser, VALUE lhs) 14297 #else 14298 static NODE* 14299 assignable_gen(struct parser_params *parser, ID id, NODE *val) 14300 #endif 14301 { 14302 #ifdef RIPPER 14303 ID id = get_id(lhs); 14304 # define assignable_result(x) get_value(lhs) 14305 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 14306 #else 14307 # define assignable_result(x) x 14308 #endif 14309 if (!id) return assignable_result(0); 14310 if (id == keyword_self) { 14311 yyerror("Can't change the value of self"); 14312 } 14313 else if (id == keyword_nil) { 14314 yyerror("Can't assign to nil"); 14315 } 14316 else if (id == keyword_true) { 14317 yyerror("Can't assign to true"); 14318 } 14319 else if (id == keyword_false) { 14320 yyerror("Can't assign to false"); 14321 } 14322 else if (id == keyword__FILE__) { 14323 yyerror("Can't assign to __FILE__"); 14324 } 14325 else if (id == keyword__LINE__) { 14326 yyerror("Can't assign to __LINE__"); 14327 } 14328 else if (id == keyword__ENCODING__) { 14329 yyerror("Can't assign to __ENCODING__"); 14330 } 14331 else if (is_local_id(id)) { 14332 if (dyna_in_block()) { 14333 if (dvar_curr(id)) { 14334 return assignable_result(NEW_DASGN_CURR(id, val)); 14335 } 14336 else if (dvar_defined(id)) { 14337 return assignable_result(NEW_DASGN(id, val)); 14338 } 14339 else if (local_id(id)) { 14340 return assignable_result(NEW_LASGN(id, val)); 14341 } 14342 else { 14343 dyna_var(id); 14344 return assignable_result(NEW_DASGN_CURR(id, val)); 14345 } 14346 } 14347 else { 14348 if (!local_id(id)) { 14349 local_var(id); 14350 } 14351 return assignable_result(NEW_LASGN(id, val)); 14352 } 14353 } 14354 else if (is_global_id(id)) { 14355 return assignable_result(NEW_GASGN(id, val)); 14356 } 14357 else if (is_instance_id(id)) { 14358 return assignable_result(NEW_IASGN(id, val)); 14359 } 14360 else if (is_const_id(id)) { 14361 if (!in_def && !in_single) 14362 return assignable_result(NEW_CDECL(id, val, 0)); 14363 yyerror("dynamic constant assignment"); 14364 } 14365 else if (is_class_id(id)) { 14366 return assignable_result(NEW_CVASGN(id, val)); 14367 } 14368 else { 14369 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 14370 } 14371 return assignable_result(0); 14372 #undef assignable_result 14373 #undef parser_yyerror 14374 } 14375 14376 static ID 14377 shadowing_lvar_gen(struct parser_params *parser, ID name) 14378 { 14379 ID uscore; 14380 14381 CONST_ID(uscore, "_"); 14382 if (uscore == name) return name; 14383 if (dyna_in_block()) { 14384 if (dvar_curr(name)) { 14385 yyerror("duplicated argument name"); 14386 } 14387 else if (dvar_defined(name) || local_id(name)) { 14388 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 14389 vtable_add(lvtbl->vars, name); 14390 } 14391 } 14392 else { 14393 if (local_id(name)) { 14394 yyerror("duplicated argument name"); 14395 } 14396 } 14397 return name; 14398 } 14399 14400 static void 14401 new_bv_gen(struct parser_params *parser, ID name) 14402 { 14403 if (!name) return; 14404 if (!is_local_id(name)) { 14405 compile_error(PARSER_ARG "invalid local variable - %s", 14406 rb_id2name(name)); 14407 return; 14408 } 14409 shadowing_lvar(name); 14410 dyna_var(name); 14411 } 14412 14413 #ifndef RIPPER 14414 static NODE * 14415 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 14416 { 14417 if (recv && nd_type(recv) == NODE_SELF) 14418 recv = (NODE *)1; 14419 return NEW_ATTRASGN(recv, tASET, idx); 14420 } 14421 14422 static void 14423 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14424 { 14425 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 14426 compile_error(PARSER_ARG "both block arg and actual block given"); 14427 } 14428 } 14429 14430 ID 14431 rb_id_attrset(ID id) 14432 { 14433 id &= ~ID_SCOPE_MASK; 14434 id |= ID_ATTRSET; 14435 return id; 14436 } 14437 14438 static NODE * 14439 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 14440 { 14441 if (recv && nd_type(recv) == NODE_SELF) 14442 recv = (NODE *)1; 14443 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 14444 } 14445 14446 static void 14447 rb_backref_error_gen(struct parser_params *parser, NODE *node) 14448 { 14449 switch (nd_type(node)) { 14450 case NODE_NTH_REF: 14451 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 14452 break; 14453 case NODE_BACK_REF: 14454 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 14455 break; 14456 } 14457 } 14458 14459 static NODE * 14460 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14461 { 14462 if (!node2) return node1; 14463 switch (nd_type(node1)) { 14464 case NODE_BLOCK_PASS: 14465 if (node1->nd_head) 14466 node1->nd_head = arg_concat(node1->nd_head, node2); 14467 else 14468 node1->nd_head = NEW_LIST(node2); 14469 return node1; 14470 case NODE_ARGSPUSH: 14471 if (nd_type(node2) != NODE_ARRAY) break; 14472 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 14473 nd_set_type(node1, NODE_ARGSCAT); 14474 return node1; 14475 case NODE_ARGSCAT: 14476 if (nd_type(node2) != NODE_ARRAY || 14477 nd_type(node1->nd_body) != NODE_ARRAY) break; 14478 node1->nd_body = list_concat(node1->nd_body, node2); 14479 return node1; 14480 } 14481 return NEW_ARGSCAT(node1, node2); 14482 } 14483 14484 static NODE * 14485 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14486 { 14487 if (!node1) return NEW_LIST(node2); 14488 switch (nd_type(node1)) { 14489 case NODE_ARRAY: 14490 return list_append(node1, node2); 14491 case NODE_BLOCK_PASS: 14492 node1->nd_head = arg_append(node1->nd_head, node2); 14493 return node1; 14494 case NODE_ARGSPUSH: 14495 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 14496 nd_set_type(node1, NODE_ARGSCAT); 14497 return node1; 14498 } 14499 return NEW_ARGSPUSH(node1, node2); 14500 } 14501 14502 static NODE * 14503 splat_array(NODE* node) 14504 { 14505 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 14506 if (nd_type(node) == NODE_ARRAY) return node; 14507 return 0; 14508 } 14509 14510 static NODE * 14511 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 14512 { 14513 if (!lhs) return 0; 14514 14515 switch (nd_type(lhs)) { 14516 case NODE_GASGN: 14517 case NODE_IASGN: 14518 case NODE_IASGN2: 14519 case NODE_LASGN: 14520 case NODE_DASGN: 14521 case NODE_DASGN_CURR: 14522 case NODE_MASGN: 14523 case NODE_CDECL: 14524 case NODE_CVASGN: 14525 lhs->nd_value = rhs; 14526 break; 14527 14528 case NODE_ATTRASGN: 14529 case NODE_CALL: 14530 lhs->nd_args = arg_append(lhs->nd_args, rhs); 14531 break; 14532 14533 default: 14534 /* should not happen */ 14535 break; 14536 } 14537 14538 return lhs; 14539 } 14540 14541 static int 14542 value_expr_gen(struct parser_params *parser, NODE *node) 14543 { 14544 int cond = 0; 14545 14546 if (!node) { 14547 rb_warning0("empty expression"); 14548 } 14549 while (node) { 14550 switch (nd_type(node)) { 14551 case NODE_DEFN: 14552 case NODE_DEFS: 14553 parser_warning(node, "void value expression"); 14554 return FALSE; 14555 14556 case NODE_RETURN: 14557 case NODE_BREAK: 14558 case NODE_NEXT: 14559 case NODE_REDO: 14560 case NODE_RETRY: 14561 if (!cond) yyerror("void value expression"); 14562 /* or "control never reach"? */ 14563 return FALSE; 14564 14565 case NODE_BLOCK: 14566 while (node->nd_next) { 14567 node = node->nd_next; 14568 } 14569 node = node->nd_head; 14570 break; 14571 14572 case NODE_BEGIN: 14573 node = node->nd_body; 14574 break; 14575 14576 case NODE_IF: 14577 if (!node->nd_body) { 14578 node = node->nd_else; 14579 break; 14580 } 14581 else if (!node->nd_else) { 14582 node = node->nd_body; 14583 break; 14584 } 14585 if (!value_expr(node->nd_body)) return FALSE; 14586 node = node->nd_else; 14587 break; 14588 14589 case NODE_AND: 14590 case NODE_OR: 14591 cond = 1; 14592 node = node->nd_2nd; 14593 break; 14594 14595 default: 14596 return TRUE; 14597 } 14598 } 14599 14600 return TRUE; 14601 } 14602 14603 static void 14604 void_expr_gen(struct parser_params *parser, NODE *node) 14605 { 14606 const char *useless = 0; 14607 14608 if (!RTEST(ruby_verbose)) return; 14609 14610 if (!node) return; 14611 switch (nd_type(node)) { 14612 case NODE_CALL: 14613 switch (node->nd_mid) { 14614 case '+': 14615 case '-': 14616 case '*': 14617 case '/': 14618 case '%': 14619 case tPOW: 14620 case tUPLUS: 14621 case tUMINUS: 14622 case '|': 14623 case '^': 14624 case '&': 14625 case tCMP: 14626 case '>': 14627 case tGEQ: 14628 case '<': 14629 case tLEQ: 14630 case tEQ: 14631 case tNEQ: 14632 useless = rb_id2name(node->nd_mid); 14633 break; 14634 } 14635 break; 14636 14637 case NODE_LVAR: 14638 case NODE_DVAR: 14639 case NODE_GVAR: 14640 case NODE_IVAR: 14641 case NODE_CVAR: 14642 case NODE_NTH_REF: 14643 case NODE_BACK_REF: 14644 useless = "a variable"; 14645 break; 14646 case NODE_CONST: 14647 useless = "a constant"; 14648 break; 14649 case NODE_LIT: 14650 case NODE_STR: 14651 case NODE_DSTR: 14652 case NODE_DREGX: 14653 case NODE_DREGX_ONCE: 14654 useless = "a literal"; 14655 break; 14656 case NODE_COLON2: 14657 case NODE_COLON3: 14658 useless = "::"; 14659 break; 14660 case NODE_DOT2: 14661 useless = ".."; 14662 break; 14663 case NODE_DOT3: 14664 useless = "..."; 14665 break; 14666 case NODE_SELF: 14667 useless = "self"; 14668 break; 14669 case NODE_NIL: 14670 useless = "nil"; 14671 break; 14672 case NODE_TRUE: 14673 useless = "true"; 14674 break; 14675 case NODE_FALSE: 14676 useless = "false"; 14677 break; 14678 case NODE_DEFINED: 14679 useless = "defined?"; 14680 break; 14681 } 14682 14683 if (useless) { 14684 int line = ruby_sourceline; 14685 14686 ruby_sourceline = nd_line(node); 14687 rb_warnS("useless use of %s in void context", useless); 14688 ruby_sourceline = line; 14689 } 14690 } 14691 14692 static void 14693 void_stmts_gen(struct parser_params *parser, NODE *node) 14694 { 14695 if (!RTEST(ruby_verbose)) return; 14696 if (!node) return; 14697 if (nd_type(node) != NODE_BLOCK) return; 14698 14699 for (;;) { 14700 if (!node->nd_next) return; 14701 void_expr0(node->nd_head); 14702 node = node->nd_next; 14703 } 14704 } 14705 14706 static NODE * 14707 remove_begin(NODE *node) 14708 { 14709 NODE **n = &node, *n1 = node; 14710 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 14711 *n = n1 = n1->nd_body; 14712 } 14713 return node; 14714 } 14715 14716 static void 14717 reduce_nodes_gen(struct parser_params *parser, NODE **body) 14718 { 14719 NODE *node = *body; 14720 14721 if (!node) { 14722 *body = NEW_NIL(); 14723 return; 14724 } 14725 #define subnodes(n1, n2) \ 14726 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 14727 (!node->n2) ? (body = &node->n1, 1) : \ 14728 (reduce_nodes(&node->n1), body = &node->n2, 1)) 14729 14730 while (node) { 14731 int newline = (int)(node->flags & NODE_FL_NEWLINE); 14732 switch (nd_type(node)) { 14733 end: 14734 case NODE_NIL: 14735 *body = 0; 14736 return; 14737 case NODE_RETURN: 14738 *body = node = node->nd_stts; 14739 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14740 continue; 14741 case NODE_BEGIN: 14742 *body = node = node->nd_body; 14743 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14744 continue; 14745 case NODE_BLOCK: 14746 body = &node->nd_end->nd_head; 14747 break; 14748 case NODE_IF: 14749 if (subnodes(nd_body, nd_else)) break; 14750 return; 14751 case NODE_CASE: 14752 body = &node->nd_body; 14753 break; 14754 case NODE_WHEN: 14755 if (!subnodes(nd_body, nd_next)) goto end; 14756 break; 14757 case NODE_ENSURE: 14758 if (!subnodes(nd_head, nd_resq)) goto end; 14759 break; 14760 case NODE_RESCUE: 14761 if (!subnodes(nd_head, nd_resq)) goto end; 14762 break; 14763 default: 14764 return; 14765 } 14766 node = *body; 14767 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14768 } 14769 14770 #undef subnodes 14771 } 14772 14773 static int 14774 assign_in_cond(struct parser_params *parser, NODE *node) 14775 { 14776 switch (nd_type(node)) { 14777 case NODE_MASGN: 14778 yyerror("multiple assignment in conditional"); 14779 return 1; 14780 14781 case NODE_LASGN: 14782 case NODE_DASGN: 14783 case NODE_DASGN_CURR: 14784 case NODE_GASGN: 14785 case NODE_IASGN: 14786 break; 14787 14788 default: 14789 return 0; 14790 } 14791 14792 if (!node->nd_value) return 1; 14793 switch (nd_type(node->nd_value)) { 14794 case NODE_LIT: 14795 case NODE_STR: 14796 case NODE_NIL: 14797 case NODE_TRUE: 14798 case NODE_FALSE: 14799 /* reports always */ 14800 parser_warn(node->nd_value, "found = in conditional, should be =="); 14801 return 1; 14802 14803 case NODE_DSTR: 14804 case NODE_XSTR: 14805 case NODE_DXSTR: 14806 case NODE_EVSTR: 14807 case NODE_DREGX: 14808 default: 14809 break; 14810 } 14811 return 1; 14812 } 14813 14814 static void 14815 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14816 { 14817 if (!e_option_supplied(parser)) parser_warn(node, str); 14818 } 14819 14820 static void 14821 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14822 { 14823 if (!e_option_supplied(parser)) parser_warning(node, str); 14824 } 14825 14826 static void 14827 fixup_nodes(NODE **rootnode) 14828 { 14829 NODE *node, *next, *head; 14830 14831 for (node = *rootnode; node; node = next) { 14832 enum node_type type; 14833 VALUE val; 14834 14835 next = node->nd_next; 14836 head = node->nd_head; 14837 rb_gc_force_recycle((VALUE)node); 14838 *rootnode = next; 14839 switch (type = nd_type(head)) { 14840 case NODE_DOT2: 14841 case NODE_DOT3: 14842 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 14843 type == NODE_DOT3); 14844 rb_gc_force_recycle((VALUE)head->nd_beg); 14845 rb_gc_force_recycle((VALUE)head->nd_end); 14846 nd_set_type(head, NODE_LIT); 14847 head->nd_lit = val; 14848 break; 14849 default: 14850 break; 14851 } 14852 } 14853 } 14854 14855 static NODE *cond0(struct parser_params*,NODE*); 14856 14857 static NODE* 14858 range_op(struct parser_params *parser, NODE *node) 14859 { 14860 enum node_type type; 14861 14862 if (node == 0) return 0; 14863 14864 type = nd_type(node); 14865 value_expr(node); 14866 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 14867 warn_unless_e_option(parser, node, "integer literal in conditional range"); 14868 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 14869 } 14870 return cond0(parser, node); 14871 } 14872 14873 static int 14874 literal_node(NODE *node) 14875 { 14876 if (!node) return 1; /* same as NODE_NIL */ 14877 switch (nd_type(node)) { 14878 case NODE_LIT: 14879 case NODE_STR: 14880 case NODE_DSTR: 14881 case NODE_EVSTR: 14882 case NODE_DREGX: 14883 case NODE_DREGX_ONCE: 14884 case NODE_DSYM: 14885 return 2; 14886 case NODE_TRUE: 14887 case NODE_FALSE: 14888 case NODE_NIL: 14889 return 1; 14890 } 14891 return 0; 14892 } 14893 14894 static NODE* 14895 cond0(struct parser_params *parser, NODE *node) 14896 { 14897 if (node == 0) return 0; 14898 assign_in_cond(parser, node); 14899 14900 switch (nd_type(node)) { 14901 case NODE_DSTR: 14902 case NODE_EVSTR: 14903 case NODE_STR: 14904 rb_warn0("string literal in condition"); 14905 break; 14906 14907 case NODE_DREGX: 14908 case NODE_DREGX_ONCE: 14909 warning_unless_e_option(parser, node, "regex literal in condition"); 14910 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 14911 14912 case NODE_AND: 14913 case NODE_OR: 14914 node->nd_1st = cond0(parser, node->nd_1st); 14915 node->nd_2nd = cond0(parser, node->nd_2nd); 14916 break; 14917 14918 case NODE_DOT2: 14919 case NODE_DOT3: 14920 node->nd_beg = range_op(parser, node->nd_beg); 14921 node->nd_end = range_op(parser, node->nd_end); 14922 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 14923 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 14924 if (!e_option_supplied(parser)) { 14925 int b = literal_node(node->nd_beg); 14926 int e = literal_node(node->nd_end); 14927 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 14928 parser_warn(node, "range literal in condition"); 14929 } 14930 } 14931 break; 14932 14933 case NODE_DSYM: 14934 parser_warning(node, "literal in condition"); 14935 break; 14936 14937 case NODE_LIT: 14938 if (TYPE(node->nd_lit) == T_REGEXP) { 14939 warn_unless_e_option(parser, node, "regex literal in condition"); 14940 nd_set_type(node, NODE_MATCH); 14941 } 14942 else { 14943 parser_warning(node, "literal in condition"); 14944 } 14945 default: 14946 break; 14947 } 14948 return node; 14949 } 14950 14951 static NODE* 14952 cond_gen(struct parser_params *parser, NODE *node) 14953 { 14954 if (node == 0) return 0; 14955 return cond0(parser, node); 14956 } 14957 14958 static NODE* 14959 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 14960 { 14961 value_expr(left); 14962 if (left && (enum node_type)nd_type(left) == type) { 14963 NODE *node = left, *second; 14964 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 14965 node = second; 14966 } 14967 node->nd_2nd = NEW_NODE(type, second, right, 0); 14968 return left; 14969 } 14970 return NEW_NODE(type, left, right, 0); 14971 } 14972 14973 static void 14974 no_blockarg(struct parser_params *parser, NODE *node) 14975 { 14976 if (node && nd_type(node) == NODE_BLOCK_PASS) { 14977 compile_error(PARSER_ARG "block argument should not be given"); 14978 } 14979 } 14980 14981 static NODE * 14982 ret_args_gen(struct parser_params *parser, NODE *node) 14983 { 14984 if (node) { 14985 no_blockarg(parser, node); 14986 if (nd_type(node) == NODE_ARRAY) { 14987 if (node->nd_next == 0) { 14988 node = node->nd_head; 14989 } 14990 else { 14991 nd_set_type(node, NODE_VALUES); 14992 } 14993 } 14994 } 14995 return node; 14996 } 14997 14998 static NODE * 14999 new_yield_gen(struct parser_params *parser, NODE *node) 15000 { 15001 long state = Qtrue; 15002 15003 if (node) { 15004 no_blockarg(parser, node); 15005 if (node && nd_type(node) == NODE_SPLAT) { 15006 state = Qtrue; 15007 } 15008 } 15009 else { 15010 state = Qfalse; 15011 } 15012 return NEW_YIELD(node, state); 15013 } 15014 15015 static NODE* 15016 negate_lit(NODE *node) 15017 { 15018 switch (TYPE(node->nd_lit)) { 15019 case T_FIXNUM: 15020 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 15021 break; 15022 case T_BIGNUM: 15023 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 15024 break; 15025 case T_FLOAT: 15026 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15027 break; 15028 default: 15029 break; 15030 } 15031 return node; 15032 } 15033 15034 static NODE * 15035 arg_blk_pass(NODE *node1, NODE *node2) 15036 { 15037 if (node2) { 15038 node2->nd_head = node1; 15039 return node2; 15040 } 15041 return node1; 15042 } 15043 15044 static NODE* 15045 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) 15046 { 15047 int saved_line = ruby_sourceline; 15048 NODE *node; 15049 NODE *i1, *i2 = 0; 15050 15051 node = NEW_ARGS(m ? m->nd_plen : 0, o); 15052 i1 = m ? m->nd_next : 0; 15053 node->nd_next = NEW_ARGS_AUX(r, b); 15054 15055 if (p) { 15056 i2 = p->nd_next; 15057 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); 15058 } 15059 else if (i1) { 15060 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); 15061 } 15062 if (i1 || i2) { 15063 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); 15064 } 15065 ruby_sourceline = saved_line; 15066 return node; 15067 } 15068 #endif /* !RIPPER */ 15069 15070 static void 15071 local_push_gen(struct parser_params *parser, int inherit_dvars) 15072 { 15073 struct local_vars *local; 15074 15075 local = ALLOC(struct local_vars); 15076 local->prev = lvtbl; 15077 local->args = vtable_alloc(0); 15078 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 15079 lvtbl = local; 15080 } 15081 15082 static void 15083 local_pop_gen(struct parser_params *parser) 15084 { 15085 struct local_vars *local = lvtbl->prev; 15086 vtable_free(lvtbl->args); 15087 vtable_free(lvtbl->vars); 15088 xfree(lvtbl); 15089 lvtbl = local; 15090 } 15091 15092 #ifndef RIPPER 15093 static ID* 15094 vtable_tblcpy(ID *buf, const struct vtable *src) 15095 { 15096 int i, cnt = vtable_size(src); 15097 15098 if (cnt > 0) { 15099 buf[0] = cnt; 15100 for (i = 0; i < cnt; i++) { 15101 buf[i] = src->tbl[i]; 15102 } 15103 return buf; 15104 } 15105 return 0; 15106 } 15107 15108 static ID* 15109 local_tbl_gen(struct parser_params *parser) 15110 { 15111 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 15112 ID *buf; 15113 15114 if (cnt <= 0) return 0; 15115 buf = ALLOC_N(ID, cnt + 1); 15116 vtable_tblcpy(buf+1, lvtbl->args); 15117 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 15118 buf[0] = cnt; 15119 return buf; 15120 } 15121 #endif 15122 15123 static int 15124 arg_var_gen(struct parser_params *parser, ID id) 15125 { 15126 vtable_add(lvtbl->args, id); 15127 return vtable_size(lvtbl->args) - 1; 15128 } 15129 15130 static int 15131 local_var_gen(struct parser_params *parser, ID id) 15132 { 15133 vtable_add(lvtbl->vars, id); 15134 return vtable_size(lvtbl->vars) - 1; 15135 } 15136 15137 static int 15138 local_id_gen(struct parser_params *parser, ID id) 15139 { 15140 struct vtable *vars, *args; 15141 15142 vars = lvtbl->vars; 15143 args = lvtbl->args; 15144 15145 while (vars && POINTER_P(vars->prev)) { 15146 vars = vars->prev; 15147 args = args->prev; 15148 } 15149 15150 if (vars && vars->prev == DVARS_INHERIT) { 15151 return rb_local_defined(id); 15152 } 15153 else { 15154 return (vtable_included(args, id) || 15155 vtable_included(vars, id)); 15156 } 15157 } 15158 15159 static const struct vtable * 15160 dyna_push_gen(struct parser_params *parser) 15161 { 15162 lvtbl->args = vtable_alloc(lvtbl->args); 15163 lvtbl->vars = vtable_alloc(lvtbl->vars); 15164 return lvtbl->args; 15165 } 15166 15167 static void 15168 dyna_pop_1(struct parser_params *parser) 15169 { 15170 struct vtable *tmp; 15171 15172 tmp = lvtbl->args; 15173 lvtbl->args = lvtbl->args->prev; 15174 vtable_free(tmp); 15175 tmp = lvtbl->vars; 15176 lvtbl->vars = lvtbl->vars->prev; 15177 vtable_free(tmp); 15178 } 15179 15180 static void 15181 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 15182 { 15183 while (lvtbl->args != lvargs) { 15184 dyna_pop_1(parser); 15185 if (!lvtbl->args) { 15186 struct local_vars *local = lvtbl->prev; 15187 xfree(lvtbl); 15188 lvtbl = local; 15189 } 15190 } 15191 dyna_pop_1(parser); 15192 } 15193 15194 static int 15195 dyna_in_block_gen(struct parser_params *parser) 15196 { 15197 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 15198 } 15199 15200 static int 15201 dvar_defined_gen(struct parser_params *parser, ID id) 15202 { 15203 struct vtable *vars, *args; 15204 15205 args = lvtbl->args; 15206 vars = lvtbl->vars; 15207 15208 while (POINTER_P(vars)) { 15209 if (vtable_included(args, id)) { 15210 return 1; 15211 } 15212 if (vtable_included(vars, id)) { 15213 return 1; 15214 } 15215 args = args->prev; 15216 vars = vars->prev; 15217 } 15218 15219 if (vars == DVARS_INHERIT) { 15220 return rb_dvar_defined(id); 15221 } 15222 15223 return 0; 15224 } 15225 15226 static int 15227 dvar_curr_gen(struct parser_params *parser, ID id) 15228 { 15229 return (vtable_included(lvtbl->args, id) || 15230 vtable_included(lvtbl->vars, id)); 15231 } 15232 15233 #ifndef RIPPER 15234 VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline); 15235 VALUE rb_reg_check_preprocess(VALUE); 15236 15237 static void 15238 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 15239 { 15240 int c = RE_OPTION_ENCODING_IDX(options); 15241 15242 if (c) { 15243 int opt, idx; 15244 rb_char_to_option_kcode(c, &opt, &idx); 15245 if (idx != ENCODING_GET(str) && 15246 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15247 goto error; 15248 } 15249 ENCODING_SET(str, idx); 15250 } 15251 else if (RE_OPTION_ENCODING_NONE(options)) { 15252 if (!ENCODING_IS_ASCII8BIT(str) && 15253 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15254 c = 'n'; 15255 goto error; 15256 } 15257 rb_enc_associate(str, rb_ascii8bit_encoding()); 15258 } 15259 else if (parser->enc == rb_usascii_encoding()) { 15260 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15261 /* raise in re.c */ 15262 rb_enc_associate(str, rb_usascii_encoding()); 15263 } 15264 else { 15265 rb_enc_associate(str, rb_ascii8bit_encoding()); 15266 } 15267 } 15268 return; 15269 15270 error: 15271 compile_error(PARSER_ARG 15272 "regexp encoding option '%c' differs from source encoding '%s'", 15273 c, rb_enc_name(rb_enc_get(str))); 15274 } 15275 15276 static int 15277 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 15278 { 15279 VALUE err; 15280 reg_fragment_setenc(str, options); 15281 err = rb_reg_check_preprocess(str); 15282 if (err != Qnil) { 15283 err = rb_obj_as_string(err); 15284 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 15285 RB_GC_GUARD(err); 15286 return 0; 15287 } 15288 return 1; 15289 } 15290 15291 typedef struct { 15292 struct parser_params* parser; 15293 rb_encoding *enc; 15294 NODE *succ_block; 15295 NODE *fail_block; 15296 int num; 15297 } reg_named_capture_assign_t; 15298 15299 static int 15300 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 15301 int back_num, int *back_refs, OnigRegex regex, void *arg0) 15302 { 15303 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 15304 struct parser_params* parser = arg->parser; 15305 rb_encoding *enc = arg->enc; 15306 long len = name_end - name; 15307 const char *s = (const char *)name; 15308 ID var; 15309 15310 arg->num++; 15311 15312 if (arg->succ_block == 0) { 15313 arg->succ_block = NEW_BEGIN(0); 15314 arg->fail_block = NEW_BEGIN(0); 15315 } 15316 15317 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 15318 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 15319 !rb_enc_symname2_p(s, len, enc)) { 15320 return ST_CONTINUE; 15321 } 15322 var = rb_intern3(s, len, enc); 15323 if (dvar_defined(var) || local_id(var)) { 15324 rb_warningS("named capture conflicts a local variable - %s", 15325 rb_id2name(var)); 15326 } 15327 arg->succ_block = block_append(arg->succ_block, 15328 newline_node(node_assign(assignable(var,0), 15329 NEW_CALL( 15330 gettable(rb_intern("$~")), 15331 idAREF, 15332 NEW_LIST(NEW_LIT(ID2SYM(var)))) 15333 ))); 15334 arg->fail_block = block_append(arg->fail_block, 15335 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 15336 return ST_CONTINUE; 15337 } 15338 15339 static NODE * 15340 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 15341 { 15342 reg_named_capture_assign_t arg; 15343 15344 arg.parser = parser; 15345 arg.enc = rb_enc_get(regexp); 15346 arg.succ_block = 0; 15347 arg.fail_block = 0; 15348 arg.num = 0; 15349 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 15350 15351 if (arg.num == 0) 15352 return match; 15353 15354 return 15355 block_append( 15356 newline_node(match), 15357 NEW_IF(gettable(rb_intern("$~")), 15358 block_append( 15359 newline_node(arg.succ_block), 15360 newline_node( 15361 NEW_CALL( 15362 gettable(rb_intern("$~")), 15363 rb_intern("begin"), 15364 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 15365 block_append( 15366 newline_node(arg.fail_block), 15367 newline_node( 15368 NEW_LIT(Qnil))))); 15369 } 15370 15371 static VALUE 15372 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 15373 { 15374 VALUE re; 15375 VALUE err; 15376 15377 reg_fragment_setenc(str, options); 15378 err = rb_errinfo(); 15379 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 15380 if (NIL_P(re)) { 15381 ID mesg = rb_intern("mesg"); 15382 VALUE m = rb_attr_get(rb_errinfo(), mesg); 15383 rb_set_errinfo(err); 15384 if (!NIL_P(err)) { 15385 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 15386 } 15387 else { 15388 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 15389 } 15390 return Qnil; 15391 } 15392 return re; 15393 } 15394 15395 void 15396 rb_gc_mark_parser(void) 15397 { 15398 } 15399 15400 NODE* 15401 rb_parser_append_print(VALUE vparser, NODE *node) 15402 { 15403 NODE *prelude = 0; 15404 NODE *scope = node; 15405 struct parser_params *parser; 15406 15407 if (!node) return node; 15408 15409 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15410 15411 node = node->nd_body; 15412 15413 if (nd_type(node) == NODE_PRELUDE) { 15414 prelude = node; 15415 node = node->nd_body; 15416 } 15417 15418 node = block_append(node, 15419 NEW_FCALL(rb_intern("print"), 15420 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 15421 if (prelude) { 15422 prelude->nd_body = node; 15423 scope->nd_body = prelude; 15424 } 15425 else { 15426 scope->nd_body = node; 15427 } 15428 15429 return scope; 15430 } 15431 15432 NODE * 15433 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 15434 { 15435 NODE *prelude = 0; 15436 NODE *scope = node; 15437 struct parser_params *parser; 15438 15439 if (!node) return node; 15440 15441 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15442 15443 node = node->nd_body; 15444 15445 if (nd_type(node) == NODE_PRELUDE) { 15446 prelude = node; 15447 node = node->nd_body; 15448 } 15449 if (split) { 15450 node = block_append(NEW_GASGN(rb_intern("$F"), 15451 NEW_CALL(NEW_GVAR(rb_intern("$_")), 15452 rb_intern("split"), 0)), 15453 node); 15454 } 15455 if (chop) { 15456 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 15457 rb_intern("chop!"), 0), node); 15458 } 15459 15460 node = NEW_OPT_N(node); 15461 15462 if (prelude) { 15463 prelude->nd_body = node; 15464 scope->nd_body = prelude; 15465 } 15466 else { 15467 scope->nd_body = node; 15468 } 15469 15470 return scope; 15471 } 15472 15473 static const struct { 15474 ID token; 15475 const char *name; 15476 } op_tbl[] = { 15477 {tDOT2, ".."}, 15478 {tDOT3, "..."}, 15479 {'+', "+(binary)"}, 15480 {'-', "-(binary)"}, 15481 {tPOW, "**"}, 15482 {tUPLUS, "+@"}, 15483 {tUMINUS, "-@"}, 15484 {tCMP, "<=>"}, 15485 {tGEQ, ">="}, 15486 {tLEQ, "<="}, 15487 {tEQ, "=="}, 15488 {tEQQ, "==="}, 15489 {tNEQ, "!="}, 15490 {tMATCH, "=~"}, 15491 {tNMATCH, "!~"}, 15492 {tAREF, "[]"}, 15493 {tASET, "[]="}, 15494 {tLSHFT, "<<"}, 15495 {tRSHFT, ">>"}, 15496 {tCOLON2, "::"}, 15497 }; 15498 15499 #define op_tbl_count numberof(op_tbl) 15500 15501 #ifndef ENABLE_SELECTOR_NAMESPACE 15502 #define ENABLE_SELECTOR_NAMESPACE 0 15503 #endif 15504 15505 static struct symbols { 15506 ID last_id; 15507 st_table *sym_id; 15508 st_table *id_str; 15509 #if ENABLE_SELECTOR_NAMESPACE 15510 st_table *ivar2_id; 15511 st_table *id_ivar2; 15512 #endif 15513 VALUE op_sym[tLAST_TOKEN]; 15514 } global_symbols = {tLAST_ID}; 15515 15516 static const struct st_hash_type symhash = { 15517 rb_str_hash_cmp, 15518 rb_str_hash, 15519 }; 15520 15521 #if ENABLE_SELECTOR_NAMESPACE 15522 struct ivar2_key { 15523 ID id; 15524 VALUE klass; 15525 }; 15526 15527 static int 15528 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 15529 { 15530 if (key1->id == key2->id && key1->klass == key2->klass) { 15531 return 0; 15532 } 15533 return 1; 15534 } 15535 15536 static int 15537 ivar2_hash(struct ivar2_key *key) 15538 { 15539 return (key->id << 8) ^ (key->klass >> 2); 15540 } 15541 15542 static const struct st_hash_type ivar2_hash_type = { 15543 ivar2_cmp, 15544 ivar2_hash, 15545 }; 15546 #endif 15547 15548 void 15549 Init_sym(void) 15550 { 15551 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 15552 global_symbols.id_str = st_init_numtable_with_size(1000); 15553 #if ENABLE_SELECTOR_NAMESPACE 15554 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 15555 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 15556 #endif 15557 15558 Init_id(); 15559 } 15560 15561 void 15562 rb_gc_mark_symbols(void) 15563 { 15564 rb_mark_tbl(global_symbols.id_str); 15565 rb_gc_mark_locations(global_symbols.op_sym, 15566 global_symbols.op_sym + tLAST_TOKEN); 15567 } 15568 #endif /* !RIPPER */ 15569 15570 static ID 15571 internal_id_gen(struct parser_params *parser) 15572 { 15573 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 15574 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 15575 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 15576 } 15577 15578 #ifndef RIPPER 15579 static int 15580 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 15581 { 15582 int mb = 0; 15583 15584 if (m >= e) return 0; 15585 switch (*m) { 15586 case '~': case '*': case '$': case '?': case '!': case '@': 15587 case '/': case '\\': case ';': case ',': case '.': case '=': 15588 case ':': case '<': case '>': case '\"': 15589 case '&': case '`': case '\'': case '+': 15590 case '0': 15591 ++m; 15592 break; 15593 case '-': 15594 ++m; 15595 if (m < e && is_identchar(m, e, enc)) { 15596 if (!ISASCII(*m)) mb = 1; 15597 m += rb_enc_mbclen(m, e, enc); 15598 } 15599 break; 15600 default: 15601 if (!rb_enc_isdigit(*m, enc)) return 0; 15602 do { 15603 if (!ISASCII(*m)) mb = 1; 15604 ++m; 15605 } while (m < e && rb_enc_isdigit(*m, enc)); 15606 } 15607 return m == e ? mb + 1 : 0; 15608 } 15609 15610 int 15611 rb_symname_p(const char *name) 15612 { 15613 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 15614 } 15615 15616 int 15617 rb_enc_symname_p(const char *name, rb_encoding *enc) 15618 { 15619 return rb_enc_symname2_p(name, strlen(name), enc); 15620 } 15621 15622 int 15623 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 15624 { 15625 const char *m = name; 15626 const char *e = m + len; 15627 int localid = FALSE; 15628 15629 if (!m) return FALSE; 15630 switch (*m) { 15631 case '\0': 15632 return FALSE; 15633 15634 case '$': 15635 if (is_special_global_name(++m, e, enc)) return TRUE; 15636 goto id; 15637 15638 case '@': 15639 if (*++m == '@') ++m; 15640 goto id; 15641 15642 case '<': 15643 switch (*++m) { 15644 case '<': ++m; break; 15645 case '=': if (*++m == '>') ++m; break; 15646 default: break; 15647 } 15648 break; 15649 15650 case '>': 15651 switch (*++m) { 15652 case '>': case '=': ++m; break; 15653 } 15654 break; 15655 15656 case '=': 15657 switch (*++m) { 15658 case '~': ++m; break; 15659 case '=': if (*++m == '=') ++m; break; 15660 default: return FALSE; 15661 } 15662 break; 15663 15664 case '*': 15665 if (*++m == '*') ++m; 15666 break; 15667 15668 case '+': case '-': 15669 if (*++m == '@') ++m; 15670 break; 15671 15672 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 15673 ++m; 15674 break; 15675 15676 case '[': 15677 if (*++m != ']') return FALSE; 15678 if (*++m == '=') ++m; 15679 break; 15680 15681 case '!': 15682 switch (*++m) { 15683 case '\0': return TRUE; 15684 case '=': case '~': ++m; break; 15685 default: return FALSE; 15686 } 15687 break; 15688 15689 default: 15690 localid = !rb_enc_isupper(*m, enc); 15691 id: 15692 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 15693 return FALSE; 15694 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 15695 if (localid) { 15696 switch (*m) { 15697 case '!': case '?': case '=': ++m; 15698 } 15699 } 15700 break; 15701 } 15702 return m == e; 15703 } 15704 15705 static ID 15706 register_symid(ID id, const char *name, long len, rb_encoding *enc) 15707 { 15708 VALUE str = rb_enc_str_new(name, len, enc); 15709 OBJ_FREEZE(str); 15710 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 15711 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 15712 return id; 15713 } 15714 15715 ID 15716 rb_intern3(const char *name, long len, rb_encoding *enc) 15717 { 15718 const char *m = name; 15719 const char *e = m + len; 15720 unsigned char c; 15721 VALUE str; 15722 ID id; 15723 long last; 15724 int mb; 15725 st_data_t data; 15726 struct RString fake_str; 15727 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE; 15728 fake_str.basic.klass = rb_cString; 15729 fake_str.as.heap.len = len; 15730 fake_str.as.heap.ptr = (char *)name; 15731 fake_str.as.heap.aux.capa = len; 15732 str = (VALUE)&fake_str; 15733 rb_enc_associate(str, enc); 15734 15735 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { 15736 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 15737 } 15738 15739 if (st_lookup(global_symbols.sym_id, str, &data)) 15740 return (ID)data; 15741 15742 if (rb_cString && !rb_enc_asciicompat(enc)) { 15743 id = ID_JUNK; 15744 goto new_id; 15745 } 15746 last = len-1; 15747 id = 0; 15748 switch (*m) { 15749 case '$': 15750 id |= ID_GLOBAL; 15751 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 15752 if (!--mb) enc = rb_ascii8bit_encoding(); 15753 goto new_id; 15754 } 15755 break; 15756 case '@': 15757 if (m[1] == '@') { 15758 m++; 15759 id |= ID_CLASS; 15760 } 15761 else { 15762 id |= ID_INSTANCE; 15763 } 15764 m++; 15765 break; 15766 default: 15767 c = m[0]; 15768 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 15769 /* operators */ 15770 int i; 15771 15772 if (len == 1) { 15773 id = c; 15774 goto id_register; 15775 } 15776 for (i = 0; i < op_tbl_count; i++) { 15777 if (*op_tbl[i].name == *m && 15778 strcmp(op_tbl[i].name, m) == 0) { 15779 id = op_tbl[i].token; 15780 goto id_register; 15781 } 15782 } 15783 } 15784 15785 if (m[last] == '=') { 15786 /* attribute assignment */ 15787 id = rb_intern3(name, last, enc); 15788 if (id > tLAST_TOKEN && !is_attrset_id(id)) { 15789 enc = rb_enc_get(rb_id2str(id)); 15790 id = rb_id_attrset(id); 15791 goto id_register; 15792 } 15793 id = ID_ATTRSET; 15794 } 15795 else if (rb_enc_isupper(m[0], enc)) { 15796 id = ID_CONST; 15797 } 15798 else { 15799 id = ID_LOCAL; 15800 } 15801 break; 15802 } 15803 mb = 0; 15804 if (!rb_enc_isdigit(*m, enc)) { 15805 while (m <= name + last && is_identchar(m, e, enc)) { 15806 if (ISASCII(*m)) { 15807 m++; 15808 } 15809 else { 15810 mb = 1; 15811 m += rb_enc_mbclen(m, e, enc); 15812 } 15813 } 15814 } 15815 if (m - name < len) id = ID_JUNK; 15816 if (enc != rb_usascii_encoding()) { 15817 /* 15818 * this clause makes sense only when called from other than 15819 * rb_intern_str() taking care of code-range. 15820 */ 15821 if (!mb) { 15822 for (; m <= name + len; ++m) { 15823 if (!ISASCII(*m)) goto mbstr; 15824 } 15825 enc = rb_usascii_encoding(); 15826 } 15827 mbstr:; 15828 } 15829 new_id: 15830 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 15831 if (len > 20) { 15832 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 15833 name); 15834 } 15835 else { 15836 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 15837 (int)len, name); 15838 } 15839 } 15840 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 15841 id_register: 15842 return register_symid(id, name, len, enc); 15843 } 15844 15845 ID 15846 rb_intern2(const char *name, long len) 15847 { 15848 return rb_intern3(name, len, rb_usascii_encoding()); 15849 } 15850 15851 #undef rb_intern 15852 ID 15853 rb_intern(const char *name) 15854 { 15855 return rb_intern2(name, strlen(name)); 15856 } 15857 15858 ID 15859 rb_intern_str(VALUE str) 15860 { 15861 rb_encoding *enc; 15862 ID id; 15863 15864 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 15865 enc = rb_usascii_encoding(); 15866 } 15867 else { 15868 enc = rb_enc_get(str); 15869 } 15870 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); 15871 RB_GC_GUARD(str); 15872 return id; 15873 } 15874 15875 VALUE 15876 rb_id2str(ID id) 15877 { 15878 st_data_t data; 15879 15880 if (id < tLAST_TOKEN) { 15881 int i = 0; 15882 15883 if (id < INT_MAX && rb_ispunct((int)id)) { 15884 VALUE str = global_symbols.op_sym[i = (int)id]; 15885 if (!str) { 15886 char name[2]; 15887 name[0] = (char)id; 15888 name[1] = 0; 15889 str = rb_usascii_str_new(name, 1); 15890 OBJ_FREEZE(str); 15891 global_symbols.op_sym[i] = str; 15892 } 15893 return str; 15894 } 15895 for (i = 0; i < op_tbl_count; i++) { 15896 if (op_tbl[i].token == id) { 15897 VALUE str = global_symbols.op_sym[i]; 15898 if (!str) { 15899 str = rb_usascii_str_new2(op_tbl[i].name); 15900 OBJ_FREEZE(str); 15901 global_symbols.op_sym[i] = str; 15902 } 15903 return str; 15904 } 15905 } 15906 } 15907 15908 if (st_lookup(global_symbols.id_str, id, &data)) { 15909 VALUE str = (VALUE)data; 15910 if (RBASIC(str)->klass == 0) 15911 RBASIC(str)->klass = rb_cString; 15912 return str; 15913 } 15914 15915 if (is_attrset_id(id)) { 15916 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 15917 VALUE str; 15918 15919 while (!(str = rb_id2str(id2))) { 15920 if (!is_local_id(id2)) return 0; 15921 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 15922 } 15923 str = rb_str_dup(str); 15924 rb_str_cat(str, "=", 1); 15925 rb_intern_str(str); 15926 if (st_lookup(global_symbols.id_str, id, &data)) { 15927 VALUE str = (VALUE)data; 15928 if (RBASIC(str)->klass == 0) 15929 RBASIC(str)->klass = rb_cString; 15930 return str; 15931 } 15932 } 15933 return 0; 15934 } 15935 15936 const char * 15937 rb_id2name(ID id) 15938 { 15939 VALUE str = rb_id2str(id); 15940 15941 if (!str) return 0; 15942 return RSTRING_PTR(str); 15943 } 15944 15945 static int 15946 symbols_i(VALUE sym, ID value, VALUE ary) 15947 { 15948 rb_ary_push(ary, ID2SYM(value)); 15949 return ST_CONTINUE; 15950 } 15951 15952 /* 15953 * call-seq: 15954 * Symbol.all_symbols => array 15955 * 15956 * Returns an array of all the symbols currently in Ruby's symbol 15957 * table. 15958 * 15959 * Symbol.all_symbols.size #=> 903 15960 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 15961 * :chown, :EOFError, :$;, :String, 15962 * :LOCK_SH, :"setuid?", :$<, 15963 * :default_proc, :compact, :extend, 15964 * :Tms, :getwd, :$=, :ThreadGroup, 15965 * :wait2, :$>] 15966 */ 15967 15968 VALUE 15969 rb_sym_all_symbols(void) 15970 { 15971 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 15972 15973 st_foreach(global_symbols.sym_id, symbols_i, ary); 15974 return ary; 15975 } 15976 15977 int 15978 rb_is_const_id(ID id) 15979 { 15980 return is_const_id(id); 15981 } 15982 15983 int 15984 rb_is_class_id(ID id) 15985 { 15986 return is_class_id(id); 15987 } 15988 15989 int 15990 rb_is_instance_id(ID id) 15991 { 15992 return is_instance_id(id); 15993 } 15994 15995 int 15996 rb_is_local_id(ID id) 15997 { 15998 return is_local_id(id); 15999 } 16000 16001 int 16002 rb_is_junk_id(ID id) 16003 { 16004 return is_junk_id(id); 16005 } 16006 16007 #endif /* !RIPPER */ 16008 16009 static void 16010 parser_initialize(struct parser_params *parser) 16011 { 16012 parser->eofp = Qfalse; 16013 16014 parser->parser_lex_strterm = 0; 16015 parser->parser_cond_stack = 0; 16016 parser->parser_cmdarg_stack = 0; 16017 parser->parser_class_nest = 0; 16018 parser->parser_paren_nest = 0; 16019 parser->parser_lpar_beg = 0; 16020 parser->parser_in_single = 0; 16021 parser->parser_in_def = 0; 16022 parser->parser_in_defined = 0; 16023 parser->parser_compile_for_eval = 0; 16024 parser->parser_cur_mid = 0; 16025 parser->parser_tokenbuf = NULL; 16026 parser->parser_tokidx = 0; 16027 parser->parser_toksiz = 0; 16028 parser->parser_heredoc_end = 0; 16029 parser->parser_command_start = TRUE; 16030 parser->parser_deferred_nodes = 0; 16031 parser->parser_lex_pbeg = 0; 16032 parser->parser_lex_p = 0; 16033 parser->parser_lex_pend = 0; 16034 parser->parser_lvtbl = 0; 16035 parser->parser_ruby__end__seen = 0; 16036 parser->parser_ruby_sourcefile = 0; 16037 #ifndef RIPPER 16038 parser->is_ripper = 0; 16039 parser->parser_eval_tree_begin = 0; 16040 parser->parser_eval_tree = 0; 16041 #else 16042 parser->is_ripper = 1; 16043 parser->parser_ruby_sourcefile_string = Qnil; 16044 parser->delayed = Qnil; 16045 16046 parser->result = Qnil; 16047 parser->parsing_thread = Qnil; 16048 parser->toplevel_p = TRUE; 16049 #endif 16050 #ifdef YYMALLOC 16051 parser->heap = NULL; 16052 #endif 16053 parser->enc = rb_usascii_encoding(); 16054 } 16055 16056 #ifdef RIPPER 16057 #define parser_mark ripper_parser_mark 16058 #define parser_free ripper_parser_free 16059 #endif 16060 16061 static void 16062 parser_mark(void *ptr) 16063 { 16064 struct parser_params *p = (struct parser_params*)ptr; 16065 16066 rb_gc_mark((VALUE)p->parser_lex_strterm); 16067 rb_gc_mark((VALUE)p->parser_deferred_nodes); 16068 rb_gc_mark(p->parser_lex_input); 16069 rb_gc_mark(p->parser_lex_lastline); 16070 rb_gc_mark(p->parser_lex_nextline); 16071 #ifndef RIPPER 16072 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 16073 rb_gc_mark((VALUE)p->parser_eval_tree) ; 16074 rb_gc_mark(p->debug_lines); 16075 #else 16076 rb_gc_mark(p->parser_ruby_sourcefile_string); 16077 rb_gc_mark(p->delayed); 16078 rb_gc_mark(p->value); 16079 rb_gc_mark(p->result); 16080 rb_gc_mark(p->parsing_thread); 16081 #endif 16082 #ifdef YYMALLOC 16083 rb_gc_mark((VALUE)p->heap); 16084 #endif 16085 } 16086 16087 static void 16088 parser_free(void *ptr) 16089 { 16090 struct parser_params *p = (struct parser_params*)ptr; 16091 struct local_vars *local, *prev; 16092 16093 if (p->parser_tokenbuf) { 16094 xfree(p->parser_tokenbuf); 16095 } 16096 for (local = p->parser_lvtbl; local; local = prev) { 16097 if (local->vars) xfree(local->vars); 16098 prev = local->prev; 16099 xfree(local); 16100 } 16101 #ifndef RIPPER 16102 xfree(p->parser_ruby_sourcefile); 16103 #endif 16104 xfree(p); 16105 } 16106 16107 static size_t 16108 parser_memsize(const void *ptr) 16109 { 16110 struct parser_params *p = (struct parser_params*)ptr; 16111 struct local_vars *local; 16112 size_t size = sizeof(*p); 16113 16114 if (!ptr) return 0; 16115 size += p->parser_toksiz; 16116 for (local = p->parser_lvtbl; local; local = local->prev) { 16117 size += sizeof(*local); 16118 if (local->vars) size += local->vars->capa * sizeof(ID); 16119 } 16120 #ifndef RIPPER 16121 if (p->parser_ruby_sourcefile) { 16122 size += strlen(p->parser_ruby_sourcefile) + 1; 16123 } 16124 #endif 16125 return size; 16126 } 16127 16128 static const rb_data_type_t parser_data_type = { 16129 "parser", 16130 parser_mark, 16131 parser_free, 16132 parser_memsize, 16133 }; 16134 16135 VALUE rb_parser_get_yydebug(VALUE); 16136 VALUE rb_parser_set_yydebug(VALUE, VALUE); 16137 16138 #ifndef RIPPER 16139 #undef rb_reserved_word 16140 16141 const struct kwtable * 16142 rb_reserved_word(const char *str, unsigned int len) 16143 { 16144 return reserved_word(str, len); 16145 } 16146 16147 static struct parser_params * 16148 parser_new(void) 16149 { 16150 struct parser_params *p; 16151 16152 p = ALLOC_N(struct parser_params, 1); 16153 MEMZERO(p, struct parser_params, 1); 16154 parser_initialize(p); 16155 return p; 16156 } 16157 16158 VALUE 16159 rb_parser_new(void) 16160 { 16161 struct parser_params *p = parser_new(); 16162 16163 return TypedData_Wrap_Struct(0, &parser_data_type, p); 16164 } 16165 16166 /* 16167 * call-seq: 16168 * ripper#end_seen? -> Boolean 16169 * 16170 * Return if parsed source ended by +\_\_END\_\_+. 16171 * This number starts from 1. 16172 */ 16173 VALUE 16174 rb_parser_end_seen_p(VALUE vparser) 16175 { 16176 struct parser_params *parser; 16177 16178 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16179 return ruby__end__seen ? Qtrue : Qfalse; 16180 } 16181 16182 /* 16183 * call-seq: 16184 * ripper#encoding -> encoding 16185 * 16186 * Return encoding of the source. 16187 */ 16188 VALUE 16189 rb_parser_encoding(VALUE vparser) 16190 { 16191 struct parser_params *parser; 16192 16193 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16194 return rb_enc_from_encoding(parser->enc); 16195 } 16196 16197 /* 16198 * call-seq: 16199 * ripper.yydebug -> true or false 16200 * 16201 * Get yydebug. 16202 */ 16203 VALUE 16204 rb_parser_get_yydebug(VALUE self) 16205 { 16206 struct parser_params *parser; 16207 16208 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16209 return yydebug ? Qtrue : Qfalse; 16210 } 16211 16212 /* 16213 * call-seq: 16214 * ripper.yydebug = flag 16215 * 16216 * Set yydebug. 16217 */ 16218 VALUE 16219 rb_parser_set_yydebug(VALUE self, VALUE flag) 16220 { 16221 struct parser_params *parser; 16222 16223 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16224 yydebug = RTEST(flag); 16225 return flag; 16226 } 16227 16228 #ifdef YYMALLOC 16229 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 16230 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 16231 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 16232 (n)->u3.cnt = (c), (p)) 16233 16234 void * 16235 rb_parser_malloc(struct parser_params *parser, size_t size) 16236 { 16237 size_t cnt = HEAPCNT(1, size); 16238 NODE *n = NEWHEAP(); 16239 void *ptr = xmalloc(size); 16240 16241 return ADD2HEAP(n, cnt, ptr); 16242 } 16243 16244 void * 16245 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 16246 { 16247 size_t cnt = HEAPCNT(nelem, size); 16248 NODE *n = NEWHEAP(); 16249 void *ptr = xcalloc(nelem, size); 16250 16251 return ADD2HEAP(n, cnt, ptr); 16252 } 16253 16254 void * 16255 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 16256 { 16257 NODE *n; 16258 size_t cnt = HEAPCNT(1, size); 16259 16260 if (ptr && (n = parser->heap) != NULL) { 16261 do { 16262 if (n->u1.node == ptr) { 16263 n->u1.node = ptr = xrealloc(ptr, size); 16264 if (n->u3.cnt) n->u3.cnt = cnt; 16265 return ptr; 16266 } 16267 } while ((n = n->u2.node) != NULL); 16268 } 16269 n = NEWHEAP(); 16270 ptr = xrealloc(ptr, size); 16271 return ADD2HEAP(n, cnt, ptr); 16272 } 16273 16274 void 16275 rb_parser_free(struct parser_params *parser, void *ptr) 16276 { 16277 NODE **prev = &parser->heap, *n; 16278 16279 while ((n = *prev) != NULL) { 16280 if (n->u1.node == ptr) { 16281 *prev = n->u2.node; 16282 rb_gc_force_recycle((VALUE)n); 16283 break; 16284 } 16285 prev = &n->u2.node; 16286 } 16287 xfree(ptr); 16288 } 16289 #endif 16290 #endif 16291 16292 #ifdef RIPPER 16293 #ifdef RIPPER_DEBUG 16294 extern int rb_is_pointer_to_heap(VALUE); 16295 16296 /* :nodoc: */ 16297 static VALUE 16298 ripper_validate_object(VALUE self, VALUE x) 16299 { 16300 if (x == Qfalse) return x; 16301 if (x == Qtrue) return x; 16302 if (x == Qnil) return x; 16303 if (x == Qundef) 16304 rb_raise(rb_eArgError, "Qundef given"); 16305 if (FIXNUM_P(x)) return x; 16306 if (SYMBOL_P(x)) return x; 16307 if (!rb_is_pointer_to_heap(x)) 16308 rb_raise(rb_eArgError, "invalid pointer: %p", x); 16309 switch (TYPE(x)) { 16310 case T_STRING: 16311 case T_OBJECT: 16312 case T_ARRAY: 16313 case T_BIGNUM: 16314 case T_FLOAT: 16315 return x; 16316 case T_NODE: 16317 if (nd_type(x) != NODE_LASGN) { 16318 rb_raise(rb_eArgError, "NODE given: %p", x); 16319 } 16320 return ((NODE *)x)->nd_rval; 16321 default: 16322 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 16323 x, rb_obj_classname(x)); 16324 } 16325 return x; 16326 } 16327 #endif 16328 16329 #define validate(x) (x = get_value(x)) 16330 16331 static VALUE 16332 ripper_dispatch0(struct parser_params *parser, ID mid) 16333 { 16334 return rb_funcall(parser->value, mid, 0); 16335 } 16336 16337 static VALUE 16338 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 16339 { 16340 validate(a); 16341 return rb_funcall(parser->value, mid, 1, a); 16342 } 16343 16344 static VALUE 16345 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 16346 { 16347 validate(a); 16348 validate(b); 16349 return rb_funcall(parser->value, mid, 2, a, b); 16350 } 16351 16352 static VALUE 16353 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 16354 { 16355 validate(a); 16356 validate(b); 16357 validate(c); 16358 return rb_funcall(parser->value, mid, 3, a, b, c); 16359 } 16360 16361 static VALUE 16362 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 16363 { 16364 validate(a); 16365 validate(b); 16366 validate(c); 16367 validate(d); 16368 return rb_funcall(parser->value, mid, 4, a, b, c, d); 16369 } 16370 16371 static VALUE 16372 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 16373 { 16374 validate(a); 16375 validate(b); 16376 validate(c); 16377 validate(d); 16378 validate(e); 16379 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 16380 } 16381 16382 static const struct kw_assoc { 16383 ID id; 16384 const char *name; 16385 } keyword_to_name[] = { 16386 {keyword_class, "class"}, 16387 {keyword_module, "module"}, 16388 {keyword_def, "def"}, 16389 {keyword_undef, "undef"}, 16390 {keyword_begin, "begin"}, 16391 {keyword_rescue, "rescue"}, 16392 {keyword_ensure, "ensure"}, 16393 {keyword_end, "end"}, 16394 {keyword_if, "if"}, 16395 {keyword_unless, "unless"}, 16396 {keyword_then, "then"}, 16397 {keyword_elsif, "elsif"}, 16398 {keyword_else, "else"}, 16399 {keyword_case, "case"}, 16400 {keyword_when, "when"}, 16401 {keyword_while, "while"}, 16402 {keyword_until, "until"}, 16403 {keyword_for, "for"}, 16404 {keyword_break, "break"}, 16405 {keyword_next, "next"}, 16406 {keyword_redo, "redo"}, 16407 {keyword_retry, "retry"}, 16408 {keyword_in, "in"}, 16409 {keyword_do, "do"}, 16410 {keyword_do_cond, "do"}, 16411 {keyword_do_block, "do"}, 16412 {keyword_return, "return"}, 16413 {keyword_yield, "yield"}, 16414 {keyword_super, "super"}, 16415 {keyword_self, "self"}, 16416 {keyword_nil, "nil"}, 16417 {keyword_true, "true"}, 16418 {keyword_false, "false"}, 16419 {keyword_and, "and"}, 16420 {keyword_or, "or"}, 16421 {keyword_not, "not"}, 16422 {modifier_if, "if"}, 16423 {modifier_unless, "unless"}, 16424 {modifier_while, "while"}, 16425 {modifier_until, "until"}, 16426 {modifier_rescue, "rescue"}, 16427 {keyword_alias, "alias"}, 16428 {keyword_defined, "defined?"}, 16429 {keyword_BEGIN, "BEGIN"}, 16430 {keyword_END, "END"}, 16431 {keyword__LINE__, "__LINE__"}, 16432 {keyword__FILE__, "__FILE__"}, 16433 {keyword__ENCODING__, "__ENCODING__"}, 16434 {0, NULL} 16435 }; 16436 16437 static const char* 16438 keyword_id_to_str(ID id) 16439 { 16440 const struct kw_assoc *a; 16441 16442 for (a = keyword_to_name; a->id; a++) { 16443 if (a->id == id) 16444 return a->name; 16445 } 16446 return NULL; 16447 } 16448 16449 #undef ripper_id2sym 16450 static VALUE 16451 ripper_id2sym(ID id) 16452 { 16453 const char *name; 16454 char buf[8]; 16455 16456 if (id <= 256) { 16457 buf[0] = (char)id; 16458 buf[1] = '\0'; 16459 return ID2SYM(rb_intern2(buf, 1)); 16460 } 16461 if ((name = keyword_id_to_str(id))) { 16462 return ID2SYM(rb_intern(name)); 16463 } 16464 switch (id) { 16465 case tOROP: 16466 name = "||"; 16467 break; 16468 case tANDOP: 16469 name = "&&"; 16470 break; 16471 default: 16472 name = rb_id2name(id); 16473 if (!name) { 16474 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 16475 } 16476 return ID2SYM(id); 16477 } 16478 return ID2SYM(rb_intern(name)); 16479 } 16480 16481 static ID 16482 ripper_get_id(VALUE v) 16483 { 16484 NODE *nd; 16485 if (!RB_TYPE_P(v, T_NODE)) return 0; 16486 nd = (NODE *)v; 16487 if (nd_type(nd) != NODE_LASGN) return 0; 16488 return nd->nd_vid; 16489 } 16490 16491 static VALUE 16492 ripper_get_value(VALUE v) 16493 { 16494 NODE *nd; 16495 if (v == Qundef) return Qnil; 16496 if (!RB_TYPE_P(v, T_NODE)) return v; 16497 nd = (NODE *)v; 16498 if (nd_type(nd) != NODE_LASGN) return Qnil; 16499 return nd->nd_rval; 16500 } 16501 16502 static void 16503 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 16504 { 16505 VALUE str; 16506 va_list args; 16507 16508 va_start(args, fmt); 16509 str = rb_vsprintf(fmt, args); 16510 va_end(args); 16511 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 16512 } 16513 16514 static void 16515 ripper_warn0(struct parser_params *parser, const char *fmt) 16516 { 16517 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 16518 } 16519 16520 static void 16521 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 16522 { 16523 rb_funcall(parser->value, rb_intern("warn"), 2, 16524 STR_NEW2(fmt), INT2NUM(a)); 16525 } 16526 16527 #if 0 16528 static void 16529 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 16530 { 16531 rb_funcall(parser->value, rb_intern("warn"), 2, 16532 STR_NEW2(fmt), STR_NEW2(str)); 16533 } 16534 #endif 16535 16536 static void 16537 ripper_warning0(struct parser_params *parser, const char *fmt) 16538 { 16539 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 16540 } 16541 16542 static void 16543 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 16544 { 16545 rb_funcall(parser->value, rb_intern("warning"), 2, 16546 STR_NEW2(fmt), STR_NEW2(str)); 16547 } 16548 16549 static VALUE 16550 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 16551 { 16552 return rb_funcall(src, ripper_id_gets, 0); 16553 } 16554 16555 static VALUE 16556 ripper_s_allocate(VALUE klass) 16557 { 16558 struct parser_params *p; 16559 VALUE self; 16560 16561 p = ALLOC_N(struct parser_params, 1); 16562 MEMZERO(p, struct parser_params, 1); 16563 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 16564 p->value = self; 16565 return self; 16566 } 16567 16568 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 16569 16570 /* 16571 * call-seq: 16572 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 16573 * 16574 * Create a new Ripper object. 16575 * _src_ must be a String, an IO, or an Object which has #gets method. 16576 * 16577 * This method does not starts parsing. 16578 * See also Ripper#parse and Ripper.parse. 16579 */ 16580 static VALUE 16581 ripper_initialize(int argc, VALUE *argv, VALUE self) 16582 { 16583 struct parser_params *parser; 16584 VALUE src, fname, lineno; 16585 16586 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16587 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 16588 if (rb_obj_respond_to(src, ripper_id_gets, 0)) { 16589 parser->parser_lex_gets = ripper_lex_get_generic; 16590 } 16591 else { 16592 StringValue(src); 16593 parser->parser_lex_gets = lex_get_str; 16594 } 16595 parser->parser_lex_input = src; 16596 parser->eofp = Qfalse; 16597 if (NIL_P(fname)) { 16598 fname = STR_NEW2("(ripper)"); 16599 } 16600 else { 16601 StringValue(fname); 16602 } 16603 parser_initialize(parser); 16604 16605 parser->parser_ruby_sourcefile_string = fname; 16606 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 16607 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 16608 16609 return Qnil; 16610 } 16611 16612 extern VALUE rb_thread_pass(void); 16613 16614 struct ripper_args { 16615 struct parser_params *parser; 16616 int argc; 16617 VALUE *argv; 16618 }; 16619 16620 static VALUE 16621 ripper_parse0(VALUE parser_v) 16622 { 16623 struct parser_params *parser; 16624 16625 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16626 parser_prepare(parser); 16627 ripper_yyparse((void*)parser); 16628 return parser->result; 16629 } 16630 16631 static VALUE 16632 ripper_ensure(VALUE parser_v) 16633 { 16634 struct parser_params *parser; 16635 16636 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16637 parser->parsing_thread = Qnil; 16638 return Qnil; 16639 } 16640 16641 /* 16642 * call-seq: 16643 * ripper#parse 16644 * 16645 * Start parsing and returns the value of the root action. 16646 */ 16647 static VALUE 16648 ripper_parse(VALUE self) 16649 { 16650 struct parser_params *parser; 16651 16652 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16653 if (!ripper_initialized_p(parser)) { 16654 rb_raise(rb_eArgError, "method called for uninitialized object"); 16655 } 16656 if (!NIL_P(parser->parsing_thread)) { 16657 if (parser->parsing_thread == rb_thread_current()) 16658 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 16659 else 16660 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 16661 } 16662 parser->parsing_thread = rb_thread_current(); 16663 rb_ensure(ripper_parse0, self, ripper_ensure, self); 16664 16665 return parser->result; 16666 } 16667 16668 /* 16669 * call-seq: 16670 * ripper#column -> Integer 16671 * 16672 * Return column number of current parsing line. 16673 * This number starts from 0. 16674 */ 16675 static VALUE 16676 ripper_column(VALUE self) 16677 { 16678 struct parser_params *parser; 16679 long col; 16680 16681 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16682 if (!ripper_initialized_p(parser)) { 16683 rb_raise(rb_eArgError, "method called for uninitialized object"); 16684 } 16685 if (NIL_P(parser->parsing_thread)) return Qnil; 16686 col = parser->tokp - parser->parser_lex_pbeg; 16687 return LONG2NUM(col); 16688 } 16689 16690 /* 16691 * call-seq: 16692 * ripper#filename -> String 16693 * 16694 * Return current parsing filename. 16695 */ 16696 static VALUE 16697 ripper_filename(VALUE self) 16698 { 16699 struct parser_params *parser; 16700 16701 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16702 if (!ripper_initialized_p(parser)) { 16703 rb_raise(rb_eArgError, "method called for uninitialized object"); 16704 } 16705 return parser->parser_ruby_sourcefile_string; 16706 } 16707 16708 /* 16709 * call-seq: 16710 * ripper#lineno -> Integer 16711 * 16712 * Return line number of current parsing line. 16713 * This number starts from 1. 16714 */ 16715 static VALUE 16716 ripper_lineno(VALUE self) 16717 { 16718 struct parser_params *parser; 16719 16720 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16721 if (!ripper_initialized_p(parser)) { 16722 rb_raise(rb_eArgError, "method called for uninitialized object"); 16723 } 16724 if (NIL_P(parser->parsing_thread)) return Qnil; 16725 return INT2NUM(parser->parser_ruby_sourceline); 16726 } 16727 16728 #ifdef RIPPER_DEBUG 16729 /* :nodoc: */ 16730 static VALUE 16731 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 16732 { 16733 StringValue(msg); 16734 if (obj == Qundef) { 16735 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 16736 } 16737 return Qnil; 16738 } 16739 16740 /* :nodoc: */ 16741 static VALUE 16742 ripper_value(VALUE self, VALUE obj) 16743 { 16744 return ULONG2NUM(obj); 16745 } 16746 #endif 16747 16748 void 16749 Init_ripper(void) 16750 { 16751 VALUE Ripper; 16752 16753 Ripper = rb_define_class("Ripper", rb_cObject); 16754 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 16755 rb_define_alloc_func(Ripper, ripper_s_allocate); 16756 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 16757 rb_define_method(Ripper, "parse", ripper_parse, 0); 16758 rb_define_method(Ripper, "column", ripper_column, 0); 16759 rb_define_method(Ripper, "filename", ripper_filename, 0); 16760 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 16761 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 16762 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 16763 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 16764 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 16765 #ifdef RIPPER_DEBUG 16766 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 16767 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 16768 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 16769 #endif 16770 16771 ripper_id_gets = rb_intern("gets"); 16772 ripper_init_eventids1(Ripper); 16773 ripper_init_eventids2(Ripper); 16774 /* ensure existing in symbol table */ 16775 rb_intern("||"); 16776 rb_intern("&&"); 16777 } 16778 #endif /* RIPPER */ 16779 16780
1.7.3