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