|
Ruby
2.0.0p353(2013-11-22revision43784)
|
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 }; 00194 00195 #define DVARS_INHERIT ((void*)1) 00196 #define DVARS_TOPSCOPE NULL 00197 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00198 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00199 00200 static int 00201 vtable_size(const struct vtable *tbl) 00202 { 00203 if (POINTER_P(tbl)) { 00204 return tbl->pos; 00205 } 00206 else { 00207 return 0; 00208 } 00209 } 00210 00211 #define VTBL_DEBUG 0 00212 00213 static struct vtable * 00214 vtable_alloc(struct vtable *prev) 00215 { 00216 struct vtable *tbl = ALLOC(struct vtable); 00217 tbl->pos = 0; 00218 tbl->capa = 8; 00219 tbl->tbl = ALLOC_N(ID, tbl->capa); 00220 tbl->prev = prev; 00221 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00222 return tbl; 00223 } 00224 00225 static void 00226 vtable_free(struct vtable *tbl) 00227 { 00228 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00229 if (POINTER_P(tbl)) { 00230 if (tbl->tbl) { 00231 xfree(tbl->tbl); 00232 } 00233 xfree(tbl); 00234 } 00235 } 00236 00237 static void 00238 vtable_add(struct vtable *tbl, ID id) 00239 { 00240 if (!POINTER_P(tbl)) { 00241 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00242 } 00243 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00244 00245 if (tbl->pos == tbl->capa) { 00246 tbl->capa = tbl->capa * 2; 00247 REALLOC_N(tbl->tbl, ID, tbl->capa); 00248 } 00249 tbl->tbl[tbl->pos++] = id; 00250 } 00251 00252 static int 00253 vtable_included(const struct vtable * tbl, ID id) 00254 { 00255 int i; 00256 00257 if (POINTER_P(tbl)) { 00258 for (i = 0; i < tbl->pos; i++) { 00259 if (tbl->tbl[i] == id) { 00260 return i+1; 00261 } 00262 } 00263 } 00264 return 0; 00265 } 00266 00267 00268 #ifndef RIPPER 00269 typedef struct token_info { 00270 const char *token; 00271 int linenum; 00272 int column; 00273 int nonspc; 00274 struct token_info *next; 00275 } token_info; 00276 #endif 00277 00278 /* 00279 Structure of Lexer Buffer: 00280 00281 lex_pbeg tokp lex_p lex_pend 00282 | | | | 00283 |-----------+--------------+------------| 00284 |<------------>| 00285 token 00286 */ 00287 struct parser_params { 00288 int is_ripper; 00289 NODE *heap; 00290 00291 YYSTYPE *parser_yylval; 00292 VALUE eofp; 00293 00294 NODE *parser_lex_strterm; 00295 enum lex_state_e parser_lex_state; 00296 stack_type parser_cond_stack; 00297 stack_type parser_cmdarg_stack; 00298 int parser_class_nest; 00299 int parser_paren_nest; 00300 int parser_lpar_beg; 00301 int parser_in_single; 00302 int parser_in_def; 00303 int parser_brace_nest; 00304 int parser_compile_for_eval; 00305 VALUE parser_cur_mid; 00306 int parser_in_defined; 00307 char *parser_tokenbuf; 00308 int parser_tokidx; 00309 int parser_toksiz; 00310 int parser_tokline; 00311 VALUE parser_lex_input; 00312 VALUE parser_lex_lastline; 00313 VALUE parser_lex_nextline; 00314 const char *parser_lex_pbeg; 00315 const char *parser_lex_p; 00316 const char *parser_lex_pend; 00317 int parser_heredoc_end; 00318 int parser_command_start; 00319 NODE *parser_deferred_nodes; 00320 long parser_lex_gets_ptr; 00321 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00322 struct local_vars *parser_lvtbl; 00323 int parser_ruby__end__seen; 00324 int line_count; 00325 int has_shebang; 00326 char *parser_ruby_sourcefile; /* current source file */ 00327 int parser_ruby_sourceline; /* current line no. */ 00328 rb_encoding *enc; 00329 00330 int parser_yydebug; 00331 00332 #ifndef RIPPER 00333 /* Ruby core only */ 00334 NODE *parser_eval_tree_begin; 00335 NODE *parser_eval_tree; 00336 VALUE debug_lines; 00337 VALUE coverage; 00338 int nerr; 00339 00340 int parser_token_info_enabled; 00341 token_info *parser_token_info; 00342 #else 00343 /* Ripper only */ 00344 VALUE parser_ruby_sourcefile_string; 00345 const char *tokp; 00346 VALUE delayed; 00347 int delayed_line; 00348 int delayed_col; 00349 00350 VALUE value; 00351 VALUE result; 00352 VALUE parsing_thread; 00353 int toplevel_p; 00354 #endif 00355 }; 00356 00357 #define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc) 00358 #define STR_NEW0() rb_enc_str_new(0,0,current_enc) 00359 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc) 00360 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),current_enc) 00361 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00362 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), current_enc) 00363 00364 static int parser_yyerror(struct parser_params*, const char*); 00365 #define yyerror(msg) parser_yyerror(parser, (msg)) 00366 00367 #define lex_strterm (parser->parser_lex_strterm) 00368 #define lex_state (parser->parser_lex_state) 00369 #define cond_stack (parser->parser_cond_stack) 00370 #define cmdarg_stack (parser->parser_cmdarg_stack) 00371 #define class_nest (parser->parser_class_nest) 00372 #define paren_nest (parser->parser_paren_nest) 00373 #define lpar_beg (parser->parser_lpar_beg) 00374 #define brace_nest (parser->parser_brace_nest) 00375 #define in_single (parser->parser_in_single) 00376 #define in_def (parser->parser_in_def) 00377 #define compile_for_eval (parser->parser_compile_for_eval) 00378 #define cur_mid (parser->parser_cur_mid) 00379 #define in_defined (parser->parser_in_defined) 00380 #define tokenbuf (parser->parser_tokenbuf) 00381 #define tokidx (parser->parser_tokidx) 00382 #define toksiz (parser->parser_toksiz) 00383 #define tokline (parser->parser_tokline) 00384 #define lex_input (parser->parser_lex_input) 00385 #define lex_lastline (parser->parser_lex_lastline) 00386 #define lex_nextline (parser->parser_lex_nextline) 00387 #define lex_pbeg (parser->parser_lex_pbeg) 00388 #define lex_p (parser->parser_lex_p) 00389 #define lex_pend (parser->parser_lex_pend) 00390 #define heredoc_end (parser->parser_heredoc_end) 00391 #define command_start (parser->parser_command_start) 00392 #define deferred_nodes (parser->parser_deferred_nodes) 00393 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00394 #define lex_gets (parser->parser_lex_gets) 00395 #define lvtbl (parser->parser_lvtbl) 00396 #define ruby__end__seen (parser->parser_ruby__end__seen) 00397 #define ruby_sourceline (parser->parser_ruby_sourceline) 00398 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00399 #define current_enc (parser->enc) 00400 #define yydebug (parser->parser_yydebug) 00401 #ifdef RIPPER 00402 #else 00403 #define ruby_eval_tree (parser->parser_eval_tree) 00404 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00405 #define ruby_debug_lines (parser->debug_lines) 00406 #define ruby_coverage (parser->coverage) 00407 #endif 00408 00409 #if YYPURE 00410 static int yylex(void*, void*); 00411 #else 00412 static int yylex(void*); 00413 #endif 00414 00415 #ifndef RIPPER 00416 #define yyparse ruby_yyparse 00417 00418 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00419 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 00420 00421 static NODE *cond_gen(struct parser_params*,NODE*); 00422 #define cond(node) cond_gen(parser, (node)) 00423 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00424 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 00425 00426 static NODE *newline_node(NODE*); 00427 static void fixpos(NODE*,NODE*); 00428 00429 static int value_expr_gen(struct parser_params*,NODE*); 00430 static void void_expr_gen(struct parser_params*,NODE*); 00431 static NODE *remove_begin(NODE*); 00432 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00433 #define void_expr0(node) void_expr_gen(parser, (node)) 00434 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00435 static void void_stmts_gen(struct parser_params*,NODE*); 00436 #define void_stmts(node) void_stmts_gen(parser, (node)) 00437 static void reduce_nodes_gen(struct parser_params*,NODE**); 00438 #define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 00439 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00440 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 00441 00442 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00443 #define block_append(h,t) block_append_gen(parser,(h),(t)) 00444 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00445 #define list_append(l,i) list_append_gen(parser,(l),(i)) 00446 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00447 #define list_concat(h,t) list_concat_gen(parser,(h),(t)) 00448 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00449 #define arg_append(h,t) arg_append_gen(parser,(h),(t)) 00450 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00451 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 00452 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00453 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 00454 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00455 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00456 #define new_evstr(n) new_evstr_gen(parser,(n)) 00457 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00458 #define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 00459 static NODE *splat_array(NODE*); 00460 00461 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00462 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 00463 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00464 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 00465 00466 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*); 00467 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 00468 static NODE *new_args_tail_gen(struct parser_params*,NODE*,ID,ID); 00469 #define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 00470 00471 static NODE *negate_lit(NODE*); 00472 static NODE *ret_args_gen(struct parser_params*,NODE*); 00473 #define ret_args(node) ret_args_gen(parser, (node)) 00474 static NODE *arg_blk_pass(NODE*,NODE*); 00475 static NODE *new_yield_gen(struct parser_params*,NODE*); 00476 #define new_yield(node) new_yield_gen(parser, (node)) 00477 static NODE *dsym_node_gen(struct parser_params*,NODE*); 00478 #define dsym_node(node) dsym_node_gen(parser, (node)) 00479 00480 static NODE *gettable_gen(struct parser_params*,ID); 00481 #define gettable(id) gettable_gen(parser,(id)) 00482 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00483 #define assignable(id,node) assignable_gen(parser, (id), (node)) 00484 00485 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00486 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 00487 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00488 #define attrset(node,id) attrset_gen(parser, (node), (id)) 00489 00490 static void rb_backref_error_gen(struct parser_params*,NODE*); 00491 #define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 00492 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00493 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 00494 00495 static NODE *new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 00496 static NODE *new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs); 00497 #define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs)) 00498 static NODE *new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 00499 #define new_const_op_assign(lhs, op, rhs) new_const_op_assign_gen(parser, (lhs), (op), (rhs)) 00500 00501 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00502 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 00503 00504 static ID *local_tbl_gen(struct parser_params*); 00505 #define local_tbl() local_tbl_gen(parser) 00506 00507 static void fixup_nodes(NODE **); 00508 00509 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00510 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 00511 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00512 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 00513 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00514 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 00515 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00516 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 00517 00518 #define get_id(id) (id) 00519 #define get_value(val) (val) 00520 #else 00521 #define value_expr(node) ((void)(node)) 00522 #define remove_begin(node) (node) 00523 #define rb_dvar_defined(id) 0 00524 #define rb_local_defined(id) 0 00525 static ID ripper_get_id(VALUE); 00526 #define get_id(id) ripper_get_id(id) 00527 static VALUE ripper_get_value(VALUE); 00528 #define get_value(val) ripper_get_value(val) 00529 static VALUE assignable_gen(struct parser_params*,VALUE); 00530 #define assignable(lhs,node) assignable_gen(parser, (lhs)) 00531 static int id_is_var_gen(struct parser_params *parser, ID id); 00532 #define id_is_var(id) id_is_var_gen(parser, (id)) 00533 00534 #define node_assign(node1, node2) dispatch2(assign, (node1), (node2)) 00535 00536 static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs); 00537 static VALUE new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs); 00538 #define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs)) 00539 00540 #endif /* !RIPPER */ 00541 00542 #define new_op_assign(lhs, op, rhs) new_op_assign_gen(parser, (lhs), (op), (rhs)) 00543 00544 static ID formal_argument_gen(struct parser_params*, ID); 00545 #define formal_argument(id) formal_argument_gen(parser, (id)) 00546 static ID shadowing_lvar_gen(struct parser_params*,ID); 00547 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 00548 static void new_bv_gen(struct parser_params*,ID); 00549 #define new_bv(id) new_bv_gen(parser, (id)) 00550 00551 static void local_push_gen(struct parser_params*,int); 00552 #define local_push(top) local_push_gen(parser,(top)) 00553 static void local_pop_gen(struct parser_params*); 00554 #define local_pop() local_pop_gen(parser) 00555 static int local_var_gen(struct parser_params*, ID); 00556 #define local_var(id) local_var_gen(parser, (id)) 00557 static int arg_var_gen(struct parser_params*, ID); 00558 #define arg_var(id) arg_var_gen(parser, (id)) 00559 static int local_id_gen(struct parser_params*, ID); 00560 #define local_id(id) local_id_gen(parser, (id)) 00561 static ID internal_id_gen(struct parser_params*); 00562 #define internal_id() internal_id_gen(parser) 00563 00564 static const struct vtable *dyna_push_gen(struct parser_params *); 00565 #define dyna_push() dyna_push_gen(parser) 00566 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00567 #define dyna_pop(node) dyna_pop_gen(parser, (node)) 00568 static int dyna_in_block_gen(struct parser_params*); 00569 #define dyna_in_block() dyna_in_block_gen(parser) 00570 #define dyna_var(id) local_var(id) 00571 static int dvar_defined_gen(struct parser_params*,ID,int); 00572 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 00573 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 00574 static int dvar_curr_gen(struct parser_params*,ID); 00575 #define dvar_curr(id) dvar_curr_gen(parser, (id)) 00576 00577 static int lvar_defined_gen(struct parser_params*, ID); 00578 #define lvar_defined(id) lvar_defined_gen(parser, (id)) 00579 00580 #define RE_OPTION_ONCE (1<<16) 00581 #define RE_OPTION_ENCODING_SHIFT 8 00582 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00583 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00584 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00585 #define RE_OPTION_MASK 0xff 00586 #define RE_OPTION_ARG_ENCODING_NONE 32 00587 00588 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00589 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00590 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00591 #define nd_func u1.id 00592 #if SIZEOF_SHORT == 2 00593 #define nd_term(node) ((signed short)(node)->u2.id) 00594 #else 00595 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00596 #endif 00597 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00598 #define nd_nest u3.cnt 00599 00600 /****** Ripper *******/ 00601 00602 #ifdef RIPPER 00603 #define RIPPER_VERSION "0.1.0" 00604 00605 #include "eventids1.c" 00606 #include "eventids2.c" 00607 00608 static VALUE ripper_dispatch0(struct parser_params*,ID); 00609 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00610 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00611 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00612 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00613 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00614 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE); 00615 00616 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00617 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 00618 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 00619 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 00620 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 00621 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 00622 #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)) 00623 00624 #define yyparse ripper_yyparse 00625 00626 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00627 static VALUE ripper_id2sym(ID); 00628 #ifdef __GNUC__ 00629 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00630 ID2SYM(id) : ripper_id2sym(id)) 00631 #endif 00632 00633 #define arg_new() dispatch0(args_new) 00634 #define arg_add(l,a) dispatch2(args_add, (l), (a)) 00635 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 00636 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 00637 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 00638 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 00639 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 00640 00641 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 00642 #define mrhs_new() dispatch0(mrhs_new) 00643 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 00644 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 00645 00646 #define mlhs_new() dispatch0(mlhs_new) 00647 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 00648 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 00649 00650 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \ 00651 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk)) 00652 00653 #define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 00654 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 00655 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 00656 00657 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 00658 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 00659 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 00660 00661 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00662 00663 static inline VALUE 00664 new_args_gen(struct parser_params *parser, VALUE f, VALUE o, VALUE r, VALUE p, VALUE tail) 00665 { 00666 NODE *t = (NODE *)tail; 00667 VALUE k = t->u1.value, kr = t->u2.value, b = t->u3.value; 00668 return params_new(f, o, r, p, k, kr, escape_Qundef(b)); 00669 } 00670 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 00671 00672 static inline VALUE 00673 new_args_tail_gen(struct parser_params *parser, VALUE k, VALUE kr, VALUE b) 00674 { 00675 return (VALUE)rb_node_newnode(NODE_MEMO, k, kr, b); 00676 } 00677 #define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 00678 00679 #define FIXME 0 00680 00681 #endif /* RIPPER */ 00682 00683 #ifndef RIPPER 00684 # define Qnone 0 00685 # define ifndef_ripper(x) (x) 00686 #else 00687 # define Qnone Qnil 00688 # define ifndef_ripper(x) 00689 #endif 00690 00691 #ifndef RIPPER 00692 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 00693 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00694 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00695 # define rb_warn4S(file,line,fmt,a) rb_compile_warn((file), (line), (fmt), (a)) 00696 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 00697 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00698 #else 00699 # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 00700 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 00701 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 00702 # define rb_warn4S(file,line,fmt,a) ripper_warnS(parser, (fmt), (a)) 00703 # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 00704 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 00705 static void ripper_warn0(struct parser_params*, const char*); 00706 static void ripper_warnI(struct parser_params*, const char*, int); 00707 static void ripper_warnS(struct parser_params*, const char*, const char*); 00708 static void ripper_warning0(struct parser_params*, const char*); 00709 static void ripper_warningS(struct parser_params*, const char*, const char*); 00710 #endif 00711 00712 #ifdef RIPPER 00713 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00714 # define rb_compile_error ripper_compile_error 00715 # define compile_error ripper_compile_error 00716 # define PARSER_ARG parser, 00717 #else 00718 # define rb_compile_error rb_compile_error_with_enc 00719 # define compile_error parser->nerr++,rb_compile_error_with_enc 00720 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 00721 #endif 00722 00723 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00724 for instance). This is too low for Ruby to parse some files, such as 00725 date/format.rb, therefore bump the value up to at least Bison's default. */ 00726 #ifdef OLD_YACC 00727 #ifndef YYMAXDEPTH 00728 #define YYMAXDEPTH 10000 00729 #endif 00730 #endif 00731 00732 #ifndef RIPPER 00733 static void token_info_push(struct parser_params*, const char *token); 00734 static void token_info_pop(struct parser_params*, const char *token); 00735 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 00736 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 00737 #else 00738 #define token_info_push(token) /* nothing */ 00739 #define token_info_pop(token) /* nothing */ 00740 #endif 00741 00742 00743 /* Line 268 of yacc.c */ 00744 #line 745 "parse.c" 00745 00746 /* Enabling traces. */ 00747 #ifndef YYDEBUG 00748 # define YYDEBUG 1 00749 #endif 00750 00751 /* Enabling verbose error messages. */ 00752 #ifdef YYERROR_VERBOSE 00753 # undef YYERROR_VERBOSE 00754 # define YYERROR_VERBOSE 1 00755 #else 00756 # define YYERROR_VERBOSE 0 00757 #endif 00758 00759 /* Enabling the token table. */ 00760 #ifndef YYTOKEN_TABLE 00761 # define YYTOKEN_TABLE 0 00762 #endif 00763 00764 00765 /* Tokens. */ 00766 #ifndef YYTOKENTYPE 00767 # define YYTOKENTYPE 00768 /* Put the tokens into the symbol table, so that GDB and other debuggers 00769 know about them. */ 00770 enum yytokentype { 00771 END_OF_INPUT = 0, 00772 keyword_class = 258, 00773 keyword_module = 259, 00774 keyword_def = 260, 00775 keyword_undef = 261, 00776 keyword_begin = 262, 00777 keyword_rescue = 263, 00778 keyword_ensure = 264, 00779 keyword_end = 265, 00780 keyword_if = 266, 00781 keyword_unless = 267, 00782 keyword_then = 268, 00783 keyword_elsif = 269, 00784 keyword_else = 270, 00785 keyword_case = 271, 00786 keyword_when = 272, 00787 keyword_while = 273, 00788 keyword_until = 274, 00789 keyword_for = 275, 00790 keyword_break = 276, 00791 keyword_next = 277, 00792 keyword_redo = 278, 00793 keyword_retry = 279, 00794 keyword_in = 280, 00795 keyword_do = 281, 00796 keyword_do_cond = 282, 00797 keyword_do_block = 283, 00798 keyword_do_LAMBDA = 284, 00799 keyword_return = 285, 00800 keyword_yield = 286, 00801 keyword_super = 287, 00802 keyword_self = 288, 00803 keyword_nil = 289, 00804 keyword_true = 290, 00805 keyword_false = 291, 00806 keyword_and = 292, 00807 keyword_or = 293, 00808 keyword_not = 294, 00809 modifier_if = 295, 00810 modifier_unless = 296, 00811 modifier_while = 297, 00812 modifier_until = 298, 00813 modifier_rescue = 299, 00814 keyword_alias = 300, 00815 keyword_defined = 301, 00816 keyword_BEGIN = 302, 00817 keyword_END = 303, 00818 keyword__LINE__ = 304, 00819 keyword__FILE__ = 305, 00820 keyword__ENCODING__ = 306, 00821 tIDENTIFIER = 307, 00822 tFID = 308, 00823 tGVAR = 309, 00824 tIVAR = 310, 00825 tCONSTANT = 311, 00826 tCVAR = 312, 00827 tLABEL = 313, 00828 tINTEGER = 314, 00829 tFLOAT = 315, 00830 tSTRING_CONTENT = 316, 00831 tCHAR = 317, 00832 tNTH_REF = 318, 00833 tBACK_REF = 319, 00834 tREGEXP_END = 320, 00835 tUPLUS = 130, 00836 tUMINUS = 131, 00837 tPOW = 132, 00838 tCMP = 134, 00839 tEQ = 139, 00840 tEQQ = 140, 00841 tNEQ = 141, 00842 tGEQ = 138, 00843 tLEQ = 137, 00844 tANDOP = 321, 00845 tOROP = 322, 00846 tMATCH = 142, 00847 tNMATCH = 143, 00848 tDOT2 = 128, 00849 tDOT3 = 129, 00850 tAREF = 144, 00851 tASET = 145, 00852 tLSHFT = 135, 00853 tRSHFT = 136, 00854 tCOLON2 = 323, 00855 tCOLON3 = 324, 00856 tOP_ASGN = 325, 00857 tASSOC = 326, 00858 tLPAREN = 327, 00859 tLPAREN_ARG = 328, 00860 tRPAREN = 329, 00861 tLBRACK = 330, 00862 tLBRACE = 331, 00863 tLBRACE_ARG = 332, 00864 tSTAR = 333, 00865 tDSTAR = 334, 00866 tAMPER = 335, 00867 tLAMBDA = 336, 00868 tSYMBEG = 337, 00869 tSTRING_BEG = 338, 00870 tXSTRING_BEG = 339, 00871 tREGEXP_BEG = 340, 00872 tWORDS_BEG = 341, 00873 tQWORDS_BEG = 342, 00874 tSYMBOLS_BEG = 343, 00875 tQSYMBOLS_BEG = 344, 00876 tSTRING_DBEG = 345, 00877 tSTRING_DEND = 346, 00878 tSTRING_DVAR = 347, 00879 tSTRING_END = 348, 00880 tLAMBEG = 349, 00881 tLOWEST = 350, 00882 tUMINUS_NUM = 351, 00883 tLAST_TOKEN = 352 00884 }; 00885 #endif 00886 00887 00888 00889 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00890 typedef union YYSTYPE 00891 { 00892 00893 /* Line 293 of yacc.c */ 00894 #line 689 "ripper.y" 00895 00896 VALUE val; 00897 NODE *node; 00898 ID id; 00899 int num; 00900 const struct vtable *vars; 00901 00902 00903 00904 /* Line 293 of yacc.c */ 00905 #line 906 "parse.c" 00906 } YYSTYPE; 00907 # define YYSTYPE_IS_TRIVIAL 1 00908 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00909 # define YYSTYPE_IS_DECLARED 1 00910 #endif 00911 00912 00913 /* Copy the second part of user declarations. */ 00914 00915 00916 /* Line 343 of yacc.c */ 00917 #line 918 "parse.c" 00918 00919 #ifdef short 00920 # undef short 00921 #endif 00922 00923 #ifdef YYTYPE_UINT8 00924 typedef YYTYPE_UINT8 yytype_uint8; 00925 #else 00926 typedef unsigned char yytype_uint8; 00927 #endif 00928 00929 #ifdef YYTYPE_INT8 00930 typedef YYTYPE_INT8 yytype_int8; 00931 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00932 || defined __cplusplus || defined _MSC_VER) 00933 typedef signed char yytype_int8; 00934 #else 00935 typedef short int yytype_int8; 00936 #endif 00937 00938 #ifdef YYTYPE_UINT16 00939 typedef YYTYPE_UINT16 yytype_uint16; 00940 #else 00941 typedef unsigned short int yytype_uint16; 00942 #endif 00943 00944 #ifdef YYTYPE_INT16 00945 typedef YYTYPE_INT16 yytype_int16; 00946 #else 00947 typedef short int yytype_int16; 00948 #endif 00949 00950 #ifndef YYSIZE_T 00951 # ifdef __SIZE_TYPE__ 00952 # define YYSIZE_T __SIZE_TYPE__ 00953 # elif defined size_t 00954 # define YYSIZE_T size_t 00955 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00956 || defined __cplusplus || defined _MSC_VER) 00957 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00958 # define YYSIZE_T size_t 00959 # else 00960 # define YYSIZE_T unsigned int 00961 # endif 00962 #endif 00963 00964 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00965 00966 #ifndef YY_ 00967 # if defined YYENABLE_NLS && YYENABLE_NLS 00968 # if ENABLE_NLS 00969 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00970 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00971 # endif 00972 # endif 00973 # ifndef YY_ 00974 # define YY_(msgid) msgid 00975 # endif 00976 #endif 00977 00978 /* Suppress unused-variable warnings by "using" E. */ 00979 #if ! defined lint || defined __GNUC__ 00980 # define YYUSE(e) ((void) (e)) 00981 #else 00982 # define YYUSE(e) /* empty */ 00983 #endif 00984 00985 /* Identity function, used to suppress warnings about constant conditions. */ 00986 #ifndef lint 00987 # define YYID(n) (n) 00988 #else 00989 #if (defined __STDC__ || defined __C99__FUNC__ \ 00990 || defined __cplusplus || defined _MSC_VER) 00991 static int 00992 YYID (int yyi) 00993 #else 00994 static int 00995 YYID (yyi) 00996 int yyi; 00997 #endif 00998 { 00999 return yyi; 01000 } 01001 #endif 01002 01003 #if ! defined yyoverflow || YYERROR_VERBOSE 01004 01005 /* The parser invokes alloca or malloc; define the necessary symbols. */ 01006 01007 # ifdef YYSTACK_USE_ALLOCA 01008 # if YYSTACK_USE_ALLOCA 01009 # ifdef __GNUC__ 01010 # define YYSTACK_ALLOC __builtin_alloca 01011 # elif defined __BUILTIN_VA_ARG_INCR 01012 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 01013 # elif defined _AIX 01014 # define YYSTACK_ALLOC __alloca 01015 # elif defined _MSC_VER 01016 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 01017 # define alloca _alloca 01018 # else 01019 # define YYSTACK_ALLOC alloca 01020 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01021 || defined __cplusplus || defined _MSC_VER) 01022 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01023 # ifndef EXIT_SUCCESS 01024 # define EXIT_SUCCESS 0 01025 # endif 01026 # endif 01027 # endif 01028 # endif 01029 # endif 01030 01031 # ifdef YYSTACK_ALLOC 01032 /* Pacify GCC's `empty if-body' warning. */ 01033 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 01034 # ifndef YYSTACK_ALLOC_MAXIMUM 01035 /* The OS might guarantee only one guard page at the bottom of the stack, 01036 and a page size can be as small as 4096 bytes. So we cannot safely 01037 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 01038 to allow for a few compiler-allocated temporary stack slots. */ 01039 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 01040 # endif 01041 # else 01042 # define YYSTACK_ALLOC YYMALLOC 01043 # define YYSTACK_FREE YYFREE 01044 # ifndef YYSTACK_ALLOC_MAXIMUM 01045 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 01046 # endif 01047 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 01048 && ! ((defined YYMALLOC || defined malloc) \ 01049 && (defined YYFREE || defined free))) 01050 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01051 # ifndef EXIT_SUCCESS 01052 # define EXIT_SUCCESS 0 01053 # endif 01054 # endif 01055 # ifndef YYMALLOC 01056 # define YYMALLOC malloc 01057 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01058 || defined __cplusplus || defined _MSC_VER) 01059 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 01060 # endif 01061 # endif 01062 # ifndef YYFREE 01063 # define YYFREE free 01064 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01065 || defined __cplusplus || defined _MSC_VER) 01066 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01067 # endif 01068 # endif 01069 # endif 01070 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01071 01072 01073 #if (! defined yyoverflow \ 01074 && (! defined __cplusplus \ 01075 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01076 01077 /* A type that is properly aligned for any stack member. */ 01078 union yyalloc 01079 { 01080 yytype_int16 yyss_alloc; 01081 YYSTYPE yyvs_alloc; 01082 }; 01083 01084 /* The size of the maximum gap between one aligned stack and the next. */ 01085 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01086 01087 /* The size of an array large to enough to hold all stacks, each with 01088 N elements. */ 01089 # define YYSTACK_BYTES(N) \ 01090 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01091 + YYSTACK_GAP_MAXIMUM) 01092 01093 # define YYCOPY_NEEDED 1 01094 01095 /* Relocate STACK from its old location to the new one. The 01096 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01097 elements in the stack, and YYPTR gives the new location of the 01098 stack. Advance YYPTR to a properly aligned location for the next 01099 stack. */ 01100 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 01101 do \ 01102 { \ 01103 YYSIZE_T yynewbytes; \ 01104 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 01105 Stack = &yyptr->Stack_alloc; \ 01106 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01107 yyptr += yynewbytes / sizeof (*yyptr); \ 01108 } \ 01109 while (YYID (0)) 01110 01111 #endif 01112 01113 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 01114 /* Copy COUNT objects from FROM to TO. The source and destination do 01115 not overlap. */ 01116 # ifndef YYCOPY 01117 # if defined __GNUC__ && 1 < __GNUC__ 01118 # define YYCOPY(To, From, Count) \ 01119 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01120 # else 01121 # define YYCOPY(To, From, Count) \ 01122 do \ 01123 { \ 01124 YYSIZE_T yyi; \ 01125 for (yyi = 0; yyi < (Count); yyi++) \ 01126 (To)[yyi] = (From)[yyi]; \ 01127 } \ 01128 while (YYID (0)) 01129 # endif 01130 # endif 01131 #endif /* !YYCOPY_NEEDED */ 01132 01133 /* YYFINAL -- State number of the termination state. */ 01134 #define YYFINAL 3 01135 /* YYLAST -- Last index in YYTABLE. */ 01136 #define YYLAST 11084 01137 01138 /* YYNTOKENS -- Number of terminals. */ 01139 #define YYNTOKENS 142 01140 /* YYNNTS -- Number of nonterminals. */ 01141 #define YYNNTS 198 01142 /* YYNRULES -- Number of rules. */ 01143 #define YYNRULES 619 01144 /* YYNRULES -- Number of states. */ 01145 #define YYNSTATES 1056 01146 01147 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01148 #define YYUNDEFTOK 2 01149 #define YYMAXUTOK 352 01150 01151 #define YYTRANSLATE(YYX) \ 01152 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01153 01154 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01155 static const yytype_uint8 yytranslate[] = 01156 { 01157 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01158 141, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01159 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01160 2, 2, 140, 127, 2, 2, 2, 125, 120, 2, 01161 136, 137, 123, 121, 134, 122, 133, 124, 2, 2, 01162 2, 2, 2, 2, 2, 2, 2, 2, 115, 139, 01163 117, 113, 116, 114, 2, 2, 2, 2, 2, 2, 01164 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01165 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01166 2, 132, 2, 138, 119, 2, 135, 2, 2, 2, 01167 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01168 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01169 2, 2, 2, 130, 118, 131, 128, 2, 79, 80, 01170 66, 67, 68, 2, 69, 83, 84, 74, 73, 70, 01171 71, 72, 77, 78, 81, 82, 2, 2, 2, 2, 01172 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01173 2, 2, 2, 2, 2, 2, 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, 1, 2, 3, 4, 01183 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01184 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01185 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01186 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01187 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01188 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01189 65, 75, 76, 85, 86, 87, 88, 89, 90, 91, 01190 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 01191 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 01192 112, 126, 129 01193 }; 01194 01195 #if YYDEBUG 01196 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01197 YYRHS. */ 01198 static const yytype_uint16 yyprhs[] = 01199 { 01200 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01201 23, 24, 30, 35, 38, 40, 42, 46, 49, 51, 01202 52, 58, 59, 64, 68, 72, 76, 79, 83, 87, 01203 91, 95, 99, 104, 106, 110, 114, 121, 127, 133, 01204 139, 145, 149, 153, 157, 161, 163, 167, 171, 173, 01205 177, 181, 185, 188, 190, 192, 194, 196, 198, 203, 01206 204, 210, 212, 215, 219, 224, 230, 235, 241, 244, 01207 247, 250, 253, 256, 258, 262, 264, 268, 270, 273, 01208 277, 283, 286, 291, 294, 299, 301, 305, 307, 311, 01209 314, 318, 320, 324, 326, 328, 333, 337, 341, 345, 01210 349, 352, 354, 356, 358, 363, 367, 371, 375, 379, 01211 382, 384, 386, 388, 391, 393, 397, 399, 401, 403, 01212 405, 407, 409, 411, 413, 415, 417, 418, 423, 425, 01213 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01214 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01215 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01216 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01217 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01218 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01219 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 01220 569, 575, 579, 585, 592, 598, 604, 610, 616, 621, 01221 625, 629, 633, 637, 641, 645, 649, 653, 657, 662, 01222 667, 670, 673, 677, 681, 685, 689, 693, 697, 701, 01223 705, 709, 713, 717, 721, 725, 728, 731, 735, 739, 01224 743, 747, 748, 753, 760, 762, 764, 766, 769, 774, 01225 777, 781, 783, 785, 787, 789, 792, 797, 800, 802, 01226 805, 808, 813, 815, 816, 819, 822, 825, 827, 829, 01227 832, 836, 841, 845, 850, 853, 855, 857, 859, 861, 01228 863, 865, 867, 869, 871, 873, 875, 876, 881, 882, 01229 886, 887, 892, 896, 900, 903, 907, 911, 913, 918, 01230 922, 924, 925, 932, 937, 941, 944, 946, 949, 952, 01231 959, 966, 967, 968, 976, 977, 978, 986, 992, 997, 01232 998, 999, 1009, 1010, 1017, 1018, 1019, 1028, 1029, 1035, 01233 1036, 1043, 1044, 1045, 1055, 1057, 1059, 1061, 1063, 1065, 01234 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 01235 1087, 1089, 1091, 1094, 1096, 1098, 1100, 1106, 1108, 1111, 01236 1113, 1115, 1117, 1121, 1123, 1127, 1129, 1134, 1141, 1145, 01237 1151, 1154, 1159, 1161, 1165, 1170, 1173, 1176, 1178, 1181, 01238 1182, 1189, 1198, 1203, 1210, 1215, 1218, 1225, 1228, 1233, 01239 1240, 1243, 1248, 1251, 1256, 1258, 1260, 1262, 1266, 1268, 01240 1273, 1275, 1280, 1282, 1286, 1288, 1290, 1291, 1292, 1293, 01241 1299, 1304, 1306, 1310, 1314, 1315, 1321, 1324, 1329, 1335, 01242 1341, 1344, 1345, 1351, 1352, 1358, 1362, 1363, 1368, 1369, 01243 1374, 1377, 1379, 1384, 1385, 1391, 1392, 1398, 1404, 1406, 01244 1408, 1415, 1417, 1419, 1421, 1423, 1426, 1428, 1431, 1433, 01245 1435, 1437, 1439, 1441, 1443, 1445, 1448, 1452, 1456, 1460, 01246 1464, 1468, 1469, 1473, 1475, 1478, 1482, 1486, 1487, 1491, 01247 1495, 1499, 1503, 1507, 1508, 1512, 1513, 1517, 1518, 1521, 01248 1522, 1525, 1526, 1529, 1531, 1532, 1536, 1537, 1538, 1539, 01249 1546, 1548, 1550, 1552, 1554, 1557, 1559, 1561, 1563, 1565, 01250 1569, 1571, 1573, 1576, 1579, 1581, 1583, 1585, 1587, 1589, 01251 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 01252 1611, 1613, 1615, 1617, 1618, 1623, 1626, 1630, 1633, 1638, 01253 1641, 1644, 1646, 1649, 1650, 1657, 1666, 1671, 1678, 1683, 01254 1690, 1693, 1698, 1705, 1708, 1713, 1716, 1721, 1723, 1724, 01255 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1742, 1744, 1748, 01256 1751, 1754, 1756, 1760, 1762, 1766, 1768, 1770, 1773, 1775, 01257 1779, 1783, 1785, 1789, 1791, 1795, 1797, 1799, 1802, 1804, 01258 1806, 1808, 1811, 1814, 1816, 1818, 1819, 1824, 1826, 1829, 01259 1831, 1835, 1839, 1842, 1845, 1847, 1849, 1851, 1853, 1855, 01260 1857, 1859, 1861, 1863, 1865, 1867, 1869, 1870, 1872, 1873, 01261 1875, 1878, 1881, 1882, 1884, 1886, 1888, 1890, 1892, 1895 01262 }; 01263 01264 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01265 static const yytype_int16 yyrhs[] = 01266 { 01267 143, 0, -1, -1, 144, 145, -1, 146, 332, -1, 01268 339, -1, 147, -1, 146, 338, 147, -1, 1, 147, 01269 -1, 154, -1, -1, 47, 148, 130, 145, 131, -1, 01270 150, 261, 229, 264, -1, 151, 332, -1, 339, -1, 01271 152, -1, 151, 338, 152, -1, 1, 154, -1, 154, 01272 -1, -1, 47, 153, 130, 145, 131, -1, -1, 45, 01273 177, 155, 177, -1, 45, 54, 54, -1, 45, 54, 01274 64, -1, 45, 54, 63, -1, 6, 178, -1, 154, 01275 40, 158, -1, 154, 41, 158, -1, 154, 42, 158, 01276 -1, 154, 43, 158, -1, 154, 44, 154, -1, 48, 01277 130, 150, 131, -1, 156, -1, 165, 113, 159, -1, 01278 296, 87, 159, -1, 214, 132, 188, 335, 87, 159, 01279 -1, 214, 133, 52, 87, 159, -1, 214, 133, 56, 01280 87, 159, -1, 214, 85, 56, 87, 159, -1, 214, 01281 85, 52, 87, 159, -1, 297, 87, 159, -1, 172, 01282 113, 195, -1, 165, 113, 184, -1, 165, 113, 195, 01283 -1, 157, -1, 172, 113, 159, -1, 172, 113, 156, 01284 -1, 159, -1, 157, 37, 157, -1, 157, 38, 157, 01285 -1, 39, 333, 157, -1, 127, 159, -1, 182, -1, 01286 157, -1, 164, -1, 160, -1, 250, -1, 250, 331, 01287 329, 190, -1, -1, 94, 162, 237, 150, 131, -1, 01288 328, -1, 163, 190, -1, 163, 190, 161, -1, 214, 01289 133, 329, 190, -1, 214, 133, 329, 190, 161, -1, 01290 214, 85, 329, 190, -1, 214, 85, 329, 190, 161, 01291 -1, 32, 190, -1, 31, 190, -1, 30, 189, -1, 01292 21, 189, -1, 22, 189, -1, 167, -1, 89, 166, 01293 334, -1, 167, -1, 89, 166, 334, -1, 169, -1, 01294 169, 168, -1, 169, 95, 171, -1, 169, 95, 171, 01295 134, 170, -1, 169, 95, -1, 169, 95, 134, 170, 01296 -1, 95, 171, -1, 95, 171, 134, 170, -1, 95, 01297 -1, 95, 134, 170, -1, 171, -1, 89, 166, 334, 01298 -1, 168, 134, -1, 169, 168, 134, -1, 168, -1, 01299 170, 134, 168, -1, 293, -1, 294, -1, 214, 132, 01300 188, 335, -1, 214, 133, 52, -1, 214, 85, 52, 01301 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 01302 56, -1, 297, -1, 293, -1, 294, -1, 214, 132, 01303 188, 335, -1, 214, 133, 52, -1, 214, 85, 52, 01304 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 01305 56, -1, 297, -1, 52, -1, 56, -1, 86, 173, 01306 -1, 173, -1, 214, 85, 173, -1, 52, -1, 56, 01307 -1, 53, -1, 180, -1, 181, -1, 175, -1, 289, 01308 -1, 176, -1, 291, -1, 177, -1, -1, 178, 134, 01309 179, 177, -1, 118, -1, 119, -1, 120, -1, 69, 01310 -1, 70, -1, 71, -1, 77, -1, 78, -1, 116, 01311 -1, 73, -1, 117, -1, 74, -1, 72, -1, 83, 01312 -1, 84, -1, 121, -1, 122, -1, 123, -1, 95, 01313 -1, 124, -1, 125, -1, 68, -1, 96, -1, 127, 01314 -1, 128, -1, 66, -1, 67, -1, 81, -1, 82, 01315 -1, 135, -1, 49, -1, 50, -1, 51, -1, 47, 01316 -1, 48, -1, 45, -1, 37, -1, 7, -1, 21, 01317 -1, 16, -1, 3, -1, 5, -1, 46, -1, 26, 01318 -1, 15, -1, 14, -1, 10, -1, 9, -1, 36, 01319 -1, 20, -1, 25, -1, 4, -1, 22, -1, 34, 01320 -1, 39, -1, 38, -1, 23, -1, 8, -1, 24, 01321 -1, 30, -1, 33, -1, 32, -1, 13, -1, 35, 01322 -1, 6, -1, 17, -1, 31, -1, 11, -1, 12, 01323 -1, 18, -1, 19, -1, 172, 113, 182, -1, 172, 01324 113, 182, 44, 182, -1, 296, 87, 182, -1, 296, 01325 87, 182, 44, 182, -1, 214, 132, 188, 335, 87, 01326 182, -1, 214, 133, 52, 87, 182, -1, 214, 133, 01327 56, 87, 182, -1, 214, 85, 52, 87, 182, -1, 01328 214, 85, 56, 87, 182, -1, 86, 56, 87, 182, 01329 -1, 297, 87, 182, -1, 182, 79, 182, -1, 182, 01330 80, 182, -1, 182, 121, 182, -1, 182, 122, 182, 01331 -1, 182, 123, 182, -1, 182, 124, 182, -1, 182, 01332 125, 182, -1, 182, 68, 182, -1, 126, 59, 68, 01333 182, -1, 126, 60, 68, 182, -1, 66, 182, -1, 01334 67, 182, -1, 182, 118, 182, -1, 182, 119, 182, 01335 -1, 182, 120, 182, -1, 182, 69, 182, -1, 182, 01336 116, 182, -1, 182, 73, 182, -1, 182, 117, 182, 01337 -1, 182, 74, 182, -1, 182, 70, 182, -1, 182, 01338 71, 182, -1, 182, 72, 182, -1, 182, 77, 182, 01339 -1, 182, 78, 182, -1, 127, 182, -1, 128, 182, 01340 -1, 182, 83, 182, -1, 182, 84, 182, -1, 182, 01341 75, 182, -1, 182, 76, 182, -1, -1, 46, 333, 01342 183, 182, -1, 182, 114, 182, 333, 115, 182, -1, 01343 196, -1, 182, -1, 339, -1, 194, 336, -1, 194, 01344 134, 326, 336, -1, 326, 336, -1, 136, 188, 334, 01345 -1, 339, -1, 186, -1, 339, -1, 189, -1, 194, 01346 134, -1, 194, 134, 326, 134, -1, 326, 134, -1, 01347 164, -1, 194, 193, -1, 326, 193, -1, 194, 134, 01348 326, 193, -1, 192, -1, -1, 191, 189, -1, 97, 01349 184, -1, 134, 192, -1, 339, -1, 184, -1, 95, 01350 184, -1, 194, 134, 184, -1, 194, 134, 95, 184, 01351 -1, 194, 134, 184, -1, 194, 134, 95, 184, -1, 01352 95, 184, -1, 265, -1, 266, -1, 269, -1, 270, 01353 -1, 271, -1, 276, -1, 274, -1, 277, -1, 295, 01354 -1, 297, -1, 53, -1, -1, 215, 197, 149, 225, 01355 -1, -1, 90, 198, 334, -1, -1, 90, 157, 199, 01356 334, -1, 89, 150, 137, -1, 214, 85, 56, -1, 01357 86, 56, -1, 92, 185, 138, -1, 93, 325, 131, 01358 -1, 30, -1, 31, 136, 189, 334, -1, 31, 136, 01359 334, -1, 31, -1, -1, 46, 333, 136, 200, 157, 01360 334, -1, 39, 136, 157, 334, -1, 39, 136, 334, 01361 -1, 163, 256, -1, 251, -1, 251, 256, -1, 98, 01362 242, -1, 216, 158, 226, 150, 228, 225, -1, 217, 01363 158, 226, 150, 229, 225, -1, -1, -1, 218, 201, 01364 158, 227, 202, 150, 225, -1, -1, -1, 219, 203, 01365 158, 227, 204, 150, 225, -1, 220, 158, 332, 259, 01366 225, -1, 220, 332, 259, 225, -1, -1, -1, 221, 01367 230, 25, 205, 158, 227, 206, 150, 225, -1, -1, 01368 222, 174, 298, 207, 149, 225, -1, -1, -1, 222, 01369 83, 157, 208, 337, 209, 149, 225, -1, -1, 223, 01370 174, 210, 149, 225, -1, -1, 224, 175, 211, 300, 01371 149, 225, -1, -1, -1, 224, 323, 331, 212, 175, 01372 213, 300, 149, 225, -1, 21, -1, 22, -1, 23, 01373 -1, 24, -1, 196, -1, 7, -1, 11, -1, 12, 01374 -1, 18, -1, 19, -1, 16, -1, 20, -1, 3, 01375 -1, 4, -1, 5, -1, 10, -1, 337, -1, 13, 01376 -1, 337, 13, -1, 337, -1, 27, -1, 229, -1, 01377 14, 158, 226, 150, 228, -1, 339, -1, 15, 150, 01378 -1, 172, -1, 165, -1, 305, -1, 89, 233, 334, 01379 -1, 231, -1, 232, 134, 231, -1, 232, -1, 232, 01380 134, 95, 305, -1, 232, 134, 95, 305, 134, 232, 01381 -1, 232, 134, 95, -1, 232, 134, 95, 134, 232, 01382 -1, 95, 305, -1, 95, 305, 134, 232, -1, 95, 01383 -1, 95, 134, 232, -1, 310, 134, 313, 322, -1, 01384 310, 322, -1, 313, 322, -1, 321, -1, 134, 234, 01385 -1, -1, 307, 134, 316, 134, 319, 235, -1, 307, 01386 134, 316, 134, 319, 134, 307, 235, -1, 307, 134, 01387 316, 235, -1, 307, 134, 316, 134, 307, 235, -1, 01388 307, 134, 319, 235, -1, 307, 134, -1, 307, 134, 01389 319, 134, 307, 235, -1, 307, 235, -1, 316, 134, 01390 319, 235, -1, 316, 134, 319, 134, 307, 235, -1, 01391 316, 235, -1, 316, 134, 307, 235, -1, 319, 235, 01392 -1, 319, 134, 307, 235, -1, 234, -1, 339, -1, 01393 238, -1, 118, 239, 118, -1, 76, -1, 118, 236, 01394 239, 118, -1, 333, -1, 333, 139, 240, 333, -1, 01395 241, -1, 240, 134, 241, -1, 52, -1, 304, -1, 01396 -1, -1, -1, 243, 244, 246, 245, 247, -1, 136, 01397 303, 239, 137, -1, 303, -1, 111, 150, 131, -1, 01398 29, 150, 10, -1, -1, 28, 249, 237, 150, 10, 01399 -1, 164, 248, -1, 250, 331, 329, 187, -1, 250, 01400 331, 329, 187, 256, -1, 250, 331, 329, 190, 248, 01401 -1, 163, 186, -1, -1, 214, 133, 329, 252, 187, 01402 -1, -1, 214, 85, 329, 253, 186, -1, 214, 85, 01403 330, -1, -1, 214, 133, 254, 186, -1, -1, 214, 01404 85, 255, 186, -1, 32, 186, -1, 32, -1, 214, 01405 132, 188, 335, -1, -1, 130, 257, 237, 150, 131, 01406 -1, -1, 26, 258, 237, 150, 10, -1, 17, 194, 01407 226, 150, 260, -1, 229, -1, 259, -1, 8, 262, 01408 263, 226, 150, 261, -1, 339, -1, 184, -1, 195, 01409 -1, 339, -1, 88, 172, -1, 339, -1, 9, 150, 01410 -1, 339, -1, 292, -1, 289, -1, 291, -1, 267, 01411 -1, 62, -1, 268, -1, 267, 268, -1, 100, 280, 01412 110, -1, 101, 281, 110, -1, 102, 282, 65, -1, 01413 103, 140, 110, -1, 103, 272, 110, -1, -1, 272, 01414 273, 140, -1, 283, -1, 273, 283, -1, 105, 140, 01415 110, -1, 105, 275, 110, -1, -1, 275, 273, 140, 01416 -1, 104, 140, 110, -1, 104, 278, 110, -1, 106, 01417 140, 110, -1, 106, 279, 110, -1, -1, 278, 61, 01418 140, -1, -1, 279, 61, 140, -1, -1, 280, 283, 01419 -1, -1, 281, 283, -1, -1, 282, 283, -1, 61, 01420 -1, -1, 109, 284, 288, -1, -1, -1, -1, 107, 01421 285, 286, 287, 150, 108, -1, 54, -1, 55, -1, 01422 57, -1, 297, -1, 99, 290, -1, 175, -1, 55, 01423 -1, 54, -1, 57, -1, 99, 281, 110, -1, 59, 01424 -1, 60, -1, 126, 59, -1, 126, 60, -1, 52, 01425 -1, 55, -1, 54, -1, 56, -1, 57, -1, 34, 01426 -1, 33, -1, 35, -1, 36, -1, 50, -1, 49, 01427 -1, 51, -1, 293, -1, 294, -1, 293, -1, 294, 01428 -1, 63, -1, 64, -1, 337, -1, -1, 117, 299, 01429 158, 337, -1, 1, 337, -1, 136, 303, 334, -1, 01430 303, 337, -1, 311, 134, 313, 322, -1, 311, 322, 01431 -1, 313, 322, -1, 321, -1, 134, 301, -1, -1, 01432 307, 134, 317, 134, 319, 302, -1, 307, 134, 317, 01433 134, 319, 134, 307, 302, -1, 307, 134, 317, 302, 01434 -1, 307, 134, 317, 134, 307, 302, -1, 307, 134, 01435 319, 302, -1, 307, 134, 319, 134, 307, 302, -1, 01436 307, 302, -1, 317, 134, 319, 302, -1, 317, 134, 01437 319, 134, 307, 302, -1, 317, 302, -1, 317, 134, 01438 307, 302, -1, 319, 302, -1, 319, 134, 307, 302, 01439 -1, 301, -1, -1, 56, -1, 55, -1, 54, -1, 01440 57, -1, 304, -1, 52, -1, 305, -1, 89, 233, 01441 334, -1, 306, -1, 307, 134, 306, -1, 58, 184, 01442 -1, 58, 214, -1, 309, -1, 310, 134, 309, -1, 01443 308, -1, 311, 134, 308, -1, 68, -1, 96, -1, 01444 312, 52, -1, 312, -1, 52, 113, 184, -1, 52, 01445 113, 214, -1, 315, -1, 316, 134, 315, -1, 314, 01446 -1, 317, 134, 314, -1, 123, -1, 95, -1, 318, 01447 52, -1, 318, -1, 120, -1, 97, -1, 320, 52, 01448 -1, 134, 321, -1, 339, -1, 295, -1, -1, 136, 01449 324, 157, 334, -1, 339, -1, 326, 336, -1, 327, 01450 -1, 326, 134, 327, -1, 184, 88, 184, -1, 58, 01451 184, -1, 96, 184, -1, 52, -1, 56, -1, 53, 01452 -1, 52, -1, 56, -1, 53, -1, 180, -1, 52, 01453 -1, 53, -1, 180, -1, 133, -1, 85, -1, -1, 01454 338, -1, -1, 141, -1, 333, 137, -1, 333, 138, 01455 -1, -1, 141, -1, 134, -1, 139, -1, 141, -1, 01456 337, -1, 338, 139, -1, -1 01457 }; 01458 01459 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01460 static const yytype_uint16 yyrline[] = 01461 { 01462 0, 853, 853, 853, 884, 895, 904, 912, 920, 926, 01463 928, 927, 948, 981, 992, 1001, 1009, 1017, 1023, 1028, 01464 1027, 1048, 1048, 1056, 1064, 1075, 1085, 1093, 1102, 1111, 01465 1124, 1137, 1146, 1158, 1159, 1169, 1174, 1195, 1200, 1205, 01466 1215, 1220, 1230, 1239, 1248, 1257, 1260, 1269, 1281, 1282, 01467 1290, 1298, 1306, 1314, 1317, 1329, 1330, 1333, 1334, 1346, 01468 1345, 1367, 1377, 1386, 1399, 1408, 1420, 1429, 1441, 1450, 01469 1459, 1467, 1475, 1485, 1486, 1496, 1497, 1507, 1515, 1523, 01470 1531, 1540, 1548, 1557, 1565, 1574, 1582, 1593, 1594, 1604, 01471 1612, 1622, 1630, 1640, 1644, 1648, 1656, 1664, 1672, 1680, 01472 1692, 1702, 1714, 1723, 1732, 1740, 1748, 1756, 1764, 1777, 01473 1790, 1801, 1809, 1812, 1820, 1828, 1838, 1839, 1840, 1841, 01474 1846, 1857, 1858, 1861, 1869, 1872, 1880, 1880, 1890, 1891, 01475 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 01476 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 01477 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1922, 1922, 01478 1922, 1923, 1923, 1924, 1924, 1924, 1925, 1925, 1925, 1925, 01479 1926, 1926, 1926, 1926, 1927, 1927, 1927, 1928, 1928, 1928, 01480 1928, 1929, 1929, 1929, 1929, 1930, 1930, 1930, 1930, 1931, 01481 1931, 1931, 1931, 1932, 1932, 1932, 1932, 1933, 1933, 1936, 01482 1945, 1955, 1960, 1970, 1996, 2001, 2006, 2011, 2021, 2031, 01483 2042, 2056, 2070, 2078, 2086, 2094, 2102, 2110, 2118, 2127, 01484 2136, 2144, 2152, 2160, 2168, 2176, 2184, 2192, 2200, 2208, 01485 2216, 2224, 2232, 2240, 2251, 2259, 2267, 2275, 2283, 2291, 01486 2299, 2307, 2307, 2317, 2327, 2333, 2345, 2346, 2350, 2358, 01487 2368, 2378, 2379, 2382, 2383, 2384, 2388, 2396, 2406, 2415, 01488 2423, 2433, 2442, 2451, 2451, 2463, 2473, 2477, 2483, 2491, 01489 2499, 2513, 2529, 2543, 2558, 2568, 2569, 2570, 2571, 2572, 01490 2573, 2574, 2575, 2576, 2577, 2578, 2587, 2586, 2614, 2614, 01491 2622, 2622, 2630, 2638, 2646, 2654, 2667, 2675, 2683, 2691, 01492 2699, 2707, 2707, 2717, 2725, 2733, 2743, 2744, 2754, 2758, 01493 2770, 2782, 2782, 2782, 2793, 2793, 2793, 2804, 2815, 2824, 01494 2826, 2823, 2890, 2889, 2911, 2916, 2910, 2935, 2934, 2956, 01495 2955, 2978, 2979, 2978, 2999, 3007, 3015, 3023, 3033, 3045, 01496 3051, 3057, 3063, 3069, 3075, 3081, 3087, 3093, 3099, 3109, 01497 3115, 3120, 3121, 3128, 3133, 3136, 3137, 3150, 3151, 3161, 01498 3162, 3165, 3173, 3183, 3191, 3201, 3209, 3218, 3227, 3235, 01499 3243, 3252, 3264, 3272, 3283, 3287, 3291, 3295, 3301, 3306, 01500 3311, 3315, 3319, 3323, 3327, 3331, 3339, 3343, 3347, 3351, 01501 3355, 3359, 3363, 3367, 3371, 3377, 3378, 3384, 3393, 3402, 01502 3413, 3417, 3427, 3434, 3443, 3451, 3457, 3460, 3465, 3457, 01503 3481, 3489, 3499, 3503, 3510, 3509, 3530, 3546, 3555, 3567, 01504 3581, 3591, 3590, 3607, 3606, 3622, 3631, 3630, 3648, 3647, 01505 3664, 3672, 3680, 3695, 3694, 3714, 3713, 3734, 3746, 3747, 01506 3750, 3769, 3772, 3780, 3788, 3791, 3795, 3798, 3806, 3809, 01507 3810, 3818, 3821, 3838, 3839, 3840, 3850, 3860, 3887, 3952, 01508 3961, 3972, 3979, 3989, 3997, 4007, 4016, 4027, 4034, 4046, 01509 4055, 4065, 4074, 4085, 4092, 4103, 4110, 4125, 4132, 4143, 01510 4150, 4161, 4168, 4197, 4199, 4198, 4215, 4221, 4226, 4214, 01511 4245, 4253, 4261, 4269, 4272, 4283, 4284, 4285, 4286, 4289, 01512 4300, 4301, 4302, 4310, 4320, 4321, 4322, 4323, 4324, 4327, 01513 4328, 4329, 4330, 4331, 4332, 4333, 4336, 4349, 4359, 4367, 01514 4377, 4378, 4381, 4390, 4389, 4398, 4410, 4420, 4428, 4432, 01515 4436, 4440, 4446, 4451, 4456, 4460, 4464, 4468, 4472, 4476, 01516 4480, 4484, 4488, 4492, 4496, 4500, 4504, 4508, 4513, 4519, 01517 4528, 4537, 4546, 4557, 4558, 4565, 4574, 4593, 4600, 4613, 01518 4625, 4637, 4645, 4662, 4670, 4686, 4687, 4690, 4695, 4701, 01519 4713, 4725, 4733, 4749, 4757, 4773, 4774, 4777, 4790, 4801, 01520 4802, 4805, 4822, 4826, 4836, 4846, 4846, 4875, 4876, 4886, 01521 4893, 4903, 4911, 4919, 4931, 4932, 4933, 4936, 4937, 4938, 01522 4939, 4942, 4943, 4944, 4947, 4952, 4959, 4960, 4963, 4964, 01523 4967, 4970, 4973, 4974, 4975, 4978, 4979, 4982, 4983, 4987 01524 }; 01525 #endif 01526 01527 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01528 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01529 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01530 static const char *const yytname[] = 01531 { 01532 "\"end-of-input\"", "error", "$undefined", "keyword_class", 01533 "keyword_module", "keyword_def", "keyword_undef", "keyword_begin", 01534 "keyword_rescue", "keyword_ensure", "keyword_end", "keyword_if", 01535 "keyword_unless", "keyword_then", "keyword_elsif", "keyword_else", 01536 "keyword_case", "keyword_when", "keyword_while", "keyword_until", 01537 "keyword_for", "keyword_break", "keyword_next", "keyword_redo", 01538 "keyword_retry", "keyword_in", "keyword_do", "keyword_do_cond", 01539 "keyword_do_block", "keyword_do_LAMBDA", "keyword_return", 01540 "keyword_yield", "keyword_super", "keyword_self", "keyword_nil", 01541 "keyword_true", "keyword_false", "keyword_and", "keyword_or", 01542 "keyword_not", "modifier_if", "modifier_unless", "modifier_while", 01543 "modifier_until", "modifier_rescue", "keyword_alias", "keyword_defined", 01544 "keyword_BEGIN", "keyword_END", "keyword__LINE__", "keyword__FILE__", 01545 "keyword__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", 01546 "tCONSTANT", "tCVAR", "tLABEL", "tINTEGER", "tFLOAT", "tSTRING_CONTENT", 01547 "tCHAR", "tNTH_REF", "tBACK_REF", "tREGEXP_END", "\"unary+\"", 01548 "\"unary-\"", "\"**\"", "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", 01549 "\">=\"", "\"<=\"", "\"&&\"", "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", 01550 "\"...\"", "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"::\"", 01551 "\":: at EXPR_BEG\"", "tOP_ASGN", "\"=>\"", "\"(\"", "\"( arg\"", 01552 "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"", "\"&\"", 01553 "\"->\"", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", 01554 "tWORDS_BEG", "tQWORDS_BEG", "tSYMBOLS_BEG", "tQSYMBOLS_BEG", 01555 "tSTRING_DBEG", "tSTRING_DEND", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01556 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01557 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", 01558 "'{'", "'}'", "'['", "'.'", "','", "'`'", "'('", "')'", "']'", "';'", 01559 "' '", "'\\n'", "$accept", "program", "$@1", "top_compstmt", "top_stmts", 01560 "top_stmt", "$@2", "bodystmt", "compstmt", "stmts", "stmt_or_begin", 01561 "$@3", "stmt", "$@4", "command_asgn", "expr", "expr_value", 01562 "command_call", "block_command", "cmd_brace_block", "@5", "fcall", 01563 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 01564 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 01565 "fitem", "undef_list", "$@6", "op", "reswords", "arg", "$@7", 01566 "arg_value", "aref_args", "paren_args", "opt_paren_args", 01567 "opt_call_args", "call_args", "command_args", "@8", "block_arg", 01568 "opt_block_arg", "args", "mrhs", "primary", "@9", "$@10", "$@11", "$@12", 01569 "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "@19", "@20", "@21", 01570 "@22", "@23", "$@24", "$@25", "primary_value", "k_begin", "k_if", 01571 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class", 01572 "k_module", "k_def", "k_end", "then", "do", "if_tail", "opt_else", 01573 "for_var", "f_marg", "f_marg_list", "f_margs", "block_args_tail", 01574 "opt_block_args_tail", "block_param", "opt_block_param", 01575 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@26", 01576 "@27", "@28", "f_larglist", "lambda_body", "do_block", "@29", 01577 "block_call", "method_call", "@30", "@31", "@32", "@33", "brace_block", 01578 "@34", "@35", "case_body", "cases", "opt_rescue", "exc_list", "exc_var", 01579 "opt_ensure", "literal", "strings", "string", "string1", "xstring", 01580 "regexp", "words", "word_list", "word", "symbols", "symbol_list", 01581 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents", 01582 "xstring_contents", "regexp_contents", "string_content", "@36", "@37", 01583 "@38", "@39", "string_dvar", "symbol", "sym", "dsym", "numeric", 01584 "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref", 01585 "superclass", "$@40", "f_arglist", "args_tail", "opt_args_tail", 01586 "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_kw", 01587 "f_block_kw", "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_kwrest", 01588 "f_opt", "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark", 01589 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg", 01590 "singleton", "$@41", "assoc_list", "assocs", "assoc", "operation", 01591 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl", 01592 "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01593 }; 01594 #endif 01595 01596 # ifdef YYPRINT 01597 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01598 token YYLEX-NUM. */ 01599 static const yytype_uint16 yytoknum[] = 01600 { 01601 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01602 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01603 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01604 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01605 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01606 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01607 315, 316, 317, 318, 319, 320, 130, 131, 132, 134, 01608 139, 140, 141, 138, 137, 321, 322, 142, 143, 128, 01609 129, 144, 145, 135, 136, 323, 324, 325, 326, 327, 01610 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 01611 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 01612 348, 349, 350, 61, 63, 58, 62, 60, 124, 94, 01613 38, 43, 45, 42, 47, 37, 351, 33, 126, 352, 01614 123, 125, 91, 46, 44, 96, 40, 41, 93, 59, 01615 32, 10 01616 }; 01617 # endif 01618 01619 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01620 static const yytype_uint16 yyr1[] = 01621 { 01622 0, 142, 144, 143, 145, 146, 146, 146, 146, 147, 01623 148, 147, 149, 150, 151, 151, 151, 151, 152, 153, 01624 152, 155, 154, 154, 154, 154, 154, 154, 154, 154, 01625 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 01626 154, 154, 154, 154, 154, 154, 156, 156, 157, 157, 01627 157, 157, 157, 157, 158, 159, 159, 160, 160, 162, 01628 161, 163, 164, 164, 164, 164, 164, 164, 164, 164, 01629 164, 164, 164, 165, 165, 166, 166, 167, 167, 167, 01630 167, 167, 167, 167, 167, 167, 167, 168, 168, 169, 01631 169, 170, 170, 171, 171, 171, 171, 171, 171, 171, 01632 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, 01633 172, 173, 173, 174, 174, 174, 175, 175, 175, 175, 01634 175, 176, 176, 177, 177, 178, 179, 178, 180, 180, 01635 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 01636 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 01637 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 01638 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01639 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01640 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 01641 181, 181, 181, 181, 181, 181, 181, 181, 181, 182, 01642 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 01643 182, 182, 182, 182, 182, 182, 182, 182, 182, 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, 183, 182, 182, 182, 184, 185, 185, 185, 185, 01647 186, 187, 187, 188, 188, 188, 188, 188, 189, 189, 01648 189, 189, 189, 191, 190, 192, 193, 193, 194, 194, 01649 194, 194, 195, 195, 195, 196, 196, 196, 196, 196, 01650 196, 196, 196, 196, 196, 196, 197, 196, 198, 196, 01651 199, 196, 196, 196, 196, 196, 196, 196, 196, 196, 01652 196, 200, 196, 196, 196, 196, 196, 196, 196, 196, 01653 196, 201, 202, 196, 203, 204, 196, 196, 196, 205, 01654 206, 196, 207, 196, 208, 209, 196, 210, 196, 211, 01655 196, 212, 213, 196, 196, 196, 196, 196, 214, 215, 01656 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01657 226, 226, 226, 227, 227, 228, 228, 229, 229, 230, 01658 230, 231, 231, 232, 232, 233, 233, 233, 233, 233, 01659 233, 233, 233, 233, 234, 234, 234, 234, 235, 235, 01660 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01661 236, 236, 236, 236, 236, 237, 237, 238, 238, 238, 01662 239, 239, 240, 240, 241, 241, 243, 244, 245, 242, 01663 246, 246, 247, 247, 249, 248, 250, 250, 250, 250, 01664 251, 252, 251, 253, 251, 251, 254, 251, 255, 251, 01665 251, 251, 251, 257, 256, 258, 256, 259, 260, 260, 01666 261, 261, 262, 262, 262, 263, 263, 264, 264, 265, 01667 265, 265, 266, 267, 267, 267, 268, 269, 270, 271, 01668 271, 272, 272, 273, 273, 274, 274, 275, 275, 276, 01669 276, 277, 277, 278, 278, 279, 279, 280, 280, 281, 01670 281, 282, 282, 283, 284, 283, 285, 286, 287, 283, 01671 288, 288, 288, 288, 289, 290, 290, 290, 290, 291, 01672 292, 292, 292, 292, 293, 293, 293, 293, 293, 294, 01673 294, 294, 294, 294, 294, 294, 295, 295, 296, 296, 01674 297, 297, 298, 299, 298, 298, 300, 300, 301, 301, 01675 301, 301, 302, 302, 303, 303, 303, 303, 303, 303, 01676 303, 303, 303, 303, 303, 303, 303, 303, 303, 304, 01677 304, 304, 304, 305, 305, 306, 306, 307, 307, 308, 01678 309, 310, 310, 311, 311, 312, 312, 313, 313, 314, 01679 315, 316, 316, 317, 317, 318, 318, 319, 319, 320, 01680 320, 321, 322, 322, 323, 324, 323, 325, 325, 326, 01681 326, 327, 327, 327, 328, 328, 328, 329, 329, 329, 01682 329, 330, 330, 330, 331, 331, 332, 332, 333, 333, 01683 334, 335, 336, 336, 336, 337, 337, 338, 338, 339 01684 }; 01685 01686 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01687 static const yytype_uint8 yyr2[] = 01688 { 01689 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01690 0, 5, 4, 2, 1, 1, 3, 2, 1, 0, 01691 5, 0, 4, 3, 3, 3, 2, 3, 3, 3, 01692 3, 3, 4, 1, 3, 3, 6, 5, 5, 5, 01693 5, 3, 3, 3, 3, 1, 3, 3, 1, 3, 01694 3, 3, 2, 1, 1, 1, 1, 1, 4, 0, 01695 5, 1, 2, 3, 4, 5, 4, 5, 2, 2, 01696 2, 2, 2, 1, 3, 1, 3, 1, 2, 3, 01697 5, 2, 4, 2, 4, 1, 3, 1, 3, 2, 01698 3, 1, 3, 1, 1, 4, 3, 3, 3, 3, 01699 2, 1, 1, 1, 4, 3, 3, 3, 3, 2, 01700 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 01701 1, 1, 1, 1, 1, 1, 0, 4, 1, 1, 01702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01703 1, 1, 1, 1, 1, 1, 1, 1, 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, 3, 01709 5, 3, 5, 6, 5, 5, 5, 5, 4, 3, 01710 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 01711 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 01712 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 01713 3, 0, 4, 6, 1, 1, 1, 2, 4, 2, 01714 3, 1, 1, 1, 1, 2, 4, 2, 1, 2, 01715 2, 4, 1, 0, 2, 2, 2, 1, 1, 2, 01716 3, 4, 3, 4, 2, 1, 1, 1, 1, 1, 01717 1, 1, 1, 1, 1, 1, 0, 4, 0, 3, 01718 0, 4, 3, 3, 2, 3, 3, 1, 4, 3, 01719 1, 0, 6, 4, 3, 2, 1, 2, 2, 6, 01720 6, 0, 0, 7, 0, 0, 7, 5, 4, 0, 01721 0, 9, 0, 6, 0, 0, 8, 0, 5, 0, 01722 6, 0, 0, 9, 1, 1, 1, 1, 1, 1, 01723 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01724 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 01725 1, 1, 3, 1, 3, 1, 4, 6, 3, 5, 01726 2, 4, 1, 3, 4, 2, 2, 1, 2, 0, 01727 6, 8, 4, 6, 4, 2, 6, 2, 4, 6, 01728 2, 4, 2, 4, 1, 1, 1, 3, 1, 4, 01729 1, 4, 1, 3, 1, 1, 0, 0, 0, 5, 01730 4, 1, 3, 3, 0, 5, 2, 4, 5, 5, 01731 2, 0, 5, 0, 5, 3, 0, 4, 0, 4, 01732 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 01733 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 01734 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 01735 3, 0, 3, 1, 2, 3, 3, 0, 3, 3, 01736 3, 3, 3, 0, 3, 0, 3, 0, 2, 0, 01737 2, 0, 2, 1, 0, 3, 0, 0, 0, 6, 01738 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 01739 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 01740 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01741 1, 1, 1, 0, 4, 2, 3, 2, 4, 2, 01742 2, 1, 2, 0, 6, 8, 4, 6, 4, 6, 01743 2, 4, 6, 2, 4, 2, 4, 1, 0, 1, 01744 1, 1, 1, 1, 1, 1, 3, 1, 3, 2, 01745 2, 1, 3, 1, 3, 1, 1, 2, 1, 3, 01746 3, 1, 3, 1, 3, 1, 1, 2, 1, 1, 01747 1, 2, 2, 1, 1, 0, 4, 1, 2, 1, 01748 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 01749 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 01750 2, 2, 0, 1, 1, 1, 1, 1, 2, 0 01751 }; 01752 01753 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 01754 Performed when YYTABLE doesn't specify something else to do. Zero 01755 means the default is an error. */ 01756 static const yytype_uint16 yydefact[] = 01757 { 01758 2, 0, 0, 1, 0, 346, 347, 348, 0, 339, 01759 340, 341, 344, 342, 343, 345, 334, 335, 336, 337, 01760 297, 263, 263, 510, 509, 511, 512, 608, 0, 608, 01761 10, 0, 514, 513, 515, 594, 596, 506, 505, 595, 01762 508, 500, 501, 453, 520, 521, 0, 0, 0, 0, 01763 288, 619, 619, 85, 406, 479, 477, 479, 481, 461, 01764 473, 467, 475, 0, 0, 0, 3, 606, 6, 9, 01765 33, 45, 48, 56, 263, 55, 0, 73, 0, 77, 01766 87, 0, 53, 244, 0, 286, 0, 0, 311, 314, 01767 606, 0, 0, 0, 0, 57, 306, 275, 276, 452, 01768 454, 277, 278, 279, 281, 280, 282, 450, 451, 449, 01769 516, 517, 283, 0, 284, 61, 5, 8, 168, 179, 01770 169, 192, 165, 185, 175, 174, 195, 196, 190, 173, 01771 172, 167, 193, 197, 198, 177, 166, 180, 184, 186, 01772 178, 171, 187, 194, 189, 188, 181, 191, 176, 164, 01773 183, 182, 163, 170, 161, 162, 158, 159, 160, 116, 01774 118, 117, 153, 154, 149, 131, 132, 133, 140, 137, 01775 139, 134, 135, 155, 156, 141, 142, 146, 150, 136, 01776 138, 128, 129, 130, 143, 144, 145, 147, 148, 151, 01777 152, 157, 121, 123, 125, 26, 119, 120, 122, 124, 01778 0, 0, 0, 0, 0, 0, 0, 0, 258, 0, 01779 245, 268, 71, 262, 619, 0, 516, 517, 0, 284, 01780 619, 589, 72, 70, 608, 69, 0, 619, 430, 68, 01781 608, 609, 0, 0, 21, 241, 0, 0, 334, 335, 01782 297, 300, 431, 0, 220, 0, 221, 294, 0, 19, 01783 0, 0, 606, 15, 18, 608, 75, 14, 290, 608, 01784 0, 612, 612, 246, 0, 0, 612, 587, 608, 0, 01785 0, 0, 83, 338, 0, 93, 94, 101, 308, 407, 01786 497, 496, 498, 495, 0, 494, 0, 0, 0, 0, 01787 0, 0, 0, 0, 0, 0, 0, 502, 503, 52, 01788 235, 236, 615, 616, 4, 617, 607, 0, 0, 0, 01789 0, 0, 0, 0, 435, 433, 420, 62, 305, 414, 01790 416, 0, 89, 0, 81, 78, 0, 0, 0, 0, 01791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01793 0, 0, 0, 428, 619, 426, 0, 54, 0, 0, 01794 0, 0, 606, 0, 607, 0, 360, 359, 0, 0, 01795 516, 517, 284, 111, 112, 0, 0, 114, 0, 0, 01796 516, 517, 284, 327, 188, 181, 191, 176, 158, 159, 01797 160, 116, 117, 585, 329, 584, 0, 605, 604, 0, 01798 307, 455, 0, 0, 126, 592, 294, 269, 593, 265, 01799 0, 0, 0, 259, 267, 428, 619, 426, 0, 0, 01800 0, 260, 608, 0, 299, 264, 608, 254, 619, 619, 01801 253, 608, 304, 51, 23, 25, 24, 0, 301, 0, 01802 0, 0, 428, 426, 0, 17, 0, 608, 292, 13, 01803 607, 74, 608, 289, 295, 614, 613, 247, 614, 249, 01804 296, 588, 0, 100, 502, 503, 91, 86, 0, 428, 01805 619, 426, 548, 483, 486, 484, 499, 480, 456, 478, 01806 457, 458, 482, 459, 460, 0, 463, 469, 0, 470, 01807 465, 466, 0, 471, 0, 472, 0, 0, 618, 7, 01808 27, 28, 29, 30, 31, 49, 50, 619, 619, 59, 01809 63, 619, 0, 34, 43, 0, 44, 608, 0, 79, 01810 90, 47, 46, 0, 199, 268, 42, 217, 225, 230, 01811 231, 232, 227, 229, 239, 240, 233, 234, 210, 211, 01812 237, 238, 608, 226, 228, 222, 223, 224, 212, 213, 01813 214, 215, 216, 597, 599, 598, 600, 0, 263, 425, 01814 608, 597, 599, 598, 600, 0, 263, 0, 619, 351, 01815 0, 350, 0, 0, 0, 0, 0, 0, 294, 428, 01816 619, 426, 319, 324, 111, 112, 113, 0, 523, 322, 01817 522, 428, 619, 426, 0, 0, 548, 331, 597, 598, 01818 263, 35, 201, 41, 209, 0, 199, 591, 0, 270, 01819 266, 619, 597, 598, 608, 597, 598, 590, 298, 610, 01820 250, 255, 257, 303, 22, 0, 242, 0, 32, 423, 01821 421, 208, 0, 76, 16, 291, 612, 0, 84, 97, 01822 99, 608, 597, 598, 554, 551, 550, 549, 552, 0, 01823 565, 0, 576, 566, 580, 579, 575, 548, 408, 547, 01824 411, 553, 555, 557, 533, 563, 619, 568, 619, 573, 01825 533, 578, 533, 0, 531, 487, 0, 462, 464, 474, 01826 468, 476, 218, 219, 398, 608, 0, 396, 395, 0, 01827 619, 0, 274, 0, 88, 82, 0, 0, 0, 0, 01828 0, 0, 429, 66, 0, 0, 432, 0, 0, 427, 01829 64, 619, 349, 287, 619, 619, 441, 619, 352, 619, 01830 354, 312, 353, 315, 0, 0, 318, 601, 293, 608, 01831 597, 598, 0, 0, 525, 0, 0, 111, 112, 115, 01832 608, 0, 608, 548, 0, 0, 0, 252, 417, 58, 01833 251, 0, 127, 271, 261, 0, 0, 432, 0, 0, 01834 619, 608, 11, 0, 248, 92, 95, 0, 559, 554, 01835 0, 372, 363, 365, 608, 361, 608, 0, 0, 540, 01836 0, 529, 583, 567, 0, 530, 0, 543, 577, 0, 01837 545, 581, 488, 490, 491, 492, 485, 493, 554, 0, 01838 394, 608, 0, 379, 561, 619, 619, 571, 379, 379, 01839 377, 400, 0, 0, 0, 0, 0, 272, 80, 200, 01840 0, 40, 206, 39, 207, 67, 424, 611, 0, 37, 01841 204, 38, 205, 65, 422, 442, 443, 619, 444, 0, 01842 619, 357, 0, 0, 355, 0, 0, 0, 317, 0, 01843 0, 432, 0, 325, 0, 0, 432, 328, 586, 608, 01844 0, 527, 332, 418, 419, 202, 0, 256, 302, 20, 01845 569, 608, 0, 370, 0, 556, 0, 0, 0, 409, 01846 532, 558, 533, 533, 564, 619, 582, 533, 574, 533, 01847 533, 0, 0, 0, 560, 0, 397, 385, 387, 0, 01848 375, 376, 0, 390, 0, 392, 0, 436, 434, 0, 01849 415, 273, 243, 36, 203, 0, 0, 446, 358, 0, 01850 12, 448, 0, 309, 310, 0, 0, 270, 619, 320, 01851 0, 524, 323, 526, 330, 548, 362, 373, 0, 368, 01852 364, 410, 0, 0, 0, 536, 0, 538, 528, 0, 01853 544, 0, 541, 546, 0, 570, 294, 428, 399, 378, 01854 379, 379, 562, 619, 379, 572, 379, 379, 404, 608, 01855 402, 405, 60, 0, 445, 0, 102, 103, 110, 0, 01856 447, 0, 313, 316, 438, 439, 437, 0, 0, 0, 01857 0, 371, 0, 366, 413, 412, 533, 533, 533, 533, 01858 489, 601, 293, 0, 382, 0, 384, 374, 0, 391, 01859 0, 388, 393, 0, 401, 109, 428, 619, 426, 619, 01860 619, 0, 326, 0, 369, 0, 537, 0, 534, 539, 01861 542, 379, 379, 379, 379, 403, 601, 108, 608, 597, 01862 598, 440, 356, 321, 333, 367, 533, 383, 0, 380, 01863 386, 389, 432, 535, 379, 381 01864 }; 01865 01866 /* YYDEFGOTO[NTERM-NUM]. */ 01867 static const yytype_int16 yydefgoto[] = 01868 { 01869 -1, 1, 2, 66, 67, 68, 236, 567, 568, 252, 01870 253, 446, 254, 437, 70, 71, 358, 72, 73, 510, 01871 690, 243, 75, 76, 255, 77, 78, 79, 467, 80, 01872 209, 377, 378, 192, 193, 194, 195, 605, 556, 197, 01873 82, 439, 211, 260, 228, 748, 426, 427, 225, 226, 01874 213, 413, 428, 516, 83, 356, 259, 452, 625, 360, 01875 846, 361, 847, 732, 987, 736, 733, 930, 594, 596, 01876 746, 935, 245, 85, 86, 87, 88, 89, 90, 91, 01877 92, 93, 94, 713, 570, 721, 843, 844, 369, 772, 01878 773, 774, 959, 898, 801, 686, 687, 802, 969, 970, 01879 278, 279, 472, 777, 658, 879, 320, 511, 95, 96, 01880 711, 704, 565, 557, 318, 508, 507, 577, 986, 715, 01881 837, 916, 920, 97, 98, 99, 100, 101, 102, 103, 01882 290, 485, 104, 294, 105, 106, 292, 296, 286, 284, 01883 288, 477, 676, 675, 792, 891, 796, 107, 285, 108, 01884 109, 216, 217, 112, 218, 219, 589, 735, 744, 880, 01885 779, 745, 661, 662, 663, 664, 665, 804, 805, 666, 01886 667, 668, 669, 807, 808, 670, 671, 672, 673, 674, 01887 781, 396, 595, 265, 429, 221, 115, 629, 559, 399, 01888 304, 423, 424, 706, 457, 571, 364, 257 01889 }; 01890 01891 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01892 STATE-NUM. */ 01893 #define YYPACT_NINF -810 01894 static const yytype_int16 yypact[] = 01895 { 01896 -810, 102, 2888, -810, 7502, -810, -810, -810, 7025, -810, 01897 -810, -810, -810, -810, -810, -810, 7615, 7615, -810, -810, 01898 7615, 4210, 3805, -810, -810, -810, -810, 190, 6892, -21, 01899 -810, 10, -810, -810, -810, 3130, 3940, -810, -810, 3265, 01900 -810, -810, -810, -810, -810, -810, 8971, 8971, 130, 5262, 01901 9084, 7954, 8293, 7284, -810, 6759, -810, -810, -810, 54, 01902 70, 225, 228, 515, 9197, 8971, -810, 245, -810, 1021, 01903 -810, 269, -810, -810, 73, 120, 87, -810, 98, 9310, 01904 -810, 148, 3109, 44, 359, -810, 9084, 9084, -810, -810, 01905 6149, 9419, 9528, 9637, 6625, 30, 86, -810, -810, 230, 01906 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01907 3, 385, -810, 348, 490, -810, -810, -810, -810, -810, 01908 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 01909 -810, -810, -810, -810, -810, -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, 285, -810, -810, -810, -810, 01916 253, 8971, 374, 5401, 8971, 8971, 8971, 8971, -810, 328, 01917 3109, 364, -810, -810, 313, 369, 208, 224, 395, 247, 01918 354, -810, -810, -810, 6036, -810, 7615, 7615, -810, -810, 01919 6262, -810, 9084, 844, -810, 360, 388, 5540, -810, -810, 01920 -810, 379, 400, 73, -810, 464, 463, 501, 7728, -810, 01921 5262, 402, 245, -810, 1021, -21, 437, -810, 269, -21, 01922 415, 8, 317, -810, 364, 440, 317, -810, -21, 525, 01923 615, 9746, 470, -810, 488, 508, 575, 612, -810, -810, 01924 -810, -810, -810, -810, 438, -810, 447, 451, 284, 475, 01925 540, 496, 60, 502, 576, 516, 61, 550, 565, -810, 01926 -810, -810, -810, -810, -810, -810, 6375, 9084, 9084, 9084, 01927 9084, 7728, 9084, 9084, -810, -810, -810, 549, -810, -810, 01928 -810, 8406, -810, 5262, 7393, 527, 8406, 8971, 8971, 8971, 01929 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 01930 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 01931 8971, 8971, 8971, 10025, 7615, 10102, 4619, 269, 110, 110, 01932 9084, 9084, 245, 654, 538, 631, -810, -810, 645, 668, 01933 85, 93, 108, 405, 410, 9084, 377, -810, 123, 661, 01934 -810, -810, -810, -810, 40, 42, 56, 167, 180, 279, 01935 332, 336, 343, -810, -810, -810, 30, -810, -810, 10179, 01936 -810, -810, 9197, 9197, -810, -810, 394, -810, -810, -810, 01937 8971, 8971, 7841, -810, -810, 10256, 7615, 10333, 8971, 8971, 01938 8067, -810, -21, 558, -810, -810, -21, -810, 564, 566, 01939 -810, 66, -810, -810, -810, -810, -810, 7025, -810, 8971, 01940 5671, 574, 10256, 10333, 8971, 1021, 581, -21, -810, -810, 01941 6488, 572, -21, -810, -810, 8180, -810, -810, 8293, -810, 01942 -810, -810, 360, 678, -810, -810, -810, 588, 9746, 10410, 01943 7615, 10487, 1081, -810, -810, -810, -810, -810, -810, -810, 01944 -810, -810, -810, -810, -810, 302, -810, -810, 594, -810, 01945 -810, -810, 306, -810, 597, -810, 8971, 8971, -810, -810, 01946 -810, -810, -810, -810, -810, -810, -810, 63, 63, -810, 01947 -810, 63, 8971, -810, 605, 607, -810, -21, 9746, 617, 01948 -810, -810, -810, 636, 1231, -810, -810, 463, 2567, 2567, 01949 2567, 2567, 976, 976, 2722, 2633, 2567, 2567, 3244, 3244, 01950 339, 339, 1305, 976, 976, 986, 986, 1119, 255, 255, 01951 463, 463, 463, 4345, 3400, 4480, 3535, 400, 620, -810, 01952 -21, 591, -810, 742, -810, 400, 4075, 747, 754, -810, 01953 4758, 756, 5036, 52, 52, 654, 8519, 747, 121, 10564, 01954 7615, 10641, -810, 269, -810, 678, -810, 245, -810, -810, 01955 -810, 10718, 7615, 10179, 4619, 9084, 1274, -810, -810, -810, 01956 1148, -810, 2322, -810, 3109, 7025, 2974, -810, 8971, 364, 01957 -810, 354, 2995, 3670, -21, 398, 497, -810, -810, -810, 01958 -810, 7841, 8067, -810, -810, 9084, 3109, 644, -810, -810, 01959 -810, 3109, 5671, 212, -810, -810, 317, 9746, 588, 495, 01960 323, -21, 337, 376, 676, -810, -810, -810, -810, 8971, 01961 -810, 896, -810, -810, -810, -810, -810, 1142, -810, -810, 01962 -810, -810, -810, -810, 656, -810, 657, 743, 663, -810, 01963 667, 750, 671, 760, -810, -810, 763, -810, -810, -810, 01964 -810, -810, 463, 463, -810, 793, 5810, -810, -810, 5540, 01965 63, 5810, 679, 8632, -810, 588, 9746, 9197, 8971, 699, 01966 9197, 9197, -810, 549, 400, 681, 759, 9197, 9197, -810, 01967 549, 400, -810, -810, 8745, 810, -810, 718, -810, 810, 01968 -810, -810, -810, -810, 747, 92, -810, 81, 149, -21, 01969 144, 155, 9084, 245, -810, 9084, 4619, 495, 323, -810, 01970 -21, 747, 66, 1142, 4619, 245, 7158, -810, 86, 120, 01971 -810, 8971, -810, -810, -810, 8971, 8971, 504, 8971, 8971, 01972 694, 66, -810, 700, -810, -810, 390, 8971, -810, -810, 01973 896, 473, -810, 702, -21, -810, -21, 124, 1142, -810, 01974 571, -810, -810, -810, 38, -810, 1142, -810, -810, 881, 01975 -810, -810, -810, -810, -810, -810, -810, -810, 720, 9855, 01976 -810, -21, 716, 703, -810, 707, 663, -810, 723, 724, 01977 -810, 725, 856, 737, 5540, 859, 8971, 740, 588, 3109, 01978 8971, -810, 3109, -810, 3109, -810, -810, -810, 9197, -810, 01979 3109, -810, 3109, -810, -810, 605, -810, 797, -810, 5149, 01980 872, -810, 9084, 747, -810, 747, 5810, 5810, -810, 8858, 01981 4897, 159, 52, -810, 245, 747, -810, -810, -810, -21, 01982 747, -810, -810, -810, -810, 3109, 8971, 8067, -810, -810, 01983 -810, -21, 875, 752, 953, -810, 762, 5810, 5540, -810, 01984 -810, -810, 753, 757, -810, 663, -810, 767, -810, 768, 01985 767, 5923, 9855, 848, 689, 787, -810, 1386, -810, 622, 01986 -810, -810, 1386, -810, 1533, -810, 1028, -810, -810, 778, 01987 -810, 784, 3109, -810, 3109, 9964, 110, -810, -810, 5810, 01988 -810, -810, 110, -810, -810, 747, 747, -810, 383, -810, 01989 4619, -810, -810, -810, -810, 1274, -810, 785, 875, 672, 01990 -810, -810, 911, 792, 1142, -810, 881, -810, -810, 881, 01991 -810, 881, -810, -810, 820, 689, -810, 10795, -810, -810, 01992 806, 809, -810, 663, 811, -810, 812, 811, -810, 352, 01993 -810, -810, -810, 891, -810, 691, 508, 575, 612, 4619, 01994 -810, 4758, -810, -810, -810, -810, -810, 5810, 747, 4619, 01995 875, 785, 875, 823, -810, -810, 767, 824, 767, 767, 01996 -810, 818, 826, 1386, -810, 1533, -810, -810, 1533, -810, 01997 1533, -810, -810, 1028, -810, 678, 10872, 7615, 10949, 754, 01998 718, 747, -810, 747, 785, 875, -810, 881, -810, -810, 01999 -810, 811, 825, 811, 811, -810, 49, 323, -21, 179, 02000 215, -810, -810, -810, -810, 785, 767, -810, 1533, -810, 02001 -810, -810, 216, -810, 811, -810 02002 }; 02003 02004 /* YYPGOTO[NTERM-NUM]. */ 02005 static const yytype_int16 yypgoto[] = 02006 { 02007 -810, -810, -810, -382, -810, 26, -810, -549, -7, -810, 02008 513, -810, 33, -810, -315, -33, -63, -55, -810, -216, 02009 -810, 766, -13, 874, -164, 20, -73, -810, -409, 29, 02010 1882, -309, 882, -54, -810, -5, -810, -810, 6, -810, 02011 1208, -810, 1366, -810, -41, 256, -344, 78, -14, -810, 02012 -384, -205, -4, -304, -15, -810, -810, -810, -810, -810, 02013 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 02014 -810, -810, 64, -810, -810, -810, -810, -810, -810, -810, 02015 -810, -810, -810, -1, -333, -519, -44, -623, -810, -789, 02016 -771, 211, 297, 71, -810, -437, -810, -693, -810, -29, 02017 -810, -810, -810, -810, -810, -810, 237, -810, -810, -810, 02018 -810, -810, -810, -810, -94, -810, -810, -531, -810, -31, 02019 -810, -810, -810, -810, -810, -810, 890, -810, -810, -810, 02020 -810, 701, -810, -810, -810, -810, -810, -810, -810, 940, 02021 -810, -126, -810, -810, -810, -810, -810, -3, -810, 11, 02022 -810, 1400, 1673, 905, 1898, 1689, -810, -810, 65, -451, 02023 -102, -385, -809, -588, -689, -289, 222, 107, -810, -810, 02024 -810, 18, -721, -764, 115, 235, -810, -634, -810, -37, 02025 -627, -810, -810, -810, 114, -388, -810, -324, -810, 623, 02026 -47, -9, -123, -568, -214, 21, -11, -2 02027 }; 02028 02029 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 02030 positive, shift that token. If negative, reduce the rule which 02031 number is the opposite. If YYTABLE_NINF, syntax error. */ 02032 #define YYTABLE_NINF -620 02033 static const yytype_int16 yytable[] = 02034 { 02035 116, 283, 400, 208, 208, 198, 325, 208, 229, 299, 02036 560, 521, 214, 214, 196, 421, 214, 258, 232, 199, 02037 235, 659, 526, 234, 359, 198, 572, 362, 610, 558, 02038 117, 566, 617, 316, 196, 69, 610, 69, 273, 199, 02039 394, 785, 251, 363, 724, 741, 757, 261, 459, 263, 02040 267, 809, 461, 357, 357, 723, 306, 357, 627, 638, 02041 317, 196, -106, 775, 273, 888, 84, 586, 84, 256, 02042 617, 689, 614, 766, 691, 600, 273, 273, 273, 720, 02043 215, 215, 272, 876, 215, 940, 447, 660, 305, 881, 02044 -518, 558, 840, 566, 212, 222, 845, 971, 223, 314, 02045 196, 937, 3, 312, 313, 569, -106, 432, 895, 695, 02046 -102, 305, 314, 84, 215, 397, -102, 274, -103, 630, 02047 231, 488, 494, 569, 587, -510, 641, -509, 215, -338, 02048 220, 220, 451, -110, 220, 654, 453, -93, 965, 684, 02049 237, -511, 455, 274, 883, 659, -109, 630, 319, 456, 02050 215, 215, 889, 877, 215, 368, 379, 379, 655, 517, 02051 479, 851, 482, 398, 486, 262, 266, 991, 486, -105, 02052 489, 495, 856, -510, -108, -509, -338, -338, 900, 901, 02053 -107, 685, 775, 873, -104, -597, 247, 855, -106, -511, 02054 -106, 302, -105, 303, 289, 860, 251, 431, 466, 433, 02055 321, 940, 316, 315, 971, 449, 659, 231, 881, 227, 02056 291, 208, 414, 208, 208, -97, 315, -597, 414, -93, 02057 214, 1024, 214, 888, 421, 430, 849, -94, -107, -104, 02058 441, 302, 322, 303, 617, 878, 729, 610, 610, 965, 02059 588, 450, -101, 251, 500, 501, 502, 503, 740, 302, 02060 763, 303, -512, 814, 1045, -100, 273, 630, 948, 462, 02061 881, 326, 302, 961, 303, -514, 513, 84, 966, 630, 02062 256, 522, 776, 305, 357, 357, 357, 357, -96, 505, 02063 506, 445, 739, -99, 775, -598, 775, 818, 215, -98, 02064 215, 215, 659, -95, 215, -518, 215, 573, 574, 618, 02065 -512, 84, 422, 620, 425, 984, 312, 313, 623, 273, 02066 997, -519, 84, -514, 84, 575, 251, 515, -105, 881, 02067 -105, -102, 515, 327, 633, -74, 230, 357, 357, 635, 02068 56, 231, 499, 929, 419, 274, 1007, -103, 220, 69, 02069 220, 208, 583, 256, 504, 473, -88, 601, 603, 481, 02070 775, 993, 430, 519, -107, -104, -107, -104, 859, 678, 02071 -110, 564, -96, 473, -513, 293, 678, 473, 295, 1032, 02072 84, 215, 215, 215, 215, 84, 215, 215, 350, 351, 02073 352, 988, 521, 305, 302, 215, 303, 84, 274, 230, 02074 215, 474, 850, 475, 694, 466, 803, 985, 839, 590, 02075 576, -98, 775, 208, 775, 564, 754, 327, -293, 474, 02076 836, 475, -513, 474, 430, 475, -432, -515, 215, 404, 02077 84, -504, 764, 564, 215, 215, 414, 414, -507, 584, 02078 406, -594, 624, 585, 198, 402, -595, 775, 116, 215, 02079 1023, 410, 677, 196, 353, 466, 680, 412, 199, 564, 02080 -96, 458, 411, 273, 415, -293, -293, 208, 456, -598, 02081 348, 349, 350, 351, 352, -515, 215, 215, 430, -504, 02082 1052, -96, -519, 69, -96, -432, -507, 564, -96, 617, 02083 215, 444, 418, 610, 659, 758, 1013, 825, 420, -98, 02084 -504, 354, 355, 231, 833, -507, 438, 887, -103, 473, 02085 890, 416, 417, 273, 84, 688, 688, -109, 473, 688, 02086 -98, -105, 473, -98, 84, 224, 702, -98, 440, -94, 02087 -432, -601, -432, -432, 709, 769, 611, 645, 646, 647, 02088 648, 327, 274, 699, 215, -594, 227, -504, -504, 448, 02089 -595, -594, -507, -507, 703, 474, -595, 475, 476, 442, 02090 -73, 705, 710, 454, 474, 754, 475, 478, 474, 747, 02091 475, 480, 742, 717, 765, 719, 716, 208, 787, 636, 02092 790, 460, 725, 469, 297, 298, 726, 403, 430, 208, 02093 -601, 463, 274, 979, 759, 483, 749, 564, 444, 981, 02094 430, 866, 761, -516, 722, 722, 416, 443, 750, 564, 02095 752, 473, 198, -110, 468, 705, 487, 872, 734, 414, 02096 -107, 196, 490, 964, -109, 967, 199, -104, 496, 858, 02097 470, 471, 273, 466, -101, -601, 493, -601, -601, 649, 02098 116, -597, 705, 497, 84, -100, 84, 473, 868, 650, 02099 -516, -516, 522, 509, 215, 821, 823, 474, 810, 475, 02100 484, 875, 829, 831, 863, 996, 215, 998, 84, 215, 02101 -517, 520, 999, 826, 782, 69, 782, 653, 654, 852, 02102 747, 576, 854, 1038, 464, 465, 811, 498, 707, 812, 02103 799, 273, 813, 474, 815, 475, 491, 578, 688, 215, 02104 650, 655, 862, 582, 630, 619, 84, -284, 621, 357, 02105 622, 274, 357, 806, -105, 628, -88, -517, -517, 750, 02106 515, 632, 838, 841, 1031, 841, 1033, 841, 653, 654, 02107 705, 1034, 637, 848, 769, -96, 645, 646, 647, 648, 02108 579, 705, 842, 839, 679, 760, 933, 681, 1046, -268, 02109 857, 693, 655, 886, -284, -284, 591, 886, 936, 697, 02110 84, 696, 196, 84, 853, 84, -423, 712, 414, 1054, 02111 274, 215, 714, -294, 215, 215, 861, 811, 74, 718, 02112 74, 215, 215, 913, 957, 762, 1016, 580, 581, 922, 02113 945, 947, 74, 74, 273, 950, 74, 952, 953, 767, 02114 778, 780, 811, 592, 593, 783, 215, 784, 885, 215, 02115 84, 786, 788, 782, 782, 789, 992, 909, 84, 357, 02116 -294, -294, 791, -269, 820, 74, 74, 793, 794, 827, 02117 795, 592, 593, 1017, 1018, 839, 44, 45, 867, 708, 02118 74, 869, 918, 892, 896, 917, 874, 897, 921, 925, 02119 926, 899, 923, 928, 924, 798, 828, 645, 646, 647, 02120 648, 799, 74, 74, 932, -107, 74, 902, 904, 934, 02121 810, 650, 886, 894, 906, 810, 907, 810, 908, 910, 02122 942, 943, -104, 722, -270, 931, -98, 273, 84, 903, 02123 905, 919, 651, 782, 954, 915, 938, 944, 652, 653, 02124 654, 946, 215, -95, 1026, 1028, 1029, 1030, 434, 941, 02125 273, 949, 951, 84, 956, 958, 215, 435, 436, 972, 02126 84, 84, 980, 655, 84, 806, 656, 963, -271, 990, 02127 806, 994, 806, 995, 982, 983, 841, 769, 1000, 645, 02128 646, 647, 648, 769, 231, 645, 646, 647, 648, 649, 02129 1003, 84, 84, 1005, 1053, 1008, 1010, 1015, 769, 650, 02130 645, 646, 647, 648, -597, 84, 955, 1025, 1027, 1048, 02131 1014, 782, -598, 634, 770, 366, 810, 834, 810, 74, 02132 651, 810, 1019, 810, 1020, 383, 1042, 653, 654, 975, 02133 1021, 871, 800, 84, 1035, 770, 864, 1022, 1041, 401, 02134 74, 771, 74, 74, 84, 492, 74, 287, 74, 395, 02135 989, 655, 884, 74, 208, 769, 962, 645, 646, 647, 02136 648, 810, 960, 882, 74, 430, 74, 716, 841, 597, 02137 1043, 806, 1044, 806, 564, 0, 806, 0, 806, 705, 02138 0, 1004, 1006, 0, 0, 1009, 0, 1011, 1012, 0, 02139 0, 0, 770, 84, 327, 84, 0, 0, 939, 0, 02140 0, 84, 0, 84, 327, 0, 0, 0, 0, 340, 02141 341, 307, 308, 309, 310, 311, 806, 0, 0, 340, 02142 341, 0, 74, 74, 74, 74, 74, 74, 74, 74, 02143 968, 215, 645, 646, 647, 648, 0, 74, 0, 74, 02144 0, 0, 74, 0, 345, 346, 347, 348, 349, 350, 02145 351, 352, 1047, 1049, 1050, 1051, 347, 348, 349, 350, 02146 351, 352, 0, 0, 0, 0, 0, 0, 0, 0, 02147 74, 0, 74, 0, 0, 1055, 74, 74, 0, 0, 02148 0, 0, 0, 644, 0, 645, 646, 647, 648, 649, 02149 0, 74, 0, 0, 0, 0, 0, 0, -619, 650, 02150 0, 0, 0, 0, 0, 0, -619, -619, -619, 0, 02151 0, -619, -619, -619, 0, -619, 0, 0, 74, 74, 02152 651, 0, 0, 0, -619, -619, 652, 653, 654, 0, 02153 0, 0, 74, 0, 0, -619, -619, 327, -619, -619, 02154 -619, -619, -619, 0, 644, 0, 645, 646, 647, 648, 02155 649, 655, 340, 341, 656, 0, 74, 0, 0, 0, 02156 650, 0, 0, 0, 0, 0, 74, 657, 0, 0, 02157 0, 0, 0, 0, 210, 210, 0, 0, 210, 0, 02158 0, 651, 0, -619, 0, 0, 74, 652, 653, 654, 02159 348, 349, 350, 351, 352, 0, 0, 0, 0, 0, 02160 0, 0, 0, 0, 244, 246, -619, 0, 0, 210, 02161 210, 0, 655, 0, 0, 656, 0, 0, 0, 0, 02162 0, 0, 300, 301, 0, 698, 0, 0, -619, -619, 02163 0, -619, 0, 0, 227, -619, 0, -619, 0, -619, 02164 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 02165 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 02166 338, 339, 0, 0, 340, 341, 0, 0, 0, 0, 02167 0, 0, 0, 0, 0, 0, 644, 0, 645, 646, 02168 647, 648, 649, 0, 0, 0, 74, 0, 74, 0, 02169 0, 0, 650, 0, 0, 342, 74, 343, 344, 345, 02170 346, 347, 348, 349, 350, 351, 352, 0, 74, 0, 02171 74, 74, 0, 651, 0, -245, 0, 0, 0, 652, 02172 653, 654, 0, 327, 328, 329, 330, 331, 332, 333, 02173 334, 335, 336, 337, 338, 339, 0, 0, 340, 341, 02174 0, 74, 0, 0, 655, 0, 0, 656, 74, 0, 02175 0, 0, 110, 0, 110, 0, 0, 0, 0, 210, 02176 743, 0, 210, 210, 210, 300, 0, 0, 264, 342, 02177 0, 343, 344, 345, 346, 347, 348, 349, 350, 351, 02178 352, 0, 210, 0, 210, 210, 0, 0, 798, 0, 02179 645, 646, 647, 648, 799, 0, 231, 0, 0, 110, 02180 0, 0, 74, 275, 650, 74, 0, 74, 0, 0, 02181 0, 0, 0, 74, 0, 0, 74, 74, 0, 0, 02182 0, 0, 0, 74, 74, 651, 0, 0, 0, 275, 02183 0, 652, 653, 654, 0, 0, 0, 0, 0, 0, 02184 0, 370, 380, 380, 380, 0, 0, 0, 74, 0, 02185 0, 74, 74, 0, 0, 0, 655, 0, 0, 656, 02186 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02187 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 02188 0, 0, 0, 0, 524, 527, 528, 529, 530, 531, 02189 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 02190 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 02191 552, 0, 210, 0, 0, 0, 0, 405, 0, 0, 02192 407, 408, 409, 0, 0, 0, 0, 0, 0, 0, 02193 74, 0, 0, 0, 0, 769, 0, 645, 646, 647, 02194 648, 799, 0, 0, 74, 0, 0, 0, 0, 0, 02195 0, 650, 0, 110, 0, 74, 0, 0, 74, 0, 02196 602, 604, 74, 74, 0, 0, 74, 0, 606, 210, 02197 210, 0, 651, 0, 210, 0, 602, 604, 210, 653, 02198 654, 0, 0, 0, 0, 0, 0, 110, 0, 0, 02199 0, 0, 0, 74, 74, 0, 0, 626, 110, 0, 02200 110, 0, 631, 655, 0, 0, 0, 74, 0, 0, 02201 0, 0, 0, 210, 0, 0, 210, 0, 0, 0, 02202 0, 275, 0, 0, 0, 111, 0, 111, 210, 0, 02203 0, 0, 0, 0, 0, 74, 0, 514, 0, 0, 02204 0, 114, 525, 114, 0, 0, 74, 0, 0, 0, 02205 0, 0, 0, 0, 682, 683, 110, 0, 0, 0, 02206 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 02207 210, 0, 111, 110, 275, 0, 276, 0, 0, 0, 02208 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 02209 0, 0, 277, 0, 0, 74, 0, 74, 0, 0, 02210 0, 0, 276, 74, 0, 74, 110, 0, 0, 0, 02211 0, 0, 0, 0, 371, 381, 381, 381, 277, 0, 02212 0, 0, 0, 0, 0, 0, 0, 607, 609, 0, 02213 372, 382, 382, 74, 210, 0, 264, 0, 210, 0, 02214 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02215 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02216 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 02217 0, 609, 0, 0, 264, 0, 0, 0, 0, 210, 02218 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02219 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02220 110, 0, 0, 0, 0, 0, 0, 210, 0, 0, 02221 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 02222 0, 0, 0, 0, 0, 0, 111, 0, 692, 0, 02223 0, 0, 0, 0, 81, 0, 81, 0, 0, 0, 02224 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 02225 113, 210, 113, 0, 0, 606, 819, 0, 822, 824, 02226 111, 0, 0, 0, 0, 830, 832, 0, 275, 0, 02227 0, 111, 210, 111, 0, 0, 114, 0, 0, 0, 02228 0, 81, 0, 0, 0, 0, 0, 114, 0, 114, 02229 0, 0, 525, 0, 276, 0, 0, 113, 0, 0, 02230 0, 0, 0, 0, 0, 0, 0, 0, 0, 865, 02231 277, 0, 0, 822, 824, 0, 830, 832, 0, 0, 02232 110, 0, 110, 367, 753, 210, 0, 0, 0, 111, 02233 0, 0, 0, 0, 111, 0, 0, 609, 264, 0, 02234 0, 0, 0, 0, 110, 114, 111, 276, 0, 0, 02235 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02236 0, 0, 114, 277, 0, 768, 0, 0, 0, 0, 02237 0, 0, 0, 0, 210, 0, 0, 0, 912, 111, 02238 0, 0, 110, 0, 0, 0, 914, 275, 0, 0, 02239 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 02240 0, 0, 0, 0, 0, 0, 0, 210, 0, 817, 02241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02242 0, 0, 0, 0, 914, 210, 0, 0, 0, 0, 02243 835, 0, 0, 0, 0, 81, 110, 0, 0, 110, 02244 0, 110, 0, 0, 0, 0, 275, 0, 0, 0, 02245 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 02246 0, 0, 0, 111, 0, 0, 0, 0, 0, 81, 02247 0, 0, 0, 111, 0, 0, 0, 0, 0, 114, 02248 81, 0, 81, 870, 0, 113, 110, 0, 0, 114, 02249 0, 276, 0, 0, 110, 0, 113, 0, 113, 0, 02250 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, 02251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02253 0, 0, 911, 0, 0, 0, 0, 0, 81, 0, 02254 0, 276, 0, 81, 0, 0, 0, 0, 0, 380, 02255 0, 0, 0, 0, 113, 81, 0, 277, 523, 113, 02256 0, 0, 0, 0, 110, 927, 0, 0, 0, 0, 02257 0, 113, 0, 0, 0, 210, 0, 0, 0, 0, 02258 0, 0, 0, 264, 0, 0, 0, 0, 81, 110, 02259 0, 0, 0, 111, 0, 111, 110, 110, 0, 0, 02260 110, 0, 0, 0, 113, 0, 0, 0, 0, 114, 02261 0, 114, 0, 0, 0, 0, 0, 111, 0, 0, 02262 0, 0, 0, 0, 0, 0, 0, 110, 110, 0, 02263 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 02264 0, 110, 380, 0, 0, 0, 0, 0, 0, 0, 02265 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 02266 276, 0, 0, 0, 0, 976, 0, 0, 0, 110, 02267 0, 114, 81, 0, 0, 0, 277, 0, 0, 0, 02268 110, 0, 81, 0, 0, 0, 0, 0, 113, 0, 02269 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 02270 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 02271 0, 0, 111, 0, 111, 797, 751, 0, 0, 276, 02272 0, 0, 0, 0, 0, 114, 0, 0, 114, 110, 02273 114, 110, 0, 0, 0, 277, 0, 110, 0, 110, 02274 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 02275 337, 338, 339, 0, 0, 340, 341, 0, 0, 111, 02276 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 02277 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 02278 0, 0, 0, 114, 0, 0, 342, 0, 343, 344, 02279 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 02280 0, 0, 81, 0, 81, 0, 0, 0, 0, 0, 02281 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 02282 113, 0, 381, 0, 0, 0, 81, 0, 0, 0, 02283 0, 0, 0, 0, 0, 0, 0, 111, 382, 0, 02284 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 02285 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 02286 0, 0, 111, 0, 81, 0, 0, 0, 0, 111, 02287 111, 0, 0, 111, 0, 0, 0, 0, 114, 0, 02288 113, 0, 0, 0, 0, 114, 114, 0, 0, 114, 02289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02290 111, 111, 0, 0, 0, 0, 0, 0, 0, 0, 02291 0, 0, 0, 0, 111, 381, 114, 114, 81, 0, 02292 0, 81, 0, 81, 0, 0, 0, 0, 0, 523, 02293 114, 382, 0, 0, 113, 0, 0, 113, 977, 113, 02294 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 02295 0, 0, 0, 111, 978, 0, 0, 0, 114, 0, 02296 0, 0, 0, 0, 0, 0, 0, 0, 81, 114, 02297 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 02298 0, 0, 0, 0, 113, 327, -620, -620, -620, -620, 02299 332, 333, 113, 0, -620, -620, 0, 0, 0, 0, 02300 340, 341, 111, 0, 111, 0, 0, 0, 0, 0, 02301 111, 0, 111, 0, 0, 0, 0, 0, 114, 0, 02302 114, 0, 0, 0, 0, 0, 114, 0, 114, 0, 02303 0, 0, 0, 343, 344, 345, 346, 347, 348, 349, 02304 350, 351, 352, 0, 0, 0, 81, 0, 0, 0, 02305 0, 327, 328, 329, 330, 331, 332, 333, 334, 0, 02306 336, 337, 113, 0, 0, 0, 340, 341, 0, 0, 02307 0, 81, 0, 0, 0, 0, 0, 0, 81, 81, 02308 0, 0, 81, 0, 0, 0, 0, 113, 0, 0, 02309 0, 0, 0, 0, 113, 113, 0, 0, 113, 343, 02310 344, 345, 346, 347, 348, 349, 350, 351, 352, 81, 02311 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02312 0, 0, 0, 81, 0, 113, 113, 0, 0, 0, 02313 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 02314 327, 328, 329, 330, 331, 332, 333, 974, 0, 336, 02315 337, 81, 0, 0, 0, 340, 341, 0, 0, 0, 02316 0, 0, 81, 0, 0, 0, 0, 113, 0, 0, 02317 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 02318 0, 0, 0, 0, 0, 0, 0, 0, 343, 344, 02319 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 02320 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02321 0, 81, 0, 81, 0, 0, 0, 0, 0, 81, 02322 0, 81, 0, 0, 0, 0, 0, 113, 0, 113, 02323 0, 0, 0, 0, 0, 113, 0, 113, -619, 4, 02324 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02325 11, 0, 0, 0, 12, 0, 13, 14, 15, 16, 02326 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02327 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02328 0, 0, 0, 28, 29, 30, 31, 32, 33, 34, 02329 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02330 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02332 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02333 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02334 58, 59, 60, 61, 62, -601, 0, 0, 0, 0, 02335 0, 0, 0, -601, -601, -601, 0, 0, -601, -601, 02336 -601, 0, -601, 0, 63, 64, 65, 0, 698, 0, 02337 0, -601, -601, -601, -601, 0, 0, -619, 0, -619, 02338 0, 0, -601, -601, 0, -601, -601, -601, -601, -601, 02339 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 02340 335, 336, 337, 338, 339, 0, 0, 340, 341, 0, 02341 0, 0, 0, -601, -601, -601, -601, -601, -601, -601, 02342 -601, -601, -601, -601, -601, -601, 0, 0, -601, -601, 02343 -601, 0, 755, -601, 0, 0, 0, 0, 342, -601, 02344 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 02345 0, 0, 0, -601, 0, 0, -601, 0, -106, -601, 02346 -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, 02347 -601, 0, 0, 0, 0, -601, -601, -601, -601, -601, 02348 -504, 0, -601, -601, -601, 0, -601, 0, -504, -504, 02349 -504, 0, 0, -504, -504, -504, 0, -504, 0, 0, 02350 0, 0, 0, 0, 0, -504, 0, -504, -504, -504, 02351 0, 0, 0, 0, 0, 0, 0, -504, -504, 0, 02352 -504, -504, -504, -504, -504, 0, 0, 327, 328, 329, 02353 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 02354 0, 0, 340, 341, 0, 0, 0, 0, -504, -504, 02355 -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, 02356 -504, 0, 0, -504, -504, -504, 0, -504, -504, 0, 02357 0, 0, 0, 342, -504, 343, 344, 345, 346, 347, 02358 348, 349, 350, 351, 352, 0, 0, 0, -504, 0, 02359 0, -504, 0, -504, -504, -504, -504, -504, -504, -504, 02360 -504, -504, -504, -504, -504, -504, 0, 0, 0, 0, 02361 0, -504, -504, -504, -504, -507, 0, -504, -504, -504, 02362 0, -504, 0, -507, -507, -507, 0, 0, -507, -507, 02363 -507, 0, -507, 0, 0, 0, 0, 0, 0, 0, 02364 -507, 0, -507, -507, -507, 0, 0, 0, 0, 0, 02365 0, 0, -507, -507, 0, -507, -507, -507, -507, -507, 02366 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 02367 335, 336, 337, -620, -620, 0, 0, 340, 341, 0, 02368 0, 0, 0, -507, -507, -507, -507, -507, -507, -507, 02369 -507, -507, -507, -507, -507, -507, 0, 0, -507, -507, 02370 -507, 0, -507, -507, 0, 0, 0, 0, 0, -507, 02371 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 02372 0, 0, 0, -507, 0, 0, -507, 0, -507, -507, 02373 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, 02374 -507, 0, 0, 0, 0, 0, -507, -507, -507, -507, 02375 -602, 0, -507, -507, -507, 0, -507, 0, -602, -602, 02376 -602, 0, 0, -602, -602, -602, 0, -602, 0, 0, 02377 0, 0, 0, 0, 0, 0, -602, -602, -602, -602, 02378 0, 0, 0, 0, 0, 0, 0, -602, -602, 0, 02379 -602, -602, -602, -602, -602, 0, 0, 0, 0, 0, 02380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02381 0, 0, 0, 0, 0, 0, 0, 0, -602, -602, 02382 -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 02383 -602, 0, 0, -602, -602, -602, 0, 0, -602, 0, 02384 0, 0, 0, 0, -602, 0, 0, 0, 0, 0, 02385 0, 0, 0, 0, 0, 0, 0, 0, -602, 0, 02386 0, -602, 0, 0, -602, -602, -602, -602, -602, -602, 02387 -602, -602, -602, -602, -602, -602, 0, 0, 0, 0, 02388 -602, -602, -602, -602, -602, -603, 0, -602, -602, -602, 02389 0, -602, 0, -603, -603, -603, 0, 0, -603, -603, 02390 -603, 0, -603, 0, 0, 0, 0, 0, 0, 0, 02391 0, -603, -603, -603, -603, 0, 0, 0, 0, 0, 02392 0, 0, -603, -603, 0, -603, -603, -603, -603, -603, 02393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02395 0, 0, 0, -603, -603, -603, -603, -603, -603, -603, 02396 -603, -603, -603, -603, -603, -603, 0, 0, -603, -603, 02397 -603, 0, 0, -603, 0, 0, 0, 0, 0, -603, 02398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02399 0, 0, 0, -603, 0, 0, -603, 0, 0, -603, 02400 -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, 02401 -603, 0, 0, 0, 0, -603, -603, -603, -603, -603, 02402 -293, 0, -603, -603, -603, 0, -603, 0, -293, -293, 02403 -293, 0, 0, -293, -293, -293, 0, -293, 0, 0, 02404 0, 0, 0, 0, 0, 0, 0, -293, -293, -293, 02405 0, 0, 0, 0, 0, 0, 0, -293, -293, 0, 02406 -293, -293, -293, -293, -293, 0, 0, 0, 0, 0, 02407 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02408 0, 0, 0, 0, 0, 0, 0, 0, -293, -293, 02409 -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 02410 -293, 0, 0, -293, -293, -293, 0, 756, -293, 0, 02411 0, 0, 0, 0, -293, 0, 0, 0, 0, 0, 02412 0, 0, 0, 0, 0, 0, 0, 0, -293, 0, 02413 0, -293, 0, -108, -293, -293, -293, -293, -293, -293, 02414 -293, -293, -293, -293, -293, -293, 0, 0, 0, 0, 02415 0, -293, -293, -293, -293, -431, 0, -293, -293, -293, 02416 0, -293, 0, -431, -431, -431, 0, 0, -431, -431, 02417 -431, 0, -431, 0, 0, 0, 0, 0, 0, 0, 02418 0, -431, -431, -431, 0, 0, 0, 0, 0, 0, 02419 0, 0, -431, -431, 0, -431, -431, -431, -431, -431, 02420 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02421 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02422 0, 0, 0, -431, -431, -431, -431, -431, -431, -431, 02423 -431, -431, -431, -431, -431, -431, 0, 0, -431, -431, 02424 -431, 0, 0, -431, 0, 0, 0, 0, 0, -431, 02425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02426 0, 0, 0, -431, 0, 0, 0, 0, 0, -431, 02427 0, -431, -431, -431, -431, -431, -431, -431, -431, -431, 02428 -431, 0, 0, 0, 0, -431, -431, -431, -431, -431, 02429 -285, 227, -431, -431, -431, 0, -431, 0, -285, -285, 02430 -285, 0, 0, -285, -285, -285, 0, -285, 0, 0, 02431 0, 0, 0, 0, 0, 0, 0, -285, -285, -285, 02432 0, 0, 0, 0, 0, 0, 0, -285, -285, 0, 02433 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 02434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02435 0, 0, 0, 0, 0, 0, 0, 0, -285, -285, 02436 -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02437 -285, 0, 0, -285, -285, -285, 0, 0, -285, 0, 02438 0, 0, 0, 0, -285, 0, 0, 0, 0, 0, 02439 0, 0, 0, 0, 0, 0, 0, 0, -285, 0, 02440 0, -285, 0, 0, -285, -285, -285, -285, -285, -285, 02441 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 02442 0, -285, -285, -285, -285, -421, 0, -285, -285, -285, 02443 0, -285, 0, -421, -421, -421, 0, 0, -421, -421, 02444 -421, 0, -421, 0, 0, 0, 0, 0, 0, 0, 02445 0, -421, -421, -421, 0, 0, 0, 0, 0, 0, 02446 0, 0, -421, -421, 0, -421, -421, -421, -421, -421, 02447 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02449 0, 0, 0, -421, -421, -421, -421, -421, -421, -421, 02450 -421, -421, -421, -421, -421, -421, 0, 0, -421, -421, 02451 -421, 0, 0, -421, 0, 0, 0, 0, 0, -421, 02452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02453 0, 0, 0, -421, 0, 0, 0, 0, 0, -421, 02454 0, -421, -421, -421, -421, -421, -421, -421, -421, -421, 02455 -421, 0, 0, 0, 0, -421, -421, -421, -421, -421, 02456 -300, -421, -421, -421, -421, 0, -421, 0, -300, -300, 02457 -300, 0, 0, -300, -300, -300, 0, -300, 0, 0, 02458 0, 0, 0, 0, 0, 0, 0, -300, -300, 0, 02459 0, 0, 0, 0, 0, 0, 0, -300, -300, 0, 02460 -300, -300, -300, -300, -300, 0, 0, 0, 0, 0, 02461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02462 0, 0, 0, 0, 0, 0, 0, 0, -300, -300, 02463 -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 02464 -300, 0, 0, -300, -300, -300, 0, 0, -300, 0, 02465 0, 0, 0, 0, -300, 0, 0, 0, 0, 0, 02466 0, 0, 0, 0, 0, 0, 0, 0, -300, 0, 02467 0, 0, 0, 0, -300, 0, -300, -300, -300, -300, 02468 -300, -300, -300, -300, -300, -300, 0, 0, 0, 0, 02469 0, -300, -300, -300, -300, -601, 224, -300, -300, -300, 02470 0, -300, 0, -601, -601, -601, 0, 0, 0, -601, 02471 -601, 0, -601, 0, 0, 0, 0, 0, 0, 0, 02472 0, -601, 0, 0, 0, 0, 0, 0, 0, 0, 02473 0, 0, -601, -601, 0, -601, -601, -601, -601, -601, 02474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02475 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02476 0, 0, 0, -601, -601, -601, -601, -601, -601, -601, 02477 -601, -601, -601, -601, -601, -601, 0, 0, -601, -601, 02478 -601, 0, 700, 0, 0, 0, 0, 0, 0, 0, 02479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02480 0, 0, 0, -601, 0, 0, 0, 0, -106, -601, 02481 0, -601, -601, -601, -601, -601, -601, -601, -601, -601, 02482 -601, 0, 0, 0, 0, -601, -601, -601, -601, -97, 02483 -293, 0, -601, 0, -601, 0, -601, 0, -293, -293, 02484 -293, 0, 0, 0, -293, -293, 0, -293, 0, 0, 02485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02486 0, 0, 0, 0, 0, 0, 0, -293, -293, 0, 02487 -293, -293, -293, -293, -293, 0, 0, 0, 0, 0, 02488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02489 0, 0, 0, 0, 0, 0, 0, 0, -293, -293, 02490 -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 02491 -293, 0, 0, -293, -293, -293, 0, 701, 0, 0, 02492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02493 0, 0, 0, 0, 0, 0, 0, 0, -293, 0, 02494 0, 0, 0, -108, -293, 0, -293, -293, -293, -293, 02495 -293, -293, -293, -293, -293, -293, 0, 0, 0, 0, 02496 0, -293, -293, -293, -99, 0, 0, -293, 0, -293, 02497 248, -293, 5, 6, 7, 8, 9, -619, -619, -619, 02498 10, 11, 0, 0, -619, 12, 0, 13, 14, 15, 02499 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02500 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02501 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 02502 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02503 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02505 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02506 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02507 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02509 0, 0, 0, 0, 0, 63, 64, 65, 0, 0, 02510 0, 0, 0, 0, 0, 0, 0, 0, -619, 248, 02511 -619, 5, 6, 7, 8, 9, 0, 0, -619, 10, 02512 11, 0, -619, -619, 12, 0, 13, 14, 15, 16, 02513 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02514 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02515 0, 0, 0, 28, 29, 249, 31, 32, 33, 34, 02516 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02517 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02519 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02520 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02521 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02523 0, 0, 0, 0, 63, 64, 65, 0, 0, 0, 02524 0, 0, 0, 0, 0, 0, 0, -619, 248, -619, 02525 5, 6, 7, 8, 9, 0, 0, -619, 10, 11, 02526 0, 0, -619, 12, -619, 13, 14, 15, 16, 17, 02527 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02528 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 02529 0, 0, 28, 29, 249, 31, 32, 33, 34, 35, 02530 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02531 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02533 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02534 52, 0, 53, 0, 0, 54, 55, 56, 57, 58, 02535 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02537 0, 0, 0, 63, 64, 65, 0, 0, 0, 0, 02538 0, 0, 0, 0, 0, 0, -619, 248, -619, 5, 02539 6, 7, 8, 9, 0, 0, -619, 10, 11, 0, 02540 0, -619, 12, 0, 13, 14, 15, 16, 17, 18, 02541 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02542 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 02543 0, 28, 29, 249, 31, 32, 33, 34, 35, 36, 02544 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02545 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02547 0, 0, 48, 0, 0, 49, 50, 0, 51, 52, 02548 0, 53, 0, 0, 54, 55, 56, 57, 58, 59, 02549 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02550 248, 0, 5, 6, 7, 8, 9, 0, -619, -619, 02551 10, 11, 63, 64, 65, 12, 0, 13, 14, 15, 02552 16, 17, 18, 19, 0, -619, 0, -619, 0, 20, 02553 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02554 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 02555 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02556 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02557 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02558 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02559 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02560 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02561 0, 0, 0, 248, 0, 5, 6, 7, 8, 9, 02562 0, 0, 0, 10, 11, 63, 64, 65, 12, 0, 02563 13, 14, 15, 16, 17, 18, 19, 0, -619, 0, 02564 -619, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02565 0, 27, 0, 0, 0, 0, 0, 28, 29, 249, 02566 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02567 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02569 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02570 0, 250, 50, 0, 51, 52, 0, 53, 0, 0, 02571 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02573 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 02574 65, 0, 0, 0, 0, 0, 0, 0, 0, -619, 02575 0, -619, 248, -619, 5, 6, 7, 8, 9, 0, 02576 0, 0, 10, 11, 0, 0, 0, 12, 0, 13, 02577 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02578 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02579 27, 0, 0, 0, 0, 0, 28, 29, 249, 31, 02580 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02581 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02583 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02584 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02585 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02587 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 02588 0, 0, 0, 0, 0, 0, 0, 0, -619, 0, 02589 -619, 248, -619, 5, 6, 7, 8, 9, 0, 0, 02590 0, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02591 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02592 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 02593 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 02594 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02595 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02597 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 02598 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 02599 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02601 0, 0, 0, 0, 0, 0, 63, 64, 65, 0, 02602 0, -619, 4, 0, 5, 6, 7, 8, 9, -619, 02603 0, -619, 10, 11, 0, 0, 0, 12, 0, 13, 02604 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02605 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02606 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, 02607 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02608 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02609 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02610 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02611 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 02612 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02614 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 02615 0, 0, -619, 0, 0, 0, 0, 0, 0, 0, 02616 -619, 248, -619, 5, 6, 7, 8, 9, 0, 0, 02617 -619, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02618 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02619 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 02620 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 02621 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02622 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02624 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 02625 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 02626 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02627 0, 0, 0, 0, 248, 0, 5, 6, 7, 8, 02628 9, 0, 0, 0, 10, 11, 63, 64, 65, 12, 02629 0, 13, 14, 15, 16, 17, 18, 19, 0, -619, 02630 0, -619, 0, 20, 21, 22, 23, 24, 25, 26, 02631 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, 02632 249, 31, 32, 33, 34, 35, 36, 37, 38, 39, 02633 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02634 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02635 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 02636 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, 02637 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02638 0, -619, 0, 0, 0, 0, 0, 0, 0, 5, 02639 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 02640 64, 65, 12, 0, 13, 14, 15, 16, 17, 18, 02641 19, 0, -619, 0, -619, 0, 20, 21, 22, 23, 02642 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 02643 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02644 37, 38, 39, 40, 201, 41, 42, 0, 43, 44, 02645 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02647 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 02648 0, 204, 205, 206, 54, 55, 56, 57, 58, 59, 02649 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02650 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02651 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 02652 16, 17, 18, 19, 0, 0, 0, 231, 0, 20, 02653 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02654 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02655 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02656 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02658 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 02659 0, 51, 52, 0, 0, 0, 0, 54, 55, 56, 02660 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02661 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02662 0, 0, 0, 10, 11, 63, 64, 65, 12, 0, 02663 13, 14, 15, 16, 17, 18, 19, 0, 302, 0, 02664 303, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02665 0, 27, 0, 0, 0, 0, 0, 0, 29, 0, 02666 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02667 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02668 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02669 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 02670 0, 203, 50, 0, 51, 52, 0, 0, 0, 0, 02671 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02672 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02673 7, 8, 9, 0, 0, 0, 10, 11, 63, 64, 02674 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02675 0, 0, 0, 231, 0, 20, 21, 22, 23, 24, 02676 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02677 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 02678 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02679 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02681 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02682 53, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02683 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02684 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02685 11, 63, 64, 65, 12, 0, 13, 14, 15, 16, 02686 17, 18, 19, 0, 498, 0, 0, 0, 20, 21, 02687 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02688 0, 0, 0, 28, 29, 249, 31, 32, 33, 34, 02689 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02690 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02692 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02693 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02694 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02696 0, 0, 0, 0, 63, 64, 65, 0, 0, 0, 02697 0, 0, 0, 0, 0, 0, 0, 498, 118, 119, 02698 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 02699 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 02700 140, 141, 0, 0, 0, 142, 143, 144, 384, 385, 02701 386, 387, 149, 150, 151, 0, 0, 0, 0, 0, 02702 152, 153, 154, 155, 388, 389, 390, 391, 160, 37, 02703 38, 392, 40, 0, 0, 0, 0, 0, 0, 0, 02704 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 02705 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 02706 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02707 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 02708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02709 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 02710 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 02711 191, 393, 118, 119, 120, 121, 122, 123, 124, 125, 02712 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 02713 136, 137, 138, 139, 140, 141, 0, 0, 0, 142, 02714 143, 144, 145, 146, 147, 148, 149, 150, 151, 0, 02715 0, 0, 0, 0, 152, 153, 154, 155, 156, 157, 02716 158, 159, 160, 280, 281, 161, 282, 0, 0, 0, 02717 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 02718 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 02719 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 02720 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 02721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02722 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 02723 184, 185, 186, 187, 188, 0, 189, 190, 0, 0, 02724 0, 0, 0, 0, 191, 118, 119, 120, 121, 122, 02725 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02726 133, 134, 135, 136, 137, 138, 139, 140, 141, 0, 02727 0, 0, 142, 143, 144, 145, 146, 147, 148, 149, 02728 150, 151, 0, 0, 0, 0, 0, 152, 153, 154, 02729 155, 156, 157, 158, 159, 160, 233, 0, 161, 0, 02730 0, 0, 0, 0, 0, 0, 0, 0, 162, 163, 02731 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 02732 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 02733 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 02734 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 02735 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 02736 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 02737 190, 0, 0, 0, 0, 0, 0, 191, 118, 119, 02738 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 02739 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 02740 140, 141, 0, 0, 0, 142, 143, 144, 145, 146, 02741 147, 148, 149, 150, 151, 0, 0, 0, 0, 0, 02742 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, 02743 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 02744 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 02745 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 02746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02747 177, 178, 0, 0, 55, 0, 0, 0, 0, 0, 02748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02749 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 02750 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 02751 191, 118, 119, 120, 121, 122, 123, 124, 125, 126, 02752 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 02753 137, 138, 139, 140, 141, 0, 0, 0, 142, 143, 02754 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, 02755 0, 0, 0, 152, 153, 154, 155, 156, 157, 158, 02756 159, 160, 0, 0, 161, 0, 0, 0, 0, 0, 02757 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 02758 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 02759 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 02760 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 02761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02762 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 02763 185, 186, 187, 188, 0, 189, 190, 5, 6, 7, 02764 0, 9, 0, 191, 0, 10, 11, 0, 0, 0, 02765 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 02766 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 02767 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 02768 268, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02769 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02771 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02772 269, 0, 0, 203, 50, 0, 51, 52, 0, 0, 02773 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02774 62, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02775 9, 0, 0, 0, 10, 11, 0, 0, 0, 12, 02776 270, 13, 14, 15, 238, 239, 18, 19, 271, 0, 02777 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 02778 0, 0, 200, 0, 0, 0, 0, 0, 0, 268, 02779 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02780 40, 0, 41, 42, 0, 43, 44, 45, 0, 0, 02781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02782 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 02783 0, 0, 203, 50, 0, 51, 52, 0, 0, 0, 02784 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02785 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 02786 0, 0, 0, 10, 11, 0, 0, 0, 12, 270, 02787 13, 14, 15, 16, 17, 18, 19, 518, 0, 0, 02788 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02789 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02790 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02791 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02793 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02794 0, 49, 50, 0, 51, 52, 0, 53, 0, 0, 02795 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02796 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02797 7, 0, 9, 0, 0, 0, 10, 11, 63, 64, 02798 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 02799 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02800 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 02801 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02802 38, 39, 40, 201, 41, 42, 0, 43, 44, 45, 02803 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02804 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02805 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 02806 204, 205, 206, 54, 55, 56, 57, 58, 59, 60, 02807 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02808 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 02809 11, 63, 207, 65, 12, 0, 13, 14, 15, 16, 02810 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02811 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02812 0, 0, 0, 28, 29, 0, 31, 32, 33, 34, 02813 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02814 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02816 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 02817 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 02818 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02819 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02820 0, 0, 10, 11, 63, 64, 65, 12, 0, 13, 02821 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 02822 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 02823 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02824 32, 33, 34, 35, 36, 37, 38, 39, 40, 201, 02825 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02827 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 02828 203, 50, 0, 51, 52, 0, 608, 205, 206, 54, 02829 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02830 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02831 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 02832 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 02833 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 02834 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 02835 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02836 39, 40, 201, 41, 42, 0, 43, 44, 45, 0, 02837 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02839 202, 0, 0, 203, 50, 0, 51, 52, 0, 204, 02840 205, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02841 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02842 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02843 63, 207, 65, 12, 0, 13, 14, 15, 238, 239, 02844 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 02845 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 02846 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02847 36, 37, 38, 39, 40, 201, 41, 42, 0, 43, 02848 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02850 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 02851 52, 0, 0, 205, 206, 54, 55, 56, 57, 58, 02852 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02853 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02854 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 02855 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 02856 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 02857 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02858 33, 34, 35, 36, 37, 38, 39, 40, 201, 41, 02859 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02861 0, 0, 0, 0, 0, 0, 202, 0, 0, 203, 02862 50, 0, 51, 52, 0, 608, 205, 0, 54, 55, 02863 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02864 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02865 9, 0, 0, 0, 10, 11, 63, 207, 65, 12, 02866 0, 13, 14, 15, 238, 239, 18, 19, 0, 0, 02867 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 02868 0, 0, 200, 0, 0, 0, 0, 0, 0, 29, 02869 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02870 40, 201, 41, 42, 0, 43, 44, 45, 0, 46, 02871 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02872 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 02873 0, 0, 203, 50, 0, 51, 52, 0, 0, 205, 02874 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 02875 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02876 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 02877 207, 65, 12, 0, 13, 14, 15, 16, 17, 18, 02878 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 02879 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 02880 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02881 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02882 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02883 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02884 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 02885 0, 512, 0, 0, 54, 55, 56, 57, 58, 59, 02886 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 02887 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02888 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 02889 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 02890 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 02891 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02892 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02893 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02895 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 02896 0, 51, 52, 0, 204, 0, 0, 54, 55, 56, 02897 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02898 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02899 0, 0, 0, 10, 11, 63, 207, 65, 12, 0, 02900 13, 14, 15, 238, 239, 18, 19, 0, 0, 0, 02901 0, 0, 240, 241, 242, 23, 24, 25, 26, 0, 02902 0, 200, 0, 0, 0, 0, 0, 0, 29, 0, 02903 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02904 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02905 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02906 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 02907 0, 203, 50, 0, 51, 52, 0, 816, 0, 0, 02908 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 02909 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02910 7, 0, 9, 0, 0, 0, 10, 11, 63, 207, 02911 65, 12, 0, 13, 14, 15, 238, 239, 18, 19, 02912 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 02913 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 02914 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02915 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02916 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02918 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 02919 512, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02920 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 02921 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02922 11, 63, 207, 65, 12, 0, 13, 14, 15, 238, 02923 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 02924 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 02925 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02926 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02927 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02928 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02929 0, 0, 0, 0, 202, 0, 0, 203, 50, 0, 02930 51, 52, 0, 608, 0, 0, 54, 55, 56, 57, 02931 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02932 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02933 0, 0, 10, 11, 63, 207, 65, 12, 0, 13, 02934 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 02935 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 02936 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02937 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02938 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02939 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02940 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 02941 203, 50, 0, 51, 52, 0, 0, 0, 0, 54, 02942 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 02943 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02944 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 02945 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02946 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02947 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, 02948 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02949 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02950 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02952 202, 0, 0, 203, 50, 0, 51, 52, 0, 0, 02953 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 02954 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02955 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02956 63, 64, 65, 12, 0, 13, 14, 15, 16, 17, 02957 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02958 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 02959 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02960 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02961 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02962 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02963 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 02964 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 02965 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 02966 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02967 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 02968 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 02969 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 02970 0, 0, 0, 0, 0, 0, 268, 0, 0, 32, 02971 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02972 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 02973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02974 0, 0, 0, 0, 0, 0, 269, 0, 0, 323, 02975 50, 0, 51, 52, 0, 324, 0, 0, 54, 55, 02976 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 02977 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02978 10, 11, 0, 0, 0, 12, 270, 13, 14, 15, 02979 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 02980 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 02981 0, 0, 0, 0, 0, 268, 0, 0, 32, 33, 02982 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02983 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 02984 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02985 0, 0, 0, 0, 0, 365, 0, 0, 49, 50, 02986 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 02987 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 02988 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02989 11, 0, 0, 0, 12, 270, 13, 14, 15, 238, 02990 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 02991 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 02992 0, 0, 0, 0, 268, 0, 0, 32, 33, 34, 02993 373, 36, 37, 38, 374, 40, 0, 41, 42, 0, 02994 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02996 0, 375, 0, 0, 376, 0, 0, 203, 50, 0, 02997 51, 52, 0, 0, 0, 0, 54, 55, 56, 57, 02998 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 02999 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 03000 0, 0, 0, 12, 270, 13, 14, 15, 238, 239, 03001 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 03002 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 03003 0, 0, 0, 268, 0, 0, 32, 33, 34, 373, 03004 36, 37, 38, 374, 40, 0, 41, 42, 0, 43, 03005 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 03006 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03007 0, 0, 0, 376, 0, 0, 203, 50, 0, 51, 03008 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 03009 59, 60, 61, 62, 0, 0, 0, 0, 0, 5, 03010 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 03011 0, 0, 12, 270, 13, 14, 15, 238, 239, 18, 03012 19, 0, 0, 0, 0, 0, 240, 241, 242, 23, 03013 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 03014 0, 0, 268, 0, 0, 32, 33, 34, 35, 36, 03015 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 03016 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03017 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03018 0, 0, 269, 0, 0, 323, 50, 0, 51, 52, 03019 0, 0, 0, 0, 54, 55, 56, 57, 58, 59, 03020 60, 61, 62, 0, 0, 0, 0, 0, 5, 6, 03021 7, 0, 9, 0, 0, 0, 10, 11, 0, 0, 03022 0, 12, 270, 13, 14, 15, 238, 239, 18, 19, 03023 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 03024 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 03025 0, 268, 0, 0, 32, 33, 34, 35, 36, 37, 03026 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 03027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03028 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03029 0, 893, 0, 0, 203, 50, 0, 51, 52, 0, 03030 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 03031 61, 62, 0, 0, 0, 0, 0, 5, 6, 7, 03032 0, 9, 0, 0, 0, 10, 11, 0, 0, 0, 03033 12, 270, 13, 14, 15, 238, 239, 18, 19, 0, 03034 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 03035 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 03036 268, 0, 0, 32, 33, 34, 35, 36, 37, 38, 03037 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 03038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03040 973, 0, 0, 203, 50, 0, 51, 52, 0, 0, 03041 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 03042 62, 0, 0, 0, 0, 0, 0, 553, 554, 0, 03043 0, 555, 0, 0, 0, 0, 0, 0, 0, 0, 03044 270, 162, 163, 164, 165, 166, 167, 168, 169, 170, 03045 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 03046 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03047 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 03048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03049 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 03050 188, 0, 189, 190, 561, 562, 0, 0, 563, 0, 03051 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 03052 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 03053 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 03054 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 03055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03056 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 03057 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 03058 190, 598, 562, 0, 0, 599, 0, 191, 0, 0, 03059 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 03060 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 03061 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 03062 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 03063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03064 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 03065 184, 185, 186, 187, 188, 0, 189, 190, 612, 554, 03066 0, 0, 613, 0, 191, 0, 0, 0, 0, 0, 03067 0, 0, 162, 163, 164, 165, 166, 167, 168, 169, 03068 170, 0, 0, 171, 172, 0, 0, 173, 174, 175, 03069 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03070 0, 177, 178, 0, 0, 0, 0, 0, 0, 0, 03071 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03072 0, 0, 179, 180, 181, 182, 183, 184, 185, 186, 03073 187, 188, 0, 189, 190, 615, 562, 0, 0, 616, 03074 0, 191, 0, 0, 0, 0, 0, 0, 0, 162, 03075 163, 164, 165, 166, 167, 168, 169, 170, 0, 0, 03076 171, 172, 0, 0, 173, 174, 175, 176, 0, 0, 03077 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 03078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03079 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 03080 180, 181, 182, 183, 184, 185, 186, 187, 188, 0, 03081 189, 190, 639, 554, 0, 0, 640, 0, 191, 0, 03082 0, 0, 0, 0, 0, 0, 162, 163, 164, 165, 03083 166, 167, 168, 169, 170, 0, 0, 171, 172, 0, 03084 0, 173, 174, 175, 176, 0, 0, 0, 0, 0, 03085 0, 0, 0, 0, 0, 177, 178, 0, 0, 0, 03086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03087 0, 0, 0, 0, 0, 0, 179, 180, 181, 182, 03088 183, 184, 185, 186, 187, 188, 0, 189, 190, 642, 03089 562, 0, 0, 643, 0, 191, 0, 0, 0, 0, 03090 0, 0, 0, 162, 163, 164, 165, 166, 167, 168, 03091 169, 170, 0, 0, 171, 172, 0, 0, 173, 174, 03092 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 03093 0, 0, 177, 178, 0, 0, 0, 0, 0, 0, 03094 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03095 0, 0, 0, 179, 180, 181, 182, 183, 184, 185, 03096 186, 187, 188, 0, 189, 190, 727, 554, 0, 0, 03097 728, 0, 191, 0, 0, 0, 0, 0, 0, 0, 03098 162, 163, 164, 165, 166, 167, 168, 169, 170, 0, 03099 0, 171, 172, 0, 0, 173, 174, 175, 176, 0, 03100 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 03101 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03102 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03103 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 03104 0, 189, 190, 730, 562, 0, 0, 731, 0, 191, 03105 0, 0, 0, 0, 0, 0, 0, 162, 163, 164, 03106 165, 166, 167, 168, 169, 170, 0, 0, 171, 172, 03107 0, 0, 173, 174, 175, 176, 0, 0, 0, 0, 03108 0, 0, 0, 0, 0, 0, 177, 178, 0, 0, 03109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03110 0, 0, 0, 0, 0, 0, 0, 179, 180, 181, 03111 182, 183, 184, 185, 186, 187, 188, 0, 189, 190, 03112 737, 554, 0, 0, 738, 0, 191, 0, 0, 0, 03113 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 03114 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 03115 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 03116 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 03117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03118 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 03119 185, 186, 187, 188, 0, 189, 190, 1001, 554, 0, 03120 0, 1002, 0, 191, 0, 0, 0, 0, 0, 0, 03121 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 03122 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 03123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03124 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 03125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03126 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 03127 188, 0, 189, 190, 1036, 554, 0, 0, 1037, 0, 03128 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 03129 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 03130 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 03131 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 03132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03133 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 03134 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 03135 190, 1039, 562, 0, 0, 1040, 0, 191, 0, 0, 03136 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 03137 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 03138 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 03139 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 03140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03141 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 03142 184, 185, 186, 187, 188, 0, 189, 190, 0, 0, 03143 0, 0, 0, 0, 191 03144 }; 03145 03146 #define yypact_value_is_default(yystate) \ 03147 ((yystate) == (-810)) 03148 03149 #define yytable_value_is_error(yytable_value) \ 03150 ((yytable_value) == (-620)) 03151 03152 static const yytype_int16 yycheck[] = 03153 { 03154 2, 55, 96, 16, 17, 8, 79, 20, 22, 64, 03155 354, 326, 16, 17, 8, 220, 20, 50, 27, 8, 03156 29, 472, 326, 28, 87, 28, 359, 90, 412, 353, 03157 4, 355, 420, 74, 28, 2, 420, 4, 53, 28, 03158 94, 668, 49, 90, 575, 594, 614, 51, 262, 51, 03159 52, 685, 266, 86, 87, 574, 67, 90, 440, 468, 03160 74, 55, 13, 651, 79, 786, 2, 376, 4, 49, 03161 458, 508, 416, 641, 511, 399, 91, 92, 93, 27, 03162 16, 17, 53, 776, 20, 874, 250, 472, 67, 778, 03163 87, 415, 715, 417, 16, 17, 719, 906, 20, 26, 03164 94, 872, 0, 37, 38, 13, 25, 230, 801, 518, 03165 25, 90, 26, 49, 50, 85, 113, 53, 25, 443, 03166 141, 61, 61, 13, 1, 85, 470, 85, 64, 85, 03167 16, 17, 255, 25, 20, 97, 259, 134, 902, 76, 03168 130, 85, 134, 79, 778, 596, 25, 471, 28, 141, 03169 86, 87, 786, 29, 90, 91, 92, 93, 120, 323, 03170 286, 729, 288, 133, 290, 51, 52, 938, 294, 25, 03171 110, 110, 740, 133, 25, 133, 132, 133, 805, 806, 03172 25, 118, 770, 771, 25, 136, 56, 736, 139, 133, 03173 141, 139, 13, 141, 140, 744, 203, 230, 271, 232, 03174 113, 990, 243, 130, 1013, 252, 657, 141, 897, 136, 03175 140, 224, 214, 226, 227, 134, 130, 136, 220, 134, 03176 224, 992, 226, 944, 429, 227, 134, 134, 13, 13, 03177 237, 139, 134, 141, 622, 111, 580, 621, 622, 1003, 03178 117, 252, 134, 250, 307, 308, 309, 310, 592, 139, 03179 632, 141, 85, 690, 1025, 134, 271, 581, 885, 268, 03180 949, 113, 139, 897, 141, 85, 321, 203, 902, 593, 03181 250, 326, 657, 252, 307, 308, 309, 310, 134, 312, 03182 313, 248, 591, 134, 872, 136, 874, 696, 224, 134, 03183 226, 227, 743, 134, 230, 87, 232, 360, 361, 422, 03184 133, 237, 224, 426, 226, 928, 37, 38, 431, 324, 03185 944, 87, 248, 133, 250, 362, 323, 321, 139, 1008, 03186 141, 113, 326, 68, 447, 113, 136, 360, 361, 452, 03187 100, 141, 306, 852, 87, 271, 963, 113, 224, 306, 03188 226, 354, 375, 323, 311, 61, 134, 402, 403, 65, 03189 938, 939, 354, 324, 139, 139, 141, 141, 743, 485, 03190 113, 355, 25, 61, 85, 140, 492, 61, 140, 1003, 03191 306, 307, 308, 309, 310, 311, 312, 313, 123, 124, 03192 125, 930, 697, 362, 139, 321, 141, 323, 324, 136, 03193 326, 107, 725, 109, 517, 468, 685, 928, 15, 378, 03194 17, 25, 990, 416, 992, 399, 611, 68, 85, 107, 03195 714, 109, 133, 107, 416, 109, 26, 85, 354, 134, 03196 356, 85, 636, 417, 360, 361, 428, 429, 85, 52, 03197 56, 26, 437, 56, 437, 87, 26, 1025, 440, 375, 03198 989, 113, 140, 437, 85, 518, 140, 134, 437, 443, 03199 113, 134, 88, 468, 85, 132, 133, 470, 141, 136, 03200 121, 122, 123, 124, 125, 133, 402, 403, 470, 133, 03201 1038, 134, 87, 440, 137, 85, 133, 471, 141, 867, 03202 416, 87, 87, 867, 935, 87, 134, 703, 134, 113, 03203 85, 132, 133, 141, 710, 85, 136, 786, 113, 61, 03204 789, 132, 133, 518, 440, 507, 508, 113, 61, 511, 03205 134, 113, 61, 137, 450, 136, 557, 141, 130, 134, 03206 130, 26, 132, 133, 565, 52, 412, 54, 55, 56, 03207 57, 68, 468, 542, 470, 130, 136, 132, 133, 137, 03208 130, 136, 132, 133, 558, 107, 136, 109, 110, 85, 03209 113, 560, 566, 138, 107, 760, 109, 110, 107, 600, 03210 109, 110, 595, 570, 637, 572, 568, 580, 670, 455, 03211 672, 131, 576, 85, 59, 60, 577, 87, 580, 592, 03212 85, 56, 518, 916, 87, 110, 600, 581, 87, 922, 03213 592, 87, 625, 85, 573, 574, 132, 133, 600, 593, 03214 605, 61, 605, 113, 134, 614, 110, 134, 587, 611, 03215 113, 605, 110, 902, 113, 904, 605, 113, 68, 742, 03216 132, 133, 637, 696, 134, 130, 110, 132, 133, 58, 03217 632, 136, 641, 68, 570, 134, 572, 61, 761, 68, 03218 132, 133, 697, 94, 580, 700, 701, 107, 685, 109, 03219 110, 774, 707, 708, 748, 944, 592, 946, 594, 595, 03220 85, 134, 951, 704, 666, 632, 668, 96, 97, 732, 03221 711, 17, 735, 1017, 59, 60, 685, 139, 87, 686, 03222 58, 696, 689, 107, 691, 109, 110, 56, 690, 625, 03223 68, 120, 746, 25, 1018, 137, 632, 85, 134, 732, 03224 134, 637, 735, 685, 113, 131, 134, 132, 133, 711, 03225 714, 130, 714, 715, 1003, 717, 1005, 719, 96, 97, 03226 729, 1010, 134, 724, 52, 134, 54, 55, 56, 57, 03227 85, 740, 14, 15, 140, 621, 859, 140, 1027, 134, 03228 741, 134, 120, 780, 132, 133, 85, 784, 871, 113, 03229 686, 134, 746, 689, 733, 691, 136, 10, 760, 1048, 03230 696, 697, 8, 85, 700, 701, 745, 776, 2, 13, 03231 4, 707, 708, 828, 85, 131, 85, 132, 133, 842, 03232 882, 883, 16, 17, 799, 887, 20, 889, 890, 113, 03233 134, 134, 801, 132, 133, 52, 732, 134, 780, 735, 03234 736, 134, 52, 805, 806, 134, 134, 814, 744, 842, 03235 132, 133, 52, 134, 115, 49, 50, 54, 55, 138, 03236 57, 132, 133, 132, 133, 15, 63, 64, 134, 87, 03237 64, 131, 839, 113, 118, 837, 134, 134, 840, 846, 03238 847, 134, 843, 850, 845, 52, 87, 54, 55, 56, 03239 57, 58, 86, 87, 855, 113, 90, 134, 134, 860, 03240 897, 68, 899, 799, 139, 902, 10, 904, 131, 10, 03241 877, 878, 113, 852, 134, 854, 134, 892, 814, 808, 03242 809, 9, 89, 885, 891, 88, 134, 134, 95, 96, 03243 97, 134, 828, 134, 996, 997, 998, 999, 54, 137, 03244 915, 134, 134, 839, 56, 118, 842, 63, 64, 131, 03245 846, 847, 919, 120, 850, 897, 123, 899, 134, 134, 03246 902, 10, 904, 131, 925, 926, 928, 52, 108, 54, 03247 55, 56, 57, 52, 141, 54, 55, 56, 57, 58, 03248 134, 877, 878, 134, 1046, 134, 134, 56, 52, 68, 03249 54, 55, 56, 57, 136, 891, 892, 134, 134, 134, 03250 969, 963, 136, 450, 89, 91, 1003, 711, 1005, 203, 03251 89, 1008, 979, 1010, 981, 93, 1020, 96, 97, 915, 03252 987, 770, 685, 919, 1013, 89, 749, 988, 1019, 99, 03253 224, 95, 226, 227, 930, 294, 230, 57, 232, 94, 03254 935, 120, 780, 237, 1017, 52, 899, 54, 55, 56, 03255 57, 1048, 897, 778, 248, 1017, 250, 1019, 1020, 396, 03256 1021, 1003, 1023, 1005, 1018, -1, 1008, -1, 1010, 1038, 03257 -1, 960, 961, -1, -1, 964, -1, 966, 967, -1, 03258 -1, -1, 89, 979, 68, 981, -1, -1, 95, -1, 03259 -1, 987, -1, 989, 68, -1, -1, -1, -1, 83, 03260 84, 40, 41, 42, 43, 44, 1048, -1, -1, 83, 03261 84, -1, 306, 307, 308, 309, 310, 311, 312, 313, 03262 52, 1017, 54, 55, 56, 57, -1, 321, -1, 323, 03263 -1, -1, 326, -1, 118, 119, 120, 121, 122, 123, 03264 124, 125, 1031, 1032, 1033, 1034, 120, 121, 122, 123, 03265 124, 125, -1, -1, -1, -1, -1, -1, -1, -1, 03266 354, -1, 356, -1, -1, 1054, 360, 361, -1, -1, 03267 -1, -1, -1, 52, -1, 54, 55, 56, 57, 58, 03268 -1, 375, -1, -1, -1, -1, -1, -1, 0, 68, 03269 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1, 03270 -1, 13, 14, 15, -1, 17, -1, -1, 402, 403, 03271 89, -1, -1, -1, 26, 27, 95, 96, 97, -1, 03272 -1, -1, 416, -1, -1, 37, 38, 68, 40, 41, 03273 42, 43, 44, -1, 52, -1, 54, 55, 56, 57, 03274 58, 120, 83, 84, 123, -1, 440, -1, -1, -1, 03275 68, -1, -1, -1, -1, -1, 450, 136, -1, -1, 03276 -1, -1, -1, -1, 16, 17, -1, -1, 20, -1, 03277 -1, 89, -1, 85, -1, -1, 470, 95, 96, 97, 03278 121, 122, 123, 124, 125, -1, -1, -1, -1, -1, 03279 -1, -1, -1, -1, 46, 47, 108, -1, -1, 51, 03280 52, -1, 120, -1, -1, 123, -1, -1, -1, -1, 03281 -1, -1, 64, 65, -1, 44, -1, -1, 130, 131, 03282 -1, 133, -1, -1, 136, 137, -1, 139, -1, 141, 03283 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 03284 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 03285 79, 80, -1, -1, 83, 84, -1, -1, -1, -1, 03286 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55, 03287 56, 57, 58, -1, -1, -1, 570, -1, 572, -1, 03288 -1, -1, 68, -1, -1, 114, 580, 116, 117, 118, 03289 119, 120, 121, 122, 123, 124, 125, -1, 592, -1, 03290 594, 595, -1, 89, -1, 134, -1, -1, -1, 95, 03291 96, 97, -1, 68, 69, 70, 71, 72, 73, 74, 03292 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03293 -1, 625, -1, -1, 120, -1, -1, 123, 632, -1, 03294 -1, -1, 2, -1, 4, -1, -1, -1, -1, 201, 03295 136, -1, 204, 205, 206, 207, -1, -1, 52, 114, 03296 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03297 125, -1, 224, -1, 226, 227, -1, -1, 52, -1, 03298 54, 55, 56, 57, 58, -1, 141, -1, -1, 49, 03299 -1, -1, 686, 53, 68, 689, -1, 691, -1, -1, 03300 -1, -1, -1, 697, -1, -1, 700, 701, -1, -1, 03301 -1, -1, -1, 707, 708, 89, -1, -1, -1, 79, 03302 -1, 95, 96, 97, -1, -1, -1, -1, -1, -1, 03303 -1, 91, 92, 93, 94, -1, -1, -1, 732, -1, 03304 -1, 735, 736, -1, -1, -1, 120, -1, -1, 123, 03305 744, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03306 -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 03307 -1, -1, -1, -1, 326, 327, 328, 329, 330, 331, 03308 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 03309 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 03310 352, -1, 354, -1, -1, -1, -1, 201, -1, -1, 03311 204, 205, 206, -1, -1, -1, -1, -1, -1, -1, 03312 814, -1, -1, -1, -1, 52, -1, 54, 55, 56, 03313 57, 58, -1, -1, 828, -1, -1, -1, -1, -1, 03314 -1, 68, -1, 203, -1, 839, -1, -1, 842, -1, 03315 402, 403, 846, 847, -1, -1, 850, -1, 410, 411, 03316 412, -1, 89, -1, 416, -1, 418, 419, 420, 96, 03317 97, -1, -1, -1, -1, -1, -1, 237, -1, -1, 03318 -1, -1, -1, 877, 878, -1, -1, 439, 248, -1, 03319 250, -1, 444, 120, -1, -1, -1, 891, -1, -1, 03320 -1, -1, -1, 455, -1, -1, 458, -1, -1, -1, 03321 -1, 271, -1, -1, -1, 2, -1, 4, 470, -1, 03322 -1, -1, -1, -1, -1, 919, -1, 321, -1, -1, 03323 -1, 2, 326, 4, -1, -1, 930, -1, -1, -1, 03324 -1, -1, -1, -1, 496, 497, 306, -1, -1, -1, 03325 -1, 311, -1, -1, -1, -1, -1, -1, -1, -1, 03326 512, -1, 49, 323, 324, -1, 53, -1, -1, -1, 03327 -1, -1, -1, -1, -1, -1, -1, -1, 49, -1, 03328 -1, -1, 53, -1, -1, 979, -1, 981, -1, -1, 03329 -1, -1, 79, 987, -1, 989, 356, -1, -1, -1, 03330 -1, -1, -1, -1, 91, 92, 93, 94, 79, -1, 03331 -1, -1, -1, -1, -1, -1, -1, 411, 412, -1, 03332 91, 92, 93, 1017, 576, -1, 420, -1, 580, -1, 03333 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03334 592, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03335 -1, -1, -1, -1, -1, -1, 608, -1, -1, -1, 03336 -1, 455, -1, -1, 458, -1, -1, -1, -1, 621, 03337 622, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03338 440, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03339 450, -1, -1, -1, -1, -1, -1, 649, -1, -1, 03340 -1, -1, -1, -1, -1, -1, -1, -1, 468, -1, 03341 -1, -1, -1, -1, -1, -1, 203, -1, 512, -1, 03342 -1, -1, -1, -1, 2, -1, 4, -1, -1, -1, 03343 -1, -1, 203, -1, -1, -1, -1, -1, -1, -1, 03344 2, 693, 4, -1, -1, 697, 698, -1, 700, 701, 03345 237, -1, -1, -1, -1, 707, 708, -1, 518, -1, 03346 -1, 248, 714, 250, -1, -1, 237, -1, -1, -1, 03347 -1, 49, -1, -1, -1, -1, -1, 248, -1, 250, 03348 -1, -1, 576, -1, 271, -1, -1, 49, -1, -1, 03349 -1, -1, -1, -1, -1, -1, -1, -1, -1, 751, 03350 271, -1, -1, 755, 756, -1, 758, 759, -1, -1, 03351 570, -1, 572, 91, 608, 767, -1, -1, -1, 306, 03352 -1, -1, -1, -1, 311, -1, -1, 621, 622, -1, 03353 -1, -1, -1, -1, 594, 306, 323, 324, -1, -1, 03354 311, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03355 -1, -1, 323, 324, -1, 649, -1, -1, -1, -1, 03356 -1, -1, -1, -1, 816, -1, -1, -1, 820, 356, 03357 -1, -1, 632, -1, -1, -1, 828, 637, -1, -1, 03358 -1, -1, -1, -1, -1, 356, -1, -1, -1, -1, 03359 -1, -1, -1, -1, -1, -1, -1, 849, -1, 693, 03360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03361 -1, -1, -1, -1, 866, 867, -1, -1, -1, -1, 03362 714, -1, -1, -1, -1, 203, 686, -1, -1, 689, 03363 -1, 691, -1, -1, -1, -1, 696, -1, -1, -1, 03364 -1, 203, -1, -1, -1, -1, -1, -1, -1, -1, 03365 -1, -1, -1, 440, -1, -1, -1, -1, -1, 237, 03366 -1, -1, -1, 450, -1, -1, -1, -1, -1, 440, 03367 248, -1, 250, 767, -1, 237, 736, -1, -1, 450, 03368 -1, 468, -1, -1, 744, -1, 248, -1, 250, -1, 03369 -1, -1, -1, -1, -1, -1, -1, 468, -1, -1, 03370 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03371 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03372 -1, -1, 816, -1, -1, -1, -1, -1, 306, -1, 03373 -1, 518, -1, 311, -1, -1, -1, -1, -1, 799, 03374 -1, -1, -1, -1, 306, 323, -1, 518, 326, 311, 03375 -1, -1, -1, -1, 814, 849, -1, -1, -1, -1, 03376 -1, 323, -1, -1, -1, 1017, -1, -1, -1, -1, 03377 -1, -1, -1, 867, -1, -1, -1, -1, 356, 839, 03378 -1, -1, -1, 570, -1, 572, 846, 847, -1, -1, 03379 850, -1, -1, -1, 356, -1, -1, -1, -1, 570, 03380 -1, 572, -1, -1, -1, -1, -1, 594, -1, -1, 03381 -1, -1, -1, -1, -1, -1, -1, 877, 878, -1, 03382 -1, -1, -1, 594, -1, -1, -1, -1, -1, -1, 03383 -1, 891, 892, -1, -1, -1, -1, -1, -1, -1, 03384 -1, -1, -1, -1, -1, 632, -1, -1, -1, -1, 03385 637, -1, -1, -1, -1, 915, -1, -1, -1, 919, 03386 -1, 632, 440, -1, -1, -1, 637, -1, -1, -1, 03387 930, -1, 450, -1, -1, -1, -1, -1, 440, -1, 03388 -1, -1, -1, -1, -1, -1, -1, -1, 450, -1, 03389 -1, -1, -1, -1, -1, -1, -1, -1, -1, 686, 03390 -1, -1, 689, -1, 691, 676, 44, -1, -1, 696, 03391 -1, -1, -1, -1, -1, 686, -1, -1, 689, 979, 03392 691, 981, -1, -1, -1, 696, -1, 987, -1, 989, 03393 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 03394 78, 79, 80, -1, -1, 83, 84, -1, -1, 736, 03395 -1, -1, -1, -1, -1, -1, -1, 744, -1, -1, 03396 -1, -1, -1, -1, -1, 736, -1, -1, -1, -1, 03397 -1, -1, -1, 744, -1, -1, 114, -1, 116, 117, 03398 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 03399 -1, -1, 570, -1, 572, -1, -1, -1, -1, -1, 03400 -1, -1, -1, -1, -1, -1, -1, -1, 570, -1, 03401 572, -1, 799, -1, -1, -1, 594, -1, -1, -1, 03402 -1, -1, -1, -1, -1, -1, -1, 814, 799, -1, 03403 -1, -1, 594, -1, -1, -1, -1, -1, -1, -1, 03404 -1, -1, -1, 814, -1, -1, -1, -1, -1, -1, 03405 -1, -1, 839, -1, 632, -1, -1, -1, -1, 846, 03406 847, -1, -1, 850, -1, -1, -1, -1, 839, -1, 03407 632, -1, -1, -1, -1, 846, 847, -1, -1, 850, 03408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03409 877, 878, -1, -1, -1, -1, -1, -1, -1, -1, 03410 -1, -1, -1, -1, 891, 892, 877, 878, 686, -1, 03411 -1, 689, -1, 691, -1, -1, -1, -1, -1, 697, 03412 891, 892, -1, -1, 686, -1, -1, 689, 915, 691, 03413 -1, -1, 919, -1, -1, -1, -1, -1, -1, -1, 03414 -1, -1, -1, 930, 915, -1, -1, -1, 919, -1, 03415 -1, -1, -1, -1, -1, -1, -1, -1, 736, 930, 03416 -1, -1, -1, -1, -1, -1, 744, -1, -1, -1, 03417 -1, -1, -1, -1, 736, 68, 69, 70, 71, 72, 03418 73, 74, 744, -1, 77, 78, -1, -1, -1, -1, 03419 83, 84, 979, -1, 981, -1, -1, -1, -1, -1, 03420 987, -1, 989, -1, -1, -1, -1, -1, 979, -1, 03421 981, -1, -1, -1, -1, -1, 987, -1, 989, -1, 03422 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 03423 123, 124, 125, -1, -1, -1, 814, -1, -1, -1, 03424 -1, 68, 69, 70, 71, 72, 73, 74, 75, -1, 03425 77, 78, 814, -1, -1, -1, 83, 84, -1, -1, 03426 -1, 839, -1, -1, -1, -1, -1, -1, 846, 847, 03427 -1, -1, 850, -1, -1, -1, -1, 839, -1, -1, 03428 -1, -1, -1, -1, 846, 847, -1, -1, 850, 116, 03429 117, 118, 119, 120, 121, 122, 123, 124, 125, 877, 03430 878, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03431 -1, -1, -1, 891, -1, 877, 878, -1, -1, -1, 03432 -1, -1, -1, -1, -1, -1, -1, -1, -1, 891, 03433 68, 69, 70, 71, 72, 73, 74, 915, -1, 77, 03434 78, 919, -1, -1, -1, 83, 84, -1, -1, -1, 03435 -1, -1, 930, -1, -1, -1, -1, 919, -1, -1, 03436 -1, -1, -1, -1, -1, -1, -1, -1, 930, -1, 03437 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 03438 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 03439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03440 -1, 979, -1, 981, -1, -1, -1, -1, -1, 987, 03441 -1, 989, -1, -1, -1, -1, -1, 979, -1, 981, 03442 -1, -1, -1, -1, -1, 987, -1, 989, 0, 1, 03443 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03444 12, -1, -1, -1, 16, -1, 18, 19, 20, 21, 03445 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03446 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03447 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03448 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03449 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03450 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03451 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03452 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03453 102, 103, 104, 105, 106, 0, -1, -1, -1, -1, 03454 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14, 03455 15, -1, 17, -1, 126, 127, 128, -1, 44, -1, 03456 -1, 26, 27, 28, 29, -1, -1, 139, -1, 141, 03457 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03458 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03459 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03460 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03461 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03462 85, -1, 87, 88, -1, -1, -1, -1, 114, 94, 03463 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 03464 -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, 03465 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03466 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03467 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 03468 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03469 -1, -1, -1, -1, -1, 25, -1, 27, 28, 29, 03470 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03471 40, 41, 42, 43, 44, -1, -1, 68, 69, 70, 03472 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 03473 -1, -1, 83, 84, -1, -1, -1, -1, 68, 69, 03474 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03475 80, -1, -1, 83, 84, 85, -1, 87, 88, -1, 03476 -1, -1, -1, 114, 94, 116, 117, 118, 119, 120, 03477 121, 122, 123, 124, 125, -1, -1, -1, 108, -1, 03478 -1, 111, -1, 113, 114, 115, 116, 117, 118, 119, 03479 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03480 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03481 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03482 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03483 25, -1, 27, 28, 29, -1, -1, -1, -1, -1, 03484 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03485 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03486 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03487 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03488 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03489 85, -1, 87, 88, -1, -1, -1, -1, -1, 94, 03490 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 03491 -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, 03492 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03493 125, -1, -1, -1, -1, -1, 131, 132, 133, 134, 03494 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 03495 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03496 -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 03497 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03498 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03500 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03501 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03502 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 03503 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03504 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03505 -1, 111, -1, -1, 114, 115, 116, 117, 118, 119, 03506 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03507 130, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03508 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03509 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03510 -1, 26, 27, 28, 29, -1, -1, -1, -1, -1, 03511 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03512 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03513 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03514 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03515 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03516 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03518 -1, -1, -1, 108, -1, -1, 111, -1, -1, 114, 03519 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03520 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03521 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 03522 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03523 -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 03524 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03525 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03527 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03528 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03529 80, -1, -1, 83, 84, 85, -1, 87, 88, -1, 03530 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03531 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03532 -1, 111, -1, 113, 114, 115, 116, 117, 118, 119, 03533 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03534 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03535 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03536 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03537 -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, 03538 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03540 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03541 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03542 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03543 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03545 -1, -1, -1, 108, -1, -1, -1, -1, -1, 114, 03546 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03547 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03548 0, 136, 137, 138, 139, -1, 141, -1, 8, 9, 03549 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03550 -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 03551 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03552 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03554 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03555 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03556 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 03557 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03558 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03559 -1, 111, -1, -1, 114, 115, 116, 117, 118, 119, 03560 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03561 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 03562 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 03563 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03564 -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, 03565 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03566 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03568 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03569 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03570 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03572 -1, -1, -1, 108, -1, -1, -1, -1, -1, 114, 03573 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03574 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03575 0, 136, 137, 138, 139, -1, 141, -1, 8, 9, 03576 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 03577 -1, -1, -1, -1, -1, -1, -1, 27, 28, -1, 03578 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03579 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03581 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03582 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03583 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 03584 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 03585 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03586 -1, -1, -1, -1, 114, -1, 116, 117, 118, 119, 03587 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03588 -1, 131, 132, 133, 134, 0, 136, 137, 138, 139, 03589 -1, 141, -1, 8, 9, 10, -1, -1, -1, 14, 03590 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03591 -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, 03592 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03594 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03595 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 03596 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03597 85, -1, 87, -1, -1, -1, -1, -1, -1, -1, 03598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03599 -1, -1, -1, 108, -1, -1, -1, -1, 113, 114, 03600 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03601 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 03602 0, -1, 137, -1, 139, -1, 141, -1, 8, 9, 03603 10, -1, -1, -1, 14, 15, -1, 17, -1, -1, 03604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03605 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 03606 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 03607 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03608 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 03609 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 03610 80, -1, -1, 83, 84, 85, -1, 87, -1, -1, 03611 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03612 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 03613 -1, -1, -1, 113, 114, -1, 116, 117, 118, 119, 03614 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 03615 -1, 131, 132, 133, 134, -1, -1, 137, -1, 139, 03616 1, 141, 3, 4, 5, 6, 7, 8, 9, 10, 03617 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03618 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03619 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03620 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03621 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03622 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03624 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03625 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 03626 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03627 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03628 -1, -1, -1, -1, -1, 126, 127, 128, -1, -1, 03629 -1, -1, -1, -1, -1, -1, -1, -1, 139, 1, 03630 141, 3, 4, 5, 6, 7, -1, -1, 10, 11, 03631 12, -1, 14, 15, 16, -1, 18, 19, 20, 21, 03632 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03633 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03634 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03635 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03636 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03638 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03639 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03640 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03641 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03642 -1, -1, -1, -1, 126, 127, 128, -1, -1, -1, 03643 -1, -1, -1, -1, -1, -1, -1, 139, 1, 141, 03644 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, 03645 -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, 03646 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03647 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03648 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03649 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03650 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03652 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03653 93, -1, 95, -1, -1, 98, 99, 100, 101, 102, 03654 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 03655 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03656 -1, -1, -1, 126, 127, 128, -1, -1, -1, -1, 03657 -1, -1, -1, -1, -1, -1, 139, 1, 141, 3, 03658 4, 5, 6, 7, -1, -1, 10, 11, 12, -1, 03659 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23, 03660 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03661 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03662 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03663 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03664 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03666 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03667 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 03668 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 03669 1, -1, 3, 4, 5, 6, 7, -1, 9, 10, 03670 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 03671 21, 22, 23, 24, -1, 139, -1, 141, -1, 30, 03672 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03673 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03674 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03675 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03677 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03678 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 03679 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03680 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 03681 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 03682 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 03683 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03684 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03685 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03686 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03687 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03688 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03689 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 03690 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03692 -1, -1, -1, -1, -1, -1, -1, -1, 126, 127, 03693 128, -1, -1, -1, -1, -1, -1, -1, -1, 137, 03694 -1, 139, 1, 141, 3, 4, 5, 6, 7, -1, 03695 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18, 03696 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03697 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03698 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03699 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03700 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03701 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03702 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03703 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03704 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03705 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03706 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 03707 -1, -1, -1, -1, -1, -1, -1, -1, 137, -1, 03708 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 03709 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03710 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03711 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03712 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 03713 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03714 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03715 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03716 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03717 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 03718 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03719 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03720 -1, -1, -1, -1, -1, -1, 126, 127, 128, -1, 03721 -1, 131, 1, -1, 3, 4, 5, 6, 7, 139, 03722 -1, 141, 11, 12, -1, -1, -1, 16, -1, 18, 03723 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03724 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03725 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 03726 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03727 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03728 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03729 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03730 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 03731 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03732 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03733 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 03734 -1, -1, 131, -1, -1, -1, -1, -1, -1, -1, 03735 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 03736 10, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03737 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03738 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03739 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 03740 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03741 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03742 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03743 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03744 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 03745 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03746 -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 03747 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 03748 -1, 18, 19, 20, 21, 22, 23, 24, -1, 139, 03749 -1, 141, -1, 30, 31, 32, 33, 34, 35, 36, 03750 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, 03751 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 03752 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03753 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03754 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03755 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03756 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03757 -1, 108, -1, -1, -1, -1, -1, -1, -1, 3, 03758 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 03759 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 03760 24, -1, 139, -1, 141, -1, 30, 31, 32, 33, 03761 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03762 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03763 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03764 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03765 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03766 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03767 -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 03768 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 03769 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03770 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 03771 21, 22, 23, 24, -1, -1, -1, 141, -1, 30, 03772 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03773 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03774 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03775 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03777 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03778 -1, 92, 93, -1, -1, -1, -1, 98, 99, 100, 03779 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 03780 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03781 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 03782 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 03783 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03784 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03785 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03786 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03788 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03789 -1, 89, 90, -1, 92, 93, -1, -1, -1, -1, 03790 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03791 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03792 5, 6, 7, -1, -1, -1, 11, 12, 126, 127, 03793 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03794 -1, -1, -1, 141, -1, 30, 31, 32, 33, 34, 03795 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03796 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03797 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03798 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03799 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03800 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03801 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 03802 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03803 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03804 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 03805 22, 23, 24, -1, 139, -1, -1, -1, 30, 31, 03806 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03807 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03808 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03809 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03810 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03811 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03812 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03813 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03814 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03815 -1, -1, -1, -1, 126, 127, 128, -1, -1, -1, 03816 -1, -1, -1, -1, -1, -1, -1, 139, 3, 4, 03817 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03818 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03819 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03820 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03821 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 03822 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, 03823 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03824 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03825 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03826 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 03827 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03828 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03829 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 03830 135, 136, 3, 4, 5, 6, 7, 8, 9, 10, 03831 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 03832 21, 22, 23, 24, 25, 26, -1, -1, -1, 30, 03833 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 03834 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03835 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, 03836 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 03837 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 03838 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 03839 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 03840 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03841 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 03842 121, 122, 123, 124, 125, -1, 127, 128, -1, -1, 03843 -1, -1, -1, -1, 135, 3, 4, 5, 6, 7, 03844 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 03845 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, 03846 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 03847 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03848 48, 49, 50, 51, 52, 53, 54, -1, 56, -1, 03849 -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 03850 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03851 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 03852 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 03853 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1, 03854 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 03855 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 03856 128, -1, -1, -1, -1, -1, -1, 135, 3, 4, 03857 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03858 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03859 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03860 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03861 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 03862 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03863 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03864 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03866 95, 96, -1, -1, 99, -1, -1, -1, -1, -1, 03867 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03868 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 03869 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 03870 135, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03871 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03872 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03873 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03874 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03875 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 03876 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03877 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03878 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03879 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 03880 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03881 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 03882 122, 123, 124, 125, -1, 127, 128, 3, 4, 5, 03883 -1, 7, -1, 135, -1, 11, 12, -1, -1, -1, 03884 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03885 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03886 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03887 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03888 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03889 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03890 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03891 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 03892 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 03893 106, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03894 7, -1, -1, -1, 11, 12, -1, -1, -1, 16, 03895 126, 18, 19, 20, 21, 22, 23, 24, 134, -1, 03896 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03897 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03898 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03899 57, -1, 59, 60, -1, 62, 63, 64, -1, -1, 03900 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03901 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03902 -1, -1, 89, 90, -1, 92, 93, -1, -1, -1, 03903 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03904 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 03905 -1, -1, -1, 11, 12, -1, -1, -1, 16, 126, 03906 18, 19, 20, 21, 22, 23, 24, 134, -1, -1, 03907 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03908 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03909 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03910 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03911 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03912 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03913 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 03914 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 03915 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03916 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 03917 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03918 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03919 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03920 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03921 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03922 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03924 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03925 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 03926 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 03927 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 03928 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 03929 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03930 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03931 -1, -1, -1, 45, 46, -1, 48, 49, 50, 51, 03932 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03933 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03934 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03935 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03936 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 03937 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 03938 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03939 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 03940 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03941 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03942 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03943 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 03944 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03945 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03946 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03947 89, 90, -1, 92, 93, -1, 95, 96, 97, 98, 03948 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 03949 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03950 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 03951 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03952 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03953 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03954 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03955 56, 57, 58, 59, 60, -1, 62, 63, 64, -1, 03956 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03957 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03958 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03959 96, -1, 98, 99, 100, 101, 102, 103, 104, 105, 03960 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03961 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03962 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 03963 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03964 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03965 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03966 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03967 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03968 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03969 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03970 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 03971 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 03972 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03973 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 03974 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03975 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03976 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03977 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03978 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03979 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03980 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03981 90, -1, 92, 93, -1, 95, 96, -1, 98, 99, 03982 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 03983 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03984 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 03985 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03986 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03987 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03988 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03989 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03990 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03991 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03992 -1, -1, 89, 90, -1, 92, 93, -1, -1, 96, 03993 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 03994 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03995 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 03996 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 03997 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03998 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03999 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04000 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04001 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 04002 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04003 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04004 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 04005 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 04006 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 04007 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 04008 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 04009 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 04010 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 04011 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 04012 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 04013 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04014 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 04015 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 04016 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 04017 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 04018 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 04019 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 04020 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 04021 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 04022 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 04023 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 04024 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04025 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 04026 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 04027 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 04028 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 04029 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 04030 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 04031 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 04032 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 04033 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 04034 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 04035 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 04036 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04037 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 04038 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 04039 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 04040 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 04041 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 04042 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 04043 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 04044 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 04045 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 04046 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 04047 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04048 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 04049 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 04050 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 04051 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 04052 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 04053 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 04054 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 04055 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 04056 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 04057 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 04058 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04059 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 04060 89, 90, -1, 92, 93, -1, -1, -1, -1, 98, 04061 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 04062 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 04063 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 04064 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 04065 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 04066 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 04067 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 04068 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 04069 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 04070 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04071 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 04072 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 04073 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04074 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04075 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 04076 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04077 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04078 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04079 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 04080 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 04081 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04082 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04083 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 04084 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 04085 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 04086 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 04087 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 04088 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 04089 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 04090 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 04091 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 04092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04093 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 04094 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 04095 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 04096 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 04097 11, 12, -1, -1, -1, 16, 126, 18, 19, 20, 04098 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 04099 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 04100 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 04101 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 04102 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 04103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04104 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 04105 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 04106 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 04107 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 04108 12, -1, -1, -1, 16, 126, 18, 19, 20, 21, 04109 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 04110 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 04111 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 04112 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 04113 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 04114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04115 -1, 83, -1, -1, 86, -1, -1, 89, 90, -1, 04116 92, 93, -1, -1, -1, -1, 98, 99, 100, 101, 04117 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 04118 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 04119 -1, -1, -1, 16, 126, 18, 19, 20, 21, 22, 04120 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 04121 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 04122 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 04123 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 04124 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, 04125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04126 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 04127 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 04128 103, 104, 105, 106, -1, -1, -1, -1, -1, 3, 04129 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 04130 -1, -1, 16, 126, 18, 19, 20, 21, 22, 23, 04131 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 04132 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 04133 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 04134 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 04135 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04136 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04137 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 04138 -1, -1, -1, -1, 98, 99, 100, 101, 102, 103, 04139 104, 105, 106, -1, -1, -1, -1, -1, 3, 4, 04140 5, -1, 7, -1, -1, -1, 11, 12, -1, -1, 04141 -1, 16, 126, 18, 19, 20, 21, 22, 23, 24, 04142 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 04143 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 04144 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 04145 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 04146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04148 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 04149 -1, -1, -1, 98, 99, 100, 101, 102, 103, 104, 04150 105, 106, -1, -1, -1, -1, -1, 3, 4, 5, 04151 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1, 04152 16, 126, 18, 19, 20, 21, 22, 23, 24, -1, 04153 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 04154 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 04155 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 04156 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 04157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04159 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 04160 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 04161 106, -1, -1, -1, -1, -1, -1, 52, 53, -1, 04162 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 04163 126, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04164 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04166 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 04167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04168 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 04169 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 04170 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 04171 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04172 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04173 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 04174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04175 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 04176 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 04177 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 04178 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 04179 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04180 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04181 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 04182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04183 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 04184 121, 122, 123, 124, 125, -1, 127, 128, 52, 53, 04185 -1, -1, 56, -1, 135, -1, -1, -1, -1, -1, 04186 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 04187 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04188 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04189 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 04190 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04191 -1, -1, 116, 117, 118, 119, 120, 121, 122, 123, 04192 124, 125, -1, 127, 128, 52, 53, -1, -1, 56, 04193 -1, 135, -1, -1, -1, -1, -1, -1, -1, 66, 04194 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04195 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04196 -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 04197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04198 -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, 04199 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 04200 127, 128, 52, 53, -1, -1, 56, -1, 135, -1, 04201 -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, 04202 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04203 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04204 -1, -1, -1, -1, -1, 95, 96, -1, -1, -1, 04205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04206 -1, -1, -1, -1, -1, -1, 116, 117, 118, 119, 04207 120, 121, 122, 123, 124, 125, -1, 127, 128, 52, 04208 53, -1, -1, 56, -1, 135, -1, -1, -1, -1, 04209 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 04210 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04211 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04212 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, 04213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04214 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 04215 123, 124, 125, -1, 127, 128, 52, 53, -1, -1, 04216 56, -1, 135, -1, -1, -1, -1, -1, -1, -1, 04217 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04218 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04219 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04220 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04221 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04222 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 04223 -1, 127, 128, 52, 53, -1, -1, 56, -1, 135, 04224 -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 04225 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04226 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04227 -1, -1, -1, -1, -1, -1, 95, 96, -1, -1, 04228 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04229 -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 04230 119, 120, 121, 122, 123, 124, 125, -1, 127, 128, 04231 52, 53, -1, -1, 56, -1, 135, -1, -1, -1, 04232 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 04233 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04234 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04235 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 04236 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04237 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 04238 122, 123, 124, 125, -1, 127, 128, 52, 53, -1, 04239 -1, 56, -1, 135, -1, -1, -1, -1, -1, -1, 04240 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04241 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04243 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 04244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04245 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 04246 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 04247 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 04248 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04249 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04250 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 04251 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04252 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 04253 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 04254 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 04255 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 04256 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04257 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04258 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 04259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04260 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 04261 121, 122, 123, 124, 125, -1, 127, 128, -1, -1, 04262 -1, -1, -1, -1, 135 04263 }; 04264 04265 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04266 symbol of state STATE-NUM. */ 04267 static const yytype_uint16 yystos[] = 04268 { 04269 0, 143, 144, 0, 1, 3, 4, 5, 6, 7, 04270 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04271 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04272 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04273 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04274 90, 92, 93, 95, 98, 99, 100, 101, 102, 103, 04275 104, 105, 106, 126, 127, 128, 145, 146, 147, 154, 04276 156, 157, 159, 160, 163, 164, 165, 167, 168, 169, 04277 171, 172, 182, 196, 214, 215, 216, 217, 218, 219, 04278 220, 221, 222, 223, 224, 250, 251, 265, 266, 267, 04279 268, 269, 270, 271, 274, 276, 277, 289, 291, 292, 04280 293, 294, 295, 296, 297, 328, 339, 147, 3, 4, 04281 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 04282 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 04283 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 04284 38, 39, 45, 46, 47, 48, 49, 50, 51, 52, 04285 53, 56, 66, 67, 68, 69, 70, 71, 72, 73, 04286 74, 77, 78, 81, 82, 83, 84, 95, 96, 116, 04287 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 04288 128, 135, 175, 176, 177, 178, 180, 181, 289, 291, 04289 39, 58, 86, 89, 95, 96, 97, 127, 164, 172, 04290 182, 184, 189, 192, 194, 214, 293, 294, 296, 297, 04291 326, 327, 189, 189, 136, 190, 191, 136, 186, 190, 04292 136, 141, 333, 54, 177, 333, 148, 130, 21, 22, 04293 30, 31, 32, 163, 182, 214, 182, 56, 1, 47, 04294 89, 150, 151, 152, 154, 166, 167, 339, 157, 198, 04295 185, 194, 326, 339, 184, 325, 326, 339, 46, 86, 04296 126, 134, 171, 196, 214, 293, 294, 297, 242, 243, 04297 54, 55, 57, 175, 281, 290, 280, 281, 282, 140, 04298 272, 140, 278, 140, 275, 140, 279, 59, 60, 159, 04299 182, 182, 139, 141, 332, 337, 338, 40, 41, 42, 04300 43, 44, 37, 38, 26, 130, 186, 190, 256, 28, 04301 248, 113, 134, 89, 95, 168, 113, 68, 69, 70, 04302 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 04303 83, 84, 114, 116, 117, 118, 119, 120, 121, 122, 04304 123, 124, 125, 85, 132, 133, 197, 157, 158, 158, 04305 201, 203, 158, 332, 338, 86, 165, 172, 214, 230, 04306 293, 294, 297, 52, 56, 83, 86, 173, 174, 214, 04307 293, 294, 297, 174, 33, 34, 35, 36, 49, 50, 04308 51, 52, 56, 136, 175, 295, 323, 85, 133, 331, 04309 256, 268, 87, 87, 134, 184, 56, 184, 184, 184, 04310 113, 88, 134, 193, 339, 85, 132, 133, 87, 87, 04311 134, 193, 189, 333, 334, 189, 188, 189, 194, 326, 04312 339, 157, 334, 157, 54, 63, 64, 155, 136, 183, 04313 130, 150, 85, 133, 87, 154, 153, 166, 137, 332, 04314 338, 334, 199, 334, 138, 134, 141, 336, 134, 336, 04315 131, 336, 333, 56, 59, 60, 168, 170, 134, 85, 04316 132, 133, 244, 61, 107, 109, 110, 283, 110, 283, 04317 110, 65, 283, 110, 110, 273, 283, 110, 61, 110, 04318 110, 110, 273, 110, 61, 110, 68, 68, 139, 147, 04319 158, 158, 158, 158, 154, 157, 157, 258, 257, 94, 04320 161, 249, 95, 159, 184, 194, 195, 166, 134, 171, 04321 134, 156, 159, 172, 182, 184, 195, 182, 182, 182, 04322 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 04323 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 04324 182, 182, 182, 52, 53, 56, 180, 255, 329, 330, 04325 188, 52, 53, 56, 180, 254, 329, 149, 150, 13, 04326 226, 337, 226, 158, 158, 332, 17, 259, 56, 85, 04327 132, 133, 25, 157, 52, 56, 173, 1, 117, 298, 04328 337, 85, 132, 133, 210, 324, 211, 331, 52, 56, 04329 329, 159, 182, 159, 182, 179, 182, 184, 95, 184, 04330 192, 326, 52, 56, 188, 52, 56, 327, 334, 137, 04331 334, 134, 134, 334, 177, 200, 182, 145, 131, 329, 04332 329, 182, 130, 334, 152, 334, 326, 134, 170, 52, 04333 56, 188, 52, 56, 52, 54, 55, 56, 57, 58, 04334 68, 89, 95, 96, 97, 120, 123, 136, 246, 301, 04335 303, 304, 305, 306, 307, 308, 311, 312, 313, 314, 04336 317, 318, 319, 320, 321, 285, 284, 140, 283, 140, 04337 140, 140, 182, 182, 76, 118, 237, 238, 339, 237, 04338 162, 237, 184, 134, 334, 170, 134, 113, 44, 333, 04339 87, 87, 186, 190, 253, 333, 335, 87, 87, 186, 04340 190, 252, 10, 225, 8, 261, 339, 150, 13, 150, 04341 27, 227, 337, 227, 259, 194, 225, 52, 56, 188, 04342 52, 56, 205, 208, 337, 299, 207, 52, 56, 173, 04343 188, 149, 157, 136, 300, 303, 212, 186, 187, 190, 04344 339, 44, 177, 184, 193, 87, 87, 335, 87, 87, 04345 326, 157, 131, 145, 336, 168, 335, 113, 184, 52, 04346 89, 95, 231, 232, 233, 305, 303, 245, 134, 302, 04347 134, 322, 339, 52, 134, 322, 134, 302, 52, 134, 04348 302, 52, 286, 54, 55, 57, 288, 297, 52, 58, 04349 234, 236, 239, 307, 309, 310, 313, 315, 316, 319, 04350 321, 333, 150, 150, 237, 150, 95, 184, 170, 182, 04351 115, 159, 182, 159, 182, 161, 186, 138, 87, 159, 04352 182, 159, 182, 161, 187, 184, 195, 262, 339, 15, 04353 229, 339, 14, 228, 229, 229, 202, 204, 225, 134, 04354 226, 335, 158, 337, 158, 149, 335, 225, 334, 303, 04355 149, 337, 175, 256, 248, 182, 87, 134, 334, 131, 04356 184, 233, 134, 305, 134, 334, 239, 29, 111, 247, 04357 301, 306, 317, 319, 308, 313, 321, 307, 314, 319, 04358 307, 287, 113, 86, 214, 239, 118, 134, 235, 134, 04359 322, 322, 134, 235, 134, 235, 139, 10, 131, 150, 04360 10, 184, 182, 159, 182, 88, 263, 339, 150, 9, 04361 264, 339, 158, 225, 225, 150, 150, 184, 150, 227, 04362 209, 337, 225, 334, 225, 213, 334, 232, 134, 95, 04363 231, 137, 150, 150, 134, 302, 134, 302, 322, 134, 04364 302, 134, 302, 302, 150, 214, 56, 85, 118, 234, 04365 316, 319, 309, 313, 307, 315, 319, 307, 52, 240, 04366 241, 304, 131, 86, 172, 214, 293, 294, 297, 226, 04367 150, 226, 225, 225, 229, 259, 260, 206, 149, 300, 04368 134, 232, 134, 305, 10, 131, 307, 319, 307, 307, 04369 108, 52, 56, 134, 235, 134, 235, 322, 134, 235, 04370 134, 235, 235, 134, 333, 56, 85, 132, 133, 150, 04371 150, 150, 225, 149, 232, 134, 302, 134, 302, 302, 04372 302, 307, 319, 307, 307, 241, 52, 56, 188, 52, 04373 56, 261, 228, 225, 225, 232, 307, 235, 134, 235, 04374 235, 235, 335, 302, 307, 235 04375 }; 04376 04377 #define yyerrok (yyerrstatus = 0) 04378 #define yyclearin (yychar = YYEMPTY) 04379 #define YYEMPTY (-2) 04380 #define YYEOF 0 04381 04382 #define YYACCEPT goto yyacceptlab 04383 #define YYABORT goto yyabortlab 04384 #define YYERROR goto yyerrorlab 04385 04386 04387 /* Like YYERROR except do call yyerror. This remains here temporarily 04388 to ease the transition to the new meaning of YYERROR, for GCC. 04389 Once GCC version 2 has supplanted version 1, this can go. However, 04390 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 04391 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 04392 discussed. */ 04393 04394 #define YYFAIL goto yyerrlab 04395 #if defined YYFAIL 04396 /* This is here to suppress warnings from the GCC cpp's 04397 -Wunused-macros. Normally we don't worry about that warning, but 04398 some users do, and we want to make it easy for users to remove 04399 YYFAIL uses, which will produce warnings from Bison 2.5. */ 04400 #endif 04401 04402 #define YYRECOVERING() (!!yyerrstatus) 04403 04404 #define YYBACKUP(Token, Value) \ 04405 do \ 04406 if (yychar == YYEMPTY && yylen == 1) \ 04407 { \ 04408 yychar = (Token); \ 04409 yylval = (Value); \ 04410 YYPOPSTACK (1); \ 04411 goto yybackup; \ 04412 } \ 04413 else \ 04414 { \ 04415 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04416 YYERROR; \ 04417 } \ 04418 while (YYID (0)) 04419 04420 04421 #define YYTERROR 1 04422 #define YYERRCODE 256 04423 04424 04425 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04426 If N is 0, then set CURRENT to the empty location which ends 04427 the previous symbol: RHS[0] (always defined). */ 04428 04429 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04430 #ifndef YYLLOC_DEFAULT 04431 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04432 do \ 04433 if (YYID (N)) \ 04434 { \ 04435 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04436 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04437 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04438 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04439 } \ 04440 else \ 04441 { \ 04442 (Current).first_line = (Current).last_line = \ 04443 YYRHSLOC (Rhs, 0).last_line; \ 04444 (Current).first_column = (Current).last_column = \ 04445 YYRHSLOC (Rhs, 0).last_column; \ 04446 } \ 04447 while (YYID (0)) 04448 #endif 04449 04450 04451 /* This macro is provided for backward compatibility. */ 04452 04453 #ifndef YY_LOCATION_PRINT 04454 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04455 #endif 04456 04457 04458 /* YYLEX -- calling `yylex' with the right arguments. */ 04459 04460 #ifdef YYLEX_PARAM 04461 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04462 #else 04463 # define YYLEX yylex (&yylval, parser) 04464 #endif 04465 04466 /* Enable debugging if requested. */ 04467 #if YYDEBUG 04468 04469 # ifndef YYFPRINTF 04470 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04471 # define YYFPRINTF fprintf 04472 # endif 04473 04474 # define YYDPRINTF(Args) \ 04475 do { \ 04476 if (yydebug) \ 04477 YYFPRINTF Args; \ 04478 } while (YYID (0)) 04479 04480 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04481 do { \ 04482 if (yydebug) \ 04483 { \ 04484 YYFPRINTF (stderr, "%s ", Title); \ 04485 yy_symbol_print (stderr, \ 04486 Type, Value, parser); \ 04487 YYFPRINTF (stderr, "\n"); \ 04488 } \ 04489 } while (YYID (0)) 04490 04491 04492 /*--------------------------------. 04493 | Print this symbol on YYOUTPUT. | 04494 `--------------------------------*/ 04495 04496 /*ARGSUSED*/ 04497 #if (defined __STDC__ || defined __C99__FUNC__ \ 04498 || defined __cplusplus || defined _MSC_VER) 04499 static void 04500 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04501 #else 04502 static void 04503 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04504 FILE *yyoutput; 04505 int yytype; 04506 YYSTYPE const * const yyvaluep; 04507 struct parser_params *parser; 04508 #endif 04509 { 04510 if (!yyvaluep) 04511 return; 04512 YYUSE (parser); 04513 # ifdef YYPRINT 04514 if (yytype < YYNTOKENS) 04515 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04516 # else 04517 YYUSE (yyoutput); 04518 # endif 04519 switch (yytype) 04520 { 04521 default: 04522 break; 04523 } 04524 } 04525 04526 04527 /*--------------------------------. 04528 | Print this symbol on YYOUTPUT. | 04529 `--------------------------------*/ 04530 04531 #if (defined __STDC__ || defined __C99__FUNC__ \ 04532 || defined __cplusplus || defined _MSC_VER) 04533 static void 04534 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04535 #else 04536 static void 04537 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04538 FILE *yyoutput; 04539 int yytype; 04540 YYSTYPE const * const yyvaluep; 04541 struct parser_params *parser; 04542 #endif 04543 { 04544 if (yytype < YYNTOKENS) 04545 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04546 else 04547 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04548 04549 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04550 YYFPRINTF (yyoutput, ")"); 04551 } 04552 04553 /*------------------------------------------------------------------. 04554 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04555 | TOP (included). | 04556 `------------------------------------------------------------------*/ 04557 04558 #if (defined __STDC__ || defined __C99__FUNC__ \ 04559 || defined __cplusplus || defined _MSC_VER) 04560 static void 04561 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 04562 #else 04563 static void 04564 yy_stack_print (yybottom, yytop) 04565 yytype_int16 *yybottom; 04566 yytype_int16 *yytop; 04567 #endif 04568 { 04569 YYFPRINTF (stderr, "Stack now"); 04570 for (; yybottom <= yytop; yybottom++) 04571 { 04572 int yybot = *yybottom; 04573 YYFPRINTF (stderr, " %d", yybot); 04574 } 04575 YYFPRINTF (stderr, "\n"); 04576 } 04577 04578 # define YY_STACK_PRINT(Bottom, Top) \ 04579 do { \ 04580 if (yydebug) \ 04581 yy_stack_print ((Bottom), (Top)); \ 04582 } while (YYID (0)) 04583 04584 04585 /*------------------------------------------------. 04586 | Report that the YYRULE is going to be reduced. | 04587 `------------------------------------------------*/ 04588 04589 #if (defined __STDC__ || defined __C99__FUNC__ \ 04590 || defined __cplusplus || defined _MSC_VER) 04591 static void 04592 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04593 #else 04594 static void 04595 yy_reduce_print (yyvsp, yyrule, parser) 04596 YYSTYPE *yyvsp; 04597 int yyrule; 04598 struct parser_params *parser; 04599 #endif 04600 { 04601 int yynrhs = yyr2[yyrule]; 04602 int yyi; 04603 unsigned long int yylno = yyrline[yyrule]; 04604 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04605 yyrule - 1, yylno); 04606 /* The symbols being reduced. */ 04607 for (yyi = 0; yyi < yynrhs; yyi++) 04608 { 04609 YYFPRINTF (stderr, " $%d = ", yyi + 1); 04610 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04611 &(yyvsp[(yyi + 1) - (yynrhs)]) 04612 , parser); 04613 YYFPRINTF (stderr, "\n"); 04614 } 04615 } 04616 04617 # define YY_REDUCE_PRINT(Rule) \ 04618 do { \ 04619 if (yydebug) \ 04620 yy_reduce_print (yyvsp, Rule, parser); \ 04621 } while (YYID (0)) 04622 04623 /* Nonzero means print parse trace. It is left uninitialized so that 04624 multiple parsers can coexist. */ 04625 #ifndef yydebug 04626 int yydebug; 04627 #endif 04628 #else /* !YYDEBUG */ 04629 # define YYDPRINTF(Args) 04630 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04631 # define YY_STACK_PRINT(Bottom, Top) 04632 # define YY_REDUCE_PRINT(Rule) 04633 #endif /* !YYDEBUG */ 04634 04635 04636 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04637 #ifndef YYINITDEPTH 04638 # define YYINITDEPTH 200 04639 #endif 04640 04641 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04642 if the built-in stack extension method is used). 04643 04644 Do not make this value too large; the results are undefined if 04645 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04646 evaluated with infinite-precision integer arithmetic. */ 04647 04648 #ifndef YYMAXDEPTH 04649 # define YYMAXDEPTH 10000 04650 #endif 04651 04652 04653 #if YYERROR_VERBOSE 04654 04655 # ifndef yystrlen 04656 # if defined __GLIBC__ && defined _STRING_H 04657 # define yystrlen strlen 04658 # else 04659 /* Return the length of YYSTR. */ 04660 #if (defined __STDC__ || defined __C99__FUNC__ \ 04661 || defined __cplusplus || defined _MSC_VER) 04662 static YYSIZE_T 04663 yystrlen (const char *yystr) 04664 #else 04665 static YYSIZE_T 04666 yystrlen (yystr) 04667 const char *yystr; 04668 #endif 04669 { 04670 YYSIZE_T yylen; 04671 for (yylen = 0; yystr[yylen]; yylen++) 04672 continue; 04673 return yylen; 04674 } 04675 # endif 04676 # endif 04677 04678 # ifndef yystpcpy 04679 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04680 # define yystpcpy stpcpy 04681 # else 04682 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04683 YYDEST. */ 04684 #if (defined __STDC__ || defined __C99__FUNC__ \ 04685 || defined __cplusplus || defined _MSC_VER) 04686 static char * 04687 yystpcpy (char *yydest, const char *yysrc) 04688 #else 04689 static char * 04690 yystpcpy (yydest, yysrc) 04691 char *yydest; 04692 const char *yysrc; 04693 #endif 04694 { 04695 char *yyd = yydest; 04696 const char *yys = yysrc; 04697 04698 while ((*yyd++ = *yys++) != '\0') 04699 continue; 04700 04701 return yyd - 1; 04702 } 04703 # endif 04704 # endif 04705 04706 # ifndef yytnamerr 04707 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04708 quotes and backslashes, so that it's suitable for yyerror. The 04709 heuristic is that double-quoting is unnecessary unless the string 04710 contains an apostrophe, a comma, or backslash (other than 04711 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04712 null, do not copy; instead, return the length of what the result 04713 would have been. */ 04714 static YYSIZE_T 04715 yytnamerr (char *yyres, const char *yystr) 04716 { 04717 if (*yystr == '"') 04718 { 04719 YYSIZE_T yyn = 0; 04720 char const *yyp = yystr; 04721 04722 for (;;) 04723 switch (*++yyp) 04724 { 04725 case '\'': 04726 case ',': 04727 goto do_not_strip_quotes; 04728 04729 case '\\': 04730 if (*++yyp != '\\') 04731 goto do_not_strip_quotes; 04732 /* Fall through. */ 04733 default: 04734 if (yyres) 04735 yyres[yyn] = *yyp; 04736 yyn++; 04737 break; 04738 04739 case '"': 04740 if (yyres) 04741 yyres[yyn] = '\0'; 04742 return yyn; 04743 } 04744 do_not_strip_quotes: ; 04745 } 04746 04747 if (! yyres) 04748 return yystrlen (yystr); 04749 04750 return yystpcpy (yyres, yystr) - yyres; 04751 } 04752 # endif 04753 04754 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 04755 about the unexpected token YYTOKEN for the state stack whose top is 04756 YYSSP. 04757 04758 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 04759 not large enough to hold the message. In that case, also set 04760 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 04761 required number of bytes is too large to store. */ 04762 static int 04763 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 04764 yytype_int16 *yyssp, int yytoken) 04765 { 04766 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 04767 YYSIZE_T yysize = yysize0; 04768 YYSIZE_T yysize1; 04769 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04770 /* Internationalized format string. */ 04771 const char *yyformat = 0; 04772 /* Arguments of yyformat. */ 04773 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04774 /* Number of reported tokens (one for the "unexpected", one per 04775 "expected"). */ 04776 int yycount = 0; 04777 04778 /* There are many possibilities here to consider: 04779 - Assume YYFAIL is not used. It's too flawed to consider. See 04780 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 04781 for details. YYERROR is fine as it does not invoke this 04782 function. 04783 - If this state is a consistent state with a default action, then 04784 the only way this function was invoked is if the default action 04785 is an error action. In that case, don't check for expected 04786 tokens because there are none. 04787 - The only way there can be no lookahead present (in yychar) is if 04788 this state is a consistent state with a default action. Thus, 04789 detecting the absence of a lookahead is sufficient to determine 04790 that there is no unexpected or expected token to report. In that 04791 case, just report a simple "syntax error". 04792 - Don't assume there isn't a lookahead just because this state is a 04793 consistent state with a default action. There might have been a 04794 previous inconsistent state, consistent state with a non-default 04795 action, or user semantic action that manipulated yychar. 04796 - Of course, the expected token list depends on states to have 04797 correct lookahead information, and it depends on the parser not 04798 to perform extra reductions after fetching a lookahead from the 04799 scanner and before detecting a syntax error. Thus, state merging 04800 (from LALR or IELR) and default reductions corrupt the expected 04801 token list. However, the list is correct for canonical LR with 04802 one exception: it will still contain any token that will not be 04803 accepted due to an error action in a later state. 04804 */ 04805 if (yytoken != YYEMPTY) 04806 { 04807 int yyn = yypact[*yyssp]; 04808 yyarg[yycount++] = yytname[yytoken]; 04809 if (!yypact_value_is_default (yyn)) 04810 { 04811 /* Start YYX at -YYN if negative to avoid negative indexes in 04812 YYCHECK. In other words, skip the first -YYN actions for 04813 this state because they are default actions. */ 04814 int yyxbegin = yyn < 0 ? -yyn : 0; 04815 /* Stay within bounds of both yycheck and yytname. */ 04816 int yychecklim = YYLAST - yyn + 1; 04817 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04818 int yyx; 04819 04820 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04821 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 04822 && !yytable_value_is_error (yytable[yyx + yyn])) 04823 { 04824 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04825 { 04826 yycount = 1; 04827 yysize = yysize0; 04828 break; 04829 } 04830 yyarg[yycount++] = yytname[yyx]; 04831 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04832 if (! (yysize <= yysize1 04833 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04834 return 2; 04835 yysize = yysize1; 04836 } 04837 } 04838 } 04839 04840 switch (yycount) 04841 { 04842 # define YYCASE_(N, S) \ 04843 case N: \ 04844 yyformat = S; \ 04845 break 04846 YYCASE_(0, YY_("syntax error")); 04847 YYCASE_(1, YY_("syntax error, unexpected %s")); 04848 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 04849 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 04850 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 04851 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 04852 # undef YYCASE_ 04853 } 04854 04855 yysize1 = yysize + yystrlen (yyformat); 04856 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04857 return 2; 04858 yysize = yysize1; 04859 04860 if (*yymsg_alloc < yysize) 04861 { 04862 *yymsg_alloc = 2 * yysize; 04863 if (! (yysize <= *yymsg_alloc 04864 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 04865 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 04866 return 1; 04867 } 04868 04869 /* Avoid sprintf, as that infringes on the user's name space. 04870 Don't have undefined behavior even if the translation 04871 produced a string with the wrong number of "%s"s. */ 04872 { 04873 char *yyp = *yymsg; 04874 int yyi = 0; 04875 while ((*yyp = *yyformat) != '\0') 04876 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 04877 { 04878 yyp += yytnamerr (yyp, yyarg[yyi++]); 04879 yyformat += 2; 04880 } 04881 else 04882 { 04883 yyp++; 04884 yyformat++; 04885 } 04886 } 04887 return 0; 04888 } 04889 #endif /* YYERROR_VERBOSE */ 04890 04891 /*-----------------------------------------------. 04892 | Release the memory associated to this symbol. | 04893 `-----------------------------------------------*/ 04894 04895 /*ARGSUSED*/ 04896 #if (defined __STDC__ || defined __C99__FUNC__ \ 04897 || defined __cplusplus || defined _MSC_VER) 04898 static void 04899 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04900 #else 04901 static void 04902 yydestruct (yymsg, yytype, yyvaluep, parser) 04903 const char *yymsg; 04904 int yytype; 04905 YYSTYPE *yyvaluep; 04906 struct parser_params *parser; 04907 #endif 04908 { 04909 YYUSE (yyvaluep); 04910 YYUSE (parser); 04911 04912 if (!yymsg) 04913 yymsg = "Deleting"; 04914 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04915 04916 switch (yytype) 04917 { 04918 04919 default: 04920 break; 04921 } 04922 } 04923 04924 04925 /* Prevent warnings from -Wmissing-prototypes. */ 04926 #ifdef YYPARSE_PARAM 04927 #if defined __STDC__ || defined __cplusplus 04928 int yyparse (void *YYPARSE_PARAM); 04929 #else 04930 int yyparse (); 04931 #endif 04932 #else /* ! YYPARSE_PARAM */ 04933 #if defined __STDC__ || defined __cplusplus 04934 int yyparse (struct parser_params *parser); 04935 #else 04936 int yyparse (); 04937 #endif 04938 #endif /* ! YYPARSE_PARAM */ 04939 04940 04941 /*----------. 04942 | yyparse. | 04943 `----------*/ 04944 04945 #ifdef YYPARSE_PARAM 04946 #if (defined __STDC__ || defined __C99__FUNC__ \ 04947 || defined __cplusplus || defined _MSC_VER) 04948 int 04949 yyparse (void *YYPARSE_PARAM) 04950 #else 04951 int 04952 yyparse (YYPARSE_PARAM) 04953 void *YYPARSE_PARAM; 04954 #endif 04955 #else /* ! YYPARSE_PARAM */ 04956 #if (defined __STDC__ || defined __C99__FUNC__ \ 04957 || defined __cplusplus || defined _MSC_VER) 04958 int 04959 yyparse (struct parser_params *parser) 04960 #else 04961 int 04962 yyparse (parser) 04963 struct parser_params *parser; 04964 #endif 04965 #endif 04966 { 04967 /* The lookahead symbol. */ 04968 int yychar; 04969 04970 /* The semantic value of the lookahead symbol. */ 04971 YYSTYPE yylval; 04972 04973 /* Number of syntax errors so far. */ 04974 int yynerrs; 04975 04976 int yystate; 04977 /* Number of tokens to shift before error messages enabled. */ 04978 int yyerrstatus; 04979 04980 /* The stacks and their tools: 04981 `yyss': related to states. 04982 `yyvs': related to semantic values. 04983 04984 Refer to the stacks thru separate pointers, to allow yyoverflow 04985 to reallocate them elsewhere. */ 04986 04987 /* The state stack. */ 04988 yytype_int16 yyssa[YYINITDEPTH]; 04989 yytype_int16 *yyss; 04990 yytype_int16 *yyssp; 04991 04992 /* The semantic value stack. */ 04993 YYSTYPE yyvsa[YYINITDEPTH]; 04994 YYSTYPE *yyvs; 04995 YYSTYPE *yyvsp; 04996 04997 YYSIZE_T yystacksize; 04998 04999 int yyn; 05000 int yyresult; 05001 /* Lookahead token as an internal (translated) token number. */ 05002 int yytoken; 05003 /* The variables used to return semantic value and location from the 05004 action routines. */ 05005 YYSTYPE yyval; 05006 05007 #if YYERROR_VERBOSE 05008 /* Buffer for error messages, and its allocated size. */ 05009 char yymsgbuf[128]; 05010 char *yymsg = yymsgbuf; 05011 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 05012 #endif 05013 05014 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 05015 05016 /* The number of symbols on the RHS of the reduced rule. 05017 Keep to zero when no symbol should be popped. */ 05018 int yylen = 0; 05019 05020 yytoken = 0; 05021 yyss = yyssa; 05022 yyvs = yyvsa; 05023 yystacksize = YYINITDEPTH; 05024 05025 YYDPRINTF ((stderr, "Starting parse\n")); 05026 05027 yystate = 0; 05028 yyerrstatus = 0; 05029 yynerrs = 0; 05030 yychar = YYEMPTY; /* Cause a token to be read. */ 05031 05032 /* Initialize stack pointers. 05033 Waste one element of value and location stack 05034 so that they stay on the same level as the state stack. 05035 The wasted elements are never initialized. */ 05036 yyssp = yyss; 05037 yyvsp = yyvs; 05038 05039 goto yysetstate; 05040 05041 /*------------------------------------------------------------. 05042 | yynewstate -- Push a new state, which is found in yystate. | 05043 `------------------------------------------------------------*/ 05044 yynewstate: 05045 /* In all cases, when you get here, the value and location stacks 05046 have just been pushed. So pushing a state here evens the stacks. */ 05047 yyssp++; 05048 05049 yysetstate: 05050 *yyssp = yystate; 05051 05052 if (yyss + yystacksize - 1 <= yyssp) 05053 { 05054 /* Get the current used size of the three stacks, in elements. */ 05055 YYSIZE_T yysize = yyssp - yyss + 1; 05056 05057 #ifdef yyoverflow 05058 { 05059 /* Give user a chance to reallocate the stack. Use copies of 05060 these so that the &'s don't force the real ones into 05061 memory. */ 05062 YYSTYPE *yyvs1 = yyvs; 05063 yytype_int16 *yyss1 = yyss; 05064 05065 /* Each stack pointer address is followed by the size of the 05066 data in use in that stack, in bytes. This used to be a 05067 conditional around just the two extra args, but that might 05068 be undefined if yyoverflow is a macro. */ 05069 yyoverflow (YY_("memory exhausted"), 05070 &yyss1, yysize * sizeof (*yyssp), 05071 &yyvs1, yysize * sizeof (*yyvsp), 05072 &yystacksize); 05073 05074 yyss = yyss1; 05075 yyvs = yyvs1; 05076 } 05077 #else /* no yyoverflow */ 05078 # ifndef YYSTACK_RELOCATE 05079 goto yyexhaustedlab; 05080 # else 05081 /* Extend the stack our own way. */ 05082 if (YYMAXDEPTH <= yystacksize) 05083 goto yyexhaustedlab; 05084 yystacksize *= 2; 05085 if (YYMAXDEPTH < yystacksize) 05086 yystacksize = YYMAXDEPTH; 05087 05088 { 05089 yytype_int16 *yyss1 = yyss; 05090 union yyalloc *yyptr = 05091 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 05092 if (! yyptr) 05093 goto yyexhaustedlab; 05094 YYSTACK_RELOCATE (yyss_alloc, yyss); 05095 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 05096 # undef YYSTACK_RELOCATE 05097 if (yyss1 != yyssa) 05098 YYSTACK_FREE (yyss1); 05099 } 05100 # endif 05101 #endif /* no yyoverflow */ 05102 05103 yyssp = yyss + yysize - 1; 05104 yyvsp = yyvs + yysize - 1; 05105 05106 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 05107 (unsigned long int) yystacksize)); 05108 05109 if (yyss + yystacksize - 1 <= yyssp) 05110 YYABORT; 05111 } 05112 05113 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 05114 05115 if (yystate == YYFINAL) 05116 YYACCEPT; 05117 05118 goto yybackup; 05119 05120 /*-----------. 05121 | yybackup. | 05122 `-----------*/ 05123 yybackup: 05124 05125 /* Do appropriate processing given the current state. Read a 05126 lookahead token if we need one and don't already have one. */ 05127 05128 /* First try to decide what to do without reference to lookahead token. */ 05129 yyn = yypact[yystate]; 05130 if (yypact_value_is_default (yyn)) 05131 goto yydefault; 05132 05133 /* Not known => get a lookahead token if don't already have one. */ 05134 05135 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 05136 if (yychar == YYEMPTY) 05137 { 05138 YYDPRINTF ((stderr, "Reading a token: ")); 05139 yychar = YYLEX; 05140 } 05141 05142 if (yychar <= YYEOF) 05143 { 05144 yychar = yytoken = YYEOF; 05145 YYDPRINTF ((stderr, "Now at end of input.\n")); 05146 } 05147 else 05148 { 05149 yytoken = YYTRANSLATE (yychar); 05150 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 05151 } 05152 05153 /* If the proper action on seeing token YYTOKEN is to reduce or to 05154 detect an error, take that action. */ 05155 yyn += yytoken; 05156 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 05157 goto yydefault; 05158 yyn = yytable[yyn]; 05159 if (yyn <= 0) 05160 { 05161 if (yytable_value_is_error (yyn)) 05162 goto yyerrlab; 05163 yyn = -yyn; 05164 goto yyreduce; 05165 } 05166 05167 /* Count tokens shifted since error; after three, turn off error 05168 status. */ 05169 if (yyerrstatus) 05170 yyerrstatus--; 05171 05172 /* Shift the lookahead token. */ 05173 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 05174 05175 /* Discard the shifted token. */ 05176 yychar = YYEMPTY; 05177 05178 yystate = yyn; 05179 *++yyvsp = yylval; 05180 05181 goto yynewstate; 05182 05183 05184 /*-----------------------------------------------------------. 05185 | yydefault -- do the default action for the current state. | 05186 `-----------------------------------------------------------*/ 05187 yydefault: 05188 yyn = yydefact[yystate]; 05189 if (yyn == 0) 05190 goto yyerrlab; 05191 goto yyreduce; 05192 05193 05194 /*-----------------------------. 05195 | yyreduce -- Do a reduction. | 05196 `-----------------------------*/ 05197 yyreduce: 05198 /* yyn is the number of a rule to reduce with. */ 05199 yylen = yyr2[yyn]; 05200 05201 /* If YYLEN is nonzero, implement the default value of the action: 05202 `$$ = $1'. 05203 05204 Otherwise, the following line sets YYVAL to garbage. 05205 This behavior is undocumented and Bison 05206 users should not rely upon it. Assigning to YYVAL 05207 unconditionally makes the parser a bit smaller, and it avoids a 05208 GCC warning that YYVAL may be used uninitialized. */ 05209 yyval = yyvsp[1-yylen]; 05210 05211 05212 YY_REDUCE_PRINT (yyn); 05213 switch (yyn) 05214 { 05215 case 2: 05216 05217 /* Line 1806 of yacc.c */ 05218 #line 853 "ripper.y" 05219 { 05220 lex_state = EXPR_BEG; 05221 #if 0 05222 local_push(compile_for_eval || rb_parse_in_main()); 05223 #endif 05224 local_push(0); 05225 05226 } 05227 break; 05228 05229 case 3: 05230 05231 /* Line 1806 of yacc.c */ 05232 #line 862 "ripper.y" 05233 { 05234 #if 0 05235 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { 05236 /* last expression should not be void */ 05237 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); 05238 else { 05239 NODE *node = (yyvsp[(2) - (2)].val); 05240 while (node->nd_next) { 05241 node = node->nd_next; 05242 } 05243 void_expr(node->nd_head); 05244 } 05245 } 05246 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val))); 05247 #endif 05248 (yyval.val) = (yyvsp[(2) - (2)].val); 05249 parser->result = dispatch1(program, (yyval.val)); 05250 05251 local_pop(); 05252 } 05253 break; 05254 05255 case 4: 05256 05257 /* Line 1806 of yacc.c */ 05258 #line 885 "ripper.y" 05259 { 05260 #if 0 05261 void_stmts((yyvsp[(1) - (2)].val)); 05262 fixup_nodes(&deferred_nodes); 05263 #endif 05264 05265 (yyval.val) = (yyvsp[(1) - (2)].val); 05266 } 05267 break; 05268 05269 case 5: 05270 05271 /* Line 1806 of yacc.c */ 05272 #line 896 "ripper.y" 05273 { 05274 #if 0 05275 (yyval.val) = NEW_BEGIN(0); 05276 #endif 05277 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05278 dispatch0(void_stmt)); 05279 05280 } 05281 break; 05282 05283 case 6: 05284 05285 /* Line 1806 of yacc.c */ 05286 #line 905 "ripper.y" 05287 { 05288 #if 0 05289 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05290 #endif 05291 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05292 05293 } 05294 break; 05295 05296 case 7: 05297 05298 /* Line 1806 of yacc.c */ 05299 #line 913 "ripper.y" 05300 { 05301 #if 0 05302 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05303 #endif 05304 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05305 05306 } 05307 break; 05308 05309 case 8: 05310 05311 /* Line 1806 of yacc.c */ 05312 #line 921 "ripper.y" 05313 { 05314 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05315 } 05316 break; 05317 05318 case 10: 05319 05320 /* Line 1806 of yacc.c */ 05321 #line 928 "ripper.y" 05322 { 05323 #if 0 05324 /* local_push(0); */ 05325 #endif 05326 05327 } 05328 break; 05329 05330 case 11: 05331 05332 /* Line 1806 of yacc.c */ 05333 #line 935 "ripper.y" 05334 { 05335 #if 0 05336 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05337 (yyvsp[(4) - (5)].val)); 05338 /* NEW_PREEXE($4)); */ 05339 /* local_pop(); */ 05340 (yyval.val) = NEW_BEGIN(0); 05341 #endif 05342 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05343 05344 } 05345 break; 05346 05347 case 12: 05348 05349 /* Line 1806 of yacc.c */ 05350 #line 952 "ripper.y" 05351 { 05352 #if 0 05353 (yyval.val) = (yyvsp[(1) - (4)].val); 05354 if ((yyvsp[(2) - (4)].val)) { 05355 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05356 } 05357 else if ((yyvsp[(3) - (4)].val)) { 05358 rb_warn0("else without rescue is useless"); 05359 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); 05360 } 05361 if ((yyvsp[(4) - (4)].val)) { 05362 if ((yyval.val)) { 05363 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); 05364 } 05365 else { 05366 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); 05367 } 05368 } 05369 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05370 #endif 05371 (yyval.val) = dispatch4(bodystmt, 05372 escape_Qundef((yyvsp[(1) - (4)].val)), 05373 escape_Qundef((yyvsp[(2) - (4)].val)), 05374 escape_Qundef((yyvsp[(3) - (4)].val)), 05375 escape_Qundef((yyvsp[(4) - (4)].val))); 05376 05377 } 05378 break; 05379 05380 case 13: 05381 05382 /* Line 1806 of yacc.c */ 05383 #line 982 "ripper.y" 05384 { 05385 #if 0 05386 void_stmts((yyvsp[(1) - (2)].val)); 05387 fixup_nodes(&deferred_nodes); 05388 #endif 05389 05390 (yyval.val) = (yyvsp[(1) - (2)].val); 05391 } 05392 break; 05393 05394 case 14: 05395 05396 /* Line 1806 of yacc.c */ 05397 #line 993 "ripper.y" 05398 { 05399 #if 0 05400 (yyval.val) = NEW_BEGIN(0); 05401 #endif 05402 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05403 dispatch0(void_stmt)); 05404 05405 } 05406 break; 05407 05408 case 15: 05409 05410 /* Line 1806 of yacc.c */ 05411 #line 1002 "ripper.y" 05412 { 05413 #if 0 05414 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05415 #endif 05416 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05417 05418 } 05419 break; 05420 05421 case 16: 05422 05423 /* Line 1806 of yacc.c */ 05424 #line 1010 "ripper.y" 05425 { 05426 #if 0 05427 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05428 #endif 05429 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05430 05431 } 05432 break; 05433 05434 case 17: 05435 05436 /* Line 1806 of yacc.c */ 05437 #line 1018 "ripper.y" 05438 { 05439 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05440 } 05441 break; 05442 05443 case 18: 05444 05445 /* Line 1806 of yacc.c */ 05446 #line 1024 "ripper.y" 05447 { 05448 (yyval.val) = (yyvsp[(1) - (1)].val); 05449 } 05450 break; 05451 05452 case 19: 05453 05454 /* Line 1806 of yacc.c */ 05455 #line 1028 "ripper.y" 05456 { 05457 yyerror("BEGIN is permitted only at toplevel"); 05458 #if 0 05459 /* local_push(0); */ 05460 #endif 05461 05462 } 05463 break; 05464 05465 case 20: 05466 05467 /* Line 1806 of yacc.c */ 05468 #line 1036 "ripper.y" 05469 { 05470 #if 0 05471 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05472 (yyvsp[(4) - (5)].val)); 05473 /* NEW_PREEXE($4)); */ 05474 /* local_pop(); */ 05475 (yyval.val) = NEW_BEGIN(0); 05476 #endif 05477 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05478 05479 } 05480 break; 05481 05482 case 21: 05483 05484 /* Line 1806 of yacc.c */ 05485 #line 1048 "ripper.y" 05486 {lex_state = EXPR_FNAME;} 05487 break; 05488 05489 case 22: 05490 05491 /* Line 1806 of yacc.c */ 05492 #line 1049 "ripper.y" 05493 { 05494 #if 0 05495 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05496 #endif 05497 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05498 05499 } 05500 break; 05501 05502 case 23: 05503 05504 /* Line 1806 of yacc.c */ 05505 #line 1057 "ripper.y" 05506 { 05507 #if 0 05508 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05509 #endif 05510 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05511 05512 } 05513 break; 05514 05515 case 24: 05516 05517 /* Line 1806 of yacc.c */ 05518 #line 1065 "ripper.y" 05519 { 05520 #if 0 05521 char buf[2]; 05522 buf[0] = '$'; 05523 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth; 05524 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2)); 05525 #endif 05526 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05527 05528 } 05529 break; 05530 05531 case 25: 05532 05533 /* Line 1806 of yacc.c */ 05534 #line 1076 "ripper.y" 05535 { 05536 #if 0 05537 yyerror("can't make alias for the number variables"); 05538 (yyval.val) = NEW_BEGIN(0); 05539 #endif 05540 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05541 (yyval.val) = dispatch1(alias_error, (yyval.val)); 05542 05543 } 05544 break; 05545 05546 case 26: 05547 05548 /* Line 1806 of yacc.c */ 05549 #line 1086 "ripper.y" 05550 { 05551 #if 0 05552 (yyval.val) = (yyvsp[(2) - (2)].val); 05553 #endif 05554 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); 05555 05556 } 05557 break; 05558 05559 case 27: 05560 05561 /* Line 1806 of yacc.c */ 05562 #line 1094 "ripper.y" 05563 { 05564 #if 0 05565 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05566 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05567 #endif 05568 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05569 05570 } 05571 break; 05572 05573 case 28: 05574 05575 /* Line 1806 of yacc.c */ 05576 #line 1103 "ripper.y" 05577 { 05578 #if 0 05579 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05580 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05581 #endif 05582 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05583 05584 } 05585 break; 05586 05587 case 29: 05588 05589 /* Line 1806 of yacc.c */ 05590 #line 1112 "ripper.y" 05591 { 05592 #if 0 05593 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05594 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05595 } 05596 else { 05597 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05598 } 05599 #endif 05600 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05601 05602 } 05603 break; 05604 05605 case 30: 05606 05607 /* Line 1806 of yacc.c */ 05608 #line 1125 "ripper.y" 05609 { 05610 #if 0 05611 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05612 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05613 } 05614 else { 05615 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05616 } 05617 #endif 05618 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05619 05620 } 05621 break; 05622 05623 case 31: 05624 05625 /* Line 1806 of yacc.c */ 05626 #line 1138 "ripper.y" 05627 { 05628 #if 0 05629 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); 05630 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); 05631 #endif 05632 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05633 05634 } 05635 break; 05636 05637 case 32: 05638 05639 /* Line 1806 of yacc.c */ 05640 #line 1147 "ripper.y" 05641 { 05642 if (in_def || in_single) { 05643 rb_warn0("END in method; use at_exit"); 05644 } 05645 #if 0 05646 (yyval.val) = NEW_POSTEXE(NEW_NODE( 05647 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); 05648 #endif 05649 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); 05650 05651 } 05652 break; 05653 05654 case 34: 05655 05656 /* Line 1806 of yacc.c */ 05657 #line 1160 "ripper.y" 05658 { 05659 #if 0 05660 value_expr((yyvsp[(3) - (3)].val)); 05661 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05662 (yyval.val) = (yyvsp[(1) - (3)].val); 05663 #endif 05664 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05665 05666 } 05667 break; 05668 05669 case 35: 05670 05671 /* Line 1806 of yacc.c */ 05672 #line 1170 "ripper.y" 05673 { 05674 value_expr((yyvsp[(3) - (3)].val)); 05675 (yyval.val) = new_op_assign((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05676 } 05677 break; 05678 05679 case 36: 05680 05681 /* Line 1806 of yacc.c */ 05682 #line 1175 "ripper.y" 05683 { 05684 #if 0 05685 NODE *args; 05686 05687 value_expr((yyvsp[(6) - (6)].val)); 05688 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 05689 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 05690 if ((yyvsp[(5) - (6)].val) == tOROP) { 05691 (yyvsp[(5) - (6)].val) = 0; 05692 } 05693 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 05694 (yyvsp[(5) - (6)].val) = 1; 05695 } 05696 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 05697 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 05698 #endif 05699 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 05700 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 05701 05702 } 05703 break; 05704 05705 case 37: 05706 05707 /* Line 1806 of yacc.c */ 05708 #line 1196 "ripper.y" 05709 { 05710 value_expr((yyvsp[(5) - (5)].val)); 05711 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05712 } 05713 break; 05714 05715 case 38: 05716 05717 /* Line 1806 of yacc.c */ 05718 #line 1201 "ripper.y" 05719 { 05720 value_expr((yyvsp[(5) - (5)].val)); 05721 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05722 } 05723 break; 05724 05725 case 39: 05726 05727 /* Line 1806 of yacc.c */ 05728 #line 1206 "ripper.y" 05729 { 05730 #if 0 05731 (yyval.val) = NEW_COLON2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05732 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05733 #endif 05734 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05735 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05736 05737 } 05738 break; 05739 05740 case 40: 05741 05742 /* Line 1806 of yacc.c */ 05743 #line 1216 "ripper.y" 05744 { 05745 value_expr((yyvsp[(5) - (5)].val)); 05746 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05747 } 05748 break; 05749 05750 case 41: 05751 05752 /* Line 1806 of yacc.c */ 05753 #line 1221 "ripper.y" 05754 { 05755 #if 0 05756 rb_backref_error((yyvsp[(1) - (3)].val)); 05757 (yyval.val) = NEW_BEGIN(0); 05758 #endif 05759 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 05760 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05761 05762 } 05763 break; 05764 05765 case 42: 05766 05767 /* Line 1806 of yacc.c */ 05768 #line 1231 "ripper.y" 05769 { 05770 #if 0 05771 value_expr((yyvsp[(3) - (3)].val)); 05772 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05773 #endif 05774 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05775 05776 } 05777 break; 05778 05779 case 43: 05780 05781 /* Line 1806 of yacc.c */ 05782 #line 1240 "ripper.y" 05783 { 05784 #if 0 05785 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05786 (yyval.val) = (yyvsp[(1) - (3)].val); 05787 #endif 05788 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05789 05790 } 05791 break; 05792 05793 case 44: 05794 05795 /* Line 1806 of yacc.c */ 05796 #line 1249 "ripper.y" 05797 { 05798 #if 0 05799 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05800 (yyval.val) = (yyvsp[(1) - (3)].val); 05801 #endif 05802 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05803 05804 } 05805 break; 05806 05807 case 46: 05808 05809 /* Line 1806 of yacc.c */ 05810 #line 1261 "ripper.y" 05811 { 05812 #if 0 05813 value_expr((yyvsp[(3) - (3)].val)); 05814 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05815 #endif 05816 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05817 05818 } 05819 break; 05820 05821 case 47: 05822 05823 /* Line 1806 of yacc.c */ 05824 #line 1270 "ripper.y" 05825 { 05826 #if 0 05827 value_expr((yyvsp[(3) - (3)].val)); 05828 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05829 #endif 05830 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05831 05832 } 05833 break; 05834 05835 case 49: 05836 05837 /* Line 1806 of yacc.c */ 05838 #line 1283 "ripper.y" 05839 { 05840 #if 0 05841 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05842 #endif 05843 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); 05844 05845 } 05846 break; 05847 05848 case 50: 05849 05850 /* Line 1806 of yacc.c */ 05851 #line 1291 "ripper.y" 05852 { 05853 #if 0 05854 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05855 #endif 05856 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); 05857 05858 } 05859 break; 05860 05861 case 51: 05862 05863 /* Line 1806 of yacc.c */ 05864 #line 1299 "ripper.y" 05865 { 05866 #if 0 05867 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); 05868 #endif 05869 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); 05870 05871 } 05872 break; 05873 05874 case 52: 05875 05876 /* Line 1806 of yacc.c */ 05877 #line 1307 "ripper.y" 05878 { 05879 #if 0 05880 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 05881 #endif 05882 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); 05883 05884 } 05885 break; 05886 05887 case 54: 05888 05889 /* Line 1806 of yacc.c */ 05890 #line 1318 "ripper.y" 05891 { 05892 #if 0 05893 value_expr((yyvsp[(1) - (1)].val)); 05894 (yyval.val) = (yyvsp[(1) - (1)].val); 05895 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 05896 #endif 05897 (yyval.val) = (yyvsp[(1) - (1)].val); 05898 05899 } 05900 break; 05901 05902 case 58: 05903 05904 /* Line 1806 of yacc.c */ 05905 #line 1335 "ripper.y" 05906 { 05907 #if 0 05908 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05909 #endif 05910 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05911 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05912 05913 } 05914 break; 05915 05916 case 59: 05917 05918 /* Line 1806 of yacc.c */ 05919 #line 1346 "ripper.y" 05920 { 05921 (yyvsp[(1) - (1)].vars) = dyna_push(); 05922 #if 0 05923 (yyval.num) = ruby_sourceline; 05924 #endif 05925 05926 } 05927 break; 05928 05929 case 60: 05930 05931 /* Line 1806 of yacc.c */ 05932 #line 1356 "ripper.y" 05933 { 05934 #if 0 05935 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 05936 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 05937 #endif 05938 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 05939 05940 dyna_pop((yyvsp[(1) - (5)].vars)); 05941 } 05942 break; 05943 05944 case 61: 05945 05946 /* Line 1806 of yacc.c */ 05947 #line 1368 "ripper.y" 05948 { 05949 #if 0 05950 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 05951 nd_set_line((yyval.val), tokline); 05952 #endif 05953 05954 } 05955 break; 05956 05957 case 62: 05958 05959 /* Line 1806 of yacc.c */ 05960 #line 1378 "ripper.y" 05961 { 05962 #if 0 05963 (yyval.val) = (yyvsp[(1) - (2)].val); 05964 (yyval.val)->nd_args = (yyvsp[(2) - (2)].val); 05965 #endif 05966 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05967 05968 } 05969 break; 05970 05971 case 63: 05972 05973 /* Line 1806 of yacc.c */ 05974 #line 1387 "ripper.y" 05975 { 05976 #if 0 05977 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); 05978 (yyvsp[(1) - (3)].val)->nd_args = (yyvsp[(2) - (3)].val); 05979 (yyvsp[(3) - (3)].val)->nd_iter = (yyvsp[(1) - (3)].val); 05980 (yyval.val) = (yyvsp[(3) - (3)].val); 05981 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 05982 #endif 05983 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05984 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); 05985 05986 } 05987 break; 05988 05989 case 64: 05990 05991 /* Line 1806 of yacc.c */ 05992 #line 1400 "ripper.y" 05993 { 05994 #if 0 05995 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05996 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05997 #endif 05998 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05999 06000 } 06001 break; 06002 06003 case 65: 06004 06005 /* Line 1806 of yacc.c */ 06006 #line 1409 "ripper.y" 06007 { 06008 #if 0 06009 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 06010 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06011 (yyval.val) = (yyvsp[(5) - (5)].val); 06012 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06013 #endif 06014 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06015 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 06016 06017 } 06018 break; 06019 06020 case 66: 06021 06022 /* Line 1806 of yacc.c */ 06023 #line 1421 "ripper.y" 06024 { 06025 #if 0 06026 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06027 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 06028 #endif 06029 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06030 06031 } 06032 break; 06033 06034 case 67: 06035 06036 /* Line 1806 of yacc.c */ 06037 #line 1430 "ripper.y" 06038 { 06039 #if 0 06040 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 06041 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06042 (yyval.val) = (yyvsp[(5) - (5)].val); 06043 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06044 #endif 06045 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 06046 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 06047 06048 } 06049 break; 06050 06051 case 68: 06052 06053 /* Line 1806 of yacc.c */ 06054 #line 1442 "ripper.y" 06055 { 06056 #if 0 06057 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 06058 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 06059 #endif 06060 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 06061 06062 } 06063 break; 06064 06065 case 69: 06066 06067 /* Line 1806 of yacc.c */ 06068 #line 1451 "ripper.y" 06069 { 06070 #if 0 06071 (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); 06072 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 06073 #endif 06074 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); 06075 06076 } 06077 break; 06078 06079 case 70: 06080 06081 /* Line 1806 of yacc.c */ 06082 #line 1460 "ripper.y" 06083 { 06084 #if 0 06085 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); 06086 #endif 06087 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); 06088 06089 } 06090 break; 06091 06092 case 71: 06093 06094 /* Line 1806 of yacc.c */ 06095 #line 1468 "ripper.y" 06096 { 06097 #if 0 06098 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); 06099 #endif 06100 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); 06101 06102 } 06103 break; 06104 06105 case 72: 06106 06107 /* Line 1806 of yacc.c */ 06108 #line 1476 "ripper.y" 06109 { 06110 #if 0 06111 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); 06112 #endif 06113 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); 06114 06115 } 06116 break; 06117 06118 case 74: 06119 06120 /* Line 1806 of yacc.c */ 06121 #line 1487 "ripper.y" 06122 { 06123 #if 0 06124 (yyval.val) = (yyvsp[(2) - (3)].val); 06125 #endif 06126 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06127 06128 } 06129 break; 06130 06131 case 76: 06132 06133 /* Line 1806 of yacc.c */ 06134 #line 1498 "ripper.y" 06135 { 06136 #if 0 06137 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); 06138 #endif 06139 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06140 06141 } 06142 break; 06143 06144 case 77: 06145 06146 /* Line 1806 of yacc.c */ 06147 #line 1508 "ripper.y" 06148 { 06149 #if 0 06150 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 06151 #endif 06152 (yyval.val) = (yyvsp[(1) - (1)].val); 06153 06154 } 06155 break; 06156 06157 case 78: 06158 06159 /* Line 1806 of yacc.c */ 06160 #line 1516 "ripper.y" 06161 { 06162 #if 0 06163 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); 06164 #endif 06165 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 06166 06167 } 06168 break; 06169 06170 case 79: 06171 06172 /* Line 1806 of yacc.c */ 06173 #line 1524 "ripper.y" 06174 { 06175 #if 0 06176 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06177 #endif 06178 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06179 06180 } 06181 break; 06182 06183 case 80: 06184 06185 /* Line 1806 of yacc.c */ 06186 #line 1532 "ripper.y" 06187 { 06188 #if 0 06189 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); 06190 #endif 06191 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06192 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 06193 06194 } 06195 break; 06196 06197 case 81: 06198 06199 /* Line 1806 of yacc.c */ 06200 #line 1541 "ripper.y" 06201 { 06202 #if 0 06203 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); 06204 #endif 06205 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); 06206 06207 } 06208 break; 06209 06210 case 82: 06211 06212 /* Line 1806 of yacc.c */ 06213 #line 1549 "ripper.y" 06214 { 06215 #if 0 06216 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); 06217 #endif 06218 (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); 06219 (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06220 06221 } 06222 break; 06223 06224 case 83: 06225 06226 /* Line 1806 of yacc.c */ 06227 #line 1558 "ripper.y" 06228 { 06229 #if 0 06230 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); 06231 #endif 06232 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); 06233 06234 } 06235 break; 06236 06237 case 84: 06238 06239 /* Line 1806 of yacc.c */ 06240 #line 1566 "ripper.y" 06241 { 06242 #if 0 06243 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); 06244 #endif 06245 (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); 06246 (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 06247 06248 } 06249 break; 06250 06251 case 85: 06252 06253 /* Line 1806 of yacc.c */ 06254 #line 1575 "ripper.y" 06255 { 06256 #if 0 06257 (yyval.val) = NEW_MASGN(0, -1); 06258 #endif 06259 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06260 06261 } 06262 break; 06263 06264 case 86: 06265 06266 /* Line 1806 of yacc.c */ 06267 #line 1583 "ripper.y" 06268 { 06269 #if 0 06270 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 06271 #endif 06272 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06273 (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val)); 06274 06275 } 06276 break; 06277 06278 case 88: 06279 06280 /* Line 1806 of yacc.c */ 06281 #line 1595 "ripper.y" 06282 { 06283 #if 0 06284 (yyval.val) = (yyvsp[(2) - (3)].val); 06285 #endif 06286 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06287 06288 } 06289 break; 06290 06291 case 89: 06292 06293 /* Line 1806 of yacc.c */ 06294 #line 1605 "ripper.y" 06295 { 06296 #if 0 06297 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); 06298 #endif 06299 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); 06300 06301 } 06302 break; 06303 06304 case 90: 06305 06306 /* Line 1806 of yacc.c */ 06307 #line 1613 "ripper.y" 06308 { 06309 #if 0 06310 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06311 #endif 06312 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06313 06314 } 06315 break; 06316 06317 case 91: 06318 06319 /* Line 1806 of yacc.c */ 06320 #line 1623 "ripper.y" 06321 { 06322 #if 0 06323 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 06324 #endif 06325 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 06326 06327 } 06328 break; 06329 06330 case 92: 06331 06332 /* Line 1806 of yacc.c */ 06333 #line 1631 "ripper.y" 06334 { 06335 #if 0 06336 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06337 #endif 06338 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06339 06340 } 06341 break; 06342 06343 case 93: 06344 06345 /* Line 1806 of yacc.c */ 06346 #line 1641 "ripper.y" 06347 { 06348 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06349 } 06350 break; 06351 06352 case 94: 06353 06354 /* Line 1806 of yacc.c */ 06355 #line 1645 "ripper.y" 06356 { 06357 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06358 } 06359 break; 06360 06361 case 95: 06362 06363 /* Line 1806 of yacc.c */ 06364 #line 1649 "ripper.y" 06365 { 06366 #if 0 06367 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06368 #endif 06369 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06370 06371 } 06372 break; 06373 06374 case 96: 06375 06376 /* Line 1806 of yacc.c */ 06377 #line 1657 "ripper.y" 06378 { 06379 #if 0 06380 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06381 #endif 06382 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06383 06384 } 06385 break; 06386 06387 case 97: 06388 06389 /* Line 1806 of yacc.c */ 06390 #line 1665 "ripper.y" 06391 { 06392 #if 0 06393 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06394 #endif 06395 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06396 06397 } 06398 break; 06399 06400 case 98: 06401 06402 /* Line 1806 of yacc.c */ 06403 #line 1673 "ripper.y" 06404 { 06405 #if 0 06406 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06407 #endif 06408 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06409 06410 } 06411 break; 06412 06413 case 99: 06414 06415 /* Line 1806 of yacc.c */ 06416 #line 1681 "ripper.y" 06417 { 06418 #if 0 06419 if (in_def || in_single) 06420 yyerror("dynamic constant assignment"); 06421 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06422 #endif 06423 if (in_def || in_single) 06424 yyerror("dynamic constant assignment"); 06425 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06426 06427 } 06428 break; 06429 06430 case 100: 06431 06432 /* Line 1806 of yacc.c */ 06433 #line 1693 "ripper.y" 06434 { 06435 #if 0 06436 if (in_def || in_single) 06437 yyerror("dynamic constant assignment"); 06438 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06439 #endif 06440 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06441 06442 } 06443 break; 06444 06445 case 101: 06446 06447 /* Line 1806 of yacc.c */ 06448 #line 1703 "ripper.y" 06449 { 06450 #if 0 06451 rb_backref_error((yyvsp[(1) - (1)].val)); 06452 (yyval.val) = NEW_BEGIN(0); 06453 #endif 06454 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); 06455 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06456 06457 } 06458 break; 06459 06460 case 102: 06461 06462 /* Line 1806 of yacc.c */ 06463 #line 1715 "ripper.y" 06464 { 06465 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06466 #if 0 06467 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06468 #endif 06469 (yyval.val) = dispatch1(var_field, (yyval.val)); 06470 06471 } 06472 break; 06473 06474 case 103: 06475 06476 /* Line 1806 of yacc.c */ 06477 #line 1724 "ripper.y" 06478 { 06479 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06480 #if 0 06481 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06482 #endif 06483 (yyval.val) = dispatch1(var_field, (yyval.val)); 06484 06485 } 06486 break; 06487 06488 case 104: 06489 06490 /* Line 1806 of yacc.c */ 06491 #line 1733 "ripper.y" 06492 { 06493 #if 0 06494 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06495 #endif 06496 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06497 06498 } 06499 break; 06500 06501 case 105: 06502 06503 /* Line 1806 of yacc.c */ 06504 #line 1741 "ripper.y" 06505 { 06506 #if 0 06507 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06508 #endif 06509 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06510 06511 } 06512 break; 06513 06514 case 106: 06515 06516 /* Line 1806 of yacc.c */ 06517 #line 1749 "ripper.y" 06518 { 06519 #if 0 06520 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06521 #endif 06522 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 06523 06524 } 06525 break; 06526 06527 case 107: 06528 06529 /* Line 1806 of yacc.c */ 06530 #line 1757 "ripper.y" 06531 { 06532 #if 0 06533 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06534 #endif 06535 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06536 06537 } 06538 break; 06539 06540 case 108: 06541 06542 /* Line 1806 of yacc.c */ 06543 #line 1765 "ripper.y" 06544 { 06545 #if 0 06546 if (in_def || in_single) 06547 yyerror("dynamic constant assignment"); 06548 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06549 #endif 06550 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06551 if (in_def || in_single) { 06552 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06553 } 06554 06555 } 06556 break; 06557 06558 case 109: 06559 06560 /* Line 1806 of yacc.c */ 06561 #line 1778 "ripper.y" 06562 { 06563 #if 0 06564 if (in_def || in_single) 06565 yyerror("dynamic constant assignment"); 06566 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06567 #endif 06568 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06569 if (in_def || in_single) { 06570 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06571 } 06572 06573 } 06574 break; 06575 06576 case 110: 06577 06578 /* Line 1806 of yacc.c */ 06579 #line 1791 "ripper.y" 06580 { 06581 #if 0 06582 rb_backref_error((yyvsp[(1) - (1)].val)); 06583 (yyval.val) = NEW_BEGIN(0); 06584 #endif 06585 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); 06586 06587 } 06588 break; 06589 06590 case 111: 06591 06592 /* Line 1806 of yacc.c */ 06593 #line 1802 "ripper.y" 06594 { 06595 #if 0 06596 yyerror("class/module name must be CONSTANT"); 06597 #endif 06598 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); 06599 06600 } 06601 break; 06602 06603 case 113: 06604 06605 /* Line 1806 of yacc.c */ 06606 #line 1813 "ripper.y" 06607 { 06608 #if 0 06609 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 06610 #endif 06611 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 06612 06613 } 06614 break; 06615 06616 case 114: 06617 06618 /* Line 1806 of yacc.c */ 06619 #line 1821 "ripper.y" 06620 { 06621 #if 0 06622 (yyval.val) = NEW_COLON2(0, (yyval.val)); 06623 #endif 06624 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); 06625 06626 } 06627 break; 06628 06629 case 115: 06630 06631 /* Line 1806 of yacc.c */ 06632 #line 1829 "ripper.y" 06633 { 06634 #if 0 06635 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06636 #endif 06637 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06638 06639 } 06640 break; 06641 06642 case 119: 06643 06644 /* Line 1806 of yacc.c */ 06645 #line 1842 "ripper.y" 06646 { 06647 lex_state = EXPR_ENDFN; 06648 (yyval.val) = (yyvsp[(1) - (1)].val); 06649 } 06650 break; 06651 06652 case 120: 06653 06654 /* Line 1806 of yacc.c */ 06655 #line 1847 "ripper.y" 06656 { 06657 lex_state = EXPR_ENDFN; 06658 #if 0 06659 (yyval.val) = (yyvsp[(1) - (1)].id); 06660 #endif 06661 (yyval.val) = (yyvsp[(1) - (1)].val); 06662 06663 } 06664 break; 06665 06666 case 123: 06667 06668 /* Line 1806 of yacc.c */ 06669 #line 1862 "ripper.y" 06670 { 06671 #if 0 06672 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 06673 #endif 06674 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 06675 06676 } 06677 break; 06678 06679 case 125: 06680 06681 /* Line 1806 of yacc.c */ 06682 #line 1873 "ripper.y" 06683 { 06684 #if 0 06685 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); 06686 #endif 06687 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 06688 06689 } 06690 break; 06691 06692 case 126: 06693 06694 /* Line 1806 of yacc.c */ 06695 #line 1880 "ripper.y" 06696 {lex_state = EXPR_FNAME;} 06697 break; 06698 06699 case 127: 06700 06701 /* Line 1806 of yacc.c */ 06702 #line 1881 "ripper.y" 06703 { 06704 #if 0 06705 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); 06706 #endif 06707 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06708 06709 } 06710 break; 06711 06712 case 128: 06713 06714 /* Line 1806 of yacc.c */ 06715 #line 1890 "ripper.y" 06716 { ifndef_ripper((yyval.val) = '|'); } 06717 break; 06718 06719 case 129: 06720 06721 /* Line 1806 of yacc.c */ 06722 #line 1891 "ripper.y" 06723 { ifndef_ripper((yyval.val) = '^'); } 06724 break; 06725 06726 case 130: 06727 06728 /* Line 1806 of yacc.c */ 06729 #line 1892 "ripper.y" 06730 { ifndef_ripper((yyval.val) = '&'); } 06731 break; 06732 06733 case 131: 06734 06735 /* Line 1806 of yacc.c */ 06736 #line 1893 "ripper.y" 06737 { ifndef_ripper((yyval.val) = tCMP); } 06738 break; 06739 06740 case 132: 06741 06742 /* Line 1806 of yacc.c */ 06743 #line 1894 "ripper.y" 06744 { ifndef_ripper((yyval.val) = tEQ); } 06745 break; 06746 06747 case 133: 06748 06749 /* Line 1806 of yacc.c */ 06750 #line 1895 "ripper.y" 06751 { ifndef_ripper((yyval.val) = tEQQ); } 06752 break; 06753 06754 case 134: 06755 06756 /* Line 1806 of yacc.c */ 06757 #line 1896 "ripper.y" 06758 { ifndef_ripper((yyval.val) = tMATCH); } 06759 break; 06760 06761 case 135: 06762 06763 /* Line 1806 of yacc.c */ 06764 #line 1897 "ripper.y" 06765 { ifndef_ripper((yyval.val) = tNMATCH); } 06766 break; 06767 06768 case 136: 06769 06770 /* Line 1806 of yacc.c */ 06771 #line 1898 "ripper.y" 06772 { ifndef_ripper((yyval.val) = '>'); } 06773 break; 06774 06775 case 137: 06776 06777 /* Line 1806 of yacc.c */ 06778 #line 1899 "ripper.y" 06779 { ifndef_ripper((yyval.val) = tGEQ); } 06780 break; 06781 06782 case 138: 06783 06784 /* Line 1806 of yacc.c */ 06785 #line 1900 "ripper.y" 06786 { ifndef_ripper((yyval.val) = '<'); } 06787 break; 06788 06789 case 139: 06790 06791 /* Line 1806 of yacc.c */ 06792 #line 1901 "ripper.y" 06793 { ifndef_ripper((yyval.val) = tLEQ); } 06794 break; 06795 06796 case 140: 06797 06798 /* Line 1806 of yacc.c */ 06799 #line 1902 "ripper.y" 06800 { ifndef_ripper((yyval.val) = tNEQ); } 06801 break; 06802 06803 case 141: 06804 06805 /* Line 1806 of yacc.c */ 06806 #line 1903 "ripper.y" 06807 { ifndef_ripper((yyval.val) = tLSHFT); } 06808 break; 06809 06810 case 142: 06811 06812 /* Line 1806 of yacc.c */ 06813 #line 1904 "ripper.y" 06814 { ifndef_ripper((yyval.val) = tRSHFT); } 06815 break; 06816 06817 case 143: 06818 06819 /* Line 1806 of yacc.c */ 06820 #line 1905 "ripper.y" 06821 { ifndef_ripper((yyval.val) = '+'); } 06822 break; 06823 06824 case 144: 06825 06826 /* Line 1806 of yacc.c */ 06827 #line 1906 "ripper.y" 06828 { ifndef_ripper((yyval.val) = '-'); } 06829 break; 06830 06831 case 145: 06832 06833 /* Line 1806 of yacc.c */ 06834 #line 1907 "ripper.y" 06835 { ifndef_ripper((yyval.val) = '*'); } 06836 break; 06837 06838 case 146: 06839 06840 /* Line 1806 of yacc.c */ 06841 #line 1908 "ripper.y" 06842 { ifndef_ripper((yyval.val) = '*'); } 06843 break; 06844 06845 case 147: 06846 06847 /* Line 1806 of yacc.c */ 06848 #line 1909 "ripper.y" 06849 { ifndef_ripper((yyval.val) = '/'); } 06850 break; 06851 06852 case 148: 06853 06854 /* Line 1806 of yacc.c */ 06855 #line 1910 "ripper.y" 06856 { ifndef_ripper((yyval.val) = '%'); } 06857 break; 06858 06859 case 149: 06860 06861 /* Line 1806 of yacc.c */ 06862 #line 1911 "ripper.y" 06863 { ifndef_ripper((yyval.val) = tPOW); } 06864 break; 06865 06866 case 150: 06867 06868 /* Line 1806 of yacc.c */ 06869 #line 1912 "ripper.y" 06870 { ifndef_ripper((yyval.val) = tDSTAR); } 06871 break; 06872 06873 case 151: 06874 06875 /* Line 1806 of yacc.c */ 06876 #line 1913 "ripper.y" 06877 { ifndef_ripper((yyval.val) = '!'); } 06878 break; 06879 06880 case 152: 06881 06882 /* Line 1806 of yacc.c */ 06883 #line 1914 "ripper.y" 06884 { ifndef_ripper((yyval.val) = '~'); } 06885 break; 06886 06887 case 153: 06888 06889 /* Line 1806 of yacc.c */ 06890 #line 1915 "ripper.y" 06891 { ifndef_ripper((yyval.val) = tUPLUS); } 06892 break; 06893 06894 case 154: 06895 06896 /* Line 1806 of yacc.c */ 06897 #line 1916 "ripper.y" 06898 { ifndef_ripper((yyval.val) = tUMINUS); } 06899 break; 06900 06901 case 155: 06902 06903 /* Line 1806 of yacc.c */ 06904 #line 1917 "ripper.y" 06905 { ifndef_ripper((yyval.val) = tAREF); } 06906 break; 06907 06908 case 156: 06909 06910 /* Line 1806 of yacc.c */ 06911 #line 1918 "ripper.y" 06912 { ifndef_ripper((yyval.val) = tASET); } 06913 break; 06914 06915 case 157: 06916 06917 /* Line 1806 of yacc.c */ 06918 #line 1919 "ripper.y" 06919 { ifndef_ripper((yyval.val) = '`'); } 06920 break; 06921 06922 case 199: 06923 06924 /* Line 1806 of yacc.c */ 06925 #line 1937 "ripper.y" 06926 { 06927 #if 0 06928 value_expr((yyvsp[(3) - (3)].val)); 06929 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06930 #endif 06931 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06932 06933 } 06934 break; 06935 06936 case 200: 06937 06938 /* Line 1806 of yacc.c */ 06939 #line 1946 "ripper.y" 06940 { 06941 #if 0 06942 value_expr((yyvsp[(3) - (5)].val)); 06943 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06944 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06945 #endif 06946 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); 06947 06948 } 06949 break; 06950 06951 case 201: 06952 06953 /* Line 1806 of yacc.c */ 06954 #line 1956 "ripper.y" 06955 { 06956 value_expr((yyvsp[(3) - (3)].val)); 06957 (yyval.val) = new_op_assign((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06958 } 06959 break; 06960 06961 case 202: 06962 06963 /* Line 1806 of yacc.c */ 06964 #line 1961 "ripper.y" 06965 { 06966 #if 0 06967 value_expr((yyvsp[(3) - (5)].val)); 06968 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06969 #endif 06970 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 06971 06972 (yyval.val) = new_op_assign((yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); 06973 } 06974 break; 06975 06976 case 203: 06977 06978 /* Line 1806 of yacc.c */ 06979 #line 1971 "ripper.y" 06980 { 06981 #if 0 06982 NODE *args; 06983 06984 value_expr((yyvsp[(6) - (6)].val)); 06985 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 06986 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) { 06987 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06988 } 06989 else { 06990 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06991 } 06992 if ((yyvsp[(5) - (6)].val) == tOROP) { 06993 (yyvsp[(5) - (6)].val) = 0; 06994 } 06995 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 06996 (yyvsp[(5) - (6)].val) = 1; 06997 } 06998 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 06999 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07000 #endif 07001 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 07002 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 07003 07004 } 07005 break; 07006 07007 case 204: 07008 07009 /* Line 1806 of yacc.c */ 07010 #line 1997 "ripper.y" 07011 { 07012 value_expr((yyvsp[(5) - (5)].val)); 07013 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07014 } 07015 break; 07016 07017 case 205: 07018 07019 /* Line 1806 of yacc.c */ 07020 #line 2002 "ripper.y" 07021 { 07022 value_expr((yyvsp[(5) - (5)].val)); 07023 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07024 } 07025 break; 07026 07027 case 206: 07028 07029 /* Line 1806 of yacc.c */ 07030 #line 2007 "ripper.y" 07031 { 07032 value_expr((yyvsp[(5) - (5)].val)); 07033 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07034 } 07035 break; 07036 07037 case 207: 07038 07039 /* Line 1806 of yacc.c */ 07040 #line 2012 "ripper.y" 07041 { 07042 #if 0 07043 (yyval.val) = NEW_COLON2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 07044 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07045 #endif 07046 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 07047 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 07048 07049 } 07050 break; 07051 07052 case 208: 07053 07054 /* Line 1806 of yacc.c */ 07055 #line 2022 "ripper.y" 07056 { 07057 #if 0 07058 (yyval.val) = NEW_COLON3((yyvsp[(2) - (4)].val)); 07059 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 07060 #endif 07061 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); 07062 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 07063 07064 } 07065 break; 07066 07067 case 209: 07068 07069 /* Line 1806 of yacc.c */ 07070 #line 2032 "ripper.y" 07071 { 07072 #if 0 07073 rb_backref_error((yyvsp[(1) - (3)].val)); 07074 (yyval.val) = NEW_BEGIN(0); 07075 #endif 07076 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); 07077 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 07078 (yyval.val) = dispatch1(assign_error, (yyval.val)); 07079 07080 } 07081 break; 07082 07083 case 210: 07084 07085 /* Line 1806 of yacc.c */ 07086 #line 2043 "ripper.y" 07087 { 07088 #if 0 07089 value_expr((yyvsp[(1) - (3)].val)); 07090 value_expr((yyvsp[(3) - (3)].val)); 07091 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07092 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 07093 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 07094 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 07095 } 07096 #endif 07097 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07098 07099 } 07100 break; 07101 07102 case 211: 07103 07104 /* Line 1806 of yacc.c */ 07105 #line 2057 "ripper.y" 07106 { 07107 #if 0 07108 value_expr((yyvsp[(1) - (3)].val)); 07109 value_expr((yyvsp[(3) - (3)].val)); 07110 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07111 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 07112 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 07113 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 07114 } 07115 #endif 07116 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07117 07118 } 07119 break; 07120 07121 case 212: 07122 07123 /* Line 1806 of yacc.c */ 07124 #line 2071 "ripper.y" 07125 { 07126 #if 0 07127 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); 07128 #endif 07129 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); 07130 07131 } 07132 break; 07133 07134 case 213: 07135 07136 /* Line 1806 of yacc.c */ 07137 #line 2079 "ripper.y" 07138 { 07139 #if 0 07140 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); 07141 #endif 07142 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); 07143 07144 } 07145 break; 07146 07147 case 214: 07148 07149 /* Line 1806 of yacc.c */ 07150 #line 2087 "ripper.y" 07151 { 07152 #if 0 07153 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); 07154 #endif 07155 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); 07156 07157 } 07158 break; 07159 07160 case 215: 07161 07162 /* Line 1806 of yacc.c */ 07163 #line 2095 "ripper.y" 07164 { 07165 #if 0 07166 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); 07167 #endif 07168 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); 07169 07170 } 07171 break; 07172 07173 case 216: 07174 07175 /* Line 1806 of yacc.c */ 07176 #line 2103 "ripper.y" 07177 { 07178 #if 0 07179 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); 07180 #endif 07181 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); 07182 07183 } 07184 break; 07185 07186 case 217: 07187 07188 /* Line 1806 of yacc.c */ 07189 #line 2111 "ripper.y" 07190 { 07191 #if 0 07192 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); 07193 #endif 07194 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); 07195 07196 } 07197 break; 07198 07199 case 218: 07200 07201 /* Line 1806 of yacc.c */ 07202 #line 2119 "ripper.y" 07203 { 07204 #if 0 07205 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 07206 #endif 07207 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 07208 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07209 07210 } 07211 break; 07212 07213 case 219: 07214 07215 /* Line 1806 of yacc.c */ 07216 #line 2128 "ripper.y" 07217 { 07218 #if 0 07219 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 07220 #endif 07221 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 07222 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07223 07224 } 07225 break; 07226 07227 case 220: 07228 07229 /* Line 1806 of yacc.c */ 07230 #line 2137 "ripper.y" 07231 { 07232 #if 0 07233 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); 07234 #endif 07235 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); 07236 07237 } 07238 break; 07239 07240 case 221: 07241 07242 /* Line 1806 of yacc.c */ 07243 #line 2145 "ripper.y" 07244 { 07245 #if 0 07246 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); 07247 #endif 07248 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 07249 07250 } 07251 break; 07252 07253 case 222: 07254 07255 /* Line 1806 of yacc.c */ 07256 #line 2153 "ripper.y" 07257 { 07258 #if 0 07259 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); 07260 #endif 07261 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); 07262 07263 } 07264 break; 07265 07266 case 223: 07267 07268 /* Line 1806 of yacc.c */ 07269 #line 2161 "ripper.y" 07270 { 07271 #if 0 07272 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); 07273 #endif 07274 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); 07275 07276 } 07277 break; 07278 07279 case 224: 07280 07281 /* Line 1806 of yacc.c */ 07282 #line 2169 "ripper.y" 07283 { 07284 #if 0 07285 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); 07286 #endif 07287 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); 07288 07289 } 07290 break; 07291 07292 case 225: 07293 07294 /* Line 1806 of yacc.c */ 07295 #line 2177 "ripper.y" 07296 { 07297 #if 0 07298 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); 07299 #endif 07300 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); 07301 07302 } 07303 break; 07304 07305 case 226: 07306 07307 /* Line 1806 of yacc.c */ 07308 #line 2185 "ripper.y" 07309 { 07310 #if 0 07311 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); 07312 #endif 07313 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); 07314 07315 } 07316 break; 07317 07318 case 227: 07319 07320 /* Line 1806 of yacc.c */ 07321 #line 2193 "ripper.y" 07322 { 07323 #if 0 07324 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); 07325 #endif 07326 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); 07327 07328 } 07329 break; 07330 07331 case 228: 07332 07333 /* Line 1806 of yacc.c */ 07334 #line 2201 "ripper.y" 07335 { 07336 #if 0 07337 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); 07338 #endif 07339 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); 07340 07341 } 07342 break; 07343 07344 case 229: 07345 07346 /* Line 1806 of yacc.c */ 07347 #line 2209 "ripper.y" 07348 { 07349 #if 0 07350 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); 07351 #endif 07352 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); 07353 07354 } 07355 break; 07356 07357 case 230: 07358 07359 /* Line 1806 of yacc.c */ 07360 #line 2217 "ripper.y" 07361 { 07362 #if 0 07363 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); 07364 #endif 07365 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); 07366 07367 } 07368 break; 07369 07370 case 231: 07371 07372 /* Line 1806 of yacc.c */ 07373 #line 2225 "ripper.y" 07374 { 07375 #if 0 07376 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); 07377 #endif 07378 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); 07379 07380 } 07381 break; 07382 07383 case 232: 07384 07385 /* Line 1806 of yacc.c */ 07386 #line 2233 "ripper.y" 07387 { 07388 #if 0 07389 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); 07390 #endif 07391 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); 07392 07393 } 07394 break; 07395 07396 case 233: 07397 07398 /* Line 1806 of yacc.c */ 07399 #line 2241 "ripper.y" 07400 { 07401 #if 0 07402 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07403 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && RB_TYPE_P((yyvsp[(1) - (3)].val)->nd_lit, T_REGEXP)) { 07404 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); 07405 } 07406 #endif 07407 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); 07408 07409 } 07410 break; 07411 07412 case 234: 07413 07414 /* Line 1806 of yacc.c */ 07415 #line 2252 "ripper.y" 07416 { 07417 #if 0 07418 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); 07419 #endif 07420 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); 07421 07422 } 07423 break; 07424 07425 case 235: 07426 07427 /* Line 1806 of yacc.c */ 07428 #line 2260 "ripper.y" 07429 { 07430 #if 0 07431 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 07432 #endif 07433 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); 07434 07435 } 07436 break; 07437 07438 case 236: 07439 07440 /* Line 1806 of yacc.c */ 07441 #line 2268 "ripper.y" 07442 { 07443 #if 0 07444 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); 07445 #endif 07446 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); 07447 07448 } 07449 break; 07450 07451 case 237: 07452 07453 /* Line 1806 of yacc.c */ 07454 #line 2276 "ripper.y" 07455 { 07456 #if 0 07457 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); 07458 #endif 07459 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); 07460 07461 } 07462 break; 07463 07464 case 238: 07465 07466 /* Line 1806 of yacc.c */ 07467 #line 2284 "ripper.y" 07468 { 07469 #if 0 07470 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); 07471 #endif 07472 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); 07473 07474 } 07475 break; 07476 07477 case 239: 07478 07479 /* Line 1806 of yacc.c */ 07480 #line 2292 "ripper.y" 07481 { 07482 #if 0 07483 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07484 #endif 07485 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); 07486 07487 } 07488 break; 07489 07490 case 240: 07491 07492 /* Line 1806 of yacc.c */ 07493 #line 2300 "ripper.y" 07494 { 07495 #if 0 07496 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07497 #endif 07498 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); 07499 07500 } 07501 break; 07502 07503 case 241: 07504 07505 /* Line 1806 of yacc.c */ 07506 #line 2307 "ripper.y" 07507 {in_defined = 1;} 07508 break; 07509 07510 case 242: 07511 07512 /* Line 1806 of yacc.c */ 07513 #line 2308 "ripper.y" 07514 { 07515 #if 0 07516 in_defined = 0; 07517 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); 07518 #endif 07519 in_defined = 0; 07520 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); 07521 07522 } 07523 break; 07524 07525 case 243: 07526 07527 /* Line 1806 of yacc.c */ 07528 #line 2318 "ripper.y" 07529 { 07530 #if 0 07531 value_expr((yyvsp[(1) - (6)].val)); 07532 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07533 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07534 #endif 07535 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07536 07537 } 07538 break; 07539 07540 case 244: 07541 07542 /* Line 1806 of yacc.c */ 07543 #line 2328 "ripper.y" 07544 { 07545 (yyval.val) = (yyvsp[(1) - (1)].val); 07546 } 07547 break; 07548 07549 case 245: 07550 07551 /* Line 1806 of yacc.c */ 07552 #line 2334 "ripper.y" 07553 { 07554 #if 0 07555 value_expr((yyvsp[(1) - (1)].val)); 07556 (yyval.val) = (yyvsp[(1) - (1)].val); 07557 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 07558 #endif 07559 (yyval.val) = (yyvsp[(1) - (1)].val); 07560 07561 } 07562 break; 07563 07564 case 247: 07565 07566 /* Line 1806 of yacc.c */ 07567 #line 2347 "ripper.y" 07568 { 07569 (yyval.val) = (yyvsp[(1) - (2)].val); 07570 } 07571 break; 07572 07573 case 248: 07574 07575 /* Line 1806 of yacc.c */ 07576 #line 2351 "ripper.y" 07577 { 07578 #if 0 07579 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07580 #endif 07581 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07582 07583 } 07584 break; 07585 07586 case 249: 07587 07588 /* Line 1806 of yacc.c */ 07589 #line 2359 "ripper.y" 07590 { 07591 #if 0 07592 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07593 #endif 07594 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07595 07596 } 07597 break; 07598 07599 case 250: 07600 07601 /* Line 1806 of yacc.c */ 07602 #line 2369 "ripper.y" 07603 { 07604 #if 0 07605 (yyval.val) = (yyvsp[(2) - (3)].val); 07606 #endif 07607 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); 07608 07609 } 07610 break; 07611 07612 case 255: 07613 07614 /* Line 1806 of yacc.c */ 07615 #line 2385 "ripper.y" 07616 { 07617 (yyval.val) = (yyvsp[(1) - (2)].val); 07618 } 07619 break; 07620 07621 case 256: 07622 07623 /* Line 1806 of yacc.c */ 07624 #line 2389 "ripper.y" 07625 { 07626 #if 0 07627 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07628 #endif 07629 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07630 07631 } 07632 break; 07633 07634 case 257: 07635 07636 /* Line 1806 of yacc.c */ 07637 #line 2397 "ripper.y" 07638 { 07639 #if 0 07640 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07641 #endif 07642 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07643 07644 } 07645 break; 07646 07647 case 258: 07648 07649 /* Line 1806 of yacc.c */ 07650 #line 2407 "ripper.y" 07651 { 07652 #if 0 07653 value_expr((yyvsp[(1) - (1)].val)); 07654 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07655 #endif 07656 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07657 07658 } 07659 break; 07660 07661 case 259: 07662 07663 /* Line 1806 of yacc.c */ 07664 #line 2416 "ripper.y" 07665 { 07666 #if 0 07667 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07668 #endif 07669 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07670 07671 } 07672 break; 07673 07674 case 260: 07675 07676 /* Line 1806 of yacc.c */ 07677 #line 2424 "ripper.y" 07678 { 07679 #if 0 07680 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07681 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); 07682 #endif 07683 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07684 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); 07685 07686 } 07687 break; 07688 07689 case 261: 07690 07691 /* Line 1806 of yacc.c */ 07692 #line 2434 "ripper.y" 07693 { 07694 #if 0 07695 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07696 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); 07697 #endif 07698 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); 07699 07700 } 07701 break; 07702 07703 case 262: 07704 07705 /* Line 1806 of yacc.c */ 07706 #line 2445 "ripper.y" 07707 { 07708 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); 07709 } 07710 break; 07711 07712 case 263: 07713 07714 /* Line 1806 of yacc.c */ 07715 #line 2451 "ripper.y" 07716 { 07717 (yyval.val) = cmdarg_stack; 07718 CMDARG_PUSH(1); 07719 } 07720 break; 07721 07722 case 264: 07723 07724 /* Line 1806 of yacc.c */ 07725 #line 2456 "ripper.y" 07726 { 07727 /* CMDARG_POP() */ 07728 cmdarg_stack = (yyvsp[(1) - (2)].val); 07729 (yyval.val) = (yyvsp[(2) - (2)].val); 07730 } 07731 break; 07732 07733 case 265: 07734 07735 /* Line 1806 of yacc.c */ 07736 #line 2464 "ripper.y" 07737 { 07738 #if 0 07739 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); 07740 #endif 07741 (yyval.val) = (yyvsp[(2) - (2)].val); 07742 07743 } 07744 break; 07745 07746 case 266: 07747 07748 /* Line 1806 of yacc.c */ 07749 #line 2474 "ripper.y" 07750 { 07751 (yyval.val) = (yyvsp[(2) - (2)].val); 07752 } 07753 break; 07754 07755 case 267: 07756 07757 /* Line 1806 of yacc.c */ 07758 #line 2478 "ripper.y" 07759 { 07760 (yyval.val) = 0; 07761 } 07762 break; 07763 07764 case 268: 07765 07766 /* Line 1806 of yacc.c */ 07767 #line 2484 "ripper.y" 07768 { 07769 #if 0 07770 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07771 #endif 07772 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07773 07774 } 07775 break; 07776 07777 case 269: 07778 07779 /* Line 1806 of yacc.c */ 07780 #line 2492 "ripper.y" 07781 { 07782 #if 0 07783 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07784 #endif 07785 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); 07786 07787 } 07788 break; 07789 07790 case 270: 07791 07792 /* Line 1806 of yacc.c */ 07793 #line 2500 "ripper.y" 07794 { 07795 #if 0 07796 NODE *n1; 07797 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07798 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07799 } 07800 else { 07801 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07802 } 07803 #endif 07804 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07805 07806 } 07807 break; 07808 07809 case 271: 07810 07811 /* Line 1806 of yacc.c */ 07812 #line 2514 "ripper.y" 07813 { 07814 #if 0 07815 NODE *n1; 07816 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07817 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07818 } 07819 else { 07820 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07821 } 07822 #endif 07823 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07824 07825 } 07826 break; 07827 07828 case 272: 07829 07830 /* Line 1806 of yacc.c */ 07831 #line 2530 "ripper.y" 07832 { 07833 #if 0 07834 NODE *n1; 07835 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07836 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07837 } 07838 else { 07839 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07840 } 07841 #endif 07842 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 07843 07844 } 07845 break; 07846 07847 case 273: 07848 07849 /* Line 1806 of yacc.c */ 07850 #line 2544 "ripper.y" 07851 { 07852 #if 0 07853 NODE *n1; 07854 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && 07855 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07856 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07857 } 07858 else { 07859 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07860 } 07861 #endif 07862 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); 07863 07864 } 07865 break; 07866 07867 case 274: 07868 07869 /* Line 1806 of yacc.c */ 07870 #line 2559 "ripper.y" 07871 { 07872 #if 0 07873 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07874 #endif 07875 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); 07876 07877 } 07878 break; 07879 07880 case 285: 07881 07882 /* Line 1806 of yacc.c */ 07883 #line 2579 "ripper.y" 07884 { 07885 #if 0 07886 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 07887 #endif 07888 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); 07889 07890 } 07891 break; 07892 07893 case 286: 07894 07895 /* Line 1806 of yacc.c */ 07896 #line 2587 "ripper.y" 07897 { 07898 (yyvsp[(1) - (1)].val) = cmdarg_stack; 07899 cmdarg_stack = 0; 07900 #if 0 07901 (yyval.num) = ruby_sourceline; 07902 #endif 07903 07904 } 07905 break; 07906 07907 case 287: 07908 07909 /* Line 1806 of yacc.c */ 07910 #line 2597 "ripper.y" 07911 { 07912 cmdarg_stack = (yyvsp[(1) - (4)].val); 07913 #if 0 07914 if ((yyvsp[(3) - (4)].val) == NULL) { 07915 (yyval.val) = NEW_NIL(); 07916 } 07917 else { 07918 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || 07919 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) 07920 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); 07921 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); 07922 } 07923 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); 07924 #endif 07925 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); 07926 07927 } 07928 break; 07929 07930 case 288: 07931 07932 /* Line 1806 of yacc.c */ 07933 #line 2614 "ripper.y" 07934 {lex_state = EXPR_ENDARG;} 07935 break; 07936 07937 case 289: 07938 07939 /* Line 1806 of yacc.c */ 07940 #line 2615 "ripper.y" 07941 { 07942 #if 0 07943 (yyval.val) = 0; 07944 #endif 07945 (yyval.val) = dispatch1(paren, 0); 07946 07947 } 07948 break; 07949 07950 case 290: 07951 07952 /* Line 1806 of yacc.c */ 07953 #line 2622 "ripper.y" 07954 {lex_state = EXPR_ENDARG;} 07955 break; 07956 07957 case 291: 07958 07959 /* Line 1806 of yacc.c */ 07960 #line 2623 "ripper.y" 07961 { 07962 #if 0 07963 (yyval.val) = (yyvsp[(2) - (4)].val); 07964 #endif 07965 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 07966 07967 } 07968 break; 07969 07970 case 292: 07971 07972 /* Line 1806 of yacc.c */ 07973 #line 2631 "ripper.y" 07974 { 07975 #if 0 07976 (yyval.val) = (yyvsp[(2) - (3)].val); 07977 #endif 07978 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 07979 07980 } 07981 break; 07982 07983 case 293: 07984 07985 /* Line 1806 of yacc.c */ 07986 #line 2639 "ripper.y" 07987 { 07988 #if 0 07989 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07990 #endif 07991 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07992 07993 } 07994 break; 07995 07996 case 294: 07997 07998 /* Line 1806 of yacc.c */ 07999 #line 2647 "ripper.y" 08000 { 08001 #if 0 08002 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 08003 #endif 08004 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 08005 08006 } 08007 break; 08008 08009 case 295: 08010 08011 /* Line 1806 of yacc.c */ 08012 #line 2655 "ripper.y" 08013 { 08014 #if 0 08015 if ((yyvsp[(2) - (3)].val) == 0) { 08016 (yyval.val) = NEW_ZARRAY(); /* zero length array*/ 08017 } 08018 else { 08019 (yyval.val) = (yyvsp[(2) - (3)].val); 08020 } 08021 #endif 08022 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); 08023 08024 } 08025 break; 08026 08027 case 296: 08028 08029 /* Line 1806 of yacc.c */ 08030 #line 2668 "ripper.y" 08031 { 08032 #if 0 08033 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); 08034 #endif 08035 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); 08036 08037 } 08038 break; 08039 08040 case 297: 08041 08042 /* Line 1806 of yacc.c */ 08043 #line 2676 "ripper.y" 08044 { 08045 #if 0 08046 (yyval.val) = NEW_RETURN(0); 08047 #endif 08048 (yyval.val) = dispatch0(return0); 08049 08050 } 08051 break; 08052 08053 case 298: 08054 08055 /* Line 1806 of yacc.c */ 08056 #line 2684 "ripper.y" 08057 { 08058 #if 0 08059 (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); 08060 #endif 08061 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); 08062 08063 } 08064 break; 08065 08066 case 299: 08067 08068 /* Line 1806 of yacc.c */ 08069 #line 2692 "ripper.y" 08070 { 08071 #if 0 08072 (yyval.val) = NEW_YIELD(0); 08073 #endif 08074 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); 08075 08076 } 08077 break; 08078 08079 case 300: 08080 08081 /* Line 1806 of yacc.c */ 08082 #line 2700 "ripper.y" 08083 { 08084 #if 0 08085 (yyval.val) = NEW_YIELD(0); 08086 #endif 08087 (yyval.val) = dispatch0(yield0); 08088 08089 } 08090 break; 08091 08092 case 301: 08093 08094 /* Line 1806 of yacc.c */ 08095 #line 2707 "ripper.y" 08096 {in_defined = 1;} 08097 break; 08098 08099 case 302: 08100 08101 /* Line 1806 of yacc.c */ 08102 #line 2708 "ripper.y" 08103 { 08104 #if 0 08105 in_defined = 0; 08106 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); 08107 #endif 08108 in_defined = 0; 08109 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); 08110 08111 } 08112 break; 08113 08114 case 303: 08115 08116 /* Line 1806 of yacc.c */ 08117 #line 2718 "ripper.y" 08118 { 08119 #if 0 08120 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); 08121 #endif 08122 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); 08123 08124 } 08125 break; 08126 08127 case 304: 08128 08129 /* Line 1806 of yacc.c */ 08130 #line 2726 "ripper.y" 08131 { 08132 #if 0 08133 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); 08134 #endif 08135 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); 08136 08137 } 08138 break; 08139 08140 case 305: 08141 08142 /* Line 1806 of yacc.c */ 08143 #line 2734 "ripper.y" 08144 { 08145 #if 0 08146 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 08147 (yyval.val) = (yyvsp[(2) - (2)].val); 08148 #endif 08149 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); 08150 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); 08151 08152 } 08153 break; 08154 08155 case 307: 08156 08157 /* Line 1806 of yacc.c */ 08158 #line 2745 "ripper.y" 08159 { 08160 #if 0 08161 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 08162 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 08163 (yyval.val) = (yyvsp[(2) - (2)].val); 08164 #endif 08165 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08166 08167 } 08168 break; 08169 08170 case 308: 08171 08172 /* Line 1806 of yacc.c */ 08173 #line 2755 "ripper.y" 08174 { 08175 (yyval.val) = (yyvsp[(2) - (2)].val); 08176 } 08177 break; 08178 08179 case 309: 08180 08181 /* Line 1806 of yacc.c */ 08182 #line 2762 "ripper.y" 08183 { 08184 #if 0 08185 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08186 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 08187 #endif 08188 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 08189 08190 } 08191 break; 08192 08193 case 310: 08194 08195 /* Line 1806 of yacc.c */ 08196 #line 2774 "ripper.y" 08197 { 08198 #if 0 08199 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08200 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 08201 #endif 08202 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 08203 08204 } 08205 break; 08206 08207 case 311: 08208 08209 /* Line 1806 of yacc.c */ 08210 #line 2782 "ripper.y" 08211 {COND_PUSH(1);} 08212 break; 08213 08214 case 312: 08215 08216 /* Line 1806 of yacc.c */ 08217 #line 2782 "ripper.y" 08218 {COND_POP();} 08219 break; 08220 08221 case 313: 08222 08223 /* Line 1806 of yacc.c */ 08224 #line 2785 "ripper.y" 08225 { 08226 #if 0 08227 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 08228 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 08229 #endif 08230 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 08231 08232 } 08233 break; 08234 08235 case 314: 08236 08237 /* Line 1806 of yacc.c */ 08238 #line 2793 "ripper.y" 08239 {COND_PUSH(1);} 08240 break; 08241 08242 case 315: 08243 08244 /* Line 1806 of yacc.c */ 08245 #line 2793 "ripper.y" 08246 {COND_POP();} 08247 break; 08248 08249 case 316: 08250 08251 /* Line 1806 of yacc.c */ 08252 #line 2796 "ripper.y" 08253 { 08254 #if 0 08255 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 08256 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 08257 #endif 08258 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 08259 08260 } 08261 break; 08262 08263 case 317: 08264 08265 /* Line 1806 of yacc.c */ 08266 #line 2807 "ripper.y" 08267 { 08268 #if 0 08269 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08270 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08271 #endif 08272 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08273 08274 } 08275 break; 08276 08277 case 318: 08278 08279 /* Line 1806 of yacc.c */ 08280 #line 2816 "ripper.y" 08281 { 08282 #if 0 08283 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); 08284 #endif 08285 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); 08286 08287 } 08288 break; 08289 08290 case 319: 08291 08292 /* Line 1806 of yacc.c */ 08293 #line 2824 "ripper.y" 08294 {COND_PUSH(1);} 08295 break; 08296 08297 case 320: 08298 08299 /* Line 1806 of yacc.c */ 08300 #line 2826 "ripper.y" 08301 {COND_POP();} 08302 break; 08303 08304 case 321: 08305 08306 /* Line 1806 of yacc.c */ 08307 #line 2829 "ripper.y" 08308 { 08309 #if 0 08310 /* 08311 * for a, b, c in e 08312 * #=> 08313 * e.each{|*x| a, b, c = x 08314 * 08315 * for a in e 08316 * #=> 08317 * e.each{|x| a, = x} 08318 */ 08319 ID id = internal_id(); 08320 ID *tbl = ALLOC_N(ID, 2); 08321 NODE *m = NEW_ARGS_AUX(0, 0); 08322 NODE *args, *scope; 08323 08324 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { 08325 /* if args.length == 1 && args[0].kind_of?(Array) 08326 * args = args[0] 08327 * end 08328 */ 08329 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 08330 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 08331 m->nd_next = block_append( 08332 NEW_IF( 08333 NEW_NODE(NODE_AND, 08334 NEW_CALL(NEW_CALL(NEW_DVAR(id), idLength, 0), 08335 idEq, one), 08336 NEW_CALL(NEW_CALL(NEW_DVAR(id), idAREF, zero), 08337 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 08338 0), 08339 NEW_DASGN_CURR(id, 08340 NEW_CALL(NEW_DVAR(id), idAREF, zero)), 08341 0), 08342 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); 08343 08344 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 08345 } 08346 else { 08347 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || 08348 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || 08349 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { 08350 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); 08351 m->nd_plen = 1; 08352 m->nd_next = (yyvsp[(2) - (9)].val); 08353 args = new_args(m, 0, 0, 0, new_args_tail(0, 0, 0)); 08354 } 08355 else { 08356 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); 08357 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 08358 } 08359 } 08360 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); 08361 tbl[0] = 1; tbl[1] = id; 08362 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); 08363 fixpos((yyval.val), (yyvsp[(2) - (9)].val)); 08364 #endif 08365 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); 08366 08367 } 08368 break; 08369 08370 case 322: 08371 08372 /* Line 1806 of yacc.c */ 08373 #line 2890 "ripper.y" 08374 { 08375 if (in_def || in_single) 08376 yyerror("class definition in method body"); 08377 local_push(0); 08378 #if 0 08379 (yyval.num) = ruby_sourceline; 08380 #endif 08381 08382 } 08383 break; 08384 08385 case 323: 08386 08387 /* Line 1806 of yacc.c */ 08388 #line 2901 "ripper.y" 08389 { 08390 #if 0 08391 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); 08392 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); 08393 #endif 08394 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 08395 08396 local_pop(); 08397 } 08398 break; 08399 08400 case 324: 08401 08402 /* Line 1806 of yacc.c */ 08403 #line 2911 "ripper.y" 08404 { 08405 (yyval.num) = in_def; 08406 in_def = 0; 08407 } 08408 break; 08409 08410 case 325: 08411 08412 /* Line 1806 of yacc.c */ 08413 #line 2916 "ripper.y" 08414 { 08415 (yyval.num) = in_single; 08416 in_single = 0; 08417 local_push(0); 08418 } 08419 break; 08420 08421 case 326: 08422 08423 /* Line 1806 of yacc.c */ 08424 #line 2923 "ripper.y" 08425 { 08426 #if 0 08427 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08428 fixpos((yyval.val), (yyvsp[(3) - (8)].val)); 08429 #endif 08430 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08431 08432 local_pop(); 08433 in_def = (yyvsp[(4) - (8)].num); 08434 in_single = (yyvsp[(6) - (8)].num); 08435 } 08436 break; 08437 08438 case 327: 08439 08440 /* Line 1806 of yacc.c */ 08441 #line 2935 "ripper.y" 08442 { 08443 if (in_def || in_single) 08444 yyerror("module definition in method body"); 08445 local_push(0); 08446 #if 0 08447 (yyval.num) = ruby_sourceline; 08448 #endif 08449 08450 } 08451 break; 08452 08453 case 328: 08454 08455 /* Line 1806 of yacc.c */ 08456 #line 2946 "ripper.y" 08457 { 08458 #if 0 08459 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08460 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); 08461 #endif 08462 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08463 08464 local_pop(); 08465 } 08466 break; 08467 08468 case 329: 08469 08470 /* Line 1806 of yacc.c */ 08471 #line 2956 "ripper.y" 08472 { 08473 (yyval.id) = cur_mid; 08474 cur_mid = (yyvsp[(2) - (2)].val); 08475 in_def++; 08476 local_push(0); 08477 } 08478 break; 08479 08480 case 330: 08481 08482 /* Line 1806 of yacc.c */ 08483 #line 2965 "ripper.y" 08484 { 08485 #if 0 08486 NODE *body = remove_begin((yyvsp[(5) - (6)].val)); 08487 reduce_nodes(&body); 08488 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); 08489 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num)); 08490 #endif 08491 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08492 08493 local_pop(); 08494 in_def--; 08495 cur_mid = (yyvsp[(3) - (6)].id); 08496 } 08497 break; 08498 08499 case 331: 08500 08501 /* Line 1806 of yacc.c */ 08502 #line 2978 "ripper.y" 08503 {lex_state = EXPR_FNAME;} 08504 break; 08505 08506 case 332: 08507 08508 /* Line 1806 of yacc.c */ 08509 #line 2979 "ripper.y" 08510 { 08511 in_single++; 08512 lex_state = EXPR_ENDFN; /* force for args */ 08513 local_push(0); 08514 } 08515 break; 08516 08517 case 333: 08518 08519 /* Line 1806 of yacc.c */ 08520 #line 2987 "ripper.y" 08521 { 08522 #if 0 08523 NODE *body = remove_begin((yyvsp[(8) - (9)].val)); 08524 reduce_nodes(&body); 08525 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); 08526 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num)); 08527 #endif 08528 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); 08529 08530 local_pop(); 08531 in_single--; 08532 } 08533 break; 08534 08535 case 334: 08536 08537 /* Line 1806 of yacc.c */ 08538 #line 3000 "ripper.y" 08539 { 08540 #if 0 08541 (yyval.val) = NEW_BREAK(0); 08542 #endif 08543 (yyval.val) = dispatch1(break, arg_new()); 08544 08545 } 08546 break; 08547 08548 case 335: 08549 08550 /* Line 1806 of yacc.c */ 08551 #line 3008 "ripper.y" 08552 { 08553 #if 0 08554 (yyval.val) = NEW_NEXT(0); 08555 #endif 08556 (yyval.val) = dispatch1(next, arg_new()); 08557 08558 } 08559 break; 08560 08561 case 336: 08562 08563 /* Line 1806 of yacc.c */ 08564 #line 3016 "ripper.y" 08565 { 08566 #if 0 08567 (yyval.val) = NEW_REDO(); 08568 #endif 08569 (yyval.val) = dispatch0(redo); 08570 08571 } 08572 break; 08573 08574 case 337: 08575 08576 /* Line 1806 of yacc.c */ 08577 #line 3024 "ripper.y" 08578 { 08579 #if 0 08580 (yyval.val) = NEW_RETRY(); 08581 #endif 08582 (yyval.val) = dispatch0(retry); 08583 08584 } 08585 break; 08586 08587 case 338: 08588 08589 /* Line 1806 of yacc.c */ 08590 #line 3034 "ripper.y" 08591 { 08592 #if 0 08593 value_expr((yyvsp[(1) - (1)].val)); 08594 (yyval.val) = (yyvsp[(1) - (1)].val); 08595 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 08596 #endif 08597 (yyval.val) = (yyvsp[(1) - (1)].val); 08598 08599 } 08600 break; 08601 08602 case 339: 08603 08604 /* Line 1806 of yacc.c */ 08605 #line 3046 "ripper.y" 08606 { 08607 token_info_push("begin"); 08608 } 08609 break; 08610 08611 case 340: 08612 08613 /* Line 1806 of yacc.c */ 08614 #line 3052 "ripper.y" 08615 { 08616 token_info_push("if"); 08617 } 08618 break; 08619 08620 case 341: 08621 08622 /* Line 1806 of yacc.c */ 08623 #line 3058 "ripper.y" 08624 { 08625 token_info_push("unless"); 08626 } 08627 break; 08628 08629 case 342: 08630 08631 /* Line 1806 of yacc.c */ 08632 #line 3064 "ripper.y" 08633 { 08634 token_info_push("while"); 08635 } 08636 break; 08637 08638 case 343: 08639 08640 /* Line 1806 of yacc.c */ 08641 #line 3070 "ripper.y" 08642 { 08643 token_info_push("until"); 08644 } 08645 break; 08646 08647 case 344: 08648 08649 /* Line 1806 of yacc.c */ 08650 #line 3076 "ripper.y" 08651 { 08652 token_info_push("case"); 08653 } 08654 break; 08655 08656 case 345: 08657 08658 /* Line 1806 of yacc.c */ 08659 #line 3082 "ripper.y" 08660 { 08661 token_info_push("for"); 08662 } 08663 break; 08664 08665 case 346: 08666 08667 /* Line 1806 of yacc.c */ 08668 #line 3088 "ripper.y" 08669 { 08670 token_info_push("class"); 08671 } 08672 break; 08673 08674 case 347: 08675 08676 /* Line 1806 of yacc.c */ 08677 #line 3094 "ripper.y" 08678 { 08679 token_info_push("module"); 08680 } 08681 break; 08682 08683 case 348: 08684 08685 /* Line 1806 of yacc.c */ 08686 #line 3100 "ripper.y" 08687 { 08688 token_info_push("def"); 08689 #if 0 08690 (yyval.num) = ruby_sourceline; 08691 #endif 08692 08693 } 08694 break; 08695 08696 case 349: 08697 08698 /* Line 1806 of yacc.c */ 08699 #line 3110 "ripper.y" 08700 { 08701 token_info_pop("end"); 08702 } 08703 break; 08704 08705 case 350: 08706 08707 /* Line 1806 of yacc.c */ 08708 #line 3118 "ripper.y" 08709 { (yyval.val) = Qnil; } 08710 break; 08711 08712 case 352: 08713 08714 /* Line 1806 of yacc.c */ 08715 #line 3124 "ripper.y" 08716 { (yyval.val) = (yyvsp[(2) - (2)].val); } 08717 break; 08718 08719 case 353: 08720 08721 /* Line 1806 of yacc.c */ 08722 #line 3131 "ripper.y" 08723 { (yyval.val) = Qnil; } 08724 break; 08725 08726 case 356: 08727 08728 /* Line 1806 of yacc.c */ 08729 #line 3140 "ripper.y" 08730 { 08731 #if 0 08732 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 08733 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08734 #endif 08735 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 08736 08737 } 08738 break; 08739 08740 case 358: 08741 08742 /* Line 1806 of yacc.c */ 08743 #line 3152 "ripper.y" 08744 { 08745 #if 0 08746 (yyval.val) = (yyvsp[(2) - (2)].val); 08747 #endif 08748 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); 08749 08750 } 08751 break; 08752 08753 case 361: 08754 08755 /* Line 1806 of yacc.c */ 08756 #line 3166 "ripper.y" 08757 { 08758 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 08759 #if 0 08760 #endif 08761 (yyval.val) = dispatch1(mlhs_paren, (yyval.val)); 08762 08763 } 08764 break; 08765 08766 case 362: 08767 08768 /* Line 1806 of yacc.c */ 08769 #line 3174 "ripper.y" 08770 { 08771 #if 0 08772 (yyval.val) = (yyvsp[(2) - (3)].val); 08773 #endif 08774 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 08775 08776 } 08777 break; 08778 08779 case 363: 08780 08781 /* Line 1806 of yacc.c */ 08782 #line 3184 "ripper.y" 08783 { 08784 #if 0 08785 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 08786 #endif 08787 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 08788 08789 } 08790 break; 08791 08792 case 364: 08793 08794 /* Line 1806 of yacc.c */ 08795 #line 3192 "ripper.y" 08796 { 08797 #if 0 08798 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08799 #endif 08800 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08801 08802 } 08803 break; 08804 08805 case 365: 08806 08807 /* Line 1806 of yacc.c */ 08808 #line 3202 "ripper.y" 08809 { 08810 #if 0 08811 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 08812 #endif 08813 (yyval.val) = (yyvsp[(1) - (1)].val); 08814 08815 } 08816 break; 08817 08818 case 366: 08819 08820 /* Line 1806 of yacc.c */ 08821 #line 3210 "ripper.y" 08822 { 08823 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0); 08824 #if 0 08825 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val)); 08826 #endif 08827 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val)); 08828 08829 } 08830 break; 08831 08832 case 367: 08833 08834 /* Line 1806 of yacc.c */ 08835 #line 3219 "ripper.y" 08836 { 08837 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0); 08838 #if 0 08839 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val))); 08840 #endif 08841 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val)); 08842 08843 } 08844 break; 08845 08846 case 368: 08847 08848 /* Line 1806 of yacc.c */ 08849 #line 3228 "ripper.y" 08850 { 08851 #if 0 08852 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); 08853 #endif 08854 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); 08855 08856 } 08857 break; 08858 08859 case 369: 08860 08861 /* Line 1806 of yacc.c */ 08862 #line 3236 "ripper.y" 08863 { 08864 #if 0 08865 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); 08866 #endif 08867 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 08868 08869 } 08870 break; 08871 08872 case 370: 08873 08874 /* Line 1806 of yacc.c */ 08875 #line 3244 "ripper.y" 08876 { 08877 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0); 08878 #if 0 08879 (yyval.val) = NEW_MASGN(0, (yyval.val)); 08880 #endif 08881 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val)); 08882 08883 } 08884 break; 08885 08886 case 371: 08887 08888 /* Line 1806 of yacc.c */ 08889 #line 3253 "ripper.y" 08890 { 08891 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0); 08892 #if 0 08893 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val))); 08894 #endif 08895 #if 0 08896 TODO: Check me 08897 #endif 08898 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val)); 08899 08900 } 08901 break; 08902 08903 case 372: 08904 08905 /* Line 1806 of yacc.c */ 08906 #line 3265 "ripper.y" 08907 { 08908 #if 0 08909 (yyval.val) = NEW_MASGN(0, -1); 08910 #endif 08911 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08912 08913 } 08914 break; 08915 08916 case 373: 08917 08918 /* Line 1806 of yacc.c */ 08919 #line 3273 "ripper.y" 08920 { 08921 #if 0 08922 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 08923 #endif 08924 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08925 08926 } 08927 break; 08928 08929 case 374: 08930 08931 /* Line 1806 of yacc.c */ 08932 #line 3284 "ripper.y" 08933 { 08934 (yyval.val) = new_args_tail((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08935 } 08936 break; 08937 08938 case 375: 08939 08940 /* Line 1806 of yacc.c */ 08941 #line 3288 "ripper.y" 08942 { 08943 (yyval.val) = new_args_tail((yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 08944 } 08945 break; 08946 08947 case 376: 08948 08949 /* Line 1806 of yacc.c */ 08950 #line 3292 "ripper.y" 08951 { 08952 (yyval.val) = new_args_tail(Qnone, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08953 } 08954 break; 08955 08956 case 377: 08957 08958 /* Line 1806 of yacc.c */ 08959 #line 3296 "ripper.y" 08960 { 08961 (yyval.val) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].val)); 08962 } 08963 break; 08964 08965 case 378: 08966 08967 /* Line 1806 of yacc.c */ 08968 #line 3302 "ripper.y" 08969 { 08970 (yyval.val) = (yyvsp[(2) - (2)].val); 08971 } 08972 break; 08973 08974 case 379: 08975 08976 /* Line 1806 of yacc.c */ 08977 #line 3306 "ripper.y" 08978 { 08979 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 08980 } 08981 break; 08982 08983 case 380: 08984 08985 /* Line 1806 of yacc.c */ 08986 #line 3312 "ripper.y" 08987 { 08988 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnone, (yyvsp[(6) - (6)].val)); 08989 } 08990 break; 08991 08992 case 381: 08993 08994 /* Line 1806 of yacc.c */ 08995 #line 3316 "ripper.y" 08996 { 08997 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 08998 } 08999 break; 09000 09001 case 382: 09002 09003 /* Line 1806 of yacc.c */ 09004 #line 3320 "ripper.y" 09005 { 09006 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, Qnone, (yyvsp[(4) - (4)].val)); 09007 } 09008 break; 09009 09010 case 383: 09011 09012 /* Line 1806 of yacc.c */ 09013 #line 3324 "ripper.y" 09014 { 09015 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnone, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09016 } 09017 break; 09018 09019 case 384: 09020 09021 /* Line 1806 of yacc.c */ 09022 #line 3328 "ripper.y" 09023 { 09024 (yyval.val) = new_args((yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 09025 } 09026 break; 09027 09028 case 385: 09029 09030 /* Line 1806 of yacc.c */ 09031 #line 3332 "ripper.y" 09032 { 09033 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone)); 09034 #if 0 09035 #endif 09036 dispatch1(excessed_comma, (yyval.val)); 09037 09038 } 09039 break; 09040 09041 case 386: 09042 09043 /* Line 1806 of yacc.c */ 09044 #line 3340 "ripper.y" 09045 { 09046 (yyval.val) = new_args((yyvsp[(1) - (6)].val), Qnone, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09047 } 09048 break; 09049 09050 case 387: 09051 09052 /* Line 1806 of yacc.c */ 09053 #line 3344 "ripper.y" 09054 { 09055 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].val)); 09056 } 09057 break; 09058 09059 case 388: 09060 09061 /* Line 1806 of yacc.c */ 09062 #line 3348 "ripper.y" 09063 { 09064 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 09065 } 09066 break; 09067 09068 case 389: 09069 09070 /* Line 1806 of yacc.c */ 09071 #line 3352 "ripper.y" 09072 { 09073 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09074 } 09075 break; 09076 09077 case 390: 09078 09079 /* Line 1806 of yacc.c */ 09080 #line 3356 "ripper.y" 09081 { 09082 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (2)].val), Qnone, Qnone, (yyvsp[(2) - (2)].val)); 09083 } 09084 break; 09085 09086 case 391: 09087 09088 /* Line 1806 of yacc.c */ 09089 #line 3360 "ripper.y" 09090 { 09091 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09092 } 09093 break; 09094 09095 case 392: 09096 09097 /* Line 1806 of yacc.c */ 09098 #line 3364 "ripper.y" 09099 { 09100 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 09101 } 09102 break; 09103 09104 case 393: 09105 09106 /* Line 1806 of yacc.c */ 09107 #line 3368 "ripper.y" 09108 { 09109 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09110 } 09111 break; 09112 09113 case 394: 09114 09115 /* Line 1806 of yacc.c */ 09116 #line 3372 "ripper.y" 09117 { 09118 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].val)); 09119 } 09120 break; 09121 09122 case 396: 09123 09124 /* Line 1806 of yacc.c */ 09125 #line 3379 "ripper.y" 09126 { 09127 command_start = TRUE; 09128 } 09129 break; 09130 09131 case 397: 09132 09133 /* Line 1806 of yacc.c */ 09134 #line 3385 "ripper.y" 09135 { 09136 #if 0 09137 (yyval.val) = 0; 09138 #endif 09139 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 09140 escape_Qundef((yyvsp[(2) - (3)].val))); 09141 09142 } 09143 break; 09144 09145 case 398: 09146 09147 /* Line 1806 of yacc.c */ 09148 #line 3394 "ripper.y" 09149 { 09150 #if 0 09151 (yyval.val) = 0; 09152 #endif 09153 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 09154 Qnil); 09155 09156 } 09157 break; 09158 09159 case 399: 09160 09161 /* Line 1806 of yacc.c */ 09162 #line 3403 "ripper.y" 09163 { 09164 #if 0 09165 (yyval.val) = (yyvsp[(2) - (4)].val); 09166 #endif 09167 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); 09168 09169 } 09170 break; 09171 09172 case 400: 09173 09174 /* Line 1806 of yacc.c */ 09175 #line 3414 "ripper.y" 09176 { 09177 (yyval.val) = 0; 09178 } 09179 break; 09180 09181 case 401: 09182 09183 /* Line 1806 of yacc.c */ 09184 #line 3418 "ripper.y" 09185 { 09186 #if 0 09187 (yyval.val) = 0; 09188 #endif 09189 (yyval.val) = (yyvsp[(3) - (4)].val); 09190 09191 } 09192 break; 09193 09194 case 402: 09195 09196 /* Line 1806 of yacc.c */ 09197 #line 3430 "ripper.y" 09198 { 09199 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09200 } 09201 break; 09202 09203 case 403: 09204 09205 /* Line 1806 of yacc.c */ 09206 #line 3437 "ripper.y" 09207 { 09208 rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 09209 } 09210 break; 09211 09212 case 404: 09213 09214 /* Line 1806 of yacc.c */ 09215 #line 3444 "ripper.y" 09216 { 09217 new_bv(get_id((yyvsp[(1) - (1)].val))); 09218 #if 0 09219 #endif 09220 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 09221 09222 } 09223 break; 09224 09225 case 405: 09226 09227 /* Line 1806 of yacc.c */ 09228 #line 3452 "ripper.y" 09229 { 09230 (yyval.val) = 0; 09231 } 09232 break; 09233 09234 case 406: 09235 09236 /* Line 1806 of yacc.c */ 09237 #line 3457 "ripper.y" 09238 { 09239 (yyval.vars) = dyna_push(); 09240 } 09241 break; 09242 09243 case 407: 09244 09245 /* Line 1806 of yacc.c */ 09246 #line 3460 "ripper.y" 09247 { 09248 (yyval.num) = lpar_beg; 09249 lpar_beg = ++paren_nest; 09250 } 09251 break; 09252 09253 case 408: 09254 09255 /* Line 1806 of yacc.c */ 09256 #line 3465 "ripper.y" 09257 { 09258 (yyval.num) = ruby_sourceline; 09259 } 09260 break; 09261 09262 case 409: 09263 09264 /* Line 1806 of yacc.c */ 09265 #line 3469 "ripper.y" 09266 { 09267 lpar_beg = (yyvsp[(2) - (5)].num); 09268 #if 0 09269 (yyval.val) = NEW_LAMBDA((yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09270 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 09271 #endif 09272 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09273 09274 dyna_pop((yyvsp[(1) - (5)].vars)); 09275 } 09276 break; 09277 09278 case 410: 09279 09280 /* Line 1806 of yacc.c */ 09281 #line 3482 "ripper.y" 09282 { 09283 #if 0 09284 (yyval.val) = (yyvsp[(2) - (4)].val); 09285 #endif 09286 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 09287 09288 } 09289 break; 09290 09291 case 411: 09292 09293 /* Line 1806 of yacc.c */ 09294 #line 3490 "ripper.y" 09295 { 09296 #if 0 09297 (yyval.val) = (yyvsp[(1) - (1)].val); 09298 #endif 09299 (yyval.val) = (yyvsp[(1) - (1)].val); 09300 09301 } 09302 break; 09303 09304 case 412: 09305 09306 /* Line 1806 of yacc.c */ 09307 #line 3500 "ripper.y" 09308 { 09309 (yyval.val) = (yyvsp[(2) - (3)].val); 09310 } 09311 break; 09312 09313 case 413: 09314 09315 /* Line 1806 of yacc.c */ 09316 #line 3504 "ripper.y" 09317 { 09318 (yyval.val) = (yyvsp[(2) - (3)].val); 09319 } 09320 break; 09321 09322 case 414: 09323 09324 /* Line 1806 of yacc.c */ 09325 #line 3510 "ripper.y" 09326 { 09327 (yyvsp[(1) - (1)].vars) = dyna_push(); 09328 #if 0 09329 (yyval.num) = ruby_sourceline; 09330 #endif 09331 } 09332 break; 09333 09334 case 415: 09335 09336 /* Line 1806 of yacc.c */ 09337 #line 3519 "ripper.y" 09338 { 09339 #if 0 09340 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09341 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09342 #endif 09343 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09344 09345 dyna_pop((yyvsp[(1) - (5)].vars)); 09346 } 09347 break; 09348 09349 case 416: 09350 09351 /* Line 1806 of yacc.c */ 09352 #line 3531 "ripper.y" 09353 { 09354 #if 0 09355 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { 09356 compile_error(PARSER_ARG "block given to yield"); 09357 } 09358 else { 09359 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 09360 } 09361 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 09362 (yyval.val) = (yyvsp[(2) - (2)].val); 09363 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 09364 #endif 09365 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09366 09367 } 09368 break; 09369 09370 case 417: 09371 09372 /* Line 1806 of yacc.c */ 09373 #line 3547 "ripper.y" 09374 { 09375 #if 0 09376 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09377 #endif 09378 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 09379 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09380 09381 } 09382 break; 09383 09384 case 418: 09385 09386 /* Line 1806 of yacc.c */ 09387 #line 3556 "ripper.y" 09388 { 09389 #if 0 09390 block_dup_check((yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09391 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09392 (yyval.val) = (yyvsp[(5) - (5)].val); 09393 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 09394 #endif 09395 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09396 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 09397 09398 } 09399 break; 09400 09401 case 419: 09402 09403 /* Line 1806 of yacc.c */ 09404 #line 3568 "ripper.y" 09405 { 09406 #if 0 09407 block_dup_check((yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09408 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09409 (yyval.val) = (yyvsp[(5) - (5)].val); 09410 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 09411 #endif 09412 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 09413 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 09414 09415 } 09416 break; 09417 09418 case 420: 09419 09420 /* Line 1806 of yacc.c */ 09421 #line 3582 "ripper.y" 09422 { 09423 #if 0 09424 (yyval.val) = (yyvsp[(1) - (2)].val); 09425 (yyval.val)->nd_args = (yyvsp[(2) - (2)].val); 09426 #endif 09427 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); 09428 09429 } 09430 break; 09431 09432 case 421: 09433 09434 /* Line 1806 of yacc.c */ 09435 #line 3591 "ripper.y" 09436 { 09437 #if 0 09438 (yyval.num) = ruby_sourceline; 09439 #endif 09440 } 09441 break; 09442 09443 case 422: 09444 09445 /* Line 1806 of yacc.c */ 09446 #line 3597 "ripper.y" 09447 { 09448 #if 0 09449 (yyval.val) = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09450 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 09451 #endif 09452 (yyval.val) = dispatch3(call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 09453 (yyval.val) = method_optarg((yyval.val), (yyvsp[(5) - (5)].val)); 09454 09455 } 09456 break; 09457 09458 case 423: 09459 09460 /* Line 1806 of yacc.c */ 09461 #line 3607 "ripper.y" 09462 { 09463 #if 0 09464 (yyval.num) = ruby_sourceline; 09465 #endif 09466 } 09467 break; 09468 09469 case 424: 09470 09471 /* Line 1806 of yacc.c */ 09472 #line 3613 "ripper.y" 09473 { 09474 #if 0 09475 (yyval.val) = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 09476 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 09477 #endif 09478 (yyval.val) = dispatch3(call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 09479 (yyval.val) = method_optarg((yyval.val), (yyvsp[(5) - (5)].val)); 09480 09481 } 09482 break; 09483 09484 case 425: 09485 09486 /* Line 1806 of yacc.c */ 09487 #line 3623 "ripper.y" 09488 { 09489 #if 0 09490 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); 09491 #endif 09492 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 09493 09494 } 09495 break; 09496 09497 case 426: 09498 09499 /* Line 1806 of yacc.c */ 09500 #line 3631 "ripper.y" 09501 { 09502 #if 0 09503 (yyval.num) = ruby_sourceline; 09504 #endif 09505 } 09506 break; 09507 09508 case 427: 09509 09510 /* Line 1806 of yacc.c */ 09511 #line 3637 "ripper.y" 09512 { 09513 #if 0 09514 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), rb_intern("call"), (yyvsp[(4) - (4)].val)); 09515 nd_set_line((yyval.val), (yyvsp[(3) - (4)].num)); 09516 #endif 09517 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), 09518 ripper_intern("call")); 09519 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09520 09521 } 09522 break; 09523 09524 case 428: 09525 09526 /* Line 1806 of yacc.c */ 09527 #line 3648 "ripper.y" 09528 { 09529 #if 0 09530 (yyval.num) = ruby_sourceline; 09531 #endif 09532 } 09533 break; 09534 09535 case 429: 09536 09537 /* Line 1806 of yacc.c */ 09538 #line 3654 "ripper.y" 09539 { 09540 #if 0 09541 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), rb_intern("call"), (yyvsp[(4) - (4)].val)); 09542 nd_set_line((yyval.val), (yyvsp[(3) - (4)].num)); 09543 #endif 09544 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), 09545 ripper_intern("call")); 09546 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09547 09548 } 09549 break; 09550 09551 case 430: 09552 09553 /* Line 1806 of yacc.c */ 09554 #line 3665 "ripper.y" 09555 { 09556 #if 0 09557 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 09558 #endif 09559 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 09560 09561 } 09562 break; 09563 09564 case 431: 09565 09566 /* Line 1806 of yacc.c */ 09567 #line 3673 "ripper.y" 09568 { 09569 #if 0 09570 (yyval.val) = NEW_ZSUPER(); 09571 #endif 09572 (yyval.val) = dispatch0(zsuper); 09573 09574 } 09575 break; 09576 09577 case 432: 09578 09579 /* Line 1806 of yacc.c */ 09580 #line 3681 "ripper.y" 09581 { 09582 #if 0 09583 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) 09584 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); 09585 else 09586 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); 09587 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09588 #endif 09589 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 09590 09591 } 09592 break; 09593 09594 case 433: 09595 09596 /* Line 1806 of yacc.c */ 09597 #line 3695 "ripper.y" 09598 { 09599 (yyvsp[(1) - (1)].vars) = dyna_push(); 09600 #if 0 09601 (yyval.num) = ruby_sourceline; 09602 #endif 09603 09604 } 09605 break; 09606 09607 case 434: 09608 09609 /* Line 1806 of yacc.c */ 09610 #line 3704 "ripper.y" 09611 { 09612 #if 0 09613 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09614 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09615 #endif 09616 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09617 09618 dyna_pop((yyvsp[(1) - (5)].vars)); 09619 } 09620 break; 09621 09622 case 435: 09623 09624 /* Line 1806 of yacc.c */ 09625 #line 3714 "ripper.y" 09626 { 09627 (yyvsp[(1) - (1)].vars) = dyna_push(); 09628 #if 0 09629 (yyval.num) = ruby_sourceline; 09630 #endif 09631 09632 } 09633 break; 09634 09635 case 436: 09636 09637 /* Line 1806 of yacc.c */ 09638 #line 3723 "ripper.y" 09639 { 09640 #if 0 09641 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09642 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09643 #endif 09644 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09645 09646 dyna_pop((yyvsp[(1) - (5)].vars)); 09647 } 09648 break; 09649 09650 case 437: 09651 09652 /* Line 1806 of yacc.c */ 09653 #line 3737 "ripper.y" 09654 { 09655 #if 0 09656 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09657 #endif 09658 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 09659 09660 } 09661 break; 09662 09663 case 440: 09664 09665 /* Line 1806 of yacc.c */ 09666 #line 3753 "ripper.y" 09667 { 09668 #if 0 09669 if ((yyvsp[(3) - (6)].val)) { 09670 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); 09671 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 09672 } 09673 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09674 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); 09675 #endif 09676 (yyval.val) = dispatch4(rescue, 09677 escape_Qundef((yyvsp[(2) - (6)].val)), 09678 escape_Qundef((yyvsp[(3) - (6)].val)), 09679 escape_Qundef((yyvsp[(5) - (6)].val)), 09680 escape_Qundef((yyvsp[(6) - (6)].val))); 09681 09682 } 09683 break; 09684 09685 case 442: 09686 09687 /* Line 1806 of yacc.c */ 09688 #line 3773 "ripper.y" 09689 { 09690 #if 0 09691 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 09692 #endif 09693 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09694 09695 } 09696 break; 09697 09698 case 443: 09699 09700 /* Line 1806 of yacc.c */ 09701 #line 3781 "ripper.y" 09702 { 09703 #if 0 09704 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); 09705 #endif 09706 (yyval.val) = (yyvsp[(1) - (1)].val); 09707 09708 } 09709 break; 09710 09711 case 445: 09712 09713 /* Line 1806 of yacc.c */ 09714 #line 3792 "ripper.y" 09715 { 09716 (yyval.val) = (yyvsp[(2) - (2)].val); 09717 } 09718 break; 09719 09720 case 447: 09721 09722 /* Line 1806 of yacc.c */ 09723 #line 3799 "ripper.y" 09724 { 09725 #if 0 09726 (yyval.val) = (yyvsp[(2) - (2)].val); 09727 #endif 09728 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); 09729 09730 } 09731 break; 09732 09733 case 450: 09734 09735 /* Line 1806 of yacc.c */ 09736 #line 3811 "ripper.y" 09737 { 09738 #if 0 09739 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 09740 #endif 09741 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 09742 09743 } 09744 break; 09745 09746 case 452: 09747 09748 /* Line 1806 of yacc.c */ 09749 #line 3822 "ripper.y" 09750 { 09751 #if 0 09752 NODE *node = (yyvsp[(1) - (1)].val); 09753 if (!node) { 09754 node = NEW_STR(STR_NEW0()); 09755 } 09756 else { 09757 node = evstr2dstr(node); 09758 } 09759 (yyval.val) = node; 09760 #endif 09761 (yyval.val) = (yyvsp[(1) - (1)].val); 09762 09763 } 09764 break; 09765 09766 case 455: 09767 09768 /* Line 1806 of yacc.c */ 09769 #line 3841 "ripper.y" 09770 { 09771 #if 0 09772 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09773 #endif 09774 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09775 09776 } 09777 break; 09778 09779 case 456: 09780 09781 /* Line 1806 of yacc.c */ 09782 #line 3851 "ripper.y" 09783 { 09784 #if 0 09785 (yyval.val) = (yyvsp[(2) - (3)].val); 09786 #endif 09787 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); 09788 09789 } 09790 break; 09791 09792 case 457: 09793 09794 /* Line 1806 of yacc.c */ 09795 #line 3861 "ripper.y" 09796 { 09797 #if 0 09798 NODE *node = (yyvsp[(2) - (3)].val); 09799 if (!node) { 09800 node = NEW_XSTR(STR_NEW0()); 09801 } 09802 else { 09803 switch (nd_type(node)) { 09804 case NODE_STR: 09805 nd_set_type(node, NODE_XSTR); 09806 break; 09807 case NODE_DSTR: 09808 nd_set_type(node, NODE_DXSTR); 09809 break; 09810 default: 09811 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09812 break; 09813 } 09814 } 09815 (yyval.val) = node; 09816 #endif 09817 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); 09818 09819 } 09820 break; 09821 09822 case 458: 09823 09824 /* Line 1806 of yacc.c */ 09825 #line 3888 "ripper.y" 09826 { 09827 #if 0 09828 int options = (yyvsp[(3) - (3)].val); 09829 NODE *node = (yyvsp[(2) - (3)].val); 09830 NODE *list, *prev; 09831 if (!node) { 09832 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09833 } 09834 else switch (nd_type(node)) { 09835 case NODE_STR: 09836 { 09837 VALUE src = node->nd_lit; 09838 nd_set_type(node, NODE_LIT); 09839 node->nd_lit = reg_compile(src, options); 09840 } 09841 break; 09842 default: 09843 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09844 case NODE_DSTR: 09845 if (options & RE_OPTION_ONCE) { 09846 nd_set_type(node, NODE_DREGX_ONCE); 09847 } 09848 else { 09849 nd_set_type(node, NODE_DREGX); 09850 } 09851 node->nd_cflag = options & RE_OPTION_MASK; 09852 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09853 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09854 if (nd_type(list->nd_head) == NODE_STR) { 09855 VALUE tail = list->nd_head->nd_lit; 09856 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09857 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09858 if (!literal_concat0(parser, lit, tail)) { 09859 node = 0; 09860 break; 09861 } 09862 rb_str_resize(tail, 0); 09863 prev->nd_next = list->nd_next; 09864 rb_gc_force_recycle((VALUE)list->nd_head); 09865 rb_gc_force_recycle((VALUE)list); 09866 list = prev; 09867 } 09868 else { 09869 prev = list; 09870 } 09871 } 09872 else { 09873 prev = 0; 09874 } 09875 } 09876 if (!node->nd_next) { 09877 VALUE src = node->nd_lit; 09878 nd_set_type(node, NODE_LIT); 09879 node->nd_lit = reg_compile(src, options); 09880 } 09881 break; 09882 } 09883 (yyval.val) = node; 09884 #endif 09885 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 09886 09887 } 09888 break; 09889 09890 case 459: 09891 09892 /* Line 1806 of yacc.c */ 09893 #line 3953 "ripper.y" 09894 { 09895 #if 0 09896 (yyval.val) = NEW_ZARRAY(); 09897 #endif 09898 (yyval.val) = dispatch0(words_new); 09899 (yyval.val) = dispatch1(array, (yyval.val)); 09900 09901 } 09902 break; 09903 09904 case 460: 09905 09906 /* Line 1806 of yacc.c */ 09907 #line 3962 "ripper.y" 09908 { 09909 #if 0 09910 (yyval.val) = (yyvsp[(2) - (3)].val); 09911 #endif 09912 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09913 09914 } 09915 break; 09916 09917 case 461: 09918 09919 /* Line 1806 of yacc.c */ 09920 #line 3972 "ripper.y" 09921 { 09922 #if 0 09923 (yyval.val) = 0; 09924 #endif 09925 (yyval.val) = dispatch0(words_new); 09926 09927 } 09928 break; 09929 09930 case 462: 09931 09932 /* Line 1806 of yacc.c */ 09933 #line 3980 "ripper.y" 09934 { 09935 #if 0 09936 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); 09937 #endif 09938 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09939 09940 } 09941 break; 09942 09943 case 463: 09944 09945 /* Line 1806 of yacc.c */ 09946 #line 3992 "ripper.y" 09947 { 09948 (yyval.val) = dispatch0(word_new); 09949 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); 09950 } 09951 break; 09952 09953 case 464: 09954 09955 /* Line 1806 of yacc.c */ 09956 #line 3998 "ripper.y" 09957 { 09958 #if 0 09959 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09960 #endif 09961 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09962 09963 } 09964 break; 09965 09966 case 465: 09967 09968 /* Line 1806 of yacc.c */ 09969 #line 4008 "ripper.y" 09970 { 09971 #if 0 09972 (yyval.val) = NEW_ZARRAY(); 09973 #endif 09974 (yyval.val) = dispatch0(symbols_new); 09975 (yyval.val) = dispatch1(array, (yyval.val)); 09976 09977 } 09978 break; 09979 09980 case 466: 09981 09982 /* Line 1806 of yacc.c */ 09983 #line 4017 "ripper.y" 09984 { 09985 #if 0 09986 (yyval.val) = (yyvsp[(2) - (3)].val); 09987 #endif 09988 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09989 09990 } 09991 break; 09992 09993 case 467: 09994 09995 /* Line 1806 of yacc.c */ 09996 #line 4027 "ripper.y" 09997 { 09998 #if 0 09999 (yyval.val) = 0; 10000 #endif 10001 (yyval.val) = dispatch0(symbols_new); 10002 10003 } 10004 break; 10005 10006 case 468: 10007 10008 /* Line 1806 of yacc.c */ 10009 #line 4035 "ripper.y" 10010 { 10011 #if 0 10012 (yyvsp[(2) - (3)].val) = evstr2dstr((yyvsp[(2) - (3)].val)); 10013 nd_set_type((yyvsp[(2) - (3)].val), NODE_DSYM); 10014 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10015 #endif 10016 (yyval.val) = dispatch2(symbols_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10017 10018 } 10019 break; 10020 10021 case 469: 10022 10023 /* Line 1806 of yacc.c */ 10024 #line 4047 "ripper.y" 10025 { 10026 #if 0 10027 (yyval.val) = NEW_ZARRAY(); 10028 #endif 10029 (yyval.val) = dispatch0(qwords_new); 10030 (yyval.val) = dispatch1(array, (yyval.val)); 10031 10032 } 10033 break; 10034 10035 case 470: 10036 10037 /* Line 1806 of yacc.c */ 10038 #line 4056 "ripper.y" 10039 { 10040 #if 0 10041 (yyval.val) = (yyvsp[(2) - (3)].val); 10042 #endif 10043 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 10044 10045 } 10046 break; 10047 10048 case 471: 10049 10050 /* Line 1806 of yacc.c */ 10051 #line 4066 "ripper.y" 10052 { 10053 #if 0 10054 (yyval.val) = NEW_ZARRAY(); 10055 #endif 10056 (yyval.val) = dispatch0(qsymbols_new); 10057 (yyval.val) = dispatch1(array, (yyval.val)); 10058 10059 } 10060 break; 10061 10062 case 472: 10063 10064 /* Line 1806 of yacc.c */ 10065 #line 4075 "ripper.y" 10066 { 10067 #if 0 10068 (yyval.val) = (yyvsp[(2) - (3)].val); 10069 #endif 10070 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 10071 10072 } 10073 break; 10074 10075 case 473: 10076 10077 /* Line 1806 of yacc.c */ 10078 #line 4085 "ripper.y" 10079 { 10080 #if 0 10081 (yyval.val) = 0; 10082 #endif 10083 (yyval.val) = dispatch0(qwords_new); 10084 10085 } 10086 break; 10087 10088 case 474: 10089 10090 /* Line 1806 of yacc.c */ 10091 #line 4093 "ripper.y" 10092 { 10093 #if 0 10094 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10095 #endif 10096 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10097 10098 } 10099 break; 10100 10101 case 475: 10102 10103 /* Line 1806 of yacc.c */ 10104 #line 4103 "ripper.y" 10105 { 10106 #if 0 10107 (yyval.val) = 0; 10108 #endif 10109 (yyval.val) = dispatch0(qsymbols_new); 10110 10111 } 10112 break; 10113 10114 case 476: 10115 10116 /* Line 1806 of yacc.c */ 10117 #line 4111 "ripper.y" 10118 { 10119 #if 0 10120 VALUE lit; 10121 lit = (yyvsp[(2) - (3)].val)->nd_lit; 10122 (yyvsp[(2) - (3)].val)->nd_lit = ID2SYM(rb_intern_str(lit)); 10123 nd_set_type((yyvsp[(2) - (3)].val), NODE_LIT); 10124 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10125 #endif 10126 (yyval.val) = dispatch2(qsymbols_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10127 10128 } 10129 break; 10130 10131 case 477: 10132 10133 /* Line 1806 of yacc.c */ 10134 #line 4125 "ripper.y" 10135 { 10136 #if 0 10137 (yyval.val) = 0; 10138 #endif 10139 (yyval.val) = dispatch0(string_content); 10140 10141 } 10142 break; 10143 10144 case 478: 10145 10146 /* Line 1806 of yacc.c */ 10147 #line 4133 "ripper.y" 10148 { 10149 #if 0 10150 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10151 #endif 10152 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10153 10154 } 10155 break; 10156 10157 case 479: 10158 10159 /* Line 1806 of yacc.c */ 10160 #line 4143 "ripper.y" 10161 { 10162 #if 0 10163 (yyval.val) = 0; 10164 #endif 10165 (yyval.val) = dispatch0(xstring_new); 10166 10167 } 10168 break; 10169 10170 case 480: 10171 10172 /* Line 1806 of yacc.c */ 10173 #line 4151 "ripper.y" 10174 { 10175 #if 0 10176 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10177 #endif 10178 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10179 10180 } 10181 break; 10182 10183 case 481: 10184 10185 /* Line 1806 of yacc.c */ 10186 #line 4161 "ripper.y" 10187 { 10188 #if 0 10189 (yyval.val) = 0; 10190 #endif 10191 (yyval.val) = dispatch0(regexp_new); 10192 10193 } 10194 break; 10195 10196 case 482: 10197 10198 /* Line 1806 of yacc.c */ 10199 #line 4169 "ripper.y" 10200 { 10201 #if 0 10202 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val); 10203 if (!head) { 10204 (yyval.val) = tail; 10205 } 10206 else if (!tail) { 10207 (yyval.val) = head; 10208 } 10209 else { 10210 switch (nd_type(head)) { 10211 case NODE_STR: 10212 nd_set_type(head, NODE_DSTR); 10213 break; 10214 case NODE_DSTR: 10215 break; 10216 default: 10217 head = list_append(NEW_DSTR(Qnil), head); 10218 break; 10219 } 10220 (yyval.val) = list_append(head, tail); 10221 } 10222 #endif 10223 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10224 10225 } 10226 break; 10227 10228 case 484: 10229 10230 /* Line 1806 of yacc.c */ 10231 #line 4199 "ripper.y" 10232 { 10233 (yyval.node) = lex_strterm; 10234 lex_strterm = 0; 10235 lex_state = EXPR_BEG; 10236 } 10237 break; 10238 10239 case 485: 10240 10241 /* Line 1806 of yacc.c */ 10242 #line 4205 "ripper.y" 10243 { 10244 #if 0 10245 lex_strterm = (yyvsp[(2) - (3)].node); 10246 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); 10247 #endif 10248 lex_strterm = (yyvsp[(2) - (3)].node); 10249 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); 10250 10251 } 10252 break; 10253 10254 case 486: 10255 10256 /* Line 1806 of yacc.c */ 10257 #line 4215 "ripper.y" 10258 { 10259 (yyvsp[(1) - (1)].val) = cond_stack; 10260 (yyval.val) = cmdarg_stack; 10261 cond_stack = 0; 10262 cmdarg_stack = 0; 10263 } 10264 break; 10265 10266 case 487: 10267 10268 /* Line 1806 of yacc.c */ 10269 #line 4221 "ripper.y" 10270 { 10271 (yyval.node) = lex_strterm; 10272 lex_strterm = 0; 10273 lex_state = EXPR_BEG; 10274 } 10275 break; 10276 10277 case 488: 10278 10279 /* Line 1806 of yacc.c */ 10280 #line 4226 "ripper.y" 10281 { 10282 (yyval.num) = brace_nest; 10283 brace_nest = 0; 10284 } 10285 break; 10286 10287 case 489: 10288 10289 /* Line 1806 of yacc.c */ 10290 #line 4231 "ripper.y" 10291 { 10292 cond_stack = (yyvsp[(1) - (6)].val); 10293 cmdarg_stack = (yyvsp[(2) - (6)].val); 10294 lex_strterm = (yyvsp[(3) - (6)].node); 10295 brace_nest = (yyvsp[(4) - (6)].num); 10296 #if 0 10297 if ((yyvsp[(5) - (6)].val)) (yyvsp[(5) - (6)].val)->flags &= ~NODE_FL_NEWLINE; 10298 (yyval.val) = new_evstr((yyvsp[(5) - (6)].val)); 10299 #endif 10300 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(5) - (6)].val)); 10301 10302 } 10303 break; 10304 10305 case 490: 10306 10307 /* Line 1806 of yacc.c */ 10308 #line 4246 "ripper.y" 10309 { 10310 #if 0 10311 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); 10312 #endif 10313 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10314 10315 } 10316 break; 10317 10318 case 491: 10319 10320 /* Line 1806 of yacc.c */ 10321 #line 4254 "ripper.y" 10322 { 10323 #if 0 10324 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); 10325 #endif 10326 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10327 10328 } 10329 break; 10330 10331 case 492: 10332 10333 /* Line 1806 of yacc.c */ 10334 #line 4262 "ripper.y" 10335 { 10336 #if 0 10337 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); 10338 #endif 10339 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10340 10341 } 10342 break; 10343 10344 case 494: 10345 10346 /* Line 1806 of yacc.c */ 10347 #line 4273 "ripper.y" 10348 { 10349 lex_state = EXPR_END; 10350 #if 0 10351 (yyval.val) = (yyvsp[(2) - (2)].val); 10352 #endif 10353 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); 10354 10355 } 10356 break; 10357 10358 case 499: 10359 10360 /* Line 1806 of yacc.c */ 10361 #line 4290 "ripper.y" 10362 { 10363 lex_state = EXPR_END; 10364 #if 0 10365 (yyval.val) = dsym_node((yyvsp[(2) - (3)].val)); 10366 #endif 10367 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); 10368 10369 } 10370 break; 10371 10372 case 502: 10373 10374 /* Line 1806 of yacc.c */ 10375 #line 4303 "ripper.y" 10376 { 10377 #if 0 10378 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10379 #endif 10380 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10381 10382 } 10383 break; 10384 10385 case 503: 10386 10387 /* Line 1806 of yacc.c */ 10388 #line 4311 "ripper.y" 10389 { 10390 #if 0 10391 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10392 #endif 10393 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10394 10395 } 10396 break; 10397 10398 case 509: 10399 10400 /* Line 1806 of yacc.c */ 10401 #line 4327 "ripper.y" 10402 {ifndef_ripper((yyval.val) = keyword_nil);} 10403 break; 10404 10405 case 510: 10406 10407 /* Line 1806 of yacc.c */ 10408 #line 4328 "ripper.y" 10409 {ifndef_ripper((yyval.val) = keyword_self);} 10410 break; 10411 10412 case 511: 10413 10414 /* Line 1806 of yacc.c */ 10415 #line 4329 "ripper.y" 10416 {ifndef_ripper((yyval.val) = keyword_true);} 10417 break; 10418 10419 case 512: 10420 10421 /* Line 1806 of yacc.c */ 10422 #line 4330 "ripper.y" 10423 {ifndef_ripper((yyval.val) = keyword_false);} 10424 break; 10425 10426 case 513: 10427 10428 /* Line 1806 of yacc.c */ 10429 #line 4331 "ripper.y" 10430 {ifndef_ripper((yyval.val) = keyword__FILE__);} 10431 break; 10432 10433 case 514: 10434 10435 /* Line 1806 of yacc.c */ 10436 #line 4332 "ripper.y" 10437 {ifndef_ripper((yyval.val) = keyword__LINE__);} 10438 break; 10439 10440 case 515: 10441 10442 /* Line 1806 of yacc.c */ 10443 #line 4333 "ripper.y" 10444 {ifndef_ripper((yyval.val) = keyword__ENCODING__);} 10445 break; 10446 10447 case 516: 10448 10449 /* Line 1806 of yacc.c */ 10450 #line 4337 "ripper.y" 10451 { 10452 #if 0 10453 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10454 #endif 10455 if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) { 10456 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10457 } 10458 else { 10459 (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val)); 10460 } 10461 10462 } 10463 break; 10464 10465 case 517: 10466 10467 /* Line 1806 of yacc.c */ 10468 #line 4350 "ripper.y" 10469 { 10470 #if 0 10471 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10472 #endif 10473 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10474 10475 } 10476 break; 10477 10478 case 518: 10479 10480 /* Line 1806 of yacc.c */ 10481 #line 4360 "ripper.y" 10482 { 10483 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10484 #if 0 10485 #endif 10486 (yyval.val) = dispatch1(var_field, (yyval.val)); 10487 10488 } 10489 break; 10490 10491 case 519: 10492 10493 /* Line 1806 of yacc.c */ 10494 #line 4368 "ripper.y" 10495 { 10496 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10497 #if 0 10498 #endif 10499 (yyval.val) = dispatch1(var_field, (yyval.val)); 10500 10501 } 10502 break; 10503 10504 case 522: 10505 10506 /* Line 1806 of yacc.c */ 10507 #line 4382 "ripper.y" 10508 { 10509 #if 0 10510 (yyval.val) = 0; 10511 #endif 10512 (yyval.val) = Qnil; 10513 10514 } 10515 break; 10516 10517 case 523: 10518 10519 /* Line 1806 of yacc.c */ 10520 #line 4390 "ripper.y" 10521 { 10522 lex_state = EXPR_BEG; 10523 command_start = TRUE; 10524 } 10525 break; 10526 10527 case 524: 10528 10529 /* Line 1806 of yacc.c */ 10530 #line 4395 "ripper.y" 10531 { 10532 (yyval.val) = (yyvsp[(3) - (4)].val); 10533 } 10534 break; 10535 10536 case 525: 10537 10538 /* Line 1806 of yacc.c */ 10539 #line 4399 "ripper.y" 10540 { 10541 #if 0 10542 yyerrok; 10543 (yyval.val) = 0; 10544 #endif 10545 yyerrok; 10546 (yyval.val) = Qnil; 10547 10548 } 10549 break; 10550 10551 case 526: 10552 10553 /* Line 1806 of yacc.c */ 10554 #line 4411 "ripper.y" 10555 { 10556 #if 0 10557 (yyval.val) = (yyvsp[(2) - (3)].val); 10558 #endif 10559 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 10560 10561 lex_state = EXPR_BEG; 10562 command_start = TRUE; 10563 } 10564 break; 10565 10566 case 527: 10567 10568 /* Line 1806 of yacc.c */ 10569 #line 4421 "ripper.y" 10570 { 10571 (yyval.val) = (yyvsp[(1) - (2)].val); 10572 lex_state = EXPR_BEG; 10573 command_start = TRUE; 10574 } 10575 break; 10576 10577 case 528: 10578 10579 /* Line 1806 of yacc.c */ 10580 #line 4429 "ripper.y" 10581 { 10582 (yyval.val) = new_args_tail((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10583 } 10584 break; 10585 10586 case 529: 10587 10588 /* Line 1806 of yacc.c */ 10589 #line 4433 "ripper.y" 10590 { 10591 (yyval.val) = new_args_tail((yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 10592 } 10593 break; 10594 10595 case 530: 10596 10597 /* Line 1806 of yacc.c */ 10598 #line 4437 "ripper.y" 10599 { 10600 (yyval.val) = new_args_tail(Qnone, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10601 } 10602 break; 10603 10604 case 531: 10605 10606 /* Line 1806 of yacc.c */ 10607 #line 4441 "ripper.y" 10608 { 10609 (yyval.val) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].val)); 10610 } 10611 break; 10612 10613 case 532: 10614 10615 /* Line 1806 of yacc.c */ 10616 #line 4447 "ripper.y" 10617 { 10618 (yyval.val) = (yyvsp[(2) - (2)].val); 10619 } 10620 break; 10621 10622 case 533: 10623 10624 /* Line 1806 of yacc.c */ 10625 #line 4451 "ripper.y" 10626 { 10627 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 10628 } 10629 break; 10630 10631 case 534: 10632 10633 /* Line 1806 of yacc.c */ 10634 #line 4457 "ripper.y" 10635 { 10636 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnone, (yyvsp[(6) - (6)].val)); 10637 } 10638 break; 10639 10640 case 535: 10641 10642 /* Line 1806 of yacc.c */ 10643 #line 4461 "ripper.y" 10644 { 10645 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 10646 } 10647 break; 10648 10649 case 536: 10650 10651 /* Line 1806 of yacc.c */ 10652 #line 4465 "ripper.y" 10653 { 10654 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, Qnone, (yyvsp[(4) - (4)].val)); 10655 } 10656 break; 10657 10658 case 537: 10659 10660 /* Line 1806 of yacc.c */ 10661 #line 4469 "ripper.y" 10662 { 10663 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnone, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10664 } 10665 break; 10666 10667 case 538: 10668 10669 /* Line 1806 of yacc.c */ 10670 #line 4473 "ripper.y" 10671 { 10672 (yyval.val) = new_args((yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 10673 } 10674 break; 10675 10676 case 539: 10677 10678 /* Line 1806 of yacc.c */ 10679 #line 4477 "ripper.y" 10680 { 10681 (yyval.val) = new_args((yyvsp[(1) - (6)].val), Qnone, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10682 } 10683 break; 10684 10685 case 540: 10686 10687 /* Line 1806 of yacc.c */ 10688 #line 4481 "ripper.y" 10689 { 10690 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].val)); 10691 } 10692 break; 10693 10694 case 541: 10695 10696 /* Line 1806 of yacc.c */ 10697 #line 4485 "ripper.y" 10698 { 10699 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 10700 } 10701 break; 10702 10703 case 542: 10704 10705 /* Line 1806 of yacc.c */ 10706 #line 4489 "ripper.y" 10707 { 10708 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10709 } 10710 break; 10711 10712 case 543: 10713 10714 /* Line 1806 of yacc.c */ 10715 #line 4493 "ripper.y" 10716 { 10717 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (2)].val), Qnone, Qnone, (yyvsp[(2) - (2)].val)); 10718 } 10719 break; 10720 10721 case 544: 10722 10723 /* Line 1806 of yacc.c */ 10724 #line 4497 "ripper.y" 10725 { 10726 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10727 } 10728 break; 10729 10730 case 545: 10731 10732 /* Line 1806 of yacc.c */ 10733 #line 4501 "ripper.y" 10734 { 10735 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 10736 } 10737 break; 10738 10739 case 546: 10740 10741 /* Line 1806 of yacc.c */ 10742 #line 4505 "ripper.y" 10743 { 10744 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10745 } 10746 break; 10747 10748 case 547: 10749 10750 /* Line 1806 of yacc.c */ 10751 #line 4509 "ripper.y" 10752 { 10753 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].val)); 10754 } 10755 break; 10756 10757 case 548: 10758 10759 /* Line 1806 of yacc.c */ 10760 #line 4513 "ripper.y" 10761 { 10762 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 10763 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyval.val)); 10764 } 10765 break; 10766 10767 case 549: 10768 10769 /* Line 1806 of yacc.c */ 10770 #line 4520 "ripper.y" 10771 { 10772 #if 0 10773 yyerror("formal argument cannot be a constant"); 10774 (yyval.val) = 0; 10775 #endif 10776 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10777 10778 } 10779 break; 10780 10781 case 550: 10782 10783 /* Line 1806 of yacc.c */ 10784 #line 4529 "ripper.y" 10785 { 10786 #if 0 10787 yyerror("formal argument cannot be an instance variable"); 10788 (yyval.val) = 0; 10789 #endif 10790 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10791 10792 } 10793 break; 10794 10795 case 551: 10796 10797 /* Line 1806 of yacc.c */ 10798 #line 4538 "ripper.y" 10799 { 10800 #if 0 10801 yyerror("formal argument cannot be a global variable"); 10802 (yyval.val) = 0; 10803 #endif 10804 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10805 10806 } 10807 break; 10808 10809 case 552: 10810 10811 /* Line 1806 of yacc.c */ 10812 #line 4547 "ripper.y" 10813 { 10814 #if 0 10815 yyerror("formal argument cannot be a class variable"); 10816 (yyval.val) = 0; 10817 #endif 10818 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10819 10820 } 10821 break; 10822 10823 case 554: 10824 10825 /* Line 1806 of yacc.c */ 10826 #line 4559 "ripper.y" 10827 { 10828 formal_argument(get_id((yyvsp[(1) - (1)].val))); 10829 (yyval.val) = (yyvsp[(1) - (1)].val); 10830 } 10831 break; 10832 10833 case 555: 10834 10835 /* Line 1806 of yacc.c */ 10836 #line 4566 "ripper.y" 10837 { 10838 arg_var(get_id((yyvsp[(1) - (1)].val))); 10839 #if 0 10840 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); 10841 #endif 10842 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 10843 10844 } 10845 break; 10846 10847 case 556: 10848 10849 /* Line 1806 of yacc.c */ 10850 #line 4575 "ripper.y" 10851 { 10852 ID tid = internal_id(); 10853 arg_var(tid); 10854 #if 0 10855 if (dyna_in_block()) { 10856 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); 10857 } 10858 else { 10859 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); 10860 } 10861 (yyval.val) = NEW_ARGS_AUX(tid, 1); 10862 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); 10863 #endif 10864 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 10865 10866 } 10867 break; 10868 10869 case 557: 10870 10871 /* Line 1806 of yacc.c */ 10872 #line 4596 "ripper.y" 10873 { 10874 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10875 } 10876 break; 10877 10878 case 558: 10879 10880 /* Line 1806 of yacc.c */ 10881 #line 4601 "ripper.y" 10882 { 10883 #if 0 10884 (yyval.val) = (yyvsp[(1) - (3)].val); 10885 (yyval.val)->nd_plen++; 10886 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); 10887 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); 10888 #endif 10889 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10890 10891 } 10892 break; 10893 10894 case 559: 10895 10896 /* Line 1806 of yacc.c */ 10897 #line 4614 "ripper.y" 10898 { 10899 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].val)))); 10900 (yyval.val) = assignable((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10901 #if 0 10902 (yyval.val) = NEW_KW_ARG(0, (yyval.val)); 10903 #endif 10904 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(2) - (2)].val)); 10905 10906 } 10907 break; 10908 10909 case 560: 10910 10911 /* Line 1806 of yacc.c */ 10912 #line 4626 "ripper.y" 10913 { 10914 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].val)))); 10915 (yyval.val) = assignable((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10916 #if 0 10917 (yyval.val) = NEW_KW_ARG(0, (yyval.val)); 10918 #endif 10919 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(2) - (2)].val)); 10920 10921 } 10922 break; 10923 10924 case 561: 10925 10926 /* Line 1806 of yacc.c */ 10927 #line 4638 "ripper.y" 10928 { 10929 #if 0 10930 (yyval.val) = (yyvsp[(1) - (1)].val); 10931 #endif 10932 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10933 10934 } 10935 break; 10936 10937 case 562: 10938 10939 /* Line 1806 of yacc.c */ 10940 #line 4646 "ripper.y" 10941 { 10942 #if 0 10943 NODE *kws = (yyvsp[(1) - (3)].val); 10944 10945 while (kws->nd_next) { 10946 kws = kws->nd_next; 10947 } 10948 kws->nd_next = (yyvsp[(3) - (3)].val); 10949 (yyval.val) = (yyvsp[(1) - (3)].val); 10950 #endif 10951 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10952 10953 } 10954 break; 10955 10956 case 563: 10957 10958 /* Line 1806 of yacc.c */ 10959 #line 4663 "ripper.y" 10960 { 10961 #if 0 10962 (yyval.val) = (yyvsp[(1) - (1)].val); 10963 #endif 10964 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10965 10966 } 10967 break; 10968 10969 case 564: 10970 10971 /* Line 1806 of yacc.c */ 10972 #line 4671 "ripper.y" 10973 { 10974 #if 0 10975 NODE *kws = (yyvsp[(1) - (3)].val); 10976 10977 while (kws->nd_next) { 10978 kws = kws->nd_next; 10979 } 10980 kws->nd_next = (yyvsp[(3) - (3)].val); 10981 (yyval.val) = (yyvsp[(1) - (3)].val); 10982 #endif 10983 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10984 10985 } 10986 break; 10987 10988 case 567: 10989 10990 /* Line 1806 of yacc.c */ 10991 #line 4691 "ripper.y" 10992 { 10993 shadowing_lvar(get_id((yyvsp[(2) - (2)].val))); 10994 (yyval.val) = (yyvsp[(2) - (2)].val); 10995 } 10996 break; 10997 10998 case 568: 10999 11000 /* Line 1806 of yacc.c */ 11001 #line 4696 "ripper.y" 11002 { 11003 (yyval.val) = internal_id(); 11004 } 11005 break; 11006 11007 case 569: 11008 11009 /* Line 1806 of yacc.c */ 11010 #line 4702 "ripper.y" 11011 { 11012 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 11013 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11014 #if 0 11015 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 11016 #endif 11017 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 11018 11019 } 11020 break; 11021 11022 case 570: 11023 11024 /* Line 1806 of yacc.c */ 11025 #line 4714 "ripper.y" 11026 { 11027 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 11028 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11029 #if 0 11030 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 11031 #endif 11032 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 11033 11034 } 11035 break; 11036 11037 case 571: 11038 11039 /* Line 1806 of yacc.c */ 11040 #line 4726 "ripper.y" 11041 { 11042 #if 0 11043 (yyval.val) = (yyvsp[(1) - (1)].val); 11044 #endif 11045 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11046 11047 } 11048 break; 11049 11050 case 572: 11051 11052 /* Line 1806 of yacc.c */ 11053 #line 4734 "ripper.y" 11054 { 11055 #if 0 11056 NODE *opts = (yyvsp[(1) - (3)].val); 11057 11058 while (opts->nd_next) { 11059 opts = opts->nd_next; 11060 } 11061 opts->nd_next = (yyvsp[(3) - (3)].val); 11062 (yyval.val) = (yyvsp[(1) - (3)].val); 11063 #endif 11064 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11065 11066 } 11067 break; 11068 11069 case 573: 11070 11071 /* Line 1806 of yacc.c */ 11072 #line 4750 "ripper.y" 11073 { 11074 #if 0 11075 (yyval.val) = (yyvsp[(1) - (1)].val); 11076 #endif 11077 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11078 11079 } 11080 break; 11081 11082 case 574: 11083 11084 /* Line 1806 of yacc.c */ 11085 #line 4758 "ripper.y" 11086 { 11087 #if 0 11088 NODE *opts = (yyvsp[(1) - (3)].val); 11089 11090 while (opts->nd_next) { 11091 opts = opts->nd_next; 11092 } 11093 opts->nd_next = (yyvsp[(3) - (3)].val); 11094 (yyval.val) = (yyvsp[(1) - (3)].val); 11095 #endif 11096 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11097 11098 } 11099 break; 11100 11101 case 577: 11102 11103 /* Line 1806 of yacc.c */ 11104 #line 4778 "ripper.y" 11105 { 11106 #if 0 11107 if (!is_local_id((yyvsp[(2) - (2)].val))) 11108 yyerror("rest argument must be local variable"); 11109 #endif 11110 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 11111 #if 0 11112 (yyval.val) = (yyvsp[(2) - (2)].val); 11113 #endif 11114 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); 11115 11116 } 11117 break; 11118 11119 case 578: 11120 11121 /* Line 1806 of yacc.c */ 11122 #line 4791 "ripper.y" 11123 { 11124 #if 0 11125 (yyval.val) = internal_id(); 11126 arg_var((yyval.val)); 11127 #endif 11128 (yyval.val) = dispatch1(rest_param, Qnil); 11129 11130 } 11131 break; 11132 11133 case 581: 11134 11135 /* Line 1806 of yacc.c */ 11136 #line 4806 "ripper.y" 11137 { 11138 #if 0 11139 if (!is_local_id((yyvsp[(2) - (2)].val))) 11140 yyerror("block argument must be local variable"); 11141 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) 11142 yyerror("duplicated block argument name"); 11143 #endif 11144 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 11145 #if 0 11146 (yyval.val) = (yyvsp[(2) - (2)].val); 11147 #endif 11148 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); 11149 11150 } 11151 break; 11152 11153 case 582: 11154 11155 /* Line 1806 of yacc.c */ 11156 #line 4823 "ripper.y" 11157 { 11158 (yyval.val) = (yyvsp[(2) - (2)].val); 11159 } 11160 break; 11161 11162 case 583: 11163 11164 /* Line 1806 of yacc.c */ 11165 #line 4827 "ripper.y" 11166 { 11167 #if 0 11168 (yyval.val) = 0; 11169 #endif 11170 (yyval.val) = Qundef; 11171 11172 } 11173 break; 11174 11175 case 584: 11176 11177 /* Line 1806 of yacc.c */ 11178 #line 4837 "ripper.y" 11179 { 11180 #if 0 11181 value_expr((yyvsp[(1) - (1)].val)); 11182 (yyval.val) = (yyvsp[(1) - (1)].val); 11183 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 11184 #endif 11185 (yyval.val) = (yyvsp[(1) - (1)].val); 11186 11187 } 11188 break; 11189 11190 case 585: 11191 11192 /* Line 1806 of yacc.c */ 11193 #line 4846 "ripper.y" 11194 {lex_state = EXPR_BEG;} 11195 break; 11196 11197 case 586: 11198 11199 /* Line 1806 of yacc.c */ 11200 #line 4847 "ripper.y" 11201 { 11202 #if 0 11203 if ((yyvsp[(3) - (4)].val) == 0) { 11204 yyerror("can't define singleton method for ()."); 11205 } 11206 else { 11207 switch (nd_type((yyvsp[(3) - (4)].val))) { 11208 case NODE_STR: 11209 case NODE_DSTR: 11210 case NODE_XSTR: 11211 case NODE_DXSTR: 11212 case NODE_DREGX: 11213 case NODE_LIT: 11214 case NODE_ARRAY: 11215 case NODE_ZARRAY: 11216 yyerror("can't define singleton method for literals"); 11217 default: 11218 value_expr((yyvsp[(3) - (4)].val)); 11219 break; 11220 } 11221 } 11222 (yyval.val) = (yyvsp[(3) - (4)].val); 11223 #endif 11224 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); 11225 11226 } 11227 break; 11228 11229 case 588: 11230 11231 /* Line 1806 of yacc.c */ 11232 #line 4877 "ripper.y" 11233 { 11234 #if 0 11235 (yyval.val) = (yyvsp[(1) - (2)].val); 11236 #endif 11237 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); 11238 11239 } 11240 break; 11241 11242 case 589: 11243 11244 /* Line 1806 of yacc.c */ 11245 #line 4889 "ripper.y" 11246 { 11247 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11248 } 11249 break; 11250 11251 case 590: 11252 11253 /* Line 1806 of yacc.c */ 11254 #line 4894 "ripper.y" 11255 { 11256 #if 0 11257 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11258 #endif 11259 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11260 11261 } 11262 break; 11263 11264 case 591: 11265 11266 /* Line 1806 of yacc.c */ 11267 #line 4904 "ripper.y" 11268 { 11269 #if 0 11270 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 11271 #endif 11272 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11273 11274 } 11275 break; 11276 11277 case 592: 11278 11279 /* Line 1806 of yacc.c */ 11280 #line 4912 "ripper.y" 11281 { 11282 #if 0 11283 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); 11284 #endif 11285 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 11286 11287 } 11288 break; 11289 11290 case 593: 11291 11292 /* Line 1806 of yacc.c */ 11293 #line 4920 "ripper.y" 11294 { 11295 #if 0 11296 (yyval.val) = list_append(NEW_LIST(0), (yyvsp[(2) - (2)].val)); 11297 #endif 11298 (yyval.val) = dispatch1(assoc_splat, (yyvsp[(2) - (2)].val)); 11299 11300 } 11301 break; 11302 11303 case 604: 11304 11305 /* Line 1806 of yacc.c */ 11306 #line 4950 "ripper.y" 11307 { (yyval.val) = (yyvsp[(1) - (1)].val); } 11308 break; 11309 11310 case 605: 11311 11312 /* Line 1806 of yacc.c */ 11313 #line 4955 "ripper.y" 11314 { (yyval.val) = (yyvsp[(1) - (1)].val); } 11315 break; 11316 11317 case 615: 11318 11319 /* Line 1806 of yacc.c */ 11320 #line 4978 "ripper.y" 11321 {yyerrok;} 11322 break; 11323 11324 case 618: 11325 11326 /* Line 1806 of yacc.c */ 11327 #line 4983 "ripper.y" 11328 {yyerrok;} 11329 break; 11330 11331 case 619: 11332 11333 /* Line 1806 of yacc.c */ 11334 #line 4987 "ripper.y" 11335 { 11336 #if 0 11337 (yyval.val) = 0; 11338 #endif 11339 (yyval.val) = Qundef; 11340 11341 } 11342 break; 11343 11344 11345 11346 /* Line 1806 of yacc.c */ 11347 #line 11346 "parse.c" 11348 default: break; 11349 } 11350 /* User semantic actions sometimes alter yychar, and that requires 11351 that yytoken be updated with the new translation. We take the 11352 approach of translating immediately before every use of yytoken. 11353 One alternative is translating here after every semantic action, 11354 but that translation would be missed if the semantic action invokes 11355 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 11356 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 11357 incorrect destructor might then be invoked immediately. In the 11358 case of YYERROR or YYBACKUP, subsequent parser actions might lead 11359 to an incorrect destructor call or verbose syntax error message 11360 before the lookahead is translated. */ 11361 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 11362 11363 YYPOPSTACK (yylen); 11364 yylen = 0; 11365 YY_STACK_PRINT (yyss, yyssp); 11366 11367 *++yyvsp = yyval; 11368 11369 /* Now `shift' the result of the reduction. Determine what state 11370 that goes to, based on the state we popped back to and the rule 11371 number reduced by. */ 11372 11373 yyn = yyr1[yyn]; 11374 11375 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 11376 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 11377 yystate = yytable[yystate]; 11378 else 11379 yystate = yydefgoto[yyn - YYNTOKENS]; 11380 11381 goto yynewstate; 11382 11383 11384 /*------------------------------------. 11385 | yyerrlab -- here on detecting error | 11386 `------------------------------------*/ 11387 yyerrlab: 11388 /* Make sure we have latest lookahead translation. See comments at 11389 user semantic actions for why this is necessary. */ 11390 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 11391 11392 /* If not already recovering from an error, report this error. */ 11393 if (!yyerrstatus) 11394 { 11395 ++yynerrs; 11396 #if ! YYERROR_VERBOSE 11397 parser_yyerror (parser, YY_("syntax error")); 11398 #else 11399 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 11400 yyssp, yytoken) 11401 { 11402 char const *yymsgp = YY_("syntax error"); 11403 int yysyntax_error_status; 11404 yysyntax_error_status = YYSYNTAX_ERROR; 11405 if (yysyntax_error_status == 0) 11406 yymsgp = yymsg; 11407 else if (yysyntax_error_status == 1) 11408 { 11409 if (yymsg != yymsgbuf) 11410 YYSTACK_FREE (yymsg); 11411 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 11412 if (!yymsg) 11413 { 11414 yymsg = yymsgbuf; 11415 yymsg_alloc = sizeof yymsgbuf; 11416 yysyntax_error_status = 2; 11417 } 11418 else 11419 { 11420 yysyntax_error_status = YYSYNTAX_ERROR; 11421 yymsgp = yymsg; 11422 } 11423 } 11424 parser_yyerror (parser, yymsgp); 11425 if (yysyntax_error_status == 2) 11426 goto yyexhaustedlab; 11427 } 11428 # undef YYSYNTAX_ERROR 11429 #endif 11430 } 11431 11432 11433 11434 if (yyerrstatus == 3) 11435 { 11436 /* If just tried and failed to reuse lookahead token after an 11437 error, discard it. */ 11438 11439 if (yychar <= YYEOF) 11440 { 11441 /* Return failure if at end of input. */ 11442 if (yychar == YYEOF) 11443 YYABORT; 11444 } 11445 else 11446 { 11447 yydestruct ("Error: discarding", 11448 yytoken, &yylval, parser); 11449 yychar = YYEMPTY; 11450 } 11451 } 11452 11453 /* Else will try to reuse lookahead token after shifting the error 11454 token. */ 11455 goto yyerrlab1; 11456 11457 11458 /*---------------------------------------------------. 11459 | yyerrorlab -- error raised explicitly by YYERROR. | 11460 `---------------------------------------------------*/ 11461 yyerrorlab: 11462 11463 /* Pacify compilers like GCC when the user code never invokes 11464 YYERROR and the label yyerrorlab therefore never appears in user 11465 code. */ 11466 if (/*CONSTCOND*/ 0) 11467 goto yyerrorlab; 11468 11469 /* Do not reclaim the symbols of the rule which action triggered 11470 this YYERROR. */ 11471 YYPOPSTACK (yylen); 11472 yylen = 0; 11473 YY_STACK_PRINT (yyss, yyssp); 11474 yystate = *yyssp; 11475 goto yyerrlab1; 11476 11477 11478 /*-------------------------------------------------------------. 11479 | yyerrlab1 -- common code for both syntax error and YYERROR. | 11480 `-------------------------------------------------------------*/ 11481 yyerrlab1: 11482 yyerrstatus = 3; /* Each real token shifted decrements this. */ 11483 11484 for (;;) 11485 { 11486 yyn = yypact[yystate]; 11487 if (!yypact_value_is_default (yyn)) 11488 { 11489 yyn += YYTERROR; 11490 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 11491 { 11492 yyn = yytable[yyn]; 11493 if (0 < yyn) 11494 break; 11495 } 11496 } 11497 11498 /* Pop the current state because it cannot handle the error token. */ 11499 if (yyssp == yyss) 11500 YYABORT; 11501 11502 11503 yydestruct ("Error: popping", 11504 yystos[yystate], yyvsp, parser); 11505 YYPOPSTACK (1); 11506 yystate = *yyssp; 11507 YY_STACK_PRINT (yyss, yyssp); 11508 } 11509 11510 *++yyvsp = yylval; 11511 11512 11513 /* Shift the error token. */ 11514 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 11515 11516 yystate = yyn; 11517 goto yynewstate; 11518 11519 11520 /*-------------------------------------. 11521 | yyacceptlab -- YYACCEPT comes here. | 11522 `-------------------------------------*/ 11523 yyacceptlab: 11524 yyresult = 0; 11525 goto yyreturn; 11526 11527 /*-----------------------------------. 11528 | yyabortlab -- YYABORT comes here. | 11529 `-----------------------------------*/ 11530 yyabortlab: 11531 yyresult = 1; 11532 goto yyreturn; 11533 11534 #if !defined(yyoverflow) || YYERROR_VERBOSE 11535 /*-------------------------------------------------. 11536 | yyexhaustedlab -- memory exhaustion comes here. | 11537 `-------------------------------------------------*/ 11538 yyexhaustedlab: 11539 parser_yyerror (parser, YY_("memory exhausted")); 11540 yyresult = 2; 11541 /* Fall through. */ 11542 #endif 11543 11544 yyreturn: 11545 if (yychar != YYEMPTY) 11546 { 11547 /* Make sure we have latest lookahead translation. See comments at 11548 user semantic actions for why this is necessary. */ 11549 yytoken = YYTRANSLATE (yychar); 11550 yydestruct ("Cleanup: discarding lookahead", 11551 yytoken, &yylval, parser); 11552 } 11553 /* Do not reclaim the symbols of the rule which action triggered 11554 this YYABORT or YYACCEPT. */ 11555 YYPOPSTACK (yylen); 11556 YY_STACK_PRINT (yyss, yyssp); 11557 while (yyssp != yyss) 11558 { 11559 yydestruct ("Cleanup: popping", 11560 yystos[*yyssp], yyvsp, parser); 11561 YYPOPSTACK (1); 11562 } 11563 #ifndef yyoverflow 11564 if (yyss != yyssa) 11565 YYSTACK_FREE (yyss); 11566 #endif 11567 #if YYERROR_VERBOSE 11568 if (yymsg != yymsgbuf) 11569 YYSTACK_FREE (yymsg); 11570 #endif 11571 /* Make sure YYID is used. */ 11572 return YYID (yyresult); 11573 } 11574 11575 11576 11577 /* Line 2067 of yacc.c */ 11578 #line 4995 "ripper.y" 11579 11580 # undef parser 11581 # undef yylex 11582 # undef yylval 11583 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 11584 11585 static int parser_regx_options(struct parser_params*); 11586 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 11587 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 11588 static int parser_parse_string(struct parser_params*,NODE*); 11589 static int parser_here_document(struct parser_params*,NODE*); 11590 11591 11592 # define nextc() parser_nextc(parser) 11593 # define pushback(c) parser_pushback(parser, (c)) 11594 # define newtok() parser_newtok(parser) 11595 # define tokspace(n) parser_tokspace(parser, (n)) 11596 # define tokadd(c) parser_tokadd(parser, (c)) 11597 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 11598 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 11599 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 11600 # define regx_options() parser_regx_options(parser) 11601 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 11602 # define parse_string(n) parser_parse_string(parser,(n)) 11603 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 11604 # define here_document(n) parser_here_document(parser,(n)) 11605 # define heredoc_identifier() parser_heredoc_identifier(parser) 11606 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 11607 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 11608 11609 #ifndef RIPPER 11610 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 11611 # define set_yylval_num(x) (yylval.num = (x)) 11612 # define set_yylval_id(x) (yylval.id = (x)) 11613 # define set_yylval_name(x) (yylval.id = (x)) 11614 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 11615 # define set_yylval_node(x) (yylval.node = (x)) 11616 # define yylval_id() (yylval.id) 11617 #else 11618 static inline VALUE 11619 ripper_yylval_id(ID x) 11620 { 11621 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 11622 } 11623 # define set_yylval_str(x) (void)(x) 11624 # define set_yylval_num(x) (void)(x) 11625 # define set_yylval_id(x) (void)(x) 11626 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 11627 # define set_yylval_literal(x) (void)(x) 11628 # define set_yylval_node(x) (void)(x) 11629 # define yylval_id() yylval.id 11630 #endif 11631 11632 #ifndef RIPPER 11633 #define ripper_flush(p) (void)(p) 11634 #else 11635 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 11636 11637 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 11638 11639 static int 11640 ripper_has_scan_event(struct parser_params *parser) 11641 { 11642 11643 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 11644 return lex_p > parser->tokp; 11645 } 11646 11647 static VALUE 11648 ripper_scan_event_val(struct parser_params *parser, int t) 11649 { 11650 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 11651 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 11652 ripper_flush(parser); 11653 return rval; 11654 } 11655 11656 static void 11657 ripper_dispatch_scan_event(struct parser_params *parser, int t) 11658 { 11659 if (!ripper_has_scan_event(parser)) return; 11660 yylval_rval = ripper_scan_event_val(parser, t); 11661 } 11662 11663 static void 11664 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 11665 { 11666 if (!ripper_has_scan_event(parser)) return; 11667 (void)ripper_scan_event_val(parser, t); 11668 } 11669 11670 static void 11671 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 11672 { 11673 int saved_line = ruby_sourceline; 11674 const char *saved_tokp = parser->tokp; 11675 11676 ruby_sourceline = parser->delayed_line; 11677 parser->tokp = lex_pbeg + parser->delayed_col; 11678 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 11679 parser->delayed = Qnil; 11680 ruby_sourceline = saved_line; 11681 parser->tokp = saved_tokp; 11682 } 11683 #endif /* RIPPER */ 11684 11685 #include "ruby/regex.h" 11686 #include "ruby/util.h" 11687 11688 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 11689 since ours (we hope) works properly with all combinations of 11690 machines, compilers, `char' and `unsigned char' argument types. 11691 (Per Bothner suggested the basic approach.) */ 11692 #undef SIGN_EXTEND_CHAR 11693 #if __STDC__ 11694 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 11695 #else /* not __STDC__ */ 11696 /* As in Harbison and Steele. */ 11697 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 11698 #endif 11699 11700 #define parser_encoding_name() (current_enc->name) 11701 #define parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) 11702 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) 11703 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 11704 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) 11705 11706 #define parser_isascii() ISASCII(*(lex_p-1)) 11707 11708 #ifndef RIPPER 11709 static int 11710 token_info_get_column(struct parser_params *parser, const char *token) 11711 { 11712 int column = 1; 11713 const char *p, *pend = lex_p - strlen(token); 11714 for (p = lex_pbeg; p < pend; p++) { 11715 if (*p == '\t') { 11716 column = (((column - 1) / 8) + 1) * 8; 11717 } 11718 column++; 11719 } 11720 return column; 11721 } 11722 11723 static int 11724 token_info_has_nonspaces(struct parser_params *parser, const char *token) 11725 { 11726 const char *p, *pend = lex_p - strlen(token); 11727 for (p = lex_pbeg; p < pend; p++) { 11728 if (*p != ' ' && *p != '\t') { 11729 return 1; 11730 } 11731 } 11732 return 0; 11733 } 11734 11735 #undef token_info_push 11736 static void 11737 token_info_push(struct parser_params *parser, const char *token) 11738 { 11739 token_info *ptinfo; 11740 11741 if (!parser->parser_token_info_enabled) return; 11742 ptinfo = ALLOC(token_info); 11743 ptinfo->token = token; 11744 ptinfo->linenum = ruby_sourceline; 11745 ptinfo->column = token_info_get_column(parser, token); 11746 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 11747 ptinfo->next = parser->parser_token_info; 11748 11749 parser->parser_token_info = ptinfo; 11750 } 11751 11752 #undef token_info_pop 11753 static void 11754 token_info_pop(struct parser_params *parser, const char *token) 11755 { 11756 int linenum; 11757 token_info *ptinfo = parser->parser_token_info; 11758 11759 if (!ptinfo) return; 11760 parser->parser_token_info = ptinfo->next; 11761 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 11762 goto finish; 11763 } 11764 linenum = ruby_sourceline; 11765 if (linenum == ptinfo->linenum) { /* SKIP */ 11766 goto finish; 11767 } 11768 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 11769 goto finish; 11770 } 11771 if (parser->parser_token_info_enabled) { 11772 rb_compile_warn(ruby_sourcefile, linenum, 11773 "mismatched indentations at '%s' with '%s' at %d", 11774 token, ptinfo->token, ptinfo->linenum); 11775 } 11776 11777 finish: 11778 xfree(ptinfo); 11779 } 11780 #endif /* RIPPER */ 11781 11782 static int 11783 parser_yyerror(struct parser_params *parser, const char *msg) 11784 { 11785 #ifndef RIPPER 11786 const int max_line_margin = 30; 11787 const char *p, *pe; 11788 char *buf; 11789 long len; 11790 int i; 11791 11792 compile_error(PARSER_ARG "%s", msg); 11793 p = lex_p; 11794 while (lex_pbeg <= p) { 11795 if (*p == '\n') break; 11796 p--; 11797 } 11798 p++; 11799 11800 pe = lex_p; 11801 while (pe < lex_pend) { 11802 if (*pe == '\n') break; 11803 pe++; 11804 } 11805 11806 len = pe - p; 11807 if (len > 4) { 11808 char *p2; 11809 const char *pre = "", *post = ""; 11810 11811 if (len > max_line_margin * 2 + 10) { 11812 if (lex_p - p > max_line_margin) { 11813 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 11814 pre = "..."; 11815 } 11816 if (pe - lex_p > max_line_margin) { 11817 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 11818 post = "..."; 11819 } 11820 len = pe - p; 11821 } 11822 buf = ALLOCA_N(char, len+2); 11823 MEMCPY(buf, p, char, len); 11824 buf[len] = '\0'; 11825 rb_compile_error_append("%s%s%s", pre, buf, post); 11826 11827 i = (int)(lex_p - p); 11828 p2 = buf; pe = buf + len; 11829 11830 while (p2 < pe) { 11831 if (*p2 != '\t') *p2 = ' '; 11832 p2++; 11833 } 11834 buf[i] = '^'; 11835 buf[i+1] = '\0'; 11836 rb_compile_error_append("%s%s", pre, buf); 11837 } 11838 #else 11839 dispatch1(parse_error, STR_NEW2(msg)); 11840 #endif /* !RIPPER */ 11841 return 0; 11842 } 11843 11844 static void parser_prepare(struct parser_params *parser); 11845 11846 #ifndef RIPPER 11847 static VALUE 11848 debug_lines(const char *f) 11849 { 11850 ID script_lines; 11851 CONST_ID(script_lines, "SCRIPT_LINES__"); 11852 if (rb_const_defined_at(rb_cObject, script_lines)) { 11853 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 11854 if (RB_TYPE_P(hash, T_HASH)) { 11855 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 11856 VALUE lines = rb_ary_new(); 11857 rb_hash_aset(hash, fname, lines); 11858 return lines; 11859 } 11860 } 11861 return 0; 11862 } 11863 11864 static VALUE 11865 coverage(const char *f, int n) 11866 { 11867 VALUE coverages = rb_get_coverages(); 11868 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 11869 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 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); 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, 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, const char *f, int line) 11949 { 11950 ruby_sourcefile = ruby_strdup(f); 11951 ruby_sourceline = line - 1; 11952 return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser); 11953 } 11954 #endif /* !RIPPER */ 11955 11956 static rb_encoding * 11957 must_be_ascii_compatible(VALUE s) 11958 { 11959 rb_encoding *enc = rb_enc_get(s); 11960 if (!rb_enc_asciicompat(enc)) { 11961 rb_raise(rb_eArgError, "invalid source encoding"); 11962 } 11963 return enc; 11964 } 11965 11966 static VALUE 11967 lex_get_str(struct parser_params *parser, VALUE s) 11968 { 11969 char *beg, *end, *pend; 11970 rb_encoding *enc = must_be_ascii_compatible(s); 11971 11972 beg = RSTRING_PTR(s); 11973 if (lex_gets_ptr) { 11974 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11975 beg += lex_gets_ptr; 11976 } 11977 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11978 end = beg; 11979 while (end < pend) { 11980 if (*end++ == '\n') break; 11981 } 11982 lex_gets_ptr = end - RSTRING_PTR(s); 11983 return rb_enc_str_new(beg, end - beg, enc); 11984 } 11985 11986 static VALUE 11987 lex_getline(struct parser_params *parser) 11988 { 11989 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11990 if (NIL_P(line)) return line; 11991 must_be_ascii_compatible(line); 11992 #ifndef RIPPER 11993 if (ruby_debug_lines) { 11994 rb_enc_associate(line, current_enc); 11995 rb_ary_push(ruby_debug_lines, line); 11996 } 11997 if (ruby_coverage) { 11998 rb_ary_push(ruby_coverage, Qnil); 11999 } 12000 #endif 12001 return line; 12002 } 12003 12004 #ifdef RIPPER 12005 static rb_data_type_t parser_data_type; 12006 #else 12007 static const rb_data_type_t parser_data_type; 12008 12009 static NODE* 12010 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 12011 { 12012 struct parser_params *parser; 12013 NODE *node; 12014 12015 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12016 lex_gets = lex_get_str; 12017 lex_gets_ptr = 0; 12018 lex_input = s; 12019 lex_pbeg = lex_p = lex_pend = 0; 12020 compile_for_eval = rb_parse_in_eval(); 12021 12022 node = yycompile(parser, f, line); 12023 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12024 12025 return node; 12026 } 12027 12028 NODE* 12029 rb_compile_string(const char *f, VALUE s, int line) 12030 { 12031 must_be_ascii_compatible(s); 12032 return parser_compile_string(rb_parser_new(), f, s, line); 12033 } 12034 12035 NODE* 12036 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 12037 { 12038 must_be_ascii_compatible(s); 12039 return parser_compile_string(vparser, f, s, line); 12040 } 12041 12042 NODE* 12043 rb_compile_cstr(const char *f, const char *s, int len, int line) 12044 { 12045 VALUE str = rb_str_new(s, len); 12046 return parser_compile_string(rb_parser_new(), f, str, line); 12047 } 12048 12049 NODE* 12050 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 12051 { 12052 VALUE str = rb_str_new(s, len); 12053 return parser_compile_string(vparser, f, str, line); 12054 } 12055 12056 static VALUE 12057 lex_io_gets(struct parser_params *parser, VALUE io) 12058 { 12059 return rb_io_gets(io); 12060 } 12061 12062 NODE* 12063 rb_compile_file(const char *f, VALUE file, int start) 12064 { 12065 VALUE volatile vparser = rb_parser_new(); 12066 12067 return rb_parser_compile_file(vparser, f, file, start); 12068 } 12069 12070 NODE* 12071 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 12072 { 12073 struct parser_params *parser; 12074 NODE *node; 12075 12076 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12077 lex_gets = lex_io_gets; 12078 lex_input = file; 12079 lex_pbeg = lex_p = lex_pend = 0; 12080 compile_for_eval = rb_parse_in_eval(); 12081 12082 node = yycompile(parser, f, start); 12083 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12084 12085 return node; 12086 } 12087 #endif /* !RIPPER */ 12088 12089 #define STR_FUNC_ESCAPE 0x01 12090 #define STR_FUNC_EXPAND 0x02 12091 #define STR_FUNC_REGEXP 0x04 12092 #define STR_FUNC_QWORDS 0x08 12093 #define STR_FUNC_SYMBOL 0x10 12094 #define STR_FUNC_INDENT 0x20 12095 12096 enum string_type { 12097 str_squote = (0), 12098 str_dquote = (STR_FUNC_EXPAND), 12099 str_xquote = (STR_FUNC_EXPAND), 12100 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 12101 str_sword = (STR_FUNC_QWORDS), 12102 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 12103 str_ssym = (STR_FUNC_SYMBOL), 12104 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 12105 }; 12106 12107 static VALUE 12108 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 12109 { 12110 VALUE str; 12111 12112 str = rb_enc_str_new(p, n, enc); 12113 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 12114 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 12115 } 12116 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 12117 rb_enc_associate(str, rb_ascii8bit_encoding()); 12118 } 12119 } 12120 12121 return str; 12122 } 12123 12124 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 12125 #define lex_eol_p() (lex_p >= lex_pend) 12126 #define peek(c) peek_n((c), 0) 12127 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 12128 12129 static inline int 12130 parser_nextc(struct parser_params *parser) 12131 { 12132 int c; 12133 12134 if (lex_p == lex_pend) { 12135 VALUE v = lex_nextline; 12136 lex_nextline = 0; 12137 if (!v) { 12138 if (parser->eofp) 12139 return -1; 12140 12141 if (!lex_input || NIL_P(v = lex_getline(parser))) { 12142 parser->eofp = Qtrue; 12143 lex_goto_eol(parser); 12144 return -1; 12145 } 12146 } 12147 { 12148 #ifdef RIPPER 12149 if (parser->tokp < lex_pend) { 12150 if (NIL_P(parser->delayed)) { 12151 parser->delayed = rb_str_buf_new(1024); 12152 rb_enc_associate(parser->delayed, current_enc); 12153 rb_str_buf_cat(parser->delayed, 12154 parser->tokp, lex_pend - parser->tokp); 12155 parser->delayed_line = ruby_sourceline; 12156 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 12157 } 12158 else { 12159 rb_str_buf_cat(parser->delayed, 12160 parser->tokp, lex_pend - parser->tokp); 12161 } 12162 } 12163 #endif 12164 if (heredoc_end > 0) { 12165 ruby_sourceline = heredoc_end; 12166 heredoc_end = 0; 12167 } 12168 ruby_sourceline++; 12169 parser->line_count++; 12170 lex_pbeg = lex_p = RSTRING_PTR(v); 12171 lex_pend = lex_p + RSTRING_LEN(v); 12172 ripper_flush(parser); 12173 lex_lastline = v; 12174 } 12175 } 12176 c = (unsigned char)*lex_p++; 12177 if (c == '\r' && peek('\n')) { 12178 lex_p++; 12179 c = '\n'; 12180 } 12181 12182 return c; 12183 } 12184 12185 static void 12186 parser_pushback(struct parser_params *parser, int c) 12187 { 12188 if (c == -1) return; 12189 lex_p--; 12190 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 12191 lex_p--; 12192 } 12193 } 12194 12195 #define was_bol() (lex_p == lex_pbeg + 1) 12196 12197 #define tokfix() (tokenbuf[tokidx]='\0') 12198 #define tok() tokenbuf 12199 #define toklen() tokidx 12200 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 12201 12202 static char* 12203 parser_newtok(struct parser_params *parser) 12204 { 12205 tokidx = 0; 12206 tokline = ruby_sourceline; 12207 if (!tokenbuf) { 12208 toksiz = 60; 12209 tokenbuf = ALLOC_N(char, 60); 12210 } 12211 if (toksiz > 4096) { 12212 toksiz = 60; 12213 REALLOC_N(tokenbuf, char, 60); 12214 } 12215 return tokenbuf; 12216 } 12217 12218 static char * 12219 parser_tokspace(struct parser_params *parser, int n) 12220 { 12221 tokidx += n; 12222 12223 if (tokidx >= toksiz) { 12224 do {toksiz *= 2;} while (toksiz < tokidx); 12225 REALLOC_N(tokenbuf, char, toksiz); 12226 } 12227 return &tokenbuf[tokidx-n]; 12228 } 12229 12230 static void 12231 parser_tokadd(struct parser_params *parser, int c) 12232 { 12233 tokenbuf[tokidx++] = (char)c; 12234 if (tokidx >= toksiz) { 12235 toksiz *= 2; 12236 REALLOC_N(tokenbuf, char, toksiz); 12237 } 12238 } 12239 12240 static int 12241 parser_tok_hex(struct parser_params *parser, size_t *numlen) 12242 { 12243 int c; 12244 12245 c = scan_hex(lex_p, 2, numlen); 12246 if (!*numlen) { 12247 yyerror("invalid hex escape"); 12248 return 0; 12249 } 12250 lex_p += *numlen; 12251 return c; 12252 } 12253 12254 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 12255 12256 /* return value is for ?\u3042 */ 12257 static int 12258 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 12259 int string_literal, int symbol_literal, int regexp_literal) 12260 { 12261 /* 12262 * If string_literal is true, then we allow multiple codepoints 12263 * in \u{}, and add the codepoints to the current token. 12264 * Otherwise we're parsing a character literal and return a single 12265 * codepoint without adding it 12266 */ 12267 12268 int codepoint; 12269 size_t numlen; 12270 12271 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 12272 12273 if (peek('{')) { /* handle \u{...} form */ 12274 do { 12275 if (regexp_literal) { tokadd(*lex_p); } 12276 nextc(); 12277 codepoint = scan_hex(lex_p, 6, &numlen); 12278 if (numlen == 0) { 12279 yyerror("invalid Unicode escape"); 12280 return 0; 12281 } 12282 if (codepoint > 0x10ffff) { 12283 yyerror("invalid Unicode codepoint (too large)"); 12284 return 0; 12285 } 12286 lex_p += numlen; 12287 if (regexp_literal) { 12288 tokcopy((int)numlen); 12289 } 12290 else if (codepoint >= 0x80) { 12291 *encp = rb_utf8_encoding(); 12292 if (string_literal) tokaddmbc(codepoint, *encp); 12293 } 12294 else if (string_literal) { 12295 tokadd(codepoint); 12296 } 12297 } while (string_literal && (peek(' ') || peek('\t'))); 12298 12299 if (!peek('}')) { 12300 yyerror("unterminated Unicode escape"); 12301 return 0; 12302 } 12303 12304 if (regexp_literal) { tokadd('}'); } 12305 nextc(); 12306 } 12307 else { /* handle \uxxxx form */ 12308 codepoint = scan_hex(lex_p, 4, &numlen); 12309 if (numlen < 4) { 12310 yyerror("invalid Unicode escape"); 12311 return 0; 12312 } 12313 lex_p += 4; 12314 if (regexp_literal) { 12315 tokcopy(4); 12316 } 12317 else if (codepoint >= 0x80) { 12318 *encp = rb_utf8_encoding(); 12319 if (string_literal) tokaddmbc(codepoint, *encp); 12320 } 12321 else if (string_literal) { 12322 tokadd(codepoint); 12323 } 12324 } 12325 12326 return codepoint; 12327 } 12328 12329 #define ESCAPE_CONTROL 1 12330 #define ESCAPE_META 2 12331 12332 static int 12333 parser_read_escape(struct parser_params *parser, int flags, 12334 rb_encoding **encp) 12335 { 12336 int c; 12337 size_t numlen; 12338 12339 switch (c = nextc()) { 12340 case '\\': /* Backslash */ 12341 return c; 12342 12343 case 'n': /* newline */ 12344 return '\n'; 12345 12346 case 't': /* horizontal tab */ 12347 return '\t'; 12348 12349 case 'r': /* carriage-return */ 12350 return '\r'; 12351 12352 case 'f': /* form-feed */ 12353 return '\f'; 12354 12355 case 'v': /* vertical tab */ 12356 return '\13'; 12357 12358 case 'a': /* alarm(bell) */ 12359 return '\007'; 12360 12361 case 'e': /* escape */ 12362 return 033; 12363 12364 case '0': case '1': case '2': case '3': /* octal constant */ 12365 case '4': case '5': case '6': case '7': 12366 pushback(c); 12367 c = scan_oct(lex_p, 3, &numlen); 12368 lex_p += numlen; 12369 return c; 12370 12371 case 'x': /* hex constant */ 12372 c = tok_hex(&numlen); 12373 if (numlen == 0) return 0; 12374 return c; 12375 12376 case 'b': /* backspace */ 12377 return '\010'; 12378 12379 case 's': /* space */ 12380 return ' '; 12381 12382 case 'M': 12383 if (flags & ESCAPE_META) goto eof; 12384 if ((c = nextc()) != '-') { 12385 pushback(c); 12386 goto eof; 12387 } 12388 if ((c = nextc()) == '\\') { 12389 if (peek('u')) goto eof; 12390 return read_escape(flags|ESCAPE_META, encp) | 0x80; 12391 } 12392 else if (c == -1 || !ISASCII(c)) goto eof; 12393 else { 12394 return ((c & 0xff) | 0x80); 12395 } 12396 12397 case 'C': 12398 if ((c = nextc()) != '-') { 12399 pushback(c); 12400 goto eof; 12401 } 12402 case 'c': 12403 if (flags & ESCAPE_CONTROL) goto eof; 12404 if ((c = nextc())== '\\') { 12405 if (peek('u')) goto eof; 12406 c = read_escape(flags|ESCAPE_CONTROL, encp); 12407 } 12408 else if (c == '?') 12409 return 0177; 12410 else if (c == -1 || !ISASCII(c)) goto eof; 12411 return c & 0x9f; 12412 12413 eof: 12414 case -1: 12415 yyerror("Invalid escape character syntax"); 12416 return '\0'; 12417 12418 default: 12419 return c; 12420 } 12421 } 12422 12423 static void 12424 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 12425 { 12426 int len = rb_enc_codelen(c, enc); 12427 rb_enc_mbcput(c, tokspace(len), enc); 12428 } 12429 12430 static int 12431 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 12432 { 12433 int c; 12434 int flags = 0; 12435 size_t numlen; 12436 12437 first: 12438 switch (c = nextc()) { 12439 case '\n': 12440 return 0; /* just ignore */ 12441 12442 case '0': case '1': case '2': case '3': /* octal constant */ 12443 case '4': case '5': case '6': case '7': 12444 { 12445 ruby_scan_oct(--lex_p, 3, &numlen); 12446 if (numlen == 0) goto eof; 12447 lex_p += numlen; 12448 tokcopy((int)numlen + 1); 12449 } 12450 return 0; 12451 12452 case 'x': /* hex constant */ 12453 { 12454 tok_hex(&numlen); 12455 if (numlen == 0) return -1; 12456 tokcopy((int)numlen + 2); 12457 } 12458 return 0; 12459 12460 case 'M': 12461 if (flags & ESCAPE_META) goto eof; 12462 if ((c = nextc()) != '-') { 12463 pushback(c); 12464 goto eof; 12465 } 12466 tokcopy(3); 12467 flags |= ESCAPE_META; 12468 goto escaped; 12469 12470 case 'C': 12471 if (flags & ESCAPE_CONTROL) goto eof; 12472 if ((c = nextc()) != '-') { 12473 pushback(c); 12474 goto eof; 12475 } 12476 tokcopy(3); 12477 goto escaped; 12478 12479 case 'c': 12480 if (flags & ESCAPE_CONTROL) goto eof; 12481 tokcopy(2); 12482 flags |= ESCAPE_CONTROL; 12483 escaped: 12484 if ((c = nextc()) == '\\') { 12485 goto first; 12486 } 12487 else if (c == -1) goto eof; 12488 tokadd(c); 12489 return 0; 12490 12491 eof: 12492 case -1: 12493 yyerror("Invalid escape character syntax"); 12494 return -1; 12495 12496 default: 12497 tokadd('\\'); 12498 tokadd(c); 12499 } 12500 return 0; 12501 } 12502 12503 static int 12504 parser_regx_options(struct parser_params *parser) 12505 { 12506 int kcode = 0; 12507 int kopt = 0; 12508 int options = 0; 12509 int c, opt, kc; 12510 12511 newtok(); 12512 while (c = nextc(), ISALPHA(c)) { 12513 if (c == 'o') { 12514 options |= RE_OPTION_ONCE; 12515 } 12516 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 12517 if (kc >= 0) { 12518 if (kc != rb_ascii8bit_encindex()) kcode = c; 12519 kopt = opt; 12520 } 12521 else { 12522 options |= opt; 12523 } 12524 } 12525 else { 12526 tokadd(c); 12527 } 12528 } 12529 options |= kopt; 12530 pushback(c); 12531 if (toklen()) { 12532 tokfix(); 12533 compile_error(PARSER_ARG "unknown regexp option%s - %s", 12534 toklen() > 1 ? "s" : "", tok()); 12535 } 12536 return options | RE_OPTION_ENCODING(kcode); 12537 } 12538 12539 static void 12540 dispose_string(VALUE str) 12541 { 12542 rb_str_free(str); 12543 rb_gc_force_recycle(str); 12544 } 12545 12546 static int 12547 parser_tokadd_mbchar(struct parser_params *parser, int c) 12548 { 12549 int len = parser_precise_mbclen(); 12550 if (!MBCLEN_CHARFOUND_P(len)) { 12551 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 12552 return -1; 12553 } 12554 tokadd(c); 12555 lex_p += --len; 12556 if (len > 0) tokcopy(len); 12557 return c; 12558 } 12559 12560 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 12561 12562 static inline int 12563 simple_re_meta(int c) 12564 { 12565 switch (c) { 12566 case '$': case '*': case '+': case '.': 12567 case '?': case '^': case '|': 12568 case ')': case ']': case '}': case '>': 12569 return TRUE; 12570 default: 12571 return FALSE; 12572 } 12573 } 12574 12575 static int 12576 parser_tokadd_string(struct parser_params *parser, 12577 int func, int term, int paren, long *nest, 12578 rb_encoding **encp) 12579 { 12580 int c; 12581 int has_nonascii = 0; 12582 rb_encoding *enc = *encp; 12583 char *errbuf = 0; 12584 static const char mixed_msg[] = "%s mixed within %s source"; 12585 12586 #define mixed_error(enc1, enc2) if (!errbuf) { \ 12587 size_t len = sizeof(mixed_msg) - 4; \ 12588 len += strlen(rb_enc_name(enc1)); \ 12589 len += strlen(rb_enc_name(enc2)); \ 12590 errbuf = ALLOCA_N(char, len); \ 12591 snprintf(errbuf, len, mixed_msg, \ 12592 rb_enc_name(enc1), \ 12593 rb_enc_name(enc2)); \ 12594 yyerror(errbuf); \ 12595 } 12596 #define mixed_escape(beg, enc1, enc2) do { \ 12597 const char *pos = lex_p; \ 12598 lex_p = (beg); \ 12599 mixed_error((enc1), (enc2)); \ 12600 lex_p = pos; \ 12601 } while (0) 12602 12603 while ((c = nextc()) != -1) { 12604 if (paren && c == paren) { 12605 ++*nest; 12606 } 12607 else if (c == term) { 12608 if (!nest || !*nest) { 12609 pushback(c); 12610 break; 12611 } 12612 --*nest; 12613 } 12614 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 12615 int c2 = *lex_p; 12616 if (c2 == '$' || c2 == '@' || c2 == '{') { 12617 pushback(c); 12618 break; 12619 } 12620 } 12621 else if (c == '\\') { 12622 const char *beg = lex_p - 1; 12623 c = nextc(); 12624 switch (c) { 12625 case '\n': 12626 if (func & STR_FUNC_QWORDS) break; 12627 if (func & STR_FUNC_EXPAND) continue; 12628 tokadd('\\'); 12629 break; 12630 12631 case '\\': 12632 if (func & STR_FUNC_ESCAPE) tokadd(c); 12633 break; 12634 12635 case 'u': 12636 if ((func & STR_FUNC_EXPAND) == 0) { 12637 tokadd('\\'); 12638 break; 12639 } 12640 parser_tokadd_utf8(parser, &enc, 1, 12641 func & STR_FUNC_SYMBOL, 12642 func & STR_FUNC_REGEXP); 12643 if (has_nonascii && enc != *encp) { 12644 mixed_escape(beg, enc, *encp); 12645 } 12646 continue; 12647 12648 default: 12649 if (c == -1) return -1; 12650 if (!ISASCII(c)) { 12651 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 12652 goto non_ascii; 12653 } 12654 if (func & STR_FUNC_REGEXP) { 12655 if (c == term && !simple_re_meta(c)) { 12656 tokadd(c); 12657 continue; 12658 } 12659 pushback(c); 12660 if ((c = tokadd_escape(&enc)) < 0) 12661 return -1; 12662 if (has_nonascii && enc != *encp) { 12663 mixed_escape(beg, enc, *encp); 12664 } 12665 continue; 12666 } 12667 else if (func & STR_FUNC_EXPAND) { 12668 pushback(c); 12669 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 12670 c = read_escape(0, &enc); 12671 } 12672 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12673 /* ignore backslashed spaces in %w */ 12674 } 12675 else if (c != term && !(paren && c == paren)) { 12676 tokadd('\\'); 12677 pushback(c); 12678 continue; 12679 } 12680 } 12681 } 12682 else if (!parser_isascii()) { 12683 non_ascii: 12684 has_nonascii = 1; 12685 if (enc != *encp) { 12686 mixed_error(enc, *encp); 12687 continue; 12688 } 12689 if (tokadd_mbchar(c) == -1) return -1; 12690 continue; 12691 } 12692 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12693 pushback(c); 12694 break; 12695 } 12696 if (c & 0x80) { 12697 has_nonascii = 1; 12698 if (enc != *encp) { 12699 mixed_error(enc, *encp); 12700 continue; 12701 } 12702 } 12703 tokadd(c); 12704 } 12705 *encp = enc; 12706 return c; 12707 } 12708 12709 #define NEW_STRTERM(func, term, paren) \ 12710 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 12711 12712 #ifdef RIPPER 12713 static void 12714 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc) 12715 { 12716 if (!NIL_P(parser->delayed)) { 12717 ptrdiff_t len = lex_p - parser->tokp; 12718 if (len > 0) { 12719 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 12720 } 12721 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12722 parser->tokp = lex_p; 12723 } 12724 } 12725 12726 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc)) 12727 #else 12728 #define flush_string_content(enc) ((void)(enc)) 12729 #endif 12730 12731 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32]; 12732 /* this can be shared with ripper, since it's independent from struct 12733 * parser_params. */ 12734 #ifndef RIPPER 12735 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) 12736 #define SPECIAL_PUNCT(idx) ( \ 12737 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \ 12738 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \ 12739 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \ 12740 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \ 12741 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \ 12742 BIT('0', idx)) 12743 const unsigned int ruby_global_name_punct_bits[] = { 12744 SPECIAL_PUNCT(0), 12745 SPECIAL_PUNCT(1), 12746 SPECIAL_PUNCT(2), 12747 }; 12748 #undef BIT 12749 #undef SPECIAL_PUNCT 12750 #endif 12751 12752 static inline int 12753 is_global_name_punct(const char c) 12754 { 12755 if (c <= 0x20 || 0x7e < c) return 0; 12756 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1; 12757 } 12758 12759 static int 12760 parser_peek_variable_name(struct parser_params *parser) 12761 { 12762 int c; 12763 const char *p = lex_p; 12764 12765 if (p + 1 >= lex_pend) return 0; 12766 c = *p++; 12767 switch (c) { 12768 case '$': 12769 if ((c = *p) == '-') { 12770 if (++p >= lex_pend) return 0; 12771 c = *p; 12772 } 12773 else if (is_global_name_punct(c) || ISDIGIT(c)) { 12774 return tSTRING_DVAR; 12775 } 12776 break; 12777 case '@': 12778 if ((c = *p) == '@') { 12779 if (++p >= lex_pend) return 0; 12780 c = *p; 12781 } 12782 break; 12783 case '{': 12784 lex_p = p; 12785 command_start = TRUE; 12786 return tSTRING_DBEG; 12787 default: 12788 return 0; 12789 } 12790 if (!ISASCII(c) || c == '_' || ISALPHA(c)) 12791 return tSTRING_DVAR; 12792 return 0; 12793 } 12794 12795 static int 12796 parser_parse_string(struct parser_params *parser, NODE *quote) 12797 { 12798 int func = (int)quote->nd_func; 12799 int term = nd_term(quote); 12800 int paren = nd_paren(quote); 12801 int c, space = 0; 12802 rb_encoding *enc = current_enc; 12803 12804 if (func == -1) return tSTRING_END; 12805 c = nextc(); 12806 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12807 do {c = nextc();} while (ISSPACE(c)); 12808 space = 1; 12809 } 12810 if (c == term && !quote->nd_nest) { 12811 if (func & STR_FUNC_QWORDS) { 12812 quote->nd_func = -1; 12813 return ' '; 12814 } 12815 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 12816 set_yylval_num(regx_options()); 12817 return tREGEXP_END; 12818 } 12819 if (space) { 12820 pushback(c); 12821 return ' '; 12822 } 12823 newtok(); 12824 if ((func & STR_FUNC_EXPAND) && c == '#') { 12825 int t = parser_peek_variable_name(parser); 12826 if (t) return t; 12827 tokadd('#'); 12828 c = nextc(); 12829 } 12830 pushback(c); 12831 if (tokadd_string(func, term, paren, "e->nd_nest, 12832 &enc) == -1) { 12833 ruby_sourceline = nd_line(quote); 12834 if (func & STR_FUNC_REGEXP) { 12835 if (parser->eofp) 12836 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 12837 return tREGEXP_END; 12838 } 12839 else { 12840 if (parser->eofp) 12841 compile_error(PARSER_ARG "unterminated string meets end of file"); 12842 return tSTRING_END; 12843 } 12844 } 12845 12846 tokfix(); 12847 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12848 flush_string_content(enc); 12849 12850 return tSTRING_CONTENT; 12851 } 12852 12853 static int 12854 parser_heredoc_identifier(struct parser_params *parser) 12855 { 12856 int c = nextc(), term, func = 0; 12857 long len; 12858 12859 if (c == '-') { 12860 c = nextc(); 12861 func = STR_FUNC_INDENT; 12862 } 12863 switch (c) { 12864 case '\'': 12865 func |= str_squote; goto quoted; 12866 case '"': 12867 func |= str_dquote; goto quoted; 12868 case '`': 12869 func |= str_xquote; 12870 quoted: 12871 newtok(); 12872 tokadd(func); 12873 term = c; 12874 while ((c = nextc()) != -1 && c != term) { 12875 if (tokadd_mbchar(c) == -1) return 0; 12876 } 12877 if (c == -1) { 12878 compile_error(PARSER_ARG "unterminated here document identifier"); 12879 return 0; 12880 } 12881 break; 12882 12883 default: 12884 if (!parser_is_identchar()) { 12885 pushback(c); 12886 if (func & STR_FUNC_INDENT) { 12887 pushback('-'); 12888 } 12889 return 0; 12890 } 12891 newtok(); 12892 term = '"'; 12893 tokadd(func |= str_dquote); 12894 do { 12895 if (tokadd_mbchar(c) == -1) return 0; 12896 } while ((c = nextc()) != -1 && parser_is_identchar()); 12897 pushback(c); 12898 break; 12899 } 12900 12901 tokfix(); 12902 #ifdef RIPPER 12903 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 12904 #endif 12905 len = lex_p - lex_pbeg; 12906 lex_goto_eol(parser); 12907 lex_strterm = rb_node_newnode(NODE_HEREDOC, 12908 STR_NEW(tok(), toklen()), /* nd_lit */ 12909 len, /* nd_nth */ 12910 lex_lastline); /* nd_orig */ 12911 nd_set_line(lex_strterm, ruby_sourceline); 12912 ripper_flush(parser); 12913 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 12914 } 12915 12916 static void 12917 parser_heredoc_restore(struct parser_params *parser, NODE *here) 12918 { 12919 VALUE line; 12920 12921 line = here->nd_orig; 12922 lex_lastline = line; 12923 lex_pbeg = RSTRING_PTR(line); 12924 lex_pend = lex_pbeg + RSTRING_LEN(line); 12925 lex_p = lex_pbeg + here->nd_nth; 12926 heredoc_end = ruby_sourceline; 12927 ruby_sourceline = nd_line(here); 12928 dispose_string(here->nd_lit); 12929 rb_gc_force_recycle((VALUE)here); 12930 ripper_flush(parser); 12931 } 12932 12933 static int 12934 parser_whole_match_p(struct parser_params *parser, 12935 const char *eos, long len, int indent) 12936 { 12937 const char *p = lex_pbeg; 12938 long n; 12939 12940 if (indent) { 12941 while (*p && ISSPACE(*p)) p++; 12942 } 12943 n = lex_pend - (p + len); 12944 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 12945 return strncmp(eos, p, len) == 0; 12946 } 12947 12948 #ifdef RIPPER 12949 static void 12950 ripper_dispatch_heredoc_end(struct parser_params *parser) 12951 { 12952 if (!NIL_P(parser->delayed)) 12953 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12954 lex_goto_eol(parser); 12955 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12956 } 12957 12958 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 12959 #else 12960 #define dispatch_heredoc_end() ((void)0) 12961 #endif 12962 12963 static int 12964 parser_here_document(struct parser_params *parser, NODE *here) 12965 { 12966 int c, func, indent = 0; 12967 const char *eos, *p, *pend; 12968 long len; 12969 VALUE str = 0; 12970 rb_encoding *enc = current_enc; 12971 12972 eos = RSTRING_PTR(here->nd_lit); 12973 len = RSTRING_LEN(here->nd_lit) - 1; 12974 indent = (func = *eos++) & STR_FUNC_INDENT; 12975 12976 if ((c = nextc()) == -1) { 12977 error: 12978 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12979 #ifdef RIPPER 12980 if (NIL_P(parser->delayed)) { 12981 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12982 } 12983 else { 12984 if (str || 12985 ((len = lex_p - parser->tokp) > 0 && 12986 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 12987 rb_str_append(parser->delayed, str); 12988 } 12989 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12990 } 12991 lex_goto_eol(parser); 12992 #endif 12993 restore: 12994 heredoc_restore(lex_strterm); 12995 lex_strterm = 0; 12996 return 0; 12997 } 12998 if (was_bol() && whole_match_p(eos, len, indent)) { 12999 dispatch_heredoc_end(); 13000 heredoc_restore(lex_strterm); 13001 return tSTRING_END; 13002 } 13003 13004 if (!(func & STR_FUNC_EXPAND)) { 13005 do { 13006 p = RSTRING_PTR(lex_lastline); 13007 pend = lex_pend; 13008 if (pend > p) { 13009 switch (pend[-1]) { 13010 case '\n': 13011 if (--pend == p || pend[-1] != '\r') { 13012 pend++; 13013 break; 13014 } 13015 case '\r': 13016 --pend; 13017 } 13018 } 13019 if (str) 13020 rb_str_cat(str, p, pend - p); 13021 else 13022 str = STR_NEW(p, pend - p); 13023 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 13024 lex_goto_eol(parser); 13025 if (nextc() == -1) { 13026 if (str) dispose_string(str); 13027 goto error; 13028 } 13029 } while (!whole_match_p(eos, len, indent)); 13030 } 13031 else { 13032 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 13033 newtok(); 13034 if (c == '#') { 13035 int t = parser_peek_variable_name(parser); 13036 if (t) return t; 13037 tokadd('#'); 13038 c = nextc(); 13039 } 13040 do { 13041 pushback(c); 13042 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 13043 if (parser->eofp) goto error; 13044 goto restore; 13045 } 13046 if (c != '\n') { 13047 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 13048 flush_string_content(enc); 13049 return tSTRING_CONTENT; 13050 } 13051 tokadd(nextc()); 13052 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 13053 if ((c = nextc()) == -1) goto error; 13054 } while (!whole_match_p(eos, len, indent)); 13055 str = STR_NEW3(tok(), toklen(), enc, func); 13056 } 13057 dispatch_heredoc_end(); 13058 heredoc_restore(lex_strterm); 13059 lex_strterm = NEW_STRTERM(-1, 0, 0); 13060 set_yylval_str(str); 13061 return tSTRING_CONTENT; 13062 } 13063 13064 #include "lex.c" 13065 13066 static void 13067 arg_ambiguous_gen(struct parser_params *parser) 13068 { 13069 #ifndef RIPPER 13070 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 13071 #else 13072 dispatch0(arg_ambiguous); 13073 #endif 13074 } 13075 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 13076 13077 static ID 13078 formal_argument_gen(struct parser_params *parser, ID lhs) 13079 { 13080 #ifndef RIPPER 13081 if (!is_local_id(lhs)) 13082 yyerror("formal argument must be local variable"); 13083 #endif 13084 shadowing_lvar(lhs); 13085 return lhs; 13086 } 13087 13088 static int 13089 lvar_defined_gen(struct parser_params *parser, ID id) 13090 { 13091 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 13092 } 13093 13094 /* emacsen -*- hack */ 13095 static long 13096 parser_encode_length(struct parser_params *parser, const char *name, long len) 13097 { 13098 long nlen; 13099 13100 if (len > 5 && name[nlen = len - 5] == '-') { 13101 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 13102 return nlen; 13103 } 13104 if (len > 4 && name[nlen = len - 4] == '-') { 13105 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 13106 return nlen; 13107 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 13108 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 13109 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 13110 return nlen; 13111 } 13112 return len; 13113 } 13114 13115 static void 13116 parser_set_encode(struct parser_params *parser, const char *name) 13117 { 13118 int idx = rb_enc_find_index(name); 13119 rb_encoding *enc; 13120 VALUE excargs[3]; 13121 13122 if (idx < 0) { 13123 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 13124 error: 13125 excargs[0] = rb_eArgError; 13126 excargs[2] = rb_make_backtrace(); 13127 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 13128 rb_exc_raise(rb_make_exception(3, excargs)); 13129 } 13130 enc = rb_enc_from_index(idx); 13131 if (!rb_enc_asciicompat(enc)) { 13132 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 13133 goto error; 13134 } 13135 parser->enc = enc; 13136 #ifndef RIPPER 13137 if (ruby_debug_lines) { 13138 long i, n = RARRAY_LEN(ruby_debug_lines); 13139 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 13140 for (i = 0; i < n; ++i) { 13141 rb_enc_associate_index(*p, idx); 13142 } 13143 } 13144 #endif 13145 } 13146 13147 static int 13148 comment_at_top(struct parser_params *parser) 13149 { 13150 const char *p = lex_pbeg, *pend = lex_p - 1; 13151 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 13152 while (p < pend) { 13153 if (!ISSPACE(*p)) return 0; 13154 p++; 13155 } 13156 return 1; 13157 } 13158 13159 #ifndef RIPPER 13160 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 13161 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 13162 13163 static void 13164 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 13165 { 13166 if (!comment_at_top(parser)) { 13167 return; 13168 } 13169 parser_set_encode(parser, val); 13170 } 13171 13172 static void 13173 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 13174 { 13175 int *p = &parser->parser_token_info_enabled; 13176 13177 switch (*val) { 13178 case 't': case 'T': 13179 if (strcasecmp(val, "true") == 0) { 13180 *p = TRUE; 13181 return; 13182 } 13183 break; 13184 case 'f': case 'F': 13185 if (strcasecmp(val, "false") == 0) { 13186 *p = FALSE; 13187 return; 13188 } 13189 break; 13190 } 13191 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 13192 } 13193 13194 struct magic_comment { 13195 const char *name; 13196 rb_magic_comment_setter_t func; 13197 rb_magic_comment_length_t length; 13198 }; 13199 13200 static const struct magic_comment magic_comments[] = { 13201 {"coding", magic_comment_encoding, parser_encode_length}, 13202 {"encoding", magic_comment_encoding, parser_encode_length}, 13203 {"warn_indent", parser_set_token_info}, 13204 }; 13205 #endif 13206 13207 static const char * 13208 magic_comment_marker(const char *str, long len) 13209 { 13210 long i = 2; 13211 13212 while (i < len) { 13213 switch (str[i]) { 13214 case '-': 13215 if (str[i-1] == '*' && str[i-2] == '-') { 13216 return str + i + 1; 13217 } 13218 i += 2; 13219 break; 13220 case '*': 13221 if (i + 1 >= len) return 0; 13222 if (str[i+1] != '-') { 13223 i += 4; 13224 } 13225 else if (str[i-1] != '-') { 13226 i += 2; 13227 } 13228 else { 13229 return str + i + 2; 13230 } 13231 break; 13232 default: 13233 i += 3; 13234 break; 13235 } 13236 } 13237 return 0; 13238 } 13239 13240 static int 13241 parser_magic_comment(struct parser_params *parser, const char *str, long len) 13242 { 13243 VALUE name = 0, val = 0; 13244 const char *beg, *end, *vbeg, *vend; 13245 #define str_copy(_s, _p, _n) ((_s) \ 13246 ? (void)(rb_str_resize((_s), (_n)), \ 13247 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 13248 : (void)((_s) = STR_NEW((_p), (_n)))) 13249 13250 if (len <= 7) return FALSE; 13251 if (!(beg = magic_comment_marker(str, len))) return FALSE; 13252 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 13253 str = beg; 13254 len = end - beg - 3; 13255 13256 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 13257 while (len > 0) { 13258 #ifndef RIPPER 13259 const struct magic_comment *p = magic_comments; 13260 #endif 13261 char *s; 13262 int i; 13263 long n = 0; 13264 13265 for (; len > 0 && *str; str++, --len) { 13266 switch (*str) { 13267 case '\'': case '"': case ':': case ';': 13268 continue; 13269 } 13270 if (!ISSPACE(*str)) break; 13271 } 13272 for (beg = str; len > 0; str++, --len) { 13273 switch (*str) { 13274 case '\'': case '"': case ':': case ';': 13275 break; 13276 default: 13277 if (ISSPACE(*str)) break; 13278 continue; 13279 } 13280 break; 13281 } 13282 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 13283 if (!len) break; 13284 if (*str != ':') continue; 13285 13286 do str++; while (--len > 0 && ISSPACE(*str)); 13287 if (!len) break; 13288 if (*str == '"') { 13289 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 13290 if (*str == '\\') { 13291 --len; 13292 ++str; 13293 } 13294 } 13295 vend = str; 13296 if (len) { 13297 --len; 13298 ++str; 13299 } 13300 } 13301 else { 13302 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 13303 vend = str; 13304 } 13305 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 13306 13307 n = end - beg; 13308 str_copy(name, beg, n); 13309 s = RSTRING_PTR(name); 13310 for (i = 0; i < n; ++i) { 13311 if (s[i] == '-') s[i] = '_'; 13312 } 13313 #ifndef RIPPER 13314 do { 13315 if (STRNCASECMP(p->name, s, n) == 0) { 13316 n = vend - vbeg; 13317 if (p->length) { 13318 n = (*p->length)(parser, vbeg, n); 13319 } 13320 str_copy(val, vbeg, n); 13321 (*p->func)(parser, s, RSTRING_PTR(val)); 13322 break; 13323 } 13324 } while (++p < magic_comments + numberof(magic_comments)); 13325 #else 13326 str_copy(val, vbeg, vend - vbeg); 13327 dispatch2(magic_comment, name, val); 13328 #endif 13329 } 13330 13331 return TRUE; 13332 } 13333 13334 static void 13335 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 13336 { 13337 int sep = 0; 13338 const char *beg = str; 13339 VALUE s; 13340 13341 for (;;) { 13342 if (send - str <= 6) return; 13343 switch (str[6]) { 13344 case 'C': case 'c': str += 6; continue; 13345 case 'O': case 'o': str += 5; continue; 13346 case 'D': case 'd': str += 4; continue; 13347 case 'I': case 'i': str += 3; continue; 13348 case 'N': case 'n': str += 2; continue; 13349 case 'G': case 'g': str += 1; continue; 13350 case '=': case ':': 13351 sep = 1; 13352 str += 6; 13353 break; 13354 default: 13355 str += 6; 13356 if (ISSPACE(*str)) break; 13357 continue; 13358 } 13359 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 13360 } 13361 for (;;) { 13362 do { 13363 if (++str >= send) return; 13364 } while (ISSPACE(*str)); 13365 if (sep) break; 13366 if (*str != '=' && *str != ':') return; 13367 sep = 1; 13368 str++; 13369 } 13370 beg = str; 13371 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 13372 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 13373 parser_set_encode(parser, RSTRING_PTR(s)); 13374 rb_str_resize(s, 0); 13375 } 13376 13377 static void 13378 parser_prepare(struct parser_params *parser) 13379 { 13380 int c = nextc(); 13381 switch (c) { 13382 case '#': 13383 if (peek('!')) parser->has_shebang = 1; 13384 break; 13385 case 0xef: /* UTF-8 BOM marker */ 13386 if (lex_pend - lex_p >= 2 && 13387 (unsigned char)lex_p[0] == 0xbb && 13388 (unsigned char)lex_p[1] == 0xbf) { 13389 parser->enc = rb_utf8_encoding(); 13390 lex_p += 2; 13391 lex_pbeg = lex_p; 13392 return; 13393 } 13394 break; 13395 case EOF: 13396 return; 13397 } 13398 pushback(c); 13399 parser->enc = rb_enc_get(lex_lastline); 13400 } 13401 13402 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY) 13403 #define IS_END() IS_lex_state(EXPR_END_ANY) 13404 #define IS_BEG() IS_lex_state(EXPR_BEG_ANY) 13405 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 13406 #define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) 13407 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 13408 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) 13409 13410 #ifndef RIPPER 13411 #define ambiguous_operator(op, syn) ( \ 13412 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 13413 rb_warning0("even though it seems like "syn"")) 13414 #else 13415 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 13416 #endif 13417 #define warn_balanced(op, syn) ((void) \ 13418 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \ 13419 space_seen && !ISSPACE(c) && \ 13420 (ambiguous_operator(op, syn), 0))) 13421 13422 static int 13423 parser_yylex(struct parser_params *parser) 13424 { 13425 register int c; 13426 int space_seen = 0; 13427 int cmd_state; 13428 enum lex_state_e last_state; 13429 rb_encoding *enc; 13430 int mb; 13431 #ifdef RIPPER 13432 int fallthru = FALSE; 13433 #endif 13434 13435 if (lex_strterm) { 13436 int token; 13437 if (nd_type(lex_strterm) == NODE_HEREDOC) { 13438 token = here_document(lex_strterm); 13439 if (token == tSTRING_END) { 13440 lex_strterm = 0; 13441 lex_state = EXPR_END; 13442 } 13443 } 13444 else { 13445 token = parse_string(lex_strterm); 13446 if (token == tSTRING_END || token == tREGEXP_END) { 13447 rb_gc_force_recycle((VALUE)lex_strterm); 13448 lex_strterm = 0; 13449 lex_state = EXPR_END; 13450 } 13451 } 13452 return token; 13453 } 13454 cmd_state = command_start; 13455 command_start = FALSE; 13456 retry: 13457 last_state = lex_state; 13458 switch (c = nextc()) { 13459 case '\0': /* NUL */ 13460 case '\004': /* ^D */ 13461 case '\032': /* ^Z */ 13462 case -1: /* end of script. */ 13463 return 0; 13464 13465 /* white spaces */ 13466 case ' ': case '\t': case '\f': case '\r': 13467 case '\13': /* '\v' */ 13468 space_seen = 1; 13469 #ifdef RIPPER 13470 while ((c = nextc())) { 13471 switch (c) { 13472 case ' ': case '\t': case '\f': case '\r': 13473 case '\13': /* '\v' */ 13474 break; 13475 default: 13476 goto outofloop; 13477 } 13478 } 13479 outofloop: 13480 pushback(c); 13481 ripper_dispatch_scan_event(parser, tSP); 13482 #endif 13483 goto retry; 13484 13485 case '#': /* it's a comment */ 13486 /* no magic_comment in shebang line */ 13487 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 13488 if (comment_at_top(parser)) { 13489 set_file_encoding(parser, lex_p, lex_pend); 13490 } 13491 } 13492 lex_p = lex_pend; 13493 #ifdef RIPPER 13494 ripper_dispatch_scan_event(parser, tCOMMENT); 13495 fallthru = TRUE; 13496 #endif 13497 /* fall through */ 13498 case '\n': 13499 if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT)) { 13500 #ifdef RIPPER 13501 if (!fallthru) { 13502 ripper_dispatch_scan_event(parser, tIGNORED_NL); 13503 } 13504 fallthru = FALSE; 13505 #endif 13506 goto retry; 13507 } 13508 while ((c = nextc())) { 13509 switch (c) { 13510 case ' ': case '\t': case '\f': case '\r': 13511 case '\13': /* '\v' */ 13512 space_seen = 1; 13513 break; 13514 case '.': { 13515 if ((c = nextc()) != '.') { 13516 pushback(c); 13517 pushback('.'); 13518 goto retry; 13519 } 13520 } 13521 default: 13522 --ruby_sourceline; 13523 lex_nextline = lex_lastline; 13524 case -1: /* EOF no decrement*/ 13525 lex_goto_eol(parser); 13526 #ifdef RIPPER 13527 if (c != -1) { 13528 parser->tokp = lex_p; 13529 } 13530 #endif 13531 goto normal_newline; 13532 } 13533 } 13534 normal_newline: 13535 command_start = TRUE; 13536 lex_state = EXPR_BEG; 13537 return '\n'; 13538 13539 case '*': 13540 if ((c = nextc()) == '*') { 13541 if ((c = nextc()) == '=') { 13542 set_yylval_id(tPOW); 13543 lex_state = EXPR_BEG; 13544 return tOP_ASGN; 13545 } 13546 pushback(c); 13547 if (IS_SPCARG(c)) { 13548 rb_warning0("`**' interpreted as argument prefix"); 13549 c = tDSTAR; 13550 } 13551 else if (IS_BEG()) { 13552 c = tDSTAR; 13553 } 13554 else { 13555 warn_balanced("**", "argument prefix"); 13556 c = tPOW; 13557 } 13558 } 13559 else { 13560 if (c == '=') { 13561 set_yylval_id('*'); 13562 lex_state = EXPR_BEG; 13563 return tOP_ASGN; 13564 } 13565 pushback(c); 13566 if (IS_SPCARG(c)) { 13567 rb_warning0("`*' interpreted as argument prefix"); 13568 c = tSTAR; 13569 } 13570 else if (IS_BEG()) { 13571 c = tSTAR; 13572 } 13573 else { 13574 warn_balanced("*", "argument prefix"); 13575 c = '*'; 13576 } 13577 } 13578 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13579 return c; 13580 13581 case '!': 13582 c = nextc(); 13583 if (IS_AFTER_OPERATOR()) { 13584 lex_state = EXPR_ARG; 13585 if (c == '@') { 13586 return '!'; 13587 } 13588 } 13589 else { 13590 lex_state = EXPR_BEG; 13591 } 13592 if (c == '=') { 13593 return tNEQ; 13594 } 13595 if (c == '~') { 13596 return tNMATCH; 13597 } 13598 pushback(c); 13599 return '!'; 13600 13601 case '=': 13602 if (was_bol()) { 13603 /* skip embedded rd document */ 13604 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 13605 #ifdef RIPPER 13606 int first_p = TRUE; 13607 13608 lex_goto_eol(parser); 13609 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 13610 #endif 13611 for (;;) { 13612 lex_goto_eol(parser); 13613 #ifdef RIPPER 13614 if (!first_p) { 13615 ripper_dispatch_scan_event(parser, tEMBDOC); 13616 } 13617 first_p = FALSE; 13618 #endif 13619 c = nextc(); 13620 if (c == -1) { 13621 compile_error(PARSER_ARG "embedded document meets end of file"); 13622 return 0; 13623 } 13624 if (c != '=') continue; 13625 if (strncmp(lex_p, "end", 3) == 0 && 13626 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 13627 break; 13628 } 13629 } 13630 lex_goto_eol(parser); 13631 #ifdef RIPPER 13632 ripper_dispatch_scan_event(parser, tEMBDOC_END); 13633 #endif 13634 goto retry; 13635 } 13636 } 13637 13638 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13639 if ((c = nextc()) == '=') { 13640 if ((c = nextc()) == '=') { 13641 return tEQQ; 13642 } 13643 pushback(c); 13644 return tEQ; 13645 } 13646 if (c == '~') { 13647 return tMATCH; 13648 } 13649 else if (c == '>') { 13650 return tASSOC; 13651 } 13652 pushback(c); 13653 return '='; 13654 13655 case '<': 13656 last_state = lex_state; 13657 c = nextc(); 13658 if (c == '<' && 13659 !IS_lex_state(EXPR_DOT | EXPR_CLASS) && 13660 !IS_END() && 13661 (!IS_ARG() || space_seen)) { 13662 int token = heredoc_identifier(); 13663 if (token) return token; 13664 } 13665 if (IS_AFTER_OPERATOR()) { 13666 lex_state = EXPR_ARG; 13667 } 13668 else { 13669 if (IS_lex_state(EXPR_CLASS)) 13670 command_start = TRUE; 13671 lex_state = EXPR_BEG; 13672 } 13673 if (c == '=') { 13674 if ((c = nextc()) == '>') { 13675 return tCMP; 13676 } 13677 pushback(c); 13678 return tLEQ; 13679 } 13680 if (c == '<') { 13681 if ((c = nextc()) == '=') { 13682 set_yylval_id(tLSHFT); 13683 lex_state = EXPR_BEG; 13684 return tOP_ASGN; 13685 } 13686 pushback(c); 13687 warn_balanced("<<", "here document"); 13688 return tLSHFT; 13689 } 13690 pushback(c); 13691 return '<'; 13692 13693 case '>': 13694 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13695 if ((c = nextc()) == '=') { 13696 return tGEQ; 13697 } 13698 if (c == '>') { 13699 if ((c = nextc()) == '=') { 13700 set_yylval_id(tRSHFT); 13701 lex_state = EXPR_BEG; 13702 return tOP_ASGN; 13703 } 13704 pushback(c); 13705 return tRSHFT; 13706 } 13707 pushback(c); 13708 return '>'; 13709 13710 case '"': 13711 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 13712 return tSTRING_BEG; 13713 13714 case '`': 13715 if (IS_lex_state(EXPR_FNAME)) { 13716 lex_state = EXPR_ENDFN; 13717 return c; 13718 } 13719 if (IS_lex_state(EXPR_DOT)) { 13720 if (cmd_state) 13721 lex_state = EXPR_CMDARG; 13722 else 13723 lex_state = EXPR_ARG; 13724 return c; 13725 } 13726 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 13727 return tXSTRING_BEG; 13728 13729 case '\'': 13730 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 13731 return tSTRING_BEG; 13732 13733 case '?': 13734 if (IS_END()) { 13735 lex_state = EXPR_VALUE; 13736 return '?'; 13737 } 13738 c = nextc(); 13739 if (c == -1) { 13740 compile_error(PARSER_ARG "incomplete character syntax"); 13741 return 0; 13742 } 13743 if (rb_enc_isspace(c, current_enc)) { 13744 if (!IS_ARG()) { 13745 int c2 = 0; 13746 switch (c) { 13747 case ' ': 13748 c2 = 's'; 13749 break; 13750 case '\n': 13751 c2 = 'n'; 13752 break; 13753 case '\t': 13754 c2 = 't'; 13755 break; 13756 case '\v': 13757 c2 = 'v'; 13758 break; 13759 case '\r': 13760 c2 = 'r'; 13761 break; 13762 case '\f': 13763 c2 = 'f'; 13764 break; 13765 } 13766 if (c2) { 13767 rb_warnI("invalid character syntax; use ?\\%c", c2); 13768 } 13769 } 13770 ternary: 13771 pushback(c); 13772 lex_state = EXPR_VALUE; 13773 return '?'; 13774 } 13775 newtok(); 13776 enc = current_enc; 13777 if (!parser_isascii()) { 13778 if (tokadd_mbchar(c) == -1) return 0; 13779 } 13780 else if ((rb_enc_isalnum(c, current_enc) || c == '_') && 13781 lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { 13782 goto ternary; 13783 } 13784 else if (c == '\\') { 13785 if (peek('u')) { 13786 nextc(); 13787 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 13788 if (0x80 <= c) { 13789 tokaddmbc(c, enc); 13790 } 13791 else { 13792 tokadd(c); 13793 } 13794 } 13795 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 13796 nextc(); 13797 if (tokadd_mbchar(c) == -1) return 0; 13798 } 13799 else { 13800 c = read_escape(0, &enc); 13801 tokadd(c); 13802 } 13803 } 13804 else { 13805 tokadd(c); 13806 } 13807 tokfix(); 13808 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 13809 lex_state = EXPR_END; 13810 return tCHAR; 13811 13812 case '&': 13813 if ((c = nextc()) == '&') { 13814 lex_state = EXPR_BEG; 13815 if ((c = nextc()) == '=') { 13816 set_yylval_id(tANDOP); 13817 lex_state = EXPR_BEG; 13818 return tOP_ASGN; 13819 } 13820 pushback(c); 13821 return tANDOP; 13822 } 13823 else if (c == '=') { 13824 set_yylval_id('&'); 13825 lex_state = EXPR_BEG; 13826 return tOP_ASGN; 13827 } 13828 pushback(c); 13829 if (IS_SPCARG(c)) { 13830 rb_warning0("`&' interpreted as argument prefix"); 13831 c = tAMPER; 13832 } 13833 else if (IS_BEG()) { 13834 c = tAMPER; 13835 } 13836 else { 13837 warn_balanced("&", "argument prefix"); 13838 c = '&'; 13839 } 13840 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13841 return c; 13842 13843 case '|': 13844 if ((c = nextc()) == '|') { 13845 lex_state = EXPR_BEG; 13846 if ((c = nextc()) == '=') { 13847 set_yylval_id(tOROP); 13848 lex_state = EXPR_BEG; 13849 return tOP_ASGN; 13850 } 13851 pushback(c); 13852 return tOROP; 13853 } 13854 if (c == '=') { 13855 set_yylval_id('|'); 13856 lex_state = EXPR_BEG; 13857 return tOP_ASGN; 13858 } 13859 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13860 pushback(c); 13861 return '|'; 13862 13863 case '+': 13864 c = nextc(); 13865 if (IS_AFTER_OPERATOR()) { 13866 lex_state = EXPR_ARG; 13867 if (c == '@') { 13868 return tUPLUS; 13869 } 13870 pushback(c); 13871 return '+'; 13872 } 13873 if (c == '=') { 13874 set_yylval_id('+'); 13875 lex_state = EXPR_BEG; 13876 return tOP_ASGN; 13877 } 13878 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13879 lex_state = EXPR_BEG; 13880 pushback(c); 13881 if (c != -1 && ISDIGIT(c)) { 13882 c = '+'; 13883 goto start_num; 13884 } 13885 return tUPLUS; 13886 } 13887 lex_state = EXPR_BEG; 13888 pushback(c); 13889 warn_balanced("+", "unary operator"); 13890 return '+'; 13891 13892 case '-': 13893 c = nextc(); 13894 if (IS_AFTER_OPERATOR()) { 13895 lex_state = EXPR_ARG; 13896 if (c == '@') { 13897 return tUMINUS; 13898 } 13899 pushback(c); 13900 return '-'; 13901 } 13902 if (c == '=') { 13903 set_yylval_id('-'); 13904 lex_state = EXPR_BEG; 13905 return tOP_ASGN; 13906 } 13907 if (c == '>') { 13908 lex_state = EXPR_ENDFN; 13909 return tLAMBDA; 13910 } 13911 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13912 lex_state = EXPR_BEG; 13913 pushback(c); 13914 if (c != -1 && ISDIGIT(c)) { 13915 return tUMINUS_NUM; 13916 } 13917 return tUMINUS; 13918 } 13919 lex_state = EXPR_BEG; 13920 pushback(c); 13921 warn_balanced("-", "unary operator"); 13922 return '-'; 13923 13924 case '.': 13925 lex_state = EXPR_BEG; 13926 if ((c = nextc()) == '.') { 13927 if ((c = nextc()) == '.') { 13928 return tDOT3; 13929 } 13930 pushback(c); 13931 return tDOT2; 13932 } 13933 pushback(c); 13934 if (c != -1 && ISDIGIT(c)) { 13935 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13936 } 13937 lex_state = EXPR_DOT; 13938 return '.'; 13939 13940 start_num: 13941 case '0': case '1': case '2': case '3': case '4': 13942 case '5': case '6': case '7': case '8': case '9': 13943 { 13944 int is_float, seen_point, seen_e, nondigit; 13945 13946 is_float = seen_point = seen_e = nondigit = 0; 13947 lex_state = EXPR_END; 13948 newtok(); 13949 if (c == '-' || c == '+') { 13950 tokadd(c); 13951 c = nextc(); 13952 } 13953 if (c == '0') { 13954 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13955 int start = toklen(); 13956 c = nextc(); 13957 if (c == 'x' || c == 'X') { 13958 /* hexadecimal */ 13959 c = nextc(); 13960 if (c != -1 && ISXDIGIT(c)) { 13961 do { 13962 if (c == '_') { 13963 if (nondigit) break; 13964 nondigit = c; 13965 continue; 13966 } 13967 if (!ISXDIGIT(c)) break; 13968 nondigit = 0; 13969 tokadd(c); 13970 } while ((c = nextc()) != -1); 13971 } 13972 pushback(c); 13973 tokfix(); 13974 if (toklen() == start) { 13975 no_digits(); 13976 } 13977 else if (nondigit) goto trailing_uc; 13978 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13979 return tINTEGER; 13980 } 13981 if (c == 'b' || c == 'B') { 13982 /* binary */ 13983 c = nextc(); 13984 if (c == '0' || c == '1') { 13985 do { 13986 if (c == '_') { 13987 if (nondigit) break; 13988 nondigit = c; 13989 continue; 13990 } 13991 if (c != '0' && c != '1') break; 13992 nondigit = 0; 13993 tokadd(c); 13994 } while ((c = nextc()) != -1); 13995 } 13996 pushback(c); 13997 tokfix(); 13998 if (toklen() == start) { 13999 no_digits(); 14000 } 14001 else if (nondigit) goto trailing_uc; 14002 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 14003 return tINTEGER; 14004 } 14005 if (c == 'd' || c == 'D') { 14006 /* decimal */ 14007 c = nextc(); 14008 if (c != -1 && ISDIGIT(c)) { 14009 do { 14010 if (c == '_') { 14011 if (nondigit) break; 14012 nondigit = c; 14013 continue; 14014 } 14015 if (!ISDIGIT(c)) break; 14016 nondigit = 0; 14017 tokadd(c); 14018 } while ((c = nextc()) != -1); 14019 } 14020 pushback(c); 14021 tokfix(); 14022 if (toklen() == start) { 14023 no_digits(); 14024 } 14025 else if (nondigit) goto trailing_uc; 14026 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14027 return tINTEGER; 14028 } 14029 if (c == '_') { 14030 /* 0_0 */ 14031 goto octal_number; 14032 } 14033 if (c == 'o' || c == 'O') { 14034 /* prefixed octal */ 14035 c = nextc(); 14036 if (c == -1 || c == '_' || !ISDIGIT(c)) { 14037 no_digits(); 14038 } 14039 } 14040 if (c >= '0' && c <= '7') { 14041 /* octal */ 14042 octal_number: 14043 do { 14044 if (c == '_') { 14045 if (nondigit) break; 14046 nondigit = c; 14047 continue; 14048 } 14049 if (c < '0' || c > '9') break; 14050 if (c > '7') goto invalid_octal; 14051 nondigit = 0; 14052 tokadd(c); 14053 } while ((c = nextc()) != -1); 14054 if (toklen() > start) { 14055 pushback(c); 14056 tokfix(); 14057 if (nondigit) goto trailing_uc; 14058 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 14059 return tINTEGER; 14060 } 14061 if (nondigit) { 14062 pushback(c); 14063 goto trailing_uc; 14064 } 14065 } 14066 if (c > '7' && c <= '9') { 14067 invalid_octal: 14068 yyerror("Invalid octal digit"); 14069 } 14070 else if (c == '.' || c == 'e' || c == 'E') { 14071 tokadd('0'); 14072 } 14073 else { 14074 pushback(c); 14075 set_yylval_literal(INT2FIX(0)); 14076 return tINTEGER; 14077 } 14078 } 14079 14080 for (;;) { 14081 switch (c) { 14082 case '0': case '1': case '2': case '3': case '4': 14083 case '5': case '6': case '7': case '8': case '9': 14084 nondigit = 0; 14085 tokadd(c); 14086 break; 14087 14088 case '.': 14089 if (nondigit) goto trailing_uc; 14090 if (seen_point || seen_e) { 14091 goto decode_num; 14092 } 14093 else { 14094 int c0 = nextc(); 14095 if (c0 == -1 || !ISDIGIT(c0)) { 14096 pushback(c0); 14097 goto decode_num; 14098 } 14099 c = c0; 14100 } 14101 tokadd('.'); 14102 tokadd(c); 14103 is_float++; 14104 seen_point++; 14105 nondigit = 0; 14106 break; 14107 14108 case 'e': 14109 case 'E': 14110 if (nondigit) { 14111 pushback(c); 14112 c = nondigit; 14113 goto decode_num; 14114 } 14115 if (seen_e) { 14116 goto decode_num; 14117 } 14118 tokadd(c); 14119 seen_e++; 14120 is_float++; 14121 nondigit = c; 14122 c = nextc(); 14123 if (c != '-' && c != '+') continue; 14124 tokadd(c); 14125 nondigit = c; 14126 break; 14127 14128 case '_': /* `_' in number just ignored */ 14129 if (nondigit) goto decode_num; 14130 nondigit = c; 14131 break; 14132 14133 default: 14134 goto decode_num; 14135 } 14136 c = nextc(); 14137 } 14138 14139 decode_num: 14140 pushback(c); 14141 if (nondigit) { 14142 char tmp[30]; 14143 trailing_uc: 14144 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 14145 yyerror(tmp); 14146 } 14147 tokfix(); 14148 if (is_float) { 14149 double d = strtod(tok(), 0); 14150 if (errno == ERANGE) { 14151 rb_warningS("Float %s out of range", tok()); 14152 errno = 0; 14153 } 14154 set_yylval_literal(DBL2NUM(d)); 14155 return tFLOAT; 14156 } 14157 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14158 return tINTEGER; 14159 } 14160 14161 case ')': 14162 case ']': 14163 paren_nest--; 14164 case '}': 14165 COND_LEXPOP(); 14166 CMDARG_LEXPOP(); 14167 if (c == ')') 14168 lex_state = EXPR_ENDFN; 14169 else 14170 lex_state = EXPR_ENDARG; 14171 if (c == '}') { 14172 if (!brace_nest--) c = tSTRING_DEND; 14173 } 14174 return c; 14175 14176 case ':': 14177 c = nextc(); 14178 if (c == ':') { 14179 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) { 14180 lex_state = EXPR_BEG; 14181 return tCOLON3; 14182 } 14183 lex_state = EXPR_DOT; 14184 return tCOLON2; 14185 } 14186 if (IS_END() || ISSPACE(c)) { 14187 pushback(c); 14188 warn_balanced(":", "symbol literal"); 14189 lex_state = EXPR_BEG; 14190 return ':'; 14191 } 14192 switch (c) { 14193 case '\'': 14194 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 14195 break; 14196 case '"': 14197 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 14198 break; 14199 default: 14200 pushback(c); 14201 break; 14202 } 14203 lex_state = EXPR_FNAME; 14204 return tSYMBEG; 14205 14206 case '/': 14207 if (IS_lex_state(EXPR_BEG_ANY)) { 14208 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14209 return tREGEXP_BEG; 14210 } 14211 if ((c = nextc()) == '=') { 14212 set_yylval_id('/'); 14213 lex_state = EXPR_BEG; 14214 return tOP_ASGN; 14215 } 14216 pushback(c); 14217 if (IS_SPCARG(c)) { 14218 (void)arg_ambiguous(); 14219 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14220 return tREGEXP_BEG; 14221 } 14222 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14223 warn_balanced("/", "regexp literal"); 14224 return '/'; 14225 14226 case '^': 14227 if ((c = nextc()) == '=') { 14228 set_yylval_id('^'); 14229 lex_state = EXPR_BEG; 14230 return tOP_ASGN; 14231 } 14232 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14233 pushback(c); 14234 return '^'; 14235 14236 case ';': 14237 lex_state = EXPR_BEG; 14238 command_start = TRUE; 14239 return ';'; 14240 14241 case ',': 14242 lex_state = EXPR_BEG; 14243 return ','; 14244 14245 case '~': 14246 if (IS_AFTER_OPERATOR()) { 14247 if ((c = nextc()) != '@') { 14248 pushback(c); 14249 } 14250 lex_state = EXPR_ARG; 14251 } 14252 else { 14253 lex_state = EXPR_BEG; 14254 } 14255 return '~'; 14256 14257 case '(': 14258 if (IS_BEG()) { 14259 c = tLPAREN; 14260 } 14261 else if (IS_SPCARG(-1)) { 14262 c = tLPAREN_ARG; 14263 } 14264 paren_nest++; 14265 COND_PUSH(0); 14266 CMDARG_PUSH(0); 14267 lex_state = EXPR_BEG; 14268 return c; 14269 14270 case '[': 14271 paren_nest++; 14272 if (IS_AFTER_OPERATOR()) { 14273 lex_state = EXPR_ARG; 14274 if ((c = nextc()) == ']') { 14275 if ((c = nextc()) == '=') { 14276 return tASET; 14277 } 14278 pushback(c); 14279 return tAREF; 14280 } 14281 pushback(c); 14282 return '['; 14283 } 14284 else if (IS_BEG()) { 14285 c = tLBRACK; 14286 } 14287 else if (IS_ARG() && space_seen) { 14288 c = tLBRACK; 14289 } 14290 lex_state = EXPR_BEG; 14291 COND_PUSH(0); 14292 CMDARG_PUSH(0); 14293 return c; 14294 14295 case '{': 14296 ++brace_nest; 14297 if (lpar_beg && lpar_beg == paren_nest) { 14298 lex_state = EXPR_BEG; 14299 lpar_beg = 0; 14300 --paren_nest; 14301 COND_PUSH(0); 14302 CMDARG_PUSH(0); 14303 return tLAMBEG; 14304 } 14305 if (IS_ARG() || IS_lex_state(EXPR_END | EXPR_ENDFN)) 14306 c = '{'; /* block (primary) */ 14307 else if (IS_lex_state(EXPR_ENDARG)) 14308 c = tLBRACE_ARG; /* block (expr) */ 14309 else 14310 c = tLBRACE; /* hash */ 14311 COND_PUSH(0); 14312 CMDARG_PUSH(0); 14313 lex_state = EXPR_BEG; 14314 if (c != tLBRACE) command_start = TRUE; 14315 return c; 14316 14317 case '\\': 14318 c = nextc(); 14319 if (c == '\n') { 14320 space_seen = 1; 14321 #ifdef RIPPER 14322 ripper_dispatch_scan_event(parser, tSP); 14323 #endif 14324 goto retry; /* skip \\n */ 14325 } 14326 pushback(c); 14327 return '\\'; 14328 14329 case '%': 14330 if (IS_lex_state(EXPR_BEG_ANY)) { 14331 int term; 14332 int paren; 14333 14334 c = nextc(); 14335 quotation: 14336 if (c == -1 || !ISALNUM(c)) { 14337 term = c; 14338 c = 'Q'; 14339 } 14340 else { 14341 term = nextc(); 14342 if (rb_enc_isalnum(term, current_enc) || !parser_isascii()) { 14343 yyerror("unknown type of %string"); 14344 return 0; 14345 } 14346 } 14347 if (c == -1 || term == -1) { 14348 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 14349 return 0; 14350 } 14351 paren = term; 14352 if (term == '(') term = ')'; 14353 else if (term == '[') term = ']'; 14354 else if (term == '{') term = '}'; 14355 else if (term == '<') term = '>'; 14356 else paren = 0; 14357 14358 switch (c) { 14359 case 'Q': 14360 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 14361 return tSTRING_BEG; 14362 14363 case 'q': 14364 lex_strterm = NEW_STRTERM(str_squote, term, paren); 14365 return tSTRING_BEG; 14366 14367 case 'W': 14368 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14369 do {c = nextc();} while (ISSPACE(c)); 14370 pushback(c); 14371 return tWORDS_BEG; 14372 14373 case 'w': 14374 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14375 do {c = nextc();} while (ISSPACE(c)); 14376 pushback(c); 14377 return tQWORDS_BEG; 14378 14379 case 'I': 14380 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14381 do {c = nextc();} while (ISSPACE(c)); 14382 pushback(c); 14383 return tSYMBOLS_BEG; 14384 14385 case 'i': 14386 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14387 do {c = nextc();} while (ISSPACE(c)); 14388 pushback(c); 14389 return tQSYMBOLS_BEG; 14390 14391 case 'x': 14392 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 14393 return tXSTRING_BEG; 14394 14395 case 'r': 14396 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 14397 return tREGEXP_BEG; 14398 14399 case 's': 14400 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 14401 lex_state = EXPR_FNAME; 14402 return tSYMBEG; 14403 14404 default: 14405 yyerror("unknown type of %string"); 14406 return 0; 14407 } 14408 } 14409 if ((c = nextc()) == '=') { 14410 set_yylval_id('%'); 14411 lex_state = EXPR_BEG; 14412 return tOP_ASGN; 14413 } 14414 if (IS_SPCARG(c)) { 14415 goto quotation; 14416 } 14417 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14418 pushback(c); 14419 warn_balanced("%%", "string literal"); 14420 return '%'; 14421 14422 case '$': 14423 lex_state = EXPR_END; 14424 newtok(); 14425 c = nextc(); 14426 switch (c) { 14427 case '_': /* $_: last read line string */ 14428 c = nextc(); 14429 if (parser_is_identchar()) { 14430 tokadd('$'); 14431 tokadd('_'); 14432 break; 14433 } 14434 pushback(c); 14435 c = '_'; 14436 /* fall through */ 14437 case '~': /* $~: match-data */ 14438 case '*': /* $*: argv */ 14439 case '$': /* $$: pid */ 14440 case '?': /* $?: last status */ 14441 case '!': /* $!: error string */ 14442 case '@': /* $@: error position */ 14443 case '/': /* $/: input record separator */ 14444 case '\\': /* $\: output record separator */ 14445 case ';': /* $;: field separator */ 14446 case ',': /* $,: output field separator */ 14447 case '.': /* $.: last read line number */ 14448 case '=': /* $=: ignorecase */ 14449 case ':': /* $:: load path */ 14450 case '<': /* $<: reading filename */ 14451 case '>': /* $>: default output handle */ 14452 case '\"': /* $": already loaded files */ 14453 tokadd('$'); 14454 tokadd(c); 14455 tokfix(); 14456 set_yylval_name(rb_intern(tok())); 14457 return tGVAR; 14458 14459 case '-': 14460 tokadd('$'); 14461 tokadd(c); 14462 c = nextc(); 14463 if (parser_is_identchar()) { 14464 if (tokadd_mbchar(c) == -1) return 0; 14465 } 14466 else { 14467 pushback(c); 14468 } 14469 gvar: 14470 tokfix(); 14471 set_yylval_name(rb_intern(tok())); 14472 return tGVAR; 14473 14474 case '&': /* $&: last match */ 14475 case '`': /* $`: string before last match */ 14476 case '\'': /* $': string after last match */ 14477 case '+': /* $+: string matches last paren. */ 14478 if (IS_lex_state_for(last_state, EXPR_FNAME)) { 14479 tokadd('$'); 14480 tokadd(c); 14481 goto gvar; 14482 } 14483 set_yylval_node(NEW_BACK_REF(c)); 14484 return tBACK_REF; 14485 14486 case '1': case '2': case '3': 14487 case '4': case '5': case '6': 14488 case '7': case '8': case '9': 14489 tokadd('$'); 14490 do { 14491 tokadd(c); 14492 c = nextc(); 14493 } while (c != -1 && ISDIGIT(c)); 14494 pushback(c); 14495 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar; 14496 tokfix(); 14497 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 14498 return tNTH_REF; 14499 14500 default: 14501 if (!parser_is_identchar()) { 14502 pushback(c); 14503 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c); 14504 return 0; 14505 } 14506 case '0': 14507 tokadd('$'); 14508 } 14509 break; 14510 14511 case '@': 14512 c = nextc(); 14513 newtok(); 14514 tokadd('@'); 14515 if (c == '@') { 14516 tokadd('@'); 14517 c = nextc(); 14518 } 14519 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) { 14520 pushback(c); 14521 if (tokidx == 1) { 14522 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 14523 } 14524 else { 14525 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 14526 } 14527 return 0; 14528 } 14529 break; 14530 14531 case '_': 14532 if (was_bol() && whole_match_p("__END__", 7, 0)) { 14533 ruby__end__seen = 1; 14534 parser->eofp = Qtrue; 14535 #ifndef RIPPER 14536 return -1; 14537 #else 14538 lex_goto_eol(parser); 14539 ripper_dispatch_scan_event(parser, k__END__); 14540 return 0; 14541 #endif 14542 } 14543 newtok(); 14544 break; 14545 14546 default: 14547 if (!parser_is_identchar()) { 14548 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 14549 goto retry; 14550 } 14551 14552 newtok(); 14553 break; 14554 } 14555 14556 mb = ENC_CODERANGE_7BIT; 14557 do { 14558 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 14559 if (tokadd_mbchar(c) == -1) return 0; 14560 c = nextc(); 14561 } while (parser_is_identchar()); 14562 switch (tok()[0]) { 14563 case '@': case '$': 14564 pushback(c); 14565 break; 14566 default: 14567 if ((c == '!' || c == '?') && !peek('=')) { 14568 tokadd(c); 14569 } 14570 else { 14571 pushback(c); 14572 } 14573 } 14574 tokfix(); 14575 14576 { 14577 int result = 0; 14578 14579 last_state = lex_state; 14580 switch (tok()[0]) { 14581 case '$': 14582 lex_state = EXPR_END; 14583 result = tGVAR; 14584 break; 14585 case '@': 14586 lex_state = EXPR_END; 14587 if (tok()[1] == '@') 14588 result = tCVAR; 14589 else 14590 result = tIVAR; 14591 break; 14592 14593 default: 14594 if (toklast() == '!' || toklast() == '?') { 14595 result = tFID; 14596 } 14597 else { 14598 if (IS_lex_state(EXPR_FNAME)) { 14599 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 14600 (!peek('=') || (peek_n('>', 1)))) { 14601 result = tIDENTIFIER; 14602 tokadd(c); 14603 tokfix(); 14604 } 14605 else { 14606 pushback(c); 14607 } 14608 } 14609 if (result == 0 && ISUPPER(tok()[0])) { 14610 result = tCONSTANT; 14611 } 14612 else { 14613 result = tIDENTIFIER; 14614 } 14615 } 14616 14617 if (IS_LABEL_POSSIBLE()) { 14618 if (IS_LABEL_SUFFIX(0)) { 14619 lex_state = EXPR_BEG; 14620 nextc(); 14621 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 14622 return tLABEL; 14623 } 14624 } 14625 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) { 14626 const struct kwtable *kw; 14627 14628 /* See if it is a reserved word. */ 14629 kw = rb_reserved_word(tok(), toklen()); 14630 if (kw) { 14631 enum lex_state_e state = lex_state; 14632 lex_state = kw->state; 14633 if (state == EXPR_FNAME) { 14634 set_yylval_name(rb_intern(kw->name)); 14635 return kw->id[0]; 14636 } 14637 if (lex_state == EXPR_BEG) { 14638 command_start = TRUE; 14639 } 14640 if (kw->id[0] == keyword_do) { 14641 if (lpar_beg && lpar_beg == paren_nest) { 14642 lpar_beg = 0; 14643 --paren_nest; 14644 return keyword_do_LAMBDA; 14645 } 14646 if (COND_P()) return keyword_do_cond; 14647 if (CMDARG_P() && state != EXPR_CMDARG) 14648 return keyword_do_block; 14649 if (state & (EXPR_BEG | EXPR_ENDARG)) 14650 return keyword_do_block; 14651 return keyword_do; 14652 } 14653 if (state & (EXPR_BEG | EXPR_VALUE)) 14654 return kw->id[0]; 14655 else { 14656 if (kw->id[0] != kw->id[1]) 14657 lex_state = EXPR_BEG; 14658 return kw->id[1]; 14659 } 14660 } 14661 } 14662 14663 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) { 14664 if (cmd_state) { 14665 lex_state = EXPR_CMDARG; 14666 } 14667 else { 14668 lex_state = EXPR_ARG; 14669 } 14670 } 14671 else if (lex_state == EXPR_FNAME) { 14672 lex_state = EXPR_ENDFN; 14673 } 14674 else { 14675 lex_state = EXPR_END; 14676 } 14677 } 14678 { 14679 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 14680 14681 set_yylval_name(ident); 14682 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && 14683 is_local_id(ident) && lvar_defined(ident)) { 14684 lex_state = EXPR_END; 14685 } 14686 } 14687 return result; 14688 } 14689 } 14690 14691 #if YYPURE 14692 static int 14693 yylex(void *lval, void *p) 14694 #else 14695 yylex(void *p) 14696 #endif 14697 { 14698 struct parser_params *parser = (struct parser_params*)p; 14699 int t; 14700 14701 #if YYPURE 14702 parser->parser_yylval = lval; 14703 parser->parser_yylval->val = Qundef; 14704 #endif 14705 t = parser_yylex(parser); 14706 #ifdef RIPPER 14707 if (!NIL_P(parser->delayed)) { 14708 ripper_dispatch_delayed_token(parser, t); 14709 return t; 14710 } 14711 if (t != 0) 14712 ripper_dispatch_scan_event(parser, t); 14713 #endif 14714 14715 return t; 14716 } 14717 14718 #ifndef RIPPER 14719 static NODE* 14720 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 14721 { 14722 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 14723 nd_set_line(n, ruby_sourceline); 14724 return n; 14725 } 14726 14727 static enum node_type 14728 nodetype(NODE *node) /* for debug */ 14729 { 14730 return (enum node_type)nd_type(node); 14731 } 14732 14733 static int 14734 nodeline(NODE *node) 14735 { 14736 return nd_line(node); 14737 } 14738 14739 static NODE* 14740 newline_node(NODE *node) 14741 { 14742 if (node) { 14743 node = remove_begin(node); 14744 node->flags |= NODE_FL_NEWLINE; 14745 } 14746 return node; 14747 } 14748 14749 static void 14750 fixpos(NODE *node, NODE *orig) 14751 { 14752 if (!node) return; 14753 if (!orig) return; 14754 if (orig == (NODE*)1) return; 14755 nd_set_line(node, nd_line(orig)); 14756 } 14757 14758 static void 14759 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 14760 { 14761 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 14762 } 14763 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 14764 14765 static void 14766 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 14767 { 14768 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 14769 } 14770 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 14771 14772 static NODE* 14773 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 14774 { 14775 NODE *end, *h = head, *nd; 14776 14777 if (tail == 0) return head; 14778 14779 if (h == 0) return tail; 14780 switch (nd_type(h)) { 14781 case NODE_LIT: 14782 case NODE_STR: 14783 case NODE_SELF: 14784 case NODE_TRUE: 14785 case NODE_FALSE: 14786 case NODE_NIL: 14787 parser_warning(h, "unused literal ignored"); 14788 return tail; 14789 default: 14790 h = end = NEW_BLOCK(head); 14791 end->nd_end = end; 14792 fixpos(end, head); 14793 head = end; 14794 break; 14795 case NODE_BLOCK: 14796 end = h->nd_end; 14797 break; 14798 } 14799 14800 nd = end->nd_head; 14801 switch (nd_type(nd)) { 14802 case NODE_RETURN: 14803 case NODE_BREAK: 14804 case NODE_NEXT: 14805 case NODE_REDO: 14806 case NODE_RETRY: 14807 if (RTEST(ruby_verbose)) { 14808 parser_warning(tail, "statement not reached"); 14809 } 14810 break; 14811 14812 default: 14813 break; 14814 } 14815 14816 if (nd_type(tail) != NODE_BLOCK) { 14817 tail = NEW_BLOCK(tail); 14818 tail->nd_end = tail; 14819 } 14820 end->nd_next = tail; 14821 h->nd_end = tail->nd_end; 14822 return head; 14823 } 14824 14825 /* append item to the list */ 14826 static NODE* 14827 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 14828 { 14829 NODE *last; 14830 14831 if (list == 0) return NEW_LIST(item); 14832 if (list->nd_next) { 14833 last = list->nd_next->nd_end; 14834 } 14835 else { 14836 last = list; 14837 } 14838 14839 list->nd_alen += 1; 14840 last->nd_next = NEW_LIST(item); 14841 list->nd_next->nd_end = last->nd_next; 14842 return list; 14843 } 14844 14845 /* concat two lists */ 14846 static NODE* 14847 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14848 { 14849 NODE *last; 14850 14851 if (head->nd_next) { 14852 last = head->nd_next->nd_end; 14853 } 14854 else { 14855 last = head; 14856 } 14857 14858 head->nd_alen += tail->nd_alen; 14859 last->nd_next = tail; 14860 if (tail->nd_next) { 14861 head->nd_next->nd_end = tail->nd_next->nd_end; 14862 } 14863 else { 14864 head->nd_next->nd_end = tail; 14865 } 14866 14867 return head; 14868 } 14869 14870 static int 14871 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 14872 { 14873 if (NIL_P(tail)) return 1; 14874 if (!rb_enc_compatible(head, tail)) { 14875 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 14876 rb_enc_name(rb_enc_get(head)), 14877 rb_enc_name(rb_enc_get(tail))); 14878 rb_str_resize(head, 0); 14879 rb_str_resize(tail, 0); 14880 return 0; 14881 } 14882 rb_str_buf_append(head, tail); 14883 return 1; 14884 } 14885 14886 /* concat two string literals */ 14887 static NODE * 14888 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14889 { 14890 enum node_type htype; 14891 NODE *headlast; 14892 VALUE lit; 14893 14894 if (!head) return tail; 14895 if (!tail) return head; 14896 14897 htype = nd_type(head); 14898 if (htype == NODE_EVSTR) { 14899 NODE *node = NEW_DSTR(Qnil); 14900 head = list_append(node, head); 14901 htype = NODE_DSTR; 14902 } 14903 switch (nd_type(tail)) { 14904 case NODE_STR: 14905 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14906 nd_type(headlast) == NODE_STR) { 14907 htype = NODE_STR; 14908 lit = headlast->nd_lit; 14909 } 14910 else { 14911 lit = head->nd_lit; 14912 } 14913 if (htype == NODE_STR) { 14914 if (!literal_concat0(parser, lit, tail->nd_lit)) { 14915 error: 14916 rb_gc_force_recycle((VALUE)head); 14917 rb_gc_force_recycle((VALUE)tail); 14918 return 0; 14919 } 14920 rb_gc_force_recycle((VALUE)tail); 14921 } 14922 else { 14923 list_append(head, tail); 14924 } 14925 break; 14926 14927 case NODE_DSTR: 14928 if (htype == NODE_STR) { 14929 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 14930 goto error; 14931 tail->nd_lit = head->nd_lit; 14932 rb_gc_force_recycle((VALUE)head); 14933 head = tail; 14934 } 14935 else if (NIL_P(tail->nd_lit)) { 14936 append: 14937 head->nd_alen += tail->nd_alen - 1; 14938 head->nd_next->nd_end->nd_next = tail->nd_next; 14939 head->nd_next->nd_end = tail->nd_next->nd_end; 14940 rb_gc_force_recycle((VALUE)tail); 14941 } 14942 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14943 nd_type(headlast) == NODE_STR) { 14944 lit = headlast->nd_lit; 14945 if (!literal_concat0(parser, lit, tail->nd_lit)) 14946 goto error; 14947 tail->nd_lit = Qnil; 14948 goto append; 14949 } 14950 else { 14951 nd_set_type(tail, NODE_ARRAY); 14952 tail->nd_head = NEW_STR(tail->nd_lit); 14953 list_concat(head, tail); 14954 } 14955 break; 14956 14957 case NODE_EVSTR: 14958 if (htype == NODE_STR) { 14959 nd_set_type(head, NODE_DSTR); 14960 head->nd_alen = 1; 14961 } 14962 list_append(head, tail); 14963 break; 14964 } 14965 return head; 14966 } 14967 14968 static NODE * 14969 evstr2dstr_gen(struct parser_params *parser, NODE *node) 14970 { 14971 if (nd_type(node) == NODE_EVSTR) { 14972 node = list_append(NEW_DSTR(Qnil), node); 14973 } 14974 return node; 14975 } 14976 14977 static NODE * 14978 new_evstr_gen(struct parser_params *parser, NODE *node) 14979 { 14980 NODE *head = node; 14981 14982 if (node) { 14983 switch (nd_type(node)) { 14984 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 14985 return node; 14986 } 14987 } 14988 return NEW_EVSTR(head); 14989 } 14990 14991 static NODE * 14992 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 14993 { 14994 value_expr(recv); 14995 value_expr(arg1); 14996 return NEW_CALL(recv, id, NEW_LIST(arg1)); 14997 } 14998 14999 static NODE * 15000 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 15001 { 15002 value_expr(recv); 15003 return NEW_CALL(recv, id, 0); 15004 } 15005 15006 static NODE* 15007 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15008 { 15009 value_expr(node1); 15010 value_expr(node2); 15011 if (node1) { 15012 switch (nd_type(node1)) { 15013 case NODE_DREGX: 15014 case NODE_DREGX_ONCE: 15015 return NEW_MATCH2(node1, node2); 15016 15017 case NODE_LIT: 15018 if (RB_TYPE_P(node1->nd_lit, T_REGEXP)) { 15019 return NEW_MATCH2(node1, node2); 15020 } 15021 } 15022 } 15023 15024 if (node2) { 15025 switch (nd_type(node2)) { 15026 case NODE_DREGX: 15027 case NODE_DREGX_ONCE: 15028 return NEW_MATCH3(node2, node1); 15029 15030 case NODE_LIT: 15031 if (RB_TYPE_P(node2->nd_lit, T_REGEXP)) { 15032 return NEW_MATCH3(node2, node1); 15033 } 15034 } 15035 } 15036 15037 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 15038 } 15039 15040 static NODE* 15041 gettable_gen(struct parser_params *parser, ID id) 15042 { 15043 switch (id) { 15044 case keyword_self: 15045 return NEW_SELF(); 15046 case keyword_nil: 15047 return NEW_NIL(); 15048 case keyword_true: 15049 return NEW_TRUE(); 15050 case keyword_false: 15051 return NEW_FALSE(); 15052 case keyword__FILE__: 15053 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 15054 rb_filesystem_encoding())); 15055 case keyword__LINE__: 15056 return NEW_LIT(INT2FIX(tokline)); 15057 case keyword__ENCODING__: 15058 return NEW_LIT(rb_enc_from_encoding(current_enc)); 15059 } 15060 switch (id_type(id)) { 15061 case ID_LOCAL: 15062 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 15063 if (local_id(id)) return NEW_LVAR(id); 15064 /* method call without arguments */ 15065 return NEW_VCALL(id); 15066 case ID_GLOBAL: 15067 return NEW_GVAR(id); 15068 case ID_INSTANCE: 15069 return NEW_IVAR(id); 15070 case ID_CONST: 15071 return NEW_CONST(id); 15072 case ID_CLASS: 15073 return NEW_CVAR(id); 15074 } 15075 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15076 return 0; 15077 } 15078 #else /* !RIPPER */ 15079 static int 15080 id_is_var_gen(struct parser_params *parser, ID id) 15081 { 15082 if (is_notop_id(id)) { 15083 switch (id & ID_SCOPE_MASK) { 15084 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 15085 return 1; 15086 case ID_LOCAL: 15087 if (dyna_in_block() && dvar_defined(id)) return 1; 15088 if (local_id(id)) return 1; 15089 /* method call without arguments */ 15090 return 0; 15091 } 15092 } 15093 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15094 return 0; 15095 } 15096 #endif /* !RIPPER */ 15097 15098 #if PARSER_DEBUG 15099 static const char * 15100 lex_state_name(enum lex_state_e state) 15101 { 15102 static const char names[][12] = { 15103 "EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG", 15104 "EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS", 15105 "EXPR_VALUE", 15106 }; 15107 15108 if ((unsigned)state & ~(~0u << EXPR_MAX_STATE)) 15109 return names[ffs(state)]; 15110 return NULL; 15111 } 15112 #endif 15113 15114 #ifdef RIPPER 15115 static VALUE 15116 assignable_gen(struct parser_params *parser, VALUE lhs) 15117 #else 15118 static NODE* 15119 assignable_gen(struct parser_params *parser, ID id, NODE *val) 15120 #endif 15121 { 15122 #ifdef RIPPER 15123 ID id = get_id(lhs); 15124 # define assignable_result(x) get_value(lhs) 15125 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 15126 #else 15127 # define assignable_result(x) (x) 15128 #endif 15129 if (!id) return assignable_result(0); 15130 switch (id) { 15131 case keyword_self: 15132 yyerror("Can't change the value of self"); 15133 goto error; 15134 case keyword_nil: 15135 yyerror("Can't assign to nil"); 15136 goto error; 15137 case keyword_true: 15138 yyerror("Can't assign to true"); 15139 goto error; 15140 case keyword_false: 15141 yyerror("Can't assign to false"); 15142 goto error; 15143 case keyword__FILE__: 15144 yyerror("Can't assign to __FILE__"); 15145 goto error; 15146 case keyword__LINE__: 15147 yyerror("Can't assign to __LINE__"); 15148 goto error; 15149 case keyword__ENCODING__: 15150 yyerror("Can't assign to __ENCODING__"); 15151 goto error; 15152 } 15153 switch (id_type(id)) { 15154 case ID_LOCAL: 15155 if (dyna_in_block()) { 15156 if (dvar_curr(id)) { 15157 return assignable_result(NEW_DASGN_CURR(id, val)); 15158 } 15159 else if (dvar_defined(id)) { 15160 return assignable_result(NEW_DASGN(id, val)); 15161 } 15162 else if (local_id(id)) { 15163 return assignable_result(NEW_LASGN(id, val)); 15164 } 15165 else { 15166 dyna_var(id); 15167 return assignable_result(NEW_DASGN_CURR(id, val)); 15168 } 15169 } 15170 else { 15171 if (!local_id(id)) { 15172 local_var(id); 15173 } 15174 return assignable_result(NEW_LASGN(id, val)); 15175 } 15176 break; 15177 case ID_GLOBAL: 15178 return assignable_result(NEW_GASGN(id, val)); 15179 case ID_INSTANCE: 15180 return assignable_result(NEW_IASGN(id, val)); 15181 case ID_CONST: 15182 if (!in_def && !in_single) 15183 return assignable_result(NEW_CDECL(id, val, 0)); 15184 yyerror("dynamic constant assignment"); 15185 break; 15186 case ID_CLASS: 15187 return assignable_result(NEW_CVASGN(id, val)); 15188 default: 15189 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 15190 } 15191 error: 15192 return assignable_result(0); 15193 #undef assignable_result 15194 #undef parser_yyerror 15195 } 15196 15197 static int 15198 is_private_local_id(ID name) 15199 { 15200 VALUE s; 15201 if (name == idUScore) return 1; 15202 if (!is_local_id(name)) return 0; 15203 s = rb_id2str(name); 15204 if (!s) return 0; 15205 return RSTRING_PTR(s)[0] == '_'; 15206 } 15207 15208 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) 15209 15210 static ID 15211 shadowing_lvar_gen(struct parser_params *parser, ID name) 15212 { 15213 if (is_private_local_id(name)) return name; 15214 if (dyna_in_block()) { 15215 if (dvar_curr(name)) { 15216 yyerror("duplicated argument name"); 15217 } 15218 else if (dvar_defined_get(name) || local_id(name)) { 15219 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 15220 vtable_add(lvtbl->vars, name); 15221 if (lvtbl->used) { 15222 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 15223 } 15224 } 15225 } 15226 else { 15227 if (local_id(name)) { 15228 yyerror("duplicated argument name"); 15229 } 15230 } 15231 return name; 15232 } 15233 15234 static void 15235 new_bv_gen(struct parser_params *parser, ID name) 15236 { 15237 if (!name) return; 15238 if (!is_local_id(name)) { 15239 compile_error(PARSER_ARG "invalid local variable - %s", 15240 rb_id2name(name)); 15241 return; 15242 } 15243 shadowing_lvar(name); 15244 dyna_var(name); 15245 } 15246 15247 #ifndef RIPPER 15248 static NODE * 15249 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 15250 { 15251 if (recv && nd_type(recv) == NODE_SELF) 15252 recv = (NODE *)1; 15253 return NEW_ATTRASGN(recv, tASET, idx); 15254 } 15255 15256 static void 15257 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15258 { 15259 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 15260 compile_error(PARSER_ARG "both block arg and actual block given"); 15261 } 15262 } 15263 15264 ID 15265 rb_id_attrset(ID id) 15266 { 15267 id &= ~ID_SCOPE_MASK; 15268 id |= ID_ATTRSET; 15269 return id; 15270 } 15271 15272 static NODE * 15273 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 15274 { 15275 if (recv && nd_type(recv) == NODE_SELF) 15276 recv = (NODE *)1; 15277 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 15278 } 15279 15280 static void 15281 rb_backref_error_gen(struct parser_params *parser, NODE *node) 15282 { 15283 switch (nd_type(node)) { 15284 case NODE_NTH_REF: 15285 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 15286 break; 15287 case NODE_BACK_REF: 15288 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 15289 break; 15290 } 15291 } 15292 15293 static NODE * 15294 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15295 { 15296 if (!node2) return node1; 15297 switch (nd_type(node1)) { 15298 case NODE_BLOCK_PASS: 15299 if (node1->nd_head) 15300 node1->nd_head = arg_concat(node1->nd_head, node2); 15301 else 15302 node1->nd_head = NEW_LIST(node2); 15303 return node1; 15304 case NODE_ARGSPUSH: 15305 if (nd_type(node2) != NODE_ARRAY) break; 15306 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 15307 nd_set_type(node1, NODE_ARGSCAT); 15308 return node1; 15309 case NODE_ARGSCAT: 15310 if (nd_type(node2) != NODE_ARRAY || 15311 nd_type(node1->nd_body) != NODE_ARRAY) break; 15312 node1->nd_body = list_concat(node1->nd_body, node2); 15313 return node1; 15314 } 15315 return NEW_ARGSCAT(node1, node2); 15316 } 15317 15318 static NODE * 15319 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15320 { 15321 if (!node1) return NEW_LIST(node2); 15322 switch (nd_type(node1)) { 15323 case NODE_ARRAY: 15324 return list_append(node1, node2); 15325 case NODE_BLOCK_PASS: 15326 node1->nd_head = arg_append(node1->nd_head, node2); 15327 return node1; 15328 case NODE_ARGSPUSH: 15329 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 15330 nd_set_type(node1, NODE_ARGSCAT); 15331 return node1; 15332 } 15333 return NEW_ARGSPUSH(node1, node2); 15334 } 15335 15336 static NODE * 15337 splat_array(NODE* node) 15338 { 15339 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 15340 if (nd_type(node) == NODE_ARRAY) return node; 15341 return 0; 15342 } 15343 15344 static NODE * 15345 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 15346 { 15347 if (!lhs) return 0; 15348 15349 switch (nd_type(lhs)) { 15350 case NODE_GASGN: 15351 case NODE_IASGN: 15352 case NODE_IASGN2: 15353 case NODE_LASGN: 15354 case NODE_DASGN: 15355 case NODE_DASGN_CURR: 15356 case NODE_MASGN: 15357 case NODE_CDECL: 15358 case NODE_CVASGN: 15359 lhs->nd_value = rhs; 15360 break; 15361 15362 case NODE_ATTRASGN: 15363 case NODE_CALL: 15364 lhs->nd_args = arg_append(lhs->nd_args, rhs); 15365 break; 15366 15367 default: 15368 /* should not happen */ 15369 break; 15370 } 15371 15372 return lhs; 15373 } 15374 15375 static int 15376 value_expr_gen(struct parser_params *parser, NODE *node) 15377 { 15378 int cond = 0; 15379 15380 if (!node) { 15381 rb_warning0("empty expression"); 15382 } 15383 while (node) { 15384 switch (nd_type(node)) { 15385 case NODE_DEFN: 15386 case NODE_DEFS: 15387 parser_warning(node, "void value expression"); 15388 return FALSE; 15389 15390 case NODE_RETURN: 15391 case NODE_BREAK: 15392 case NODE_NEXT: 15393 case NODE_REDO: 15394 case NODE_RETRY: 15395 if (!cond) yyerror("void value expression"); 15396 /* or "control never reach"? */ 15397 return FALSE; 15398 15399 case NODE_BLOCK: 15400 while (node->nd_next) { 15401 node = node->nd_next; 15402 } 15403 node = node->nd_head; 15404 break; 15405 15406 case NODE_BEGIN: 15407 node = node->nd_body; 15408 break; 15409 15410 case NODE_IF: 15411 if (!node->nd_body) { 15412 node = node->nd_else; 15413 break; 15414 } 15415 else if (!node->nd_else) { 15416 node = node->nd_body; 15417 break; 15418 } 15419 if (!value_expr(node->nd_body)) return FALSE; 15420 node = node->nd_else; 15421 break; 15422 15423 case NODE_AND: 15424 case NODE_OR: 15425 cond = 1; 15426 node = node->nd_2nd; 15427 break; 15428 15429 default: 15430 return TRUE; 15431 } 15432 } 15433 15434 return TRUE; 15435 } 15436 15437 static void 15438 void_expr_gen(struct parser_params *parser, NODE *node) 15439 { 15440 const char *useless = 0; 15441 15442 if (!RTEST(ruby_verbose)) return; 15443 15444 if (!node) return; 15445 switch (nd_type(node)) { 15446 case NODE_CALL: 15447 switch (node->nd_mid) { 15448 case '+': 15449 case '-': 15450 case '*': 15451 case '/': 15452 case '%': 15453 case tPOW: 15454 case tUPLUS: 15455 case tUMINUS: 15456 case '|': 15457 case '^': 15458 case '&': 15459 case tCMP: 15460 case '>': 15461 case tGEQ: 15462 case '<': 15463 case tLEQ: 15464 case tEQ: 15465 case tNEQ: 15466 useless = rb_id2name(node->nd_mid); 15467 break; 15468 } 15469 break; 15470 15471 case NODE_LVAR: 15472 case NODE_DVAR: 15473 case NODE_GVAR: 15474 case NODE_IVAR: 15475 case NODE_CVAR: 15476 case NODE_NTH_REF: 15477 case NODE_BACK_REF: 15478 useless = "a variable"; 15479 break; 15480 case NODE_CONST: 15481 useless = "a constant"; 15482 break; 15483 case NODE_LIT: 15484 case NODE_STR: 15485 case NODE_DSTR: 15486 case NODE_DREGX: 15487 case NODE_DREGX_ONCE: 15488 useless = "a literal"; 15489 break; 15490 case NODE_COLON2: 15491 case NODE_COLON3: 15492 useless = "::"; 15493 break; 15494 case NODE_DOT2: 15495 useless = ".."; 15496 break; 15497 case NODE_DOT3: 15498 useless = "..."; 15499 break; 15500 case NODE_SELF: 15501 useless = "self"; 15502 break; 15503 case NODE_NIL: 15504 useless = "nil"; 15505 break; 15506 case NODE_TRUE: 15507 useless = "true"; 15508 break; 15509 case NODE_FALSE: 15510 useless = "false"; 15511 break; 15512 case NODE_DEFINED: 15513 useless = "defined?"; 15514 break; 15515 } 15516 15517 if (useless) { 15518 int line = ruby_sourceline; 15519 15520 ruby_sourceline = nd_line(node); 15521 rb_warnS("possibly useless use of %s in void context", useless); 15522 ruby_sourceline = line; 15523 } 15524 } 15525 15526 static void 15527 void_stmts_gen(struct parser_params *parser, NODE *node) 15528 { 15529 if (!RTEST(ruby_verbose)) return; 15530 if (!node) return; 15531 if (nd_type(node) != NODE_BLOCK) return; 15532 15533 for (;;) { 15534 if (!node->nd_next) return; 15535 void_expr0(node->nd_head); 15536 node = node->nd_next; 15537 } 15538 } 15539 15540 static NODE * 15541 remove_begin(NODE *node) 15542 { 15543 NODE **n = &node, *n1 = node; 15544 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 15545 *n = n1 = n1->nd_body; 15546 } 15547 return node; 15548 } 15549 15550 static void 15551 reduce_nodes_gen(struct parser_params *parser, NODE **body) 15552 { 15553 NODE *node = *body; 15554 15555 if (!node) { 15556 *body = NEW_NIL(); 15557 return; 15558 } 15559 #define subnodes(n1, n2) \ 15560 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 15561 (!node->n2) ? (body = &node->n1, 1) : \ 15562 (reduce_nodes(&node->n1), body = &node->n2, 1)) 15563 15564 while (node) { 15565 int newline = (int)(node->flags & NODE_FL_NEWLINE); 15566 switch (nd_type(node)) { 15567 end: 15568 case NODE_NIL: 15569 *body = 0; 15570 return; 15571 case NODE_RETURN: 15572 *body = node = node->nd_stts; 15573 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15574 continue; 15575 case NODE_BEGIN: 15576 *body = node = node->nd_body; 15577 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15578 continue; 15579 case NODE_BLOCK: 15580 body = &node->nd_end->nd_head; 15581 break; 15582 case NODE_IF: 15583 if (subnodes(nd_body, nd_else)) break; 15584 return; 15585 case NODE_CASE: 15586 body = &node->nd_body; 15587 break; 15588 case NODE_WHEN: 15589 if (!subnodes(nd_body, nd_next)) goto end; 15590 break; 15591 case NODE_ENSURE: 15592 if (!subnodes(nd_head, nd_resq)) goto end; 15593 break; 15594 case NODE_RESCUE: 15595 if (node->nd_else) { 15596 body = &node->nd_resq; 15597 break; 15598 } 15599 if (!subnodes(nd_head, nd_resq)) goto end; 15600 break; 15601 default: 15602 return; 15603 } 15604 node = *body; 15605 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15606 } 15607 15608 #undef subnodes 15609 } 15610 15611 static int 15612 is_static_content(NODE *node) 15613 { 15614 if (!node) return 1; 15615 switch (nd_type(node)) { 15616 case NODE_HASH: 15617 if (!(node = node->nd_head)) break; 15618 case NODE_ARRAY: 15619 do { 15620 if (!is_static_content(node->nd_head)) return 0; 15621 } while ((node = node->nd_next) != 0); 15622 case NODE_LIT: 15623 case NODE_STR: 15624 case NODE_NIL: 15625 case NODE_TRUE: 15626 case NODE_FALSE: 15627 case NODE_ZARRAY: 15628 break; 15629 default: 15630 return 0; 15631 } 15632 return 1; 15633 } 15634 15635 static int 15636 assign_in_cond(struct parser_params *parser, NODE *node) 15637 { 15638 switch (nd_type(node)) { 15639 case NODE_MASGN: 15640 yyerror("multiple assignment in conditional"); 15641 return 1; 15642 15643 case NODE_LASGN: 15644 case NODE_DASGN: 15645 case NODE_DASGN_CURR: 15646 case NODE_GASGN: 15647 case NODE_IASGN: 15648 break; 15649 15650 default: 15651 return 0; 15652 } 15653 15654 if (!node->nd_value) return 1; 15655 if (is_static_content(node->nd_value)) { 15656 /* reports always */ 15657 parser_warn(node->nd_value, "found = in conditional, should be =="); 15658 } 15659 return 1; 15660 } 15661 15662 static void 15663 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15664 { 15665 if (!e_option_supplied(parser)) parser_warn(node, str); 15666 } 15667 15668 static void 15669 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15670 { 15671 if (!e_option_supplied(parser)) parser_warning(node, str); 15672 } 15673 15674 static void 15675 fixup_nodes(NODE **rootnode) 15676 { 15677 NODE *node, *next, *head; 15678 15679 for (node = *rootnode; node; node = next) { 15680 enum node_type type; 15681 VALUE val; 15682 15683 next = node->nd_next; 15684 head = node->nd_head; 15685 rb_gc_force_recycle((VALUE)node); 15686 *rootnode = next; 15687 switch (type = nd_type(head)) { 15688 case NODE_DOT2: 15689 case NODE_DOT3: 15690 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 15691 type == NODE_DOT3); 15692 rb_gc_force_recycle((VALUE)head->nd_beg); 15693 rb_gc_force_recycle((VALUE)head->nd_end); 15694 nd_set_type(head, NODE_LIT); 15695 head->nd_lit = val; 15696 break; 15697 default: 15698 break; 15699 } 15700 } 15701 } 15702 15703 static NODE *cond0(struct parser_params*,NODE*); 15704 15705 static NODE* 15706 range_op(struct parser_params *parser, NODE *node) 15707 { 15708 enum node_type type; 15709 15710 if (node == 0) return 0; 15711 15712 type = nd_type(node); 15713 value_expr(node); 15714 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 15715 warn_unless_e_option(parser, node, "integer literal in conditional range"); 15716 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 15717 } 15718 return cond0(parser, node); 15719 } 15720 15721 static int 15722 literal_node(NODE *node) 15723 { 15724 if (!node) return 1; /* same as NODE_NIL */ 15725 switch (nd_type(node)) { 15726 case NODE_LIT: 15727 case NODE_STR: 15728 case NODE_DSTR: 15729 case NODE_EVSTR: 15730 case NODE_DREGX: 15731 case NODE_DREGX_ONCE: 15732 case NODE_DSYM: 15733 return 2; 15734 case NODE_TRUE: 15735 case NODE_FALSE: 15736 case NODE_NIL: 15737 return 1; 15738 } 15739 return 0; 15740 } 15741 15742 static NODE* 15743 cond0(struct parser_params *parser, NODE *node) 15744 { 15745 if (node == 0) return 0; 15746 assign_in_cond(parser, node); 15747 15748 switch (nd_type(node)) { 15749 case NODE_DSTR: 15750 case NODE_EVSTR: 15751 case NODE_STR: 15752 rb_warn0("string literal in condition"); 15753 break; 15754 15755 case NODE_DREGX: 15756 case NODE_DREGX_ONCE: 15757 warning_unless_e_option(parser, node, "regex literal in condition"); 15758 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 15759 15760 case NODE_AND: 15761 case NODE_OR: 15762 node->nd_1st = cond0(parser, node->nd_1st); 15763 node->nd_2nd = cond0(parser, node->nd_2nd); 15764 break; 15765 15766 case NODE_DOT2: 15767 case NODE_DOT3: 15768 node->nd_beg = range_op(parser, node->nd_beg); 15769 node->nd_end = range_op(parser, node->nd_end); 15770 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 15771 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 15772 if (!e_option_supplied(parser)) { 15773 int b = literal_node(node->nd_beg); 15774 int e = literal_node(node->nd_end); 15775 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 15776 parser_warn(node, "range literal in condition"); 15777 } 15778 } 15779 break; 15780 15781 case NODE_DSYM: 15782 parser_warning(node, "literal in condition"); 15783 break; 15784 15785 case NODE_LIT: 15786 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) { 15787 warn_unless_e_option(parser, node, "regex literal in condition"); 15788 nd_set_type(node, NODE_MATCH); 15789 } 15790 else { 15791 parser_warning(node, "literal in condition"); 15792 } 15793 default: 15794 break; 15795 } 15796 return node; 15797 } 15798 15799 static NODE* 15800 cond_gen(struct parser_params *parser, NODE *node) 15801 { 15802 if (node == 0) return 0; 15803 return cond0(parser, node); 15804 } 15805 15806 static NODE* 15807 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 15808 { 15809 value_expr(left); 15810 if (left && (enum node_type)nd_type(left) == type) { 15811 NODE *node = left, *second; 15812 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 15813 node = second; 15814 } 15815 node->nd_2nd = NEW_NODE(type, second, right, 0); 15816 return left; 15817 } 15818 return NEW_NODE(type, left, right, 0); 15819 } 15820 15821 static void 15822 no_blockarg(struct parser_params *parser, NODE *node) 15823 { 15824 if (node && nd_type(node) == NODE_BLOCK_PASS) { 15825 compile_error(PARSER_ARG "block argument should not be given"); 15826 } 15827 } 15828 15829 static NODE * 15830 ret_args_gen(struct parser_params *parser, NODE *node) 15831 { 15832 if (node) { 15833 no_blockarg(parser, node); 15834 if (nd_type(node) == NODE_ARRAY) { 15835 if (node->nd_next == 0) { 15836 node = node->nd_head; 15837 } 15838 else { 15839 nd_set_type(node, NODE_VALUES); 15840 } 15841 } 15842 } 15843 return node; 15844 } 15845 15846 static NODE * 15847 new_yield_gen(struct parser_params *parser, NODE *node) 15848 { 15849 if (node) no_blockarg(parser, node); 15850 15851 return NEW_YIELD(node); 15852 } 15853 15854 static NODE* 15855 negate_lit(NODE *node) 15856 { 15857 switch (TYPE(node->nd_lit)) { 15858 case T_FIXNUM: 15859 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 15860 break; 15861 case T_BIGNUM: 15862 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 15863 break; 15864 case T_FLOAT: 15865 #if USE_FLONUM 15866 if (FLONUM_P(node->nd_lit)) { 15867 node->nd_lit = DBL2NUM(-RFLOAT_VALUE(node->nd_lit)); 15868 } 15869 else { 15870 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15871 } 15872 #else 15873 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15874 #endif 15875 break; 15876 default: 15877 break; 15878 } 15879 return node; 15880 } 15881 15882 static NODE * 15883 arg_blk_pass(NODE *node1, NODE *node2) 15884 { 15885 if (node2) { 15886 node2->nd_head = node1; 15887 return node2; 15888 } 15889 return node1; 15890 } 15891 15892 15893 static NODE* 15894 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail) 15895 { 15896 int saved_line = ruby_sourceline; 15897 struct rb_args_info *args = tail->nd_ainfo; 15898 15899 args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0; 15900 args->pre_init = m ? m->nd_next : 0; 15901 15902 args->post_args_num = p ? rb_long2int(p->nd_plen) : 0; 15903 args->post_init = p ? p->nd_next : 0; 15904 args->first_post_arg = p ? p->nd_pid : 0; 15905 15906 args->rest_arg = r; 15907 15908 args->opt_args = o; 15909 15910 ruby_sourceline = saved_line; 15911 15912 return tail; 15913 } 15914 15915 static NODE* 15916 new_args_tail_gen(struct parser_params *parser, NODE *k, ID kr, ID b) 15917 { 15918 int saved_line = ruby_sourceline; 15919 struct rb_args_info *args; 15920 NODE *kw_rest_arg = 0; 15921 NODE *node; 15922 15923 args = ALLOC(struct rb_args_info); 15924 MEMZERO(args, struct rb_args_info, 1); 15925 node = NEW_NODE(NODE_ARGS, 0, 0, args); 15926 15927 args->block_arg = b; 15928 args->kw_args = k; 15929 if (k && !kr) kr = internal_id(); 15930 if (kr) { 15931 arg_var(kr); 15932 kw_rest_arg = NEW_DVAR(kr); 15933 } 15934 args->kw_rest_arg = kw_rest_arg; 15935 15936 ruby_sourceline = saved_line; 15937 return node; 15938 } 15939 15940 static NODE* 15941 dsym_node_gen(struct parser_params *parser, NODE *node) 15942 { 15943 VALUE lit; 15944 15945 if (!node) { 15946 return NEW_LIT(ID2SYM(idNULL)); 15947 } 15948 15949 switch (nd_type(node)) { 15950 case NODE_DSTR: 15951 nd_set_type(node, NODE_DSYM); 15952 break; 15953 case NODE_STR: 15954 lit = node->nd_lit; 15955 node->nd_lit = ID2SYM(rb_intern_str(lit)); 15956 nd_set_type(node, NODE_LIT); 15957 break; 15958 default: 15959 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node)); 15960 break; 15961 } 15962 return node; 15963 } 15964 #endif /* !RIPPER */ 15965 15966 #ifndef RIPPER 15967 static NODE * 15968 new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 15969 { 15970 NODE *asgn; 15971 15972 if (lhs) { 15973 ID vid = lhs->nd_vid; 15974 if (op == tOROP) { 15975 lhs->nd_value = rhs; 15976 asgn = NEW_OP_ASGN_OR(gettable(vid), lhs); 15977 if (is_asgn_or_id(vid)) { 15978 asgn->nd_aid = vid; 15979 } 15980 } 15981 else if (op == tANDOP) { 15982 lhs->nd_value = rhs; 15983 asgn = NEW_OP_ASGN_AND(gettable(vid), lhs); 15984 } 15985 else { 15986 asgn = lhs; 15987 asgn->nd_value = NEW_CALL(gettable(vid), op, NEW_LIST(rhs)); 15988 } 15989 } 15990 else { 15991 asgn = NEW_BEGIN(0); 15992 } 15993 return asgn; 15994 } 15995 15996 static NODE * 15997 new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs) 15998 { 15999 NODE *asgn; 16000 16001 if (op == tOROP) { 16002 op = 0; 16003 } 16004 else if (op == tANDOP) { 16005 op = 1; 16006 } 16007 asgn = NEW_OP_ASGN2(lhs, attr, op, rhs); 16008 fixpos(asgn, lhs); 16009 return asgn; 16010 } 16011 16012 static NODE * 16013 new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 16014 { 16015 NODE *asgn; 16016 16017 if (op == tOROP) { 16018 op = 0; 16019 } 16020 else if (op == tANDOP) { 16021 op = 1; 16022 } 16023 if (lhs) { 16024 asgn = NEW_OP_CDECL(lhs, op, rhs); 16025 } 16026 else { 16027 asgn = NEW_BEGIN(0); 16028 } 16029 fixpos(asgn, lhs); 16030 return asgn; 16031 } 16032 #else 16033 static VALUE 16034 new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs) 16035 { 16036 return dispatch3(opassign, lhs, op, rhs); 16037 } 16038 16039 static VALUE 16040 new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs) 16041 { 16042 VALUE recv = dispatch3(field, lhs, type, attr); 16043 return dispatch3(opassign, recv, op, rhs); 16044 } 16045 #endif 16046 16047 static void 16048 warn_unused_var(struct parser_params *parser, struct local_vars *local) 16049 { 16050 int i, cnt; 16051 ID *v, *u; 16052 16053 if (!local->used) return; 16054 v = local->vars->tbl; 16055 u = local->used->tbl; 16056 cnt = local->used->pos; 16057 if (cnt != local->vars->pos) { 16058 rb_bug("local->used->pos != local->vars->pos"); 16059 } 16060 for (i = 0; i < cnt; ++i) { 16061 if (!v[i] || (u[i] & LVAR_USED)) continue; 16062 if (is_private_local_id(v[i])) continue; 16063 rb_warn4S(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 16064 } 16065 } 16066 16067 static void 16068 local_push_gen(struct parser_params *parser, int inherit_dvars) 16069 { 16070 struct local_vars *local; 16071 16072 local = ALLOC(struct local_vars); 16073 local->prev = lvtbl; 16074 local->args = vtable_alloc(0); 16075 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 16076 local->used = !(inherit_dvars && 16077 (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) && 16078 RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 16079 lvtbl = local; 16080 } 16081 16082 static void 16083 local_pop_gen(struct parser_params *parser) 16084 { 16085 struct local_vars *local = lvtbl->prev; 16086 if (lvtbl->used) { 16087 warn_unused_var(parser, lvtbl); 16088 vtable_free(lvtbl->used); 16089 } 16090 vtable_free(lvtbl->args); 16091 vtable_free(lvtbl->vars); 16092 xfree(lvtbl); 16093 lvtbl = local; 16094 } 16095 16096 #ifndef RIPPER 16097 static ID* 16098 vtable_tblcpy(ID *buf, const struct vtable *src) 16099 { 16100 int i, cnt = vtable_size(src); 16101 16102 if (cnt > 0) { 16103 buf[0] = cnt; 16104 for (i = 0; i < cnt; i++) { 16105 buf[i] = src->tbl[i]; 16106 } 16107 return buf; 16108 } 16109 return 0; 16110 } 16111 16112 static ID* 16113 local_tbl_gen(struct parser_params *parser) 16114 { 16115 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 16116 ID *buf; 16117 16118 if (cnt <= 0) return 0; 16119 buf = ALLOC_N(ID, cnt + 1); 16120 vtable_tblcpy(buf+1, lvtbl->args); 16121 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 16122 buf[0] = cnt; 16123 return buf; 16124 } 16125 #endif 16126 16127 static int 16128 arg_var_gen(struct parser_params *parser, ID id) 16129 { 16130 vtable_add(lvtbl->args, id); 16131 return vtable_size(lvtbl->args) - 1; 16132 } 16133 16134 static int 16135 local_var_gen(struct parser_params *parser, ID id) 16136 { 16137 vtable_add(lvtbl->vars, id); 16138 if (lvtbl->used) { 16139 vtable_add(lvtbl->used, (ID)ruby_sourceline); 16140 } 16141 return vtable_size(lvtbl->vars) - 1; 16142 } 16143 16144 static int 16145 local_id_gen(struct parser_params *parser, ID id) 16146 { 16147 struct vtable *vars, *args, *used; 16148 16149 vars = lvtbl->vars; 16150 args = lvtbl->args; 16151 used = lvtbl->used; 16152 16153 while (vars && POINTER_P(vars->prev)) { 16154 vars = vars->prev; 16155 args = args->prev; 16156 if (used) used = used->prev; 16157 } 16158 16159 if (vars && vars->prev == DVARS_INHERIT) { 16160 return rb_local_defined(id); 16161 } 16162 else if (vtable_included(args, id)) { 16163 return 1; 16164 } 16165 else { 16166 int i = vtable_included(vars, id); 16167 if (i && used) used->tbl[i-1] |= LVAR_USED; 16168 return i != 0; 16169 } 16170 } 16171 16172 static const struct vtable * 16173 dyna_push_gen(struct parser_params *parser) 16174 { 16175 lvtbl->args = vtable_alloc(lvtbl->args); 16176 lvtbl->vars = vtable_alloc(lvtbl->vars); 16177 if (lvtbl->used) { 16178 lvtbl->used = vtable_alloc(lvtbl->used); 16179 } 16180 return lvtbl->args; 16181 } 16182 16183 static void 16184 dyna_pop_1(struct parser_params *parser) 16185 { 16186 struct vtable *tmp; 16187 16188 if ((tmp = lvtbl->used) != 0) { 16189 warn_unused_var(parser, lvtbl); 16190 lvtbl->used = lvtbl->used->prev; 16191 vtable_free(tmp); 16192 } 16193 tmp = lvtbl->args; 16194 lvtbl->args = lvtbl->args->prev; 16195 vtable_free(tmp); 16196 tmp = lvtbl->vars; 16197 lvtbl->vars = lvtbl->vars->prev; 16198 vtable_free(tmp); 16199 } 16200 16201 static void 16202 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 16203 { 16204 while (lvtbl->args != lvargs) { 16205 dyna_pop_1(parser); 16206 if (!lvtbl->args) { 16207 struct local_vars *local = lvtbl->prev; 16208 xfree(lvtbl); 16209 lvtbl = local; 16210 } 16211 } 16212 dyna_pop_1(parser); 16213 } 16214 16215 static int 16216 dyna_in_block_gen(struct parser_params *parser) 16217 { 16218 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 16219 } 16220 16221 static int 16222 dvar_defined_gen(struct parser_params *parser, ID id, int get) 16223 { 16224 struct vtable *vars, *args, *used; 16225 int i; 16226 16227 args = lvtbl->args; 16228 vars = lvtbl->vars; 16229 used = lvtbl->used; 16230 16231 while (POINTER_P(vars)) { 16232 if (vtable_included(args, id)) { 16233 return 1; 16234 } 16235 if ((i = vtable_included(vars, id)) != 0) { 16236 if (used) used->tbl[i-1] |= LVAR_USED; 16237 return 1; 16238 } 16239 args = args->prev; 16240 vars = vars->prev; 16241 if (get) used = 0; 16242 if (used) used = used->prev; 16243 } 16244 16245 if (vars == DVARS_INHERIT) { 16246 return rb_dvar_defined(id); 16247 } 16248 16249 return 0; 16250 } 16251 16252 static int 16253 dvar_curr_gen(struct parser_params *parser, ID id) 16254 { 16255 return (vtable_included(lvtbl->args, id) || 16256 vtable_included(lvtbl->vars, id)); 16257 } 16258 16259 #ifndef RIPPER 16260 static void 16261 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 16262 { 16263 int c = RE_OPTION_ENCODING_IDX(options); 16264 16265 if (c) { 16266 int opt, idx; 16267 rb_char_to_option_kcode(c, &opt, &idx); 16268 if (idx != ENCODING_GET(str) && 16269 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16270 goto error; 16271 } 16272 ENCODING_SET(str, idx); 16273 } 16274 else if (RE_OPTION_ENCODING_NONE(options)) { 16275 if (!ENCODING_IS_ASCII8BIT(str) && 16276 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16277 c = 'n'; 16278 goto error; 16279 } 16280 rb_enc_associate(str, rb_ascii8bit_encoding()); 16281 } 16282 else if (current_enc == rb_usascii_encoding()) { 16283 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16284 /* raise in re.c */ 16285 rb_enc_associate(str, rb_usascii_encoding()); 16286 } 16287 else { 16288 rb_enc_associate(str, rb_ascii8bit_encoding()); 16289 } 16290 } 16291 return; 16292 16293 error: 16294 compile_error(PARSER_ARG 16295 "regexp encoding option '%c' differs from source encoding '%s'", 16296 c, rb_enc_name(rb_enc_get(str))); 16297 } 16298 16299 static int 16300 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 16301 { 16302 VALUE err; 16303 reg_fragment_setenc(str, options); 16304 err = rb_reg_check_preprocess(str); 16305 if (err != Qnil) { 16306 err = rb_obj_as_string(err); 16307 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 16308 RB_GC_GUARD(err); 16309 return 0; 16310 } 16311 return 1; 16312 } 16313 16314 typedef struct { 16315 struct parser_params* parser; 16316 rb_encoding *enc; 16317 NODE *succ_block; 16318 NODE *fail_block; 16319 int num; 16320 } reg_named_capture_assign_t; 16321 16322 static int 16323 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 16324 int back_num, int *back_refs, OnigRegex regex, void *arg0) 16325 { 16326 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 16327 struct parser_params* parser = arg->parser; 16328 rb_encoding *enc = arg->enc; 16329 long len = name_end - name; 16330 const char *s = (const char *)name; 16331 ID var; 16332 16333 arg->num++; 16334 16335 if (arg->succ_block == 0) { 16336 arg->succ_block = NEW_BEGIN(0); 16337 arg->fail_block = NEW_BEGIN(0); 16338 } 16339 16340 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 16341 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 16342 !rb_enc_symname2_p(s, len, enc)) { 16343 return ST_CONTINUE; 16344 } 16345 var = rb_intern3(s, len, enc); 16346 if (dvar_defined(var) || local_id(var)) { 16347 rb_warningS("named capture conflicts a local variable - %s", 16348 rb_id2name(var)); 16349 } 16350 arg->succ_block = block_append(arg->succ_block, 16351 newline_node(node_assign(assignable(var,0), 16352 NEW_CALL( 16353 gettable(rb_intern("$~")), 16354 idAREF, 16355 NEW_LIST(NEW_LIT(ID2SYM(var)))) 16356 ))); 16357 arg->fail_block = block_append(arg->fail_block, 16358 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 16359 return ST_CONTINUE; 16360 } 16361 16362 static NODE * 16363 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 16364 { 16365 reg_named_capture_assign_t arg; 16366 16367 arg.parser = parser; 16368 arg.enc = rb_enc_get(regexp); 16369 arg.succ_block = 0; 16370 arg.fail_block = 0; 16371 arg.num = 0; 16372 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 16373 16374 if (arg.num == 0) 16375 return match; 16376 16377 return 16378 block_append( 16379 newline_node(match), 16380 NEW_IF(gettable(rb_intern("$~")), 16381 block_append( 16382 newline_node(arg.succ_block), 16383 newline_node( 16384 NEW_CALL( 16385 gettable(rb_intern("$~")), 16386 rb_intern("begin"), 16387 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 16388 block_append( 16389 newline_node(arg.fail_block), 16390 newline_node( 16391 NEW_LIT(Qnil))))); 16392 } 16393 16394 static VALUE 16395 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 16396 { 16397 VALUE re; 16398 VALUE err; 16399 16400 reg_fragment_setenc(str, options); 16401 err = rb_errinfo(); 16402 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 16403 if (NIL_P(re)) { 16404 ID mesg = rb_intern("mesg"); 16405 VALUE m = rb_attr_get(rb_errinfo(), mesg); 16406 rb_set_errinfo(err); 16407 if (!NIL_P(err)) { 16408 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 16409 } 16410 else { 16411 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 16412 } 16413 return Qnil; 16414 } 16415 return re; 16416 } 16417 16418 void 16419 rb_gc_mark_parser(void) 16420 { 16421 } 16422 16423 NODE* 16424 rb_parser_append_print(VALUE vparser, NODE *node) 16425 { 16426 NODE *prelude = 0; 16427 NODE *scope = node; 16428 struct parser_params *parser; 16429 16430 if (!node) return node; 16431 16432 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16433 16434 node = node->nd_body; 16435 16436 if (nd_type(node) == NODE_PRELUDE) { 16437 prelude = node; 16438 node = node->nd_body; 16439 } 16440 16441 node = block_append(node, 16442 NEW_FCALL(rb_intern("print"), 16443 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 16444 if (prelude) { 16445 prelude->nd_body = node; 16446 scope->nd_body = prelude; 16447 } 16448 else { 16449 scope->nd_body = node; 16450 } 16451 16452 return scope; 16453 } 16454 16455 NODE * 16456 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 16457 { 16458 NODE *prelude = 0; 16459 NODE *scope = node; 16460 struct parser_params *parser; 16461 16462 if (!node) return node; 16463 16464 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16465 16466 node = node->nd_body; 16467 16468 if (nd_type(node) == NODE_PRELUDE) { 16469 prelude = node; 16470 node = node->nd_body; 16471 } 16472 if (split) { 16473 node = block_append(NEW_GASGN(rb_intern("$F"), 16474 NEW_CALL(NEW_GVAR(rb_intern("$_")), 16475 rb_intern("split"), 0)), 16476 node); 16477 } 16478 if (chop) { 16479 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 16480 rb_intern("chop!"), 0), node); 16481 } 16482 16483 node = NEW_OPT_N(node); 16484 16485 if (prelude) { 16486 prelude->nd_body = node; 16487 scope->nd_body = prelude; 16488 } 16489 else { 16490 scope->nd_body = node; 16491 } 16492 16493 return scope; 16494 } 16495 16496 static const struct { 16497 ID token; 16498 const char *name; 16499 } op_tbl[] = { 16500 {tDOT2, ".."}, 16501 {tDOT3, "..."}, 16502 {tPOW, "**"}, 16503 {tDSTAR, "**"}, 16504 {tUPLUS, "+@"}, 16505 {tUMINUS, "-@"}, 16506 {tCMP, "<=>"}, 16507 {tGEQ, ">="}, 16508 {tLEQ, "<="}, 16509 {tEQ, "=="}, 16510 {tEQQ, "==="}, 16511 {tNEQ, "!="}, 16512 {tMATCH, "=~"}, 16513 {tNMATCH, "!~"}, 16514 {tAREF, "[]"}, 16515 {tASET, "[]="}, 16516 {tLSHFT, "<<"}, 16517 {tRSHFT, ">>"}, 16518 {tCOLON2, "::"}, 16519 }; 16520 16521 #define op_tbl_count numberof(op_tbl) 16522 16523 #ifndef ENABLE_SELECTOR_NAMESPACE 16524 #define ENABLE_SELECTOR_NAMESPACE 0 16525 #endif 16526 16527 static struct symbols { 16528 ID last_id; 16529 st_table *sym_id; 16530 st_table *id_str; 16531 #if ENABLE_SELECTOR_NAMESPACE 16532 st_table *ivar2_id; 16533 st_table *id_ivar2; 16534 #endif 16535 VALUE op_sym[tLAST_OP_ID]; 16536 } global_symbols = {tLAST_TOKEN}; 16537 16538 static const struct st_hash_type symhash = { 16539 rb_str_hash_cmp, 16540 rb_str_hash, 16541 }; 16542 16543 #if ENABLE_SELECTOR_NAMESPACE 16544 struct ivar2_key { 16545 ID id; 16546 VALUE klass; 16547 }; 16548 16549 static int 16550 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 16551 { 16552 if (key1->id == key2->id && key1->klass == key2->klass) { 16553 return 0; 16554 } 16555 return 1; 16556 } 16557 16558 static int 16559 ivar2_hash(struct ivar2_key *key) 16560 { 16561 return (key->id << 8) ^ (key->klass >> 2); 16562 } 16563 16564 static const struct st_hash_type ivar2_hash_type = { 16565 ivar2_cmp, 16566 ivar2_hash, 16567 }; 16568 #endif 16569 16570 void 16571 Init_sym(void) 16572 { 16573 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 16574 global_symbols.id_str = st_init_numtable_with_size(1000); 16575 #if ENABLE_SELECTOR_NAMESPACE 16576 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 16577 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 16578 #endif 16579 16580 (void)nodetype; 16581 (void)nodeline; 16582 #if PARSER_DEBUG 16583 (void)lex_state_name(-1); 16584 #endif 16585 16586 Init_id(); 16587 } 16588 16589 void 16590 rb_gc_mark_symbols(void) 16591 { 16592 rb_mark_tbl(global_symbols.id_str); 16593 rb_gc_mark_locations(global_symbols.op_sym, 16594 global_symbols.op_sym + numberof(global_symbols.op_sym)); 16595 } 16596 #endif /* !RIPPER */ 16597 16598 static ID 16599 internal_id_gen(struct parser_params *parser) 16600 { 16601 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 16602 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 16603 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 16604 } 16605 16606 #ifndef RIPPER 16607 static int 16608 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 16609 { 16610 int mb = 0; 16611 16612 if (m >= e) return 0; 16613 if (is_global_name_punct(*m)) { 16614 ++m; 16615 } 16616 else if (*m == '-') { 16617 ++m; 16618 if (m < e && is_identchar(m, e, enc)) { 16619 if (!ISASCII(*m)) mb = 1; 16620 m += rb_enc_mbclen(m, e, enc); 16621 } 16622 } 16623 else { 16624 if (!rb_enc_isdigit(*m, enc)) return 0; 16625 do { 16626 if (!ISASCII(*m)) mb = 1; 16627 ++m; 16628 } while (m < e && rb_enc_isdigit(*m, enc)); 16629 } 16630 return m == e ? mb + 1 : 0; 16631 } 16632 16633 int 16634 rb_symname_p(const char *name) 16635 { 16636 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 16637 } 16638 16639 int 16640 rb_enc_symname_p(const char *name, rb_encoding *enc) 16641 { 16642 return rb_enc_symname2_p(name, strlen(name), enc); 16643 } 16644 16645 static int 16646 rb_enc_symname_type(const char *name, long len, rb_encoding *enc) 16647 { 16648 const char *m = name; 16649 const char *e = m + len; 16650 int type = ID_JUNK; 16651 16652 if (!m || len <= 0) return -1; 16653 switch (*m) { 16654 case '\0': 16655 return -1; 16656 16657 case '$': 16658 type = ID_GLOBAL; 16659 if (is_special_global_name(++m, e, enc)) return type; 16660 goto id; 16661 16662 case '@': 16663 type = ID_INSTANCE; 16664 if (*++m == '@') { 16665 ++m; 16666 type = ID_CLASS; 16667 } 16668 goto id; 16669 16670 case '<': 16671 switch (*++m) { 16672 case '<': ++m; break; 16673 case '=': if (*++m == '>') ++m; break; 16674 default: break; 16675 } 16676 break; 16677 16678 case '>': 16679 switch (*++m) { 16680 case '>': case '=': ++m; break; 16681 } 16682 break; 16683 16684 case '=': 16685 switch (*++m) { 16686 case '~': ++m; break; 16687 case '=': if (*++m == '=') ++m; break; 16688 default: return -1; 16689 } 16690 break; 16691 16692 case '*': 16693 if (*++m == '*') ++m; 16694 break; 16695 16696 case '+': case '-': 16697 if (*++m == '@') ++m; 16698 break; 16699 16700 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 16701 ++m; 16702 break; 16703 16704 case '[': 16705 if (*++m != ']') return -1; 16706 if (*++m == '=') ++m; 16707 break; 16708 16709 case '!': 16710 if (len == 1) return ID_JUNK; 16711 switch (*++m) { 16712 case '=': case '~': ++m; break; 16713 default: return -1; 16714 } 16715 break; 16716 16717 default: 16718 type = rb_enc_isupper(*m, enc) ? ID_CONST : ID_LOCAL; 16719 id: 16720 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 16721 return -1; 16722 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 16723 switch (*m) { 16724 case '!': case '?': 16725 if (type == ID_GLOBAL || type == ID_CLASS || type == ID_INSTANCE) return -1; 16726 type = ID_JUNK; 16727 ++m; 16728 break; 16729 case '=': 16730 if (type != ID_CONST && type != ID_LOCAL) return -1; 16731 type = ID_ATTRSET; 16732 ++m; 16733 break; 16734 } 16735 break; 16736 } 16737 return m == e ? type : -1; 16738 } 16739 16740 int 16741 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 16742 { 16743 return rb_enc_symname_type(name, len, enc) != -1; 16744 } 16745 16746 static int 16747 rb_str_symname_type(VALUE name) 16748 { 16749 const char *ptr = StringValuePtr(name); 16750 long len = RSTRING_LEN(name); 16751 int type = rb_enc_symname_type(ptr, len, rb_enc_get(name)); 16752 RB_GC_GUARD(name); 16753 return type; 16754 } 16755 16756 static ID 16757 register_symid(ID id, const char *name, long len, rb_encoding *enc) 16758 { 16759 VALUE str = rb_enc_str_new(name, len, enc); 16760 return register_symid_str(id, str); 16761 } 16762 16763 static ID 16764 register_symid_str(ID id, VALUE str) 16765 { 16766 OBJ_FREEZE(str); 16767 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 16768 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 16769 return id; 16770 } 16771 16772 static int 16773 sym_check_asciionly(VALUE str) 16774 { 16775 if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE; 16776 switch (rb_enc_str_coderange(str)) { 16777 case ENC_CODERANGE_BROKEN: 16778 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 16779 case ENC_CODERANGE_7BIT: 16780 return TRUE; 16781 } 16782 return FALSE; 16783 } 16784 16785 /* 16786 * _str_ itself will be registered at the global symbol table. _str_ 16787 * can be modified before the registration, since the encoding will be 16788 * set to ASCII-8BIT if it is a special global name. 16789 */ 16790 static ID intern_str(VALUE str); 16791 16792 ID 16793 rb_intern3(const char *name, long len, rb_encoding *enc) 16794 { 16795 VALUE str; 16796 st_data_t data; 16797 struct RString fake_str; 16798 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16799 fake_str.basic.klass = rb_cString; 16800 fake_str.as.heap.len = len; 16801 fake_str.as.heap.ptr = (char *)name; 16802 fake_str.as.heap.aux.capa = len; 16803 str = (VALUE)&fake_str; 16804 rb_enc_associate(str, enc); 16805 OBJ_FREEZE(str); 16806 16807 if (st_lookup(global_symbols.sym_id, str, &data)) 16808 return (ID)data; 16809 16810 str = rb_enc_str_new(name, len, enc); /* make true string */ 16811 return intern_str(str); 16812 } 16813 16814 static ID 16815 intern_str(VALUE str) 16816 { 16817 const char *name, *m, *e; 16818 long len, last; 16819 rb_encoding *enc, *symenc; 16820 unsigned char c; 16821 ID id; 16822 int mb; 16823 16824 RSTRING_GETMEM(str, name, len); 16825 m = name; 16826 e = m + len; 16827 enc = rb_enc_get(str); 16828 symenc = enc; 16829 16830 if (rb_cString && !rb_enc_asciicompat(enc)) { 16831 id = ID_JUNK; 16832 goto new_id; 16833 } 16834 last = len-1; 16835 id = 0; 16836 switch (*m) { 16837 case '$': 16838 id |= ID_GLOBAL; 16839 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 16840 if (!--mb) symenc = rb_usascii_encoding(); 16841 goto new_id; 16842 } 16843 break; 16844 case '@': 16845 if (m[1] == '@') { 16846 m++; 16847 id |= ID_CLASS; 16848 } 16849 else { 16850 id |= ID_INSTANCE; 16851 } 16852 m++; 16853 break; 16854 default: 16855 c = m[0]; 16856 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 16857 /* operators */ 16858 int i; 16859 16860 if (len == 1) { 16861 id = c; 16862 goto id_register; 16863 } 16864 for (i = 0; i < op_tbl_count; i++) { 16865 if (*op_tbl[i].name == *m && 16866 strcmp(op_tbl[i].name, m) == 0) { 16867 id = op_tbl[i].token; 16868 goto id_register; 16869 } 16870 } 16871 } 16872 16873 if (m[last] == '=') { 16874 /* attribute assignment */ 16875 id = rb_intern3(name, last, enc); 16876 if (id > tLAST_OP_ID && !is_attrset_id(id)) { 16877 enc = rb_enc_get(rb_id2str(id)); 16878 id = rb_id_attrset(id); 16879 goto id_register; 16880 } 16881 id = ID_ATTRSET; 16882 } 16883 else if (rb_enc_isupper(m[0], enc)) { 16884 id = ID_CONST; 16885 } 16886 else { 16887 id = ID_LOCAL; 16888 } 16889 break; 16890 } 16891 if (!rb_enc_isdigit(*m, enc)) { 16892 while (m <= name + last && is_identchar(m, e, enc)) { 16893 if (ISASCII(*m)) { 16894 m++; 16895 } 16896 else { 16897 m += rb_enc_mbclen(m, e, enc); 16898 } 16899 } 16900 } 16901 if (m - name < len) id = ID_JUNK; 16902 if (sym_check_asciionly(str)) symenc = rb_usascii_encoding(); 16903 new_id: 16904 if (symenc != enc) rb_enc_associate(str, symenc); 16905 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 16906 if (len > 20) { 16907 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 16908 name); 16909 } 16910 else { 16911 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 16912 (int)len, name); 16913 } 16914 } 16915 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 16916 id_register: 16917 return register_symid_str(id, str); 16918 } 16919 16920 ID 16921 rb_intern2(const char *name, long len) 16922 { 16923 return rb_intern3(name, len, rb_usascii_encoding()); 16924 } 16925 16926 #undef rb_intern 16927 ID 16928 rb_intern(const char *name) 16929 { 16930 return rb_intern2(name, strlen(name)); 16931 } 16932 16933 ID 16934 rb_intern_str(VALUE str) 16935 { 16936 st_data_t id; 16937 16938 if (st_lookup(global_symbols.sym_id, str, &id)) 16939 return (ID)id; 16940 return intern_str(rb_str_dup(str)); 16941 } 16942 16943 VALUE 16944 rb_id2str(ID id) 16945 { 16946 st_data_t data; 16947 16948 if (id < tLAST_TOKEN) { 16949 int i = 0; 16950 16951 if (id < INT_MAX && rb_ispunct((int)id)) { 16952 VALUE str = global_symbols.op_sym[i = (int)id]; 16953 if (!str) { 16954 char name[2]; 16955 name[0] = (char)id; 16956 name[1] = 0; 16957 str = rb_usascii_str_new(name, 1); 16958 OBJ_FREEZE(str); 16959 global_symbols.op_sym[i] = str; 16960 } 16961 return str; 16962 } 16963 for (i = 0; i < op_tbl_count; i++) { 16964 if (op_tbl[i].token == id) { 16965 VALUE str = global_symbols.op_sym[i]; 16966 if (!str) { 16967 str = rb_usascii_str_new2(op_tbl[i].name); 16968 OBJ_FREEZE(str); 16969 global_symbols.op_sym[i] = str; 16970 } 16971 return str; 16972 } 16973 } 16974 } 16975 16976 if (st_lookup(global_symbols.id_str, id, &data)) { 16977 VALUE str = (VALUE)data; 16978 if (RBASIC(str)->klass == 0) 16979 RBASIC(str)->klass = rb_cString; 16980 return str; 16981 } 16982 16983 if (is_attrset_id(id)) { 16984 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 16985 VALUE str; 16986 16987 while (!(str = rb_id2str(id2))) { 16988 if (!is_local_id(id2)) return 0; 16989 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 16990 } 16991 str = rb_str_dup(str); 16992 rb_str_cat(str, "=", 1); 16993 rb_intern_str(str); 16994 if (st_lookup(global_symbols.id_str, id, &data)) { 16995 VALUE str = (VALUE)data; 16996 if (RBASIC(str)->klass == 0) 16997 RBASIC(str)->klass = rb_cString; 16998 return str; 16999 } 17000 } 17001 return 0; 17002 } 17003 17004 const char * 17005 rb_id2name(ID id) 17006 { 17007 VALUE str = rb_id2str(id); 17008 17009 if (!str) return 0; 17010 return RSTRING_PTR(str); 17011 } 17012 17013 static int 17014 symbols_i(VALUE sym, ID value, VALUE ary) 17015 { 17016 rb_ary_push(ary, ID2SYM(value)); 17017 return ST_CONTINUE; 17018 } 17019 17020 /* 17021 * call-seq: 17022 * Symbol.all_symbols => array 17023 * 17024 * Returns an array of all the symbols currently in Ruby's symbol 17025 * table. 17026 * 17027 * Symbol.all_symbols.size #=> 903 17028 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 17029 * :chown, :EOFError, :$;, :String, 17030 * :LOCK_SH, :"setuid?", :$<, 17031 * :default_proc, :compact, :extend, 17032 * :Tms, :getwd, :$=, :ThreadGroup, 17033 * :wait2, :$>] 17034 */ 17035 17036 VALUE 17037 rb_sym_all_symbols(void) 17038 { 17039 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 17040 17041 st_foreach(global_symbols.sym_id, symbols_i, ary); 17042 return ary; 17043 } 17044 17045 int 17046 rb_is_const_id(ID id) 17047 { 17048 return is_const_id(id); 17049 } 17050 17051 int 17052 rb_is_class_id(ID id) 17053 { 17054 return is_class_id(id); 17055 } 17056 17057 int 17058 rb_is_global_id(ID id) 17059 { 17060 return is_global_id(id); 17061 } 17062 17063 int 17064 rb_is_instance_id(ID id) 17065 { 17066 return is_instance_id(id); 17067 } 17068 17069 int 17070 rb_is_attrset_id(ID id) 17071 { 17072 return is_attrset_id(id); 17073 } 17074 17075 int 17076 rb_is_local_id(ID id) 17077 { 17078 return is_local_id(id); 17079 } 17080 17081 int 17082 rb_is_junk_id(ID id) 17083 { 17084 return is_junk_id(id); 17085 } 17086 17098 ID 17099 rb_check_id(volatile VALUE *namep) 17100 { 17101 st_data_t id; 17102 VALUE tmp; 17103 VALUE name = *namep; 17104 17105 if (SYMBOL_P(name)) { 17106 return SYM2ID(name); 17107 } 17108 else if (!RB_TYPE_P(name, T_STRING)) { 17109 tmp = rb_check_string_type(name); 17110 if (NIL_P(tmp)) { 17111 tmp = rb_inspect(name); 17112 rb_raise(rb_eTypeError, "%s is not a symbol", 17113 RSTRING_PTR(tmp)); 17114 } 17115 name = tmp; 17116 *namep = name; 17117 } 17118 17119 sym_check_asciionly(name); 17120 17121 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17122 return (ID)id; 17123 17124 if (rb_is_attrset_name(name)) { 17125 struct RString fake_str; 17126 const VALUE localname = (VALUE)&fake_str; 17127 /* make local name by chopping '=' */ 17128 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17129 fake_str.basic.klass = rb_cString; 17130 fake_str.as.heap.len = RSTRING_LEN(name) - 1; 17131 fake_str.as.heap.ptr = RSTRING_PTR(name); 17132 fake_str.as.heap.aux.capa = fake_str.as.heap.len; 17133 rb_enc_copy(localname, name); 17134 OBJ_FREEZE(localname); 17135 17136 if (st_lookup(global_symbols.sym_id, (st_data_t)localname, &id)) { 17137 return rb_id_attrset((ID)id); 17138 } 17139 RB_GC_GUARD(name); 17140 } 17141 17142 return (ID)0; 17143 } 17144 17145 ID 17146 rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc) 17147 { 17148 st_data_t id; 17149 struct RString fake_str; 17150 const VALUE name = (VALUE)&fake_str; 17151 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17152 fake_str.basic.klass = rb_cString; 17153 fake_str.as.heap.len = len; 17154 fake_str.as.heap.ptr = (char *)ptr; 17155 fake_str.as.heap.aux.capa = len; 17156 rb_enc_associate(name, enc); 17157 17158 sym_check_asciionly(name); 17159 17160 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17161 return (ID)id; 17162 17163 if (rb_is_attrset_name(name)) { 17164 fake_str.as.heap.len = len - 1; 17165 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) { 17166 return rb_id_attrset((ID)id); 17167 } 17168 } 17169 17170 return (ID)0; 17171 } 17172 17173 int 17174 rb_is_const_name(VALUE name) 17175 { 17176 return rb_str_symname_type(name) == ID_CONST; 17177 } 17178 17179 int 17180 rb_is_class_name(VALUE name) 17181 { 17182 return rb_str_symname_type(name) == ID_CLASS; 17183 } 17184 17185 int 17186 rb_is_global_name(VALUE name) 17187 { 17188 return rb_str_symname_type(name) == ID_GLOBAL; 17189 } 17190 17191 int 17192 rb_is_instance_name(VALUE name) 17193 { 17194 return rb_str_symname_type(name) == ID_INSTANCE; 17195 } 17196 17197 int 17198 rb_is_attrset_name(VALUE name) 17199 { 17200 return rb_str_symname_type(name) == ID_ATTRSET; 17201 } 17202 17203 int 17204 rb_is_local_name(VALUE name) 17205 { 17206 return rb_str_symname_type(name) == ID_LOCAL; 17207 } 17208 17209 int 17210 rb_is_method_name(VALUE name) 17211 { 17212 switch (rb_str_symname_type(name)) { 17213 case ID_LOCAL: case ID_ATTRSET: case ID_JUNK: 17214 return TRUE; 17215 } 17216 return FALSE; 17217 } 17218 17219 int 17220 rb_is_junk_name(VALUE name) 17221 { 17222 return rb_str_symname_type(name) == -1; 17223 } 17224 17225 #endif /* !RIPPER */ 17226 17227 static void 17228 parser_initialize(struct parser_params *parser) 17229 { 17230 parser->eofp = Qfalse; 17231 17232 parser->parser_lex_strterm = 0; 17233 parser->parser_cond_stack = 0; 17234 parser->parser_cmdarg_stack = 0; 17235 parser->parser_class_nest = 0; 17236 parser->parser_paren_nest = 0; 17237 parser->parser_lpar_beg = 0; 17238 parser->parser_brace_nest = 0; 17239 parser->parser_in_single = 0; 17240 parser->parser_in_def = 0; 17241 parser->parser_in_defined = 0; 17242 parser->parser_compile_for_eval = 0; 17243 parser->parser_cur_mid = 0; 17244 parser->parser_tokenbuf = NULL; 17245 parser->parser_tokidx = 0; 17246 parser->parser_toksiz = 0; 17247 parser->parser_heredoc_end = 0; 17248 parser->parser_command_start = TRUE; 17249 parser->parser_deferred_nodes = 0; 17250 parser->parser_lex_pbeg = 0; 17251 parser->parser_lex_p = 0; 17252 parser->parser_lex_pend = 0; 17253 parser->parser_lvtbl = 0; 17254 parser->parser_ruby__end__seen = 0; 17255 parser->parser_ruby_sourcefile = 0; 17256 #ifndef RIPPER 17257 parser->is_ripper = 0; 17258 parser->parser_eval_tree_begin = 0; 17259 parser->parser_eval_tree = 0; 17260 #else 17261 parser->is_ripper = 1; 17262 parser->parser_ruby_sourcefile_string = Qnil; 17263 parser->delayed = Qnil; 17264 17265 parser->result = Qnil; 17266 parser->parsing_thread = Qnil; 17267 parser->toplevel_p = TRUE; 17268 #endif 17269 #ifdef YYMALLOC 17270 parser->heap = NULL; 17271 #endif 17272 parser->enc = rb_utf8_encoding(); 17273 } 17274 17275 #ifdef RIPPER 17276 #define parser_mark ripper_parser_mark 17277 #define parser_free ripper_parser_free 17278 #endif 17279 17280 static void 17281 parser_mark(void *ptr) 17282 { 17283 struct parser_params *p = (struct parser_params*)ptr; 17284 17285 rb_gc_mark((VALUE)p->parser_lex_strterm); 17286 rb_gc_mark((VALUE)p->parser_deferred_nodes); 17287 rb_gc_mark(p->parser_lex_input); 17288 rb_gc_mark(p->parser_lex_lastline); 17289 rb_gc_mark(p->parser_lex_nextline); 17290 #ifndef RIPPER 17291 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 17292 rb_gc_mark((VALUE)p->parser_eval_tree) ; 17293 rb_gc_mark(p->debug_lines); 17294 #else 17295 rb_gc_mark(p->parser_ruby_sourcefile_string); 17296 rb_gc_mark(p->delayed); 17297 rb_gc_mark(p->value); 17298 rb_gc_mark(p->result); 17299 rb_gc_mark(p->parsing_thread); 17300 #endif 17301 #ifdef YYMALLOC 17302 rb_gc_mark((VALUE)p->heap); 17303 #endif 17304 } 17305 17306 static void 17307 parser_free(void *ptr) 17308 { 17309 struct parser_params *p = (struct parser_params*)ptr; 17310 struct local_vars *local, *prev; 17311 17312 if (p->parser_tokenbuf) { 17313 xfree(p->parser_tokenbuf); 17314 } 17315 for (local = p->parser_lvtbl; local; local = prev) { 17316 if (local->vars) xfree(local->vars); 17317 prev = local->prev; 17318 xfree(local); 17319 } 17320 #ifndef RIPPER 17321 xfree(p->parser_ruby_sourcefile); 17322 #endif 17323 xfree(p); 17324 } 17325 17326 static size_t 17327 parser_memsize(const void *ptr) 17328 { 17329 struct parser_params *p = (struct parser_params*)ptr; 17330 struct local_vars *local; 17331 size_t size = sizeof(*p); 17332 17333 if (!ptr) return 0; 17334 size += p->parser_toksiz; 17335 for (local = p->parser_lvtbl; local; local = local->prev) { 17336 size += sizeof(*local); 17337 if (local->vars) size += local->vars->capa * sizeof(ID); 17338 } 17339 #ifndef RIPPER 17340 if (p->parser_ruby_sourcefile) { 17341 size += strlen(p->parser_ruby_sourcefile) + 1; 17342 } 17343 #endif 17344 return size; 17345 } 17346 17347 static 17348 #ifndef RIPPER 17349 const 17350 #endif 17351 rb_data_type_t parser_data_type = { 17352 "parser", 17353 { 17354 parser_mark, 17355 parser_free, 17356 parser_memsize, 17357 }, 17358 }; 17359 17360 #ifndef RIPPER 17361 #undef rb_reserved_word 17362 17363 const struct kwtable * 17364 rb_reserved_word(const char *str, unsigned int len) 17365 { 17366 return reserved_word(str, len); 17367 } 17368 17369 static struct parser_params * 17370 parser_new(void) 17371 { 17372 struct parser_params *p; 17373 17374 p = ALLOC_N(struct parser_params, 1); 17375 MEMZERO(p, struct parser_params, 1); 17376 parser_initialize(p); 17377 return p; 17378 } 17379 17380 VALUE 17381 rb_parser_new(void) 17382 { 17383 struct parser_params *p = parser_new(); 17384 17385 return TypedData_Wrap_Struct(0, &parser_data_type, p); 17386 } 17387 17388 /* 17389 * call-seq: 17390 * ripper#end_seen? -> Boolean 17391 * 17392 * Return true if parsed source ended by +\_\_END\_\_+. 17393 */ 17394 VALUE 17395 rb_parser_end_seen_p(VALUE vparser) 17396 { 17397 struct parser_params *parser; 17398 17399 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17400 return ruby__end__seen ? Qtrue : Qfalse; 17401 } 17402 17403 /* 17404 * call-seq: 17405 * ripper#encoding -> encoding 17406 * 17407 * Return encoding of the source. 17408 */ 17409 VALUE 17410 rb_parser_encoding(VALUE vparser) 17411 { 17412 struct parser_params *parser; 17413 17414 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17415 return rb_enc_from_encoding(current_enc); 17416 } 17417 17418 /* 17419 * call-seq: 17420 * ripper.yydebug -> true or false 17421 * 17422 * Get yydebug. 17423 */ 17424 VALUE 17425 rb_parser_get_yydebug(VALUE self) 17426 { 17427 struct parser_params *parser; 17428 17429 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17430 return yydebug ? Qtrue : Qfalse; 17431 } 17432 17433 /* 17434 * call-seq: 17435 * ripper.yydebug = flag 17436 * 17437 * Set yydebug. 17438 */ 17439 VALUE 17440 rb_parser_set_yydebug(VALUE self, VALUE flag) 17441 { 17442 struct parser_params *parser; 17443 17444 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17445 yydebug = RTEST(flag); 17446 return flag; 17447 } 17448 17449 #ifdef YYMALLOC 17450 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 17451 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 17452 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 17453 (n)->u3.cnt = (c), (p)) 17454 17455 void * 17456 rb_parser_malloc(struct parser_params *parser, size_t size) 17457 { 17458 size_t cnt = HEAPCNT(1, size); 17459 NODE *n = NEWHEAP(); 17460 void *ptr = xmalloc(size); 17461 17462 return ADD2HEAP(n, cnt, ptr); 17463 } 17464 17465 void * 17466 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 17467 { 17468 size_t cnt = HEAPCNT(nelem, size); 17469 NODE *n = NEWHEAP(); 17470 void *ptr = xcalloc(nelem, size); 17471 17472 return ADD2HEAP(n, cnt, ptr); 17473 } 17474 17475 void * 17476 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 17477 { 17478 NODE *n; 17479 size_t cnt = HEAPCNT(1, size); 17480 17481 if (ptr && (n = parser->heap) != NULL) { 17482 do { 17483 if (n->u1.node == ptr) { 17484 n->u1.node = ptr = xrealloc(ptr, size); 17485 if (n->u3.cnt) n->u3.cnt = cnt; 17486 return ptr; 17487 } 17488 } while ((n = n->u2.node) != NULL); 17489 } 17490 n = NEWHEAP(); 17491 ptr = xrealloc(ptr, size); 17492 return ADD2HEAP(n, cnt, ptr); 17493 } 17494 17495 void 17496 rb_parser_free(struct parser_params *parser, void *ptr) 17497 { 17498 NODE **prev = &parser->heap, *n; 17499 17500 while ((n = *prev) != NULL) { 17501 if (n->u1.node == ptr) { 17502 *prev = n->u2.node; 17503 rb_gc_force_recycle((VALUE)n); 17504 break; 17505 } 17506 prev = &n->u2.node; 17507 } 17508 xfree(ptr); 17509 } 17510 #endif 17511 #endif 17512 17513 #ifdef RIPPER 17514 #ifdef RIPPER_DEBUG 17515 extern int rb_is_pointer_to_heap(VALUE); 17516 17517 /* :nodoc: */ 17518 static VALUE 17519 ripper_validate_object(VALUE self, VALUE x) 17520 { 17521 if (x == Qfalse) return x; 17522 if (x == Qtrue) return x; 17523 if (x == Qnil) return x; 17524 if (x == Qundef) 17525 rb_raise(rb_eArgError, "Qundef given"); 17526 if (FIXNUM_P(x)) return x; 17527 if (SYMBOL_P(x)) return x; 17528 if (!rb_is_pointer_to_heap(x)) 17529 rb_raise(rb_eArgError, "invalid pointer: %p", x); 17530 switch (TYPE(x)) { 17531 case T_STRING: 17532 case T_OBJECT: 17533 case T_ARRAY: 17534 case T_BIGNUM: 17535 case T_FLOAT: 17536 return x; 17537 case T_NODE: 17538 if (nd_type(x) != NODE_LASGN) { 17539 rb_raise(rb_eArgError, "NODE given: %p", x); 17540 } 17541 return ((NODE *)x)->nd_rval; 17542 default: 17543 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 17544 x, rb_obj_classname(x)); 17545 } 17546 return x; 17547 } 17548 #endif 17549 17550 #define validate(x) ((x) = get_value(x)) 17551 17552 static VALUE 17553 ripper_dispatch0(struct parser_params *parser, ID mid) 17554 { 17555 return rb_funcall(parser->value, mid, 0); 17556 } 17557 17558 static VALUE 17559 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 17560 { 17561 validate(a); 17562 return rb_funcall(parser->value, mid, 1, a); 17563 } 17564 17565 static VALUE 17566 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 17567 { 17568 validate(a); 17569 validate(b); 17570 return rb_funcall(parser->value, mid, 2, a, b); 17571 } 17572 17573 static VALUE 17574 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 17575 { 17576 validate(a); 17577 validate(b); 17578 validate(c); 17579 return rb_funcall(parser->value, mid, 3, a, b, c); 17580 } 17581 17582 static VALUE 17583 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 17584 { 17585 validate(a); 17586 validate(b); 17587 validate(c); 17588 validate(d); 17589 return rb_funcall(parser->value, mid, 4, a, b, c, d); 17590 } 17591 17592 static VALUE 17593 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 17594 { 17595 validate(a); 17596 validate(b); 17597 validate(c); 17598 validate(d); 17599 validate(e); 17600 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 17601 } 17602 17603 static VALUE 17604 ripper_dispatch7(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g) 17605 { 17606 validate(a); 17607 validate(b); 17608 validate(c); 17609 validate(d); 17610 validate(e); 17611 validate(f); 17612 validate(g); 17613 return rb_funcall(parser->value, mid, 7, a, b, c, d, e, f, g); 17614 } 17615 17616 static const struct kw_assoc { 17617 ID id; 17618 const char *name; 17619 } keyword_to_name[] = { 17620 {keyword_class, "class"}, 17621 {keyword_module, "module"}, 17622 {keyword_def, "def"}, 17623 {keyword_undef, "undef"}, 17624 {keyword_begin, "begin"}, 17625 {keyword_rescue, "rescue"}, 17626 {keyword_ensure, "ensure"}, 17627 {keyword_end, "end"}, 17628 {keyword_if, "if"}, 17629 {keyword_unless, "unless"}, 17630 {keyword_then, "then"}, 17631 {keyword_elsif, "elsif"}, 17632 {keyword_else, "else"}, 17633 {keyword_case, "case"}, 17634 {keyword_when, "when"}, 17635 {keyword_while, "while"}, 17636 {keyword_until, "until"}, 17637 {keyword_for, "for"}, 17638 {keyword_break, "break"}, 17639 {keyword_next, "next"}, 17640 {keyword_redo, "redo"}, 17641 {keyword_retry, "retry"}, 17642 {keyword_in, "in"}, 17643 {keyword_do, "do"}, 17644 {keyword_do_cond, "do"}, 17645 {keyword_do_block, "do"}, 17646 {keyword_return, "return"}, 17647 {keyword_yield, "yield"}, 17648 {keyword_super, "super"}, 17649 {keyword_self, "self"}, 17650 {keyword_nil, "nil"}, 17651 {keyword_true, "true"}, 17652 {keyword_false, "false"}, 17653 {keyword_and, "and"}, 17654 {keyword_or, "or"}, 17655 {keyword_not, "not"}, 17656 {modifier_if, "if"}, 17657 {modifier_unless, "unless"}, 17658 {modifier_while, "while"}, 17659 {modifier_until, "until"}, 17660 {modifier_rescue, "rescue"}, 17661 {keyword_alias, "alias"}, 17662 {keyword_defined, "defined?"}, 17663 {keyword_BEGIN, "BEGIN"}, 17664 {keyword_END, "END"}, 17665 {keyword__LINE__, "__LINE__"}, 17666 {keyword__FILE__, "__FILE__"}, 17667 {keyword__ENCODING__, "__ENCODING__"}, 17668 {0, NULL} 17669 }; 17670 17671 static const char* 17672 keyword_id_to_str(ID id) 17673 { 17674 const struct kw_assoc *a; 17675 17676 for (a = keyword_to_name; a->id; a++) { 17677 if (a->id == id) 17678 return a->name; 17679 } 17680 return NULL; 17681 } 17682 17683 #undef ripper_id2sym 17684 static VALUE 17685 ripper_id2sym(ID id) 17686 { 17687 const char *name; 17688 char buf[8]; 17689 17690 if (id <= 256) { 17691 buf[0] = (char)id; 17692 buf[1] = '\0'; 17693 return ID2SYM(rb_intern2(buf, 1)); 17694 } 17695 if ((name = keyword_id_to_str(id))) { 17696 return ID2SYM(rb_intern(name)); 17697 } 17698 switch (id) { 17699 case tOROP: 17700 name = "||"; 17701 break; 17702 case tANDOP: 17703 name = "&&"; 17704 break; 17705 default: 17706 name = rb_id2name(id); 17707 if (!name) { 17708 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 17709 } 17710 return ID2SYM(id); 17711 } 17712 return ID2SYM(rb_intern(name)); 17713 } 17714 17715 static ID 17716 ripper_get_id(VALUE v) 17717 { 17718 NODE *nd; 17719 if (!RB_TYPE_P(v, T_NODE)) return 0; 17720 nd = (NODE *)v; 17721 if (nd_type(nd) != NODE_LASGN) return 0; 17722 return nd->nd_vid; 17723 } 17724 17725 static VALUE 17726 ripper_get_value(VALUE v) 17727 { 17728 NODE *nd; 17729 if (v == Qundef) return Qnil; 17730 if (!RB_TYPE_P(v, T_NODE)) return v; 17731 nd = (NODE *)v; 17732 if (nd_type(nd) != NODE_LASGN) return Qnil; 17733 return nd->nd_rval; 17734 } 17735 17736 static void 17737 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 17738 { 17739 VALUE str; 17740 va_list args; 17741 17742 va_start(args, fmt); 17743 str = rb_vsprintf(fmt, args); 17744 va_end(args); 17745 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 17746 } 17747 17748 static void 17749 ripper_warn0(struct parser_params *parser, const char *fmt) 17750 { 17751 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 17752 } 17753 17754 static void 17755 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 17756 { 17757 rb_funcall(parser->value, rb_intern("warn"), 2, 17758 STR_NEW2(fmt), INT2NUM(a)); 17759 } 17760 17761 static void 17762 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 17763 { 17764 rb_funcall(parser->value, rb_intern("warn"), 2, 17765 STR_NEW2(fmt), STR_NEW2(str)); 17766 } 17767 17768 static void 17769 ripper_warning0(struct parser_params *parser, const char *fmt) 17770 { 17771 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 17772 } 17773 17774 static void 17775 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 17776 { 17777 rb_funcall(parser->value, rb_intern("warning"), 2, 17778 STR_NEW2(fmt), STR_NEW2(str)); 17779 } 17780 17781 static VALUE 17782 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 17783 { 17784 return rb_io_gets(src); 17785 } 17786 17787 static VALUE 17788 ripper_s_allocate(VALUE klass) 17789 { 17790 struct parser_params *p; 17791 VALUE self; 17792 17793 p = ALLOC_N(struct parser_params, 1); 17794 MEMZERO(p, struct parser_params, 1); 17795 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 17796 p->value = self; 17797 return self; 17798 } 17799 17800 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 17801 17802 /* 17803 * call-seq: 17804 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 17805 * 17806 * Create a new Ripper object. 17807 * _src_ must be a String, an IO, or an Object which has #gets method. 17808 * 17809 * This method does not starts parsing. 17810 * See also Ripper#parse and Ripper.parse. 17811 */ 17812 static VALUE 17813 ripper_initialize(int argc, VALUE *argv, VALUE self) 17814 { 17815 struct parser_params *parser; 17816 VALUE src, fname, lineno; 17817 17818 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17819 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 17820 if (RB_TYPE_P(src, T_FILE)) { 17821 parser->parser_lex_gets = ripper_lex_get_generic; 17822 } 17823 else { 17824 StringValue(src); 17825 parser->parser_lex_gets = lex_get_str; 17826 } 17827 parser->parser_lex_input = src; 17828 parser->eofp = Qfalse; 17829 if (NIL_P(fname)) { 17830 fname = STR_NEW2("(ripper)"); 17831 } 17832 else { 17833 StringValue(fname); 17834 } 17835 parser_initialize(parser); 17836 17837 parser->parser_ruby_sourcefile_string = fname; 17838 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 17839 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 17840 17841 return Qnil; 17842 } 17843 17844 struct ripper_args { 17845 struct parser_params *parser; 17846 int argc; 17847 VALUE *argv; 17848 }; 17849 17850 static VALUE 17851 ripper_parse0(VALUE parser_v) 17852 { 17853 struct parser_params *parser; 17854 17855 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17856 parser_prepare(parser); 17857 ripper_yyparse((void*)parser); 17858 return parser->result; 17859 } 17860 17861 static VALUE 17862 ripper_ensure(VALUE parser_v) 17863 { 17864 struct parser_params *parser; 17865 17866 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17867 parser->parsing_thread = Qnil; 17868 return Qnil; 17869 } 17870 17871 /* 17872 * call-seq: 17873 * ripper#parse 17874 * 17875 * Start parsing and returns the value of the root action. 17876 */ 17877 static VALUE 17878 ripper_parse(VALUE self) 17879 { 17880 struct parser_params *parser; 17881 17882 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17883 if (!ripper_initialized_p(parser)) { 17884 rb_raise(rb_eArgError, "method called for uninitialized object"); 17885 } 17886 if (!NIL_P(parser->parsing_thread)) { 17887 if (parser->parsing_thread == rb_thread_current()) 17888 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 17889 else 17890 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 17891 } 17892 parser->parsing_thread = rb_thread_current(); 17893 rb_ensure(ripper_parse0, self, ripper_ensure, self); 17894 17895 return parser->result; 17896 } 17897 17898 /* 17899 * call-seq: 17900 * ripper#column -> Integer 17901 * 17902 * Return column number of current parsing line. 17903 * This number starts from 0. 17904 */ 17905 static VALUE 17906 ripper_column(VALUE self) 17907 { 17908 struct parser_params *parser; 17909 long col; 17910 17911 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17912 if (!ripper_initialized_p(parser)) { 17913 rb_raise(rb_eArgError, "method called for uninitialized object"); 17914 } 17915 if (NIL_P(parser->parsing_thread)) return Qnil; 17916 col = parser->tokp - parser->parser_lex_pbeg; 17917 return LONG2NUM(col); 17918 } 17919 17920 /* 17921 * call-seq: 17922 * ripper#filename -> String 17923 * 17924 * Return current parsing filename. 17925 */ 17926 static VALUE 17927 ripper_filename(VALUE self) 17928 { 17929 struct parser_params *parser; 17930 17931 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17932 if (!ripper_initialized_p(parser)) { 17933 rb_raise(rb_eArgError, "method called for uninitialized object"); 17934 } 17935 return parser->parser_ruby_sourcefile_string; 17936 } 17937 17938 /* 17939 * call-seq: 17940 * ripper#lineno -> Integer 17941 * 17942 * Return line number of current parsing line. 17943 * This number starts from 1. 17944 */ 17945 static VALUE 17946 ripper_lineno(VALUE self) 17947 { 17948 struct parser_params *parser; 17949 17950 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17951 if (!ripper_initialized_p(parser)) { 17952 rb_raise(rb_eArgError, "method called for uninitialized object"); 17953 } 17954 if (NIL_P(parser->parsing_thread)) return Qnil; 17955 return INT2NUM(parser->parser_ruby_sourceline); 17956 } 17957 17958 #ifdef RIPPER_DEBUG 17959 /* :nodoc: */ 17960 static VALUE 17961 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 17962 { 17963 StringValue(msg); 17964 if (obj == Qundef) { 17965 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 17966 } 17967 return Qnil; 17968 } 17969 17970 /* :nodoc: */ 17971 static VALUE 17972 ripper_value(VALUE self, VALUE obj) 17973 { 17974 return ULONG2NUM(obj); 17975 } 17976 #endif 17977 17978 17979 void 17980 Init_ripper(void) 17981 { 17982 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 17983 17984 ripper_init_eventids1(); 17985 ripper_init_eventids2(); 17986 /* ensure existing in symbol table */ 17987 (void)rb_intern("||"); 17988 (void)rb_intern("&&"); 17989 17990 InitVM(ripper); 17991 } 17992 17993 void 17994 InitVM_ripper(void) 17995 { 17996 VALUE Ripper; 17997 17998 Ripper = rb_define_class("Ripper", rb_cObject); 17999 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 18000 rb_define_alloc_func(Ripper, ripper_s_allocate); 18001 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 18002 rb_define_method(Ripper, "parse", ripper_parse, 0); 18003 rb_define_method(Ripper, "column", ripper_column, 0); 18004 rb_define_method(Ripper, "filename", ripper_filename, 0); 18005 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 18006 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 18007 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 18008 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 18009 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 18010 #ifdef RIPPER_DEBUG 18011 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 18012 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 18013 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 18014 #endif 18015 18016 ripper_init_eventids1_table(Ripper); 18017 ripper_init_eventids2_table(Ripper); 18018 18019 # if 0 18020 /* Hack to let RDoc document SCRIPT_LINES__ */ 18021 18022 /* 18023 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 18024 * after the assignment will be added as an Array of lines with the file 18025 * name as the key. 18026 */ 18027 rb_define_global_const("SCRIPT_LINES__", Qnil); 18028 #endif 18029 18030 } 18031 #endif /* RIPPER */ 18032 18033
1.7.6.1