|
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 "ripper.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 1 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 "ripper.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 "ripper.y" 05221 { 05222 lex_state = EXPR_BEG; 05223 #if 0 05224 local_push(compile_for_eval || rb_parse_in_main()); 05225 #endif 05226 local_push(0); 05227 05228 } 05229 break; 05230 05231 case 3: 05232 05233 /* Line 1806 of yacc.c */ 05234 #line 864 "ripper.y" 05235 { 05236 #if 0 05237 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { 05238 /* last expression should not be void */ 05239 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); 05240 else { 05241 NODE *node = (yyvsp[(2) - (2)].val); 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)].val))); 05249 #endif 05250 (yyval.val) = (yyvsp[(2) - (2)].val); 05251 parser->result = dispatch1(program, (yyval.val)); 05252 05253 local_pop(); 05254 } 05255 break; 05256 05257 case 4: 05258 05259 /* Line 1806 of yacc.c */ 05260 #line 887 "ripper.y" 05261 { 05262 #if 0 05263 void_stmts((yyvsp[(1) - (2)].val)); 05264 fixup_nodes(&deferred_nodes); 05265 #endif 05266 05267 (yyval.val) = (yyvsp[(1) - (2)].val); 05268 } 05269 break; 05270 05271 case 5: 05272 05273 /* Line 1806 of yacc.c */ 05274 #line 898 "ripper.y" 05275 { 05276 #if 0 05277 (yyval.val) = NEW_BEGIN(0); 05278 #endif 05279 (yyval.val) = 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 "ripper.y" 05289 { 05290 #if 0 05291 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05292 #endif 05293 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05294 05295 } 05296 break; 05297 05298 case 7: 05299 05300 /* Line 1806 of yacc.c */ 05301 #line 915 "ripper.y" 05302 { 05303 #if 0 05304 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05305 #endif 05306 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05307 05308 } 05309 break; 05310 05311 case 8: 05312 05313 /* Line 1806 of yacc.c */ 05314 #line 923 "ripper.y" 05315 { 05316 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05317 } 05318 break; 05319 05320 case 10: 05321 05322 /* Line 1806 of yacc.c */ 05323 #line 930 "ripper.y" 05324 { 05325 #if 0 05326 /* local_push(0); */ 05327 #endif 05328 05329 } 05330 break; 05331 05332 case 11: 05333 05334 /* Line 1806 of yacc.c */ 05335 #line 937 "ripper.y" 05336 { 05337 #if 0 05338 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05339 (yyvsp[(4) - (5)].val)); 05340 /* NEW_PREEXE($4)); */ 05341 /* local_pop(); */ 05342 (yyval.val) = NEW_BEGIN(0); 05343 #endif 05344 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05345 05346 } 05347 break; 05348 05349 case 12: 05350 05351 /* Line 1806 of yacc.c */ 05352 #line 954 "ripper.y" 05353 { 05354 #if 0 05355 (yyval.val) = (yyvsp[(1) - (4)].val); 05356 if ((yyvsp[(2) - (4)].val)) { 05357 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05358 } 05359 else if ((yyvsp[(3) - (4)].val)) { 05360 rb_warn0("else without rescue is useless"); 05361 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); 05362 } 05363 if ((yyvsp[(4) - (4)].val)) { 05364 if ((yyval.val)) { 05365 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); 05366 } 05367 else { 05368 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); 05369 } 05370 } 05371 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05372 #endif 05373 (yyval.val) = dispatch4(bodystmt, 05374 escape_Qundef((yyvsp[(1) - (4)].val)), 05375 escape_Qundef((yyvsp[(2) - (4)].val)), 05376 escape_Qundef((yyvsp[(3) - (4)].val)), 05377 escape_Qundef((yyvsp[(4) - (4)].val))); 05378 05379 } 05380 break; 05381 05382 case 13: 05383 05384 /* Line 1806 of yacc.c */ 05385 #line 984 "ripper.y" 05386 { 05387 #if 0 05388 void_stmts((yyvsp[(1) - (2)].val)); 05389 fixup_nodes(&deferred_nodes); 05390 #endif 05391 05392 (yyval.val) = (yyvsp[(1) - (2)].val); 05393 } 05394 break; 05395 05396 case 14: 05397 05398 /* Line 1806 of yacc.c */ 05399 #line 995 "ripper.y" 05400 { 05401 #if 0 05402 (yyval.val) = NEW_BEGIN(0); 05403 #endif 05404 (yyval.val) = 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 "ripper.y" 05414 { 05415 #if 0 05416 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05417 #endif 05418 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05419 05420 } 05421 break; 05422 05423 case 16: 05424 05425 /* Line 1806 of yacc.c */ 05426 #line 1012 "ripper.y" 05427 { 05428 #if 0 05429 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05430 #endif 05431 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05432 05433 } 05434 break; 05435 05436 case 17: 05437 05438 /* Line 1806 of yacc.c */ 05439 #line 1020 "ripper.y" 05440 { 05441 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05442 } 05443 break; 05444 05445 case 18: 05446 05447 /* Line 1806 of yacc.c */ 05448 #line 1026 "ripper.y" 05449 { 05450 (yyval.val) = (yyvsp[(1) - (1)].val); 05451 } 05452 break; 05453 05454 case 19: 05455 05456 /* Line 1806 of yacc.c */ 05457 #line 1030 "ripper.y" 05458 { 05459 yyerror("BEGIN is permitted only at toplevel"); 05460 #if 0 05461 /* local_push(0); */ 05462 #endif 05463 05464 } 05465 break; 05466 05467 case 20: 05468 05469 /* Line 1806 of yacc.c */ 05470 #line 1038 "ripper.y" 05471 { 05472 #if 0 05473 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05474 (yyvsp[(4) - (5)].val)); 05475 /* NEW_PREEXE($4)); */ 05476 /* local_pop(); */ 05477 (yyval.val) = NEW_BEGIN(0); 05478 #endif 05479 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05480 05481 } 05482 break; 05483 05484 case 21: 05485 05486 /* Line 1806 of yacc.c */ 05487 #line 1050 "ripper.y" 05488 {lex_state = EXPR_FNAME;} 05489 break; 05490 05491 case 22: 05492 05493 /* Line 1806 of yacc.c */ 05494 #line 1051 "ripper.y" 05495 { 05496 #if 0 05497 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05498 #endif 05499 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05500 05501 } 05502 break; 05503 05504 case 23: 05505 05506 /* Line 1806 of yacc.c */ 05507 #line 1059 "ripper.y" 05508 { 05509 #if 0 05510 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05511 #endif 05512 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05513 05514 } 05515 break; 05516 05517 case 24: 05518 05519 /* Line 1806 of yacc.c */ 05520 #line 1067 "ripper.y" 05521 { 05522 #if 0 05523 char buf[2]; 05524 buf[0] = '$'; 05525 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth; 05526 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2)); 05527 #endif 05528 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05529 05530 } 05531 break; 05532 05533 case 25: 05534 05535 /* Line 1806 of yacc.c */ 05536 #line 1078 "ripper.y" 05537 { 05538 #if 0 05539 yyerror("can't make alias for the number variables"); 05540 (yyval.val) = NEW_BEGIN(0); 05541 #endif 05542 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05543 (yyval.val) = dispatch1(alias_error, (yyval.val)); 05544 05545 } 05546 break; 05547 05548 case 26: 05549 05550 /* Line 1806 of yacc.c */ 05551 #line 1088 "ripper.y" 05552 { 05553 #if 0 05554 (yyval.val) = (yyvsp[(2) - (2)].val); 05555 #endif 05556 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); 05557 05558 } 05559 break; 05560 05561 case 27: 05562 05563 /* Line 1806 of yacc.c */ 05564 #line 1096 "ripper.y" 05565 { 05566 #if 0 05567 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05568 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05569 #endif 05570 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05571 05572 } 05573 break; 05574 05575 case 28: 05576 05577 /* Line 1806 of yacc.c */ 05578 #line 1105 "ripper.y" 05579 { 05580 #if 0 05581 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05582 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05583 #endif 05584 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05585 05586 } 05587 break; 05588 05589 case 29: 05590 05591 /* Line 1806 of yacc.c */ 05592 #line 1114 "ripper.y" 05593 { 05594 #if 0 05595 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05596 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05597 } 05598 else { 05599 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05600 } 05601 #endif 05602 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05603 05604 } 05605 break; 05606 05607 case 30: 05608 05609 /* Line 1806 of yacc.c */ 05610 #line 1127 "ripper.y" 05611 { 05612 #if 0 05613 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05614 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05615 } 05616 else { 05617 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05618 } 05619 #endif 05620 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05621 05622 } 05623 break; 05624 05625 case 31: 05626 05627 /* Line 1806 of yacc.c */ 05628 #line 1140 "ripper.y" 05629 { 05630 #if 0 05631 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); 05632 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); 05633 #endif 05634 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05635 05636 } 05637 break; 05638 05639 case 32: 05640 05641 /* Line 1806 of yacc.c */ 05642 #line 1149 "ripper.y" 05643 { 05644 if (in_def || in_single) { 05645 rb_warn0("END in method; use at_exit"); 05646 } 05647 #if 0 05648 (yyval.val) = NEW_POSTEXE(NEW_NODE( 05649 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); 05650 #endif 05651 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); 05652 05653 } 05654 break; 05655 05656 case 34: 05657 05658 /* Line 1806 of yacc.c */ 05659 #line 1162 "ripper.y" 05660 { 05661 #if 0 05662 value_expr((yyvsp[(3) - (3)].val)); 05663 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05664 (yyval.val) = (yyvsp[(1) - (3)].val); 05665 #endif 05666 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05667 05668 } 05669 break; 05670 05671 case 35: 05672 05673 /* Line 1806 of yacc.c */ 05674 #line 1172 "ripper.y" 05675 { 05676 value_expr((yyvsp[(3) - (3)].val)); 05677 (yyval.val) = new_op_assign((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05678 } 05679 break; 05680 05681 case 36: 05682 05683 /* Line 1806 of yacc.c */ 05684 #line 1177 "ripper.y" 05685 { 05686 #if 0 05687 NODE *args; 05688 05689 value_expr((yyvsp[(6) - (6)].val)); 05690 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 05691 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 05692 if ((yyvsp[(5) - (6)].val) == tOROP) { 05693 (yyvsp[(5) - (6)].val) = 0; 05694 } 05695 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 05696 (yyvsp[(5) - (6)].val) = 1; 05697 } 05698 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 05699 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 05700 #endif 05701 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 05702 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 05703 05704 } 05705 break; 05706 05707 case 37: 05708 05709 /* Line 1806 of yacc.c */ 05710 #line 1198 "ripper.y" 05711 { 05712 value_expr((yyvsp[(5) - (5)].val)); 05713 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05714 } 05715 break; 05716 05717 case 38: 05718 05719 /* Line 1806 of yacc.c */ 05720 #line 1203 "ripper.y" 05721 { 05722 value_expr((yyvsp[(5) - (5)].val)); 05723 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05724 } 05725 break; 05726 05727 case 39: 05728 05729 /* Line 1806 of yacc.c */ 05730 #line 1208 "ripper.y" 05731 { 05732 #if 0 05733 (yyval.val) = NEW_COLON2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05734 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05735 #endif 05736 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05737 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05738 05739 } 05740 break; 05741 05742 case 40: 05743 05744 /* Line 1806 of yacc.c */ 05745 #line 1218 "ripper.y" 05746 { 05747 value_expr((yyvsp[(5) - (5)].val)); 05748 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05749 } 05750 break; 05751 05752 case 41: 05753 05754 /* Line 1806 of yacc.c */ 05755 #line 1223 "ripper.y" 05756 { 05757 #if 0 05758 rb_backref_error((yyvsp[(1) - (3)].val)); 05759 (yyval.val) = NEW_BEGIN(0); 05760 #endif 05761 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 05762 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05763 05764 } 05765 break; 05766 05767 case 42: 05768 05769 /* Line 1806 of yacc.c */ 05770 #line 1233 "ripper.y" 05771 { 05772 #if 0 05773 value_expr((yyvsp[(3) - (3)].val)); 05774 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05775 #endif 05776 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05777 05778 } 05779 break; 05780 05781 case 43: 05782 05783 /* Line 1806 of yacc.c */ 05784 #line 1242 "ripper.y" 05785 { 05786 #if 0 05787 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05788 (yyval.val) = (yyvsp[(1) - (3)].val); 05789 #endif 05790 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05791 05792 } 05793 break; 05794 05795 case 44: 05796 05797 /* Line 1806 of yacc.c */ 05798 #line 1251 "ripper.y" 05799 { 05800 #if 0 05801 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05802 (yyval.val) = (yyvsp[(1) - (3)].val); 05803 #endif 05804 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05805 05806 } 05807 break; 05808 05809 case 46: 05810 05811 /* Line 1806 of yacc.c */ 05812 #line 1263 "ripper.y" 05813 { 05814 #if 0 05815 value_expr((yyvsp[(3) - (3)].val)); 05816 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05817 #endif 05818 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05819 05820 } 05821 break; 05822 05823 case 47: 05824 05825 /* Line 1806 of yacc.c */ 05826 #line 1272 "ripper.y" 05827 { 05828 #if 0 05829 value_expr((yyvsp[(3) - (3)].val)); 05830 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05831 #endif 05832 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05833 05834 } 05835 break; 05836 05837 case 49: 05838 05839 /* Line 1806 of yacc.c */ 05840 #line 1285 "ripper.y" 05841 { 05842 #if 0 05843 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05844 #endif 05845 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); 05846 05847 } 05848 break; 05849 05850 case 50: 05851 05852 /* Line 1806 of yacc.c */ 05853 #line 1293 "ripper.y" 05854 { 05855 #if 0 05856 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05857 #endif 05858 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); 05859 05860 } 05861 break; 05862 05863 case 51: 05864 05865 /* Line 1806 of yacc.c */ 05866 #line 1301 "ripper.y" 05867 { 05868 #if 0 05869 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); 05870 #endif 05871 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); 05872 05873 } 05874 break; 05875 05876 case 52: 05877 05878 /* Line 1806 of yacc.c */ 05879 #line 1309 "ripper.y" 05880 { 05881 #if 0 05882 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 05883 #endif 05884 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); 05885 05886 } 05887 break; 05888 05889 case 54: 05890 05891 /* Line 1806 of yacc.c */ 05892 #line 1320 "ripper.y" 05893 { 05894 #if 0 05895 value_expr((yyvsp[(1) - (1)].val)); 05896 (yyval.val) = (yyvsp[(1) - (1)].val); 05897 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 05898 #endif 05899 (yyval.val) = (yyvsp[(1) - (1)].val); 05900 05901 } 05902 break; 05903 05904 case 58: 05905 05906 /* Line 1806 of yacc.c */ 05907 #line 1337 "ripper.y" 05908 { 05909 #if 0 05910 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05911 #endif 05912 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05913 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05914 05915 } 05916 break; 05917 05918 case 59: 05919 05920 /* Line 1806 of yacc.c */ 05921 #line 1348 "ripper.y" 05922 { 05923 (yyvsp[(1) - (1)].vars) = dyna_push(); 05924 #if 0 05925 (yyval.num) = ruby_sourceline; 05926 #endif 05927 05928 } 05929 break; 05930 05931 case 60: 05932 05933 /* Line 1806 of yacc.c */ 05934 #line 1358 "ripper.y" 05935 { 05936 #if 0 05937 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 05938 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 05939 #endif 05940 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 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 "ripper.y" 05950 { 05951 #if 0 05952 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 05953 nd_set_line((yyval.val), tokline); 05954 #endif 05955 05956 } 05957 break; 05958 05959 case 62: 05960 05961 /* Line 1806 of yacc.c */ 05962 #line 1380 "ripper.y" 05963 { 05964 #if 0 05965 (yyval.val) = (yyvsp[(1) - (2)].val); 05966 (yyval.val)->nd_args = (yyvsp[(2) - (2)].val); 05967 #endif 05968 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05969 05970 } 05971 break; 05972 05973 case 63: 05974 05975 /* Line 1806 of yacc.c */ 05976 #line 1389 "ripper.y" 05977 { 05978 #if 0 05979 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); 05980 (yyvsp[(1) - (3)].val)->nd_args = (yyvsp[(2) - (3)].val); 05981 (yyvsp[(3) - (3)].val)->nd_iter = (yyvsp[(1) - (3)].val); 05982 (yyval.val) = (yyvsp[(3) - (3)].val); 05983 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 05984 #endif 05985 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05986 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); 05987 05988 } 05989 break; 05990 05991 case 64: 05992 05993 /* Line 1806 of yacc.c */ 05994 #line 1402 "ripper.y" 05995 { 05996 #if 0 05997 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05998 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05999 #endif 06000 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06001 06002 } 06003 break; 06004 06005 case 65: 06006 06007 /* Line 1806 of yacc.c */ 06008 #line 1411 "ripper.y" 06009 { 06010 #if 0 06011 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 06012 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06013 (yyval.val) = (yyvsp[(5) - (5)].val); 06014 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06015 #endif 06016 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06017 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 06018 06019 } 06020 break; 06021 06022 case 66: 06023 06024 /* Line 1806 of yacc.c */ 06025 #line 1423 "ripper.y" 06026 { 06027 #if 0 06028 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06029 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 06030 #endif 06031 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06032 06033 } 06034 break; 06035 06036 case 67: 06037 06038 /* Line 1806 of yacc.c */ 06039 #line 1432 "ripper.y" 06040 { 06041 #if 0 06042 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 06043 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06044 (yyval.val) = (yyvsp[(5) - (5)].val); 06045 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06046 #endif 06047 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06048 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 06049 06050 } 06051 break; 06052 06053 case 68: 06054 06055 /* Line 1806 of yacc.c */ 06056 #line 1444 "ripper.y" 06057 { 06058 #if 0 06059 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 06060 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 06061 #endif 06062 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 06063 06064 } 06065 break; 06066 06067 case 69: 06068 06069 /* Line 1806 of yacc.c */ 06070 #line 1453 "ripper.y" 06071 { 06072 #if 0 06073 (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); 06074 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 06075 #endif 06076 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); 06077 06078 } 06079 break; 06080 06081 case 70: 06082 06083 /* Line 1806 of yacc.c */ 06084 #line 1462 "ripper.y" 06085 { 06086 #if 0 06087 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); 06088 #endif 06089 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); 06090 06091 } 06092 break; 06093 06094 case 71: 06095 06096 /* Line 1806 of yacc.c */ 06097 #line 1470 "ripper.y" 06098 { 06099 #if 0 06100 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); 06101 #endif 06102 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); 06103 06104 } 06105 break; 06106 06107 case 72: 06108 06109 /* Line 1806 of yacc.c */ 06110 #line 1478 "ripper.y" 06111 { 06112 #if 0 06113 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); 06114 #endif 06115 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); 06116 06117 } 06118 break; 06119 06120 case 74: 06121 06122 /* Line 1806 of yacc.c */ 06123 #line 1489 "ripper.y" 06124 { 06125 #if 0 06126 (yyval.val) = (yyvsp[(2) - (3)].val); 06127 #endif 06128 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06129 06130 } 06131 break; 06132 06133 case 76: 06134 06135 /* Line 1806 of yacc.c */ 06136 #line 1500 "ripper.y" 06137 { 06138 #if 0 06139 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); 06140 #endif 06141 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06142 06143 } 06144 break; 06145 06146 case 77: 06147 06148 /* Line 1806 of yacc.c */ 06149 #line 1510 "ripper.y" 06150 { 06151 #if 0 06152 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 06153 #endif 06154 (yyval.val) = (yyvsp[(1) - (1)].val); 06155 06156 } 06157 break; 06158 06159 case 78: 06160 06161 /* Line 1806 of yacc.c */ 06162 #line 1518 "ripper.y" 06163 { 06164 #if 0 06165 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); 06166 #endif 06167 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 06168 06169 } 06170 break; 06171 06172 case 79: 06173 06174 /* Line 1806 of yacc.c */ 06175 #line 1526 "ripper.y" 06176 { 06177 #if 0 06178 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06179 #endif 06180 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06181 06182 } 06183 break; 06184 06185 case 80: 06186 06187 /* Line 1806 of yacc.c */ 06188 #line 1534 "ripper.y" 06189 { 06190 #if 0 06191 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); 06192 #endif 06193 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06194 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 06195 06196 } 06197 break; 06198 06199 case 81: 06200 06201 /* Line 1806 of yacc.c */ 06202 #line 1543 "ripper.y" 06203 { 06204 #if 0 06205 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); 06206 #endif 06207 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); 06208 06209 } 06210 break; 06211 06212 case 82: 06213 06214 /* Line 1806 of yacc.c */ 06215 #line 1551 "ripper.y" 06216 { 06217 #if 0 06218 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); 06219 #endif 06220 (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); 06221 (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06222 06223 } 06224 break; 06225 06226 case 83: 06227 06228 /* Line 1806 of yacc.c */ 06229 #line 1560 "ripper.y" 06230 { 06231 #if 0 06232 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); 06233 #endif 06234 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); 06235 06236 } 06237 break; 06238 06239 case 84: 06240 06241 /* Line 1806 of yacc.c */ 06242 #line 1568 "ripper.y" 06243 { 06244 #if 0 06245 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); 06246 #endif 06247 (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); 06248 (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 06249 06250 } 06251 break; 06252 06253 case 85: 06254 06255 /* Line 1806 of yacc.c */ 06256 #line 1577 "ripper.y" 06257 { 06258 #if 0 06259 (yyval.val) = NEW_MASGN(0, -1); 06260 #endif 06261 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06262 06263 } 06264 break; 06265 06266 case 86: 06267 06268 /* Line 1806 of yacc.c */ 06269 #line 1585 "ripper.y" 06270 { 06271 #if 0 06272 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 06273 #endif 06274 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06275 (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val)); 06276 06277 } 06278 break; 06279 06280 case 88: 06281 06282 /* Line 1806 of yacc.c */ 06283 #line 1597 "ripper.y" 06284 { 06285 #if 0 06286 (yyval.val) = (yyvsp[(2) - (3)].val); 06287 #endif 06288 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06289 06290 } 06291 break; 06292 06293 case 89: 06294 06295 /* Line 1806 of yacc.c */ 06296 #line 1607 "ripper.y" 06297 { 06298 #if 0 06299 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); 06300 #endif 06301 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); 06302 06303 } 06304 break; 06305 06306 case 90: 06307 06308 /* Line 1806 of yacc.c */ 06309 #line 1615 "ripper.y" 06310 { 06311 #if 0 06312 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06313 #endif 06314 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06315 06316 } 06317 break; 06318 06319 case 91: 06320 06321 /* Line 1806 of yacc.c */ 06322 #line 1625 "ripper.y" 06323 { 06324 #if 0 06325 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 06326 #endif 06327 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 06328 06329 } 06330 break; 06331 06332 case 92: 06333 06334 /* Line 1806 of yacc.c */ 06335 #line 1633 "ripper.y" 06336 { 06337 #if 0 06338 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06339 #endif 06340 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06341 06342 } 06343 break; 06344 06345 case 93: 06346 06347 /* Line 1806 of yacc.c */ 06348 #line 1643 "ripper.y" 06349 { 06350 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06351 } 06352 break; 06353 06354 case 94: 06355 06356 /* Line 1806 of yacc.c */ 06357 #line 1647 "ripper.y" 06358 { 06359 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06360 } 06361 break; 06362 06363 case 95: 06364 06365 /* Line 1806 of yacc.c */ 06366 #line 1651 "ripper.y" 06367 { 06368 #if 0 06369 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06370 #endif 06371 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06372 06373 } 06374 break; 06375 06376 case 96: 06377 06378 /* Line 1806 of yacc.c */ 06379 #line 1659 "ripper.y" 06380 { 06381 #if 0 06382 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06383 #endif 06384 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06385 06386 } 06387 break; 06388 06389 case 97: 06390 06391 /* Line 1806 of yacc.c */ 06392 #line 1667 "ripper.y" 06393 { 06394 #if 0 06395 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06396 #endif 06397 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06398 06399 } 06400 break; 06401 06402 case 98: 06403 06404 /* Line 1806 of yacc.c */ 06405 #line 1675 "ripper.y" 06406 { 06407 #if 0 06408 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06409 #endif 06410 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06411 06412 } 06413 break; 06414 06415 case 99: 06416 06417 /* Line 1806 of yacc.c */ 06418 #line 1683 "ripper.y" 06419 { 06420 #if 0 06421 if (in_def || in_single) 06422 yyerror("dynamic constant assignment"); 06423 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06424 #endif 06425 if (in_def || in_single) 06426 yyerror("dynamic constant assignment"); 06427 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06428 06429 } 06430 break; 06431 06432 case 100: 06433 06434 /* Line 1806 of yacc.c */ 06435 #line 1695 "ripper.y" 06436 { 06437 #if 0 06438 if (in_def || in_single) 06439 yyerror("dynamic constant assignment"); 06440 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06441 #endif 06442 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06443 06444 } 06445 break; 06446 06447 case 101: 06448 06449 /* Line 1806 of yacc.c */ 06450 #line 1705 "ripper.y" 06451 { 06452 #if 0 06453 rb_backref_error((yyvsp[(1) - (1)].val)); 06454 (yyval.val) = NEW_BEGIN(0); 06455 #endif 06456 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); 06457 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06458 06459 } 06460 break; 06461 06462 case 102: 06463 06464 /* Line 1806 of yacc.c */ 06465 #line 1717 "ripper.y" 06466 { 06467 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06468 #if 0 06469 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06470 #endif 06471 (yyval.val) = dispatch1(var_field, (yyval.val)); 06472 06473 } 06474 break; 06475 06476 case 103: 06477 06478 /* Line 1806 of yacc.c */ 06479 #line 1726 "ripper.y" 06480 { 06481 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06482 #if 0 06483 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06484 #endif 06485 (yyval.val) = dispatch1(var_field, (yyval.val)); 06486 06487 } 06488 break; 06489 06490 case 104: 06491 06492 /* Line 1806 of yacc.c */ 06493 #line 1735 "ripper.y" 06494 { 06495 #if 0 06496 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06497 #endif 06498 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06499 06500 } 06501 break; 06502 06503 case 105: 06504 06505 /* Line 1806 of yacc.c */ 06506 #line 1743 "ripper.y" 06507 { 06508 #if 0 06509 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06510 #endif 06511 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06512 06513 } 06514 break; 06515 06516 case 106: 06517 06518 /* Line 1806 of yacc.c */ 06519 #line 1751 "ripper.y" 06520 { 06521 #if 0 06522 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06523 #endif 06524 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 06525 06526 } 06527 break; 06528 06529 case 107: 06530 06531 /* Line 1806 of yacc.c */ 06532 #line 1759 "ripper.y" 06533 { 06534 #if 0 06535 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06536 #endif 06537 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06538 06539 } 06540 break; 06541 06542 case 108: 06543 06544 /* Line 1806 of yacc.c */ 06545 #line 1767 "ripper.y" 06546 { 06547 #if 0 06548 if (in_def || in_single) 06549 yyerror("dynamic constant assignment"); 06550 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06551 #endif 06552 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06553 if (in_def || in_single) { 06554 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06555 } 06556 06557 } 06558 break; 06559 06560 case 109: 06561 06562 /* Line 1806 of yacc.c */ 06563 #line 1780 "ripper.y" 06564 { 06565 #if 0 06566 if (in_def || in_single) 06567 yyerror("dynamic constant assignment"); 06568 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06569 #endif 06570 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06571 if (in_def || in_single) { 06572 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06573 } 06574 06575 } 06576 break; 06577 06578 case 110: 06579 06580 /* Line 1806 of yacc.c */ 06581 #line 1793 "ripper.y" 06582 { 06583 #if 0 06584 rb_backref_error((yyvsp[(1) - (1)].val)); 06585 (yyval.val) = NEW_BEGIN(0); 06586 #endif 06587 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); 06588 06589 } 06590 break; 06591 06592 case 111: 06593 06594 /* Line 1806 of yacc.c */ 06595 #line 1804 "ripper.y" 06596 { 06597 #if 0 06598 yyerror("class/module name must be CONSTANT"); 06599 #endif 06600 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); 06601 06602 } 06603 break; 06604 06605 case 113: 06606 06607 /* Line 1806 of yacc.c */ 06608 #line 1815 "ripper.y" 06609 { 06610 #if 0 06611 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 06612 #endif 06613 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 06614 06615 } 06616 break; 06617 06618 case 114: 06619 06620 /* Line 1806 of yacc.c */ 06621 #line 1823 "ripper.y" 06622 { 06623 #if 0 06624 (yyval.val) = NEW_COLON2(0, (yyval.val)); 06625 #endif 06626 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); 06627 06628 } 06629 break; 06630 06631 case 115: 06632 06633 /* Line 1806 of yacc.c */ 06634 #line 1831 "ripper.y" 06635 { 06636 #if 0 06637 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06638 #endif 06639 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06640 06641 } 06642 break; 06643 06644 case 119: 06645 06646 /* Line 1806 of yacc.c */ 06647 #line 1844 "ripper.y" 06648 { 06649 lex_state = EXPR_ENDFN; 06650 (yyval.val) = (yyvsp[(1) - (1)].val); 06651 } 06652 break; 06653 06654 case 120: 06655 06656 /* Line 1806 of yacc.c */ 06657 #line 1849 "ripper.y" 06658 { 06659 lex_state = EXPR_ENDFN; 06660 #if 0 06661 (yyval.val) = (yyvsp[(1) - (1)].id); 06662 #endif 06663 (yyval.val) = (yyvsp[(1) - (1)].val); 06664 06665 } 06666 break; 06667 06668 case 123: 06669 06670 /* Line 1806 of yacc.c */ 06671 #line 1864 "ripper.y" 06672 { 06673 #if 0 06674 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 06675 #endif 06676 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 06677 06678 } 06679 break; 06680 06681 case 125: 06682 06683 /* Line 1806 of yacc.c */ 06684 #line 1875 "ripper.y" 06685 { 06686 #if 0 06687 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); 06688 #endif 06689 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 06690 06691 } 06692 break; 06693 06694 case 126: 06695 06696 /* Line 1806 of yacc.c */ 06697 #line 1882 "ripper.y" 06698 {lex_state = EXPR_FNAME;} 06699 break; 06700 06701 case 127: 06702 06703 /* Line 1806 of yacc.c */ 06704 #line 1883 "ripper.y" 06705 { 06706 #if 0 06707 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); 06708 #endif 06709 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06710 06711 } 06712 break; 06713 06714 case 128: 06715 06716 /* Line 1806 of yacc.c */ 06717 #line 1892 "ripper.y" 06718 { ifndef_ripper((yyval.val) = '|'); } 06719 break; 06720 06721 case 129: 06722 06723 /* Line 1806 of yacc.c */ 06724 #line 1893 "ripper.y" 06725 { ifndef_ripper((yyval.val) = '^'); } 06726 break; 06727 06728 case 130: 06729 06730 /* Line 1806 of yacc.c */ 06731 #line 1894 "ripper.y" 06732 { ifndef_ripper((yyval.val) = '&'); } 06733 break; 06734 06735 case 131: 06736 06737 /* Line 1806 of yacc.c */ 06738 #line 1895 "ripper.y" 06739 { ifndef_ripper((yyval.val) = tCMP); } 06740 break; 06741 06742 case 132: 06743 06744 /* Line 1806 of yacc.c */ 06745 #line 1896 "ripper.y" 06746 { ifndef_ripper((yyval.val) = tEQ); } 06747 break; 06748 06749 case 133: 06750 06751 /* Line 1806 of yacc.c */ 06752 #line 1897 "ripper.y" 06753 { ifndef_ripper((yyval.val) = tEQQ); } 06754 break; 06755 06756 case 134: 06757 06758 /* Line 1806 of yacc.c */ 06759 #line 1898 "ripper.y" 06760 { ifndef_ripper((yyval.val) = tMATCH); } 06761 break; 06762 06763 case 135: 06764 06765 /* Line 1806 of yacc.c */ 06766 #line 1899 "ripper.y" 06767 { ifndef_ripper((yyval.val) = tNMATCH); } 06768 break; 06769 06770 case 136: 06771 06772 /* Line 1806 of yacc.c */ 06773 #line 1900 "ripper.y" 06774 { ifndef_ripper((yyval.val) = '>'); } 06775 break; 06776 06777 case 137: 06778 06779 /* Line 1806 of yacc.c */ 06780 #line 1901 "ripper.y" 06781 { ifndef_ripper((yyval.val) = tGEQ); } 06782 break; 06783 06784 case 138: 06785 06786 /* Line 1806 of yacc.c */ 06787 #line 1902 "ripper.y" 06788 { ifndef_ripper((yyval.val) = '<'); } 06789 break; 06790 06791 case 139: 06792 06793 /* Line 1806 of yacc.c */ 06794 #line 1903 "ripper.y" 06795 { ifndef_ripper((yyval.val) = tLEQ); } 06796 break; 06797 06798 case 140: 06799 06800 /* Line 1806 of yacc.c */ 06801 #line 1904 "ripper.y" 06802 { ifndef_ripper((yyval.val) = tNEQ); } 06803 break; 06804 06805 case 141: 06806 06807 /* Line 1806 of yacc.c */ 06808 #line 1905 "ripper.y" 06809 { ifndef_ripper((yyval.val) = tLSHFT); } 06810 break; 06811 06812 case 142: 06813 06814 /* Line 1806 of yacc.c */ 06815 #line 1906 "ripper.y" 06816 { ifndef_ripper((yyval.val) = tRSHFT); } 06817 break; 06818 06819 case 143: 06820 06821 /* Line 1806 of yacc.c */ 06822 #line 1907 "ripper.y" 06823 { ifndef_ripper((yyval.val) = '+'); } 06824 break; 06825 06826 case 144: 06827 06828 /* Line 1806 of yacc.c */ 06829 #line 1908 "ripper.y" 06830 { ifndef_ripper((yyval.val) = '-'); } 06831 break; 06832 06833 case 145: 06834 06835 /* Line 1806 of yacc.c */ 06836 #line 1909 "ripper.y" 06837 { ifndef_ripper((yyval.val) = '*'); } 06838 break; 06839 06840 case 146: 06841 06842 /* Line 1806 of yacc.c */ 06843 #line 1910 "ripper.y" 06844 { ifndef_ripper((yyval.val) = '*'); } 06845 break; 06846 06847 case 147: 06848 06849 /* Line 1806 of yacc.c */ 06850 #line 1911 "ripper.y" 06851 { ifndef_ripper((yyval.val) = '/'); } 06852 break; 06853 06854 case 148: 06855 06856 /* Line 1806 of yacc.c */ 06857 #line 1912 "ripper.y" 06858 { ifndef_ripper((yyval.val) = '%'); } 06859 break; 06860 06861 case 149: 06862 06863 /* Line 1806 of yacc.c */ 06864 #line 1913 "ripper.y" 06865 { ifndef_ripper((yyval.val) = tPOW); } 06866 break; 06867 06868 case 150: 06869 06870 /* Line 1806 of yacc.c */ 06871 #line 1914 "ripper.y" 06872 { ifndef_ripper((yyval.val) = tDSTAR); } 06873 break; 06874 06875 case 151: 06876 06877 /* Line 1806 of yacc.c */ 06878 #line 1915 "ripper.y" 06879 { ifndef_ripper((yyval.val) = '!'); } 06880 break; 06881 06882 case 152: 06883 06884 /* Line 1806 of yacc.c */ 06885 #line 1916 "ripper.y" 06886 { ifndef_ripper((yyval.val) = '~'); } 06887 break; 06888 06889 case 153: 06890 06891 /* Line 1806 of yacc.c */ 06892 #line 1917 "ripper.y" 06893 { ifndef_ripper((yyval.val) = tUPLUS); } 06894 break; 06895 06896 case 154: 06897 06898 /* Line 1806 of yacc.c */ 06899 #line 1918 "ripper.y" 06900 { ifndef_ripper((yyval.val) = tUMINUS); } 06901 break; 06902 06903 case 155: 06904 06905 /* Line 1806 of yacc.c */ 06906 #line 1919 "ripper.y" 06907 { ifndef_ripper((yyval.val) = tAREF); } 06908 break; 06909 06910 case 156: 06911 06912 /* Line 1806 of yacc.c */ 06913 #line 1920 "ripper.y" 06914 { ifndef_ripper((yyval.val) = tASET); } 06915 break; 06916 06917 case 157: 06918 06919 /* Line 1806 of yacc.c */ 06920 #line 1921 "ripper.y" 06921 { ifndef_ripper((yyval.val) = '`'); } 06922 break; 06923 06924 case 199: 06925 06926 /* Line 1806 of yacc.c */ 06927 #line 1939 "ripper.y" 06928 { 06929 #if 0 06930 value_expr((yyvsp[(3) - (3)].val)); 06931 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06932 #endif 06933 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06934 06935 } 06936 break; 06937 06938 case 200: 06939 06940 /* Line 1806 of yacc.c */ 06941 #line 1948 "ripper.y" 06942 { 06943 #if 0 06944 value_expr((yyvsp[(3) - (5)].val)); 06945 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06946 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06947 #endif 06948 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); 06949 06950 } 06951 break; 06952 06953 case 201: 06954 06955 /* Line 1806 of yacc.c */ 06956 #line 1958 "ripper.y" 06957 { 06958 value_expr((yyvsp[(3) - (3)].val)); 06959 (yyval.val) = new_op_assign((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06960 } 06961 break; 06962 06963 case 202: 06964 06965 /* Line 1806 of yacc.c */ 06966 #line 1963 "ripper.y" 06967 { 06968 #if 0 06969 value_expr((yyvsp[(3) - (5)].val)); 06970 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06971 #endif 06972 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 06973 06974 (yyval.val) = new_op_assign((yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); 06975 } 06976 break; 06977 06978 case 203: 06979 06980 /* Line 1806 of yacc.c */ 06981 #line 1973 "ripper.y" 06982 { 06983 #if 0 06984 NODE *args; 06985 06986 value_expr((yyvsp[(6) - (6)].val)); 06987 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 06988 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) { 06989 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06990 } 06991 else { 06992 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06993 } 06994 if ((yyvsp[(5) - (6)].val) == tOROP) { 06995 (yyvsp[(5) - (6)].val) = 0; 06996 } 06997 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 06998 (yyvsp[(5) - (6)].val) = 1; 06999 } 07000 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 07001 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07002 #endif 07003 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 07004 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 07005 07006 } 07007 break; 07008 07009 case 204: 07010 07011 /* Line 1806 of yacc.c */ 07012 #line 1999 "ripper.y" 07013 { 07014 value_expr((yyvsp[(5) - (5)].val)); 07015 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07016 } 07017 break; 07018 07019 case 205: 07020 07021 /* Line 1806 of yacc.c */ 07022 #line 2004 "ripper.y" 07023 { 07024 value_expr((yyvsp[(5) - (5)].val)); 07025 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07026 } 07027 break; 07028 07029 case 206: 07030 07031 /* Line 1806 of yacc.c */ 07032 #line 2009 "ripper.y" 07033 { 07034 value_expr((yyvsp[(5) - (5)].val)); 07035 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07036 } 07037 break; 07038 07039 case 207: 07040 07041 /* Line 1806 of yacc.c */ 07042 #line 2014 "ripper.y" 07043 { 07044 #if 0 07045 (yyval.val) = NEW_COLON2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 07046 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07047 #endif 07048 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 07049 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07050 07051 } 07052 break; 07053 07054 case 208: 07055 07056 /* Line 1806 of yacc.c */ 07057 #line 2024 "ripper.y" 07058 { 07059 #if 0 07060 (yyval.val) = NEW_COLON3((yyvsp[(2) - (4)].val)); 07061 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 07062 #endif 07063 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); 07064 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 07065 07066 } 07067 break; 07068 07069 case 209: 07070 07071 /* Line 1806 of yacc.c */ 07072 #line 2034 "ripper.y" 07073 { 07074 #if 0 07075 rb_backref_error((yyvsp[(1) - (3)].val)); 07076 (yyval.val) = NEW_BEGIN(0); 07077 #endif 07078 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); 07079 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 07080 (yyval.val) = dispatch1(assign_error, (yyval.val)); 07081 07082 } 07083 break; 07084 07085 case 210: 07086 07087 /* Line 1806 of yacc.c */ 07088 #line 2045 "ripper.y" 07089 { 07090 #if 0 07091 value_expr((yyvsp[(1) - (3)].val)); 07092 value_expr((yyvsp[(3) - (3)].val)); 07093 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07094 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 07095 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 07096 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 07097 } 07098 #endif 07099 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07100 07101 } 07102 break; 07103 07104 case 211: 07105 07106 /* Line 1806 of yacc.c */ 07107 #line 2059 "ripper.y" 07108 { 07109 #if 0 07110 value_expr((yyvsp[(1) - (3)].val)); 07111 value_expr((yyvsp[(3) - (3)].val)); 07112 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07113 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 07114 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 07115 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 07116 } 07117 #endif 07118 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07119 07120 } 07121 break; 07122 07123 case 212: 07124 07125 /* Line 1806 of yacc.c */ 07126 #line 2073 "ripper.y" 07127 { 07128 #if 0 07129 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); 07130 #endif 07131 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); 07132 07133 } 07134 break; 07135 07136 case 213: 07137 07138 /* Line 1806 of yacc.c */ 07139 #line 2081 "ripper.y" 07140 { 07141 #if 0 07142 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); 07143 #endif 07144 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); 07145 07146 } 07147 break; 07148 07149 case 214: 07150 07151 /* Line 1806 of yacc.c */ 07152 #line 2089 "ripper.y" 07153 { 07154 #if 0 07155 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); 07156 #endif 07157 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); 07158 07159 } 07160 break; 07161 07162 case 215: 07163 07164 /* Line 1806 of yacc.c */ 07165 #line 2097 "ripper.y" 07166 { 07167 #if 0 07168 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); 07169 #endif 07170 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); 07171 07172 } 07173 break; 07174 07175 case 216: 07176 07177 /* Line 1806 of yacc.c */ 07178 #line 2105 "ripper.y" 07179 { 07180 #if 0 07181 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); 07182 #endif 07183 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); 07184 07185 } 07186 break; 07187 07188 case 217: 07189 07190 /* Line 1806 of yacc.c */ 07191 #line 2113 "ripper.y" 07192 { 07193 #if 0 07194 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); 07195 #endif 07196 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); 07197 07198 } 07199 break; 07200 07201 case 218: 07202 07203 /* Line 1806 of yacc.c */ 07204 #line 2121 "ripper.y" 07205 { 07206 #if 0 07207 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 07208 #endif 07209 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 07210 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07211 07212 } 07213 break; 07214 07215 case 219: 07216 07217 /* Line 1806 of yacc.c */ 07218 #line 2130 "ripper.y" 07219 { 07220 #if 0 07221 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 07222 #endif 07223 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 07224 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07225 07226 } 07227 break; 07228 07229 case 220: 07230 07231 /* Line 1806 of yacc.c */ 07232 #line 2139 "ripper.y" 07233 { 07234 #if 0 07235 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); 07236 #endif 07237 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); 07238 07239 } 07240 break; 07241 07242 case 221: 07243 07244 /* Line 1806 of yacc.c */ 07245 #line 2147 "ripper.y" 07246 { 07247 #if 0 07248 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); 07249 #endif 07250 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 07251 07252 } 07253 break; 07254 07255 case 222: 07256 07257 /* Line 1806 of yacc.c */ 07258 #line 2155 "ripper.y" 07259 { 07260 #if 0 07261 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); 07262 #endif 07263 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); 07264 07265 } 07266 break; 07267 07268 case 223: 07269 07270 /* Line 1806 of yacc.c */ 07271 #line 2163 "ripper.y" 07272 { 07273 #if 0 07274 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); 07275 #endif 07276 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); 07277 07278 } 07279 break; 07280 07281 case 224: 07282 07283 /* Line 1806 of yacc.c */ 07284 #line 2171 "ripper.y" 07285 { 07286 #if 0 07287 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); 07288 #endif 07289 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); 07290 07291 } 07292 break; 07293 07294 case 225: 07295 07296 /* Line 1806 of yacc.c */ 07297 #line 2179 "ripper.y" 07298 { 07299 #if 0 07300 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); 07301 #endif 07302 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); 07303 07304 } 07305 break; 07306 07307 case 226: 07308 07309 /* Line 1806 of yacc.c */ 07310 #line 2187 "ripper.y" 07311 { 07312 #if 0 07313 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); 07314 #endif 07315 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); 07316 07317 } 07318 break; 07319 07320 case 227: 07321 07322 /* Line 1806 of yacc.c */ 07323 #line 2195 "ripper.y" 07324 { 07325 #if 0 07326 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); 07327 #endif 07328 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); 07329 07330 } 07331 break; 07332 07333 case 228: 07334 07335 /* Line 1806 of yacc.c */ 07336 #line 2203 "ripper.y" 07337 { 07338 #if 0 07339 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); 07340 #endif 07341 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); 07342 07343 } 07344 break; 07345 07346 case 229: 07347 07348 /* Line 1806 of yacc.c */ 07349 #line 2211 "ripper.y" 07350 { 07351 #if 0 07352 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); 07353 #endif 07354 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); 07355 07356 } 07357 break; 07358 07359 case 230: 07360 07361 /* Line 1806 of yacc.c */ 07362 #line 2219 "ripper.y" 07363 { 07364 #if 0 07365 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); 07366 #endif 07367 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); 07368 07369 } 07370 break; 07371 07372 case 231: 07373 07374 /* Line 1806 of yacc.c */ 07375 #line 2227 "ripper.y" 07376 { 07377 #if 0 07378 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); 07379 #endif 07380 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); 07381 07382 } 07383 break; 07384 07385 case 232: 07386 07387 /* Line 1806 of yacc.c */ 07388 #line 2235 "ripper.y" 07389 { 07390 #if 0 07391 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); 07392 #endif 07393 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); 07394 07395 } 07396 break; 07397 07398 case 233: 07399 07400 /* Line 1806 of yacc.c */ 07401 #line 2243 "ripper.y" 07402 { 07403 #if 0 07404 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07405 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && RB_TYPE_P((yyvsp[(1) - (3)].val)->nd_lit, T_REGEXP)) { 07406 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); 07407 } 07408 #endif 07409 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); 07410 07411 } 07412 break; 07413 07414 case 234: 07415 07416 /* Line 1806 of yacc.c */ 07417 #line 2254 "ripper.y" 07418 { 07419 #if 0 07420 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); 07421 #endif 07422 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); 07423 07424 } 07425 break; 07426 07427 case 235: 07428 07429 /* Line 1806 of yacc.c */ 07430 #line 2262 "ripper.y" 07431 { 07432 #if 0 07433 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 07434 #endif 07435 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); 07436 07437 } 07438 break; 07439 07440 case 236: 07441 07442 /* Line 1806 of yacc.c */ 07443 #line 2270 "ripper.y" 07444 { 07445 #if 0 07446 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); 07447 #endif 07448 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); 07449 07450 } 07451 break; 07452 07453 case 237: 07454 07455 /* Line 1806 of yacc.c */ 07456 #line 2278 "ripper.y" 07457 { 07458 #if 0 07459 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); 07460 #endif 07461 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); 07462 07463 } 07464 break; 07465 07466 case 238: 07467 07468 /* Line 1806 of yacc.c */ 07469 #line 2286 "ripper.y" 07470 { 07471 #if 0 07472 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); 07473 #endif 07474 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); 07475 07476 } 07477 break; 07478 07479 case 239: 07480 07481 /* Line 1806 of yacc.c */ 07482 #line 2294 "ripper.y" 07483 { 07484 #if 0 07485 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07486 #endif 07487 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); 07488 07489 } 07490 break; 07491 07492 case 240: 07493 07494 /* Line 1806 of yacc.c */ 07495 #line 2302 "ripper.y" 07496 { 07497 #if 0 07498 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07499 #endif 07500 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); 07501 07502 } 07503 break; 07504 07505 case 241: 07506 07507 /* Line 1806 of yacc.c */ 07508 #line 2309 "ripper.y" 07509 {in_defined = 1;} 07510 break; 07511 07512 case 242: 07513 07514 /* Line 1806 of yacc.c */ 07515 #line 2310 "ripper.y" 07516 { 07517 #if 0 07518 in_defined = 0; 07519 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); 07520 #endif 07521 in_defined = 0; 07522 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); 07523 07524 } 07525 break; 07526 07527 case 243: 07528 07529 /* Line 1806 of yacc.c */ 07530 #line 2320 "ripper.y" 07531 { 07532 #if 0 07533 value_expr((yyvsp[(1) - (6)].val)); 07534 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07535 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07536 #endif 07537 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07538 07539 } 07540 break; 07541 07542 case 244: 07543 07544 /* Line 1806 of yacc.c */ 07545 #line 2330 "ripper.y" 07546 { 07547 (yyval.val) = (yyvsp[(1) - (1)].val); 07548 } 07549 break; 07550 07551 case 245: 07552 07553 /* Line 1806 of yacc.c */ 07554 #line 2336 "ripper.y" 07555 { 07556 #if 0 07557 value_expr((yyvsp[(1) - (1)].val)); 07558 (yyval.val) = (yyvsp[(1) - (1)].val); 07559 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 07560 #endif 07561 (yyval.val) = (yyvsp[(1) - (1)].val); 07562 07563 } 07564 break; 07565 07566 case 247: 07567 07568 /* Line 1806 of yacc.c */ 07569 #line 2349 "ripper.y" 07570 { 07571 (yyval.val) = (yyvsp[(1) - (2)].val); 07572 } 07573 break; 07574 07575 case 248: 07576 07577 /* Line 1806 of yacc.c */ 07578 #line 2353 "ripper.y" 07579 { 07580 #if 0 07581 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07582 #endif 07583 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07584 07585 } 07586 break; 07587 07588 case 249: 07589 07590 /* Line 1806 of yacc.c */ 07591 #line 2361 "ripper.y" 07592 { 07593 #if 0 07594 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07595 #endif 07596 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07597 07598 } 07599 break; 07600 07601 case 250: 07602 07603 /* Line 1806 of yacc.c */ 07604 #line 2371 "ripper.y" 07605 { 07606 #if 0 07607 (yyval.val) = (yyvsp[(2) - (3)].val); 07608 #endif 07609 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); 07610 07611 } 07612 break; 07613 07614 case 255: 07615 07616 /* Line 1806 of yacc.c */ 07617 #line 2387 "ripper.y" 07618 { 07619 (yyval.val) = (yyvsp[(1) - (2)].val); 07620 } 07621 break; 07622 07623 case 256: 07624 07625 /* Line 1806 of yacc.c */ 07626 #line 2391 "ripper.y" 07627 { 07628 #if 0 07629 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07630 #endif 07631 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07632 07633 } 07634 break; 07635 07636 case 257: 07637 07638 /* Line 1806 of yacc.c */ 07639 #line 2399 "ripper.y" 07640 { 07641 #if 0 07642 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07643 #endif 07644 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07645 07646 } 07647 break; 07648 07649 case 258: 07650 07651 /* Line 1806 of yacc.c */ 07652 #line 2409 "ripper.y" 07653 { 07654 #if 0 07655 value_expr((yyvsp[(1) - (1)].val)); 07656 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07657 #endif 07658 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07659 07660 } 07661 break; 07662 07663 case 259: 07664 07665 /* Line 1806 of yacc.c */ 07666 #line 2418 "ripper.y" 07667 { 07668 #if 0 07669 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07670 #endif 07671 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07672 07673 } 07674 break; 07675 07676 case 260: 07677 07678 /* Line 1806 of yacc.c */ 07679 #line 2426 "ripper.y" 07680 { 07681 #if 0 07682 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07683 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); 07684 #endif 07685 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07686 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); 07687 07688 } 07689 break; 07690 07691 case 261: 07692 07693 /* Line 1806 of yacc.c */ 07694 #line 2436 "ripper.y" 07695 { 07696 #if 0 07697 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07698 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); 07699 #endif 07700 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); 07701 07702 } 07703 break; 07704 07705 case 262: 07706 07707 /* Line 1806 of yacc.c */ 07708 #line 2447 "ripper.y" 07709 { 07710 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); 07711 } 07712 break; 07713 07714 case 263: 07715 07716 /* Line 1806 of yacc.c */ 07717 #line 2453 "ripper.y" 07718 { 07719 (yyval.val) = cmdarg_stack; 07720 CMDARG_PUSH(1); 07721 } 07722 break; 07723 07724 case 264: 07725 07726 /* Line 1806 of yacc.c */ 07727 #line 2458 "ripper.y" 07728 { 07729 /* CMDARG_POP() */ 07730 cmdarg_stack = (yyvsp[(1) - (2)].val); 07731 (yyval.val) = (yyvsp[(2) - (2)].val); 07732 } 07733 break; 07734 07735 case 265: 07736 07737 /* Line 1806 of yacc.c */ 07738 #line 2466 "ripper.y" 07739 { 07740 #if 0 07741 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); 07742 #endif 07743 (yyval.val) = (yyvsp[(2) - (2)].val); 07744 07745 } 07746 break; 07747 07748 case 266: 07749 07750 /* Line 1806 of yacc.c */ 07751 #line 2476 "ripper.y" 07752 { 07753 (yyval.val) = (yyvsp[(2) - (2)].val); 07754 } 07755 break; 07756 07757 case 267: 07758 07759 /* Line 1806 of yacc.c */ 07760 #line 2480 "ripper.y" 07761 { 07762 (yyval.val) = 0; 07763 } 07764 break; 07765 07766 case 268: 07767 07768 /* Line 1806 of yacc.c */ 07769 #line 2486 "ripper.y" 07770 { 07771 #if 0 07772 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07773 #endif 07774 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07775 07776 } 07777 break; 07778 07779 case 269: 07780 07781 /* Line 1806 of yacc.c */ 07782 #line 2494 "ripper.y" 07783 { 07784 #if 0 07785 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07786 #endif 07787 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); 07788 07789 } 07790 break; 07791 07792 case 270: 07793 07794 /* Line 1806 of yacc.c */ 07795 #line 2502 "ripper.y" 07796 { 07797 #if 0 07798 NODE *n1; 07799 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07800 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07801 } 07802 else { 07803 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07804 } 07805 #endif 07806 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07807 07808 } 07809 break; 07810 07811 case 271: 07812 07813 /* Line 1806 of yacc.c */ 07814 #line 2516 "ripper.y" 07815 { 07816 #if 0 07817 NODE *n1; 07818 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07819 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07820 } 07821 else { 07822 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07823 } 07824 #endif 07825 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07826 07827 } 07828 break; 07829 07830 case 272: 07831 07832 /* Line 1806 of yacc.c */ 07833 #line 2532 "ripper.y" 07834 { 07835 #if 0 07836 NODE *n1; 07837 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07838 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07839 } 07840 else { 07841 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07842 } 07843 #endif 07844 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 07845 07846 } 07847 break; 07848 07849 case 273: 07850 07851 /* Line 1806 of yacc.c */ 07852 #line 2546 "ripper.y" 07853 { 07854 #if 0 07855 NODE *n1; 07856 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && 07857 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07858 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07859 } 07860 else { 07861 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07862 } 07863 #endif 07864 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); 07865 07866 } 07867 break; 07868 07869 case 274: 07870 07871 /* Line 1806 of yacc.c */ 07872 #line 2561 "ripper.y" 07873 { 07874 #if 0 07875 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07876 #endif 07877 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); 07878 07879 } 07880 break; 07881 07882 case 285: 07883 07884 /* Line 1806 of yacc.c */ 07885 #line 2581 "ripper.y" 07886 { 07887 #if 0 07888 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 07889 #endif 07890 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); 07891 07892 } 07893 break; 07894 07895 case 286: 07896 07897 /* Line 1806 of yacc.c */ 07898 #line 2589 "ripper.y" 07899 { 07900 (yyvsp[(1) - (1)].val) = cmdarg_stack; 07901 cmdarg_stack = 0; 07902 #if 0 07903 (yyval.num) = ruby_sourceline; 07904 #endif 07905 07906 } 07907 break; 07908 07909 case 287: 07910 07911 /* Line 1806 of yacc.c */ 07912 #line 2599 "ripper.y" 07913 { 07914 cmdarg_stack = (yyvsp[(1) - (4)].val); 07915 #if 0 07916 if ((yyvsp[(3) - (4)].val) == NULL) { 07917 (yyval.val) = NEW_NIL(); 07918 } 07919 else { 07920 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || 07921 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) 07922 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); 07923 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); 07924 } 07925 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); 07926 #endif 07927 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); 07928 07929 } 07930 break; 07931 07932 case 288: 07933 07934 /* Line 1806 of yacc.c */ 07935 #line 2616 "ripper.y" 07936 {lex_state = EXPR_ENDARG;} 07937 break; 07938 07939 case 289: 07940 07941 /* Line 1806 of yacc.c */ 07942 #line 2617 "ripper.y" 07943 { 07944 #if 0 07945 (yyval.val) = 0; 07946 #endif 07947 (yyval.val) = dispatch1(paren, 0); 07948 07949 } 07950 break; 07951 07952 case 290: 07953 07954 /* Line 1806 of yacc.c */ 07955 #line 2624 "ripper.y" 07956 {lex_state = EXPR_ENDARG;} 07957 break; 07958 07959 case 291: 07960 07961 /* Line 1806 of yacc.c */ 07962 #line 2625 "ripper.y" 07963 { 07964 #if 0 07965 (yyval.val) = (yyvsp[(2) - (4)].val); 07966 #endif 07967 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 07968 07969 } 07970 break; 07971 07972 case 292: 07973 07974 /* Line 1806 of yacc.c */ 07975 #line 2633 "ripper.y" 07976 { 07977 #if 0 07978 (yyval.val) = (yyvsp[(2) - (3)].val); 07979 #endif 07980 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 07981 07982 } 07983 break; 07984 07985 case 293: 07986 07987 /* Line 1806 of yacc.c */ 07988 #line 2641 "ripper.y" 07989 { 07990 #if 0 07991 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07992 #endif 07993 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07994 07995 } 07996 break; 07997 07998 case 294: 07999 08000 /* Line 1806 of yacc.c */ 08001 #line 2649 "ripper.y" 08002 { 08003 #if 0 08004 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 08005 #endif 08006 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 08007 08008 } 08009 break; 08010 08011 case 295: 08012 08013 /* Line 1806 of yacc.c */ 08014 #line 2657 "ripper.y" 08015 { 08016 #if 0 08017 if ((yyvsp[(2) - (3)].val) == 0) { 08018 (yyval.val) = NEW_ZARRAY(); /* zero length array*/ 08019 } 08020 else { 08021 (yyval.val) = (yyvsp[(2) - (3)].val); 08022 } 08023 #endif 08024 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); 08025 08026 } 08027 break; 08028 08029 case 296: 08030 08031 /* Line 1806 of yacc.c */ 08032 #line 2670 "ripper.y" 08033 { 08034 #if 0 08035 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); 08036 #endif 08037 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); 08038 08039 } 08040 break; 08041 08042 case 297: 08043 08044 /* Line 1806 of yacc.c */ 08045 #line 2678 "ripper.y" 08046 { 08047 #if 0 08048 (yyval.val) = NEW_RETURN(0); 08049 #endif 08050 (yyval.val) = dispatch0(return0); 08051 08052 } 08053 break; 08054 08055 case 298: 08056 08057 /* Line 1806 of yacc.c */ 08058 #line 2686 "ripper.y" 08059 { 08060 #if 0 08061 (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); 08062 #endif 08063 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); 08064 08065 } 08066 break; 08067 08068 case 299: 08069 08070 /* Line 1806 of yacc.c */ 08071 #line 2694 "ripper.y" 08072 { 08073 #if 0 08074 (yyval.val) = NEW_YIELD(0); 08075 #endif 08076 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); 08077 08078 } 08079 break; 08080 08081 case 300: 08082 08083 /* Line 1806 of yacc.c */ 08084 #line 2702 "ripper.y" 08085 { 08086 #if 0 08087 (yyval.val) = NEW_YIELD(0); 08088 #endif 08089 (yyval.val) = dispatch0(yield0); 08090 08091 } 08092 break; 08093 08094 case 301: 08095 08096 /* Line 1806 of yacc.c */ 08097 #line 2709 "ripper.y" 08098 {in_defined = 1;} 08099 break; 08100 08101 case 302: 08102 08103 /* Line 1806 of yacc.c */ 08104 #line 2710 "ripper.y" 08105 { 08106 #if 0 08107 in_defined = 0; 08108 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); 08109 #endif 08110 in_defined = 0; 08111 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); 08112 08113 } 08114 break; 08115 08116 case 303: 08117 08118 /* Line 1806 of yacc.c */ 08119 #line 2720 "ripper.y" 08120 { 08121 #if 0 08122 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); 08123 #endif 08124 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); 08125 08126 } 08127 break; 08128 08129 case 304: 08130 08131 /* Line 1806 of yacc.c */ 08132 #line 2728 "ripper.y" 08133 { 08134 #if 0 08135 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); 08136 #endif 08137 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); 08138 08139 } 08140 break; 08141 08142 case 305: 08143 08144 /* Line 1806 of yacc.c */ 08145 #line 2736 "ripper.y" 08146 { 08147 #if 0 08148 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 08149 (yyval.val) = (yyvsp[(2) - (2)].val); 08150 #endif 08151 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); 08152 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); 08153 08154 } 08155 break; 08156 08157 case 307: 08158 08159 /* Line 1806 of yacc.c */ 08160 #line 2747 "ripper.y" 08161 { 08162 #if 0 08163 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 08164 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 08165 (yyval.val) = (yyvsp[(2) - (2)].val); 08166 #endif 08167 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08168 08169 } 08170 break; 08171 08172 case 308: 08173 08174 /* Line 1806 of yacc.c */ 08175 #line 2757 "ripper.y" 08176 { 08177 (yyval.val) = (yyvsp[(2) - (2)].val); 08178 } 08179 break; 08180 08181 case 309: 08182 08183 /* Line 1806 of yacc.c */ 08184 #line 2764 "ripper.y" 08185 { 08186 #if 0 08187 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08188 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 08189 #endif 08190 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 08191 08192 } 08193 break; 08194 08195 case 310: 08196 08197 /* Line 1806 of yacc.c */ 08198 #line 2776 "ripper.y" 08199 { 08200 #if 0 08201 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08202 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 08203 #endif 08204 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 08205 08206 } 08207 break; 08208 08209 case 311: 08210 08211 /* Line 1806 of yacc.c */ 08212 #line 2784 "ripper.y" 08213 {COND_PUSH(1);} 08214 break; 08215 08216 case 312: 08217 08218 /* Line 1806 of yacc.c */ 08219 #line 2784 "ripper.y" 08220 {COND_POP();} 08221 break; 08222 08223 case 313: 08224 08225 /* Line 1806 of yacc.c */ 08226 #line 2787 "ripper.y" 08227 { 08228 #if 0 08229 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 08230 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 08231 #endif 08232 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 08233 08234 } 08235 break; 08236 08237 case 314: 08238 08239 /* Line 1806 of yacc.c */ 08240 #line 2795 "ripper.y" 08241 {COND_PUSH(1);} 08242 break; 08243 08244 case 315: 08245 08246 /* Line 1806 of yacc.c */ 08247 #line 2795 "ripper.y" 08248 {COND_POP();} 08249 break; 08250 08251 case 316: 08252 08253 /* Line 1806 of yacc.c */ 08254 #line 2798 "ripper.y" 08255 { 08256 #if 0 08257 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 08258 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 08259 #endif 08260 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 08261 08262 } 08263 break; 08264 08265 case 317: 08266 08267 /* Line 1806 of yacc.c */ 08268 #line 2809 "ripper.y" 08269 { 08270 #if 0 08271 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08272 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08273 #endif 08274 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08275 08276 } 08277 break; 08278 08279 case 318: 08280 08281 /* Line 1806 of yacc.c */ 08282 #line 2818 "ripper.y" 08283 { 08284 #if 0 08285 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); 08286 #endif 08287 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); 08288 08289 } 08290 break; 08291 08292 case 319: 08293 08294 /* Line 1806 of yacc.c */ 08295 #line 2826 "ripper.y" 08296 {COND_PUSH(1);} 08297 break; 08298 08299 case 320: 08300 08301 /* Line 1806 of yacc.c */ 08302 #line 2828 "ripper.y" 08303 {COND_POP();} 08304 break; 08305 08306 case 321: 08307 08308 /* Line 1806 of yacc.c */ 08309 #line 2831 "ripper.y" 08310 { 08311 #if 0 08312 /* 08313 * for a, b, c in e 08314 * #=> 08315 * e.each{|*x| a, b, c = x 08316 * 08317 * for a in e 08318 * #=> 08319 * e.each{|x| a, = x} 08320 */ 08321 ID id = internal_id(); 08322 ID *tbl = ALLOC_N(ID, 2); 08323 NODE *m = NEW_ARGS_AUX(0, 0); 08324 NODE *args, *scope; 08325 08326 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { 08327 /* if args.length == 1 && args[0].kind_of?(Array) 08328 * args = args[0] 08329 * end 08330 */ 08331 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 08332 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 08333 m->nd_next = block_append( 08334 NEW_IF( 08335 NEW_NODE(NODE_AND, 08336 NEW_CALL(NEW_CALL(NEW_DVAR(id), idLength, 0), 08337 idEq, one), 08338 NEW_CALL(NEW_CALL(NEW_DVAR(id), idAREF, zero), 08339 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 08340 0), 08341 NEW_DASGN_CURR(id, 08342 NEW_CALL(NEW_DVAR(id), idAREF, zero)), 08343 0), 08344 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); 08345 08346 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 08347 } 08348 else { 08349 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || 08350 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || 08351 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { 08352 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); 08353 m->nd_plen = 1; 08354 m->nd_next = (yyvsp[(2) - (9)].val); 08355 args = new_args(m, 0, 0, 0, new_args_tail(0, 0, 0)); 08356 } 08357 else { 08358 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); 08359 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 08360 } 08361 } 08362 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); 08363 tbl[0] = 1; tbl[1] = id; 08364 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); 08365 fixpos((yyval.val), (yyvsp[(2) - (9)].val)); 08366 #endif 08367 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); 08368 08369 } 08370 break; 08371 08372 case 322: 08373 08374 /* Line 1806 of yacc.c */ 08375 #line 2892 "ripper.y" 08376 { 08377 if (in_def || in_single) 08378 yyerror("class definition in method body"); 08379 local_push(0); 08380 #if 0 08381 (yyval.num) = ruby_sourceline; 08382 #endif 08383 08384 } 08385 break; 08386 08387 case 323: 08388 08389 /* Line 1806 of yacc.c */ 08390 #line 2903 "ripper.y" 08391 { 08392 #if 0 08393 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); 08394 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); 08395 #endif 08396 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 08397 08398 local_pop(); 08399 } 08400 break; 08401 08402 case 324: 08403 08404 /* Line 1806 of yacc.c */ 08405 #line 2913 "ripper.y" 08406 { 08407 (yyval.num) = in_def; 08408 in_def = 0; 08409 } 08410 break; 08411 08412 case 325: 08413 08414 /* Line 1806 of yacc.c */ 08415 #line 2918 "ripper.y" 08416 { 08417 (yyval.num) = in_single; 08418 in_single = 0; 08419 local_push(0); 08420 } 08421 break; 08422 08423 case 326: 08424 08425 /* Line 1806 of yacc.c */ 08426 #line 2925 "ripper.y" 08427 { 08428 #if 0 08429 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08430 fixpos((yyval.val), (yyvsp[(3) - (8)].val)); 08431 #endif 08432 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08433 08434 local_pop(); 08435 in_def = (yyvsp[(4) - (8)].num); 08436 in_single = (yyvsp[(6) - (8)].num); 08437 } 08438 break; 08439 08440 case 327: 08441 08442 /* Line 1806 of yacc.c */ 08443 #line 2937 "ripper.y" 08444 { 08445 if (in_def || in_single) 08446 yyerror("module definition in method body"); 08447 local_push(0); 08448 #if 0 08449 (yyval.num) = ruby_sourceline; 08450 #endif 08451 08452 } 08453 break; 08454 08455 case 328: 08456 08457 /* Line 1806 of yacc.c */ 08458 #line 2948 "ripper.y" 08459 { 08460 #if 0 08461 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08462 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); 08463 #endif 08464 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08465 08466 local_pop(); 08467 } 08468 break; 08469 08470 case 329: 08471 08472 /* Line 1806 of yacc.c */ 08473 #line 2958 "ripper.y" 08474 { 08475 (yyval.id) = cur_mid; 08476 cur_mid = (yyvsp[(2) - (2)].val); 08477 in_def++; 08478 local_push(0); 08479 } 08480 break; 08481 08482 case 330: 08483 08484 /* Line 1806 of yacc.c */ 08485 #line 2967 "ripper.y" 08486 { 08487 #if 0 08488 NODE *body = remove_begin((yyvsp[(5) - (6)].val)); 08489 reduce_nodes(&body); 08490 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); 08491 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num)); 08492 #endif 08493 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08494 08495 local_pop(); 08496 in_def--; 08497 cur_mid = (yyvsp[(3) - (6)].id); 08498 } 08499 break; 08500 08501 case 331: 08502 08503 /* Line 1806 of yacc.c */ 08504 #line 2980 "ripper.y" 08505 {lex_state = EXPR_FNAME;} 08506 break; 08507 08508 case 332: 08509 08510 /* Line 1806 of yacc.c */ 08511 #line 2981 "ripper.y" 08512 { 08513 in_single++; 08514 lex_state = EXPR_ENDFN; /* force for args */ 08515 local_push(0); 08516 } 08517 break; 08518 08519 case 333: 08520 08521 /* Line 1806 of yacc.c */ 08522 #line 2989 "ripper.y" 08523 { 08524 #if 0 08525 NODE *body = remove_begin((yyvsp[(8) - (9)].val)); 08526 reduce_nodes(&body); 08527 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); 08528 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num)); 08529 #endif 08530 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); 08531 08532 local_pop(); 08533 in_single--; 08534 } 08535 break; 08536 08537 case 334: 08538 08539 /* Line 1806 of yacc.c */ 08540 #line 3002 "ripper.y" 08541 { 08542 #if 0 08543 (yyval.val) = NEW_BREAK(0); 08544 #endif 08545 (yyval.val) = dispatch1(break, arg_new()); 08546 08547 } 08548 break; 08549 08550 case 335: 08551 08552 /* Line 1806 of yacc.c */ 08553 #line 3010 "ripper.y" 08554 { 08555 #if 0 08556 (yyval.val) = NEW_NEXT(0); 08557 #endif 08558 (yyval.val) = dispatch1(next, arg_new()); 08559 08560 } 08561 break; 08562 08563 case 336: 08564 08565 /* Line 1806 of yacc.c */ 08566 #line 3018 "ripper.y" 08567 { 08568 #if 0 08569 (yyval.val) = NEW_REDO(); 08570 #endif 08571 (yyval.val) = dispatch0(redo); 08572 08573 } 08574 break; 08575 08576 case 337: 08577 08578 /* Line 1806 of yacc.c */ 08579 #line 3026 "ripper.y" 08580 { 08581 #if 0 08582 (yyval.val) = NEW_RETRY(); 08583 #endif 08584 (yyval.val) = dispatch0(retry); 08585 08586 } 08587 break; 08588 08589 case 338: 08590 08591 /* Line 1806 of yacc.c */ 08592 #line 3036 "ripper.y" 08593 { 08594 #if 0 08595 value_expr((yyvsp[(1) - (1)].val)); 08596 (yyval.val) = (yyvsp[(1) - (1)].val); 08597 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 08598 #endif 08599 (yyval.val) = (yyvsp[(1) - (1)].val); 08600 08601 } 08602 break; 08603 08604 case 339: 08605 08606 /* Line 1806 of yacc.c */ 08607 #line 3048 "ripper.y" 08608 { 08609 token_info_push("begin"); 08610 } 08611 break; 08612 08613 case 340: 08614 08615 /* Line 1806 of yacc.c */ 08616 #line 3054 "ripper.y" 08617 { 08618 token_info_push("if"); 08619 } 08620 break; 08621 08622 case 341: 08623 08624 /* Line 1806 of yacc.c */ 08625 #line 3060 "ripper.y" 08626 { 08627 token_info_push("unless"); 08628 } 08629 break; 08630 08631 case 342: 08632 08633 /* Line 1806 of yacc.c */ 08634 #line 3066 "ripper.y" 08635 { 08636 token_info_push("while"); 08637 } 08638 break; 08639 08640 case 343: 08641 08642 /* Line 1806 of yacc.c */ 08643 #line 3072 "ripper.y" 08644 { 08645 token_info_push("until"); 08646 } 08647 break; 08648 08649 case 344: 08650 08651 /* Line 1806 of yacc.c */ 08652 #line 3078 "ripper.y" 08653 { 08654 token_info_push("case"); 08655 } 08656 break; 08657 08658 case 345: 08659 08660 /* Line 1806 of yacc.c */ 08661 #line 3084 "ripper.y" 08662 { 08663 token_info_push("for"); 08664 } 08665 break; 08666 08667 case 346: 08668 08669 /* Line 1806 of yacc.c */ 08670 #line 3090 "ripper.y" 08671 { 08672 token_info_push("class"); 08673 } 08674 break; 08675 08676 case 347: 08677 08678 /* Line 1806 of yacc.c */ 08679 #line 3096 "ripper.y" 08680 { 08681 token_info_push("module"); 08682 } 08683 break; 08684 08685 case 348: 08686 08687 /* Line 1806 of yacc.c */ 08688 #line 3102 "ripper.y" 08689 { 08690 token_info_push("def"); 08691 #if 0 08692 (yyval.num) = ruby_sourceline; 08693 #endif 08694 08695 } 08696 break; 08697 08698 case 349: 08699 08700 /* Line 1806 of yacc.c */ 08701 #line 3112 "ripper.y" 08702 { 08703 token_info_pop("end"); 08704 } 08705 break; 08706 08707 case 350: 08708 08709 /* Line 1806 of yacc.c */ 08710 #line 3120 "ripper.y" 08711 { (yyval.val) = Qnil; } 08712 break; 08713 08714 case 352: 08715 08716 /* Line 1806 of yacc.c */ 08717 #line 3126 "ripper.y" 08718 { (yyval.val) = (yyvsp[(2) - (2)].val); } 08719 break; 08720 08721 case 353: 08722 08723 /* Line 1806 of yacc.c */ 08724 #line 3133 "ripper.y" 08725 { (yyval.val) = Qnil; } 08726 break; 08727 08728 case 356: 08729 08730 /* Line 1806 of yacc.c */ 08731 #line 3142 "ripper.y" 08732 { 08733 #if 0 08734 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 08735 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08736 #endif 08737 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 08738 08739 } 08740 break; 08741 08742 case 358: 08743 08744 /* Line 1806 of yacc.c */ 08745 #line 3154 "ripper.y" 08746 { 08747 #if 0 08748 (yyval.val) = (yyvsp[(2) - (2)].val); 08749 #endif 08750 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); 08751 08752 } 08753 break; 08754 08755 case 361: 08756 08757 /* Line 1806 of yacc.c */ 08758 #line 3168 "ripper.y" 08759 { 08760 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 08761 #if 0 08762 #endif 08763 (yyval.val) = dispatch1(mlhs_paren, (yyval.val)); 08764 08765 } 08766 break; 08767 08768 case 362: 08769 08770 /* Line 1806 of yacc.c */ 08771 #line 3176 "ripper.y" 08772 { 08773 #if 0 08774 (yyval.val) = (yyvsp[(2) - (3)].val); 08775 #endif 08776 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 08777 08778 } 08779 break; 08780 08781 case 363: 08782 08783 /* Line 1806 of yacc.c */ 08784 #line 3186 "ripper.y" 08785 { 08786 #if 0 08787 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 08788 #endif 08789 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 08790 08791 } 08792 break; 08793 08794 case 364: 08795 08796 /* Line 1806 of yacc.c */ 08797 #line 3194 "ripper.y" 08798 { 08799 #if 0 08800 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08801 #endif 08802 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08803 08804 } 08805 break; 08806 08807 case 365: 08808 08809 /* Line 1806 of yacc.c */ 08810 #line 3204 "ripper.y" 08811 { 08812 #if 0 08813 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 08814 #endif 08815 (yyval.val) = (yyvsp[(1) - (1)].val); 08816 08817 } 08818 break; 08819 08820 case 366: 08821 08822 /* Line 1806 of yacc.c */ 08823 #line 3212 "ripper.y" 08824 { 08825 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0); 08826 #if 0 08827 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val)); 08828 #endif 08829 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val)); 08830 08831 } 08832 break; 08833 08834 case 367: 08835 08836 /* Line 1806 of yacc.c */ 08837 #line 3221 "ripper.y" 08838 { 08839 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0); 08840 #if 0 08841 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val))); 08842 #endif 08843 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val)); 08844 08845 } 08846 break; 08847 08848 case 368: 08849 08850 /* Line 1806 of yacc.c */ 08851 #line 3230 "ripper.y" 08852 { 08853 #if 0 08854 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); 08855 #endif 08856 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); 08857 08858 } 08859 break; 08860 08861 case 369: 08862 08863 /* Line 1806 of yacc.c */ 08864 #line 3238 "ripper.y" 08865 { 08866 #if 0 08867 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); 08868 #endif 08869 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 08870 08871 } 08872 break; 08873 08874 case 370: 08875 08876 /* Line 1806 of yacc.c */ 08877 #line 3246 "ripper.y" 08878 { 08879 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0); 08880 #if 0 08881 (yyval.val) = NEW_MASGN(0, (yyval.val)); 08882 #endif 08883 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val)); 08884 08885 } 08886 break; 08887 08888 case 371: 08889 08890 /* Line 1806 of yacc.c */ 08891 #line 3255 "ripper.y" 08892 { 08893 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0); 08894 #if 0 08895 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val))); 08896 #endif 08897 #if 0 08898 TODO: Check me 08899 #endif 08900 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val)); 08901 08902 } 08903 break; 08904 08905 case 372: 08906 08907 /* Line 1806 of yacc.c */ 08908 #line 3267 "ripper.y" 08909 { 08910 #if 0 08911 (yyval.val) = NEW_MASGN(0, -1); 08912 #endif 08913 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08914 08915 } 08916 break; 08917 08918 case 373: 08919 08920 /* Line 1806 of yacc.c */ 08921 #line 3275 "ripper.y" 08922 { 08923 #if 0 08924 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 08925 #endif 08926 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08927 08928 } 08929 break; 08930 08931 case 374: 08932 08933 /* Line 1806 of yacc.c */ 08934 #line 3286 "ripper.y" 08935 { 08936 (yyval.val) = new_args_tail((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08937 } 08938 break; 08939 08940 case 375: 08941 08942 /* Line 1806 of yacc.c */ 08943 #line 3290 "ripper.y" 08944 { 08945 (yyval.val) = new_args_tail((yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 08946 } 08947 break; 08948 08949 case 376: 08950 08951 /* Line 1806 of yacc.c */ 08952 #line 3294 "ripper.y" 08953 { 08954 (yyval.val) = new_args_tail(Qnone, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08955 } 08956 break; 08957 08958 case 377: 08959 08960 /* Line 1806 of yacc.c */ 08961 #line 3298 "ripper.y" 08962 { 08963 (yyval.val) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].val)); 08964 } 08965 break; 08966 08967 case 378: 08968 08969 /* Line 1806 of yacc.c */ 08970 #line 3304 "ripper.y" 08971 { 08972 (yyval.val) = (yyvsp[(2) - (2)].val); 08973 } 08974 break; 08975 08976 case 379: 08977 08978 /* Line 1806 of yacc.c */ 08979 #line 3308 "ripper.y" 08980 { 08981 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 08982 } 08983 break; 08984 08985 case 380: 08986 08987 /* Line 1806 of yacc.c */ 08988 #line 3314 "ripper.y" 08989 { 08990 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnone, (yyvsp[(6) - (6)].val)); 08991 } 08992 break; 08993 08994 case 381: 08995 08996 /* Line 1806 of yacc.c */ 08997 #line 3318 "ripper.y" 08998 { 08999 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 09000 } 09001 break; 09002 09003 case 382: 09004 09005 /* Line 1806 of yacc.c */ 09006 #line 3322 "ripper.y" 09007 { 09008 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, Qnone, (yyvsp[(4) - (4)].val)); 09009 } 09010 break; 09011 09012 case 383: 09013 09014 /* Line 1806 of yacc.c */ 09015 #line 3326 "ripper.y" 09016 { 09017 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnone, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09018 } 09019 break; 09020 09021 case 384: 09022 09023 /* Line 1806 of yacc.c */ 09024 #line 3330 "ripper.y" 09025 { 09026 (yyval.val) = new_args((yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 09027 } 09028 break; 09029 09030 case 385: 09031 09032 /* Line 1806 of yacc.c */ 09033 #line 3334 "ripper.y" 09034 { 09035 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone)); 09036 #if 0 09037 #endif 09038 dispatch1(excessed_comma, (yyval.val)); 09039 09040 } 09041 break; 09042 09043 case 386: 09044 09045 /* Line 1806 of yacc.c */ 09046 #line 3342 "ripper.y" 09047 { 09048 (yyval.val) = new_args((yyvsp[(1) - (6)].val), Qnone, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09049 } 09050 break; 09051 09052 case 387: 09053 09054 /* Line 1806 of yacc.c */ 09055 #line 3346 "ripper.y" 09056 { 09057 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].val)); 09058 } 09059 break; 09060 09061 case 388: 09062 09063 /* Line 1806 of yacc.c */ 09064 #line 3350 "ripper.y" 09065 { 09066 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 09067 } 09068 break; 09069 09070 case 389: 09071 09072 /* Line 1806 of yacc.c */ 09073 #line 3354 "ripper.y" 09074 { 09075 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09076 } 09077 break; 09078 09079 case 390: 09080 09081 /* Line 1806 of yacc.c */ 09082 #line 3358 "ripper.y" 09083 { 09084 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (2)].val), Qnone, Qnone, (yyvsp[(2) - (2)].val)); 09085 } 09086 break; 09087 09088 case 391: 09089 09090 /* Line 1806 of yacc.c */ 09091 #line 3362 "ripper.y" 09092 { 09093 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09094 } 09095 break; 09096 09097 case 392: 09098 09099 /* Line 1806 of yacc.c */ 09100 #line 3366 "ripper.y" 09101 { 09102 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 09103 } 09104 break; 09105 09106 case 393: 09107 09108 /* Line 1806 of yacc.c */ 09109 #line 3370 "ripper.y" 09110 { 09111 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09112 } 09113 break; 09114 09115 case 394: 09116 09117 /* Line 1806 of yacc.c */ 09118 #line 3374 "ripper.y" 09119 { 09120 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].val)); 09121 } 09122 break; 09123 09124 case 396: 09125 09126 /* Line 1806 of yacc.c */ 09127 #line 3381 "ripper.y" 09128 { 09129 command_start = TRUE; 09130 } 09131 break; 09132 09133 case 397: 09134 09135 /* Line 1806 of yacc.c */ 09136 #line 3387 "ripper.y" 09137 { 09138 #if 0 09139 (yyval.val) = 0; 09140 #endif 09141 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 09142 escape_Qundef((yyvsp[(2) - (3)].val))); 09143 09144 } 09145 break; 09146 09147 case 398: 09148 09149 /* Line 1806 of yacc.c */ 09150 #line 3396 "ripper.y" 09151 { 09152 #if 0 09153 (yyval.val) = 0; 09154 #endif 09155 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 09156 Qnil); 09157 09158 } 09159 break; 09160 09161 case 399: 09162 09163 /* Line 1806 of yacc.c */ 09164 #line 3405 "ripper.y" 09165 { 09166 #if 0 09167 (yyval.val) = (yyvsp[(2) - (4)].val); 09168 #endif 09169 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); 09170 09171 } 09172 break; 09173 09174 case 400: 09175 09176 /* Line 1806 of yacc.c */ 09177 #line 3416 "ripper.y" 09178 { 09179 (yyval.val) = 0; 09180 } 09181 break; 09182 09183 case 401: 09184 09185 /* Line 1806 of yacc.c */ 09186 #line 3420 "ripper.y" 09187 { 09188 #if 0 09189 (yyval.val) = 0; 09190 #endif 09191 (yyval.val) = (yyvsp[(3) - (4)].val); 09192 09193 } 09194 break; 09195 09196 case 402: 09197 09198 /* Line 1806 of yacc.c */ 09199 #line 3432 "ripper.y" 09200 { 09201 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09202 } 09203 break; 09204 09205 case 403: 09206 09207 /* Line 1806 of yacc.c */ 09208 #line 3439 "ripper.y" 09209 { 09210 rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09211 } 09212 break; 09213 09214 case 404: 09215 09216 /* Line 1806 of yacc.c */ 09217 #line 3446 "ripper.y" 09218 { 09219 new_bv(get_id((yyvsp[(1) - (1)].val))); 09220 #if 0 09221 #endif 09222 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 09223 09224 } 09225 break; 09226 09227 case 405: 09228 09229 /* Line 1806 of yacc.c */ 09230 #line 3454 "ripper.y" 09231 { 09232 (yyval.val) = 0; 09233 } 09234 break; 09235 09236 case 406: 09237 09238 /* Line 1806 of yacc.c */ 09239 #line 3459 "ripper.y" 09240 { 09241 (yyval.vars) = dyna_push(); 09242 } 09243 break; 09244 09245 case 407: 09246 09247 /* Line 1806 of yacc.c */ 09248 #line 3462 "ripper.y" 09249 { 09250 (yyval.num) = lpar_beg; 09251 lpar_beg = ++paren_nest; 09252 } 09253 break; 09254 09255 case 408: 09256 09257 /* Line 1806 of yacc.c */ 09258 #line 3467 "ripper.y" 09259 { 09260 (yyval.num) = ruby_sourceline; 09261 } 09262 break; 09263 09264 case 409: 09265 09266 /* Line 1806 of yacc.c */ 09267 #line 3471 "ripper.y" 09268 { 09269 lpar_beg = (yyvsp[(2) - (5)].num); 09270 #if 0 09271 (yyval.val) = NEW_LAMBDA((yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09272 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 09273 #endif 09274 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09275 09276 dyna_pop((yyvsp[(1) - (5)].vars)); 09277 } 09278 break; 09279 09280 case 410: 09281 09282 /* Line 1806 of yacc.c */ 09283 #line 3484 "ripper.y" 09284 { 09285 #if 0 09286 (yyval.val) = (yyvsp[(2) - (4)].val); 09287 #endif 09288 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 09289 09290 } 09291 break; 09292 09293 case 411: 09294 09295 /* Line 1806 of yacc.c */ 09296 #line 3492 "ripper.y" 09297 { 09298 #if 0 09299 (yyval.val) = (yyvsp[(1) - (1)].val); 09300 #endif 09301 (yyval.val) = (yyvsp[(1) - (1)].val); 09302 09303 } 09304 break; 09305 09306 case 412: 09307 09308 /* Line 1806 of yacc.c */ 09309 #line 3502 "ripper.y" 09310 { 09311 (yyval.val) = (yyvsp[(2) - (3)].val); 09312 } 09313 break; 09314 09315 case 413: 09316 09317 /* Line 1806 of yacc.c */ 09318 #line 3506 "ripper.y" 09319 { 09320 (yyval.val) = (yyvsp[(2) - (3)].val); 09321 } 09322 break; 09323 09324 case 414: 09325 09326 /* Line 1806 of yacc.c */ 09327 #line 3512 "ripper.y" 09328 { 09329 (yyvsp[(1) - (1)].vars) = dyna_push(); 09330 #if 0 09331 (yyval.num) = ruby_sourceline; 09332 #endif 09333 } 09334 break; 09335 09336 case 415: 09337 09338 /* Line 1806 of yacc.c */ 09339 #line 3521 "ripper.y" 09340 { 09341 #if 0 09342 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09343 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09344 #endif 09345 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09346 09347 dyna_pop((yyvsp[(1) - (5)].vars)); 09348 } 09349 break; 09350 09351 case 416: 09352 09353 /* Line 1806 of yacc.c */ 09354 #line 3533 "ripper.y" 09355 { 09356 #if 0 09357 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { 09358 compile_error(PARSER_ARG "block given to yield"); 09359 } 09360 else { 09361 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 09362 } 09363 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 09364 (yyval.val) = (yyvsp[(2) - (2)].val); 09365 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 09366 #endif 09367 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09368 09369 } 09370 break; 09371 09372 case 417: 09373 09374 /* Line 1806 of yacc.c */ 09375 #line 3549 "ripper.y" 09376 { 09377 #if 0 09378 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09379 #endif 09380 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 09381 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09382 09383 } 09384 break; 09385 09386 case 418: 09387 09388 /* Line 1806 of yacc.c */ 09389 #line 3558 "ripper.y" 09390 { 09391 #if 0 09392 block_dup_check((yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09393 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09394 (yyval.val) = (yyvsp[(5) - (5)].val); 09395 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 09396 #endif 09397 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09398 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 09399 09400 } 09401 break; 09402 09403 case 419: 09404 09405 /* Line 1806 of yacc.c */ 09406 #line 3570 "ripper.y" 09407 { 09408 #if 0 09409 block_dup_check((yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09410 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09411 (yyval.val) = (yyvsp[(5) - (5)].val); 09412 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 09413 #endif 09414 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09415 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 09416 09417 } 09418 break; 09419 09420 case 420: 09421 09422 /* Line 1806 of yacc.c */ 09423 #line 3584 "ripper.y" 09424 { 09425 #if 0 09426 (yyval.val) = (yyvsp[(1) - (2)].val); 09427 (yyval.val)->nd_args = (yyvsp[(2) - (2)].val); 09428 #endif 09429 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); 09430 09431 } 09432 break; 09433 09434 case 421: 09435 09436 /* Line 1806 of yacc.c */ 09437 #line 3593 "ripper.y" 09438 { 09439 #if 0 09440 (yyval.num) = ruby_sourceline; 09441 #endif 09442 } 09443 break; 09444 09445 case 422: 09446 09447 /* Line 1806 of yacc.c */ 09448 #line 3599 "ripper.y" 09449 { 09450 #if 0 09451 (yyval.val) = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09452 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 09453 #endif 09454 (yyval.val) = dispatch3(call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 09455 (yyval.val) = method_optarg((yyval.val), (yyvsp[(5) - (5)].val)); 09456 09457 } 09458 break; 09459 09460 case 423: 09461 09462 /* Line 1806 of yacc.c */ 09463 #line 3609 "ripper.y" 09464 { 09465 #if 0 09466 (yyval.num) = ruby_sourceline; 09467 #endif 09468 } 09469 break; 09470 09471 case 424: 09472 09473 /* Line 1806 of yacc.c */ 09474 #line 3615 "ripper.y" 09475 { 09476 #if 0 09477 (yyval.val) = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09478 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 09479 #endif 09480 (yyval.val) = dispatch3(call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 09481 (yyval.val) = method_optarg((yyval.val), (yyvsp[(5) - (5)].val)); 09482 09483 } 09484 break; 09485 09486 case 425: 09487 09488 /* Line 1806 of yacc.c */ 09489 #line 3625 "ripper.y" 09490 { 09491 #if 0 09492 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); 09493 #endif 09494 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 09495 09496 } 09497 break; 09498 09499 case 426: 09500 09501 /* Line 1806 of yacc.c */ 09502 #line 3633 "ripper.y" 09503 { 09504 #if 0 09505 (yyval.num) = ruby_sourceline; 09506 #endif 09507 } 09508 break; 09509 09510 case 427: 09511 09512 /* Line 1806 of yacc.c */ 09513 #line 3639 "ripper.y" 09514 { 09515 #if 0 09516 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), rb_intern("call"), (yyvsp[(4) - (4)].val)); 09517 nd_set_line((yyval.val), (yyvsp[(3) - (4)].num)); 09518 #endif 09519 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), 09520 ripper_intern("call")); 09521 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09522 09523 } 09524 break; 09525 09526 case 428: 09527 09528 /* Line 1806 of yacc.c */ 09529 #line 3650 "ripper.y" 09530 { 09531 #if 0 09532 (yyval.num) = ruby_sourceline; 09533 #endif 09534 } 09535 break; 09536 09537 case 429: 09538 09539 /* Line 1806 of yacc.c */ 09540 #line 3656 "ripper.y" 09541 { 09542 #if 0 09543 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), rb_intern("call"), (yyvsp[(4) - (4)].val)); 09544 nd_set_line((yyval.val), (yyvsp[(3) - (4)].num)); 09545 #endif 09546 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), 09547 ripper_intern("call")); 09548 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09549 09550 } 09551 break; 09552 09553 case 430: 09554 09555 /* Line 1806 of yacc.c */ 09556 #line 3667 "ripper.y" 09557 { 09558 #if 0 09559 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 09560 #endif 09561 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 09562 09563 } 09564 break; 09565 09566 case 431: 09567 09568 /* Line 1806 of yacc.c */ 09569 #line 3675 "ripper.y" 09570 { 09571 #if 0 09572 (yyval.val) = NEW_ZSUPER(); 09573 #endif 09574 (yyval.val) = dispatch0(zsuper); 09575 09576 } 09577 break; 09578 09579 case 432: 09580 09581 /* Line 1806 of yacc.c */ 09582 #line 3683 "ripper.y" 09583 { 09584 #if 0 09585 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) 09586 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); 09587 else 09588 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); 09589 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09590 #endif 09591 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 09592 09593 } 09594 break; 09595 09596 case 433: 09597 09598 /* Line 1806 of yacc.c */ 09599 #line 3697 "ripper.y" 09600 { 09601 (yyvsp[(1) - (1)].vars) = dyna_push(); 09602 #if 0 09603 (yyval.num) = ruby_sourceline; 09604 #endif 09605 09606 } 09607 break; 09608 09609 case 434: 09610 09611 /* Line 1806 of yacc.c */ 09612 #line 3706 "ripper.y" 09613 { 09614 #if 0 09615 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09616 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09617 #endif 09618 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09619 09620 dyna_pop((yyvsp[(1) - (5)].vars)); 09621 } 09622 break; 09623 09624 case 435: 09625 09626 /* Line 1806 of yacc.c */ 09627 #line 3716 "ripper.y" 09628 { 09629 (yyvsp[(1) - (1)].vars) = dyna_push(); 09630 #if 0 09631 (yyval.num) = ruby_sourceline; 09632 #endif 09633 09634 } 09635 break; 09636 09637 case 436: 09638 09639 /* Line 1806 of yacc.c */ 09640 #line 3725 "ripper.y" 09641 { 09642 #if 0 09643 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09644 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09645 #endif 09646 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09647 09648 dyna_pop((yyvsp[(1) - (5)].vars)); 09649 } 09650 break; 09651 09652 case 437: 09653 09654 /* Line 1806 of yacc.c */ 09655 #line 3739 "ripper.y" 09656 { 09657 #if 0 09658 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09659 #endif 09660 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 09661 09662 } 09663 break; 09664 09665 case 440: 09666 09667 /* Line 1806 of yacc.c */ 09668 #line 3755 "ripper.y" 09669 { 09670 #if 0 09671 if ((yyvsp[(3) - (6)].val)) { 09672 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); 09673 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 09674 } 09675 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09676 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); 09677 #endif 09678 (yyval.val) = dispatch4(rescue, 09679 escape_Qundef((yyvsp[(2) - (6)].val)), 09680 escape_Qundef((yyvsp[(3) - (6)].val)), 09681 escape_Qundef((yyvsp[(5) - (6)].val)), 09682 escape_Qundef((yyvsp[(6) - (6)].val))); 09683 09684 } 09685 break; 09686 09687 case 442: 09688 09689 /* Line 1806 of yacc.c */ 09690 #line 3775 "ripper.y" 09691 { 09692 #if 0 09693 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 09694 #endif 09695 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09696 09697 } 09698 break; 09699 09700 case 443: 09701 09702 /* Line 1806 of yacc.c */ 09703 #line 3783 "ripper.y" 09704 { 09705 #if 0 09706 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); 09707 #endif 09708 (yyval.val) = (yyvsp[(1) - (1)].val); 09709 09710 } 09711 break; 09712 09713 case 445: 09714 09715 /* Line 1806 of yacc.c */ 09716 #line 3794 "ripper.y" 09717 { 09718 (yyval.val) = (yyvsp[(2) - (2)].val); 09719 } 09720 break; 09721 09722 case 447: 09723 09724 /* Line 1806 of yacc.c */ 09725 #line 3801 "ripper.y" 09726 { 09727 #if 0 09728 (yyval.val) = (yyvsp[(2) - (2)].val); 09729 #endif 09730 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); 09731 09732 } 09733 break; 09734 09735 case 450: 09736 09737 /* Line 1806 of yacc.c */ 09738 #line 3813 "ripper.y" 09739 { 09740 #if 0 09741 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 09742 #endif 09743 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 09744 09745 } 09746 break; 09747 09748 case 452: 09749 09750 /* Line 1806 of yacc.c */ 09751 #line 3824 "ripper.y" 09752 { 09753 #if 0 09754 NODE *node = (yyvsp[(1) - (1)].val); 09755 if (!node) { 09756 node = NEW_STR(STR_NEW0()); 09757 } 09758 else { 09759 node = evstr2dstr(node); 09760 } 09761 (yyval.val) = node; 09762 #endif 09763 (yyval.val) = (yyvsp[(1) - (1)].val); 09764 09765 } 09766 break; 09767 09768 case 455: 09769 09770 /* Line 1806 of yacc.c */ 09771 #line 3843 "ripper.y" 09772 { 09773 #if 0 09774 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09775 #endif 09776 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09777 09778 } 09779 break; 09780 09781 case 456: 09782 09783 /* Line 1806 of yacc.c */ 09784 #line 3853 "ripper.y" 09785 { 09786 #if 0 09787 (yyval.val) = (yyvsp[(2) - (3)].val); 09788 #endif 09789 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); 09790 09791 } 09792 break; 09793 09794 case 457: 09795 09796 /* Line 1806 of yacc.c */ 09797 #line 3863 "ripper.y" 09798 { 09799 #if 0 09800 NODE *node = (yyvsp[(2) - (3)].val); 09801 if (!node) { 09802 node = NEW_XSTR(STR_NEW0()); 09803 } 09804 else { 09805 switch (nd_type(node)) { 09806 case NODE_STR: 09807 nd_set_type(node, NODE_XSTR); 09808 break; 09809 case NODE_DSTR: 09810 nd_set_type(node, NODE_DXSTR); 09811 break; 09812 default: 09813 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09814 break; 09815 } 09816 } 09817 (yyval.val) = node; 09818 #endif 09819 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); 09820 09821 } 09822 break; 09823 09824 case 458: 09825 09826 /* Line 1806 of yacc.c */ 09827 #line 3890 "ripper.y" 09828 { 09829 #if 0 09830 int options = (yyvsp[(3) - (3)].val); 09831 NODE *node = (yyvsp[(2) - (3)].val); 09832 NODE *list, *prev; 09833 if (!node) { 09834 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09835 } 09836 else switch (nd_type(node)) { 09837 case NODE_STR: 09838 { 09839 VALUE src = node->nd_lit; 09840 nd_set_type(node, NODE_LIT); 09841 node->nd_lit = reg_compile(src, options); 09842 } 09843 break; 09844 default: 09845 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09846 case NODE_DSTR: 09847 if (options & RE_OPTION_ONCE) { 09848 nd_set_type(node, NODE_DREGX_ONCE); 09849 } 09850 else { 09851 nd_set_type(node, NODE_DREGX); 09852 } 09853 node->nd_cflag = options & RE_OPTION_MASK; 09854 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09855 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09856 if (nd_type(list->nd_head) == NODE_STR) { 09857 VALUE tail = list->nd_head->nd_lit; 09858 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09859 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09860 if (!literal_concat0(parser, lit, tail)) { 09861 node = 0; 09862 break; 09863 } 09864 rb_str_resize(tail, 0); 09865 prev->nd_next = list->nd_next; 09866 rb_gc_force_recycle((VALUE)list->nd_head); 09867 rb_gc_force_recycle((VALUE)list); 09868 list = prev; 09869 } 09870 else { 09871 prev = list; 09872 } 09873 } 09874 else { 09875 prev = 0; 09876 } 09877 } 09878 if (!node->nd_next) { 09879 VALUE src = node->nd_lit; 09880 nd_set_type(node, NODE_LIT); 09881 node->nd_lit = reg_compile(src, options); 09882 } 09883 break; 09884 } 09885 (yyval.val) = node; 09886 #endif 09887 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 09888 09889 } 09890 break; 09891 09892 case 459: 09893 09894 /* Line 1806 of yacc.c */ 09895 #line 3955 "ripper.y" 09896 { 09897 #if 0 09898 (yyval.val) = NEW_ZARRAY(); 09899 #endif 09900 (yyval.val) = dispatch0(words_new); 09901 (yyval.val) = dispatch1(array, (yyval.val)); 09902 09903 } 09904 break; 09905 09906 case 460: 09907 09908 /* Line 1806 of yacc.c */ 09909 #line 3964 "ripper.y" 09910 { 09911 #if 0 09912 (yyval.val) = (yyvsp[(2) - (3)].val); 09913 #endif 09914 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09915 09916 } 09917 break; 09918 09919 case 461: 09920 09921 /* Line 1806 of yacc.c */ 09922 #line 3974 "ripper.y" 09923 { 09924 #if 0 09925 (yyval.val) = 0; 09926 #endif 09927 (yyval.val) = dispatch0(words_new); 09928 09929 } 09930 break; 09931 09932 case 462: 09933 09934 /* Line 1806 of yacc.c */ 09935 #line 3982 "ripper.y" 09936 { 09937 #if 0 09938 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); 09939 #endif 09940 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09941 09942 } 09943 break; 09944 09945 case 463: 09946 09947 /* Line 1806 of yacc.c */ 09948 #line 3994 "ripper.y" 09949 { 09950 (yyval.val) = dispatch0(word_new); 09951 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); 09952 } 09953 break; 09954 09955 case 464: 09956 09957 /* Line 1806 of yacc.c */ 09958 #line 4000 "ripper.y" 09959 { 09960 #if 0 09961 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09962 #endif 09963 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09964 09965 } 09966 break; 09967 09968 case 465: 09969 09970 /* Line 1806 of yacc.c */ 09971 #line 4010 "ripper.y" 09972 { 09973 #if 0 09974 (yyval.val) = NEW_ZARRAY(); 09975 #endif 09976 (yyval.val) = dispatch0(symbols_new); 09977 (yyval.val) = dispatch1(array, (yyval.val)); 09978 09979 } 09980 break; 09981 09982 case 466: 09983 09984 /* Line 1806 of yacc.c */ 09985 #line 4019 "ripper.y" 09986 { 09987 #if 0 09988 (yyval.val) = (yyvsp[(2) - (3)].val); 09989 #endif 09990 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09991 09992 } 09993 break; 09994 09995 case 467: 09996 09997 /* Line 1806 of yacc.c */ 09998 #line 4029 "ripper.y" 09999 { 10000 #if 0 10001 (yyval.val) = 0; 10002 #endif 10003 (yyval.val) = dispatch0(symbols_new); 10004 10005 } 10006 break; 10007 10008 case 468: 10009 10010 /* Line 1806 of yacc.c */ 10011 #line 4037 "ripper.y" 10012 { 10013 #if 0 10014 (yyvsp[(2) - (3)].val) = evstr2dstr((yyvsp[(2) - (3)].val)); 10015 nd_set_type((yyvsp[(2) - (3)].val), NODE_DSYM); 10016 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10017 #endif 10018 (yyval.val) = dispatch2(symbols_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10019 10020 } 10021 break; 10022 10023 case 469: 10024 10025 /* Line 1806 of yacc.c */ 10026 #line 4049 "ripper.y" 10027 { 10028 #if 0 10029 (yyval.val) = NEW_ZARRAY(); 10030 #endif 10031 (yyval.val) = dispatch0(qwords_new); 10032 (yyval.val) = dispatch1(array, (yyval.val)); 10033 10034 } 10035 break; 10036 10037 case 470: 10038 10039 /* Line 1806 of yacc.c */ 10040 #line 4058 "ripper.y" 10041 { 10042 #if 0 10043 (yyval.val) = (yyvsp[(2) - (3)].val); 10044 #endif 10045 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 10046 10047 } 10048 break; 10049 10050 case 471: 10051 10052 /* Line 1806 of yacc.c */ 10053 #line 4068 "ripper.y" 10054 { 10055 #if 0 10056 (yyval.val) = NEW_ZARRAY(); 10057 #endif 10058 (yyval.val) = dispatch0(qsymbols_new); 10059 (yyval.val) = dispatch1(array, (yyval.val)); 10060 10061 } 10062 break; 10063 10064 case 472: 10065 10066 /* Line 1806 of yacc.c */ 10067 #line 4077 "ripper.y" 10068 { 10069 #if 0 10070 (yyval.val) = (yyvsp[(2) - (3)].val); 10071 #endif 10072 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 10073 10074 } 10075 break; 10076 10077 case 473: 10078 10079 /* Line 1806 of yacc.c */ 10080 #line 4087 "ripper.y" 10081 { 10082 #if 0 10083 (yyval.val) = 0; 10084 #endif 10085 (yyval.val) = dispatch0(qwords_new); 10086 10087 } 10088 break; 10089 10090 case 474: 10091 10092 /* Line 1806 of yacc.c */ 10093 #line 4095 "ripper.y" 10094 { 10095 #if 0 10096 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10097 #endif 10098 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10099 10100 } 10101 break; 10102 10103 case 475: 10104 10105 /* Line 1806 of yacc.c */ 10106 #line 4105 "ripper.y" 10107 { 10108 #if 0 10109 (yyval.val) = 0; 10110 #endif 10111 (yyval.val) = dispatch0(qsymbols_new); 10112 10113 } 10114 break; 10115 10116 case 476: 10117 10118 /* Line 1806 of yacc.c */ 10119 #line 4113 "ripper.y" 10120 { 10121 #if 0 10122 VALUE lit; 10123 lit = (yyvsp[(2) - (3)].val)->nd_lit; 10124 (yyvsp[(2) - (3)].val)->nd_lit = ID2SYM(rb_intern_str(lit)); 10125 nd_set_type((yyvsp[(2) - (3)].val), NODE_LIT); 10126 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10127 #endif 10128 (yyval.val) = dispatch2(qsymbols_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10129 10130 } 10131 break; 10132 10133 case 477: 10134 10135 /* Line 1806 of yacc.c */ 10136 #line 4127 "ripper.y" 10137 { 10138 #if 0 10139 (yyval.val) = 0; 10140 #endif 10141 (yyval.val) = dispatch0(string_content); 10142 10143 } 10144 break; 10145 10146 case 478: 10147 10148 /* Line 1806 of yacc.c */ 10149 #line 4135 "ripper.y" 10150 { 10151 #if 0 10152 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10153 #endif 10154 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10155 10156 } 10157 break; 10158 10159 case 479: 10160 10161 /* Line 1806 of yacc.c */ 10162 #line 4145 "ripper.y" 10163 { 10164 #if 0 10165 (yyval.val) = 0; 10166 #endif 10167 (yyval.val) = dispatch0(xstring_new); 10168 10169 } 10170 break; 10171 10172 case 480: 10173 10174 /* Line 1806 of yacc.c */ 10175 #line 4153 "ripper.y" 10176 { 10177 #if 0 10178 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10179 #endif 10180 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10181 10182 } 10183 break; 10184 10185 case 481: 10186 10187 /* Line 1806 of yacc.c */ 10188 #line 4163 "ripper.y" 10189 { 10190 #if 0 10191 (yyval.val) = 0; 10192 #endif 10193 (yyval.val) = dispatch0(regexp_new); 10194 10195 } 10196 break; 10197 10198 case 482: 10199 10200 /* Line 1806 of yacc.c */ 10201 #line 4171 "ripper.y" 10202 { 10203 #if 0 10204 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val); 10205 if (!head) { 10206 (yyval.val) = tail; 10207 } 10208 else if (!tail) { 10209 (yyval.val) = head; 10210 } 10211 else { 10212 switch (nd_type(head)) { 10213 case NODE_STR: 10214 nd_set_type(head, NODE_DSTR); 10215 break; 10216 case NODE_DSTR: 10217 break; 10218 default: 10219 head = list_append(NEW_DSTR(Qnil), head); 10220 break; 10221 } 10222 (yyval.val) = list_append(head, tail); 10223 } 10224 #endif 10225 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10226 10227 } 10228 break; 10229 10230 case 484: 10231 10232 /* Line 1806 of yacc.c */ 10233 #line 4201 "ripper.y" 10234 { 10235 (yyval.node) = lex_strterm; 10236 lex_strterm = 0; 10237 lex_state = EXPR_BEG; 10238 } 10239 break; 10240 10241 case 485: 10242 10243 /* Line 1806 of yacc.c */ 10244 #line 4207 "ripper.y" 10245 { 10246 #if 0 10247 lex_strterm = (yyvsp[(2) - (3)].node); 10248 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); 10249 #endif 10250 lex_strterm = (yyvsp[(2) - (3)].node); 10251 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); 10252 10253 } 10254 break; 10255 10256 case 486: 10257 10258 /* Line 1806 of yacc.c */ 10259 #line 4217 "ripper.y" 10260 { 10261 (yyvsp[(1) - (1)].val) = cond_stack; 10262 (yyval.val) = cmdarg_stack; 10263 cond_stack = 0; 10264 cmdarg_stack = 0; 10265 } 10266 break; 10267 10268 case 487: 10269 10270 /* Line 1806 of yacc.c */ 10271 #line 4223 "ripper.y" 10272 { 10273 (yyval.node) = lex_strterm; 10274 lex_strterm = 0; 10275 lex_state = EXPR_BEG; 10276 } 10277 break; 10278 10279 case 488: 10280 10281 /* Line 1806 of yacc.c */ 10282 #line 4228 "ripper.y" 10283 { 10284 (yyval.num) = brace_nest; 10285 brace_nest = 0; 10286 } 10287 break; 10288 10289 case 489: 10290 10291 /* Line 1806 of yacc.c */ 10292 #line 4233 "ripper.y" 10293 { 10294 cond_stack = (yyvsp[(1) - (6)].val); 10295 cmdarg_stack = (yyvsp[(2) - (6)].val); 10296 lex_strterm = (yyvsp[(3) - (6)].node); 10297 brace_nest = (yyvsp[(4) - (6)].num); 10298 #if 0 10299 if ((yyvsp[(5) - (6)].val)) (yyvsp[(5) - (6)].val)->flags &= ~NODE_FL_NEWLINE; 10300 (yyval.val) = new_evstr((yyvsp[(5) - (6)].val)); 10301 #endif 10302 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(5) - (6)].val)); 10303 10304 } 10305 break; 10306 10307 case 490: 10308 10309 /* Line 1806 of yacc.c */ 10310 #line 4248 "ripper.y" 10311 { 10312 #if 0 10313 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); 10314 #endif 10315 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10316 10317 } 10318 break; 10319 10320 case 491: 10321 10322 /* Line 1806 of yacc.c */ 10323 #line 4256 "ripper.y" 10324 { 10325 #if 0 10326 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); 10327 #endif 10328 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10329 10330 } 10331 break; 10332 10333 case 492: 10334 10335 /* Line 1806 of yacc.c */ 10336 #line 4264 "ripper.y" 10337 { 10338 #if 0 10339 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); 10340 #endif 10341 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10342 10343 } 10344 break; 10345 10346 case 494: 10347 10348 /* Line 1806 of yacc.c */ 10349 #line 4275 "ripper.y" 10350 { 10351 lex_state = EXPR_END; 10352 #if 0 10353 (yyval.val) = (yyvsp[(2) - (2)].val); 10354 #endif 10355 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); 10356 10357 } 10358 break; 10359 10360 case 499: 10361 10362 /* Line 1806 of yacc.c */ 10363 #line 4292 "ripper.y" 10364 { 10365 lex_state = EXPR_END; 10366 #if 0 10367 (yyval.val) = dsym_node((yyvsp[(2) - (3)].val)); 10368 #endif 10369 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); 10370 10371 } 10372 break; 10373 10374 case 502: 10375 10376 /* Line 1806 of yacc.c */ 10377 #line 4305 "ripper.y" 10378 { 10379 #if 0 10380 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10381 #endif 10382 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10383 10384 } 10385 break; 10386 10387 case 503: 10388 10389 /* Line 1806 of yacc.c */ 10390 #line 4313 "ripper.y" 10391 { 10392 #if 0 10393 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10394 #endif 10395 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10396 10397 } 10398 break; 10399 10400 case 509: 10401 10402 /* Line 1806 of yacc.c */ 10403 #line 4329 "ripper.y" 10404 {ifndef_ripper((yyval.val) = keyword_nil);} 10405 break; 10406 10407 case 510: 10408 10409 /* Line 1806 of yacc.c */ 10410 #line 4330 "ripper.y" 10411 {ifndef_ripper((yyval.val) = keyword_self);} 10412 break; 10413 10414 case 511: 10415 10416 /* Line 1806 of yacc.c */ 10417 #line 4331 "ripper.y" 10418 {ifndef_ripper((yyval.val) = keyword_true);} 10419 break; 10420 10421 case 512: 10422 10423 /* Line 1806 of yacc.c */ 10424 #line 4332 "ripper.y" 10425 {ifndef_ripper((yyval.val) = keyword_false);} 10426 break; 10427 10428 case 513: 10429 10430 /* Line 1806 of yacc.c */ 10431 #line 4333 "ripper.y" 10432 {ifndef_ripper((yyval.val) = keyword__FILE__);} 10433 break; 10434 10435 case 514: 10436 10437 /* Line 1806 of yacc.c */ 10438 #line 4334 "ripper.y" 10439 {ifndef_ripper((yyval.val) = keyword__LINE__);} 10440 break; 10441 10442 case 515: 10443 10444 /* Line 1806 of yacc.c */ 10445 #line 4335 "ripper.y" 10446 {ifndef_ripper((yyval.val) = keyword__ENCODING__);} 10447 break; 10448 10449 case 516: 10450 10451 /* Line 1806 of yacc.c */ 10452 #line 4339 "ripper.y" 10453 { 10454 #if 0 10455 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10456 #endif 10457 if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) { 10458 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10459 } 10460 else { 10461 (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val)); 10462 } 10463 10464 } 10465 break; 10466 10467 case 517: 10468 10469 /* Line 1806 of yacc.c */ 10470 #line 4352 "ripper.y" 10471 { 10472 #if 0 10473 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10474 #endif 10475 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10476 10477 } 10478 break; 10479 10480 case 518: 10481 10482 /* Line 1806 of yacc.c */ 10483 #line 4362 "ripper.y" 10484 { 10485 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10486 #if 0 10487 #endif 10488 (yyval.val) = dispatch1(var_field, (yyval.val)); 10489 10490 } 10491 break; 10492 10493 case 519: 10494 10495 /* Line 1806 of yacc.c */ 10496 #line 4370 "ripper.y" 10497 { 10498 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10499 #if 0 10500 #endif 10501 (yyval.val) = dispatch1(var_field, (yyval.val)); 10502 10503 } 10504 break; 10505 10506 case 522: 10507 10508 /* Line 1806 of yacc.c */ 10509 #line 4384 "ripper.y" 10510 { 10511 #if 0 10512 (yyval.val) = 0; 10513 #endif 10514 (yyval.val) = Qnil; 10515 10516 } 10517 break; 10518 10519 case 523: 10520 10521 /* Line 1806 of yacc.c */ 10522 #line 4392 "ripper.y" 10523 { 10524 lex_state = EXPR_BEG; 10525 command_start = TRUE; 10526 } 10527 break; 10528 10529 case 524: 10530 10531 /* Line 1806 of yacc.c */ 10532 #line 4397 "ripper.y" 10533 { 10534 (yyval.val) = (yyvsp[(3) - (4)].val); 10535 } 10536 break; 10537 10538 case 525: 10539 10540 /* Line 1806 of yacc.c */ 10541 #line 4401 "ripper.y" 10542 { 10543 #if 0 10544 yyerrok; 10545 (yyval.val) = 0; 10546 #endif 10547 yyerrok; 10548 (yyval.val) = Qnil; 10549 10550 } 10551 break; 10552 10553 case 526: 10554 10555 /* Line 1806 of yacc.c */ 10556 #line 4413 "ripper.y" 10557 { 10558 #if 0 10559 (yyval.val) = (yyvsp[(2) - (3)].val); 10560 #endif 10561 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 10562 10563 lex_state = EXPR_BEG; 10564 command_start = TRUE; 10565 } 10566 break; 10567 10568 case 527: 10569 10570 /* Line 1806 of yacc.c */ 10571 #line 4423 "ripper.y" 10572 { 10573 (yyval.val) = (yyvsp[(1) - (2)].val); 10574 lex_state = EXPR_BEG; 10575 command_start = TRUE; 10576 } 10577 break; 10578 10579 case 528: 10580 10581 /* Line 1806 of yacc.c */ 10582 #line 4431 "ripper.y" 10583 { 10584 (yyval.val) = new_args_tail((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10585 } 10586 break; 10587 10588 case 529: 10589 10590 /* Line 1806 of yacc.c */ 10591 #line 4435 "ripper.y" 10592 { 10593 (yyval.val) = new_args_tail((yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 10594 } 10595 break; 10596 10597 case 530: 10598 10599 /* Line 1806 of yacc.c */ 10600 #line 4439 "ripper.y" 10601 { 10602 (yyval.val) = new_args_tail(Qnone, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10603 } 10604 break; 10605 10606 case 531: 10607 10608 /* Line 1806 of yacc.c */ 10609 #line 4443 "ripper.y" 10610 { 10611 (yyval.val) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].val)); 10612 } 10613 break; 10614 10615 case 532: 10616 10617 /* Line 1806 of yacc.c */ 10618 #line 4449 "ripper.y" 10619 { 10620 (yyval.val) = (yyvsp[(2) - (2)].val); 10621 } 10622 break; 10623 10624 case 533: 10625 10626 /* Line 1806 of yacc.c */ 10627 #line 4453 "ripper.y" 10628 { 10629 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 10630 } 10631 break; 10632 10633 case 534: 10634 10635 /* Line 1806 of yacc.c */ 10636 #line 4459 "ripper.y" 10637 { 10638 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnone, (yyvsp[(6) - (6)].val)); 10639 } 10640 break; 10641 10642 case 535: 10643 10644 /* Line 1806 of yacc.c */ 10645 #line 4463 "ripper.y" 10646 { 10647 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 10648 } 10649 break; 10650 10651 case 536: 10652 10653 /* Line 1806 of yacc.c */ 10654 #line 4467 "ripper.y" 10655 { 10656 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, Qnone, (yyvsp[(4) - (4)].val)); 10657 } 10658 break; 10659 10660 case 537: 10661 10662 /* Line 1806 of yacc.c */ 10663 #line 4471 "ripper.y" 10664 { 10665 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnone, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10666 } 10667 break; 10668 10669 case 538: 10670 10671 /* Line 1806 of yacc.c */ 10672 #line 4475 "ripper.y" 10673 { 10674 (yyval.val) = new_args((yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 10675 } 10676 break; 10677 10678 case 539: 10679 10680 /* Line 1806 of yacc.c */ 10681 #line 4479 "ripper.y" 10682 { 10683 (yyval.val) = new_args((yyvsp[(1) - (6)].val), Qnone, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10684 } 10685 break; 10686 10687 case 540: 10688 10689 /* Line 1806 of yacc.c */ 10690 #line 4483 "ripper.y" 10691 { 10692 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].val)); 10693 } 10694 break; 10695 10696 case 541: 10697 10698 /* Line 1806 of yacc.c */ 10699 #line 4487 "ripper.y" 10700 { 10701 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 10702 } 10703 break; 10704 10705 case 542: 10706 10707 /* Line 1806 of yacc.c */ 10708 #line 4491 "ripper.y" 10709 { 10710 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10711 } 10712 break; 10713 10714 case 543: 10715 10716 /* Line 1806 of yacc.c */ 10717 #line 4495 "ripper.y" 10718 { 10719 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (2)].val), Qnone, Qnone, (yyvsp[(2) - (2)].val)); 10720 } 10721 break; 10722 10723 case 544: 10724 10725 /* Line 1806 of yacc.c */ 10726 #line 4499 "ripper.y" 10727 { 10728 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10729 } 10730 break; 10731 10732 case 545: 10733 10734 /* Line 1806 of yacc.c */ 10735 #line 4503 "ripper.y" 10736 { 10737 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 10738 } 10739 break; 10740 10741 case 546: 10742 10743 /* Line 1806 of yacc.c */ 10744 #line 4507 "ripper.y" 10745 { 10746 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10747 } 10748 break; 10749 10750 case 547: 10751 10752 /* Line 1806 of yacc.c */ 10753 #line 4511 "ripper.y" 10754 { 10755 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].val)); 10756 } 10757 break; 10758 10759 case 548: 10760 10761 /* Line 1806 of yacc.c */ 10762 #line 4515 "ripper.y" 10763 { 10764 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 10765 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyval.val)); 10766 } 10767 break; 10768 10769 case 549: 10770 10771 /* Line 1806 of yacc.c */ 10772 #line 4522 "ripper.y" 10773 { 10774 #if 0 10775 yyerror("formal argument cannot be a constant"); 10776 (yyval.val) = 0; 10777 #endif 10778 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10779 10780 } 10781 break; 10782 10783 case 550: 10784 10785 /* Line 1806 of yacc.c */ 10786 #line 4531 "ripper.y" 10787 { 10788 #if 0 10789 yyerror("formal argument cannot be an instance variable"); 10790 (yyval.val) = 0; 10791 #endif 10792 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10793 10794 } 10795 break; 10796 10797 case 551: 10798 10799 /* Line 1806 of yacc.c */ 10800 #line 4540 "ripper.y" 10801 { 10802 #if 0 10803 yyerror("formal argument cannot be a global variable"); 10804 (yyval.val) = 0; 10805 #endif 10806 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10807 10808 } 10809 break; 10810 10811 case 552: 10812 10813 /* Line 1806 of yacc.c */ 10814 #line 4549 "ripper.y" 10815 { 10816 #if 0 10817 yyerror("formal argument cannot be a class variable"); 10818 (yyval.val) = 0; 10819 #endif 10820 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10821 10822 } 10823 break; 10824 10825 case 554: 10826 10827 /* Line 1806 of yacc.c */ 10828 #line 4561 "ripper.y" 10829 { 10830 formal_argument(get_id((yyvsp[(1) - (1)].val))); 10831 (yyval.val) = (yyvsp[(1) - (1)].val); 10832 } 10833 break; 10834 10835 case 555: 10836 10837 /* Line 1806 of yacc.c */ 10838 #line 4568 "ripper.y" 10839 { 10840 arg_var(get_id((yyvsp[(1) - (1)].val))); 10841 #if 0 10842 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); 10843 #endif 10844 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 10845 10846 } 10847 break; 10848 10849 case 556: 10850 10851 /* Line 1806 of yacc.c */ 10852 #line 4577 "ripper.y" 10853 { 10854 ID tid = internal_id(); 10855 arg_var(tid); 10856 #if 0 10857 if (dyna_in_block()) { 10858 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); 10859 } 10860 else { 10861 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); 10862 } 10863 (yyval.val) = NEW_ARGS_AUX(tid, 1); 10864 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); 10865 #endif 10866 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 10867 10868 } 10869 break; 10870 10871 case 557: 10872 10873 /* Line 1806 of yacc.c */ 10874 #line 4598 "ripper.y" 10875 { 10876 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10877 } 10878 break; 10879 10880 case 558: 10881 10882 /* Line 1806 of yacc.c */ 10883 #line 4603 "ripper.y" 10884 { 10885 #if 0 10886 (yyval.val) = (yyvsp[(1) - (3)].val); 10887 (yyval.val)->nd_plen++; 10888 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); 10889 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); 10890 #endif 10891 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10892 10893 } 10894 break; 10895 10896 case 559: 10897 10898 /* Line 1806 of yacc.c */ 10899 #line 4616 "ripper.y" 10900 { 10901 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].val)))); 10902 (yyval.val) = assignable((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10903 #if 0 10904 (yyval.val) = NEW_KW_ARG(0, (yyval.val)); 10905 #endif 10906 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(2) - (2)].val)); 10907 10908 } 10909 break; 10910 10911 case 560: 10912 10913 /* Line 1806 of yacc.c */ 10914 #line 4628 "ripper.y" 10915 { 10916 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].val)))); 10917 (yyval.val) = assignable((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10918 #if 0 10919 (yyval.val) = NEW_KW_ARG(0, (yyval.val)); 10920 #endif 10921 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(2) - (2)].val)); 10922 10923 } 10924 break; 10925 10926 case 561: 10927 10928 /* Line 1806 of yacc.c */ 10929 #line 4640 "ripper.y" 10930 { 10931 #if 0 10932 (yyval.val) = (yyvsp[(1) - (1)].val); 10933 #endif 10934 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10935 10936 } 10937 break; 10938 10939 case 562: 10940 10941 /* Line 1806 of yacc.c */ 10942 #line 4648 "ripper.y" 10943 { 10944 #if 0 10945 NODE *kws = (yyvsp[(1) - (3)].val); 10946 10947 while (kws->nd_next) { 10948 kws = kws->nd_next; 10949 } 10950 kws->nd_next = (yyvsp[(3) - (3)].val); 10951 (yyval.val) = (yyvsp[(1) - (3)].val); 10952 #endif 10953 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10954 10955 } 10956 break; 10957 10958 case 563: 10959 10960 /* Line 1806 of yacc.c */ 10961 #line 4665 "ripper.y" 10962 { 10963 #if 0 10964 (yyval.val) = (yyvsp[(1) - (1)].val); 10965 #endif 10966 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10967 10968 } 10969 break; 10970 10971 case 564: 10972 10973 /* Line 1806 of yacc.c */ 10974 #line 4673 "ripper.y" 10975 { 10976 #if 0 10977 NODE *kws = (yyvsp[(1) - (3)].val); 10978 10979 while (kws->nd_next) { 10980 kws = kws->nd_next; 10981 } 10982 kws->nd_next = (yyvsp[(3) - (3)].val); 10983 (yyval.val) = (yyvsp[(1) - (3)].val); 10984 #endif 10985 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10986 10987 } 10988 break; 10989 10990 case 567: 10991 10992 /* Line 1806 of yacc.c */ 10993 #line 4693 "ripper.y" 10994 { 10995 shadowing_lvar(get_id((yyvsp[(2) - (2)].val))); 10996 (yyval.val) = (yyvsp[(2) - (2)].val); 10997 } 10998 break; 10999 11000 case 568: 11001 11002 /* Line 1806 of yacc.c */ 11003 #line 4698 "ripper.y" 11004 { 11005 (yyval.val) = internal_id(); 11006 } 11007 break; 11008 11009 case 569: 11010 11011 /* Line 1806 of yacc.c */ 11012 #line 4704 "ripper.y" 11013 { 11014 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 11015 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11016 #if 0 11017 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 11018 #endif 11019 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 11020 11021 } 11022 break; 11023 11024 case 570: 11025 11026 /* Line 1806 of yacc.c */ 11027 #line 4716 "ripper.y" 11028 { 11029 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 11030 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11031 #if 0 11032 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 11033 #endif 11034 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 11035 11036 } 11037 break; 11038 11039 case 571: 11040 11041 /* Line 1806 of yacc.c */ 11042 #line 4728 "ripper.y" 11043 { 11044 #if 0 11045 (yyval.val) = (yyvsp[(1) - (1)].val); 11046 #endif 11047 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11048 11049 } 11050 break; 11051 11052 case 572: 11053 11054 /* Line 1806 of yacc.c */ 11055 #line 4736 "ripper.y" 11056 { 11057 #if 0 11058 NODE *opts = (yyvsp[(1) - (3)].val); 11059 11060 while (opts->nd_next) { 11061 opts = opts->nd_next; 11062 } 11063 opts->nd_next = (yyvsp[(3) - (3)].val); 11064 (yyval.val) = (yyvsp[(1) - (3)].val); 11065 #endif 11066 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11067 11068 } 11069 break; 11070 11071 case 573: 11072 11073 /* Line 1806 of yacc.c */ 11074 #line 4752 "ripper.y" 11075 { 11076 #if 0 11077 (yyval.val) = (yyvsp[(1) - (1)].val); 11078 #endif 11079 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11080 11081 } 11082 break; 11083 11084 case 574: 11085 11086 /* Line 1806 of yacc.c */ 11087 #line 4760 "ripper.y" 11088 { 11089 #if 0 11090 NODE *opts = (yyvsp[(1) - (3)].val); 11091 11092 while (opts->nd_next) { 11093 opts = opts->nd_next; 11094 } 11095 opts->nd_next = (yyvsp[(3) - (3)].val); 11096 (yyval.val) = (yyvsp[(1) - (3)].val); 11097 #endif 11098 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11099 11100 } 11101 break; 11102 11103 case 577: 11104 11105 /* Line 1806 of yacc.c */ 11106 #line 4780 "ripper.y" 11107 { 11108 #if 0 11109 if (!is_local_id((yyvsp[(2) - (2)].val))) 11110 yyerror("rest argument must be local variable"); 11111 #endif 11112 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 11113 #if 0 11114 (yyval.val) = (yyvsp[(2) - (2)].val); 11115 #endif 11116 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); 11117 11118 } 11119 break; 11120 11121 case 578: 11122 11123 /* Line 1806 of yacc.c */ 11124 #line 4793 "ripper.y" 11125 { 11126 #if 0 11127 (yyval.val) = internal_id(); 11128 arg_var((yyval.val)); 11129 #endif 11130 (yyval.val) = dispatch1(rest_param, Qnil); 11131 11132 } 11133 break; 11134 11135 case 581: 11136 11137 /* Line 1806 of yacc.c */ 11138 #line 4808 "ripper.y" 11139 { 11140 #if 0 11141 if (!is_local_id((yyvsp[(2) - (2)].val))) 11142 yyerror("block argument must be local variable"); 11143 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) 11144 yyerror("duplicated block argument name"); 11145 #endif 11146 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 11147 #if 0 11148 (yyval.val) = (yyvsp[(2) - (2)].val); 11149 #endif 11150 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); 11151 11152 } 11153 break; 11154 11155 case 582: 11156 11157 /* Line 1806 of yacc.c */ 11158 #line 4825 "ripper.y" 11159 { 11160 (yyval.val) = (yyvsp[(2) - (2)].val); 11161 } 11162 break; 11163 11164 case 583: 11165 11166 /* Line 1806 of yacc.c */ 11167 #line 4829 "ripper.y" 11168 { 11169 #if 0 11170 (yyval.val) = 0; 11171 #endif 11172 (yyval.val) = Qundef; 11173 11174 } 11175 break; 11176 11177 case 584: 11178 11179 /* Line 1806 of yacc.c */ 11180 #line 4839 "ripper.y" 11181 { 11182 #if 0 11183 value_expr((yyvsp[(1) - (1)].val)); 11184 (yyval.val) = (yyvsp[(1) - (1)].val); 11185 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 11186 #endif 11187 (yyval.val) = (yyvsp[(1) - (1)].val); 11188 11189 } 11190 break; 11191 11192 case 585: 11193 11194 /* Line 1806 of yacc.c */ 11195 #line 4848 "ripper.y" 11196 {lex_state = EXPR_BEG;} 11197 break; 11198 11199 case 586: 11200 11201 /* Line 1806 of yacc.c */ 11202 #line 4849 "ripper.y" 11203 { 11204 #if 0 11205 if ((yyvsp[(3) - (4)].val) == 0) { 11206 yyerror("can't define singleton method for ()."); 11207 } 11208 else { 11209 switch (nd_type((yyvsp[(3) - (4)].val))) { 11210 case NODE_STR: 11211 case NODE_DSTR: 11212 case NODE_XSTR: 11213 case NODE_DXSTR: 11214 case NODE_DREGX: 11215 case NODE_LIT: 11216 case NODE_ARRAY: 11217 case NODE_ZARRAY: 11218 yyerror("can't define singleton method for literals"); 11219 default: 11220 value_expr((yyvsp[(3) - (4)].val)); 11221 break; 11222 } 11223 } 11224 (yyval.val) = (yyvsp[(3) - (4)].val); 11225 #endif 11226 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); 11227 11228 } 11229 break; 11230 11231 case 588: 11232 11233 /* Line 1806 of yacc.c */ 11234 #line 4879 "ripper.y" 11235 { 11236 #if 0 11237 (yyval.val) = (yyvsp[(1) - (2)].val); 11238 #endif 11239 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); 11240 11241 } 11242 break; 11243 11244 case 589: 11245 11246 /* Line 1806 of yacc.c */ 11247 #line 4891 "ripper.y" 11248 { 11249 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11250 } 11251 break; 11252 11253 case 590: 11254 11255 /* Line 1806 of yacc.c */ 11256 #line 4896 "ripper.y" 11257 { 11258 #if 0 11259 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11260 #endif 11261 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11262 11263 } 11264 break; 11265 11266 case 591: 11267 11268 /* Line 1806 of yacc.c */ 11269 #line 4906 "ripper.y" 11270 { 11271 #if 0 11272 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 11273 #endif 11274 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11275 11276 } 11277 break; 11278 11279 case 592: 11280 11281 /* Line 1806 of yacc.c */ 11282 #line 4914 "ripper.y" 11283 { 11284 #if 0 11285 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); 11286 #endif 11287 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 11288 11289 } 11290 break; 11291 11292 case 593: 11293 11294 /* Line 1806 of yacc.c */ 11295 #line 4922 "ripper.y" 11296 { 11297 #if 0 11298 (yyval.val) = list_append(NEW_LIST(0), (yyvsp[(2) - (2)].val)); 11299 #endif 11300 (yyval.val) = dispatch1(assoc_splat, (yyvsp[(2) - (2)].val)); 11301 11302 } 11303 break; 11304 11305 case 604: 11306 11307 /* Line 1806 of yacc.c */ 11308 #line 4952 "ripper.y" 11309 { (yyval.val) = (yyvsp[(1) - (1)].val); } 11310 break; 11311 11312 case 605: 11313 11314 /* Line 1806 of yacc.c */ 11315 #line 4957 "ripper.y" 11316 { (yyval.val) = (yyvsp[(1) - (1)].val); } 11317 break; 11318 11319 case 615: 11320 11321 /* Line 1806 of yacc.c */ 11322 #line 4980 "ripper.y" 11323 {yyerrok;} 11324 break; 11325 11326 case 618: 11327 11328 /* Line 1806 of yacc.c */ 11329 #line 4985 "ripper.y" 11330 {yyerrok;} 11331 break; 11332 11333 case 619: 11334 11335 /* Line 1806 of yacc.c */ 11336 #line 4989 "ripper.y" 11337 { 11338 #if 0 11339 (yyval.val) = 0; 11340 #endif 11341 (yyval.val) = Qundef; 11342 11343 } 11344 break; 11345 11346 11347 11348 /* Line 1806 of yacc.c */ 11349 #line 11348 "parse.c" 11350 default: break; 11351 } 11352 /* User semantic actions sometimes alter yychar, and that requires 11353 that yytoken be updated with the new translation. We take the 11354 approach of translating immediately before every use of yytoken. 11355 One alternative is translating here after every semantic action, 11356 but that translation would be missed if the semantic action invokes 11357 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 11358 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 11359 incorrect destructor might then be invoked immediately. In the 11360 case of YYERROR or YYBACKUP, subsequent parser actions might lead 11361 to an incorrect destructor call or verbose syntax error message 11362 before the lookahead is translated. */ 11363 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 11364 11365 YYPOPSTACK (yylen); 11366 yylen = 0; 11367 YY_STACK_PRINT (yyss, yyssp); 11368 11369 *++yyvsp = yyval; 11370 11371 /* Now `shift' the result of the reduction. Determine what state 11372 that goes to, based on the state we popped back to and the rule 11373 number reduced by. */ 11374 11375 yyn = yyr1[yyn]; 11376 11377 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 11378 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 11379 yystate = yytable[yystate]; 11380 else 11381 yystate = yydefgoto[yyn - YYNTOKENS]; 11382 11383 goto yynewstate; 11384 11385 11386 /*------------------------------------. 11387 | yyerrlab -- here on detecting error | 11388 `------------------------------------*/ 11389 yyerrlab: 11390 /* Make sure we have latest lookahead translation. See comments at 11391 user semantic actions for why this is necessary. */ 11392 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 11393 11394 /* If not already recovering from an error, report this error. */ 11395 if (!yyerrstatus) 11396 { 11397 ++yynerrs; 11398 #if ! YYERROR_VERBOSE 11399 parser_yyerror (parser, YY_("syntax error")); 11400 #else 11401 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 11402 yyssp, yytoken) 11403 { 11404 char const *yymsgp = YY_("syntax error"); 11405 int yysyntax_error_status; 11406 yysyntax_error_status = YYSYNTAX_ERROR; 11407 if (yysyntax_error_status == 0) 11408 yymsgp = yymsg; 11409 else if (yysyntax_error_status == 1) 11410 { 11411 if (yymsg != yymsgbuf) 11412 YYSTACK_FREE (yymsg); 11413 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 11414 if (!yymsg) 11415 { 11416 yymsg = yymsgbuf; 11417 yymsg_alloc = sizeof yymsgbuf; 11418 yysyntax_error_status = 2; 11419 } 11420 else 11421 { 11422 yysyntax_error_status = YYSYNTAX_ERROR; 11423 yymsgp = yymsg; 11424 } 11425 } 11426 parser_yyerror (parser, yymsgp); 11427 if (yysyntax_error_status == 2) 11428 goto yyexhaustedlab; 11429 } 11430 # undef YYSYNTAX_ERROR 11431 #endif 11432 } 11433 11434 11435 11436 if (yyerrstatus == 3) 11437 { 11438 /* If just tried and failed to reuse lookahead token after an 11439 error, discard it. */ 11440 11441 if (yychar <= YYEOF) 11442 { 11443 /* Return failure if at end of input. */ 11444 if (yychar == YYEOF) 11445 YYABORT; 11446 } 11447 else 11448 { 11449 yydestruct ("Error: discarding", 11450 yytoken, &yylval, parser); 11451 yychar = YYEMPTY; 11452 } 11453 } 11454 11455 /* Else will try to reuse lookahead token after shifting the error 11456 token. */ 11457 goto yyerrlab1; 11458 11459 11460 /*---------------------------------------------------. 11461 | yyerrorlab -- error raised explicitly by YYERROR. | 11462 `---------------------------------------------------*/ 11463 yyerrorlab: 11464 11465 /* Pacify compilers like GCC when the user code never invokes 11466 YYERROR and the label yyerrorlab therefore never appears in user 11467 code. */ 11468 if (/*CONSTCOND*/ 0) 11469 goto yyerrorlab; 11470 11471 /* Do not reclaim the symbols of the rule which action triggered 11472 this YYERROR. */ 11473 YYPOPSTACK (yylen); 11474 yylen = 0; 11475 YY_STACK_PRINT (yyss, yyssp); 11476 yystate = *yyssp; 11477 goto yyerrlab1; 11478 11479 11480 /*-------------------------------------------------------------. 11481 | yyerrlab1 -- common code for both syntax error and YYERROR. | 11482 `-------------------------------------------------------------*/ 11483 yyerrlab1: 11484 yyerrstatus = 3; /* Each real token shifted decrements this. */ 11485 11486 for (;;) 11487 { 11488 yyn = yypact[yystate]; 11489 if (!yypact_value_is_default (yyn)) 11490 { 11491 yyn += YYTERROR; 11492 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 11493 { 11494 yyn = yytable[yyn]; 11495 if (0 < yyn) 11496 break; 11497 } 11498 } 11499 11500 /* Pop the current state because it cannot handle the error token. */ 11501 if (yyssp == yyss) 11502 YYABORT; 11503 11504 11505 yydestruct ("Error: popping", 11506 yystos[yystate], yyvsp, parser); 11507 YYPOPSTACK (1); 11508 yystate = *yyssp; 11509 YY_STACK_PRINT (yyss, yyssp); 11510 } 11511 11512 *++yyvsp = yylval; 11513 11514 11515 /* Shift the error token. */ 11516 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 11517 11518 yystate = yyn; 11519 goto yynewstate; 11520 11521 11522 /*-------------------------------------. 11523 | yyacceptlab -- YYACCEPT comes here. | 11524 `-------------------------------------*/ 11525 yyacceptlab: 11526 yyresult = 0; 11527 goto yyreturn; 11528 11529 /*-----------------------------------. 11530 | yyabortlab -- YYABORT comes here. | 11531 `-----------------------------------*/ 11532 yyabortlab: 11533 yyresult = 1; 11534 goto yyreturn; 11535 11536 #if !defined(yyoverflow) || YYERROR_VERBOSE 11537 /*-------------------------------------------------. 11538 | yyexhaustedlab -- memory exhaustion comes here. | 11539 `-------------------------------------------------*/ 11540 yyexhaustedlab: 11541 parser_yyerror (parser, YY_("memory exhausted")); 11542 yyresult = 2; 11543 /* Fall through. */ 11544 #endif 11545 11546 yyreturn: 11547 if (yychar != YYEMPTY) 11548 { 11549 /* Make sure we have latest lookahead translation. See comments at 11550 user semantic actions for why this is necessary. */ 11551 yytoken = YYTRANSLATE (yychar); 11552 yydestruct ("Cleanup: discarding lookahead", 11553 yytoken, &yylval, parser); 11554 } 11555 /* Do not reclaim the symbols of the rule which action triggered 11556 this YYABORT or YYACCEPT. */ 11557 YYPOPSTACK (yylen); 11558 YY_STACK_PRINT (yyss, yyssp); 11559 while (yyssp != yyss) 11560 { 11561 yydestruct ("Cleanup: popping", 11562 yystos[*yyssp], yyvsp, parser); 11563 YYPOPSTACK (1); 11564 } 11565 #ifndef yyoverflow 11566 if (yyss != yyssa) 11567 YYSTACK_FREE (yyss); 11568 #endif 11569 #if YYERROR_VERBOSE 11570 if (yymsg != yymsgbuf) 11571 YYSTACK_FREE (yymsg); 11572 #endif 11573 /* Make sure YYID is used. */ 11574 return YYID (yyresult); 11575 } 11576 11577 11578 11579 /* Line 2067 of yacc.c */ 11580 #line 4997 "ripper.y" 11581 11582 # undef parser 11583 # undef yylex 11584 # undef yylval 11585 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 11586 11587 static int parser_regx_options(struct parser_params*); 11588 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 11589 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 11590 static int parser_parse_string(struct parser_params*,NODE*); 11591 static int parser_here_document(struct parser_params*,NODE*); 11592 11593 11594 # define nextc() parser_nextc(parser) 11595 # define pushback(c) parser_pushback(parser, (c)) 11596 # define newtok() parser_newtok(parser) 11597 # define tokspace(n) parser_tokspace(parser, (n)) 11598 # define tokadd(c) parser_tokadd(parser, (c)) 11599 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 11600 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 11601 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 11602 # define regx_options() parser_regx_options(parser) 11603 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 11604 # define parse_string(n) parser_parse_string(parser,(n)) 11605 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 11606 # define here_document(n) parser_here_document(parser,(n)) 11607 # define heredoc_identifier() parser_heredoc_identifier(parser) 11608 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 11609 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 11610 11611 #ifndef RIPPER 11612 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 11613 # define set_yylval_num(x) (yylval.num = (x)) 11614 # define set_yylval_id(x) (yylval.id = (x)) 11615 # define set_yylval_name(x) (yylval.id = (x)) 11616 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 11617 # define set_yylval_node(x) (yylval.node = (x)) 11618 # define yylval_id() (yylval.id) 11619 #else 11620 static inline VALUE 11621 ripper_yylval_id(ID x) 11622 { 11623 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 11624 } 11625 # define set_yylval_str(x) (void)(x) 11626 # define set_yylval_num(x) (void)(x) 11627 # define set_yylval_id(x) (void)(x) 11628 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 11629 # define set_yylval_literal(x) (void)(x) 11630 # define set_yylval_node(x) (void)(x) 11631 # define yylval_id() yylval.id 11632 #endif 11633 11634 #ifndef RIPPER 11635 #define ripper_flush(p) (void)(p) 11636 #else 11637 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 11638 11639 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 11640 11641 static int 11642 ripper_has_scan_event(struct parser_params *parser) 11643 { 11644 11645 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 11646 return lex_p > parser->tokp; 11647 } 11648 11649 static VALUE 11650 ripper_scan_event_val(struct parser_params *parser, int t) 11651 { 11652 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 11653 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 11654 ripper_flush(parser); 11655 return rval; 11656 } 11657 11658 static void 11659 ripper_dispatch_scan_event(struct parser_params *parser, int t) 11660 { 11661 if (!ripper_has_scan_event(parser)) return; 11662 yylval_rval = ripper_scan_event_val(parser, t); 11663 } 11664 11665 static void 11666 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 11667 { 11668 if (!ripper_has_scan_event(parser)) return; 11669 (void)ripper_scan_event_val(parser, t); 11670 } 11671 11672 static void 11673 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 11674 { 11675 int saved_line = ruby_sourceline; 11676 const char *saved_tokp = parser->tokp; 11677 11678 ruby_sourceline = parser->delayed_line; 11679 parser->tokp = lex_pbeg + parser->delayed_col; 11680 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 11681 parser->delayed = Qnil; 11682 ruby_sourceline = saved_line; 11683 parser->tokp = saved_tokp; 11684 } 11685 #endif /* RIPPER */ 11686 11687 #include "ruby/regex.h" 11688 #include "ruby/util.h" 11689 11690 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 11691 since ours (we hope) works properly with all combinations of 11692 machines, compilers, `char' and `unsigned char' argument types. 11693 (Per Bothner suggested the basic approach.) */ 11694 #undef SIGN_EXTEND_CHAR 11695 #if __STDC__ 11696 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 11697 #else /* not __STDC__ */ 11698 /* As in Harbison and Steele. */ 11699 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 11700 #endif 11701 11702 #define parser_encoding_name() (current_enc->name) 11703 #define parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) 11704 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) 11705 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 11706 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) 11707 11708 #define parser_isascii() ISASCII(*(lex_p-1)) 11709 11710 #ifndef RIPPER 11711 static int 11712 token_info_get_column(struct parser_params *parser, const char *token) 11713 { 11714 int column = 1; 11715 const char *p, *pend = lex_p - strlen(token); 11716 for (p = lex_pbeg; p < pend; p++) { 11717 if (*p == '\t') { 11718 column = (((column - 1) / 8) + 1) * 8; 11719 } 11720 column++; 11721 } 11722 return column; 11723 } 11724 11725 static int 11726 token_info_has_nonspaces(struct parser_params *parser, const char *token) 11727 { 11728 const char *p, *pend = lex_p - strlen(token); 11729 for (p = lex_pbeg; p < pend; p++) { 11730 if (*p != ' ' && *p != '\t') { 11731 return 1; 11732 } 11733 } 11734 return 0; 11735 } 11736 11737 #undef token_info_push 11738 static void 11739 token_info_push(struct parser_params *parser, const char *token) 11740 { 11741 token_info *ptinfo; 11742 11743 if (!parser->parser_token_info_enabled) return; 11744 ptinfo = ALLOC(token_info); 11745 ptinfo->token = token; 11746 ptinfo->linenum = ruby_sourceline; 11747 ptinfo->column = token_info_get_column(parser, token); 11748 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 11749 ptinfo->next = parser->parser_token_info; 11750 11751 parser->parser_token_info = ptinfo; 11752 } 11753 11754 #undef token_info_pop 11755 static void 11756 token_info_pop(struct parser_params *parser, const char *token) 11757 { 11758 int linenum; 11759 token_info *ptinfo = parser->parser_token_info; 11760 11761 if (!ptinfo) return; 11762 parser->parser_token_info = ptinfo->next; 11763 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 11764 goto finish; 11765 } 11766 linenum = ruby_sourceline; 11767 if (linenum == ptinfo->linenum) { /* SKIP */ 11768 goto finish; 11769 } 11770 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 11771 goto finish; 11772 } 11773 if (parser->parser_token_info_enabled) { 11774 rb_compile_warn(ruby_sourcefile, linenum, 11775 "mismatched indentations at '%s' with '%s' at %d", 11776 token, ptinfo->token, ptinfo->linenum); 11777 } 11778 11779 finish: 11780 xfree(ptinfo); 11781 } 11782 #endif /* RIPPER */ 11783 11784 static int 11785 parser_yyerror(struct parser_params *parser, const char *msg) 11786 { 11787 #ifndef RIPPER 11788 const int max_line_margin = 30; 11789 const char *p, *pe; 11790 char *buf; 11791 long len; 11792 int i; 11793 11794 compile_error(PARSER_ARG "%s", msg); 11795 p = lex_p; 11796 while (lex_pbeg <= p) { 11797 if (*p == '\n') break; 11798 p--; 11799 } 11800 p++; 11801 11802 pe = lex_p; 11803 while (pe < lex_pend) { 11804 if (*pe == '\n') break; 11805 pe++; 11806 } 11807 11808 len = pe - p; 11809 if (len > 4) { 11810 char *p2; 11811 const char *pre = "", *post = ""; 11812 11813 if (len > max_line_margin * 2 + 10) { 11814 if (lex_p - p > max_line_margin) { 11815 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 11816 pre = "..."; 11817 } 11818 if (pe - lex_p > max_line_margin) { 11819 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 11820 post = "..."; 11821 } 11822 len = pe - p; 11823 } 11824 buf = ALLOCA_N(char, len+2); 11825 MEMCPY(buf, p, char, len); 11826 buf[len] = '\0'; 11827 rb_compile_error_append("%s%s%s", pre, buf, post); 11828 11829 i = (int)(lex_p - p); 11830 p2 = buf; pe = buf + len; 11831 11832 while (p2 < pe) { 11833 if (*p2 != '\t') *p2 = ' '; 11834 p2++; 11835 } 11836 buf[i] = '^'; 11837 buf[i+1] = '\0'; 11838 rb_compile_error_append("%s%s", pre, buf); 11839 } 11840 #else 11841 dispatch1(parse_error, STR_NEW2(msg)); 11842 #endif /* !RIPPER */ 11843 return 0; 11844 } 11845 11846 static void parser_prepare(struct parser_params *parser); 11847 11848 #ifndef RIPPER 11849 static VALUE 11850 debug_lines(VALUE fname) 11851 { 11852 ID script_lines; 11853 CONST_ID(script_lines, "SCRIPT_LINES__"); 11854 if (rb_const_defined_at(rb_cObject, script_lines)) { 11855 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 11856 if (RB_TYPE_P(hash, T_HASH)) { 11857 VALUE lines = rb_ary_new(); 11858 rb_hash_aset(hash, fname, lines); 11859 return lines; 11860 } 11861 } 11862 return 0; 11863 } 11864 11865 static VALUE 11866 coverage(VALUE fname, int n) 11867 { 11868 VALUE coverages = rb_get_coverages(); 11869 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 11870 VALUE lines = rb_ary_new2(n); 11871 int i; 11872 RBASIC(lines)->klass = 0; 11873 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 11874 RARRAY(lines)->as.heap.len = n; 11875 rb_hash_aset(coverages, fname, lines); 11876 return lines; 11877 } 11878 return 0; 11879 } 11880 11881 static int 11882 e_option_supplied(struct parser_params *parser) 11883 { 11884 return strcmp(ruby_sourcefile, "-e") == 0; 11885 } 11886 11887 static VALUE 11888 yycompile0(VALUE arg) 11889 { 11890 int n; 11891 NODE *tree; 11892 struct parser_params *parser = (struct parser_params *)arg; 11893 11894 if (!compile_for_eval && rb_safe_level() == 0) { 11895 ruby_debug_lines = debug_lines(ruby_sourcefile_string); 11896 if (ruby_debug_lines && ruby_sourceline > 0) { 11897 VALUE str = STR_NEW0(); 11898 n = ruby_sourceline; 11899 do { 11900 rb_ary_push(ruby_debug_lines, str); 11901 } while (--n); 11902 } 11903 11904 if (!e_option_supplied(parser)) { 11905 ruby_coverage = coverage(ruby_sourcefile_string, ruby_sourceline); 11906 } 11907 } 11908 11909 parser_prepare(parser); 11910 deferred_nodes = 0; 11911 #ifndef RIPPER 11912 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 11913 #endif 11914 #ifndef RIPPER 11915 if (RUBY_DTRACE_PARSE_BEGIN_ENABLED()) { 11916 RUBY_DTRACE_PARSE_BEGIN(parser->parser_ruby_sourcefile, 11917 parser->parser_ruby_sourceline); 11918 } 11919 #endif 11920 n = yyparse((void*)parser); 11921 #ifndef RIPPER 11922 if (RUBY_DTRACE_PARSE_END_ENABLED()) { 11923 RUBY_DTRACE_PARSE_END(parser->parser_ruby_sourcefile, 11924 parser->parser_ruby_sourceline); 11925 } 11926 #endif 11927 ruby_debug_lines = 0; 11928 ruby_coverage = 0; 11929 compile_for_eval = 0; 11930 11931 lex_strterm = 0; 11932 lex_p = lex_pbeg = lex_pend = 0; 11933 lex_lastline = lex_nextline = 0; 11934 if (parser->nerr) { 11935 return 0; 11936 } 11937 tree = ruby_eval_tree; 11938 if (!tree) { 11939 tree = NEW_NIL(); 11940 } 11941 else if (ruby_eval_tree_begin) { 11942 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 11943 } 11944 return (VALUE)tree; 11945 } 11946 11947 static NODE* 11948 yycompile(struct parser_params *parser, VALUE fname, int line) 11949 { 11950 ruby_sourcefile_string = rb_str_new_frozen(fname); 11951 ruby_sourcefile = RSTRING_PTR(fname); 11952 ruby_sourceline = line - 1; 11953 return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser); 11954 } 11955 #endif /* !RIPPER */ 11956 11957 static rb_encoding * 11958 must_be_ascii_compatible(VALUE s) 11959 { 11960 rb_encoding *enc = rb_enc_get(s); 11961 if (!rb_enc_asciicompat(enc)) { 11962 rb_raise(rb_eArgError, "invalid source encoding"); 11963 } 11964 return enc; 11965 } 11966 11967 static VALUE 11968 lex_get_str(struct parser_params *parser, VALUE s) 11969 { 11970 char *beg, *end, *pend; 11971 rb_encoding *enc = must_be_ascii_compatible(s); 11972 11973 beg = RSTRING_PTR(s); 11974 if (lex_gets_ptr) { 11975 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11976 beg += lex_gets_ptr; 11977 } 11978 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11979 end = beg; 11980 while (end < pend) { 11981 if (*end++ == '\n') break; 11982 } 11983 lex_gets_ptr = end - RSTRING_PTR(s); 11984 return rb_enc_str_new(beg, end - beg, enc); 11985 } 11986 11987 static VALUE 11988 lex_getline(struct parser_params *parser) 11989 { 11990 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11991 if (NIL_P(line)) return line; 11992 must_be_ascii_compatible(line); 11993 #ifndef RIPPER 11994 if (ruby_debug_lines) { 11995 rb_enc_associate(line, current_enc); 11996 rb_ary_push(ruby_debug_lines, line); 11997 } 11998 if (ruby_coverage) { 11999 rb_ary_push(ruby_coverage, Qnil); 12000 } 12001 #endif 12002 return line; 12003 } 12004 12005 #ifdef RIPPER 12006 static rb_data_type_t parser_data_type; 12007 #else 12008 static const rb_data_type_t parser_data_type; 12009 12010 static NODE* 12011 parser_compile_string(volatile VALUE vparser, VALUE fname, VALUE s, int line) 12012 { 12013 struct parser_params *parser; 12014 NODE *node; 12015 12016 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12017 lex_gets = lex_get_str; 12018 lex_gets_ptr = 0; 12019 lex_input = s; 12020 lex_pbeg = lex_p = lex_pend = 0; 12021 compile_for_eval = rb_parse_in_eval(); 12022 12023 node = yycompile(parser, fname, line); 12024 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12025 12026 return node; 12027 } 12028 12029 NODE* 12030 rb_compile_string(const char *f, VALUE s, int line) 12031 { 12032 must_be_ascii_compatible(s); 12033 return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line); 12034 } 12035 12036 NODE* 12037 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 12038 { 12039 return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line); 12040 } 12041 12042 NODE* 12043 rb_parser_compile_string_path(volatile VALUE vparser, VALUE f, VALUE s, int line) 12044 { 12045 must_be_ascii_compatible(s); 12046 return parser_compile_string(vparser, f, s, line); 12047 } 12048 12049 NODE* 12050 rb_compile_cstr(const char *f, const char *s, int len, int line) 12051 { 12052 VALUE str = rb_str_new(s, len); 12053 return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line); 12054 } 12055 12056 NODE* 12057 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 12058 { 12059 VALUE str = rb_str_new(s, len); 12060 return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line); 12061 } 12062 12063 static VALUE 12064 lex_io_gets(struct parser_params *parser, VALUE io) 12065 { 12066 return rb_io_gets(io); 12067 } 12068 12069 NODE* 12070 rb_compile_file(const char *f, VALUE file, int start) 12071 { 12072 VALUE volatile vparser = rb_parser_new(); 12073 12074 return rb_parser_compile_file(vparser, f, file, start); 12075 } 12076 12077 NODE* 12078 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 12079 { 12080 return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start); 12081 } 12082 12083 NODE* 12084 rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE file, int start) 12085 { 12086 struct parser_params *parser; 12087 NODE *node; 12088 12089 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12090 lex_gets = lex_io_gets; 12091 lex_input = file; 12092 lex_pbeg = lex_p = lex_pend = 0; 12093 compile_for_eval = rb_parse_in_eval(); 12094 12095 node = yycompile(parser, fname, start); 12096 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12097 12098 return node; 12099 } 12100 #endif /* !RIPPER */ 12101 12102 #define STR_FUNC_ESCAPE 0x01 12103 #define STR_FUNC_EXPAND 0x02 12104 #define STR_FUNC_REGEXP 0x04 12105 #define STR_FUNC_QWORDS 0x08 12106 #define STR_FUNC_SYMBOL 0x10 12107 #define STR_FUNC_INDENT 0x20 12108 12109 enum string_type { 12110 str_squote = (0), 12111 str_dquote = (STR_FUNC_EXPAND), 12112 str_xquote = (STR_FUNC_EXPAND), 12113 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 12114 str_sword = (STR_FUNC_QWORDS), 12115 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 12116 str_ssym = (STR_FUNC_SYMBOL), 12117 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 12118 }; 12119 12120 static VALUE 12121 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 12122 { 12123 VALUE str; 12124 12125 str = rb_enc_str_new(p, n, enc); 12126 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 12127 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 12128 } 12129 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 12130 rb_enc_associate(str, rb_ascii8bit_encoding()); 12131 } 12132 } 12133 12134 return str; 12135 } 12136 12137 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 12138 #define lex_eol_p() (lex_p >= lex_pend) 12139 #define peek(c) peek_n((c), 0) 12140 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 12141 12142 static inline int 12143 parser_nextc(struct parser_params *parser) 12144 { 12145 int c; 12146 12147 if (lex_p == lex_pend) { 12148 VALUE v = lex_nextline; 12149 lex_nextline = 0; 12150 if (!v) { 12151 if (parser->eofp) 12152 return -1; 12153 12154 if (!lex_input || NIL_P(v = lex_getline(parser))) { 12155 parser->eofp = Qtrue; 12156 lex_goto_eol(parser); 12157 return -1; 12158 } 12159 } 12160 { 12161 #ifdef RIPPER 12162 if (parser->tokp < lex_pend) { 12163 if (NIL_P(parser->delayed)) { 12164 parser->delayed = rb_str_buf_new(1024); 12165 rb_enc_associate(parser->delayed, current_enc); 12166 rb_str_buf_cat(parser->delayed, 12167 parser->tokp, lex_pend - parser->tokp); 12168 parser->delayed_line = ruby_sourceline; 12169 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 12170 } 12171 else { 12172 rb_str_buf_cat(parser->delayed, 12173 parser->tokp, lex_pend - parser->tokp); 12174 } 12175 } 12176 #endif 12177 if (heredoc_end > 0) { 12178 ruby_sourceline = heredoc_end; 12179 heredoc_end = 0; 12180 } 12181 ruby_sourceline++; 12182 parser->line_count++; 12183 lex_pbeg = lex_p = RSTRING_PTR(v); 12184 lex_pend = lex_p + RSTRING_LEN(v); 12185 ripper_flush(parser); 12186 lex_lastline = v; 12187 } 12188 } 12189 c = (unsigned char)*lex_p++; 12190 if (c == '\r' && peek('\n')) { 12191 lex_p++; 12192 c = '\n'; 12193 } 12194 12195 return c; 12196 } 12197 12198 static void 12199 parser_pushback(struct parser_params *parser, int c) 12200 { 12201 if (c == -1) return; 12202 lex_p--; 12203 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 12204 lex_p--; 12205 } 12206 } 12207 12208 #define was_bol() (lex_p == lex_pbeg + 1) 12209 12210 #define tokfix() (tokenbuf[tokidx]='\0') 12211 #define tok() tokenbuf 12212 #define toklen() tokidx 12213 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 12214 12215 static char* 12216 parser_newtok(struct parser_params *parser) 12217 { 12218 tokidx = 0; 12219 tokline = ruby_sourceline; 12220 if (!tokenbuf) { 12221 toksiz = 60; 12222 tokenbuf = ALLOC_N(char, 60); 12223 } 12224 if (toksiz > 4096) { 12225 toksiz = 60; 12226 REALLOC_N(tokenbuf, char, 60); 12227 } 12228 return tokenbuf; 12229 } 12230 12231 static char * 12232 parser_tokspace(struct parser_params *parser, int n) 12233 { 12234 tokidx += n; 12235 12236 if (tokidx >= toksiz) { 12237 do {toksiz *= 2;} while (toksiz < tokidx); 12238 REALLOC_N(tokenbuf, char, toksiz); 12239 } 12240 return &tokenbuf[tokidx-n]; 12241 } 12242 12243 static void 12244 parser_tokadd(struct parser_params *parser, int c) 12245 { 12246 tokenbuf[tokidx++] = (char)c; 12247 if (tokidx >= toksiz) { 12248 toksiz *= 2; 12249 REALLOC_N(tokenbuf, char, toksiz); 12250 } 12251 } 12252 12253 static int 12254 parser_tok_hex(struct parser_params *parser, size_t *numlen) 12255 { 12256 int c; 12257 12258 c = scan_hex(lex_p, 2, numlen); 12259 if (!*numlen) { 12260 yyerror("invalid hex escape"); 12261 return 0; 12262 } 12263 lex_p += *numlen; 12264 return c; 12265 } 12266 12267 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 12268 12269 /* return value is for ?\u3042 */ 12270 static int 12271 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 12272 int string_literal, int symbol_literal, int regexp_literal) 12273 { 12274 /* 12275 * If string_literal is true, then we allow multiple codepoints 12276 * in \u{}, and add the codepoints to the current token. 12277 * Otherwise we're parsing a character literal and return a single 12278 * codepoint without adding it 12279 */ 12280 12281 int codepoint; 12282 size_t numlen; 12283 12284 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 12285 12286 if (peek('{')) { /* handle \u{...} form */ 12287 do { 12288 if (regexp_literal) { tokadd(*lex_p); } 12289 nextc(); 12290 codepoint = scan_hex(lex_p, 6, &numlen); 12291 if (numlen == 0) { 12292 yyerror("invalid Unicode escape"); 12293 return 0; 12294 } 12295 if (codepoint > 0x10ffff) { 12296 yyerror("invalid Unicode codepoint (too large)"); 12297 return 0; 12298 } 12299 lex_p += numlen; 12300 if (regexp_literal) { 12301 tokcopy((int)numlen); 12302 } 12303 else if (codepoint >= 0x80) { 12304 *encp = rb_utf8_encoding(); 12305 if (string_literal) tokaddmbc(codepoint, *encp); 12306 } 12307 else if (string_literal) { 12308 tokadd(codepoint); 12309 } 12310 } while (string_literal && (peek(' ') || peek('\t'))); 12311 12312 if (!peek('}')) { 12313 yyerror("unterminated Unicode escape"); 12314 return 0; 12315 } 12316 12317 if (regexp_literal) { tokadd('}'); } 12318 nextc(); 12319 } 12320 else { /* handle \uxxxx form */ 12321 codepoint = scan_hex(lex_p, 4, &numlen); 12322 if (numlen < 4) { 12323 yyerror("invalid Unicode escape"); 12324 return 0; 12325 } 12326 lex_p += 4; 12327 if (regexp_literal) { 12328 tokcopy(4); 12329 } 12330 else if (codepoint >= 0x80) { 12331 *encp = rb_utf8_encoding(); 12332 if (string_literal) tokaddmbc(codepoint, *encp); 12333 } 12334 else if (string_literal) { 12335 tokadd(codepoint); 12336 } 12337 } 12338 12339 return codepoint; 12340 } 12341 12342 #define ESCAPE_CONTROL 1 12343 #define ESCAPE_META 2 12344 12345 static int 12346 parser_read_escape(struct parser_params *parser, int flags, 12347 rb_encoding **encp) 12348 { 12349 int c; 12350 size_t numlen; 12351 12352 switch (c = nextc()) { 12353 case '\\': /* Backslash */ 12354 return c; 12355 12356 case 'n': /* newline */ 12357 return '\n'; 12358 12359 case 't': /* horizontal tab */ 12360 return '\t'; 12361 12362 case 'r': /* carriage-return */ 12363 return '\r'; 12364 12365 case 'f': /* form-feed */ 12366 return '\f'; 12367 12368 case 'v': /* vertical tab */ 12369 return '\13'; 12370 12371 case 'a': /* alarm(bell) */ 12372 return '\007'; 12373 12374 case 'e': /* escape */ 12375 return 033; 12376 12377 case '0': case '1': case '2': case '3': /* octal constant */ 12378 case '4': case '5': case '6': case '7': 12379 pushback(c); 12380 c = scan_oct(lex_p, 3, &numlen); 12381 lex_p += numlen; 12382 return c; 12383 12384 case 'x': /* hex constant */ 12385 c = tok_hex(&numlen); 12386 if (numlen == 0) return 0; 12387 return c; 12388 12389 case 'b': /* backspace */ 12390 return '\010'; 12391 12392 case 's': /* space */ 12393 return ' '; 12394 12395 case 'M': 12396 if (flags & ESCAPE_META) goto eof; 12397 if ((c = nextc()) != '-') { 12398 pushback(c); 12399 goto eof; 12400 } 12401 if ((c = nextc()) == '\\') { 12402 if (peek('u')) goto eof; 12403 return read_escape(flags|ESCAPE_META, encp) | 0x80; 12404 } 12405 else if (c == -1 || !ISASCII(c)) goto eof; 12406 else { 12407 return ((c & 0xff) | 0x80); 12408 } 12409 12410 case 'C': 12411 if ((c = nextc()) != '-') { 12412 pushback(c); 12413 goto eof; 12414 } 12415 case 'c': 12416 if (flags & ESCAPE_CONTROL) goto eof; 12417 if ((c = nextc())== '\\') { 12418 if (peek('u')) goto eof; 12419 c = read_escape(flags|ESCAPE_CONTROL, encp); 12420 } 12421 else if (c == '?') 12422 return 0177; 12423 else if (c == -1 || !ISASCII(c)) goto eof; 12424 return c & 0x9f; 12425 12426 eof: 12427 case -1: 12428 yyerror("Invalid escape character syntax"); 12429 return '\0'; 12430 12431 default: 12432 return c; 12433 } 12434 } 12435 12436 static void 12437 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 12438 { 12439 int len = rb_enc_codelen(c, enc); 12440 rb_enc_mbcput(c, tokspace(len), enc); 12441 } 12442 12443 static int 12444 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 12445 { 12446 int c; 12447 int flags = 0; 12448 size_t numlen; 12449 12450 first: 12451 switch (c = nextc()) { 12452 case '\n': 12453 return 0; /* just ignore */ 12454 12455 case '0': case '1': case '2': case '3': /* octal constant */ 12456 case '4': case '5': case '6': case '7': 12457 { 12458 ruby_scan_oct(--lex_p, 3, &numlen); 12459 if (numlen == 0) goto eof; 12460 lex_p += numlen; 12461 tokcopy((int)numlen + 1); 12462 } 12463 return 0; 12464 12465 case 'x': /* hex constant */ 12466 { 12467 tok_hex(&numlen); 12468 if (numlen == 0) return -1; 12469 tokcopy((int)numlen + 2); 12470 } 12471 return 0; 12472 12473 case 'M': 12474 if (flags & ESCAPE_META) goto eof; 12475 if ((c = nextc()) != '-') { 12476 pushback(c); 12477 goto eof; 12478 } 12479 tokcopy(3); 12480 flags |= ESCAPE_META; 12481 goto escaped; 12482 12483 case 'C': 12484 if (flags & ESCAPE_CONTROL) goto eof; 12485 if ((c = nextc()) != '-') { 12486 pushback(c); 12487 goto eof; 12488 } 12489 tokcopy(3); 12490 goto escaped; 12491 12492 case 'c': 12493 if (flags & ESCAPE_CONTROL) goto eof; 12494 tokcopy(2); 12495 flags |= ESCAPE_CONTROL; 12496 escaped: 12497 if ((c = nextc()) == '\\') { 12498 goto first; 12499 } 12500 else if (c == -1) goto eof; 12501 tokadd(c); 12502 return 0; 12503 12504 eof: 12505 case -1: 12506 yyerror("Invalid escape character syntax"); 12507 return -1; 12508 12509 default: 12510 tokadd('\\'); 12511 tokadd(c); 12512 } 12513 return 0; 12514 } 12515 12516 static int 12517 parser_regx_options(struct parser_params *parser) 12518 { 12519 int kcode = 0; 12520 int kopt = 0; 12521 int options = 0; 12522 int c, opt, kc; 12523 12524 newtok(); 12525 while (c = nextc(), ISALPHA(c)) { 12526 if (c == 'o') { 12527 options |= RE_OPTION_ONCE; 12528 } 12529 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 12530 if (kc >= 0) { 12531 if (kc != rb_ascii8bit_encindex()) kcode = c; 12532 kopt = opt; 12533 } 12534 else { 12535 options |= opt; 12536 } 12537 } 12538 else { 12539 tokadd(c); 12540 } 12541 } 12542 options |= kopt; 12543 pushback(c); 12544 if (toklen()) { 12545 tokfix(); 12546 compile_error(PARSER_ARG "unknown regexp option%s - %s", 12547 toklen() > 1 ? "s" : "", tok()); 12548 } 12549 return options | RE_OPTION_ENCODING(kcode); 12550 } 12551 12552 static void 12553 dispose_string(VALUE str) 12554 { 12555 rb_str_free(str); 12556 rb_gc_force_recycle(str); 12557 } 12558 12559 static int 12560 parser_tokadd_mbchar(struct parser_params *parser, int c) 12561 { 12562 int len = parser_precise_mbclen(); 12563 if (!MBCLEN_CHARFOUND_P(len)) { 12564 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 12565 return -1; 12566 } 12567 tokadd(c); 12568 lex_p += --len; 12569 if (len > 0) tokcopy(len); 12570 return c; 12571 } 12572 12573 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 12574 12575 static inline int 12576 simple_re_meta(int c) 12577 { 12578 switch (c) { 12579 case '$': case '*': case '+': case '.': 12580 case '?': case '^': case '|': 12581 case ')': case ']': case '}': case '>': 12582 return TRUE; 12583 default: 12584 return FALSE; 12585 } 12586 } 12587 12588 static int 12589 parser_tokadd_string(struct parser_params *parser, 12590 int func, int term, int paren, long *nest, 12591 rb_encoding **encp) 12592 { 12593 int c; 12594 int has_nonascii = 0; 12595 rb_encoding *enc = *encp; 12596 char *errbuf = 0; 12597 static const char mixed_msg[] = "%s mixed within %s source"; 12598 12599 #define mixed_error(enc1, enc2) if (!errbuf) { \ 12600 size_t len = sizeof(mixed_msg) - 4; \ 12601 len += strlen(rb_enc_name(enc1)); \ 12602 len += strlen(rb_enc_name(enc2)); \ 12603 errbuf = ALLOCA_N(char, len); \ 12604 snprintf(errbuf, len, mixed_msg, \ 12605 rb_enc_name(enc1), \ 12606 rb_enc_name(enc2)); \ 12607 yyerror(errbuf); \ 12608 } 12609 #define mixed_escape(beg, enc1, enc2) do { \ 12610 const char *pos = lex_p; \ 12611 lex_p = (beg); \ 12612 mixed_error((enc1), (enc2)); \ 12613 lex_p = pos; \ 12614 } while (0) 12615 12616 while ((c = nextc()) != -1) { 12617 if (paren && c == paren) { 12618 ++*nest; 12619 } 12620 else if (c == term) { 12621 if (!nest || !*nest) { 12622 pushback(c); 12623 break; 12624 } 12625 --*nest; 12626 } 12627 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 12628 int c2 = *lex_p; 12629 if (c2 == '$' || c2 == '@' || c2 == '{') { 12630 pushback(c); 12631 break; 12632 } 12633 } 12634 else if (c == '\\') { 12635 const char *beg = lex_p - 1; 12636 c = nextc(); 12637 switch (c) { 12638 case '\n': 12639 if (func & STR_FUNC_QWORDS) break; 12640 if (func & STR_FUNC_EXPAND) continue; 12641 tokadd('\\'); 12642 break; 12643 12644 case '\\': 12645 if (func & STR_FUNC_ESCAPE) tokadd(c); 12646 break; 12647 12648 case 'u': 12649 if ((func & STR_FUNC_EXPAND) == 0) { 12650 tokadd('\\'); 12651 break; 12652 } 12653 parser_tokadd_utf8(parser, &enc, 1, 12654 func & STR_FUNC_SYMBOL, 12655 func & STR_FUNC_REGEXP); 12656 if (has_nonascii && enc != *encp) { 12657 mixed_escape(beg, enc, *encp); 12658 } 12659 continue; 12660 12661 default: 12662 if (c == -1) return -1; 12663 if (!ISASCII(c)) { 12664 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 12665 goto non_ascii; 12666 } 12667 if (func & STR_FUNC_REGEXP) { 12668 if (c == term && !simple_re_meta(c)) { 12669 tokadd(c); 12670 continue; 12671 } 12672 pushback(c); 12673 if ((c = tokadd_escape(&enc)) < 0) 12674 return -1; 12675 if (has_nonascii && enc != *encp) { 12676 mixed_escape(beg, enc, *encp); 12677 } 12678 continue; 12679 } 12680 else if (func & STR_FUNC_EXPAND) { 12681 pushback(c); 12682 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 12683 c = read_escape(0, &enc); 12684 } 12685 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12686 /* ignore backslashed spaces in %w */ 12687 } 12688 else if (c != term && !(paren && c == paren)) { 12689 tokadd('\\'); 12690 pushback(c); 12691 continue; 12692 } 12693 } 12694 } 12695 else if (!parser_isascii()) { 12696 non_ascii: 12697 has_nonascii = 1; 12698 if (enc != *encp) { 12699 mixed_error(enc, *encp); 12700 continue; 12701 } 12702 if (tokadd_mbchar(c) == -1) return -1; 12703 continue; 12704 } 12705 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12706 pushback(c); 12707 break; 12708 } 12709 if (c & 0x80) { 12710 has_nonascii = 1; 12711 if (enc != *encp) { 12712 mixed_error(enc, *encp); 12713 continue; 12714 } 12715 } 12716 tokadd(c); 12717 } 12718 *encp = enc; 12719 return c; 12720 } 12721 12722 #define NEW_STRTERM(func, term, paren) \ 12723 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 12724 12725 #ifdef RIPPER 12726 static void 12727 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc) 12728 { 12729 if (!NIL_P(parser->delayed)) { 12730 ptrdiff_t len = lex_p - parser->tokp; 12731 if (len > 0) { 12732 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 12733 } 12734 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12735 parser->tokp = lex_p; 12736 } 12737 } 12738 12739 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc)) 12740 #else 12741 #define flush_string_content(enc) ((void)(enc)) 12742 #endif 12743 12744 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32]; 12745 /* this can be shared with ripper, since it's independent from struct 12746 * parser_params. */ 12747 #ifndef RIPPER 12748 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) 12749 #define SPECIAL_PUNCT(idx) ( \ 12750 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \ 12751 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \ 12752 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \ 12753 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \ 12754 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \ 12755 BIT('0', idx)) 12756 const unsigned int ruby_global_name_punct_bits[] = { 12757 SPECIAL_PUNCT(0), 12758 SPECIAL_PUNCT(1), 12759 SPECIAL_PUNCT(2), 12760 }; 12761 #undef BIT 12762 #undef SPECIAL_PUNCT 12763 #endif 12764 12765 static inline int 12766 is_global_name_punct(const char c) 12767 { 12768 if (c <= 0x20 || 0x7e < c) return 0; 12769 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1; 12770 } 12771 12772 static int 12773 parser_peek_variable_name(struct parser_params *parser) 12774 { 12775 int c; 12776 const char *p = lex_p; 12777 12778 if (p + 1 >= lex_pend) return 0; 12779 c = *p++; 12780 switch (c) { 12781 case '$': 12782 if ((c = *p) == '-') { 12783 if (++p >= lex_pend) return 0; 12784 c = *p; 12785 } 12786 else if (is_global_name_punct(c) || ISDIGIT(c)) { 12787 return tSTRING_DVAR; 12788 } 12789 break; 12790 case '@': 12791 if ((c = *p) == '@') { 12792 if (++p >= lex_pend) return 0; 12793 c = *p; 12794 } 12795 break; 12796 case '{': 12797 lex_p = p; 12798 command_start = TRUE; 12799 return tSTRING_DBEG; 12800 default: 12801 return 0; 12802 } 12803 if (!ISASCII(c) || c == '_' || ISALPHA(c)) 12804 return tSTRING_DVAR; 12805 return 0; 12806 } 12807 12808 static int 12809 parser_parse_string(struct parser_params *parser, NODE *quote) 12810 { 12811 int func = (int)quote->nd_func; 12812 int term = nd_term(quote); 12813 int paren = nd_paren(quote); 12814 int c, space = 0; 12815 rb_encoding *enc = current_enc; 12816 12817 if (func == -1) return tSTRING_END; 12818 c = nextc(); 12819 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12820 do {c = nextc();} while (ISSPACE(c)); 12821 space = 1; 12822 } 12823 if (c == term && !quote->nd_nest) { 12824 if (func & STR_FUNC_QWORDS) { 12825 quote->nd_func = -1; 12826 return ' '; 12827 } 12828 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 12829 set_yylval_num(regx_options()); 12830 return tREGEXP_END; 12831 } 12832 if (space) { 12833 pushback(c); 12834 return ' '; 12835 } 12836 newtok(); 12837 if ((func & STR_FUNC_EXPAND) && c == '#') { 12838 int t = parser_peek_variable_name(parser); 12839 if (t) return t; 12840 tokadd('#'); 12841 c = nextc(); 12842 } 12843 pushback(c); 12844 if (tokadd_string(func, term, paren, "e->nd_nest, 12845 &enc) == -1) { 12846 ruby_sourceline = nd_line(quote); 12847 if (func & STR_FUNC_REGEXP) { 12848 if (parser->eofp) 12849 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 12850 return tREGEXP_END; 12851 } 12852 else { 12853 if (parser->eofp) 12854 compile_error(PARSER_ARG "unterminated string meets end of file"); 12855 return tSTRING_END; 12856 } 12857 } 12858 12859 tokfix(); 12860 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12861 flush_string_content(enc); 12862 12863 return tSTRING_CONTENT; 12864 } 12865 12866 static int 12867 parser_heredoc_identifier(struct parser_params *parser) 12868 { 12869 int c = nextc(), term, func = 0; 12870 long len; 12871 12872 if (c == '-') { 12873 c = nextc(); 12874 func = STR_FUNC_INDENT; 12875 } 12876 switch (c) { 12877 case '\'': 12878 func |= str_squote; goto quoted; 12879 case '"': 12880 func |= str_dquote; goto quoted; 12881 case '`': 12882 func |= str_xquote; 12883 quoted: 12884 newtok(); 12885 tokadd(func); 12886 term = c; 12887 while ((c = nextc()) != -1 && c != term) { 12888 if (tokadd_mbchar(c) == -1) return 0; 12889 } 12890 if (c == -1) { 12891 compile_error(PARSER_ARG "unterminated here document identifier"); 12892 return 0; 12893 } 12894 break; 12895 12896 default: 12897 if (!parser_is_identchar()) { 12898 pushback(c); 12899 if (func & STR_FUNC_INDENT) { 12900 pushback('-'); 12901 } 12902 return 0; 12903 } 12904 newtok(); 12905 term = '"'; 12906 tokadd(func |= str_dquote); 12907 do { 12908 if (tokadd_mbchar(c) == -1) return 0; 12909 } while ((c = nextc()) != -1 && parser_is_identchar()); 12910 pushback(c); 12911 break; 12912 } 12913 12914 tokfix(); 12915 #ifdef RIPPER 12916 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 12917 #endif 12918 len = lex_p - lex_pbeg; 12919 lex_goto_eol(parser); 12920 lex_strterm = rb_node_newnode(NODE_HEREDOC, 12921 STR_NEW(tok(), toklen()), /* nd_lit */ 12922 len, /* nd_nth */ 12923 lex_lastline); /* nd_orig */ 12924 nd_set_line(lex_strterm, ruby_sourceline); 12925 ripper_flush(parser); 12926 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 12927 } 12928 12929 static void 12930 parser_heredoc_restore(struct parser_params *parser, NODE *here) 12931 { 12932 VALUE line; 12933 12934 line = here->nd_orig; 12935 lex_lastline = line; 12936 lex_pbeg = RSTRING_PTR(line); 12937 lex_pend = lex_pbeg + RSTRING_LEN(line); 12938 lex_p = lex_pbeg + here->nd_nth; 12939 heredoc_end = ruby_sourceline; 12940 ruby_sourceline = nd_line(here); 12941 dispose_string(here->nd_lit); 12942 rb_gc_force_recycle((VALUE)here); 12943 ripper_flush(parser); 12944 } 12945 12946 static int 12947 parser_whole_match_p(struct parser_params *parser, 12948 const char *eos, long len, int indent) 12949 { 12950 const char *p = lex_pbeg; 12951 long n; 12952 12953 if (indent) { 12954 while (*p && ISSPACE(*p)) p++; 12955 } 12956 n = lex_pend - (p + len); 12957 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 12958 return strncmp(eos, p, len) == 0; 12959 } 12960 12961 #ifdef RIPPER 12962 static void 12963 ripper_dispatch_heredoc_end(struct parser_params *parser) 12964 { 12965 if (!NIL_P(parser->delayed)) 12966 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12967 lex_goto_eol(parser); 12968 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12969 } 12970 12971 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 12972 #else 12973 #define dispatch_heredoc_end() ((void)0) 12974 #endif 12975 12976 static int 12977 parser_here_document(struct parser_params *parser, NODE *here) 12978 { 12979 int c, func, indent = 0; 12980 const char *eos, *p, *pend; 12981 long len; 12982 VALUE str = 0; 12983 rb_encoding *enc = current_enc; 12984 12985 eos = RSTRING_PTR(here->nd_lit); 12986 len = RSTRING_LEN(here->nd_lit) - 1; 12987 indent = (func = *eos++) & STR_FUNC_INDENT; 12988 12989 if ((c = nextc()) == -1) { 12990 error: 12991 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12992 #ifdef RIPPER 12993 if (NIL_P(parser->delayed)) { 12994 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12995 } 12996 else { 12997 if (str || 12998 ((len = lex_p - parser->tokp) > 0 && 12999 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 13000 rb_str_append(parser->delayed, str); 13001 } 13002 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 13003 } 13004 lex_goto_eol(parser); 13005 #endif 13006 restore: 13007 heredoc_restore(lex_strterm); 13008 lex_strterm = 0; 13009 return 0; 13010 } 13011 if (was_bol() && whole_match_p(eos, len, indent)) { 13012 dispatch_heredoc_end(); 13013 heredoc_restore(lex_strterm); 13014 return tSTRING_END; 13015 } 13016 13017 if (!(func & STR_FUNC_EXPAND)) { 13018 do { 13019 p = RSTRING_PTR(lex_lastline); 13020 pend = lex_pend; 13021 if (pend > p) { 13022 switch (pend[-1]) { 13023 case '\n': 13024 if (--pend == p || pend[-1] != '\r') { 13025 pend++; 13026 break; 13027 } 13028 case '\r': 13029 --pend; 13030 } 13031 } 13032 if (str) 13033 rb_str_cat(str, p, pend - p); 13034 else 13035 str = STR_NEW(p, pend - p); 13036 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 13037 lex_goto_eol(parser); 13038 if (nextc() == -1) { 13039 if (str) dispose_string(str); 13040 goto error; 13041 } 13042 } while (!whole_match_p(eos, len, indent)); 13043 } 13044 else { 13045 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 13046 newtok(); 13047 if (c == '#') { 13048 int t = parser_peek_variable_name(parser); 13049 if (t) return t; 13050 tokadd('#'); 13051 c = nextc(); 13052 } 13053 do { 13054 pushback(c); 13055 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 13056 if (parser->eofp) goto error; 13057 goto restore; 13058 } 13059 if (c != '\n') { 13060 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 13061 flush_string_content(enc); 13062 return tSTRING_CONTENT; 13063 } 13064 tokadd(nextc()); 13065 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 13066 if ((c = nextc()) == -1) goto error; 13067 } while (!whole_match_p(eos, len, indent)); 13068 str = STR_NEW3(tok(), toklen(), enc, func); 13069 } 13070 dispatch_heredoc_end(); 13071 heredoc_restore(lex_strterm); 13072 lex_strterm = NEW_STRTERM(-1, 0, 0); 13073 set_yylval_str(str); 13074 return tSTRING_CONTENT; 13075 } 13076 13077 #include "lex.c" 13078 13079 static void 13080 arg_ambiguous_gen(struct parser_params *parser) 13081 { 13082 #ifndef RIPPER 13083 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 13084 #else 13085 dispatch0(arg_ambiguous); 13086 #endif 13087 } 13088 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 13089 13090 static ID 13091 formal_argument_gen(struct parser_params *parser, ID lhs) 13092 { 13093 #ifndef RIPPER 13094 if (!is_local_id(lhs)) 13095 yyerror("formal argument must be local variable"); 13096 #endif 13097 shadowing_lvar(lhs); 13098 return lhs; 13099 } 13100 13101 static int 13102 lvar_defined_gen(struct parser_params *parser, ID id) 13103 { 13104 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 13105 } 13106 13107 /* emacsen -*- hack */ 13108 static long 13109 parser_encode_length(struct parser_params *parser, const char *name, long len) 13110 { 13111 long nlen; 13112 13113 if (len > 5 && name[nlen = len - 5] == '-') { 13114 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 13115 return nlen; 13116 } 13117 if (len > 4 && name[nlen = len - 4] == '-') { 13118 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 13119 return nlen; 13120 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 13121 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 13122 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 13123 return nlen; 13124 } 13125 return len; 13126 } 13127 13128 static void 13129 parser_set_encode(struct parser_params *parser, const char *name) 13130 { 13131 int idx = rb_enc_find_index(name); 13132 rb_encoding *enc; 13133 VALUE excargs[3]; 13134 13135 if (idx < 0) { 13136 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 13137 error: 13138 excargs[0] = rb_eArgError; 13139 excargs[2] = rb_make_backtrace(); 13140 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 13141 rb_exc_raise(rb_make_exception(3, excargs)); 13142 } 13143 enc = rb_enc_from_index(idx); 13144 if (!rb_enc_asciicompat(enc)) { 13145 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 13146 goto error; 13147 } 13148 parser->enc = enc; 13149 #ifndef RIPPER 13150 if (ruby_debug_lines) { 13151 long i, n = RARRAY_LEN(ruby_debug_lines); 13152 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 13153 for (i = 0; i < n; ++i) { 13154 rb_enc_associate_index(*p, idx); 13155 } 13156 } 13157 #endif 13158 } 13159 13160 static int 13161 comment_at_top(struct parser_params *parser) 13162 { 13163 const char *p = lex_pbeg, *pend = lex_p - 1; 13164 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 13165 while (p < pend) { 13166 if (!ISSPACE(*p)) return 0; 13167 p++; 13168 } 13169 return 1; 13170 } 13171 13172 #ifndef RIPPER 13173 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 13174 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 13175 13176 static void 13177 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 13178 { 13179 if (!comment_at_top(parser)) { 13180 return; 13181 } 13182 parser_set_encode(parser, val); 13183 } 13184 13185 static void 13186 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 13187 { 13188 int *p = &parser->parser_token_info_enabled; 13189 13190 switch (*val) { 13191 case 't': case 'T': 13192 if (strcasecmp(val, "true") == 0) { 13193 *p = TRUE; 13194 return; 13195 } 13196 break; 13197 case 'f': case 'F': 13198 if (strcasecmp(val, "false") == 0) { 13199 *p = FALSE; 13200 return; 13201 } 13202 break; 13203 } 13204 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 13205 } 13206 13207 struct magic_comment { 13208 const char *name; 13209 rb_magic_comment_setter_t func; 13210 rb_magic_comment_length_t length; 13211 }; 13212 13213 static const struct magic_comment magic_comments[] = { 13214 {"coding", magic_comment_encoding, parser_encode_length}, 13215 {"encoding", magic_comment_encoding, parser_encode_length}, 13216 {"warn_indent", parser_set_token_info}, 13217 }; 13218 #endif 13219 13220 static const char * 13221 magic_comment_marker(const char *str, long len) 13222 { 13223 long i = 2; 13224 13225 while (i < len) { 13226 switch (str[i]) { 13227 case '-': 13228 if (str[i-1] == '*' && str[i-2] == '-') { 13229 return str + i + 1; 13230 } 13231 i += 2; 13232 break; 13233 case '*': 13234 if (i + 1 >= len) return 0; 13235 if (str[i+1] != '-') { 13236 i += 4; 13237 } 13238 else if (str[i-1] != '-') { 13239 i += 2; 13240 } 13241 else { 13242 return str + i + 2; 13243 } 13244 break; 13245 default: 13246 i += 3; 13247 break; 13248 } 13249 } 13250 return 0; 13251 } 13252 13253 static int 13254 parser_magic_comment(struct parser_params *parser, const char *str, long len) 13255 { 13256 VALUE name = 0, val = 0; 13257 const char *beg, *end, *vbeg, *vend; 13258 #define str_copy(_s, _p, _n) ((_s) \ 13259 ? (void)(rb_str_resize((_s), (_n)), \ 13260 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 13261 : (void)((_s) = STR_NEW((_p), (_n)))) 13262 13263 if (len <= 7) return FALSE; 13264 if (!(beg = magic_comment_marker(str, len))) return FALSE; 13265 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 13266 str = beg; 13267 len = end - beg - 3; 13268 13269 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 13270 while (len > 0) { 13271 #ifndef RIPPER 13272 const struct magic_comment *p = magic_comments; 13273 #endif 13274 char *s; 13275 int i; 13276 long n = 0; 13277 13278 for (; len > 0 && *str; str++, --len) { 13279 switch (*str) { 13280 case '\'': case '"': case ':': case ';': 13281 continue; 13282 } 13283 if (!ISSPACE(*str)) break; 13284 } 13285 for (beg = str; len > 0; str++, --len) { 13286 switch (*str) { 13287 case '\'': case '"': case ':': case ';': 13288 break; 13289 default: 13290 if (ISSPACE(*str)) break; 13291 continue; 13292 } 13293 break; 13294 } 13295 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 13296 if (!len) break; 13297 if (*str != ':') continue; 13298 13299 do str++; while (--len > 0 && ISSPACE(*str)); 13300 if (!len) break; 13301 if (*str == '"') { 13302 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 13303 if (*str == '\\') { 13304 --len; 13305 ++str; 13306 } 13307 } 13308 vend = str; 13309 if (len) { 13310 --len; 13311 ++str; 13312 } 13313 } 13314 else { 13315 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 13316 vend = str; 13317 } 13318 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 13319 13320 n = end - beg; 13321 str_copy(name, beg, n); 13322 s = RSTRING_PTR(name); 13323 for (i = 0; i < n; ++i) { 13324 if (s[i] == '-') s[i] = '_'; 13325 } 13326 #ifndef RIPPER 13327 do { 13328 if (STRNCASECMP(p->name, s, n) == 0) { 13329 n = vend - vbeg; 13330 if (p->length) { 13331 n = (*p->length)(parser, vbeg, n); 13332 } 13333 str_copy(val, vbeg, n); 13334 (*p->func)(parser, s, RSTRING_PTR(val)); 13335 break; 13336 } 13337 } while (++p < magic_comments + numberof(magic_comments)); 13338 #else 13339 str_copy(val, vbeg, vend - vbeg); 13340 dispatch2(magic_comment, name, val); 13341 #endif 13342 } 13343 13344 return TRUE; 13345 } 13346 13347 static void 13348 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 13349 { 13350 int sep = 0; 13351 const char *beg = str; 13352 VALUE s; 13353 13354 for (;;) { 13355 if (send - str <= 6) return; 13356 switch (str[6]) { 13357 case 'C': case 'c': str += 6; continue; 13358 case 'O': case 'o': str += 5; continue; 13359 case 'D': case 'd': str += 4; continue; 13360 case 'I': case 'i': str += 3; continue; 13361 case 'N': case 'n': str += 2; continue; 13362 case 'G': case 'g': str += 1; continue; 13363 case '=': case ':': 13364 sep = 1; 13365 str += 6; 13366 break; 13367 default: 13368 str += 6; 13369 if (ISSPACE(*str)) break; 13370 continue; 13371 } 13372 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 13373 } 13374 for (;;) { 13375 do { 13376 if (++str >= send) return; 13377 } while (ISSPACE(*str)); 13378 if (sep) break; 13379 if (*str != '=' && *str != ':') return; 13380 sep = 1; 13381 str++; 13382 } 13383 beg = str; 13384 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 13385 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 13386 parser_set_encode(parser, RSTRING_PTR(s)); 13387 rb_str_resize(s, 0); 13388 } 13389 13390 static void 13391 parser_prepare(struct parser_params *parser) 13392 { 13393 int c = nextc(); 13394 switch (c) { 13395 case '#': 13396 if (peek('!')) parser->has_shebang = 1; 13397 break; 13398 case 0xef: /* UTF-8 BOM marker */ 13399 if (lex_pend - lex_p >= 2 && 13400 (unsigned char)lex_p[0] == 0xbb && 13401 (unsigned char)lex_p[1] == 0xbf) { 13402 parser->enc = rb_utf8_encoding(); 13403 lex_p += 2; 13404 lex_pbeg = lex_p; 13405 return; 13406 } 13407 break; 13408 case EOF: 13409 return; 13410 } 13411 pushback(c); 13412 parser->enc = rb_enc_get(lex_lastline); 13413 } 13414 13415 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY) 13416 #define IS_END() IS_lex_state(EXPR_END_ANY) 13417 #define IS_BEG() IS_lex_state(EXPR_BEG_ANY) 13418 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 13419 #define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) 13420 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 13421 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) 13422 13423 #ifndef RIPPER 13424 #define ambiguous_operator(op, syn) ( \ 13425 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 13426 rb_warning0("even though it seems like "syn"")) 13427 #else 13428 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 13429 #endif 13430 #define warn_balanced(op, syn) ((void) \ 13431 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \ 13432 space_seen && !ISSPACE(c) && \ 13433 (ambiguous_operator(op, syn), 0))) 13434 13435 static int 13436 parser_yylex(struct parser_params *parser) 13437 { 13438 register int c; 13439 int space_seen = 0; 13440 int cmd_state; 13441 enum lex_state_e last_state; 13442 rb_encoding *enc; 13443 int mb; 13444 #ifdef RIPPER 13445 int fallthru = FALSE; 13446 #endif 13447 13448 if (lex_strterm) { 13449 int token; 13450 if (nd_type(lex_strterm) == NODE_HEREDOC) { 13451 token = here_document(lex_strterm); 13452 if (token == tSTRING_END) { 13453 lex_strterm = 0; 13454 lex_state = EXPR_END; 13455 } 13456 } 13457 else { 13458 token = parse_string(lex_strterm); 13459 if (token == tSTRING_END || token == tREGEXP_END) { 13460 rb_gc_force_recycle((VALUE)lex_strterm); 13461 lex_strterm = 0; 13462 lex_state = EXPR_END; 13463 } 13464 } 13465 return token; 13466 } 13467 cmd_state = command_start; 13468 command_start = FALSE; 13469 retry: 13470 last_state = lex_state; 13471 switch (c = nextc()) { 13472 case '\0': /* NUL */ 13473 case '\004': /* ^D */ 13474 case '\032': /* ^Z */ 13475 case -1: /* end of script. */ 13476 return 0; 13477 13478 /* white spaces */ 13479 case ' ': case '\t': case '\f': case '\r': 13480 case '\13': /* '\v' */ 13481 space_seen = 1; 13482 #ifdef RIPPER 13483 while ((c = nextc())) { 13484 switch (c) { 13485 case ' ': case '\t': case '\f': case '\r': 13486 case '\13': /* '\v' */ 13487 break; 13488 default: 13489 goto outofloop; 13490 } 13491 } 13492 outofloop: 13493 pushback(c); 13494 ripper_dispatch_scan_event(parser, tSP); 13495 #endif 13496 goto retry; 13497 13498 case '#': /* it's a comment */ 13499 /* no magic_comment in shebang line */ 13500 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 13501 if (comment_at_top(parser)) { 13502 set_file_encoding(parser, lex_p, lex_pend); 13503 } 13504 } 13505 lex_p = lex_pend; 13506 #ifdef RIPPER 13507 ripper_dispatch_scan_event(parser, tCOMMENT); 13508 fallthru = TRUE; 13509 #endif 13510 /* fall through */ 13511 case '\n': 13512 if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT)) { 13513 #ifdef RIPPER 13514 if (!fallthru) { 13515 ripper_dispatch_scan_event(parser, tIGNORED_NL); 13516 } 13517 fallthru = FALSE; 13518 #endif 13519 goto retry; 13520 } 13521 while ((c = nextc())) { 13522 switch (c) { 13523 case ' ': case '\t': case '\f': case '\r': 13524 case '\13': /* '\v' */ 13525 space_seen = 1; 13526 break; 13527 case '.': { 13528 if ((c = nextc()) != '.') { 13529 pushback(c); 13530 pushback('.'); 13531 goto retry; 13532 } 13533 } 13534 default: 13535 --ruby_sourceline; 13536 lex_nextline = lex_lastline; 13537 case -1: /* EOF no decrement*/ 13538 lex_goto_eol(parser); 13539 #ifdef RIPPER 13540 if (c != -1) { 13541 parser->tokp = lex_p; 13542 } 13543 #endif 13544 goto normal_newline; 13545 } 13546 } 13547 normal_newline: 13548 command_start = TRUE; 13549 lex_state = EXPR_BEG; 13550 return '\n'; 13551 13552 case '*': 13553 if ((c = nextc()) == '*') { 13554 if ((c = nextc()) == '=') { 13555 set_yylval_id(tPOW); 13556 lex_state = EXPR_BEG; 13557 return tOP_ASGN; 13558 } 13559 pushback(c); 13560 if (IS_SPCARG(c)) { 13561 rb_warning0("`**' interpreted as argument prefix"); 13562 c = tDSTAR; 13563 } 13564 else if (IS_BEG()) { 13565 c = tDSTAR; 13566 } 13567 else { 13568 warn_balanced("**", "argument prefix"); 13569 c = tPOW; 13570 } 13571 } 13572 else { 13573 if (c == '=') { 13574 set_yylval_id('*'); 13575 lex_state = EXPR_BEG; 13576 return tOP_ASGN; 13577 } 13578 pushback(c); 13579 if (IS_SPCARG(c)) { 13580 rb_warning0("`*' interpreted as argument prefix"); 13581 c = tSTAR; 13582 } 13583 else if (IS_BEG()) { 13584 c = tSTAR; 13585 } 13586 else { 13587 warn_balanced("*", "argument prefix"); 13588 c = '*'; 13589 } 13590 } 13591 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13592 return c; 13593 13594 case '!': 13595 c = nextc(); 13596 if (IS_AFTER_OPERATOR()) { 13597 lex_state = EXPR_ARG; 13598 if (c == '@') { 13599 return '!'; 13600 } 13601 } 13602 else { 13603 lex_state = EXPR_BEG; 13604 } 13605 if (c == '=') { 13606 return tNEQ; 13607 } 13608 if (c == '~') { 13609 return tNMATCH; 13610 } 13611 pushback(c); 13612 return '!'; 13613 13614 case '=': 13615 if (was_bol()) { 13616 /* skip embedded rd document */ 13617 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 13618 #ifdef RIPPER 13619 int first_p = TRUE; 13620 13621 lex_goto_eol(parser); 13622 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 13623 #endif 13624 for (;;) { 13625 lex_goto_eol(parser); 13626 #ifdef RIPPER 13627 if (!first_p) { 13628 ripper_dispatch_scan_event(parser, tEMBDOC); 13629 } 13630 first_p = FALSE; 13631 #endif 13632 c = nextc(); 13633 if (c == -1) { 13634 compile_error(PARSER_ARG "embedded document meets end of file"); 13635 return 0; 13636 } 13637 if (c != '=') continue; 13638 if (strncmp(lex_p, "end", 3) == 0 && 13639 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 13640 break; 13641 } 13642 } 13643 lex_goto_eol(parser); 13644 #ifdef RIPPER 13645 ripper_dispatch_scan_event(parser, tEMBDOC_END); 13646 #endif 13647 goto retry; 13648 } 13649 } 13650 13651 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13652 if ((c = nextc()) == '=') { 13653 if ((c = nextc()) == '=') { 13654 return tEQQ; 13655 } 13656 pushback(c); 13657 return tEQ; 13658 } 13659 if (c == '~') { 13660 return tMATCH; 13661 } 13662 else if (c == '>') { 13663 return tASSOC; 13664 } 13665 pushback(c); 13666 return '='; 13667 13668 case '<': 13669 last_state = lex_state; 13670 c = nextc(); 13671 if (c == '<' && 13672 !IS_lex_state(EXPR_DOT | EXPR_CLASS) && 13673 !IS_END() && 13674 (!IS_ARG() || space_seen)) { 13675 int token = heredoc_identifier(); 13676 if (token) return token; 13677 } 13678 if (IS_AFTER_OPERATOR()) { 13679 lex_state = EXPR_ARG; 13680 } 13681 else { 13682 if (IS_lex_state(EXPR_CLASS)) 13683 command_start = TRUE; 13684 lex_state = EXPR_BEG; 13685 } 13686 if (c == '=') { 13687 if ((c = nextc()) == '>') { 13688 return tCMP; 13689 } 13690 pushback(c); 13691 return tLEQ; 13692 } 13693 if (c == '<') { 13694 if ((c = nextc()) == '=') { 13695 set_yylval_id(tLSHFT); 13696 lex_state = EXPR_BEG; 13697 return tOP_ASGN; 13698 } 13699 pushback(c); 13700 warn_balanced("<<", "here document"); 13701 return tLSHFT; 13702 } 13703 pushback(c); 13704 return '<'; 13705 13706 case '>': 13707 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13708 if ((c = nextc()) == '=') { 13709 return tGEQ; 13710 } 13711 if (c == '>') { 13712 if ((c = nextc()) == '=') { 13713 set_yylval_id(tRSHFT); 13714 lex_state = EXPR_BEG; 13715 return tOP_ASGN; 13716 } 13717 pushback(c); 13718 return tRSHFT; 13719 } 13720 pushback(c); 13721 return '>'; 13722 13723 case '"': 13724 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 13725 return tSTRING_BEG; 13726 13727 case '`': 13728 if (IS_lex_state(EXPR_FNAME)) { 13729 lex_state = EXPR_ENDFN; 13730 return c; 13731 } 13732 if (IS_lex_state(EXPR_DOT)) { 13733 if (cmd_state) 13734 lex_state = EXPR_CMDARG; 13735 else 13736 lex_state = EXPR_ARG; 13737 return c; 13738 } 13739 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 13740 return tXSTRING_BEG; 13741 13742 case '\'': 13743 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 13744 return tSTRING_BEG; 13745 13746 case '?': 13747 if (IS_END()) { 13748 lex_state = EXPR_VALUE; 13749 return '?'; 13750 } 13751 c = nextc(); 13752 if (c == -1) { 13753 compile_error(PARSER_ARG "incomplete character syntax"); 13754 return 0; 13755 } 13756 if (rb_enc_isspace(c, current_enc)) { 13757 if (!IS_ARG()) { 13758 int c2 = 0; 13759 switch (c) { 13760 case ' ': 13761 c2 = 's'; 13762 break; 13763 case '\n': 13764 c2 = 'n'; 13765 break; 13766 case '\t': 13767 c2 = 't'; 13768 break; 13769 case '\v': 13770 c2 = 'v'; 13771 break; 13772 case '\r': 13773 c2 = 'r'; 13774 break; 13775 case '\f': 13776 c2 = 'f'; 13777 break; 13778 } 13779 if (c2) { 13780 rb_warnI("invalid character syntax; use ?\\%c", c2); 13781 } 13782 } 13783 ternary: 13784 pushback(c); 13785 lex_state = EXPR_VALUE; 13786 return '?'; 13787 } 13788 newtok(); 13789 enc = current_enc; 13790 if (!parser_isascii()) { 13791 if (tokadd_mbchar(c) == -1) return 0; 13792 } 13793 else if ((rb_enc_isalnum(c, current_enc) || c == '_') && 13794 lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { 13795 goto ternary; 13796 } 13797 else if (c == '\\') { 13798 if (peek('u')) { 13799 nextc(); 13800 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 13801 if (0x80 <= c) { 13802 tokaddmbc(c, enc); 13803 } 13804 else { 13805 tokadd(c); 13806 } 13807 } 13808 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 13809 nextc(); 13810 if (tokadd_mbchar(c) == -1) return 0; 13811 } 13812 else { 13813 c = read_escape(0, &enc); 13814 tokadd(c); 13815 } 13816 } 13817 else { 13818 tokadd(c); 13819 } 13820 tokfix(); 13821 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 13822 lex_state = EXPR_END; 13823 return tCHAR; 13824 13825 case '&': 13826 if ((c = nextc()) == '&') { 13827 lex_state = EXPR_BEG; 13828 if ((c = nextc()) == '=') { 13829 set_yylval_id(tANDOP); 13830 lex_state = EXPR_BEG; 13831 return tOP_ASGN; 13832 } 13833 pushback(c); 13834 return tANDOP; 13835 } 13836 else if (c == '=') { 13837 set_yylval_id('&'); 13838 lex_state = EXPR_BEG; 13839 return tOP_ASGN; 13840 } 13841 pushback(c); 13842 if (IS_SPCARG(c)) { 13843 rb_warning0("`&' interpreted as argument prefix"); 13844 c = tAMPER; 13845 } 13846 else if (IS_BEG()) { 13847 c = tAMPER; 13848 } 13849 else { 13850 warn_balanced("&", "argument prefix"); 13851 c = '&'; 13852 } 13853 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13854 return c; 13855 13856 case '|': 13857 if ((c = nextc()) == '|') { 13858 lex_state = EXPR_BEG; 13859 if ((c = nextc()) == '=') { 13860 set_yylval_id(tOROP); 13861 lex_state = EXPR_BEG; 13862 return tOP_ASGN; 13863 } 13864 pushback(c); 13865 return tOROP; 13866 } 13867 if (c == '=') { 13868 set_yylval_id('|'); 13869 lex_state = EXPR_BEG; 13870 return tOP_ASGN; 13871 } 13872 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13873 pushback(c); 13874 return '|'; 13875 13876 case '+': 13877 c = nextc(); 13878 if (IS_AFTER_OPERATOR()) { 13879 lex_state = EXPR_ARG; 13880 if (c == '@') { 13881 return tUPLUS; 13882 } 13883 pushback(c); 13884 return '+'; 13885 } 13886 if (c == '=') { 13887 set_yylval_id('+'); 13888 lex_state = EXPR_BEG; 13889 return tOP_ASGN; 13890 } 13891 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13892 lex_state = EXPR_BEG; 13893 pushback(c); 13894 if (c != -1 && ISDIGIT(c)) { 13895 c = '+'; 13896 goto start_num; 13897 } 13898 return tUPLUS; 13899 } 13900 lex_state = EXPR_BEG; 13901 pushback(c); 13902 warn_balanced("+", "unary operator"); 13903 return '+'; 13904 13905 case '-': 13906 c = nextc(); 13907 if (IS_AFTER_OPERATOR()) { 13908 lex_state = EXPR_ARG; 13909 if (c == '@') { 13910 return tUMINUS; 13911 } 13912 pushback(c); 13913 return '-'; 13914 } 13915 if (c == '=') { 13916 set_yylval_id('-'); 13917 lex_state = EXPR_BEG; 13918 return tOP_ASGN; 13919 } 13920 if (c == '>') { 13921 lex_state = EXPR_ENDFN; 13922 return tLAMBDA; 13923 } 13924 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13925 lex_state = EXPR_BEG; 13926 pushback(c); 13927 if (c != -1 && ISDIGIT(c)) { 13928 return tUMINUS_NUM; 13929 } 13930 return tUMINUS; 13931 } 13932 lex_state = EXPR_BEG; 13933 pushback(c); 13934 warn_balanced("-", "unary operator"); 13935 return '-'; 13936 13937 case '.': 13938 lex_state = EXPR_BEG; 13939 if ((c = nextc()) == '.') { 13940 if ((c = nextc()) == '.') { 13941 return tDOT3; 13942 } 13943 pushback(c); 13944 return tDOT2; 13945 } 13946 pushback(c); 13947 if (c != -1 && ISDIGIT(c)) { 13948 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13949 } 13950 lex_state = EXPR_DOT; 13951 return '.'; 13952 13953 start_num: 13954 case '0': case '1': case '2': case '3': case '4': 13955 case '5': case '6': case '7': case '8': case '9': 13956 { 13957 int is_float, seen_point, seen_e, nondigit; 13958 13959 is_float = seen_point = seen_e = nondigit = 0; 13960 lex_state = EXPR_END; 13961 newtok(); 13962 if (c == '-' || c == '+') { 13963 tokadd(c); 13964 c = nextc(); 13965 } 13966 if (c == '0') { 13967 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13968 int start = toklen(); 13969 c = nextc(); 13970 if (c == 'x' || c == 'X') { 13971 /* hexadecimal */ 13972 c = nextc(); 13973 if (c != -1 && ISXDIGIT(c)) { 13974 do { 13975 if (c == '_') { 13976 if (nondigit) break; 13977 nondigit = c; 13978 continue; 13979 } 13980 if (!ISXDIGIT(c)) break; 13981 nondigit = 0; 13982 tokadd(c); 13983 } while ((c = nextc()) != -1); 13984 } 13985 pushback(c); 13986 tokfix(); 13987 if (toklen() == start) { 13988 no_digits(); 13989 } 13990 else if (nondigit) goto trailing_uc; 13991 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13992 return tINTEGER; 13993 } 13994 if (c == 'b' || c == 'B') { 13995 /* binary */ 13996 c = nextc(); 13997 if (c == '0' || c == '1') { 13998 do { 13999 if (c == '_') { 14000 if (nondigit) break; 14001 nondigit = c; 14002 continue; 14003 } 14004 if (c != '0' && c != '1') break; 14005 nondigit = 0; 14006 tokadd(c); 14007 } while ((c = nextc()) != -1); 14008 } 14009 pushback(c); 14010 tokfix(); 14011 if (toklen() == start) { 14012 no_digits(); 14013 } 14014 else if (nondigit) goto trailing_uc; 14015 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 14016 return tINTEGER; 14017 } 14018 if (c == 'd' || c == 'D') { 14019 /* decimal */ 14020 c = nextc(); 14021 if (c != -1 && ISDIGIT(c)) { 14022 do { 14023 if (c == '_') { 14024 if (nondigit) break; 14025 nondigit = c; 14026 continue; 14027 } 14028 if (!ISDIGIT(c)) break; 14029 nondigit = 0; 14030 tokadd(c); 14031 } while ((c = nextc()) != -1); 14032 } 14033 pushback(c); 14034 tokfix(); 14035 if (toklen() == start) { 14036 no_digits(); 14037 } 14038 else if (nondigit) goto trailing_uc; 14039 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14040 return tINTEGER; 14041 } 14042 if (c == '_') { 14043 /* 0_0 */ 14044 goto octal_number; 14045 } 14046 if (c == 'o' || c == 'O') { 14047 /* prefixed octal */ 14048 c = nextc(); 14049 if (c == -1 || c == '_' || !ISDIGIT(c)) { 14050 no_digits(); 14051 } 14052 } 14053 if (c >= '0' && c <= '7') { 14054 /* octal */ 14055 octal_number: 14056 do { 14057 if (c == '_') { 14058 if (nondigit) break; 14059 nondigit = c; 14060 continue; 14061 } 14062 if (c < '0' || c > '9') break; 14063 if (c > '7') goto invalid_octal; 14064 nondigit = 0; 14065 tokadd(c); 14066 } while ((c = nextc()) != -1); 14067 if (toklen() > start) { 14068 pushback(c); 14069 tokfix(); 14070 if (nondigit) goto trailing_uc; 14071 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 14072 return tINTEGER; 14073 } 14074 if (nondigit) { 14075 pushback(c); 14076 goto trailing_uc; 14077 } 14078 } 14079 if (c > '7' && c <= '9') { 14080 invalid_octal: 14081 yyerror("Invalid octal digit"); 14082 } 14083 else if (c == '.' || c == 'e' || c == 'E') { 14084 tokadd('0'); 14085 } 14086 else { 14087 pushback(c); 14088 set_yylval_literal(INT2FIX(0)); 14089 return tINTEGER; 14090 } 14091 } 14092 14093 for (;;) { 14094 switch (c) { 14095 case '0': case '1': case '2': case '3': case '4': 14096 case '5': case '6': case '7': case '8': case '9': 14097 nondigit = 0; 14098 tokadd(c); 14099 break; 14100 14101 case '.': 14102 if (nondigit) goto trailing_uc; 14103 if (seen_point || seen_e) { 14104 goto decode_num; 14105 } 14106 else { 14107 int c0 = nextc(); 14108 if (c0 == -1 || !ISDIGIT(c0)) { 14109 pushback(c0); 14110 goto decode_num; 14111 } 14112 c = c0; 14113 } 14114 tokadd('.'); 14115 tokadd(c); 14116 is_float++; 14117 seen_point++; 14118 nondigit = 0; 14119 break; 14120 14121 case 'e': 14122 case 'E': 14123 if (nondigit) { 14124 pushback(c); 14125 c = nondigit; 14126 goto decode_num; 14127 } 14128 if (seen_e) { 14129 goto decode_num; 14130 } 14131 tokadd(c); 14132 seen_e++; 14133 is_float++; 14134 nondigit = c; 14135 c = nextc(); 14136 if (c != '-' && c != '+') continue; 14137 tokadd(c); 14138 nondigit = c; 14139 break; 14140 14141 case '_': /* `_' in number just ignored */ 14142 if (nondigit) goto decode_num; 14143 nondigit = c; 14144 break; 14145 14146 default: 14147 goto decode_num; 14148 } 14149 c = nextc(); 14150 } 14151 14152 decode_num: 14153 pushback(c); 14154 if (nondigit) { 14155 char tmp[30]; 14156 trailing_uc: 14157 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 14158 yyerror(tmp); 14159 } 14160 tokfix(); 14161 if (is_float) { 14162 double d = strtod(tok(), 0); 14163 if (errno == ERANGE) { 14164 rb_warningS("Float %s out of range", tok()); 14165 errno = 0; 14166 } 14167 set_yylval_literal(DBL2NUM(d)); 14168 return tFLOAT; 14169 } 14170 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14171 return tINTEGER; 14172 } 14173 14174 case ')': 14175 case ']': 14176 paren_nest--; 14177 case '}': 14178 COND_LEXPOP(); 14179 CMDARG_LEXPOP(); 14180 if (c == ')') 14181 lex_state = EXPR_ENDFN; 14182 else 14183 lex_state = EXPR_ENDARG; 14184 if (c == '}') { 14185 if (!brace_nest--) c = tSTRING_DEND; 14186 } 14187 return c; 14188 14189 case ':': 14190 c = nextc(); 14191 if (c == ':') { 14192 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) { 14193 lex_state = EXPR_BEG; 14194 return tCOLON3; 14195 } 14196 lex_state = EXPR_DOT; 14197 return tCOLON2; 14198 } 14199 if (IS_END() || ISSPACE(c)) { 14200 pushback(c); 14201 warn_balanced(":", "symbol literal"); 14202 lex_state = EXPR_BEG; 14203 return ':'; 14204 } 14205 switch (c) { 14206 case '\'': 14207 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 14208 break; 14209 case '"': 14210 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 14211 break; 14212 default: 14213 pushback(c); 14214 break; 14215 } 14216 lex_state = EXPR_FNAME; 14217 return tSYMBEG; 14218 14219 case '/': 14220 if (IS_lex_state(EXPR_BEG_ANY)) { 14221 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14222 return tREGEXP_BEG; 14223 } 14224 if ((c = nextc()) == '=') { 14225 set_yylval_id('/'); 14226 lex_state = EXPR_BEG; 14227 return tOP_ASGN; 14228 } 14229 pushback(c); 14230 if (IS_SPCARG(c)) { 14231 (void)arg_ambiguous(); 14232 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14233 return tREGEXP_BEG; 14234 } 14235 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14236 warn_balanced("/", "regexp literal"); 14237 return '/'; 14238 14239 case '^': 14240 if ((c = nextc()) == '=') { 14241 set_yylval_id('^'); 14242 lex_state = EXPR_BEG; 14243 return tOP_ASGN; 14244 } 14245 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14246 pushback(c); 14247 return '^'; 14248 14249 case ';': 14250 lex_state = EXPR_BEG; 14251 command_start = TRUE; 14252 return ';'; 14253 14254 case ',': 14255 lex_state = EXPR_BEG; 14256 return ','; 14257 14258 case '~': 14259 if (IS_AFTER_OPERATOR()) { 14260 if ((c = nextc()) != '@') { 14261 pushback(c); 14262 } 14263 lex_state = EXPR_ARG; 14264 } 14265 else { 14266 lex_state = EXPR_BEG; 14267 } 14268 return '~'; 14269 14270 case '(': 14271 if (IS_BEG()) { 14272 c = tLPAREN; 14273 } 14274 else if (IS_SPCARG(-1)) { 14275 c = tLPAREN_ARG; 14276 } 14277 paren_nest++; 14278 COND_PUSH(0); 14279 CMDARG_PUSH(0); 14280 lex_state = EXPR_BEG; 14281 return c; 14282 14283 case '[': 14284 paren_nest++; 14285 if (IS_AFTER_OPERATOR()) { 14286 lex_state = EXPR_ARG; 14287 if ((c = nextc()) == ']') { 14288 if ((c = nextc()) == '=') { 14289 return tASET; 14290 } 14291 pushback(c); 14292 return tAREF; 14293 } 14294 pushback(c); 14295 return '['; 14296 } 14297 else if (IS_BEG()) { 14298 c = tLBRACK; 14299 } 14300 else if (IS_ARG() && space_seen) { 14301 c = tLBRACK; 14302 } 14303 lex_state = EXPR_BEG; 14304 COND_PUSH(0); 14305 CMDARG_PUSH(0); 14306 return c; 14307 14308 case '{': 14309 ++brace_nest; 14310 if (lpar_beg && lpar_beg == paren_nest) { 14311 lex_state = EXPR_BEG; 14312 lpar_beg = 0; 14313 --paren_nest; 14314 COND_PUSH(0); 14315 CMDARG_PUSH(0); 14316 return tLAMBEG; 14317 } 14318 if (IS_ARG() || IS_lex_state(EXPR_END | EXPR_ENDFN)) 14319 c = '{'; /* block (primary) */ 14320 else if (IS_lex_state(EXPR_ENDARG)) 14321 c = tLBRACE_ARG; /* block (expr) */ 14322 else 14323 c = tLBRACE; /* hash */ 14324 COND_PUSH(0); 14325 CMDARG_PUSH(0); 14326 lex_state = EXPR_BEG; 14327 if (c != tLBRACE) command_start = TRUE; 14328 return c; 14329 14330 case '\\': 14331 c = nextc(); 14332 if (c == '\n') { 14333 space_seen = 1; 14334 #ifdef RIPPER 14335 ripper_dispatch_scan_event(parser, tSP); 14336 #endif 14337 goto retry; /* skip \\n */ 14338 } 14339 pushback(c); 14340 return '\\'; 14341 14342 case '%': 14343 if (IS_lex_state(EXPR_BEG_ANY)) { 14344 int term; 14345 int paren; 14346 14347 c = nextc(); 14348 quotation: 14349 if (c == -1 || !ISALNUM(c)) { 14350 term = c; 14351 c = 'Q'; 14352 } 14353 else { 14354 term = nextc(); 14355 if (rb_enc_isalnum(term, current_enc) || !parser_isascii()) { 14356 yyerror("unknown type of %string"); 14357 return 0; 14358 } 14359 } 14360 if (c == -1 || term == -1) { 14361 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 14362 return 0; 14363 } 14364 paren = term; 14365 if (term == '(') term = ')'; 14366 else if (term == '[') term = ']'; 14367 else if (term == '{') term = '}'; 14368 else if (term == '<') term = '>'; 14369 else paren = 0; 14370 14371 switch (c) { 14372 case 'Q': 14373 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 14374 return tSTRING_BEG; 14375 14376 case 'q': 14377 lex_strterm = NEW_STRTERM(str_squote, term, paren); 14378 return tSTRING_BEG; 14379 14380 case 'W': 14381 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14382 do {c = nextc();} while (ISSPACE(c)); 14383 pushback(c); 14384 return tWORDS_BEG; 14385 14386 case 'w': 14387 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14388 do {c = nextc();} while (ISSPACE(c)); 14389 pushback(c); 14390 return tQWORDS_BEG; 14391 14392 case 'I': 14393 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14394 do {c = nextc();} while (ISSPACE(c)); 14395 pushback(c); 14396 return tSYMBOLS_BEG; 14397 14398 case 'i': 14399 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14400 do {c = nextc();} while (ISSPACE(c)); 14401 pushback(c); 14402 return tQSYMBOLS_BEG; 14403 14404 case 'x': 14405 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 14406 return tXSTRING_BEG; 14407 14408 case 'r': 14409 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 14410 return tREGEXP_BEG; 14411 14412 case 's': 14413 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 14414 lex_state = EXPR_FNAME; 14415 return tSYMBEG; 14416 14417 default: 14418 yyerror("unknown type of %string"); 14419 return 0; 14420 } 14421 } 14422 if ((c = nextc()) == '=') { 14423 set_yylval_id('%'); 14424 lex_state = EXPR_BEG; 14425 return tOP_ASGN; 14426 } 14427 if (IS_SPCARG(c)) { 14428 goto quotation; 14429 } 14430 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14431 pushback(c); 14432 warn_balanced("%%", "string literal"); 14433 return '%'; 14434 14435 case '$': 14436 lex_state = EXPR_END; 14437 newtok(); 14438 c = nextc(); 14439 switch (c) { 14440 case '_': /* $_: last read line string */ 14441 c = nextc(); 14442 if (parser_is_identchar()) { 14443 tokadd('$'); 14444 tokadd('_'); 14445 break; 14446 } 14447 pushback(c); 14448 c = '_'; 14449 /* fall through */ 14450 case '~': /* $~: match-data */ 14451 case '*': /* $*: argv */ 14452 case '$': /* $$: pid */ 14453 case '?': /* $?: last status */ 14454 case '!': /* $!: error string */ 14455 case '@': /* $@: error position */ 14456 case '/': /* $/: input record separator */ 14457 case '\\': /* $\: output record separator */ 14458 case ';': /* $;: field separator */ 14459 case ',': /* $,: output field separator */ 14460 case '.': /* $.: last read line number */ 14461 case '=': /* $=: ignorecase */ 14462 case ':': /* $:: load path */ 14463 case '<': /* $<: reading filename */ 14464 case '>': /* $>: default output handle */ 14465 case '\"': /* $": already loaded files */ 14466 tokadd('$'); 14467 tokadd(c); 14468 tokfix(); 14469 set_yylval_name(rb_intern(tok())); 14470 return tGVAR; 14471 14472 case '-': 14473 tokadd('$'); 14474 tokadd(c); 14475 c = nextc(); 14476 if (parser_is_identchar()) { 14477 if (tokadd_mbchar(c) == -1) return 0; 14478 } 14479 else { 14480 pushback(c); 14481 } 14482 gvar: 14483 tokfix(); 14484 set_yylval_name(rb_intern(tok())); 14485 return tGVAR; 14486 14487 case '&': /* $&: last match */ 14488 case '`': /* $`: string before last match */ 14489 case '\'': /* $': string after last match */ 14490 case '+': /* $+: string matches last paren. */ 14491 if (IS_lex_state_for(last_state, EXPR_FNAME)) { 14492 tokadd('$'); 14493 tokadd(c); 14494 goto gvar; 14495 } 14496 set_yylval_node(NEW_BACK_REF(c)); 14497 return tBACK_REF; 14498 14499 case '1': case '2': case '3': 14500 case '4': case '5': case '6': 14501 case '7': case '8': case '9': 14502 tokadd('$'); 14503 do { 14504 tokadd(c); 14505 c = nextc(); 14506 } while (c != -1 && ISDIGIT(c)); 14507 pushback(c); 14508 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar; 14509 tokfix(); 14510 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 14511 return tNTH_REF; 14512 14513 default: 14514 if (!parser_is_identchar()) { 14515 pushback(c); 14516 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c); 14517 return 0; 14518 } 14519 case '0': 14520 tokadd('$'); 14521 } 14522 break; 14523 14524 case '@': 14525 c = nextc(); 14526 newtok(); 14527 tokadd('@'); 14528 if (c == '@') { 14529 tokadd('@'); 14530 c = nextc(); 14531 } 14532 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) { 14533 pushback(c); 14534 if (tokidx == 1) { 14535 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 14536 } 14537 else { 14538 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 14539 } 14540 return 0; 14541 } 14542 break; 14543 14544 case '_': 14545 if (was_bol() && whole_match_p("__END__", 7, 0)) { 14546 ruby__end__seen = 1; 14547 parser->eofp = Qtrue; 14548 #ifndef RIPPER 14549 return -1; 14550 #else 14551 lex_goto_eol(parser); 14552 ripper_dispatch_scan_event(parser, k__END__); 14553 return 0; 14554 #endif 14555 } 14556 newtok(); 14557 break; 14558 14559 default: 14560 if (!parser_is_identchar()) { 14561 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 14562 goto retry; 14563 } 14564 14565 newtok(); 14566 break; 14567 } 14568 14569 mb = ENC_CODERANGE_7BIT; 14570 do { 14571 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 14572 if (tokadd_mbchar(c) == -1) return 0; 14573 c = nextc(); 14574 } while (parser_is_identchar()); 14575 switch (tok()[0]) { 14576 case '@': case '$': 14577 pushback(c); 14578 break; 14579 default: 14580 if ((c == '!' || c == '?') && !peek('=')) { 14581 tokadd(c); 14582 } 14583 else { 14584 pushback(c); 14585 } 14586 } 14587 tokfix(); 14588 14589 { 14590 int result = 0; 14591 14592 last_state = lex_state; 14593 switch (tok()[0]) { 14594 case '$': 14595 lex_state = EXPR_END; 14596 result = tGVAR; 14597 break; 14598 case '@': 14599 lex_state = EXPR_END; 14600 if (tok()[1] == '@') 14601 result = tCVAR; 14602 else 14603 result = tIVAR; 14604 break; 14605 14606 default: 14607 if (toklast() == '!' || toklast() == '?') { 14608 result = tFID; 14609 } 14610 else { 14611 if (IS_lex_state(EXPR_FNAME)) { 14612 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 14613 (!peek('=') || (peek_n('>', 1)))) { 14614 result = tIDENTIFIER; 14615 tokadd(c); 14616 tokfix(); 14617 } 14618 else { 14619 pushback(c); 14620 } 14621 } 14622 if (result == 0 && ISUPPER(tok()[0])) { 14623 result = tCONSTANT; 14624 } 14625 else { 14626 result = tIDENTIFIER; 14627 } 14628 } 14629 14630 if (IS_LABEL_POSSIBLE()) { 14631 if (IS_LABEL_SUFFIX(0)) { 14632 lex_state = EXPR_BEG; 14633 nextc(); 14634 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 14635 return tLABEL; 14636 } 14637 } 14638 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) { 14639 const struct kwtable *kw; 14640 14641 /* See if it is a reserved word. */ 14642 kw = rb_reserved_word(tok(), toklen()); 14643 if (kw) { 14644 enum lex_state_e state = lex_state; 14645 lex_state = kw->state; 14646 if (state == EXPR_FNAME) { 14647 set_yylval_name(rb_intern(kw->name)); 14648 return kw->id[0]; 14649 } 14650 if (lex_state == EXPR_BEG) { 14651 command_start = TRUE; 14652 } 14653 if (kw->id[0] == keyword_do) { 14654 if (lpar_beg && lpar_beg == paren_nest) { 14655 lpar_beg = 0; 14656 --paren_nest; 14657 return keyword_do_LAMBDA; 14658 } 14659 if (COND_P()) return keyword_do_cond; 14660 if (CMDARG_P() && state != EXPR_CMDARG) 14661 return keyword_do_block; 14662 if (state & (EXPR_BEG | EXPR_ENDARG)) 14663 return keyword_do_block; 14664 return keyword_do; 14665 } 14666 if (state & (EXPR_BEG | EXPR_VALUE)) 14667 return kw->id[0]; 14668 else { 14669 if (kw->id[0] != kw->id[1]) 14670 lex_state = EXPR_BEG; 14671 return kw->id[1]; 14672 } 14673 } 14674 } 14675 14676 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) { 14677 if (cmd_state) { 14678 lex_state = EXPR_CMDARG; 14679 } 14680 else { 14681 lex_state = EXPR_ARG; 14682 } 14683 } 14684 else if (lex_state == EXPR_FNAME) { 14685 lex_state = EXPR_ENDFN; 14686 } 14687 else { 14688 lex_state = EXPR_END; 14689 } 14690 } 14691 { 14692 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 14693 14694 set_yylval_name(ident); 14695 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && 14696 is_local_id(ident) && lvar_defined(ident)) { 14697 lex_state = EXPR_END; 14698 } 14699 } 14700 return result; 14701 } 14702 } 14703 14704 #if YYPURE 14705 static int 14706 yylex(void *lval, void *p) 14707 #else 14708 yylex(void *p) 14709 #endif 14710 { 14711 struct parser_params *parser = (struct parser_params*)p; 14712 int t; 14713 14714 #if YYPURE 14715 parser->parser_yylval = lval; 14716 parser->parser_yylval->val = Qundef; 14717 #endif 14718 t = parser_yylex(parser); 14719 #ifdef RIPPER 14720 if (!NIL_P(parser->delayed)) { 14721 ripper_dispatch_delayed_token(parser, t); 14722 return t; 14723 } 14724 if (t != 0) 14725 ripper_dispatch_scan_event(parser, t); 14726 #endif 14727 14728 return t; 14729 } 14730 14731 #ifndef RIPPER 14732 static NODE* 14733 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 14734 { 14735 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 14736 nd_set_line(n, ruby_sourceline); 14737 return n; 14738 } 14739 14740 static enum node_type 14741 nodetype(NODE *node) /* for debug */ 14742 { 14743 return (enum node_type)nd_type(node); 14744 } 14745 14746 static int 14747 nodeline(NODE *node) 14748 { 14749 return nd_line(node); 14750 } 14751 14752 static NODE* 14753 newline_node(NODE *node) 14754 { 14755 if (node) { 14756 node = remove_begin(node); 14757 node->flags |= NODE_FL_NEWLINE; 14758 } 14759 return node; 14760 } 14761 14762 static void 14763 fixpos(NODE *node, NODE *orig) 14764 { 14765 if (!node) return; 14766 if (!orig) return; 14767 if (orig == (NODE*)1) return; 14768 nd_set_line(node, nd_line(orig)); 14769 } 14770 14771 static void 14772 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 14773 { 14774 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 14775 } 14776 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 14777 14778 static void 14779 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 14780 { 14781 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 14782 } 14783 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 14784 14785 static NODE* 14786 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 14787 { 14788 NODE *end, *h = head, *nd; 14789 14790 if (tail == 0) return head; 14791 14792 if (h == 0) return tail; 14793 switch (nd_type(h)) { 14794 case NODE_LIT: 14795 case NODE_STR: 14796 case NODE_SELF: 14797 case NODE_TRUE: 14798 case NODE_FALSE: 14799 case NODE_NIL: 14800 parser_warning(h, "unused literal ignored"); 14801 return tail; 14802 default: 14803 h = end = NEW_BLOCK(head); 14804 end->nd_end = end; 14805 fixpos(end, head); 14806 head = end; 14807 break; 14808 case NODE_BLOCK: 14809 end = h->nd_end; 14810 break; 14811 } 14812 14813 nd = end->nd_head; 14814 switch (nd_type(nd)) { 14815 case NODE_RETURN: 14816 case NODE_BREAK: 14817 case NODE_NEXT: 14818 case NODE_REDO: 14819 case NODE_RETRY: 14820 if (RTEST(ruby_verbose)) { 14821 parser_warning(tail, "statement not reached"); 14822 } 14823 break; 14824 14825 default: 14826 break; 14827 } 14828 14829 if (nd_type(tail) != NODE_BLOCK) { 14830 tail = NEW_BLOCK(tail); 14831 tail->nd_end = tail; 14832 } 14833 end->nd_next = tail; 14834 h->nd_end = tail->nd_end; 14835 return head; 14836 } 14837 14838 /* append item to the list */ 14839 static NODE* 14840 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 14841 { 14842 NODE *last; 14843 14844 if (list == 0) return NEW_LIST(item); 14845 if (list->nd_next) { 14846 last = list->nd_next->nd_end; 14847 } 14848 else { 14849 last = list; 14850 } 14851 14852 list->nd_alen += 1; 14853 last->nd_next = NEW_LIST(item); 14854 list->nd_next->nd_end = last->nd_next; 14855 return list; 14856 } 14857 14858 /* concat two lists */ 14859 static NODE* 14860 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14861 { 14862 NODE *last; 14863 14864 if (head->nd_next) { 14865 last = head->nd_next->nd_end; 14866 } 14867 else { 14868 last = head; 14869 } 14870 14871 head->nd_alen += tail->nd_alen; 14872 last->nd_next = tail; 14873 if (tail->nd_next) { 14874 head->nd_next->nd_end = tail->nd_next->nd_end; 14875 } 14876 else { 14877 head->nd_next->nd_end = tail; 14878 } 14879 14880 return head; 14881 } 14882 14883 static int 14884 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 14885 { 14886 if (NIL_P(tail)) return 1; 14887 if (!rb_enc_compatible(head, tail)) { 14888 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 14889 rb_enc_name(rb_enc_get(head)), 14890 rb_enc_name(rb_enc_get(tail))); 14891 rb_str_resize(head, 0); 14892 rb_str_resize(tail, 0); 14893 return 0; 14894 } 14895 rb_str_buf_append(head, tail); 14896 return 1; 14897 } 14898 14899 /* concat two string literals */ 14900 static NODE * 14901 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14902 { 14903 enum node_type htype; 14904 NODE *headlast; 14905 VALUE lit; 14906 14907 if (!head) return tail; 14908 if (!tail) return head; 14909 14910 htype = nd_type(head); 14911 if (htype == NODE_EVSTR) { 14912 NODE *node = NEW_DSTR(Qnil); 14913 head = list_append(node, head); 14914 htype = NODE_DSTR; 14915 } 14916 switch (nd_type(tail)) { 14917 case NODE_STR: 14918 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14919 nd_type(headlast) == NODE_STR) { 14920 htype = NODE_STR; 14921 lit = headlast->nd_lit; 14922 } 14923 else { 14924 lit = head->nd_lit; 14925 } 14926 if (htype == NODE_STR) { 14927 if (!literal_concat0(parser, lit, tail->nd_lit)) { 14928 error: 14929 rb_gc_force_recycle((VALUE)head); 14930 rb_gc_force_recycle((VALUE)tail); 14931 return 0; 14932 } 14933 rb_gc_force_recycle((VALUE)tail); 14934 } 14935 else { 14936 list_append(head, tail); 14937 } 14938 break; 14939 14940 case NODE_DSTR: 14941 if (htype == NODE_STR) { 14942 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 14943 goto error; 14944 tail->nd_lit = head->nd_lit; 14945 rb_gc_force_recycle((VALUE)head); 14946 head = tail; 14947 } 14948 else if (NIL_P(tail->nd_lit)) { 14949 append: 14950 head->nd_alen += tail->nd_alen - 1; 14951 head->nd_next->nd_end->nd_next = tail->nd_next; 14952 head->nd_next->nd_end = tail->nd_next->nd_end; 14953 rb_gc_force_recycle((VALUE)tail); 14954 } 14955 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14956 nd_type(headlast) == NODE_STR) { 14957 lit = headlast->nd_lit; 14958 if (!literal_concat0(parser, lit, tail->nd_lit)) 14959 goto error; 14960 tail->nd_lit = Qnil; 14961 goto append; 14962 } 14963 else { 14964 nd_set_type(tail, NODE_ARRAY); 14965 tail->nd_head = NEW_STR(tail->nd_lit); 14966 list_concat(head, tail); 14967 } 14968 break; 14969 14970 case NODE_EVSTR: 14971 if (htype == NODE_STR) { 14972 nd_set_type(head, NODE_DSTR); 14973 head->nd_alen = 1; 14974 } 14975 list_append(head, tail); 14976 break; 14977 } 14978 return head; 14979 } 14980 14981 static NODE * 14982 evstr2dstr_gen(struct parser_params *parser, NODE *node) 14983 { 14984 if (nd_type(node) == NODE_EVSTR) { 14985 node = list_append(NEW_DSTR(Qnil), node); 14986 } 14987 return node; 14988 } 14989 14990 static NODE * 14991 new_evstr_gen(struct parser_params *parser, NODE *node) 14992 { 14993 NODE *head = node; 14994 14995 if (node) { 14996 switch (nd_type(node)) { 14997 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 14998 return node; 14999 } 15000 } 15001 return NEW_EVSTR(head); 15002 } 15003 15004 static NODE * 15005 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 15006 { 15007 value_expr(recv); 15008 value_expr(arg1); 15009 return NEW_CALL(recv, id, NEW_LIST(arg1)); 15010 } 15011 15012 static NODE * 15013 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 15014 { 15015 value_expr(recv); 15016 return NEW_CALL(recv, id, 0); 15017 } 15018 15019 static NODE* 15020 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15021 { 15022 value_expr(node1); 15023 value_expr(node2); 15024 if (node1) { 15025 switch (nd_type(node1)) { 15026 case NODE_DREGX: 15027 case NODE_DREGX_ONCE: 15028 return NEW_MATCH2(node1, node2); 15029 15030 case NODE_LIT: 15031 if (RB_TYPE_P(node1->nd_lit, T_REGEXP)) { 15032 return NEW_MATCH2(node1, node2); 15033 } 15034 } 15035 } 15036 15037 if (node2) { 15038 switch (nd_type(node2)) { 15039 case NODE_DREGX: 15040 case NODE_DREGX_ONCE: 15041 return NEW_MATCH3(node2, node1); 15042 15043 case NODE_LIT: 15044 if (RB_TYPE_P(node2->nd_lit, T_REGEXP)) { 15045 return NEW_MATCH3(node2, node1); 15046 } 15047 } 15048 } 15049 15050 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 15051 } 15052 15053 static NODE* 15054 gettable_gen(struct parser_params *parser, ID id) 15055 { 15056 switch (id) { 15057 case keyword_self: 15058 return NEW_SELF(); 15059 case keyword_nil: 15060 return NEW_NIL(); 15061 case keyword_true: 15062 return NEW_TRUE(); 15063 case keyword_false: 15064 return NEW_FALSE(); 15065 case keyword__FILE__: 15066 return NEW_STR(rb_str_dup(ruby_sourcefile_string)); 15067 case keyword__LINE__: 15068 return NEW_LIT(INT2FIX(tokline)); 15069 case keyword__ENCODING__: 15070 return NEW_LIT(rb_enc_from_encoding(current_enc)); 15071 } 15072 switch (id_type(id)) { 15073 case ID_LOCAL: 15074 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 15075 if (local_id(id)) return NEW_LVAR(id); 15076 /* method call without arguments */ 15077 return NEW_VCALL(id); 15078 case ID_GLOBAL: 15079 return NEW_GVAR(id); 15080 case ID_INSTANCE: 15081 return NEW_IVAR(id); 15082 case ID_CONST: 15083 return NEW_CONST(id); 15084 case ID_CLASS: 15085 return NEW_CVAR(id); 15086 } 15087 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15088 return 0; 15089 } 15090 #else /* !RIPPER */ 15091 static int 15092 id_is_var_gen(struct parser_params *parser, ID id) 15093 { 15094 if (is_notop_id(id)) { 15095 switch (id & ID_SCOPE_MASK) { 15096 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 15097 return 1; 15098 case ID_LOCAL: 15099 if (dyna_in_block() && dvar_defined(id)) return 1; 15100 if (local_id(id)) return 1; 15101 /* method call without arguments */ 15102 return 0; 15103 } 15104 } 15105 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15106 return 0; 15107 } 15108 #endif /* !RIPPER */ 15109 15110 #if PARSER_DEBUG 15111 static const char * 15112 lex_state_name(enum lex_state_e state) 15113 { 15114 static const char names[][12] = { 15115 "EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG", 15116 "EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS", 15117 "EXPR_VALUE", 15118 }; 15119 15120 if ((unsigned)state & ~(~0u << EXPR_MAX_STATE)) 15121 return names[ffs(state)]; 15122 return NULL; 15123 } 15124 #endif 15125 15126 #ifdef RIPPER 15127 static VALUE 15128 assignable_gen(struct parser_params *parser, VALUE lhs) 15129 #else 15130 static NODE* 15131 assignable_gen(struct parser_params *parser, ID id, NODE *val) 15132 #endif 15133 { 15134 #ifdef RIPPER 15135 ID id = get_id(lhs); 15136 # define assignable_result(x) get_value(lhs) 15137 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 15138 #else 15139 # define assignable_result(x) (x) 15140 #endif 15141 if (!id) return assignable_result(0); 15142 switch (id) { 15143 case keyword_self: 15144 yyerror("Can't change the value of self"); 15145 goto error; 15146 case keyword_nil: 15147 yyerror("Can't assign to nil"); 15148 goto error; 15149 case keyword_true: 15150 yyerror("Can't assign to true"); 15151 goto error; 15152 case keyword_false: 15153 yyerror("Can't assign to false"); 15154 goto error; 15155 case keyword__FILE__: 15156 yyerror("Can't assign to __FILE__"); 15157 goto error; 15158 case keyword__LINE__: 15159 yyerror("Can't assign to __LINE__"); 15160 goto error; 15161 case keyword__ENCODING__: 15162 yyerror("Can't assign to __ENCODING__"); 15163 goto error; 15164 } 15165 switch (id_type(id)) { 15166 case ID_LOCAL: 15167 if (dyna_in_block()) { 15168 if (dvar_curr(id)) { 15169 return assignable_result(NEW_DASGN_CURR(id, val)); 15170 } 15171 else if (dvar_defined(id)) { 15172 return assignable_result(NEW_DASGN(id, val)); 15173 } 15174 else if (local_id(id)) { 15175 return assignable_result(NEW_LASGN(id, val)); 15176 } 15177 else { 15178 dyna_var(id); 15179 return assignable_result(NEW_DASGN_CURR(id, val)); 15180 } 15181 } 15182 else { 15183 if (!local_id(id)) { 15184 local_var(id); 15185 } 15186 return assignable_result(NEW_LASGN(id, val)); 15187 } 15188 break; 15189 case ID_GLOBAL: 15190 return assignable_result(NEW_GASGN(id, val)); 15191 case ID_INSTANCE: 15192 return assignable_result(NEW_IASGN(id, val)); 15193 case ID_CONST: 15194 if (!in_def && !in_single) 15195 return assignable_result(NEW_CDECL(id, val, 0)); 15196 yyerror("dynamic constant assignment"); 15197 break; 15198 case ID_CLASS: 15199 return assignable_result(NEW_CVASGN(id, val)); 15200 default: 15201 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 15202 } 15203 error: 15204 return assignable_result(0); 15205 #undef assignable_result 15206 #undef parser_yyerror 15207 } 15208 15209 static int 15210 is_private_local_id(ID name) 15211 { 15212 VALUE s; 15213 if (name == idUScore) return 1; 15214 if (!is_local_id(name)) return 0; 15215 s = rb_id2str(name); 15216 if (!s) return 0; 15217 return RSTRING_PTR(s)[0] == '_'; 15218 } 15219 15220 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) 15221 15222 static ID 15223 shadowing_lvar_gen(struct parser_params *parser, ID name) 15224 { 15225 if (is_private_local_id(name)) return name; 15226 if (dyna_in_block()) { 15227 if (dvar_curr(name)) { 15228 yyerror("duplicated argument name"); 15229 } 15230 else if (dvar_defined_get(name) || local_id(name)) { 15231 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 15232 vtable_add(lvtbl->vars, name); 15233 if (lvtbl->used) { 15234 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 15235 } 15236 } 15237 } 15238 else { 15239 if (local_id(name)) { 15240 yyerror("duplicated argument name"); 15241 } 15242 } 15243 return name; 15244 } 15245 15246 static void 15247 new_bv_gen(struct parser_params *parser, ID name) 15248 { 15249 if (!name) return; 15250 if (!is_local_id(name)) { 15251 compile_error(PARSER_ARG "invalid local variable - %s", 15252 rb_id2name(name)); 15253 return; 15254 } 15255 shadowing_lvar(name); 15256 dyna_var(name); 15257 } 15258 15259 #ifndef RIPPER 15260 static NODE * 15261 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 15262 { 15263 if (recv && nd_type(recv) == NODE_SELF) 15264 recv = (NODE *)1; 15265 return NEW_ATTRASGN(recv, tASET, idx); 15266 } 15267 15268 static void 15269 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15270 { 15271 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 15272 compile_error(PARSER_ARG "both block arg and actual block given"); 15273 } 15274 } 15275 15276 static const char id_type_names[][9] = { 15277 "LOCAL", 15278 "INSTANCE", 15279 "", /* INSTANCE2 */ 15280 "GLOBAL", 15281 "ATTRSET", 15282 "CONST", 15283 "CLASS", 15284 "JUNK", 15285 }; 15286 15287 ID 15288 rb_id_attrset(ID id) 15289 { 15290 if (!is_notop_id(id)) { 15291 switch (id) { 15292 case tAREF: case tASET: 15293 return tASET; /* only exception */ 15294 } 15295 rb_name_error(id, "cannot make operator ID :%s attrset", rb_id2name(id)); 15296 } 15297 else { 15298 int scope = (int)(id & ID_SCOPE_MASK); 15299 switch (scope) { 15300 case ID_LOCAL: case ID_INSTANCE: case ID_GLOBAL: 15301 case ID_CONST: case ID_CLASS: case ID_JUNK: 15302 break; 15303 case ID_ATTRSET: 15304 return id; 15305 default: 15306 rb_name_error(id, "cannot make %s ID %+"PRIsVALUE" attrset", 15307 id_type_names[scope], ID2SYM(id)); 15308 15309 } 15310 } 15311 id &= ~ID_SCOPE_MASK; 15312 id |= ID_ATTRSET; 15313 return id; 15314 } 15315 15316 static NODE * 15317 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 15318 { 15319 if (recv && nd_type(recv) == NODE_SELF) 15320 recv = (NODE *)1; 15321 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 15322 } 15323 15324 static void 15325 rb_backref_error_gen(struct parser_params *parser, NODE *node) 15326 { 15327 switch (nd_type(node)) { 15328 case NODE_NTH_REF: 15329 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 15330 break; 15331 case NODE_BACK_REF: 15332 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 15333 break; 15334 } 15335 } 15336 15337 static NODE * 15338 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15339 { 15340 if (!node2) return node1; 15341 switch (nd_type(node1)) { 15342 case NODE_BLOCK_PASS: 15343 if (node1->nd_head) 15344 node1->nd_head = arg_concat(node1->nd_head, node2); 15345 else 15346 node1->nd_head = NEW_LIST(node2); 15347 return node1; 15348 case NODE_ARGSPUSH: 15349 if (nd_type(node2) != NODE_ARRAY) break; 15350 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 15351 nd_set_type(node1, NODE_ARGSCAT); 15352 return node1; 15353 case NODE_ARGSCAT: 15354 if (nd_type(node2) != NODE_ARRAY || 15355 nd_type(node1->nd_body) != NODE_ARRAY) break; 15356 node1->nd_body = list_concat(node1->nd_body, node2); 15357 return node1; 15358 } 15359 return NEW_ARGSCAT(node1, node2); 15360 } 15361 15362 static NODE * 15363 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15364 { 15365 if (!node1) return NEW_LIST(node2); 15366 switch (nd_type(node1)) { 15367 case NODE_ARRAY: 15368 return list_append(node1, node2); 15369 case NODE_BLOCK_PASS: 15370 node1->nd_head = arg_append(node1->nd_head, node2); 15371 return node1; 15372 case NODE_ARGSPUSH: 15373 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 15374 nd_set_type(node1, NODE_ARGSCAT); 15375 return node1; 15376 } 15377 return NEW_ARGSPUSH(node1, node2); 15378 } 15379 15380 static NODE * 15381 splat_array(NODE* node) 15382 { 15383 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 15384 if (nd_type(node) == NODE_ARRAY) return node; 15385 return 0; 15386 } 15387 15388 static NODE * 15389 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 15390 { 15391 if (!lhs) return 0; 15392 15393 switch (nd_type(lhs)) { 15394 case NODE_GASGN: 15395 case NODE_IASGN: 15396 case NODE_IASGN2: 15397 case NODE_LASGN: 15398 case NODE_DASGN: 15399 case NODE_DASGN_CURR: 15400 case NODE_MASGN: 15401 case NODE_CDECL: 15402 case NODE_CVASGN: 15403 lhs->nd_value = rhs; 15404 break; 15405 15406 case NODE_ATTRASGN: 15407 case NODE_CALL: 15408 lhs->nd_args = arg_append(lhs->nd_args, rhs); 15409 break; 15410 15411 default: 15412 /* should not happen */ 15413 break; 15414 } 15415 15416 return lhs; 15417 } 15418 15419 static int 15420 value_expr_gen(struct parser_params *parser, NODE *node) 15421 { 15422 int cond = 0; 15423 15424 if (!node) { 15425 rb_warning0("empty expression"); 15426 } 15427 while (node) { 15428 switch (nd_type(node)) { 15429 case NODE_DEFN: 15430 case NODE_DEFS: 15431 parser_warning(node, "void value expression"); 15432 return FALSE; 15433 15434 case NODE_RETURN: 15435 case NODE_BREAK: 15436 case NODE_NEXT: 15437 case NODE_REDO: 15438 case NODE_RETRY: 15439 if (!cond) yyerror("void value expression"); 15440 /* or "control never reach"? */ 15441 return FALSE; 15442 15443 case NODE_BLOCK: 15444 while (node->nd_next) { 15445 node = node->nd_next; 15446 } 15447 node = node->nd_head; 15448 break; 15449 15450 case NODE_BEGIN: 15451 node = node->nd_body; 15452 break; 15453 15454 case NODE_IF: 15455 if (!node->nd_body) { 15456 node = node->nd_else; 15457 break; 15458 } 15459 else if (!node->nd_else) { 15460 node = node->nd_body; 15461 break; 15462 } 15463 if (!value_expr(node->nd_body)) return FALSE; 15464 node = node->nd_else; 15465 break; 15466 15467 case NODE_AND: 15468 case NODE_OR: 15469 cond = 1; 15470 node = node->nd_2nd; 15471 break; 15472 15473 default: 15474 return TRUE; 15475 } 15476 } 15477 15478 return TRUE; 15479 } 15480 15481 static void 15482 void_expr_gen(struct parser_params *parser, NODE *node) 15483 { 15484 const char *useless = 0; 15485 15486 if (!RTEST(ruby_verbose)) return; 15487 15488 if (!node) return; 15489 switch (nd_type(node)) { 15490 case NODE_CALL: 15491 switch (node->nd_mid) { 15492 case '+': 15493 case '-': 15494 case '*': 15495 case '/': 15496 case '%': 15497 case tPOW: 15498 case tUPLUS: 15499 case tUMINUS: 15500 case '|': 15501 case '^': 15502 case '&': 15503 case tCMP: 15504 case '>': 15505 case tGEQ: 15506 case '<': 15507 case tLEQ: 15508 case tEQ: 15509 case tNEQ: 15510 useless = rb_id2name(node->nd_mid); 15511 break; 15512 } 15513 break; 15514 15515 case NODE_LVAR: 15516 case NODE_DVAR: 15517 case NODE_GVAR: 15518 case NODE_IVAR: 15519 case NODE_CVAR: 15520 case NODE_NTH_REF: 15521 case NODE_BACK_REF: 15522 useless = "a variable"; 15523 break; 15524 case NODE_CONST: 15525 useless = "a constant"; 15526 break; 15527 case NODE_LIT: 15528 case NODE_STR: 15529 case NODE_DSTR: 15530 case NODE_DREGX: 15531 case NODE_DREGX_ONCE: 15532 useless = "a literal"; 15533 break; 15534 case NODE_COLON2: 15535 case NODE_COLON3: 15536 useless = "::"; 15537 break; 15538 case NODE_DOT2: 15539 useless = ".."; 15540 break; 15541 case NODE_DOT3: 15542 useless = "..."; 15543 break; 15544 case NODE_SELF: 15545 useless = "self"; 15546 break; 15547 case NODE_NIL: 15548 useless = "nil"; 15549 break; 15550 case NODE_TRUE: 15551 useless = "true"; 15552 break; 15553 case NODE_FALSE: 15554 useless = "false"; 15555 break; 15556 case NODE_DEFINED: 15557 useless = "defined?"; 15558 break; 15559 } 15560 15561 if (useless) { 15562 int line = ruby_sourceline; 15563 15564 ruby_sourceline = nd_line(node); 15565 rb_warnS("possibly useless use of %s in void context", useless); 15566 ruby_sourceline = line; 15567 } 15568 } 15569 15570 static void 15571 void_stmts_gen(struct parser_params *parser, NODE *node) 15572 { 15573 if (!RTEST(ruby_verbose)) return; 15574 if (!node) return; 15575 if (nd_type(node) != NODE_BLOCK) return; 15576 15577 for (;;) { 15578 if (!node->nd_next) return; 15579 void_expr0(node->nd_head); 15580 node = node->nd_next; 15581 } 15582 } 15583 15584 static NODE * 15585 remove_begin(NODE *node) 15586 { 15587 NODE **n = &node, *n1 = node; 15588 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 15589 *n = n1 = n1->nd_body; 15590 } 15591 return node; 15592 } 15593 15594 static void 15595 reduce_nodes_gen(struct parser_params *parser, NODE **body) 15596 { 15597 NODE *node = *body; 15598 15599 if (!node) { 15600 *body = NEW_NIL(); 15601 return; 15602 } 15603 #define subnodes(n1, n2) \ 15604 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 15605 (!node->n2) ? (body = &node->n1, 1) : \ 15606 (reduce_nodes(&node->n1), body = &node->n2, 1)) 15607 15608 while (node) { 15609 int newline = (int)(node->flags & NODE_FL_NEWLINE); 15610 switch (nd_type(node)) { 15611 end: 15612 case NODE_NIL: 15613 *body = 0; 15614 return; 15615 case NODE_RETURN: 15616 *body = node = node->nd_stts; 15617 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15618 continue; 15619 case NODE_BEGIN: 15620 *body = node = node->nd_body; 15621 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15622 continue; 15623 case NODE_BLOCK: 15624 body = &node->nd_end->nd_head; 15625 break; 15626 case NODE_IF: 15627 if (subnodes(nd_body, nd_else)) break; 15628 return; 15629 case NODE_CASE: 15630 body = &node->nd_body; 15631 break; 15632 case NODE_WHEN: 15633 if (!subnodes(nd_body, nd_next)) goto end; 15634 break; 15635 case NODE_ENSURE: 15636 if (!subnodes(nd_head, nd_resq)) goto end; 15637 break; 15638 case NODE_RESCUE: 15639 if (node->nd_else) { 15640 body = &node->nd_resq; 15641 break; 15642 } 15643 if (!subnodes(nd_head, nd_resq)) goto end; 15644 break; 15645 default: 15646 return; 15647 } 15648 node = *body; 15649 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15650 } 15651 15652 #undef subnodes 15653 } 15654 15655 static int 15656 is_static_content(NODE *node) 15657 { 15658 if (!node) return 1; 15659 switch (nd_type(node)) { 15660 case NODE_HASH: 15661 if (!(node = node->nd_head)) break; 15662 case NODE_ARRAY: 15663 do { 15664 if (!is_static_content(node->nd_head)) return 0; 15665 } while ((node = node->nd_next) != 0); 15666 case NODE_LIT: 15667 case NODE_STR: 15668 case NODE_NIL: 15669 case NODE_TRUE: 15670 case NODE_FALSE: 15671 case NODE_ZARRAY: 15672 break; 15673 default: 15674 return 0; 15675 } 15676 return 1; 15677 } 15678 15679 static int 15680 assign_in_cond(struct parser_params *parser, NODE *node) 15681 { 15682 switch (nd_type(node)) { 15683 case NODE_MASGN: 15684 yyerror("multiple assignment in conditional"); 15685 return 1; 15686 15687 case NODE_LASGN: 15688 case NODE_DASGN: 15689 case NODE_DASGN_CURR: 15690 case NODE_GASGN: 15691 case NODE_IASGN: 15692 break; 15693 15694 default: 15695 return 0; 15696 } 15697 15698 if (!node->nd_value) return 1; 15699 if (is_static_content(node->nd_value)) { 15700 /* reports always */ 15701 parser_warn(node->nd_value, "found = in conditional, should be =="); 15702 } 15703 return 1; 15704 } 15705 15706 static void 15707 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15708 { 15709 if (!e_option_supplied(parser)) parser_warn(node, str); 15710 } 15711 15712 static void 15713 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15714 { 15715 if (!e_option_supplied(parser)) parser_warning(node, str); 15716 } 15717 15718 static void 15719 fixup_nodes(NODE **rootnode) 15720 { 15721 NODE *node, *next, *head; 15722 15723 for (node = *rootnode; node; node = next) { 15724 enum node_type type; 15725 VALUE val; 15726 15727 next = node->nd_next; 15728 head = node->nd_head; 15729 rb_gc_force_recycle((VALUE)node); 15730 *rootnode = next; 15731 switch (type = nd_type(head)) { 15732 case NODE_DOT2: 15733 case NODE_DOT3: 15734 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 15735 type == NODE_DOT3); 15736 rb_gc_force_recycle((VALUE)head->nd_beg); 15737 rb_gc_force_recycle((VALUE)head->nd_end); 15738 nd_set_type(head, NODE_LIT); 15739 head->nd_lit = val; 15740 break; 15741 default: 15742 break; 15743 } 15744 } 15745 } 15746 15747 static NODE *cond0(struct parser_params*,NODE*); 15748 15749 static NODE* 15750 range_op(struct parser_params *parser, NODE *node) 15751 { 15752 enum node_type type; 15753 15754 if (node == 0) return 0; 15755 15756 type = nd_type(node); 15757 value_expr(node); 15758 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 15759 warn_unless_e_option(parser, node, "integer literal in conditional range"); 15760 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 15761 } 15762 return cond0(parser, node); 15763 } 15764 15765 static int 15766 literal_node(NODE *node) 15767 { 15768 if (!node) return 1; /* same as NODE_NIL */ 15769 switch (nd_type(node)) { 15770 case NODE_LIT: 15771 case NODE_STR: 15772 case NODE_DSTR: 15773 case NODE_EVSTR: 15774 case NODE_DREGX: 15775 case NODE_DREGX_ONCE: 15776 case NODE_DSYM: 15777 return 2; 15778 case NODE_TRUE: 15779 case NODE_FALSE: 15780 case NODE_NIL: 15781 return 1; 15782 } 15783 return 0; 15784 } 15785 15786 static NODE* 15787 cond0(struct parser_params *parser, NODE *node) 15788 { 15789 if (node == 0) return 0; 15790 assign_in_cond(parser, node); 15791 15792 switch (nd_type(node)) { 15793 case NODE_DSTR: 15794 case NODE_EVSTR: 15795 case NODE_STR: 15796 rb_warn0("string literal in condition"); 15797 break; 15798 15799 case NODE_DREGX: 15800 case NODE_DREGX_ONCE: 15801 warning_unless_e_option(parser, node, "regex literal in condition"); 15802 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 15803 15804 case NODE_AND: 15805 case NODE_OR: 15806 node->nd_1st = cond0(parser, node->nd_1st); 15807 node->nd_2nd = cond0(parser, node->nd_2nd); 15808 break; 15809 15810 case NODE_DOT2: 15811 case NODE_DOT3: 15812 node->nd_beg = range_op(parser, node->nd_beg); 15813 node->nd_end = range_op(parser, node->nd_end); 15814 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 15815 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 15816 if (!e_option_supplied(parser)) { 15817 int b = literal_node(node->nd_beg); 15818 int e = literal_node(node->nd_end); 15819 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 15820 parser_warn(node, "range literal in condition"); 15821 } 15822 } 15823 break; 15824 15825 case NODE_DSYM: 15826 parser_warning(node, "literal in condition"); 15827 break; 15828 15829 case NODE_LIT: 15830 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) { 15831 warn_unless_e_option(parser, node, "regex literal in condition"); 15832 nd_set_type(node, NODE_MATCH); 15833 } 15834 else { 15835 parser_warning(node, "literal in condition"); 15836 } 15837 default: 15838 break; 15839 } 15840 return node; 15841 } 15842 15843 static NODE* 15844 cond_gen(struct parser_params *parser, NODE *node) 15845 { 15846 if (node == 0) return 0; 15847 return cond0(parser, node); 15848 } 15849 15850 static NODE* 15851 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 15852 { 15853 value_expr(left); 15854 if (left && (enum node_type)nd_type(left) == type) { 15855 NODE *node = left, *second; 15856 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 15857 node = second; 15858 } 15859 node->nd_2nd = NEW_NODE(type, second, right, 0); 15860 return left; 15861 } 15862 return NEW_NODE(type, left, right, 0); 15863 } 15864 15865 static void 15866 no_blockarg(struct parser_params *parser, NODE *node) 15867 { 15868 if (node && nd_type(node) == NODE_BLOCK_PASS) { 15869 compile_error(PARSER_ARG "block argument should not be given"); 15870 } 15871 } 15872 15873 static NODE * 15874 ret_args_gen(struct parser_params *parser, NODE *node) 15875 { 15876 if (node) { 15877 no_blockarg(parser, node); 15878 if (nd_type(node) == NODE_ARRAY) { 15879 if (node->nd_next == 0) { 15880 node = node->nd_head; 15881 } 15882 else { 15883 nd_set_type(node, NODE_VALUES); 15884 } 15885 } 15886 } 15887 return node; 15888 } 15889 15890 static NODE * 15891 new_yield_gen(struct parser_params *parser, NODE *node) 15892 { 15893 if (node) no_blockarg(parser, node); 15894 15895 return NEW_YIELD(node); 15896 } 15897 15898 static NODE* 15899 negate_lit(NODE *node) 15900 { 15901 switch (TYPE(node->nd_lit)) { 15902 case T_FIXNUM: 15903 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 15904 break; 15905 case T_BIGNUM: 15906 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 15907 break; 15908 case T_FLOAT: 15909 #if USE_FLONUM 15910 if (FLONUM_P(node->nd_lit)) { 15911 node->nd_lit = DBL2NUM(-RFLOAT_VALUE(node->nd_lit)); 15912 } 15913 else { 15914 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15915 } 15916 #else 15917 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15918 #endif 15919 break; 15920 default: 15921 break; 15922 } 15923 return node; 15924 } 15925 15926 static NODE * 15927 arg_blk_pass(NODE *node1, NODE *node2) 15928 { 15929 if (node2) { 15930 node2->nd_head = node1; 15931 return node2; 15932 } 15933 return node1; 15934 } 15935 15936 15937 static NODE* 15938 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail) 15939 { 15940 int saved_line = ruby_sourceline; 15941 struct rb_args_info *args = tail->nd_ainfo; 15942 15943 args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0; 15944 args->pre_init = m ? m->nd_next : 0; 15945 15946 args->post_args_num = p ? rb_long2int(p->nd_plen) : 0; 15947 args->post_init = p ? p->nd_next : 0; 15948 args->first_post_arg = p ? p->nd_pid : 0; 15949 15950 args->rest_arg = r; 15951 15952 args->opt_args = o; 15953 15954 ruby_sourceline = saved_line; 15955 15956 return tail; 15957 } 15958 15959 static NODE* 15960 new_args_tail_gen(struct parser_params *parser, NODE *k, ID kr, ID b) 15961 { 15962 int saved_line = ruby_sourceline; 15963 struct rb_args_info *args; 15964 NODE *kw_rest_arg = 0; 15965 NODE *node; 15966 15967 args = ALLOC(struct rb_args_info); 15968 MEMZERO(args, struct rb_args_info, 1); 15969 node = NEW_NODE(NODE_ARGS, 0, 0, args); 15970 15971 args->block_arg = b; 15972 args->kw_args = k; 15973 if (k && !kr) kr = internal_id(); 15974 if (kr) { 15975 arg_var(kr); 15976 kw_rest_arg = NEW_DVAR(kr); 15977 } 15978 args->kw_rest_arg = kw_rest_arg; 15979 15980 ruby_sourceline = saved_line; 15981 return node; 15982 } 15983 15984 static NODE* 15985 dsym_node_gen(struct parser_params *parser, NODE *node) 15986 { 15987 VALUE lit; 15988 15989 if (!node) { 15990 return NEW_LIT(ID2SYM(idNULL)); 15991 } 15992 15993 switch (nd_type(node)) { 15994 case NODE_DSTR: 15995 nd_set_type(node, NODE_DSYM); 15996 break; 15997 case NODE_STR: 15998 lit = node->nd_lit; 15999 node->nd_lit = ID2SYM(rb_intern_str(lit)); 16000 nd_set_type(node, NODE_LIT); 16001 break; 16002 default: 16003 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node)); 16004 break; 16005 } 16006 return node; 16007 } 16008 #endif /* !RIPPER */ 16009 16010 #ifndef RIPPER 16011 static NODE * 16012 new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 16013 { 16014 NODE *asgn; 16015 16016 if (lhs) { 16017 ID vid = lhs->nd_vid; 16018 if (op == tOROP) { 16019 lhs->nd_value = rhs; 16020 asgn = NEW_OP_ASGN_OR(gettable(vid), lhs); 16021 if (is_asgn_or_id(vid)) { 16022 asgn->nd_aid = vid; 16023 } 16024 } 16025 else if (op == tANDOP) { 16026 lhs->nd_value = rhs; 16027 asgn = NEW_OP_ASGN_AND(gettable(vid), lhs); 16028 } 16029 else { 16030 asgn = lhs; 16031 asgn->nd_value = NEW_CALL(gettable(vid), op, NEW_LIST(rhs)); 16032 } 16033 } 16034 else { 16035 asgn = NEW_BEGIN(0); 16036 } 16037 return asgn; 16038 } 16039 16040 static NODE * 16041 new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs) 16042 { 16043 NODE *asgn; 16044 16045 if (op == tOROP) { 16046 op = 0; 16047 } 16048 else if (op == tANDOP) { 16049 op = 1; 16050 } 16051 asgn = NEW_OP_ASGN2(lhs, attr, op, rhs); 16052 fixpos(asgn, lhs); 16053 return asgn; 16054 } 16055 16056 static NODE * 16057 new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 16058 { 16059 NODE *asgn; 16060 16061 if (op == tOROP) { 16062 op = 0; 16063 } 16064 else if (op == tANDOP) { 16065 op = 1; 16066 } 16067 if (lhs) { 16068 asgn = NEW_OP_CDECL(lhs, op, rhs); 16069 } 16070 else { 16071 asgn = NEW_BEGIN(0); 16072 } 16073 fixpos(asgn, lhs); 16074 return asgn; 16075 } 16076 #else 16077 static VALUE 16078 new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs) 16079 { 16080 return dispatch3(opassign, lhs, op, rhs); 16081 } 16082 16083 static VALUE 16084 new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs) 16085 { 16086 VALUE recv = dispatch3(field, lhs, type, attr); 16087 return dispatch3(opassign, recv, op, rhs); 16088 } 16089 #endif 16090 16091 static void 16092 warn_unused_var(struct parser_params *parser, struct local_vars *local) 16093 { 16094 int i, cnt; 16095 ID *v, *u; 16096 16097 if (!local->used) return; 16098 v = local->vars->tbl; 16099 u = local->used->tbl; 16100 cnt = local->used->pos; 16101 if (cnt != local->vars->pos) { 16102 rb_bug("local->used->pos != local->vars->pos"); 16103 } 16104 for (i = 0; i < cnt; ++i) { 16105 if (!v[i] || (u[i] & LVAR_USED)) continue; 16106 if (is_private_local_id(v[i])) continue; 16107 rb_warn4S(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 16108 } 16109 } 16110 16111 static void 16112 local_push_gen(struct parser_params *parser, int inherit_dvars) 16113 { 16114 struct local_vars *local; 16115 16116 local = ALLOC(struct local_vars); 16117 local->prev = lvtbl; 16118 local->args = vtable_alloc(0); 16119 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 16120 local->used = !(inherit_dvars && 16121 (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) && 16122 RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 16123 local->cmdargs = cmdarg_stack; 16124 cmdarg_stack = 0; 16125 lvtbl = local; 16126 } 16127 16128 static void 16129 local_pop_gen(struct parser_params *parser) 16130 { 16131 struct local_vars *local = lvtbl->prev; 16132 if (lvtbl->used) { 16133 warn_unused_var(parser, lvtbl); 16134 vtable_free(lvtbl->used); 16135 } 16136 vtable_free(lvtbl->args); 16137 vtable_free(lvtbl->vars); 16138 cmdarg_stack = lvtbl->cmdargs; 16139 xfree(lvtbl); 16140 lvtbl = local; 16141 } 16142 16143 #ifndef RIPPER 16144 static ID* 16145 vtable_tblcpy(ID *buf, const struct vtable *src) 16146 { 16147 int i, cnt = vtable_size(src); 16148 16149 if (cnt > 0) { 16150 buf[0] = cnt; 16151 for (i = 0; i < cnt; i++) { 16152 buf[i] = src->tbl[i]; 16153 } 16154 return buf; 16155 } 16156 return 0; 16157 } 16158 16159 static ID* 16160 local_tbl_gen(struct parser_params *parser) 16161 { 16162 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 16163 ID *buf; 16164 16165 if (cnt <= 0) return 0; 16166 buf = ALLOC_N(ID, cnt + 1); 16167 vtable_tblcpy(buf+1, lvtbl->args); 16168 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 16169 buf[0] = cnt; 16170 return buf; 16171 } 16172 #endif 16173 16174 static int 16175 arg_var_gen(struct parser_params *parser, ID id) 16176 { 16177 vtable_add(lvtbl->args, id); 16178 return vtable_size(lvtbl->args) - 1; 16179 } 16180 16181 static int 16182 local_var_gen(struct parser_params *parser, ID id) 16183 { 16184 vtable_add(lvtbl->vars, id); 16185 if (lvtbl->used) { 16186 vtable_add(lvtbl->used, (ID)ruby_sourceline); 16187 } 16188 return vtable_size(lvtbl->vars) - 1; 16189 } 16190 16191 static int 16192 local_id_gen(struct parser_params *parser, ID id) 16193 { 16194 struct vtable *vars, *args, *used; 16195 16196 vars = lvtbl->vars; 16197 args = lvtbl->args; 16198 used = lvtbl->used; 16199 16200 while (vars && POINTER_P(vars->prev)) { 16201 vars = vars->prev; 16202 args = args->prev; 16203 if (used) used = used->prev; 16204 } 16205 16206 if (vars && vars->prev == DVARS_INHERIT) { 16207 return rb_local_defined(id); 16208 } 16209 else if (vtable_included(args, id)) { 16210 return 1; 16211 } 16212 else { 16213 int i = vtable_included(vars, id); 16214 if (i && used) used->tbl[i-1] |= LVAR_USED; 16215 return i != 0; 16216 } 16217 } 16218 16219 static const struct vtable * 16220 dyna_push_gen(struct parser_params *parser) 16221 { 16222 lvtbl->args = vtable_alloc(lvtbl->args); 16223 lvtbl->vars = vtable_alloc(lvtbl->vars); 16224 if (lvtbl->used) { 16225 lvtbl->used = vtable_alloc(lvtbl->used); 16226 } 16227 return lvtbl->args; 16228 } 16229 16230 static void 16231 dyna_pop_1(struct parser_params *parser) 16232 { 16233 struct vtable *tmp; 16234 16235 if ((tmp = lvtbl->used) != 0) { 16236 warn_unused_var(parser, lvtbl); 16237 lvtbl->used = lvtbl->used->prev; 16238 vtable_free(tmp); 16239 } 16240 tmp = lvtbl->args; 16241 lvtbl->args = lvtbl->args->prev; 16242 vtable_free(tmp); 16243 tmp = lvtbl->vars; 16244 lvtbl->vars = lvtbl->vars->prev; 16245 vtable_free(tmp); 16246 } 16247 16248 static void 16249 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 16250 { 16251 while (lvtbl->args != lvargs) { 16252 dyna_pop_1(parser); 16253 if (!lvtbl->args) { 16254 struct local_vars *local = lvtbl->prev; 16255 xfree(lvtbl); 16256 lvtbl = local; 16257 } 16258 } 16259 dyna_pop_1(parser); 16260 } 16261 16262 static int 16263 dyna_in_block_gen(struct parser_params *parser) 16264 { 16265 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 16266 } 16267 16268 static int 16269 dvar_defined_gen(struct parser_params *parser, ID id, int get) 16270 { 16271 struct vtable *vars, *args, *used; 16272 int i; 16273 16274 args = lvtbl->args; 16275 vars = lvtbl->vars; 16276 used = lvtbl->used; 16277 16278 while (POINTER_P(vars)) { 16279 if (vtable_included(args, id)) { 16280 return 1; 16281 } 16282 if ((i = vtable_included(vars, id)) != 0) { 16283 if (used) used->tbl[i-1] |= LVAR_USED; 16284 return 1; 16285 } 16286 args = args->prev; 16287 vars = vars->prev; 16288 if (get) used = 0; 16289 if (used) used = used->prev; 16290 } 16291 16292 if (vars == DVARS_INHERIT) { 16293 return rb_dvar_defined(id); 16294 } 16295 16296 return 0; 16297 } 16298 16299 static int 16300 dvar_curr_gen(struct parser_params *parser, ID id) 16301 { 16302 return (vtable_included(lvtbl->args, id) || 16303 vtable_included(lvtbl->vars, id)); 16304 } 16305 16306 #ifndef RIPPER 16307 static void 16308 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 16309 { 16310 int c = RE_OPTION_ENCODING_IDX(options); 16311 16312 if (c) { 16313 int opt, idx; 16314 rb_char_to_option_kcode(c, &opt, &idx); 16315 if (idx != ENCODING_GET(str) && 16316 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16317 goto error; 16318 } 16319 ENCODING_SET(str, idx); 16320 } 16321 else if (RE_OPTION_ENCODING_NONE(options)) { 16322 if (!ENCODING_IS_ASCII8BIT(str) && 16323 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16324 c = 'n'; 16325 goto error; 16326 } 16327 rb_enc_associate(str, rb_ascii8bit_encoding()); 16328 } 16329 else if (current_enc == rb_usascii_encoding()) { 16330 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16331 /* raise in re.c */ 16332 rb_enc_associate(str, rb_usascii_encoding()); 16333 } 16334 else { 16335 rb_enc_associate(str, rb_ascii8bit_encoding()); 16336 } 16337 } 16338 return; 16339 16340 error: 16341 compile_error(PARSER_ARG 16342 "regexp encoding option '%c' differs from source encoding '%s'", 16343 c, rb_enc_name(rb_enc_get(str))); 16344 } 16345 16346 static int 16347 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 16348 { 16349 VALUE err; 16350 reg_fragment_setenc(str, options); 16351 err = rb_reg_check_preprocess(str); 16352 if (err != Qnil) { 16353 err = rb_obj_as_string(err); 16354 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 16355 RB_GC_GUARD(err); 16356 return 0; 16357 } 16358 return 1; 16359 } 16360 16361 typedef struct { 16362 struct parser_params* parser; 16363 rb_encoding *enc; 16364 NODE *succ_block; 16365 NODE *fail_block; 16366 int num; 16367 } reg_named_capture_assign_t; 16368 16369 static int 16370 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 16371 int back_num, int *back_refs, OnigRegex regex, void *arg0) 16372 { 16373 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 16374 struct parser_params* parser = arg->parser; 16375 rb_encoding *enc = arg->enc; 16376 long len = name_end - name; 16377 const char *s = (const char *)name; 16378 ID var; 16379 16380 arg->num++; 16381 16382 if (arg->succ_block == 0) { 16383 arg->succ_block = NEW_BEGIN(0); 16384 arg->fail_block = NEW_BEGIN(0); 16385 } 16386 16387 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 16388 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 16389 !rb_enc_symname2_p(s, len, enc)) { 16390 return ST_CONTINUE; 16391 } 16392 var = rb_intern3(s, len, enc); 16393 if (dvar_defined(var) || local_id(var)) { 16394 rb_warningS("named capture conflicts a local variable - %s", 16395 rb_id2name(var)); 16396 } 16397 arg->succ_block = block_append(arg->succ_block, 16398 newline_node(node_assign(assignable(var,0), 16399 NEW_CALL( 16400 gettable(rb_intern("$~")), 16401 idAREF, 16402 NEW_LIST(NEW_LIT(ID2SYM(var)))) 16403 ))); 16404 arg->fail_block = block_append(arg->fail_block, 16405 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 16406 return ST_CONTINUE; 16407 } 16408 16409 static NODE * 16410 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 16411 { 16412 reg_named_capture_assign_t arg; 16413 16414 arg.parser = parser; 16415 arg.enc = rb_enc_get(regexp); 16416 arg.succ_block = 0; 16417 arg.fail_block = 0; 16418 arg.num = 0; 16419 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 16420 16421 if (arg.num == 0) 16422 return match; 16423 16424 return 16425 block_append( 16426 newline_node(match), 16427 NEW_IF(gettable(rb_intern("$~")), 16428 block_append( 16429 newline_node(arg.succ_block), 16430 newline_node( 16431 NEW_CALL( 16432 gettable(rb_intern("$~")), 16433 rb_intern("begin"), 16434 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 16435 block_append( 16436 newline_node(arg.fail_block), 16437 newline_node( 16438 NEW_LIT(Qnil))))); 16439 } 16440 16441 static VALUE 16442 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 16443 { 16444 VALUE re; 16445 VALUE err; 16446 16447 reg_fragment_setenc(str, options); 16448 err = rb_errinfo(); 16449 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 16450 if (NIL_P(re)) { 16451 ID mesg = rb_intern("mesg"); 16452 VALUE m = rb_attr_get(rb_errinfo(), mesg); 16453 rb_set_errinfo(err); 16454 if (!NIL_P(err)) { 16455 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 16456 } 16457 else { 16458 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 16459 } 16460 return Qnil; 16461 } 16462 return re; 16463 } 16464 16465 void 16466 rb_gc_mark_parser(void) 16467 { 16468 } 16469 16470 NODE* 16471 rb_parser_append_print(VALUE vparser, NODE *node) 16472 { 16473 NODE *prelude = 0; 16474 NODE *scope = node; 16475 struct parser_params *parser; 16476 16477 if (!node) return node; 16478 16479 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16480 16481 node = node->nd_body; 16482 16483 if (nd_type(node) == NODE_PRELUDE) { 16484 prelude = node; 16485 node = node->nd_body; 16486 } 16487 16488 node = block_append(node, 16489 NEW_FCALL(rb_intern("print"), 16490 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 16491 if (prelude) { 16492 prelude->nd_body = node; 16493 scope->nd_body = prelude; 16494 } 16495 else { 16496 scope->nd_body = node; 16497 } 16498 16499 return scope; 16500 } 16501 16502 NODE * 16503 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 16504 { 16505 NODE *prelude = 0; 16506 NODE *scope = node; 16507 struct parser_params *parser; 16508 16509 if (!node) return node; 16510 16511 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16512 16513 node = node->nd_body; 16514 16515 if (nd_type(node) == NODE_PRELUDE) { 16516 prelude = node; 16517 node = node->nd_body; 16518 } 16519 if (split) { 16520 node = block_append(NEW_GASGN(rb_intern("$F"), 16521 NEW_CALL(NEW_GVAR(rb_intern("$_")), 16522 rb_intern("split"), 0)), 16523 node); 16524 } 16525 if (chop) { 16526 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 16527 rb_intern("chop!"), 0), node); 16528 } 16529 16530 node = NEW_OPT_N(node); 16531 16532 if (prelude) { 16533 prelude->nd_body = node; 16534 scope->nd_body = prelude; 16535 } 16536 else { 16537 scope->nd_body = node; 16538 } 16539 16540 return scope; 16541 } 16542 16543 static const struct { 16544 ID token; 16545 const char *name; 16546 } op_tbl[] = { 16547 {tDOT2, ".."}, 16548 {tDOT3, "..."}, 16549 {tPOW, "**"}, 16550 {tDSTAR, "**"}, 16551 {tUPLUS, "+@"}, 16552 {tUMINUS, "-@"}, 16553 {tCMP, "<=>"}, 16554 {tGEQ, ">="}, 16555 {tLEQ, "<="}, 16556 {tEQ, "=="}, 16557 {tEQQ, "==="}, 16558 {tNEQ, "!="}, 16559 {tMATCH, "=~"}, 16560 {tNMATCH, "!~"}, 16561 {tAREF, "[]"}, 16562 {tASET, "[]="}, 16563 {tLSHFT, "<<"}, 16564 {tRSHFT, ">>"}, 16565 {tCOLON2, "::"}, 16566 }; 16567 16568 #define op_tbl_count numberof(op_tbl) 16569 16570 #ifndef ENABLE_SELECTOR_NAMESPACE 16571 #define ENABLE_SELECTOR_NAMESPACE 0 16572 #endif 16573 16574 static struct symbols { 16575 ID last_id; 16576 st_table *sym_id; 16577 st_table *id_str; 16578 #if ENABLE_SELECTOR_NAMESPACE 16579 st_table *ivar2_id; 16580 st_table *id_ivar2; 16581 #endif 16582 VALUE op_sym[tLAST_OP_ID]; 16583 } global_symbols = {tLAST_TOKEN}; 16584 16585 static const struct st_hash_type symhash = { 16586 rb_str_hash_cmp, 16587 rb_str_hash, 16588 }; 16589 16590 #if ENABLE_SELECTOR_NAMESPACE 16591 struct ivar2_key { 16592 ID id; 16593 VALUE klass; 16594 }; 16595 16596 static int 16597 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 16598 { 16599 if (key1->id == key2->id && key1->klass == key2->klass) { 16600 return 0; 16601 } 16602 return 1; 16603 } 16604 16605 static int 16606 ivar2_hash(struct ivar2_key *key) 16607 { 16608 return (key->id << 8) ^ (key->klass >> 2); 16609 } 16610 16611 static const struct st_hash_type ivar2_hash_type = { 16612 ivar2_cmp, 16613 ivar2_hash, 16614 }; 16615 #endif 16616 16617 void 16618 Init_sym(void) 16619 { 16620 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 16621 global_symbols.id_str = st_init_numtable_with_size(1000); 16622 #if ENABLE_SELECTOR_NAMESPACE 16623 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 16624 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 16625 #endif 16626 16627 (void)nodetype; 16628 (void)nodeline; 16629 #if PARSER_DEBUG 16630 (void)lex_state_name(-1); 16631 #endif 16632 16633 Init_id(); 16634 } 16635 16636 void 16637 rb_gc_mark_symbols(void) 16638 { 16639 rb_mark_tbl(global_symbols.id_str); 16640 rb_gc_mark_locations(global_symbols.op_sym, 16641 global_symbols.op_sym + numberof(global_symbols.op_sym)); 16642 } 16643 #endif /* !RIPPER */ 16644 16645 static ID 16646 internal_id_gen(struct parser_params *parser) 16647 { 16648 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 16649 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 16650 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 16651 } 16652 16653 #ifndef RIPPER 16654 static int 16655 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 16656 { 16657 int mb = 0; 16658 16659 if (m >= e) return 0; 16660 if (is_global_name_punct(*m)) { 16661 ++m; 16662 } 16663 else if (*m == '-') { 16664 ++m; 16665 if (m < e && is_identchar(m, e, enc)) { 16666 if (!ISASCII(*m)) mb = 1; 16667 m += rb_enc_mbclen(m, e, enc); 16668 } 16669 } 16670 else { 16671 if (!rb_enc_isdigit(*m, enc)) return 0; 16672 do { 16673 if (!ISASCII(*m)) mb = 1; 16674 ++m; 16675 } while (m < e && rb_enc_isdigit(*m, enc)); 16676 } 16677 return m == e ? mb + 1 : 0; 16678 } 16679 16680 int 16681 rb_symname_p(const char *name) 16682 { 16683 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 16684 } 16685 16686 int 16687 rb_enc_symname_p(const char *name, rb_encoding *enc) 16688 { 16689 return rb_enc_symname2_p(name, strlen(name), enc); 16690 } 16691 16692 #define IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) 16693 #define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) 16694 16695 static int 16696 rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_atttset) 16697 { 16698 const char *m = name; 16699 const char *e = m + len; 16700 int type = ID_JUNK; 16701 16702 if (!m || len <= 0) return -1; 16703 switch (*m) { 16704 case '\0': 16705 return -1; 16706 16707 case '$': 16708 type = ID_GLOBAL; 16709 if (is_special_global_name(++m, e, enc)) return type; 16710 goto id; 16711 16712 case '@': 16713 type = ID_INSTANCE; 16714 if (*++m == '@') { 16715 ++m; 16716 type = ID_CLASS; 16717 } 16718 goto id; 16719 16720 case '<': 16721 switch (*++m) { 16722 case '<': ++m; break; 16723 case '=': if (*++m == '>') ++m; break; 16724 default: break; 16725 } 16726 break; 16727 16728 case '>': 16729 switch (*++m) { 16730 case '>': case '=': ++m; break; 16731 } 16732 break; 16733 16734 case '=': 16735 switch (*++m) { 16736 case '~': ++m; break; 16737 case '=': if (*++m == '=') ++m; break; 16738 default: return -1; 16739 } 16740 break; 16741 16742 case '*': 16743 if (*++m == '*') ++m; 16744 break; 16745 16746 case '+': case '-': 16747 if (*++m == '@') ++m; 16748 break; 16749 16750 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 16751 ++m; 16752 break; 16753 16754 case '[': 16755 if (*++m != ']') return -1; 16756 if (*++m == '=') ++m; 16757 break; 16758 16759 case '!': 16760 if (len == 1) return ID_JUNK; 16761 switch (*++m) { 16762 case '=': case '~': ++m; break; 16763 default: return -1; 16764 } 16765 break; 16766 16767 default: 16768 type = rb_enc_isupper(*m, enc) ? ID_CONST : ID_LOCAL; 16769 id: 16770 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 16771 return -1; 16772 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 16773 if (m >= e) break; 16774 switch (*m) { 16775 case '!': case '?': 16776 if (type == ID_GLOBAL || type == ID_CLASS || type == ID_INSTANCE) return -1; 16777 type = ID_JUNK; 16778 ++m; 16779 if (m + 1 < e || *m != '=') break; 16780 /* fall through */ 16781 case '=': 16782 if (!(allowed_atttset & (1U << type))) return -1; 16783 type = ID_ATTRSET; 16784 ++m; 16785 break; 16786 } 16787 break; 16788 } 16789 return m == e ? type : -1; 16790 } 16791 16792 int 16793 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 16794 { 16795 return rb_enc_symname_type(name, len, enc, IDSET_ATTRSET_FOR_SYNTAX) != -1; 16796 } 16797 16798 static int 16799 rb_str_symname_type(VALUE name, unsigned int allowed_atttset) 16800 { 16801 const char *ptr = StringValuePtr(name); 16802 long len = RSTRING_LEN(name); 16803 int type = rb_enc_symname_type(ptr, len, rb_enc_get(name), allowed_atttset); 16804 RB_GC_GUARD(name); 16805 return type; 16806 } 16807 16808 static ID 16809 register_symid(ID id, const char *name, long len, rb_encoding *enc) 16810 { 16811 VALUE str = rb_enc_str_new(name, len, enc); 16812 return register_symid_str(id, str); 16813 } 16814 16815 static ID 16816 register_symid_str(ID id, VALUE str) 16817 { 16818 OBJ_FREEZE(str); 16819 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 16820 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 16821 return id; 16822 } 16823 16824 static int 16825 sym_check_asciionly(VALUE str) 16826 { 16827 if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE; 16828 switch (rb_enc_str_coderange(str)) { 16829 case ENC_CODERANGE_BROKEN: 16830 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 16831 case ENC_CODERANGE_7BIT: 16832 return TRUE; 16833 } 16834 return FALSE; 16835 } 16836 16837 /* 16838 * _str_ itself will be registered at the global symbol table. _str_ 16839 * can be modified before the registration, since the encoding will be 16840 * set to ASCII-8BIT if it is a special global name. 16841 */ 16842 static ID intern_str(VALUE str); 16843 16844 ID 16845 rb_intern3(const char *name, long len, rb_encoding *enc) 16846 { 16847 VALUE str; 16848 st_data_t data; 16849 struct RString fake_str; 16850 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16851 fake_str.basic.klass = rb_cString; 16852 fake_str.as.heap.len = len; 16853 fake_str.as.heap.ptr = (char *)name; 16854 fake_str.as.heap.aux.capa = len; 16855 str = (VALUE)&fake_str; 16856 rb_enc_associate(str, enc); 16857 OBJ_FREEZE(str); 16858 16859 if (st_lookup(global_symbols.sym_id, str, &data)) 16860 return (ID)data; 16861 16862 str = rb_enc_str_new(name, len, enc); /* make true string */ 16863 return intern_str(str); 16864 } 16865 16866 static ID 16867 intern_str(VALUE str) 16868 { 16869 const char *name, *m, *e; 16870 long len, last; 16871 rb_encoding *enc, *symenc; 16872 unsigned char c; 16873 ID id; 16874 int mb; 16875 16876 RSTRING_GETMEM(str, name, len); 16877 m = name; 16878 e = m + len; 16879 enc = rb_enc_get(str); 16880 symenc = enc; 16881 16882 if (!len || (rb_cString && !rb_enc_asciicompat(enc))) { 16883 junk: 16884 id = ID_JUNK; 16885 goto new_id; 16886 } 16887 last = len-1; 16888 id = 0; 16889 switch (*m) { 16890 case '$': 16891 if (len < 2) goto junk; 16892 id |= ID_GLOBAL; 16893 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 16894 if (!--mb) symenc = rb_usascii_encoding(); 16895 goto new_id; 16896 } 16897 break; 16898 case '@': 16899 if (m[1] == '@') { 16900 if (len < 3) goto junk; 16901 m++; 16902 id |= ID_CLASS; 16903 } 16904 else { 16905 if (len < 2) goto junk; 16906 id |= ID_INSTANCE; 16907 } 16908 m++; 16909 break; 16910 default: 16911 c = m[0]; 16912 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 16913 /* operators */ 16914 int i; 16915 16916 if (len == 1) { 16917 id = c; 16918 goto id_register; 16919 } 16920 for (i = 0; i < op_tbl_count; i++) { 16921 if (*op_tbl[i].name == *m && 16922 strcmp(op_tbl[i].name, m) == 0) { 16923 id = op_tbl[i].token; 16924 goto id_register; 16925 } 16926 } 16927 } 16928 break; 16929 } 16930 if (name[last] == '=') { 16931 /* attribute assignment */ 16932 if (last > 1 && name[last-1] == '=') 16933 goto junk; 16934 id = rb_intern3(name, last, enc); 16935 if (id > tLAST_OP_ID && !is_attrset_id(id)) { 16936 enc = rb_enc_get(rb_id2str(id)); 16937 id = rb_id_attrset(id); 16938 goto id_register; 16939 } 16940 id = ID_ATTRSET; 16941 } 16942 else if (id == 0) { 16943 if (rb_enc_isupper(m[0], enc)) { 16944 id = ID_CONST; 16945 } 16946 else { 16947 id = ID_LOCAL; 16948 } 16949 } 16950 if (!rb_enc_isdigit(*m, enc)) { 16951 while (m <= name + last && is_identchar(m, e, enc)) { 16952 if (ISASCII(*m)) { 16953 m++; 16954 } 16955 else { 16956 m += rb_enc_mbclen(m, e, enc); 16957 } 16958 } 16959 } 16960 if (id != ID_ATTRSET && m - name < len) id = ID_JUNK; 16961 if (sym_check_asciionly(str)) symenc = rb_usascii_encoding(); 16962 new_id: 16963 if (symenc != enc) rb_enc_associate(str, symenc); 16964 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 16965 if (len > 20) { 16966 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 16967 name); 16968 } 16969 else { 16970 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 16971 (int)len, name); 16972 } 16973 } 16974 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 16975 id_register: 16976 return register_symid_str(id, str); 16977 } 16978 16979 ID 16980 rb_intern2(const char *name, long len) 16981 { 16982 return rb_intern3(name, len, rb_usascii_encoding()); 16983 } 16984 16985 #undef rb_intern 16986 ID 16987 rb_intern(const char *name) 16988 { 16989 return rb_intern2(name, strlen(name)); 16990 } 16991 16992 ID 16993 rb_intern_str(VALUE str) 16994 { 16995 st_data_t id; 16996 16997 if (st_lookup(global_symbols.sym_id, str, &id)) 16998 return (ID)id; 16999 return intern_str(rb_str_dup(str)); 17000 } 17001 17002 VALUE 17003 rb_id2str(ID id) 17004 { 17005 st_data_t data; 17006 17007 if (id < tLAST_TOKEN) { 17008 int i = 0; 17009 17010 if (id < INT_MAX && rb_ispunct((int)id)) { 17011 VALUE str = global_symbols.op_sym[i = (int)id]; 17012 if (!str) { 17013 char name[2]; 17014 name[0] = (char)id; 17015 name[1] = 0; 17016 str = rb_usascii_str_new(name, 1); 17017 OBJ_FREEZE(str); 17018 global_symbols.op_sym[i] = str; 17019 } 17020 return str; 17021 } 17022 for (i = 0; i < op_tbl_count; i++) { 17023 if (op_tbl[i].token == id) { 17024 VALUE str = global_symbols.op_sym[i]; 17025 if (!str) { 17026 str = rb_usascii_str_new2(op_tbl[i].name); 17027 OBJ_FREEZE(str); 17028 global_symbols.op_sym[i] = str; 17029 } 17030 return str; 17031 } 17032 } 17033 } 17034 17035 if (st_lookup(global_symbols.id_str, id, &data)) { 17036 VALUE str = (VALUE)data; 17037 if (RBASIC(str)->klass == 0) 17038 RBASIC(str)->klass = rb_cString; 17039 return str; 17040 } 17041 17042 if (is_attrset_id(id)) { 17043 ID id_stem = (id & ~ID_SCOPE_MASK); 17044 VALUE str; 17045 17046 do { 17047 if (!!(str = rb_id2str(id_stem | ID_LOCAL))) break; 17048 if (!!(str = rb_id2str(id_stem | ID_CONST))) break; 17049 if (!!(str = rb_id2str(id_stem | ID_INSTANCE))) break; 17050 if (!!(str = rb_id2str(id_stem | ID_GLOBAL))) break; 17051 if (!!(str = rb_id2str(id_stem | ID_CLASS))) break; 17052 if (!!(str = rb_id2str(id_stem | ID_JUNK))) break; 17053 return 0; 17054 } while (0); 17055 str = rb_str_dup(str); 17056 rb_str_cat(str, "=", 1); 17057 register_symid_str(id, str); 17058 if (st_lookup(global_symbols.id_str, id, &data)) { 17059 VALUE str = (VALUE)data; 17060 if (RBASIC(str)->klass == 0) 17061 RBASIC(str)->klass = rb_cString; 17062 return str; 17063 } 17064 } 17065 return 0; 17066 } 17067 17068 const char * 17069 rb_id2name(ID id) 17070 { 17071 VALUE str = rb_id2str(id); 17072 17073 if (!str) return 0; 17074 return RSTRING_PTR(str); 17075 } 17076 17077 static int 17078 symbols_i(VALUE sym, ID value, VALUE ary) 17079 { 17080 rb_ary_push(ary, ID2SYM(value)); 17081 return ST_CONTINUE; 17082 } 17083 17084 /* 17085 * call-seq: 17086 * Symbol.all_symbols => array 17087 * 17088 * Returns an array of all the symbols currently in Ruby's symbol 17089 * table. 17090 * 17091 * Symbol.all_symbols.size #=> 903 17092 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 17093 * :chown, :EOFError, :$;, :String, 17094 * :LOCK_SH, :"setuid?", :$<, 17095 * :default_proc, :compact, :extend, 17096 * :Tms, :getwd, :$=, :ThreadGroup, 17097 * :wait2, :$>] 17098 */ 17099 17100 VALUE 17101 rb_sym_all_symbols(void) 17102 { 17103 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 17104 17105 st_foreach(global_symbols.sym_id, symbols_i, ary); 17106 return ary; 17107 } 17108 17109 int 17110 rb_is_const_id(ID id) 17111 { 17112 return is_const_id(id); 17113 } 17114 17115 int 17116 rb_is_class_id(ID id) 17117 { 17118 return is_class_id(id); 17119 } 17120 17121 int 17122 rb_is_global_id(ID id) 17123 { 17124 return is_global_id(id); 17125 } 17126 17127 int 17128 rb_is_instance_id(ID id) 17129 { 17130 return is_instance_id(id); 17131 } 17132 17133 int 17134 rb_is_attrset_id(ID id) 17135 { 17136 return is_attrset_id(id); 17137 } 17138 17139 int 17140 rb_is_local_id(ID id) 17141 { 17142 return is_local_id(id); 17143 } 17144 17145 int 17146 rb_is_junk_id(ID id) 17147 { 17148 return is_junk_id(id); 17149 } 17150 17162 ID 17163 rb_check_id(volatile VALUE *namep) 17164 { 17165 st_data_t id; 17166 VALUE tmp; 17167 VALUE name = *namep; 17168 17169 if (SYMBOL_P(name)) { 17170 return SYM2ID(name); 17171 } 17172 else if (!RB_TYPE_P(name, T_STRING)) { 17173 tmp = rb_check_string_type(name); 17174 if (NIL_P(tmp)) { 17175 tmp = rb_inspect(name); 17176 rb_raise(rb_eTypeError, "%s is not a symbol", 17177 RSTRING_PTR(tmp)); 17178 } 17179 name = tmp; 17180 *namep = name; 17181 } 17182 17183 sym_check_asciionly(name); 17184 17185 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17186 return (ID)id; 17187 17188 if (rb_is_attrset_name(name)) { 17189 struct RString fake_str; 17190 const VALUE localname = (VALUE)&fake_str; 17191 /* make local name by chopping '=' */ 17192 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17193 fake_str.basic.klass = rb_cString; 17194 fake_str.as.heap.len = RSTRING_LEN(name) - 1; 17195 fake_str.as.heap.ptr = RSTRING_PTR(name); 17196 fake_str.as.heap.aux.capa = fake_str.as.heap.len; 17197 rb_enc_copy(localname, name); 17198 OBJ_FREEZE(localname); 17199 17200 if (st_lookup(global_symbols.sym_id, (st_data_t)localname, &id)) { 17201 return rb_id_attrset((ID)id); 17202 } 17203 RB_GC_GUARD(name); 17204 } 17205 17206 return (ID)0; 17207 } 17208 17209 ID 17210 rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc) 17211 { 17212 st_data_t id; 17213 struct RString fake_str; 17214 const VALUE name = (VALUE)&fake_str; 17215 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17216 fake_str.basic.klass = rb_cString; 17217 fake_str.as.heap.len = len; 17218 fake_str.as.heap.ptr = (char *)ptr; 17219 fake_str.as.heap.aux.capa = len; 17220 rb_enc_associate(name, enc); 17221 17222 sym_check_asciionly(name); 17223 17224 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17225 return (ID)id; 17226 17227 if (rb_is_attrset_name(name)) { 17228 fake_str.as.heap.len = len - 1; 17229 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) { 17230 return rb_id_attrset((ID)id); 17231 } 17232 } 17233 17234 return (ID)0; 17235 } 17236 17237 int 17238 rb_is_const_name(VALUE name) 17239 { 17240 return rb_str_symname_type(name, 0) == ID_CONST; 17241 } 17242 17243 int 17244 rb_is_class_name(VALUE name) 17245 { 17246 return rb_str_symname_type(name, 0) == ID_CLASS; 17247 } 17248 17249 int 17250 rb_is_global_name(VALUE name) 17251 { 17252 return rb_str_symname_type(name, 0) == ID_GLOBAL; 17253 } 17254 17255 int 17256 rb_is_instance_name(VALUE name) 17257 { 17258 return rb_str_symname_type(name, 0) == ID_INSTANCE; 17259 } 17260 17261 int 17262 rb_is_attrset_name(VALUE name) 17263 { 17264 return rb_str_symname_type(name, IDSET_ATTRSET_FOR_INTERN) == ID_ATTRSET; 17265 } 17266 17267 int 17268 rb_is_local_name(VALUE name) 17269 { 17270 return rb_str_symname_type(name, 0) == ID_LOCAL; 17271 } 17272 17273 int 17274 rb_is_method_name(VALUE name) 17275 { 17276 switch (rb_str_symname_type(name, 0)) { 17277 case ID_LOCAL: case ID_ATTRSET: case ID_JUNK: 17278 return TRUE; 17279 } 17280 return FALSE; 17281 } 17282 17283 int 17284 rb_is_junk_name(VALUE name) 17285 { 17286 return rb_str_symname_type(name, IDSET_ATTRSET_FOR_SYNTAX) == -1; 17287 } 17288 17289 #endif /* !RIPPER */ 17290 17291 static void 17292 parser_initialize(struct parser_params *parser) 17293 { 17294 parser->eofp = Qfalse; 17295 17296 parser->parser_lex_strterm = 0; 17297 parser->parser_cond_stack = 0; 17298 parser->parser_cmdarg_stack = 0; 17299 parser->parser_class_nest = 0; 17300 parser->parser_paren_nest = 0; 17301 parser->parser_lpar_beg = 0; 17302 parser->parser_brace_nest = 0; 17303 parser->parser_in_single = 0; 17304 parser->parser_in_def = 0; 17305 parser->parser_in_defined = 0; 17306 parser->parser_compile_for_eval = 0; 17307 parser->parser_cur_mid = 0; 17308 parser->parser_tokenbuf = NULL; 17309 parser->parser_tokidx = 0; 17310 parser->parser_toksiz = 0; 17311 parser->parser_heredoc_end = 0; 17312 parser->parser_command_start = TRUE; 17313 parser->parser_deferred_nodes = 0; 17314 parser->parser_lex_pbeg = 0; 17315 parser->parser_lex_p = 0; 17316 parser->parser_lex_pend = 0; 17317 parser->parser_lvtbl = 0; 17318 parser->parser_ruby__end__seen = 0; 17319 parser->parser_ruby_sourcefile = 0; 17320 parser->parser_ruby_sourcefile_string = Qnil; 17321 #ifndef RIPPER 17322 parser->is_ripper = 0; 17323 parser->parser_eval_tree_begin = 0; 17324 parser->parser_eval_tree = 0; 17325 #else 17326 parser->is_ripper = 1; 17327 parser->delayed = Qnil; 17328 17329 parser->result = Qnil; 17330 parser->parsing_thread = Qnil; 17331 parser->toplevel_p = TRUE; 17332 #endif 17333 #ifdef YYMALLOC 17334 parser->heap = NULL; 17335 #endif 17336 parser->enc = rb_utf8_encoding(); 17337 } 17338 17339 #ifdef RIPPER 17340 #define parser_mark ripper_parser_mark 17341 #define parser_free ripper_parser_free 17342 #endif 17343 17344 static void 17345 parser_mark(void *ptr) 17346 { 17347 struct parser_params *p = (struct parser_params*)ptr; 17348 17349 rb_gc_mark((VALUE)p->parser_lex_strterm); 17350 rb_gc_mark((VALUE)p->parser_deferred_nodes); 17351 rb_gc_mark(p->parser_lex_input); 17352 rb_gc_mark(p->parser_lex_lastline); 17353 rb_gc_mark(p->parser_lex_nextline); 17354 rb_gc_mark(p->parser_ruby_sourcefile_string); 17355 #ifndef RIPPER 17356 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 17357 rb_gc_mark((VALUE)p->parser_eval_tree) ; 17358 rb_gc_mark(p->debug_lines); 17359 #else 17360 rb_gc_mark(p->delayed); 17361 rb_gc_mark(p->value); 17362 rb_gc_mark(p->result); 17363 rb_gc_mark(p->parsing_thread); 17364 #endif 17365 #ifdef YYMALLOC 17366 rb_gc_mark((VALUE)p->heap); 17367 #endif 17368 } 17369 17370 static void 17371 parser_free(void *ptr) 17372 { 17373 struct parser_params *p = (struct parser_params*)ptr; 17374 struct local_vars *local, *prev; 17375 17376 if (p->parser_tokenbuf) { 17377 xfree(p->parser_tokenbuf); 17378 } 17379 for (local = p->parser_lvtbl; local; local = prev) { 17380 if (local->vars) xfree(local->vars); 17381 prev = local->prev; 17382 xfree(local); 17383 } 17384 xfree(p); 17385 } 17386 17387 static size_t 17388 parser_memsize(const void *ptr) 17389 { 17390 struct parser_params *p = (struct parser_params*)ptr; 17391 struct local_vars *local; 17392 size_t size = sizeof(*p); 17393 17394 if (!ptr) return 0; 17395 size += p->parser_toksiz; 17396 for (local = p->parser_lvtbl; local; local = local->prev) { 17397 size += sizeof(*local); 17398 if (local->vars) size += local->vars->capa * sizeof(ID); 17399 } 17400 return size; 17401 } 17402 17403 static 17404 #ifndef RIPPER 17405 const 17406 #endif 17407 rb_data_type_t parser_data_type = { 17408 "parser", 17409 { 17410 parser_mark, 17411 parser_free, 17412 parser_memsize, 17413 }, 17414 }; 17415 17416 #ifndef RIPPER 17417 #undef rb_reserved_word 17418 17419 const struct kwtable * 17420 rb_reserved_word(const char *str, unsigned int len) 17421 { 17422 return reserved_word(str, len); 17423 } 17424 17425 static struct parser_params * 17426 parser_new(void) 17427 { 17428 struct parser_params *p; 17429 17430 p = ALLOC_N(struct parser_params, 1); 17431 MEMZERO(p, struct parser_params, 1); 17432 parser_initialize(p); 17433 return p; 17434 } 17435 17436 VALUE 17437 rb_parser_new(void) 17438 { 17439 struct parser_params *p = parser_new(); 17440 17441 return TypedData_Wrap_Struct(0, &parser_data_type, p); 17442 } 17443 17444 /* 17445 * call-seq: 17446 * ripper#end_seen? -> Boolean 17447 * 17448 * Return true if parsed source ended by +\_\_END\_\_+. 17449 */ 17450 VALUE 17451 rb_parser_end_seen_p(VALUE vparser) 17452 { 17453 struct parser_params *parser; 17454 17455 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17456 return ruby__end__seen ? Qtrue : Qfalse; 17457 } 17458 17459 /* 17460 * call-seq: 17461 * ripper#encoding -> encoding 17462 * 17463 * Return encoding of the source. 17464 */ 17465 VALUE 17466 rb_parser_encoding(VALUE vparser) 17467 { 17468 struct parser_params *parser; 17469 17470 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17471 return rb_enc_from_encoding(current_enc); 17472 } 17473 17474 /* 17475 * call-seq: 17476 * ripper.yydebug -> true or false 17477 * 17478 * Get yydebug. 17479 */ 17480 VALUE 17481 rb_parser_get_yydebug(VALUE self) 17482 { 17483 struct parser_params *parser; 17484 17485 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17486 return yydebug ? Qtrue : Qfalse; 17487 } 17488 17489 /* 17490 * call-seq: 17491 * ripper.yydebug = flag 17492 * 17493 * Set yydebug. 17494 */ 17495 VALUE 17496 rb_parser_set_yydebug(VALUE self, VALUE flag) 17497 { 17498 struct parser_params *parser; 17499 17500 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17501 yydebug = RTEST(flag); 17502 return flag; 17503 } 17504 17505 #ifdef YYMALLOC 17506 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 17507 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 17508 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 17509 (n)->u3.cnt = (c), (p)) 17510 17511 void * 17512 rb_parser_malloc(struct parser_params *parser, size_t size) 17513 { 17514 size_t cnt = HEAPCNT(1, size); 17515 NODE *n = NEWHEAP(); 17516 void *ptr = xmalloc(size); 17517 17518 return ADD2HEAP(n, cnt, ptr); 17519 } 17520 17521 void * 17522 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 17523 { 17524 size_t cnt = HEAPCNT(nelem, size); 17525 NODE *n = NEWHEAP(); 17526 void *ptr = xcalloc(nelem, size); 17527 17528 return ADD2HEAP(n, cnt, ptr); 17529 } 17530 17531 void * 17532 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 17533 { 17534 NODE *n; 17535 size_t cnt = HEAPCNT(1, size); 17536 17537 if (ptr && (n = parser->heap) != NULL) { 17538 do { 17539 if (n->u1.node == ptr) { 17540 n->u1.node = ptr = xrealloc(ptr, size); 17541 if (n->u3.cnt) n->u3.cnt = cnt; 17542 return ptr; 17543 } 17544 } while ((n = n->u2.node) != NULL); 17545 } 17546 n = NEWHEAP(); 17547 ptr = xrealloc(ptr, size); 17548 return ADD2HEAP(n, cnt, ptr); 17549 } 17550 17551 void 17552 rb_parser_free(struct parser_params *parser, void *ptr) 17553 { 17554 NODE **prev = &parser->heap, *n; 17555 17556 while ((n = *prev) != NULL) { 17557 if (n->u1.node == ptr) { 17558 *prev = n->u2.node; 17559 rb_gc_force_recycle((VALUE)n); 17560 break; 17561 } 17562 prev = &n->u2.node; 17563 } 17564 xfree(ptr); 17565 } 17566 #endif 17567 #endif 17568 17569 #ifdef RIPPER 17570 #ifdef RIPPER_DEBUG 17571 extern int rb_is_pointer_to_heap(VALUE); 17572 17573 /* :nodoc: */ 17574 static VALUE 17575 ripper_validate_object(VALUE self, VALUE x) 17576 { 17577 if (x == Qfalse) return x; 17578 if (x == Qtrue) return x; 17579 if (x == Qnil) return x; 17580 if (x == Qundef) 17581 rb_raise(rb_eArgError, "Qundef given"); 17582 if (FIXNUM_P(x)) return x; 17583 if (SYMBOL_P(x)) return x; 17584 if (!rb_is_pointer_to_heap(x)) 17585 rb_raise(rb_eArgError, "invalid pointer: %p", x); 17586 switch (TYPE(x)) { 17587 case T_STRING: 17588 case T_OBJECT: 17589 case T_ARRAY: 17590 case T_BIGNUM: 17591 case T_FLOAT: 17592 return x; 17593 case T_NODE: 17594 if (nd_type(x) != NODE_LASGN) { 17595 rb_raise(rb_eArgError, "NODE given: %p", x); 17596 } 17597 return ((NODE *)x)->nd_rval; 17598 default: 17599 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 17600 x, rb_obj_classname(x)); 17601 } 17602 return x; 17603 } 17604 #endif 17605 17606 #define validate(x) ((x) = get_value(x)) 17607 17608 static VALUE 17609 ripper_dispatch0(struct parser_params *parser, ID mid) 17610 { 17611 return rb_funcall(parser->value, mid, 0); 17612 } 17613 17614 static VALUE 17615 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 17616 { 17617 validate(a); 17618 return rb_funcall(parser->value, mid, 1, a); 17619 } 17620 17621 static VALUE 17622 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 17623 { 17624 validate(a); 17625 validate(b); 17626 return rb_funcall(parser->value, mid, 2, a, b); 17627 } 17628 17629 static VALUE 17630 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 17631 { 17632 validate(a); 17633 validate(b); 17634 validate(c); 17635 return rb_funcall(parser->value, mid, 3, a, b, c); 17636 } 17637 17638 static VALUE 17639 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 17640 { 17641 validate(a); 17642 validate(b); 17643 validate(c); 17644 validate(d); 17645 return rb_funcall(parser->value, mid, 4, a, b, c, d); 17646 } 17647 17648 static VALUE 17649 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 17650 { 17651 validate(a); 17652 validate(b); 17653 validate(c); 17654 validate(d); 17655 validate(e); 17656 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 17657 } 17658 17659 static VALUE 17660 ripper_dispatch7(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g) 17661 { 17662 validate(a); 17663 validate(b); 17664 validate(c); 17665 validate(d); 17666 validate(e); 17667 validate(f); 17668 validate(g); 17669 return rb_funcall(parser->value, mid, 7, a, b, c, d, e, f, g); 17670 } 17671 17672 static const struct kw_assoc { 17673 ID id; 17674 const char *name; 17675 } keyword_to_name[] = { 17676 {keyword_class, "class"}, 17677 {keyword_module, "module"}, 17678 {keyword_def, "def"}, 17679 {keyword_undef, "undef"}, 17680 {keyword_begin, "begin"}, 17681 {keyword_rescue, "rescue"}, 17682 {keyword_ensure, "ensure"}, 17683 {keyword_end, "end"}, 17684 {keyword_if, "if"}, 17685 {keyword_unless, "unless"}, 17686 {keyword_then, "then"}, 17687 {keyword_elsif, "elsif"}, 17688 {keyword_else, "else"}, 17689 {keyword_case, "case"}, 17690 {keyword_when, "when"}, 17691 {keyword_while, "while"}, 17692 {keyword_until, "until"}, 17693 {keyword_for, "for"}, 17694 {keyword_break, "break"}, 17695 {keyword_next, "next"}, 17696 {keyword_redo, "redo"}, 17697 {keyword_retry, "retry"}, 17698 {keyword_in, "in"}, 17699 {keyword_do, "do"}, 17700 {keyword_do_cond, "do"}, 17701 {keyword_do_block, "do"}, 17702 {keyword_return, "return"}, 17703 {keyword_yield, "yield"}, 17704 {keyword_super, "super"}, 17705 {keyword_self, "self"}, 17706 {keyword_nil, "nil"}, 17707 {keyword_true, "true"}, 17708 {keyword_false, "false"}, 17709 {keyword_and, "and"}, 17710 {keyword_or, "or"}, 17711 {keyword_not, "not"}, 17712 {modifier_if, "if"}, 17713 {modifier_unless, "unless"}, 17714 {modifier_while, "while"}, 17715 {modifier_until, "until"}, 17716 {modifier_rescue, "rescue"}, 17717 {keyword_alias, "alias"}, 17718 {keyword_defined, "defined?"}, 17719 {keyword_BEGIN, "BEGIN"}, 17720 {keyword_END, "END"}, 17721 {keyword__LINE__, "__LINE__"}, 17722 {keyword__FILE__, "__FILE__"}, 17723 {keyword__ENCODING__, "__ENCODING__"}, 17724 {0, NULL} 17725 }; 17726 17727 static const char* 17728 keyword_id_to_str(ID id) 17729 { 17730 const struct kw_assoc *a; 17731 17732 for (a = keyword_to_name; a->id; a++) { 17733 if (a->id == id) 17734 return a->name; 17735 } 17736 return NULL; 17737 } 17738 17739 #undef ripper_id2sym 17740 static VALUE 17741 ripper_id2sym(ID id) 17742 { 17743 const char *name; 17744 char buf[8]; 17745 17746 if (id <= 256) { 17747 buf[0] = (char)id; 17748 buf[1] = '\0'; 17749 return ID2SYM(rb_intern2(buf, 1)); 17750 } 17751 if ((name = keyword_id_to_str(id))) { 17752 return ID2SYM(rb_intern(name)); 17753 } 17754 switch (id) { 17755 case tOROP: 17756 name = "||"; 17757 break; 17758 case tANDOP: 17759 name = "&&"; 17760 break; 17761 default: 17762 name = rb_id2name(id); 17763 if (!name) { 17764 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 17765 } 17766 return ID2SYM(id); 17767 } 17768 return ID2SYM(rb_intern(name)); 17769 } 17770 17771 static ID 17772 ripper_get_id(VALUE v) 17773 { 17774 NODE *nd; 17775 if (!RB_TYPE_P(v, T_NODE)) return 0; 17776 nd = (NODE *)v; 17777 if (nd_type(nd) != NODE_LASGN) return 0; 17778 return nd->nd_vid; 17779 } 17780 17781 static VALUE 17782 ripper_get_value(VALUE v) 17783 { 17784 NODE *nd; 17785 if (v == Qundef) return Qnil; 17786 if (!RB_TYPE_P(v, T_NODE)) return v; 17787 nd = (NODE *)v; 17788 if (nd_type(nd) != NODE_LASGN) return Qnil; 17789 return nd->nd_rval; 17790 } 17791 17792 static void 17793 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 17794 { 17795 VALUE str; 17796 va_list args; 17797 17798 va_start(args, fmt); 17799 str = rb_vsprintf(fmt, args); 17800 va_end(args); 17801 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 17802 } 17803 17804 static void 17805 ripper_warn0(struct parser_params *parser, const char *fmt) 17806 { 17807 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 17808 } 17809 17810 static void 17811 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 17812 { 17813 rb_funcall(parser->value, rb_intern("warn"), 2, 17814 STR_NEW2(fmt), INT2NUM(a)); 17815 } 17816 17817 static void 17818 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 17819 { 17820 rb_funcall(parser->value, rb_intern("warn"), 2, 17821 STR_NEW2(fmt), STR_NEW2(str)); 17822 } 17823 17824 static void 17825 ripper_warning0(struct parser_params *parser, const char *fmt) 17826 { 17827 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 17828 } 17829 17830 static void 17831 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 17832 { 17833 rb_funcall(parser->value, rb_intern("warning"), 2, 17834 STR_NEW2(fmt), STR_NEW2(str)); 17835 } 17836 17837 static VALUE 17838 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 17839 { 17840 return rb_io_gets(src); 17841 } 17842 17843 static VALUE 17844 ripper_s_allocate(VALUE klass) 17845 { 17846 struct parser_params *p; 17847 VALUE self; 17848 17849 p = ALLOC_N(struct parser_params, 1); 17850 MEMZERO(p, struct parser_params, 1); 17851 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 17852 p->value = self; 17853 return self; 17854 } 17855 17856 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 17857 17858 /* 17859 * call-seq: 17860 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 17861 * 17862 * Create a new Ripper object. 17863 * _src_ must be a String, an IO, or an Object which has #gets method. 17864 * 17865 * This method does not starts parsing. 17866 * See also Ripper#parse and Ripper.parse. 17867 */ 17868 static VALUE 17869 ripper_initialize(int argc, VALUE *argv, VALUE self) 17870 { 17871 struct parser_params *parser; 17872 VALUE src, fname, lineno; 17873 17874 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17875 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 17876 if (RB_TYPE_P(src, T_FILE)) { 17877 parser->parser_lex_gets = ripper_lex_get_generic; 17878 } 17879 else { 17880 StringValue(src); 17881 parser->parser_lex_gets = lex_get_str; 17882 } 17883 parser->parser_lex_input = src; 17884 parser->eofp = Qfalse; 17885 if (NIL_P(fname)) { 17886 fname = STR_NEW2("(ripper)"); 17887 } 17888 else { 17889 StringValue(fname); 17890 } 17891 parser_initialize(parser); 17892 17893 parser->parser_ruby_sourcefile_string = fname; 17894 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 17895 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 17896 17897 return Qnil; 17898 } 17899 17900 struct ripper_args { 17901 struct parser_params *parser; 17902 int argc; 17903 VALUE *argv; 17904 }; 17905 17906 static VALUE 17907 ripper_parse0(VALUE parser_v) 17908 { 17909 struct parser_params *parser; 17910 17911 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17912 parser_prepare(parser); 17913 ripper_yyparse((void*)parser); 17914 return parser->result; 17915 } 17916 17917 static VALUE 17918 ripper_ensure(VALUE parser_v) 17919 { 17920 struct parser_params *parser; 17921 17922 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17923 parser->parsing_thread = Qnil; 17924 return Qnil; 17925 } 17926 17927 /* 17928 * call-seq: 17929 * ripper#parse 17930 * 17931 * Start parsing and returns the value of the root action. 17932 */ 17933 static VALUE 17934 ripper_parse(VALUE self) 17935 { 17936 struct parser_params *parser; 17937 17938 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17939 if (!ripper_initialized_p(parser)) { 17940 rb_raise(rb_eArgError, "method called for uninitialized object"); 17941 } 17942 if (!NIL_P(parser->parsing_thread)) { 17943 if (parser->parsing_thread == rb_thread_current()) 17944 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 17945 else 17946 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 17947 } 17948 parser->parsing_thread = rb_thread_current(); 17949 rb_ensure(ripper_parse0, self, ripper_ensure, self); 17950 17951 return parser->result; 17952 } 17953 17954 /* 17955 * call-seq: 17956 * ripper#column -> Integer 17957 * 17958 * Return column number of current parsing line. 17959 * This number starts from 0. 17960 */ 17961 static VALUE 17962 ripper_column(VALUE self) 17963 { 17964 struct parser_params *parser; 17965 long col; 17966 17967 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17968 if (!ripper_initialized_p(parser)) { 17969 rb_raise(rb_eArgError, "method called for uninitialized object"); 17970 } 17971 if (NIL_P(parser->parsing_thread)) return Qnil; 17972 col = parser->tokp - parser->parser_lex_pbeg; 17973 return LONG2NUM(col); 17974 } 17975 17976 /* 17977 * call-seq: 17978 * ripper#filename -> String 17979 * 17980 * Return current parsing filename. 17981 */ 17982 static VALUE 17983 ripper_filename(VALUE self) 17984 { 17985 struct parser_params *parser; 17986 17987 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17988 if (!ripper_initialized_p(parser)) { 17989 rb_raise(rb_eArgError, "method called for uninitialized object"); 17990 } 17991 return parser->parser_ruby_sourcefile_string; 17992 } 17993 17994 /* 17995 * call-seq: 17996 * ripper#lineno -> Integer 17997 * 17998 * Return line number of current parsing line. 17999 * This number starts from 1. 18000 */ 18001 static VALUE 18002 ripper_lineno(VALUE self) 18003 { 18004 struct parser_params *parser; 18005 18006 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 18007 if (!ripper_initialized_p(parser)) { 18008 rb_raise(rb_eArgError, "method called for uninitialized object"); 18009 } 18010 if (NIL_P(parser->parsing_thread)) return Qnil; 18011 return INT2NUM(parser->parser_ruby_sourceline); 18012 } 18013 18014 #ifdef RIPPER_DEBUG 18015 /* :nodoc: */ 18016 static VALUE 18017 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 18018 { 18019 StringValue(msg); 18020 if (obj == Qundef) { 18021 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 18022 } 18023 return Qnil; 18024 } 18025 18026 /* :nodoc: */ 18027 static VALUE 18028 ripper_value(VALUE self, VALUE obj) 18029 { 18030 return ULONG2NUM(obj); 18031 } 18032 #endif 18033 18034 18035 void 18036 Init_ripper(void) 18037 { 18038 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 18039 18040 ripper_init_eventids1(); 18041 ripper_init_eventids2(); 18042 /* ensure existing in symbol table */ 18043 (void)rb_intern("||"); 18044 (void)rb_intern("&&"); 18045 18046 InitVM(ripper); 18047 } 18048 18049 void 18050 InitVM_ripper(void) 18051 { 18052 VALUE Ripper; 18053 18054 Ripper = rb_define_class("Ripper", rb_cObject); 18055 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 18056 rb_define_alloc_func(Ripper, ripper_s_allocate); 18057 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 18058 rb_define_method(Ripper, "parse", ripper_parse, 0); 18059 rb_define_method(Ripper, "column", ripper_column, 0); 18060 rb_define_method(Ripper, "filename", ripper_filename, 0); 18061 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 18062 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 18063 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 18064 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 18065 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 18066 #ifdef RIPPER_DEBUG 18067 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 18068 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 18069 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 18070 #endif 18071 18072 ripper_init_eventids1_table(Ripper); 18073 ripper_init_eventids2_table(Ripper); 18074 18075 # if 0 18076 /* Hack to let RDoc document SCRIPT_LINES__ */ 18077 18078 /* 18079 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 18080 * after the assignment will be added as an Array of lines with the file 18081 * name as the key. 18082 */ 18083 rb_define_global_const("SCRIPT_LINES__", Qnil); 18084 #endif 18085 18086 } 18087 #endif /* RIPPER */ 18088 18089
1.7.6.1