|
Ruby
2.0.0p481(2014-05-08revision45883)
|
00001 /* A Bison parser, made by GNU Bison 2.5. */ 00002 00003 /* Bison implementation for Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 /* As a special exception, you may create a larger work that contains 00021 part or all of the Bison parser skeleton and distribute that work 00022 under terms of your choice, so long as that work isn't itself a 00023 parser generator using the skeleton or a modified version thereof 00024 as a parser skeleton. Alternatively, if you modify or redistribute 00025 the parser skeleton itself, you may (at your option) remove this 00026 special exception, which will cause the skeleton and the resulting 00027 Bison output files to be licensed under the GNU General Public 00028 License without this special exception. 00029 00030 This special exception was added by the Free Software Foundation in 00031 version 2.2 of Bison. */ 00032 00033 /* C LALR(1) parser skeleton written by Richard Stallman, by 00034 simplifying the original so-called "semantic" parser. */ 00035 00036 /* All symbols defined below should begin with yy or YY, to avoid 00037 infringing on user name space. This should be done even for local 00038 variables, as they might otherwise be expanded by user macros. 00039 There are some unavoidable exceptions within include files to 00040 define necessary library symbols; they are noted "INFRINGES ON 00041 USER NAME SPACE" below. */ 00042 00043 /* Identify Bison output. */ 00044 #define YYBISON 1 00045 00046 /* Bison version. */ 00047 #define YYBISON_VERSION "2.5" 00048 00049 /* Skeleton name. */ 00050 #define YYSKELETON_NAME "yacc.c" 00051 00052 /* Pure parsers. */ 00053 #define YYPURE 1 00054 00055 /* Push parsers. */ 00056 #define YYPUSH 0 00057 00058 /* Pull parsers. */ 00059 #define YYPULL 1 00060 00061 /* Using locations. */ 00062 #define YYLSP_NEEDED 0 00063 00064 00065 00066 /* Copy the first part of user declarations. */ 00067 00068 /* Line 268 of yacc.c */ 00069 #line 12 "parse.y" 00070 00071 00072 #ifndef PARSER_DEBUG 00073 #define PARSER_DEBUG 0 00074 #endif 00075 #define YYDEBUG 1 00076 #define YYERROR_VERBOSE 1 00077 #define YYSTACK_USE_ALLOCA 0 00078 00079 #include "ruby/ruby.h" 00080 #include "ruby/st.h" 00081 #include "ruby/encoding.h" 00082 #include "internal.h" 00083 #include "node.h" 00084 #include "parse.h" 00085 #include "id.h" 00086 #include "regenc.h" 00087 #include <stdio.h> 00088 #include <errno.h> 00089 #include <ctype.h> 00090 #include "probes.h" 00091 00092 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00093 00094 #define YYMALLOC(size) rb_parser_malloc(parser, (size)) 00095 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 00096 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 00097 #define YYFREE(ptr) rb_parser_free(parser, (ptr)) 00098 #define malloc YYMALLOC 00099 #define realloc YYREALLOC 00100 #define calloc YYCALLOC 00101 #define free YYFREE 00102 00103 #ifndef RIPPER 00104 static ID register_symid(ID, const char *, long, rb_encoding *); 00105 static ID register_symid_str(ID, VALUE); 00106 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 00107 #include "id.c" 00108 #endif 00109 00110 #define is_notop_id(id) ((id)>tLAST_OP_ID) 00111 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00112 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00113 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00114 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00115 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00116 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00117 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00118 #define id_type(id) (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1) 00119 00120 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00121 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00122 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00123 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00124 00125 enum lex_state_bits { 00126 EXPR_BEG_bit, /* ignore newline, +/- is a sign. */ 00127 EXPR_END_bit, /* newline significant, +/- is an operator. */ 00128 EXPR_ENDARG_bit, /* ditto, and unbound braces. */ 00129 EXPR_ENDFN_bit, /* ditto, and unbound braces. */ 00130 EXPR_ARG_bit, /* newline significant, +/- is an operator. */ 00131 EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */ 00132 EXPR_MID_bit, /* newline significant, +/- is an operator. */ 00133 EXPR_FNAME_bit, /* ignore newline, no reserved words. */ 00134 EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */ 00135 EXPR_CLASS_bit, /* immediate after `class', no here document. */ 00136 EXPR_VALUE_bit, /* alike EXPR_BEG but label is disallowed. */ 00137 EXPR_MAX_STATE 00138 }; 00139 /* examine combinations */ 00140 enum lex_state_e { 00141 #define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit) 00142 DEF_EXPR(BEG), 00143 DEF_EXPR(END), 00144 DEF_EXPR(ENDARG), 00145 DEF_EXPR(ENDFN), 00146 DEF_EXPR(ARG), 00147 DEF_EXPR(CMDARG), 00148 DEF_EXPR(MID), 00149 DEF_EXPR(FNAME), 00150 DEF_EXPR(DOT), 00151 DEF_EXPR(CLASS), 00152 DEF_EXPR(VALUE), 00153 EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS), 00154 EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), 00155 EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN) 00156 }; 00157 #define IS_lex_state_for(x, ls) ((x) & (ls)) 00158 #define IS_lex_state(ls) IS_lex_state_for(lex_state, (ls)) 00159 00160 #if PARSER_DEBUG 00161 static const char *lex_state_name(enum lex_state_e state); 00162 #endif 00163 00164 typedef VALUE stack_type; 00165 00166 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 00167 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 00168 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 00169 # define BITSTACK_SET_P(stack) ((stack)&1) 00170 00171 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 00172 #define COND_POP() BITSTACK_POP(cond_stack) 00173 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00174 #define COND_P() BITSTACK_SET_P(cond_stack) 00175 00176 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 00177 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00178 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00179 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00180 00181 struct vtable { 00182 ID *tbl; 00183 int pos; 00184 int capa; 00185 struct vtable *prev; 00186 }; 00187 00188 struct local_vars { 00189 struct vtable *args; 00190 struct vtable *vars; 00191 struct vtable *used; 00192 struct local_vars *prev; 00193 stack_type cmdargs; 00194 }; 00195 00196 #define DVARS_INHERIT ((void*)1) 00197 #define DVARS_TOPSCOPE NULL 00198 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00199 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00200 00201 static int 00202 vtable_size(const struct vtable *tbl) 00203 { 00204 if (POINTER_P(tbl)) { 00205 return tbl->pos; 00206 } 00207 else { 00208 return 0; 00209 } 00210 } 00211 00212 #define VTBL_DEBUG 0 00213 00214 static struct vtable * 00215 vtable_alloc(struct vtable *prev) 00216 { 00217 struct vtable *tbl = ALLOC(struct vtable); 00218 tbl->pos = 0; 00219 tbl->capa = 8; 00220 tbl->tbl = ALLOC_N(ID, tbl->capa); 00221 tbl->prev = prev; 00222 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00223 return tbl; 00224 } 00225 00226 static void 00227 vtable_free(struct vtable *tbl) 00228 { 00229 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00230 if (POINTER_P(tbl)) { 00231 if (tbl->tbl) { 00232 xfree(tbl->tbl); 00233 } 00234 xfree(tbl); 00235 } 00236 } 00237 00238 static void 00239 vtable_add(struct vtable *tbl, ID id) 00240 { 00241 if (!POINTER_P(tbl)) { 00242 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00243 } 00244 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00245 00246 if (tbl->pos == tbl->capa) { 00247 tbl->capa = tbl->capa * 2; 00248 REALLOC_N(tbl->tbl, ID, tbl->capa); 00249 } 00250 tbl->tbl[tbl->pos++] = id; 00251 } 00252 00253 static int 00254 vtable_included(const struct vtable * tbl, ID id) 00255 { 00256 int i; 00257 00258 if (POINTER_P(tbl)) { 00259 for (i = 0; i < tbl->pos; i++) { 00260 if (tbl->tbl[i] == id) { 00261 return i+1; 00262 } 00263 } 00264 } 00265 return 0; 00266 } 00267 00268 00269 #ifndef RIPPER 00270 typedef struct token_info { 00271 const char *token; 00272 int linenum; 00273 int column; 00274 int nonspc; 00275 struct token_info *next; 00276 } token_info; 00277 #endif 00278 00279 /* 00280 Structure of Lexer Buffer: 00281 00282 lex_pbeg tokp lex_p lex_pend 00283 | | | | 00284 |-----------+--------------+------------| 00285 |<------------>| 00286 token 00287 */ 00288 struct parser_params { 00289 int is_ripper; 00290 NODE *heap; 00291 00292 YYSTYPE *parser_yylval; 00293 VALUE eofp; 00294 00295 NODE *parser_lex_strterm; 00296 enum lex_state_e parser_lex_state; 00297 stack_type parser_cond_stack; 00298 stack_type parser_cmdarg_stack; 00299 int parser_class_nest; 00300 int parser_paren_nest; 00301 int parser_lpar_beg; 00302 int parser_in_single; 00303 int parser_in_def; 00304 int parser_brace_nest; 00305 int parser_compile_for_eval; 00306 VALUE parser_cur_mid; 00307 int parser_in_defined; 00308 char *parser_tokenbuf; 00309 int parser_tokidx; 00310 int parser_toksiz; 00311 int parser_tokline; 00312 VALUE parser_lex_input; 00313 VALUE parser_lex_lastline; 00314 VALUE parser_lex_nextline; 00315 const char *parser_lex_pbeg; 00316 const char *parser_lex_p; 00317 const char *parser_lex_pend; 00318 int parser_heredoc_end; 00319 int parser_command_start; 00320 NODE *parser_deferred_nodes; 00321 long parser_lex_gets_ptr; 00322 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00323 struct local_vars *parser_lvtbl; 00324 int parser_ruby__end__seen; 00325 int line_count; 00326 int has_shebang; 00327 char *parser_ruby_sourcefile; /* current source file */ 00328 int parser_ruby_sourceline; /* current line no. */ 00329 VALUE parser_ruby_sourcefile_string; 00330 rb_encoding *enc; 00331 00332 int parser_yydebug; 00333 00334 #ifndef RIPPER 00335 /* Ruby core only */ 00336 NODE *parser_eval_tree_begin; 00337 NODE *parser_eval_tree; 00338 VALUE debug_lines; 00339 VALUE coverage; 00340 int nerr; 00341 00342 int parser_token_info_enabled; 00343 token_info *parser_token_info; 00344 #else 00345 /* Ripper only */ 00346 const char *tokp; 00347 VALUE delayed; 00348 int delayed_line; 00349 int delayed_col; 00350 00351 VALUE value; 00352 VALUE result; 00353 VALUE parsing_thread; 00354 int toplevel_p; 00355 #endif 00356 }; 00357 00358 #define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc) 00359 #define STR_NEW0() rb_enc_str_new(0,0,current_enc) 00360 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc) 00361 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),current_enc) 00362 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00363 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), current_enc) 00364 00365 static int parser_yyerror(struct parser_params*, const char*); 00366 #define yyerror(msg) parser_yyerror(parser, (msg)) 00367 00368 #define lex_strterm (parser->parser_lex_strterm) 00369 #define lex_state (parser->parser_lex_state) 00370 #define cond_stack (parser->parser_cond_stack) 00371 #define cmdarg_stack (parser->parser_cmdarg_stack) 00372 #define class_nest (parser->parser_class_nest) 00373 #define paren_nest (parser->parser_paren_nest) 00374 #define lpar_beg (parser->parser_lpar_beg) 00375 #define brace_nest (parser->parser_brace_nest) 00376 #define in_single (parser->parser_in_single) 00377 #define in_def (parser->parser_in_def) 00378 #define compile_for_eval (parser->parser_compile_for_eval) 00379 #define cur_mid (parser->parser_cur_mid) 00380 #define in_defined (parser->parser_in_defined) 00381 #define tokenbuf (parser->parser_tokenbuf) 00382 #define tokidx (parser->parser_tokidx) 00383 #define toksiz (parser->parser_toksiz) 00384 #define tokline (parser->parser_tokline) 00385 #define lex_input (parser->parser_lex_input) 00386 #define lex_lastline (parser->parser_lex_lastline) 00387 #define lex_nextline (parser->parser_lex_nextline) 00388 #define lex_pbeg (parser->parser_lex_pbeg) 00389 #define lex_p (parser->parser_lex_p) 00390 #define lex_pend (parser->parser_lex_pend) 00391 #define heredoc_end (parser->parser_heredoc_end) 00392 #define command_start (parser->parser_command_start) 00393 #define deferred_nodes (parser->parser_deferred_nodes) 00394 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00395 #define lex_gets (parser->parser_lex_gets) 00396 #define lvtbl (parser->parser_lvtbl) 00397 #define ruby__end__seen (parser->parser_ruby__end__seen) 00398 #define ruby_sourceline (parser->parser_ruby_sourceline) 00399 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00400 #define ruby_sourcefile_string (parser->parser_ruby_sourcefile_string) 00401 #define current_enc (parser->enc) 00402 #define yydebug (parser->parser_yydebug) 00403 #ifdef RIPPER 00404 #else 00405 #define ruby_eval_tree (parser->parser_eval_tree) 00406 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00407 #define ruby_debug_lines (parser->debug_lines) 00408 #define ruby_coverage (parser->coverage) 00409 #endif 00410 00411 #if YYPURE 00412 static int yylex(void*, void*); 00413 #else 00414 static int yylex(void*); 00415 #endif 00416 00417 #ifndef RIPPER 00418 #define yyparse ruby_yyparse 00419 00420 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00421 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 00422 00423 static NODE *cond_gen(struct parser_params*,NODE*); 00424 #define cond(node) cond_gen(parser, (node)) 00425 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00426 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 00427 00428 static NODE *newline_node(NODE*); 00429 static void fixpos(NODE*,NODE*); 00430 00431 static int value_expr_gen(struct parser_params*,NODE*); 00432 static void void_expr_gen(struct parser_params*,NODE*); 00433 static NODE *remove_begin(NODE*); 00434 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00435 #define void_expr0(node) void_expr_gen(parser, (node)) 00436 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00437 static void void_stmts_gen(struct parser_params*,NODE*); 00438 #define void_stmts(node) void_stmts_gen(parser, (node)) 00439 static void reduce_nodes_gen(struct parser_params*,NODE**); 00440 #define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 00441 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00442 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 00443 00444 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00445 #define block_append(h,t) block_append_gen(parser,(h),(t)) 00446 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00447 #define list_append(l,i) list_append_gen(parser,(l),(i)) 00448 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00449 #define list_concat(h,t) list_concat_gen(parser,(h),(t)) 00450 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00451 #define arg_append(h,t) arg_append_gen(parser,(h),(t)) 00452 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00453 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 00454 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00455 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 00456 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00457 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00458 #define new_evstr(n) new_evstr_gen(parser,(n)) 00459 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00460 #define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 00461 static NODE *splat_array(NODE*); 00462 00463 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00464 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 00465 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00466 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 00467 00468 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*); 00469 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 00470 static NODE *new_args_tail_gen(struct parser_params*,NODE*,ID,ID); 00471 #define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 00472 00473 static NODE *negate_lit(NODE*); 00474 static NODE *ret_args_gen(struct parser_params*,NODE*); 00475 #define ret_args(node) ret_args_gen(parser, (node)) 00476 static NODE *arg_blk_pass(NODE*,NODE*); 00477 static NODE *new_yield_gen(struct parser_params*,NODE*); 00478 #define new_yield(node) new_yield_gen(parser, (node)) 00479 static NODE *dsym_node_gen(struct parser_params*,NODE*); 00480 #define dsym_node(node) dsym_node_gen(parser, (node)) 00481 00482 static NODE *gettable_gen(struct parser_params*,ID); 00483 #define gettable(id) gettable_gen(parser,(id)) 00484 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00485 #define assignable(id,node) assignable_gen(parser, (id), (node)) 00486 00487 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00488 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 00489 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00490 #define attrset(node,id) attrset_gen(parser, (node), (id)) 00491 00492 static void rb_backref_error_gen(struct parser_params*,NODE*); 00493 #define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 00494 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00495 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 00496 00497 static NODE *new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 00498 static NODE *new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs); 00499 #define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs)) 00500 static NODE *new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 00501 #define new_const_op_assign(lhs, op, rhs) new_const_op_assign_gen(parser, (lhs), (op), (rhs)) 00502 00503 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00504 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 00505 00506 static ID *local_tbl_gen(struct parser_params*); 00507 #define local_tbl() local_tbl_gen(parser) 00508 00509 static void fixup_nodes(NODE **); 00510 00511 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00512 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 00513 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00514 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 00515 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00516 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 00517 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00518 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 00519 00520 #define get_id(id) (id) 00521 #define get_value(val) (val) 00522 #else 00523 #define value_expr(node) ((void)(node)) 00524 #define remove_begin(node) (node) 00525 #define rb_dvar_defined(id) 0 00526 #define rb_local_defined(id) 0 00527 static ID ripper_get_id(VALUE); 00528 #define get_id(id) ripper_get_id(id) 00529 static VALUE ripper_get_value(VALUE); 00530 #define get_value(val) ripper_get_value(val) 00531 static VALUE assignable_gen(struct parser_params*,VALUE); 00532 #define assignable(lhs,node) assignable_gen(parser, (lhs)) 00533 static int id_is_var_gen(struct parser_params *parser, ID id); 00534 #define id_is_var(id) id_is_var_gen(parser, (id)) 00535 00536 #define node_assign(node1, node2) dispatch2(assign, (node1), (node2)) 00537 00538 static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs); 00539 static VALUE new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs); 00540 #define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs)) 00541 00542 #endif /* !RIPPER */ 00543 00544 #define new_op_assign(lhs, op, rhs) new_op_assign_gen(parser, (lhs), (op), (rhs)) 00545 00546 static ID formal_argument_gen(struct parser_params*, ID); 00547 #define formal_argument(id) formal_argument_gen(parser, (id)) 00548 static ID shadowing_lvar_gen(struct parser_params*,ID); 00549 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 00550 static void new_bv_gen(struct parser_params*,ID); 00551 #define new_bv(id) new_bv_gen(parser, (id)) 00552 00553 static void local_push_gen(struct parser_params*,int); 00554 #define local_push(top) local_push_gen(parser,(top)) 00555 static void local_pop_gen(struct parser_params*); 00556 #define local_pop() local_pop_gen(parser) 00557 static int local_var_gen(struct parser_params*, ID); 00558 #define local_var(id) local_var_gen(parser, (id)) 00559 static int arg_var_gen(struct parser_params*, ID); 00560 #define arg_var(id) arg_var_gen(parser, (id)) 00561 static int local_id_gen(struct parser_params*, ID); 00562 #define local_id(id) local_id_gen(parser, (id)) 00563 static ID internal_id_gen(struct parser_params*); 00564 #define internal_id() internal_id_gen(parser) 00565 00566 static const struct vtable *dyna_push_gen(struct parser_params *); 00567 #define dyna_push() dyna_push_gen(parser) 00568 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00569 #define dyna_pop(node) dyna_pop_gen(parser, (node)) 00570 static int dyna_in_block_gen(struct parser_params*); 00571 #define dyna_in_block() dyna_in_block_gen(parser) 00572 #define dyna_var(id) local_var(id) 00573 static int dvar_defined_gen(struct parser_params*,ID,int); 00574 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 00575 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 00576 static int dvar_curr_gen(struct parser_params*,ID); 00577 #define dvar_curr(id) dvar_curr_gen(parser, (id)) 00578 00579 static int lvar_defined_gen(struct parser_params*, ID); 00580 #define lvar_defined(id) lvar_defined_gen(parser, (id)) 00581 00582 #define RE_OPTION_ONCE (1<<16) 00583 #define RE_OPTION_ENCODING_SHIFT 8 00584 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00585 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00586 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00587 #define RE_OPTION_MASK 0xff 00588 #define RE_OPTION_ARG_ENCODING_NONE 32 00589 00590 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00591 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00592 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00593 #define nd_func u1.id 00594 #if SIZEOF_SHORT == 2 00595 #define nd_term(node) ((signed short)(node)->u2.id) 00596 #else 00597 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00598 #endif 00599 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00600 #define nd_nest u3.cnt 00601 00602 /****** Ripper *******/ 00603 00604 #ifdef RIPPER 00605 #define RIPPER_VERSION "0.1.0" 00606 00607 #include "eventids1.c" 00608 #include "eventids2.c" 00609 00610 static VALUE ripper_dispatch0(struct parser_params*,ID); 00611 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00612 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00613 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00614 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00615 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00616 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE); 00617 00618 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00619 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 00620 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 00621 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 00622 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 00623 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 00624 #define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e), (f), (g)) 00625 00626 #define yyparse ripper_yyparse 00627 00628 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00629 static VALUE ripper_id2sym(ID); 00630 #ifdef __GNUC__ 00631 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00632 ID2SYM(id) : ripper_id2sym(id)) 00633 #endif 00634 00635 #define arg_new() dispatch0(args_new) 00636 #define arg_add(l,a) dispatch2(args_add, (l), (a)) 00637 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 00638 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 00639 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 00640 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 00641 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 00642 00643 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 00644 #define mrhs_new() dispatch0(mrhs_new) 00645 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 00646 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 00647 00648 #define mlhs_new() dispatch0(mlhs_new) 00649 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 00650 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 00651 00652 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \ 00653 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk)) 00654 00655 #define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 00656 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 00657 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 00658 00659 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 00660 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 00661 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 00662 00663 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00664 00665 static inline VALUE 00666 new_args_gen(struct parser_params *parser, VALUE f, VALUE o, VALUE r, VALUE p, VALUE tail) 00667 { 00668 NODE *t = (NODE *)tail; 00669 VALUE k = t->u1.value, kr = t->u2.value, b = t->u3.value; 00670 return params_new(f, o, r, p, k, kr, escape_Qundef(b)); 00671 } 00672 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 00673 00674 static inline VALUE 00675 new_args_tail_gen(struct parser_params *parser, VALUE k, VALUE kr, VALUE b) 00676 { 00677 return (VALUE)rb_node_newnode(NODE_MEMO, k, kr, b); 00678 } 00679 #define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 00680 00681 #define FIXME 0 00682 00683 #endif /* RIPPER */ 00684 00685 #ifndef RIPPER 00686 # define Qnone 0 00687 # define ifndef_ripper(x) (x) 00688 #else 00689 # define Qnone Qnil 00690 # define ifndef_ripper(x) 00691 #endif 00692 00693 #ifndef RIPPER 00694 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 00695 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00696 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00697 # define rb_warn4S(file,line,fmt,a) rb_compile_warn((file), (line), (fmt), (a)) 00698 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 00699 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00700 #else 00701 # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 00702 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 00703 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 00704 # define rb_warn4S(file,line,fmt,a) ripper_warnS(parser, (fmt), (a)) 00705 # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 00706 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 00707 static void ripper_warn0(struct parser_params*, const char*); 00708 static void ripper_warnI(struct parser_params*, const char*, int); 00709 static void ripper_warnS(struct parser_params*, const char*, const char*); 00710 static void ripper_warning0(struct parser_params*, const char*); 00711 static void ripper_warningS(struct parser_params*, const char*, const char*); 00712 #endif 00713 00714 #ifdef RIPPER 00715 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00716 # define rb_compile_error ripper_compile_error 00717 # define compile_error ripper_compile_error 00718 # define PARSER_ARG parser, 00719 #else 00720 # define rb_compile_error rb_compile_error_with_enc 00721 # define compile_error parser->nerr++,rb_compile_error_with_enc 00722 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 00723 #endif 00724 00725 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00726 for instance). This is too low for Ruby to parse some files, such as 00727 date/format.rb, therefore bump the value up to at least Bison's default. */ 00728 #ifdef OLD_YACC 00729 #ifndef YYMAXDEPTH 00730 #define YYMAXDEPTH 10000 00731 #endif 00732 #endif 00733 00734 #ifndef RIPPER 00735 static void token_info_push(struct parser_params*, const char *token); 00736 static void token_info_pop(struct parser_params*, const char *token); 00737 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 00738 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 00739 #else 00740 #define token_info_push(token) /* nothing */ 00741 #define token_info_pop(token) /* nothing */ 00742 #endif 00743 00744 00745 /* Line 268 of yacc.c */ 00746 #line 747 "parse.c" 00747 00748 /* Enabling traces. */ 00749 #ifndef YYDEBUG 00750 # define YYDEBUG 0 00751 #endif 00752 00753 /* Enabling verbose error messages. */ 00754 #ifdef YYERROR_VERBOSE 00755 # undef YYERROR_VERBOSE 00756 # define YYERROR_VERBOSE 1 00757 #else 00758 # define YYERROR_VERBOSE 0 00759 #endif 00760 00761 /* Enabling the token table. */ 00762 #ifndef YYTOKEN_TABLE 00763 # define YYTOKEN_TABLE 0 00764 #endif 00765 00766 00767 /* Tokens. */ 00768 #ifndef YYTOKENTYPE 00769 # define YYTOKENTYPE 00770 /* Put the tokens into the symbol table, so that GDB and other debuggers 00771 know about them. */ 00772 enum yytokentype { 00773 END_OF_INPUT = 0, 00774 keyword_class = 258, 00775 keyword_module = 259, 00776 keyword_def = 260, 00777 keyword_undef = 261, 00778 keyword_begin = 262, 00779 keyword_rescue = 263, 00780 keyword_ensure = 264, 00781 keyword_end = 265, 00782 keyword_if = 266, 00783 keyword_unless = 267, 00784 keyword_then = 268, 00785 keyword_elsif = 269, 00786 keyword_else = 270, 00787 keyword_case = 271, 00788 keyword_when = 272, 00789 keyword_while = 273, 00790 keyword_until = 274, 00791 keyword_for = 275, 00792 keyword_break = 276, 00793 keyword_next = 277, 00794 keyword_redo = 278, 00795 keyword_retry = 279, 00796 keyword_in = 280, 00797 keyword_do = 281, 00798 keyword_do_cond = 282, 00799 keyword_do_block = 283, 00800 keyword_do_LAMBDA = 284, 00801 keyword_return = 285, 00802 keyword_yield = 286, 00803 keyword_super = 287, 00804 keyword_self = 288, 00805 keyword_nil = 289, 00806 keyword_true = 290, 00807 keyword_false = 291, 00808 keyword_and = 292, 00809 keyword_or = 293, 00810 keyword_not = 294, 00811 modifier_if = 295, 00812 modifier_unless = 296, 00813 modifier_while = 297, 00814 modifier_until = 298, 00815 modifier_rescue = 299, 00816 keyword_alias = 300, 00817 keyword_defined = 301, 00818 keyword_BEGIN = 302, 00819 keyword_END = 303, 00820 keyword__LINE__ = 304, 00821 keyword__FILE__ = 305, 00822 keyword__ENCODING__ = 306, 00823 tIDENTIFIER = 307, 00824 tFID = 308, 00825 tGVAR = 309, 00826 tIVAR = 310, 00827 tCONSTANT = 311, 00828 tCVAR = 312, 00829 tLABEL = 313, 00830 tINTEGER = 314, 00831 tFLOAT = 315, 00832 tSTRING_CONTENT = 316, 00833 tCHAR = 317, 00834 tNTH_REF = 318, 00835 tBACK_REF = 319, 00836 tREGEXP_END = 320, 00837 tUPLUS = 130, 00838 tUMINUS = 131, 00839 tPOW = 132, 00840 tCMP = 134, 00841 tEQ = 139, 00842 tEQQ = 140, 00843 tNEQ = 141, 00844 tGEQ = 138, 00845 tLEQ = 137, 00846 tANDOP = 321, 00847 tOROP = 322, 00848 tMATCH = 142, 00849 tNMATCH = 143, 00850 tDOT2 = 128, 00851 tDOT3 = 129, 00852 tAREF = 144, 00853 tASET = 145, 00854 tLSHFT = 135, 00855 tRSHFT = 136, 00856 tCOLON2 = 323, 00857 tCOLON3 = 324, 00858 tOP_ASGN = 325, 00859 tASSOC = 326, 00860 tLPAREN = 327, 00861 tLPAREN_ARG = 328, 00862 tRPAREN = 329, 00863 tLBRACK = 330, 00864 tLBRACE = 331, 00865 tLBRACE_ARG = 332, 00866 tSTAR = 333, 00867 tDSTAR = 334, 00868 tAMPER = 335, 00869 tLAMBDA = 336, 00870 tSYMBEG = 337, 00871 tSTRING_BEG = 338, 00872 tXSTRING_BEG = 339, 00873 tREGEXP_BEG = 340, 00874 tWORDS_BEG = 341, 00875 tQWORDS_BEG = 342, 00876 tSYMBOLS_BEG = 343, 00877 tQSYMBOLS_BEG = 344, 00878 tSTRING_DBEG = 345, 00879 tSTRING_DEND = 346, 00880 tSTRING_DVAR = 347, 00881 tSTRING_END = 348, 00882 tLAMBEG = 349, 00883 tLOWEST = 350, 00884 tUMINUS_NUM = 351, 00885 tLAST_TOKEN = 352 00886 }; 00887 #endif 00888 00889 00890 00891 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00892 typedef union YYSTYPE 00893 { 00894 00895 /* Line 293 of yacc.c */ 00896 #line 691 "parse.y" 00897 00898 VALUE val; 00899 NODE *node; 00900 ID id; 00901 int num; 00902 const struct vtable *vars; 00903 00904 00905 00906 /* Line 293 of yacc.c */ 00907 #line 908 "parse.c" 00908 } YYSTYPE; 00909 # define YYSTYPE_IS_TRIVIAL 1 00910 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00911 # define YYSTYPE_IS_DECLARED 1 00912 #endif 00913 00914 00915 /* Copy the second part of user declarations. */ 00916 00917 00918 /* Line 343 of yacc.c */ 00919 #line 920 "parse.c" 00920 00921 #ifdef short 00922 # undef short 00923 #endif 00924 00925 #ifdef YYTYPE_UINT8 00926 typedef YYTYPE_UINT8 yytype_uint8; 00927 #else 00928 typedef unsigned char yytype_uint8; 00929 #endif 00930 00931 #ifdef YYTYPE_INT8 00932 typedef YYTYPE_INT8 yytype_int8; 00933 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00934 || defined __cplusplus || defined _MSC_VER) 00935 typedef signed char yytype_int8; 00936 #else 00937 typedef short int yytype_int8; 00938 #endif 00939 00940 #ifdef YYTYPE_UINT16 00941 typedef YYTYPE_UINT16 yytype_uint16; 00942 #else 00943 typedef unsigned short int yytype_uint16; 00944 #endif 00945 00946 #ifdef YYTYPE_INT16 00947 typedef YYTYPE_INT16 yytype_int16; 00948 #else 00949 typedef short int yytype_int16; 00950 #endif 00951 00952 #ifndef YYSIZE_T 00953 # ifdef __SIZE_TYPE__ 00954 # define YYSIZE_T __SIZE_TYPE__ 00955 # elif defined size_t 00956 # define YYSIZE_T size_t 00957 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00958 || defined __cplusplus || defined _MSC_VER) 00959 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00960 # define YYSIZE_T size_t 00961 # else 00962 # define YYSIZE_T unsigned int 00963 # endif 00964 #endif 00965 00966 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00967 00968 #ifndef YY_ 00969 # if defined YYENABLE_NLS && YYENABLE_NLS 00970 # if ENABLE_NLS 00971 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00972 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00973 # endif 00974 # endif 00975 # ifndef YY_ 00976 # define YY_(msgid) msgid 00977 # endif 00978 #endif 00979 00980 /* Suppress unused-variable warnings by "using" E. */ 00981 #if ! defined lint || defined __GNUC__ 00982 # define YYUSE(e) ((void) (e)) 00983 #else 00984 # define YYUSE(e) /* empty */ 00985 #endif 00986 00987 /* Identity function, used to suppress warnings about constant conditions. */ 00988 #ifndef lint 00989 # define YYID(n) (n) 00990 #else 00991 #if (defined __STDC__ || defined __C99__FUNC__ \ 00992 || defined __cplusplus || defined _MSC_VER) 00993 static int 00994 YYID (int yyi) 00995 #else 00996 static int 00997 YYID (yyi) 00998 int yyi; 00999 #endif 01000 { 01001 return yyi; 01002 } 01003 #endif 01004 01005 #if ! defined yyoverflow || YYERROR_VERBOSE 01006 01007 /* The parser invokes alloca or malloc; define the necessary symbols. */ 01008 01009 # ifdef YYSTACK_USE_ALLOCA 01010 # if YYSTACK_USE_ALLOCA 01011 # ifdef __GNUC__ 01012 # define YYSTACK_ALLOC __builtin_alloca 01013 # elif defined __BUILTIN_VA_ARG_INCR 01014 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 01015 # elif defined _AIX 01016 # define YYSTACK_ALLOC __alloca 01017 # elif defined _MSC_VER 01018 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 01019 # define alloca _alloca 01020 # else 01021 # define YYSTACK_ALLOC alloca 01022 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01023 || defined __cplusplus || defined _MSC_VER) 01024 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01025 # ifndef EXIT_SUCCESS 01026 # define EXIT_SUCCESS 0 01027 # endif 01028 # endif 01029 # endif 01030 # endif 01031 # endif 01032 01033 # ifdef YYSTACK_ALLOC 01034 /* Pacify GCC's `empty if-body' warning. */ 01035 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 01036 # ifndef YYSTACK_ALLOC_MAXIMUM 01037 /* The OS might guarantee only one guard page at the bottom of the stack, 01038 and a page size can be as small as 4096 bytes. So we cannot safely 01039 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 01040 to allow for a few compiler-allocated temporary stack slots. */ 01041 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 01042 # endif 01043 # else 01044 # define YYSTACK_ALLOC YYMALLOC 01045 # define YYSTACK_FREE YYFREE 01046 # ifndef YYSTACK_ALLOC_MAXIMUM 01047 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 01048 # endif 01049 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 01050 && ! ((defined YYMALLOC || defined malloc) \ 01051 && (defined YYFREE || defined free))) 01052 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01053 # ifndef EXIT_SUCCESS 01054 # define EXIT_SUCCESS 0 01055 # endif 01056 # endif 01057 # ifndef YYMALLOC 01058 # define YYMALLOC malloc 01059 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01060 || defined __cplusplus || defined _MSC_VER) 01061 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 01062 # endif 01063 # endif 01064 # ifndef YYFREE 01065 # define YYFREE free 01066 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01067 || defined __cplusplus || defined _MSC_VER) 01068 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01069 # endif 01070 # endif 01071 # endif 01072 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01073 01074 01075 #if (! defined yyoverflow \ 01076 && (! defined __cplusplus \ 01077 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01078 01079 /* A type that is properly aligned for any stack member. */ 01080 union yyalloc 01081 { 01082 yytype_int16 yyss_alloc; 01083 YYSTYPE yyvs_alloc; 01084 }; 01085 01086 /* The size of the maximum gap between one aligned stack and the next. */ 01087 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01088 01089 /* The size of an array large to enough to hold all stacks, each with 01090 N elements. */ 01091 # define YYSTACK_BYTES(N) \ 01092 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01093 + YYSTACK_GAP_MAXIMUM) 01094 01095 # define YYCOPY_NEEDED 1 01096 01097 /* Relocate STACK from its old location to the new one. The 01098 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01099 elements in the stack, and YYPTR gives the new location of the 01100 stack. Advance YYPTR to a properly aligned location for the next 01101 stack. */ 01102 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 01103 do \ 01104 { \ 01105 YYSIZE_T yynewbytes; \ 01106 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 01107 Stack = &yyptr->Stack_alloc; \ 01108 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01109 yyptr += yynewbytes / sizeof (*yyptr); \ 01110 } \ 01111 while (YYID (0)) 01112 01113 #endif 01114 01115 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 01116 /* Copy COUNT objects from FROM to TO. The source and destination do 01117 not overlap. */ 01118 # ifndef YYCOPY 01119 # if defined __GNUC__ && 1 < __GNUC__ 01120 # define YYCOPY(To, From, Count) \ 01121 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01122 # else 01123 # define YYCOPY(To, From, Count) \ 01124 do \ 01125 { \ 01126 YYSIZE_T yyi; \ 01127 for (yyi = 0; yyi < (Count); yyi++) \ 01128 (To)[yyi] = (From)[yyi]; \ 01129 } \ 01130 while (YYID (0)) 01131 # endif 01132 # endif 01133 #endif /* !YYCOPY_NEEDED */ 01134 01135 /* YYFINAL -- State number of the termination state. */ 01136 #define YYFINAL 3 01137 /* YYLAST -- Last index in YYTABLE. */ 01138 #define YYLAST 11084 01139 01140 /* YYNTOKENS -- Number of terminals. */ 01141 #define YYNTOKENS 142 01142 /* YYNNTS -- Number of nonterminals. */ 01143 #define YYNNTS 198 01144 /* YYNRULES -- Number of rules. */ 01145 #define YYNRULES 619 01146 /* YYNRULES -- Number of states. */ 01147 #define YYNSTATES 1056 01148 01149 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01150 #define YYUNDEFTOK 2 01151 #define YYMAXUTOK 352 01152 01153 #define YYTRANSLATE(YYX) \ 01154 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01155 01156 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01157 static const yytype_uint8 yytranslate[] = 01158 { 01159 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01160 141, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01161 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01162 2, 2, 140, 127, 2, 2, 2, 125, 120, 2, 01163 136, 137, 123, 121, 134, 122, 133, 124, 2, 2, 01164 2, 2, 2, 2, 2, 2, 2, 2, 115, 139, 01165 117, 113, 116, 114, 2, 2, 2, 2, 2, 2, 01166 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01167 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01168 2, 132, 2, 138, 119, 2, 135, 2, 2, 2, 01169 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01170 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01171 2, 2, 2, 130, 118, 131, 128, 2, 79, 80, 01172 66, 67, 68, 2, 69, 83, 84, 74, 73, 70, 01173 71, 72, 77, 78, 81, 82, 2, 2, 2, 2, 01174 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01175 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01176 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01177 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01179 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01181 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01183 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01184 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01185 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01186 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01187 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01188 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01189 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01190 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01191 65, 75, 76, 85, 86, 87, 88, 89, 90, 91, 01192 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 01193 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 01194 112, 126, 129 01195 }; 01196 01197 #if YYDEBUG 01198 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01199 YYRHS. */ 01200 static const yytype_uint16 yyprhs[] = 01201 { 01202 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01203 23, 24, 30, 35, 38, 40, 42, 46, 49, 51, 01204 52, 58, 59, 64, 68, 72, 76, 79, 83, 87, 01205 91, 95, 99, 104, 106, 110, 114, 121, 127, 133, 01206 139, 145, 149, 153, 157, 161, 163, 167, 171, 173, 01207 177, 181, 185, 188, 190, 192, 194, 196, 198, 203, 01208 204, 210, 212, 215, 219, 224, 230, 235, 241, 244, 01209 247, 250, 253, 256, 258, 262, 264, 268, 270, 273, 01210 277, 283, 286, 291, 294, 299, 301, 305, 307, 311, 01211 314, 318, 320, 324, 326, 328, 333, 337, 341, 345, 01212 349, 352, 354, 356, 358, 363, 367, 371, 375, 379, 01213 382, 384, 386, 388, 391, 393, 397, 399, 401, 403, 01214 405, 407, 409, 411, 413, 415, 417, 418, 423, 425, 01215 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01216 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01217 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01218 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01219 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01220 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01221 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 01222 569, 575, 579, 585, 592, 598, 604, 610, 616, 621, 01223 625, 629, 633, 637, 641, 645, 649, 653, 657, 662, 01224 667, 670, 673, 677, 681, 685, 689, 693, 697, 701, 01225 705, 709, 713, 717, 721, 725, 728, 731, 735, 739, 01226 743, 747, 748, 753, 760, 762, 764, 766, 769, 774, 01227 777, 781, 783, 785, 787, 789, 792, 797, 800, 802, 01228 805, 808, 813, 815, 816, 819, 822, 825, 827, 829, 01229 832, 836, 841, 845, 850, 853, 855, 857, 859, 861, 01230 863, 865, 867, 869, 871, 873, 875, 876, 881, 882, 01231 886, 887, 892, 896, 900, 903, 907, 911, 913, 918, 01232 922, 924, 925, 932, 937, 941, 944, 946, 949, 952, 01233 959, 966, 967, 968, 976, 977, 978, 986, 992, 997, 01234 998, 999, 1009, 1010, 1017, 1018, 1019, 1028, 1029, 1035, 01235 1036, 1043, 1044, 1045, 1055, 1057, 1059, 1061, 1063, 1065, 01236 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 01237 1087, 1089, 1091, 1094, 1096, 1098, 1100, 1106, 1108, 1111, 01238 1113, 1115, 1117, 1121, 1123, 1127, 1129, 1134, 1141, 1145, 01239 1151, 1154, 1159, 1161, 1165, 1170, 1173, 1176, 1178, 1181, 01240 1182, 1189, 1198, 1203, 1210, 1215, 1218, 1225, 1228, 1233, 01241 1240, 1243, 1248, 1251, 1256, 1258, 1260, 1262, 1266, 1268, 01242 1273, 1275, 1280, 1282, 1286, 1288, 1290, 1291, 1292, 1293, 01243 1299, 1304, 1306, 1310, 1314, 1315, 1321, 1324, 1329, 1335, 01244 1341, 1344, 1345, 1351, 1352, 1358, 1362, 1363, 1368, 1369, 01245 1374, 1377, 1379, 1384, 1385, 1391, 1392, 1398, 1404, 1406, 01246 1408, 1415, 1417, 1419, 1421, 1423, 1426, 1428, 1431, 1433, 01247 1435, 1437, 1439, 1441, 1443, 1445, 1448, 1452, 1456, 1460, 01248 1464, 1468, 1469, 1473, 1475, 1478, 1482, 1486, 1487, 1491, 01249 1495, 1499, 1503, 1507, 1508, 1512, 1513, 1517, 1518, 1521, 01250 1522, 1525, 1526, 1529, 1531, 1532, 1536, 1537, 1538, 1539, 01251 1546, 1548, 1550, 1552, 1554, 1557, 1559, 1561, 1563, 1565, 01252 1569, 1571, 1573, 1576, 1579, 1581, 1583, 1585, 1587, 1589, 01253 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 01254 1611, 1613, 1615, 1617, 1618, 1623, 1626, 1630, 1633, 1638, 01255 1641, 1644, 1646, 1649, 1650, 1657, 1666, 1671, 1678, 1683, 01256 1690, 1693, 1698, 1705, 1708, 1713, 1716, 1721, 1723, 1724, 01257 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1742, 1744, 1748, 01258 1751, 1754, 1756, 1760, 1762, 1766, 1768, 1770, 1773, 1775, 01259 1779, 1783, 1785, 1789, 1791, 1795, 1797, 1799, 1802, 1804, 01260 1806, 1808, 1811, 1814, 1816, 1818, 1819, 1824, 1826, 1829, 01261 1831, 1835, 1839, 1842, 1845, 1847, 1849, 1851, 1853, 1855, 01262 1857, 1859, 1861, 1863, 1865, 1867, 1869, 1870, 1872, 1873, 01263 1875, 1878, 1881, 1882, 1884, 1886, 1888, 1890, 1892, 1895 01264 }; 01265 01266 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01267 static const yytype_int16 yyrhs[] = 01268 { 01269 143, 0, -1, -1, 144, 145, -1, 146, 332, -1, 01270 339, -1, 147, -1, 146, 338, 147, -1, 1, 147, 01271 -1, 154, -1, -1, 47, 148, 130, 145, 131, -1, 01272 150, 261, 229, 264, -1, 151, 332, -1, 339, -1, 01273 152, -1, 151, 338, 152, -1, 1, 154, -1, 154, 01274 -1, -1, 47, 153, 130, 145, 131, -1, -1, 45, 01275 177, 155, 177, -1, 45, 54, 54, -1, 45, 54, 01276 64, -1, 45, 54, 63, -1, 6, 178, -1, 154, 01277 40, 158, -1, 154, 41, 158, -1, 154, 42, 158, 01278 -1, 154, 43, 158, -1, 154, 44, 154, -1, 48, 01279 130, 150, 131, -1, 156, -1, 165, 113, 159, -1, 01280 296, 87, 159, -1, 214, 132, 188, 335, 87, 159, 01281 -1, 214, 133, 52, 87, 159, -1, 214, 133, 56, 01282 87, 159, -1, 214, 85, 56, 87, 159, -1, 214, 01283 85, 52, 87, 159, -1, 297, 87, 159, -1, 172, 01284 113, 195, -1, 165, 113, 184, -1, 165, 113, 195, 01285 -1, 157, -1, 172, 113, 159, -1, 172, 113, 156, 01286 -1, 159, -1, 157, 37, 157, -1, 157, 38, 157, 01287 -1, 39, 333, 157, -1, 127, 159, -1, 182, -1, 01288 157, -1, 164, -1, 160, -1, 250, -1, 250, 331, 01289 329, 190, -1, -1, 94, 162, 237, 150, 131, -1, 01290 328, -1, 163, 190, -1, 163, 190, 161, -1, 214, 01291 133, 329, 190, -1, 214, 133, 329, 190, 161, -1, 01292 214, 85, 329, 190, -1, 214, 85, 329, 190, 161, 01293 -1, 32, 190, -1, 31, 190, -1, 30, 189, -1, 01294 21, 189, -1, 22, 189, -1, 167, -1, 89, 166, 01295 334, -1, 167, -1, 89, 166, 334, -1, 169, -1, 01296 169, 168, -1, 169, 95, 171, -1, 169, 95, 171, 01297 134, 170, -1, 169, 95, -1, 169, 95, 134, 170, 01298 -1, 95, 171, -1, 95, 171, 134, 170, -1, 95, 01299 -1, 95, 134, 170, -1, 171, -1, 89, 166, 334, 01300 -1, 168, 134, -1, 169, 168, 134, -1, 168, -1, 01301 170, 134, 168, -1, 293, -1, 294, -1, 214, 132, 01302 188, 335, -1, 214, 133, 52, -1, 214, 85, 52, 01303 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 01304 56, -1, 297, -1, 293, -1, 294, -1, 214, 132, 01305 188, 335, -1, 214, 133, 52, -1, 214, 85, 52, 01306 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 01307 56, -1, 297, -1, 52, -1, 56, -1, 86, 173, 01308 -1, 173, -1, 214, 85, 173, -1, 52, -1, 56, 01309 -1, 53, -1, 180, -1, 181, -1, 175, -1, 289, 01310 -1, 176, -1, 291, -1, 177, -1, -1, 178, 134, 01311 179, 177, -1, 118, -1, 119, -1, 120, -1, 69, 01312 -1, 70, -1, 71, -1, 77, -1, 78, -1, 116, 01313 -1, 73, -1, 117, -1, 74, -1, 72, -1, 83, 01314 -1, 84, -1, 121, -1, 122, -1, 123, -1, 95, 01315 -1, 124, -1, 125, -1, 68, -1, 96, -1, 127, 01316 -1, 128, -1, 66, -1, 67, -1, 81, -1, 82, 01317 -1, 135, -1, 49, -1, 50, -1, 51, -1, 47, 01318 -1, 48, -1, 45, -1, 37, -1, 7, -1, 21, 01319 -1, 16, -1, 3, -1, 5, -1, 46, -1, 26, 01320 -1, 15, -1, 14, -1, 10, -1, 9, -1, 36, 01321 -1, 20, -1, 25, -1, 4, -1, 22, -1, 34, 01322 -1, 39, -1, 38, -1, 23, -1, 8, -1, 24, 01323 -1, 30, -1, 33, -1, 32, -1, 13, -1, 35, 01324 -1, 6, -1, 17, -1, 31, -1, 11, -1, 12, 01325 -1, 18, -1, 19, -1, 172, 113, 182, -1, 172, 01326 113, 182, 44, 182, -1, 296, 87, 182, -1, 296, 01327 87, 182, 44, 182, -1, 214, 132, 188, 335, 87, 01328 182, -1, 214, 133, 52, 87, 182, -1, 214, 133, 01329 56, 87, 182, -1, 214, 85, 52, 87, 182, -1, 01330 214, 85, 56, 87, 182, -1, 86, 56, 87, 182, 01331 -1, 297, 87, 182, -1, 182, 79, 182, -1, 182, 01332 80, 182, -1, 182, 121, 182, -1, 182, 122, 182, 01333 -1, 182, 123, 182, -1, 182, 124, 182, -1, 182, 01334 125, 182, -1, 182, 68, 182, -1, 126, 59, 68, 01335 182, -1, 126, 60, 68, 182, -1, 66, 182, -1, 01336 67, 182, -1, 182, 118, 182, -1, 182, 119, 182, 01337 -1, 182, 120, 182, -1, 182, 69, 182, -1, 182, 01338 116, 182, -1, 182, 73, 182, -1, 182, 117, 182, 01339 -1, 182, 74, 182, -1, 182, 70, 182, -1, 182, 01340 71, 182, -1, 182, 72, 182, -1, 182, 77, 182, 01341 -1, 182, 78, 182, -1, 127, 182, -1, 128, 182, 01342 -1, 182, 83, 182, -1, 182, 84, 182, -1, 182, 01343 75, 182, -1, 182, 76, 182, -1, -1, 46, 333, 01344 183, 182, -1, 182, 114, 182, 333, 115, 182, -1, 01345 196, -1, 182, -1, 339, -1, 194, 336, -1, 194, 01346 134, 326, 336, -1, 326, 336, -1, 136, 188, 334, 01347 -1, 339, -1, 186, -1, 339, -1, 189, -1, 194, 01348 134, -1, 194, 134, 326, 134, -1, 326, 134, -1, 01349 164, -1, 194, 193, -1, 326, 193, -1, 194, 134, 01350 326, 193, -1, 192, -1, -1, 191, 189, -1, 97, 01351 184, -1, 134, 192, -1, 339, -1, 184, -1, 95, 01352 184, -1, 194, 134, 184, -1, 194, 134, 95, 184, 01353 -1, 194, 134, 184, -1, 194, 134, 95, 184, -1, 01354 95, 184, -1, 265, -1, 266, -1, 269, -1, 270, 01355 -1, 271, -1, 276, -1, 274, -1, 277, -1, 295, 01356 -1, 297, -1, 53, -1, -1, 215, 197, 149, 225, 01357 -1, -1, 90, 198, 334, -1, -1, 90, 157, 199, 01358 334, -1, 89, 150, 137, -1, 214, 85, 56, -1, 01359 86, 56, -1, 92, 185, 138, -1, 93, 325, 131, 01360 -1, 30, -1, 31, 136, 189, 334, -1, 31, 136, 01361 334, -1, 31, -1, -1, 46, 333, 136, 200, 157, 01362 334, -1, 39, 136, 157, 334, -1, 39, 136, 334, 01363 -1, 163, 256, -1, 251, -1, 251, 256, -1, 98, 01364 242, -1, 216, 158, 226, 150, 228, 225, -1, 217, 01365 158, 226, 150, 229, 225, -1, -1, -1, 218, 201, 01366 158, 227, 202, 150, 225, -1, -1, -1, 219, 203, 01367 158, 227, 204, 150, 225, -1, 220, 158, 332, 259, 01368 225, -1, 220, 332, 259, 225, -1, -1, -1, 221, 01369 230, 25, 205, 158, 227, 206, 150, 225, -1, -1, 01370 222, 174, 298, 207, 149, 225, -1, -1, -1, 222, 01371 83, 157, 208, 337, 209, 149, 225, -1, -1, 223, 01372 174, 210, 149, 225, -1, -1, 224, 175, 211, 300, 01373 149, 225, -1, -1, -1, 224, 323, 331, 212, 175, 01374 213, 300, 149, 225, -1, 21, -1, 22, -1, 23, 01375 -1, 24, -1, 196, -1, 7, -1, 11, -1, 12, 01376 -1, 18, -1, 19, -1, 16, -1, 20, -1, 3, 01377 -1, 4, -1, 5, -1, 10, -1, 337, -1, 13, 01378 -1, 337, 13, -1, 337, -1, 27, -1, 229, -1, 01379 14, 158, 226, 150, 228, -1, 339, -1, 15, 150, 01380 -1, 172, -1, 165, -1, 305, -1, 89, 233, 334, 01381 -1, 231, -1, 232, 134, 231, -1, 232, -1, 232, 01382 134, 95, 305, -1, 232, 134, 95, 305, 134, 232, 01383 -1, 232, 134, 95, -1, 232, 134, 95, 134, 232, 01384 -1, 95, 305, -1, 95, 305, 134, 232, -1, 95, 01385 -1, 95, 134, 232, -1, 310, 134, 313, 322, -1, 01386 310, 322, -1, 313, 322, -1, 321, -1, 134, 234, 01387 -1, -1, 307, 134, 316, 134, 319, 235, -1, 307, 01388 134, 316, 134, 319, 134, 307, 235, -1, 307, 134, 01389 316, 235, -1, 307, 134, 316, 134, 307, 235, -1, 01390 307, 134, 319, 235, -1, 307, 134, -1, 307, 134, 01391 319, 134, 307, 235, -1, 307, 235, -1, 316, 134, 01392 319, 235, -1, 316, 134, 319, 134, 307, 235, -1, 01393 316, 235, -1, 316, 134, 307, 235, -1, 319, 235, 01394 -1, 319, 134, 307, 235, -1, 234, -1, 339, -1, 01395 238, -1, 118, 239, 118, -1, 76, -1, 118, 236, 01396 239, 118, -1, 333, -1, 333, 139, 240, 333, -1, 01397 241, -1, 240, 134, 241, -1, 52, -1, 304, -1, 01398 -1, -1, -1, 243, 244, 246, 245, 247, -1, 136, 01399 303, 239, 137, -1, 303, -1, 111, 150, 131, -1, 01400 29, 150, 10, -1, -1, 28, 249, 237, 150, 10, 01401 -1, 164, 248, -1, 250, 331, 329, 187, -1, 250, 01402 331, 329, 187, 256, -1, 250, 331, 329, 190, 248, 01403 -1, 163, 186, -1, -1, 214, 133, 329, 252, 187, 01404 -1, -1, 214, 85, 329, 253, 186, -1, 214, 85, 01405 330, -1, -1, 214, 133, 254, 186, -1, -1, 214, 01406 85, 255, 186, -1, 32, 186, -1, 32, -1, 214, 01407 132, 188, 335, -1, -1, 130, 257, 237, 150, 131, 01408 -1, -1, 26, 258, 237, 150, 10, -1, 17, 194, 01409 226, 150, 260, -1, 229, -1, 259, -1, 8, 262, 01410 263, 226, 150, 261, -1, 339, -1, 184, -1, 195, 01411 -1, 339, -1, 88, 172, -1, 339, -1, 9, 150, 01412 -1, 339, -1, 292, -1, 289, -1, 291, -1, 267, 01413 -1, 62, -1, 268, -1, 267, 268, -1, 100, 280, 01414 110, -1, 101, 281, 110, -1, 102, 282, 65, -1, 01415 103, 140, 110, -1, 103, 272, 110, -1, -1, 272, 01416 273, 140, -1, 283, -1, 273, 283, -1, 105, 140, 01417 110, -1, 105, 275, 110, -1, -1, 275, 273, 140, 01418 -1, 104, 140, 110, -1, 104, 278, 110, -1, 106, 01419 140, 110, -1, 106, 279, 110, -1, -1, 278, 61, 01420 140, -1, -1, 279, 61, 140, -1, -1, 280, 283, 01421 -1, -1, 281, 283, -1, -1, 282, 283, -1, 61, 01422 -1, -1, 109, 284, 288, -1, -1, -1, -1, 107, 01423 285, 286, 287, 150, 108, -1, 54, -1, 55, -1, 01424 57, -1, 297, -1, 99, 290, -1, 175, -1, 55, 01425 -1, 54, -1, 57, -1, 99, 281, 110, -1, 59, 01426 -1, 60, -1, 126, 59, -1, 126, 60, -1, 52, 01427 -1, 55, -1, 54, -1, 56, -1, 57, -1, 34, 01428 -1, 33, -1, 35, -1, 36, -1, 50, -1, 49, 01429 -1, 51, -1, 293, -1, 294, -1, 293, -1, 294, 01430 -1, 63, -1, 64, -1, 337, -1, -1, 117, 299, 01431 158, 337, -1, 1, 337, -1, 136, 303, 334, -1, 01432 303, 337, -1, 311, 134, 313, 322, -1, 311, 322, 01433 -1, 313, 322, -1, 321, -1, 134, 301, -1, -1, 01434 307, 134, 317, 134, 319, 302, -1, 307, 134, 317, 01435 134, 319, 134, 307, 302, -1, 307, 134, 317, 302, 01436 -1, 307, 134, 317, 134, 307, 302, -1, 307, 134, 01437 319, 302, -1, 307, 134, 319, 134, 307, 302, -1, 01438 307, 302, -1, 317, 134, 319, 302, -1, 317, 134, 01439 319, 134, 307, 302, -1, 317, 302, -1, 317, 134, 01440 307, 302, -1, 319, 302, -1, 319, 134, 307, 302, 01441 -1, 301, -1, -1, 56, -1, 55, -1, 54, -1, 01442 57, -1, 304, -1, 52, -1, 305, -1, 89, 233, 01443 334, -1, 306, -1, 307, 134, 306, -1, 58, 184, 01444 -1, 58, 214, -1, 309, -1, 310, 134, 309, -1, 01445 308, -1, 311, 134, 308, -1, 68, -1, 96, -1, 01446 312, 52, -1, 312, -1, 52, 113, 184, -1, 52, 01447 113, 214, -1, 315, -1, 316, 134, 315, -1, 314, 01448 -1, 317, 134, 314, -1, 123, -1, 95, -1, 318, 01449 52, -1, 318, -1, 120, -1, 97, -1, 320, 52, 01450 -1, 134, 321, -1, 339, -1, 295, -1, -1, 136, 01451 324, 157, 334, -1, 339, -1, 326, 336, -1, 327, 01452 -1, 326, 134, 327, -1, 184, 88, 184, -1, 58, 01453 184, -1, 96, 184, -1, 52, -1, 56, -1, 53, 01454 -1, 52, -1, 56, -1, 53, -1, 180, -1, 52, 01455 -1, 53, -1, 180, -1, 133, -1, 85, -1, -1, 01456 338, -1, -1, 141, -1, 333, 137, -1, 333, 138, 01457 -1, -1, 141, -1, 134, -1, 139, -1, 141, -1, 01458 337, -1, 338, 139, -1, -1 01459 }; 01460 01461 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01462 static const yytype_uint16 yyrline[] = 01463 { 01464 0, 855, 855, 855, 886, 897, 906, 914, 922, 928, 01465 930, 929, 950, 983, 994, 1003, 1011, 1019, 1025, 1030, 01466 1029, 1050, 1050, 1058, 1066, 1077, 1087, 1095, 1104, 1113, 01467 1126, 1139, 1148, 1160, 1161, 1171, 1176, 1197, 1202, 1207, 01468 1217, 1222, 1232, 1241, 1250, 1259, 1262, 1271, 1283, 1284, 01469 1292, 1300, 1308, 1316, 1319, 1331, 1332, 1335, 1336, 1348, 01470 1347, 1369, 1379, 1388, 1401, 1410, 1422, 1431, 1443, 1452, 01471 1461, 1469, 1477, 1487, 1488, 1498, 1499, 1509, 1517, 1525, 01472 1533, 1542, 1550, 1559, 1567, 1576, 1584, 1595, 1596, 1606, 01473 1614, 1624, 1632, 1642, 1646, 1650, 1658, 1666, 1674, 1682, 01474 1694, 1704, 1716, 1725, 1734, 1742, 1750, 1758, 1766, 1779, 01475 1792, 1803, 1811, 1814, 1822, 1830, 1840, 1841, 1842, 1843, 01476 1848, 1859, 1860, 1863, 1871, 1874, 1882, 1882, 1892, 1893, 01477 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 01478 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 01479 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1924, 1924, 01480 1924, 1925, 1925, 1926, 1926, 1926, 1927, 1927, 1927, 1927, 01481 1928, 1928, 1928, 1928, 1929, 1929, 1929, 1930, 1930, 1930, 01482 1930, 1931, 1931, 1931, 1931, 1932, 1932, 1932, 1932, 1933, 01483 1933, 1933, 1933, 1934, 1934, 1934, 1934, 1935, 1935, 1938, 01484 1947, 1957, 1962, 1972, 1998, 2003, 2008, 2013, 2023, 2033, 01485 2044, 2058, 2072, 2080, 2088, 2096, 2104, 2112, 2120, 2129, 01486 2138, 2146, 2154, 2162, 2170, 2178, 2186, 2194, 2202, 2210, 01487 2218, 2226, 2234, 2242, 2253, 2261, 2269, 2277, 2285, 2293, 01488 2301, 2309, 2309, 2319, 2329, 2335, 2347, 2348, 2352, 2360, 01489 2370, 2380, 2381, 2384, 2385, 2386, 2390, 2398, 2408, 2417, 01490 2425, 2435, 2444, 2453, 2453, 2465, 2475, 2479, 2485, 2493, 01491 2501, 2515, 2531, 2545, 2560, 2570, 2571, 2572, 2573, 2574, 01492 2575, 2576, 2577, 2578, 2579, 2580, 2589, 2588, 2616, 2616, 01493 2624, 2624, 2632, 2640, 2648, 2656, 2669, 2677, 2685, 2693, 01494 2701, 2709, 2709, 2719, 2727, 2735, 2745, 2746, 2756, 2760, 01495 2772, 2784, 2784, 2784, 2795, 2795, 2795, 2806, 2817, 2826, 01496 2828, 2825, 2892, 2891, 2913, 2918, 2912, 2937, 2936, 2958, 01497 2957, 2980, 2981, 2980, 3001, 3009, 3017, 3025, 3035, 3047, 01498 3053, 3059, 3065, 3071, 3077, 3083, 3089, 3095, 3101, 3111, 01499 3117, 3122, 3123, 3130, 3135, 3138, 3139, 3152, 3153, 3163, 01500 3164, 3167, 3175, 3185, 3193, 3203, 3211, 3220, 3229, 3237, 01501 3245, 3254, 3266, 3274, 3285, 3289, 3293, 3297, 3303, 3308, 01502 3313, 3317, 3321, 3325, 3329, 3333, 3341, 3345, 3349, 3353, 01503 3357, 3361, 3365, 3369, 3373, 3379, 3380, 3386, 3395, 3404, 01504 3415, 3419, 3429, 3436, 3445, 3453, 3459, 3462, 3467, 3459, 01505 3483, 3491, 3501, 3505, 3512, 3511, 3532, 3548, 3557, 3569, 01506 3583, 3593, 3592, 3609, 3608, 3624, 3633, 3632, 3650, 3649, 01507 3666, 3674, 3682, 3697, 3696, 3716, 3715, 3736, 3748, 3749, 01508 3752, 3771, 3774, 3782, 3790, 3793, 3797, 3800, 3808, 3811, 01509 3812, 3820, 3823, 3840, 3841, 3842, 3852, 3862, 3889, 3954, 01510 3963, 3974, 3981, 3991, 3999, 4009, 4018, 4029, 4036, 4048, 01511 4057, 4067, 4076, 4087, 4094, 4105, 4112, 4127, 4134, 4145, 01512 4152, 4163, 4170, 4199, 4201, 4200, 4217, 4223, 4228, 4216, 01513 4247, 4255, 4263, 4271, 4274, 4285, 4286, 4287, 4288, 4291, 01514 4302, 4303, 4304, 4312, 4322, 4323, 4324, 4325, 4326, 4329, 01515 4330, 4331, 4332, 4333, 4334, 4335, 4338, 4351, 4361, 4369, 01516 4379, 4380, 4383, 4392, 4391, 4400, 4412, 4422, 4430, 4434, 01517 4438, 4442, 4448, 4453, 4458, 4462, 4466, 4470, 4474, 4478, 01518 4482, 4486, 4490, 4494, 4498, 4502, 4506, 4510, 4515, 4521, 01519 4530, 4539, 4548, 4559, 4560, 4567, 4576, 4595, 4602, 4615, 01520 4627, 4639, 4647, 4664, 4672, 4688, 4689, 4692, 4697, 4703, 01521 4715, 4727, 4735, 4751, 4759, 4775, 4776, 4779, 4792, 4803, 01522 4804, 4807, 4824, 4828, 4838, 4848, 4848, 4877, 4878, 4888, 01523 4895, 4905, 4913, 4921, 4933, 4934, 4935, 4938, 4939, 4940, 01524 4941, 4944, 4945, 4946, 4949, 4954, 4961, 4962, 4965, 4966, 01525 4969, 4972, 4975, 4976, 4977, 4980, 4981, 4984, 4985, 4989 01526 }; 01527 #endif 01528 01529 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01530 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01531 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01532 static const char *const yytname[] = 01533 { 01534 "\"end-of-input\"", "error", "$undefined", "keyword_class", 01535 "keyword_module", "keyword_def", "keyword_undef", "keyword_begin", 01536 "keyword_rescue", "keyword_ensure", "keyword_end", "keyword_if", 01537 "keyword_unless", "keyword_then", "keyword_elsif", "keyword_else", 01538 "keyword_case", "keyword_when", "keyword_while", "keyword_until", 01539 "keyword_for", "keyword_break", "keyword_next", "keyword_redo", 01540 "keyword_retry", "keyword_in", "keyword_do", "keyword_do_cond", 01541 "keyword_do_block", "keyword_do_LAMBDA", "keyword_return", 01542 "keyword_yield", "keyword_super", "keyword_self", "keyword_nil", 01543 "keyword_true", "keyword_false", "keyword_and", "keyword_or", 01544 "keyword_not", "modifier_if", "modifier_unless", "modifier_while", 01545 "modifier_until", "modifier_rescue", "keyword_alias", "keyword_defined", 01546 "keyword_BEGIN", "keyword_END", "keyword__LINE__", "keyword__FILE__", 01547 "keyword__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", 01548 "tCONSTANT", "tCVAR", "tLABEL", "tINTEGER", "tFLOAT", "tSTRING_CONTENT", 01549 "tCHAR", "tNTH_REF", "tBACK_REF", "tREGEXP_END", "\"unary+\"", 01550 "\"unary-\"", "\"**\"", "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", 01551 "\">=\"", "\"<=\"", "\"&&\"", "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", 01552 "\"...\"", "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"::\"", 01553 "\":: at EXPR_BEG\"", "tOP_ASGN", "\"=>\"", "\"(\"", "\"( arg\"", 01554 "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"", "\"&\"", 01555 "\"->\"", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", 01556 "tWORDS_BEG", "tQWORDS_BEG", "tSYMBOLS_BEG", "tQSYMBOLS_BEG", 01557 "tSTRING_DBEG", "tSTRING_DEND", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01558 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01559 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", 01560 "'{'", "'}'", "'['", "'.'", "','", "'`'", "'('", "')'", "']'", "';'", 01561 "' '", "'\\n'", "$accept", "program", "$@1", "top_compstmt", "top_stmts", 01562 "top_stmt", "$@2", "bodystmt", "compstmt", "stmts", "stmt_or_begin", 01563 "$@3", "stmt", "$@4", "command_asgn", "expr", "expr_value", 01564 "command_call", "block_command", "cmd_brace_block", "@5", "fcall", 01565 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 01566 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 01567 "fitem", "undef_list", "$@6", "op", "reswords", "arg", "$@7", 01568 "arg_value", "aref_args", "paren_args", "opt_paren_args", 01569 "opt_call_args", "call_args", "command_args", "@8", "block_arg", 01570 "opt_block_arg", "args", "mrhs", "primary", "@9", "$@10", "$@11", "$@12", 01571 "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "@19", "@20", "@21", 01572 "@22", "@23", "$@24", "$@25", "primary_value", "k_begin", "k_if", 01573 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class", 01574 "k_module", "k_def", "k_end", "then", "do", "if_tail", "opt_else", 01575 "for_var", "f_marg", "f_marg_list", "f_margs", "block_args_tail", 01576 "opt_block_args_tail", "block_param", "opt_block_param", 01577 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@26", 01578 "@27", "@28", "f_larglist", "lambda_body", "do_block", "@29", 01579 "block_call", "method_call", "@30", "@31", "@32", "@33", "brace_block", 01580 "@34", "@35", "case_body", "cases", "opt_rescue", "exc_list", "exc_var", 01581 "opt_ensure", "literal", "strings", "string", "string1", "xstring", 01582 "regexp", "words", "word_list", "word", "symbols", "symbol_list", 01583 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents", 01584 "xstring_contents", "regexp_contents", "string_content", "@36", "@37", 01585 "@38", "@39", "string_dvar", "symbol", "sym", "dsym", "numeric", 01586 "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref", 01587 "superclass", "$@40", "f_arglist", "args_tail", "opt_args_tail", 01588 "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_kw", 01589 "f_block_kw", "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_kwrest", 01590 "f_opt", "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark", 01591 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg", 01592 "singleton", "$@41", "assoc_list", "assocs", "assoc", "operation", 01593 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl", 01594 "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01595 }; 01596 #endif 01597 01598 # ifdef YYPRINT 01599 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01600 token YYLEX-NUM. */ 01601 static const yytype_uint16 yytoknum[] = 01602 { 01603 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01604 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01605 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01606 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01607 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01608 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01609 315, 316, 317, 318, 319, 320, 130, 131, 132, 134, 01610 139, 140, 141, 138, 137, 321, 322, 142, 143, 128, 01611 129, 144, 145, 135, 136, 323, 324, 325, 326, 327, 01612 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 01613 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 01614 348, 349, 350, 61, 63, 58, 62, 60, 124, 94, 01615 38, 43, 45, 42, 47, 37, 351, 33, 126, 352, 01616 123, 125, 91, 46, 44, 96, 40, 41, 93, 59, 01617 32, 10 01618 }; 01619 # endif 01620 01621 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01622 static const yytype_uint16 yyr1[] = 01623 { 01624 0, 142, 144, 143, 145, 146, 146, 146, 146, 147, 01625 148, 147, 149, 150, 151, 151, 151, 151, 152, 153, 01626 152, 155, 154, 154, 154, 154, 154, 154, 154, 154, 01627 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 01628 154, 154, 154, 154, 154, 154, 156, 156, 157, 157, 01629 157, 157, 157, 157, 158, 159, 159, 160, 160, 162, 01630 161, 163, 164, 164, 164, 164, 164, 164, 164, 164, 01631 164, 164, 164, 165, 165, 166, 166, 167, 167, 167, 01632 167, 167, 167, 167, 167, 167, 167, 168, 168, 169, 01633 169, 170, 170, 171, 171, 171, 171, 171, 171, 171, 01634 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, 01635 172, 173, 173, 174, 174, 174, 175, 175, 175, 175, 01636 175, 176, 176, 177, 177, 178, 179, 178, 180, 180, 01637 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 01638 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 01639 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 01640 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01641 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01642 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01643 181, 181, 181, 181, 181, 181, 181, 181, 181, 182, 01644 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01645 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01646 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01647 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01648 182, 183, 182, 182, 182, 184, 185, 185, 185, 185, 01649 186, 187, 187, 188, 188, 188, 188, 188, 189, 189, 01650 189, 189, 189, 191, 190, 192, 193, 193, 194, 194, 01651 194, 194, 195, 195, 195, 196, 196, 196, 196, 196, 01652 196, 196, 196, 196, 196, 196, 197, 196, 198, 196, 01653 199, 196, 196, 196, 196, 196, 196, 196, 196, 196, 01654 196, 200, 196, 196, 196, 196, 196, 196, 196, 196, 01655 196, 201, 202, 196, 203, 204, 196, 196, 196, 205, 01656 206, 196, 207, 196, 208, 209, 196, 210, 196, 211, 01657 196, 212, 213, 196, 196, 196, 196, 196, 214, 215, 01658 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01659 226, 226, 226, 227, 227, 228, 228, 229, 229, 230, 01660 230, 231, 231, 232, 232, 233, 233, 233, 233, 233, 01661 233, 233, 233, 233, 234, 234, 234, 234, 235, 235, 01662 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01663 236, 236, 236, 236, 236, 237, 237, 238, 238, 238, 01664 239, 239, 240, 240, 241, 241, 243, 244, 245, 242, 01665 246, 246, 247, 247, 249, 248, 250, 250, 250, 250, 01666 251, 252, 251, 253, 251, 251, 254, 251, 255, 251, 01667 251, 251, 251, 257, 256, 258, 256, 259, 260, 260, 01668 261, 261, 262, 262, 262, 263, 263, 264, 264, 265, 01669 265, 265, 266, 267, 267, 267, 268, 269, 270, 271, 01670 271, 272, 272, 273, 273, 274, 274, 275, 275, 276, 01671 276, 277, 277, 278, 278, 279, 279, 280, 280, 281, 01672 281, 282, 282, 283, 284, 283, 285, 286, 287, 283, 01673 288, 288, 288, 288, 289, 290, 290, 290, 290, 291, 01674 292, 292, 292, 292, 293, 293, 293, 293, 293, 294, 01675 294, 294, 294, 294, 294, 294, 295, 295, 296, 296, 01676 297, 297, 298, 299, 298, 298, 300, 300, 301, 301, 01677 301, 301, 302, 302, 303, 303, 303, 303, 303, 303, 01678 303, 303, 303, 303, 303, 303, 303, 303, 303, 304, 01679 304, 304, 304, 305, 305, 306, 306, 307, 307, 308, 01680 309, 310, 310, 311, 311, 312, 312, 313, 313, 314, 01681 315, 316, 316, 317, 317, 318, 318, 319, 319, 320, 01682 320, 321, 322, 322, 323, 324, 323, 325, 325, 326, 01683 326, 327, 327, 327, 328, 328, 328, 329, 329, 329, 01684 329, 330, 330, 330, 331, 331, 332, 332, 333, 333, 01685 334, 335, 336, 336, 336, 337, 337, 338, 338, 339 01686 }; 01687 01688 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01689 static const yytype_uint8 yyr2[] = 01690 { 01691 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01692 0, 5, 4, 2, 1, 1, 3, 2, 1, 0, 01693 5, 0, 4, 3, 3, 3, 2, 3, 3, 3, 01694 3, 3, 4, 1, 3, 3, 6, 5, 5, 5, 01695 5, 3, 3, 3, 3, 1, 3, 3, 1, 3, 01696 3, 3, 2, 1, 1, 1, 1, 1, 4, 0, 01697 5, 1, 2, 3, 4, 5, 4, 5, 2, 2, 01698 2, 2, 2, 1, 3, 1, 3, 1, 2, 3, 01699 5, 2, 4, 2, 4, 1, 3, 1, 3, 2, 01700 3, 1, 3, 1, 1, 4, 3, 3, 3, 3, 01701 2, 1, 1, 1, 4, 3, 3, 3, 3, 2, 01702 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 01703 1, 1, 1, 1, 1, 1, 0, 4, 1, 1, 01704 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01705 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01706 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01707 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01708 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01709 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01710 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 01711 5, 3, 5, 6, 5, 5, 5, 5, 4, 3, 01712 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 01713 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 01714 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 01715 3, 0, 4, 6, 1, 1, 1, 2, 4, 2, 01716 3, 1, 1, 1, 1, 2, 4, 2, 1, 2, 01717 2, 4, 1, 0, 2, 2, 2, 1, 1, 2, 01718 3, 4, 3, 4, 2, 1, 1, 1, 1, 1, 01719 1, 1, 1, 1, 1, 1, 0, 4, 0, 3, 01720 0, 4, 3, 3, 2, 3, 3, 1, 4, 3, 01721 1, 0, 6, 4, 3, 2, 1, 2, 2, 6, 01722 6, 0, 0, 7, 0, 0, 7, 5, 4, 0, 01723 0, 9, 0, 6, 0, 0, 8, 0, 5, 0, 01724 6, 0, 0, 9, 1, 1, 1, 1, 1, 1, 01725 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01726 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 01727 1, 1, 3, 1, 3, 1, 4, 6, 3, 5, 01728 2, 4, 1, 3, 4, 2, 2, 1, 2, 0, 01729 6, 8, 4, 6, 4, 2, 6, 2, 4, 6, 01730 2, 4, 2, 4, 1, 1, 1, 3, 1, 4, 01731 1, 4, 1, 3, 1, 1, 0, 0, 0, 5, 01732 4, 1, 3, 3, 0, 5, 2, 4, 5, 5, 01733 2, 0, 5, 0, 5, 3, 0, 4, 0, 4, 01734 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 01735 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 01736 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 01737 3, 0, 3, 1, 2, 3, 3, 0, 3, 3, 01738 3, 3, 3, 0, 3, 0, 3, 0, 2, 0, 01739 2, 0, 2, 1, 0, 3, 0, 0, 0, 6, 01740 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 01741 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 01742 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01743 1, 1, 1, 0, 4, 2, 3, 2, 4, 2, 01744 2, 1, 2, 0, 6, 8, 4, 6, 4, 6, 01745 2, 4, 6, 2, 4, 2, 4, 1, 0, 1, 01746 1, 1, 1, 1, 1, 1, 3, 1, 3, 2, 01747 2, 1, 3, 1, 3, 1, 1, 2, 1, 3, 01748 3, 1, 3, 1, 3, 1, 1, 2, 1, 1, 01749 1, 2, 2, 1, 1, 0, 4, 1, 2, 1, 01750 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 01751 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 01752 2, 2, 0, 1, 1, 1, 1, 1, 2, 0 01753 }; 01754 01755 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 01756 Performed when YYTABLE doesn't specify something else to do. Zero 01757 means the default is an error. */ 01758 static const yytype_uint16 yydefact[] = 01759 { 01760 2, 0, 0, 1, 0, 346, 347, 348, 0, 339, 01761 340, 341, 344, 342, 343, 345, 334, 335, 336, 337, 01762 297, 263, 263, 510, 509, 511, 512, 608, 0, 608, 01763 10, 0, 514, 513, 515, 594, 596, 506, 505, 595, 01764 508, 500, 501, 453, 520, 521, 0, 0, 0, 0, 01765 288, 619, 619, 85, 406, 479, 477, 479, 481, 461, 01766 473, 467, 475, 0, 0, 0, 3, 606, 6, 9, 01767 33, 45, 48, 56, 263, 55, 0, 73, 0, 77, 01768 87, 0, 53, 244, 0, 286, 0, 0, 311, 314, 01769 606, 0, 0, 0, 0, 57, 306, 275, 276, 452, 01770 454, 277, 278, 279, 281, 280, 282, 450, 451, 449, 01771 516, 517, 283, 0, 284, 61, 5, 8, 168, 179, 01772 169, 192, 165, 185, 175, 174, 195, 196, 190, 173, 01773 172, 167, 193, 197, 198, 177, 166, 180, 184, 186, 01774 178, 171, 187, 194, 189, 188, 181, 191, 176, 164, 01775 183, 182, 163, 170, 161, 162, 158, 159, 160, 116, 01776 118, 117, 153, 154, 149, 131, 132, 133, 140, 137, 01777 139, 134, 135, 155, 156, 141, 142, 146, 150, 136, 01778 138, 128, 129, 130, 143, 144, 145, 147, 148, 151, 01779 152, 157, 121, 123, 125, 26, 119, 120, 122, 124, 01780 0, 0, 0, 0, 0, 0, 0, 0, 258, 0, 01781 245, 268, 71, 262, 619, 0, 516, 517, 0, 284, 01782 619, 589, 72, 70, 608, 69, 0, 619, 430, 68, 01783 608, 609, 0, 0, 21, 241, 0, 0, 334, 335, 01784 297, 300, 431, 0, 220, 0, 221, 294, 0, 19, 01785 0, 0, 606, 15, 18, 608, 75, 14, 290, 608, 01786 0, 612, 612, 246, 0, 0, 612, 587, 608, 0, 01787 0, 0, 83, 338, 0, 93, 94, 101, 308, 407, 01788 497, 496, 498, 495, 0, 494, 0, 0, 0, 0, 01789 0, 0, 0, 0, 0, 0, 0, 502, 503, 52, 01790 235, 236, 615, 616, 4, 617, 607, 0, 0, 0, 01791 0, 0, 0, 0, 435, 433, 420, 62, 305, 414, 01792 416, 0, 89, 0, 81, 78, 0, 0, 0, 0, 01793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01795 0, 0, 0, 428, 619, 426, 0, 54, 0, 0, 01796 0, 0, 606, 0, 607, 0, 360, 359, 0, 0, 01797 516, 517, 284, 111, 112, 0, 0, 114, 0, 0, 01798 516, 517, 284, 327, 188, 181, 191, 176, 158, 159, 01799 160, 116, 117, 585, 329, 584, 0, 605, 604, 0, 01800 307, 455, 0, 0, 126, 592, 294, 269, 593, 265, 01801 0, 0, 0, 259, 267, 428, 619, 426, 0, 0, 01802 0, 260, 608, 0, 299, 264, 608, 254, 619, 619, 01803 253, 608, 304, 51, 23, 25, 24, 0, 301, 0, 01804 0, 0, 428, 426, 0, 17, 0, 608, 292, 13, 01805 607, 74, 608, 289, 295, 614, 613, 247, 614, 249, 01806 296, 588, 0, 100, 502, 503, 91, 86, 0, 428, 01807 619, 426, 548, 483, 486, 484, 499, 480, 456, 478, 01808 457, 458, 482, 459, 460, 0, 463, 469, 0, 470, 01809 465, 466, 0, 471, 0, 472, 0, 0, 618, 7, 01810 27, 28, 29, 30, 31, 49, 50, 619, 619, 59, 01811 63, 619, 0, 34, 43, 0, 44, 608, 0, 79, 01812 90, 47, 46, 0, 199, 268, 42, 217, 225, 230, 01813 231, 232, 227, 229, 239, 240, 233, 234, 210, 211, 01814 237, 238, 608, 226, 228, 222, 223, 224, 212, 213, 01815 214, 215, 216, 597, 599, 598, 600, 0, 263, 425, 01816 608, 597, 599, 598, 600, 0, 263, 0, 619, 351, 01817 0, 350, 0, 0, 0, 0, 0, 0, 294, 428, 01818 619, 426, 319, 324, 111, 112, 113, 0, 523, 322, 01819 522, 428, 619, 426, 0, 0, 548, 331, 597, 598, 01820 263, 35, 201, 41, 209, 0, 199, 591, 0, 270, 01821 266, 619, 597, 598, 608, 597, 598, 590, 298, 610, 01822 250, 255, 257, 303, 22, 0, 242, 0, 32, 423, 01823 421, 208, 0, 76, 16, 291, 612, 0, 84, 97, 01824 99, 608, 597, 598, 554, 551, 550, 549, 552, 0, 01825 565, 0, 576, 566, 580, 579, 575, 548, 408, 547, 01826 411, 553, 555, 557, 533, 563, 619, 568, 619, 573, 01827 533, 578, 533, 0, 531, 487, 0, 462, 464, 474, 01828 468, 476, 218, 219, 398, 608, 0, 396, 395, 0, 01829 619, 0, 274, 0, 88, 82, 0, 0, 0, 0, 01830 0, 0, 429, 66, 0, 0, 432, 0, 0, 427, 01831 64, 619, 349, 287, 619, 619, 441, 619, 352, 619, 01832 354, 312, 353, 315, 0, 0, 318, 601, 293, 608, 01833 597, 598, 0, 0, 525, 0, 0, 111, 112, 115, 01834 608, 0, 608, 548, 0, 0, 0, 252, 417, 58, 01835 251, 0, 127, 271, 261, 0, 0, 432, 0, 0, 01836 619, 608, 11, 0, 248, 92, 95, 0, 559, 554, 01837 0, 372, 363, 365, 608, 361, 608, 0, 0, 540, 01838 0, 529, 583, 567, 0, 530, 0, 543, 577, 0, 01839 545, 581, 488, 490, 491, 492, 485, 493, 554, 0, 01840 394, 608, 0, 379, 561, 619, 619, 571, 379, 379, 01841 377, 400, 0, 0, 0, 0, 0, 272, 80, 200, 01842 0, 40, 206, 39, 207, 67, 424, 611, 0, 37, 01843 204, 38, 205, 65, 422, 442, 443, 619, 444, 0, 01844 619, 357, 0, 0, 355, 0, 0, 0, 317, 0, 01845 0, 432, 0, 325, 0, 0, 432, 328, 586, 608, 01846 0, 527, 332, 418, 419, 202, 0, 256, 302, 20, 01847 569, 608, 0, 370, 0, 556, 0, 0, 0, 409, 01848 532, 558, 533, 533, 564, 619, 582, 533, 574, 533, 01849 533, 0, 0, 0, 560, 0, 397, 385, 387, 0, 01850 375, 376, 0, 390, 0, 392, 0, 436, 434, 0, 01851 415, 273, 243, 36, 203, 0, 0, 446, 358, 0, 01852 12, 448, 0, 309, 310, 0, 0, 270, 619, 320, 01853 0, 524, 323, 526, 330, 548, 362, 373, 0, 368, 01854 364, 410, 0, 0, 0, 536, 0, 538, 528, 0, 01855 544, 0, 541, 546, 0, 570, 294, 428, 399, 378, 01856 379, 379, 562, 619, 379, 572, 379, 379, 404, 608, 01857 402, 405, 60, 0, 445, 0, 102, 103, 110, 0, 01858 447, 0, 313, 316, 438, 439, 437, 0, 0, 0, 01859 0, 371, 0, 366, 413, 412, 533, 533, 533, 533, 01860 489, 601, 293, 0, 382, 0, 384, 374, 0, 391, 01861 0, 388, 393, 0, 401, 109, 428, 619, 426, 619, 01862 619, 0, 326, 0, 369, 0, 537, 0, 534, 539, 01863 542, 379, 379, 379, 379, 403, 601, 108, 608, 597, 01864 598, 440, 356, 321, 333, 367, 533, 383, 0, 380, 01865 386, 389, 432, 535, 379, 381 01866 }; 01867 01868 /* YYDEFGOTO[NTERM-NUM]. */ 01869 static const yytype_int16 yydefgoto[] = 01870 { 01871 -1, 1, 2, 66, 67, 68, 236, 567, 568, 252, 01872 253, 446, 254, 437, 70, 71, 358, 72, 73, 510, 01873 690, 243, 75, 76, 255, 77, 78, 79, 467, 80, 01874 209, 377, 378, 192, 193, 194, 195, 605, 556, 197, 01875 82, 439, 211, 260, 228, 748, 426, 427, 225, 226, 01876 213, 413, 428, 516, 83, 356, 259, 452, 625, 360, 01877 846, 361, 847, 732, 987, 736, 733, 930, 594, 596, 01878 746, 935, 245, 85, 86, 87, 88, 89, 90, 91, 01879 92, 93, 94, 713, 570, 721, 843, 844, 369, 772, 01880 773, 774, 959, 898, 801, 686, 687, 802, 969, 970, 01881 278, 279, 472, 777, 658, 879, 320, 511, 95, 96, 01882 711, 704, 565, 557, 318, 508, 507, 577, 986, 715, 01883 837, 916, 920, 97, 98, 99, 100, 101, 102, 103, 01884 290, 485, 104, 294, 105, 106, 292, 296, 286, 284, 01885 288, 477, 676, 675, 792, 891, 796, 107, 285, 108, 01886 109, 216, 217, 112, 218, 219, 589, 735, 744, 880, 01887 779, 745, 661, 662, 663, 664, 665, 804, 805, 666, 01888 667, 668, 669, 807, 808, 670, 671, 672, 673, 674, 01889 781, 396, 595, 265, 429, 221, 115, 629, 559, 399, 01890 304, 423, 424, 706, 457, 571, 364, 257 01891 }; 01892 01893 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01894 STATE-NUM. */ 01895 #define YYPACT_NINF -810 01896 static const yytype_int16 yypact[] = 01897 { 01898 -810, 102, 2888, -810, 7502, -810, -810, -810, 7025, -810, 01899 -810, -810, -810, -810, -810, -810, 7615, 7615, -810, -810, 01900 7615, 4210, 3805, -810, -810, -810, -810, 190, 6892, -21, 01901 -810, 10, -810, -810, -810, 3130, 3940, -810, -810, 3265, 01902 -810, -810, -810, -810, -810, -810, 8971, 8971, 130, 5262, 01903 9084, 7954, 8293, 7284, -810, 6759, -810, -810, -810, 54, 01904 70, 225, 228, 515, 9197, 8971, -810, 245, -810, 1021, 01905 -810, 269, -810, -810, 73, 120, 87, -810, 98, 9310, 01906 -810, 148, 3109, 44, 359, -810, 9084, 9084, -810, -810, 01907 6149, 9419, 9528, 9637, 6625, 30, 86, -810, -810, 230, 01908 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01909 3, 385, -810, 348, 490, -810, -810, -810, -810, -810, 01910 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01911 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01912 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01913 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01914 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01915 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01916 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01917 -810, -810, -810, -810, -810, 285, -810, -810, -810, -810, 01918 253, 8971, 374, 5401, 8971, 8971, 8971, 8971, -810, 328, 01919 3109, 364, -810, -810, 313, 369, 208, 224, 395, 247, 01920 354, -810, -810, -810, 6036, -810, 7615, 7615, -810, -810, 01921 6262, -810, 9084, 844, -810, 360, 388, 5540, -810, -810, 01922 -810, 379, 400, 73, -810, 464, 463, 501, 7728, -810, 01923 5262, 402, 245, -810, 1021, -21, 437, -810, 269, -21, 01924 415, 8, 317, -810, 364, 440, 317, -810, -21, 525, 01925 615, 9746, 470, -810, 488, 508, 575, 612, -810, -810, 01926 -810, -810, -810, -810, 438, -810, 447, 451, 284, 475, 01927 540, 496, 60, 502, 576, 516, 61, 550, 565, -810, 01928 -810, -810, -810, -810, -810, -810, 6375, 9084, 9084, 9084, 01929 9084, 7728, 9084, 9084, -810, -810, -810, 549, -810, -810, 01930 -810, 8406, -810, 5262, 7393, 527, 8406, 8971, 8971, 8971, 01931 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 01932 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 01933 8971, 8971, 8971, 10025, 7615, 10102, 4619, 269, 110, 110, 01934 9084, 9084, 245, 654, 538, 631, -810, -810, 645, 668, 01935 85, 93, 108, 405, 410, 9084, 377, -810, 123, 661, 01936 -810, -810, -810, -810, 40, 42, 56, 167, 180, 279, 01937 332, 336, 343, -810, -810, -810, 30, -810, -810, 10179, 01938 -810, -810, 9197, 9197, -810, -810, 394, -810, -810, -810, 01939 8971, 8971, 7841, -810, -810, 10256, 7615, 10333, 8971, 8971, 01940 8067, -810, -21, 558, -810, -810, -21, -810, 564, 566, 01941 -810, 66, -810, -810, -810, -810, -810, 7025, -810, 8971, 01942 5671, 574, 10256, 10333, 8971, 1021, 581, -21, -810, -810, 01943 6488, 572, -21, -810, -810, 8180, -810, -810, 8293, -810, 01944 -810, -810, 360, 678, -810, -810, -810, 588, 9746, 10410, 01945 7615, 10487, 1081, -810, -810, -810, -810, -810, -810, -810, 01946 -810, -810, -810, -810, -810, 302, -810, -810, 594, -810, 01947 -810, -810, 306, -810, 597, -810, 8971, 8971, -810, -810, 01948 -810, -810, -810, -810, -810, -810, -810, 63, 63, -810, 01949 -810, 63, 8971, -810, 605, 607, -810, -21, 9746, 617, 01950 -810, -810, -810, 636, 1231, -810, -810, 463, 2567, 2567, 01951 2567, 2567, 976, 976, 2722, 2633, 2567, 2567, 3244, 3244, 01952 339, 339, 1305, 976, 976, 986, 986, 1119, 255, 255, 01953 463, 463, 463, 4345, 3400, 4480, 3535, 400, 620, -810, 01954 -21, 591, -810, 742, -810, 400, 4075, 747, 754, -810, 01955 4758, 756, 5036, 52, 52, 654, 8519, 747, 121, 10564, 01956 7615, 10641, -810, 269, -810, 678, -810, 245, -810, -810, 01957 -810, 10718, 7615, 10179, 4619, 9084, 1274, -810, -810, -810, 01958 1148, -810, 2322, -810, 3109, 7025, 2974, -810, 8971, 364, 01959 -810, 354, 2995, 3670, -21, 398, 497, -810, -810, -810, 01960 -810, 7841, 8067, -810, -810, 9084, 3109, 644, -810, -810, 01961 -810, 3109, 5671, 212, -810, -810, 317, 9746, 588, 495, 01962 323, -21, 337, 376, 676, -810, -810, -810, -810, 8971, 01963 -810, 896, -810, -810, -810, -810, -810, 1142, -810, -810, 01964 -810, -810, -810, -810, 656, -810, 657, 743, 663, -810, 01965 667, 750, 671, 760, -810, -810, 763, -810, -810, -810, 01966 -810, -810, 463, 463, -810, 793, 5810, -810, -810, 5540, 01967 63, 5810, 679, 8632, -810, 588, 9746, 9197, 8971, 699, 01968 9197, 9197, -810, 549, 400, 681, 759, 9197, 9197, -810, 01969 549, 400, -810, -810, 8745, 810, -810, 718, -810, 810, 01970 -810, -810, -810, -810, 747, 92, -810, 81, 149, -21, 01971 144, 155, 9084, 245, -810, 9084, 4619, 495, 323, -810, 01972 -21, 747, 66, 1142, 4619, 245, 7158, -810, 86, 120, 01973 -810, 8971, -810, -810, -810, 8971, 8971, 504, 8971, 8971, 01974 694, 66, -810, 700, -810, -810, 390, 8971, -810, -810, 01975 896, 473, -810, 702, -21, -810, -21, 124, 1142, -810, 01976 571, -810, -810, -810, 38, -810, 1142, -810, -810, 881, 01977 -810, -810, -810, -810, -810, -810, -810, -810, 720, 9855, 01978 -810, -21, 716, 703, -810, 707, 663, -810, 723, 724, 01979 -810, 725, 856, 737, 5540, 859, 8971, 740, 588, 3109, 01980 8971, -810, 3109, -810, 3109, -810, -810, -810, 9197, -810, 01981 3109, -810, 3109, -810, -810, 605, -810, 797, -810, 5149, 01982 872, -810, 9084, 747, -810, 747, 5810, 5810, -810, 8858, 01983 4897, 159, 52, -810, 245, 747, -810, -810, -810, -21, 01984 747, -810, -810, -810, -810, 3109, 8971, 8067, -810, -810, 01985 -810, -21, 875, 752, 953, -810, 762, 5810, 5540, -810, 01986 -810, -810, 753, 757, -810, 663, -810, 767, -810, 768, 01987 767, 5923, 9855, 848, 689, 787, -810, 1386, -810, 622, 01988 -810, -810, 1386, -810, 1533, -810, 1028, -810, -810, 778, 01989 -810, 784, 3109, -810, 3109, 9964, 110, -810, -810, 5810, 01990 -810, -810, 110, -810, -810, 747, 747, -810, 383, -810, 01991 4619, -810, -810, -810, -810, 1274, -810, 785, 875, 672, 01992 -810, -810, 911, 792, 1142, -810, 881, -810, -810, 881, 01993 -810, 881, -810, -810, 820, 689, -810, 10795, -810, -810, 01994 806, 809, -810, 663, 811, -810, 812, 811, -810, 352, 01995 -810, -810, -810, 891, -810, 691, 508, 575, 612, 4619, 01996 -810, 4758, -810, -810, -810, -810, -810, 5810, 747, 4619, 01997 875, 785, 875, 823, -810, -810, 767, 824, 767, 767, 01998 -810, 818, 826, 1386, -810, 1533, -810, -810, 1533, -810, 01999 1533, -810, -810, 1028, -810, 678, 10872, 7615, 10949, 754, 02000 718, 747, -810, 747, 785, 875, -810, 881, -810, -810, 02001 -810, 811, 825, 811, 811, -810, 49, 323, -21, 179, 02002 215, -810, -810, -810, -810, 785, 767, -810, 1533, -810, 02003 -810, -810, 216, -810, 811, -810 02004 }; 02005 02006 /* YYPGOTO[NTERM-NUM]. */ 02007 static const yytype_int16 yypgoto[] = 02008 { 02009 -810, -810, -810, -382, -810, 26, -810, -549, -7, -810, 02010 513, -810, 33, -810, -315, -33, -63, -55, -810, -216, 02011 -810, 766, -13, 874, -164, 20, -73, -810, -409, 29, 02012 1882, -309, 882, -54, -810, -5, -810, -810, 6, -810, 02013 1208, -810, 1366, -810, -41, 256, -344, 78, -14, -810, 02014 -384, -205, -4, -304, -15, -810, -810, -810, -810, -810, 02015 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 02016 -810, -810, 64, -810, -810, -810, -810, -810, -810, -810, 02017 -810, -810, -810, -1, -333, -519, -44, -623, -810, -789, 02018 -771, 211, 297, 71, -810, -437, -810, -693, -810, -29, 02019 -810, -810, -810, -810, -810, -810, 237, -810, -810, -810, 02020 -810, -810, -810, -810, -94, -810, -810, -531, -810, -31, 02021 -810, -810, -810, -810, -810, -810, 890, -810, -810, -810, 02022 -810, 701, -810, -810, -810, -810, -810, -810, -810, 940, 02023 -810, -126, -810, -810, -810, -810, -810, -3, -810, 11, 02024 -810, 1400, 1673, 905, 1898, 1689, -810, -810, 65, -451, 02025 -102, -385, -809, -588, -689, -289, 222, 107, -810, -810, 02026 -810, 18, -721, -764, 115, 235, -810, -634, -810, -37, 02027 -627, -810, -810, -810, 114, -388, -810, -324, -810, 623, 02028 -47, -9, -123, -568, -214, 21, -11, -2 02029 }; 02030 02031 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 02032 positive, shift that token. If negative, reduce the rule which 02033 number is the opposite. If YYTABLE_NINF, syntax error. */ 02034 #define YYTABLE_NINF -620 02035 static const yytype_int16 yytable[] = 02036 { 02037 116, 283, 400, 208, 208, 198, 325, 208, 229, 299, 02038 560, 521, 214, 214, 196, 421, 214, 258, 232, 199, 02039 235, 659, 526, 234, 359, 198, 572, 362, 610, 558, 02040 117, 566, 617, 316, 196, 69, 610, 69, 273, 199, 02041 394, 785, 251, 363, 724, 741, 757, 261, 459, 263, 02042 267, 809, 461, 357, 357, 723, 306, 357, 627, 638, 02043 317, 196, -106, 775, 273, 888, 84, 586, 84, 256, 02044 617, 689, 614, 766, 691, 600, 273, 273, 273, 720, 02045 215, 215, 272, 876, 215, 940, 447, 660, 305, 881, 02046 -518, 558, 840, 566, 212, 222, 845, 971, 223, 314, 02047 196, 937, 3, 312, 313, 569, -106, 432, 895, 695, 02048 -102, 305, 314, 84, 215, 397, -102, 274, -103, 630, 02049 231, 488, 494, 569, 587, -510, 641, -509, 215, -338, 02050 220, 220, 451, -110, 220, 654, 453, -93, 965, 684, 02051 237, -511, 455, 274, 883, 659, -109, 630, 319, 456, 02052 215, 215, 889, 877, 215, 368, 379, 379, 655, 517, 02053 479, 851, 482, 398, 486, 262, 266, 991, 486, -105, 02054 489, 495, 856, -510, -108, -509, -338, -338, 900, 901, 02055 -107, 685, 775, 873, -104, -597, 247, 855, -106, -511, 02056 -106, 302, -105, 303, 289, 860, 251, 431, 466, 433, 02057 321, 940, 316, 315, 971, 449, 659, 231, 881, 227, 02058 291, 208, 414, 208, 208, -97, 315, -597, 414, -93, 02059 214, 1024, 214, 888, 421, 430, 849, -94, -107, -104, 02060 441, 302, 322, 303, 617, 878, 729, 610, 610, 965, 02061 588, 450, -101, 251, 500, 501, 502, 503, 740, 302, 02062 763, 303, -512, 814, 1045, -100, 273, 630, 948, 462, 02063 881, 326, 302, 961, 303, -514, 513, 84, 966, 630, 02064 256, 522, 776, 305, 357, 357, 357, 357, -96, 505, 02065 506, 445, 739, -99, 775, -598, 775, 818, 215, -98, 02066 215, 215, 659, -95, 215, -518, 215, 573, 574, 618, 02067 -512, 84, 422, 620, 425, 984, 312, 313, 623, 273, 02068 997, -519, 84, -514, 84, 575, 251, 515, -105, 881, 02069 -105, -102, 515, 327, 633, -74, 230, 357, 357, 635, 02070 56, 231, 499, 929, 419, 274, 1007, -103, 220, 69, 02071 220, 208, 583, 256, 504, 473, -88, 601, 603, 481, 02072 775, 993, 430, 519, -107, -104, -107, -104, 859, 678, 02073 -110, 564, -96, 473, -513, 293, 678, 473, 295, 1032, 02074 84, 215, 215, 215, 215, 84, 215, 215, 350, 351, 02075 352, 988, 521, 305, 302, 215, 303, 84, 274, 230, 02076 215, 474, 850, 475, 694, 466, 803, 985, 839, 590, 02077 576, -98, 775, 208, 775, 564, 754, 327, -293, 474, 02078 836, 475, -513, 474, 430, 475, -432, -515, 215, 404, 02079 84, -504, 764, 564, 215, 215, 414, 414, -507, 584, 02080 406, -594, 624, 585, 198, 402, -595, 775, 116, 215, 02081 1023, 410, 677, 196, 353, 466, 680, 412, 199, 564, 02082 -96, 458, 411, 273, 415, -293, -293, 208, 456, -598, 02083 348, 349, 350, 351, 352, -515, 215, 215, 430, -504, 02084 1052, -96, -519, 69, -96, -432, -507, 564, -96, 617, 02085 215, 444, 418, 610, 659, 758, 1013, 825, 420, -98, 02086 -504, 354, 355, 231, 833, -507, 438, 887, -103, 473, 02087 890, 416, 417, 273, 84, 688, 688, -109, 473, 688, 02088 -98, -105, 473, -98, 84, 224, 702, -98, 440, -94, 02089 -432, -601, -432, -432, 709, 769, 611, 645, 646, 647, 02090 648, 327, 274, 699, 215, -594, 227, -504, -504, 448, 02091 -595, -594, -507, -507, 703, 474, -595, 475, 476, 442, 02092 -73, 705, 710, 454, 474, 754, 475, 478, 474, 747, 02093 475, 480, 742, 717, 765, 719, 716, 208, 787, 636, 02094 790, 460, 725, 469, 297, 298, 726, 403, 430, 208, 02095 -601, 463, 274, 979, 759, 483, 749, 564, 444, 981, 02096 430, 866, 761, -516, 722, 722, 416, 443, 750, 564, 02097 752, 473, 198, -110, 468, 705, 487, 872, 734, 414, 02098 -107, 196, 490, 964, -109, 967, 199, -104, 496, 858, 02099 470, 471, 273, 466, -101, -601, 493, -601, -601, 649, 02100 116, -597, 705, 497, 84, -100, 84, 473, 868, 650, 02101 -516, -516, 522, 509, 215, 821, 823, 474, 810, 475, 02102 484, 875, 829, 831, 863, 996, 215, 998, 84, 215, 02103 -517, 520, 999, 826, 782, 69, 782, 653, 654, 852, 02104 747, 576, 854, 1038, 464, 465, 811, 498, 707, 812, 02105 799, 273, 813, 474, 815, 475, 491, 578, 688, 215, 02106 650, 655, 862, 582, 630, 619, 84, -284, 621, 357, 02107 622, 274, 357, 806, -105, 628, -88, -517, -517, 750, 02108 515, 632, 838, 841, 1031, 841, 1033, 841, 653, 654, 02109 705, 1034, 637, 848, 769, -96, 645, 646, 647, 648, 02110 579, 705, 842, 839, 679, 760, 933, 681, 1046, -268, 02111 857, 693, 655, 886, -284, -284, 591, 886, 936, 697, 02112 84, 696, 196, 84, 853, 84, -423, 712, 414, 1054, 02113 274, 215, 714, -294, 215, 215, 861, 811, 74, 718, 02114 74, 215, 215, 913, 957, 762, 1016, 580, 581, 922, 02115 945, 947, 74, 74, 273, 950, 74, 952, 953, 767, 02116 778, 780, 811, 592, 593, 783, 215, 784, 885, 215, 02117 84, 786, 788, 782, 782, 789, 992, 909, 84, 357, 02118 -294, -294, 791, -269, 820, 74, 74, 793, 794, 827, 02119 795, 592, 593, 1017, 1018, 839, 44, 45, 867, 708, 02120 74, 869, 918, 892, 896, 917, 874, 897, 921, 925, 02121 926, 899, 923, 928, 924, 798, 828, 645, 646, 647, 02122 648, 799, 74, 74, 932, -107, 74, 902, 904, 934, 02123 810, 650, 886, 894, 906, 810, 907, 810, 908, 910, 02124 942, 943, -104, 722, -270, 931, -98, 273, 84, 903, 02125 905, 919, 651, 782, 954, 915, 938, 944, 652, 653, 02126 654, 946, 215, -95, 1026, 1028, 1029, 1030, 434, 941, 02127 273, 949, 951, 84, 956, 958, 215, 435, 436, 972, 02128 84, 84, 980, 655, 84, 806, 656, 963, -271, 990, 02129 806, 994, 806, 995, 982, 983, 841, 769, 1000, 645, 02130 646, 647, 648, 769, 231, 645, 646, 647, 648, 649, 02131 1003, 84, 84, 1005, 1053, 1008, 1010, 1015, 769, 650, 02132 645, 646, 647, 648, -597, 84, 955, 1025, 1027, 1048, 02133 1014, 782, -598, 634, 770, 366, 810, 834, 810, 74, 02134 651, 810, 1019, 810, 1020, 383, 1042, 653, 654, 975, 02135 1021, 871, 800, 84, 1035, 770, 864, 1022, 1041, 401, 02136 74, 771, 74, 74, 84, 492, 74, 287, 74, 395, 02137 989, 655, 884, 74, 208, 769, 962, 645, 646, 647, 02138 648, 810, 960, 882, 74, 430, 74, 716, 841, 597, 02139 1043, 806, 1044, 806, 564, 0, 806, 0, 806, 705, 02140 0, 1004, 1006, 0, 0, 1009, 0, 1011, 1012, 0, 02141 0, 0, 770, 84, 327, 84, 0, 0, 939, 0, 02142 0, 84, 0, 84, 327, 0, 0, 0, 0, 340, 02143 341, 307, 308, 309, 310, 311, 806, 0, 0, 340, 02144 341, 0, 74, 74, 74, 74, 74, 74, 74, 74, 02145 968, 215, 645, 646, 647, 648, 0, 74, 0, 74, 02146 0, 0, 74, 0, 345, 346, 347, 348, 349, 350, 02147 351, 352, 1047, 1049, 1050, 1051, 347, 348, 349, 350, 02148 351, 352, 0, 0, 0, 0, 0, 0, 0, 0, 02149 74, 0, 74, 0, 0, 1055, 74, 74, 0, 0, 02150 0, 0, 0, 644, 0, 645, 646, 647, 648, 649, 02151 0, 74, 0, 0, 0, 0, 0, 0, -619, 650, 02152 0, 0, 0, 0, 0, 0, -619, -619, -619, 0, 02153 0, -619, -619, -619, 0, -619, 0, 0, 74, 74, 02154 651, 0, 0, 0, -619, -619, 652, 653, 654, 0, 02155 0, 0, 74, 0, 0, -619, -619, 327, -619, -619, 02156 -619, -619, -619, 0, 644, 0, 645, 646, 647, 648, 02157 649, 655, 340, 341, 656, 0, 74, 0, 0, 0, 02158 650, 0, 0, 0, 0, 0, 74, 657, 0, 0, 02159 0, 0, 0, 0, 210, 210, 0, 0, 210, 0, 02160 0, 651, 0, -619, 0, 0, 74, 652, 653, 654, 02161 348, 349, 350, 351, 352, 0, 0, 0, 0, 0, 02162 0, 0, 0, 0, 244, 246, -619, 0, 0, 210, 02163 210, 0, 655, 0, 0, 656, 0, 0, 0, 0, 02164 0, 0, 300, 301, 0, 698, 0, 0, -619, -619, 02165 0, -619, 0, 0, 227, -619, 0, -619, 0, -619, 02166 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 02167 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 02168 338, 339, 0, 0, 340, 341, 0, 0, 0, 0, 02169 0, 0, 0, 0, 0, 0, 644, 0, 645, 646, 02170 647, 648, 649, 0, 0, 0, 74, 0, 74, 0, 02171 0, 0, 650, 0, 0, 342, 74, 343, 344, 345, 02172 346, 347, 348, 349, 350, 351, 352, 0, 74, 0, 02173 74, 74, 0, 651, 0, -245, 0, 0, 0, 652, 02174 653, 654, 0, 327, 328, 329, 330, 331, 332, 333, 02175 334, 335, 336, 337, 338, 339, 0, 0, 340, 341, 02176 0, 74, 0, 0, 655, 0, 0, 656, 74, 0, 02177 0, 0, 110, 0, 110, 0, 0, 0, 0, 210, 02178 743, 0, 210, 210, 210, 300, 0, 0, 264, 342, 02179 0, 343, 344, 345, 346, 347, 348, 349, 350, 351, 02180 352, 0, 210, 0, 210, 210, 0, 0, 798, 0, 02181 645, 646, 647, 648, 799, 0, 231, 0, 0, 110, 02182 0, 0, 74, 275, 650, 74, 0, 74, 0, 0, 02183 0, 0, 0, 74, 0, 0, 74, 74, 0, 0, 02184 0, 0, 0, 74, 74, 651, 0, 0, 0, 275, 02185 0, 652, 653, 654, 0, 0, 0, 0, 0, 0, 02186 0, 370, 380, 380, 380, 0, 0, 0, 74, 0, 02187 0, 74, 74, 0, 0, 0, 655, 0, 0, 656, 02188 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02189 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 02190 0, 0, 0, 0, 524, 527, 528, 529, 530, 531, 02191 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 02192 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 02193 552, 0, 210, 0, 0, 0, 0, 405, 0, 0, 02194 407, 408, 409, 0, 0, 0, 0, 0, 0, 0, 02195 74, 0, 0, 0, 0, 769, 0, 645, 646, 647, 02196 648, 799, 0, 0, 74, 0, 0, 0, 0, 0, 02197 0, 650, 0, 110, 0, 74, 0, 0, 74, 0, 02198 602, 604, 74, 74, 0, 0, 74, 0, 606, 210, 02199 210, 0, 651, 0, 210, 0, 602, 604, 210, 653, 02200 654, 0, 0, 0, 0, 0, 0, 110, 0, 0, 02201 0, 0, 0, 74, 74, 0, 0, 626, 110, 0, 02202 110, 0, 631, 655, 0, 0, 0, 74, 0, 0, 02203 0, 0, 0, 210, 0, 0, 210, 0, 0, 0, 02204 0, 275, 0, 0, 0, 111, 0, 111, 210, 0, 02205 0, 0, 0, 0, 0, 74, 0, 514, 0, 0, 02206 0, 114, 525, 114, 0, 0, 74, 0, 0, 0, 02207 0, 0, 0, 0, 682, 683, 110, 0, 0, 0, 02208 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 02209 210, 0, 111, 110, 275, 0, 276, 0, 0, 0, 02210 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 02211 0, 0, 277, 0, 0, 74, 0, 74, 0, 0, 02212 0, 0, 276, 74, 0, 74, 110, 0, 0, 0, 02213 0, 0, 0, 0, 371, 381, 381, 381, 277, 0, 02214 0, 0, 0, 0, 0, 0, 0, 607, 609, 0, 02215 372, 382, 382, 74, 210, 0, 264, 0, 210, 0, 02216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02217 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02218 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 02219 0, 609, 0, 0, 264, 0, 0, 0, 0, 210, 02220 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02221 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02222 110, 0, 0, 0, 0, 0, 0, 210, 0, 0, 02223 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 02224 0, 0, 0, 0, 0, 0, 111, 0, 692, 0, 02225 0, 0, 0, 0, 81, 0, 81, 0, 0, 0, 02226 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 02227 113, 210, 113, 0, 0, 606, 819, 0, 822, 824, 02228 111, 0, 0, 0, 0, 830, 832, 0, 275, 0, 02229 0, 111, 210, 111, 0, 0, 114, 0, 0, 0, 02230 0, 81, 0, 0, 0, 0, 0, 114, 0, 114, 02231 0, 0, 525, 0, 276, 0, 0, 113, 0, 0, 02232 0, 0, 0, 0, 0, 0, 0, 0, 0, 865, 02233 277, 0, 0, 822, 824, 0, 830, 832, 0, 0, 02234 110, 0, 110, 367, 753, 210, 0, 0, 0, 111, 02235 0, 0, 0, 0, 111, 0, 0, 609, 264, 0, 02236 0, 0, 0, 0, 110, 114, 111, 276, 0, 0, 02237 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02238 0, 0, 114, 277, 0, 768, 0, 0, 0, 0, 02239 0, 0, 0, 0, 210, 0, 0, 0, 912, 111, 02240 0, 0, 110, 0, 0, 0, 914, 275, 0, 0, 02241 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 02242 0, 0, 0, 0, 0, 0, 0, 210, 0, 817, 02243 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02244 0, 0, 0, 0, 914, 210, 0, 0, 0, 0, 02245 835, 0, 0, 0, 0, 81, 110, 0, 0, 110, 02246 0, 110, 0, 0, 0, 0, 275, 0, 0, 0, 02247 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 02248 0, 0, 0, 111, 0, 0, 0, 0, 0, 81, 02249 0, 0, 0, 111, 0, 0, 0, 0, 0, 114, 02250 81, 0, 81, 870, 0, 113, 110, 0, 0, 114, 02251 0, 276, 0, 0, 110, 0, 113, 0, 113, 0, 02252 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, 02253 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02255 0, 0, 911, 0, 0, 0, 0, 0, 81, 0, 02256 0, 276, 0, 81, 0, 0, 0, 0, 0, 380, 02257 0, 0, 0, 0, 113, 81, 0, 277, 523, 113, 02258 0, 0, 0, 0, 110, 927, 0, 0, 0, 0, 02259 0, 113, 0, 0, 0, 210, 0, 0, 0, 0, 02260 0, 0, 0, 264, 0, 0, 0, 0, 81, 110, 02261 0, 0, 0, 111, 0, 111, 110, 110, 0, 0, 02262 110, 0, 0, 0, 113, 0, 0, 0, 0, 114, 02263 0, 114, 0, 0, 0, 0, 0, 111, 0, 0, 02264 0, 0, 0, 0, 0, 0, 0, 110, 110, 0, 02265 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 02266 0, 110, 380, 0, 0, 0, 0, 0, 0, 0, 02267 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 02268 276, 0, 0, 0, 0, 976, 0, 0, 0, 110, 02269 0, 114, 81, 0, 0, 0, 277, 0, 0, 0, 02270 110, 0, 81, 0, 0, 0, 0, 0, 113, 0, 02271 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 02272 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 02273 0, 0, 111, 0, 111, 797, 751, 0, 0, 276, 02274 0, 0, 0, 0, 0, 114, 0, 0, 114, 110, 02275 114, 110, 0, 0, 0, 277, 0, 110, 0, 110, 02276 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 02277 337, 338, 339, 0, 0, 340, 341, 0, 0, 111, 02278 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 02279 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 02280 0, 0, 0, 114, 0, 0, 342, 0, 343, 344, 02281 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 02282 0, 0, 81, 0, 81, 0, 0, 0, 0, 0, 02283 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 02284 113, 0, 381, 0, 0, 0, 81, 0, 0, 0, 02285 0, 0, 0, 0, 0, 0, 0, 111, 382, 0, 02286 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 02287 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 02288 0, 0, 111, 0, 81, 0, 0, 0, 0, 111, 02289 111, 0, 0, 111, 0, 0, 0, 0, 114, 0, 02290 113, 0, 0, 0, 0, 114, 114, 0, 0, 114, 02291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02292 111, 111, 0, 0, 0, 0, 0, 0, 0, 0, 02293 0, 0, 0, 0, 111, 381, 114, 114, 81, 0, 02294 0, 81, 0, 81, 0, 0, 0, 0, 0, 523, 02295 114, 382, 0, 0, 113, 0, 0, 113, 977, 113, 02296 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 02297 0, 0, 0, 111, 978, 0, 0, 0, 114, 0, 02298 0, 0, 0, 0, 0, 0, 0, 0, 81, 114, 02299 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 02300 0, 0, 0, 0, 113, 327, -620, -620, -620, -620, 02301 332, 333, 113, 0, -620, -620, 0, 0, 0, 0, 02302 340, 341, 111, 0, 111, 0, 0, 0, 0, 0, 02303 111, 0, 111, 0, 0, 0, 0, 0, 114, 0, 02304 114, 0, 0, 0, 0, 0, 114, 0, 114, 0, 02305 0, 0, 0, 343, 344, 345, 346, 347, 348, 349, 02306 350, 351, 352, 0, 0, 0, 81, 0, 0, 0, 02307 0, 327, 328, 329, 330, 331, 332, 333, 334, 0, 02308 336, 337, 113, 0, 0, 0, 340, 341, 0, 0, 02309 0, 81, 0, 0, 0, 0, 0, 0, 81, 81, 02310 0, 0, 81, 0, 0, 0, 0, 113, 0, 0, 02311 0, 0, 0, 0, 113, 113, 0, 0, 113, 343, 02312 344, 345, 346, 347, 348, 349, 350, 351, 352, 81, 02313 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02314 0, 0, 0, 81, 0, 113, 113, 0, 0, 0, 02315 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 02316 327, 328, 329, 330, 331, 332, 333, 974, 0, 336, 02317 337, 81, 0, 0, 0, 340, 341, 0, 0, 0, 02318 0, 0, 81, 0, 0, 0, 0, 113, 0, 0, 02319 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 02320 0, 0, 0, 0, 0, 0, 0, 0, 343, 344, 02321 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 02322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02323 0, 81, 0, 81, 0, 0, 0, 0, 0, 81, 02324 0, 81, 0, 0, 0, 0, 0, 113, 0, 113, 02325 0, 0, 0, 0, 0, 113, 0, 113, -619, 4, 02326 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02327 11, 0, 0, 0, 12, 0, 13, 14, 15, 16, 02328 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02329 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02330 0, 0, 0, 28, 29, 30, 31, 32, 33, 34, 02331 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02332 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02334 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02335 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02336 58, 59, 60, 61, 62, -601, 0, 0, 0, 0, 02337 0, 0, 0, -601, -601, -601, 0, 0, -601, -601, 02338 -601, 0, -601, 0, 63, 64, 65, 0, 698, 0, 02339 0, -601, -601, -601, -601, 0, 0, -619, 0, -619, 02340 0, 0, -601, -601, 0, -601, -601, -601, -601, -601, 02341 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 02342 335, 336, 337, 338, 339, 0, 0, 340, 341, 0, 02343 0, 0, 0, -601, -601, -601, -601, -601, -601, -601, 02344 -601, -601, -601, -601, -601, -601, 0, 0, -601, -601, 02345 -601, 0, 755, -601, 0, 0, 0, 0, 342, -601, 02346 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 02347 0, 0, 0, -601, 0, 0, -601, 0, -106, -601, 02348 -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, 02349 -601, 0, 0, 0, 0, -601, -601, -601, -601, -601, 02350 -504, 0, -601, -601, -601, 0, -601, 0, -504, -504, 02351 -504, 0, 0, -504, -504, -504, 0, -504, 0, 0, 02352 0, 0, 0, 0, 0, -504, 0, -504, -504, -504, 02353 0, 0, 0, 0, 0, 0, 0, -504, -504, 0, 02354 -504, -504, -504, -504, -504, 0, 0, 327, 328, 329, 02355 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 02356 0, 0, 340, 341, 0, 0, 0, 0, -504, -504, 02357 -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, 02358 -504, 0, 0, -504, -504, -504, 0, -504, -504, 0, 02359 0, 0, 0, 342, -504, 343, 344, 345, 346, 347, 02360 348, 349, 350, 351, 352, 0, 0, 0, -504, 0, 02361 0, -504, 0, -504, -504, -504, -504, -504, -504, -504, 02362 -504, -504, -504, -504, -504, -504, 0, 0, 0, 0, 02363 0, -504, -504, -504, -504, -507, 0, -504, -504, -504, 02364 0, -504, 0, -507, -507, -507, 0, 0, -507, -507, 02365 -507, 0, -507, 0, 0, 0, 0, 0, 0, 0, 02366 -507, 0, -507, -507, -507, 0, 0, 0, 0, 0, 02367 0, 0, -507, -507, 0, -507, -507, -507, -507, -507, 02368 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 02369 335, 336, 337, -620, -620, 0, 0, 340, 341, 0, 02370 0, 0, 0, -507, -507, -507, -507, -507, -507, -507, 02371 -507, -507, -507, -507, -507, -507, 0, 0, -507, -507, 02372 -507, 0, -507, -507, 0, 0, 0, 0, 0, -507, 02373 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 02374 0, 0, 0, -507, 0, 0, -507, 0, -507, -507, 02375 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, 02376 -507, 0, 0, 0, 0, 0, -507, -507, -507, -507, 02377 -602, 0, -507, -507, -507, 0, -507, 0, -602, -602, 02378 -602, 0, 0, -602, -602, -602, 0, -602, 0, 0, 02379 0, 0, 0, 0, 0, 0, -602, -602, -602, -602, 02380 0, 0, 0, 0, 0, 0, 0, -602, -602, 0, 02381 -602, -602, -602, -602, -602, 0, 0, 0, 0, 0, 02382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02383 0, 0, 0, 0, 0, 0, 0, 0, -602, -602, 02384 -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 02385 -602, 0, 0, -602, -602, -602, 0, 0, -602, 0, 02386 0, 0, 0, 0, -602, 0, 0, 0, 0, 0, 02387 0, 0, 0, 0, 0, 0, 0, 0, -602, 0, 02388 0, -602, 0, 0, -602, -602, -602, -602, -602, -602, 02389 -602, -602, -602, -602, -602, -602, 0, 0, 0, 0, 02390 -602, -602, -602, -602, -602, -603, 0, -602, -602, -602, 02391 0, -602, 0, -603, -603, -603, 0, 0, -603, -603, 02392 -603, 0, -603, 0, 0, 0, 0, 0, 0, 0, 02393 0, -603, -603, -603, -603, 0, 0, 0, 0, 0, 02394 0, 0, -603, -603, 0, -603, -603, -603, -603, -603, 02395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02397 0, 0, 0, -603, -603, -603, -603, -603, -603, -603, 02398 -603, -603, -603, -603, -603, -603, 0, 0, -603, -603, 02399 -603, 0, 0, -603, 0, 0, 0, 0, 0, -603, 02400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02401 0, 0, 0, -603, 0, 0, -603, 0, 0, -603, 02402 -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, 02403 -603, 0, 0, 0, 0, -603, -603, -603, -603, -603, 02404 -293, 0, -603, -603, -603, 0, -603, 0, -293, -293, 02405 -293, 0, 0, -293, -293, -293, 0, -293, 0, 0, 02406 0, 0, 0, 0, 0, 0, 0, -293, -293, -293, 02407 0, 0, 0, 0, 0, 0, 0, -293, -293, 0, 02408 -293, -293, -293, -293, -293, 0, 0, 0, 0, 0, 02409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02410 0, 0, 0, 0, 0, 0, 0, 0, -293, -293, 02411 -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 02412 -293, 0, 0, -293, -293, -293, 0, 756, -293, 0, 02413 0, 0, 0, 0, -293, 0, 0, 0, 0, 0, 02414 0, 0, 0, 0, 0, 0, 0, 0, -293, 0, 02415 0, -293, 0, -108, -293, -293, -293, -293, -293, -293, 02416 -293, -293, -293, -293, -293, -293, 0, 0, 0, 0, 02417 0, -293, -293, -293, -293, -431, 0, -293, -293, -293, 02418 0, -293, 0, -431, -431, -431, 0, 0, -431, -431, 02419 -431, 0, -431, 0, 0, 0, 0, 0, 0, 0, 02420 0, -431, -431, -431, 0, 0, 0, 0, 0, 0, 02421 0, 0, -431, -431, 0, -431, -431, -431, -431, -431, 02422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02424 0, 0, 0, -431, -431, -431, -431, -431, -431, -431, 02425 -431, -431, -431, -431, -431, -431, 0, 0, -431, -431, 02426 -431, 0, 0, -431, 0, 0, 0, 0, 0, -431, 02427 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02428 0, 0, 0, -431, 0, 0, 0, 0, 0, -431, 02429 0, -431, -431, -431, -431, -431, -431, -431, -431, -431, 02430 -431, 0, 0, 0, 0, -431, -431, -431, -431, -431, 02431 -285, 227, -431, -431, -431, 0, -431, 0, -285, -285, 02432 -285, 0, 0, -285, -285, -285, 0, -285, 0, 0, 02433 0, 0, 0, 0, 0, 0, 0, -285, -285, -285, 02434 0, 0, 0, 0, 0, 0, 0, -285, -285, 0, 02435 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 02436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02437 0, 0, 0, 0, 0, 0, 0, 0, -285, -285, 02438 -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02439 -285, 0, 0, -285, -285, -285, 0, 0, -285, 0, 02440 0, 0, 0, 0, -285, 0, 0, 0, 0, 0, 02441 0, 0, 0, 0, 0, 0, 0, 0, -285, 0, 02442 0, -285, 0, 0, -285, -285, -285, -285, -285, -285, 02443 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 02444 0, -285, -285, -285, -285, -421, 0, -285, -285, -285, 02445 0, -285, 0, -421, -421, -421, 0, 0, -421, -421, 02446 -421, 0, -421, 0, 0, 0, 0, 0, 0, 0, 02447 0, -421, -421, -421, 0, 0, 0, 0, 0, 0, 02448 0, 0, -421, -421, 0, -421, -421, -421, -421, -421, 02449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02451 0, 0, 0, -421, -421, -421, -421, -421, -421, -421, 02452 -421, -421, -421, -421, -421, -421, 0, 0, -421, -421, 02453 -421, 0, 0, -421, 0, 0, 0, 0, 0, -421, 02454 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02455 0, 0, 0, -421, 0, 0, 0, 0, 0, -421, 02456 0, -421, -421, -421, -421, -421, -421, -421, -421, -421, 02457 -421, 0, 0, 0, 0, -421, -421, -421, -421, -421, 02458 -300, -421, -421, -421, -421, 0, -421, 0, -300, -300, 02459 -300, 0, 0, -300, -300, -300, 0, -300, 0, 0, 02460 0, 0, 0, 0, 0, 0, 0, -300, -300, 0, 02461 0, 0, 0, 0, 0, 0, 0, -300, -300, 0, 02462 -300, -300, -300, -300, -300, 0, 0, 0, 0, 0, 02463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02464 0, 0, 0, 0, 0, 0, 0, 0, -300, -300, 02465 -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 02466 -300, 0, 0, -300, -300, -300, 0, 0, -300, 0, 02467 0, 0, 0, 0, -300, 0, 0, 0, 0, 0, 02468 0, 0, 0, 0, 0, 0, 0, 0, -300, 0, 02469 0, 0, 0, 0, -300, 0, -300, -300, -300, -300, 02470 -300, -300, -300, -300, -300, -300, 0, 0, 0, 0, 02471 0, -300, -300, -300, -300, -601, 224, -300, -300, -300, 02472 0, -300, 0, -601, -601, -601, 0, 0, 0, -601, 02473 -601, 0, -601, 0, 0, 0, 0, 0, 0, 0, 02474 0, -601, 0, 0, 0, 0, 0, 0, 0, 0, 02475 0, 0, -601, -601, 0, -601, -601, -601, -601, -601, 02476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02478 0, 0, 0, -601, -601, -601, -601, -601, -601, -601, 02479 -601, -601, -601, -601, -601, -601, 0, 0, -601, -601, 02480 -601, 0, 700, 0, 0, 0, 0, 0, 0, 0, 02481 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02482 0, 0, 0, -601, 0, 0, 0, 0, -106, -601, 02483 0, -601, -601, -601, -601, -601, -601, -601, -601, -601, 02484 -601, 0, 0, 0, 0, -601, -601, -601, -601, -97, 02485 -293, 0, -601, 0, -601, 0, -601, 0, -293, -293, 02486 -293, 0, 0, 0, -293, -293, 0, -293, 0, 0, 02487 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02488 0, 0, 0, 0, 0, 0, 0, -293, -293, 0, 02489 -293, -293, -293, -293, -293, 0, 0, 0, 0, 0, 02490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02491 0, 0, 0, 0, 0, 0, 0, 0, -293, -293, 02492 -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 02493 -293, 0, 0, -293, -293, -293, 0, 701, 0, 0, 02494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02495 0, 0, 0, 0, 0, 0, 0, 0, -293, 0, 02496 0, 0, 0, -108, -293, 0, -293, -293, -293, -293, 02497 -293, -293, -293, -293, -293, -293, 0, 0, 0, 0, 02498 0, -293, -293, -293, -99, 0, 0, -293, 0, -293, 02499 248, -293, 5, 6, 7, 8, 9, -619, -619, -619, 02500 10, 11, 0, 0, -619, 12, 0, 13, 14, 15, 02501 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02502 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02503 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 02504 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02505 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02506 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02507 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02508 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02509 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02510 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02511 0, 0, 0, 0, 0, 63, 64, 65, 0, 0, 02512 0, 0, 0, 0, 0, 0, 0, 0, -619, 248, 02513 -619, 5, 6, 7, 8, 9, 0, 0, -619, 10, 02514 11, 0, -619, -619, 12, 0, 13, 14, 15, 16, 02515 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02516 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02517 0, 0, 0, 28, 29, 249, 31, 32, 33, 34, 02518 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02519 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02521 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02522 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02523 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02524 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02525 0, 0, 0, 0, 63, 64, 65, 0, 0, 0, 02526 0, 0, 0, 0, 0, 0, 0, -619, 248, -619, 02527 5, 6, 7, 8, 9, 0, 0, -619, 10, 11, 02528 0, 0, -619, 12, -619, 13, 14, 15, 16, 17, 02529 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02530 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 02531 0, 0, 28, 29, 249, 31, 32, 33, 34, 35, 02532 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02533 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02535 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02536 52, 0, 53, 0, 0, 54, 55, 56, 57, 58, 02537 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02538 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02539 0, 0, 0, 63, 64, 65, 0, 0, 0, 0, 02540 0, 0, 0, 0, 0, 0, -619, 248, -619, 5, 02541 6, 7, 8, 9, 0, 0, -619, 10, 11, 0, 02542 0, -619, 12, 0, 13, 14, 15, 16, 17, 18, 02543 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02544 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 02545 0, 28, 29, 249, 31, 32, 33, 34, 35, 36, 02546 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02547 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02548 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02549 0, 0, 48, 0, 0, 49, 50, 0, 51, 52, 02550 0, 53, 0, 0, 54, 55, 56, 57, 58, 59, 02551 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02552 248, 0, 5, 6, 7, 8, 9, 0, -619, -619, 02553 10, 11, 63, 64, 65, 12, 0, 13, 14, 15, 02554 16, 17, 18, 19, 0, -619, 0, -619, 0, 20, 02555 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02556 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 02557 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02558 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02559 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02560 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02561 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02562 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02563 0, 0, 0, 248, 0, 5, 6, 7, 8, 9, 02564 0, 0, 0, 10, 11, 63, 64, 65, 12, 0, 02565 13, 14, 15, 16, 17, 18, 19, 0, -619, 0, 02566 -619, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02567 0, 27, 0, 0, 0, 0, 0, 28, 29, 249, 02568 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02569 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02571 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02572 0, 250, 50, 0, 51, 52, 0, 53, 0, 0, 02573 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02574 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02575 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 02576 65, 0, 0, 0, 0, 0, 0, 0, 0, -619, 02577 0, -619, 248, -619, 5, 6, 7, 8, 9, 0, 02578 0, 0, 10, 11, 0, 0, 0, 12, 0, 13, 02579 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02580 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02581 27, 0, 0, 0, 0, 0, 28, 29, 249, 31, 02582 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02583 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02585 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02586 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02587 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02589 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 02590 0, 0, 0, 0, 0, 0, 0, 0, -619, 0, 02591 -619, 248, -619, 5, 6, 7, 8, 9, 0, 0, 02592 0, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02593 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02594 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 02595 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 02596 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02597 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02598 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02599 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 02600 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 02601 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02603 0, 0, 0, 0, 0, 0, 63, 64, 65, 0, 02604 0, -619, 4, 0, 5, 6, 7, 8, 9, -619, 02605 0, -619, 10, 11, 0, 0, 0, 12, 0, 13, 02606 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02607 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02608 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, 02609 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02610 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02611 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02612 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02613 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02614 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02615 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02616 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 02617 0, 0, -619, 0, 0, 0, 0, 0, 0, 0, 02618 -619, 248, -619, 5, 6, 7, 8, 9, 0, 0, 02619 -619, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02620 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02621 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 02622 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 02623 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02624 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02626 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 02627 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 02628 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02629 0, 0, 0, 0, 248, 0, 5, 6, 7, 8, 02630 9, 0, 0, 0, 10, 11, 63, 64, 65, 12, 02631 0, 13, 14, 15, 16, 17, 18, 19, 0, -619, 02632 0, -619, 0, 20, 21, 22, 23, 24, 25, 26, 02633 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, 02634 249, 31, 32, 33, 34, 35, 36, 37, 38, 39, 02635 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02636 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02637 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 02638 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, 02639 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02640 0, -619, 0, 0, 0, 0, 0, 0, 0, 5, 02641 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 02642 64, 65, 12, 0, 13, 14, 15, 16, 17, 18, 02643 19, 0, -619, 0, -619, 0, 20, 21, 22, 23, 02644 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 02645 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02646 37, 38, 39, 40, 201, 41, 42, 0, 43, 44, 02647 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02649 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 02650 0, 204, 205, 206, 54, 55, 56, 57, 58, 59, 02651 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02652 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02653 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 02654 16, 17, 18, 19, 0, 0, 0, 231, 0, 20, 02655 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02656 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02657 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02658 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02660 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 02661 0, 51, 52, 0, 0, 0, 0, 54, 55, 56, 02662 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02663 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02664 0, 0, 0, 10, 11, 63, 64, 65, 12, 0, 02665 13, 14, 15, 16, 17, 18, 19, 0, 302, 0, 02666 303, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02667 0, 27, 0, 0, 0, 0, 0, 0, 29, 0, 02668 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02669 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02670 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02671 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 02672 0, 203, 50, 0, 51, 52, 0, 0, 0, 0, 02673 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02674 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02675 7, 8, 9, 0, 0, 0, 10, 11, 63, 64, 02676 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02677 0, 0, 0, 231, 0, 20, 21, 22, 23, 24, 02678 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02679 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 02680 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02681 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02683 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02684 53, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02685 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02686 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02687 11, 63, 64, 65, 12, 0, 13, 14, 15, 16, 02688 17, 18, 19, 0, 498, 0, 0, 0, 20, 21, 02689 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02690 0, 0, 0, 28, 29, 249, 31, 32, 33, 34, 02691 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02692 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02694 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02695 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02696 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02698 0, 0, 0, 0, 63, 64, 65, 0, 0, 0, 02699 0, 0, 0, 0, 0, 0, 0, 498, 118, 119, 02700 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 02701 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 02702 140, 141, 0, 0, 0, 142, 143, 144, 384, 385, 02703 386, 387, 149, 150, 151, 0, 0, 0, 0, 0, 02704 152, 153, 154, 155, 388, 389, 390, 391, 160, 37, 02705 38, 392, 40, 0, 0, 0, 0, 0, 0, 0, 02706 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 02707 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 02708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02709 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 02710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02711 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 02712 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 02713 191, 393, 118, 119, 120, 121, 122, 123, 124, 125, 02714 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 02715 136, 137, 138, 139, 140, 141, 0, 0, 0, 142, 02716 143, 144, 145, 146, 147, 148, 149, 150, 151, 0, 02717 0, 0, 0, 0, 152, 153, 154, 155, 156, 157, 02718 158, 159, 160, 280, 281, 161, 282, 0, 0, 0, 02719 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 02720 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 02721 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 02722 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 02723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02724 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 02725 184, 185, 186, 187, 188, 0, 189, 190, 0, 0, 02726 0, 0, 0, 0, 191, 118, 119, 120, 121, 122, 02727 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02728 133, 134, 135, 136, 137, 138, 139, 140, 141, 0, 02729 0, 0, 142, 143, 144, 145, 146, 147, 148, 149, 02730 150, 151, 0, 0, 0, 0, 0, 152, 153, 154, 02731 155, 156, 157, 158, 159, 160, 233, 0, 161, 0, 02732 0, 0, 0, 0, 0, 0, 0, 0, 162, 163, 02733 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 02734 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 02735 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 02736 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 02737 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 02738 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 02739 190, 0, 0, 0, 0, 0, 0, 191, 118, 119, 02740 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 02741 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 02742 140, 141, 0, 0, 0, 142, 143, 144, 145, 146, 02743 147, 148, 149, 150, 151, 0, 0, 0, 0, 0, 02744 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, 02745 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 02746 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 02747 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 02748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02749 177, 178, 0, 0, 55, 0, 0, 0, 0, 0, 02750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02751 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 02752 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 02753 191, 118, 119, 120, 121, 122, 123, 124, 125, 126, 02754 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 02755 137, 138, 139, 140, 141, 0, 0, 0, 142, 143, 02756 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, 02757 0, 0, 0, 152, 153, 154, 155, 156, 157, 158, 02758 159, 160, 0, 0, 161, 0, 0, 0, 0, 0, 02759 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 02760 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 02761 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 02762 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 02763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02764 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 02765 185, 186, 187, 188, 0, 189, 190, 5, 6, 7, 02766 0, 9, 0, 191, 0, 10, 11, 0, 0, 0, 02767 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 02768 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 02769 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 02770 268, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02771 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02772 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02773 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02774 269, 0, 0, 203, 50, 0, 51, 52, 0, 0, 02775 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02776 62, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02777 9, 0, 0, 0, 10, 11, 0, 0, 0, 12, 02778 270, 13, 14, 15, 238, 239, 18, 19, 271, 0, 02779 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 02780 0, 0, 200, 0, 0, 0, 0, 0, 0, 268, 02781 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02782 40, 0, 41, 42, 0, 43, 44, 45, 0, 0, 02783 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02784 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 02785 0, 0, 203, 50, 0, 51, 52, 0, 0, 0, 02786 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02787 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 02788 0, 0, 0, 10, 11, 0, 0, 0, 12, 270, 02789 13, 14, 15, 16, 17, 18, 19, 518, 0, 0, 02790 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02791 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02792 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02793 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02794 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02795 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02796 0, 49, 50, 0, 51, 52, 0, 53, 0, 0, 02797 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02798 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02799 7, 0, 9, 0, 0, 0, 10, 11, 63, 64, 02800 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02801 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02802 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 02803 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02804 38, 39, 40, 201, 41, 42, 0, 43, 44, 45, 02805 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02807 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 02808 204, 205, 206, 54, 55, 56, 57, 58, 59, 60, 02809 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02810 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02811 11, 63, 207, 65, 12, 0, 13, 14, 15, 16, 02812 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02813 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02814 0, 0, 0, 28, 29, 0, 31, 32, 33, 34, 02815 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02816 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02817 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02818 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02819 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02820 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02821 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02822 0, 0, 10, 11, 63, 64, 65, 12, 0, 13, 02823 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 02824 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 02825 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02826 32, 33, 34, 35, 36, 37, 38, 39, 40, 201, 02827 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02828 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02829 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 02830 203, 50, 0, 51, 52, 0, 608, 205, 206, 54, 02831 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02832 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02833 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 02834 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 02835 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 02836 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 02837 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02838 39, 40, 201, 41, 42, 0, 43, 44, 45, 0, 02839 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02841 202, 0, 0, 203, 50, 0, 51, 52, 0, 204, 02842 205, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02843 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02844 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02845 63, 207, 65, 12, 0, 13, 14, 15, 238, 239, 02846 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 02847 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 02848 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02849 36, 37, 38, 39, 40, 201, 41, 42, 0, 43, 02850 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02852 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 02853 52, 0, 0, 205, 206, 54, 55, 56, 57, 58, 02854 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02855 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02856 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 02857 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 02858 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 02859 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02860 33, 34, 35, 36, 37, 38, 39, 40, 201, 41, 02861 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02862 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02863 0, 0, 0, 0, 0, 0, 202, 0, 0, 203, 02864 50, 0, 51, 52, 0, 608, 205, 0, 54, 55, 02865 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02866 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02867 9, 0, 0, 0, 10, 11, 63, 207, 65, 12, 02868 0, 13, 14, 15, 238, 239, 18, 19, 0, 0, 02869 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 02870 0, 0, 200, 0, 0, 0, 0, 0, 0, 29, 02871 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02872 40, 201, 41, 42, 0, 43, 44, 45, 0, 46, 02873 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02874 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 02875 0, 0, 203, 50, 0, 51, 52, 0, 0, 205, 02876 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02877 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02878 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 02879 207, 65, 12, 0, 13, 14, 15, 16, 17, 18, 02880 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02881 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 02882 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02883 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02884 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02885 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02886 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 02887 0, 512, 0, 0, 54, 55, 56, 57, 58, 59, 02888 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02889 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02890 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 02891 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 02892 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 02893 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02894 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02895 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02896 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02897 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 02898 0, 51, 52, 0, 204, 0, 0, 54, 55, 56, 02899 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02900 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02901 0, 0, 0, 10, 11, 63, 207, 65, 12, 0, 02902 13, 14, 15, 238, 239, 18, 19, 0, 0, 0, 02903 0, 0, 240, 241, 242, 23, 24, 25, 26, 0, 02904 0, 200, 0, 0, 0, 0, 0, 0, 29, 0, 02905 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02906 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02907 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02908 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 02909 0, 203, 50, 0, 51, 52, 0, 816, 0, 0, 02910 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02911 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02912 7, 0, 9, 0, 0, 0, 10, 11, 63, 207, 02913 65, 12, 0, 13, 14, 15, 238, 239, 18, 19, 02914 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 02915 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 02916 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02917 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02918 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02920 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 02921 512, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02922 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02923 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02924 11, 63, 207, 65, 12, 0, 13, 14, 15, 238, 02925 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 02926 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 02927 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02928 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02929 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02930 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02931 0, 0, 0, 0, 202, 0, 0, 203, 50, 0, 02932 51, 52, 0, 608, 0, 0, 54, 55, 56, 57, 02933 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02934 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02935 0, 0, 10, 11, 63, 207, 65, 12, 0, 13, 02936 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 02937 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 02938 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02939 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02940 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02942 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 02943 203, 50, 0, 51, 52, 0, 0, 0, 0, 54, 02944 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02945 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02946 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 02947 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02948 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02949 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, 02950 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02951 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02952 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02953 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02954 202, 0, 0, 203, 50, 0, 51, 52, 0, 0, 02955 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02956 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02957 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02958 63, 64, 65, 12, 0, 13, 14, 15, 16, 17, 02959 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02960 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 02961 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02962 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02963 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02965 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 02966 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 02967 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02968 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02969 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 02970 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 02971 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 02972 0, 0, 0, 0, 0, 0, 268, 0, 0, 32, 02973 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02974 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 02975 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02976 0, 0, 0, 0, 0, 0, 269, 0, 0, 323, 02977 50, 0, 51, 52, 0, 324, 0, 0, 54, 55, 02978 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02979 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02980 10, 11, 0, 0, 0, 12, 270, 13, 14, 15, 02981 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 02982 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 02983 0, 0, 0, 0, 0, 268, 0, 0, 32, 33, 02984 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02985 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 02986 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02987 0, 0, 0, 0, 0, 365, 0, 0, 49, 50, 02988 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02989 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02990 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02991 11, 0, 0, 0, 12, 270, 13, 14, 15, 238, 02992 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 02993 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 02994 0, 0, 0, 0, 268, 0, 0, 32, 33, 34, 02995 373, 36, 37, 38, 374, 40, 0, 41, 42, 0, 02996 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02997 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02998 0, 375, 0, 0, 376, 0, 0, 203, 50, 0, 02999 51, 52, 0, 0, 0, 0, 54, 55, 56, 57, 03000 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 03001 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 03002 0, 0, 0, 12, 270, 13, 14, 15, 238, 239, 03003 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 03004 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 03005 0, 0, 0, 268, 0, 0, 32, 33, 34, 373, 03006 36, 37, 38, 374, 40, 0, 41, 42, 0, 43, 03007 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 03008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03009 0, 0, 0, 376, 0, 0, 203, 50, 0, 51, 03010 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 03011 59, 60, 61, 62, 0, 0, 0, 0, 0, 5, 03012 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 03013 0, 0, 12, 270, 13, 14, 15, 238, 239, 18, 03014 19, 0, 0, 0, 0, 0, 240, 241, 242, 23, 03015 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 03016 0, 0, 268, 0, 0, 32, 33, 34, 35, 36, 03017 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 03018 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03020 0, 0, 269, 0, 0, 323, 50, 0, 51, 52, 03021 0, 0, 0, 0, 54, 55, 56, 57, 58, 59, 03022 60, 61, 62, 0, 0, 0, 0, 0, 5, 6, 03023 7, 0, 9, 0, 0, 0, 10, 11, 0, 0, 03024 0, 12, 270, 13, 14, 15, 238, 239, 18, 19, 03025 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 03026 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 03027 0, 268, 0, 0, 32, 33, 34, 35, 36, 37, 03028 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 03029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03031 0, 893, 0, 0, 203, 50, 0, 51, 52, 0, 03032 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 03033 61, 62, 0, 0, 0, 0, 0, 5, 6, 7, 03034 0, 9, 0, 0, 0, 10, 11, 0, 0, 0, 03035 12, 270, 13, 14, 15, 238, 239, 18, 19, 0, 03036 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 03037 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 03038 268, 0, 0, 32, 33, 34, 35, 36, 37, 38, 03039 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 03040 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03041 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03042 973, 0, 0, 203, 50, 0, 51, 52, 0, 0, 03043 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 03044 62, 0, 0, 0, 0, 0, 0, 553, 554, 0, 03045 0, 555, 0, 0, 0, 0, 0, 0, 0, 0, 03046 270, 162, 163, 164, 165, 166, 167, 168, 169, 170, 03047 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 03048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03049 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 03050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03051 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 03052 188, 0, 189, 190, 561, 562, 0, 0, 563, 0, 03053 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 03054 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 03055 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 03056 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 03057 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03058 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 03059 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 03060 190, 598, 562, 0, 0, 599, 0, 191, 0, 0, 03061 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 03062 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 03063 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 03064 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 03065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03066 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 03067 184, 185, 186, 187, 188, 0, 189, 190, 612, 554, 03068 0, 0, 613, 0, 191, 0, 0, 0, 0, 0, 03069 0, 0, 162, 163, 164, 165, 166, 167, 168, 169, 03070 170, 0, 0, 171, 172, 0, 0, 173, 174, 175, 03071 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03072 0, 177, 178, 0, 0, 0, 0, 0, 0, 0, 03073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03074 0, 0, 179, 180, 181, 182, 183, 184, 185, 186, 03075 187, 188, 0, 189, 190, 615, 562, 0, 0, 616, 03076 0, 191, 0, 0, 0, 0, 0, 0, 0, 162, 03077 163, 164, 165, 166, 167, 168, 169, 170, 0, 0, 03078 171, 172, 0, 0, 173, 174, 175, 176, 0, 0, 03079 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 03080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03081 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 03082 180, 181, 182, 183, 184, 185, 186, 187, 188, 0, 03083 189, 190, 639, 554, 0, 0, 640, 0, 191, 0, 03084 0, 0, 0, 0, 0, 0, 162, 163, 164, 165, 03085 166, 167, 168, 169, 170, 0, 0, 171, 172, 0, 03086 0, 173, 174, 175, 176, 0, 0, 0, 0, 0, 03087 0, 0, 0, 0, 0, 177, 178, 0, 0, 0, 03088 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03089 0, 0, 0, 0, 0, 0, 179, 180, 181, 182, 03090 183, 184, 185, 186, 187, 188, 0, 189, 190, 642, 03091 562, 0, 0, 643, 0, 191, 0, 0, 0, 0, 03092 0, 0, 0, 162, 163, 164, 165, 166, 167, 168, 03093 169, 170, 0, 0, 171, 172, 0, 0, 173, 174, 03094 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 03095 0, 0, 177, 178, 0, 0, 0, 0, 0, 0, 03096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03097 0, 0, 0, 179, 180, 181, 182, 183, 184, 185, 03098 186, 187, 188, 0, 189, 190, 727, 554, 0, 0, 03099 728, 0, 191, 0, 0, 0, 0, 0, 0, 0, 03100 162, 163, 164, 165, 166, 167, 168, 169, 170, 0, 03101 0, 171, 172, 0, 0, 173, 174, 175, 176, 0, 03102 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 03103 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03105 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 03106 0, 189, 190, 730, 562, 0, 0, 731, 0, 191, 03107 0, 0, 0, 0, 0, 0, 0, 162, 163, 164, 03108 165, 166, 167, 168, 169, 170, 0, 0, 171, 172, 03109 0, 0, 173, 174, 175, 176, 0, 0, 0, 0, 03110 0, 0, 0, 0, 0, 0, 177, 178, 0, 0, 03111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03112 0, 0, 0, 0, 0, 0, 0, 179, 180, 181, 03113 182, 183, 184, 185, 186, 187, 188, 0, 189, 190, 03114 737, 554, 0, 0, 738, 0, 191, 0, 0, 0, 03115 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 03116 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 03117 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 03118 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 03119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03120 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 03121 185, 186, 187, 188, 0, 189, 190, 1001, 554, 0, 03122 0, 1002, 0, 191, 0, 0, 0, 0, 0, 0, 03123 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 03124 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 03125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03126 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 03127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03128 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 03129 188, 0, 189, 190, 1036, 554, 0, 0, 1037, 0, 03130 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 03131 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 03132 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 03133 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 03134 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03135 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 03136 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 03137 190, 1039, 562, 0, 0, 1040, 0, 191, 0, 0, 03138 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 03139 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 03140 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 03141 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 03142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03143 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 03144 184, 185, 186, 187, 188, 0, 189, 190, 0, 0, 03145 0, 0, 0, 0, 191 03146 }; 03147 03148 #define yypact_value_is_default(yystate) \ 03149 ((yystate) == (-810)) 03150 03151 #define yytable_value_is_error(yytable_value) \ 03152 ((yytable_value) == (-620)) 03153 03154 static const yytype_int16 yycheck[] = 03155 { 03156 2, 55, 96, 16, 17, 8, 79, 20, 22, 64, 03157 354, 326, 16, 17, 8, 220, 20, 50, 27, 8, 03158 29, 472, 326, 28, 87, 28, 359, 90, 412, 353, 03159 4, 355, 420, 74, 28, 2, 420, 4, 53, 28, 03160 94, 668, 49, 90, 575, 594, 614, 51, 262, 51, 03161 52, 685, 266, 86, 87, 574, 67, 90, 440, 468, 03162 74, 55, 13, 651, 79, 786, 2, 376, 4, 49, 03163 458, 508, 416, 641, 511, 399, 91, 92, 93, 27, 03164 16, 17, 53, 776, 20, 874, 250, 472, 67, 778, 03165 87, 415, 715, 417, 16, 17, 719, 906, 20, 26, 03166 94, 872, 0, 37, 38, 13, 25, 230, 801, 518, 03167 25, 90, 26, 49, 50, 85, 113, 53, 25, 443, 03168 141, 61, 61, 13, 1, 85, 470, 85, 64, 85, 03169 16, 17, 255, 25, 20, 97, 259, 134, 902, 76, 03170 130, 85, 134, 79, 778, 596, 25, 471, 28, 141, 03171 86, 87, 786, 29, 90, 91, 92, 93, 120, 323, 03172 286, 729, 288, 133, 290, 51, 52, 938, 294, 25, 03173 110, 110, 740, 133, 25, 133, 132, 133, 805, 806, 03174 25, 118, 770, 771, 25, 136, 56, 736, 139, 133, 03175 141, 139, 13, 141, 140, 744, 203, 230, 271, 232, 03176 113, 990, 243, 130, 1013, 252, 657, 141, 897, 136, 03177 140, 224, 214, 226, 227, 134, 130, 136, 220, 134, 03178 224, 992, 226, 944, 429, 227, 134, 134, 13, 13, 03179 237, 139, 134, 141, 622, 111, 580, 621, 622, 1003, 03180 117, 252, 134, 250, 307, 308, 309, 310, 592, 139, 03181 632, 141, 85, 690, 1025, 134, 271, 581, 885, 268, 03182 949, 113, 139, 897, 141, 85, 321, 203, 902, 593, 03183 250, 326, 657, 252, 307, 308, 309, 310, 134, 312, 03184 313, 248, 591, 134, 872, 136, 874, 696, 224, 134, 03185 226, 227, 743, 134, 230, 87, 232, 360, 361, 422, 03186 133, 237, 224, 426, 226, 928, 37, 38, 431, 324, 03187 944, 87, 248, 133, 250, 362, 323, 321, 139, 1008, 03188 141, 113, 326, 68, 447, 113, 136, 360, 361, 452, 03189 100, 141, 306, 852, 87, 271, 963, 113, 224, 306, 03190 226, 354, 375, 323, 311, 61, 134, 402, 403, 65, 03191 938, 939, 354, 324, 139, 139, 141, 141, 743, 485, 03192 113, 355, 25, 61, 85, 140, 492, 61, 140, 1003, 03193 306, 307, 308, 309, 310, 311, 312, 313, 123, 124, 03194 125, 930, 697, 362, 139, 321, 141, 323, 324, 136, 03195 326, 107, 725, 109, 517, 468, 685, 928, 15, 378, 03196 17, 25, 990, 416, 992, 399, 611, 68, 85, 107, 03197 714, 109, 133, 107, 416, 109, 26, 85, 354, 134, 03198 356, 85, 636, 417, 360, 361, 428, 429, 85, 52, 03199 56, 26, 437, 56, 437, 87, 26, 1025, 440, 375, 03200 989, 113, 140, 437, 85, 518, 140, 134, 437, 443, 03201 113, 134, 88, 468, 85, 132, 133, 470, 141, 136, 03202 121, 122, 123, 124, 125, 133, 402, 403, 470, 133, 03203 1038, 134, 87, 440, 137, 85, 133, 471, 141, 867, 03204 416, 87, 87, 867, 935, 87, 134, 703, 134, 113, 03205 85, 132, 133, 141, 710, 85, 136, 786, 113, 61, 03206 789, 132, 133, 518, 440, 507, 508, 113, 61, 511, 03207 134, 113, 61, 137, 450, 136, 557, 141, 130, 134, 03208 130, 26, 132, 133, 565, 52, 412, 54, 55, 56, 03209 57, 68, 468, 542, 470, 130, 136, 132, 133, 137, 03210 130, 136, 132, 133, 558, 107, 136, 109, 110, 85, 03211 113, 560, 566, 138, 107, 760, 109, 110, 107, 600, 03212 109, 110, 595, 570, 637, 572, 568, 580, 670, 455, 03213 672, 131, 576, 85, 59, 60, 577, 87, 580, 592, 03214 85, 56, 518, 916, 87, 110, 600, 581, 87, 922, 03215 592, 87, 625, 85, 573, 574, 132, 133, 600, 593, 03216 605, 61, 605, 113, 134, 614, 110, 134, 587, 611, 03217 113, 605, 110, 902, 113, 904, 605, 113, 68, 742, 03218 132, 133, 637, 696, 134, 130, 110, 132, 133, 58, 03219 632, 136, 641, 68, 570, 134, 572, 61, 761, 68, 03220 132, 133, 697, 94, 580, 700, 701, 107, 685, 109, 03221 110, 774, 707, 708, 748, 944, 592, 946, 594, 595, 03222 85, 134, 951, 704, 666, 632, 668, 96, 97, 732, 03223 711, 17, 735, 1017, 59, 60, 685, 139, 87, 686, 03224 58, 696, 689, 107, 691, 109, 110, 56, 690, 625, 03225 68, 120, 746, 25, 1018, 137, 632, 85, 134, 732, 03226 134, 637, 735, 685, 113, 131, 134, 132, 133, 711, 03227 714, 130, 714, 715, 1003, 717, 1005, 719, 96, 97, 03228 729, 1010, 134, 724, 52, 134, 54, 55, 56, 57, 03229 85, 740, 14, 15, 140, 621, 859, 140, 1027, 134, 03230 741, 134, 120, 780, 132, 133, 85, 784, 871, 113, 03231 686, 134, 746, 689, 733, 691, 136, 10, 760, 1048, 03232 696, 697, 8, 85, 700, 701, 745, 776, 2, 13, 03233 4, 707, 708, 828, 85, 131, 85, 132, 133, 842, 03234 882, 883, 16, 17, 799, 887, 20, 889, 890, 113, 03235 134, 134, 801, 132, 133, 52, 732, 134, 780, 735, 03236 736, 134, 52, 805, 806, 134, 134, 814, 744, 842, 03237 132, 133, 52, 134, 115, 49, 50, 54, 55, 138, 03238 57, 132, 133, 132, 133, 15, 63, 64, 134, 87, 03239 64, 131, 839, 113, 118, 837, 134, 134, 840, 846, 03240 847, 134, 843, 850, 845, 52, 87, 54, 55, 56, 03241 57, 58, 86, 87, 855, 113, 90, 134, 134, 860, 03242 897, 68, 899, 799, 139, 902, 10, 904, 131, 10, 03243 877, 878, 113, 852, 134, 854, 134, 892, 814, 808, 03244 809, 9, 89, 885, 891, 88, 134, 134, 95, 96, 03245 97, 134, 828, 134, 996, 997, 998, 999, 54, 137, 03246 915, 134, 134, 839, 56, 118, 842, 63, 64, 131, 03247 846, 847, 919, 120, 850, 897, 123, 899, 134, 134, 03248 902, 10, 904, 131, 925, 926, 928, 52, 108, 54, 03249 55, 56, 57, 52, 141, 54, 55, 56, 57, 58, 03250 134, 877, 878, 134, 1046, 134, 134, 56, 52, 68, 03251 54, 55, 56, 57, 136, 891, 892, 134, 134, 134, 03252 969, 963, 136, 450, 89, 91, 1003, 711, 1005, 203, 03253 89, 1008, 979, 1010, 981, 93, 1020, 96, 97, 915, 03254 987, 770, 685, 919, 1013, 89, 749, 988, 1019, 99, 03255 224, 95, 226, 227, 930, 294, 230, 57, 232, 94, 03256 935, 120, 780, 237, 1017, 52, 899, 54, 55, 56, 03257 57, 1048, 897, 778, 248, 1017, 250, 1019, 1020, 396, 03258 1021, 1003, 1023, 1005, 1018, -1, 1008, -1, 1010, 1038, 03259 -1, 960, 961, -1, -1, 964, -1, 966, 967, -1, 03260 -1, -1, 89, 979, 68, 981, -1, -1, 95, -1, 03261 -1, 987, -1, 989, 68, -1, -1, -1, -1, 83, 03262 84, 40, 41, 42, 43, 44, 1048, -1, -1, 83, 03263 84, -1, 306, 307, 308, 309, 310, 311, 312, 313, 03264 52, 1017, 54, 55, 56, 57, -1, 321, -1, 323, 03265 -1, -1, 326, -1, 118, 119, 120, 121, 122, 123, 03266 124, 125, 1031, 1032, 1033, 1034, 120, 121, 122, 123, 03267 124, 125, -1, -1, -1, -1, -1, -1, -1, -1, 03268 354, -1, 356, -1, -1, 1054, 360, 361, -1, -1, 03269 -1, -1, -1, 52, -1, 54, 55, 56, 57, 58, 03270 -1, 375, -1, -1, -1, -1, -1, -1, 0, 68, 03271 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1, 03272 -1, 13, 14, 15, -1, 17, -1, -1, 402, 403, 03273 89, -1, -1, -1, 26, 27, 95, 96, 97, -1, 03274 -1, -1, 416, -1, -1, 37, 38, 68, 40, 41, 03275 42, 43, 44, -1, 52, -1, 54, 55, 56, 57, 03276 58, 120, 83, 84, 123, -1, 440, -1, -1, -1, 03277 68, -1, -1, -1, -1, -1, 450, 136, -1, -1, 03278 -1, -1, -1, -1, 16, 17, -1, -1, 20, -1, 03279 -1, 89, -1, 85, -1, -1, 470, 95, 96, 97, 03280 121, 122, 123, 124, 125, -1, -1, -1, -1, -1, 03281 -1, -1, -1, -1, 46, 47, 108, -1, -1, 51, 03282 52, -1, 120, -1, -1, 123, -1, -1, -1, -1, 03283 -1, -1, 64, 65, -1, 44, -1, -1, 130, 131, 03284 -1, 133, -1, -1, 136, 137, -1, 139, -1, 141, 03285 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 03286 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 03287 79, 80, -1, -1, 83, 84, -1, -1, -1, -1, 03288 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55, 03289 56, 57, 58, -1, -1, -1, 570, -1, 572, -1, 03290 -1, -1, 68, -1, -1, 114, 580, 116, 117, 118, 03291 119, 120, 121, 122, 123, 124, 125, -1, 592, -1, 03292 594, 595, -1, 89, -1, 134, -1, -1, -1, 95, 03293 96, 97, -1, 68, 69, 70, 71, 72, 73, 74, 03294 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03295 -1, 625, -1, -1, 120, -1, -1, 123, 632, -1, 03296 -1, -1, 2, -1, 4, -1, -1, -1, -1, 201, 03297 136, -1, 204, 205, 206, 207, -1, -1, 52, 114, 03298 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03299 125, -1, 224, -1, 226, 227, -1, -1, 52, -1, 03300 54, 55, 56, 57, 58, -1, 141, -1, -1, 49, 03301 -1, -1, 686, 53, 68, 689, -1, 691, -1, -1, 03302 -1, -1, -1, 697, -1, -1, 700, 701, -1, -1, 03303 -1, -1, -1, 707, 708, 89, -1, -1, -1, 79, 03304 -1, 95, 96, 97, -1, -1, -1, -1, -1, -1, 03305 -1, 91, 92, 93, 94, -1, -1, -1, 732, -1, 03306 -1, 735, 736, -1, -1, -1, 120, -1, -1, 123, 03307 744, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03308 -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 03309 -1, -1, -1, -1, 326, 327, 328, 329, 330, 331, 03310 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 03311 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 03312 352, -1, 354, -1, -1, -1, -1, 201, -1, -1, 03313 204, 205, 206, -1, -1, -1, -1, -1, -1, -1, 03314 814, -1, -1, -1, -1, 52, -1, 54, 55, 56, 03315 57, 58, -1, -1, 828, -1, -1, -1, -1, -1, 03316 -1, 68, -1, 203, -1, 839, -1, -1, 842, -1, 03317 402, 403, 846, 847, -1, -1, 850, -1, 410, 411, 03318 412, -1, 89, -1, 416, -1, 418, 419, 420, 96, 03319 97, -1, -1, -1, -1, -1, -1, 237, -1, -1, 03320 -1, -1, -1, 877, 878, -1, -1, 439, 248, -1, 03321 250, -1, 444, 120, -1, -1, -1, 891, -1, -1, 03322 -1, -1, -1, 455, -1, -1, 458, -1, -1, -1, 03323 -1, 271, -1, -1, -1, 2, -1, 4, 470, -1, 03324 -1, -1, -1, -1, -1, 919, -1, 321, -1, -1, 03325 -1, 2, 326, 4, -1, -1, 930, -1, -1, -1, 03326 -1, -1, -1, -1, 496, 497, 306, -1, -1, -1, 03327 -1, 311, -1, -1, -1, -1, -1, -1, -1, -1, 03328 512, -1, 49, 323, 324, -1, 53, -1, -1, -1, 03329 -1, -1, -1, -1, -1, -1, -1, -1, 49, -1, 03330 -1, -1, 53, -1, -1, 979, -1, 981, -1, -1, 03331 -1, -1, 79, 987, -1, 989, 356, -1, -1, -1, 03332 -1, -1, -1, -1, 91, 92, 93, 94, 79, -1, 03333 -1, -1, -1, -1, -1, -1, -1, 411, 412, -1, 03334 91, 92, 93, 1017, 576, -1, 420, -1, 580, -1, 03335 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03336 592, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03337 -1, -1, -1, -1, -1, -1, 608, -1, -1, -1, 03338 -1, 455, -1, -1, 458, -1, -1, -1, -1, 621, 03339 622, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03340 440, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03341 450, -1, -1, -1, -1, -1, -1, 649, -1, -1, 03342 -1, -1, -1, -1, -1, -1, -1, -1, 468, -1, 03343 -1, -1, -1, -1, -1, -1, 203, -1, 512, -1, 03344 -1, -1, -1, -1, 2, -1, 4, -1, -1, -1, 03345 -1, -1, 203, -1, -1, -1, -1, -1, -1, -1, 03346 2, 693, 4, -1, -1, 697, 698, -1, 700, 701, 03347 237, -1, -1, -1, -1, 707, 708, -1, 518, -1, 03348 -1, 248, 714, 250, -1, -1, 237, -1, -1, -1, 03349 -1, 49, -1, -1, -1, -1, -1, 248, -1, 250, 03350 -1, -1, 576, -1, 271, -1, -1, 49, -1, -1, 03351 -1, -1, -1, -1, -1, -1, -1, -1, -1, 751, 03352 271, -1, -1, 755, 756, -1, 758, 759, -1, -1, 03353 570, -1, 572, 91, 608, 767, -1, -1, -1, 306, 03354 -1, -1, -1, -1, 311, -1, -1, 621, 622, -1, 03355 -1, -1, -1, -1, 594, 306, 323, 324, -1, -1, 03356 311, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03357 -1, -1, 323, 324, -1, 649, -1, -1, -1, -1, 03358 -1, -1, -1, -1, 816, -1, -1, -1, 820, 356, 03359 -1, -1, 632, -1, -1, -1, 828, 637, -1, -1, 03360 -1, -1, -1, -1, -1, 356, -1, -1, -1, -1, 03361 -1, -1, -1, -1, -1, -1, -1, 849, -1, 693, 03362 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03363 -1, -1, -1, -1, 866, 867, -1, -1, -1, -1, 03364 714, -1, -1, -1, -1, 203, 686, -1, -1, 689, 03365 -1, 691, -1, -1, -1, -1, 696, -1, -1, -1, 03366 -1, 203, -1, -1, -1, -1, -1, -1, -1, -1, 03367 -1, -1, -1, 440, -1, -1, -1, -1, -1, 237, 03368 -1, -1, -1, 450, -1, -1, -1, -1, -1, 440, 03369 248, -1, 250, 767, -1, 237, 736, -1, -1, 450, 03370 -1, 468, -1, -1, 744, -1, 248, -1, 250, -1, 03371 -1, -1, -1, -1, -1, -1, -1, 468, -1, -1, 03372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03374 -1, -1, 816, -1, -1, -1, -1, -1, 306, -1, 03375 -1, 518, -1, 311, -1, -1, -1, -1, -1, 799, 03376 -1, -1, -1, -1, 306, 323, -1, 518, 326, 311, 03377 -1, -1, -1, -1, 814, 849, -1, -1, -1, -1, 03378 -1, 323, -1, -1, -1, 1017, -1, -1, -1, -1, 03379 -1, -1, -1, 867, -1, -1, -1, -1, 356, 839, 03380 -1, -1, -1, 570, -1, 572, 846, 847, -1, -1, 03381 850, -1, -1, -1, 356, -1, -1, -1, -1, 570, 03382 -1, 572, -1, -1, -1, -1, -1, 594, -1, -1, 03383 -1, -1, -1, -1, -1, -1, -1, 877, 878, -1, 03384 -1, -1, -1, 594, -1, -1, -1, -1, -1, -1, 03385 -1, 891, 892, -1, -1, -1, -1, -1, -1, -1, 03386 -1, -1, -1, -1, -1, 632, -1, -1, -1, -1, 03387 637, -1, -1, -1, -1, 915, -1, -1, -1, 919, 03388 -1, 632, 440, -1, -1, -1, 637, -1, -1, -1, 03389 930, -1, 450, -1, -1, -1, -1, -1, 440, -1, 03390 -1, -1, -1, -1, -1, -1, -1, -1, 450, -1, 03391 -1, -1, -1, -1, -1, -1, -1, -1, -1, 686, 03392 -1, -1, 689, -1, 691, 676, 44, -1, -1, 696, 03393 -1, -1, -1, -1, -1, 686, -1, -1, 689, 979, 03394 691, 981, -1, -1, -1, 696, -1, 987, -1, 989, 03395 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 03396 78, 79, 80, -1, -1, 83, 84, -1, -1, 736, 03397 -1, -1, -1, -1, -1, -1, -1, 744, -1, -1, 03398 -1, -1, -1, -1, -1, 736, -1, -1, -1, -1, 03399 -1, -1, -1, 744, -1, -1, 114, -1, 116, 117, 03400 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 03401 -1, -1, 570, -1, 572, -1, -1, -1, -1, -1, 03402 -1, -1, -1, -1, -1, -1, -1, -1, 570, -1, 03403 572, -1, 799, -1, -1, -1, 594, -1, -1, -1, 03404 -1, -1, -1, -1, -1, -1, -1, 814, 799, -1, 03405 -1, -1, 594, -1, -1, -1, -1, -1, -1, -1, 03406 -1, -1, -1, 814, -1, -1, -1, -1, -1, -1, 03407 -1, -1, 839, -1, 632, -1, -1, -1, -1, 846, 03408 847, -1, -1, 850, -1, -1, -1, -1, 839, -1, 03409 632, -1, -1, -1, -1, 846, 847, -1, -1, 850, 03410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03411 877, 878, -1, -1, -1, -1, -1, -1, -1, -1, 03412 -1, -1, -1, -1, 891, 892, 877, 878, 686, -1, 03413 -1, 689, -1, 691, -1, -1, -1, -1, -1, 697, 03414 891, 892, -1, -1, 686, -1, -1, 689, 915, 691, 03415 -1, -1, 919, -1, -1, -1, -1, -1, -1, -1, 03416 -1, -1, -1, 930, 915, -1, -1, -1, 919, -1, 03417 -1, -1, -1, -1, -1, -1, -1, -1, 736, 930, 03418 -1, -1, -1, -1, -1, -1, 744, -1, -1, -1, 03419 -1, -1, -1, -1, 736, 68, 69, 70, 71, 72, 03420 73, 74, 744, -1, 77, 78, -1, -1, -1, -1, 03421 83, 84, 979, -1, 981, -1, -1, -1, -1, -1, 03422 987, -1, 989, -1, -1, -1, -1, -1, 979, -1, 03423 981, -1, -1, -1, -1, -1, 987, -1, 989, -1, 03424 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 03425 123, 124, 125, -1, -1, -1, 814, -1, -1, -1, 03426 -1, 68, 69, 70, 71, 72, 73, 74, 75, -1, 03427 77, 78, 814, -1, -1, -1, 83, 84, -1, -1, 03428 -1, 839, -1, -1, -1, -1, -1, -1, 846, 847, 03429 -1, -1, 850, -1, -1, -1, -1, 839, -1, -1, 03430 -1, -1, -1, -1, 846, 847, -1, -1, 850, 116, 03431 117, 118, 119, 120, 121, 122, 123, 124, 125, 877, 03432 878, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03433 -1, -1, -1, 891, -1, 877, 878, -1, -1, -1, 03434 -1, -1, -1, -1, -1, -1, -1, -1, -1, 891, 03435 68, 69, 70, 71, 72, 73, 74, 915, -1, 77, 03436 78, 919, -1, -1, -1, 83, 84, -1, -1, -1, 03437 -1, -1, 930, -1, -1, -1, -1, 919, -1, -1, 03438 -1, -1, -1, -1, -1, -1, -1, -1, 930, -1, 03439 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 03440 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 03441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03442 -1, 979, -1, 981, -1, -1, -1, -1, -1, 987, 03443 -1, 989, -1, -1, -1, -1, -1, 979, -1, 981, 03444 -1, -1, -1, -1, -1, 987, -1, 989, 0, 1, 03445 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03446 12, -1, -1, -1, 16, -1, 18, 19, 20, 21, 03447 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03448 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03449 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03450 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03451 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03452 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03453 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03454 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03455 102, 103, 104, 105, 106, 0, -1, -1, -1, -1, 03456 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14, 03457 15, -1, 17, -1, 126, 127, 128, -1, 44, -1, 03458 -1, 26, 27, 28, 29, -1, -1, 139, -1, 141, 03459 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03460 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03461 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03462 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03463 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03464 85, -1, 87, 88, -1, -1, -1, -1, 114, 94, 03465 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 03466 -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, 03467 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03468 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03469 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 03470 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03471 -1, -1, -1, -1, -1, 25, -1, 27, 28, 29, 03472 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03473 40, 41, 42, 43, 44, -1, -1, 68, 69, 70, 03474 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 03475 -1, -1, 83, 84, -1, -1, -1, -1, 68, 69, 03476 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03477 80, -1, -1, 83, 84, 85, -1, 87, 88, -1, 03478 -1, -1, -1, 114, 94, 116, 117, 118, 119, 120, 03479 121, 122, 123, 124, 125, -1, -1, -1, 108, -1, 03480 -1, 111, -1, 113, 114, 115, 116, 117, 118, 119, 03481 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03482 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03483 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03484 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03485 25, -1, 27, 28, 29, -1, -1, -1, -1, -1, 03486 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03487 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03488 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03489 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03490 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03491 85, -1, 87, 88, -1, -1, -1, -1, -1, 94, 03492 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 03493 -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, 03494 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03495 125, -1, -1, -1, -1, -1, 131, 132, 133, 134, 03496 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 03497 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03498 -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 03499 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03500 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03502 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03503 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03504 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 03505 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03506 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03507 -1, 111, -1, -1, 114, 115, 116, 117, 118, 119, 03508 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03509 130, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03510 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03511 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03512 -1, 26, 27, 28, 29, -1, -1, -1, -1, -1, 03513 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03515 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03516 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03517 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03518 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03519 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03520 -1, -1, -1, 108, -1, -1, 111, -1, -1, 114, 03521 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03522 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03523 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 03524 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03525 -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 03526 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03527 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03529 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03530 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03531 80, -1, -1, 83, 84, 85, -1, 87, 88, -1, 03532 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03533 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03534 -1, 111, -1, 113, 114, 115, 116, 117, 118, 119, 03535 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03536 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03537 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03538 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03539 -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, 03540 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03541 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03542 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03543 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03544 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03545 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03546 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03547 -1, -1, -1, 108, -1, -1, -1, -1, -1, 114, 03548 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03549 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03550 0, 136, 137, 138, 139, -1, 141, -1, 8, 9, 03551 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03552 -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 03553 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03554 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03555 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03556 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03557 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03558 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 03559 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03560 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03561 -1, 111, -1, -1, 114, 115, 116, 117, 118, 119, 03562 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03563 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03564 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03565 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03566 -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, 03567 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03569 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03570 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03571 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03572 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03573 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03574 -1, -1, -1, 108, -1, -1, -1, -1, -1, 114, 03575 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03576 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03577 0, 136, 137, 138, 139, -1, 141, -1, 8, 9, 03578 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03579 -1, -1, -1, -1, -1, -1, -1, 27, 28, -1, 03580 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03581 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03583 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03584 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03585 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 03586 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03587 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03588 -1, -1, -1, -1, 114, -1, 116, 117, 118, 119, 03589 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03590 -1, 131, 132, 133, 134, 0, 136, 137, 138, 139, 03591 -1, 141, -1, 8, 9, 10, -1, -1, -1, 14, 03592 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03593 -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, 03594 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03595 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03597 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03598 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03599 85, -1, 87, -1, -1, -1, -1, -1, -1, -1, 03600 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03601 -1, -1, -1, 108, -1, -1, -1, -1, 113, 114, 03602 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03603 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03604 0, -1, 137, -1, 139, -1, 141, -1, 8, 9, 03605 10, -1, -1, -1, 14, 15, -1, 17, -1, -1, 03606 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03607 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03608 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03609 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03610 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03611 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03612 80, -1, -1, 83, 84, 85, -1, 87, -1, -1, 03613 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03614 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03615 -1, -1, -1, 113, 114, -1, 116, 117, 118, 119, 03616 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03617 -1, 131, 132, 133, 134, -1, -1, 137, -1, 139, 03618 1, 141, 3, 4, 5, 6, 7, 8, 9, 10, 03619 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03620 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03621 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03622 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03623 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03624 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03625 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03626 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03627 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 03628 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03630 -1, -1, -1, -1, -1, 126, 127, 128, -1, -1, 03631 -1, -1, -1, -1, -1, -1, -1, -1, 139, 1, 03632 141, 3, 4, 5, 6, 7, -1, -1, 10, 11, 03633 12, -1, 14, 15, 16, -1, 18, 19, 20, 21, 03634 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03635 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03636 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03637 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03638 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03639 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03640 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03641 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03642 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03643 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03644 -1, -1, -1, -1, 126, 127, 128, -1, -1, -1, 03645 -1, -1, -1, -1, -1, -1, -1, 139, 1, 141, 03646 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, 03647 -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, 03648 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03649 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03650 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03651 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03652 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03654 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03655 93, -1, 95, -1, -1, 98, 99, 100, 101, 102, 03656 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 03657 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03658 -1, -1, -1, 126, 127, 128, -1, -1, -1, -1, 03659 -1, -1, -1, -1, -1, -1, 139, 1, 141, 3, 03660 4, 5, 6, 7, -1, -1, 10, 11, 12, -1, 03661 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23, 03662 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03663 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03664 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03665 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03666 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03668 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03669 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 03670 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 03671 1, -1, 3, 4, 5, 6, 7, -1, 9, 10, 03672 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 03673 21, 22, 23, 24, -1, 139, -1, 141, -1, 30, 03674 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03675 -1, -1, -1, -1, 45, 46, 47, 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, -1, 98, 99, 100, 03681 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03682 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03683 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 03684 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 03685 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03686 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03687 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03688 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03689 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03690 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03691 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 03692 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03694 -1, -1, -1, -1, -1, -1, -1, -1, 126, 127, 03695 128, -1, -1, -1, -1, -1, -1, -1, -1, 137, 03696 -1, 139, 1, 141, 3, 4, 5, 6, 7, -1, 03697 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18, 03698 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03699 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03700 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03701 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03702 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03704 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03705 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03706 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03708 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 03709 -1, -1, -1, -1, -1, -1, -1, -1, 137, -1, 03710 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 03711 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03712 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03713 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03714 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 03715 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03716 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03717 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03718 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03719 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 03720 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03721 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03722 -1, -1, -1, -1, -1, -1, 126, 127, 128, -1, 03723 -1, 131, 1, -1, 3, 4, 5, 6, 7, 139, 03724 -1, 141, 11, 12, -1, -1, -1, 16, -1, 18, 03725 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03726 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03727 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03728 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03729 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03730 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03731 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03732 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03733 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03734 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03735 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 03736 -1, -1, 131, -1, -1, -1, -1, -1, -1, -1, 03737 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 03738 10, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03739 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03740 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03741 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 03742 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03743 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03744 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03745 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03746 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 03747 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03748 -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 03749 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 03750 -1, 18, 19, 20, 21, 22, 23, 24, -1, 139, 03751 -1, 141, -1, 30, 31, 32, 33, 34, 35, 36, 03752 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, 03753 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 03754 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03755 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03756 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03757 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03758 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03759 -1, 108, -1, -1, -1, -1, -1, -1, -1, 3, 03760 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 03761 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 03762 24, -1, 139, -1, 141, -1, 30, 31, 32, 33, 03763 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03764 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03765 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03766 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03767 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03768 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03769 -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 03770 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 03771 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03772 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 03773 21, 22, 23, 24, -1, -1, -1, 141, -1, 30, 03774 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03775 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03776 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03777 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03778 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03779 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03780 -1, 92, 93, -1, -1, -1, -1, 98, 99, 100, 03781 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03782 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03783 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 03784 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 03785 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03786 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03787 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03788 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03790 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03791 -1, 89, 90, -1, 92, 93, -1, -1, -1, -1, 03792 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03793 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03794 5, 6, 7, -1, -1, -1, 11, 12, 126, 127, 03795 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03796 -1, -1, -1, 141, -1, 30, 31, 32, 33, 34, 03797 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03798 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03799 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03800 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03802 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03803 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 03804 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03805 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03806 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 03807 22, 23, 24, -1, 139, -1, -1, -1, 30, 31, 03808 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03809 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03810 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03811 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03812 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03813 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03814 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03815 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03817 -1, -1, -1, -1, 126, 127, 128, -1, -1, -1, 03818 -1, -1, -1, -1, -1, -1, -1, 139, 3, 4, 03819 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03820 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03821 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03822 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03823 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03824 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, 03825 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03826 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03827 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03828 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 03829 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03830 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03831 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 03832 135, 136, 3, 4, 5, 6, 7, 8, 9, 10, 03833 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 03834 21, 22, 23, 24, 25, 26, -1, -1, -1, 30, 03835 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 03836 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03837 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, 03838 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 03839 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 03840 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 03841 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 03842 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03843 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 03844 121, 122, 123, 124, 125, -1, 127, 128, -1, -1, 03845 -1, -1, -1, -1, 135, 3, 4, 5, 6, 7, 03846 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 03847 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, 03848 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 03849 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03850 48, 49, 50, 51, 52, 53, 54, -1, 56, -1, 03851 -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 03852 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03853 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 03854 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 03855 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1, 03856 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 03857 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 03858 128, -1, -1, -1, -1, -1, -1, 135, 3, 4, 03859 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03860 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03861 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03862 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03863 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 03864 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03865 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03866 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03867 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03868 95, 96, -1, -1, 99, -1, -1, -1, -1, -1, 03869 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03870 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03871 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 03872 135, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03873 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03874 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03875 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03876 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03877 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 03878 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03879 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03880 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03881 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 03882 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03883 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 03884 122, 123, 124, 125, -1, 127, 128, 3, 4, 5, 03885 -1, 7, -1, 135, -1, 11, 12, -1, -1, -1, 03886 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03887 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03888 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03889 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03890 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03893 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 03894 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 03895 106, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03896 7, -1, -1, -1, 11, 12, -1, -1, -1, 16, 03897 126, 18, 19, 20, 21, 22, 23, 24, 134, -1, 03898 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03899 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03900 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03901 57, -1, 59, 60, -1, 62, 63, 64, -1, -1, 03902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03903 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03904 -1, -1, 89, 90, -1, 92, 93, -1, -1, -1, 03905 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03906 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 03907 -1, -1, -1, 11, 12, -1, -1, -1, 16, 126, 03908 18, 19, 20, 21, 22, 23, 24, 134, -1, -1, 03909 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03910 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03911 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03912 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03914 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03915 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 03916 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03917 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03918 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 03919 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03920 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03921 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03922 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03923 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03924 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03925 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03926 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03927 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 03928 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03929 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03930 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 03931 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03932 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03933 -1, -1, -1, 45, 46, -1, 48, 49, 50, 51, 03934 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03935 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03937 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03938 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03939 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03940 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03941 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 03942 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03943 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03944 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03945 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 03946 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03947 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03948 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03949 89, 90, -1, 92, 93, -1, 95, 96, 97, 98, 03950 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03951 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03952 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 03953 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03954 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03955 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03956 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03957 56, 57, 58, 59, 60, -1, 62, 63, 64, -1, 03958 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03959 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03960 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03961 96, -1, 98, 99, 100, 101, 102, 103, 104, 105, 03962 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03963 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03964 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 03965 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03966 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03967 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03968 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03969 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03970 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03971 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03972 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 03973 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 03974 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03975 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 03976 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03977 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03978 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03979 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03980 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03981 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03982 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03983 90, -1, 92, 93, -1, 95, 96, -1, 98, 99, 03984 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03985 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03986 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 03987 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03988 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03989 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03990 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03991 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03992 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03993 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03994 -1, -1, 89, 90, -1, 92, 93, -1, -1, 96, 03995 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03996 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03997 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 03998 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 03999 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04000 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04001 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04002 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04003 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 04004 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04005 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04006 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 04007 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 04008 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 04009 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 04010 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 04011 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 04012 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 04013 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 04014 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 04015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04016 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 04017 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 04018 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 04019 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 04020 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 04021 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 04022 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 04023 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 04024 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 04025 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 04026 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04027 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 04028 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 04029 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 04030 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 04031 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 04032 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 04033 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 04034 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 04035 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 04036 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 04037 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 04038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04039 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 04040 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 04041 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 04042 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 04043 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 04044 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 04045 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 04046 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 04047 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 04048 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 04049 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04050 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 04051 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 04052 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 04053 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04054 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 04055 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04056 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04057 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04058 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04059 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 04060 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04061 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04062 89, 90, -1, 92, 93, -1, -1, -1, -1, 98, 04063 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 04064 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 04065 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 04066 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 04067 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 04068 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 04069 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 04070 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 04071 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 04072 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04073 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 04074 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 04075 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04076 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04077 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 04078 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04079 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04080 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04081 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 04082 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 04083 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04084 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04085 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 04086 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 04087 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 04088 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 04089 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 04090 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 04091 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 04092 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 04093 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 04094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04095 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 04096 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 04097 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 04098 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 04099 11, 12, -1, -1, -1, 16, 126, 18, 19, 20, 04100 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 04101 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 04102 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 04103 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 04104 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 04105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04106 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 04107 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 04108 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 04109 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 04110 12, -1, -1, -1, 16, 126, 18, 19, 20, 21, 04111 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 04112 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 04113 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 04114 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 04115 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 04116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04117 -1, 83, -1, -1, 86, -1, -1, 89, 90, -1, 04118 92, 93, -1, -1, -1, -1, 98, 99, 100, 101, 04119 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 04120 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04121 -1, -1, -1, 16, 126, 18, 19, 20, 21, 22, 04122 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04123 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04124 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04125 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 04126 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, 04127 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04128 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04129 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 04130 103, 104, 105, 106, -1, -1, -1, -1, -1, 3, 04131 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04132 -1, -1, 16, 126, 18, 19, 20, 21, 22, 23, 04133 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04134 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04135 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04136 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04137 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04139 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04140 -1, -1, -1, -1, 98, 99, 100, 101, 102, 103, 04141 104, 105, 106, -1, -1, -1, -1, -1, 3, 4, 04142 5, -1, 7, -1, -1, -1, 11, 12, -1, -1, 04143 -1, 16, 126, 18, 19, 20, 21, 22, 23, 24, 04144 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 04145 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 04146 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 04147 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 04148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04149 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04150 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 04151 -1, -1, -1, 98, 99, 100, 101, 102, 103, 104, 04152 105, 106, -1, -1, -1, -1, -1, 3, 4, 5, 04153 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1, 04154 16, 126, 18, 19, 20, 21, 22, 23, 24, -1, 04155 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 04156 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 04157 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 04158 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 04159 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04161 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 04162 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 04163 106, -1, -1, -1, -1, -1, -1, 52, 53, -1, 04164 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 04165 126, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04166 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04168 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 04169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04170 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 04171 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 04172 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 04173 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04174 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04175 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 04176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04177 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 04178 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 04179 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 04180 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 04181 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04182 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04183 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 04184 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04185 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 04186 121, 122, 123, 124, 125, -1, 127, 128, 52, 53, 04187 -1, -1, 56, -1, 135, -1, -1, -1, -1, -1, 04188 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 04189 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04190 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04191 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 04192 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04193 -1, -1, 116, 117, 118, 119, 120, 121, 122, 123, 04194 124, 125, -1, 127, 128, 52, 53, -1, -1, 56, 04195 -1, 135, -1, -1, -1, -1, -1, -1, -1, 66, 04196 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04197 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04198 -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 04199 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04200 -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, 04201 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 04202 127, 128, 52, 53, -1, -1, 56, -1, 135, -1, 04203 -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, 04204 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04205 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04206 -1, -1, -1, -1, -1, 95, 96, -1, -1, -1, 04207 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04208 -1, -1, -1, -1, -1, -1, 116, 117, 118, 119, 04209 120, 121, 122, 123, 124, 125, -1, 127, 128, 52, 04210 53, -1, -1, 56, -1, 135, -1, -1, -1, -1, 04211 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 04212 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04213 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04214 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, 04215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04216 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 04217 123, 124, 125, -1, 127, 128, 52, 53, -1, -1, 04218 56, -1, 135, -1, -1, -1, -1, -1, -1, -1, 04219 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04220 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04221 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04222 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04224 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 04225 -1, 127, 128, 52, 53, -1, -1, 56, -1, 135, 04226 -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 04227 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04228 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04229 -1, -1, -1, -1, -1, -1, 95, 96, -1, -1, 04230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04231 -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 04232 119, 120, 121, 122, 123, 124, 125, -1, 127, 128, 04233 52, 53, -1, -1, 56, -1, 135, -1, -1, -1, 04234 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 04235 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04236 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04237 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 04238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04239 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 04240 122, 123, 124, 125, -1, 127, 128, 52, 53, -1, 04241 -1, 56, -1, 135, -1, -1, -1, -1, -1, -1, 04242 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04243 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04245 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 04246 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04247 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 04248 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 04249 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 04250 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04251 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04252 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 04253 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04254 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 04255 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 04256 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 04257 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 04258 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04259 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04260 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 04261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04262 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 04263 121, 122, 123, 124, 125, -1, 127, 128, -1, -1, 04264 -1, -1, -1, -1, 135 04265 }; 04266 04267 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04268 symbol of state STATE-NUM. */ 04269 static const yytype_uint16 yystos[] = 04270 { 04271 0, 143, 144, 0, 1, 3, 4, 5, 6, 7, 04272 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04273 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04274 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04275 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04276 90, 92, 93, 95, 98, 99, 100, 101, 102, 103, 04277 104, 105, 106, 126, 127, 128, 145, 146, 147, 154, 04278 156, 157, 159, 160, 163, 164, 165, 167, 168, 169, 04279 171, 172, 182, 196, 214, 215, 216, 217, 218, 219, 04280 220, 221, 222, 223, 224, 250, 251, 265, 266, 267, 04281 268, 269, 270, 271, 274, 276, 277, 289, 291, 292, 04282 293, 294, 295, 296, 297, 328, 339, 147, 3, 4, 04283 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 04284 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 04285 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 04286 38, 39, 45, 46, 47, 48, 49, 50, 51, 52, 04287 53, 56, 66, 67, 68, 69, 70, 71, 72, 73, 04288 74, 77, 78, 81, 82, 83, 84, 95, 96, 116, 04289 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 04290 128, 135, 175, 176, 177, 178, 180, 181, 289, 291, 04291 39, 58, 86, 89, 95, 96, 97, 127, 164, 172, 04292 182, 184, 189, 192, 194, 214, 293, 294, 296, 297, 04293 326, 327, 189, 189, 136, 190, 191, 136, 186, 190, 04294 136, 141, 333, 54, 177, 333, 148, 130, 21, 22, 04295 30, 31, 32, 163, 182, 214, 182, 56, 1, 47, 04296 89, 150, 151, 152, 154, 166, 167, 339, 157, 198, 04297 185, 194, 326, 339, 184, 325, 326, 339, 46, 86, 04298 126, 134, 171, 196, 214, 293, 294, 297, 242, 243, 04299 54, 55, 57, 175, 281, 290, 280, 281, 282, 140, 04300 272, 140, 278, 140, 275, 140, 279, 59, 60, 159, 04301 182, 182, 139, 141, 332, 337, 338, 40, 41, 42, 04302 43, 44, 37, 38, 26, 130, 186, 190, 256, 28, 04303 248, 113, 134, 89, 95, 168, 113, 68, 69, 70, 04304 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 04305 83, 84, 114, 116, 117, 118, 119, 120, 121, 122, 04306 123, 124, 125, 85, 132, 133, 197, 157, 158, 158, 04307 201, 203, 158, 332, 338, 86, 165, 172, 214, 230, 04308 293, 294, 297, 52, 56, 83, 86, 173, 174, 214, 04309 293, 294, 297, 174, 33, 34, 35, 36, 49, 50, 04310 51, 52, 56, 136, 175, 295, 323, 85, 133, 331, 04311 256, 268, 87, 87, 134, 184, 56, 184, 184, 184, 04312 113, 88, 134, 193, 339, 85, 132, 133, 87, 87, 04313 134, 193, 189, 333, 334, 189, 188, 189, 194, 326, 04314 339, 157, 334, 157, 54, 63, 64, 155, 136, 183, 04315 130, 150, 85, 133, 87, 154, 153, 166, 137, 332, 04316 338, 334, 199, 334, 138, 134, 141, 336, 134, 336, 04317 131, 336, 333, 56, 59, 60, 168, 170, 134, 85, 04318 132, 133, 244, 61, 107, 109, 110, 283, 110, 283, 04319 110, 65, 283, 110, 110, 273, 283, 110, 61, 110, 04320 110, 110, 273, 110, 61, 110, 68, 68, 139, 147, 04321 158, 158, 158, 158, 154, 157, 157, 258, 257, 94, 04322 161, 249, 95, 159, 184, 194, 195, 166, 134, 171, 04323 134, 156, 159, 172, 182, 184, 195, 182, 182, 182, 04324 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 04325 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 04326 182, 182, 182, 52, 53, 56, 180, 255, 329, 330, 04327 188, 52, 53, 56, 180, 254, 329, 149, 150, 13, 04328 226, 337, 226, 158, 158, 332, 17, 259, 56, 85, 04329 132, 133, 25, 157, 52, 56, 173, 1, 117, 298, 04330 337, 85, 132, 133, 210, 324, 211, 331, 52, 56, 04331 329, 159, 182, 159, 182, 179, 182, 184, 95, 184, 04332 192, 326, 52, 56, 188, 52, 56, 327, 334, 137, 04333 334, 134, 134, 334, 177, 200, 182, 145, 131, 329, 04334 329, 182, 130, 334, 152, 334, 326, 134, 170, 52, 04335 56, 188, 52, 56, 52, 54, 55, 56, 57, 58, 04336 68, 89, 95, 96, 97, 120, 123, 136, 246, 301, 04337 303, 304, 305, 306, 307, 308, 311, 312, 313, 314, 04338 317, 318, 319, 320, 321, 285, 284, 140, 283, 140, 04339 140, 140, 182, 182, 76, 118, 237, 238, 339, 237, 04340 162, 237, 184, 134, 334, 170, 134, 113, 44, 333, 04341 87, 87, 186, 190, 253, 333, 335, 87, 87, 186, 04342 190, 252, 10, 225, 8, 261, 339, 150, 13, 150, 04343 27, 227, 337, 227, 259, 194, 225, 52, 56, 188, 04344 52, 56, 205, 208, 337, 299, 207, 52, 56, 173, 04345 188, 149, 157, 136, 300, 303, 212, 186, 187, 190, 04346 339, 44, 177, 184, 193, 87, 87, 335, 87, 87, 04347 326, 157, 131, 145, 336, 168, 335, 113, 184, 52, 04348 89, 95, 231, 232, 233, 305, 303, 245, 134, 302, 04349 134, 322, 339, 52, 134, 322, 134, 302, 52, 134, 04350 302, 52, 286, 54, 55, 57, 288, 297, 52, 58, 04351 234, 236, 239, 307, 309, 310, 313, 315, 316, 319, 04352 321, 333, 150, 150, 237, 150, 95, 184, 170, 182, 04353 115, 159, 182, 159, 182, 161, 186, 138, 87, 159, 04354 182, 159, 182, 161, 187, 184, 195, 262, 339, 15, 04355 229, 339, 14, 228, 229, 229, 202, 204, 225, 134, 04356 226, 335, 158, 337, 158, 149, 335, 225, 334, 303, 04357 149, 337, 175, 256, 248, 182, 87, 134, 334, 131, 04358 184, 233, 134, 305, 134, 334, 239, 29, 111, 247, 04359 301, 306, 317, 319, 308, 313, 321, 307, 314, 319, 04360 307, 287, 113, 86, 214, 239, 118, 134, 235, 134, 04361 322, 322, 134, 235, 134, 235, 139, 10, 131, 150, 04362 10, 184, 182, 159, 182, 88, 263, 339, 150, 9, 04363 264, 339, 158, 225, 225, 150, 150, 184, 150, 227, 04364 209, 337, 225, 334, 225, 213, 334, 232, 134, 95, 04365 231, 137, 150, 150, 134, 302, 134, 302, 322, 134, 04366 302, 134, 302, 302, 150, 214, 56, 85, 118, 234, 04367 316, 319, 309, 313, 307, 315, 319, 307, 52, 240, 04368 241, 304, 131, 86, 172, 214, 293, 294, 297, 226, 04369 150, 226, 225, 225, 229, 259, 260, 206, 149, 300, 04370 134, 232, 134, 305, 10, 131, 307, 319, 307, 307, 04371 108, 52, 56, 134, 235, 134, 235, 322, 134, 235, 04372 134, 235, 235, 134, 333, 56, 85, 132, 133, 150, 04373 150, 150, 225, 149, 232, 134, 302, 134, 302, 302, 04374 302, 307, 319, 307, 307, 241, 52, 56, 188, 52, 04375 56, 261, 228, 225, 225, 232, 307, 235, 134, 235, 04376 235, 235, 335, 302, 307, 235 04377 }; 04378 04379 #define yyerrok (yyerrstatus = 0) 04380 #define yyclearin (yychar = YYEMPTY) 04381 #define YYEMPTY (-2) 04382 #define YYEOF 0 04383 04384 #define YYACCEPT goto yyacceptlab 04385 #define YYABORT goto yyabortlab 04386 #define YYERROR goto yyerrorlab 04387 04388 04389 /* Like YYERROR except do call yyerror. This remains here temporarily 04390 to ease the transition to the new meaning of YYERROR, for GCC. 04391 Once GCC version 2 has supplanted version 1, this can go. However, 04392 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 04393 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 04394 discussed. */ 04395 04396 #define YYFAIL goto yyerrlab 04397 #if defined YYFAIL 04398 /* This is here to suppress warnings from the GCC cpp's 04399 -Wunused-macros. Normally we don't worry about that warning, but 04400 some users do, and we want to make it easy for users to remove 04401 YYFAIL uses, which will produce warnings from Bison 2.5. */ 04402 #endif 04403 04404 #define YYRECOVERING() (!!yyerrstatus) 04405 04406 #define YYBACKUP(Token, Value) \ 04407 do \ 04408 if (yychar == YYEMPTY && yylen == 1) \ 04409 { \ 04410 yychar = (Token); \ 04411 yylval = (Value); \ 04412 YYPOPSTACK (1); \ 04413 goto yybackup; \ 04414 } \ 04415 else \ 04416 { \ 04417 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04418 YYERROR; \ 04419 } \ 04420 while (YYID (0)) 04421 04422 04423 #define YYTERROR 1 04424 #define YYERRCODE 256 04425 04426 04427 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04428 If N is 0, then set CURRENT to the empty location which ends 04429 the previous symbol: RHS[0] (always defined). */ 04430 04431 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04432 #ifndef YYLLOC_DEFAULT 04433 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04434 do \ 04435 if (YYID (N)) \ 04436 { \ 04437 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04438 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04439 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04440 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04441 } \ 04442 else \ 04443 { \ 04444 (Current).first_line = (Current).last_line = \ 04445 YYRHSLOC (Rhs, 0).last_line; \ 04446 (Current).first_column = (Current).last_column = \ 04447 YYRHSLOC (Rhs, 0).last_column; \ 04448 } \ 04449 while (YYID (0)) 04450 #endif 04451 04452 04453 /* This macro is provided for backward compatibility. */ 04454 04455 #ifndef YY_LOCATION_PRINT 04456 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04457 #endif 04458 04459 04460 /* YYLEX -- calling `yylex' with the right arguments. */ 04461 04462 #ifdef YYLEX_PARAM 04463 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04464 #else 04465 # define YYLEX yylex (&yylval, parser) 04466 #endif 04467 04468 /* Enable debugging if requested. */ 04469 #if YYDEBUG 04470 04471 # ifndef YYFPRINTF 04472 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04473 # define YYFPRINTF fprintf 04474 # endif 04475 04476 # define YYDPRINTF(Args) \ 04477 do { \ 04478 if (yydebug) \ 04479 YYFPRINTF Args; \ 04480 } while (YYID (0)) 04481 04482 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04483 do { \ 04484 if (yydebug) \ 04485 { \ 04486 YYFPRINTF (stderr, "%s ", Title); \ 04487 yy_symbol_print (stderr, \ 04488 Type, Value, parser); \ 04489 YYFPRINTF (stderr, "\n"); \ 04490 } \ 04491 } while (YYID (0)) 04492 04493 04494 /*--------------------------------. 04495 | Print this symbol on YYOUTPUT. | 04496 `--------------------------------*/ 04497 04498 /*ARGSUSED*/ 04499 #if (defined __STDC__ || defined __C99__FUNC__ \ 04500 || defined __cplusplus || defined _MSC_VER) 04501 static void 04502 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04503 #else 04504 static void 04505 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04506 FILE *yyoutput; 04507 int yytype; 04508 YYSTYPE const * const yyvaluep; 04509 struct parser_params *parser; 04510 #endif 04511 { 04512 if (!yyvaluep) 04513 return; 04514 YYUSE (parser); 04515 # ifdef YYPRINT 04516 if (yytype < YYNTOKENS) 04517 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04518 # else 04519 YYUSE (yyoutput); 04520 # endif 04521 switch (yytype) 04522 { 04523 default: 04524 break; 04525 } 04526 } 04527 04528 04529 /*--------------------------------. 04530 | Print this symbol on YYOUTPUT. | 04531 `--------------------------------*/ 04532 04533 #if (defined __STDC__ || defined __C99__FUNC__ \ 04534 || defined __cplusplus || defined _MSC_VER) 04535 static void 04536 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04537 #else 04538 static void 04539 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04540 FILE *yyoutput; 04541 int yytype; 04542 YYSTYPE const * const yyvaluep; 04543 struct parser_params *parser; 04544 #endif 04545 { 04546 if (yytype < YYNTOKENS) 04547 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04548 else 04549 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04550 04551 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04552 YYFPRINTF (yyoutput, ")"); 04553 } 04554 04555 /*------------------------------------------------------------------. 04556 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04557 | TOP (included). | 04558 `------------------------------------------------------------------*/ 04559 04560 #if (defined __STDC__ || defined __C99__FUNC__ \ 04561 || defined __cplusplus || defined _MSC_VER) 04562 static void 04563 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 04564 #else 04565 static void 04566 yy_stack_print (yybottom, yytop) 04567 yytype_int16 *yybottom; 04568 yytype_int16 *yytop; 04569 #endif 04570 { 04571 YYFPRINTF (stderr, "Stack now"); 04572 for (; yybottom <= yytop; yybottom++) 04573 { 04574 int yybot = *yybottom; 04575 YYFPRINTF (stderr, " %d", yybot); 04576 } 04577 YYFPRINTF (stderr, "\n"); 04578 } 04579 04580 # define YY_STACK_PRINT(Bottom, Top) \ 04581 do { \ 04582 if (yydebug) \ 04583 yy_stack_print ((Bottom), (Top)); \ 04584 } while (YYID (0)) 04585 04586 04587 /*------------------------------------------------. 04588 | Report that the YYRULE is going to be reduced. | 04589 `------------------------------------------------*/ 04590 04591 #if (defined __STDC__ || defined __C99__FUNC__ \ 04592 || defined __cplusplus || defined _MSC_VER) 04593 static void 04594 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04595 #else 04596 static void 04597 yy_reduce_print (yyvsp, yyrule, parser) 04598 YYSTYPE *yyvsp; 04599 int yyrule; 04600 struct parser_params *parser; 04601 #endif 04602 { 04603 int yynrhs = yyr2[yyrule]; 04604 int yyi; 04605 unsigned long int yylno = yyrline[yyrule]; 04606 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04607 yyrule - 1, yylno); 04608 /* The symbols being reduced. */ 04609 for (yyi = 0; yyi < yynrhs; yyi++) 04610 { 04611 YYFPRINTF (stderr, " $%d = ", yyi + 1); 04612 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04613 &(yyvsp[(yyi + 1) - (yynrhs)]) 04614 , parser); 04615 YYFPRINTF (stderr, "\n"); 04616 } 04617 } 04618 04619 # define YY_REDUCE_PRINT(Rule) \ 04620 do { \ 04621 if (yydebug) \ 04622 yy_reduce_print (yyvsp, Rule, parser); \ 04623 } while (YYID (0)) 04624 04625 /* Nonzero means print parse trace. It is left uninitialized so that 04626 multiple parsers can coexist. */ 04627 #ifndef yydebug 04628 int yydebug; 04629 #endif 04630 #else /* !YYDEBUG */ 04631 # define YYDPRINTF(Args) 04632 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04633 # define YY_STACK_PRINT(Bottom, Top) 04634 # define YY_REDUCE_PRINT(Rule) 04635 #endif /* !YYDEBUG */ 04636 04637 04638 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04639 #ifndef YYINITDEPTH 04640 # define YYINITDEPTH 200 04641 #endif 04642 04643 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04644 if the built-in stack extension method is used). 04645 04646 Do not make this value too large; the results are undefined if 04647 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04648 evaluated with infinite-precision integer arithmetic. */ 04649 04650 #ifndef YYMAXDEPTH 04651 # define YYMAXDEPTH 10000 04652 #endif 04653 04654 04655 #if YYERROR_VERBOSE 04656 04657 # ifndef yystrlen 04658 # if defined __GLIBC__ && defined _STRING_H 04659 # define yystrlen strlen 04660 # else 04661 /* Return the length of YYSTR. */ 04662 #if (defined __STDC__ || defined __C99__FUNC__ \ 04663 || defined __cplusplus || defined _MSC_VER) 04664 static YYSIZE_T 04665 yystrlen (const char *yystr) 04666 #else 04667 static YYSIZE_T 04668 yystrlen (yystr) 04669 const char *yystr; 04670 #endif 04671 { 04672 YYSIZE_T yylen; 04673 for (yylen = 0; yystr[yylen]; yylen++) 04674 continue; 04675 return yylen; 04676 } 04677 # endif 04678 # endif 04679 04680 # ifndef yystpcpy 04681 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04682 # define yystpcpy stpcpy 04683 # else 04684 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04685 YYDEST. */ 04686 #if (defined __STDC__ || defined __C99__FUNC__ \ 04687 || defined __cplusplus || defined _MSC_VER) 04688 static char * 04689 yystpcpy (char *yydest, const char *yysrc) 04690 #else 04691 static char * 04692 yystpcpy (yydest, yysrc) 04693 char *yydest; 04694 const char *yysrc; 04695 #endif 04696 { 04697 char *yyd = yydest; 04698 const char *yys = yysrc; 04699 04700 while ((*yyd++ = *yys++) != '\0') 04701 continue; 04702 04703 return yyd - 1; 04704 } 04705 # endif 04706 # endif 04707 04708 # ifndef yytnamerr 04709 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04710 quotes and backslashes, so that it's suitable for yyerror. The 04711 heuristic is that double-quoting is unnecessary unless the string 04712 contains an apostrophe, a comma, or backslash (other than 04713 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04714 null, do not copy; instead, return the length of what the result 04715 would have been. */ 04716 static YYSIZE_T 04717 yytnamerr (char *yyres, const char *yystr) 04718 { 04719 if (*yystr == '"') 04720 { 04721 YYSIZE_T yyn = 0; 04722 char const *yyp = yystr; 04723 04724 for (;;) 04725 switch (*++yyp) 04726 { 04727 case '\'': 04728 case ',': 04729 goto do_not_strip_quotes; 04730 04731 case '\\': 04732 if (*++yyp != '\\') 04733 goto do_not_strip_quotes; 04734 /* Fall through. */ 04735 default: 04736 if (yyres) 04737 yyres[yyn] = *yyp; 04738 yyn++; 04739 break; 04740 04741 case '"': 04742 if (yyres) 04743 yyres[yyn] = '\0'; 04744 return yyn; 04745 } 04746 do_not_strip_quotes: ; 04747 } 04748 04749 if (! yyres) 04750 return yystrlen (yystr); 04751 04752 return yystpcpy (yyres, yystr) - yyres; 04753 } 04754 # endif 04755 04756 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 04757 about the unexpected token YYTOKEN for the state stack whose top is 04758 YYSSP. 04759 04760 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 04761 not large enough to hold the message. In that case, also set 04762 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 04763 required number of bytes is too large to store. */ 04764 static int 04765 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 04766 yytype_int16 *yyssp, int yytoken) 04767 { 04768 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 04769 YYSIZE_T yysize = yysize0; 04770 YYSIZE_T yysize1; 04771 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04772 /* Internationalized format string. */ 04773 const char *yyformat = 0; 04774 /* Arguments of yyformat. */ 04775 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04776 /* Number of reported tokens (one for the "unexpected", one per 04777 "expected"). */ 04778 int yycount = 0; 04779 04780 /* There are many possibilities here to consider: 04781 - Assume YYFAIL is not used. It's too flawed to consider. See 04782 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 04783 for details. YYERROR is fine as it does not invoke this 04784 function. 04785 - If this state is a consistent state with a default action, then 04786 the only way this function was invoked is if the default action 04787 is an error action. In that case, don't check for expected 04788 tokens because there are none. 04789 - The only way there can be no lookahead present (in yychar) is if 04790 this state is a consistent state with a default action. Thus, 04791 detecting the absence of a lookahead is sufficient to determine 04792 that there is no unexpected or expected token to report. In that 04793 case, just report a simple "syntax error". 04794 - Don't assume there isn't a lookahead just because this state is a 04795 consistent state with a default action. There might have been a 04796 previous inconsistent state, consistent state with a non-default 04797 action, or user semantic action that manipulated yychar. 04798 - Of course, the expected token list depends on states to have 04799 correct lookahead information, and it depends on the parser not 04800 to perform extra reductions after fetching a lookahead from the 04801 scanner and before detecting a syntax error. Thus, state merging 04802 (from LALR or IELR) and default reductions corrupt the expected 04803 token list. However, the list is correct for canonical LR with 04804 one exception: it will still contain any token that will not be 04805 accepted due to an error action in a later state. 04806 */ 04807 if (yytoken != YYEMPTY) 04808 { 04809 int yyn = yypact[*yyssp]; 04810 yyarg[yycount++] = yytname[yytoken]; 04811 if (!yypact_value_is_default (yyn)) 04812 { 04813 /* Start YYX at -YYN if negative to avoid negative indexes in 04814 YYCHECK. In other words, skip the first -YYN actions for 04815 this state because they are default actions. */ 04816 int yyxbegin = yyn < 0 ? -yyn : 0; 04817 /* Stay within bounds of both yycheck and yytname. */ 04818 int yychecklim = YYLAST - yyn + 1; 04819 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04820 int yyx; 04821 04822 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04823 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 04824 && !yytable_value_is_error (yytable[yyx + yyn])) 04825 { 04826 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04827 { 04828 yycount = 1; 04829 yysize = yysize0; 04830 break; 04831 } 04832 yyarg[yycount++] = yytname[yyx]; 04833 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04834 if (! (yysize <= yysize1 04835 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04836 return 2; 04837 yysize = yysize1; 04838 } 04839 } 04840 } 04841 04842 switch (yycount) 04843 { 04844 # define YYCASE_(N, S) \ 04845 case N: \ 04846 yyformat = S; \ 04847 break 04848 YYCASE_(0, YY_("syntax error")); 04849 YYCASE_(1, YY_("syntax error, unexpected %s")); 04850 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 04851 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 04852 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 04853 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 04854 # undef YYCASE_ 04855 } 04856 04857 yysize1 = yysize + yystrlen (yyformat); 04858 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04859 return 2; 04860 yysize = yysize1; 04861 04862 if (*yymsg_alloc < yysize) 04863 { 04864 *yymsg_alloc = 2 * yysize; 04865 if (! (yysize <= *yymsg_alloc 04866 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 04867 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 04868 return 1; 04869 } 04870 04871 /* Avoid sprintf, as that infringes on the user's name space. 04872 Don't have undefined behavior even if the translation 04873 produced a string with the wrong number of "%s"s. */ 04874 { 04875 char *yyp = *yymsg; 04876 int yyi = 0; 04877 while ((*yyp = *yyformat) != '\0') 04878 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 04879 { 04880 yyp += yytnamerr (yyp, yyarg[yyi++]); 04881 yyformat += 2; 04882 } 04883 else 04884 { 04885 yyp++; 04886 yyformat++; 04887 } 04888 } 04889 return 0; 04890 } 04891 #endif /* YYERROR_VERBOSE */ 04892 04893 /*-----------------------------------------------. 04894 | Release the memory associated to this symbol. | 04895 `-----------------------------------------------*/ 04896 04897 /*ARGSUSED*/ 04898 #if (defined __STDC__ || defined __C99__FUNC__ \ 04899 || defined __cplusplus || defined _MSC_VER) 04900 static void 04901 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04902 #else 04903 static void 04904 yydestruct (yymsg, yytype, yyvaluep, parser) 04905 const char *yymsg; 04906 int yytype; 04907 YYSTYPE *yyvaluep; 04908 struct parser_params *parser; 04909 #endif 04910 { 04911 YYUSE (yyvaluep); 04912 YYUSE (parser); 04913 04914 if (!yymsg) 04915 yymsg = "Deleting"; 04916 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04917 04918 switch (yytype) 04919 { 04920 04921 default: 04922 break; 04923 } 04924 } 04925 04926 04927 /* Prevent warnings from -Wmissing-prototypes. */ 04928 #ifdef YYPARSE_PARAM 04929 #if defined __STDC__ || defined __cplusplus 04930 int yyparse (void *YYPARSE_PARAM); 04931 #else 04932 int yyparse (); 04933 #endif 04934 #else /* ! YYPARSE_PARAM */ 04935 #if defined __STDC__ || defined __cplusplus 04936 int yyparse (struct parser_params *parser); 04937 #else 04938 int yyparse (); 04939 #endif 04940 #endif /* ! YYPARSE_PARAM */ 04941 04942 04943 /*----------. 04944 | yyparse. | 04945 `----------*/ 04946 04947 #ifdef YYPARSE_PARAM 04948 #if (defined __STDC__ || defined __C99__FUNC__ \ 04949 || defined __cplusplus || defined _MSC_VER) 04950 int 04951 yyparse (void *YYPARSE_PARAM) 04952 #else 04953 int 04954 yyparse (YYPARSE_PARAM) 04955 void *YYPARSE_PARAM; 04956 #endif 04957 #else /* ! YYPARSE_PARAM */ 04958 #if (defined __STDC__ || defined __C99__FUNC__ \ 04959 || defined __cplusplus || defined _MSC_VER) 04960 int 04961 yyparse (struct parser_params *parser) 04962 #else 04963 int 04964 yyparse (parser) 04965 struct parser_params *parser; 04966 #endif 04967 #endif 04968 { 04969 /* The lookahead symbol. */ 04970 int yychar; 04971 04972 /* The semantic value of the lookahead symbol. */ 04973 YYSTYPE yylval; 04974 04975 /* Number of syntax errors so far. */ 04976 int yynerrs; 04977 04978 int yystate; 04979 /* Number of tokens to shift before error messages enabled. */ 04980 int yyerrstatus; 04981 04982 /* The stacks and their tools: 04983 `yyss': related to states. 04984 `yyvs': related to semantic values. 04985 04986 Refer to the stacks thru separate pointers, to allow yyoverflow 04987 to reallocate them elsewhere. */ 04988 04989 /* The state stack. */ 04990 yytype_int16 yyssa[YYINITDEPTH]; 04991 yytype_int16 *yyss; 04992 yytype_int16 *yyssp; 04993 04994 /* The semantic value stack. */ 04995 YYSTYPE yyvsa[YYINITDEPTH]; 04996 YYSTYPE *yyvs; 04997 YYSTYPE *yyvsp; 04998 04999 YYSIZE_T yystacksize; 05000 05001 int yyn; 05002 int yyresult; 05003 /* Lookahead token as an internal (translated) token number. */ 05004 int yytoken; 05005 /* The variables used to return semantic value and location from the 05006 action routines. */ 05007 YYSTYPE yyval; 05008 05009 #if YYERROR_VERBOSE 05010 /* Buffer for error messages, and its allocated size. */ 05011 char yymsgbuf[128]; 05012 char *yymsg = yymsgbuf; 05013 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 05014 #endif 05015 05016 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 05017 05018 /* The number of symbols on the RHS of the reduced rule. 05019 Keep to zero when no symbol should be popped. */ 05020 int yylen = 0; 05021 05022 yytoken = 0; 05023 yyss = yyssa; 05024 yyvs = yyvsa; 05025 yystacksize = YYINITDEPTH; 05026 05027 YYDPRINTF ((stderr, "Starting parse\n")); 05028 05029 yystate = 0; 05030 yyerrstatus = 0; 05031 yynerrs = 0; 05032 yychar = YYEMPTY; /* Cause a token to be read. */ 05033 05034 /* Initialize stack pointers. 05035 Waste one element of value and location stack 05036 so that they stay on the same level as the state stack. 05037 The wasted elements are never initialized. */ 05038 yyssp = yyss; 05039 yyvsp = yyvs; 05040 05041 goto yysetstate; 05042 05043 /*------------------------------------------------------------. 05044 | yynewstate -- Push a new state, which is found in yystate. | 05045 `------------------------------------------------------------*/ 05046 yynewstate: 05047 /* In all cases, when you get here, the value and location stacks 05048 have just been pushed. So pushing a state here evens the stacks. */ 05049 yyssp++; 05050 05051 yysetstate: 05052 *yyssp = yystate; 05053 05054 if (yyss + yystacksize - 1 <= yyssp) 05055 { 05056 /* Get the current used size of the three stacks, in elements. */ 05057 YYSIZE_T yysize = yyssp - yyss + 1; 05058 05059 #ifdef yyoverflow 05060 { 05061 /* Give user a chance to reallocate the stack. Use copies of 05062 these so that the &'s don't force the real ones into 05063 memory. */ 05064 YYSTYPE *yyvs1 = yyvs; 05065 yytype_int16 *yyss1 = yyss; 05066 05067 /* Each stack pointer address is followed by the size of the 05068 data in use in that stack, in bytes. This used to be a 05069 conditional around just the two extra args, but that might 05070 be undefined if yyoverflow is a macro. */ 05071 yyoverflow (YY_("memory exhausted"), 05072 &yyss1, yysize * sizeof (*yyssp), 05073 &yyvs1, yysize * sizeof (*yyvsp), 05074 &yystacksize); 05075 05076 yyss = yyss1; 05077 yyvs = yyvs1; 05078 } 05079 #else /* no yyoverflow */ 05080 # ifndef YYSTACK_RELOCATE 05081 goto yyexhaustedlab; 05082 # else 05083 /* Extend the stack our own way. */ 05084 if (YYMAXDEPTH <= yystacksize) 05085 goto yyexhaustedlab; 05086 yystacksize *= 2; 05087 if (YYMAXDEPTH < yystacksize) 05088 yystacksize = YYMAXDEPTH; 05089 05090 { 05091 yytype_int16 *yyss1 = yyss; 05092 union yyalloc *yyptr = 05093 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 05094 if (! yyptr) 05095 goto yyexhaustedlab; 05096 YYSTACK_RELOCATE (yyss_alloc, yyss); 05097 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 05098 # undef YYSTACK_RELOCATE 05099 if (yyss1 != yyssa) 05100 YYSTACK_FREE (yyss1); 05101 } 05102 # endif 05103 #endif /* no yyoverflow */ 05104 05105 yyssp = yyss + yysize - 1; 05106 yyvsp = yyvs + yysize - 1; 05107 05108 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 05109 (unsigned long int) yystacksize)); 05110 05111 if (yyss + yystacksize - 1 <= yyssp) 05112 YYABORT; 05113 } 05114 05115 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 05116 05117 if (yystate == YYFINAL) 05118 YYACCEPT; 05119 05120 goto yybackup; 05121 05122 /*-----------. 05123 | yybackup. | 05124 `-----------*/ 05125 yybackup: 05126 05127 /* Do appropriate processing given the current state. Read a 05128 lookahead token if we need one and don't already have one. */ 05129 05130 /* First try to decide what to do without reference to lookahead token. */ 05131 yyn = yypact[yystate]; 05132 if (yypact_value_is_default (yyn)) 05133 goto yydefault; 05134 05135 /* Not known => get a lookahead token if don't already have one. */ 05136 05137 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 05138 if (yychar == YYEMPTY) 05139 { 05140 YYDPRINTF ((stderr, "Reading a token: ")); 05141 yychar = YYLEX; 05142 } 05143 05144 if (yychar <= YYEOF) 05145 { 05146 yychar = yytoken = YYEOF; 05147 YYDPRINTF ((stderr, "Now at end of input.\n")); 05148 } 05149 else 05150 { 05151 yytoken = YYTRANSLATE (yychar); 05152 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 05153 } 05154 05155 /* If the proper action on seeing token YYTOKEN is to reduce or to 05156 detect an error, take that action. */ 05157 yyn += yytoken; 05158 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 05159 goto yydefault; 05160 yyn = yytable[yyn]; 05161 if (yyn <= 0) 05162 { 05163 if (yytable_value_is_error (yyn)) 05164 goto yyerrlab; 05165 yyn = -yyn; 05166 goto yyreduce; 05167 } 05168 05169 /* Count tokens shifted since error; after three, turn off error 05170 status. */ 05171 if (yyerrstatus) 05172 yyerrstatus--; 05173 05174 /* Shift the lookahead token. */ 05175 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 05176 05177 /* Discard the shifted token. */ 05178 yychar = YYEMPTY; 05179 05180 yystate = yyn; 05181 *++yyvsp = yylval; 05182 05183 goto yynewstate; 05184 05185 05186 /*-----------------------------------------------------------. 05187 | yydefault -- do the default action for the current state. | 05188 `-----------------------------------------------------------*/ 05189 yydefault: 05190 yyn = yydefact[yystate]; 05191 if (yyn == 0) 05192 goto yyerrlab; 05193 goto yyreduce; 05194 05195 05196 /*-----------------------------. 05197 | yyreduce -- Do a reduction. | 05198 `-----------------------------*/ 05199 yyreduce: 05200 /* yyn is the number of a rule to reduce with. */ 05201 yylen = yyr2[yyn]; 05202 05203 /* If YYLEN is nonzero, implement the default value of the action: 05204 `$$ = $1'. 05205 05206 Otherwise, the following line sets YYVAL to garbage. 05207 This behavior is undocumented and Bison 05208 users should not rely upon it. Assigning to YYVAL 05209 unconditionally makes the parser a bit smaller, and it avoids a 05210 GCC warning that YYVAL may be used uninitialized. */ 05211 yyval = yyvsp[1-yylen]; 05212 05213 05214 YY_REDUCE_PRINT (yyn); 05215 switch (yyn) 05216 { 05217 case 2: 05218 05219 /* Line 1806 of yacc.c */ 05220 #line 855 "parse.y" 05221 { 05222 lex_state = EXPR_BEG; 05223 /*%%%*/ 05224 local_push(compile_for_eval || rb_parse_in_main()); 05225 /*% 05226 local_push(0); 05227 %*/ 05228 } 05229 break; 05230 05231 case 3: 05232 05233 /* Line 1806 of yacc.c */ 05234 #line 864 "parse.y" 05235 { 05236 /*%%%*/ 05237 if ((yyvsp[(2) - (2)].node) && !compile_for_eval) { 05238 /* last expression should not be void */ 05239 if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node)); 05240 else { 05241 NODE *node = (yyvsp[(2) - (2)].node); 05242 while (node->nd_next) { 05243 node = node->nd_next; 05244 } 05245 void_expr(node->nd_head); 05246 } 05247 } 05248 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node))); 05249 /*% 05250 $$ = $2; 05251 parser->result = dispatch1(program, $$); 05252 %*/ 05253 local_pop(); 05254 } 05255 break; 05256 05257 case 4: 05258 05259 /* Line 1806 of yacc.c */ 05260 #line 887 "parse.y" 05261 { 05262 /*%%%*/ 05263 void_stmts((yyvsp[(1) - (2)].node)); 05264 fixup_nodes(&deferred_nodes); 05265 /*% 05266 %*/ 05267 (yyval.node) = (yyvsp[(1) - (2)].node); 05268 } 05269 break; 05270 05271 case 5: 05272 05273 /* Line 1806 of yacc.c */ 05274 #line 898 "parse.y" 05275 { 05276 /*%%%*/ 05277 (yyval.node) = NEW_BEGIN(0); 05278 /*% 05279 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05280 dispatch0(void_stmt)); 05281 %*/ 05282 } 05283 break; 05284 05285 case 6: 05286 05287 /* Line 1806 of yacc.c */ 05288 #line 907 "parse.y" 05289 { 05290 /*%%%*/ 05291 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05292 /*% 05293 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05294 %*/ 05295 } 05296 break; 05297 05298 case 7: 05299 05300 /* Line 1806 of yacc.c */ 05301 #line 915 "parse.y" 05302 { 05303 /*%%%*/ 05304 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05305 /*% 05306 $$ = dispatch2(stmts_add, $1, $3); 05307 %*/ 05308 } 05309 break; 05310 05311 case 8: 05312 05313 /* Line 1806 of yacc.c */ 05314 #line 923 "parse.y" 05315 { 05316 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05317 } 05318 break; 05319 05320 case 10: 05321 05322 /* Line 1806 of yacc.c */ 05323 #line 930 "parse.y" 05324 { 05325 /*%%%*/ 05326 /* local_push(0); */ 05327 /*% 05328 %*/ 05329 } 05330 break; 05331 05332 case 11: 05333 05334 /* Line 1806 of yacc.c */ 05335 #line 937 "parse.y" 05336 { 05337 /*%%%*/ 05338 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05339 (yyvsp[(4) - (5)].node)); 05340 /* NEW_PREEXE($4)); */ 05341 /* local_pop(); */ 05342 (yyval.node) = NEW_BEGIN(0); 05343 /*% 05344 $$ = dispatch1(BEGIN, $4); 05345 %*/ 05346 } 05347 break; 05348 05349 case 12: 05350 05351 /* Line 1806 of yacc.c */ 05352 #line 954 "parse.y" 05353 { 05354 /*%%%*/ 05355 (yyval.node) = (yyvsp[(1) - (4)].node); 05356 if ((yyvsp[(2) - (4)].node)) { 05357 (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node)); 05358 } 05359 else if ((yyvsp[(3) - (4)].node)) { 05360 rb_warn0("else without rescue is useless"); 05361 (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node)); 05362 } 05363 if ((yyvsp[(4) - (4)].node)) { 05364 if ((yyval.node)) { 05365 (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node)); 05366 } 05367 else { 05368 (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL()); 05369 } 05370 } 05371 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05372 /*% 05373 $$ = dispatch4(bodystmt, 05374 escape_Qundef($1), 05375 escape_Qundef($2), 05376 escape_Qundef($3), 05377 escape_Qundef($4)); 05378 %*/ 05379 } 05380 break; 05381 05382 case 13: 05383 05384 /* Line 1806 of yacc.c */ 05385 #line 984 "parse.y" 05386 { 05387 /*%%%*/ 05388 void_stmts((yyvsp[(1) - (2)].node)); 05389 fixup_nodes(&deferred_nodes); 05390 /*% 05391 %*/ 05392 (yyval.node) = (yyvsp[(1) - (2)].node); 05393 } 05394 break; 05395 05396 case 14: 05397 05398 /* Line 1806 of yacc.c */ 05399 #line 995 "parse.y" 05400 { 05401 /*%%%*/ 05402 (yyval.node) = NEW_BEGIN(0); 05403 /*% 05404 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05405 dispatch0(void_stmt)); 05406 %*/ 05407 } 05408 break; 05409 05410 case 15: 05411 05412 /* Line 1806 of yacc.c */ 05413 #line 1004 "parse.y" 05414 { 05415 /*%%%*/ 05416 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05417 /*% 05418 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05419 %*/ 05420 } 05421 break; 05422 05423 case 16: 05424 05425 /* Line 1806 of yacc.c */ 05426 #line 1012 "parse.y" 05427 { 05428 /*%%%*/ 05429 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05430 /*% 05431 $$ = dispatch2(stmts_add, $1, $3); 05432 %*/ 05433 } 05434 break; 05435 05436 case 17: 05437 05438 /* Line 1806 of yacc.c */ 05439 #line 1020 "parse.y" 05440 { 05441 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05442 } 05443 break; 05444 05445 case 18: 05446 05447 /* Line 1806 of yacc.c */ 05448 #line 1026 "parse.y" 05449 { 05450 (yyval.node) = (yyvsp[(1) - (1)].node); 05451 } 05452 break; 05453 05454 case 19: 05455 05456 /* Line 1806 of yacc.c */ 05457 #line 1030 "parse.y" 05458 { 05459 yyerror("BEGIN is permitted only at toplevel"); 05460 /*%%%*/ 05461 /* local_push(0); */ 05462 /*% 05463 %*/ 05464 } 05465 break; 05466 05467 case 20: 05468 05469 /* Line 1806 of yacc.c */ 05470 #line 1038 "parse.y" 05471 { 05472 /*%%%*/ 05473 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05474 (yyvsp[(4) - (5)].node)); 05475 /* NEW_PREEXE($4)); */ 05476 /* local_pop(); */ 05477 (yyval.node) = NEW_BEGIN(0); 05478 /*% 05479 $$ = dispatch1(BEGIN, $4); 05480 %*/ 05481 } 05482 break; 05483 05484 case 21: 05485 05486 /* Line 1806 of yacc.c */ 05487 #line 1050 "parse.y" 05488 {lex_state = EXPR_FNAME;} 05489 break; 05490 05491 case 22: 05492 05493 /* Line 1806 of yacc.c */ 05494 #line 1051 "parse.y" 05495 { 05496 /*%%%*/ 05497 (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); 05498 /*% 05499 $$ = dispatch2(alias, $2, $4); 05500 %*/ 05501 } 05502 break; 05503 05504 case 23: 05505 05506 /* Line 1806 of yacc.c */ 05507 #line 1059 "parse.y" 05508 { 05509 /*%%%*/ 05510 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id)); 05511 /*% 05512 $$ = dispatch2(var_alias, $2, $3); 05513 %*/ 05514 } 05515 break; 05516 05517 case 24: 05518 05519 /* Line 1806 of yacc.c */ 05520 #line 1067 "parse.y" 05521 { 05522 /*%%%*/ 05523 char buf[2]; 05524 buf[0] = '$'; 05525 buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth; 05526 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2)); 05527 /*% 05528 $$ = dispatch2(var_alias, $2, $3); 05529 %*/ 05530 } 05531 break; 05532 05533 case 25: 05534 05535 /* Line 1806 of yacc.c */ 05536 #line 1078 "parse.y" 05537 { 05538 /*%%%*/ 05539 yyerror("can't make alias for the number variables"); 05540 (yyval.node) = NEW_BEGIN(0); 05541 /*% 05542 $$ = dispatch2(var_alias, $2, $3); 05543 $$ = dispatch1(alias_error, $$); 05544 %*/ 05545 } 05546 break; 05547 05548 case 26: 05549 05550 /* Line 1806 of yacc.c */ 05551 #line 1088 "parse.y" 05552 { 05553 /*%%%*/ 05554 (yyval.node) = (yyvsp[(2) - (2)].node); 05555 /*% 05556 $$ = dispatch1(undef, $2); 05557 %*/ 05558 } 05559 break; 05560 05561 case 27: 05562 05563 /* Line 1806 of yacc.c */ 05564 #line 1096 "parse.y" 05565 { 05566 /*%%%*/ 05567 (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05568 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05569 /*% 05570 $$ = dispatch2(if_mod, $3, $1); 05571 %*/ 05572 } 05573 break; 05574 05575 case 28: 05576 05577 /* Line 1806 of yacc.c */ 05578 #line 1105 "parse.y" 05579 { 05580 /*%%%*/ 05581 (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05582 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05583 /*% 05584 $$ = dispatch2(unless_mod, $3, $1); 05585 %*/ 05586 } 05587 break; 05588 05589 case 29: 05590 05591 /* Line 1806 of yacc.c */ 05592 #line 1114 "parse.y" 05593 { 05594 /*%%%*/ 05595 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05596 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05597 } 05598 else { 05599 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05600 } 05601 /*% 05602 $$ = dispatch2(while_mod, $3, $1); 05603 %*/ 05604 } 05605 break; 05606 05607 case 30: 05608 05609 /* Line 1806 of yacc.c */ 05610 #line 1127 "parse.y" 05611 { 05612 /*%%%*/ 05613 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05614 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05615 } 05616 else { 05617 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05618 } 05619 /*% 05620 $$ = dispatch2(until_mod, $3, $1); 05621 %*/ 05622 } 05623 break; 05624 05625 case 31: 05626 05627 /* Line 1806 of yacc.c */ 05628 #line 1140 "parse.y" 05629 { 05630 /*%%%*/ 05631 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0); 05632 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0); 05633 /*% 05634 $$ = dispatch2(rescue_mod, $1, $3); 05635 %*/ 05636 } 05637 break; 05638 05639 case 32: 05640 05641 /* Line 1806 of yacc.c */ 05642 #line 1149 "parse.y" 05643 { 05644 if (in_def || in_single) { 05645 rb_warn0("END in method; use at_exit"); 05646 } 05647 /*%%%*/ 05648 (yyval.node) = NEW_POSTEXE(NEW_NODE( 05649 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */)); 05650 /*% 05651 $$ = dispatch1(END, $3); 05652 %*/ 05653 } 05654 break; 05655 05656 case 34: 05657 05658 /* Line 1806 of yacc.c */ 05659 #line 1162 "parse.y" 05660 { 05661 /*%%%*/ 05662 value_expr((yyvsp[(3) - (3)].node)); 05663 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05664 (yyval.node) = (yyvsp[(1) - (3)].node); 05665 /*% 05666 $$ = dispatch2(massign, $1, $3); 05667 %*/ 05668 } 05669 break; 05670 05671 case 35: 05672 05673 /* Line 1806 of yacc.c */ 05674 #line 1172 "parse.y" 05675 { 05676 value_expr((yyvsp[(3) - (3)].node)); 05677 (yyval.node) = new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node)); 05678 } 05679 break; 05680 05681 case 36: 05682 05683 /* Line 1806 of yacc.c */ 05684 #line 1177 "parse.y" 05685 { 05686 /*%%%*/ 05687 NODE *args; 05688 05689 value_expr((yyvsp[(6) - (6)].node)); 05690 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 05691 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 05692 if ((yyvsp[(5) - (6)].id) == tOROP) { 05693 (yyvsp[(5) - (6)].id) = 0; 05694 } 05695 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 05696 (yyvsp[(5) - (6)].id) = 1; 05697 } 05698 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 05699 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 05700 /*% 05701 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 05702 $$ = dispatch3(opassign, $$, $5, $6); 05703 %*/ 05704 } 05705 break; 05706 05707 case 37: 05708 05709 /* Line 1806 of yacc.c */ 05710 #line 1198 "parse.y" 05711 { 05712 value_expr((yyvsp[(5) - (5)].node)); 05713 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05714 } 05715 break; 05716 05717 case 38: 05718 05719 /* Line 1806 of yacc.c */ 05720 #line 1203 "parse.y" 05721 { 05722 value_expr((yyvsp[(5) - (5)].node)); 05723 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05724 } 05725 break; 05726 05727 case 39: 05728 05729 /* Line 1806 of yacc.c */ 05730 #line 1208 "parse.y" 05731 { 05732 /*%%%*/ 05733 (yyval.node) = NEW_COLON2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id)); 05734 (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05735 /*% 05736 $$ = dispatch2(const_path_field, $1, $3); 05737 $$ = dispatch3(opassign, $$, $4, $5); 05738 %*/ 05739 } 05740 break; 05741 05742 case 40: 05743 05744 /* Line 1806 of yacc.c */ 05745 #line 1218 "parse.y" 05746 { 05747 value_expr((yyvsp[(5) - (5)].node)); 05748 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_intern("::"), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05749 } 05750 break; 05751 05752 case 41: 05753 05754 /* Line 1806 of yacc.c */ 05755 #line 1223 "parse.y" 05756 { 05757 /*%%%*/ 05758 rb_backref_error((yyvsp[(1) - (3)].node)); 05759 (yyval.node) = NEW_BEGIN(0); 05760 /*% 05761 $$ = dispatch2(assign, dispatch1(var_field, $1), $3); 05762 $$ = dispatch1(assign_error, $$); 05763 %*/ 05764 } 05765 break; 05766 05767 case 42: 05768 05769 /* Line 1806 of yacc.c */ 05770 #line 1233 "parse.y" 05771 { 05772 /*%%%*/ 05773 value_expr((yyvsp[(3) - (3)].node)); 05774 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05775 /*% 05776 $$ = dispatch2(assign, $1, $3); 05777 %*/ 05778 } 05779 break; 05780 05781 case 43: 05782 05783 /* Line 1806 of yacc.c */ 05784 #line 1242 "parse.y" 05785 { 05786 /*%%%*/ 05787 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05788 (yyval.node) = (yyvsp[(1) - (3)].node); 05789 /*% 05790 $$ = dispatch2(massign, $1, $3); 05791 %*/ 05792 } 05793 break; 05794 05795 case 44: 05796 05797 /* Line 1806 of yacc.c */ 05798 #line 1251 "parse.y" 05799 { 05800 /*%%%*/ 05801 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05802 (yyval.node) = (yyvsp[(1) - (3)].node); 05803 /*% 05804 $$ = dispatch2(massign, $1, $3); 05805 %*/ 05806 } 05807 break; 05808 05809 case 46: 05810 05811 /* Line 1806 of yacc.c */ 05812 #line 1263 "parse.y" 05813 { 05814 /*%%%*/ 05815 value_expr((yyvsp[(3) - (3)].node)); 05816 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05817 /*% 05818 $$ = dispatch2(assign, $1, $3); 05819 %*/ 05820 } 05821 break; 05822 05823 case 47: 05824 05825 /* Line 1806 of yacc.c */ 05826 #line 1272 "parse.y" 05827 { 05828 /*%%%*/ 05829 value_expr((yyvsp[(3) - (3)].node)); 05830 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05831 /*% 05832 $$ = dispatch2(assign, $1, $3); 05833 %*/ 05834 } 05835 break; 05836 05837 case 49: 05838 05839 /* Line 1806 of yacc.c */ 05840 #line 1285 "parse.y" 05841 { 05842 /*%%%*/ 05843 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05844 /*% 05845 $$ = dispatch3(binary, $1, ripper_intern("and"), $3); 05846 %*/ 05847 } 05848 break; 05849 05850 case 50: 05851 05852 /* Line 1806 of yacc.c */ 05853 #line 1293 "parse.y" 05854 { 05855 /*%%%*/ 05856 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05857 /*% 05858 $$ = dispatch3(binary, $1, ripper_intern("or"), $3); 05859 %*/ 05860 } 05861 break; 05862 05863 case 51: 05864 05865 /* Line 1806 of yacc.c */ 05866 #line 1301 "parse.y" 05867 { 05868 /*%%%*/ 05869 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!'); 05870 /*% 05871 $$ = dispatch2(unary, ripper_intern("not"), $3); 05872 %*/ 05873 } 05874 break; 05875 05876 case 52: 05877 05878 /* Line 1806 of yacc.c */ 05879 #line 1309 "parse.y" 05880 { 05881 /*%%%*/ 05882 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 05883 /*% 05884 $$ = dispatch2(unary, ripper_id2sym('!'), $2); 05885 %*/ 05886 } 05887 break; 05888 05889 case 54: 05890 05891 /* Line 1806 of yacc.c */ 05892 #line 1320 "parse.y" 05893 { 05894 /*%%%*/ 05895 value_expr((yyvsp[(1) - (1)].node)); 05896 (yyval.node) = (yyvsp[(1) - (1)].node); 05897 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 05898 /*% 05899 $$ = $1; 05900 %*/ 05901 } 05902 break; 05903 05904 case 58: 05905 05906 /* Line 1806 of yacc.c */ 05907 #line 1337 "parse.y" 05908 { 05909 /*%%%*/ 05910 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05911 /*% 05912 $$ = dispatch3(call, $1, $2, $3); 05913 $$ = method_arg($$, $4); 05914 %*/ 05915 } 05916 break; 05917 05918 case 59: 05919 05920 /* Line 1806 of yacc.c */ 05921 #line 1348 "parse.y" 05922 { 05923 (yyvsp[(1) - (1)].vars) = dyna_push(); 05924 /*%%%*/ 05925 (yyval.num) = ruby_sourceline; 05926 /*% 05927 %*/ 05928 } 05929 break; 05930 05931 case 60: 05932 05933 /* Line 1806 of yacc.c */ 05934 #line 1358 "parse.y" 05935 { 05936 /*%%%*/ 05937 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 05938 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 05939 /*% 05940 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 05941 %*/ 05942 dyna_pop((yyvsp[(1) - (5)].vars)); 05943 } 05944 break; 05945 05946 case 61: 05947 05948 /* Line 1806 of yacc.c */ 05949 #line 1370 "parse.y" 05950 { 05951 /*%%%*/ 05952 (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); 05953 nd_set_line((yyval.node), tokline); 05954 /*% 05955 %*/ 05956 } 05957 break; 05958 05959 case 62: 05960 05961 /* Line 1806 of yacc.c */ 05962 #line 1380 "parse.y" 05963 { 05964 /*%%%*/ 05965 (yyval.node) = (yyvsp[(1) - (2)].node); 05966 (yyval.node)->nd_args = (yyvsp[(2) - (2)].node); 05967 /*% 05968 $$ = dispatch2(command, $1, $2); 05969 %*/ 05970 } 05971 break; 05972 05973 case 63: 05974 05975 /* Line 1806 of yacc.c */ 05976 #line 1389 "parse.y" 05977 { 05978 /*%%%*/ 05979 block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)); 05980 (yyvsp[(1) - (3)].node)->nd_args = (yyvsp[(2) - (3)].node); 05981 (yyvsp[(3) - (3)].node)->nd_iter = (yyvsp[(1) - (3)].node); 05982 (yyval.node) = (yyvsp[(3) - (3)].node); 05983 fixpos((yyval.node), (yyvsp[(1) - (3)].node)); 05984 /*% 05985 $$ = dispatch2(command, $1, $2); 05986 $$ = method_add_block($$, $3); 05987 %*/ 05988 } 05989 break; 05990 05991 case 64: 05992 05993 /* Line 1806 of yacc.c */ 05994 #line 1402 "parse.y" 05995 { 05996 /*%%%*/ 05997 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05998 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05999 /*% 06000 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 06001 %*/ 06002 } 06003 break; 06004 06005 case 65: 06006 06007 /* Line 1806 of yacc.c */ 06008 #line 1411 "parse.y" 06009 { 06010 /*%%%*/ 06011 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 06012 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 06013 (yyval.node) = (yyvsp[(5) - (5)].node); 06014 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06015 /*% 06016 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 06017 $$ = method_add_block($$, $5); 06018 %*/ 06019 } 06020 break; 06021 06022 case 66: 06023 06024 /* Line 1806 of yacc.c */ 06025 #line 1423 "parse.y" 06026 { 06027 /*%%%*/ 06028 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 06029 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 06030 /*% 06031 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 06032 %*/ 06033 } 06034 break; 06035 06036 case 67: 06037 06038 /* Line 1806 of yacc.c */ 06039 #line 1432 "parse.y" 06040 { 06041 /*%%%*/ 06042 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 06043 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 06044 (yyval.node) = (yyvsp[(5) - (5)].node); 06045 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06046 /*% 06047 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 06048 $$ = method_add_block($$, $5); 06049 %*/ 06050 } 06051 break; 06052 06053 case 68: 06054 06055 /* Line 1806 of yacc.c */ 06056 #line 1444 "parse.y" 06057 { 06058 /*%%%*/ 06059 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 06060 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 06061 /*% 06062 $$ = dispatch1(super, $2); 06063 %*/ 06064 } 06065 break; 06066 06067 case 69: 06068 06069 /* Line 1806 of yacc.c */ 06070 #line 1453 "parse.y" 06071 { 06072 /*%%%*/ 06073 (yyval.node) = new_yield((yyvsp[(2) - (2)].node)); 06074 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 06075 /*% 06076 $$ = dispatch1(yield, $2); 06077 %*/ 06078 } 06079 break; 06080 06081 case 70: 06082 06083 /* Line 1806 of yacc.c */ 06084 #line 1462 "parse.y" 06085 { 06086 /*%%%*/ 06087 (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node))); 06088 /*% 06089 $$ = dispatch1(return, $2); 06090 %*/ 06091 } 06092 break; 06093 06094 case 71: 06095 06096 /* Line 1806 of yacc.c */ 06097 #line 1470 "parse.y" 06098 { 06099 /*%%%*/ 06100 (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node))); 06101 /*% 06102 $$ = dispatch1(break, $2); 06103 %*/ 06104 } 06105 break; 06106 06107 case 72: 06108 06109 /* Line 1806 of yacc.c */ 06110 #line 1478 "parse.y" 06111 { 06112 /*%%%*/ 06113 (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node))); 06114 /*% 06115 $$ = dispatch1(next, $2); 06116 %*/ 06117 } 06118 break; 06119 06120 case 74: 06121 06122 /* Line 1806 of yacc.c */ 06123 #line 1489 "parse.y" 06124 { 06125 /*%%%*/ 06126 (yyval.node) = (yyvsp[(2) - (3)].node); 06127 /*% 06128 $$ = dispatch1(mlhs_paren, $2); 06129 %*/ 06130 } 06131 break; 06132 06133 case 76: 06134 06135 /* Line 1806 of yacc.c */ 06136 #line 1500 "parse.y" 06137 { 06138 /*%%%*/ 06139 (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0); 06140 /*% 06141 $$ = dispatch1(mlhs_paren, $2); 06142 %*/ 06143 } 06144 break; 06145 06146 case 77: 06147 06148 /* Line 1806 of yacc.c */ 06149 #line 1510 "parse.y" 06150 { 06151 /*%%%*/ 06152 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 06153 /*% 06154 $$ = $1; 06155 %*/ 06156 } 06157 break; 06158 06159 case 78: 06160 06161 /* Line 1806 of yacc.c */ 06162 #line 1518 "parse.y" 06163 { 06164 /*%%%*/ 06165 (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0); 06166 /*% 06167 $$ = mlhs_add($1, $2); 06168 %*/ 06169 } 06170 break; 06171 06172 case 79: 06173 06174 /* Line 1806 of yacc.c */ 06175 #line 1526 "parse.y" 06176 { 06177 /*%%%*/ 06178 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06179 /*% 06180 $$ = mlhs_add_star($1, $3); 06181 %*/ 06182 } 06183 break; 06184 06185 case 80: 06186 06187 /* Line 1806 of yacc.c */ 06188 #line 1534 "parse.y" 06189 { 06190 /*%%%*/ 06191 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node))); 06192 /*% 06193 $1 = mlhs_add_star($1, $3); 06194 $$ = mlhs_add($1, $5); 06195 %*/ 06196 } 06197 break; 06198 06199 case 81: 06200 06201 /* Line 1806 of yacc.c */ 06202 #line 1543 "parse.y" 06203 { 06204 /*%%%*/ 06205 (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1); 06206 /*% 06207 $$ = mlhs_add_star($1, Qnil); 06208 %*/ 06209 } 06210 break; 06211 06212 case 82: 06213 06214 /* Line 1806 of yacc.c */ 06215 #line 1551 "parse.y" 06216 { 06217 /*%%%*/ 06218 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node))); 06219 /*% 06220 $1 = mlhs_add_star($1, Qnil); 06221 $$ = mlhs_add($1, $4); 06222 %*/ 06223 } 06224 break; 06225 06226 case 83: 06227 06228 /* Line 1806 of yacc.c */ 06229 #line 1560 "parse.y" 06230 { 06231 /*%%%*/ 06232 (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); 06233 /*% 06234 $$ = mlhs_add_star(mlhs_new(), $2); 06235 %*/ 06236 } 06237 break; 06238 06239 case 84: 06240 06241 /* Line 1806 of yacc.c */ 06242 #line 1568 "parse.y" 06243 { 06244 /*%%%*/ 06245 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node))); 06246 /*% 06247 $2 = mlhs_add_star(mlhs_new(), $2); 06248 $$ = mlhs_add($2, $4); 06249 %*/ 06250 } 06251 break; 06252 06253 case 85: 06254 06255 /* Line 1806 of yacc.c */ 06256 #line 1577 "parse.y" 06257 { 06258 /*%%%*/ 06259 (yyval.node) = NEW_MASGN(0, -1); 06260 /*% 06261 $$ = mlhs_add_star(mlhs_new(), Qnil); 06262 %*/ 06263 } 06264 break; 06265 06266 case 86: 06267 06268 /* Line 1806 of yacc.c */ 06269 #line 1585 "parse.y" 06270 { 06271 /*%%%*/ 06272 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 06273 /*% 06274 $$ = mlhs_add_star(mlhs_new(), Qnil); 06275 $$ = mlhs_add($$, $3); 06276 %*/ 06277 } 06278 break; 06279 06280 case 88: 06281 06282 /* Line 1806 of yacc.c */ 06283 #line 1597 "parse.y" 06284 { 06285 /*%%%*/ 06286 (yyval.node) = (yyvsp[(2) - (3)].node); 06287 /*% 06288 $$ = dispatch1(mlhs_paren, $2); 06289 %*/ 06290 } 06291 break; 06292 06293 case 89: 06294 06295 /* Line 1806 of yacc.c */ 06296 #line 1607 "parse.y" 06297 { 06298 /*%%%*/ 06299 (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); 06300 /*% 06301 $$ = mlhs_add(mlhs_new(), $1); 06302 %*/ 06303 } 06304 break; 06305 06306 case 90: 06307 06308 /* Line 1806 of yacc.c */ 06309 #line 1615 "parse.y" 06310 { 06311 /*%%%*/ 06312 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 06313 /*% 06314 $$ = mlhs_add($1, $2); 06315 %*/ 06316 } 06317 break; 06318 06319 case 91: 06320 06321 /* Line 1806 of yacc.c */ 06322 #line 1625 "parse.y" 06323 { 06324 /*%%%*/ 06325 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 06326 /*% 06327 $$ = mlhs_add(mlhs_new(), $1); 06328 %*/ 06329 } 06330 break; 06331 06332 case 92: 06333 06334 /* Line 1806 of yacc.c */ 06335 #line 1633 "parse.y" 06336 { 06337 /*%%%*/ 06338 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06339 /*% 06340 $$ = mlhs_add($1, $3); 06341 %*/ 06342 } 06343 break; 06344 06345 case 93: 06346 06347 /* Line 1806 of yacc.c */ 06348 #line 1643 "parse.y" 06349 { 06350 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06351 } 06352 break; 06353 06354 case 94: 06355 06356 /* Line 1806 of yacc.c */ 06357 #line 1647 "parse.y" 06358 { 06359 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06360 } 06361 break; 06362 06363 case 95: 06364 06365 /* Line 1806 of yacc.c */ 06366 #line 1651 "parse.y" 06367 { 06368 /*%%%*/ 06369 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06370 /*% 06371 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06372 %*/ 06373 } 06374 break; 06375 06376 case 96: 06377 06378 /* Line 1806 of yacc.c */ 06379 #line 1659 "parse.y" 06380 { 06381 /*%%%*/ 06382 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06383 /*% 06384 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06385 %*/ 06386 } 06387 break; 06388 06389 case 97: 06390 06391 /* Line 1806 of yacc.c */ 06392 #line 1667 "parse.y" 06393 { 06394 /*%%%*/ 06395 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06396 /*% 06397 $$ = dispatch2(const_path_field, $1, $3); 06398 %*/ 06399 } 06400 break; 06401 06402 case 98: 06403 06404 /* Line 1806 of yacc.c */ 06405 #line 1675 "parse.y" 06406 { 06407 /*%%%*/ 06408 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06409 /*% 06410 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06411 %*/ 06412 } 06413 break; 06414 06415 case 99: 06416 06417 /* Line 1806 of yacc.c */ 06418 #line 1683 "parse.y" 06419 { 06420 /*%%%*/ 06421 if (in_def || in_single) 06422 yyerror("dynamic constant assignment"); 06423 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06424 /*% 06425 if (in_def || in_single) 06426 yyerror("dynamic constant assignment"); 06427 $$ = dispatch2(const_path_field, $1, $3); 06428 %*/ 06429 } 06430 break; 06431 06432 case 100: 06433 06434 /* Line 1806 of yacc.c */ 06435 #line 1695 "parse.y" 06436 { 06437 /*%%%*/ 06438 if (in_def || in_single) 06439 yyerror("dynamic constant assignment"); 06440 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06441 /*% 06442 $$ = dispatch1(top_const_field, $2); 06443 %*/ 06444 } 06445 break; 06446 06447 case 101: 06448 06449 /* Line 1806 of yacc.c */ 06450 #line 1705 "parse.y" 06451 { 06452 /*%%%*/ 06453 rb_backref_error((yyvsp[(1) - (1)].node)); 06454 (yyval.node) = NEW_BEGIN(0); 06455 /*% 06456 $$ = dispatch1(var_field, $1); 06457 $$ = dispatch1(assign_error, $$); 06458 %*/ 06459 } 06460 break; 06461 06462 case 102: 06463 06464 /* Line 1806 of yacc.c */ 06465 #line 1717 "parse.y" 06466 { 06467 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06468 /*%%%*/ 06469 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06470 /*% 06471 $$ = dispatch1(var_field, $$); 06472 %*/ 06473 } 06474 break; 06475 06476 case 103: 06477 06478 /* Line 1806 of yacc.c */ 06479 #line 1726 "parse.y" 06480 { 06481 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06482 /*%%%*/ 06483 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06484 /*% 06485 $$ = dispatch1(var_field, $$); 06486 %*/ 06487 } 06488 break; 06489 06490 case 104: 06491 06492 /* Line 1806 of yacc.c */ 06493 #line 1735 "parse.y" 06494 { 06495 /*%%%*/ 06496 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06497 /*% 06498 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06499 %*/ 06500 } 06501 break; 06502 06503 case 105: 06504 06505 /* Line 1806 of yacc.c */ 06506 #line 1743 "parse.y" 06507 { 06508 /*%%%*/ 06509 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06510 /*% 06511 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06512 %*/ 06513 } 06514 break; 06515 06516 case 106: 06517 06518 /* Line 1806 of yacc.c */ 06519 #line 1751 "parse.y" 06520 { 06521 /*%%%*/ 06522 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06523 /*% 06524 $$ = dispatch3(field, $1, ripper_intern("::"), $3); 06525 %*/ 06526 } 06527 break; 06528 06529 case 107: 06530 06531 /* Line 1806 of yacc.c */ 06532 #line 1759 "parse.y" 06533 { 06534 /*%%%*/ 06535 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06536 /*% 06537 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06538 %*/ 06539 } 06540 break; 06541 06542 case 108: 06543 06544 /* Line 1806 of yacc.c */ 06545 #line 1767 "parse.y" 06546 { 06547 /*%%%*/ 06548 if (in_def || in_single) 06549 yyerror("dynamic constant assignment"); 06550 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06551 /*% 06552 $$ = dispatch2(const_path_field, $1, $3); 06553 if (in_def || in_single) { 06554 $$ = dispatch1(assign_error, $$); 06555 } 06556 %*/ 06557 } 06558 break; 06559 06560 case 109: 06561 06562 /* Line 1806 of yacc.c */ 06563 #line 1780 "parse.y" 06564 { 06565 /*%%%*/ 06566 if (in_def || in_single) 06567 yyerror("dynamic constant assignment"); 06568 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06569 /*% 06570 $$ = dispatch1(top_const_field, $2); 06571 if (in_def || in_single) { 06572 $$ = dispatch1(assign_error, $$); 06573 } 06574 %*/ 06575 } 06576 break; 06577 06578 case 110: 06579 06580 /* Line 1806 of yacc.c */ 06581 #line 1793 "parse.y" 06582 { 06583 /*%%%*/ 06584 rb_backref_error((yyvsp[(1) - (1)].node)); 06585 (yyval.node) = NEW_BEGIN(0); 06586 /*% 06587 $$ = dispatch1(assign_error, $1); 06588 %*/ 06589 } 06590 break; 06591 06592 case 111: 06593 06594 /* Line 1806 of yacc.c */ 06595 #line 1804 "parse.y" 06596 { 06597 /*%%%*/ 06598 yyerror("class/module name must be CONSTANT"); 06599 /*% 06600 $$ = dispatch1(class_name_error, $1); 06601 %*/ 06602 } 06603 break; 06604 06605 case 113: 06606 06607 /* Line 1806 of yacc.c */ 06608 #line 1815 "parse.y" 06609 { 06610 /*%%%*/ 06611 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 06612 /*% 06613 $$ = dispatch1(top_const_ref, $2); 06614 %*/ 06615 } 06616 break; 06617 06618 case 114: 06619 06620 /* Line 1806 of yacc.c */ 06621 #line 1823 "parse.y" 06622 { 06623 /*%%%*/ 06624 (yyval.node) = NEW_COLON2(0, (yyval.node)); 06625 /*% 06626 $$ = dispatch1(const_ref, $1); 06627 %*/ 06628 } 06629 break; 06630 06631 case 115: 06632 06633 /* Line 1806 of yacc.c */ 06634 #line 1831 "parse.y" 06635 { 06636 /*%%%*/ 06637 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06638 /*% 06639 $$ = dispatch2(const_path_ref, $1, $3); 06640 %*/ 06641 } 06642 break; 06643 06644 case 119: 06645 06646 /* Line 1806 of yacc.c */ 06647 #line 1844 "parse.y" 06648 { 06649 lex_state = EXPR_ENDFN; 06650 (yyval.id) = (yyvsp[(1) - (1)].id); 06651 } 06652 break; 06653 06654 case 120: 06655 06656 /* Line 1806 of yacc.c */ 06657 #line 1849 "parse.y" 06658 { 06659 lex_state = EXPR_ENDFN; 06660 /*%%%*/ 06661 (yyval.id) = (yyvsp[(1) - (1)].id); 06662 /*% 06663 $$ = $1; 06664 %*/ 06665 } 06666 break; 06667 06668 case 123: 06669 06670 /* Line 1806 of yacc.c */ 06671 #line 1864 "parse.y" 06672 { 06673 /*%%%*/ 06674 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 06675 /*% 06676 $$ = dispatch1(symbol_literal, $1); 06677 %*/ 06678 } 06679 break; 06680 06681 case 125: 06682 06683 /* Line 1806 of yacc.c */ 06684 #line 1875 "parse.y" 06685 { 06686 /*%%%*/ 06687 (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node)); 06688 /*% 06689 $$ = rb_ary_new3(1, $1); 06690 %*/ 06691 } 06692 break; 06693 06694 case 126: 06695 06696 /* Line 1806 of yacc.c */ 06697 #line 1882 "parse.y" 06698 {lex_state = EXPR_FNAME;} 06699 break; 06700 06701 case 127: 06702 06703 /* Line 1806 of yacc.c */ 06704 #line 1883 "parse.y" 06705 { 06706 /*%%%*/ 06707 (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node))); 06708 /*% 06709 rb_ary_push($1, $4); 06710 %*/ 06711 } 06712 break; 06713 06714 case 128: 06715 06716 /* Line 1806 of yacc.c */ 06717 #line 1892 "parse.y" 06718 { ifndef_ripper((yyval.id) = '|'); } 06719 break; 06720 06721 case 129: 06722 06723 /* Line 1806 of yacc.c */ 06724 #line 1893 "parse.y" 06725 { ifndef_ripper((yyval.id) = '^'); } 06726 break; 06727 06728 case 130: 06729 06730 /* Line 1806 of yacc.c */ 06731 #line 1894 "parse.y" 06732 { ifndef_ripper((yyval.id) = '&'); } 06733 break; 06734 06735 case 131: 06736 06737 /* Line 1806 of yacc.c */ 06738 #line 1895 "parse.y" 06739 { ifndef_ripper((yyval.id) = tCMP); } 06740 break; 06741 06742 case 132: 06743 06744 /* Line 1806 of yacc.c */ 06745 #line 1896 "parse.y" 06746 { ifndef_ripper((yyval.id) = tEQ); } 06747 break; 06748 06749 case 133: 06750 06751 /* Line 1806 of yacc.c */ 06752 #line 1897 "parse.y" 06753 { ifndef_ripper((yyval.id) = tEQQ); } 06754 break; 06755 06756 case 134: 06757 06758 /* Line 1806 of yacc.c */ 06759 #line 1898 "parse.y" 06760 { ifndef_ripper((yyval.id) = tMATCH); } 06761 break; 06762 06763 case 135: 06764 06765 /* Line 1806 of yacc.c */ 06766 #line 1899 "parse.y" 06767 { ifndef_ripper((yyval.id) = tNMATCH); } 06768 break; 06769 06770 case 136: 06771 06772 /* Line 1806 of yacc.c */ 06773 #line 1900 "parse.y" 06774 { ifndef_ripper((yyval.id) = '>'); } 06775 break; 06776 06777 case 137: 06778 06779 /* Line 1806 of yacc.c */ 06780 #line 1901 "parse.y" 06781 { ifndef_ripper((yyval.id) = tGEQ); } 06782 break; 06783 06784 case 138: 06785 06786 /* Line 1806 of yacc.c */ 06787 #line 1902 "parse.y" 06788 { ifndef_ripper((yyval.id) = '<'); } 06789 break; 06790 06791 case 139: 06792 06793 /* Line 1806 of yacc.c */ 06794 #line 1903 "parse.y" 06795 { ifndef_ripper((yyval.id) = tLEQ); } 06796 break; 06797 06798 case 140: 06799 06800 /* Line 1806 of yacc.c */ 06801 #line 1904 "parse.y" 06802 { ifndef_ripper((yyval.id) = tNEQ); } 06803 break; 06804 06805 case 141: 06806 06807 /* Line 1806 of yacc.c */ 06808 #line 1905 "parse.y" 06809 { ifndef_ripper((yyval.id) = tLSHFT); } 06810 break; 06811 06812 case 142: 06813 06814 /* Line 1806 of yacc.c */ 06815 #line 1906 "parse.y" 06816 { ifndef_ripper((yyval.id) = tRSHFT); } 06817 break; 06818 06819 case 143: 06820 06821 /* Line 1806 of yacc.c */ 06822 #line 1907 "parse.y" 06823 { ifndef_ripper((yyval.id) = '+'); } 06824 break; 06825 06826 case 144: 06827 06828 /* Line 1806 of yacc.c */ 06829 #line 1908 "parse.y" 06830 { ifndef_ripper((yyval.id) = '-'); } 06831 break; 06832 06833 case 145: 06834 06835 /* Line 1806 of yacc.c */ 06836 #line 1909 "parse.y" 06837 { ifndef_ripper((yyval.id) = '*'); } 06838 break; 06839 06840 case 146: 06841 06842 /* Line 1806 of yacc.c */ 06843 #line 1910 "parse.y" 06844 { ifndef_ripper((yyval.id) = '*'); } 06845 break; 06846 06847 case 147: 06848 06849 /* Line 1806 of yacc.c */ 06850 #line 1911 "parse.y" 06851 { ifndef_ripper((yyval.id) = '/'); } 06852 break; 06853 06854 case 148: 06855 06856 /* Line 1806 of yacc.c */ 06857 #line 1912 "parse.y" 06858 { ifndef_ripper((yyval.id) = '%'); } 06859 break; 06860 06861 case 149: 06862 06863 /* Line 1806 of yacc.c */ 06864 #line 1913 "parse.y" 06865 { ifndef_ripper((yyval.id) = tPOW); } 06866 break; 06867 06868 case 150: 06869 06870 /* Line 1806 of yacc.c */ 06871 #line 1914 "parse.y" 06872 { ifndef_ripper((yyval.id) = tDSTAR); } 06873 break; 06874 06875 case 151: 06876 06877 /* Line 1806 of yacc.c */ 06878 #line 1915 "parse.y" 06879 { ifndef_ripper((yyval.id) = '!'); } 06880 break; 06881 06882 case 152: 06883 06884 /* Line 1806 of yacc.c */ 06885 #line 1916 "parse.y" 06886 { ifndef_ripper((yyval.id) = '~'); } 06887 break; 06888 06889 case 153: 06890 06891 /* Line 1806 of yacc.c */ 06892 #line 1917 "parse.y" 06893 { ifndef_ripper((yyval.id) = tUPLUS); } 06894 break; 06895 06896 case 154: 06897 06898 /* Line 1806 of yacc.c */ 06899 #line 1918 "parse.y" 06900 { ifndef_ripper((yyval.id) = tUMINUS); } 06901 break; 06902 06903 case 155: 06904 06905 /* Line 1806 of yacc.c */ 06906 #line 1919 "parse.y" 06907 { ifndef_ripper((yyval.id) = tAREF); } 06908 break; 06909 06910 case 156: 06911 06912 /* Line 1806 of yacc.c */ 06913 #line 1920 "parse.y" 06914 { ifndef_ripper((yyval.id) = tASET); } 06915 break; 06916 06917 case 157: 06918 06919 /* Line 1806 of yacc.c */ 06920 #line 1921 "parse.y" 06921 { ifndef_ripper((yyval.id) = '`'); } 06922 break; 06923 06924 case 199: 06925 06926 /* Line 1806 of yacc.c */ 06927 #line 1939 "parse.y" 06928 { 06929 /*%%%*/ 06930 value_expr((yyvsp[(3) - (3)].node)); 06931 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06932 /*% 06933 $$ = dispatch2(assign, $1, $3); 06934 %*/ 06935 } 06936 break; 06937 06938 case 200: 06939 06940 /* Line 1806 of yacc.c */ 06941 #line 1948 "parse.y" 06942 { 06943 /*%%%*/ 06944 value_expr((yyvsp[(3) - (5)].node)); 06945 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06946 (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node)); 06947 /*% 06948 $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); 06949 %*/ 06950 } 06951 break; 06952 06953 case 201: 06954 06955 /* Line 1806 of yacc.c */ 06956 #line 1958 "parse.y" 06957 { 06958 value_expr((yyvsp[(3) - (3)].node)); 06959 (yyval.node) = new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node)); 06960 } 06961 break; 06962 06963 case 202: 06964 06965 /* Line 1806 of yacc.c */ 06966 #line 1963 "parse.y" 06967 { 06968 /*%%%*/ 06969 value_expr((yyvsp[(3) - (5)].node)); 06970 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06971 /*% 06972 $3 = dispatch2(rescue_mod, $3, $5); 06973 %*/ 06974 (yyval.node) = new_op_assign((yyvsp[(1) - (5)].node), (yyvsp[(2) - (5)].id), (yyvsp[(3) - (5)].node)); 06975 } 06976 break; 06977 06978 case 203: 06979 06980 /* Line 1806 of yacc.c */ 06981 #line 1973 "parse.y" 06982 { 06983 /*%%%*/ 06984 NODE *args; 06985 06986 value_expr((yyvsp[(6) - (6)].node)); 06987 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 06988 if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) { 06989 args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06990 } 06991 else { 06992 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06993 } 06994 if ((yyvsp[(5) - (6)].id) == tOROP) { 06995 (yyvsp[(5) - (6)].id) = 0; 06996 } 06997 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 06998 (yyvsp[(5) - (6)].id) = 1; 06999 } 07000 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 07001 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 07002 /*% 07003 $1 = dispatch2(aref_field, $1, escape_Qundef($3)); 07004 $$ = dispatch3(opassign, $1, $5, $6); 07005 %*/ 07006 } 07007 break; 07008 07009 case 204: 07010 07011 /* Line 1806 of yacc.c */ 07012 #line 1999 "parse.y" 07013 { 07014 value_expr((yyvsp[(5) - (5)].node)); 07015 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 07016 } 07017 break; 07018 07019 case 205: 07020 07021 /* Line 1806 of yacc.c */ 07022 #line 2004 "parse.y" 07023 { 07024 value_expr((yyvsp[(5) - (5)].node)); 07025 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_id2sym('.'), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 07026 } 07027 break; 07028 07029 case 206: 07030 07031 /* Line 1806 of yacc.c */ 07032 #line 2009 "parse.y" 07033 { 07034 value_expr((yyvsp[(5) - (5)].node)); 07035 (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ripper_intern("::"), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 07036 } 07037 break; 07038 07039 case 207: 07040 07041 /* Line 1806 of yacc.c */ 07042 #line 2014 "parse.y" 07043 { 07044 /*%%%*/ 07045 (yyval.node) = NEW_COLON2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id)); 07046 (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 07047 /*% 07048 $$ = dispatch2(const_path_field, $1, $3); 07049 $$ = dispatch3(opassign, $$, $4, $5); 07050 %*/ 07051 } 07052 break; 07053 07054 case 208: 07055 07056 /* Line 1806 of yacc.c */ 07057 #line 2024 "parse.y" 07058 { 07059 /*%%%*/ 07060 (yyval.node) = NEW_COLON3((yyvsp[(2) - (4)].id)); 07061 (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 07062 /*% 07063 $$ = dispatch1(top_const_field, $2); 07064 $$ = dispatch3(opassign, $$, $3, $4); 07065 %*/ 07066 } 07067 break; 07068 07069 case 209: 07070 07071 /* Line 1806 of yacc.c */ 07072 #line 2034 "parse.y" 07073 { 07074 /*%%%*/ 07075 rb_backref_error((yyvsp[(1) - (3)].node)); 07076 (yyval.node) = NEW_BEGIN(0); 07077 /*% 07078 $$ = dispatch1(var_field, $1); 07079 $$ = dispatch3(opassign, $$, $2, $3); 07080 $$ = dispatch1(assign_error, $$); 07081 %*/ 07082 } 07083 break; 07084 07085 case 210: 07086 07087 /* Line 1806 of yacc.c */ 07088 #line 2045 "parse.y" 07089 { 07090 /*%%%*/ 07091 value_expr((yyvsp[(1) - (3)].node)); 07092 value_expr((yyvsp[(3) - (3)].node)); 07093 (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07094 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 07095 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 07096 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 07097 } 07098 /*% 07099 $$ = dispatch2(dot2, $1, $3); 07100 %*/ 07101 } 07102 break; 07103 07104 case 211: 07105 07106 /* Line 1806 of yacc.c */ 07107 #line 2059 "parse.y" 07108 { 07109 /*%%%*/ 07110 value_expr((yyvsp[(1) - (3)].node)); 07111 value_expr((yyvsp[(3) - (3)].node)); 07112 (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07113 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 07114 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 07115 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 07116 } 07117 /*% 07118 $$ = dispatch2(dot3, $1, $3); 07119 %*/ 07120 } 07121 break; 07122 07123 case 212: 07124 07125 /* Line 1806 of yacc.c */ 07126 #line 2073 "parse.y" 07127 { 07128 /*%%%*/ 07129 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node)); 07130 /*% 07131 $$ = dispatch3(binary, $1, ID2SYM('+'), $3); 07132 %*/ 07133 } 07134 break; 07135 07136 case 213: 07137 07138 /* Line 1806 of yacc.c */ 07139 #line 2081 "parse.y" 07140 { 07141 /*%%%*/ 07142 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node)); 07143 /*% 07144 $$ = dispatch3(binary, $1, ID2SYM('-'), $3); 07145 %*/ 07146 } 07147 break; 07148 07149 case 214: 07150 07151 /* Line 1806 of yacc.c */ 07152 #line 2089 "parse.y" 07153 { 07154 /*%%%*/ 07155 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node)); 07156 /*% 07157 $$ = dispatch3(binary, $1, ID2SYM('*'), $3); 07158 %*/ 07159 } 07160 break; 07161 07162 case 215: 07163 07164 /* Line 1806 of yacc.c */ 07165 #line 2097 "parse.y" 07166 { 07167 /*%%%*/ 07168 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node)); 07169 /*% 07170 $$ = dispatch3(binary, $1, ID2SYM('/'), $3); 07171 %*/ 07172 } 07173 break; 07174 07175 case 216: 07176 07177 /* Line 1806 of yacc.c */ 07178 #line 2105 "parse.y" 07179 { 07180 /*%%%*/ 07181 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node)); 07182 /*% 07183 $$ = dispatch3(binary, $1, ID2SYM('%'), $3); 07184 %*/ 07185 } 07186 break; 07187 07188 case 217: 07189 07190 /* Line 1806 of yacc.c */ 07191 #line 2113 "parse.y" 07192 { 07193 /*%%%*/ 07194 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node)); 07195 /*% 07196 $$ = dispatch3(binary, $1, ripper_intern("**"), $3); 07197 %*/ 07198 } 07199 break; 07200 07201 case 218: 07202 07203 /* Line 1806 of yacc.c */ 07204 #line 2121 "parse.y" 07205 { 07206 /*%%%*/ 07207 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 07208 /*% 07209 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 07210 $$ = dispatch2(unary, ripper_intern("-@"), $$); 07211 %*/ 07212 } 07213 break; 07214 07215 case 219: 07216 07217 /* Line 1806 of yacc.c */ 07218 #line 2130 "parse.y" 07219 { 07220 /*%%%*/ 07221 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 07222 /*% 07223 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 07224 $$ = dispatch2(unary, ripper_intern("-@"), $$); 07225 %*/ 07226 } 07227 break; 07228 07229 case 220: 07230 07231 /* Line 1806 of yacc.c */ 07232 #line 2139 "parse.y" 07233 { 07234 /*%%%*/ 07235 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS); 07236 /*% 07237 $$ = dispatch2(unary, ripper_intern("+@"), $2); 07238 %*/ 07239 } 07240 break; 07241 07242 case 221: 07243 07244 /* Line 1806 of yacc.c */ 07245 #line 2147 "parse.y" 07246 { 07247 /*%%%*/ 07248 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS); 07249 /*% 07250 $$ = dispatch2(unary, ripper_intern("-@"), $2); 07251 %*/ 07252 } 07253 break; 07254 07255 case 222: 07256 07257 /* Line 1806 of yacc.c */ 07258 #line 2155 "parse.y" 07259 { 07260 /*%%%*/ 07261 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node)); 07262 /*% 07263 $$ = dispatch3(binary, $1, ID2SYM('|'), $3); 07264 %*/ 07265 } 07266 break; 07267 07268 case 223: 07269 07270 /* Line 1806 of yacc.c */ 07271 #line 2163 "parse.y" 07272 { 07273 /*%%%*/ 07274 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node)); 07275 /*% 07276 $$ = dispatch3(binary, $1, ID2SYM('^'), $3); 07277 %*/ 07278 } 07279 break; 07280 07281 case 224: 07282 07283 /* Line 1806 of yacc.c */ 07284 #line 2171 "parse.y" 07285 { 07286 /*%%%*/ 07287 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node)); 07288 /*% 07289 $$ = dispatch3(binary, $1, ID2SYM('&'), $3); 07290 %*/ 07291 } 07292 break; 07293 07294 case 225: 07295 07296 /* Line 1806 of yacc.c */ 07297 #line 2179 "parse.y" 07298 { 07299 /*%%%*/ 07300 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node)); 07301 /*% 07302 $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); 07303 %*/ 07304 } 07305 break; 07306 07307 case 226: 07308 07309 /* Line 1806 of yacc.c */ 07310 #line 2187 "parse.y" 07311 { 07312 /*%%%*/ 07313 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node)); 07314 /*% 07315 $$ = dispatch3(binary, $1, ID2SYM('>'), $3); 07316 %*/ 07317 } 07318 break; 07319 07320 case 227: 07321 07322 /* Line 1806 of yacc.c */ 07323 #line 2195 "parse.y" 07324 { 07325 /*%%%*/ 07326 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node)); 07327 /*% 07328 $$ = dispatch3(binary, $1, ripper_intern(">="), $3); 07329 %*/ 07330 } 07331 break; 07332 07333 case 228: 07334 07335 /* Line 1806 of yacc.c */ 07336 #line 2203 "parse.y" 07337 { 07338 /*%%%*/ 07339 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node)); 07340 /*% 07341 $$ = dispatch3(binary, $1, ID2SYM('<'), $3); 07342 %*/ 07343 } 07344 break; 07345 07346 case 229: 07347 07348 /* Line 1806 of yacc.c */ 07349 #line 2211 "parse.y" 07350 { 07351 /*%%%*/ 07352 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node)); 07353 /*% 07354 $$ = dispatch3(binary, $1, ripper_intern("<="), $3); 07355 %*/ 07356 } 07357 break; 07358 07359 case 230: 07360 07361 /* Line 1806 of yacc.c */ 07362 #line 2219 "parse.y" 07363 { 07364 /*%%%*/ 07365 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node)); 07366 /*% 07367 $$ = dispatch3(binary, $1, ripper_intern("=="), $3); 07368 %*/ 07369 } 07370 break; 07371 07372 case 231: 07373 07374 /* Line 1806 of yacc.c */ 07375 #line 2227 "parse.y" 07376 { 07377 /*%%%*/ 07378 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node)); 07379 /*% 07380 $$ = dispatch3(binary, $1, ripper_intern("==="), $3); 07381 %*/ 07382 } 07383 break; 07384 07385 case 232: 07386 07387 /* Line 1806 of yacc.c */ 07388 #line 2235 "parse.y" 07389 { 07390 /*%%%*/ 07391 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node)); 07392 /*% 07393 $$ = dispatch3(binary, $1, ripper_intern("!="), $3); 07394 %*/ 07395 } 07396 break; 07397 07398 case 233: 07399 07400 /* Line 1806 of yacc.c */ 07401 #line 2243 "parse.y" 07402 { 07403 /*%%%*/ 07404 (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07405 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && RB_TYPE_P((yyvsp[(1) - (3)].node)->nd_lit, T_REGEXP)) { 07406 (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node)); 07407 } 07408 /*% 07409 $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); 07410 %*/ 07411 } 07412 break; 07413 07414 case 234: 07415 07416 /* Line 1806 of yacc.c */ 07417 #line 2254 "parse.y" 07418 { 07419 /*%%%*/ 07420 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node)); 07421 /*% 07422 $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); 07423 %*/ 07424 } 07425 break; 07426 07427 case 235: 07428 07429 /* Line 1806 of yacc.c */ 07430 #line 2262 "parse.y" 07431 { 07432 /*%%%*/ 07433 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 07434 /*% 07435 $$ = dispatch2(unary, ID2SYM('!'), $2); 07436 %*/ 07437 } 07438 break; 07439 07440 case 236: 07441 07442 /* Line 1806 of yacc.c */ 07443 #line 2270 "parse.y" 07444 { 07445 /*%%%*/ 07446 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~'); 07447 /*% 07448 $$ = dispatch2(unary, ID2SYM('~'), $2); 07449 %*/ 07450 } 07451 break; 07452 07453 case 237: 07454 07455 /* Line 1806 of yacc.c */ 07456 #line 2278 "parse.y" 07457 { 07458 /*%%%*/ 07459 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node)); 07460 /*% 07461 $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); 07462 %*/ 07463 } 07464 break; 07465 07466 case 238: 07467 07468 /* Line 1806 of yacc.c */ 07469 #line 2286 "parse.y" 07470 { 07471 /*%%%*/ 07472 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node)); 07473 /*% 07474 $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); 07475 %*/ 07476 } 07477 break; 07478 07479 case 239: 07480 07481 /* Line 1806 of yacc.c */ 07482 #line 2294 "parse.y" 07483 { 07484 /*%%%*/ 07485 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07486 /*% 07487 $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); 07488 %*/ 07489 } 07490 break; 07491 07492 case 240: 07493 07494 /* Line 1806 of yacc.c */ 07495 #line 2302 "parse.y" 07496 { 07497 /*%%%*/ 07498 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07499 /*% 07500 $$ = dispatch3(binary, $1, ripper_intern("||"), $3); 07501 %*/ 07502 } 07503 break; 07504 07505 case 241: 07506 07507 /* Line 1806 of yacc.c */ 07508 #line 2309 "parse.y" 07509 {in_defined = 1;} 07510 break; 07511 07512 case 242: 07513 07514 /* Line 1806 of yacc.c */ 07515 #line 2310 "parse.y" 07516 { 07517 /*%%%*/ 07518 in_defined = 0; 07519 (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node)); 07520 /*% 07521 in_defined = 0; 07522 $$ = dispatch1(defined, $4); 07523 %*/ 07524 } 07525 break; 07526 07527 case 243: 07528 07529 /* Line 1806 of yacc.c */ 07530 #line 2320 "parse.y" 07531 { 07532 /*%%%*/ 07533 value_expr((yyvsp[(1) - (6)].node)); 07534 (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 07535 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 07536 /*% 07537 $$ = dispatch3(ifop, $1, $3, $6); 07538 %*/ 07539 } 07540 break; 07541 07542 case 244: 07543 07544 /* Line 1806 of yacc.c */ 07545 #line 2330 "parse.y" 07546 { 07547 (yyval.node) = (yyvsp[(1) - (1)].node); 07548 } 07549 break; 07550 07551 case 245: 07552 07553 /* Line 1806 of yacc.c */ 07554 #line 2336 "parse.y" 07555 { 07556 /*%%%*/ 07557 value_expr((yyvsp[(1) - (1)].node)); 07558 (yyval.node) = (yyvsp[(1) - (1)].node); 07559 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 07560 /*% 07561 $$ = $1; 07562 %*/ 07563 } 07564 break; 07565 07566 case 247: 07567 07568 /* Line 1806 of yacc.c */ 07569 #line 2349 "parse.y" 07570 { 07571 (yyval.node) = (yyvsp[(1) - (2)].node); 07572 } 07573 break; 07574 07575 case 248: 07576 07577 /* Line 1806 of yacc.c */ 07578 #line 2353 "parse.y" 07579 { 07580 /*%%%*/ 07581 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07582 /*% 07583 $$ = arg_add_assocs($1, $3); 07584 %*/ 07585 } 07586 break; 07587 07588 case 249: 07589 07590 /* Line 1806 of yacc.c */ 07591 #line 2361 "parse.y" 07592 { 07593 /*%%%*/ 07594 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07595 /*% 07596 $$ = arg_add_assocs(arg_new(), $1); 07597 %*/ 07598 } 07599 break; 07600 07601 case 250: 07602 07603 /* Line 1806 of yacc.c */ 07604 #line 2371 "parse.y" 07605 { 07606 /*%%%*/ 07607 (yyval.node) = (yyvsp[(2) - (3)].node); 07608 /*% 07609 $$ = dispatch1(arg_paren, escape_Qundef($2)); 07610 %*/ 07611 } 07612 break; 07613 07614 case 255: 07615 07616 /* Line 1806 of yacc.c */ 07617 #line 2387 "parse.y" 07618 { 07619 (yyval.node) = (yyvsp[(1) - (2)].node); 07620 } 07621 break; 07622 07623 case 256: 07624 07625 /* Line 1806 of yacc.c */ 07626 #line 2391 "parse.y" 07627 { 07628 /*%%%*/ 07629 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07630 /*% 07631 $$ = arg_add_assocs($1, $3); 07632 %*/ 07633 } 07634 break; 07635 07636 case 257: 07637 07638 /* Line 1806 of yacc.c */ 07639 #line 2399 "parse.y" 07640 { 07641 /*%%%*/ 07642 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07643 /*% 07644 $$ = arg_add_assocs(arg_new(), $1); 07645 %*/ 07646 } 07647 break; 07648 07649 case 258: 07650 07651 /* Line 1806 of yacc.c */ 07652 #line 2409 "parse.y" 07653 { 07654 /*%%%*/ 07655 value_expr((yyvsp[(1) - (1)].node)); 07656 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07657 /*% 07658 $$ = arg_add(arg_new(), $1); 07659 %*/ 07660 } 07661 break; 07662 07663 case 259: 07664 07665 /* Line 1806 of yacc.c */ 07666 #line 2418 "parse.y" 07667 { 07668 /*%%%*/ 07669 (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 07670 /*% 07671 $$ = arg_add_optblock($1, $2); 07672 %*/ 07673 } 07674 break; 07675 07676 case 260: 07677 07678 /* Line 1806 of yacc.c */ 07679 #line 2426 "parse.y" 07680 { 07681 /*%%%*/ 07682 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07683 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node)); 07684 /*% 07685 $$ = arg_add_assocs(arg_new(), $1); 07686 $$ = arg_add_optblock($$, $2); 07687 %*/ 07688 } 07689 break; 07690 07691 case 261: 07692 07693 /* Line 1806 of yacc.c */ 07694 #line 2436 "parse.y" 07695 { 07696 /*%%%*/ 07697 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07698 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node)); 07699 /*% 07700 $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); 07701 %*/ 07702 } 07703 break; 07704 07705 case 263: 07706 07707 /* Line 1806 of yacc.c */ 07708 #line 2453 "parse.y" 07709 { 07710 (yyval.val) = cmdarg_stack; 07711 CMDARG_PUSH(1); 07712 } 07713 break; 07714 07715 case 264: 07716 07717 /* Line 1806 of yacc.c */ 07718 #line 2458 "parse.y" 07719 { 07720 /* CMDARG_POP() */ 07721 cmdarg_stack = (yyvsp[(1) - (2)].val); 07722 (yyval.node) = (yyvsp[(2) - (2)].node); 07723 } 07724 break; 07725 07726 case 265: 07727 07728 /* Line 1806 of yacc.c */ 07729 #line 2466 "parse.y" 07730 { 07731 /*%%%*/ 07732 (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node)); 07733 /*% 07734 $$ = $2; 07735 %*/ 07736 } 07737 break; 07738 07739 case 266: 07740 07741 /* Line 1806 of yacc.c */ 07742 #line 2476 "parse.y" 07743 { 07744 (yyval.node) = (yyvsp[(2) - (2)].node); 07745 } 07746 break; 07747 07748 case 267: 07749 07750 /* Line 1806 of yacc.c */ 07751 #line 2480 "parse.y" 07752 { 07753 (yyval.node) = 0; 07754 } 07755 break; 07756 07757 case 268: 07758 07759 /* Line 1806 of yacc.c */ 07760 #line 2486 "parse.y" 07761 { 07762 /*%%%*/ 07763 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07764 /*% 07765 $$ = arg_add(arg_new(), $1); 07766 %*/ 07767 } 07768 break; 07769 07770 case 269: 07771 07772 /* Line 1806 of yacc.c */ 07773 #line 2494 "parse.y" 07774 { 07775 /*%%%*/ 07776 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07777 /*% 07778 $$ = arg_add_star(arg_new(), $2); 07779 %*/ 07780 } 07781 break; 07782 07783 case 270: 07784 07785 /* Line 1806 of yacc.c */ 07786 #line 2502 "parse.y" 07787 { 07788 /*%%%*/ 07789 NODE *n1; 07790 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07791 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07792 } 07793 else { 07794 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07795 } 07796 /*% 07797 $$ = arg_add($1, $3); 07798 %*/ 07799 } 07800 break; 07801 07802 case 271: 07803 07804 /* Line 1806 of yacc.c */ 07805 #line 2516 "parse.y" 07806 { 07807 /*%%%*/ 07808 NODE *n1; 07809 if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07810 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07811 } 07812 else { 07813 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07814 } 07815 /*% 07816 $$ = arg_add_star($1, $4); 07817 %*/ 07818 } 07819 break; 07820 07821 case 272: 07822 07823 /* Line 1806 of yacc.c */ 07824 #line 2532 "parse.y" 07825 { 07826 /*%%%*/ 07827 NODE *n1; 07828 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07829 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07830 } 07831 else { 07832 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07833 } 07834 /*% 07835 $$ = mrhs_add(args2mrhs($1), $3); 07836 %*/ 07837 } 07838 break; 07839 07840 case 273: 07841 07842 /* Line 1806 of yacc.c */ 07843 #line 2546 "parse.y" 07844 { 07845 /*%%%*/ 07846 NODE *n1; 07847 if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY && 07848 (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07849 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07850 } 07851 else { 07852 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07853 } 07854 /*% 07855 $$ = mrhs_add_star(args2mrhs($1), $4); 07856 %*/ 07857 } 07858 break; 07859 07860 case 274: 07861 07862 /* Line 1806 of yacc.c */ 07863 #line 2561 "parse.y" 07864 { 07865 /*%%%*/ 07866 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07867 /*% 07868 $$ = mrhs_add_star(mrhs_new(), $2); 07869 %*/ 07870 } 07871 break; 07872 07873 case 285: 07874 07875 /* Line 1806 of yacc.c */ 07876 #line 2581 "parse.y" 07877 { 07878 /*%%%*/ 07879 (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); 07880 /*% 07881 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07882 %*/ 07883 } 07884 break; 07885 07886 case 286: 07887 07888 /* Line 1806 of yacc.c */ 07889 #line 2589 "parse.y" 07890 { 07891 (yyvsp[(1) - (1)].val) = cmdarg_stack; 07892 cmdarg_stack = 0; 07893 /*%%%*/ 07894 (yyval.num) = ruby_sourceline; 07895 /*% 07896 %*/ 07897 } 07898 break; 07899 07900 case 287: 07901 07902 /* Line 1806 of yacc.c */ 07903 #line 2599 "parse.y" 07904 { 07905 cmdarg_stack = (yyvsp[(1) - (4)].val); 07906 /*%%%*/ 07907 if ((yyvsp[(3) - (4)].node) == NULL) { 07908 (yyval.node) = NEW_NIL(); 07909 } 07910 else { 07911 if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE || 07912 nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE) 07913 nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num)); 07914 (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node)); 07915 } 07916 nd_set_line((yyval.node), (yyvsp[(2) - (4)].num)); 07917 /*% 07918 $$ = dispatch1(begin, $3); 07919 %*/ 07920 } 07921 break; 07922 07923 case 288: 07924 07925 /* Line 1806 of yacc.c */ 07926 #line 2616 "parse.y" 07927 {lex_state = EXPR_ENDARG;} 07928 break; 07929 07930 case 289: 07931 07932 /* Line 1806 of yacc.c */ 07933 #line 2617 "parse.y" 07934 { 07935 /*%%%*/ 07936 (yyval.node) = 0; 07937 /*% 07938 $$ = dispatch1(paren, 0); 07939 %*/ 07940 } 07941 break; 07942 07943 case 290: 07944 07945 /* Line 1806 of yacc.c */ 07946 #line 2624 "parse.y" 07947 {lex_state = EXPR_ENDARG;} 07948 break; 07949 07950 case 291: 07951 07952 /* Line 1806 of yacc.c */ 07953 #line 2625 "parse.y" 07954 { 07955 /*%%%*/ 07956 (yyval.node) = (yyvsp[(2) - (4)].node); 07957 /*% 07958 $$ = dispatch1(paren, $2); 07959 %*/ 07960 } 07961 break; 07962 07963 case 292: 07964 07965 /* Line 1806 of yacc.c */ 07966 #line 2633 "parse.y" 07967 { 07968 /*%%%*/ 07969 (yyval.node) = (yyvsp[(2) - (3)].node); 07970 /*% 07971 $$ = dispatch1(paren, $2); 07972 %*/ 07973 } 07974 break; 07975 07976 case 293: 07977 07978 /* Line 1806 of yacc.c */ 07979 #line 2641 "parse.y" 07980 { 07981 /*%%%*/ 07982 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 07983 /*% 07984 $$ = dispatch2(const_path_ref, $1, $3); 07985 %*/ 07986 } 07987 break; 07988 07989 case 294: 07990 07991 /* Line 1806 of yacc.c */ 07992 #line 2649 "parse.y" 07993 { 07994 /*%%%*/ 07995 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 07996 /*% 07997 $$ = dispatch1(top_const_ref, $2); 07998 %*/ 07999 } 08000 break; 08001 08002 case 295: 08003 08004 /* Line 1806 of yacc.c */ 08005 #line 2657 "parse.y" 08006 { 08007 /*%%%*/ 08008 if ((yyvsp[(2) - (3)].node) == 0) { 08009 (yyval.node) = NEW_ZARRAY(); /* zero length array*/ 08010 } 08011 else { 08012 (yyval.node) = (yyvsp[(2) - (3)].node); 08013 } 08014 /*% 08015 $$ = dispatch1(array, escape_Qundef($2)); 08016 %*/ 08017 } 08018 break; 08019 08020 case 296: 08021 08022 /* Line 1806 of yacc.c */ 08023 #line 2670 "parse.y" 08024 { 08025 /*%%%*/ 08026 (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node)); 08027 /*% 08028 $$ = dispatch1(hash, escape_Qundef($2)); 08029 %*/ 08030 } 08031 break; 08032 08033 case 297: 08034 08035 /* Line 1806 of yacc.c */ 08036 #line 2678 "parse.y" 08037 { 08038 /*%%%*/ 08039 (yyval.node) = NEW_RETURN(0); 08040 /*% 08041 $$ = dispatch0(return0); 08042 %*/ 08043 } 08044 break; 08045 08046 case 298: 08047 08048 /* Line 1806 of yacc.c */ 08049 #line 2686 "parse.y" 08050 { 08051 /*%%%*/ 08052 (yyval.node) = new_yield((yyvsp[(3) - (4)].node)); 08053 /*% 08054 $$ = dispatch1(yield, dispatch1(paren, $3)); 08055 %*/ 08056 } 08057 break; 08058 08059 case 299: 08060 08061 /* Line 1806 of yacc.c */ 08062 #line 2694 "parse.y" 08063 { 08064 /*%%%*/ 08065 (yyval.node) = NEW_YIELD(0); 08066 /*% 08067 $$ = dispatch1(yield, dispatch1(paren, arg_new())); 08068 %*/ 08069 } 08070 break; 08071 08072 case 300: 08073 08074 /* Line 1806 of yacc.c */ 08075 #line 2702 "parse.y" 08076 { 08077 /*%%%*/ 08078 (yyval.node) = NEW_YIELD(0); 08079 /*% 08080 $$ = dispatch0(yield0); 08081 %*/ 08082 } 08083 break; 08084 08085 case 301: 08086 08087 /* Line 1806 of yacc.c */ 08088 #line 2709 "parse.y" 08089 {in_defined = 1;} 08090 break; 08091 08092 case 302: 08093 08094 /* Line 1806 of yacc.c */ 08095 #line 2710 "parse.y" 08096 { 08097 /*%%%*/ 08098 in_defined = 0; 08099 (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node)); 08100 /*% 08101 in_defined = 0; 08102 $$ = dispatch1(defined, $5); 08103 %*/ 08104 } 08105 break; 08106 08107 case 303: 08108 08109 /* Line 1806 of yacc.c */ 08110 #line 2720 "parse.y" 08111 { 08112 /*%%%*/ 08113 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!'); 08114 /*% 08115 $$ = dispatch2(unary, ripper_intern("not"), $3); 08116 %*/ 08117 } 08118 break; 08119 08120 case 304: 08121 08122 /* Line 1806 of yacc.c */ 08123 #line 2728 "parse.y" 08124 { 08125 /*%%%*/ 08126 (yyval.node) = call_uni_op(cond(NEW_NIL()), '!'); 08127 /*% 08128 $$ = dispatch2(unary, ripper_intern("not"), Qnil); 08129 %*/ 08130 } 08131 break; 08132 08133 case 305: 08134 08135 /* Line 1806 of yacc.c */ 08136 #line 2736 "parse.y" 08137 { 08138 /*%%%*/ 08139 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 08140 (yyval.node) = (yyvsp[(2) - (2)].node); 08141 /*% 08142 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 08143 $$ = method_add_block($$, $2); 08144 %*/ 08145 } 08146 break; 08147 08148 case 307: 08149 08150 /* Line 1806 of yacc.c */ 08151 #line 2747 "parse.y" 08152 { 08153 /*%%%*/ 08154 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 08155 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 08156 (yyval.node) = (yyvsp[(2) - (2)].node); 08157 /*% 08158 $$ = method_add_block($1, $2); 08159 %*/ 08160 } 08161 break; 08162 08163 case 308: 08164 08165 /* Line 1806 of yacc.c */ 08166 #line 2757 "parse.y" 08167 { 08168 (yyval.node) = (yyvsp[(2) - (2)].node); 08169 } 08170 break; 08171 08172 case 309: 08173 08174 /* Line 1806 of yacc.c */ 08175 #line 2764 "parse.y" 08176 { 08177 /*%%%*/ 08178 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 08179 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 08180 /*% 08181 $$ = dispatch3(if, $2, $4, escape_Qundef($5)); 08182 %*/ 08183 } 08184 break; 08185 08186 case 310: 08187 08188 /* Line 1806 of yacc.c */ 08189 #line 2776 "parse.y" 08190 { 08191 /*%%%*/ 08192 (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 08193 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 08194 /*% 08195 $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); 08196 %*/ 08197 } 08198 break; 08199 08200 case 311: 08201 08202 /* Line 1806 of yacc.c */ 08203 #line 2784 "parse.y" 08204 {COND_PUSH(1);} 08205 break; 08206 08207 case 312: 08208 08209 /* Line 1806 of yacc.c */ 08210 #line 2784 "parse.y" 08211 {COND_POP();} 08212 break; 08213 08214 case 313: 08215 08216 /* Line 1806 of yacc.c */ 08217 #line 2787 "parse.y" 08218 { 08219 /*%%%*/ 08220 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 08221 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 08222 /*% 08223 $$ = dispatch2(while, $3, $6); 08224 %*/ 08225 } 08226 break; 08227 08228 case 314: 08229 08230 /* Line 1806 of yacc.c */ 08231 #line 2795 "parse.y" 08232 {COND_PUSH(1);} 08233 break; 08234 08235 case 315: 08236 08237 /* Line 1806 of yacc.c */ 08238 #line 2795 "parse.y" 08239 {COND_POP();} 08240 break; 08241 08242 case 316: 08243 08244 /* Line 1806 of yacc.c */ 08245 #line 2798 "parse.y" 08246 { 08247 /*%%%*/ 08248 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 08249 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 08250 /*% 08251 $$ = dispatch2(until, $3, $6); 08252 %*/ 08253 } 08254 break; 08255 08256 case 317: 08257 08258 /* Line 1806 of yacc.c */ 08259 #line 2809 "parse.y" 08260 { 08261 /*%%%*/ 08262 (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 08263 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 08264 /*% 08265 $$ = dispatch2(case, $2, $4); 08266 %*/ 08267 } 08268 break; 08269 08270 case 318: 08271 08272 /* Line 1806 of yacc.c */ 08273 #line 2818 "parse.y" 08274 { 08275 /*%%%*/ 08276 (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node)); 08277 /*% 08278 $$ = dispatch2(case, Qnil, $3); 08279 %*/ 08280 } 08281 break; 08282 08283 case 319: 08284 08285 /* Line 1806 of yacc.c */ 08286 #line 2826 "parse.y" 08287 {COND_PUSH(1);} 08288 break; 08289 08290 case 320: 08291 08292 /* Line 1806 of yacc.c */ 08293 #line 2828 "parse.y" 08294 {COND_POP();} 08295 break; 08296 08297 case 321: 08298 08299 /* Line 1806 of yacc.c */ 08300 #line 2831 "parse.y" 08301 { 08302 /*%%%*/ 08303 /* 08304 * for a, b, c in e 08305 * #=> 08306 * e.each{|*x| a, b, c = x 08307 * 08308 * for a in e 08309 * #=> 08310 * e.each{|x| a, = x} 08311 */ 08312 ID id = internal_id(); 08313 ID *tbl = ALLOC_N(ID, 2); 08314 NODE *m = NEW_ARGS_AUX(0, 0); 08315 NODE *args, *scope; 08316 08317 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) { 08318 /* if args.length == 1 && args[0].kind_of?(Array) 08319 * args = args[0] 08320 * end 08321 */ 08322 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 08323 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 08324 m->nd_next = block_append( 08325 NEW_IF( 08326 NEW_NODE(NODE_AND, 08327 NEW_CALL(NEW_CALL(NEW_DVAR(id), idLength, 0), 08328 idEq, one), 08329 NEW_CALL(NEW_CALL(NEW_DVAR(id), idAREF, zero), 08330 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 08331 0), 08332 NEW_DASGN_CURR(id, 08333 NEW_CALL(NEW_DVAR(id), idAREF, zero)), 08334 0), 08335 node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id))); 08336 08337 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 08338 } 08339 else { 08340 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN || 08341 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN || 08342 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) { 08343 (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id); 08344 m->nd_plen = 1; 08345 m->nd_next = (yyvsp[(2) - (9)].node); 08346 args = new_args(m, 0, 0, 0, new_args_tail(0, 0, 0)); 08347 } 08348 else { 08349 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id)); 08350 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 08351 } 08352 } 08353 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args); 08354 tbl[0] = 1; tbl[1] = id; 08355 (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope); 08356 fixpos((yyval.node), (yyvsp[(2) - (9)].node)); 08357 /*% 08358 $$ = dispatch3(for, $2, $5, $8); 08359 %*/ 08360 } 08361 break; 08362 08363 case 322: 08364 08365 /* Line 1806 of yacc.c */ 08366 #line 2892 "parse.y" 08367 { 08368 if (in_def || in_single) 08369 yyerror("class definition in method body"); 08370 local_push(0); 08371 /*%%%*/ 08372 (yyval.num) = ruby_sourceline; 08373 /*% 08374 %*/ 08375 } 08376 break; 08377 08378 case 323: 08379 08380 /* Line 1806 of yacc.c */ 08381 #line 2903 "parse.y" 08382 { 08383 /*%%%*/ 08384 (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node)); 08385 nd_set_line((yyval.node), (yyvsp[(4) - (6)].num)); 08386 /*% 08387 $$ = dispatch3(class, $2, $3, $5); 08388 %*/ 08389 local_pop(); 08390 } 08391 break; 08392 08393 case 324: 08394 08395 /* Line 1806 of yacc.c */ 08396 #line 2913 "parse.y" 08397 { 08398 (yyval.num) = in_def; 08399 in_def = 0; 08400 } 08401 break; 08402 08403 case 325: 08404 08405 /* Line 1806 of yacc.c */ 08406 #line 2918 "parse.y" 08407 { 08408 (yyval.num) = in_single; 08409 in_single = 0; 08410 local_push(0); 08411 } 08412 break; 08413 08414 case 326: 08415 08416 /* Line 1806 of yacc.c */ 08417 #line 2925 "parse.y" 08418 { 08419 /*%%%*/ 08420 (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node)); 08421 fixpos((yyval.node), (yyvsp[(3) - (8)].node)); 08422 /*% 08423 $$ = dispatch2(sclass, $3, $7); 08424 %*/ 08425 local_pop(); 08426 in_def = (yyvsp[(4) - (8)].num); 08427 in_single = (yyvsp[(6) - (8)].num); 08428 } 08429 break; 08430 08431 case 327: 08432 08433 /* Line 1806 of yacc.c */ 08434 #line 2937 "parse.y" 08435 { 08436 if (in_def || in_single) 08437 yyerror("module definition in method body"); 08438 local_push(0); 08439 /*%%%*/ 08440 (yyval.num) = ruby_sourceline; 08441 /*% 08442 %*/ 08443 } 08444 break; 08445 08446 case 328: 08447 08448 /* Line 1806 of yacc.c */ 08449 #line 2948 "parse.y" 08450 { 08451 /*%%%*/ 08452 (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 08453 nd_set_line((yyval.node), (yyvsp[(3) - (5)].num)); 08454 /*% 08455 $$ = dispatch2(module, $2, $4); 08456 %*/ 08457 local_pop(); 08458 } 08459 break; 08460 08461 case 329: 08462 08463 /* Line 1806 of yacc.c */ 08464 #line 2958 "parse.y" 08465 { 08466 (yyval.id) = cur_mid; 08467 cur_mid = (yyvsp[(2) - (2)].id); 08468 in_def++; 08469 local_push(0); 08470 } 08471 break; 08472 08473 case 330: 08474 08475 /* Line 1806 of yacc.c */ 08476 #line 2967 "parse.y" 08477 { 08478 /*%%%*/ 08479 NODE *body = remove_begin((yyvsp[(5) - (6)].node)); 08480 reduce_nodes(&body); 08481 (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE); 08482 nd_set_line((yyval.node), (yyvsp[(1) - (6)].num)); 08483 /*% 08484 $$ = dispatch3(def, $2, $4, $5); 08485 %*/ 08486 local_pop(); 08487 in_def--; 08488 cur_mid = (yyvsp[(3) - (6)].id); 08489 } 08490 break; 08491 08492 case 331: 08493 08494 /* Line 1806 of yacc.c */ 08495 #line 2980 "parse.y" 08496 {lex_state = EXPR_FNAME;} 08497 break; 08498 08499 case 332: 08500 08501 /* Line 1806 of yacc.c */ 08502 #line 2981 "parse.y" 08503 { 08504 in_single++; 08505 lex_state = EXPR_ENDFN; /* force for args */ 08506 local_push(0); 08507 } 08508 break; 08509 08510 case 333: 08511 08512 /* Line 1806 of yacc.c */ 08513 #line 2989 "parse.y" 08514 { 08515 /*%%%*/ 08516 NODE *body = remove_begin((yyvsp[(8) - (9)].node)); 08517 reduce_nodes(&body); 08518 (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body); 08519 nd_set_line((yyval.node), (yyvsp[(1) - (9)].num)); 08520 /*% 08521 $$ = dispatch5(defs, $2, $3, $5, $7, $8); 08522 %*/ 08523 local_pop(); 08524 in_single--; 08525 } 08526 break; 08527 08528 case 334: 08529 08530 /* Line 1806 of yacc.c */ 08531 #line 3002 "parse.y" 08532 { 08533 /*%%%*/ 08534 (yyval.node) = NEW_BREAK(0); 08535 /*% 08536 $$ = dispatch1(break, arg_new()); 08537 %*/ 08538 } 08539 break; 08540 08541 case 335: 08542 08543 /* Line 1806 of yacc.c */ 08544 #line 3010 "parse.y" 08545 { 08546 /*%%%*/ 08547 (yyval.node) = NEW_NEXT(0); 08548 /*% 08549 $$ = dispatch1(next, arg_new()); 08550 %*/ 08551 } 08552 break; 08553 08554 case 336: 08555 08556 /* Line 1806 of yacc.c */ 08557 #line 3018 "parse.y" 08558 { 08559 /*%%%*/ 08560 (yyval.node) = NEW_REDO(); 08561 /*% 08562 $$ = dispatch0(redo); 08563 %*/ 08564 } 08565 break; 08566 08567 case 337: 08568 08569 /* Line 1806 of yacc.c */ 08570 #line 3026 "parse.y" 08571 { 08572 /*%%%*/ 08573 (yyval.node) = NEW_RETRY(); 08574 /*% 08575 $$ = dispatch0(retry); 08576 %*/ 08577 } 08578 break; 08579 08580 case 338: 08581 08582 /* Line 1806 of yacc.c */ 08583 #line 3036 "parse.y" 08584 { 08585 /*%%%*/ 08586 value_expr((yyvsp[(1) - (1)].node)); 08587 (yyval.node) = (yyvsp[(1) - (1)].node); 08588 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 08589 /*% 08590 $$ = $1; 08591 %*/ 08592 } 08593 break; 08594 08595 case 339: 08596 08597 /* Line 1806 of yacc.c */ 08598 #line 3048 "parse.y" 08599 { 08600 token_info_push("begin"); 08601 } 08602 break; 08603 08604 case 340: 08605 08606 /* Line 1806 of yacc.c */ 08607 #line 3054 "parse.y" 08608 { 08609 token_info_push("if"); 08610 } 08611 break; 08612 08613 case 341: 08614 08615 /* Line 1806 of yacc.c */ 08616 #line 3060 "parse.y" 08617 { 08618 token_info_push("unless"); 08619 } 08620 break; 08621 08622 case 342: 08623 08624 /* Line 1806 of yacc.c */ 08625 #line 3066 "parse.y" 08626 { 08627 token_info_push("while"); 08628 } 08629 break; 08630 08631 case 343: 08632 08633 /* Line 1806 of yacc.c */ 08634 #line 3072 "parse.y" 08635 { 08636 token_info_push("until"); 08637 } 08638 break; 08639 08640 case 344: 08641 08642 /* Line 1806 of yacc.c */ 08643 #line 3078 "parse.y" 08644 { 08645 token_info_push("case"); 08646 } 08647 break; 08648 08649 case 345: 08650 08651 /* Line 1806 of yacc.c */ 08652 #line 3084 "parse.y" 08653 { 08654 token_info_push("for"); 08655 } 08656 break; 08657 08658 case 346: 08659 08660 /* Line 1806 of yacc.c */ 08661 #line 3090 "parse.y" 08662 { 08663 token_info_push("class"); 08664 } 08665 break; 08666 08667 case 347: 08668 08669 /* Line 1806 of yacc.c */ 08670 #line 3096 "parse.y" 08671 { 08672 token_info_push("module"); 08673 } 08674 break; 08675 08676 case 348: 08677 08678 /* Line 1806 of yacc.c */ 08679 #line 3102 "parse.y" 08680 { 08681 token_info_push("def"); 08682 /*%%%*/ 08683 (yyval.num) = ruby_sourceline; 08684 /*% 08685 %*/ 08686 } 08687 break; 08688 08689 case 349: 08690 08691 /* Line 1806 of yacc.c */ 08692 #line 3112 "parse.y" 08693 { 08694 token_info_pop("end"); 08695 } 08696 break; 08697 08698 case 356: 08699 08700 /* Line 1806 of yacc.c */ 08701 #line 3142 "parse.y" 08702 { 08703 /*%%%*/ 08704 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08705 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 08706 /*% 08707 $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); 08708 %*/ 08709 } 08710 break; 08711 08712 case 358: 08713 08714 /* Line 1806 of yacc.c */ 08715 #line 3154 "parse.y" 08716 { 08717 /*%%%*/ 08718 (yyval.node) = (yyvsp[(2) - (2)].node); 08719 /*% 08720 $$ = dispatch1(else, $2); 08721 %*/ 08722 } 08723 break; 08724 08725 case 361: 08726 08727 /* Line 1806 of yacc.c */ 08728 #line 3168 "parse.y" 08729 { 08730 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 08731 /*%%%*/ 08732 /*% 08733 $$ = dispatch1(mlhs_paren, $$); 08734 %*/ 08735 } 08736 break; 08737 08738 case 362: 08739 08740 /* Line 1806 of yacc.c */ 08741 #line 3176 "parse.y" 08742 { 08743 /*%%%*/ 08744 (yyval.node) = (yyvsp[(2) - (3)].node); 08745 /*% 08746 $$ = dispatch1(mlhs_paren, $2); 08747 %*/ 08748 } 08749 break; 08750 08751 case 363: 08752 08753 /* Line 1806 of yacc.c */ 08754 #line 3186 "parse.y" 08755 { 08756 /*%%%*/ 08757 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 08758 /*% 08759 $$ = mlhs_add(mlhs_new(), $1); 08760 %*/ 08761 } 08762 break; 08763 08764 case 364: 08765 08766 /* Line 1806 of yacc.c */ 08767 #line 3194 "parse.y" 08768 { 08769 /*%%%*/ 08770 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 08771 /*% 08772 $$ = mlhs_add($1, $3); 08773 %*/ 08774 } 08775 break; 08776 08777 case 365: 08778 08779 /* Line 1806 of yacc.c */ 08780 #line 3204 "parse.y" 08781 { 08782 /*%%%*/ 08783 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 08784 /*% 08785 $$ = $1; 08786 %*/ 08787 } 08788 break; 08789 08790 case 366: 08791 08792 /* Line 1806 of yacc.c */ 08793 #line 3212 "parse.y" 08794 { 08795 (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0); 08796 /*%%%*/ 08797 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyval.node)); 08798 /*% 08799 $$ = mlhs_add_star($1, $$); 08800 %*/ 08801 } 08802 break; 08803 08804 case 367: 08805 08806 /* Line 1806 of yacc.c */ 08807 #line 3221 "parse.y" 08808 { 08809 (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0); 08810 /*%%%*/ 08811 (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG((yyval.node), (yyvsp[(6) - (6)].node))); 08812 /*% 08813 $$ = mlhs_add_star($1, $$); 08814 %*/ 08815 } 08816 break; 08817 08818 case 368: 08819 08820 /* Line 1806 of yacc.c */ 08821 #line 3230 "parse.y" 08822 { 08823 /*%%%*/ 08824 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1); 08825 /*% 08826 $$ = mlhs_add_star($1, Qnil); 08827 %*/ 08828 } 08829 break; 08830 08831 case 369: 08832 08833 /* Line 1806 of yacc.c */ 08834 #line 3238 "parse.y" 08835 { 08836 /*%%%*/ 08837 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node))); 08838 /*% 08839 $$ = mlhs_add_star($1, $5); 08840 %*/ 08841 } 08842 break; 08843 08844 case 370: 08845 08846 /* Line 1806 of yacc.c */ 08847 #line 3246 "parse.y" 08848 { 08849 (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0); 08850 /*%%%*/ 08851 (yyval.node) = NEW_MASGN(0, (yyval.node)); 08852 /*% 08853 $$ = mlhs_add_star(mlhs_new(), $$); 08854 %*/ 08855 } 08856 break; 08857 08858 case 371: 08859 08860 /* Line 1806 of yacc.c */ 08861 #line 3255 "parse.y" 08862 { 08863 (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0); 08864 /*%%%*/ 08865 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyval.node), (yyvsp[(4) - (4)].node))); 08866 /*% 08867 #if 0 08868 TODO: Check me 08869 #endif 08870 $$ = mlhs_add_star($$, $4); 08871 %*/ 08872 } 08873 break; 08874 08875 case 372: 08876 08877 /* Line 1806 of yacc.c */ 08878 #line 3267 "parse.y" 08879 { 08880 /*%%%*/ 08881 (yyval.node) = NEW_MASGN(0, -1); 08882 /*% 08883 $$ = mlhs_add_star(mlhs_new(), Qnil); 08884 %*/ 08885 } 08886 break; 08887 08888 case 373: 08889 08890 /* Line 1806 of yacc.c */ 08891 #line 3275 "parse.y" 08892 { 08893 /*%%%*/ 08894 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 08895 /*% 08896 $$ = mlhs_add_star(mlhs_new(), Qnil); 08897 %*/ 08898 } 08899 break; 08900 08901 case 374: 08902 08903 /* Line 1806 of yacc.c */ 08904 #line 3286 "parse.y" 08905 { 08906 (yyval.node) = new_args_tail((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id)); 08907 } 08908 break; 08909 08910 case 375: 08911 08912 /* Line 1806 of yacc.c */ 08913 #line 3290 "parse.y" 08914 { 08915 (yyval.node) = new_args_tail((yyvsp[(1) - (2)].node), Qnone, (yyvsp[(2) - (2)].id)); 08916 } 08917 break; 08918 08919 case 376: 08920 08921 /* Line 1806 of yacc.c */ 08922 #line 3294 "parse.y" 08923 { 08924 (yyval.node) = new_args_tail(Qnone, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id)); 08925 } 08926 break; 08927 08928 case 377: 08929 08930 /* Line 1806 of yacc.c */ 08931 #line 3298 "parse.y" 08932 { 08933 (yyval.node) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].id)); 08934 } 08935 break; 08936 08937 case 378: 08938 08939 /* Line 1806 of yacc.c */ 08940 #line 3304 "parse.y" 08941 { 08942 (yyval.node) = (yyvsp[(2) - (2)].node); 08943 } 08944 break; 08945 08946 case 379: 08947 08948 /* Line 1806 of yacc.c */ 08949 #line 3308 "parse.y" 08950 { 08951 (yyval.node) = new_args_tail(Qnone, Qnone, Qnone); 08952 } 08953 break; 08954 08955 case 380: 08956 08957 /* Line 1806 of yacc.c */ 08958 #line 3314 "parse.y" 08959 { 08960 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), Qnone, (yyvsp[(6) - (6)].node)); 08961 } 08962 break; 08963 08964 case 381: 08965 08966 /* Line 1806 of yacc.c */ 08967 #line 3318 "parse.y" 08968 { 08969 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].node)); 08970 } 08971 break; 08972 08973 case 382: 08974 08975 /* Line 1806 of yacc.c */ 08976 #line 3322 "parse.y" 08977 { 08978 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), Qnone, Qnone, (yyvsp[(4) - (4)].node)); 08979 } 08980 break; 08981 08982 case 383: 08983 08984 /* Line 1806 of yacc.c */ 08985 #line 3326 "parse.y" 08986 { 08987 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), Qnone, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 08988 } 08989 break; 08990 08991 case 384: 08992 08993 /* Line 1806 of yacc.c */ 08994 #line 3330 "parse.y" 08995 { 08996 (yyval.node) = new_args((yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 08997 } 08998 break; 08999 09000 case 385: 09001 09002 /* Line 1806 of yacc.c */ 09003 #line 3334 "parse.y" 09004 { 09005 (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone)); 09006 /*%%%*/ 09007 /*% 09008 dispatch1(excessed_comma, $$); 09009 %*/ 09010 } 09011 break; 09012 09013 case 386: 09014 09015 /* Line 1806 of yacc.c */ 09016 #line 3342 "parse.y" 09017 { 09018 (yyval.node) = new_args((yyvsp[(1) - (6)].node), Qnone, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09019 } 09020 break; 09021 09022 case 387: 09023 09024 /* Line 1806 of yacc.c */ 09025 #line 3346 "parse.y" 09026 { 09027 (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].node)); 09028 } 09029 break; 09030 09031 case 388: 09032 09033 /* Line 1806 of yacc.c */ 09034 #line 3350 "parse.y" 09035 { 09036 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 09037 } 09038 break; 09039 09040 case 389: 09041 09042 /* Line 1806 of yacc.c */ 09043 #line 3354 "parse.y" 09044 { 09045 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09046 } 09047 break; 09048 09049 case 390: 09050 09051 /* Line 1806 of yacc.c */ 09052 #line 3358 "parse.y" 09053 { 09054 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (2)].node), Qnone, Qnone, (yyvsp[(2) - (2)].node)); 09055 } 09056 break; 09057 09058 case 391: 09059 09060 /* Line 1806 of yacc.c */ 09061 #line 3362 "parse.y" 09062 { 09063 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 09064 } 09065 break; 09066 09067 case 392: 09068 09069 /* Line 1806 of yacc.c */ 09070 #line 3366 "parse.y" 09071 { 09072 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].id), Qnone, (yyvsp[(2) - (2)].node)); 09073 } 09074 break; 09075 09076 case 393: 09077 09078 /* Line 1806 of yacc.c */ 09079 #line 3370 "parse.y" 09080 { 09081 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 09082 } 09083 break; 09084 09085 case 394: 09086 09087 /* Line 1806 of yacc.c */ 09088 #line 3374 "parse.y" 09089 { 09090 (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].node)); 09091 } 09092 break; 09093 09094 case 396: 09095 09096 /* Line 1806 of yacc.c */ 09097 #line 3381 "parse.y" 09098 { 09099 command_start = TRUE; 09100 } 09101 break; 09102 09103 case 397: 09104 09105 /* Line 1806 of yacc.c */ 09106 #line 3387 "parse.y" 09107 { 09108 /*%%%*/ 09109 (yyval.node) = 0; 09110 /*% 09111 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 09112 escape_Qundef($2)); 09113 %*/ 09114 } 09115 break; 09116 09117 case 398: 09118 09119 /* Line 1806 of yacc.c */ 09120 #line 3396 "parse.y" 09121 { 09122 /*%%%*/ 09123 (yyval.node) = 0; 09124 /*% 09125 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 09126 Qnil); 09127 %*/ 09128 } 09129 break; 09130 09131 case 399: 09132 09133 /* Line 1806 of yacc.c */ 09134 #line 3405 "parse.y" 09135 { 09136 /*%%%*/ 09137 (yyval.node) = (yyvsp[(2) - (4)].node); 09138 /*% 09139 $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); 09140 %*/ 09141 } 09142 break; 09143 09144 case 400: 09145 09146 /* Line 1806 of yacc.c */ 09147 #line 3416 "parse.y" 09148 { 09149 (yyval.node) = 0; 09150 } 09151 break; 09152 09153 case 401: 09154 09155 /* Line 1806 of yacc.c */ 09156 #line 3420 "parse.y" 09157 { 09158 /*%%%*/ 09159 (yyval.node) = 0; 09160 /*% 09161 $$ = $3; 09162 %*/ 09163 } 09164 break; 09165 09166 case 404: 09167 09168 /* Line 1806 of yacc.c */ 09169 #line 3446 "parse.y" 09170 { 09171 new_bv(get_id((yyvsp[(1) - (1)].id))); 09172 /*%%%*/ 09173 /*% 09174 $$ = get_value($1); 09175 %*/ 09176 } 09177 break; 09178 09179 case 405: 09180 09181 /* Line 1806 of yacc.c */ 09182 #line 3454 "parse.y" 09183 { 09184 (yyval.node) = 0; 09185 } 09186 break; 09187 09188 case 406: 09189 09190 /* Line 1806 of yacc.c */ 09191 #line 3459 "parse.y" 09192 { 09193 (yyval.vars) = dyna_push(); 09194 } 09195 break; 09196 09197 case 407: 09198 09199 /* Line 1806 of yacc.c */ 09200 #line 3462 "parse.y" 09201 { 09202 (yyval.num) = lpar_beg; 09203 lpar_beg = ++paren_nest; 09204 } 09205 break; 09206 09207 case 408: 09208 09209 /* Line 1806 of yacc.c */ 09210 #line 3467 "parse.y" 09211 { 09212 (yyval.num) = ruby_sourceline; 09213 } 09214 break; 09215 09216 case 409: 09217 09218 /* Line 1806 of yacc.c */ 09219 #line 3471 "parse.y" 09220 { 09221 lpar_beg = (yyvsp[(2) - (5)].num); 09222 /*%%%*/ 09223 (yyval.node) = NEW_LAMBDA((yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)); 09224 nd_set_line((yyval.node), (yyvsp[(4) - (5)].num)); 09225 /*% 09226 $$ = dispatch2(lambda, $3, $5); 09227 %*/ 09228 dyna_pop((yyvsp[(1) - (5)].vars)); 09229 } 09230 break; 09231 09232 case 410: 09233 09234 /* Line 1806 of yacc.c */ 09235 #line 3484 "parse.y" 09236 { 09237 /*%%%*/ 09238 (yyval.node) = (yyvsp[(2) - (4)].node); 09239 /*% 09240 $$ = dispatch1(paren, $2); 09241 %*/ 09242 } 09243 break; 09244 09245 case 411: 09246 09247 /* Line 1806 of yacc.c */ 09248 #line 3492 "parse.y" 09249 { 09250 /*%%%*/ 09251 (yyval.node) = (yyvsp[(1) - (1)].node); 09252 /*% 09253 $$ = $1; 09254 %*/ 09255 } 09256 break; 09257 09258 case 412: 09259 09260 /* Line 1806 of yacc.c */ 09261 #line 3502 "parse.y" 09262 { 09263 (yyval.node) = (yyvsp[(2) - (3)].node); 09264 } 09265 break; 09266 09267 case 413: 09268 09269 /* Line 1806 of yacc.c */ 09270 #line 3506 "parse.y" 09271 { 09272 (yyval.node) = (yyvsp[(2) - (3)].node); 09273 } 09274 break; 09275 09276 case 414: 09277 09278 /* Line 1806 of yacc.c */ 09279 #line 3512 "parse.y" 09280 { 09281 (yyvsp[(1) - (1)].vars) = dyna_push(); 09282 /*%%%*/ 09283 (yyval.num) = ruby_sourceline; 09284 /*% %*/ 09285 } 09286 break; 09287 09288 case 415: 09289 09290 /* Line 1806 of yacc.c */ 09291 #line 3521 "parse.y" 09292 { 09293 /*%%%*/ 09294 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 09295 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 09296 /*% 09297 $$ = dispatch2(do_block, escape_Qundef($3), $4); 09298 %*/ 09299 dyna_pop((yyvsp[(1) - (5)].vars)); 09300 } 09301 break; 09302 09303 case 416: 09304 09305 /* Line 1806 of yacc.c */ 09306 #line 3533 "parse.y" 09307 { 09308 /*%%%*/ 09309 if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) { 09310 compile_error(PARSER_ARG "block given to yield"); 09311 } 09312 else { 09313 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 09314 } 09315 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 09316 (yyval.node) = (yyvsp[(2) - (2)].node); 09317 fixpos((yyval.node), (yyvsp[(1) - (2)].node)); 09318 /*% 09319 $$ = method_add_block($1, $2); 09320 %*/ 09321 } 09322 break; 09323 09324 case 417: 09325 09326 /* Line 1806 of yacc.c */ 09327 #line 3549 "parse.y" 09328 { 09329 /*%%%*/ 09330 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 09331 /*% 09332 $$ = dispatch3(call, $1, $2, $3); 09333 $$ = method_optarg($$, $4); 09334 %*/ 09335 } 09336 break; 09337 09338 case 418: 09339 09340 /* Line 1806 of yacc.c */ 09341 #line 3558 "parse.y" 09342 { 09343 /*%%%*/ 09344 block_dup_check((yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 09345 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 09346 (yyval.node) = (yyvsp[(5) - (5)].node); 09347 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 09348 /*% 09349 $$ = dispatch4(command_call, $1, $2, $3, $4); 09350 $$ = method_add_block($$, $5); 09351 %*/ 09352 } 09353 break; 09354 09355 case 419: 09356 09357 /* Line 1806 of yacc.c */ 09358 #line 3570 "parse.y" 09359 { 09360 /*%%%*/ 09361 block_dup_check((yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 09362 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 09363 (yyval.node) = (yyvsp[(5) - (5)].node); 09364 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 09365 /*% 09366 $$ = dispatch4(command_call, $1, $2, $3, $4); 09367 $$ = method_add_block($$, $5); 09368 %*/ 09369 } 09370 break; 09371 09372 case 420: 09373 09374 /* Line 1806 of yacc.c */ 09375 #line 3584 "parse.y" 09376 { 09377 /*%%%*/ 09378 (yyval.node) = (yyvsp[(1) - (2)].node); 09379 (yyval.node)->nd_args = (yyvsp[(2) - (2)].node); 09380 /*% 09381 $$ = method_arg(dispatch1(fcall, $1), $2); 09382 %*/ 09383 } 09384 break; 09385 09386 case 421: 09387 09388 /* Line 1806 of yacc.c */ 09389 #line 3593 "parse.y" 09390 { 09391 /*%%%*/ 09392 (yyval.num) = ruby_sourceline; 09393 /*% %*/ 09394 } 09395 break; 09396 09397 case 422: 09398 09399 /* Line 1806 of yacc.c */ 09400 #line 3599 "parse.y" 09401 { 09402 /*%%%*/ 09403 (yyval.node) = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].node)); 09404 nd_set_line((yyval.node), (yyvsp[(4) - (5)].num)); 09405 /*% 09406 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 09407 $$ = method_optarg($$, $5); 09408 %*/ 09409 } 09410 break; 09411 09412 case 423: 09413 09414 /* Line 1806 of yacc.c */ 09415 #line 3609 "parse.y" 09416 { 09417 /*%%%*/ 09418 (yyval.num) = ruby_sourceline; 09419 /*% %*/ 09420 } 09421 break; 09422 09423 case 424: 09424 09425 /* Line 1806 of yacc.c */ 09426 #line 3615 "parse.y" 09427 { 09428 /*%%%*/ 09429 (yyval.node) = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].node)); 09430 nd_set_line((yyval.node), (yyvsp[(4) - (5)].num)); 09431 /*% 09432 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 09433 $$ = method_optarg($$, $5); 09434 %*/ 09435 } 09436 break; 09437 09438 case 425: 09439 09440 /* Line 1806 of yacc.c */ 09441 #line 3625 "parse.y" 09442 { 09443 /*%%%*/ 09444 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0); 09445 /*% 09446 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 09447 %*/ 09448 } 09449 break; 09450 09451 case 426: 09452 09453 /* Line 1806 of yacc.c */ 09454 #line 3633 "parse.y" 09455 { 09456 /*%%%*/ 09457 (yyval.num) = ruby_sourceline; 09458 /*% %*/ 09459 } 09460 break; 09461 09462 case 427: 09463 09464 /* Line 1806 of yacc.c */ 09465 #line 3639 "parse.y" 09466 { 09467 /*%%%*/ 09468 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), rb_intern("call"), (yyvsp[(4) - (4)].node)); 09469 nd_set_line((yyval.node), (yyvsp[(3) - (4)].num)); 09470 /*% 09471 $$ = dispatch3(call, $1, ripper_id2sym('.'), 09472 ripper_intern("call")); 09473 $$ = method_optarg($$, $4); 09474 %*/ 09475 } 09476 break; 09477 09478 case 428: 09479 09480 /* Line 1806 of yacc.c */ 09481 #line 3650 "parse.y" 09482 { 09483 /*%%%*/ 09484 (yyval.num) = ruby_sourceline; 09485 /*% %*/ 09486 } 09487 break; 09488 09489 case 429: 09490 09491 /* Line 1806 of yacc.c */ 09492 #line 3656 "parse.y" 09493 { 09494 /*%%%*/ 09495 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), rb_intern("call"), (yyvsp[(4) - (4)].node)); 09496 nd_set_line((yyval.node), (yyvsp[(3) - (4)].num)); 09497 /*% 09498 $$ = dispatch3(call, $1, ripper_intern("::"), 09499 ripper_intern("call")); 09500 $$ = method_optarg($$, $4); 09501 %*/ 09502 } 09503 break; 09504 09505 case 430: 09506 09507 /* Line 1806 of yacc.c */ 09508 #line 3667 "parse.y" 09509 { 09510 /*%%%*/ 09511 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 09512 /*% 09513 $$ = dispatch1(super, $2); 09514 %*/ 09515 } 09516 break; 09517 09518 case 431: 09519 09520 /* Line 1806 of yacc.c */ 09521 #line 3675 "parse.y" 09522 { 09523 /*%%%*/ 09524 (yyval.node) = NEW_ZSUPER(); 09525 /*% 09526 $$ = dispatch0(zsuper); 09527 %*/ 09528 } 09529 break; 09530 09531 case 432: 09532 09533 /* Line 1806 of yacc.c */ 09534 #line 3683 "parse.y" 09535 { 09536 /*%%%*/ 09537 if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) 09538 (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node)); 09539 else 09540 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node)); 09541 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 09542 /*% 09543 $$ = dispatch2(aref, $1, escape_Qundef($3)); 09544 %*/ 09545 } 09546 break; 09547 09548 case 433: 09549 09550 /* Line 1806 of yacc.c */ 09551 #line 3697 "parse.y" 09552 { 09553 (yyvsp[(1) - (1)].vars) = dyna_push(); 09554 /*%%%*/ 09555 (yyval.num) = ruby_sourceline; 09556 /*% 09557 %*/ 09558 } 09559 break; 09560 09561 case 434: 09562 09563 /* Line 1806 of yacc.c */ 09564 #line 3706 "parse.y" 09565 { 09566 /*%%%*/ 09567 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 09568 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 09569 /*% 09570 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 09571 %*/ 09572 dyna_pop((yyvsp[(1) - (5)].vars)); 09573 } 09574 break; 09575 09576 case 435: 09577 09578 /* Line 1806 of yacc.c */ 09579 #line 3716 "parse.y" 09580 { 09581 (yyvsp[(1) - (1)].vars) = dyna_push(); 09582 /*%%%*/ 09583 (yyval.num) = ruby_sourceline; 09584 /*% 09585 %*/ 09586 } 09587 break; 09588 09589 case 436: 09590 09591 /* Line 1806 of yacc.c */ 09592 #line 3725 "parse.y" 09593 { 09594 /*%%%*/ 09595 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 09596 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 09597 /*% 09598 $$ = dispatch2(do_block, escape_Qundef($3), $4); 09599 %*/ 09600 dyna_pop((yyvsp[(1) - (5)].vars)); 09601 } 09602 break; 09603 09604 case 437: 09605 09606 /* Line 1806 of yacc.c */ 09607 #line 3739 "parse.y" 09608 { 09609 /*%%%*/ 09610 (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 09611 /*% 09612 $$ = dispatch3(when, $2, $4, escape_Qundef($5)); 09613 %*/ 09614 } 09615 break; 09616 09617 case 440: 09618 09619 /* Line 1806 of yacc.c */ 09620 #line 3755 "parse.y" 09621 { 09622 /*%%%*/ 09623 if ((yyvsp[(3) - (6)].node)) { 09624 (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO()); 09625 (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)); 09626 } 09627 (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09628 fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node)); 09629 /*% 09630 $$ = dispatch4(rescue, 09631 escape_Qundef($2), 09632 escape_Qundef($3), 09633 escape_Qundef($5), 09634 escape_Qundef($6)); 09635 %*/ 09636 } 09637 break; 09638 09639 case 442: 09640 09641 /* Line 1806 of yacc.c */ 09642 #line 3775 "parse.y" 09643 { 09644 /*%%%*/ 09645 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 09646 /*% 09647 $$ = rb_ary_new3(1, $1); 09648 %*/ 09649 } 09650 break; 09651 09652 case 443: 09653 09654 /* Line 1806 of yacc.c */ 09655 #line 3783 "parse.y" 09656 { 09657 /*%%%*/ 09658 if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node); 09659 /*% 09660 $$ = $1; 09661 %*/ 09662 } 09663 break; 09664 09665 case 445: 09666 09667 /* Line 1806 of yacc.c */ 09668 #line 3794 "parse.y" 09669 { 09670 (yyval.node) = (yyvsp[(2) - (2)].node); 09671 } 09672 break; 09673 09674 case 447: 09675 09676 /* Line 1806 of yacc.c */ 09677 #line 3801 "parse.y" 09678 { 09679 /*%%%*/ 09680 (yyval.node) = (yyvsp[(2) - (2)].node); 09681 /*% 09682 $$ = dispatch1(ensure, $2); 09683 %*/ 09684 } 09685 break; 09686 09687 case 450: 09688 09689 /* Line 1806 of yacc.c */ 09690 #line 3813 "parse.y" 09691 { 09692 /*%%%*/ 09693 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 09694 /*% 09695 $$ = dispatch1(symbol_literal, $1); 09696 %*/ 09697 } 09698 break; 09699 09700 case 452: 09701 09702 /* Line 1806 of yacc.c */ 09703 #line 3824 "parse.y" 09704 { 09705 /*%%%*/ 09706 NODE *node = (yyvsp[(1) - (1)].node); 09707 if (!node) { 09708 node = NEW_STR(STR_NEW0()); 09709 } 09710 else { 09711 node = evstr2dstr(node); 09712 } 09713 (yyval.node) = node; 09714 /*% 09715 $$ = $1; 09716 %*/ 09717 } 09718 break; 09719 09720 case 455: 09721 09722 /* Line 1806 of yacc.c */ 09723 #line 3843 "parse.y" 09724 { 09725 /*%%%*/ 09726 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09727 /*% 09728 $$ = dispatch2(string_concat, $1, $2); 09729 %*/ 09730 } 09731 break; 09732 09733 case 456: 09734 09735 /* Line 1806 of yacc.c */ 09736 #line 3853 "parse.y" 09737 { 09738 /*%%%*/ 09739 (yyval.node) = (yyvsp[(2) - (3)].node); 09740 /*% 09741 $$ = dispatch1(string_literal, $2); 09742 %*/ 09743 } 09744 break; 09745 09746 case 457: 09747 09748 /* Line 1806 of yacc.c */ 09749 #line 3863 "parse.y" 09750 { 09751 /*%%%*/ 09752 NODE *node = (yyvsp[(2) - (3)].node); 09753 if (!node) { 09754 node = NEW_XSTR(STR_NEW0()); 09755 } 09756 else { 09757 switch (nd_type(node)) { 09758 case NODE_STR: 09759 nd_set_type(node, NODE_XSTR); 09760 break; 09761 case NODE_DSTR: 09762 nd_set_type(node, NODE_DXSTR); 09763 break; 09764 default: 09765 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09766 break; 09767 } 09768 } 09769 (yyval.node) = node; 09770 /*% 09771 $$ = dispatch1(xstring_literal, $2); 09772 %*/ 09773 } 09774 break; 09775 09776 case 458: 09777 09778 /* Line 1806 of yacc.c */ 09779 #line 3890 "parse.y" 09780 { 09781 /*%%%*/ 09782 int options = (yyvsp[(3) - (3)].num); 09783 NODE *node = (yyvsp[(2) - (3)].node); 09784 NODE *list, *prev; 09785 if (!node) { 09786 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09787 } 09788 else switch (nd_type(node)) { 09789 case NODE_STR: 09790 { 09791 VALUE src = node->nd_lit; 09792 nd_set_type(node, NODE_LIT); 09793 node->nd_lit = reg_compile(src, options); 09794 } 09795 break; 09796 default: 09797 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09798 case NODE_DSTR: 09799 if (options & RE_OPTION_ONCE) { 09800 nd_set_type(node, NODE_DREGX_ONCE); 09801 } 09802 else { 09803 nd_set_type(node, NODE_DREGX); 09804 } 09805 node->nd_cflag = options & RE_OPTION_MASK; 09806 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09807 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09808 if (nd_type(list->nd_head) == NODE_STR) { 09809 VALUE tail = list->nd_head->nd_lit; 09810 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09811 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09812 if (!literal_concat0(parser, lit, tail)) { 09813 node = 0; 09814 break; 09815 } 09816 rb_str_resize(tail, 0); 09817 prev->nd_next = list->nd_next; 09818 rb_gc_force_recycle((VALUE)list->nd_head); 09819 rb_gc_force_recycle((VALUE)list); 09820 list = prev; 09821 } 09822 else { 09823 prev = list; 09824 } 09825 } 09826 else { 09827 prev = 0; 09828 } 09829 } 09830 if (!node->nd_next) { 09831 VALUE src = node->nd_lit; 09832 nd_set_type(node, NODE_LIT); 09833 node->nd_lit = reg_compile(src, options); 09834 } 09835 break; 09836 } 09837 (yyval.node) = node; 09838 /*% 09839 $$ = dispatch2(regexp_literal, $2, $3); 09840 %*/ 09841 } 09842 break; 09843 09844 case 459: 09845 09846 /* Line 1806 of yacc.c */ 09847 #line 3955 "parse.y" 09848 { 09849 /*%%%*/ 09850 (yyval.node) = NEW_ZARRAY(); 09851 /*% 09852 $$ = dispatch0(words_new); 09853 $$ = dispatch1(array, $$); 09854 %*/ 09855 } 09856 break; 09857 09858 case 460: 09859 09860 /* Line 1806 of yacc.c */ 09861 #line 3964 "parse.y" 09862 { 09863 /*%%%*/ 09864 (yyval.node) = (yyvsp[(2) - (3)].node); 09865 /*% 09866 $$ = dispatch1(array, $2); 09867 %*/ 09868 } 09869 break; 09870 09871 case 461: 09872 09873 /* Line 1806 of yacc.c */ 09874 #line 3974 "parse.y" 09875 { 09876 /*%%%*/ 09877 (yyval.node) = 0; 09878 /*% 09879 $$ = dispatch0(words_new); 09880 %*/ 09881 } 09882 break; 09883 09884 case 462: 09885 09886 /* Line 1806 of yacc.c */ 09887 #line 3982 "parse.y" 09888 { 09889 /*%%%*/ 09890 (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node))); 09891 /*% 09892 $$ = dispatch2(words_add, $1, $2); 09893 %*/ 09894 } 09895 break; 09896 09897 case 464: 09898 09899 /* Line 1806 of yacc.c */ 09900 #line 4000 "parse.y" 09901 { 09902 /*%%%*/ 09903 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09904 /*% 09905 $$ = dispatch2(word_add, $1, $2); 09906 %*/ 09907 } 09908 break; 09909 09910 case 465: 09911 09912 /* Line 1806 of yacc.c */ 09913 #line 4010 "parse.y" 09914 { 09915 /*%%%*/ 09916 (yyval.node) = NEW_ZARRAY(); 09917 /*% 09918 $$ = dispatch0(symbols_new); 09919 $$ = dispatch1(array, $$); 09920 %*/ 09921 } 09922 break; 09923 09924 case 466: 09925 09926 /* Line 1806 of yacc.c */ 09927 #line 4019 "parse.y" 09928 { 09929 /*%%%*/ 09930 (yyval.node) = (yyvsp[(2) - (3)].node); 09931 /*% 09932 $$ = dispatch1(array, $2); 09933 %*/ 09934 } 09935 break; 09936 09937 case 467: 09938 09939 /* Line 1806 of yacc.c */ 09940 #line 4029 "parse.y" 09941 { 09942 /*%%%*/ 09943 (yyval.node) = 0; 09944 /*% 09945 $$ = dispatch0(symbols_new); 09946 %*/ 09947 } 09948 break; 09949 09950 case 468: 09951 09952 /* Line 1806 of yacc.c */ 09953 #line 4037 "parse.y" 09954 { 09955 /*%%%*/ 09956 (yyvsp[(2) - (3)].node) = evstr2dstr((yyvsp[(2) - (3)].node)); 09957 nd_set_type((yyvsp[(2) - (3)].node), NODE_DSYM); 09958 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 09959 /*% 09960 $$ = dispatch2(symbols_add, $1, $2); 09961 %*/ 09962 } 09963 break; 09964 09965 case 469: 09966 09967 /* Line 1806 of yacc.c */ 09968 #line 4049 "parse.y" 09969 { 09970 /*%%%*/ 09971 (yyval.node) = NEW_ZARRAY(); 09972 /*% 09973 $$ = dispatch0(qwords_new); 09974 $$ = dispatch1(array, $$); 09975 %*/ 09976 } 09977 break; 09978 09979 case 470: 09980 09981 /* Line 1806 of yacc.c */ 09982 #line 4058 "parse.y" 09983 { 09984 /*%%%*/ 09985 (yyval.node) = (yyvsp[(2) - (3)].node); 09986 /*% 09987 $$ = dispatch1(array, $2); 09988 %*/ 09989 } 09990 break; 09991 09992 case 471: 09993 09994 /* Line 1806 of yacc.c */ 09995 #line 4068 "parse.y" 09996 { 09997 /*%%%*/ 09998 (yyval.node) = NEW_ZARRAY(); 09999 /*% 10000 $$ = dispatch0(qsymbols_new); 10001 $$ = dispatch1(array, $$); 10002 %*/ 10003 } 10004 break; 10005 10006 case 472: 10007 10008 /* Line 1806 of yacc.c */ 10009 #line 4077 "parse.y" 10010 { 10011 /*%%%*/ 10012 (yyval.node) = (yyvsp[(2) - (3)].node); 10013 /*% 10014 $$ = dispatch1(array, $2); 10015 %*/ 10016 } 10017 break; 10018 10019 case 473: 10020 10021 /* Line 1806 of yacc.c */ 10022 #line 4087 "parse.y" 10023 { 10024 /*%%%*/ 10025 (yyval.node) = 0; 10026 /*% 10027 $$ = dispatch0(qwords_new); 10028 %*/ 10029 } 10030 break; 10031 10032 case 474: 10033 10034 /* Line 1806 of yacc.c */ 10035 #line 4095 "parse.y" 10036 { 10037 /*%%%*/ 10038 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 10039 /*% 10040 $$ = dispatch2(qwords_add, $1, $2); 10041 %*/ 10042 } 10043 break; 10044 10045 case 475: 10046 10047 /* Line 1806 of yacc.c */ 10048 #line 4105 "parse.y" 10049 { 10050 /*%%%*/ 10051 (yyval.node) = 0; 10052 /*% 10053 $$ = dispatch0(qsymbols_new); 10054 %*/ 10055 } 10056 break; 10057 10058 case 476: 10059 10060 /* Line 1806 of yacc.c */ 10061 #line 4113 "parse.y" 10062 { 10063 /*%%%*/ 10064 VALUE lit; 10065 lit = (yyvsp[(2) - (3)].node)->nd_lit; 10066 (yyvsp[(2) - (3)].node)->nd_lit = ID2SYM(rb_intern_str(lit)); 10067 nd_set_type((yyvsp[(2) - (3)].node), NODE_LIT); 10068 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 10069 /*% 10070 $$ = dispatch2(qsymbols_add, $1, $2); 10071 %*/ 10072 } 10073 break; 10074 10075 case 477: 10076 10077 /* Line 1806 of yacc.c */ 10078 #line 4127 "parse.y" 10079 { 10080 /*%%%*/ 10081 (yyval.node) = 0; 10082 /*% 10083 $$ = dispatch0(string_content); 10084 %*/ 10085 } 10086 break; 10087 10088 case 478: 10089 10090 /* Line 1806 of yacc.c */ 10091 #line 4135 "parse.y" 10092 { 10093 /*%%%*/ 10094 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 10095 /*% 10096 $$ = dispatch2(string_add, $1, $2); 10097 %*/ 10098 } 10099 break; 10100 10101 case 479: 10102 10103 /* Line 1806 of yacc.c */ 10104 #line 4145 "parse.y" 10105 { 10106 /*%%%*/ 10107 (yyval.node) = 0; 10108 /*% 10109 $$ = dispatch0(xstring_new); 10110 %*/ 10111 } 10112 break; 10113 10114 case 480: 10115 10116 /* Line 1806 of yacc.c */ 10117 #line 4153 "parse.y" 10118 { 10119 /*%%%*/ 10120 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 10121 /*% 10122 $$ = dispatch2(xstring_add, $1, $2); 10123 %*/ 10124 } 10125 break; 10126 10127 case 481: 10128 10129 /* Line 1806 of yacc.c */ 10130 #line 4163 "parse.y" 10131 { 10132 /*%%%*/ 10133 (yyval.node) = 0; 10134 /*% 10135 $$ = dispatch0(regexp_new); 10136 %*/ 10137 } 10138 break; 10139 10140 case 482: 10141 10142 /* Line 1806 of yacc.c */ 10143 #line 4171 "parse.y" 10144 { 10145 /*%%%*/ 10146 NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node); 10147 if (!head) { 10148 (yyval.node) = tail; 10149 } 10150 else if (!tail) { 10151 (yyval.node) = head; 10152 } 10153 else { 10154 switch (nd_type(head)) { 10155 case NODE_STR: 10156 nd_set_type(head, NODE_DSTR); 10157 break; 10158 case NODE_DSTR: 10159 break; 10160 default: 10161 head = list_append(NEW_DSTR(Qnil), head); 10162 break; 10163 } 10164 (yyval.node) = list_append(head, tail); 10165 } 10166 /*% 10167 $$ = dispatch2(regexp_add, $1, $2); 10168 %*/ 10169 } 10170 break; 10171 10172 case 484: 10173 10174 /* Line 1806 of yacc.c */ 10175 #line 4201 "parse.y" 10176 { 10177 (yyval.node) = lex_strterm; 10178 lex_strterm = 0; 10179 lex_state = EXPR_BEG; 10180 } 10181 break; 10182 10183 case 485: 10184 10185 /* Line 1806 of yacc.c */ 10186 #line 4207 "parse.y" 10187 { 10188 /*%%%*/ 10189 lex_strterm = (yyvsp[(2) - (3)].node); 10190 (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node)); 10191 /*% 10192 lex_strterm = $<node>2; 10193 $$ = dispatch1(string_dvar, $3); 10194 %*/ 10195 } 10196 break; 10197 10198 case 486: 10199 10200 /* Line 1806 of yacc.c */ 10201 #line 4217 "parse.y" 10202 { 10203 (yyvsp[(1) - (1)].val) = cond_stack; 10204 (yyval.val) = cmdarg_stack; 10205 cond_stack = 0; 10206 cmdarg_stack = 0; 10207 } 10208 break; 10209 10210 case 487: 10211 10212 /* Line 1806 of yacc.c */ 10213 #line 4223 "parse.y" 10214 { 10215 (yyval.node) = lex_strterm; 10216 lex_strterm = 0; 10217 lex_state = EXPR_BEG; 10218 } 10219 break; 10220 10221 case 488: 10222 10223 /* Line 1806 of yacc.c */ 10224 #line 4228 "parse.y" 10225 { 10226 (yyval.num) = brace_nest; 10227 brace_nest = 0; 10228 } 10229 break; 10230 10231 case 489: 10232 10233 /* Line 1806 of yacc.c */ 10234 #line 4233 "parse.y" 10235 { 10236 cond_stack = (yyvsp[(1) - (6)].val); 10237 cmdarg_stack = (yyvsp[(2) - (6)].val); 10238 lex_strterm = (yyvsp[(3) - (6)].node); 10239 brace_nest = (yyvsp[(4) - (6)].num); 10240 /*%%%*/ 10241 if ((yyvsp[(5) - (6)].node)) (yyvsp[(5) - (6)].node)->flags &= ~NODE_FL_NEWLINE; 10242 (yyval.node) = new_evstr((yyvsp[(5) - (6)].node)); 10243 /*% 10244 $$ = dispatch1(string_embexpr, $5); 10245 %*/ 10246 } 10247 break; 10248 10249 case 490: 10250 10251 /* Line 1806 of yacc.c */ 10252 #line 4248 "parse.y" 10253 { 10254 /*%%%*/ 10255 (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id)); 10256 /*% 10257 $$ = dispatch1(var_ref, $1); 10258 %*/ 10259 } 10260 break; 10261 10262 case 491: 10263 10264 /* Line 1806 of yacc.c */ 10265 #line 4256 "parse.y" 10266 { 10267 /*%%%*/ 10268 (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id)); 10269 /*% 10270 $$ = dispatch1(var_ref, $1); 10271 %*/ 10272 } 10273 break; 10274 10275 case 492: 10276 10277 /* Line 1806 of yacc.c */ 10278 #line 4264 "parse.y" 10279 { 10280 /*%%%*/ 10281 (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id)); 10282 /*% 10283 $$ = dispatch1(var_ref, $1); 10284 %*/ 10285 } 10286 break; 10287 10288 case 494: 10289 10290 /* Line 1806 of yacc.c */ 10291 #line 4275 "parse.y" 10292 { 10293 lex_state = EXPR_END; 10294 /*%%%*/ 10295 (yyval.id) = (yyvsp[(2) - (2)].id); 10296 /*% 10297 $$ = dispatch1(symbol, $2); 10298 %*/ 10299 } 10300 break; 10301 10302 case 499: 10303 10304 /* Line 1806 of yacc.c */ 10305 #line 4292 "parse.y" 10306 { 10307 lex_state = EXPR_END; 10308 /*%%%*/ 10309 (yyval.node) = dsym_node((yyvsp[(2) - (3)].node)); 10310 /*% 10311 $$ = dispatch1(dyna_symbol, $2); 10312 %*/ 10313 } 10314 break; 10315 10316 case 502: 10317 10318 /* Line 1806 of yacc.c */ 10319 #line 4305 "parse.y" 10320 { 10321 /*%%%*/ 10322 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 10323 /*% 10324 $$ = dispatch2(unary, ripper_intern("-@"), $2); 10325 %*/ 10326 } 10327 break; 10328 10329 case 503: 10330 10331 /* Line 1806 of yacc.c */ 10332 #line 4313 "parse.y" 10333 { 10334 /*%%%*/ 10335 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 10336 /*% 10337 $$ = dispatch2(unary, ripper_intern("-@"), $2); 10338 %*/ 10339 } 10340 break; 10341 10342 case 509: 10343 10344 /* Line 1806 of yacc.c */ 10345 #line 4329 "parse.y" 10346 {ifndef_ripper((yyval.id) = keyword_nil);} 10347 break; 10348 10349 case 510: 10350 10351 /* Line 1806 of yacc.c */ 10352 #line 4330 "parse.y" 10353 {ifndef_ripper((yyval.id) = keyword_self);} 10354 break; 10355 10356 case 511: 10357 10358 /* Line 1806 of yacc.c */ 10359 #line 4331 "parse.y" 10360 {ifndef_ripper((yyval.id) = keyword_true);} 10361 break; 10362 10363 case 512: 10364 10365 /* Line 1806 of yacc.c */ 10366 #line 4332 "parse.y" 10367 {ifndef_ripper((yyval.id) = keyword_false);} 10368 break; 10369 10370 case 513: 10371 10372 /* Line 1806 of yacc.c */ 10373 #line 4333 "parse.y" 10374 {ifndef_ripper((yyval.id) = keyword__FILE__);} 10375 break; 10376 10377 case 514: 10378 10379 /* Line 1806 of yacc.c */ 10380 #line 4334 "parse.y" 10381 {ifndef_ripper((yyval.id) = keyword__LINE__);} 10382 break; 10383 10384 case 515: 10385 10386 /* Line 1806 of yacc.c */ 10387 #line 4335 "parse.y" 10388 {ifndef_ripper((yyval.id) = keyword__ENCODING__);} 10389 break; 10390 10391 case 516: 10392 10393 /* Line 1806 of yacc.c */ 10394 #line 4339 "parse.y" 10395 { 10396 /*%%%*/ 10397 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 10398 /*% 10399 if (id_is_var(get_id($1))) { 10400 $$ = dispatch1(var_ref, $1); 10401 } 10402 else { 10403 $$ = dispatch1(vcall, $1); 10404 } 10405 %*/ 10406 } 10407 break; 10408 10409 case 517: 10410 10411 /* Line 1806 of yacc.c */ 10412 #line 4352 "parse.y" 10413 { 10414 /*%%%*/ 10415 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 10416 /*% 10417 $$ = dispatch1(var_ref, $1); 10418 %*/ 10419 } 10420 break; 10421 10422 case 518: 10423 10424 /* Line 1806 of yacc.c */ 10425 #line 4362 "parse.y" 10426 { 10427 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 10428 /*%%%*/ 10429 /*% 10430 $$ = dispatch1(var_field, $$); 10431 %*/ 10432 } 10433 break; 10434 10435 case 519: 10436 10437 /* Line 1806 of yacc.c */ 10438 #line 4370 "parse.y" 10439 { 10440 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 10441 /*%%%*/ 10442 /*% 10443 $$ = dispatch1(var_field, $$); 10444 %*/ 10445 } 10446 break; 10447 10448 case 522: 10449 10450 /* Line 1806 of yacc.c */ 10451 #line 4384 "parse.y" 10452 { 10453 /*%%%*/ 10454 (yyval.node) = 0; 10455 /*% 10456 $$ = Qnil; 10457 %*/ 10458 } 10459 break; 10460 10461 case 523: 10462 10463 /* Line 1806 of yacc.c */ 10464 #line 4392 "parse.y" 10465 { 10466 lex_state = EXPR_BEG; 10467 command_start = TRUE; 10468 } 10469 break; 10470 10471 case 524: 10472 10473 /* Line 1806 of yacc.c */ 10474 #line 4397 "parse.y" 10475 { 10476 (yyval.node) = (yyvsp[(3) - (4)].node); 10477 } 10478 break; 10479 10480 case 525: 10481 10482 /* Line 1806 of yacc.c */ 10483 #line 4401 "parse.y" 10484 { 10485 /*%%%*/ 10486 yyerrok; 10487 (yyval.node) = 0; 10488 /*% 10489 yyerrok; 10490 $$ = Qnil; 10491 %*/ 10492 } 10493 break; 10494 10495 case 526: 10496 10497 /* Line 1806 of yacc.c */ 10498 #line 4413 "parse.y" 10499 { 10500 /*%%%*/ 10501 (yyval.node) = (yyvsp[(2) - (3)].node); 10502 /*% 10503 $$ = dispatch1(paren, $2); 10504 %*/ 10505 lex_state = EXPR_BEG; 10506 command_start = TRUE; 10507 } 10508 break; 10509 10510 case 527: 10511 10512 /* Line 1806 of yacc.c */ 10513 #line 4423 "parse.y" 10514 { 10515 (yyval.node) = (yyvsp[(1) - (2)].node); 10516 lex_state = EXPR_BEG; 10517 command_start = TRUE; 10518 } 10519 break; 10520 10521 case 528: 10522 10523 /* Line 1806 of yacc.c */ 10524 #line 4431 "parse.y" 10525 { 10526 (yyval.node) = new_args_tail((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id)); 10527 } 10528 break; 10529 10530 case 529: 10531 10532 /* Line 1806 of yacc.c */ 10533 #line 4435 "parse.y" 10534 { 10535 (yyval.node) = new_args_tail((yyvsp[(1) - (2)].node), Qnone, (yyvsp[(2) - (2)].id)); 10536 } 10537 break; 10538 10539 case 530: 10540 10541 /* Line 1806 of yacc.c */ 10542 #line 4439 "parse.y" 10543 { 10544 (yyval.node) = new_args_tail(Qnone, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id)); 10545 } 10546 break; 10547 10548 case 531: 10549 10550 /* Line 1806 of yacc.c */ 10551 #line 4443 "parse.y" 10552 { 10553 (yyval.node) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].id)); 10554 } 10555 break; 10556 10557 case 532: 10558 10559 /* Line 1806 of yacc.c */ 10560 #line 4449 "parse.y" 10561 { 10562 (yyval.node) = (yyvsp[(2) - (2)].node); 10563 } 10564 break; 10565 10566 case 533: 10567 10568 /* Line 1806 of yacc.c */ 10569 #line 4453 "parse.y" 10570 { 10571 (yyval.node) = new_args_tail(Qnone, Qnone, Qnone); 10572 } 10573 break; 10574 10575 case 534: 10576 10577 /* Line 1806 of yacc.c */ 10578 #line 4459 "parse.y" 10579 { 10580 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), Qnone, (yyvsp[(6) - (6)].node)); 10581 } 10582 break; 10583 10584 case 535: 10585 10586 /* Line 1806 of yacc.c */ 10587 #line 4463 "parse.y" 10588 { 10589 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].node)); 10590 } 10591 break; 10592 10593 case 536: 10594 10595 /* Line 1806 of yacc.c */ 10596 #line 4467 "parse.y" 10597 { 10598 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), Qnone, Qnone, (yyvsp[(4) - (4)].node)); 10599 } 10600 break; 10601 10602 case 537: 10603 10604 /* Line 1806 of yacc.c */ 10605 #line 4471 "parse.y" 10606 { 10607 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), Qnone, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 10608 } 10609 break; 10610 10611 case 538: 10612 10613 /* Line 1806 of yacc.c */ 10614 #line 4475 "parse.y" 10615 { 10616 (yyval.node) = new_args((yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 10617 } 10618 break; 10619 10620 case 539: 10621 10622 /* Line 1806 of yacc.c */ 10623 #line 4479 "parse.y" 10624 { 10625 (yyval.node) = new_args((yyvsp[(1) - (6)].node), Qnone, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 10626 } 10627 break; 10628 10629 case 540: 10630 10631 /* Line 1806 of yacc.c */ 10632 #line 4483 "parse.y" 10633 { 10634 (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].node)); 10635 } 10636 break; 10637 10638 case 541: 10639 10640 /* Line 1806 of yacc.c */ 10641 #line 4487 "parse.y" 10642 { 10643 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node)); 10644 } 10645 break; 10646 10647 case 542: 10648 10649 /* Line 1806 of yacc.c */ 10650 #line 4491 "parse.y" 10651 { 10652 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 10653 } 10654 break; 10655 10656 case 543: 10657 10658 /* Line 1806 of yacc.c */ 10659 #line 4495 "parse.y" 10660 { 10661 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (2)].node), Qnone, Qnone, (yyvsp[(2) - (2)].node)); 10662 } 10663 break; 10664 10665 case 544: 10666 10667 /* Line 1806 of yacc.c */ 10668 #line 4499 "parse.y" 10669 { 10670 (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 10671 } 10672 break; 10673 10674 case 545: 10675 10676 /* Line 1806 of yacc.c */ 10677 #line 4503 "parse.y" 10678 { 10679 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].id), Qnone, (yyvsp[(2) - (2)].node)); 10680 } 10681 break; 10682 10683 case 546: 10684 10685 /* Line 1806 of yacc.c */ 10686 #line 4507 "parse.y" 10687 { 10688 (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node)); 10689 } 10690 break; 10691 10692 case 547: 10693 10694 /* Line 1806 of yacc.c */ 10695 #line 4511 "parse.y" 10696 { 10697 (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].node)); 10698 } 10699 break; 10700 10701 case 548: 10702 10703 /* Line 1806 of yacc.c */ 10704 #line 4515 "parse.y" 10705 { 10706 (yyval.node) = new_args_tail(Qnone, Qnone, Qnone); 10707 (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyval.node)); 10708 } 10709 break; 10710 10711 case 549: 10712 10713 /* Line 1806 of yacc.c */ 10714 #line 4522 "parse.y" 10715 { 10716 /*%%%*/ 10717 yyerror("formal argument cannot be a constant"); 10718 (yyval.id) = 0; 10719 /*% 10720 $$ = dispatch1(param_error, $1); 10721 %*/ 10722 } 10723 break; 10724 10725 case 550: 10726 10727 /* Line 1806 of yacc.c */ 10728 #line 4531 "parse.y" 10729 { 10730 /*%%%*/ 10731 yyerror("formal argument cannot be an instance variable"); 10732 (yyval.id) = 0; 10733 /*% 10734 $$ = dispatch1(param_error, $1); 10735 %*/ 10736 } 10737 break; 10738 10739 case 551: 10740 10741 /* Line 1806 of yacc.c */ 10742 #line 4540 "parse.y" 10743 { 10744 /*%%%*/ 10745 yyerror("formal argument cannot be a global variable"); 10746 (yyval.id) = 0; 10747 /*% 10748 $$ = dispatch1(param_error, $1); 10749 %*/ 10750 } 10751 break; 10752 10753 case 552: 10754 10755 /* Line 1806 of yacc.c */ 10756 #line 4549 "parse.y" 10757 { 10758 /*%%%*/ 10759 yyerror("formal argument cannot be a class variable"); 10760 (yyval.id) = 0; 10761 /*% 10762 $$ = dispatch1(param_error, $1); 10763 %*/ 10764 } 10765 break; 10766 10767 case 554: 10768 10769 /* Line 1806 of yacc.c */ 10770 #line 4561 "parse.y" 10771 { 10772 formal_argument(get_id((yyvsp[(1) - (1)].id))); 10773 (yyval.id) = (yyvsp[(1) - (1)].id); 10774 } 10775 break; 10776 10777 case 555: 10778 10779 /* Line 1806 of yacc.c */ 10780 #line 4568 "parse.y" 10781 { 10782 arg_var(get_id((yyvsp[(1) - (1)].id))); 10783 /*%%%*/ 10784 (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1); 10785 /*% 10786 $$ = get_value($1); 10787 %*/ 10788 } 10789 break; 10790 10791 case 556: 10792 10793 /* Line 1806 of yacc.c */ 10794 #line 4577 "parse.y" 10795 { 10796 ID tid = internal_id(); 10797 arg_var(tid); 10798 /*%%%*/ 10799 if (dyna_in_block()) { 10800 (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid); 10801 } 10802 else { 10803 (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid); 10804 } 10805 (yyval.node) = NEW_ARGS_AUX(tid, 1); 10806 (yyval.node)->nd_next = (yyvsp[(2) - (3)].node); 10807 /*% 10808 $$ = dispatch1(mlhs_paren, $2); 10809 %*/ 10810 } 10811 break; 10812 10813 case 558: 10814 10815 /* Line 1806 of yacc.c */ 10816 #line 4603 "parse.y" 10817 { 10818 /*%%%*/ 10819 (yyval.node) = (yyvsp[(1) - (3)].node); 10820 (yyval.node)->nd_plen++; 10821 (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next); 10822 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node)); 10823 /*% 10824 $$ = rb_ary_push($1, $3); 10825 %*/ 10826 } 10827 break; 10828 10829 case 559: 10830 10831 /* Line 1806 of yacc.c */ 10832 #line 4616 "parse.y" 10833 { 10834 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].id)))); 10835 (yyval.node) = assignable((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 10836 /*%%%*/ 10837 (yyval.node) = NEW_KW_ARG(0, (yyval.node)); 10838 /*% 10839 $$ = rb_assoc_new($$, $2); 10840 %*/ 10841 } 10842 break; 10843 10844 case 560: 10845 10846 /* Line 1806 of yacc.c */ 10847 #line 4628 "parse.y" 10848 { 10849 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].id)))); 10850 (yyval.node) = assignable((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 10851 /*%%%*/ 10852 (yyval.node) = NEW_KW_ARG(0, (yyval.node)); 10853 /*% 10854 $$ = rb_assoc_new($$, $2); 10855 %*/ 10856 } 10857 break; 10858 10859 case 561: 10860 10861 /* Line 1806 of yacc.c */ 10862 #line 4640 "parse.y" 10863 { 10864 /*%%%*/ 10865 (yyval.node) = (yyvsp[(1) - (1)].node); 10866 /*% 10867 $$ = rb_ary_new3(1, $1); 10868 %*/ 10869 } 10870 break; 10871 10872 case 562: 10873 10874 /* Line 1806 of yacc.c */ 10875 #line 4648 "parse.y" 10876 { 10877 /*%%%*/ 10878 NODE *kws = (yyvsp[(1) - (3)].node); 10879 10880 while (kws->nd_next) { 10881 kws = kws->nd_next; 10882 } 10883 kws->nd_next = (yyvsp[(3) - (3)].node); 10884 (yyval.node) = (yyvsp[(1) - (3)].node); 10885 /*% 10886 $$ = rb_ary_push($1, $3); 10887 %*/ 10888 } 10889 break; 10890 10891 case 563: 10892 10893 /* Line 1806 of yacc.c */ 10894 #line 4665 "parse.y" 10895 { 10896 /*%%%*/ 10897 (yyval.node) = (yyvsp[(1) - (1)].node); 10898 /*% 10899 $$ = rb_ary_new3(1, $1); 10900 %*/ 10901 } 10902 break; 10903 10904 case 564: 10905 10906 /* Line 1806 of yacc.c */ 10907 #line 4673 "parse.y" 10908 { 10909 /*%%%*/ 10910 NODE *kws = (yyvsp[(1) - (3)].node); 10911 10912 while (kws->nd_next) { 10913 kws = kws->nd_next; 10914 } 10915 kws->nd_next = (yyvsp[(3) - (3)].node); 10916 (yyval.node) = (yyvsp[(1) - (3)].node); 10917 /*% 10918 $$ = rb_ary_push($1, $3); 10919 %*/ 10920 } 10921 break; 10922 10923 case 567: 10924 10925 /* Line 1806 of yacc.c */ 10926 #line 4693 "parse.y" 10927 { 10928 shadowing_lvar(get_id((yyvsp[(2) - (2)].id))); 10929 (yyval.id) = (yyvsp[(2) - (2)].id); 10930 } 10931 break; 10932 10933 case 568: 10934 10935 /* Line 1806 of yacc.c */ 10936 #line 4698 "parse.y" 10937 { 10938 (yyval.id) = internal_id(); 10939 } 10940 break; 10941 10942 case 569: 10943 10944 /* Line 1806 of yacc.c */ 10945 #line 4704 "parse.y" 10946 { 10947 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 10948 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 10949 /*%%%*/ 10950 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 10951 /*% 10952 $$ = rb_assoc_new($$, $3); 10953 %*/ 10954 } 10955 break; 10956 10957 case 570: 10958 10959 /* Line 1806 of yacc.c */ 10960 #line 4716 "parse.y" 10961 { 10962 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 10963 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 10964 /*%%%*/ 10965 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 10966 /*% 10967 $$ = rb_assoc_new($$, $3); 10968 %*/ 10969 } 10970 break; 10971 10972 case 571: 10973 10974 /* Line 1806 of yacc.c */ 10975 #line 4728 "parse.y" 10976 { 10977 /*%%%*/ 10978 (yyval.node) = (yyvsp[(1) - (1)].node); 10979 /*% 10980 $$ = rb_ary_new3(1, $1); 10981 %*/ 10982 } 10983 break; 10984 10985 case 572: 10986 10987 /* Line 1806 of yacc.c */ 10988 #line 4736 "parse.y" 10989 { 10990 /*%%%*/ 10991 NODE *opts = (yyvsp[(1) - (3)].node); 10992 10993 while (opts->nd_next) { 10994 opts = opts->nd_next; 10995 } 10996 opts->nd_next = (yyvsp[(3) - (3)].node); 10997 (yyval.node) = (yyvsp[(1) - (3)].node); 10998 /*% 10999 $$ = rb_ary_push($1, $3); 11000 %*/ 11001 } 11002 break; 11003 11004 case 573: 11005 11006 /* Line 1806 of yacc.c */ 11007 #line 4752 "parse.y" 11008 { 11009 /*%%%*/ 11010 (yyval.node) = (yyvsp[(1) - (1)].node); 11011 /*% 11012 $$ = rb_ary_new3(1, $1); 11013 %*/ 11014 } 11015 break; 11016 11017 case 574: 11018 11019 /* Line 1806 of yacc.c */ 11020 #line 4760 "parse.y" 11021 { 11022 /*%%%*/ 11023 NODE *opts = (yyvsp[(1) - (3)].node); 11024 11025 while (opts->nd_next) { 11026 opts = opts->nd_next; 11027 } 11028 opts->nd_next = (yyvsp[(3) - (3)].node); 11029 (yyval.node) = (yyvsp[(1) - (3)].node); 11030 /*% 11031 $$ = rb_ary_push($1, $3); 11032 %*/ 11033 } 11034 break; 11035 11036 case 577: 11037 11038 /* Line 1806 of yacc.c */ 11039 #line 4780 "parse.y" 11040 { 11041 /*%%%*/ 11042 if (!is_local_id((yyvsp[(2) - (2)].id))) 11043 yyerror("rest argument must be local variable"); 11044 /*% %*/ 11045 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 11046 /*%%%*/ 11047 (yyval.id) = (yyvsp[(2) - (2)].id); 11048 /*% 11049 $$ = dispatch1(rest_param, $2); 11050 %*/ 11051 } 11052 break; 11053 11054 case 578: 11055 11056 /* Line 1806 of yacc.c */ 11057 #line 4793 "parse.y" 11058 { 11059 /*%%%*/ 11060 (yyval.id) = internal_id(); 11061 arg_var((yyval.id)); 11062 /*% 11063 $$ = dispatch1(rest_param, Qnil); 11064 %*/ 11065 } 11066 break; 11067 11068 case 581: 11069 11070 /* Line 1806 of yacc.c */ 11071 #line 4808 "parse.y" 11072 { 11073 /*%%%*/ 11074 if (!is_local_id((yyvsp[(2) - (2)].id))) 11075 yyerror("block argument must be local variable"); 11076 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id))) 11077 yyerror("duplicated block argument name"); 11078 /*% %*/ 11079 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 11080 /*%%%*/ 11081 (yyval.id) = (yyvsp[(2) - (2)].id); 11082 /*% 11083 $$ = dispatch1(blockarg, $2); 11084 %*/ 11085 } 11086 break; 11087 11088 case 582: 11089 11090 /* Line 1806 of yacc.c */ 11091 #line 4825 "parse.y" 11092 { 11093 (yyval.id) = (yyvsp[(2) - (2)].id); 11094 } 11095 break; 11096 11097 case 583: 11098 11099 /* Line 1806 of yacc.c */ 11100 #line 4829 "parse.y" 11101 { 11102 /*%%%*/ 11103 (yyval.id) = 0; 11104 /*% 11105 $$ = Qundef; 11106 %*/ 11107 } 11108 break; 11109 11110 case 584: 11111 11112 /* Line 1806 of yacc.c */ 11113 #line 4839 "parse.y" 11114 { 11115 /*%%%*/ 11116 value_expr((yyvsp[(1) - (1)].node)); 11117 (yyval.node) = (yyvsp[(1) - (1)].node); 11118 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 11119 /*% 11120 $$ = $1; 11121 %*/ 11122 } 11123 break; 11124 11125 case 585: 11126 11127 /* Line 1806 of yacc.c */ 11128 #line 4848 "parse.y" 11129 {lex_state = EXPR_BEG;} 11130 break; 11131 11132 case 586: 11133 11134 /* Line 1806 of yacc.c */ 11135 #line 4849 "parse.y" 11136 { 11137 /*%%%*/ 11138 if ((yyvsp[(3) - (4)].node) == 0) { 11139 yyerror("can't define singleton method for ()."); 11140 } 11141 else { 11142 switch (nd_type((yyvsp[(3) - (4)].node))) { 11143 case NODE_STR: 11144 case NODE_DSTR: 11145 case NODE_XSTR: 11146 case NODE_DXSTR: 11147 case NODE_DREGX: 11148 case NODE_LIT: 11149 case NODE_ARRAY: 11150 case NODE_ZARRAY: 11151 yyerror("can't define singleton method for literals"); 11152 default: 11153 value_expr((yyvsp[(3) - (4)].node)); 11154 break; 11155 } 11156 } 11157 (yyval.node) = (yyvsp[(3) - (4)].node); 11158 /*% 11159 $$ = dispatch1(paren, $3); 11160 %*/ 11161 } 11162 break; 11163 11164 case 588: 11165 11166 /* Line 1806 of yacc.c */ 11167 #line 4879 "parse.y" 11168 { 11169 /*%%%*/ 11170 (yyval.node) = (yyvsp[(1) - (2)].node); 11171 /*% 11172 $$ = dispatch1(assoclist_from_args, $1); 11173 %*/ 11174 } 11175 break; 11176 11177 case 590: 11178 11179 /* Line 1806 of yacc.c */ 11180 #line 4896 "parse.y" 11181 { 11182 /*%%%*/ 11183 (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 11184 /*% 11185 $$ = rb_ary_push($1, $3); 11186 %*/ 11187 } 11188 break; 11189 11190 case 591: 11191 11192 /* Line 1806 of yacc.c */ 11193 #line 4906 "parse.y" 11194 { 11195 /*%%%*/ 11196 (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node)); 11197 /*% 11198 $$ = dispatch2(assoc_new, $1, $3); 11199 %*/ 11200 } 11201 break; 11202 11203 case 592: 11204 11205 /* Line 1806 of yacc.c */ 11206 #line 4914 "parse.y" 11207 { 11208 /*%%%*/ 11209 (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node)); 11210 /*% 11211 $$ = dispatch2(assoc_new, $1, $2); 11212 %*/ 11213 } 11214 break; 11215 11216 case 593: 11217 11218 /* Line 1806 of yacc.c */ 11219 #line 4922 "parse.y" 11220 { 11221 /*%%%*/ 11222 (yyval.node) = list_append(NEW_LIST(0), (yyvsp[(2) - (2)].node)); 11223 /*% 11224 $$ = dispatch1(assoc_splat, $2); 11225 %*/ 11226 } 11227 break; 11228 11229 case 615: 11230 11231 /* Line 1806 of yacc.c */ 11232 #line 4980 "parse.y" 11233 {yyerrok;} 11234 break; 11235 11236 case 618: 11237 11238 /* Line 1806 of yacc.c */ 11239 #line 4985 "parse.y" 11240 {yyerrok;} 11241 break; 11242 11243 case 619: 11244 11245 /* Line 1806 of yacc.c */ 11246 #line 4989 "parse.y" 11247 { 11248 /*%%%*/ 11249 (yyval.node) = 0; 11250 /*% 11251 $$ = Qundef; 11252 %*/ 11253 } 11254 break; 11255 11256 11257 11258 /* Line 1806 of yacc.c */ 11259 #line 11258 "parse.c" 11260 default: break; 11261 } 11262 /* User semantic actions sometimes alter yychar, and that requires 11263 that yytoken be updated with the new translation. We take the 11264 approach of translating immediately before every use of yytoken. 11265 One alternative is translating here after every semantic action, 11266 but that translation would be missed if the semantic action invokes 11267 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 11268 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 11269 incorrect destructor might then be invoked immediately. In the 11270 case of YYERROR or YYBACKUP, subsequent parser actions might lead 11271 to an incorrect destructor call or verbose syntax error message 11272 before the lookahead is translated. */ 11273 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 11274 11275 YYPOPSTACK (yylen); 11276 yylen = 0; 11277 YY_STACK_PRINT (yyss, yyssp); 11278 11279 *++yyvsp = yyval; 11280 11281 /* Now `shift' the result of the reduction. Determine what state 11282 that goes to, based on the state we popped back to and the rule 11283 number reduced by. */ 11284 11285 yyn = yyr1[yyn]; 11286 11287 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 11288 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 11289 yystate = yytable[yystate]; 11290 else 11291 yystate = yydefgoto[yyn - YYNTOKENS]; 11292 11293 goto yynewstate; 11294 11295 11296 /*------------------------------------. 11297 | yyerrlab -- here on detecting error | 11298 `------------------------------------*/ 11299 yyerrlab: 11300 /* Make sure we have latest lookahead translation. See comments at 11301 user semantic actions for why this is necessary. */ 11302 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 11303 11304 /* If not already recovering from an error, report this error. */ 11305 if (!yyerrstatus) 11306 { 11307 ++yynerrs; 11308 #if ! YYERROR_VERBOSE 11309 parser_yyerror (parser, YY_("syntax error")); 11310 #else 11311 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 11312 yyssp, yytoken) 11313 { 11314 char const *yymsgp = YY_("syntax error"); 11315 int yysyntax_error_status; 11316 yysyntax_error_status = YYSYNTAX_ERROR; 11317 if (yysyntax_error_status == 0) 11318 yymsgp = yymsg; 11319 else if (yysyntax_error_status == 1) 11320 { 11321 if (yymsg != yymsgbuf) 11322 YYSTACK_FREE (yymsg); 11323 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 11324 if (!yymsg) 11325 { 11326 yymsg = yymsgbuf; 11327 yymsg_alloc = sizeof yymsgbuf; 11328 yysyntax_error_status = 2; 11329 } 11330 else 11331 { 11332 yysyntax_error_status = YYSYNTAX_ERROR; 11333 yymsgp = yymsg; 11334 } 11335 } 11336 parser_yyerror (parser, yymsgp); 11337 if (yysyntax_error_status == 2) 11338 goto yyexhaustedlab; 11339 } 11340 # undef YYSYNTAX_ERROR 11341 #endif 11342 } 11343 11344 11345 11346 if (yyerrstatus == 3) 11347 { 11348 /* If just tried and failed to reuse lookahead token after an 11349 error, discard it. */ 11350 11351 if (yychar <= YYEOF) 11352 { 11353 /* Return failure if at end of input. */ 11354 if (yychar == YYEOF) 11355 YYABORT; 11356 } 11357 else 11358 { 11359 yydestruct ("Error: discarding", 11360 yytoken, &yylval, parser); 11361 yychar = YYEMPTY; 11362 } 11363 } 11364 11365 /* Else will try to reuse lookahead token after shifting the error 11366 token. */ 11367 goto yyerrlab1; 11368 11369 11370 /*---------------------------------------------------. 11371 | yyerrorlab -- error raised explicitly by YYERROR. | 11372 `---------------------------------------------------*/ 11373 yyerrorlab: 11374 11375 /* Pacify compilers like GCC when the user code never invokes 11376 YYERROR and the label yyerrorlab therefore never appears in user 11377 code. */ 11378 if (/*CONSTCOND*/ 0) 11379 goto yyerrorlab; 11380 11381 /* Do not reclaim the symbols of the rule which action triggered 11382 this YYERROR. */ 11383 YYPOPSTACK (yylen); 11384 yylen = 0; 11385 YY_STACK_PRINT (yyss, yyssp); 11386 yystate = *yyssp; 11387 goto yyerrlab1; 11388 11389 11390 /*-------------------------------------------------------------. 11391 | yyerrlab1 -- common code for both syntax error and YYERROR. | 11392 `-------------------------------------------------------------*/ 11393 yyerrlab1: 11394 yyerrstatus = 3; /* Each real token shifted decrements this. */ 11395 11396 for (;;) 11397 { 11398 yyn = yypact[yystate]; 11399 if (!yypact_value_is_default (yyn)) 11400 { 11401 yyn += YYTERROR; 11402 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 11403 { 11404 yyn = yytable[yyn]; 11405 if (0 < yyn) 11406 break; 11407 } 11408 } 11409 11410 /* Pop the current state because it cannot handle the error token. */ 11411 if (yyssp == yyss) 11412 YYABORT; 11413 11414 11415 yydestruct ("Error: popping", 11416 yystos[yystate], yyvsp, parser); 11417 YYPOPSTACK (1); 11418 yystate = *yyssp; 11419 YY_STACK_PRINT (yyss, yyssp); 11420 } 11421 11422 *++yyvsp = yylval; 11423 11424 11425 /* Shift the error token. */ 11426 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 11427 11428 yystate = yyn; 11429 goto yynewstate; 11430 11431 11432 /*-------------------------------------. 11433 | yyacceptlab -- YYACCEPT comes here. | 11434 `-------------------------------------*/ 11435 yyacceptlab: 11436 yyresult = 0; 11437 goto yyreturn; 11438 11439 /*-----------------------------------. 11440 | yyabortlab -- YYABORT comes here. | 11441 `-----------------------------------*/ 11442 yyabortlab: 11443 yyresult = 1; 11444 goto yyreturn; 11445 11446 #if !defined(yyoverflow) || YYERROR_VERBOSE 11447 /*-------------------------------------------------. 11448 | yyexhaustedlab -- memory exhaustion comes here. | 11449 `-------------------------------------------------*/ 11450 yyexhaustedlab: 11451 parser_yyerror (parser, YY_("memory exhausted")); 11452 yyresult = 2; 11453 /* Fall through. */ 11454 #endif 11455 11456 yyreturn: 11457 if (yychar != YYEMPTY) 11458 { 11459 /* Make sure we have latest lookahead translation. See comments at 11460 user semantic actions for why this is necessary. */ 11461 yytoken = YYTRANSLATE (yychar); 11462 yydestruct ("Cleanup: discarding lookahead", 11463 yytoken, &yylval, parser); 11464 } 11465 /* Do not reclaim the symbols of the rule which action triggered 11466 this YYABORT or YYACCEPT. */ 11467 YYPOPSTACK (yylen); 11468 YY_STACK_PRINT (yyss, yyssp); 11469 while (yyssp != yyss) 11470 { 11471 yydestruct ("Cleanup: popping", 11472 yystos[*yyssp], yyvsp, parser); 11473 YYPOPSTACK (1); 11474 } 11475 #ifndef yyoverflow 11476 if (yyss != yyssa) 11477 YYSTACK_FREE (yyss); 11478 #endif 11479 #if YYERROR_VERBOSE 11480 if (yymsg != yymsgbuf) 11481 YYSTACK_FREE (yymsg); 11482 #endif 11483 /* Make sure YYID is used. */ 11484 return YYID (yyresult); 11485 } 11486 11487 11488 11489 /* Line 2067 of yacc.c */ 11490 #line 4997 "parse.y" 11491 11492 # undef parser 11493 # undef yylex 11494 # undef yylval 11495 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 11496 11497 static int parser_regx_options(struct parser_params*); 11498 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 11499 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 11500 static int parser_parse_string(struct parser_params*,NODE*); 11501 static int parser_here_document(struct parser_params*,NODE*); 11502 11503 11504 # define nextc() parser_nextc(parser) 11505 # define pushback(c) parser_pushback(parser, (c)) 11506 # define newtok() parser_newtok(parser) 11507 # define tokspace(n) parser_tokspace(parser, (n)) 11508 # define tokadd(c) parser_tokadd(parser, (c)) 11509 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 11510 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 11511 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 11512 # define regx_options() parser_regx_options(parser) 11513 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 11514 # define parse_string(n) parser_parse_string(parser,(n)) 11515 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 11516 # define here_document(n) parser_here_document(parser,(n)) 11517 # define heredoc_identifier() parser_heredoc_identifier(parser) 11518 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 11519 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 11520 11521 #ifndef RIPPER 11522 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 11523 # define set_yylval_num(x) (yylval.num = (x)) 11524 # define set_yylval_id(x) (yylval.id = (x)) 11525 # define set_yylval_name(x) (yylval.id = (x)) 11526 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 11527 # define set_yylval_node(x) (yylval.node = (x)) 11528 # define yylval_id() (yylval.id) 11529 #else 11530 static inline VALUE 11531 ripper_yylval_id(ID x) 11532 { 11533 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 11534 } 11535 # define set_yylval_str(x) (void)(x) 11536 # define set_yylval_num(x) (void)(x) 11537 # define set_yylval_id(x) (void)(x) 11538 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 11539 # define set_yylval_literal(x) (void)(x) 11540 # define set_yylval_node(x) (void)(x) 11541 # define yylval_id() yylval.id 11542 #endif 11543 11544 #ifndef RIPPER 11545 #define ripper_flush(p) (void)(p) 11546 #else 11547 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 11548 11549 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 11550 11551 static int 11552 ripper_has_scan_event(struct parser_params *parser) 11553 { 11554 11555 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 11556 return lex_p > parser->tokp; 11557 } 11558 11559 static VALUE 11560 ripper_scan_event_val(struct parser_params *parser, int t) 11561 { 11562 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 11563 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 11564 ripper_flush(parser); 11565 return rval; 11566 } 11567 11568 static void 11569 ripper_dispatch_scan_event(struct parser_params *parser, int t) 11570 { 11571 if (!ripper_has_scan_event(parser)) return; 11572 yylval_rval = ripper_scan_event_val(parser, t); 11573 } 11574 11575 static void 11576 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 11577 { 11578 if (!ripper_has_scan_event(parser)) return; 11579 (void)ripper_scan_event_val(parser, t); 11580 } 11581 11582 static void 11583 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 11584 { 11585 int saved_line = ruby_sourceline; 11586 const char *saved_tokp = parser->tokp; 11587 11588 ruby_sourceline = parser->delayed_line; 11589 parser->tokp = lex_pbeg + parser->delayed_col; 11590 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 11591 parser->delayed = Qnil; 11592 ruby_sourceline = saved_line; 11593 parser->tokp = saved_tokp; 11594 } 11595 #endif /* RIPPER */ 11596 11597 #include "ruby/regex.h" 11598 #include "ruby/util.h" 11599 11600 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 11601 since ours (we hope) works properly with all combinations of 11602 machines, compilers, `char' and `unsigned char' argument types. 11603 (Per Bothner suggested the basic approach.) */ 11604 #undef SIGN_EXTEND_CHAR 11605 #if __STDC__ 11606 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 11607 #else /* not __STDC__ */ 11608 /* As in Harbison and Steele. */ 11609 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 11610 #endif 11611 11612 #define parser_encoding_name() (current_enc->name) 11613 #define parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) 11614 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) 11615 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 11616 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) 11617 11618 #define parser_isascii() ISASCII(*(lex_p-1)) 11619 11620 #ifndef RIPPER 11621 static int 11622 token_info_get_column(struct parser_params *parser, const char *token) 11623 { 11624 int column = 1; 11625 const char *p, *pend = lex_p - strlen(token); 11626 for (p = lex_pbeg; p < pend; p++) { 11627 if (*p == '\t') { 11628 column = (((column - 1) / 8) + 1) * 8; 11629 } 11630 column++; 11631 } 11632 return column; 11633 } 11634 11635 static int 11636 token_info_has_nonspaces(struct parser_params *parser, const char *token) 11637 { 11638 const char *p, *pend = lex_p - strlen(token); 11639 for (p = lex_pbeg; p < pend; p++) { 11640 if (*p != ' ' && *p != '\t') { 11641 return 1; 11642 } 11643 } 11644 return 0; 11645 } 11646 11647 #undef token_info_push 11648 static void 11649 token_info_push(struct parser_params *parser, const char *token) 11650 { 11651 token_info *ptinfo; 11652 11653 if (!parser->parser_token_info_enabled) return; 11654 ptinfo = ALLOC(token_info); 11655 ptinfo->token = token; 11656 ptinfo->linenum = ruby_sourceline; 11657 ptinfo->column = token_info_get_column(parser, token); 11658 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 11659 ptinfo->next = parser->parser_token_info; 11660 11661 parser->parser_token_info = ptinfo; 11662 } 11663 11664 #undef token_info_pop 11665 static void 11666 token_info_pop(struct parser_params *parser, const char *token) 11667 { 11668 int linenum; 11669 token_info *ptinfo = parser->parser_token_info; 11670 11671 if (!ptinfo) return; 11672 parser->parser_token_info = ptinfo->next; 11673 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 11674 goto finish; 11675 } 11676 linenum = ruby_sourceline; 11677 if (linenum == ptinfo->linenum) { /* SKIP */ 11678 goto finish; 11679 } 11680 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 11681 goto finish; 11682 } 11683 if (parser->parser_token_info_enabled) { 11684 rb_compile_warn(ruby_sourcefile, linenum, 11685 "mismatched indentations at '%s' with '%s' at %d", 11686 token, ptinfo->token, ptinfo->linenum); 11687 } 11688 11689 finish: 11690 xfree(ptinfo); 11691 } 11692 #endif /* RIPPER */ 11693 11694 static int 11695 parser_yyerror(struct parser_params *parser, const char *msg) 11696 { 11697 #ifndef RIPPER 11698 const int max_line_margin = 30; 11699 const char *p, *pe; 11700 char *buf; 11701 long len; 11702 int i; 11703 11704 compile_error(PARSER_ARG "%s", msg); 11705 p = lex_p; 11706 while (lex_pbeg <= p) { 11707 if (*p == '\n') break; 11708 p--; 11709 } 11710 p++; 11711 11712 pe = lex_p; 11713 while (pe < lex_pend) { 11714 if (*pe == '\n') break; 11715 pe++; 11716 } 11717 11718 len = pe - p; 11719 if (len > 4) { 11720 char *p2; 11721 const char *pre = "", *post = ""; 11722 11723 if (len > max_line_margin * 2 + 10) { 11724 if (lex_p - p > max_line_margin) { 11725 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 11726 pre = "..."; 11727 } 11728 if (pe - lex_p > max_line_margin) { 11729 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 11730 post = "..."; 11731 } 11732 len = pe - p; 11733 } 11734 buf = ALLOCA_N(char, len+2); 11735 MEMCPY(buf, p, char, len); 11736 buf[len] = '\0'; 11737 rb_compile_error_append("%s%s%s", pre, buf, post); 11738 11739 i = (int)(lex_p - p); 11740 p2 = buf; pe = buf + len; 11741 11742 while (p2 < pe) { 11743 if (*p2 != '\t') *p2 = ' '; 11744 p2++; 11745 } 11746 buf[i] = '^'; 11747 buf[i+1] = '\0'; 11748 rb_compile_error_append("%s%s", pre, buf); 11749 } 11750 #else 11751 dispatch1(parse_error, STR_NEW2(msg)); 11752 #endif /* !RIPPER */ 11753 return 0; 11754 } 11755 11756 static void parser_prepare(struct parser_params *parser); 11757 11758 #ifndef RIPPER 11759 static VALUE 11760 debug_lines(VALUE fname) 11761 { 11762 ID script_lines; 11763 CONST_ID(script_lines, "SCRIPT_LINES__"); 11764 if (rb_const_defined_at(rb_cObject, script_lines)) { 11765 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 11766 if (RB_TYPE_P(hash, T_HASH)) { 11767 VALUE lines = rb_ary_new(); 11768 rb_hash_aset(hash, fname, lines); 11769 return lines; 11770 } 11771 } 11772 return 0; 11773 } 11774 11775 static VALUE 11776 coverage(VALUE fname, int n) 11777 { 11778 VALUE coverages = rb_get_coverages(); 11779 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 11780 VALUE lines = rb_ary_new2(n); 11781 int i; 11782 RBASIC(lines)->klass = 0; 11783 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 11784 RARRAY(lines)->as.heap.len = n; 11785 rb_hash_aset(coverages, fname, lines); 11786 return lines; 11787 } 11788 return 0; 11789 } 11790 11791 static int 11792 e_option_supplied(struct parser_params *parser) 11793 { 11794 return strcmp(ruby_sourcefile, "-e") == 0; 11795 } 11796 11797 static VALUE 11798 yycompile0(VALUE arg) 11799 { 11800 int n; 11801 NODE *tree; 11802 struct parser_params *parser = (struct parser_params *)arg; 11803 11804 if (!compile_for_eval && rb_safe_level() == 0) { 11805 ruby_debug_lines = debug_lines(ruby_sourcefile_string); 11806 if (ruby_debug_lines && ruby_sourceline > 0) { 11807 VALUE str = STR_NEW0(); 11808 n = ruby_sourceline; 11809 do { 11810 rb_ary_push(ruby_debug_lines, str); 11811 } while (--n); 11812 } 11813 11814 if (!e_option_supplied(parser)) { 11815 ruby_coverage = coverage(ruby_sourcefile_string, ruby_sourceline); 11816 } 11817 } 11818 11819 parser_prepare(parser); 11820 deferred_nodes = 0; 11821 #ifndef RIPPER 11822 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 11823 #endif 11824 #ifndef RIPPER 11825 if (RUBY_DTRACE_PARSE_BEGIN_ENABLED()) { 11826 RUBY_DTRACE_PARSE_BEGIN(parser->parser_ruby_sourcefile, 11827 parser->parser_ruby_sourceline); 11828 } 11829 #endif 11830 n = yyparse((void*)parser); 11831 #ifndef RIPPER 11832 if (RUBY_DTRACE_PARSE_END_ENABLED()) { 11833 RUBY_DTRACE_PARSE_END(parser->parser_ruby_sourcefile, 11834 parser->parser_ruby_sourceline); 11835 } 11836 #endif 11837 ruby_debug_lines = 0; 11838 ruby_coverage = 0; 11839 compile_for_eval = 0; 11840 11841 lex_strterm = 0; 11842 lex_p = lex_pbeg = lex_pend = 0; 11843 lex_lastline = lex_nextline = 0; 11844 if (parser->nerr) { 11845 return 0; 11846 } 11847 tree = ruby_eval_tree; 11848 if (!tree) { 11849 tree = NEW_NIL(); 11850 } 11851 else if (ruby_eval_tree_begin) { 11852 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 11853 } 11854 return (VALUE)tree; 11855 } 11856 11857 static NODE* 11858 yycompile(struct parser_params *parser, VALUE fname, int line) 11859 { 11860 ruby_sourcefile_string = rb_str_new_frozen(fname); 11861 ruby_sourcefile = RSTRING_PTR(fname); 11862 ruby_sourceline = line - 1; 11863 return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser); 11864 } 11865 #endif /* !RIPPER */ 11866 11867 static rb_encoding * 11868 must_be_ascii_compatible(VALUE s) 11869 { 11870 rb_encoding *enc = rb_enc_get(s); 11871 if (!rb_enc_asciicompat(enc)) { 11872 rb_raise(rb_eArgError, "invalid source encoding"); 11873 } 11874 return enc; 11875 } 11876 11877 static VALUE 11878 lex_get_str(struct parser_params *parser, VALUE s) 11879 { 11880 char *beg, *end, *pend; 11881 rb_encoding *enc = must_be_ascii_compatible(s); 11882 11883 beg = RSTRING_PTR(s); 11884 if (lex_gets_ptr) { 11885 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11886 beg += lex_gets_ptr; 11887 } 11888 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11889 end = beg; 11890 while (end < pend) { 11891 if (*end++ == '\n') break; 11892 } 11893 lex_gets_ptr = end - RSTRING_PTR(s); 11894 return rb_enc_str_new(beg, end - beg, enc); 11895 } 11896 11897 static VALUE 11898 lex_getline(struct parser_params *parser) 11899 { 11900 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11901 if (NIL_P(line)) return line; 11902 must_be_ascii_compatible(line); 11903 #ifndef RIPPER 11904 if (ruby_debug_lines) { 11905 rb_enc_associate(line, current_enc); 11906 rb_ary_push(ruby_debug_lines, line); 11907 } 11908 if (ruby_coverage) { 11909 rb_ary_push(ruby_coverage, Qnil); 11910 } 11911 #endif 11912 return line; 11913 } 11914 11915 #ifdef RIPPER 11916 static rb_data_type_t parser_data_type; 11917 #else 11918 static const rb_data_type_t parser_data_type; 11919 11920 static NODE* 11921 parser_compile_string(volatile VALUE vparser, VALUE fname, VALUE s, int line) 11922 { 11923 struct parser_params *parser; 11924 NODE *node; 11925 11926 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11927 lex_gets = lex_get_str; 11928 lex_gets_ptr = 0; 11929 lex_input = s; 11930 lex_pbeg = lex_p = lex_pend = 0; 11931 compile_for_eval = rb_parse_in_eval(); 11932 11933 node = yycompile(parser, fname, line); 11934 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 11935 11936 return node; 11937 } 11938 11939 NODE* 11940 rb_compile_string(const char *f, VALUE s, int line) 11941 { 11942 must_be_ascii_compatible(s); 11943 return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line); 11944 } 11945 11946 NODE* 11947 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11948 { 11949 return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line); 11950 } 11951 11952 NODE* 11953 rb_parser_compile_string_path(volatile VALUE vparser, VALUE f, VALUE s, int line) 11954 { 11955 must_be_ascii_compatible(s); 11956 return parser_compile_string(vparser, f, s, line); 11957 } 11958 11959 NODE* 11960 rb_compile_cstr(const char *f, const char *s, int len, int line) 11961 { 11962 VALUE str = rb_str_new(s, len); 11963 return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line); 11964 } 11965 11966 NODE* 11967 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 11968 { 11969 VALUE str = rb_str_new(s, len); 11970 return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line); 11971 } 11972 11973 static VALUE 11974 lex_io_gets(struct parser_params *parser, VALUE io) 11975 { 11976 return rb_io_gets(io); 11977 } 11978 11979 NODE* 11980 rb_compile_file(const char *f, VALUE file, int start) 11981 { 11982 VALUE volatile vparser = rb_parser_new(); 11983 11984 return rb_parser_compile_file(vparser, f, file, start); 11985 } 11986 11987 NODE* 11988 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 11989 { 11990 return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start); 11991 } 11992 11993 NODE* 11994 rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE file, int start) 11995 { 11996 struct parser_params *parser; 11997 NODE *node; 11998 11999 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12000 lex_gets = lex_io_gets; 12001 lex_input = file; 12002 lex_pbeg = lex_p = lex_pend = 0; 12003 compile_for_eval = rb_parse_in_eval(); 12004 12005 node = yycompile(parser, fname, start); 12006 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12007 12008 return node; 12009 } 12010 #endif /* !RIPPER */ 12011 12012 #define STR_FUNC_ESCAPE 0x01 12013 #define STR_FUNC_EXPAND 0x02 12014 #define STR_FUNC_REGEXP 0x04 12015 #define STR_FUNC_QWORDS 0x08 12016 #define STR_FUNC_SYMBOL 0x10 12017 #define STR_FUNC_INDENT 0x20 12018 12019 enum string_type { 12020 str_squote = (0), 12021 str_dquote = (STR_FUNC_EXPAND), 12022 str_xquote = (STR_FUNC_EXPAND), 12023 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 12024 str_sword = (STR_FUNC_QWORDS), 12025 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 12026 str_ssym = (STR_FUNC_SYMBOL), 12027 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 12028 }; 12029 12030 static VALUE 12031 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 12032 { 12033 VALUE str; 12034 12035 str = rb_enc_str_new(p, n, enc); 12036 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 12037 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 12038 } 12039 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 12040 rb_enc_associate(str, rb_ascii8bit_encoding()); 12041 } 12042 } 12043 12044 return str; 12045 } 12046 12047 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 12048 #define lex_eol_p() (lex_p >= lex_pend) 12049 #define peek(c) peek_n((c), 0) 12050 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 12051 12052 static inline int 12053 parser_nextc(struct parser_params *parser) 12054 { 12055 int c; 12056 12057 if (lex_p == lex_pend) { 12058 VALUE v = lex_nextline; 12059 lex_nextline = 0; 12060 if (!v) { 12061 if (parser->eofp) 12062 return -1; 12063 12064 if (!lex_input || NIL_P(v = lex_getline(parser))) { 12065 parser->eofp = Qtrue; 12066 lex_goto_eol(parser); 12067 return -1; 12068 } 12069 } 12070 { 12071 #ifdef RIPPER 12072 if (parser->tokp < lex_pend) { 12073 if (NIL_P(parser->delayed)) { 12074 parser->delayed = rb_str_buf_new(1024); 12075 rb_enc_associate(parser->delayed, current_enc); 12076 rb_str_buf_cat(parser->delayed, 12077 parser->tokp, lex_pend - parser->tokp); 12078 parser->delayed_line = ruby_sourceline; 12079 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 12080 } 12081 else { 12082 rb_str_buf_cat(parser->delayed, 12083 parser->tokp, lex_pend - parser->tokp); 12084 } 12085 } 12086 #endif 12087 if (heredoc_end > 0) { 12088 ruby_sourceline = heredoc_end; 12089 heredoc_end = 0; 12090 } 12091 ruby_sourceline++; 12092 parser->line_count++; 12093 lex_pbeg = lex_p = RSTRING_PTR(v); 12094 lex_pend = lex_p + RSTRING_LEN(v); 12095 ripper_flush(parser); 12096 lex_lastline = v; 12097 } 12098 } 12099 c = (unsigned char)*lex_p++; 12100 if (c == '\r' && peek('\n')) { 12101 lex_p++; 12102 c = '\n'; 12103 } 12104 12105 return c; 12106 } 12107 12108 static void 12109 parser_pushback(struct parser_params *parser, int c) 12110 { 12111 if (c == -1) return; 12112 lex_p--; 12113 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 12114 lex_p--; 12115 } 12116 } 12117 12118 #define was_bol() (lex_p == lex_pbeg + 1) 12119 12120 #define tokfix() (tokenbuf[tokidx]='\0') 12121 #define tok() tokenbuf 12122 #define toklen() tokidx 12123 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 12124 12125 static char* 12126 parser_newtok(struct parser_params *parser) 12127 { 12128 tokidx = 0; 12129 tokline = ruby_sourceline; 12130 if (!tokenbuf) { 12131 toksiz = 60; 12132 tokenbuf = ALLOC_N(char, 60); 12133 } 12134 if (toksiz > 4096) { 12135 toksiz = 60; 12136 REALLOC_N(tokenbuf, char, 60); 12137 } 12138 return tokenbuf; 12139 } 12140 12141 static char * 12142 parser_tokspace(struct parser_params *parser, int n) 12143 { 12144 tokidx += n; 12145 12146 if (tokidx >= toksiz) { 12147 do {toksiz *= 2;} while (toksiz < tokidx); 12148 REALLOC_N(tokenbuf, char, toksiz); 12149 } 12150 return &tokenbuf[tokidx-n]; 12151 } 12152 12153 static void 12154 parser_tokadd(struct parser_params *parser, int c) 12155 { 12156 tokenbuf[tokidx++] = (char)c; 12157 if (tokidx >= toksiz) { 12158 toksiz *= 2; 12159 REALLOC_N(tokenbuf, char, toksiz); 12160 } 12161 } 12162 12163 static int 12164 parser_tok_hex(struct parser_params *parser, size_t *numlen) 12165 { 12166 int c; 12167 12168 c = scan_hex(lex_p, 2, numlen); 12169 if (!*numlen) { 12170 yyerror("invalid hex escape"); 12171 return 0; 12172 } 12173 lex_p += *numlen; 12174 return c; 12175 } 12176 12177 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 12178 12179 /* return value is for ?\u3042 */ 12180 static int 12181 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 12182 int string_literal, int symbol_literal, int regexp_literal) 12183 { 12184 /* 12185 * If string_literal is true, then we allow multiple codepoints 12186 * in \u{}, and add the codepoints to the current token. 12187 * Otherwise we're parsing a character literal and return a single 12188 * codepoint without adding it 12189 */ 12190 12191 int codepoint; 12192 size_t numlen; 12193 12194 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 12195 12196 if (peek('{')) { /* handle \u{...} form */ 12197 do { 12198 if (regexp_literal) { tokadd(*lex_p); } 12199 nextc(); 12200 codepoint = scan_hex(lex_p, 6, &numlen); 12201 if (numlen == 0) { 12202 yyerror("invalid Unicode escape"); 12203 return 0; 12204 } 12205 if (codepoint > 0x10ffff) { 12206 yyerror("invalid Unicode codepoint (too large)"); 12207 return 0; 12208 } 12209 lex_p += numlen; 12210 if (regexp_literal) { 12211 tokcopy((int)numlen); 12212 } 12213 else if (codepoint >= 0x80) { 12214 *encp = rb_utf8_encoding(); 12215 if (string_literal) tokaddmbc(codepoint, *encp); 12216 } 12217 else if (string_literal) { 12218 tokadd(codepoint); 12219 } 12220 } while (string_literal && (peek(' ') || peek('\t'))); 12221 12222 if (!peek('}')) { 12223 yyerror("unterminated Unicode escape"); 12224 return 0; 12225 } 12226 12227 if (regexp_literal) { tokadd('}'); } 12228 nextc(); 12229 } 12230 else { /* handle \uxxxx form */ 12231 codepoint = scan_hex(lex_p, 4, &numlen); 12232 if (numlen < 4) { 12233 yyerror("invalid Unicode escape"); 12234 return 0; 12235 } 12236 lex_p += 4; 12237 if (regexp_literal) { 12238 tokcopy(4); 12239 } 12240 else if (codepoint >= 0x80) { 12241 *encp = rb_utf8_encoding(); 12242 if (string_literal) tokaddmbc(codepoint, *encp); 12243 } 12244 else if (string_literal) { 12245 tokadd(codepoint); 12246 } 12247 } 12248 12249 return codepoint; 12250 } 12251 12252 #define ESCAPE_CONTROL 1 12253 #define ESCAPE_META 2 12254 12255 static int 12256 parser_read_escape(struct parser_params *parser, int flags, 12257 rb_encoding **encp) 12258 { 12259 int c; 12260 size_t numlen; 12261 12262 switch (c = nextc()) { 12263 case '\\': /* Backslash */ 12264 return c; 12265 12266 case 'n': /* newline */ 12267 return '\n'; 12268 12269 case 't': /* horizontal tab */ 12270 return '\t'; 12271 12272 case 'r': /* carriage-return */ 12273 return '\r'; 12274 12275 case 'f': /* form-feed */ 12276 return '\f'; 12277 12278 case 'v': /* vertical tab */ 12279 return '\13'; 12280 12281 case 'a': /* alarm(bell) */ 12282 return '\007'; 12283 12284 case 'e': /* escape */ 12285 return 033; 12286 12287 case '0': case '1': case '2': case '3': /* octal constant */ 12288 case '4': case '5': case '6': case '7': 12289 pushback(c); 12290 c = scan_oct(lex_p, 3, &numlen); 12291 lex_p += numlen; 12292 return c; 12293 12294 case 'x': /* hex constant */ 12295 c = tok_hex(&numlen); 12296 if (numlen == 0) return 0; 12297 return c; 12298 12299 case 'b': /* backspace */ 12300 return '\010'; 12301 12302 case 's': /* space */ 12303 return ' '; 12304 12305 case 'M': 12306 if (flags & ESCAPE_META) goto eof; 12307 if ((c = nextc()) != '-') { 12308 pushback(c); 12309 goto eof; 12310 } 12311 if ((c = nextc()) == '\\') { 12312 if (peek('u')) goto eof; 12313 return read_escape(flags|ESCAPE_META, encp) | 0x80; 12314 } 12315 else if (c == -1 || !ISASCII(c)) goto eof; 12316 else { 12317 return ((c & 0xff) | 0x80); 12318 } 12319 12320 case 'C': 12321 if ((c = nextc()) != '-') { 12322 pushback(c); 12323 goto eof; 12324 } 12325 case 'c': 12326 if (flags & ESCAPE_CONTROL) goto eof; 12327 if ((c = nextc())== '\\') { 12328 if (peek('u')) goto eof; 12329 c = read_escape(flags|ESCAPE_CONTROL, encp); 12330 } 12331 else if (c == '?') 12332 return 0177; 12333 else if (c == -1 || !ISASCII(c)) goto eof; 12334 return c & 0x9f; 12335 12336 eof: 12337 case -1: 12338 yyerror("Invalid escape character syntax"); 12339 return '\0'; 12340 12341 default: 12342 return c; 12343 } 12344 } 12345 12346 static void 12347 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 12348 { 12349 int len = rb_enc_codelen(c, enc); 12350 rb_enc_mbcput(c, tokspace(len), enc); 12351 } 12352 12353 static int 12354 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 12355 { 12356 int c; 12357 int flags = 0; 12358 size_t numlen; 12359 12360 first: 12361 switch (c = nextc()) { 12362 case '\n': 12363 return 0; /* just ignore */ 12364 12365 case '0': case '1': case '2': case '3': /* octal constant */ 12366 case '4': case '5': case '6': case '7': 12367 { 12368 ruby_scan_oct(--lex_p, 3, &numlen); 12369 if (numlen == 0) goto eof; 12370 lex_p += numlen; 12371 tokcopy((int)numlen + 1); 12372 } 12373 return 0; 12374 12375 case 'x': /* hex constant */ 12376 { 12377 tok_hex(&numlen); 12378 if (numlen == 0) return -1; 12379 tokcopy((int)numlen + 2); 12380 } 12381 return 0; 12382 12383 case 'M': 12384 if (flags & ESCAPE_META) goto eof; 12385 if ((c = nextc()) != '-') { 12386 pushback(c); 12387 goto eof; 12388 } 12389 tokcopy(3); 12390 flags |= ESCAPE_META; 12391 goto escaped; 12392 12393 case 'C': 12394 if (flags & ESCAPE_CONTROL) goto eof; 12395 if ((c = nextc()) != '-') { 12396 pushback(c); 12397 goto eof; 12398 } 12399 tokcopy(3); 12400 goto escaped; 12401 12402 case 'c': 12403 if (flags & ESCAPE_CONTROL) goto eof; 12404 tokcopy(2); 12405 flags |= ESCAPE_CONTROL; 12406 escaped: 12407 if ((c = nextc()) == '\\') { 12408 goto first; 12409 } 12410 else if (c == -1) goto eof; 12411 tokadd(c); 12412 return 0; 12413 12414 eof: 12415 case -1: 12416 yyerror("Invalid escape character syntax"); 12417 return -1; 12418 12419 default: 12420 tokadd('\\'); 12421 tokadd(c); 12422 } 12423 return 0; 12424 } 12425 12426 static int 12427 parser_regx_options(struct parser_params *parser) 12428 { 12429 int kcode = 0; 12430 int kopt = 0; 12431 int options = 0; 12432 int c, opt, kc; 12433 12434 newtok(); 12435 while (c = nextc(), ISALPHA(c)) { 12436 if (c == 'o') { 12437 options |= RE_OPTION_ONCE; 12438 } 12439 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 12440 if (kc >= 0) { 12441 if (kc != rb_ascii8bit_encindex()) kcode = c; 12442 kopt = opt; 12443 } 12444 else { 12445 options |= opt; 12446 } 12447 } 12448 else { 12449 tokadd(c); 12450 } 12451 } 12452 options |= kopt; 12453 pushback(c); 12454 if (toklen()) { 12455 tokfix(); 12456 compile_error(PARSER_ARG "unknown regexp option%s - %s", 12457 toklen() > 1 ? "s" : "", tok()); 12458 } 12459 return options | RE_OPTION_ENCODING(kcode); 12460 } 12461 12462 static void 12463 dispose_string(VALUE str) 12464 { 12465 rb_str_free(str); 12466 rb_gc_force_recycle(str); 12467 } 12468 12469 static int 12470 parser_tokadd_mbchar(struct parser_params *parser, int c) 12471 { 12472 int len = parser_precise_mbclen(); 12473 if (!MBCLEN_CHARFOUND_P(len)) { 12474 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 12475 return -1; 12476 } 12477 tokadd(c); 12478 lex_p += --len; 12479 if (len > 0) tokcopy(len); 12480 return c; 12481 } 12482 12483 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 12484 12485 static inline int 12486 simple_re_meta(int c) 12487 { 12488 switch (c) { 12489 case '$': case '*': case '+': case '.': 12490 case '?': case '^': case '|': 12491 case ')': case ']': case '}': case '>': 12492 return TRUE; 12493 default: 12494 return FALSE; 12495 } 12496 } 12497 12498 static int 12499 parser_tokadd_string(struct parser_params *parser, 12500 int func, int term, int paren, long *nest, 12501 rb_encoding **encp) 12502 { 12503 int c; 12504 int has_nonascii = 0; 12505 rb_encoding *enc = *encp; 12506 char *errbuf = 0; 12507 static const char mixed_msg[] = "%s mixed within %s source"; 12508 12509 #define mixed_error(enc1, enc2) if (!errbuf) { \ 12510 size_t len = sizeof(mixed_msg) - 4; \ 12511 len += strlen(rb_enc_name(enc1)); \ 12512 len += strlen(rb_enc_name(enc2)); \ 12513 errbuf = ALLOCA_N(char, len); \ 12514 snprintf(errbuf, len, mixed_msg, \ 12515 rb_enc_name(enc1), \ 12516 rb_enc_name(enc2)); \ 12517 yyerror(errbuf); \ 12518 } 12519 #define mixed_escape(beg, enc1, enc2) do { \ 12520 const char *pos = lex_p; \ 12521 lex_p = (beg); \ 12522 mixed_error((enc1), (enc2)); \ 12523 lex_p = pos; \ 12524 } while (0) 12525 12526 while ((c = nextc()) != -1) { 12527 if (paren && c == paren) { 12528 ++*nest; 12529 } 12530 else if (c == term) { 12531 if (!nest || !*nest) { 12532 pushback(c); 12533 break; 12534 } 12535 --*nest; 12536 } 12537 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 12538 int c2 = *lex_p; 12539 if (c2 == '$' || c2 == '@' || c2 == '{') { 12540 pushback(c); 12541 break; 12542 } 12543 } 12544 else if (c == '\\') { 12545 const char *beg = lex_p - 1; 12546 c = nextc(); 12547 switch (c) { 12548 case '\n': 12549 if (func & STR_FUNC_QWORDS) break; 12550 if (func & STR_FUNC_EXPAND) continue; 12551 tokadd('\\'); 12552 break; 12553 12554 case '\\': 12555 if (func & STR_FUNC_ESCAPE) tokadd(c); 12556 break; 12557 12558 case 'u': 12559 if ((func & STR_FUNC_EXPAND) == 0) { 12560 tokadd('\\'); 12561 break; 12562 } 12563 parser_tokadd_utf8(parser, &enc, 1, 12564 func & STR_FUNC_SYMBOL, 12565 func & STR_FUNC_REGEXP); 12566 if (has_nonascii && enc != *encp) { 12567 mixed_escape(beg, enc, *encp); 12568 } 12569 continue; 12570 12571 default: 12572 if (c == -1) return -1; 12573 if (!ISASCII(c)) { 12574 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 12575 goto non_ascii; 12576 } 12577 if (func & STR_FUNC_REGEXP) { 12578 if (c == term && !simple_re_meta(c)) { 12579 tokadd(c); 12580 continue; 12581 } 12582 pushback(c); 12583 if ((c = tokadd_escape(&enc)) < 0) 12584 return -1; 12585 if (has_nonascii && enc != *encp) { 12586 mixed_escape(beg, enc, *encp); 12587 } 12588 continue; 12589 } 12590 else if (func & STR_FUNC_EXPAND) { 12591 pushback(c); 12592 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 12593 c = read_escape(0, &enc); 12594 } 12595 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12596 /* ignore backslashed spaces in %w */ 12597 } 12598 else if (c != term && !(paren && c == paren)) { 12599 tokadd('\\'); 12600 pushback(c); 12601 continue; 12602 } 12603 } 12604 } 12605 else if (!parser_isascii()) { 12606 non_ascii: 12607 has_nonascii = 1; 12608 if (enc != *encp) { 12609 mixed_error(enc, *encp); 12610 continue; 12611 } 12612 if (tokadd_mbchar(c) == -1) return -1; 12613 continue; 12614 } 12615 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12616 pushback(c); 12617 break; 12618 } 12619 if (c & 0x80) { 12620 has_nonascii = 1; 12621 if (enc != *encp) { 12622 mixed_error(enc, *encp); 12623 continue; 12624 } 12625 } 12626 tokadd(c); 12627 } 12628 *encp = enc; 12629 return c; 12630 } 12631 12632 #define NEW_STRTERM(func, term, paren) \ 12633 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 12634 12635 #ifdef RIPPER 12636 static void 12637 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc) 12638 { 12639 if (!NIL_P(parser->delayed)) { 12640 ptrdiff_t len = lex_p - parser->tokp; 12641 if (len > 0) { 12642 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 12643 } 12644 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12645 parser->tokp = lex_p; 12646 } 12647 } 12648 12649 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc)) 12650 #else 12651 #define flush_string_content(enc) ((void)(enc)) 12652 #endif 12653 12654 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32]; 12655 /* this can be shared with ripper, since it's independent from struct 12656 * parser_params. */ 12657 #ifndef RIPPER 12658 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) 12659 #define SPECIAL_PUNCT(idx) ( \ 12660 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \ 12661 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \ 12662 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \ 12663 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \ 12664 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \ 12665 BIT('0', idx)) 12666 const unsigned int ruby_global_name_punct_bits[] = { 12667 SPECIAL_PUNCT(0), 12668 SPECIAL_PUNCT(1), 12669 SPECIAL_PUNCT(2), 12670 }; 12671 #undef BIT 12672 #undef SPECIAL_PUNCT 12673 #endif 12674 12675 static inline int 12676 is_global_name_punct(const char c) 12677 { 12678 if (c <= 0x20 || 0x7e < c) return 0; 12679 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1; 12680 } 12681 12682 static int 12683 parser_peek_variable_name(struct parser_params *parser) 12684 { 12685 int c; 12686 const char *p = lex_p; 12687 12688 if (p + 1 >= lex_pend) return 0; 12689 c = *p++; 12690 switch (c) { 12691 case '$': 12692 if ((c = *p) == '-') { 12693 if (++p >= lex_pend) return 0; 12694 c = *p; 12695 } 12696 else if (is_global_name_punct(c) || ISDIGIT(c)) { 12697 return tSTRING_DVAR; 12698 } 12699 break; 12700 case '@': 12701 if ((c = *p) == '@') { 12702 if (++p >= lex_pend) return 0; 12703 c = *p; 12704 } 12705 break; 12706 case '{': 12707 lex_p = p; 12708 command_start = TRUE; 12709 return tSTRING_DBEG; 12710 default: 12711 return 0; 12712 } 12713 if (!ISASCII(c) || c == '_' || ISALPHA(c)) 12714 return tSTRING_DVAR; 12715 return 0; 12716 } 12717 12718 static int 12719 parser_parse_string(struct parser_params *parser, NODE *quote) 12720 { 12721 int func = (int)quote->nd_func; 12722 int term = nd_term(quote); 12723 int paren = nd_paren(quote); 12724 int c, space = 0; 12725 rb_encoding *enc = current_enc; 12726 12727 if (func == -1) return tSTRING_END; 12728 c = nextc(); 12729 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12730 do {c = nextc();} while (ISSPACE(c)); 12731 space = 1; 12732 } 12733 if (c == term && !quote->nd_nest) { 12734 if (func & STR_FUNC_QWORDS) { 12735 quote->nd_func = -1; 12736 return ' '; 12737 } 12738 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 12739 set_yylval_num(regx_options()); 12740 return tREGEXP_END; 12741 } 12742 if (space) { 12743 pushback(c); 12744 return ' '; 12745 } 12746 newtok(); 12747 if ((func & STR_FUNC_EXPAND) && c == '#') { 12748 int t = parser_peek_variable_name(parser); 12749 if (t) return t; 12750 tokadd('#'); 12751 c = nextc(); 12752 } 12753 pushback(c); 12754 if (tokadd_string(func, term, paren, "e->nd_nest, 12755 &enc) == -1) { 12756 ruby_sourceline = nd_line(quote); 12757 if (func & STR_FUNC_REGEXP) { 12758 if (parser->eofp) 12759 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 12760 return tREGEXP_END; 12761 } 12762 else { 12763 if (parser->eofp) 12764 compile_error(PARSER_ARG "unterminated string meets end of file"); 12765 return tSTRING_END; 12766 } 12767 } 12768 12769 tokfix(); 12770 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12771 flush_string_content(enc); 12772 12773 return tSTRING_CONTENT; 12774 } 12775 12776 static int 12777 parser_heredoc_identifier(struct parser_params *parser) 12778 { 12779 int c = nextc(), term, func = 0; 12780 long len; 12781 12782 if (c == '-') { 12783 c = nextc(); 12784 func = STR_FUNC_INDENT; 12785 } 12786 switch (c) { 12787 case '\'': 12788 func |= str_squote; goto quoted; 12789 case '"': 12790 func |= str_dquote; goto quoted; 12791 case '`': 12792 func |= str_xquote; 12793 quoted: 12794 newtok(); 12795 tokadd(func); 12796 term = c; 12797 while ((c = nextc()) != -1 && c != term) { 12798 if (tokadd_mbchar(c) == -1) return 0; 12799 } 12800 if (c == -1) { 12801 compile_error(PARSER_ARG "unterminated here document identifier"); 12802 return 0; 12803 } 12804 break; 12805 12806 default: 12807 if (!parser_is_identchar()) { 12808 pushback(c); 12809 if (func & STR_FUNC_INDENT) { 12810 pushback('-'); 12811 } 12812 return 0; 12813 } 12814 newtok(); 12815 term = '"'; 12816 tokadd(func |= str_dquote); 12817 do { 12818 if (tokadd_mbchar(c) == -1) return 0; 12819 } while ((c = nextc()) != -1 && parser_is_identchar()); 12820 pushback(c); 12821 break; 12822 } 12823 12824 tokfix(); 12825 #ifdef RIPPER 12826 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 12827 #endif 12828 len = lex_p - lex_pbeg; 12829 lex_goto_eol(parser); 12830 lex_strterm = rb_node_newnode(NODE_HEREDOC, 12831 STR_NEW(tok(), toklen()), /* nd_lit */ 12832 len, /* nd_nth */ 12833 lex_lastline); /* nd_orig */ 12834 nd_set_line(lex_strterm, ruby_sourceline); 12835 ripper_flush(parser); 12836 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 12837 } 12838 12839 static void 12840 parser_heredoc_restore(struct parser_params *parser, NODE *here) 12841 { 12842 VALUE line; 12843 12844 line = here->nd_orig; 12845 lex_lastline = line; 12846 lex_pbeg = RSTRING_PTR(line); 12847 lex_pend = lex_pbeg + RSTRING_LEN(line); 12848 lex_p = lex_pbeg + here->nd_nth; 12849 heredoc_end = ruby_sourceline; 12850 ruby_sourceline = nd_line(here); 12851 dispose_string(here->nd_lit); 12852 rb_gc_force_recycle((VALUE)here); 12853 ripper_flush(parser); 12854 } 12855 12856 static int 12857 parser_whole_match_p(struct parser_params *parser, 12858 const char *eos, long len, int indent) 12859 { 12860 const char *p = lex_pbeg; 12861 long n; 12862 12863 if (indent) { 12864 while (*p && ISSPACE(*p)) p++; 12865 } 12866 n = lex_pend - (p + len); 12867 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 12868 return strncmp(eos, p, len) == 0; 12869 } 12870 12871 #ifdef RIPPER 12872 static void 12873 ripper_dispatch_heredoc_end(struct parser_params *parser) 12874 { 12875 if (!NIL_P(parser->delayed)) 12876 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12877 lex_goto_eol(parser); 12878 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12879 } 12880 12881 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 12882 #else 12883 #define dispatch_heredoc_end() ((void)0) 12884 #endif 12885 12886 static int 12887 parser_here_document(struct parser_params *parser, NODE *here) 12888 { 12889 int c, func, indent = 0; 12890 const char *eos, *p, *pend; 12891 long len; 12892 VALUE str = 0; 12893 rb_encoding *enc = current_enc; 12894 12895 eos = RSTRING_PTR(here->nd_lit); 12896 len = RSTRING_LEN(here->nd_lit) - 1; 12897 indent = (func = *eos++) & STR_FUNC_INDENT; 12898 12899 if ((c = nextc()) == -1) { 12900 error: 12901 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12902 #ifdef RIPPER 12903 if (NIL_P(parser->delayed)) { 12904 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12905 } 12906 else { 12907 if (str || 12908 ((len = lex_p - parser->tokp) > 0 && 12909 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 12910 rb_str_append(parser->delayed, str); 12911 } 12912 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12913 } 12914 lex_goto_eol(parser); 12915 #endif 12916 restore: 12917 heredoc_restore(lex_strterm); 12918 lex_strterm = 0; 12919 return 0; 12920 } 12921 if (was_bol() && whole_match_p(eos, len, indent)) { 12922 dispatch_heredoc_end(); 12923 heredoc_restore(lex_strterm); 12924 return tSTRING_END; 12925 } 12926 12927 if (!(func & STR_FUNC_EXPAND)) { 12928 do { 12929 p = RSTRING_PTR(lex_lastline); 12930 pend = lex_pend; 12931 if (pend > p) { 12932 switch (pend[-1]) { 12933 case '\n': 12934 if (--pend == p || pend[-1] != '\r') { 12935 pend++; 12936 break; 12937 } 12938 case '\r': 12939 --pend; 12940 } 12941 } 12942 if (str) 12943 rb_str_cat(str, p, pend - p); 12944 else 12945 str = STR_NEW(p, pend - p); 12946 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 12947 lex_goto_eol(parser); 12948 if (nextc() == -1) { 12949 if (str) dispose_string(str); 12950 goto error; 12951 } 12952 } while (!whole_match_p(eos, len, indent)); 12953 } 12954 else { 12955 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 12956 newtok(); 12957 if (c == '#') { 12958 int t = parser_peek_variable_name(parser); 12959 if (t) return t; 12960 tokadd('#'); 12961 c = nextc(); 12962 } 12963 do { 12964 pushback(c); 12965 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 12966 if (parser->eofp) goto error; 12967 goto restore; 12968 } 12969 if (c != '\n') { 12970 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12971 flush_string_content(enc); 12972 return tSTRING_CONTENT; 12973 } 12974 tokadd(nextc()); 12975 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 12976 if ((c = nextc()) == -1) goto error; 12977 } while (!whole_match_p(eos, len, indent)); 12978 str = STR_NEW3(tok(), toklen(), enc, func); 12979 } 12980 dispatch_heredoc_end(); 12981 heredoc_restore(lex_strterm); 12982 lex_strterm = NEW_STRTERM(-1, 0, 0); 12983 set_yylval_str(str); 12984 return tSTRING_CONTENT; 12985 } 12986 12987 #include "lex.c" 12988 12989 static void 12990 arg_ambiguous_gen(struct parser_params *parser) 12991 { 12992 #ifndef RIPPER 12993 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 12994 #else 12995 dispatch0(arg_ambiguous); 12996 #endif 12997 } 12998 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 12999 13000 static ID 13001 formal_argument_gen(struct parser_params *parser, ID lhs) 13002 { 13003 #ifndef RIPPER 13004 if (!is_local_id(lhs)) 13005 yyerror("formal argument must be local variable"); 13006 #endif 13007 shadowing_lvar(lhs); 13008 return lhs; 13009 } 13010 13011 static int 13012 lvar_defined_gen(struct parser_params *parser, ID id) 13013 { 13014 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 13015 } 13016 13017 /* emacsen -*- hack */ 13018 static long 13019 parser_encode_length(struct parser_params *parser, const char *name, long len) 13020 { 13021 long nlen; 13022 13023 if (len > 5 && name[nlen = len - 5] == '-') { 13024 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 13025 return nlen; 13026 } 13027 if (len > 4 && name[nlen = len - 4] == '-') { 13028 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 13029 return nlen; 13030 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 13031 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 13032 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 13033 return nlen; 13034 } 13035 return len; 13036 } 13037 13038 static void 13039 parser_set_encode(struct parser_params *parser, const char *name) 13040 { 13041 int idx = rb_enc_find_index(name); 13042 rb_encoding *enc; 13043 VALUE excargs[3]; 13044 13045 if (idx < 0) { 13046 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 13047 error: 13048 excargs[0] = rb_eArgError; 13049 excargs[2] = rb_make_backtrace(); 13050 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 13051 rb_exc_raise(rb_make_exception(3, excargs)); 13052 } 13053 enc = rb_enc_from_index(idx); 13054 if (!rb_enc_asciicompat(enc)) { 13055 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 13056 goto error; 13057 } 13058 parser->enc = enc; 13059 #ifndef RIPPER 13060 if (ruby_debug_lines) { 13061 long i, n = RARRAY_LEN(ruby_debug_lines); 13062 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 13063 for (i = 0; i < n; ++i) { 13064 rb_enc_associate_index(*p, idx); 13065 } 13066 } 13067 #endif 13068 } 13069 13070 static int 13071 comment_at_top(struct parser_params *parser) 13072 { 13073 const char *p = lex_pbeg, *pend = lex_p - 1; 13074 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 13075 while (p < pend) { 13076 if (!ISSPACE(*p)) return 0; 13077 p++; 13078 } 13079 return 1; 13080 } 13081 13082 #ifndef RIPPER 13083 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 13084 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 13085 13086 static void 13087 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 13088 { 13089 if (!comment_at_top(parser)) { 13090 return; 13091 } 13092 parser_set_encode(parser, val); 13093 } 13094 13095 static void 13096 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 13097 { 13098 int *p = &parser->parser_token_info_enabled; 13099 13100 switch (*val) { 13101 case 't': case 'T': 13102 if (strcasecmp(val, "true") == 0) { 13103 *p = TRUE; 13104 return; 13105 } 13106 break; 13107 case 'f': case 'F': 13108 if (strcasecmp(val, "false") == 0) { 13109 *p = FALSE; 13110 return; 13111 } 13112 break; 13113 } 13114 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 13115 } 13116 13117 struct magic_comment { 13118 const char *name; 13119 rb_magic_comment_setter_t func; 13120 rb_magic_comment_length_t length; 13121 }; 13122 13123 static const struct magic_comment magic_comments[] = { 13124 {"coding", magic_comment_encoding, parser_encode_length}, 13125 {"encoding", magic_comment_encoding, parser_encode_length}, 13126 {"warn_indent", parser_set_token_info}, 13127 }; 13128 #endif 13129 13130 static const char * 13131 magic_comment_marker(const char *str, long len) 13132 { 13133 long i = 2; 13134 13135 while (i < len) { 13136 switch (str[i]) { 13137 case '-': 13138 if (str[i-1] == '*' && str[i-2] == '-') { 13139 return str + i + 1; 13140 } 13141 i += 2; 13142 break; 13143 case '*': 13144 if (i + 1 >= len) return 0; 13145 if (str[i+1] != '-') { 13146 i += 4; 13147 } 13148 else if (str[i-1] != '-') { 13149 i += 2; 13150 } 13151 else { 13152 return str + i + 2; 13153 } 13154 break; 13155 default: 13156 i += 3; 13157 break; 13158 } 13159 } 13160 return 0; 13161 } 13162 13163 static int 13164 parser_magic_comment(struct parser_params *parser, const char *str, long len) 13165 { 13166 VALUE name = 0, val = 0; 13167 const char *beg, *end, *vbeg, *vend; 13168 #define str_copy(_s, _p, _n) ((_s) \ 13169 ? (void)(rb_str_resize((_s), (_n)), \ 13170 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 13171 : (void)((_s) = STR_NEW((_p), (_n)))) 13172 13173 if (len <= 7) return FALSE; 13174 if (!(beg = magic_comment_marker(str, len))) return FALSE; 13175 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 13176 str = beg; 13177 len = end - beg - 3; 13178 13179 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 13180 while (len > 0) { 13181 #ifndef RIPPER 13182 const struct magic_comment *p = magic_comments; 13183 #endif 13184 char *s; 13185 int i; 13186 long n = 0; 13187 13188 for (; len > 0 && *str; str++, --len) { 13189 switch (*str) { 13190 case '\'': case '"': case ':': case ';': 13191 continue; 13192 } 13193 if (!ISSPACE(*str)) break; 13194 } 13195 for (beg = str; len > 0; str++, --len) { 13196 switch (*str) { 13197 case '\'': case '"': case ':': case ';': 13198 break; 13199 default: 13200 if (ISSPACE(*str)) break; 13201 continue; 13202 } 13203 break; 13204 } 13205 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 13206 if (!len) break; 13207 if (*str != ':') continue; 13208 13209 do str++; while (--len > 0 && ISSPACE(*str)); 13210 if (!len) break; 13211 if (*str == '"') { 13212 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 13213 if (*str == '\\') { 13214 --len; 13215 ++str; 13216 } 13217 } 13218 vend = str; 13219 if (len) { 13220 --len; 13221 ++str; 13222 } 13223 } 13224 else { 13225 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 13226 vend = str; 13227 } 13228 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 13229 13230 n = end - beg; 13231 str_copy(name, beg, n); 13232 s = RSTRING_PTR(name); 13233 for (i = 0; i < n; ++i) { 13234 if (s[i] == '-') s[i] = '_'; 13235 } 13236 #ifndef RIPPER 13237 do { 13238 if (STRNCASECMP(p->name, s, n) == 0) { 13239 n = vend - vbeg; 13240 if (p->length) { 13241 n = (*p->length)(parser, vbeg, n); 13242 } 13243 str_copy(val, vbeg, n); 13244 (*p->func)(parser, s, RSTRING_PTR(val)); 13245 break; 13246 } 13247 } while (++p < magic_comments + numberof(magic_comments)); 13248 #else 13249 str_copy(val, vbeg, vend - vbeg); 13250 dispatch2(magic_comment, name, val); 13251 #endif 13252 } 13253 13254 return TRUE; 13255 } 13256 13257 static void 13258 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 13259 { 13260 int sep = 0; 13261 const char *beg = str; 13262 VALUE s; 13263 13264 for (;;) { 13265 if (send - str <= 6) return; 13266 switch (str[6]) { 13267 case 'C': case 'c': str += 6; continue; 13268 case 'O': case 'o': str += 5; continue; 13269 case 'D': case 'd': str += 4; continue; 13270 case 'I': case 'i': str += 3; continue; 13271 case 'N': case 'n': str += 2; continue; 13272 case 'G': case 'g': str += 1; continue; 13273 case '=': case ':': 13274 sep = 1; 13275 str += 6; 13276 break; 13277 default: 13278 str += 6; 13279 if (ISSPACE(*str)) break; 13280 continue; 13281 } 13282 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 13283 } 13284 for (;;) { 13285 do { 13286 if (++str >= send) return; 13287 } while (ISSPACE(*str)); 13288 if (sep) break; 13289 if (*str != '=' && *str != ':') return; 13290 sep = 1; 13291 str++; 13292 } 13293 beg = str; 13294 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 13295 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 13296 parser_set_encode(parser, RSTRING_PTR(s)); 13297 rb_str_resize(s, 0); 13298 } 13299 13300 static void 13301 parser_prepare(struct parser_params *parser) 13302 { 13303 int c = nextc(); 13304 switch (c) { 13305 case '#': 13306 if (peek('!')) parser->has_shebang = 1; 13307 break; 13308 case 0xef: /* UTF-8 BOM marker */ 13309 if (lex_pend - lex_p >= 2 && 13310 (unsigned char)lex_p[0] == 0xbb && 13311 (unsigned char)lex_p[1] == 0xbf) { 13312 parser->enc = rb_utf8_encoding(); 13313 lex_p += 2; 13314 lex_pbeg = lex_p; 13315 return; 13316 } 13317 break; 13318 case EOF: 13319 return; 13320 } 13321 pushback(c); 13322 parser->enc = rb_enc_get(lex_lastline); 13323 } 13324 13325 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY) 13326 #define IS_END() IS_lex_state(EXPR_END_ANY) 13327 #define IS_BEG() IS_lex_state(EXPR_BEG_ANY) 13328 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 13329 #define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) 13330 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 13331 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) 13332 13333 #ifndef RIPPER 13334 #define ambiguous_operator(op, syn) ( \ 13335 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 13336 rb_warning0("even though it seems like "syn"")) 13337 #else 13338 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 13339 #endif 13340 #define warn_balanced(op, syn) ((void) \ 13341 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \ 13342 space_seen && !ISSPACE(c) && \ 13343 (ambiguous_operator(op, syn), 0))) 13344 13345 static int 13346 parser_yylex(struct parser_params *parser) 13347 { 13348 register int c; 13349 int space_seen = 0; 13350 int cmd_state; 13351 enum lex_state_e last_state; 13352 rb_encoding *enc; 13353 int mb; 13354 #ifdef RIPPER 13355 int fallthru = FALSE; 13356 #endif 13357 13358 if (lex_strterm) { 13359 int token; 13360 if (nd_type(lex_strterm) == NODE_HEREDOC) { 13361 token = here_document(lex_strterm); 13362 if (token == tSTRING_END) { 13363 lex_strterm = 0; 13364 lex_state = EXPR_END; 13365 } 13366 } 13367 else { 13368 token = parse_string(lex_strterm); 13369 if (token == tSTRING_END || token == tREGEXP_END) { 13370 rb_gc_force_recycle((VALUE)lex_strterm); 13371 lex_strterm = 0; 13372 lex_state = EXPR_END; 13373 } 13374 } 13375 return token; 13376 } 13377 cmd_state = command_start; 13378 command_start = FALSE; 13379 retry: 13380 last_state = lex_state; 13381 switch (c = nextc()) { 13382 case '\0': /* NUL */ 13383 case '\004': /* ^D */ 13384 case '\032': /* ^Z */ 13385 case -1: /* end of script. */ 13386 return 0; 13387 13388 /* white spaces */ 13389 case ' ': case '\t': case '\f': case '\r': 13390 case '\13': /* '\v' */ 13391 space_seen = 1; 13392 #ifdef RIPPER 13393 while ((c = nextc())) { 13394 switch (c) { 13395 case ' ': case '\t': case '\f': case '\r': 13396 case '\13': /* '\v' */ 13397 break; 13398 default: 13399 goto outofloop; 13400 } 13401 } 13402 outofloop: 13403 pushback(c); 13404 ripper_dispatch_scan_event(parser, tSP); 13405 #endif 13406 goto retry; 13407 13408 case '#': /* it's a comment */ 13409 /* no magic_comment in shebang line */ 13410 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 13411 if (comment_at_top(parser)) { 13412 set_file_encoding(parser, lex_p, lex_pend); 13413 } 13414 } 13415 lex_p = lex_pend; 13416 #ifdef RIPPER 13417 ripper_dispatch_scan_event(parser, tCOMMENT); 13418 fallthru = TRUE; 13419 #endif 13420 /* fall through */ 13421 case '\n': 13422 if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT)) { 13423 #ifdef RIPPER 13424 if (!fallthru) { 13425 ripper_dispatch_scan_event(parser, tIGNORED_NL); 13426 } 13427 fallthru = FALSE; 13428 #endif 13429 goto retry; 13430 } 13431 while ((c = nextc())) { 13432 switch (c) { 13433 case ' ': case '\t': case '\f': case '\r': 13434 case '\13': /* '\v' */ 13435 space_seen = 1; 13436 break; 13437 case '.': { 13438 if ((c = nextc()) != '.') { 13439 pushback(c); 13440 pushback('.'); 13441 goto retry; 13442 } 13443 } 13444 default: 13445 --ruby_sourceline; 13446 lex_nextline = lex_lastline; 13447 case -1: /* EOF no decrement*/ 13448 lex_goto_eol(parser); 13449 #ifdef RIPPER 13450 if (c != -1) { 13451 parser->tokp = lex_p; 13452 } 13453 #endif 13454 goto normal_newline; 13455 } 13456 } 13457 normal_newline: 13458 command_start = TRUE; 13459 lex_state = EXPR_BEG; 13460 return '\n'; 13461 13462 case '*': 13463 if ((c = nextc()) == '*') { 13464 if ((c = nextc()) == '=') { 13465 set_yylval_id(tPOW); 13466 lex_state = EXPR_BEG; 13467 return tOP_ASGN; 13468 } 13469 pushback(c); 13470 if (IS_SPCARG(c)) { 13471 rb_warning0("`**' interpreted as argument prefix"); 13472 c = tDSTAR; 13473 } 13474 else if (IS_BEG()) { 13475 c = tDSTAR; 13476 } 13477 else { 13478 warn_balanced("**", "argument prefix"); 13479 c = tPOW; 13480 } 13481 } 13482 else { 13483 if (c == '=') { 13484 set_yylval_id('*'); 13485 lex_state = EXPR_BEG; 13486 return tOP_ASGN; 13487 } 13488 pushback(c); 13489 if (IS_SPCARG(c)) { 13490 rb_warning0("`*' interpreted as argument prefix"); 13491 c = tSTAR; 13492 } 13493 else if (IS_BEG()) { 13494 c = tSTAR; 13495 } 13496 else { 13497 warn_balanced("*", "argument prefix"); 13498 c = '*'; 13499 } 13500 } 13501 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13502 return c; 13503 13504 case '!': 13505 c = nextc(); 13506 if (IS_AFTER_OPERATOR()) { 13507 lex_state = EXPR_ARG; 13508 if (c == '@') { 13509 return '!'; 13510 } 13511 } 13512 else { 13513 lex_state = EXPR_BEG; 13514 } 13515 if (c == '=') { 13516 return tNEQ; 13517 } 13518 if (c == '~') { 13519 return tNMATCH; 13520 } 13521 pushback(c); 13522 return '!'; 13523 13524 case '=': 13525 if (was_bol()) { 13526 /* skip embedded rd document */ 13527 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 13528 #ifdef RIPPER 13529 int first_p = TRUE; 13530 13531 lex_goto_eol(parser); 13532 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 13533 #endif 13534 for (;;) { 13535 lex_goto_eol(parser); 13536 #ifdef RIPPER 13537 if (!first_p) { 13538 ripper_dispatch_scan_event(parser, tEMBDOC); 13539 } 13540 first_p = FALSE; 13541 #endif 13542 c = nextc(); 13543 if (c == -1) { 13544 compile_error(PARSER_ARG "embedded document meets end of file"); 13545 return 0; 13546 } 13547 if (c != '=') continue; 13548 if (strncmp(lex_p, "end", 3) == 0 && 13549 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 13550 break; 13551 } 13552 } 13553 lex_goto_eol(parser); 13554 #ifdef RIPPER 13555 ripper_dispatch_scan_event(parser, tEMBDOC_END); 13556 #endif 13557 goto retry; 13558 } 13559 } 13560 13561 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13562 if ((c = nextc()) == '=') { 13563 if ((c = nextc()) == '=') { 13564 return tEQQ; 13565 } 13566 pushback(c); 13567 return tEQ; 13568 } 13569 if (c == '~') { 13570 return tMATCH; 13571 } 13572 else if (c == '>') { 13573 return tASSOC; 13574 } 13575 pushback(c); 13576 return '='; 13577 13578 case '<': 13579 last_state = lex_state; 13580 c = nextc(); 13581 if (c == '<' && 13582 !IS_lex_state(EXPR_DOT | EXPR_CLASS) && 13583 !IS_END() && 13584 (!IS_ARG() || space_seen)) { 13585 int token = heredoc_identifier(); 13586 if (token) return token; 13587 } 13588 if (IS_AFTER_OPERATOR()) { 13589 lex_state = EXPR_ARG; 13590 } 13591 else { 13592 if (IS_lex_state(EXPR_CLASS)) 13593 command_start = TRUE; 13594 lex_state = EXPR_BEG; 13595 } 13596 if (c == '=') { 13597 if ((c = nextc()) == '>') { 13598 return tCMP; 13599 } 13600 pushback(c); 13601 return tLEQ; 13602 } 13603 if (c == '<') { 13604 if ((c = nextc()) == '=') { 13605 set_yylval_id(tLSHFT); 13606 lex_state = EXPR_BEG; 13607 return tOP_ASGN; 13608 } 13609 pushback(c); 13610 warn_balanced("<<", "here document"); 13611 return tLSHFT; 13612 } 13613 pushback(c); 13614 return '<'; 13615 13616 case '>': 13617 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13618 if ((c = nextc()) == '=') { 13619 return tGEQ; 13620 } 13621 if (c == '>') { 13622 if ((c = nextc()) == '=') { 13623 set_yylval_id(tRSHFT); 13624 lex_state = EXPR_BEG; 13625 return tOP_ASGN; 13626 } 13627 pushback(c); 13628 return tRSHFT; 13629 } 13630 pushback(c); 13631 return '>'; 13632 13633 case '"': 13634 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 13635 return tSTRING_BEG; 13636 13637 case '`': 13638 if (IS_lex_state(EXPR_FNAME)) { 13639 lex_state = EXPR_ENDFN; 13640 return c; 13641 } 13642 if (IS_lex_state(EXPR_DOT)) { 13643 if (cmd_state) 13644 lex_state = EXPR_CMDARG; 13645 else 13646 lex_state = EXPR_ARG; 13647 return c; 13648 } 13649 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 13650 return tXSTRING_BEG; 13651 13652 case '\'': 13653 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 13654 return tSTRING_BEG; 13655 13656 case '?': 13657 if (IS_END()) { 13658 lex_state = EXPR_VALUE; 13659 return '?'; 13660 } 13661 c = nextc(); 13662 if (c == -1) { 13663 compile_error(PARSER_ARG "incomplete character syntax"); 13664 return 0; 13665 } 13666 if (rb_enc_isspace(c, current_enc)) { 13667 if (!IS_ARG()) { 13668 int c2 = 0; 13669 switch (c) { 13670 case ' ': 13671 c2 = 's'; 13672 break; 13673 case '\n': 13674 c2 = 'n'; 13675 break; 13676 case '\t': 13677 c2 = 't'; 13678 break; 13679 case '\v': 13680 c2 = 'v'; 13681 break; 13682 case '\r': 13683 c2 = 'r'; 13684 break; 13685 case '\f': 13686 c2 = 'f'; 13687 break; 13688 } 13689 if (c2) { 13690 rb_warnI("invalid character syntax; use ?\\%c", c2); 13691 } 13692 } 13693 ternary: 13694 pushback(c); 13695 lex_state = EXPR_VALUE; 13696 return '?'; 13697 } 13698 newtok(); 13699 enc = current_enc; 13700 if (!parser_isascii()) { 13701 if (tokadd_mbchar(c) == -1) return 0; 13702 } 13703 else if ((rb_enc_isalnum(c, current_enc) || c == '_') && 13704 lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { 13705 goto ternary; 13706 } 13707 else if (c == '\\') { 13708 if (peek('u')) { 13709 nextc(); 13710 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 13711 if (0x80 <= c) { 13712 tokaddmbc(c, enc); 13713 } 13714 else { 13715 tokadd(c); 13716 } 13717 } 13718 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 13719 nextc(); 13720 if (tokadd_mbchar(c) == -1) return 0; 13721 } 13722 else { 13723 c = read_escape(0, &enc); 13724 tokadd(c); 13725 } 13726 } 13727 else { 13728 tokadd(c); 13729 } 13730 tokfix(); 13731 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 13732 lex_state = EXPR_END; 13733 return tCHAR; 13734 13735 case '&': 13736 if ((c = nextc()) == '&') { 13737 lex_state = EXPR_BEG; 13738 if ((c = nextc()) == '=') { 13739 set_yylval_id(tANDOP); 13740 lex_state = EXPR_BEG; 13741 return tOP_ASGN; 13742 } 13743 pushback(c); 13744 return tANDOP; 13745 } 13746 else if (c == '=') { 13747 set_yylval_id('&'); 13748 lex_state = EXPR_BEG; 13749 return tOP_ASGN; 13750 } 13751 pushback(c); 13752 if (IS_SPCARG(c)) { 13753 rb_warning0("`&' interpreted as argument prefix"); 13754 c = tAMPER; 13755 } 13756 else if (IS_BEG()) { 13757 c = tAMPER; 13758 } 13759 else { 13760 warn_balanced("&", "argument prefix"); 13761 c = '&'; 13762 } 13763 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13764 return c; 13765 13766 case '|': 13767 if ((c = nextc()) == '|') { 13768 lex_state = EXPR_BEG; 13769 if ((c = nextc()) == '=') { 13770 set_yylval_id(tOROP); 13771 lex_state = EXPR_BEG; 13772 return tOP_ASGN; 13773 } 13774 pushback(c); 13775 return tOROP; 13776 } 13777 if (c == '=') { 13778 set_yylval_id('|'); 13779 lex_state = EXPR_BEG; 13780 return tOP_ASGN; 13781 } 13782 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13783 pushback(c); 13784 return '|'; 13785 13786 case '+': 13787 c = nextc(); 13788 if (IS_AFTER_OPERATOR()) { 13789 lex_state = EXPR_ARG; 13790 if (c == '@') { 13791 return tUPLUS; 13792 } 13793 pushback(c); 13794 return '+'; 13795 } 13796 if (c == '=') { 13797 set_yylval_id('+'); 13798 lex_state = EXPR_BEG; 13799 return tOP_ASGN; 13800 } 13801 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13802 lex_state = EXPR_BEG; 13803 pushback(c); 13804 if (c != -1 && ISDIGIT(c)) { 13805 c = '+'; 13806 goto start_num; 13807 } 13808 return tUPLUS; 13809 } 13810 lex_state = EXPR_BEG; 13811 pushback(c); 13812 warn_balanced("+", "unary operator"); 13813 return '+'; 13814 13815 case '-': 13816 c = nextc(); 13817 if (IS_AFTER_OPERATOR()) { 13818 lex_state = EXPR_ARG; 13819 if (c == '@') { 13820 return tUMINUS; 13821 } 13822 pushback(c); 13823 return '-'; 13824 } 13825 if (c == '=') { 13826 set_yylval_id('-'); 13827 lex_state = EXPR_BEG; 13828 return tOP_ASGN; 13829 } 13830 if (c == '>') { 13831 lex_state = EXPR_ENDFN; 13832 return tLAMBDA; 13833 } 13834 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13835 lex_state = EXPR_BEG; 13836 pushback(c); 13837 if (c != -1 && ISDIGIT(c)) { 13838 return tUMINUS_NUM; 13839 } 13840 return tUMINUS; 13841 } 13842 lex_state = EXPR_BEG; 13843 pushback(c); 13844 warn_balanced("-", "unary operator"); 13845 return '-'; 13846 13847 case '.': 13848 lex_state = EXPR_BEG; 13849 if ((c = nextc()) == '.') { 13850 if ((c = nextc()) == '.') { 13851 return tDOT3; 13852 } 13853 pushback(c); 13854 return tDOT2; 13855 } 13856 pushback(c); 13857 if (c != -1 && ISDIGIT(c)) { 13858 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13859 } 13860 lex_state = EXPR_DOT; 13861 return '.'; 13862 13863 start_num: 13864 case '0': case '1': case '2': case '3': case '4': 13865 case '5': case '6': case '7': case '8': case '9': 13866 { 13867 int is_float, seen_point, seen_e, nondigit; 13868 13869 is_float = seen_point = seen_e = nondigit = 0; 13870 lex_state = EXPR_END; 13871 newtok(); 13872 if (c == '-' || c == '+') { 13873 tokadd(c); 13874 c = nextc(); 13875 } 13876 if (c == '0') { 13877 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13878 int start = toklen(); 13879 c = nextc(); 13880 if (c == 'x' || c == 'X') { 13881 /* hexadecimal */ 13882 c = nextc(); 13883 if (c != -1 && ISXDIGIT(c)) { 13884 do { 13885 if (c == '_') { 13886 if (nondigit) break; 13887 nondigit = c; 13888 continue; 13889 } 13890 if (!ISXDIGIT(c)) break; 13891 nondigit = 0; 13892 tokadd(c); 13893 } while ((c = nextc()) != -1); 13894 } 13895 pushback(c); 13896 tokfix(); 13897 if (toklen() == start) { 13898 no_digits(); 13899 } 13900 else if (nondigit) goto trailing_uc; 13901 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13902 return tINTEGER; 13903 } 13904 if (c == 'b' || c == 'B') { 13905 /* binary */ 13906 c = nextc(); 13907 if (c == '0' || c == '1') { 13908 do { 13909 if (c == '_') { 13910 if (nondigit) break; 13911 nondigit = c; 13912 continue; 13913 } 13914 if (c != '0' && c != '1') break; 13915 nondigit = 0; 13916 tokadd(c); 13917 } while ((c = nextc()) != -1); 13918 } 13919 pushback(c); 13920 tokfix(); 13921 if (toklen() == start) { 13922 no_digits(); 13923 } 13924 else if (nondigit) goto trailing_uc; 13925 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 13926 return tINTEGER; 13927 } 13928 if (c == 'd' || c == 'D') { 13929 /* decimal */ 13930 c = nextc(); 13931 if (c != -1 && ISDIGIT(c)) { 13932 do { 13933 if (c == '_') { 13934 if (nondigit) break; 13935 nondigit = c; 13936 continue; 13937 } 13938 if (!ISDIGIT(c)) break; 13939 nondigit = 0; 13940 tokadd(c); 13941 } while ((c = nextc()) != -1); 13942 } 13943 pushback(c); 13944 tokfix(); 13945 if (toklen() == start) { 13946 no_digits(); 13947 } 13948 else if (nondigit) goto trailing_uc; 13949 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13950 return tINTEGER; 13951 } 13952 if (c == '_') { 13953 /* 0_0 */ 13954 goto octal_number; 13955 } 13956 if (c == 'o' || c == 'O') { 13957 /* prefixed octal */ 13958 c = nextc(); 13959 if (c == -1 || c == '_' || !ISDIGIT(c)) { 13960 no_digits(); 13961 } 13962 } 13963 if (c >= '0' && c <= '7') { 13964 /* octal */ 13965 octal_number: 13966 do { 13967 if (c == '_') { 13968 if (nondigit) break; 13969 nondigit = c; 13970 continue; 13971 } 13972 if (c < '0' || c > '9') break; 13973 if (c > '7') goto invalid_octal; 13974 nondigit = 0; 13975 tokadd(c); 13976 } while ((c = nextc()) != -1); 13977 if (toklen() > start) { 13978 pushback(c); 13979 tokfix(); 13980 if (nondigit) goto trailing_uc; 13981 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 13982 return tINTEGER; 13983 } 13984 if (nondigit) { 13985 pushback(c); 13986 goto trailing_uc; 13987 } 13988 } 13989 if (c > '7' && c <= '9') { 13990 invalid_octal: 13991 yyerror("Invalid octal digit"); 13992 } 13993 else if (c == '.' || c == 'e' || c == 'E') { 13994 tokadd('0'); 13995 } 13996 else { 13997 pushback(c); 13998 set_yylval_literal(INT2FIX(0)); 13999 return tINTEGER; 14000 } 14001 } 14002 14003 for (;;) { 14004 switch (c) { 14005 case '0': case '1': case '2': case '3': case '4': 14006 case '5': case '6': case '7': case '8': case '9': 14007 nondigit = 0; 14008 tokadd(c); 14009 break; 14010 14011 case '.': 14012 if (nondigit) goto trailing_uc; 14013 if (seen_point || seen_e) { 14014 goto decode_num; 14015 } 14016 else { 14017 int c0 = nextc(); 14018 if (c0 == -1 || !ISDIGIT(c0)) { 14019 pushback(c0); 14020 goto decode_num; 14021 } 14022 c = c0; 14023 } 14024 tokadd('.'); 14025 tokadd(c); 14026 is_float++; 14027 seen_point++; 14028 nondigit = 0; 14029 break; 14030 14031 case 'e': 14032 case 'E': 14033 if (nondigit) { 14034 pushback(c); 14035 c = nondigit; 14036 goto decode_num; 14037 } 14038 if (seen_e) { 14039 goto decode_num; 14040 } 14041 tokadd(c); 14042 seen_e++; 14043 is_float++; 14044 nondigit = c; 14045 c = nextc(); 14046 if (c != '-' && c != '+') continue; 14047 tokadd(c); 14048 nondigit = c; 14049 break; 14050 14051 case '_': /* `_' in number just ignored */ 14052 if (nondigit) goto decode_num; 14053 nondigit = c; 14054 break; 14055 14056 default: 14057 goto decode_num; 14058 } 14059 c = nextc(); 14060 } 14061 14062 decode_num: 14063 pushback(c); 14064 if (nondigit) { 14065 char tmp[30]; 14066 trailing_uc: 14067 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 14068 yyerror(tmp); 14069 } 14070 tokfix(); 14071 if (is_float) { 14072 double d = strtod(tok(), 0); 14073 if (errno == ERANGE) { 14074 rb_warningS("Float %s out of range", tok()); 14075 errno = 0; 14076 } 14077 set_yylval_literal(DBL2NUM(d)); 14078 return tFLOAT; 14079 } 14080 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14081 return tINTEGER; 14082 } 14083 14084 case ')': 14085 case ']': 14086 paren_nest--; 14087 case '}': 14088 COND_LEXPOP(); 14089 CMDARG_LEXPOP(); 14090 if (c == ')') 14091 lex_state = EXPR_ENDFN; 14092 else 14093 lex_state = EXPR_ENDARG; 14094 if (c == '}') { 14095 if (!brace_nest--) c = tSTRING_DEND; 14096 } 14097 return c; 14098 14099 case ':': 14100 c = nextc(); 14101 if (c == ':') { 14102 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) { 14103 lex_state = EXPR_BEG; 14104 return tCOLON3; 14105 } 14106 lex_state = EXPR_DOT; 14107 return tCOLON2; 14108 } 14109 if (IS_END() || ISSPACE(c)) { 14110 pushback(c); 14111 warn_balanced(":", "symbol literal"); 14112 lex_state = EXPR_BEG; 14113 return ':'; 14114 } 14115 switch (c) { 14116 case '\'': 14117 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 14118 break; 14119 case '"': 14120 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 14121 break; 14122 default: 14123 pushback(c); 14124 break; 14125 } 14126 lex_state = EXPR_FNAME; 14127 return tSYMBEG; 14128 14129 case '/': 14130 if (IS_lex_state(EXPR_BEG_ANY)) { 14131 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14132 return tREGEXP_BEG; 14133 } 14134 if ((c = nextc()) == '=') { 14135 set_yylval_id('/'); 14136 lex_state = EXPR_BEG; 14137 return tOP_ASGN; 14138 } 14139 pushback(c); 14140 if (IS_SPCARG(c)) { 14141 (void)arg_ambiguous(); 14142 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14143 return tREGEXP_BEG; 14144 } 14145 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14146 warn_balanced("/", "regexp literal"); 14147 return '/'; 14148 14149 case '^': 14150 if ((c = nextc()) == '=') { 14151 set_yylval_id('^'); 14152 lex_state = EXPR_BEG; 14153 return tOP_ASGN; 14154 } 14155 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14156 pushback(c); 14157 return '^'; 14158 14159 case ';': 14160 lex_state = EXPR_BEG; 14161 command_start = TRUE; 14162 return ';'; 14163 14164 case ',': 14165 lex_state = EXPR_BEG; 14166 return ','; 14167 14168 case '~': 14169 if (IS_AFTER_OPERATOR()) { 14170 if ((c = nextc()) != '@') { 14171 pushback(c); 14172 } 14173 lex_state = EXPR_ARG; 14174 } 14175 else { 14176 lex_state = EXPR_BEG; 14177 } 14178 return '~'; 14179 14180 case '(': 14181 if (IS_BEG()) { 14182 c = tLPAREN; 14183 } 14184 else if (IS_SPCARG(-1)) { 14185 c = tLPAREN_ARG; 14186 } 14187 paren_nest++; 14188 COND_PUSH(0); 14189 CMDARG_PUSH(0); 14190 lex_state = EXPR_BEG; 14191 return c; 14192 14193 case '[': 14194 paren_nest++; 14195 if (IS_AFTER_OPERATOR()) { 14196 lex_state = EXPR_ARG; 14197 if ((c = nextc()) == ']') { 14198 if ((c = nextc()) == '=') { 14199 return tASET; 14200 } 14201 pushback(c); 14202 return tAREF; 14203 } 14204 pushback(c); 14205 return '['; 14206 } 14207 else if (IS_BEG()) { 14208 c = tLBRACK; 14209 } 14210 else if (IS_ARG() && space_seen) { 14211 c = tLBRACK; 14212 } 14213 lex_state = EXPR_BEG; 14214 COND_PUSH(0); 14215 CMDARG_PUSH(0); 14216 return c; 14217 14218 case '{': 14219 ++brace_nest; 14220 if (lpar_beg && lpar_beg == paren_nest) { 14221 lex_state = EXPR_BEG; 14222 lpar_beg = 0; 14223 --paren_nest; 14224 COND_PUSH(0); 14225 CMDARG_PUSH(0); 14226 return tLAMBEG; 14227 } 14228 if (IS_ARG() || IS_lex_state(EXPR_END | EXPR_ENDFN)) 14229 c = '{'; /* block (primary) */ 14230 else if (IS_lex_state(EXPR_ENDARG)) 14231 c = tLBRACE_ARG; /* block (expr) */ 14232 else 14233 c = tLBRACE; /* hash */ 14234 COND_PUSH(0); 14235 CMDARG_PUSH(0); 14236 lex_state = EXPR_BEG; 14237 if (c != tLBRACE) command_start = TRUE; 14238 return c; 14239 14240 case '\\': 14241 c = nextc(); 14242 if (c == '\n') { 14243 space_seen = 1; 14244 #ifdef RIPPER 14245 ripper_dispatch_scan_event(parser, tSP); 14246 #endif 14247 goto retry; /* skip \\n */ 14248 } 14249 pushback(c); 14250 return '\\'; 14251 14252 case '%': 14253 if (IS_lex_state(EXPR_BEG_ANY)) { 14254 int term; 14255 int paren; 14256 14257 c = nextc(); 14258 quotation: 14259 if (c == -1 || !ISALNUM(c)) { 14260 term = c; 14261 c = 'Q'; 14262 } 14263 else { 14264 term = nextc(); 14265 if (rb_enc_isalnum(term, current_enc) || !parser_isascii()) { 14266 yyerror("unknown type of %string"); 14267 return 0; 14268 } 14269 } 14270 if (c == -1 || term == -1) { 14271 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 14272 return 0; 14273 } 14274 paren = term; 14275 if (term == '(') term = ')'; 14276 else if (term == '[') term = ']'; 14277 else if (term == '{') term = '}'; 14278 else if (term == '<') term = '>'; 14279 else paren = 0; 14280 14281 switch (c) { 14282 case 'Q': 14283 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 14284 return tSTRING_BEG; 14285 14286 case 'q': 14287 lex_strterm = NEW_STRTERM(str_squote, term, paren); 14288 return tSTRING_BEG; 14289 14290 case 'W': 14291 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14292 do {c = nextc();} while (ISSPACE(c)); 14293 pushback(c); 14294 return tWORDS_BEG; 14295 14296 case 'w': 14297 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14298 do {c = nextc();} while (ISSPACE(c)); 14299 pushback(c); 14300 return tQWORDS_BEG; 14301 14302 case 'I': 14303 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14304 do {c = nextc();} while (ISSPACE(c)); 14305 pushback(c); 14306 return tSYMBOLS_BEG; 14307 14308 case 'i': 14309 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14310 do {c = nextc();} while (ISSPACE(c)); 14311 pushback(c); 14312 return tQSYMBOLS_BEG; 14313 14314 case 'x': 14315 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 14316 return tXSTRING_BEG; 14317 14318 case 'r': 14319 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 14320 return tREGEXP_BEG; 14321 14322 case 's': 14323 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 14324 lex_state = EXPR_FNAME; 14325 return tSYMBEG; 14326 14327 default: 14328 yyerror("unknown type of %string"); 14329 return 0; 14330 } 14331 } 14332 if ((c = nextc()) == '=') { 14333 set_yylval_id('%'); 14334 lex_state = EXPR_BEG; 14335 return tOP_ASGN; 14336 } 14337 if (IS_SPCARG(c)) { 14338 goto quotation; 14339 } 14340 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14341 pushback(c); 14342 warn_balanced("%%", "string literal"); 14343 return '%'; 14344 14345 case '$': 14346 lex_state = EXPR_END; 14347 newtok(); 14348 c = nextc(); 14349 switch (c) { 14350 case '_': /* $_: last read line string */ 14351 c = nextc(); 14352 if (parser_is_identchar()) { 14353 tokadd('$'); 14354 tokadd('_'); 14355 break; 14356 } 14357 pushback(c); 14358 c = '_'; 14359 /* fall through */ 14360 case '~': /* $~: match-data */ 14361 case '*': /* $*: argv */ 14362 case '$': /* $$: pid */ 14363 case '?': /* $?: last status */ 14364 case '!': /* $!: error string */ 14365 case '@': /* $@: error position */ 14366 case '/': /* $/: input record separator */ 14367 case '\\': /* $\: output record separator */ 14368 case ';': /* $;: field separator */ 14369 case ',': /* $,: output field separator */ 14370 case '.': /* $.: last read line number */ 14371 case '=': /* $=: ignorecase */ 14372 case ':': /* $:: load path */ 14373 case '<': /* $<: reading filename */ 14374 case '>': /* $>: default output handle */ 14375 case '\"': /* $": already loaded files */ 14376 tokadd('$'); 14377 tokadd(c); 14378 tokfix(); 14379 set_yylval_name(rb_intern(tok())); 14380 return tGVAR; 14381 14382 case '-': 14383 tokadd('$'); 14384 tokadd(c); 14385 c = nextc(); 14386 if (parser_is_identchar()) { 14387 if (tokadd_mbchar(c) == -1) return 0; 14388 } 14389 else { 14390 pushback(c); 14391 } 14392 gvar: 14393 tokfix(); 14394 set_yylval_name(rb_intern(tok())); 14395 return tGVAR; 14396 14397 case '&': /* $&: last match */ 14398 case '`': /* $`: string before last match */ 14399 case '\'': /* $': string after last match */ 14400 case '+': /* $+: string matches last paren. */ 14401 if (IS_lex_state_for(last_state, EXPR_FNAME)) { 14402 tokadd('$'); 14403 tokadd(c); 14404 goto gvar; 14405 } 14406 set_yylval_node(NEW_BACK_REF(c)); 14407 return tBACK_REF; 14408 14409 case '1': case '2': case '3': 14410 case '4': case '5': case '6': 14411 case '7': case '8': case '9': 14412 tokadd('$'); 14413 do { 14414 tokadd(c); 14415 c = nextc(); 14416 } while (c != -1 && ISDIGIT(c)); 14417 pushback(c); 14418 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar; 14419 tokfix(); 14420 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 14421 return tNTH_REF; 14422 14423 default: 14424 if (!parser_is_identchar()) { 14425 pushback(c); 14426 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c); 14427 return 0; 14428 } 14429 case '0': 14430 tokadd('$'); 14431 } 14432 break; 14433 14434 case '@': 14435 c = nextc(); 14436 newtok(); 14437 tokadd('@'); 14438 if (c == '@') { 14439 tokadd('@'); 14440 c = nextc(); 14441 } 14442 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) { 14443 pushback(c); 14444 if (tokidx == 1) { 14445 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 14446 } 14447 else { 14448 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 14449 } 14450 return 0; 14451 } 14452 break; 14453 14454 case '_': 14455 if (was_bol() && whole_match_p("__END__", 7, 0)) { 14456 ruby__end__seen = 1; 14457 parser->eofp = Qtrue; 14458 #ifndef RIPPER 14459 return -1; 14460 #else 14461 lex_goto_eol(parser); 14462 ripper_dispatch_scan_event(parser, k__END__); 14463 return 0; 14464 #endif 14465 } 14466 newtok(); 14467 break; 14468 14469 default: 14470 if (!parser_is_identchar()) { 14471 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 14472 goto retry; 14473 } 14474 14475 newtok(); 14476 break; 14477 } 14478 14479 mb = ENC_CODERANGE_7BIT; 14480 do { 14481 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 14482 if (tokadd_mbchar(c) == -1) return 0; 14483 c = nextc(); 14484 } while (parser_is_identchar()); 14485 switch (tok()[0]) { 14486 case '@': case '$': 14487 pushback(c); 14488 break; 14489 default: 14490 if ((c == '!' || c == '?') && !peek('=')) { 14491 tokadd(c); 14492 } 14493 else { 14494 pushback(c); 14495 } 14496 } 14497 tokfix(); 14498 14499 { 14500 int result = 0; 14501 14502 last_state = lex_state; 14503 switch (tok()[0]) { 14504 case '$': 14505 lex_state = EXPR_END; 14506 result = tGVAR; 14507 break; 14508 case '@': 14509 lex_state = EXPR_END; 14510 if (tok()[1] == '@') 14511 result = tCVAR; 14512 else 14513 result = tIVAR; 14514 break; 14515 14516 default: 14517 if (toklast() == '!' || toklast() == '?') { 14518 result = tFID; 14519 } 14520 else { 14521 if (IS_lex_state(EXPR_FNAME)) { 14522 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 14523 (!peek('=') || (peek_n('>', 1)))) { 14524 result = tIDENTIFIER; 14525 tokadd(c); 14526 tokfix(); 14527 } 14528 else { 14529 pushback(c); 14530 } 14531 } 14532 if (result == 0 && ISUPPER(tok()[0])) { 14533 result = tCONSTANT; 14534 } 14535 else { 14536 result = tIDENTIFIER; 14537 } 14538 } 14539 14540 if (IS_LABEL_POSSIBLE()) { 14541 if (IS_LABEL_SUFFIX(0)) { 14542 lex_state = EXPR_BEG; 14543 nextc(); 14544 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 14545 return tLABEL; 14546 } 14547 } 14548 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) { 14549 const struct kwtable *kw; 14550 14551 /* See if it is a reserved word. */ 14552 kw = rb_reserved_word(tok(), toklen()); 14553 if (kw) { 14554 enum lex_state_e state = lex_state; 14555 lex_state = kw->state; 14556 if (state == EXPR_FNAME) { 14557 set_yylval_name(rb_intern(kw->name)); 14558 return kw->id[0]; 14559 } 14560 if (lex_state == EXPR_BEG) { 14561 command_start = TRUE; 14562 } 14563 if (kw->id[0] == keyword_do) { 14564 if (lpar_beg && lpar_beg == paren_nest) { 14565 lpar_beg = 0; 14566 --paren_nest; 14567 return keyword_do_LAMBDA; 14568 } 14569 if (COND_P()) return keyword_do_cond; 14570 if (CMDARG_P() && state != EXPR_CMDARG) 14571 return keyword_do_block; 14572 if (state & (EXPR_BEG | EXPR_ENDARG)) 14573 return keyword_do_block; 14574 return keyword_do; 14575 } 14576 if (state & (EXPR_BEG | EXPR_VALUE)) 14577 return kw->id[0]; 14578 else { 14579 if (kw->id[0] != kw->id[1]) 14580 lex_state = EXPR_BEG; 14581 return kw->id[1]; 14582 } 14583 } 14584 } 14585 14586 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) { 14587 if (cmd_state) { 14588 lex_state = EXPR_CMDARG; 14589 } 14590 else { 14591 lex_state = EXPR_ARG; 14592 } 14593 } 14594 else if (lex_state == EXPR_FNAME) { 14595 lex_state = EXPR_ENDFN; 14596 } 14597 else { 14598 lex_state = EXPR_END; 14599 } 14600 } 14601 { 14602 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 14603 14604 set_yylval_name(ident); 14605 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && 14606 is_local_id(ident) && lvar_defined(ident)) { 14607 lex_state = EXPR_END; 14608 } 14609 } 14610 return result; 14611 } 14612 } 14613 14614 #if YYPURE 14615 static int 14616 yylex(void *lval, void *p) 14617 #else 14618 yylex(void *p) 14619 #endif 14620 { 14621 struct parser_params *parser = (struct parser_params*)p; 14622 int t; 14623 14624 #if YYPURE 14625 parser->parser_yylval = lval; 14626 parser->parser_yylval->val = Qundef; 14627 #endif 14628 t = parser_yylex(parser); 14629 #ifdef RIPPER 14630 if (!NIL_P(parser->delayed)) { 14631 ripper_dispatch_delayed_token(parser, t); 14632 return t; 14633 } 14634 if (t != 0) 14635 ripper_dispatch_scan_event(parser, t); 14636 #endif 14637 14638 return t; 14639 } 14640 14641 #ifndef RIPPER 14642 static NODE* 14643 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 14644 { 14645 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 14646 nd_set_line(n, ruby_sourceline); 14647 return n; 14648 } 14649 14650 static enum node_type 14651 nodetype(NODE *node) /* for debug */ 14652 { 14653 return (enum node_type)nd_type(node); 14654 } 14655 14656 static int 14657 nodeline(NODE *node) 14658 { 14659 return nd_line(node); 14660 } 14661 14662 static NODE* 14663 newline_node(NODE *node) 14664 { 14665 if (node) { 14666 node = remove_begin(node); 14667 node->flags |= NODE_FL_NEWLINE; 14668 } 14669 return node; 14670 } 14671 14672 static void 14673 fixpos(NODE *node, NODE *orig) 14674 { 14675 if (!node) return; 14676 if (!orig) return; 14677 if (orig == (NODE*)1) return; 14678 nd_set_line(node, nd_line(orig)); 14679 } 14680 14681 static void 14682 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 14683 { 14684 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 14685 } 14686 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 14687 14688 static void 14689 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 14690 { 14691 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 14692 } 14693 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 14694 14695 static NODE* 14696 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 14697 { 14698 NODE *end, *h = head, *nd; 14699 14700 if (tail == 0) return head; 14701 14702 if (h == 0) return tail; 14703 switch (nd_type(h)) { 14704 case NODE_LIT: 14705 case NODE_STR: 14706 case NODE_SELF: 14707 case NODE_TRUE: 14708 case NODE_FALSE: 14709 case NODE_NIL: 14710 parser_warning(h, "unused literal ignored"); 14711 return tail; 14712 default: 14713 h = end = NEW_BLOCK(head); 14714 end->nd_end = end; 14715 fixpos(end, head); 14716 head = end; 14717 break; 14718 case NODE_BLOCK: 14719 end = h->nd_end; 14720 break; 14721 } 14722 14723 nd = end->nd_head; 14724 switch (nd_type(nd)) { 14725 case NODE_RETURN: 14726 case NODE_BREAK: 14727 case NODE_NEXT: 14728 case NODE_REDO: 14729 case NODE_RETRY: 14730 if (RTEST(ruby_verbose)) { 14731 parser_warning(tail, "statement not reached"); 14732 } 14733 break; 14734 14735 default: 14736 break; 14737 } 14738 14739 if (nd_type(tail) != NODE_BLOCK) { 14740 tail = NEW_BLOCK(tail); 14741 tail->nd_end = tail; 14742 } 14743 end->nd_next = tail; 14744 h->nd_end = tail->nd_end; 14745 return head; 14746 } 14747 14748 /* append item to the list */ 14749 static NODE* 14750 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 14751 { 14752 NODE *last; 14753 14754 if (list == 0) return NEW_LIST(item); 14755 if (list->nd_next) { 14756 last = list->nd_next->nd_end; 14757 } 14758 else { 14759 last = list; 14760 } 14761 14762 list->nd_alen += 1; 14763 last->nd_next = NEW_LIST(item); 14764 list->nd_next->nd_end = last->nd_next; 14765 return list; 14766 } 14767 14768 /* concat two lists */ 14769 static NODE* 14770 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14771 { 14772 NODE *last; 14773 14774 if (head->nd_next) { 14775 last = head->nd_next->nd_end; 14776 } 14777 else { 14778 last = head; 14779 } 14780 14781 head->nd_alen += tail->nd_alen; 14782 last->nd_next = tail; 14783 if (tail->nd_next) { 14784 head->nd_next->nd_end = tail->nd_next->nd_end; 14785 } 14786 else { 14787 head->nd_next->nd_end = tail; 14788 } 14789 14790 return head; 14791 } 14792 14793 static int 14794 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 14795 { 14796 if (NIL_P(tail)) return 1; 14797 if (!rb_enc_compatible(head, tail)) { 14798 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 14799 rb_enc_name(rb_enc_get(head)), 14800 rb_enc_name(rb_enc_get(tail))); 14801 rb_str_resize(head, 0); 14802 rb_str_resize(tail, 0); 14803 return 0; 14804 } 14805 rb_str_buf_append(head, tail); 14806 return 1; 14807 } 14808 14809 /* concat two string literals */ 14810 static NODE * 14811 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14812 { 14813 enum node_type htype; 14814 NODE *headlast; 14815 VALUE lit; 14816 14817 if (!head) return tail; 14818 if (!tail) return head; 14819 14820 htype = nd_type(head); 14821 if (htype == NODE_EVSTR) { 14822 NODE *node = NEW_DSTR(Qnil); 14823 head = list_append(node, head); 14824 htype = NODE_DSTR; 14825 } 14826 switch (nd_type(tail)) { 14827 case NODE_STR: 14828 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14829 nd_type(headlast) == NODE_STR) { 14830 htype = NODE_STR; 14831 lit = headlast->nd_lit; 14832 } 14833 else { 14834 lit = head->nd_lit; 14835 } 14836 if (htype == NODE_STR) { 14837 if (!literal_concat0(parser, lit, tail->nd_lit)) { 14838 error: 14839 rb_gc_force_recycle((VALUE)head); 14840 rb_gc_force_recycle((VALUE)tail); 14841 return 0; 14842 } 14843 rb_gc_force_recycle((VALUE)tail); 14844 } 14845 else { 14846 list_append(head, tail); 14847 } 14848 break; 14849 14850 case NODE_DSTR: 14851 if (htype == NODE_STR) { 14852 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 14853 goto error; 14854 tail->nd_lit = head->nd_lit; 14855 rb_gc_force_recycle((VALUE)head); 14856 head = tail; 14857 } 14858 else if (NIL_P(tail->nd_lit)) { 14859 append: 14860 head->nd_alen += tail->nd_alen - 1; 14861 head->nd_next->nd_end->nd_next = tail->nd_next; 14862 head->nd_next->nd_end = tail->nd_next->nd_end; 14863 rb_gc_force_recycle((VALUE)tail); 14864 } 14865 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14866 nd_type(headlast) == NODE_STR) { 14867 lit = headlast->nd_lit; 14868 if (!literal_concat0(parser, lit, tail->nd_lit)) 14869 goto error; 14870 tail->nd_lit = Qnil; 14871 goto append; 14872 } 14873 else { 14874 nd_set_type(tail, NODE_ARRAY); 14875 tail->nd_head = NEW_STR(tail->nd_lit); 14876 list_concat(head, tail); 14877 } 14878 break; 14879 14880 case NODE_EVSTR: 14881 if (htype == NODE_STR) { 14882 nd_set_type(head, NODE_DSTR); 14883 head->nd_alen = 1; 14884 } 14885 list_append(head, tail); 14886 break; 14887 } 14888 return head; 14889 } 14890 14891 static NODE * 14892 evstr2dstr_gen(struct parser_params *parser, NODE *node) 14893 { 14894 if (nd_type(node) == NODE_EVSTR) { 14895 node = list_append(NEW_DSTR(Qnil), node); 14896 } 14897 return node; 14898 } 14899 14900 static NODE * 14901 new_evstr_gen(struct parser_params *parser, NODE *node) 14902 { 14903 NODE *head = node; 14904 14905 if (node) { 14906 switch (nd_type(node)) { 14907 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 14908 return node; 14909 } 14910 } 14911 return NEW_EVSTR(head); 14912 } 14913 14914 static NODE * 14915 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 14916 { 14917 value_expr(recv); 14918 value_expr(arg1); 14919 return NEW_CALL(recv, id, NEW_LIST(arg1)); 14920 } 14921 14922 static NODE * 14923 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 14924 { 14925 value_expr(recv); 14926 return NEW_CALL(recv, id, 0); 14927 } 14928 14929 static NODE* 14930 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14931 { 14932 value_expr(node1); 14933 value_expr(node2); 14934 if (node1) { 14935 switch (nd_type(node1)) { 14936 case NODE_DREGX: 14937 case NODE_DREGX_ONCE: 14938 return NEW_MATCH2(node1, node2); 14939 14940 case NODE_LIT: 14941 if (RB_TYPE_P(node1->nd_lit, T_REGEXP)) { 14942 return NEW_MATCH2(node1, node2); 14943 } 14944 } 14945 } 14946 14947 if (node2) { 14948 switch (nd_type(node2)) { 14949 case NODE_DREGX: 14950 case NODE_DREGX_ONCE: 14951 return NEW_MATCH3(node2, node1); 14952 14953 case NODE_LIT: 14954 if (RB_TYPE_P(node2->nd_lit, T_REGEXP)) { 14955 return NEW_MATCH3(node2, node1); 14956 } 14957 } 14958 } 14959 14960 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 14961 } 14962 14963 static NODE* 14964 gettable_gen(struct parser_params *parser, ID id) 14965 { 14966 switch (id) { 14967 case keyword_self: 14968 return NEW_SELF(); 14969 case keyword_nil: 14970 return NEW_NIL(); 14971 case keyword_true: 14972 return NEW_TRUE(); 14973 case keyword_false: 14974 return NEW_FALSE(); 14975 case keyword__FILE__: 14976 return NEW_STR(rb_str_dup(ruby_sourcefile_string)); 14977 case keyword__LINE__: 14978 return NEW_LIT(INT2FIX(tokline)); 14979 case keyword__ENCODING__: 14980 return NEW_LIT(rb_enc_from_encoding(current_enc)); 14981 } 14982 switch (id_type(id)) { 14983 case ID_LOCAL: 14984 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 14985 if (local_id(id)) return NEW_LVAR(id); 14986 /* method call without arguments */ 14987 return NEW_VCALL(id); 14988 case ID_GLOBAL: 14989 return NEW_GVAR(id); 14990 case ID_INSTANCE: 14991 return NEW_IVAR(id); 14992 case ID_CONST: 14993 return NEW_CONST(id); 14994 case ID_CLASS: 14995 return NEW_CVAR(id); 14996 } 14997 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14998 return 0; 14999 } 15000 #else /* !RIPPER */ 15001 static int 15002 id_is_var_gen(struct parser_params *parser, ID id) 15003 { 15004 if (is_notop_id(id)) { 15005 switch (id & ID_SCOPE_MASK) { 15006 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 15007 return 1; 15008 case ID_LOCAL: 15009 if (dyna_in_block() && dvar_defined(id)) return 1; 15010 if (local_id(id)) return 1; 15011 /* method call without arguments */ 15012 return 0; 15013 } 15014 } 15015 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15016 return 0; 15017 } 15018 #endif /* !RIPPER */ 15019 15020 #if PARSER_DEBUG 15021 static const char * 15022 lex_state_name(enum lex_state_e state) 15023 { 15024 static const char names[][12] = { 15025 "EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG", 15026 "EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS", 15027 "EXPR_VALUE", 15028 }; 15029 15030 if ((unsigned)state & ~(~0u << EXPR_MAX_STATE)) 15031 return names[ffs(state)]; 15032 return NULL; 15033 } 15034 #endif 15035 15036 #ifdef RIPPER 15037 static VALUE 15038 assignable_gen(struct parser_params *parser, VALUE lhs) 15039 #else 15040 static NODE* 15041 assignable_gen(struct parser_params *parser, ID id, NODE *val) 15042 #endif 15043 { 15044 #ifdef RIPPER 15045 ID id = get_id(lhs); 15046 # define assignable_result(x) get_value(lhs) 15047 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 15048 #else 15049 # define assignable_result(x) (x) 15050 #endif 15051 if (!id) return assignable_result(0); 15052 switch (id) { 15053 case keyword_self: 15054 yyerror("Can't change the value of self"); 15055 goto error; 15056 case keyword_nil: 15057 yyerror("Can't assign to nil"); 15058 goto error; 15059 case keyword_true: 15060 yyerror("Can't assign to true"); 15061 goto error; 15062 case keyword_false: 15063 yyerror("Can't assign to false"); 15064 goto error; 15065 case keyword__FILE__: 15066 yyerror("Can't assign to __FILE__"); 15067 goto error; 15068 case keyword__LINE__: 15069 yyerror("Can't assign to __LINE__"); 15070 goto error; 15071 case keyword__ENCODING__: 15072 yyerror("Can't assign to __ENCODING__"); 15073 goto error; 15074 } 15075 switch (id_type(id)) { 15076 case ID_LOCAL: 15077 if (dyna_in_block()) { 15078 if (dvar_curr(id)) { 15079 return assignable_result(NEW_DASGN_CURR(id, val)); 15080 } 15081 else if (dvar_defined(id)) { 15082 return assignable_result(NEW_DASGN(id, val)); 15083 } 15084 else if (local_id(id)) { 15085 return assignable_result(NEW_LASGN(id, val)); 15086 } 15087 else { 15088 dyna_var(id); 15089 return assignable_result(NEW_DASGN_CURR(id, val)); 15090 } 15091 } 15092 else { 15093 if (!local_id(id)) { 15094 local_var(id); 15095 } 15096 return assignable_result(NEW_LASGN(id, val)); 15097 } 15098 break; 15099 case ID_GLOBAL: 15100 return assignable_result(NEW_GASGN(id, val)); 15101 case ID_INSTANCE: 15102 return assignable_result(NEW_IASGN(id, val)); 15103 case ID_CONST: 15104 if (!in_def && !in_single) 15105 return assignable_result(NEW_CDECL(id, val, 0)); 15106 yyerror("dynamic constant assignment"); 15107 break; 15108 case ID_CLASS: 15109 return assignable_result(NEW_CVASGN(id, val)); 15110 default: 15111 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 15112 } 15113 error: 15114 return assignable_result(0); 15115 #undef assignable_result 15116 #undef parser_yyerror 15117 } 15118 15119 static int 15120 is_private_local_id(ID name) 15121 { 15122 VALUE s; 15123 if (name == idUScore) return 1; 15124 if (!is_local_id(name)) return 0; 15125 s = rb_id2str(name); 15126 if (!s) return 0; 15127 return RSTRING_PTR(s)[0] == '_'; 15128 } 15129 15130 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) 15131 15132 static ID 15133 shadowing_lvar_gen(struct parser_params *parser, ID name) 15134 { 15135 if (is_private_local_id(name)) return name; 15136 if (dyna_in_block()) { 15137 if (dvar_curr(name)) { 15138 yyerror("duplicated argument name"); 15139 } 15140 else if (dvar_defined_get(name) || local_id(name)) { 15141 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 15142 vtable_add(lvtbl->vars, name); 15143 if (lvtbl->used) { 15144 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 15145 } 15146 } 15147 } 15148 else { 15149 if (local_id(name)) { 15150 yyerror("duplicated argument name"); 15151 } 15152 } 15153 return name; 15154 } 15155 15156 static void 15157 new_bv_gen(struct parser_params *parser, ID name) 15158 { 15159 if (!name) return; 15160 if (!is_local_id(name)) { 15161 compile_error(PARSER_ARG "invalid local variable - %s", 15162 rb_id2name(name)); 15163 return; 15164 } 15165 shadowing_lvar(name); 15166 dyna_var(name); 15167 } 15168 15169 #ifndef RIPPER 15170 static NODE * 15171 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 15172 { 15173 if (recv && nd_type(recv) == NODE_SELF) 15174 recv = (NODE *)1; 15175 return NEW_ATTRASGN(recv, tASET, idx); 15176 } 15177 15178 static void 15179 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15180 { 15181 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 15182 compile_error(PARSER_ARG "both block arg and actual block given"); 15183 } 15184 } 15185 15186 static const char id_type_names[][9] = { 15187 "LOCAL", 15188 "INSTANCE", 15189 "", /* INSTANCE2 */ 15190 "GLOBAL", 15191 "ATTRSET", 15192 "CONST", 15193 "CLASS", 15194 "JUNK", 15195 }; 15196 15197 ID 15198 rb_id_attrset(ID id) 15199 { 15200 if (!is_notop_id(id)) { 15201 switch (id) { 15202 case tAREF: case tASET: 15203 return tASET; /* only exception */ 15204 } 15205 rb_name_error(id, "cannot make operator ID :%s attrset", rb_id2name(id)); 15206 } 15207 else { 15208 int scope = (int)(id & ID_SCOPE_MASK); 15209 switch (scope) { 15210 case ID_LOCAL: case ID_INSTANCE: case ID_GLOBAL: 15211 case ID_CONST: case ID_CLASS: case ID_JUNK: 15212 break; 15213 case ID_ATTRSET: 15214 return id; 15215 default: 15216 rb_name_error(id, "cannot make %s ID %+"PRIsVALUE" attrset", 15217 id_type_names[scope], ID2SYM(id)); 15218 15219 } 15220 } 15221 id &= ~ID_SCOPE_MASK; 15222 id |= ID_ATTRSET; 15223 return id; 15224 } 15225 15226 static NODE * 15227 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 15228 { 15229 if (recv && nd_type(recv) == NODE_SELF) 15230 recv = (NODE *)1; 15231 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 15232 } 15233 15234 static void 15235 rb_backref_error_gen(struct parser_params *parser, NODE *node) 15236 { 15237 switch (nd_type(node)) { 15238 case NODE_NTH_REF: 15239 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 15240 break; 15241 case NODE_BACK_REF: 15242 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 15243 break; 15244 } 15245 } 15246 15247 static NODE * 15248 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15249 { 15250 if (!node2) return node1; 15251 switch (nd_type(node1)) { 15252 case NODE_BLOCK_PASS: 15253 if (node1->nd_head) 15254 node1->nd_head = arg_concat(node1->nd_head, node2); 15255 else 15256 node1->nd_head = NEW_LIST(node2); 15257 return node1; 15258 case NODE_ARGSPUSH: 15259 if (nd_type(node2) != NODE_ARRAY) break; 15260 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 15261 nd_set_type(node1, NODE_ARGSCAT); 15262 return node1; 15263 case NODE_ARGSCAT: 15264 if (nd_type(node2) != NODE_ARRAY || 15265 nd_type(node1->nd_body) != NODE_ARRAY) break; 15266 node1->nd_body = list_concat(node1->nd_body, node2); 15267 return node1; 15268 } 15269 return NEW_ARGSCAT(node1, node2); 15270 } 15271 15272 static NODE * 15273 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15274 { 15275 if (!node1) return NEW_LIST(node2); 15276 switch (nd_type(node1)) { 15277 case NODE_ARRAY: 15278 return list_append(node1, node2); 15279 case NODE_BLOCK_PASS: 15280 node1->nd_head = arg_append(node1->nd_head, node2); 15281 return node1; 15282 case NODE_ARGSPUSH: 15283 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 15284 nd_set_type(node1, NODE_ARGSCAT); 15285 return node1; 15286 } 15287 return NEW_ARGSPUSH(node1, node2); 15288 } 15289 15290 static NODE * 15291 splat_array(NODE* node) 15292 { 15293 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 15294 if (nd_type(node) == NODE_ARRAY) return node; 15295 return 0; 15296 } 15297 15298 static NODE * 15299 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 15300 { 15301 if (!lhs) return 0; 15302 15303 switch (nd_type(lhs)) { 15304 case NODE_GASGN: 15305 case NODE_IASGN: 15306 case NODE_IASGN2: 15307 case NODE_LASGN: 15308 case NODE_DASGN: 15309 case NODE_DASGN_CURR: 15310 case NODE_MASGN: 15311 case NODE_CDECL: 15312 case NODE_CVASGN: 15313 lhs->nd_value = rhs; 15314 break; 15315 15316 case NODE_ATTRASGN: 15317 case NODE_CALL: 15318 lhs->nd_args = arg_append(lhs->nd_args, rhs); 15319 break; 15320 15321 default: 15322 /* should not happen */ 15323 break; 15324 } 15325 15326 return lhs; 15327 } 15328 15329 static int 15330 value_expr_gen(struct parser_params *parser, NODE *node) 15331 { 15332 int cond = 0; 15333 15334 if (!node) { 15335 rb_warning0("empty expression"); 15336 } 15337 while (node) { 15338 switch (nd_type(node)) { 15339 case NODE_DEFN: 15340 case NODE_DEFS: 15341 parser_warning(node, "void value expression"); 15342 return FALSE; 15343 15344 case NODE_RETURN: 15345 case NODE_BREAK: 15346 case NODE_NEXT: 15347 case NODE_REDO: 15348 case NODE_RETRY: 15349 if (!cond) yyerror("void value expression"); 15350 /* or "control never reach"? */ 15351 return FALSE; 15352 15353 case NODE_BLOCK: 15354 while (node->nd_next) { 15355 node = node->nd_next; 15356 } 15357 node = node->nd_head; 15358 break; 15359 15360 case NODE_BEGIN: 15361 node = node->nd_body; 15362 break; 15363 15364 case NODE_IF: 15365 if (!node->nd_body) { 15366 node = node->nd_else; 15367 break; 15368 } 15369 else if (!node->nd_else) { 15370 node = node->nd_body; 15371 break; 15372 } 15373 if (!value_expr(node->nd_body)) return FALSE; 15374 node = node->nd_else; 15375 break; 15376 15377 case NODE_AND: 15378 case NODE_OR: 15379 cond = 1; 15380 node = node->nd_2nd; 15381 break; 15382 15383 default: 15384 return TRUE; 15385 } 15386 } 15387 15388 return TRUE; 15389 } 15390 15391 static void 15392 void_expr_gen(struct parser_params *parser, NODE *node) 15393 { 15394 const char *useless = 0; 15395 15396 if (!RTEST(ruby_verbose)) return; 15397 15398 if (!node) return; 15399 switch (nd_type(node)) { 15400 case NODE_CALL: 15401 switch (node->nd_mid) { 15402 case '+': 15403 case '-': 15404 case '*': 15405 case '/': 15406 case '%': 15407 case tPOW: 15408 case tUPLUS: 15409 case tUMINUS: 15410 case '|': 15411 case '^': 15412 case '&': 15413 case tCMP: 15414 case '>': 15415 case tGEQ: 15416 case '<': 15417 case tLEQ: 15418 case tEQ: 15419 case tNEQ: 15420 useless = rb_id2name(node->nd_mid); 15421 break; 15422 } 15423 break; 15424 15425 case NODE_LVAR: 15426 case NODE_DVAR: 15427 case NODE_GVAR: 15428 case NODE_IVAR: 15429 case NODE_CVAR: 15430 case NODE_NTH_REF: 15431 case NODE_BACK_REF: 15432 useless = "a variable"; 15433 break; 15434 case NODE_CONST: 15435 useless = "a constant"; 15436 break; 15437 case NODE_LIT: 15438 case NODE_STR: 15439 case NODE_DSTR: 15440 case NODE_DREGX: 15441 case NODE_DREGX_ONCE: 15442 useless = "a literal"; 15443 break; 15444 case NODE_COLON2: 15445 case NODE_COLON3: 15446 useless = "::"; 15447 break; 15448 case NODE_DOT2: 15449 useless = ".."; 15450 break; 15451 case NODE_DOT3: 15452 useless = "..."; 15453 break; 15454 case NODE_SELF: 15455 useless = "self"; 15456 break; 15457 case NODE_NIL: 15458 useless = "nil"; 15459 break; 15460 case NODE_TRUE: 15461 useless = "true"; 15462 break; 15463 case NODE_FALSE: 15464 useless = "false"; 15465 break; 15466 case NODE_DEFINED: 15467 useless = "defined?"; 15468 break; 15469 } 15470 15471 if (useless) { 15472 int line = ruby_sourceline; 15473 15474 ruby_sourceline = nd_line(node); 15475 rb_warnS("possibly useless use of %s in void context", useless); 15476 ruby_sourceline = line; 15477 } 15478 } 15479 15480 static void 15481 void_stmts_gen(struct parser_params *parser, NODE *node) 15482 { 15483 if (!RTEST(ruby_verbose)) return; 15484 if (!node) return; 15485 if (nd_type(node) != NODE_BLOCK) return; 15486 15487 for (;;) { 15488 if (!node->nd_next) return; 15489 void_expr0(node->nd_head); 15490 node = node->nd_next; 15491 } 15492 } 15493 15494 static NODE * 15495 remove_begin(NODE *node) 15496 { 15497 NODE **n = &node, *n1 = node; 15498 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 15499 *n = n1 = n1->nd_body; 15500 } 15501 return node; 15502 } 15503 15504 static void 15505 reduce_nodes_gen(struct parser_params *parser, NODE **body) 15506 { 15507 NODE *node = *body; 15508 15509 if (!node) { 15510 *body = NEW_NIL(); 15511 return; 15512 } 15513 #define subnodes(n1, n2) \ 15514 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 15515 (!node->n2) ? (body = &node->n1, 1) : \ 15516 (reduce_nodes(&node->n1), body = &node->n2, 1)) 15517 15518 while (node) { 15519 int newline = (int)(node->flags & NODE_FL_NEWLINE); 15520 switch (nd_type(node)) { 15521 end: 15522 case NODE_NIL: 15523 *body = 0; 15524 return; 15525 case NODE_RETURN: 15526 *body = node = node->nd_stts; 15527 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15528 continue; 15529 case NODE_BEGIN: 15530 *body = node = node->nd_body; 15531 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15532 continue; 15533 case NODE_BLOCK: 15534 body = &node->nd_end->nd_head; 15535 break; 15536 case NODE_IF: 15537 if (subnodes(nd_body, nd_else)) break; 15538 return; 15539 case NODE_CASE: 15540 body = &node->nd_body; 15541 break; 15542 case NODE_WHEN: 15543 if (!subnodes(nd_body, nd_next)) goto end; 15544 break; 15545 case NODE_ENSURE: 15546 if (!subnodes(nd_head, nd_resq)) goto end; 15547 break; 15548 case NODE_RESCUE: 15549 if (node->nd_else) { 15550 body = &node->nd_resq; 15551 break; 15552 } 15553 if (!subnodes(nd_head, nd_resq)) goto end; 15554 break; 15555 default: 15556 return; 15557 } 15558 node = *body; 15559 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15560 } 15561 15562 #undef subnodes 15563 } 15564 15565 static int 15566 is_static_content(NODE *node) 15567 { 15568 if (!node) return 1; 15569 switch (nd_type(node)) { 15570 case NODE_HASH: 15571 if (!(node = node->nd_head)) break; 15572 case NODE_ARRAY: 15573 do { 15574 if (!is_static_content(node->nd_head)) return 0; 15575 } while ((node = node->nd_next) != 0); 15576 case NODE_LIT: 15577 case NODE_STR: 15578 case NODE_NIL: 15579 case NODE_TRUE: 15580 case NODE_FALSE: 15581 case NODE_ZARRAY: 15582 break; 15583 default: 15584 return 0; 15585 } 15586 return 1; 15587 } 15588 15589 static int 15590 assign_in_cond(struct parser_params *parser, NODE *node) 15591 { 15592 switch (nd_type(node)) { 15593 case NODE_MASGN: 15594 yyerror("multiple assignment in conditional"); 15595 return 1; 15596 15597 case NODE_LASGN: 15598 case NODE_DASGN: 15599 case NODE_DASGN_CURR: 15600 case NODE_GASGN: 15601 case NODE_IASGN: 15602 break; 15603 15604 default: 15605 return 0; 15606 } 15607 15608 if (!node->nd_value) return 1; 15609 if (is_static_content(node->nd_value)) { 15610 /* reports always */ 15611 parser_warn(node->nd_value, "found = in conditional, should be =="); 15612 } 15613 return 1; 15614 } 15615 15616 static void 15617 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15618 { 15619 if (!e_option_supplied(parser)) parser_warn(node, str); 15620 } 15621 15622 static void 15623 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15624 { 15625 if (!e_option_supplied(parser)) parser_warning(node, str); 15626 } 15627 15628 static void 15629 fixup_nodes(NODE **rootnode) 15630 { 15631 NODE *node, *next, *head; 15632 15633 for (node = *rootnode; node; node = next) { 15634 enum node_type type; 15635 VALUE val; 15636 15637 next = node->nd_next; 15638 head = node->nd_head; 15639 rb_gc_force_recycle((VALUE)node); 15640 *rootnode = next; 15641 switch (type = nd_type(head)) { 15642 case NODE_DOT2: 15643 case NODE_DOT3: 15644 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 15645 type == NODE_DOT3); 15646 rb_gc_force_recycle((VALUE)head->nd_beg); 15647 rb_gc_force_recycle((VALUE)head->nd_end); 15648 nd_set_type(head, NODE_LIT); 15649 head->nd_lit = val; 15650 break; 15651 default: 15652 break; 15653 } 15654 } 15655 } 15656 15657 static NODE *cond0(struct parser_params*,NODE*); 15658 15659 static NODE* 15660 range_op(struct parser_params *parser, NODE *node) 15661 { 15662 enum node_type type; 15663 15664 if (node == 0) return 0; 15665 15666 type = nd_type(node); 15667 value_expr(node); 15668 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 15669 warn_unless_e_option(parser, node, "integer literal in conditional range"); 15670 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 15671 } 15672 return cond0(parser, node); 15673 } 15674 15675 static int 15676 literal_node(NODE *node) 15677 { 15678 if (!node) return 1; /* same as NODE_NIL */ 15679 switch (nd_type(node)) { 15680 case NODE_LIT: 15681 case NODE_STR: 15682 case NODE_DSTR: 15683 case NODE_EVSTR: 15684 case NODE_DREGX: 15685 case NODE_DREGX_ONCE: 15686 case NODE_DSYM: 15687 return 2; 15688 case NODE_TRUE: 15689 case NODE_FALSE: 15690 case NODE_NIL: 15691 return 1; 15692 } 15693 return 0; 15694 } 15695 15696 static NODE* 15697 cond0(struct parser_params *parser, NODE *node) 15698 { 15699 if (node == 0) return 0; 15700 assign_in_cond(parser, node); 15701 15702 switch (nd_type(node)) { 15703 case NODE_DSTR: 15704 case NODE_EVSTR: 15705 case NODE_STR: 15706 rb_warn0("string literal in condition"); 15707 break; 15708 15709 case NODE_DREGX: 15710 case NODE_DREGX_ONCE: 15711 warning_unless_e_option(parser, node, "regex literal in condition"); 15712 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 15713 15714 case NODE_AND: 15715 case NODE_OR: 15716 node->nd_1st = cond0(parser, node->nd_1st); 15717 node->nd_2nd = cond0(parser, node->nd_2nd); 15718 break; 15719 15720 case NODE_DOT2: 15721 case NODE_DOT3: 15722 node->nd_beg = range_op(parser, node->nd_beg); 15723 node->nd_end = range_op(parser, node->nd_end); 15724 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 15725 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 15726 if (!e_option_supplied(parser)) { 15727 int b = literal_node(node->nd_beg); 15728 int e = literal_node(node->nd_end); 15729 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 15730 parser_warn(node, "range literal in condition"); 15731 } 15732 } 15733 break; 15734 15735 case NODE_DSYM: 15736 parser_warning(node, "literal in condition"); 15737 break; 15738 15739 case NODE_LIT: 15740 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) { 15741 warn_unless_e_option(parser, node, "regex literal in condition"); 15742 nd_set_type(node, NODE_MATCH); 15743 } 15744 else { 15745 parser_warning(node, "literal in condition"); 15746 } 15747 default: 15748 break; 15749 } 15750 return node; 15751 } 15752 15753 static NODE* 15754 cond_gen(struct parser_params *parser, NODE *node) 15755 { 15756 if (node == 0) return 0; 15757 return cond0(parser, node); 15758 } 15759 15760 static NODE* 15761 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 15762 { 15763 value_expr(left); 15764 if (left && (enum node_type)nd_type(left) == type) { 15765 NODE *node = left, *second; 15766 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 15767 node = second; 15768 } 15769 node->nd_2nd = NEW_NODE(type, second, right, 0); 15770 return left; 15771 } 15772 return NEW_NODE(type, left, right, 0); 15773 } 15774 15775 static void 15776 no_blockarg(struct parser_params *parser, NODE *node) 15777 { 15778 if (node && nd_type(node) == NODE_BLOCK_PASS) { 15779 compile_error(PARSER_ARG "block argument should not be given"); 15780 } 15781 } 15782 15783 static NODE * 15784 ret_args_gen(struct parser_params *parser, NODE *node) 15785 { 15786 if (node) { 15787 no_blockarg(parser, node); 15788 if (nd_type(node) == NODE_ARRAY) { 15789 if (node->nd_next == 0) { 15790 node = node->nd_head; 15791 } 15792 else { 15793 nd_set_type(node, NODE_VALUES); 15794 } 15795 } 15796 } 15797 return node; 15798 } 15799 15800 static NODE * 15801 new_yield_gen(struct parser_params *parser, NODE *node) 15802 { 15803 if (node) no_blockarg(parser, node); 15804 15805 return NEW_YIELD(node); 15806 } 15807 15808 static NODE* 15809 negate_lit(NODE *node) 15810 { 15811 switch (TYPE(node->nd_lit)) { 15812 case T_FIXNUM: 15813 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 15814 break; 15815 case T_BIGNUM: 15816 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 15817 break; 15818 case T_FLOAT: 15819 #if USE_FLONUM 15820 if (FLONUM_P(node->nd_lit)) { 15821 node->nd_lit = DBL2NUM(-RFLOAT_VALUE(node->nd_lit)); 15822 } 15823 else { 15824 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15825 } 15826 #else 15827 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15828 #endif 15829 break; 15830 default: 15831 break; 15832 } 15833 return node; 15834 } 15835 15836 static NODE * 15837 arg_blk_pass(NODE *node1, NODE *node2) 15838 { 15839 if (node2) { 15840 node2->nd_head = node1; 15841 return node2; 15842 } 15843 return node1; 15844 } 15845 15846 15847 static NODE* 15848 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail) 15849 { 15850 int saved_line = ruby_sourceline; 15851 struct rb_args_info *args = tail->nd_ainfo; 15852 15853 args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0; 15854 args->pre_init = m ? m->nd_next : 0; 15855 15856 args->post_args_num = p ? rb_long2int(p->nd_plen) : 0; 15857 args->post_init = p ? p->nd_next : 0; 15858 args->first_post_arg = p ? p->nd_pid : 0; 15859 15860 args->rest_arg = r; 15861 15862 args->opt_args = o; 15863 15864 ruby_sourceline = saved_line; 15865 15866 return tail; 15867 } 15868 15869 static NODE* 15870 new_args_tail_gen(struct parser_params *parser, NODE *k, ID kr, ID b) 15871 { 15872 int saved_line = ruby_sourceline; 15873 struct rb_args_info *args; 15874 NODE *kw_rest_arg = 0; 15875 NODE *node; 15876 15877 args = ALLOC(struct rb_args_info); 15878 MEMZERO(args, struct rb_args_info, 1); 15879 node = NEW_NODE(NODE_ARGS, 0, 0, args); 15880 15881 args->block_arg = b; 15882 args->kw_args = k; 15883 if (k && !kr) kr = internal_id(); 15884 if (kr) { 15885 arg_var(kr); 15886 kw_rest_arg = NEW_DVAR(kr); 15887 } 15888 args->kw_rest_arg = kw_rest_arg; 15889 15890 ruby_sourceline = saved_line; 15891 return node; 15892 } 15893 15894 static NODE* 15895 dsym_node_gen(struct parser_params *parser, NODE *node) 15896 { 15897 VALUE lit; 15898 15899 if (!node) { 15900 return NEW_LIT(ID2SYM(idNULL)); 15901 } 15902 15903 switch (nd_type(node)) { 15904 case NODE_DSTR: 15905 nd_set_type(node, NODE_DSYM); 15906 break; 15907 case NODE_STR: 15908 lit = node->nd_lit; 15909 node->nd_lit = ID2SYM(rb_intern_str(lit)); 15910 nd_set_type(node, NODE_LIT); 15911 break; 15912 default: 15913 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node)); 15914 break; 15915 } 15916 return node; 15917 } 15918 #endif /* !RIPPER */ 15919 15920 #ifndef RIPPER 15921 static NODE * 15922 new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 15923 { 15924 NODE *asgn; 15925 15926 if (lhs) { 15927 ID vid = lhs->nd_vid; 15928 if (op == tOROP) { 15929 lhs->nd_value = rhs; 15930 asgn = NEW_OP_ASGN_OR(gettable(vid), lhs); 15931 if (is_asgn_or_id(vid)) { 15932 asgn->nd_aid = vid; 15933 } 15934 } 15935 else if (op == tANDOP) { 15936 lhs->nd_value = rhs; 15937 asgn = NEW_OP_ASGN_AND(gettable(vid), lhs); 15938 } 15939 else { 15940 asgn = lhs; 15941 asgn->nd_value = NEW_CALL(gettable(vid), op, NEW_LIST(rhs)); 15942 } 15943 } 15944 else { 15945 asgn = NEW_BEGIN(0); 15946 } 15947 return asgn; 15948 } 15949 15950 static NODE * 15951 new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs) 15952 { 15953 NODE *asgn; 15954 15955 if (op == tOROP) { 15956 op = 0; 15957 } 15958 else if (op == tANDOP) { 15959 op = 1; 15960 } 15961 asgn = NEW_OP_ASGN2(lhs, attr, op, rhs); 15962 fixpos(asgn, lhs); 15963 return asgn; 15964 } 15965 15966 static NODE * 15967 new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 15968 { 15969 NODE *asgn; 15970 15971 if (op == tOROP) { 15972 op = 0; 15973 } 15974 else if (op == tANDOP) { 15975 op = 1; 15976 } 15977 if (lhs) { 15978 asgn = NEW_OP_CDECL(lhs, op, rhs); 15979 } 15980 else { 15981 asgn = NEW_BEGIN(0); 15982 } 15983 fixpos(asgn, lhs); 15984 return asgn; 15985 } 15986 #else 15987 static VALUE 15988 new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs) 15989 { 15990 return dispatch3(opassign, lhs, op, rhs); 15991 } 15992 15993 static VALUE 15994 new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs) 15995 { 15996 VALUE recv = dispatch3(field, lhs, type, attr); 15997 return dispatch3(opassign, recv, op, rhs); 15998 } 15999 #endif 16000 16001 static void 16002 warn_unused_var(struct parser_params *parser, struct local_vars *local) 16003 { 16004 int i, cnt; 16005 ID *v, *u; 16006 16007 if (!local->used) return; 16008 v = local->vars->tbl; 16009 u = local->used->tbl; 16010 cnt = local->used->pos; 16011 if (cnt != local->vars->pos) { 16012 rb_bug("local->used->pos != local->vars->pos"); 16013 } 16014 for (i = 0; i < cnt; ++i) { 16015 if (!v[i] || (u[i] & LVAR_USED)) continue; 16016 if (is_private_local_id(v[i])) continue; 16017 rb_warn4S(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 16018 } 16019 } 16020 16021 static void 16022 local_push_gen(struct parser_params *parser, int inherit_dvars) 16023 { 16024 struct local_vars *local; 16025 16026 local = ALLOC(struct local_vars); 16027 local->prev = lvtbl; 16028 local->args = vtable_alloc(0); 16029 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 16030 local->used = !(inherit_dvars && 16031 (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) && 16032 RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 16033 local->cmdargs = cmdarg_stack; 16034 cmdarg_stack = 0; 16035 lvtbl = local; 16036 } 16037 16038 static void 16039 local_pop_gen(struct parser_params *parser) 16040 { 16041 struct local_vars *local = lvtbl->prev; 16042 if (lvtbl->used) { 16043 warn_unused_var(parser, lvtbl); 16044 vtable_free(lvtbl->used); 16045 } 16046 vtable_free(lvtbl->args); 16047 vtable_free(lvtbl->vars); 16048 cmdarg_stack = lvtbl->cmdargs; 16049 xfree(lvtbl); 16050 lvtbl = local; 16051 } 16052 16053 #ifndef RIPPER 16054 static ID* 16055 vtable_tblcpy(ID *buf, const struct vtable *src) 16056 { 16057 int i, cnt = vtable_size(src); 16058 16059 if (cnt > 0) { 16060 buf[0] = cnt; 16061 for (i = 0; i < cnt; i++) { 16062 buf[i] = src->tbl[i]; 16063 } 16064 return buf; 16065 } 16066 return 0; 16067 } 16068 16069 static ID* 16070 local_tbl_gen(struct parser_params *parser) 16071 { 16072 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 16073 ID *buf; 16074 16075 if (cnt <= 0) return 0; 16076 buf = ALLOC_N(ID, cnt + 1); 16077 vtable_tblcpy(buf+1, lvtbl->args); 16078 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 16079 buf[0] = cnt; 16080 return buf; 16081 } 16082 #endif 16083 16084 static int 16085 arg_var_gen(struct parser_params *parser, ID id) 16086 { 16087 vtable_add(lvtbl->args, id); 16088 return vtable_size(lvtbl->args) - 1; 16089 } 16090 16091 static int 16092 local_var_gen(struct parser_params *parser, ID id) 16093 { 16094 vtable_add(lvtbl->vars, id); 16095 if (lvtbl->used) { 16096 vtable_add(lvtbl->used, (ID)ruby_sourceline); 16097 } 16098 return vtable_size(lvtbl->vars) - 1; 16099 } 16100 16101 static int 16102 local_id_gen(struct parser_params *parser, ID id) 16103 { 16104 struct vtable *vars, *args, *used; 16105 16106 vars = lvtbl->vars; 16107 args = lvtbl->args; 16108 used = lvtbl->used; 16109 16110 while (vars && POINTER_P(vars->prev)) { 16111 vars = vars->prev; 16112 args = args->prev; 16113 if (used) used = used->prev; 16114 } 16115 16116 if (vars && vars->prev == DVARS_INHERIT) { 16117 return rb_local_defined(id); 16118 } 16119 else if (vtable_included(args, id)) { 16120 return 1; 16121 } 16122 else { 16123 int i = vtable_included(vars, id); 16124 if (i && used) used->tbl[i-1] |= LVAR_USED; 16125 return i != 0; 16126 } 16127 } 16128 16129 static const struct vtable * 16130 dyna_push_gen(struct parser_params *parser) 16131 { 16132 lvtbl->args = vtable_alloc(lvtbl->args); 16133 lvtbl->vars = vtable_alloc(lvtbl->vars); 16134 if (lvtbl->used) { 16135 lvtbl->used = vtable_alloc(lvtbl->used); 16136 } 16137 return lvtbl->args; 16138 } 16139 16140 static void 16141 dyna_pop_1(struct parser_params *parser) 16142 { 16143 struct vtable *tmp; 16144 16145 if ((tmp = lvtbl->used) != 0) { 16146 warn_unused_var(parser, lvtbl); 16147 lvtbl->used = lvtbl->used->prev; 16148 vtable_free(tmp); 16149 } 16150 tmp = lvtbl->args; 16151 lvtbl->args = lvtbl->args->prev; 16152 vtable_free(tmp); 16153 tmp = lvtbl->vars; 16154 lvtbl->vars = lvtbl->vars->prev; 16155 vtable_free(tmp); 16156 } 16157 16158 static void 16159 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 16160 { 16161 while (lvtbl->args != lvargs) { 16162 dyna_pop_1(parser); 16163 if (!lvtbl->args) { 16164 struct local_vars *local = lvtbl->prev; 16165 xfree(lvtbl); 16166 lvtbl = local; 16167 } 16168 } 16169 dyna_pop_1(parser); 16170 } 16171 16172 static int 16173 dyna_in_block_gen(struct parser_params *parser) 16174 { 16175 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 16176 } 16177 16178 static int 16179 dvar_defined_gen(struct parser_params *parser, ID id, int get) 16180 { 16181 struct vtable *vars, *args, *used; 16182 int i; 16183 16184 args = lvtbl->args; 16185 vars = lvtbl->vars; 16186 used = lvtbl->used; 16187 16188 while (POINTER_P(vars)) { 16189 if (vtable_included(args, id)) { 16190 return 1; 16191 } 16192 if ((i = vtable_included(vars, id)) != 0) { 16193 if (used) used->tbl[i-1] |= LVAR_USED; 16194 return 1; 16195 } 16196 args = args->prev; 16197 vars = vars->prev; 16198 if (get) used = 0; 16199 if (used) used = used->prev; 16200 } 16201 16202 if (vars == DVARS_INHERIT) { 16203 return rb_dvar_defined(id); 16204 } 16205 16206 return 0; 16207 } 16208 16209 static int 16210 dvar_curr_gen(struct parser_params *parser, ID id) 16211 { 16212 return (vtable_included(lvtbl->args, id) || 16213 vtable_included(lvtbl->vars, id)); 16214 } 16215 16216 #ifndef RIPPER 16217 static void 16218 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 16219 { 16220 int c = RE_OPTION_ENCODING_IDX(options); 16221 16222 if (c) { 16223 int opt, idx; 16224 rb_char_to_option_kcode(c, &opt, &idx); 16225 if (idx != ENCODING_GET(str) && 16226 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16227 goto error; 16228 } 16229 ENCODING_SET(str, idx); 16230 } 16231 else if (RE_OPTION_ENCODING_NONE(options)) { 16232 if (!ENCODING_IS_ASCII8BIT(str) && 16233 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16234 c = 'n'; 16235 goto error; 16236 } 16237 rb_enc_associate(str, rb_ascii8bit_encoding()); 16238 } 16239 else if (current_enc == rb_usascii_encoding()) { 16240 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16241 /* raise in re.c */ 16242 rb_enc_associate(str, rb_usascii_encoding()); 16243 } 16244 else { 16245 rb_enc_associate(str, rb_ascii8bit_encoding()); 16246 } 16247 } 16248 return; 16249 16250 error: 16251 compile_error(PARSER_ARG 16252 "regexp encoding option '%c' differs from source encoding '%s'", 16253 c, rb_enc_name(rb_enc_get(str))); 16254 } 16255 16256 static int 16257 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 16258 { 16259 VALUE err; 16260 reg_fragment_setenc(str, options); 16261 err = rb_reg_check_preprocess(str); 16262 if (err != Qnil) { 16263 err = rb_obj_as_string(err); 16264 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 16265 RB_GC_GUARD(err); 16266 return 0; 16267 } 16268 return 1; 16269 } 16270 16271 typedef struct { 16272 struct parser_params* parser; 16273 rb_encoding *enc; 16274 NODE *succ_block; 16275 NODE *fail_block; 16276 int num; 16277 } reg_named_capture_assign_t; 16278 16279 static int 16280 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 16281 int back_num, int *back_refs, OnigRegex regex, void *arg0) 16282 { 16283 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 16284 struct parser_params* parser = arg->parser; 16285 rb_encoding *enc = arg->enc; 16286 long len = name_end - name; 16287 const char *s = (const char *)name; 16288 ID var; 16289 16290 arg->num++; 16291 16292 if (arg->succ_block == 0) { 16293 arg->succ_block = NEW_BEGIN(0); 16294 arg->fail_block = NEW_BEGIN(0); 16295 } 16296 16297 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 16298 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 16299 !rb_enc_symname2_p(s, len, enc)) { 16300 return ST_CONTINUE; 16301 } 16302 var = rb_intern3(s, len, enc); 16303 if (dvar_defined(var) || local_id(var)) { 16304 rb_warningS("named capture conflicts a local variable - %s", 16305 rb_id2name(var)); 16306 } 16307 arg->succ_block = block_append(arg->succ_block, 16308 newline_node(node_assign(assignable(var,0), 16309 NEW_CALL( 16310 gettable(rb_intern("$~")), 16311 idAREF, 16312 NEW_LIST(NEW_LIT(ID2SYM(var)))) 16313 ))); 16314 arg->fail_block = block_append(arg->fail_block, 16315 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 16316 return ST_CONTINUE; 16317 } 16318 16319 static NODE * 16320 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 16321 { 16322 reg_named_capture_assign_t arg; 16323 16324 arg.parser = parser; 16325 arg.enc = rb_enc_get(regexp); 16326 arg.succ_block = 0; 16327 arg.fail_block = 0; 16328 arg.num = 0; 16329 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 16330 16331 if (arg.num == 0) 16332 return match; 16333 16334 return 16335 block_append( 16336 newline_node(match), 16337 NEW_IF(gettable(rb_intern("$~")), 16338 block_append( 16339 newline_node(arg.succ_block), 16340 newline_node( 16341 NEW_CALL( 16342 gettable(rb_intern("$~")), 16343 rb_intern("begin"), 16344 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 16345 block_append( 16346 newline_node(arg.fail_block), 16347 newline_node( 16348 NEW_LIT(Qnil))))); 16349 } 16350 16351 static VALUE 16352 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 16353 { 16354 VALUE re; 16355 VALUE err; 16356 16357 reg_fragment_setenc(str, options); 16358 err = rb_errinfo(); 16359 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 16360 if (NIL_P(re)) { 16361 ID mesg = rb_intern("mesg"); 16362 VALUE m = rb_attr_get(rb_errinfo(), mesg); 16363 rb_set_errinfo(err); 16364 if (!NIL_P(err)) { 16365 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 16366 } 16367 else { 16368 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 16369 } 16370 return Qnil; 16371 } 16372 return re; 16373 } 16374 16375 void 16376 rb_gc_mark_parser(void) 16377 { 16378 } 16379 16380 NODE* 16381 rb_parser_append_print(VALUE vparser, NODE *node) 16382 { 16383 NODE *prelude = 0; 16384 NODE *scope = node; 16385 struct parser_params *parser; 16386 16387 if (!node) return node; 16388 16389 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16390 16391 node = node->nd_body; 16392 16393 if (nd_type(node) == NODE_PRELUDE) { 16394 prelude = node; 16395 node = node->nd_body; 16396 } 16397 16398 node = block_append(node, 16399 NEW_FCALL(rb_intern("print"), 16400 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 16401 if (prelude) { 16402 prelude->nd_body = node; 16403 scope->nd_body = prelude; 16404 } 16405 else { 16406 scope->nd_body = node; 16407 } 16408 16409 return scope; 16410 } 16411 16412 NODE * 16413 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 16414 { 16415 NODE *prelude = 0; 16416 NODE *scope = node; 16417 struct parser_params *parser; 16418 16419 if (!node) return node; 16420 16421 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16422 16423 node = node->nd_body; 16424 16425 if (nd_type(node) == NODE_PRELUDE) { 16426 prelude = node; 16427 node = node->nd_body; 16428 } 16429 if (split) { 16430 node = block_append(NEW_GASGN(rb_intern("$F"), 16431 NEW_CALL(NEW_GVAR(rb_intern("$_")), 16432 rb_intern("split"), 0)), 16433 node); 16434 } 16435 if (chop) { 16436 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 16437 rb_intern("chop!"), 0), node); 16438 } 16439 16440 node = NEW_OPT_N(node); 16441 16442 if (prelude) { 16443 prelude->nd_body = node; 16444 scope->nd_body = prelude; 16445 } 16446 else { 16447 scope->nd_body = node; 16448 } 16449 16450 return scope; 16451 } 16452 16453 static const struct { 16454 ID token; 16455 const char *name; 16456 } op_tbl[] = { 16457 {tDOT2, ".."}, 16458 {tDOT3, "..."}, 16459 {tPOW, "**"}, 16460 {tDSTAR, "**"}, 16461 {tUPLUS, "+@"}, 16462 {tUMINUS, "-@"}, 16463 {tCMP, "<=>"}, 16464 {tGEQ, ">="}, 16465 {tLEQ, "<="}, 16466 {tEQ, "=="}, 16467 {tEQQ, "==="}, 16468 {tNEQ, "!="}, 16469 {tMATCH, "=~"}, 16470 {tNMATCH, "!~"}, 16471 {tAREF, "[]"}, 16472 {tASET, "[]="}, 16473 {tLSHFT, "<<"}, 16474 {tRSHFT, ">>"}, 16475 {tCOLON2, "::"}, 16476 }; 16477 16478 #define op_tbl_count numberof(op_tbl) 16479 16480 #ifndef ENABLE_SELECTOR_NAMESPACE 16481 #define ENABLE_SELECTOR_NAMESPACE 0 16482 #endif 16483 16484 static struct symbols { 16485 ID last_id; 16486 st_table *sym_id; 16487 st_table *id_str; 16488 #if ENABLE_SELECTOR_NAMESPACE 16489 st_table *ivar2_id; 16490 st_table *id_ivar2; 16491 #endif 16492 VALUE op_sym[tLAST_OP_ID]; 16493 } global_symbols = {tLAST_TOKEN}; 16494 16495 static const struct st_hash_type symhash = { 16496 rb_str_hash_cmp, 16497 rb_str_hash, 16498 }; 16499 16500 #if ENABLE_SELECTOR_NAMESPACE 16501 struct ivar2_key { 16502 ID id; 16503 VALUE klass; 16504 }; 16505 16506 static int 16507 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 16508 { 16509 if (key1->id == key2->id && key1->klass == key2->klass) { 16510 return 0; 16511 } 16512 return 1; 16513 } 16514 16515 static int 16516 ivar2_hash(struct ivar2_key *key) 16517 { 16518 return (key->id << 8) ^ (key->klass >> 2); 16519 } 16520 16521 static const struct st_hash_type ivar2_hash_type = { 16522 ivar2_cmp, 16523 ivar2_hash, 16524 }; 16525 #endif 16526 16527 void 16528 Init_sym(void) 16529 { 16530 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 16531 global_symbols.id_str = st_init_numtable_with_size(1000); 16532 #if ENABLE_SELECTOR_NAMESPACE 16533 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 16534 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 16535 #endif 16536 16537 (void)nodetype; 16538 (void)nodeline; 16539 #if PARSER_DEBUG 16540 (void)lex_state_name(-1); 16541 #endif 16542 16543 Init_id(); 16544 } 16545 16546 void 16547 rb_gc_mark_symbols(void) 16548 { 16549 rb_mark_tbl(global_symbols.id_str); 16550 rb_gc_mark_locations(global_symbols.op_sym, 16551 global_symbols.op_sym + numberof(global_symbols.op_sym)); 16552 } 16553 #endif /* !RIPPER */ 16554 16555 static ID 16556 internal_id_gen(struct parser_params *parser) 16557 { 16558 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 16559 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 16560 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 16561 } 16562 16563 #ifndef RIPPER 16564 static int 16565 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 16566 { 16567 int mb = 0; 16568 16569 if (m >= e) return 0; 16570 if (is_global_name_punct(*m)) { 16571 ++m; 16572 } 16573 else if (*m == '-') { 16574 ++m; 16575 if (m < e && is_identchar(m, e, enc)) { 16576 if (!ISASCII(*m)) mb = 1; 16577 m += rb_enc_mbclen(m, e, enc); 16578 } 16579 } 16580 else { 16581 if (!rb_enc_isdigit(*m, enc)) return 0; 16582 do { 16583 if (!ISASCII(*m)) mb = 1; 16584 ++m; 16585 } while (m < e && rb_enc_isdigit(*m, enc)); 16586 } 16587 return m == e ? mb + 1 : 0; 16588 } 16589 16590 int 16591 rb_symname_p(const char *name) 16592 { 16593 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 16594 } 16595 16596 int 16597 rb_enc_symname_p(const char *name, rb_encoding *enc) 16598 { 16599 return rb_enc_symname2_p(name, strlen(name), enc); 16600 } 16601 16602 #define IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) 16603 #define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) 16604 16605 static int 16606 rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_atttset) 16607 { 16608 const char *m = name; 16609 const char *e = m + len; 16610 int type = ID_JUNK; 16611 16612 if (!m || len <= 0) return -1; 16613 switch (*m) { 16614 case '\0': 16615 return -1; 16616 16617 case '$': 16618 type = ID_GLOBAL; 16619 if (is_special_global_name(++m, e, enc)) return type; 16620 goto id; 16621 16622 case '@': 16623 type = ID_INSTANCE; 16624 if (*++m == '@') { 16625 ++m; 16626 type = ID_CLASS; 16627 } 16628 goto id; 16629 16630 case '<': 16631 switch (*++m) { 16632 case '<': ++m; break; 16633 case '=': if (*++m == '>') ++m; break; 16634 default: break; 16635 } 16636 break; 16637 16638 case '>': 16639 switch (*++m) { 16640 case '>': case '=': ++m; break; 16641 } 16642 break; 16643 16644 case '=': 16645 switch (*++m) { 16646 case '~': ++m; break; 16647 case '=': if (*++m == '=') ++m; break; 16648 default: return -1; 16649 } 16650 break; 16651 16652 case '*': 16653 if (*++m == '*') ++m; 16654 break; 16655 16656 case '+': case '-': 16657 if (*++m == '@') ++m; 16658 break; 16659 16660 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 16661 ++m; 16662 break; 16663 16664 case '[': 16665 if (*++m != ']') return -1; 16666 if (*++m == '=') ++m; 16667 break; 16668 16669 case '!': 16670 if (len == 1) return ID_JUNK; 16671 switch (*++m) { 16672 case '=': case '~': ++m; break; 16673 default: return -1; 16674 } 16675 break; 16676 16677 default: 16678 type = rb_enc_isupper(*m, enc) ? ID_CONST : ID_LOCAL; 16679 id: 16680 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 16681 return -1; 16682 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 16683 if (m >= e) break; 16684 switch (*m) { 16685 case '!': case '?': 16686 if (type == ID_GLOBAL || type == ID_CLASS || type == ID_INSTANCE) return -1; 16687 type = ID_JUNK; 16688 ++m; 16689 if (m + 1 < e || *m != '=') break; 16690 /* fall through */ 16691 case '=': 16692 if (!(allowed_atttset & (1U << type))) return -1; 16693 type = ID_ATTRSET; 16694 ++m; 16695 break; 16696 } 16697 break; 16698 } 16699 return m == e ? type : -1; 16700 } 16701 16702 int 16703 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 16704 { 16705 return rb_enc_symname_type(name, len, enc, IDSET_ATTRSET_FOR_SYNTAX) != -1; 16706 } 16707 16708 static int 16709 rb_str_symname_type(VALUE name, unsigned int allowed_atttset) 16710 { 16711 const char *ptr = StringValuePtr(name); 16712 long len = RSTRING_LEN(name); 16713 int type = rb_enc_symname_type(ptr, len, rb_enc_get(name), allowed_atttset); 16714 RB_GC_GUARD(name); 16715 return type; 16716 } 16717 16718 static ID 16719 register_symid(ID id, const char *name, long len, rb_encoding *enc) 16720 { 16721 VALUE str = rb_enc_str_new(name, len, enc); 16722 return register_symid_str(id, str); 16723 } 16724 16725 static ID 16726 register_symid_str(ID id, VALUE str) 16727 { 16728 OBJ_FREEZE(str); 16729 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 16730 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 16731 return id; 16732 } 16733 16734 static int 16735 sym_check_asciionly(VALUE str) 16736 { 16737 if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE; 16738 switch (rb_enc_str_coderange(str)) { 16739 case ENC_CODERANGE_BROKEN: 16740 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 16741 case ENC_CODERANGE_7BIT: 16742 return TRUE; 16743 } 16744 return FALSE; 16745 } 16746 16747 /* 16748 * _str_ itself will be registered at the global symbol table. _str_ 16749 * can be modified before the registration, since the encoding will be 16750 * set to ASCII-8BIT if it is a special global name. 16751 */ 16752 static ID intern_str(VALUE str); 16753 16754 ID 16755 rb_intern3(const char *name, long len, rb_encoding *enc) 16756 { 16757 VALUE str; 16758 st_data_t data; 16759 struct RString fake_str; 16760 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16761 fake_str.basic.klass = rb_cString; 16762 fake_str.as.heap.len = len; 16763 fake_str.as.heap.ptr = (char *)name; 16764 fake_str.as.heap.aux.capa = len; 16765 str = (VALUE)&fake_str; 16766 rb_enc_associate(str, enc); 16767 OBJ_FREEZE(str); 16768 16769 if (st_lookup(global_symbols.sym_id, str, &data)) 16770 return (ID)data; 16771 16772 str = rb_enc_str_new(name, len, enc); /* make true string */ 16773 return intern_str(str); 16774 } 16775 16776 static ID 16777 intern_str(VALUE str) 16778 { 16779 const char *name, *m, *e; 16780 long len, last; 16781 rb_encoding *enc, *symenc; 16782 unsigned char c; 16783 ID id; 16784 int mb; 16785 16786 RSTRING_GETMEM(str, name, len); 16787 m = name; 16788 e = m + len; 16789 enc = rb_enc_get(str); 16790 symenc = enc; 16791 16792 if (!len || (rb_cString && !rb_enc_asciicompat(enc))) { 16793 junk: 16794 id = ID_JUNK; 16795 goto new_id; 16796 } 16797 last = len-1; 16798 id = 0; 16799 switch (*m) { 16800 case '$': 16801 if (len < 2) goto junk; 16802 id |= ID_GLOBAL; 16803 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 16804 if (!--mb) symenc = rb_usascii_encoding(); 16805 goto new_id; 16806 } 16807 break; 16808 case '@': 16809 if (m[1] == '@') { 16810 if (len < 3) goto junk; 16811 m++; 16812 id |= ID_CLASS; 16813 } 16814 else { 16815 if (len < 2) goto junk; 16816 id |= ID_INSTANCE; 16817 } 16818 m++; 16819 break; 16820 default: 16821 c = m[0]; 16822 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 16823 /* operators */ 16824 int i; 16825 16826 if (len == 1) { 16827 id = c; 16828 goto id_register; 16829 } 16830 for (i = 0; i < op_tbl_count; i++) { 16831 if (*op_tbl[i].name == *m && 16832 strcmp(op_tbl[i].name, m) == 0) { 16833 id = op_tbl[i].token; 16834 goto id_register; 16835 } 16836 } 16837 } 16838 break; 16839 } 16840 if (name[last] == '=') { 16841 /* attribute assignment */ 16842 if (last > 1 && name[last-1] == '=') 16843 goto junk; 16844 id = rb_intern3(name, last, enc); 16845 if (id > tLAST_OP_ID && !is_attrset_id(id)) { 16846 enc = rb_enc_get(rb_id2str(id)); 16847 id = rb_id_attrset(id); 16848 goto id_register; 16849 } 16850 id = ID_ATTRSET; 16851 } 16852 else if (id == 0) { 16853 if (rb_enc_isupper(m[0], enc)) { 16854 id = ID_CONST; 16855 } 16856 else { 16857 id = ID_LOCAL; 16858 } 16859 } 16860 if (!rb_enc_isdigit(*m, enc)) { 16861 while (m <= name + last && is_identchar(m, e, enc)) { 16862 if (ISASCII(*m)) { 16863 m++; 16864 } 16865 else { 16866 m += rb_enc_mbclen(m, e, enc); 16867 } 16868 } 16869 } 16870 if (id != ID_ATTRSET && m - name < len) id = ID_JUNK; 16871 if (sym_check_asciionly(str)) symenc = rb_usascii_encoding(); 16872 new_id: 16873 if (symenc != enc) rb_enc_associate(str, symenc); 16874 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 16875 if (len > 20) { 16876 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 16877 name); 16878 } 16879 else { 16880 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 16881 (int)len, name); 16882 } 16883 } 16884 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 16885 id_register: 16886 return register_symid_str(id, str); 16887 } 16888 16889 ID 16890 rb_intern2(const char *name, long len) 16891 { 16892 return rb_intern3(name, len, rb_usascii_encoding()); 16893 } 16894 16895 #undef rb_intern 16896 ID 16897 rb_intern(const char *name) 16898 { 16899 return rb_intern2(name, strlen(name)); 16900 } 16901 16902 ID 16903 rb_intern_str(VALUE str) 16904 { 16905 st_data_t id; 16906 16907 if (st_lookup(global_symbols.sym_id, str, &id)) 16908 return (ID)id; 16909 return intern_str(rb_str_dup(str)); 16910 } 16911 16912 VALUE 16913 rb_id2str(ID id) 16914 { 16915 st_data_t data; 16916 16917 if (id < tLAST_TOKEN) { 16918 int i = 0; 16919 16920 if (id < INT_MAX && rb_ispunct((int)id)) { 16921 VALUE str = global_symbols.op_sym[i = (int)id]; 16922 if (!str) { 16923 char name[2]; 16924 name[0] = (char)id; 16925 name[1] = 0; 16926 str = rb_usascii_str_new(name, 1); 16927 OBJ_FREEZE(str); 16928 global_symbols.op_sym[i] = str; 16929 } 16930 return str; 16931 } 16932 for (i = 0; i < op_tbl_count; i++) { 16933 if (op_tbl[i].token == id) { 16934 VALUE str = global_symbols.op_sym[i]; 16935 if (!str) { 16936 str = rb_usascii_str_new2(op_tbl[i].name); 16937 OBJ_FREEZE(str); 16938 global_symbols.op_sym[i] = str; 16939 } 16940 return str; 16941 } 16942 } 16943 } 16944 16945 if (st_lookup(global_symbols.id_str, id, &data)) { 16946 VALUE str = (VALUE)data; 16947 if (RBASIC(str)->klass == 0) 16948 RBASIC(str)->klass = rb_cString; 16949 return str; 16950 } 16951 16952 if (is_attrset_id(id)) { 16953 ID id_stem = (id & ~ID_SCOPE_MASK); 16954 VALUE str; 16955 16956 do { 16957 if (!!(str = rb_id2str(id_stem | ID_LOCAL))) break; 16958 if (!!(str = rb_id2str(id_stem | ID_CONST))) break; 16959 if (!!(str = rb_id2str(id_stem | ID_INSTANCE))) break; 16960 if (!!(str = rb_id2str(id_stem | ID_GLOBAL))) break; 16961 if (!!(str = rb_id2str(id_stem | ID_CLASS))) break; 16962 if (!!(str = rb_id2str(id_stem | ID_JUNK))) break; 16963 return 0; 16964 } while (0); 16965 str = rb_str_dup(str); 16966 rb_str_cat(str, "=", 1); 16967 register_symid_str(id, str); 16968 if (st_lookup(global_symbols.id_str, id, &data)) { 16969 VALUE str = (VALUE)data; 16970 if (RBASIC(str)->klass == 0) 16971 RBASIC(str)->klass = rb_cString; 16972 return str; 16973 } 16974 } 16975 return 0; 16976 } 16977 16978 const char * 16979 rb_id2name(ID id) 16980 { 16981 VALUE str = rb_id2str(id); 16982 16983 if (!str) return 0; 16984 return RSTRING_PTR(str); 16985 } 16986 16987 static int 16988 symbols_i(VALUE sym, ID value, VALUE ary) 16989 { 16990 rb_ary_push(ary, ID2SYM(value)); 16991 return ST_CONTINUE; 16992 } 16993 16994 /* 16995 * call-seq: 16996 * Symbol.all_symbols => array 16997 * 16998 * Returns an array of all the symbols currently in Ruby's symbol 16999 * table. 17000 * 17001 * Symbol.all_symbols.size #=> 903 17002 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 17003 * :chown, :EOFError, :$;, :String, 17004 * :LOCK_SH, :"setuid?", :$<, 17005 * :default_proc, :compact, :extend, 17006 * :Tms, :getwd, :$=, :ThreadGroup, 17007 * :wait2, :$>] 17008 */ 17009 17010 VALUE 17011 rb_sym_all_symbols(void) 17012 { 17013 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 17014 17015 st_foreach(global_symbols.sym_id, symbols_i, ary); 17016 return ary; 17017 } 17018 17019 int 17020 rb_is_const_id(ID id) 17021 { 17022 return is_const_id(id); 17023 } 17024 17025 int 17026 rb_is_class_id(ID id) 17027 { 17028 return is_class_id(id); 17029 } 17030 17031 int 17032 rb_is_global_id(ID id) 17033 { 17034 return is_global_id(id); 17035 } 17036 17037 int 17038 rb_is_instance_id(ID id) 17039 { 17040 return is_instance_id(id); 17041 } 17042 17043 int 17044 rb_is_attrset_id(ID id) 17045 { 17046 return is_attrset_id(id); 17047 } 17048 17049 int 17050 rb_is_local_id(ID id) 17051 { 17052 return is_local_id(id); 17053 } 17054 17055 int 17056 rb_is_junk_id(ID id) 17057 { 17058 return is_junk_id(id); 17059 } 17060 17072 ID 17073 rb_check_id(volatile VALUE *namep) 17074 { 17075 st_data_t id; 17076 VALUE tmp; 17077 VALUE name = *namep; 17078 17079 if (SYMBOL_P(name)) { 17080 return SYM2ID(name); 17081 } 17082 else if (!RB_TYPE_P(name, T_STRING)) { 17083 tmp = rb_check_string_type(name); 17084 if (NIL_P(tmp)) { 17085 tmp = rb_inspect(name); 17086 rb_raise(rb_eTypeError, "%s is not a symbol", 17087 RSTRING_PTR(tmp)); 17088 } 17089 name = tmp; 17090 *namep = name; 17091 } 17092 17093 sym_check_asciionly(name); 17094 17095 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17096 return (ID)id; 17097 17098 if (rb_is_attrset_name(name)) { 17099 struct RString fake_str; 17100 const VALUE localname = (VALUE)&fake_str; 17101 /* make local name by chopping '=' */ 17102 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17103 fake_str.basic.klass = rb_cString; 17104 fake_str.as.heap.len = RSTRING_LEN(name) - 1; 17105 fake_str.as.heap.ptr = RSTRING_PTR(name); 17106 fake_str.as.heap.aux.capa = fake_str.as.heap.len; 17107 rb_enc_copy(localname, name); 17108 OBJ_FREEZE(localname); 17109 17110 if (st_lookup(global_symbols.sym_id, (st_data_t)localname, &id)) { 17111 return rb_id_attrset((ID)id); 17112 } 17113 RB_GC_GUARD(name); 17114 } 17115 17116 return (ID)0; 17117 } 17118 17119 ID 17120 rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc) 17121 { 17122 st_data_t id; 17123 struct RString fake_str; 17124 const VALUE name = (VALUE)&fake_str; 17125 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17126 fake_str.basic.klass = rb_cString; 17127 fake_str.as.heap.len = len; 17128 fake_str.as.heap.ptr = (char *)ptr; 17129 fake_str.as.heap.aux.capa = len; 17130 rb_enc_associate(name, enc); 17131 17132 sym_check_asciionly(name); 17133 17134 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17135 return (ID)id; 17136 17137 if (rb_is_attrset_name(name)) { 17138 fake_str.as.heap.len = len - 1; 17139 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) { 17140 return rb_id_attrset((ID)id); 17141 } 17142 } 17143 17144 return (ID)0; 17145 } 17146 17147 int 17148 rb_is_const_name(VALUE name) 17149 { 17150 return rb_str_symname_type(name, 0) == ID_CONST; 17151 } 17152 17153 int 17154 rb_is_class_name(VALUE name) 17155 { 17156 return rb_str_symname_type(name, 0) == ID_CLASS; 17157 } 17158 17159 int 17160 rb_is_global_name(VALUE name) 17161 { 17162 return rb_str_symname_type(name, 0) == ID_GLOBAL; 17163 } 17164 17165 int 17166 rb_is_instance_name(VALUE name) 17167 { 17168 return rb_str_symname_type(name, 0) == ID_INSTANCE; 17169 } 17170 17171 int 17172 rb_is_attrset_name(VALUE name) 17173 { 17174 return rb_str_symname_type(name, IDSET_ATTRSET_FOR_INTERN) == ID_ATTRSET; 17175 } 17176 17177 int 17178 rb_is_local_name(VALUE name) 17179 { 17180 return rb_str_symname_type(name, 0) == ID_LOCAL; 17181 } 17182 17183 int 17184 rb_is_method_name(VALUE name) 17185 { 17186 switch (rb_str_symname_type(name, 0)) { 17187 case ID_LOCAL: case ID_ATTRSET: case ID_JUNK: 17188 return TRUE; 17189 } 17190 return FALSE; 17191 } 17192 17193 int 17194 rb_is_junk_name(VALUE name) 17195 { 17196 return rb_str_symname_type(name, IDSET_ATTRSET_FOR_SYNTAX) == -1; 17197 } 17198 17199 #endif /* !RIPPER */ 17200 17201 static void 17202 parser_initialize(struct parser_params *parser) 17203 { 17204 parser->eofp = Qfalse; 17205 17206 parser->parser_lex_strterm = 0; 17207 parser->parser_cond_stack = 0; 17208 parser->parser_cmdarg_stack = 0; 17209 parser->parser_class_nest = 0; 17210 parser->parser_paren_nest = 0; 17211 parser->parser_lpar_beg = 0; 17212 parser->parser_brace_nest = 0; 17213 parser->parser_in_single = 0; 17214 parser->parser_in_def = 0; 17215 parser->parser_in_defined = 0; 17216 parser->parser_compile_for_eval = 0; 17217 parser->parser_cur_mid = 0; 17218 parser->parser_tokenbuf = NULL; 17219 parser->parser_tokidx = 0; 17220 parser->parser_toksiz = 0; 17221 parser->parser_heredoc_end = 0; 17222 parser->parser_command_start = TRUE; 17223 parser->parser_deferred_nodes = 0; 17224 parser->parser_lex_pbeg = 0; 17225 parser->parser_lex_p = 0; 17226 parser->parser_lex_pend = 0; 17227 parser->parser_lvtbl = 0; 17228 parser->parser_ruby__end__seen = 0; 17229 parser->parser_ruby_sourcefile = 0; 17230 parser->parser_ruby_sourcefile_string = Qnil; 17231 #ifndef RIPPER 17232 parser->is_ripper = 0; 17233 parser->parser_eval_tree_begin = 0; 17234 parser->parser_eval_tree = 0; 17235 #else 17236 parser->is_ripper = 1; 17237 parser->delayed = Qnil; 17238 17239 parser->result = Qnil; 17240 parser->parsing_thread = Qnil; 17241 parser->toplevel_p = TRUE; 17242 #endif 17243 #ifdef YYMALLOC 17244 parser->heap = NULL; 17245 #endif 17246 parser->enc = rb_utf8_encoding(); 17247 } 17248 17249 #ifdef RIPPER 17250 #define parser_mark ripper_parser_mark 17251 #define parser_free ripper_parser_free 17252 #endif 17253 17254 static void 17255 parser_mark(void *ptr) 17256 { 17257 struct parser_params *p = (struct parser_params*)ptr; 17258 17259 rb_gc_mark((VALUE)p->parser_lex_strterm); 17260 rb_gc_mark((VALUE)p->parser_deferred_nodes); 17261 rb_gc_mark(p->parser_lex_input); 17262 rb_gc_mark(p->parser_lex_lastline); 17263 rb_gc_mark(p->parser_lex_nextline); 17264 rb_gc_mark(p->parser_ruby_sourcefile_string); 17265 #ifndef RIPPER 17266 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 17267 rb_gc_mark((VALUE)p->parser_eval_tree) ; 17268 rb_gc_mark(p->debug_lines); 17269 #else 17270 rb_gc_mark(p->delayed); 17271 rb_gc_mark(p->value); 17272 rb_gc_mark(p->result); 17273 rb_gc_mark(p->parsing_thread); 17274 #endif 17275 #ifdef YYMALLOC 17276 rb_gc_mark((VALUE)p->heap); 17277 #endif 17278 } 17279 17280 static void 17281 parser_free(void *ptr) 17282 { 17283 struct parser_params *p = (struct parser_params*)ptr; 17284 struct local_vars *local, *prev; 17285 17286 if (p->parser_tokenbuf) { 17287 xfree(p->parser_tokenbuf); 17288 } 17289 for (local = p->parser_lvtbl; local; local = prev) { 17290 if (local->vars) xfree(local->vars); 17291 prev = local->prev; 17292 xfree(local); 17293 } 17294 xfree(p); 17295 } 17296 17297 static size_t 17298 parser_memsize(const void *ptr) 17299 { 17300 struct parser_params *p = (struct parser_params*)ptr; 17301 struct local_vars *local; 17302 size_t size = sizeof(*p); 17303 17304 if (!ptr) return 0; 17305 size += p->parser_toksiz; 17306 for (local = p->parser_lvtbl; local; local = local->prev) { 17307 size += sizeof(*local); 17308 if (local->vars) size += local->vars->capa * sizeof(ID); 17309 } 17310 return size; 17311 } 17312 17313 static 17314 #ifndef RIPPER 17315 const 17316 #endif 17317 rb_data_type_t parser_data_type = { 17318 "parser", 17319 { 17320 parser_mark, 17321 parser_free, 17322 parser_memsize, 17323 }, 17324 }; 17325 17326 #ifndef RIPPER 17327 #undef rb_reserved_word 17328 17329 const struct kwtable * 17330 rb_reserved_word(const char *str, unsigned int len) 17331 { 17332 return reserved_word(str, len); 17333 } 17334 17335 static struct parser_params * 17336 parser_new(void) 17337 { 17338 struct parser_params *p; 17339 17340 p = ALLOC_N(struct parser_params, 1); 17341 MEMZERO(p, struct parser_params, 1); 17342 parser_initialize(p); 17343 return p; 17344 } 17345 17346 VALUE 17347 rb_parser_new(void) 17348 { 17349 struct parser_params *p = parser_new(); 17350 17351 return TypedData_Wrap_Struct(0, &parser_data_type, p); 17352 } 17353 17354 /* 17355 * call-seq: 17356 * ripper#end_seen? -> Boolean 17357 * 17358 * Return true if parsed source ended by +\_\_END\_\_+. 17359 */ 17360 VALUE 17361 rb_parser_end_seen_p(VALUE vparser) 17362 { 17363 struct parser_params *parser; 17364 17365 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17366 return ruby__end__seen ? Qtrue : Qfalse; 17367 } 17368 17369 /* 17370 * call-seq: 17371 * ripper#encoding -> encoding 17372 * 17373 * Return encoding of the source. 17374 */ 17375 VALUE 17376 rb_parser_encoding(VALUE vparser) 17377 { 17378 struct parser_params *parser; 17379 17380 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17381 return rb_enc_from_encoding(current_enc); 17382 } 17383 17384 /* 17385 * call-seq: 17386 * ripper.yydebug -> true or false 17387 * 17388 * Get yydebug. 17389 */ 17390 VALUE 17391 rb_parser_get_yydebug(VALUE self) 17392 { 17393 struct parser_params *parser; 17394 17395 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17396 return yydebug ? Qtrue : Qfalse; 17397 } 17398 17399 /* 17400 * call-seq: 17401 * ripper.yydebug = flag 17402 * 17403 * Set yydebug. 17404 */ 17405 VALUE 17406 rb_parser_set_yydebug(VALUE self, VALUE flag) 17407 { 17408 struct parser_params *parser; 17409 17410 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17411 yydebug = RTEST(flag); 17412 return flag; 17413 } 17414 17415 #ifdef YYMALLOC 17416 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 17417 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 17418 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 17419 (n)->u3.cnt = (c), (p)) 17420 17421 void * 17422 rb_parser_malloc(struct parser_params *parser, size_t size) 17423 { 17424 size_t cnt = HEAPCNT(1, size); 17425 NODE *n = NEWHEAP(); 17426 void *ptr = xmalloc(size); 17427 17428 return ADD2HEAP(n, cnt, ptr); 17429 } 17430 17431 void * 17432 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 17433 { 17434 size_t cnt = HEAPCNT(nelem, size); 17435 NODE *n = NEWHEAP(); 17436 void *ptr = xcalloc(nelem, size); 17437 17438 return ADD2HEAP(n, cnt, ptr); 17439 } 17440 17441 void * 17442 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 17443 { 17444 NODE *n; 17445 size_t cnt = HEAPCNT(1, size); 17446 17447 if (ptr && (n = parser->heap) != NULL) { 17448 do { 17449 if (n->u1.node == ptr) { 17450 n->u1.node = ptr = xrealloc(ptr, size); 17451 if (n->u3.cnt) n->u3.cnt = cnt; 17452 return ptr; 17453 } 17454 } while ((n = n->u2.node) != NULL); 17455 } 17456 n = NEWHEAP(); 17457 ptr = xrealloc(ptr, size); 17458 return ADD2HEAP(n, cnt, ptr); 17459 } 17460 17461 void 17462 rb_parser_free(struct parser_params *parser, void *ptr) 17463 { 17464 NODE **prev = &parser->heap, *n; 17465 17466 while ((n = *prev) != NULL) { 17467 if (n->u1.node == ptr) { 17468 *prev = n->u2.node; 17469 rb_gc_force_recycle((VALUE)n); 17470 break; 17471 } 17472 prev = &n->u2.node; 17473 } 17474 xfree(ptr); 17475 } 17476 #endif 17477 #endif 17478 17479 #ifdef RIPPER 17480 #ifdef RIPPER_DEBUG 17481 extern int rb_is_pointer_to_heap(VALUE); 17482 17483 /* :nodoc: */ 17484 static VALUE 17485 ripper_validate_object(VALUE self, VALUE x) 17486 { 17487 if (x == Qfalse) return x; 17488 if (x == Qtrue) return x; 17489 if (x == Qnil) return x; 17490 if (x == Qundef) 17491 rb_raise(rb_eArgError, "Qundef given"); 17492 if (FIXNUM_P(x)) return x; 17493 if (SYMBOL_P(x)) return x; 17494 if (!rb_is_pointer_to_heap(x)) 17495 rb_raise(rb_eArgError, "invalid pointer: %p", x); 17496 switch (TYPE(x)) { 17497 case T_STRING: 17498 case T_OBJECT: 17499 case T_ARRAY: 17500 case T_BIGNUM: 17501 case T_FLOAT: 17502 return x; 17503 case T_NODE: 17504 if (nd_type(x) != NODE_LASGN) { 17505 rb_raise(rb_eArgError, "NODE given: %p", x); 17506 } 17507 return ((NODE *)x)->nd_rval; 17508 default: 17509 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 17510 x, rb_obj_classname(x)); 17511 } 17512 return x; 17513 } 17514 #endif 17515 17516 #define validate(x) ((x) = get_value(x)) 17517 17518 static VALUE 17519 ripper_dispatch0(struct parser_params *parser, ID mid) 17520 { 17521 return rb_funcall(parser->value, mid, 0); 17522 } 17523 17524 static VALUE 17525 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 17526 { 17527 validate(a); 17528 return rb_funcall(parser->value, mid, 1, a); 17529 } 17530 17531 static VALUE 17532 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 17533 { 17534 validate(a); 17535 validate(b); 17536 return rb_funcall(parser->value, mid, 2, a, b); 17537 } 17538 17539 static VALUE 17540 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 17541 { 17542 validate(a); 17543 validate(b); 17544 validate(c); 17545 return rb_funcall(parser->value, mid, 3, a, b, c); 17546 } 17547 17548 static VALUE 17549 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 17550 { 17551 validate(a); 17552 validate(b); 17553 validate(c); 17554 validate(d); 17555 return rb_funcall(parser->value, mid, 4, a, b, c, d); 17556 } 17557 17558 static VALUE 17559 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 17560 { 17561 validate(a); 17562 validate(b); 17563 validate(c); 17564 validate(d); 17565 validate(e); 17566 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 17567 } 17568 17569 static VALUE 17570 ripper_dispatch7(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g) 17571 { 17572 validate(a); 17573 validate(b); 17574 validate(c); 17575 validate(d); 17576 validate(e); 17577 validate(f); 17578 validate(g); 17579 return rb_funcall(parser->value, mid, 7, a, b, c, d, e, f, g); 17580 } 17581 17582 static const struct kw_assoc { 17583 ID id; 17584 const char *name; 17585 } keyword_to_name[] = { 17586 {keyword_class, "class"}, 17587 {keyword_module, "module"}, 17588 {keyword_def, "def"}, 17589 {keyword_undef, "undef"}, 17590 {keyword_begin, "begin"}, 17591 {keyword_rescue, "rescue"}, 17592 {keyword_ensure, "ensure"}, 17593 {keyword_end, "end"}, 17594 {keyword_if, "if"}, 17595 {keyword_unless, "unless"}, 17596 {keyword_then, "then"}, 17597 {keyword_elsif, "elsif"}, 17598 {keyword_else, "else"}, 17599 {keyword_case, "case"}, 17600 {keyword_when, "when"}, 17601 {keyword_while, "while"}, 17602 {keyword_until, "until"}, 17603 {keyword_for, "for"}, 17604 {keyword_break, "break"}, 17605 {keyword_next, "next"}, 17606 {keyword_redo, "redo"}, 17607 {keyword_retry, "retry"}, 17608 {keyword_in, "in"}, 17609 {keyword_do, "do"}, 17610 {keyword_do_cond, "do"}, 17611 {keyword_do_block, "do"}, 17612 {keyword_return, "return"}, 17613 {keyword_yield, "yield"}, 17614 {keyword_super, "super"}, 17615 {keyword_self, "self"}, 17616 {keyword_nil, "nil"}, 17617 {keyword_true, "true"}, 17618 {keyword_false, "false"}, 17619 {keyword_and, "and"}, 17620 {keyword_or, "or"}, 17621 {keyword_not, "not"}, 17622 {modifier_if, "if"}, 17623 {modifier_unless, "unless"}, 17624 {modifier_while, "while"}, 17625 {modifier_until, "until"}, 17626 {modifier_rescue, "rescue"}, 17627 {keyword_alias, "alias"}, 17628 {keyword_defined, "defined?"}, 17629 {keyword_BEGIN, "BEGIN"}, 17630 {keyword_END, "END"}, 17631 {keyword__LINE__, "__LINE__"}, 17632 {keyword__FILE__, "__FILE__"}, 17633 {keyword__ENCODING__, "__ENCODING__"}, 17634 {0, NULL} 17635 }; 17636 17637 static const char* 17638 keyword_id_to_str(ID id) 17639 { 17640 const struct kw_assoc *a; 17641 17642 for (a = keyword_to_name; a->id; a++) { 17643 if (a->id == id) 17644 return a->name; 17645 } 17646 return NULL; 17647 } 17648 17649 #undef ripper_id2sym 17650 static VALUE 17651 ripper_id2sym(ID id) 17652 { 17653 const char *name; 17654 char buf[8]; 17655 17656 if (id <= 256) { 17657 buf[0] = (char)id; 17658 buf[1] = '\0'; 17659 return ID2SYM(rb_intern2(buf, 1)); 17660 } 17661 if ((name = keyword_id_to_str(id))) { 17662 return ID2SYM(rb_intern(name)); 17663 } 17664 switch (id) { 17665 case tOROP: 17666 name = "||"; 17667 break; 17668 case tANDOP: 17669 name = "&&"; 17670 break; 17671 default: 17672 name = rb_id2name(id); 17673 if (!name) { 17674 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 17675 } 17676 return ID2SYM(id); 17677 } 17678 return ID2SYM(rb_intern(name)); 17679 } 17680 17681 static ID 17682 ripper_get_id(VALUE v) 17683 { 17684 NODE *nd; 17685 if (!RB_TYPE_P(v, T_NODE)) return 0; 17686 nd = (NODE *)v; 17687 if (nd_type(nd) != NODE_LASGN) return 0; 17688 return nd->nd_vid; 17689 } 17690 17691 static VALUE 17692 ripper_get_value(VALUE v) 17693 { 17694 NODE *nd; 17695 if (v == Qundef) return Qnil; 17696 if (!RB_TYPE_P(v, T_NODE)) return v; 17697 nd = (NODE *)v; 17698 if (nd_type(nd) != NODE_LASGN) return Qnil; 17699 return nd->nd_rval; 17700 } 17701 17702 static void 17703 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 17704 { 17705 VALUE str; 17706 va_list args; 17707 17708 va_start(args, fmt); 17709 str = rb_vsprintf(fmt, args); 17710 va_end(args); 17711 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 17712 } 17713 17714 static void 17715 ripper_warn0(struct parser_params *parser, const char *fmt) 17716 { 17717 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 17718 } 17719 17720 static void 17721 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 17722 { 17723 rb_funcall(parser->value, rb_intern("warn"), 2, 17724 STR_NEW2(fmt), INT2NUM(a)); 17725 } 17726 17727 static void 17728 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 17729 { 17730 rb_funcall(parser->value, rb_intern("warn"), 2, 17731 STR_NEW2(fmt), STR_NEW2(str)); 17732 } 17733 17734 static void 17735 ripper_warning0(struct parser_params *parser, const char *fmt) 17736 { 17737 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 17738 } 17739 17740 static void 17741 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 17742 { 17743 rb_funcall(parser->value, rb_intern("warning"), 2, 17744 STR_NEW2(fmt), STR_NEW2(str)); 17745 } 17746 17747 static VALUE 17748 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 17749 { 17750 return rb_io_gets(src); 17751 } 17752 17753 static VALUE 17754 ripper_s_allocate(VALUE klass) 17755 { 17756 struct parser_params *p; 17757 VALUE self; 17758 17759 p = ALLOC_N(struct parser_params, 1); 17760 MEMZERO(p, struct parser_params, 1); 17761 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 17762 p->value = self; 17763 return self; 17764 } 17765 17766 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 17767 17768 /* 17769 * call-seq: 17770 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 17771 * 17772 * Create a new Ripper object. 17773 * _src_ must be a String, an IO, or an Object which has #gets method. 17774 * 17775 * This method does not starts parsing. 17776 * See also Ripper#parse and Ripper.parse. 17777 */ 17778 static VALUE 17779 ripper_initialize(int argc, VALUE *argv, VALUE self) 17780 { 17781 struct parser_params *parser; 17782 VALUE src, fname, lineno; 17783 17784 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17785 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 17786 if (RB_TYPE_P(src, T_FILE)) { 17787 parser->parser_lex_gets = ripper_lex_get_generic; 17788 } 17789 else { 17790 StringValue(src); 17791 parser->parser_lex_gets = lex_get_str; 17792 } 17793 parser->parser_lex_input = src; 17794 parser->eofp = Qfalse; 17795 if (NIL_P(fname)) { 17796 fname = STR_NEW2("(ripper)"); 17797 } 17798 else { 17799 StringValue(fname); 17800 } 17801 parser_initialize(parser); 17802 17803 parser->parser_ruby_sourcefile_string = fname; 17804 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 17805 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 17806 17807 return Qnil; 17808 } 17809 17810 struct ripper_args { 17811 struct parser_params *parser; 17812 int argc; 17813 VALUE *argv; 17814 }; 17815 17816 static VALUE 17817 ripper_parse0(VALUE parser_v) 17818 { 17819 struct parser_params *parser; 17820 17821 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17822 parser_prepare(parser); 17823 ripper_yyparse((void*)parser); 17824 return parser->result; 17825 } 17826 17827 static VALUE 17828 ripper_ensure(VALUE parser_v) 17829 { 17830 struct parser_params *parser; 17831 17832 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17833 parser->parsing_thread = Qnil; 17834 return Qnil; 17835 } 17836 17837 /* 17838 * call-seq: 17839 * ripper#parse 17840 * 17841 * Start parsing and returns the value of the root action. 17842 */ 17843 static VALUE 17844 ripper_parse(VALUE self) 17845 { 17846 struct parser_params *parser; 17847 17848 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17849 if (!ripper_initialized_p(parser)) { 17850 rb_raise(rb_eArgError, "method called for uninitialized object"); 17851 } 17852 if (!NIL_P(parser->parsing_thread)) { 17853 if (parser->parsing_thread == rb_thread_current()) 17854 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 17855 else 17856 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 17857 } 17858 parser->parsing_thread = rb_thread_current(); 17859 rb_ensure(ripper_parse0, self, ripper_ensure, self); 17860 17861 return parser->result; 17862 } 17863 17864 /* 17865 * call-seq: 17866 * ripper#column -> Integer 17867 * 17868 * Return column number of current parsing line. 17869 * This number starts from 0. 17870 */ 17871 static VALUE 17872 ripper_column(VALUE self) 17873 { 17874 struct parser_params *parser; 17875 long col; 17876 17877 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17878 if (!ripper_initialized_p(parser)) { 17879 rb_raise(rb_eArgError, "method called for uninitialized object"); 17880 } 17881 if (NIL_P(parser->parsing_thread)) return Qnil; 17882 col = parser->tokp - parser->parser_lex_pbeg; 17883 return LONG2NUM(col); 17884 } 17885 17886 /* 17887 * call-seq: 17888 * ripper#filename -> String 17889 * 17890 * Return current parsing filename. 17891 */ 17892 static VALUE 17893 ripper_filename(VALUE self) 17894 { 17895 struct parser_params *parser; 17896 17897 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17898 if (!ripper_initialized_p(parser)) { 17899 rb_raise(rb_eArgError, "method called for uninitialized object"); 17900 } 17901 return parser->parser_ruby_sourcefile_string; 17902 } 17903 17904 /* 17905 * call-seq: 17906 * ripper#lineno -> Integer 17907 * 17908 * Return line number of current parsing line. 17909 * This number starts from 1. 17910 */ 17911 static VALUE 17912 ripper_lineno(VALUE self) 17913 { 17914 struct parser_params *parser; 17915 17916 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17917 if (!ripper_initialized_p(parser)) { 17918 rb_raise(rb_eArgError, "method called for uninitialized object"); 17919 } 17920 if (NIL_P(parser->parsing_thread)) return Qnil; 17921 return INT2NUM(parser->parser_ruby_sourceline); 17922 } 17923 17924 #ifdef RIPPER_DEBUG 17925 /* :nodoc: */ 17926 static VALUE 17927 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 17928 { 17929 StringValue(msg); 17930 if (obj == Qundef) { 17931 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 17932 } 17933 return Qnil; 17934 } 17935 17936 /* :nodoc: */ 17937 static VALUE 17938 ripper_value(VALUE self, VALUE obj) 17939 { 17940 return ULONG2NUM(obj); 17941 } 17942 #endif 17943 17944 17945 void 17946 Init_ripper(void) 17947 { 17948 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 17949 17950 ripper_init_eventids1(); 17951 ripper_init_eventids2(); 17952 /* ensure existing in symbol table */ 17953 (void)rb_intern("||"); 17954 (void)rb_intern("&&"); 17955 17956 InitVM(ripper); 17957 } 17958 17959 void 17960 InitVM_ripper(void) 17961 { 17962 VALUE Ripper; 17963 17964 Ripper = rb_define_class("Ripper", rb_cObject); 17965 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 17966 rb_define_alloc_func(Ripper, ripper_s_allocate); 17967 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 17968 rb_define_method(Ripper, "parse", ripper_parse, 0); 17969 rb_define_method(Ripper, "column", ripper_column, 0); 17970 rb_define_method(Ripper, "filename", ripper_filename, 0); 17971 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 17972 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 17973 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 17974 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 17975 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 17976 #ifdef RIPPER_DEBUG 17977 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 17978 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 17979 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 17980 #endif 17981 17982 ripper_init_eventids1_table(Ripper); 17983 ripper_init_eventids2_table(Ripper); 17984 17985 # if 0 17986 /* Hack to let RDoc document SCRIPT_LINES__ */ 17987 17988 /* 17989 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 17990 * after the assignment will be added as an Array of lines with the file 17991 * name as the key. 17992 */ 17993 rb_define_global_const("SCRIPT_LINES__", Qnil); 17994 #endif 17995 17996 } 17997 #endif /* RIPPER */ 17998 17999
1.7.6.1