|
Ruby
1.9.3p537(2014-02-19revision0)
|
00001 /* A Bison parser, made by GNU Bison 2.7.1. */ 00002 00003 /* Bison implementation for Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989-1990, 2000-2013 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.7.1" 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 00062 00063 00064 /* Copy the first part of user declarations. */ 00065 /* Line 371 of yacc.c */ 00066 #line 12 "parse.y" 00067 00068 00069 #define YYDEBUG 1 00070 #define YYERROR_VERBOSE 1 00071 #define YYSTACK_USE_ALLOCA 0 00072 00073 #include "ruby/ruby.h" 00074 #include "ruby/st.h" 00075 #include "ruby/encoding.h" 00076 #include "internal.h" 00077 #include "node.h" 00078 #include "parse.h" 00079 #include "id.h" 00080 #include "regenc.h" 00081 #include <stdio.h> 00082 #include <errno.h> 00083 #include <ctype.h> 00084 00085 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00086 00087 #define YYMALLOC(size) rb_parser_malloc(parser, (size)) 00088 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 00089 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 00090 #define YYFREE(ptr) rb_parser_free(parser, (ptr)) 00091 #define malloc YYMALLOC 00092 #define realloc YYREALLOC 00093 #define calloc YYCALLOC 00094 #define free YYFREE 00095 00096 #ifndef RIPPER 00097 static ID register_symid(ID, const char *, long, rb_encoding *); 00098 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 00099 #include "id.c" 00100 #endif 00101 00102 #define is_notop_id(id) ((id)>tLAST_TOKEN) 00103 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00104 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00105 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00106 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00107 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00108 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00109 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00110 00111 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00112 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00113 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00114 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00115 00116 enum lex_state_e { 00117 EXPR_BEG, /* ignore newline, +/- is a sign. */ 00118 EXPR_END, /* newline significant, +/- is an operator. */ 00119 EXPR_ENDARG, /* ditto, and unbound braces. */ 00120 EXPR_ENDFN, /* ditto, and unbound braces. */ 00121 EXPR_ARG, /* newline significant, +/- is an operator. */ 00122 EXPR_CMDARG, /* newline significant, +/- is an operator. */ 00123 EXPR_MID, /* newline significant, +/- is an operator. */ 00124 EXPR_FNAME, /* ignore newline, no reserved words. */ 00125 EXPR_DOT, /* right after `.' or `::', no reserved words. */ 00126 EXPR_CLASS, /* immediate after `class', no here document. */ 00127 EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */ 00128 EXPR_MAX_STATE 00129 }; 00130 00131 typedef VALUE stack_type; 00132 00133 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 00134 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 00135 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 00136 # define BITSTACK_SET_P(stack) ((stack)&1) 00137 00138 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 00139 #define COND_POP() BITSTACK_POP(cond_stack) 00140 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00141 #define COND_P() BITSTACK_SET_P(cond_stack) 00142 00143 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 00144 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00145 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00146 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00147 00148 struct vtable { 00149 ID *tbl; 00150 int pos; 00151 int capa; 00152 struct vtable *prev; 00153 }; 00154 00155 struct local_vars { 00156 struct vtable *args; 00157 struct vtable *vars; 00158 struct vtable *used; 00159 struct local_vars *prev; 00160 stack_type cmdargs; 00161 }; 00162 00163 #define DVARS_INHERIT ((void*)1) 00164 #define DVARS_TOPSCOPE NULL 00165 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00166 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00167 00168 static int 00169 vtable_size(const struct vtable *tbl) 00170 { 00171 if (POINTER_P(tbl)) { 00172 return tbl->pos; 00173 } 00174 else { 00175 return 0; 00176 } 00177 } 00178 00179 #define VTBL_DEBUG 0 00180 00181 static struct vtable * 00182 vtable_alloc(struct vtable *prev) 00183 { 00184 struct vtable *tbl = ALLOC(struct vtable); 00185 tbl->pos = 0; 00186 tbl->capa = 8; 00187 tbl->tbl = ALLOC_N(ID, tbl->capa); 00188 tbl->prev = prev; 00189 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00190 return tbl; 00191 } 00192 00193 static void 00194 vtable_free(struct vtable *tbl) 00195 { 00196 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00197 if (POINTER_P(tbl)) { 00198 if (tbl->tbl) { 00199 xfree(tbl->tbl); 00200 } 00201 xfree(tbl); 00202 } 00203 } 00204 00205 static void 00206 vtable_add(struct vtable *tbl, ID id) 00207 { 00208 if (!POINTER_P(tbl)) { 00209 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00210 } 00211 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00212 00213 if (tbl->pos == tbl->capa) { 00214 tbl->capa = tbl->capa * 2; 00215 REALLOC_N(tbl->tbl, ID, tbl->capa); 00216 } 00217 tbl->tbl[tbl->pos++] = id; 00218 } 00219 00220 static int 00221 vtable_included(const struct vtable * tbl, ID id) 00222 { 00223 int i; 00224 00225 if (POINTER_P(tbl)) { 00226 for (i = 0; i < tbl->pos; i++) { 00227 if (tbl->tbl[i] == id) { 00228 return i+1; 00229 } 00230 } 00231 } 00232 return 0; 00233 } 00234 00235 00236 #ifndef RIPPER 00237 typedef struct token_info { 00238 const char *token; 00239 int linenum; 00240 int column; 00241 int nonspc; 00242 struct token_info *next; 00243 } token_info; 00244 #endif 00245 00246 /* 00247 Structure of Lexer Buffer: 00248 00249 lex_pbeg tokp lex_p lex_pend 00250 | | | | 00251 |-----------+--------------+------------| 00252 |<------------>| 00253 token 00254 */ 00255 struct parser_params { 00256 int is_ripper; 00257 NODE *heap; 00258 00259 YYSTYPE *parser_yylval; 00260 VALUE eofp; 00261 00262 NODE *parser_lex_strterm; 00263 enum lex_state_e parser_lex_state; 00264 stack_type parser_cond_stack; 00265 stack_type parser_cmdarg_stack; 00266 int parser_class_nest; 00267 int parser_paren_nest; 00268 int parser_lpar_beg; 00269 int parser_in_single; 00270 int parser_in_def; 00271 int parser_compile_for_eval; 00272 VALUE parser_cur_mid; 00273 int parser_in_defined; 00274 char *parser_tokenbuf; 00275 int parser_tokidx; 00276 int parser_toksiz; 00277 VALUE parser_lex_input; 00278 VALUE parser_lex_lastline; 00279 VALUE parser_lex_nextline; 00280 const char *parser_lex_pbeg; 00281 const char *parser_lex_p; 00282 const char *parser_lex_pend; 00283 int parser_heredoc_end; 00284 int parser_command_start; 00285 NODE *parser_deferred_nodes; 00286 long parser_lex_gets_ptr; 00287 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00288 struct local_vars *parser_lvtbl; 00289 int parser_ruby__end__seen; 00290 int line_count; 00291 int has_shebang; 00292 char *parser_ruby_sourcefile; /* current source file */ 00293 int parser_ruby_sourceline; /* current line no. */ 00294 rb_encoding *enc; 00295 rb_encoding *utf8; 00296 00297 int parser_yydebug; 00298 00299 #ifndef RIPPER 00300 /* Ruby core only */ 00301 NODE *parser_eval_tree_begin; 00302 NODE *parser_eval_tree; 00303 VALUE debug_lines; 00304 VALUE coverage; 00305 int nerr; 00306 00307 int parser_token_info_enabled; 00308 token_info *parser_token_info; 00309 #else 00310 /* Ripper only */ 00311 VALUE parser_ruby_sourcefile_string; 00312 const char *tokp; 00313 VALUE delayed; 00314 int delayed_line; 00315 int delayed_col; 00316 00317 VALUE value; 00318 VALUE result; 00319 VALUE parsing_thread; 00320 int toplevel_p; 00321 #endif 00322 }; 00323 00324 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ 00325 (parser->utf8 = rb_utf8_encoding())) 00326 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) 00327 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc) 00328 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) 00329 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) 00330 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00331 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) 00332 00333 static int parser_yyerror(struct parser_params*, const char*); 00334 #define yyerror(msg) parser_yyerror(parser, (msg)) 00335 00336 #define lex_strterm (parser->parser_lex_strterm) 00337 #define lex_state (parser->parser_lex_state) 00338 #define cond_stack (parser->parser_cond_stack) 00339 #define cmdarg_stack (parser->parser_cmdarg_stack) 00340 #define class_nest (parser->parser_class_nest) 00341 #define paren_nest (parser->parser_paren_nest) 00342 #define lpar_beg (parser->parser_lpar_beg) 00343 #define in_single (parser->parser_in_single) 00344 #define in_def (parser->parser_in_def) 00345 #define compile_for_eval (parser->parser_compile_for_eval) 00346 #define cur_mid (parser->parser_cur_mid) 00347 #define in_defined (parser->parser_in_defined) 00348 #define tokenbuf (parser->parser_tokenbuf) 00349 #define tokidx (parser->parser_tokidx) 00350 #define toksiz (parser->parser_toksiz) 00351 #define lex_input (parser->parser_lex_input) 00352 #define lex_lastline (parser->parser_lex_lastline) 00353 #define lex_nextline (parser->parser_lex_nextline) 00354 #define lex_pbeg (parser->parser_lex_pbeg) 00355 #define lex_p (parser->parser_lex_p) 00356 #define lex_pend (parser->parser_lex_pend) 00357 #define heredoc_end (parser->parser_heredoc_end) 00358 #define command_start (parser->parser_command_start) 00359 #define deferred_nodes (parser->parser_deferred_nodes) 00360 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00361 #define lex_gets (parser->parser_lex_gets) 00362 #define lvtbl (parser->parser_lvtbl) 00363 #define ruby__end__seen (parser->parser_ruby__end__seen) 00364 #define ruby_sourceline (parser->parser_ruby_sourceline) 00365 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00366 #define current_enc (parser->enc) 00367 #define yydebug (parser->parser_yydebug) 00368 #ifdef RIPPER 00369 #else 00370 #define ruby_eval_tree (parser->parser_eval_tree) 00371 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00372 #define ruby_debug_lines (parser->debug_lines) 00373 #define ruby_coverage (parser->coverage) 00374 #endif 00375 00376 #if YYPURE 00377 static int yylex(void*, void*); 00378 #else 00379 static int yylex(void*); 00380 #endif 00381 00382 #ifndef RIPPER 00383 #define yyparse ruby_yyparse 00384 00385 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 00386 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 00387 00388 static NODE *cond_gen(struct parser_params*,NODE*); 00389 #define cond(node) cond_gen(parser, (node)) 00390 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 00391 #define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 00392 00393 static NODE *newline_node(NODE*); 00394 static void fixpos(NODE*,NODE*); 00395 00396 static int value_expr_gen(struct parser_params*,NODE*); 00397 static void void_expr_gen(struct parser_params*,NODE*); 00398 static NODE *remove_begin(NODE*); 00399 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 00400 #define void_expr0(node) void_expr_gen(parser, (node)) 00401 #define void_expr(node) void_expr0((node) = remove_begin(node)) 00402 static void void_stmts_gen(struct parser_params*,NODE*); 00403 #define void_stmts(node) void_stmts_gen(parser, (node)) 00404 static void reduce_nodes_gen(struct parser_params*,NODE**); 00405 #define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 00406 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 00407 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 00408 00409 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 00410 #define block_append(h,t) block_append_gen(parser,(h),(t)) 00411 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 00412 #define list_append(l,i) list_append_gen(parser,(l),(i)) 00413 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 00414 #define list_concat(h,t) list_concat_gen(parser,(h),(t)) 00415 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 00416 #define arg_append(h,t) arg_append_gen(parser,(h),(t)) 00417 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 00418 #define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 00419 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 00420 #define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 00421 static int literal_concat0(struct parser_params *, VALUE, VALUE); 00422 static NODE *new_evstr_gen(struct parser_params*,NODE*); 00423 #define new_evstr(n) new_evstr_gen(parser,(n)) 00424 static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 00425 #define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 00426 static NODE *splat_array(NODE*); 00427 00428 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 00429 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 00430 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 00431 #define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 00432 00433 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID); 00434 #define new_args(f,o,r,p,b) new_args_gen(parser, (f),(o),(r),(p),(b)) 00435 00436 static NODE *negate_lit(NODE*); 00437 static NODE *ret_args_gen(struct parser_params*,NODE*); 00438 #define ret_args(node) ret_args_gen(parser, (node)) 00439 static NODE *arg_blk_pass(NODE*,NODE*); 00440 static NODE *new_yield_gen(struct parser_params*,NODE*); 00441 #define new_yield(node) new_yield_gen(parser, (node)) 00442 00443 static NODE *gettable_gen(struct parser_params*,ID); 00444 #define gettable(id) gettable_gen(parser,(id)) 00445 static NODE *assignable_gen(struct parser_params*,ID,NODE*); 00446 #define assignable(id,node) assignable_gen(parser, (id), (node)) 00447 00448 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 00449 #define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 00450 static NODE *attrset_gen(struct parser_params*,NODE*,ID); 00451 #define attrset(node,id) attrset_gen(parser, (node), (id)) 00452 00453 static void rb_backref_error_gen(struct parser_params*,NODE*); 00454 #define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 00455 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 00456 #define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 00457 00458 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 00459 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 00460 00461 static ID *local_tbl_gen(struct parser_params*); 00462 #define local_tbl() local_tbl_gen(parser) 00463 00464 static void fixup_nodes(NODE **); 00465 00466 static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 00467 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 00468 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 00469 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 00470 static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 00471 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 00472 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 00473 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 00474 00475 #define get_id(id) (id) 00476 #define get_value(val) (val) 00477 #else 00478 #define remove_begin(node) (node) 00479 #define rb_dvar_defined(id) 0 00480 #define rb_local_defined(id) 0 00481 static ID ripper_get_id(VALUE); 00482 #define get_id(id) ripper_get_id(id) 00483 static VALUE ripper_get_value(VALUE); 00484 #define get_value(val) ripper_get_value(val) 00485 static VALUE assignable_gen(struct parser_params*,VALUE); 00486 #define assignable(lhs,node) assignable_gen(parser, (lhs)) 00487 static int id_is_var_gen(struct parser_params *parser, ID id); 00488 #define id_is_var(id) id_is_var_gen(parser, (id)) 00489 #endif /* !RIPPER */ 00490 00491 static ID formal_argument_gen(struct parser_params*, ID); 00492 #define formal_argument(id) formal_argument_gen(parser, (id)) 00493 static ID shadowing_lvar_gen(struct parser_params*,ID); 00494 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 00495 static void new_bv_gen(struct parser_params*,ID); 00496 #define new_bv(id) new_bv_gen(parser, (id)) 00497 00498 static void local_push_gen(struct parser_params*,int); 00499 #define local_push(top) local_push_gen(parser,(top)) 00500 static void local_pop_gen(struct parser_params*); 00501 #define local_pop() local_pop_gen(parser) 00502 static int local_var_gen(struct parser_params*, ID); 00503 #define local_var(id) local_var_gen(parser, (id)); 00504 static int arg_var_gen(struct parser_params*, ID); 00505 #define arg_var(id) arg_var_gen(parser, (id)) 00506 static int local_id_gen(struct parser_params*, ID); 00507 #define local_id(id) local_id_gen(parser, (id)) 00508 static ID internal_id_gen(struct parser_params*); 00509 #define internal_id() internal_id_gen(parser) 00510 00511 static const struct vtable *dyna_push_gen(struct parser_params *); 00512 #define dyna_push() dyna_push_gen(parser) 00513 static void dyna_pop_gen(struct parser_params*, const struct vtable *); 00514 #define dyna_pop(node) dyna_pop_gen(parser, (node)) 00515 static int dyna_in_block_gen(struct parser_params*); 00516 #define dyna_in_block() dyna_in_block_gen(parser) 00517 #define dyna_var(id) local_var(id) 00518 static int dvar_defined_gen(struct parser_params*,ID,int); 00519 #define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 00520 #define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 00521 static int dvar_curr_gen(struct parser_params*,ID); 00522 #define dvar_curr(id) dvar_curr_gen(parser, (id)) 00523 00524 static int lvar_defined_gen(struct parser_params*, ID); 00525 #define lvar_defined(id) lvar_defined_gen(parser, (id)) 00526 00527 #define RE_OPTION_ONCE (1<<16) 00528 #define RE_OPTION_ENCODING_SHIFT 8 00529 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 00530 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 00531 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 00532 #define RE_OPTION_MASK 0xff 00533 #define RE_OPTION_ARG_ENCODING_NONE 32 00534 00535 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 00536 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 00537 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 00538 #define nd_func u1.id 00539 #if SIZEOF_SHORT == 2 00540 #define nd_term(node) ((signed short)(node)->u2.id) 00541 #else 00542 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 00543 #endif 00544 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 00545 #define nd_nest u3.cnt 00546 00547 /****** Ripper *******/ 00548 00549 #ifdef RIPPER 00550 #define RIPPER_VERSION "0.1.0" 00551 00552 #include "eventids1.c" 00553 #include "eventids2.c" 00554 static ID ripper_id_gets; 00555 00556 static VALUE ripper_dispatch0(struct parser_params*,ID); 00557 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 00558 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 00559 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 00560 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 00561 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 00562 00563 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 00564 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 00565 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 00566 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 00567 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 00568 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 00569 00570 #define yyparse ripper_yyparse 00571 00572 #define ripper_intern(s) ID2SYM(rb_intern(s)) 00573 static VALUE ripper_id2sym(ID); 00574 #ifdef __GNUC__ 00575 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 00576 ID2SYM(id) : ripper_id2sym(id)) 00577 #endif 00578 00579 #define arg_new() dispatch0(args_new) 00580 #define arg_add(l,a) dispatch2(args_add, (l), (a)) 00581 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 00582 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 00583 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 00584 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 00585 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 00586 00587 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 00588 #define mrhs_new() dispatch0(mrhs_new) 00589 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 00590 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 00591 00592 #define mlhs_new() dispatch0(mlhs_new) 00593 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 00594 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 00595 00596 #define params_new(pars, opts, rest, pars2, blk) \ 00597 dispatch5(params, (pars), (opts), (rest), (pars2), (blk)) 00598 00599 #define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 00600 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 00601 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 00602 00603 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 00604 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 00605 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 00606 00607 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 00608 00609 #define FIXME 0 00610 00611 #endif /* RIPPER */ 00612 00613 #ifndef RIPPER 00614 # define ifndef_ripper(x) (x) 00615 #else 00616 # define ifndef_ripper(x) 00617 #endif 00618 00619 #ifndef RIPPER 00620 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 00621 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00622 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00623 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 00624 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 00625 #else 00626 # define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 00627 # define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 00628 # define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 00629 # define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 00630 # define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 00631 static void ripper_warn0(struct parser_params*, const char*); 00632 static void ripper_warnI(struct parser_params*, const char*, int); 00633 #if 0 00634 static void ripper_warnS(struct parser_params*, const char*, const char*); 00635 #endif 00636 static void ripper_warning0(struct parser_params*, const char*); 00637 static void ripper_warningS(struct parser_params*, const char*, const char*); 00638 #endif 00639 00640 #ifdef RIPPER 00641 static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 00642 # define rb_compile_error ripper_compile_error 00643 # define compile_error ripper_compile_error 00644 # define PARSER_ARG parser, 00645 #else 00646 # define rb_compile_error rb_compile_error_with_enc 00647 # define compile_error parser->nerr++,rb_compile_error_with_enc 00648 # define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 00649 #endif 00650 00651 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 00652 for instance). This is too low for Ruby to parse some files, such as 00653 date/format.rb, therefore bump the value up to at least Bison's default. */ 00654 #ifdef OLD_YACC 00655 #ifndef YYMAXDEPTH 00656 #define YYMAXDEPTH 10000 00657 #endif 00658 #endif 00659 00660 #ifndef RIPPER 00661 static void token_info_push(struct parser_params*, const char *token); 00662 static void token_info_pop(struct parser_params*, const char *token); 00663 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 00664 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 00665 #else 00666 #define token_info_push(token) /* nothing */ 00667 #define token_info_pop(token) /* nothing */ 00668 #endif 00669 00670 /* Line 371 of yacc.c */ 00671 #line 672 "parse.c" 00672 00673 # ifndef YY_NULL 00674 # if defined __cplusplus && 201103L <= __cplusplus 00675 # define YY_NULL nullptr 00676 # else 00677 # define YY_NULL 0 00678 # endif 00679 # endif 00680 00681 /* Enabling verbose error messages. */ 00682 #ifdef YYERROR_VERBOSE 00683 # undef YYERROR_VERBOSE 00684 # define YYERROR_VERBOSE 1 00685 #else 00686 # define YYERROR_VERBOSE 0 00687 #endif 00688 00689 /* In a future release of Bison, this section will be replaced 00690 by #include "y.tab.h". */ 00691 #ifndef YY_YY_Y_TAB_H_INCLUDED 00692 # define YY_YY_Y_TAB_H_INCLUDED 00693 /* Enabling traces. */ 00694 #ifndef YYDEBUG 00695 # define YYDEBUG 0 00696 #endif 00697 #if YYDEBUG 00698 #ifndef yydebug 00699 extern int yydebug; 00700 #endif 00701 #endif 00702 00703 /* Tokens. */ 00704 #ifndef YYTOKENTYPE 00705 # define YYTOKENTYPE 00706 /* Put the tokens into the symbol table, so that GDB and other debuggers 00707 know about them. */ 00708 enum yytokentype { 00709 keyword_class = 258, 00710 keyword_module = 259, 00711 keyword_def = 260, 00712 keyword_undef = 261, 00713 keyword_begin = 262, 00714 keyword_rescue = 263, 00715 keyword_ensure = 264, 00716 keyword_end = 265, 00717 keyword_if = 266, 00718 keyword_unless = 267, 00719 keyword_then = 268, 00720 keyword_elsif = 269, 00721 keyword_else = 270, 00722 keyword_case = 271, 00723 keyword_when = 272, 00724 keyword_while = 273, 00725 keyword_until = 274, 00726 keyword_for = 275, 00727 keyword_break = 276, 00728 keyword_next = 277, 00729 keyword_redo = 278, 00730 keyword_retry = 279, 00731 keyword_in = 280, 00732 keyword_do = 281, 00733 keyword_do_cond = 282, 00734 keyword_do_block = 283, 00735 keyword_do_LAMBDA = 284, 00736 keyword_return = 285, 00737 keyword_yield = 286, 00738 keyword_super = 287, 00739 keyword_self = 288, 00740 keyword_nil = 289, 00741 keyword_true = 290, 00742 keyword_false = 291, 00743 keyword_and = 292, 00744 keyword_or = 293, 00745 keyword_not = 294, 00746 modifier_if = 295, 00747 modifier_unless = 296, 00748 modifier_while = 297, 00749 modifier_until = 298, 00750 modifier_rescue = 299, 00751 keyword_alias = 300, 00752 keyword_defined = 301, 00753 keyword_BEGIN = 302, 00754 keyword_END = 303, 00755 keyword__LINE__ = 304, 00756 keyword__FILE__ = 305, 00757 keyword__ENCODING__ = 306, 00758 tIDENTIFIER = 307, 00759 tFID = 308, 00760 tGVAR = 309, 00761 tIVAR = 310, 00762 tCONSTANT = 311, 00763 tCVAR = 312, 00764 tLABEL = 313, 00765 tINTEGER = 314, 00766 tFLOAT = 315, 00767 tSTRING_CONTENT = 316, 00768 tCHAR = 317, 00769 tNTH_REF = 318, 00770 tBACK_REF = 319, 00771 tREGEXP_END = 320, 00772 tUPLUS = 321, 00773 tUMINUS = 322, 00774 tPOW = 323, 00775 tCMP = 324, 00776 tEQ = 325, 00777 tEQQ = 326, 00778 tNEQ = 327, 00779 tGEQ = 328, 00780 tLEQ = 329, 00781 tANDOP = 330, 00782 tOROP = 331, 00783 tMATCH = 332, 00784 tNMATCH = 333, 00785 tDOT2 = 334, 00786 tDOT3 = 335, 00787 tAREF = 336, 00788 tASET = 337, 00789 tLSHFT = 338, 00790 tRSHFT = 339, 00791 tCOLON2 = 340, 00792 tCOLON3 = 341, 00793 tOP_ASGN = 342, 00794 tASSOC = 343, 00795 tLPAREN = 344, 00796 tLPAREN_ARG = 345, 00797 tRPAREN = 346, 00798 tLBRACK = 347, 00799 tLBRACE = 348, 00800 tLBRACE_ARG = 349, 00801 tSTAR = 350, 00802 tAMPER = 351, 00803 tLAMBDA = 352, 00804 tSYMBEG = 353, 00805 tSTRING_BEG = 354, 00806 tXSTRING_BEG = 355, 00807 tREGEXP_BEG = 356, 00808 tWORDS_BEG = 357, 00809 tQWORDS_BEG = 358, 00810 tSTRING_DBEG = 359, 00811 tSTRING_DVAR = 360, 00812 tSTRING_END = 361, 00813 tLAMBEG = 362, 00814 tLOWEST = 363, 00815 tUMINUS_NUM = 364, 00816 idNULL = 365, 00817 idRespond_to = 366, 00818 idIFUNC = 367, 00819 idCFUNC = 368, 00820 id_core_set_method_alias = 369, 00821 id_core_set_variable_alias = 370, 00822 id_core_undef_method = 371, 00823 id_core_define_method = 372, 00824 id_core_define_singleton_method = 373, 00825 id_core_set_postexe = 374, 00826 tLAST_TOKEN = 375 00827 }; 00828 #endif 00829 00830 00831 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00832 typedef union YYSTYPE 00833 { 00834 /* Line 387 of yacc.c */ 00835 #line 620 "parse.y" 00836 00837 VALUE val; 00838 NODE *node; 00839 ID id; 00840 int num; 00841 const struct vtable *vars; 00842 00843 00844 /* Line 387 of yacc.c */ 00845 #line 844 "parse.c" 00846 } YYSTYPE; 00847 # define YYSTYPE_IS_TRIVIAL 1 00848 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00849 # define YYSTYPE_IS_DECLARED 1 00850 #endif 00851 00852 00853 #ifdef YYPARSE_PARAM 00854 #if defined __STDC__ || defined __cplusplus 00855 int yyparse (void *YYPARSE_PARAM); 00856 #else 00857 int yyparse (); 00858 #endif 00859 #else /* ! YYPARSE_PARAM */ 00860 #if defined __STDC__ || defined __cplusplus 00861 int yyparse (struct parser_params *parser); 00862 #else 00863 int yyparse (); 00864 #endif 00865 #endif /* ! YYPARSE_PARAM */ 00866 00867 #endif /* !YY_YY_Y_TAB_H_INCLUDED */ 00868 00869 /* Copy the second part of user declarations. */ 00870 00871 /* Line 390 of yacc.c */ 00872 #line 871 "parse.c" 00873 00874 #ifdef short 00875 # undef short 00876 #endif 00877 00878 #ifdef YYTYPE_UINT8 00879 typedef YYTYPE_UINT8 yytype_uint8; 00880 #else 00881 typedef unsigned char yytype_uint8; 00882 #endif 00883 00884 #ifdef YYTYPE_INT8 00885 typedef YYTYPE_INT8 yytype_int8; 00886 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00887 || defined __cplusplus || defined _MSC_VER) 00888 typedef signed char yytype_int8; 00889 #else 00890 typedef short int yytype_int8; 00891 #endif 00892 00893 #ifdef YYTYPE_UINT16 00894 typedef YYTYPE_UINT16 yytype_uint16; 00895 #else 00896 typedef unsigned short int yytype_uint16; 00897 #endif 00898 00899 #ifdef YYTYPE_INT16 00900 typedef YYTYPE_INT16 yytype_int16; 00901 #else 00902 typedef short int yytype_int16; 00903 #endif 00904 00905 #ifndef YYSIZE_T 00906 # ifdef __SIZE_TYPE__ 00907 # define YYSIZE_T __SIZE_TYPE__ 00908 # elif defined size_t 00909 # define YYSIZE_T size_t 00910 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00911 || defined __cplusplus || defined _MSC_VER) 00912 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00913 # define YYSIZE_T size_t 00914 # else 00915 # define YYSIZE_T unsigned int 00916 # endif 00917 #endif 00918 00919 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00920 00921 #ifndef YY_ 00922 # if defined YYENABLE_NLS && YYENABLE_NLS 00923 # if ENABLE_NLS 00924 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00925 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 00926 # endif 00927 # endif 00928 # ifndef YY_ 00929 # define YY_(Msgid) Msgid 00930 # endif 00931 #endif 00932 00933 #ifndef __attribute__ 00934 /* This feature is available in gcc versions 2.5 and later. */ 00935 # if (! defined __GNUC__ || __GNUC__ < 2 \ 00936 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) 00937 # define __attribute__(Spec) /* empty */ 00938 # endif 00939 #endif 00940 00941 /* Suppress unused-variable warnings by "using" E. */ 00942 #if ! defined lint || defined __GNUC__ 00943 # define YYUSE(E) ((void) (E)) 00944 #else 00945 # define YYUSE(E) /* empty */ 00946 #endif 00947 00948 00949 /* Identity function, used to suppress warnings about constant conditions. */ 00950 #ifndef lint 00951 # define YYID(N) (N) 00952 #else 00953 #if (defined __STDC__ || defined __C99__FUNC__ \ 00954 || defined __cplusplus || defined _MSC_VER) 00955 static int 00956 YYID (int yyi) 00957 #else 00958 static int 00959 YYID (yyi) 00960 int yyi; 00961 #endif 00962 { 00963 return yyi; 00964 } 00965 #endif 00966 00967 #if ! defined yyoverflow || YYERROR_VERBOSE 00968 00969 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00970 00971 # ifdef YYSTACK_USE_ALLOCA 00972 # if YYSTACK_USE_ALLOCA 00973 # ifdef __GNUC__ 00974 # define YYSTACK_ALLOC __builtin_alloca 00975 # elif defined __BUILTIN_VA_ARG_INCR 00976 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00977 # elif defined _AIX 00978 # define YYSTACK_ALLOC __alloca 00979 # elif defined _MSC_VER 00980 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 00981 # define alloca _alloca 00982 # else 00983 # define YYSTACK_ALLOC alloca 00984 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00985 || defined __cplusplus || defined _MSC_VER) 00986 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00987 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 00988 # ifndef EXIT_SUCCESS 00989 # define EXIT_SUCCESS 0 00990 # endif 00991 # endif 00992 # endif 00993 # endif 00994 # endif 00995 00996 # ifdef YYSTACK_ALLOC 00997 /* Pacify GCC's `empty if-body' warning. */ 00998 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00999 # ifndef YYSTACK_ALLOC_MAXIMUM 01000 /* The OS might guarantee only one guard page at the bottom of the stack, 01001 and a page size can be as small as 4096 bytes. So we cannot safely 01002 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 01003 to allow for a few compiler-allocated temporary stack slots. */ 01004 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 01005 # endif 01006 # else 01007 # define YYSTACK_ALLOC YYMALLOC 01008 # define YYSTACK_FREE YYFREE 01009 # ifndef YYSTACK_ALLOC_MAXIMUM 01010 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 01011 # endif 01012 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 01013 && ! ((defined YYMALLOC || defined malloc) \ 01014 && (defined YYFREE || defined free))) 01015 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 01016 # ifndef EXIT_SUCCESS 01017 # define EXIT_SUCCESS 0 01018 # endif 01019 # endif 01020 # ifndef YYMALLOC 01021 # define YYMALLOC malloc 01022 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01023 || defined __cplusplus || defined _MSC_VER) 01024 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 01025 # endif 01026 # endif 01027 # ifndef YYFREE 01028 # define YYFREE free 01029 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 01030 || defined __cplusplus || defined _MSC_VER) 01031 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01032 # endif 01033 # endif 01034 # endif 01035 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01036 01037 01038 #if (! defined yyoverflow \ 01039 && (! defined __cplusplus \ 01040 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01041 01042 /* A type that is properly aligned for any stack member. */ 01043 union yyalloc 01044 { 01045 yytype_int16 yyss_alloc; 01046 YYSTYPE yyvs_alloc; 01047 }; 01048 01049 /* The size of the maximum gap between one aligned stack and the next. */ 01050 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01051 01052 /* The size of an array large to enough to hold all stacks, each with 01053 N elements. */ 01054 # define YYSTACK_BYTES(N) \ 01055 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01056 + YYSTACK_GAP_MAXIMUM) 01057 01058 # define YYCOPY_NEEDED 1 01059 01060 /* Relocate STACK from its old location to the new one. The 01061 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01062 elements in the stack, and YYPTR gives the new location of the 01063 stack. Advance YYPTR to a properly aligned location for the next 01064 stack. */ 01065 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 01066 do \ 01067 { \ 01068 YYSIZE_T yynewbytes; \ 01069 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 01070 Stack = &yyptr->Stack_alloc; \ 01071 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01072 yyptr += yynewbytes / sizeof (*yyptr); \ 01073 } \ 01074 while (YYID (0)) 01075 01076 #endif 01077 01078 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 01079 /* Copy COUNT objects from SRC to DST. The source and destination do 01080 not overlap. */ 01081 # ifndef YYCOPY 01082 # if defined __GNUC__ && 1 < __GNUC__ 01083 # define YYCOPY(Dst, Src, Count) \ 01084 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 01085 # else 01086 # define YYCOPY(Dst, Src, Count) \ 01087 do \ 01088 { \ 01089 YYSIZE_T yyi; \ 01090 for (yyi = 0; yyi < (Count); yyi++) \ 01091 (Dst)[yyi] = (Src)[yyi]; \ 01092 } \ 01093 while (YYID (0)) 01094 # endif 01095 # endif 01096 #endif /* !YYCOPY_NEEDED */ 01097 01098 /* YYFINAL -- State number of the termination state. */ 01099 #define YYFINAL 3 01100 /* YYLAST -- Last index in YYTABLE. */ 01101 #define YYLAST 10748 01102 01103 /* YYNTOKENS -- Number of terminals. */ 01104 #define YYNTOKENS 148 01105 /* YYNNTS -- Number of nonterminals. */ 01106 #define YYNNTS 174 01107 /* YYNRULES -- Number of rules. */ 01108 #define YYNRULES 573 01109 /* YYNRULES -- Number of states. */ 01110 #define YYNSTATES 991 01111 01112 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01113 #define YYUNDEFTOK 2 01114 #define YYMAXUTOK 375 01115 01116 #define YYTRANSLATE(YYX) \ 01117 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01118 01119 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01120 static const yytype_uint8 yytranslate[] = 01121 { 01122 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01123 147, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01124 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01125 2, 2, 146, 123, 2, 2, 2, 121, 116, 2, 01126 142, 143, 119, 117, 140, 118, 139, 120, 2, 2, 01127 2, 2, 2, 2, 2, 2, 2, 2, 111, 145, 01128 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, 01129 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01130 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01131 2, 138, 2, 144, 115, 2, 141, 2, 2, 2, 01132 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01133 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01134 2, 2, 2, 136, 114, 137, 124, 2, 2, 2, 01135 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01137 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01138 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01139 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01140 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01141 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01146 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01147 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01148 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01149 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01150 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01151 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01152 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01153 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01154 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 01155 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 01156 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 01157 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 01158 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, 01159 130, 131, 132, 133, 134, 135 01160 }; 01161 01162 #if YYDEBUG 01163 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01164 YYRHS. */ 01165 static const yytype_uint16 yyprhs[] = 01166 { 01167 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01168 23, 24, 30, 35, 38, 40, 42, 46, 49, 50, 01169 55, 59, 63, 67, 70, 74, 78, 82, 86, 90, 01170 95, 97, 101, 105, 112, 118, 124, 130, 136, 140, 01171 144, 148, 152, 154, 158, 162, 164, 168, 172, 176, 01172 179, 181, 183, 185, 187, 189, 194, 199, 200, 206, 01173 209, 213, 218, 224, 229, 235, 238, 241, 244, 247, 01174 250, 252, 256, 258, 262, 264, 267, 271, 277, 280, 01175 285, 288, 293, 295, 299, 301, 305, 308, 312, 314, 01176 318, 320, 322, 327, 331, 335, 339, 343, 346, 348, 01177 350, 352, 357, 361, 365, 369, 373, 376, 378, 380, 01178 382, 385, 387, 391, 393, 395, 397, 399, 401, 403, 01179 405, 407, 409, 411, 412, 417, 419, 421, 423, 425, 01180 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01181 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01182 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01183 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01184 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01185 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01186 547, 549, 551, 553, 555, 557, 561, 567, 571, 577, 01187 584, 590, 596, 602, 608, 613, 617, 621, 625, 629, 01188 633, 637, 641, 645, 649, 654, 659, 662, 665, 669, 01189 673, 677, 681, 685, 689, 693, 697, 701, 705, 709, 01190 713, 717, 720, 723, 727, 731, 735, 739, 740, 745, 01191 752, 754, 756, 758, 761, 766, 769, 773, 775, 777, 01192 779, 781, 784, 789, 792, 794, 797, 800, 805, 807, 01193 808, 811, 814, 817, 819, 821, 824, 828, 833, 837, 01194 842, 845, 847, 849, 851, 853, 855, 857, 859, 861, 01195 863, 864, 869, 870, 875, 879, 883, 886, 890, 894, 01196 896, 901, 905, 907, 908, 915, 920, 924, 927, 929, 01197 932, 935, 942, 949, 950, 951, 959, 960, 961, 969, 01198 975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011, 01199 1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044, 01200 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 01201 1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089, 01202 1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117, 01203 1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169, 01204 1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217, 01205 1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246, 01206 1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276, 01207 1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317, 01208 1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353, 01209 1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380, 01210 1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407, 01211 1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438, 01212 1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458, 01213 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482, 01214 1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506, 01215 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 01216 1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552, 01217 1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610, 01218 1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636, 01219 1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666, 01220 1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691, 01221 1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719, 01222 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 01223 1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758, 01224 1760, 1762, 1764, 1767 01225 }; 01226 01227 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01228 static const yytype_int16 yyrhs[] = 01229 { 01230 149, 0, -1, -1, 150, 151, -1, 152, 314, -1, 01231 321, -1, 153, -1, 152, 320, 153, -1, 1, 153, 01232 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1, 01233 156, 256, 231, 259, -1, 157, 314, -1, 321, -1, 01234 158, -1, 157, 320, 158, -1, 1, 158, -1, -1, 01235 45, 180, 159, 180, -1, 45, 54, 54, -1, 45, 01236 54, 64, -1, 45, 54, 63, -1, 6, 181, -1, 01237 158, 40, 162, -1, 158, 41, 162, -1, 158, 42, 01238 162, -1, 158, 43, 162, -1, 158, 44, 158, -1, 01239 48, 136, 156, 137, -1, 160, -1, 168, 109, 163, 01240 -1, 286, 87, 163, -1, 216, 138, 191, 317, 87, 01241 163, -1, 216, 139, 52, 87, 163, -1, 216, 139, 01242 56, 87, 163, -1, 216, 85, 56, 87, 163, -1, 01243 216, 85, 52, 87, 163, -1, 287, 87, 163, -1, 01244 175, 109, 198, -1, 168, 109, 187, -1, 168, 109, 01245 198, -1, 161, -1, 175, 109, 163, -1, 175, 109, 01246 160, -1, 163, -1, 161, 37, 161, -1, 161, 38, 01247 161, -1, 39, 315, 161, -1, 123, 163, -1, 185, 01248 -1, 161, -1, 167, -1, 164, -1, 249, -1, 249, 01249 139, 311, 193, -1, 249, 85, 311, 193, -1, -1, 01250 94, 166, 237, 156, 137, -1, 310, 193, -1, 310, 01251 193, 165, -1, 216, 139, 311, 193, -1, 216, 139, 01252 311, 193, 165, -1, 216, 85, 311, 193, -1, 216, 01253 85, 311, 193, 165, -1, 32, 193, -1, 31, 193, 01254 -1, 30, 192, -1, 21, 192, -1, 22, 192, -1, 01255 170, -1, 89, 169, 316, -1, 170, -1, 89, 169, 01256 316, -1, 172, -1, 172, 171, -1, 172, 95, 174, 01257 -1, 172, 95, 174, 140, 173, -1, 172, 95, -1, 01258 172, 95, 140, 173, -1, 95, 174, -1, 95, 174, 01259 140, 173, -1, 95, -1, 95, 140, 173, -1, 174, 01260 -1, 89, 169, 316, -1, 171, 140, -1, 172, 171, 01261 140, -1, 171, -1, 173, 140, 171, -1, 283, -1, 01262 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01263 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01264 85, 56, -1, 86, 56, -1, 287, -1, 283, -1, 01265 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01266 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01267 85, 56, -1, 86, 56, -1, 287, -1, 52, -1, 01268 56, -1, 86, 176, -1, 176, -1, 216, 85, 176, 01269 -1, 52, -1, 56, -1, 53, -1, 183, -1, 184, 01270 -1, 178, -1, 279, -1, 179, -1, 281, -1, 180, 01271 -1, -1, 181, 140, 182, 180, -1, 114, -1, 115, 01272 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77, 01273 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74, 01274 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118, 01275 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68, 01276 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81, 01277 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51, 01278 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7, 01279 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46, 01280 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9, 01281 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22, 01282 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8, 01283 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13, 01284 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11, 01285 -1, 12, -1, 18, -1, 19, -1, 175, 109, 185, 01286 -1, 175, 109, 185, 44, 185, -1, 286, 87, 185, 01287 -1, 286, 87, 185, 44, 185, -1, 216, 138, 191, 01288 317, 87, 185, -1, 216, 139, 52, 87, 185, -1, 01289 216, 139, 56, 87, 185, -1, 216, 85, 52, 87, 01290 185, -1, 216, 85, 56, 87, 185, -1, 86, 56, 01291 87, 185, -1, 287, 87, 185, -1, 185, 79, 185, 01292 -1, 185, 80, 185, -1, 185, 117, 185, -1, 185, 01293 118, 185, -1, 185, 119, 185, -1, 185, 120, 185, 01294 -1, 185, 121, 185, -1, 185, 68, 185, -1, 122, 01295 59, 68, 185, -1, 122, 60, 68, 185, -1, 66, 01296 185, -1, 67, 185, -1, 185, 114, 185, -1, 185, 01297 115, 185, -1, 185, 116, 185, -1, 185, 69, 185, 01298 -1, 185, 112, 185, -1, 185, 73, 185, -1, 185, 01299 113, 185, -1, 185, 74, 185, -1, 185, 70, 185, 01300 -1, 185, 71, 185, -1, 185, 72, 185, -1, 185, 01301 77, 185, -1, 185, 78, 185, -1, 123, 185, -1, 01302 124, 185, -1, 185, 83, 185, -1, 185, 84, 185, 01303 -1, 185, 75, 185, -1, 185, 76, 185, -1, -1, 01304 46, 315, 186, 185, -1, 185, 110, 185, 315, 111, 01305 185, -1, 199, -1, 185, -1, 321, -1, 197, 318, 01306 -1, 197, 140, 308, 318, -1, 308, 318, -1, 142, 01307 191, 316, -1, 321, -1, 189, -1, 321, -1, 192, 01308 -1, 197, 140, -1, 197, 140, 308, 140, -1, 308, 01309 140, -1, 167, -1, 197, 196, -1, 308, 196, -1, 01310 197, 140, 308, 196, -1, 195, -1, -1, 194, 192, 01311 -1, 96, 187, -1, 140, 195, -1, 321, -1, 187, 01312 -1, 95, 187, -1, 197, 140, 187, -1, 197, 140, 01313 95, 187, -1, 197, 140, 187, -1, 197, 140, 95, 01314 187, -1, 95, 187, -1, 260, -1, 261, -1, 264, 01315 -1, 265, -1, 266, -1, 269, -1, 285, -1, 287, 01316 -1, 53, -1, -1, 217, 200, 155, 227, -1, -1, 01317 90, 161, 201, 316, -1, 89, 156, 143, -1, 216, 01318 85, 56, -1, 86, 56, -1, 92, 188, 144, -1, 01319 93, 307, 137, -1, 30, -1, 31, 142, 192, 316, 01320 -1, 31, 142, 316, -1, 31, -1, -1, 46, 315, 01321 142, 202, 161, 316, -1, 39, 142, 161, 316, -1, 01322 39, 142, 316, -1, 310, 251, -1, 250, -1, 250, 01323 251, -1, 97, 242, -1, 218, 162, 228, 156, 230, 01324 227, -1, 219, 162, 228, 156, 231, 227, -1, -1, 01325 -1, 220, 203, 162, 229, 204, 156, 227, -1, -1, 01326 -1, 221, 205, 162, 229, 206, 156, 227, -1, 222, 01327 162, 314, 254, 227, -1, 222, 314, 254, 227, -1, 01328 -1, -1, 223, 232, 25, 207, 162, 229, 208, 156, 01329 227, -1, -1, 224, 177, 288, 209, 155, 227, -1, 01330 -1, -1, 224, 83, 161, 210, 319, 211, 155, 227, 01331 -1, -1, 225, 177, 212, 155, 227, -1, -1, 226, 01332 178, 213, 290, 155, 227, -1, -1, -1, 226, 305, 01333 313, 214, 178, 215, 290, 155, 227, -1, 21, -1, 01334 22, -1, 23, -1, 24, -1, 199, -1, 7, -1, 01335 11, -1, 12, -1, 18, -1, 19, -1, 16, -1, 01336 20, -1, 3, -1, 4, -1, 5, -1, 10, -1, 01337 319, -1, 13, -1, 319, 13, -1, 319, -1, 27, 01338 -1, 231, -1, 14, 162, 228, 156, 230, -1, 321, 01339 -1, 15, 156, -1, 175, -1, 168, -1, 293, -1, 01340 89, 235, 316, -1, 233, -1, 234, 140, 233, -1, 01341 234, -1, 234, 140, 95, 293, -1, 234, 140, 95, 01342 293, 140, 234, -1, 234, 140, 95, -1, 234, 140, 01343 95, 140, 234, -1, 95, 293, -1, 95, 293, 140, 01344 234, -1, 95, -1, 95, 140, 234, -1, 295, 140, 01345 298, 140, 301, 304, -1, 295, 140, 298, 140, 301, 01346 140, 295, 304, -1, 295, 140, 298, 304, -1, 295, 01347 140, 298, 140, 295, 304, -1, 295, 140, 301, 304, 01348 -1, 295, 140, -1, 295, 140, 301, 140, 295, 304, 01349 -1, 295, 304, -1, 298, 140, 301, 304, -1, 298, 01350 140, 301, 140, 295, 304, -1, 298, 304, -1, 298, 01351 140, 295, 304, -1, 301, 304, -1, 301, 140, 295, 01352 304, -1, 303, -1, 321, -1, 238, -1, 114, 239, 01353 114, -1, 76, -1, 114, 236, 239, 114, -1, 321, 01354 -1, 145, 240, -1, 241, -1, 240, 140, 241, -1, 01355 52, -1, 292, -1, -1, -1, 243, 244, 245, 246, 01356 -1, 142, 291, 239, 316, -1, 291, -1, 107, 156, 01357 137, -1, 29, 156, 10, -1, -1, 28, 248, 237, 01358 156, 10, -1, 167, 247, -1, 249, 139, 311, 190, 01359 -1, 249, 85, 311, 190, -1, 310, 189, -1, 216, 01360 139, 311, 190, -1, 216, 85, 311, 189, -1, 216, 01361 85, 312, -1, 216, 139, 189, -1, 216, 85, 189, 01362 -1, 32, 189, -1, 32, -1, 216, 138, 191, 317, 01363 -1, -1, 136, 252, 237, 156, 137, -1, -1, 26, 01364 253, 237, 156, 10, -1, 17, 197, 228, 156, 255, 01365 -1, 231, -1, 254, -1, 8, 257, 258, 228, 156, 01366 256, -1, 321, -1, 187, -1, 198, -1, 321, -1, 01367 88, 175, -1, 321, -1, 9, 156, -1, 321, -1, 01368 282, -1, 279, -1, 281, -1, 262, -1, 62, -1, 01369 263, -1, 262, 263, -1, 99, 271, 106, -1, 100, 01370 272, 106, -1, 101, 273, 65, -1, 102, 146, 106, 01371 -1, 102, 267, 106, -1, -1, 267, 268, 146, -1, 01372 274, -1, 268, 274, -1, 103, 146, 106, -1, 103, 01373 270, 106, -1, -1, 270, 61, 146, -1, -1, 271, 01374 274, -1, -1, 272, 274, -1, -1, 273, 274, -1, 01375 61, -1, -1, 105, 275, 278, -1, -1, -1, 104, 01376 276, 277, 156, 137, -1, 54, -1, 55, -1, 57, 01377 -1, 287, -1, 98, 280, -1, 178, -1, 55, -1, 01378 54, -1, 57, -1, 98, 272, 106, -1, 59, -1, 01379 60, -1, 122, 59, -1, 122, 60, -1, 52, -1, 01380 55, -1, 54, -1, 56, -1, 57, -1, 34, -1, 01381 33, -1, 35, -1, 36, -1, 50, -1, 49, -1, 01382 51, -1, 283, -1, 284, -1, 283, -1, 284, -1, 01383 63, -1, 64, -1, 319, -1, -1, 113, 289, 162, 01384 319, -1, 1, 319, -1, 142, 291, 316, -1, 291, 01385 319, -1, 295, 140, 299, 140, 301, 304, -1, 295, 01386 140, 299, 140, 301, 140, 295, 304, -1, 295, 140, 01387 299, 304, -1, 295, 140, 299, 140, 295, 304, -1, 01388 295, 140, 301, 304, -1, 295, 140, 301, 140, 295, 01389 304, -1, 295, 304, -1, 299, 140, 301, 304, -1, 01390 299, 140, 301, 140, 295, 304, -1, 299, 304, -1, 01391 299, 140, 295, 304, -1, 301, 304, -1, 301, 140, 01392 295, 304, -1, 303, -1, -1, 56, -1, 55, -1, 01393 54, -1, 57, -1, 292, -1, 52, -1, 293, -1, 01394 89, 235, 316, -1, 294, -1, 295, 140, 294, -1, 01395 52, 109, 187, -1, 52, 109, 216, -1, 297, -1, 01396 298, 140, 297, -1, 296, -1, 299, 140, 296, -1, 01397 119, -1, 95, -1, 300, 52, -1, 300, -1, 116, 01398 -1, 96, -1, 302, 52, -1, 140, 303, -1, 321, 01399 -1, 285, -1, -1, 142, 306, 161, 316, -1, 321, 01400 -1, 308, 318, -1, 309, -1, 308, 140, 309, -1, 01401 187, 88, 187, -1, 58, 187, -1, 52, -1, 56, 01402 -1, 53, -1, 52, -1, 56, -1, 53, -1, 183, 01403 -1, 52, -1, 53, -1, 183, -1, 139, -1, 85, 01404 -1, -1, 320, -1, -1, 147, -1, 315, 143, -1, 01405 315, 144, -1, -1, 147, -1, 140, -1, 145, -1, 01406 147, -1, 319, -1, 320, 145, -1, -1 01407 }; 01408 01409 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01410 static const yytype_uint16 yyrline[] = 01411 { 01412 0, 786, 786, 786, 817, 828, 837, 845, 853, 859, 01413 861, 860, 884, 917, 928, 937, 945, 953, 959, 959, 01414 967, 975, 986, 996, 1004, 1013, 1022, 1035, 1048, 1057, 01415 1069, 1070, 1080, 1109, 1130, 1147, 1164, 1175, 1192, 1202, 01416 1211, 1220, 1229, 1232, 1241, 1253, 1254, 1262, 1270, 1278, 01417 1286, 1289, 1301, 1302, 1305, 1306, 1315, 1327, 1326, 1348, 01418 1357, 1369, 1378, 1390, 1399, 1411, 1420, 1429, 1437, 1445, 01419 1455, 1456, 1466, 1467, 1477, 1485, 1493, 1501, 1510, 1518, 01420 1527, 1535, 1544, 1552, 1563, 1564, 1574, 1582, 1592, 1600, 01421 1610, 1614, 1618, 1626, 1634, 1642, 1650, 1662, 1672, 1684, 01422 1693, 1702, 1710, 1718, 1726, 1734, 1747, 1760, 1771, 1779, 01423 1782, 1790, 1798, 1808, 1809, 1810, 1811, 1816, 1827, 1828, 01424 1831, 1839, 1842, 1850, 1850, 1860, 1861, 1862, 1863, 1864, 01425 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 01426 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 01427 1885, 1886, 1887, 1888, 1891, 1891, 1891, 1892, 1892, 1893, 01428 1893, 1893, 1894, 1894, 1894, 1894, 1895, 1895, 1895, 1895, 01429 1896, 1896, 1896, 1897, 1897, 1897, 1897, 1898, 1898, 1898, 01430 1898, 1899, 1899, 1899, 1899, 1900, 1900, 1900, 1900, 1901, 01431 1901, 1901, 1901, 1902, 1902, 1905, 1914, 1924, 1953, 1984, 01432 2010, 2027, 2044, 2061, 2072, 2083, 2094, 2108, 2122, 2130, 01433 2138, 2146, 2154, 2162, 2170, 2179, 2188, 2196, 2204, 2212, 01434 2220, 2228, 2236, 2244, 2252, 2260, 2268, 2276, 2284, 2292, 01435 2303, 2311, 2319, 2327, 2335, 2343, 2351, 2359, 2359, 2369, 01436 2379, 2385, 2397, 2398, 2402, 2410, 2420, 2430, 2431, 2434, 01437 2435, 2436, 2440, 2448, 2458, 2467, 2475, 2485, 2494, 2503, 01438 2503, 2515, 2525, 2529, 2535, 2543, 2551, 2565, 2581, 2595, 01439 2610, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 01440 2637, 2636, 2661, 2661, 2670, 2678, 2686, 2694, 2707, 2715, 01441 2723, 2731, 2739, 2747, 2747, 2757, 2765, 2773, 2784, 2785, 01442 2796, 2800, 2812, 2824, 2824, 2824, 2835, 2835, 2835, 2846, 01443 2857, 2866, 2868, 2865, 2932, 2931, 2953, 2958, 2952, 2977, 01444 2976, 2998, 2997, 3020, 3021, 3020, 3041, 3049, 3057, 3065, 01445 3075, 3087, 3093, 3099, 3105, 3111, 3117, 3123, 3129, 3135, 01446 3141, 3151, 3157, 3162, 3163, 3170, 3175, 3178, 3179, 3192, 01447 3193, 3203, 3204, 3207, 3215, 3225, 3233, 3243, 3251, 3260, 01448 3269, 3277, 3285, 3294, 3306, 3314, 3324, 3332, 3340, 3348, 01449 3356, 3364, 3373, 3381, 3389, 3397, 3405, 3413, 3421, 3429, 01450 3437, 3447, 3448, 3454, 3463, 3472, 3483, 3484, 3494, 3501, 01451 3510, 3518, 3524, 3527, 3524, 3545, 3553, 3563, 3567, 3574, 01452 3573, 3594, 3610, 3619, 3630, 3639, 3649, 3659, 3667, 3678, 01453 3689, 3697, 3705, 3720, 3719, 3739, 3738, 3759, 3771, 3772, 01454 3775, 3794, 3797, 3805, 3813, 3816, 3820, 3823, 3831, 3834, 01455 3835, 3843, 3846, 3863, 3864, 3865, 3875, 3885, 3912, 3977, 01456 3986, 3997, 4004, 4014, 4022, 4032, 4041, 4052, 4059, 4070, 01457 4077, 4088, 4095, 4106, 4113, 4142, 4144, 4143, 4160, 4166, 01458 4159, 4185, 4193, 4201, 4209, 4212, 4223, 4224, 4225, 4226, 01459 4229, 4259, 4260, 4261, 4269, 4279, 4280, 4281, 4282, 4283, 01460 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4295, 4308, 4318, 01461 4326, 4336, 4337, 4340, 4349, 4348, 4356, 4368, 4378, 4386, 01462 4394, 4402, 4410, 4418, 4426, 4434, 4442, 4450, 4458, 4466, 01463 4474, 4482, 4490, 4499, 4508, 4517, 4526, 4535, 4546, 4547, 01464 4554, 4563, 4582, 4589, 4602, 4614, 4626, 4634, 4650, 4658, 01465 4674, 4675, 4678, 4691, 4702, 4703, 4706, 4723, 4727, 4737, 01466 4747, 4747, 4776, 4777, 4787, 4794, 4804, 4812, 4822, 4823, 01467 4824, 4827, 4828, 4829, 4830, 4833, 4834, 4835, 4838, 4843, 01468 4850, 4851, 4854, 4855, 4858, 4861, 4864, 4865, 4866, 4869, 01469 4870, 4873, 4874, 4878 01470 }; 01471 #endif 01472 01473 #if YYDEBUG || YYERROR_VERBOSE || 0 01474 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01475 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01476 static const char *const yytname[] = 01477 { 01478 "$end", "error", "$undefined", "keyword_class", "keyword_module", 01479 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", 01480 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", 01481 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", 01482 "keyword_when", "keyword_while", "keyword_until", "keyword_for", 01483 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", 01484 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", 01485 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", 01486 "keyword_self", "keyword_nil", "keyword_true", "keyword_false", 01487 "keyword_and", "keyword_or", "keyword_not", "modifier_if", 01488 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", 01489 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", 01490 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", 01491 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", 01492 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", 01493 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", 01494 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", 01495 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", 01496 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", 01497 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", 01498 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", 01499 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01500 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01501 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", 01502 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias", 01503 "id_core_set_variable_alias", "id_core_undef_method", 01504 "id_core_define_method", "id_core_define_singleton_method", 01505 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','", 01506 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program", 01507 "$@1", "top_compstmt", "top_stmts", "top_stmt", "$@2", "bodystmt", 01508 "compstmt", "stmts", "stmt", "$@3", "command_asgn", "expr", "expr_value", 01509 "command_call", "block_command", "cmd_brace_block", "@4", "command", 01510 "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 01511 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 01512 "fitem", "undef_list", "$@5", "op", "reswords", "arg", "$@6", 01513 "arg_value", "aref_args", "paren_args", "opt_paren_args", 01514 "opt_call_args", "call_args", "command_args", "@7", "block_arg", 01515 "opt_block_arg", "args", "mrhs", "primary", "@8", "$@9", "$@10", "$@11", 01516 "$@12", "$@13", "$@14", "$@15", "$@16", "@17", "@18", "@19", "@20", 01517 "@21", "$@22", "$@23", "primary_value", "k_begin", "k_if", "k_unless", 01518 "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def", 01519 "k_end", "then", "do", "if_tail", "opt_else", "for_var", "f_marg", 01520 "f_marg_list", "f_margs", "block_param", "opt_block_param", 01521 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@24", 01522 "@25", "f_larglist", "lambda_body", "do_block", "@26", "block_call", 01523 "method_call", "brace_block", "@27", "@28", "case_body", "cases", 01524 "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", "strings", 01525 "string", "string1", "xstring", "regexp", "words", "word_list", "word", 01526 "qwords", "qword_list", "string_contents", "xstring_contents", 01527 "regexp_contents", "string_content", "@29", "@30", "@31", "string_dvar", 01528 "symbol", "sym", "dsym", "numeric", "user_variable", "keyword_variable", 01529 "var_ref", "var_lhs", "backref", "superclass", "$@32", "f_arglist", 01530 "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_opt", 01531 "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark", 01532 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg", 01533 "singleton", "$@33", "assoc_list", "assocs", "assoc", "operation", 01534 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl", 01535 "rparen", "rbracket", "trailer", "term", "terms", "none", YY_NULL 01536 }; 01537 #endif 01538 01539 # ifdef YYPRINT 01540 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01541 token YYLEX-NUM. */ 01542 static const yytype_uint16 yytoknum[] = 01543 { 01544 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01545 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01546 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01547 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01548 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01549 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01550 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 01551 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 01552 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 01553 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 01554 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, 01555 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, 01556 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, 01557 370, 371, 372, 373, 374, 375, 123, 125, 91, 46, 01558 44, 96, 40, 41, 93, 59, 32, 10 01559 }; 01560 # endif 01561 01562 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01563 static const yytype_uint16 yyr1[] = 01564 { 01565 0, 148, 150, 149, 151, 152, 152, 152, 152, 153, 01566 154, 153, 155, 156, 157, 157, 157, 157, 159, 158, 01567 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01568 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01569 158, 158, 158, 160, 160, 161, 161, 161, 161, 161, 01570 161, 162, 163, 163, 164, 164, 164, 166, 165, 167, 01571 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 01572 168, 168, 169, 169, 170, 170, 170, 170, 170, 170, 01573 170, 170, 170, 170, 171, 171, 172, 172, 173, 173, 01574 174, 174, 174, 174, 174, 174, 174, 174, 174, 175, 01575 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, 01576 177, 177, 177, 178, 178, 178, 178, 178, 179, 179, 01577 180, 180, 181, 182, 181, 183, 183, 183, 183, 183, 01578 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01579 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01580 183, 183, 183, 183, 184, 184, 184, 184, 184, 184, 01581 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01582 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01583 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01584 184, 184, 184, 184, 184, 185, 185, 185, 185, 185, 01585 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01586 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01587 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01588 185, 185, 185, 185, 185, 185, 185, 186, 185, 185, 01589 185, 187, 188, 188, 188, 188, 189, 190, 190, 191, 01590 191, 191, 191, 191, 192, 192, 192, 192, 192, 194, 01591 193, 195, 196, 196, 197, 197, 197, 197, 198, 198, 01592 198, 199, 199, 199, 199, 199, 199, 199, 199, 199, 01593 200, 199, 201, 199, 199, 199, 199, 199, 199, 199, 01594 199, 199, 199, 202, 199, 199, 199, 199, 199, 199, 01595 199, 199, 199, 203, 204, 199, 205, 206, 199, 199, 01596 199, 207, 208, 199, 209, 199, 210, 211, 199, 212, 01597 199, 213, 199, 214, 215, 199, 199, 199, 199, 199, 01598 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01599 226, 227, 228, 228, 228, 229, 229, 230, 230, 231, 01600 231, 232, 232, 233, 233, 234, 234, 235, 235, 235, 01601 235, 235, 235, 235, 235, 235, 236, 236, 236, 236, 01602 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01603 236, 237, 237, 238, 238, 238, 239, 239, 240, 240, 01604 241, 241, 243, 244, 242, 245, 245, 246, 246, 248, 01605 247, 249, 249, 249, 250, 250, 250, 250, 250, 250, 01606 250, 250, 250, 252, 251, 253, 251, 254, 255, 255, 01607 256, 256, 257, 257, 257, 258, 258, 259, 259, 260, 01608 260, 260, 261, 262, 262, 262, 263, 264, 265, 266, 01609 266, 267, 267, 268, 268, 269, 269, 270, 270, 271, 01610 271, 272, 272, 273, 273, 274, 275, 274, 276, 277, 01611 274, 278, 278, 278, 278, 279, 280, 280, 280, 280, 01612 281, 282, 282, 282, 282, 283, 283, 283, 283, 283, 01613 284, 284, 284, 284, 284, 284, 284, 285, 285, 286, 01614 286, 287, 287, 288, 289, 288, 288, 290, 290, 291, 01615 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 01616 291, 291, 291, 291, 292, 292, 292, 292, 293, 293, 01617 294, 294, 295, 295, 296, 297, 298, 298, 299, 299, 01618 300, 300, 301, 301, 302, 302, 303, 304, 304, 305, 01619 306, 305, 307, 307, 308, 308, 309, 309, 310, 310, 01620 310, 311, 311, 311, 311, 312, 312, 312, 313, 313, 01621 314, 314, 315, 315, 316, 317, 318, 318, 318, 319, 01622 319, 320, 320, 321 01623 }; 01624 01625 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01626 static const yytype_uint8 yyr2[] = 01627 { 01628 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01629 0, 5, 4, 2, 1, 1, 3, 2, 0, 4, 01630 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 01631 1, 3, 3, 6, 5, 5, 5, 5, 3, 3, 01632 3, 3, 1, 3, 3, 1, 3, 3, 3, 2, 01633 1, 1, 1, 1, 1, 4, 4, 0, 5, 2, 01634 3, 4, 5, 4, 5, 2, 2, 2, 2, 2, 01635 1, 3, 1, 3, 1, 2, 3, 5, 2, 4, 01636 2, 4, 1, 3, 1, 3, 2, 3, 1, 3, 01637 1, 1, 4, 3, 3, 3, 3, 2, 1, 1, 01638 1, 4, 3, 3, 3, 3, 2, 1, 1, 1, 01639 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 01640 1, 1, 1, 0, 4, 1, 1, 1, 1, 1, 01641 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01642 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01643 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01647 1, 1, 1, 1, 1, 3, 5, 3, 5, 6, 01648 5, 5, 5, 5, 4, 3, 3, 3, 3, 3, 01649 3, 3, 3, 3, 4, 4, 2, 2, 3, 3, 01650 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 01651 3, 2, 2, 3, 3, 3, 3, 0, 4, 6, 01652 1, 1, 1, 2, 4, 2, 3, 1, 1, 1, 01653 1, 2, 4, 2, 1, 2, 2, 4, 1, 0, 01654 2, 2, 2, 1, 1, 2, 3, 4, 3, 4, 01655 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01656 0, 4, 0, 4, 3, 3, 2, 3, 3, 1, 01657 4, 3, 1, 0, 6, 4, 3, 2, 1, 2, 01658 2, 6, 6, 0, 0, 7, 0, 0, 7, 5, 01659 4, 0, 0, 9, 0, 6, 0, 0, 8, 0, 01660 5, 0, 6, 0, 0, 9, 1, 1, 1, 1, 01661 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01662 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 01663 2, 1, 1, 1, 3, 1, 3, 1, 4, 6, 01664 3, 5, 2, 4, 1, 3, 6, 8, 4, 6, 01665 4, 2, 6, 2, 4, 6, 2, 4, 2, 4, 01666 1, 1, 1, 3, 1, 4, 1, 2, 1, 3, 01667 1, 1, 0, 0, 4, 4, 1, 3, 3, 0, 01668 5, 2, 4, 4, 2, 4, 4, 3, 3, 3, 01669 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 01670 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 01671 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 01672 3, 0, 3, 1, 2, 3, 3, 0, 3, 0, 01673 2, 0, 2, 0, 2, 1, 0, 3, 0, 0, 01674 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 01675 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 01676 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01677 1, 1, 1, 1, 0, 4, 2, 3, 2, 6, 01678 8, 4, 6, 4, 6, 2, 4, 6, 2, 4, 01679 2, 4, 1, 0, 1, 1, 1, 1, 1, 1, 01680 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 01681 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 01682 0, 4, 1, 2, 1, 3, 3, 2, 1, 1, 01683 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01684 0, 1, 0, 1, 2, 2, 0, 1, 1, 1, 01685 1, 1, 2, 0 01686 }; 01687 01688 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 01689 Performed when YYTABLE doesn't specify something else to do. Zero 01690 means the default is an error. */ 01691 static const yytype_uint16 yydefact[] = 01692 { 01693 2, 0, 0, 1, 0, 338, 339, 340, 0, 331, 01694 332, 333, 336, 334, 335, 337, 326, 327, 328, 329, 01695 289, 259, 259, 481, 480, 482, 483, 562, 0, 562, 01696 10, 0, 485, 484, 486, 475, 550, 477, 476, 478, 01697 479, 471, 472, 433, 491, 492, 0, 0, 0, 0, 01698 0, 573, 573, 82, 392, 451, 449, 451, 453, 441, 01699 447, 0, 0, 0, 3, 560, 6, 9, 30, 42, 01700 45, 53, 52, 0, 70, 0, 74, 84, 0, 50, 01701 240, 0, 280, 0, 0, 303, 306, 560, 0, 0, 01702 0, 0, 54, 298, 271, 272, 432, 434, 273, 274, 01703 275, 276, 430, 431, 429, 487, 488, 277, 0, 278, 01704 259, 5, 8, 164, 175, 165, 188, 161, 181, 171, 01705 170, 191, 192, 186, 169, 168, 163, 189, 193, 194, 01706 173, 162, 176, 180, 182, 174, 167, 183, 190, 185, 01707 184, 177, 187, 172, 160, 179, 178, 159, 166, 157, 01708 158, 154, 155, 156, 113, 115, 114, 149, 150, 146, 01709 128, 129, 130, 137, 134, 136, 131, 132, 151, 152, 01710 138, 139, 143, 133, 135, 125, 126, 127, 140, 141, 01711 142, 144, 145, 147, 148, 153, 118, 120, 122, 23, 01712 116, 117, 119, 121, 0, 0, 0, 0, 0, 0, 01713 0, 254, 0, 241, 264, 68, 258, 573, 0, 487, 01714 488, 0, 278, 573, 544, 69, 67, 562, 66, 0, 01715 573, 410, 65, 562, 563, 0, 0, 18, 237, 0, 01716 0, 326, 327, 289, 292, 411, 216, 0, 0, 217, 01717 286, 0, 0, 0, 560, 15, 562, 72, 14, 282, 01718 0, 566, 566, 242, 0, 0, 566, 542, 562, 0, 01719 0, 0, 80, 330, 0, 90, 91, 98, 300, 393, 01720 468, 467, 469, 466, 0, 465, 0, 0, 0, 0, 01721 0, 0, 0, 473, 474, 49, 231, 232, 569, 570, 01722 4, 571, 561, 0, 0, 0, 0, 0, 0, 0, 01723 399, 401, 0, 86, 0, 78, 75, 0, 0, 0, 01724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01726 0, 0, 0, 0, 0, 573, 0, 0, 51, 0, 01727 0, 0, 0, 560, 0, 561, 0, 352, 351, 0, 01728 0, 487, 488, 278, 108, 109, 0, 0, 111, 0, 01729 0, 487, 488, 278, 319, 184, 177, 187, 172, 154, 01730 155, 156, 113, 114, 540, 321, 539, 0, 0, 0, 01731 415, 413, 299, 435, 0, 0, 404, 59, 297, 123, 01732 547, 286, 265, 261, 0, 0, 0, 255, 263, 0, 01733 573, 0, 0, 0, 0, 256, 562, 0, 291, 260, 01734 562, 250, 573, 573, 249, 562, 296, 48, 20, 22, 01735 21, 0, 293, 0, 0, 0, 0, 0, 0, 17, 01736 562, 284, 13, 561, 71, 562, 287, 568, 567, 243, 01737 568, 245, 288, 543, 0, 97, 473, 474, 88, 83, 01738 0, 0, 573, 0, 513, 455, 458, 456, 470, 452, 01739 436, 450, 437, 438, 454, 439, 440, 0, 443, 445, 01740 0, 446, 0, 0, 572, 7, 24, 25, 26, 27, 01741 28, 46, 47, 573, 0, 31, 40, 0, 41, 562, 01742 0, 76, 87, 44, 43, 0, 195, 264, 39, 213, 01743 221, 226, 227, 228, 223, 225, 235, 236, 229, 230, 01744 206, 207, 233, 234, 562, 222, 224, 218, 219, 220, 01745 208, 209, 210, 211, 212, 551, 556, 552, 557, 409, 01746 259, 407, 562, 551, 553, 552, 554, 408, 259, 0, 01747 573, 343, 0, 342, 0, 0, 0, 0, 0, 0, 01748 286, 0, 573, 0, 311, 316, 108, 109, 110, 0, 01749 494, 314, 493, 0, 573, 0, 0, 0, 513, 559, 01750 558, 323, 551, 552, 259, 259, 573, 573, 32, 197, 01751 38, 205, 57, 60, 0, 195, 546, 0, 266, 262, 01752 573, 555, 552, 562, 551, 552, 545, 290, 564, 246, 01753 251, 253, 295, 19, 0, 238, 0, 29, 0, 573, 01754 204, 73, 16, 283, 566, 0, 81, 94, 96, 562, 01755 551, 552, 519, 516, 515, 514, 517, 0, 531, 535, 01756 534, 530, 513, 0, 396, 518, 520, 522, 573, 528, 01757 573, 533, 573, 0, 512, 459, 0, 442, 444, 448, 01758 214, 215, 384, 573, 0, 382, 381, 270, 0, 85, 01759 79, 0, 0, 0, 0, 0, 0, 406, 63, 0, 01760 412, 0, 0, 248, 405, 61, 247, 341, 281, 573, 01761 573, 421, 573, 344, 573, 346, 304, 345, 307, 0, 01762 0, 310, 555, 285, 562, 551, 552, 0, 0, 496, 01763 0, 0, 108, 109, 112, 562, 0, 562, 513, 0, 01764 0, 0, 403, 56, 402, 55, 0, 0, 0, 573, 01765 124, 267, 257, 0, 0, 412, 0, 0, 573, 562, 01766 11, 244, 89, 92, 0, 519, 0, 364, 355, 357, 01767 562, 353, 573, 0, 0, 394, 0, 505, 538, 0, 01768 508, 532, 0, 510, 536, 0, 461, 462, 463, 457, 01769 464, 519, 0, 573, 0, 573, 526, 573, 573, 380, 01770 386, 0, 0, 268, 77, 196, 0, 37, 202, 36, 01771 203, 64, 565, 0, 34, 200, 35, 201, 62, 422, 01772 423, 573, 424, 0, 573, 349, 0, 0, 347, 0, 01773 0, 0, 309, 0, 0, 412, 0, 317, 0, 0, 01774 412, 320, 541, 562, 0, 498, 324, 0, 0, 198, 01775 0, 0, 252, 294, 524, 562, 0, 362, 0, 521, 01776 562, 0, 0, 523, 573, 573, 537, 573, 529, 573, 01777 573, 0, 0, 390, 387, 388, 391, 0, 383, 371, 01778 373, 0, 376, 0, 378, 400, 269, 239, 33, 199, 01779 0, 0, 426, 350, 0, 12, 428, 0, 301, 302, 01780 0, 0, 266, 573, 312, 0, 495, 315, 497, 322, 01781 513, 416, 414, 0, 354, 365, 0, 360, 356, 395, 01782 398, 397, 0, 501, 0, 503, 0, 509, 0, 506, 01783 511, 460, 0, 525, 0, 385, 573, 573, 573, 527, 01784 573, 573, 0, 425, 0, 99, 100, 107, 0, 427, 01785 0, 305, 308, 418, 419, 417, 0, 0, 0, 58, 01786 0, 363, 0, 358, 573, 573, 573, 573, 286, 0, 01787 389, 0, 368, 0, 370, 377, 0, 374, 379, 106, 01788 0, 573, 0, 573, 573, 0, 318, 0, 361, 0, 01789 502, 0, 499, 504, 507, 555, 285, 573, 573, 573, 01790 573, 555, 105, 562, 551, 552, 420, 348, 313, 325, 01791 359, 573, 369, 0, 366, 372, 375, 412, 500, 573, 01792 367 01793 }; 01794 01795 /* YYDEFGOTO[NTERM-NUM]. */ 01796 static const yytype_int16 yydefgoto[] = 01797 { 01798 -1, 1, 2, 64, 65, 66, 229, 539, 540, 244, 01799 245, 421, 68, 69, 339, 70, 71, 583, 719, 72, 01800 73, 246, 74, 75, 76, 449, 77, 202, 358, 359, 01801 186, 187, 188, 189, 584, 536, 191, 79, 423, 204, 01802 250, 529, 674, 410, 411, 218, 219, 206, 397, 412, 01803 488, 80, 337, 435, 604, 341, 800, 342, 801, 697, 01804 926, 701, 698, 875, 566, 568, 711, 880, 237, 82, 01805 83, 84, 85, 86, 87, 88, 89, 90, 91, 678, 01806 542, 686, 797, 798, 350, 738, 739, 740, 763, 654, 01807 655, 764, 844, 845, 268, 269, 454, 633, 745, 301, 01808 483, 92, 93, 388, 577, 576, 549, 925, 680, 791, 01809 861, 865, 94, 95, 96, 97, 98, 99, 100, 280, 01810 467, 101, 282, 276, 274, 278, 459, 646, 645, 755, 01811 759, 102, 275, 103, 104, 209, 210, 107, 211, 212, 01812 561, 700, 709, 710, 635, 636, 637, 638, 639, 766, 01813 767, 640, 641, 642, 643, 836, 747, 377, 567, 255, 01814 413, 214, 238, 608, 531, 571, 290, 407, 408, 670, 01815 439, 543, 345, 248 01816 }; 01817 01818 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01819 STATE-NUM. */ 01820 #define YYPACT_NINF -747 01821 static const yytype_int16 yypact[] = 01822 { 01823 -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747, 01824 -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747, 01825 7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31, 01826 -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842, 01827 -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434, 01828 8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24, 01829 29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458, 01830 -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797, 01831 22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056, 01832 9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747, 01833 -747, -747, -747, -747, -747, 25, 58, -747, 179, 613, 01834 51, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01835 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01836 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01837 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01838 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01839 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01840 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01841 -747, -747, -747, -747, -747, -747, -747, -747, -747, 134, 01842 -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519, 01843 8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43, 01844 206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320, 01845 7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287, 01846 4694, -747, -747, -747, 295, 307, -747, 304, 51, 416, 01847 619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458, 01848 419, 221, 300, -747, 260, 430, 300, -747, -31, 497, 01849 501, 9266, 442, -747, 351, 366, 383, 409, -747, -747, 01850 -747, -747, -747, -747, 644, -747, 754, 813, 605, 464, 01851 819, 478, 68, 530, 532, -747, -747, -747, -747, -747, 01852 -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628, 01853 -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519, 01854 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01855 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01856 8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86, 01857 86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454, 01858 601, 54, 76, 99, 331, 349, 8628, 481, -747, 45, 01859 473, -747, -747, -747, -747, 217, 286, 305, 318, 321, 01860 347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549, 01861 -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747, 01862 -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702, 01863 7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747, 01864 -31, -747, 506, 539, -747, 106, -747, -747, -747, -747, 01865 -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104, 01866 -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747, 01867 7865, -747, -747, -747, 272, 510, -747, -747, -747, 543, 01868 9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747, 01869 -747, -747, -747, -747, -747, -747, -747, 313, -747, -747, 01870 491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747, 01871 -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31, 01872 9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416, 01873 2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184, 01874 1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768, 01875 397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747, 01876 307, -747, -31, 647, -747, 660, -747, -747, 3096, 650, 01877 688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650, 01878 112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193, 01879 -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747, 01880 -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608, 01881 -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747, 01882 265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747, 01883 7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307, 01884 2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31, 01885 38, 261, 603, -747, -747, -747, -747, 972, -747, -747, 01886 -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747, 01887 583, 683, 589, 687, -747, -747, 893, -747, -747, -747, 01888 416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747, 01889 543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608, 01890 677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301, 01891 740, -747, 588, -747, 740, -747, -747, -747, -747, 650, 01892 44, -747, 239, 257, -31, 141, 145, 8628, 193, -747, 01893 8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609, 01894 193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32, 01895 -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106, 01896 -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651, 01897 -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223, 01898 -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747, 01899 -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747, 01900 -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747, 01901 2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545, 01902 -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650, 01903 4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650, 01904 -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797, 01905 4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747, 01906 -31, 803, 686, -747, 676, 678, -747, 684, -747, 694, 01907 684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251, 01908 -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797, 01909 9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747, 01910 650, 650, -747, 365, -747, 3609, -747, -747, -747, -747, 01911 1131, -747, -747, 706, -747, 707, 884, 716, -747, -747, 01912 -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747, 01913 -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747, 01914 717, 684, 797, -747, 523, 366, 383, 409, 3609, -747, 01915 3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747, 01916 884, 707, 884, 721, 684, 727, 684, 684, -747, 10318, 01917 -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510, 01918 10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884, 01919 -747, 598, -747, -747, -747, 730, 731, 684, 735, 684, 01920 684, 55, 282, -31, 128, 158, -747, -747, -747, -747, 01921 707, 684, -747, 598, -747, -747, -747, 163, -747, 684, 01922 -747 01923 }; 01924 01925 /* YYPGOTO[NTERM-NUM]. */ 01926 static const yytype_int16 yypgoto[] = 01927 { 01928 -747, -747, -747, 452, -747, 28, -747, -545, 277, -747, 01929 39, -747, -293, 184, -58, 71, -747, -169, -747, -7, 01930 791, -142, -13, -37, -747, -396, -29, 1623, -312, 788, 01931 -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45, 01932 -747, 11, 47, -324, 115, 5, -747, -322, -196, 53, 01933 -295, 8, -747, -747, -747, -747, -747, -747, -747, -747, 01934 -747, -747, -747, -747, -747, -747, -747, -747, 2, -747, 01935 -747, -747, -747, -747, -747, -747, -747, -747, -747, 205, 01936 -338, -516, -72, -618, -747, -722, -671, 147, -747, -489, 01937 -747, -600, -747, -12, -747, -747, -747, -747, -747, -747, 01938 -747, -747, -747, 798, -747, -747, -531, -747, -50, -747, 01939 -747, -747, -747, -747, -747, 811, -747, -747, -747, -747, 01940 -747, -747, -747, -747, 856, -747, -140, -747, -747, -747, 01941 -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575, 01942 -747, -747, 35, -387, -697, -568, -690, 273, -696, -746, 01943 72, 181, -747, -526, -747, -449, 270, -747, -747, -747, 01944 97, -360, 758, -276, -747, -747, -56, -4, 278, -585, 01945 -214, 6, -18, -2 01946 }; 01947 01948 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 01949 positive, shift that token. If negative, reduce the rule which 01950 number is the opposite. If YYTABLE_NINF, syntax error. */ 01951 #define YYTABLE_NINF -574 01952 static const yytype_int16 yytable[] = 01953 { 01954 111, 273, 544, 227, 81, 644, 81, 254, 725, 201, 01955 201, 532, 498, 201, 493, 192, 689, 405, 208, 208, 01956 193, 706, 208, 225, 262, 228, 340, 222, 190, 343, 01957 688, 344, 112, 221, 733, 192, 247, 375, 441, 306, 01958 193, 67, 443, 67, 596, 558, 559, 292, 190, 253, 01959 257, 81, 208, 838, 616, 264, 833, 541, 530, 741, 01960 538, 263, 794, -93, 208, 846, 799, 634, -103, 207, 01961 207, 291, 380, 207, 589, 190, 593, 380, 264, -99, 01962 596, 3, 589, 685, 263, 208, 208, 716, 717, 208, 01963 349, 360, 360, 291, 660, 743, 263, 263, 263, 541, 01964 430, -100, 574, 575, 251, 909, 888, -330, 652, 805, 01965 230, 190, -489, 213, 213, 387, 224, 213, 378, 644, 01966 810, 386, 279, 530, -107, 538, 334, 768, 619, 470, 01967 -489, 205, 215, 285, -99, 216, 461, -106, 464, 240, 01968 468, -102, 830, 298, 299, -490, 653, -93, 252, 256, 01969 390, 609, -99, 392, 393, 885, 809, 300, 560, 833, 01970 -330, -330, 489, 847, 814, -90, -102, -100, 741, 827, 01971 -104, -104, 379, 744, 471, 281, -101, 609, -93, 335, 01972 336, -93, 381, 644, 803, -93, 302, 381, 432, 288, 01973 288, 289, 289, 220, -90, 909, 838, -551, -91, 81, 01974 -103, 288, -103, 289, 769, 398, 833, 846, 888, 303, 01975 201, 398, 201, 201, -101, 931, -91, 405, 414, 208, 01976 835, 208, 208, 839, 448, 208, 433, 208, 694, 247, 01977 820, 288, 81, 289, 249, 476, 477, 478, 479, -98, 01978 705, 596, 223, 81, 81, 742, 221, 224, 307, 386, 01979 291, 704, -97, 224, 444, 923, 56, 486, 741, 644, 01980 741, 958, 497, 264, -103, 774, 384, 338, 338, 263, 01981 207, 338, 207, -102, 389, -102, 491, 609, 589, 589, 01982 429, -93, -105, 545, 546, -95, -95, 547, 980, 609, 01983 874, 247, 399, -490, 81, 208, 208, 208, 208, 81, 01984 208, 208, -481, -104, 208, -104, 81, 264, -101, 208, 01985 -101, 283, 284, 263, 213, -100, 213, -412, 741, 933, 01986 475, 813, -71, 907, 223, 910, 243, 648, 201, -92, 01987 927, 67, 406, 414, 409, 391, 480, 208, 288, 81, 01988 289, 403, 924, 208, 208, 400, 401, 537, 395, 291, 01989 586, 588, 804, -85, 528, 487, -481, -548, 208, 254, 01990 487, 437, 741, -107, 741, 562, 935, -285, 438, 493, 01991 -95, -480, 394, 485, 455, -549, -412, 396, 494, -94, 01992 793, -551, 548, 957, 790, 402, 208, 208, 987, 426, 01993 -482, 741, 588, 201, 722, 254, 603, -96, 414, -552, 01994 731, -95, 208, -483, -95, 404, -485, 415, -95, 417, 01995 398, 398, 537, 448, 422, 968, -475, 456, 457, 528, 01996 -285, -285, 111, 424, -552, -480, 81, -412, 192, -412, 01997 -412, 644, -484, 193, -478, 81, 451, 217, 537, 657, 01998 440, 190, 400, 427, -482, 201, 528, 438, -486, 220, 01999 414, -487, 264, 448, 208, 578, 580, -483, 263, 647, 02000 -485, -475, 596, 67, 537, 308, -478, -548, -488, -475, 02001 -475, 528, 612, -548, 243, 428, 569, 338, 338, 338, 02002 338, 656, 481, 482, 308, -549, -484, -478, -478, 452, 02003 453, -549, 264, 590, -278, 298, 299, -106, 263, 781, 02004 589, 416, -486, 497, -487, -487, 788, 425, -70, 735, 02005 664, 623, 624, 625, 626, -475, 331, 332, 333, 243, 02006 -478, -488, -488, 918, 434, 338, 338, 431, 669, 920, 02007 570, -555, 722, 556, 614, 668, 676, 557, 681, 551, 02008 555, 667, 721, 675, 81, 201, 81, -278, -278, 673, 02009 414, 687, 687, 445, 208, 588, 254, 201, 563, 720, 02010 446, 447, 414, 436, 537, 699, 208, 442, 81, 208, 02011 465, 528, 676, 676, 656, 656, 537, 726, 732, 713, 02012 715, 243, 450, 528, 469, 673, 673, 727, 398, 669, 02013 -555, 192, 552, 553, 821, -286, 193, 826, 472, -102, 02014 473, 690, 796, 793, 190, 939, 208, 676, 950, -104, 02015 492, 564, 565, 773, 548, 669, -101, 264, 550, 667, 02016 673, 712, 714, 263, 448, 474, 554, 973, 761, 582, 02017 623, 624, 625, 626, 789, 598, 748, 649, 748, 806, 02018 748, -555, 808, -555, -555, 607, 600, -551, -286, -286, 02019 735, 770, 623, 624, 625, 626, 81, 816, 564, 565, 02020 677, 951, 952, 264, 208, 627, 455, 208, 208, 263, 02021 463, 628, 629, 208, 208, 662, 609, 792, 795, 601, 02022 795, -85, 795, 615, 597, -264, 658, 627, 599, 824, 02023 669, 661, 630, 602, 629, 631, 679, 728, 683, 208, 02024 385, 669, 208, 81, 807, 455, 428, 730, 611, 456, 02025 457, 81, 734, 613, 630, 418, 815, 656, 81, 81, 02026 746, 762, -107, 749, 419, 420, 398, 856, -106, 752, 02027 308, 190, 487, 494, 671, 751, 777, 779, 867, 754, 02028 770, 776, 784, 786, -265, 81, 81, 672, 456, 457, 02029 458, 707, 782, -98, 691, 793, -102, 81, 872, -97, 02030 110, 770, 110, 748, 783, 748, 748, 659, 735, -104, 02031 623, 624, 625, 626, 110, 110, 822, 254, 110, 329, 02032 330, 331, 332, 333, 762, 208, -101, -93, 729, 862, 02033 842, 828, 866, 848, 849, 81, 851, 853, 208, 855, 02034 -95, 860, 81, 81, -266, 864, 81, 110, 110, 881, 02035 882, 886, 687, 890, 876, 455, 892, -92, 894, 682, 02036 110, 684, 81, 891, 896, 905, 622, 901, 623, 624, 02037 625, 626, 748, 748, 898, 748, 308, 748, 748, 904, 02038 -267, 110, 110, 929, 903, 110, 938, 930, 941, 308, 02039 263, 321, 322, 949, 858, 943, 932, 946, 456, 457, 02040 460, 959, 914, 627, 321, 322, 81, 961, 263, 628, 02041 629, 795, -551, -552, 455, 983, 606, 81, 364, 347, 02042 455, 338, 977, 825, 338, 329, 330, 331, 332, 333, 02043 630, 382, 940, 631, 802, 326, 327, 328, 329, 330, 02044 331, 332, 333, 976, 748, 748, 748, 383, 748, 748, 02045 750, 811, 753, 277, 376, 928, 632, 456, 457, 462, 02046 81, 906, 81, 456, 457, 466, 765, 834, 81, 0, 02047 81, 771, 748, 748, 748, 748, 735, 0, 623, 624, 02048 625, 626, 0, 0, 201, 0, 0, 756, 757, 414, 02049 758, 681, 795, 208, 0, 110, 44, 45, 0, 528, 02050 0, 0, 0, 537, 0, 748, 748, 748, 748, 669, 02051 528, 0, 0, 736, 0, 110, 0, 110, 110, 748, 02052 338, 110, 0, 110, 0, 812, 0, 748, 110, 0, 02053 0, 0, 0, 817, 818, 308, 0, 0, 0, 110, 02054 110, 0, 868, 0, 869, 0, 0, 823, 0, 0, 02055 321, 322, 0, 0, 877, 0, 0, 0, 829, 879, 02056 831, 832, 837, 0, 735, 840, 623, 624, 625, 626, 02057 0, 0, 841, 0, 0, 850, 0, 852, 854, 0, 02058 0, 0, 0, 328, 329, 330, 331, 332, 333, 0, 02059 110, 110, 110, 110, 110, 110, 110, 110, 0, 0, 02060 110, 736, 110, 0, 0, 110, 0, 737, 0, 843, 02061 863, 623, 624, 625, 626, 921, 922, 870, 871, 0, 02062 0, 873, 203, 203, 0, 0, 203, 0, 0, 0, 02063 0, 878, 0, 110, 0, 110, 0, 883, 0, 110, 02064 110, 0, 0, 884, 893, 895, 0, 897, 889, 899, 02065 900, 0, 236, 239, 110, 0, 0, 203, 203, 0, 02066 0, 0, 0, 0, 908, 0, 911, 0, 286, 287, 02067 0, 735, 956, 623, 624, 625, 626, 0, 0, 0, 02068 0, 919, 110, 110, 293, 294, 295, 296, 297, 0, 02069 0, 0, 0, 0, 0, 0, 0, 0, 110, 0, 02070 978, 0, 979, 0, 0, 934, 0, 936, 736, 0, 02071 0, 937, 0, 0, 887, 0, 942, 944, 945, 0, 02072 947, 948, 110, 622, 0, 623, 624, 625, 626, 0, 02073 0, 110, 0, 0, 0, 953, 0, 954, 0, 0, 02074 0, 0, 0, 955, 960, 962, 963, 964, 0, 0, 02075 110, 0, 0, 0, 967, 0, 969, 0, 0, 970, 02076 627, 0, 0, 0, 0, 0, 628, 629, 0, 0, 02077 0, 0, 0, 0, 981, 0, 0, 982, 984, 985, 02078 986, 0, 0, 0, 0, 0, 0, 630, 0, 0, 02079 631, 988, 0, 0, 0, 0, 989, 0, 0, 990, 02080 0, 203, 0, 0, 203, 203, 286, 0, 0, 0, 02081 105, 0, 105, 708, 0, 622, 0, 623, 624, 625, 02082 626, 0, 0, 203, 0, 203, 203, 0, 0, 0, 02083 0, 108, 0, 108, 0, 0, 0, 0, 0, 0, 02084 110, 0, 110, 761, 0, 623, 624, 625, 626, 0, 02085 110, 0, 627, 0, 0, 0, 0, 105, 628, 629, 02086 0, 265, 110, 0, 110, 110, 0, 0, 0, 0, 02087 0, 0, 0, 0, 0, 0, 0, 0, 108, 630, 02088 627, 0, 631, 0, 265, 0, 628, 629, 0, 0, 02089 0, 0, 0, 0, 0, 0, 351, 361, 361, 361, 02090 0, 0, 110, 0, 0, 0, 0, 630, 203, 0, 02091 631, 0, 0, 496, 499, 500, 501, 502, 503, 504, 02092 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 02093 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 02094 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 02095 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 02096 110, 0, 0, 110, 110, 0, 0, 0, 0, 110, 02097 110, 0, 308, 309, 310, 311, 312, 313, 314, 315, 02098 316, 317, 318, -574, -574, 0, 0, 321, 322, 0, 02099 579, 581, 0, 0, 0, 110, 0, 0, 110, 110, 02100 585, 203, 203, 0, 0, 105, 203, 110, 579, 581, 02101 203, 0, 0, 0, 110, 110, 324, 325, 326, 327, 02102 328, 329, 330, 331, 332, 333, 108, 0, 0, 605, 02103 0, 0, 0, 0, 610, 0, 0, 0, 105, 0, 02104 0, 110, 110, 203, 0, 0, 203, 0, 0, 105, 02105 105, 0, 0, 110, 0, 0, 0, 0, 203, 108, 02106 0, 0, 0, 0, 0, 0, 0, 0, 0, 265, 02107 108, 108, 0, 0, 0, 0, 0, 0, 650, 651, 02108 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 02109 203, 110, 0, 0, 110, 0, 0, 0, 110, 110, 02110 105, 0, 110, 0, 0, 105, 0, 0, 0, 0, 02111 0, 0, 105, 265, 0, 0, 0, 109, 110, 109, 02112 0, 108, 0, 0, 0, 0, 108, 0, 0, 0, 02113 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02114 0, 0, 0, 0, 0, 105, 0, 106, 0, 106, 02115 0, 0, 0, 0, 203, 0, 0, 0, 203, 0, 02116 0, 0, 110, 0, 109, 78, 108, 78, 267, 0, 02117 203, 0, 0, 110, 0, 0, 0, 0, 0, 0, 02118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02119 0, 267, 0, 203, 106, 0, 0, 0, 266, 0, 02120 0, 0, 0, 353, 363, 363, 203, 203, 0, 0, 02121 0, 0, 78, 0, 0, 0, 110, 0, 110, 0, 02122 0, 266, 0, 0, 110, 0, 110, 0, 0, 0, 02123 0, 0, 105, 352, 362, 362, 362, 0, 0, 0, 02124 0, 105, 0, 0, 0, 0, 0, 0, 0, 110, 02125 0, 348, 0, 108, 0, 0, 0, 0, 265, 0, 02126 0, 0, 108, 0, 203, 0, 0, 0, 585, 775, 02127 0, 778, 780, 0, 0, 0, 0, 785, 787, -573, 02128 0, 0, 0, 0, 0, 203, 0, -573, -573, -573, 02129 0, 0, -573, -573, -573, 0, -573, 0, 265, 0, 02130 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02131 0, 0, 109, 0, 0, 0, -573, -573, 0, -573, 02132 -573, -573, -573, -573, 819, 0, 0, 0, 0, 778, 02133 780, 0, 785, 787, 0, 0, 0, 0, 0, 0, 02134 203, 0, 106, 0, 0, 109, 0, 0, 0, 0, 02135 105, 0, 105, 0, 0, 0, 109, 109, 0, 0, 02136 78, 0, 0, 0, -573, 0, 0, 0, 0, 0, 02137 0, 108, 0, 108, 105, 106, 267, 0, 203, 0, 02138 0, 0, 857, 0, 0, 0, 106, 106, 0, 859, 02139 0, 0, 0, 78, 0, 108, 0, 0, 0, 0, 02140 0, 0, 0, 0, 78, 78, 266, 109, 0, 203, 02141 0, 0, 109, 0, 0, 0, -573, 0, -573, 109, 02142 267, 220, -573, 265, -573, 0, -573, 859, 203, 0, 02143 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 02144 0, 0, 106, 0, 0, 0, 0, 0, 0, 106, 02145 266, 0, 109, 0, 0, 78, 0, 0, 0, 0, 02146 78, 0, 105, 0, 0, 0, 0, 78, 0, 265, 02147 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02148 0, 0, 106, 108, 0, 0, 0, 0, 0, 0, 02149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02150 78, 0, 0, 0, 0, 0, 0, 0, 0, 105, 02151 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 02152 0, 0, 0, 0, 105, 105, 0, 0, 0, 0, 02153 108, 0, 0, 0, 0, 0, 0, 0, 108, 109, 02154 0, 0, 0, 0, 0, 108, 108, 0, 109, 0, 02155 0, 105, 105, 0, 0, 0, 0, 203, 0, 0, 02156 0, 0, 0, 105, 0, 267, 0, 0, 0, 106, 02157 0, 0, 108, 108, 0, 0, 0, 0, 106, 0, 02158 0, 0, 0, 0, 108, 0, 0, 78, 0, 0, 02159 0, 0, 0, 0, 0, 266, 78, 0, 0, 0, 02160 0, 105, 0, 0, 0, 267, 0, 0, 105, 105, 02161 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02162 0, 0, 108, 0, 0, 0, 0, 0, 105, 108, 02163 108, 0, 0, 108, 0, 266, 0, 0, 0, 0, 02164 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 02165 361, 0, 0, 0, 0, 0, 0, 109, 0, 109, 02166 0, 0, 0, 0, 0, 0, 0, 0, 915, 0, 02167 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02168 0, 109, 0, 105, 0, 0, 0, 106, 0, 106, 02169 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02170 0, 0, 0, 0, 108, 78, 0, 78, 0, 0, 02171 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 02172 0, 0, 0, 0, 0, 0, 105, 0, 105, 78, 02173 267, 0, 0, 0, 105, 0, 105, 0, 0, 0, 02174 0, 0, 0, 0, 0, 0, 0, 108, 0, 108, 02175 0, 0, 0, 0, 0, 108, 0, 108, 0, 0, 02176 266, 760, 0, 0, 0, 0, 0, 0, 0, 109, 02177 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 02178 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02179 0, 0, 308, -574, -574, -574, -574, 313, 314, 106, 02180 0, -574, -574, 0, 0, 0, 266, 321, 322, 0, 02181 0, 0, 0, 0, 0, 0, 109, 78, 0, 0, 02182 0, 0, 0, 0, 109, 495, 0, 0, 0, 0, 02183 0, 109, 109, 0, 0, 0, 324, 325, 326, 327, 02184 328, 329, 330, 331, 332, 333, 106, 0, 0, 0, 02185 0, 0, 0, 0, 106, 0, 0, 0, 109, 109, 02186 0, 106, 106, 0, 78, 0, 0, 0, 0, 0, 02187 109, 0, 78, 0, 0, 0, 0, 0, 0, 78, 02188 78, 308, 309, 310, 311, 312, 313, 314, 106, 106, 02189 317, 318, 0, 0, 0, 0, 321, 322, 0, 0, 02190 106, 0, 0, 0, 0, 0, 78, 78, 109, 0, 02191 0, 0, 0, 0, 0, 109, 109, 0, 78, 109, 02192 0, 0, 0, 0, 0, 324, 325, 326, 327, 328, 02193 329, 330, 331, 332, 333, 109, 0, 0, 106, 0, 02194 0, 0, 0, 0, 0, 106, 106, 0, 0, 106, 02195 0, 0, 0, 0, 0, 0, 78, 363, 0, 0, 02196 0, 0, 0, 78, 78, 106, 0, 78, 0, 0, 02197 0, 0, 0, 0, 0, 917, 0, 0, 0, 109, 02198 0, 0, 0, 78, 0, 0, 0, 362, 0, 0, 02199 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02200 0, 0, 0, 0, 0, 916, 0, 0, 0, 106, 02201 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02202 106, 0, 0, 913, 0, 0, 0, 78, 0, 0, 02203 0, 0, 0, 109, 0, 109, 0, 0, 78, 0, 02204 0, 109, 0, 109, 0, 0, 0, 0, 0, 0, 02205 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02206 0, 0, 0, 106, 0, 106, 0, 0, 0, 0, 02207 0, 106, 0, 106, 0, 0, 0, 0, 0, 0, 02208 0, 78, 0, 78, 0, 0, 0, 0, 0, 78, 02209 0, 78, -573, 4, 0, 5, 6, 7, 8, 9, 02210 0, 0, 0, 10, 11, 0, 0, 0, 12, 0, 02211 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02212 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02213 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02214 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02215 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02217 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02218 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02219 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02221 0, 0, 0, -285, 61, 62, 63, 0, 0, 0, 02222 0, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02223 -285, 0, 0, 0, 0, 0, 0, -573, 0, -573, 02224 -285, -285, -285, 0, 0, 0, 0, 0, 0, 0, 02225 -285, -285, 0, -285, -285, -285, -285, -285, 0, 0, 02226 0, 0, 0, 0, 308, 309, 310, 311, 312, 313, 02227 314, 315, 316, 317, 318, 319, 320, 0, 0, 321, 02228 322, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02229 -285, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02230 724, -285, 0, 0, 0, 0, 323, -285, 324, 325, 02231 326, 327, 328, 329, 330, 331, 332, 333, 0, 0, 02232 -285, 0, -105, -285, -285, -285, -285, -285, -285, -285, 02233 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 02234 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 02235 -285, -285, -285, -285, -411, 0, -285, -285, -285, 0, 02236 -285, 0, -411, -411, -411, 0, 0, -411, -411, -411, 02237 0, -411, 0, 0, 0, 0, 0, 0, 0, 0, 02238 -411, -411, -411, 0, 0, 0, 0, 0, 0, 0, 02239 0, -411, -411, 0, -411, -411, -411, -411, -411, 0, 02240 0, 0, 0, 0, 0, 308, 309, 310, 311, 312, 02241 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 02242 321, 322, -411, -411, -411, -411, -411, -411, -411, -411, 02243 -411, -411, -411, -411, -411, 0, 0, -411, -411, -411, 02244 0, 0, -411, 0, 0, 0, 0, 323, -411, 324, 02245 325, 326, 327, 328, 329, 330, 331, 332, 333, 0, 02246 0, 0, 0, 0, -411, 0, -411, -411, -411, -411, 02247 -411, -411, -411, -411, -411, -411, 0, 0, 0, 0, 02248 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02249 -411, -411, -411, -411, -411, -279, 220, -411, -411, -411, 02250 0, -411, 0, -279, -279, -279, 0, 0, -279, -279, 02251 -279, 0, -279, 0, 0, 0, 0, 0, 0, 0, 02252 0, 0, -279, -279, -279, 0, 0, 0, 0, 0, 02253 0, 0, -279, -279, 0, -279, -279, -279, -279, -279, 02254 0, 0, 0, 0, 0, 0, 308, 309, 310, 311, 02255 312, 313, 314, 315, 0, 317, 318, 0, 0, 0, 02256 0, 321, 322, -279, -279, -279, -279, -279, -279, -279, 02257 -279, -279, -279, -279, -279, -279, 0, 0, -279, -279, 02258 -279, 0, 0, -279, 0, 0, 0, 0, 0, -279, 02259 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 02260 0, 0, -279, 0, 0, -279, -279, -279, -279, -279, 02261 -279, -279, -279, -279, -279, -279, -279, 0, 0, 0, 02262 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02263 0, 0, -279, -279, -279, -279, -573, 0, -279, -279, 02264 -279, 0, -279, 0, -573, -573, -573, 0, 0, -573, 02265 -573, -573, 0, -573, 0, 0, 0, 0, 0, 0, 02266 0, 0, -573, -573, -573, 0, 0, 0, 0, 0, 02267 0, 0, 0, -573, -573, 0, -573, -573, -573, -573, 02268 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02269 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02270 0, 0, 0, 0, -573, -573, -573, -573, -573, -573, 02271 -573, -573, -573, -573, -573, -573, -573, 0, 0, -573, 02272 -573, -573, 0, 0, -573, 0, 0, 0, 0, 0, 02273 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02274 0, 0, 0, 0, 0, 0, -573, 0, -573, -573, 02275 -573, -573, -573, -573, -573, -573, -573, -573, 0, 0, 02276 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02277 0, 0, -573, -573, -573, -573, -573, -292, 220, -573, 02278 -573, -573, 0, -573, 0, -292, -292, -292, 0, 0, 02279 -292, -292, -292, 0, -292, 0, 0, 0, 0, 0, 02280 0, 0, 0, 0, -292, -292, 0, 0, 0, 0, 02281 0, 0, 0, 0, -292, -292, 0, -292, -292, -292, 02282 -292, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02283 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02284 0, 0, 0, 0, 0, -292, -292, -292, -292, -292, 02285 -292, -292, -292, -292, -292, -292, -292, -292, 0, 0, 02286 -292, -292, -292, 0, 0, -292, 0, 0, 0, 0, 02287 0, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02288 0, 0, 0, 0, 0, 0, 0, -292, 0, -292, 02289 -292, -292, -292, -292, -292, -292, -292, -292, -292, 0, 02290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02291 0, 0, 0, 0, -292, -292, -292, -292, -555, 217, 02292 -292, -292, -292, 0, -292, 0, -555, -555, -555, 0, 02293 0, 0, -555, -555, 0, -555, 0, 0, 0, 0, 02294 0, 0, 0, 0, -555, 0, 0, 0, 0, 0, 02295 0, 0, 0, 0, 0, -555, -555, 0, -555, -555, 02296 -555, -555, -555, 0, 0, 0, 0, 0, 0, 0, 02297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02298 0, 0, 0, 0, 0, 0, -555, -555, -555, -555, 02299 -555, -555, -555, -555, -555, -555, -555, -555, -555, 0, 02300 0, -555, -555, -555, -285, 665, 0, 0, 0, 0, 02301 0, 0, -285, -285, -285, 0, 0, 0, -285, -285, 02302 0, -285, 0, 0, 0, 0, 0, -103, -555, 0, 02303 -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 02304 0, -285, -285, 0, -285, -285, -285, -285, -285, 0, 02305 0, 0, 0, 0, -555, -555, -555, -555, -94, 0, 02306 0, -555, 0, -555, 0, -555, 0, 0, 0, 0, 02307 0, 0, -285, -285, -285, -285, -285, -285, -285, -285, 02308 -285, -285, -285, -285, -285, 0, 0, -285, -285, -285, 02309 0, 666, 0, 0, 0, 0, 0, 0, 0, 0, 02310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02311 0, 0, 0, -105, -285, 0, -285, -285, -285, -285, 02312 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 02313 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02314 0, -285, -285, -285, -96, 0, 0, -285, 0, -285, 02315 241, -285, 5, 6, 7, 8, 9, -573, -573, -573, 02316 10, 11, 0, 0, -573, 12, 0, 13, 14, 15, 02317 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02318 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02319 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02320 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02321 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02323 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02324 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02325 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02327 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02329 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02330 8, 9, 0, 0, -573, 10, 11, 0, -573, -573, 02331 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02332 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02333 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02334 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02335 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02336 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02338 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02339 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02341 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02342 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02343 0, 0, 0, 0, 0, 0, 0, 0, 0, -573, 02344 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02345 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02346 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02347 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02348 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02349 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02350 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02352 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02353 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02354 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02355 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02356 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02357 4, 0, 5, 6, 7, 8, 9, 0, 0, 0, 02358 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02359 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02360 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02361 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, 02362 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02363 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02365 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02366 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02367 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02368 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02369 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02370 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02371 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02372 8, 9, 0, 0, -573, 10, 11, 0, 0, -573, 02373 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02374 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02375 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02376 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02377 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02378 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02379 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02380 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02381 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02383 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02384 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02385 8, 9, 0, -573, -573, 10, 11, 0, 0, -573, 02386 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02387 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02388 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02389 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02390 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02391 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02393 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02394 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02396 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02397 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02398 8, 9, 0, 0, 0, 10, 11, 0, 0, -573, 02399 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02400 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02401 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02402 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02403 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02404 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02406 48, 0, 0, 242, 50, 0, 51, 52, 0, 53, 02407 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02409 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02410 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02411 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02412 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02413 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02414 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02415 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02416 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02417 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02419 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02420 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02421 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02422 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02423 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02424 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02425 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02426 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02427 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02428 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02429 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02430 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02431 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02432 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02433 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02435 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02437 0, -573, 0, 0, 0, 0, 0, 0, 0, -573, 02438 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02439 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, 02440 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02441 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02442 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02443 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02444 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02445 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02446 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02447 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02448 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02449 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02450 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02451 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02452 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02453 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02454 21, 22, 23, 24, 25, 26, 0, 0, 194, 0, 02455 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02456 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02457 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02458 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02459 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02460 0, 51, 52, 0, 198, 199, 54, 55, 56, 57, 02461 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02462 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02463 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02464 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02465 22, 23, 24, 25, 26, 0, 224, 27, 0, 0, 02466 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02467 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02468 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02470 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02471 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02472 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02474 61, 62, 63, 0, 0, 0, 0, 0, 0, 0, 02475 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02476 11, 0, 0, 288, 12, 289, 13, 14, 15, 16, 02477 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02478 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02479 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02480 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02481 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02482 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02483 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02484 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02485 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02486 5, 6, 7, 8, 9, 0, 0, 0, 10, 11, 02487 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02488 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02489 23, 24, 25, 26, 0, 224, 27, 0, 0, 0, 02490 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, 02491 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02492 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02494 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02495 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02496 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02497 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02498 62, 63, 0, 0, 0, 0, 0, 0, 5, 6, 02499 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, 02500 0, 12, 474, 13, 14, 15, 16, 17, 18, 19, 02501 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02502 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02503 28, 29, 0, 31, 32, 33, 34, 35, 36, 37, 02504 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02505 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02506 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02507 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02508 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02509 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02510 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, 02511 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02512 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02513 474, 113, 114, 115, 116, 117, 118, 119, 120, 121, 02514 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 02515 132, 133, 134, 135, 136, 0, 0, 0, 137, 138, 02516 139, 365, 366, 367, 368, 144, 145, 146, 0, 0, 02517 0, 0, 0, 147, 148, 149, 150, 369, 370, 371, 02518 372, 155, 37, 38, 373, 40, 0, 0, 0, 0, 02519 0, 0, 0, 0, 157, 158, 159, 160, 161, 162, 02520 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02521 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02522 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02523 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02524 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02525 0, 183, 184, 0, 0, 0, 0, 0, -548, -548, 02526 -548, 0, -548, 0, 0, 0, -548, -548, 0, 185, 02527 374, -548, 0, -548, -548, -548, -548, -548, -548, -548, 02528 0, -548, 0, 0, 0, -548, -548, -548, -548, -548, 02529 -548, -548, 0, 0, -548, 0, 0, 0, 0, 0, 02530 0, -548, 0, 0, -548, -548, -548, -548, -548, -548, 02531 -548, -548, -548, -548, -548, -548, 0, -548, -548, -548, 02532 0, -548, -548, 0, 0, 0, 0, 0, 0, 0, 02533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02534 0, -548, 0, 0, -548, -548, 0, -548, -548, 0, 02535 -548, -548, -548, -548, -548, -548, -548, -548, -548, 0, 02536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02537 0, 0, 0, 0, 0, 0, 0, -548, -548, -548, 02538 0, 0, 0, 0, 0, -549, -549, -549, 0, -549, 02539 0, -548, 0, -549, -549, 0, 0, -548, -549, 0, 02540 -549, -549, -549, -549, -549, -549, -549, 0, -549, 0, 02541 0, 0, -549, -549, -549, -549, -549, -549, -549, 0, 02542 0, -549, 0, 0, 0, 0, 0, 0, -549, 0, 02543 0, -549, -549, -549, -549, -549, -549, -549, -549, -549, 02544 -549, -549, -549, 0, -549, -549, -549, 0, -549, -549, 02545 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02546 0, 0, 0, 0, 0, 0, 0, 0, -549, 0, 02547 0, -549, -549, 0, -549, -549, 0, -549, -549, -549, 02548 -549, -549, -549, -549, -549, -549, 0, 0, 0, 0, 02549 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02550 0, 0, 0, 0, -549, -549, -549, 0, 0, 0, 02551 0, 0, -551, -551, -551, 0, -551, 0, -549, 0, 02552 -551, -551, 0, 0, -549, -551, 0, -551, -551, -551, 02553 -551, -551, -551, -551, 0, 0, 0, 0, 0, -551, 02554 -551, -551, -551, -551, -551, -551, 0, 0, -551, 0, 02555 0, 0, 0, 0, 0, -551, 0, 0, -551, -551, 02556 -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, 02557 0, -551, -551, -551, 0, -551, -551, 0, 0, 0, 02558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02559 0, 0, 0, 0, 0, -551, 723, 0, -551, -551, 02560 0, -551, -551, 0, -551, -551, -551, -551, -551, -551, 02561 -551, -551, -551, 0, 0, 0, 0, 0, -103, 0, 02562 0, 0, 0, 0, 0, 0, -553, -553, -553, 0, 02563 -553, -551, -551, -551, -553, -553, 0, 0, 0, -553, 02564 0, -553, -553, -553, -553, -553, -553, -553, 0, 0, 02565 0, -551, 0, -553, -553, -553, -553, -553, -553, -553, 02566 0, 0, -553, 0, 0, 0, 0, 0, 0, -553, 02567 0, 0, -553, -553, -553, -553, -553, -553, -553, -553, 02568 -553, -553, -553, -553, 0, -553, -553, -553, 0, -553, 02569 -553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02570 0, 0, 0, 0, 0, 0, 0, 0, 0, -553, 02571 0, 0, -553, -553, 0, -553, -553, 0, -553, -553, 02572 -553, -553, -553, -553, -553, -553, -553, 0, 0, 0, 02573 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02574 -554, -554, -554, 0, -554, -553, -553, -553, -554, -554, 02575 0, 0, 0, -554, 0, -554, -554, -554, -554, -554, 02576 -554, -554, 0, 0, 0, -553, 0, -554, -554, -554, 02577 -554, -554, -554, -554, 0, 0, -554, 0, 0, 0, 02578 0, 0, 0, -554, 0, 0, -554, -554, -554, -554, 02579 -554, -554, -554, -554, -554, -554, -554, -554, 0, -554, 02580 -554, -554, 0, -554, -554, 0, 0, 0, 0, 0, 02581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02582 0, 0, 0, -554, 0, 0, -554, -554, 0, -554, 02583 -554, 0, -554, -554, -554, -554, -554, -554, -554, -554, 02584 -554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02585 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02586 -554, -554, 0, 0, 0, 0, 0, 0, 0, 0, 02587 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02588 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 02589 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02590 133, 134, 135, 136, 0, 0, 0, 137, 138, 139, 02591 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 02592 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, 02593 155, 270, 271, 156, 272, 0, 0, 0, 0, 0, 02594 0, 0, 0, 157, 158, 159, 160, 161, 162, 163, 02595 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 02596 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 02597 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 02598 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 02599 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 02600 183, 184, 0, 0, 0, 0, 0, 0, 0, 0, 02601 0, 0, 0, 0, 0, 0, 0, 0, 185, 113, 02602 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 02603 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 02604 134, 135, 136, 0, 0, 0, 137, 138, 139, 140, 02605 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 02606 0, 147, 148, 149, 150, 151, 152, 153, 154, 155, 02607 226, 0, 156, 0, 0, 0, 0, 0, 0, 0, 02608 0, 0, 157, 158, 159, 160, 161, 162, 163, 164, 02609 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 02610 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02611 0, 172, 0, 0, 55, 0, 0, 0, 0, 0, 02612 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 02613 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 02614 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02615 0, 0, 0, 0, 0, 0, 0, 185, 113, 114, 02616 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 02617 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 02618 135, 136, 0, 0, 0, 137, 138, 139, 140, 141, 02619 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 02620 147, 148, 149, 150, 151, 152, 153, 154, 155, 0, 02621 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 02622 0, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02623 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02624 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02625 172, 0, 0, 55, 0, 0, 0, 0, 0, 0, 02626 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02627 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02629 0, 0, 0, 0, 0, 0, 185, 113, 114, 115, 02630 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 02631 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 02632 136, 0, 0, 0, 137, 138, 139, 140, 141, 142, 02633 143, 144, 145, 146, 0, 0, 0, 0, 0, 147, 02634 148, 149, 150, 151, 152, 153, 154, 155, 0, 0, 02635 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02636 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 02637 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 02638 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 02639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02640 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 02641 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 02642 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02643 11, 0, 0, 0, 12, 185, 13, 14, 15, 231, 02644 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02645 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02646 0, 0, 0, 0, 258, 0, 0, 32, 33, 34, 02647 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02648 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02649 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02650 0, 0, 0, 0, 259, 0, 0, 197, 50, 0, 02651 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02652 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02653 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02654 260, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02655 15, 231, 232, 18, 19, 0, 0, 0, 261, 0, 02656 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02657 0, 0, 0, 0, 0, 0, 258, 0, 0, 32, 02658 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02659 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 02660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02661 0, 0, 0, 0, 0, 0, 259, 0, 0, 197, 02662 50, 0, 51, 52, 0, 0, 0, 54, 55, 56, 02663 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02664 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 02665 0, 0, 260, 10, 11, 0, 0, 0, 12, 0, 02666 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02667 490, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02668 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02669 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02670 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02672 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02673 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02674 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02675 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, 02676 0, 0, 10, 11, 61, 62, 63, 12, 0, 13, 02677 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02678 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02679 27, 0, 0, 0, 0, 0, 28, 29, 0, 31, 02680 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02681 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02683 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02684 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02685 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02686 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02687 0, 10, 11, 61, 62, 63, 12, 0, 13, 14, 02688 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02689 20, 21, 22, 23, 24, 25, 26, 0, 0, 194, 02690 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02691 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, 02692 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02694 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02695 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, 02696 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02697 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02698 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02699 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02700 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02701 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02702 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02703 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02705 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02706 0, 51, 52, 0, 587, 199, 54, 55, 56, 57, 02707 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02708 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02709 11, 61, 200, 63, 12, 0, 13, 14, 15, 231, 02710 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02711 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02712 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02713 35, 36, 37, 38, 39, 40, 195, 41, 42, 0, 02714 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02716 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02717 51, 52, 0, 198, 0, 54, 55, 56, 57, 58, 02718 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02719 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02720 61, 200, 63, 12, 0, 13, 14, 15, 231, 232, 02721 18, 19, 0, 0, 0, 0, 0, 233, 234, 235, 02722 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02723 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02724 36, 37, 38, 39, 40, 195, 41, 42, 0, 43, 02725 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02727 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02728 52, 0, 0, 199, 54, 55, 56, 57, 58, 59, 02729 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02730 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02731 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02732 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02733 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02734 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02735 37, 38, 39, 40, 195, 41, 42, 0, 43, 44, 02736 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02738 0, 0, 196, 0, 0, 197, 50, 0, 51, 52, 02739 0, 587, 0, 54, 55, 56, 57, 58, 59, 60, 02740 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02741 7, 0, 9, 0, 0, 0, 10, 11, 61, 200, 02742 63, 12, 0, 13, 14, 15, 231, 232, 18, 19, 02743 0, 0, 0, 0, 0, 233, 234, 235, 23, 24, 02744 25, 26, 0, 0, 194, 0, 0, 0, 0, 0, 02745 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02746 38, 39, 40, 195, 41, 42, 0, 43, 44, 45, 02747 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02749 0, 196, 0, 0, 197, 50, 0, 51, 52, 0, 02750 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02751 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02752 0, 9, 0, 0, 0, 10, 11, 61, 200, 63, 02753 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02754 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02755 26, 0, 0, 194, 0, 0, 0, 0, 0, 0, 02756 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02757 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02758 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02760 196, 0, 0, 197, 50, 0, 51, 52, 0, 484, 02761 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02762 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02763 9, 0, 0, 0, 10, 11, 61, 200, 63, 12, 02764 0, 13, 14, 15, 231, 232, 18, 19, 0, 0, 02765 0, 0, 0, 233, 234, 235, 23, 24, 25, 26, 02766 0, 0, 194, 0, 0, 0, 0, 0, 0, 29, 02767 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02768 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02769 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02770 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 02771 0, 0, 197, 50, 0, 51, 52, 0, 198, 0, 02772 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 02773 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02774 0, 0, 0, 10, 11, 61, 200, 63, 12, 0, 02775 13, 14, 15, 231, 232, 18, 19, 0, 0, 0, 02776 0, 0, 233, 234, 235, 23, 24, 25, 26, 0, 02777 0, 194, 0, 0, 0, 0, 0, 0, 29, 0, 02778 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02779 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02781 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 02782 0, 197, 50, 0, 51, 52, 0, 772, 0, 54, 02783 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02784 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02785 0, 0, 10, 11, 61, 200, 63, 12, 0, 13, 02786 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02787 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02788 194, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02789 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02790 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02792 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 02793 197, 50, 0, 51, 52, 0, 484, 0, 54, 55, 02794 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02795 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02796 0, 10, 11, 61, 200, 63, 12, 0, 13, 14, 02797 15, 231, 232, 18, 19, 0, 0, 0, 0, 0, 02798 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02799 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02800 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02801 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02802 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02803 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02804 50, 0, 51, 52, 0, 587, 0, 54, 55, 56, 02805 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02806 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02807 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02808 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02809 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02810 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02811 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02812 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02814 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02815 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, 02816 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02817 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02818 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02819 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02820 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02821 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02822 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02823 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02825 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02826 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02827 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02828 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02829 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02830 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02831 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02832 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02833 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02834 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02836 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02837 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, 02838 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02839 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02840 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02841 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02842 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02843 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02844 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02845 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02847 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02848 0, 305, 0, 54, 55, 56, 57, 58, 59, 60, 02849 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02850 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02851 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02852 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02853 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02854 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02855 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02857 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 02858 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02859 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02860 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02861 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02862 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02863 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02864 0, 0, 258, 0, 0, 32, 33, 34, 354, 36, 02865 37, 38, 355, 40, 0, 41, 42, 0, 43, 44, 02866 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02867 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 02868 0, 0, 357, 0, 0, 197, 50, 0, 51, 52, 02869 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02870 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02871 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02872 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02873 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02874 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02875 32, 33, 34, 354, 36, 37, 38, 355, 40, 0, 02876 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02877 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02878 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 02879 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02880 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02881 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02882 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02883 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02884 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02885 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02886 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02887 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02889 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02890 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02891 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02892 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02893 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02894 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02895 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02896 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02897 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02899 0, 0, 0, 0, 0, 0, 0, 902, 0, 0, 02900 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02901 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02902 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02903 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02904 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02905 24, 25, 26, 0, 0, 194, 0, 663, 0, 0, 02906 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02907 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02908 45, 308, 309, 310, 311, 312, 313, 314, 315, 316, 02909 317, 318, 319, 320, 0, 0, 321, 322, 0, 0, 02910 0, 0, 912, 0, 0, 197, 50, 0, 51, 52, 02911 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02912 0, 0, 0, 323, 0, 324, 325, 326, 327, 328, 02913 329, 330, 331, 332, 333, 0, 0, 0, 260, 0, 02914 525, 526, 0, 0, 527, 0, 0, 0, 0, 0, 02915 0, 0, 0, -241, 157, 158, 159, 160, 161, 162, 02916 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02917 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02918 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02919 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02920 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02921 0, 183, 184, 0, 0, 0, 0, 533, 534, 0, 02922 0, 535, 0, 0, 0, 0, 0, 0, 0, 185, 02923 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02924 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02926 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02927 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02928 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02929 0, 0, 0, 0, 591, 526, 0, 0, 592, 0, 02930 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 02931 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 02932 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 02933 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 02934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02935 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 02936 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 02937 0, 594, 534, 0, 0, 595, 0, 0, 0, 0, 02938 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 02939 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 02940 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 02941 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 02942 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02943 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 02944 182, 0, 183, 184, 0, 0, 0, 0, 617, 526, 02945 0, 0, 618, 0, 0, 0, 0, 0, 0, 0, 02946 185, 220, 157, 158, 159, 160, 161, 162, 163, 164, 02947 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 02948 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02949 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 02950 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 02951 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 02952 184, 0, 0, 0, 0, 620, 534, 0, 0, 621, 02953 0, 0, 0, 0, 0, 0, 0, 185, 220, 157, 02954 158, 159, 160, 161, 162, 163, 164, 165, 0, 0, 02955 166, 167, 0, 0, 168, 169, 170, 171, 0, 0, 02956 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 02957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02958 0, 0, 0, 0, 0, 173, 174, 175, 176, 177, 02959 178, 179, 180, 181, 182, 0, 183, 184, 0, 0, 02960 0, 0, 692, 526, 0, 0, 693, 0, 0, 0, 02961 0, 0, 0, 0, 185, 220, 157, 158, 159, 160, 02962 161, 162, 163, 164, 165, 0, 0, 166, 167, 0, 02963 0, 168, 169, 170, 171, 0, 0, 0, 0, 0, 02964 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 02965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02966 0, 0, 173, 174, 175, 176, 177, 178, 179, 180, 02967 181, 182, 0, 183, 184, 0, 0, 0, 0, 695, 02968 534, 0, 0, 696, 0, 0, 0, 0, 0, 0, 02969 0, 185, 220, 157, 158, 159, 160, 161, 162, 163, 02970 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 02971 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 02972 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 02973 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 02974 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 02975 183, 184, 0, 0, 0, 0, 702, 526, 0, 0, 02976 703, 0, 0, 0, 0, 0, 0, 0, 185, 220, 02977 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 02978 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 02979 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 02980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02981 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 02982 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 02983 0, 0, 0, 572, 534, 0, 0, 573, 0, 0, 02984 0, 0, 0, 0, 0, 185, 220, 157, 158, 159, 02985 160, 161, 162, 163, 164, 165, 0, 0, 166, 167, 02986 0, 0, 168, 169, 170, 171, 0, 0, 0, 0, 02987 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 02988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02989 0, 0, 0, 173, 174, 175, 176, 177, 178, 179, 02990 180, 181, 182, 0, 183, 184, 0, 0, 0, 0, 02991 965, 526, 0, 0, 966, 0, 0, 0, 0, 0, 02992 0, 0, 185, 220, 157, 158, 159, 160, 161, 162, 02993 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02994 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02995 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02997 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02998 0, 183, 184, 0, 0, 0, 0, 971, 526, 0, 02999 0, 972, 0, 0, 0, 0, 0, 0, 0, 185, 03000 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 03001 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 03002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03003 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03004 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 03005 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 03006 0, 0, 0, 0, 974, 534, 0, 0, 975, 0, 03007 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 03008 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 03009 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 03010 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 03011 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 03012 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 03013 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 03014 0, 572, 534, 0, 0, 573, 0, 0, 0, 0, 03015 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 03016 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 03017 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 03018 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 03019 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 03020 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 03021 182, 663, 183, 184, 0, 0, 308, 309, 310, 311, 03022 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, 03023 185, 321, 322, 0, 0, 308, 309, 310, 311, 312, 03024 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 03025 321, 322, 0, 0, 0, 0, 0, 0, 323, 0, 03026 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03027 0, 0, 0, 0, 0, 0, 0, 323, 0, 324, 03028 325, 326, 327, 328, 329, 330, 331, 332, 333 03029 }; 03030 03031 #define yypact_value_is_default(Yystate) \ 03032 (!!((Yystate) == (-747))) 03033 03034 #define yytable_value_is_error(Yytable_value) \ 03035 (!!((Yytable_value) == (-574))) 03036 03037 static const yytype_int16 yycheck[] = 03038 { 03039 2, 55, 340, 28, 2, 454, 4, 52, 593, 16, 03040 17, 335, 307, 20, 307, 8, 547, 213, 16, 17, 03041 8, 566, 20, 27, 53, 29, 84, 22, 8, 87, 03042 546, 87, 4, 22, 619, 28, 49, 91, 252, 76, 03043 28, 2, 256, 4, 404, 357, 1, 65, 28, 51, 03044 52, 49, 50, 749, 450, 53, 746, 13, 334, 627, 03045 336, 53, 680, 25, 62, 762, 684, 454, 13, 16, 03046 17, 65, 26, 20, 396, 55, 400, 26, 76, 25, 03047 440, 0, 404, 27, 76, 83, 84, 576, 577, 87, 03048 88, 89, 90, 87, 490, 29, 88, 89, 90, 13, 03049 242, 25, 378, 379, 51, 851, 828, 85, 76, 694, 03050 136, 91, 87, 16, 17, 110, 147, 20, 85, 568, 03051 705, 110, 146, 399, 25, 401, 85, 653, 452, 61, 03052 87, 16, 17, 62, 109, 20, 276, 25, 278, 56, 03053 280, 13, 742, 37, 38, 87, 114, 109, 51, 52, 03054 195, 427, 109, 198, 199, 826, 701, 28, 113, 849, 03055 138, 139, 304, 763, 709, 140, 25, 109, 736, 737, 03056 25, 13, 139, 107, 106, 146, 13, 453, 140, 138, 03057 139, 143, 136, 632, 140, 147, 109, 136, 244, 145, 03058 145, 147, 147, 142, 140, 941, 892, 142, 140, 197, 03059 145, 145, 147, 147, 653, 207, 896, 904, 930, 140, 03060 217, 213, 219, 220, 25, 886, 140, 413, 220, 217, 03061 746, 219, 220, 749, 261, 223, 244, 225, 552, 242, 03062 719, 145, 230, 147, 50, 293, 294, 295, 296, 140, 03063 564, 601, 142, 241, 242, 632, 235, 147, 109, 238, 03064 244, 563, 140, 147, 258, 873, 99, 302, 826, 708, 03065 828, 932, 307, 261, 25, 661, 87, 83, 84, 261, 03066 217, 87, 219, 145, 140, 147, 305, 553, 600, 601, 03067 241, 140, 25, 341, 342, 140, 25, 343, 959, 565, 03068 806, 304, 85, 87, 292, 293, 294, 295, 296, 297, 03069 298, 299, 85, 145, 302, 147, 304, 305, 145, 307, 03070 147, 59, 60, 305, 217, 109, 219, 26, 886, 887, 03071 292, 708, 109, 849, 142, 851, 49, 467, 335, 140, 03072 875, 292, 217, 335, 219, 56, 297, 335, 145, 337, 03073 147, 87, 873, 341, 342, 138, 139, 336, 88, 343, 03074 395, 396, 690, 140, 334, 302, 139, 26, 356, 404, 03075 307, 140, 930, 109, 932, 359, 892, 85, 147, 662, 03076 109, 85, 109, 302, 61, 26, 85, 140, 307, 140, 03077 15, 142, 17, 928, 679, 87, 384, 385, 973, 85, 03078 85, 959, 437, 400, 590, 440, 421, 140, 400, 142, 03079 614, 140, 400, 85, 143, 140, 85, 223, 147, 225, 03080 412, 413, 401, 450, 142, 941, 85, 104, 105, 399, 03081 138, 139, 424, 136, 142, 139, 424, 136, 421, 138, 03082 139, 880, 85, 421, 85, 433, 85, 142, 427, 484, 03083 140, 421, 138, 139, 139, 452, 426, 147, 85, 142, 03084 452, 85, 450, 490, 452, 384, 385, 139, 450, 146, 03085 139, 85, 822, 424, 453, 68, 85, 136, 85, 138, 03086 139, 451, 433, 142, 197, 87, 85, 293, 294, 295, 03087 296, 483, 298, 299, 68, 136, 139, 138, 139, 138, 03088 139, 142, 490, 396, 85, 37, 38, 109, 490, 668, 03089 822, 223, 139, 548, 138, 139, 675, 230, 109, 52, 03090 514, 54, 55, 56, 57, 139, 119, 120, 121, 242, 03091 139, 138, 139, 861, 246, 341, 342, 143, 532, 867, 03092 139, 26, 728, 52, 437, 530, 538, 56, 540, 85, 03093 356, 530, 587, 538, 542, 552, 544, 138, 139, 538, 03094 552, 545, 546, 56, 552, 600, 601, 564, 85, 584, 03095 59, 60, 564, 144, 553, 559, 564, 137, 566, 567, 03096 106, 551, 574, 575, 576, 577, 565, 87, 615, 574, 03097 575, 304, 140, 563, 106, 574, 575, 87, 590, 593, 03098 85, 584, 138, 139, 87, 85, 584, 140, 68, 109, 03099 68, 548, 14, 15, 584, 85, 604, 609, 85, 109, 03100 140, 138, 139, 658, 17, 619, 109, 615, 56, 608, 03101 609, 574, 575, 615, 661, 145, 25, 951, 52, 94, 03102 54, 55, 56, 57, 679, 143, 638, 146, 640, 697, 03103 642, 136, 700, 138, 139, 137, 140, 142, 138, 139, 03104 52, 653, 54, 55, 56, 57, 654, 711, 138, 139, 03105 10, 138, 139, 661, 662, 89, 61, 665, 666, 661, 03106 65, 95, 96, 671, 672, 109, 952, 679, 680, 140, 03107 682, 140, 684, 140, 406, 140, 140, 89, 410, 734, 03108 694, 140, 116, 415, 96, 119, 8, 600, 13, 697, 03109 87, 705, 700, 701, 698, 61, 87, 137, 430, 104, 03110 105, 709, 109, 435, 116, 54, 710, 719, 716, 717, 03111 140, 145, 109, 140, 63, 64, 728, 772, 109, 140, 03112 68, 711, 679, 662, 87, 52, 665, 666, 796, 52, 03113 742, 111, 671, 672, 140, 743, 744, 87, 104, 105, 03114 106, 567, 144, 140, 549, 15, 109, 755, 803, 140, 03115 2, 763, 4, 765, 87, 767, 768, 489, 52, 109, 03116 54, 55, 56, 57, 16, 17, 140, 822, 20, 117, 03117 118, 119, 120, 121, 145, 783, 109, 140, 604, 791, 03118 109, 140, 794, 114, 140, 793, 140, 140, 796, 10, 03119 140, 88, 800, 801, 140, 9, 804, 49, 50, 10, 03120 137, 140, 806, 10, 808, 61, 140, 140, 140, 542, 03121 62, 544, 820, 137, 140, 114, 52, 137, 54, 55, 03122 56, 57, 834, 835, 140, 837, 68, 839, 840, 140, 03123 140, 83, 84, 137, 842, 87, 56, 140, 140, 68, 03124 842, 83, 84, 56, 783, 140, 140, 140, 104, 105, 03125 106, 140, 860, 89, 83, 84, 864, 140, 860, 95, 03126 96, 873, 142, 142, 61, 140, 424, 875, 90, 88, 03127 61, 697, 954, 736, 700, 117, 118, 119, 120, 121, 03128 116, 93, 904, 119, 689, 114, 115, 116, 117, 118, 03129 119, 120, 121, 953, 906, 907, 908, 96, 910, 911, 03130 640, 706, 642, 57, 91, 880, 142, 104, 105, 106, 03131 918, 849, 920, 104, 105, 106, 653, 746, 926, -1, 03132 928, 654, 934, 935, 936, 937, 52, -1, 54, 55, 03133 56, 57, -1, -1, 951, -1, -1, 54, 55, 951, 03134 57, 953, 954, 951, -1, 197, 63, 64, -1, 939, 03135 -1, -1, -1, 952, -1, 967, 968, 969, 970, 973, 03136 950, -1, -1, 89, -1, 217, -1, 219, 220, 981, 03137 796, 223, -1, 225, -1, 707, -1, 989, 230, -1, 03138 -1, -1, -1, 716, 717, 68, -1, -1, -1, 241, 03139 242, -1, 797, -1, 799, -1, -1, 729, -1, -1, 03140 83, 84, -1, -1, 809, -1, -1, -1, 740, 814, 03141 743, 744, 749, -1, 52, 752, 54, 55, 56, 57, 03142 -1, -1, 755, -1, -1, 765, -1, 767, 768, -1, 03143 -1, -1, -1, 116, 117, 118, 119, 120, 121, -1, 03144 292, 293, 294, 295, 296, 297, 298, 299, -1, -1, 03145 302, 89, 304, -1, -1, 307, -1, 95, -1, 52, 03146 793, 54, 55, 56, 57, 870, 871, 800, 801, -1, 03147 -1, 804, 16, 17, -1, -1, 20, -1, -1, -1, 03148 -1, 813, -1, 335, -1, 337, -1, 820, -1, 341, 03149 342, -1, -1, 825, 834, 835, -1, 837, 830, 839, 03150 840, -1, 46, 47, 356, -1, -1, 51, 52, -1, 03151 -1, -1, -1, -1, 851, -1, 853, -1, 62, 63, 03152 -1, 52, 927, 54, 55, 56, 57, -1, -1, -1, 03153 -1, 864, 384, 385, 40, 41, 42, 43, 44, -1, 03154 -1, -1, -1, -1, -1, -1, -1, -1, 400, -1, 03155 955, -1, 957, -1, -1, 892, -1, 894, 89, -1, 03156 -1, 898, -1, -1, 95, -1, 906, 907, 908, -1, 03157 910, 911, 424, 52, -1, 54, 55, 56, 57, -1, 03158 -1, 433, -1, -1, -1, 918, -1, 920, -1, -1, 03159 -1, -1, -1, 926, 934, 935, 936, 937, -1, -1, 03160 452, -1, -1, -1, 941, -1, 943, -1, -1, 946, 03161 89, -1, -1, -1, -1, -1, 95, 96, -1, -1, 03162 -1, -1, -1, -1, 961, -1, -1, 967, 968, 969, 03163 970, -1, -1, -1, -1, -1, -1, 116, -1, -1, 03164 119, 981, -1, -1, -1, -1, 983, -1, -1, 989, 03165 -1, 195, -1, -1, 198, 199, 200, -1, -1, -1, 03166 2, -1, 4, 142, -1, 52, -1, 54, 55, 56, 03167 57, -1, -1, 217, -1, 219, 220, -1, -1, -1, 03168 -1, 2, -1, 4, -1, -1, -1, -1, -1, -1, 03169 542, -1, 544, 52, -1, 54, 55, 56, 57, -1, 03170 552, -1, 89, -1, -1, -1, -1, 49, 95, 96, 03171 -1, 53, 564, -1, 566, 567, -1, -1, -1, -1, 03172 -1, -1, -1, -1, -1, -1, -1, -1, 49, 116, 03173 89, -1, 119, -1, 76, -1, 95, 96, -1, -1, 03174 -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 03175 -1, -1, 604, -1, -1, -1, -1, 116, 302, -1, 03176 119, -1, -1, 307, 308, 309, 310, 311, 312, 313, 03177 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 03178 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03179 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1, 03180 -1, -1, 654, -1, -1, -1, -1, -1, -1, -1, 03181 662, -1, -1, 665, 666, -1, -1, -1, -1, 671, 03182 672, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03183 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03184 384, 385, -1, -1, -1, 697, -1, -1, 700, 701, 03185 394, 395, 396, -1, -1, 197, 400, 709, 402, 403, 03186 404, -1, -1, -1, 716, 717, 112, 113, 114, 115, 03187 116, 117, 118, 119, 120, 121, 197, -1, -1, 423, 03188 -1, -1, -1, -1, 428, -1, -1, -1, 230, -1, 03189 -1, 743, 744, 437, -1, -1, 440, -1, -1, 241, 03190 242, -1, -1, 755, -1, -1, -1, -1, 452, 230, 03191 -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, 03192 241, 242, -1, -1, -1, -1, -1, -1, 472, 473, 03193 -1, 783, -1, -1, -1, -1, -1, -1, -1, -1, 03194 484, 793, -1, -1, 796, -1, -1, -1, 800, 801, 03195 292, -1, 804, -1, -1, 297, -1, -1, -1, -1, 03196 -1, -1, 304, 305, -1, -1, -1, 2, 820, 4, 03197 -1, 292, -1, -1, -1, -1, 297, -1, -1, -1, 03198 -1, -1, -1, 304, -1, -1, -1, -1, -1, -1, 03199 -1, -1, -1, -1, -1, 337, -1, 2, -1, 4, 03200 -1, -1, -1, -1, 548, -1, -1, -1, 552, -1, 03201 -1, -1, 864, -1, 49, 2, 337, 4, 53, -1, 03202 564, -1, -1, 875, -1, -1, -1, -1, -1, -1, 03203 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03204 -1, 76, -1, 587, 49, -1, -1, -1, 53, -1, 03205 -1, -1, -1, 88, 89, 90, 600, 601, -1, -1, 03206 -1, -1, 49, -1, -1, -1, 918, -1, 920, -1, 03207 -1, 76, -1, -1, 926, -1, 928, -1, -1, -1, 03208 -1, -1, 424, 88, 89, 90, 91, -1, -1, -1, 03209 -1, 433, -1, -1, -1, -1, -1, -1, -1, 951, 03210 -1, 88, -1, 424, -1, -1, -1, -1, 450, -1, 03211 -1, -1, 433, -1, 658, -1, -1, -1, 662, 663, 03212 -1, 665, 666, -1, -1, -1, -1, 671, 672, 0, 03213 -1, -1, -1, -1, -1, 679, -1, 8, 9, 10, 03214 -1, -1, 13, 14, 15, -1, 17, -1, 490, -1, 03215 -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, 03216 -1, -1, 197, -1, -1, -1, 37, 38, -1, 40, 03217 41, 42, 43, 44, 718, -1, -1, -1, -1, 723, 03218 724, -1, 726, 727, -1, -1, -1, -1, -1, -1, 03219 734, -1, 197, -1, -1, 230, -1, -1, -1, -1, 03220 542, -1, 544, -1, -1, -1, 241, 242, -1, -1, 03221 197, -1, -1, -1, 85, -1, -1, -1, -1, -1, 03222 -1, 542, -1, 544, 566, 230, 261, -1, 772, -1, 03223 -1, -1, 776, -1, -1, -1, 241, 242, -1, 783, 03224 -1, -1, -1, 230, -1, 566, -1, -1, -1, -1, 03225 -1, -1, -1, -1, 241, 242, 261, 292, -1, 803, 03226 -1, -1, 297, -1, -1, -1, 137, -1, 139, 304, 03227 305, 142, 143, 615, 145, -1, 147, 821, 822, -1, 03228 -1, -1, -1, -1, -1, -1, -1, 292, -1, -1, 03229 -1, -1, 297, -1, -1, -1, -1, -1, -1, 304, 03230 305, -1, 337, -1, -1, 292, -1, -1, -1, -1, 03231 297, -1, 654, -1, -1, -1, -1, 304, -1, 661, 03232 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03233 -1, -1, 337, 654, -1, -1, -1, -1, -1, -1, 03234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03235 337, -1, -1, -1, -1, -1, -1, -1, -1, 701, 03236 -1, -1, -1, -1, -1, -1, -1, 709, -1, -1, 03237 -1, -1, -1, -1, 716, 717, -1, -1, -1, -1, 03238 701, -1, -1, -1, -1, -1, -1, -1, 709, 424, 03239 -1, -1, -1, -1, -1, 716, 717, -1, 433, -1, 03240 -1, 743, 744, -1, -1, -1, -1, 951, -1, -1, 03241 -1, -1, -1, 755, -1, 450, -1, -1, -1, 424, 03242 -1, -1, 743, 744, -1, -1, -1, -1, 433, -1, 03243 -1, -1, -1, -1, 755, -1, -1, 424, -1, -1, 03244 -1, -1, -1, -1, -1, 450, 433, -1, -1, -1, 03245 -1, 793, -1, -1, -1, 490, -1, -1, 800, 801, 03246 -1, -1, 804, -1, -1, -1, -1, -1, -1, -1, 03247 -1, -1, 793, -1, -1, -1, -1, -1, 820, 800, 03248 801, -1, -1, 804, -1, 490, -1, -1, -1, -1, 03249 -1, -1, -1, -1, -1, -1, -1, -1, -1, 820, 03250 842, -1, -1, -1, -1, -1, -1, 542, -1, 544, 03251 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1, 03252 -1, -1, 864, -1, -1, -1, -1, -1, -1, -1, 03253 -1, 566, -1, 875, -1, -1, -1, 542, -1, 544, 03254 -1, -1, -1, 864, -1, -1, -1, -1, -1, -1, 03255 -1, -1, -1, -1, 875, 542, -1, 544, -1, -1, 03256 -1, 566, -1, -1, -1, -1, -1, -1, -1, -1, 03257 -1, -1, -1, -1, -1, -1, 918, -1, 920, 566, 03258 615, -1, -1, -1, 926, -1, 928, -1, -1, -1, 03259 -1, -1, -1, -1, -1, -1, -1, 918, -1, 920, 03260 -1, -1, -1, -1, -1, 926, -1, 928, -1, -1, 03261 615, 646, -1, -1, -1, -1, -1, -1, -1, 654, 03262 -1, -1, -1, -1, -1, -1, 661, -1, -1, -1, 03263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03264 -1, -1, 68, 69, 70, 71, 72, 73, 74, 654, 03265 -1, 77, 78, -1, -1, -1, 661, 83, 84, -1, 03266 -1, -1, -1, -1, -1, -1, 701, 654, -1, -1, 03267 -1, -1, -1, -1, 709, 662, -1, -1, -1, -1, 03268 -1, 716, 717, -1, -1, -1, 112, 113, 114, 115, 03269 116, 117, 118, 119, 120, 121, 701, -1, -1, -1, 03270 -1, -1, -1, -1, 709, -1, -1, -1, 743, 744, 03271 -1, 716, 717, -1, 701, -1, -1, -1, -1, -1, 03272 755, -1, 709, -1, -1, -1, -1, -1, -1, 716, 03273 717, 68, 69, 70, 71, 72, 73, 74, 743, 744, 03274 77, 78, -1, -1, -1, -1, 83, 84, -1, -1, 03275 755, -1, -1, -1, -1, -1, 743, 744, 793, -1, 03276 -1, -1, -1, -1, -1, 800, 801, -1, 755, 804, 03277 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 03278 117, 118, 119, 120, 121, 820, -1, -1, 793, -1, 03279 -1, -1, -1, -1, -1, 800, 801, -1, -1, 804, 03280 -1, -1, -1, -1, -1, -1, 793, 842, -1, -1, 03281 -1, -1, -1, 800, 801, 820, -1, 804, -1, -1, 03282 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03283 -1, -1, -1, 820, -1, -1, -1, 842, -1, -1, 03284 875, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03285 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03287 875, -1, -1, 860, -1, -1, -1, 864, -1, -1, 03288 -1, -1, -1, 918, -1, 920, -1, -1, 875, -1, 03289 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03291 -1, -1, -1, 918, -1, 920, -1, -1, -1, -1, 03292 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03293 -1, 918, -1, 920, -1, -1, -1, -1, -1, 926, 03294 -1, 928, 0, 1, -1, 3, 4, 5, 6, 7, 03295 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1, 03296 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03297 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03298 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03299 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03300 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03302 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03303 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03304 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03306 -1, -1, -1, 0, 122, 123, 124, -1, -1, -1, 03307 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03308 17, -1, -1, -1, -1, -1, -1, 145, -1, 147, 03309 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03310 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03311 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03312 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03313 84, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03314 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03315 87, 88, -1, -1, -1, -1, 110, 94, 112, 113, 03316 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03317 107, -1, 109, 110, 111, 112, 113, 114, 115, 116, 03318 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, 03319 -1, -1, -1, 147, -1, -1, -1, -1, -1, -1, 03320 137, 138, 139, 140, 0, -1, 143, 144, 145, -1, 03321 147, -1, 8, 9, 10, -1, -1, 13, 14, 15, 03322 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 03323 26, 27, 28, -1, -1, -1, -1, -1, -1, -1, 03324 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03325 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03326 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03327 83, 84, 68, 69, 70, 71, 72, 73, 74, 75, 03328 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03329 -1, -1, 88, -1, -1, -1, -1, 110, 94, 112, 03330 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03331 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 03332 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03333 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03334 136, 137, 138, 139, 140, 0, 142, 143, 144, 145, 03335 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14, 03336 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03337 -1, -1, 27, 28, 29, -1, -1, -1, -1, -1, 03338 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03339 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03340 72, 73, 74, 75, -1, 77, 78, -1, -1, -1, 03341 -1, 83, 84, 68, 69, 70, 71, 72, 73, 74, 03342 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03343 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03344 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03345 -1, -1, 107, -1, -1, 110, 111, 112, 113, 114, 03346 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, 03347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03348 -1, -1, 137, 138, 139, 140, 0, -1, 143, 144, 03349 145, -1, 147, -1, 8, 9, 10, -1, -1, 13, 03350 14, 15, -1, 17, -1, -1, -1, -1, -1, -1, 03351 -1, -1, 26, 27, 28, -1, -1, -1, -1, -1, 03352 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 03353 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03355 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03356 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03357 84, 85, -1, -1, 88, -1, -1, -1, -1, -1, 03358 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03359 -1, -1, -1, -1, -1, -1, 110, -1, 112, 113, 03360 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03362 -1, -1, 136, 137, 138, 139, 140, 0, 142, 143, 03363 144, 145, -1, 147, -1, 8, 9, 10, -1, -1, 03364 13, 14, 15, -1, 17, -1, -1, -1, -1, -1, 03365 -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, 03366 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, 03367 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, 03368 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03369 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03370 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03371 83, 84, 85, -1, -1, 88, -1, -1, -1, -1, 03372 -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, 03373 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 03374 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03375 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03376 -1, -1, -1, -1, 137, 138, 139, 140, 0, 142, 03377 143, 144, 145, -1, 147, -1, 8, 9, 10, -1, 03378 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1, 03379 -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, 03380 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03381 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03383 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03384 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03385 -1, 83, 84, 85, 0, 87, -1, -1, -1, -1, 03386 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15, 03387 -1, 17, -1, -1, -1, -1, -1, 109, 110, -1, 03388 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03389 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03390 -1, -1, -1, -1, 136, 137, 138, 139, 140, -1, 03391 -1, 143, -1, 145, -1, 147, -1, -1, -1, -1, 03392 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03393 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03394 -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, 03395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03396 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115, 03397 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03399 -1, 137, 138, 139, 140, -1, -1, 143, -1, 145, 03400 1, 147, 3, 4, 5, 6, 7, 8, 9, 10, 03401 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03402 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03403 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03404 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03405 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03406 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03407 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03408 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03409 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03410 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03412 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03414 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03415 6, 7, -1, -1, 10, 11, 12, -1, 14, 15, 03416 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03417 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03418 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03419 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03420 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03421 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03422 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03423 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03424 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03426 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03428 -1, -1, -1, -1, -1, -1, -1, -1, -1, 145, 03429 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03430 11, 12, -1, -1, 15, 16, 17, 18, 19, 20, 03431 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03432 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03433 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03434 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03435 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03436 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03437 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03438 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03439 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03441 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03442 1, -1, 3, 4, 5, 6, 7, -1, -1, -1, 03443 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03444 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03445 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03446 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03447 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03448 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03450 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03451 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03452 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03453 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03454 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03455 -1, -1, -1, -1, -1, -1, 137, -1, -1, -1, 03456 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03457 6, 7, -1, -1, 10, 11, 12, -1, -1, 15, 03458 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03459 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03460 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03461 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03462 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03463 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03465 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03466 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03468 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03469 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03470 6, 7, -1, 9, 10, 11, 12, -1, -1, 145, 03471 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03472 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03473 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03474 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03475 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03476 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03477 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03478 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03479 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03480 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03481 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03482 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03483 6, 7, -1, -1, -1, 11, 12, -1, -1, 145, 03484 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03485 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03486 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03487 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03488 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03489 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03491 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03492 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03494 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03495 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03496 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03497 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03498 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03499 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03500 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03501 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03502 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03503 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03504 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03505 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03506 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03507 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03508 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03509 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03510 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03511 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03512 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03513 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03514 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03515 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03517 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03518 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03519 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03520 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03522 -1, 137, -1, -1, -1, -1, -1, -1, -1, 145, 03523 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03524 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, 03525 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03526 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03527 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03528 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03529 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03530 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03531 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03532 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03533 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03534 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03535 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03536 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03537 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03538 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03539 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03540 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03541 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03542 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03544 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03545 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03546 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03547 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03548 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03549 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03550 32, 33, 34, 35, 36, -1, 147, 39, -1, -1, 03551 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03552 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03553 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03554 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03555 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03556 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03557 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03558 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03559 122, 123, 124, -1, -1, -1, -1, -1, -1, -1, 03560 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03561 12, -1, -1, 145, 16, 147, 18, 19, 20, 21, 03562 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03563 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03564 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03565 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03566 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03568 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03569 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03570 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03571 3, 4, 5, 6, 7, -1, -1, -1, 11, 12, 03572 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03573 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03574 33, 34, 35, 36, -1, 147, 39, -1, -1, -1, 03575 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03576 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03577 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03578 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03579 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03580 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03581 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03582 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03583 123, 124, -1, -1, -1, -1, -1, -1, 3, 4, 03584 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, 03585 -1, 16, 145, 18, 19, 20, 21, 22, 23, 24, 03586 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03587 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03588 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, 03589 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03590 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03591 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03592 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03593 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03594 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03595 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03598 145, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03599 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03600 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03601 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03602 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03603 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, 03604 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03605 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03606 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03607 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 03608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03609 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03610 -1, 123, 124, -1, -1, -1, -1, -1, 3, 4, 03611 5, -1, 7, -1, -1, -1, 11, 12, -1, 141, 03612 142, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03613 -1, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03614 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03615 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03616 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03617 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03619 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03620 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, 03621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03622 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03623 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03624 -1, 136, -1, 11, 12, -1, -1, 142, 16, -1, 03625 18, 19, 20, 21, 22, 23, 24, -1, 26, -1, 03626 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03627 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03628 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03629 58, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03630 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03631 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03632 -1, 89, 90, -1, 92, 93, -1, 95, 96, 97, 03633 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03634 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03635 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03636 -1, -1, 3, 4, 5, -1, 7, -1, 136, -1, 03637 11, 12, -1, -1, 142, 16, -1, 18, 19, 20, 03638 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03639 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03640 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03641 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03642 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03643 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03644 -1, -1, -1, -1, -1, 86, 87, -1, 89, 90, 03645 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03646 101, 102, 103, -1, -1, -1, -1, -1, 109, -1, 03647 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03648 7, 122, 123, 124, 11, 12, -1, -1, -1, 16, 03649 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03650 -1, 142, -1, 30, 31, 32, 33, 34, 35, 36, 03651 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03652 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03653 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03654 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03655 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03656 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96, 03657 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03659 3, 4, 5, -1, 7, 122, 123, 124, 11, 12, 03660 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, 03661 23, 24, -1, -1, -1, 142, -1, 30, 31, 32, 03662 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03663 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03664 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03665 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03667 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03668 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03669 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03670 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03671 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03672 -1, -1, -1, -1, -1, -1, -1, -1, -1, 142, 03673 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 03674 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 03675 23, 24, 25, 26, -1, -1, -1, 30, 31, 32, 03676 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, 03677 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03678 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, 03679 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 03680 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 03681 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 03682 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 03683 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 03684 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03685 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03686 -1, -1, -1, -1, -1, -1, -1, -1, 141, 3, 03687 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 03688 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 03689 24, 25, 26, -1, -1, -1, 30, 31, 32, 33, 03690 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, 03691 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03692 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03693 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 03694 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03695 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03696 -1, 95, -1, -1, 98, -1, -1, -1, -1, -1, 03697 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 03698 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03699 124, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03700 -1, -1, -1, -1, -1, -1, -1, 141, 3, 4, 03701 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03702 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03703 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03704 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03705 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 03706 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03707 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03708 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03710 95, -1, -1, 98, -1, -1, -1, -1, -1, -1, 03711 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03712 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03714 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5, 03715 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 03716 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 03717 26, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03718 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 03719 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, 03720 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03721 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 03722 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 03723 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 03724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03725 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 03726 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 03727 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03728 12, -1, -1, -1, 16, 141, 18, 19, 20, 21, 03729 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03730 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03731 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03732 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03733 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 03734 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03735 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03736 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03737 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03738 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03739 122, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03740 20, 21, 22, 23, 24, -1, -1, -1, 140, -1, 03741 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03742 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03743 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03744 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 03745 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03746 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03747 90, -1, 92, 93, -1, -1, -1, 97, 98, 99, 03748 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03749 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 03750 -1, -1, 122, 11, 12, -1, -1, -1, 16, -1, 03751 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03752 140, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03753 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03754 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03755 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03756 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03757 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03758 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03759 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03760 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 03761 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03762 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03763 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03764 39, -1, -1, -1, -1, -1, 45, 46, -1, 48, 03765 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03766 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03767 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03768 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03769 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03770 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03771 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03772 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03773 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03774 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03775 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03776 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03777 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03778 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03779 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03780 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, 03781 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03782 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03783 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03784 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03785 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03786 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03787 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03788 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03790 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03791 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03792 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03793 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03794 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03795 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03796 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03797 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03798 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 03799 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03801 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03802 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, 03803 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03804 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03805 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03806 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03807 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03808 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03809 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03810 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03811 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03812 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03813 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 03814 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03815 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03816 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03817 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03818 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03819 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03820 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03821 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03822 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03823 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03824 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03825 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03826 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, 03827 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03828 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03829 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03830 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03831 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03832 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03834 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03835 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03836 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03837 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, 03838 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03839 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03840 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03841 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03842 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03843 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03845 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03846 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03847 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03848 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, 03849 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03850 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03851 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03852 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03853 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03854 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03855 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03856 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03857 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03858 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03859 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, 03860 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03861 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03862 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03863 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03864 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03866 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03867 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03868 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03869 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03870 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03871 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03872 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03873 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03874 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03875 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03877 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03878 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03879 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03880 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03881 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03882 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03883 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03884 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03885 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03886 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03887 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03888 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03889 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, 03890 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03891 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03892 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03893 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03894 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03895 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03896 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03897 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03898 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03899 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03900 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, 03901 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03902 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03903 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03904 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03905 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03906 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03907 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03908 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03910 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03911 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03912 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03913 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03914 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03915 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03916 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03917 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03918 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03919 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03920 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03921 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03922 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, 03923 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03924 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03925 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03926 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03927 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03928 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03929 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03930 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03931 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03932 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03933 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03934 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03935 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 03936 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03937 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03938 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03939 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03940 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 03941 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03942 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03943 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03944 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 03945 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03946 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 03947 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03948 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03949 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03950 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03951 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03952 -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, 03953 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03954 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03955 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03956 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 03957 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03958 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03959 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03960 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03961 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 03962 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03963 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03964 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 03965 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 03966 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03967 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 03968 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03969 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03970 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03971 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03972 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03973 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03974 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03975 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03976 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03977 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 03978 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03979 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03980 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03981 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03982 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 03983 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03984 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03985 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 03986 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 03987 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03988 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 03989 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03990 34, 35, 36, -1, -1, 39, -1, 44, -1, -1, 03991 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03992 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03993 64, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03994 77, 78, 79, 80, -1, -1, 83, 84, -1, -1, 03995 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03996 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03997 -1, -1, -1, 110, -1, 112, 113, 114, 115, 116, 03998 117, 118, 119, 120, 121, -1, -1, -1, 122, -1, 03999 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04000 -1, -1, -1, 140, 66, 67, 68, 69, 70, 71, 04001 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04002 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04003 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04004 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04005 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04006 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04007 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04008 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04009 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04010 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04011 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04012 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04013 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04014 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04015 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04016 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04017 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04018 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04019 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04020 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04021 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04022 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04023 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04024 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04025 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04026 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04028 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04029 121, -1, 123, 124, -1, -1, -1, -1, 52, 53, 04030 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, 04031 141, 142, 66, 67, 68, 69, 70, 71, 72, 73, 04032 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04033 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04034 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 04035 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 04036 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 04037 124, -1, -1, -1, -1, 52, 53, -1, -1, 56, 04038 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66, 04039 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04040 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04041 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, 04042 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04043 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 04044 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, 04045 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, 04046 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69, 04047 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04048 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04049 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1, 04050 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04051 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 04052 120, 121, -1, 123, 124, -1, -1, -1, -1, 52, 04053 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, 04054 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72, 04055 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04056 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04057 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 04058 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 04059 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 04060 123, 124, -1, -1, -1, -1, 52, 53, -1, -1, 04061 56, -1, -1, -1, -1, -1, -1, -1, 141, 142, 04062 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04063 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04064 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04065 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04066 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 04067 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 04068 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, 04069 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68, 04070 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04071 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04072 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, 04073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04074 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 04075 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, 04076 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04077 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71, 04078 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04079 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04080 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04081 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04082 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04083 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04084 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04085 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04086 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04087 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04088 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04089 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04090 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04091 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04092 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04093 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04094 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04095 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04097 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04098 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04099 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04100 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04101 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04102 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04103 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04104 -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, 04105 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04106 121, 44, 123, 124, -1, -1, 68, 69, 70, 71, 04107 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 04108 141, 83, 84, -1, -1, 68, 69, 70, 71, 72, 04109 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 04110 83, 84, -1, -1, -1, -1, -1, -1, 110, -1, 04111 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04112 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 04113 113, 114, 115, 116, 117, 118, 119, 120, 121 04114 }; 04115 04116 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04117 symbol of state STATE-NUM. */ 04118 static const yytype_uint16 yystos[] = 04119 { 04120 0, 149, 150, 0, 1, 3, 4, 5, 6, 7, 04121 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04122 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04123 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04124 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04125 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, 04126 103, 122, 123, 124, 151, 152, 153, 158, 160, 161, 04127 163, 164, 167, 168, 170, 171, 172, 174, 175, 185, 04128 199, 216, 217, 218, 219, 220, 221, 222, 223, 224, 04129 225, 226, 249, 250, 260, 261, 262, 263, 264, 265, 04130 266, 269, 279, 281, 282, 283, 284, 285, 286, 287, 04131 310, 321, 153, 3, 4, 5, 6, 7, 8, 9, 04132 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 04133 20, 21, 22, 23, 24, 25, 26, 30, 31, 32, 04134 33, 34, 35, 36, 37, 38, 39, 45, 46, 47, 04135 48, 49, 50, 51, 52, 53, 56, 66, 67, 68, 04136 69, 70, 71, 72, 73, 74, 77, 78, 81, 82, 04137 83, 84, 95, 112, 113, 114, 115, 116, 117, 118, 04138 119, 120, 121, 123, 124, 141, 178, 179, 180, 181, 04139 183, 184, 279, 281, 39, 58, 86, 89, 95, 96, 04140 123, 167, 175, 185, 187, 192, 195, 197, 216, 283, 04141 284, 286, 287, 308, 309, 192, 192, 142, 193, 194, 04142 142, 189, 193, 142, 147, 315, 54, 180, 315, 154, 04143 136, 21, 22, 30, 31, 32, 185, 216, 310, 185, 04144 56, 1, 89, 156, 157, 158, 169, 170, 321, 161, 04145 188, 197, 308, 321, 187, 307, 308, 321, 46, 86, 04146 122, 140, 174, 199, 216, 283, 284, 287, 242, 243, 04147 54, 55, 57, 178, 272, 280, 271, 272, 273, 146, 04148 267, 146, 270, 59, 60, 163, 185, 185, 145, 147, 04149 314, 319, 320, 40, 41, 42, 43, 44, 37, 38, 04150 28, 247, 109, 140, 89, 95, 171, 109, 68, 69, 04151 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 04152 80, 83, 84, 110, 112, 113, 114, 115, 116, 117, 04153 118, 119, 120, 121, 85, 138, 139, 200, 161, 162, 04154 162, 203, 205, 162, 314, 320, 86, 168, 175, 216, 04155 232, 283, 284, 287, 52, 56, 83, 86, 176, 177, 04156 216, 283, 284, 287, 177, 33, 34, 35, 36, 49, 04157 50, 51, 52, 56, 142, 178, 285, 305, 85, 139, 04158 26, 136, 251, 263, 87, 87, 189, 193, 251, 140, 04159 187, 56, 187, 187, 109, 88, 140, 196, 321, 85, 04160 138, 139, 87, 87, 140, 196, 192, 315, 316, 192, 04161 191, 192, 197, 308, 321, 161, 316, 161, 54, 63, 04162 64, 159, 142, 186, 136, 156, 85, 139, 87, 158, 04163 169, 143, 314, 320, 316, 201, 144, 140, 147, 318, 04164 140, 318, 137, 318, 315, 56, 59, 60, 171, 173, 04165 140, 85, 138, 139, 244, 61, 104, 105, 106, 274, 04166 106, 274, 106, 65, 274, 106, 106, 268, 274, 106, 04167 61, 106, 68, 68, 145, 153, 162, 162, 162, 162, 04168 158, 161, 161, 248, 95, 163, 187, 197, 198, 169, 04169 140, 174, 140, 160, 163, 175, 185, 187, 198, 185, 04170 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04171 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04172 185, 185, 185, 185, 185, 52, 53, 56, 183, 189, 04173 311, 312, 191, 52, 53, 56, 183, 189, 311, 155, 04174 156, 13, 228, 319, 228, 162, 162, 314, 17, 254, 04175 56, 85, 138, 139, 25, 161, 52, 56, 176, 1, 04176 113, 288, 319, 85, 138, 139, 212, 306, 213, 85, 04177 139, 313, 52, 56, 311, 311, 253, 252, 163, 185, 04178 163, 185, 94, 165, 182, 185, 187, 95, 187, 195, 04179 308, 52, 56, 191, 52, 56, 309, 316, 143, 316, 04180 140, 140, 316, 180, 202, 185, 151, 137, 311, 311, 04181 185, 316, 158, 316, 308, 140, 173, 52, 56, 191, 04182 52, 56, 52, 54, 55, 56, 57, 89, 95, 96, 04183 116, 119, 142, 245, 291, 292, 293, 294, 295, 296, 04184 299, 300, 301, 302, 303, 276, 275, 146, 274, 146, 04185 185, 185, 76, 114, 237, 238, 321, 187, 140, 316, 04186 173, 140, 109, 44, 315, 87, 87, 189, 193, 315, 04187 317, 87, 87, 189, 190, 193, 321, 10, 227, 8, 04188 256, 321, 156, 13, 156, 27, 229, 319, 229, 254, 04189 197, 227, 52, 56, 191, 52, 56, 207, 210, 319, 04190 289, 209, 52, 56, 176, 191, 155, 161, 142, 290, 04191 291, 214, 190, 193, 190, 193, 237, 237, 44, 166, 04192 180, 187, 196, 87, 87, 317, 87, 87, 308, 161, 04193 137, 318, 171, 317, 109, 52, 89, 95, 233, 234, 04194 235, 293, 291, 29, 107, 246, 140, 304, 321, 140, 04195 304, 52, 140, 304, 52, 277, 54, 55, 57, 278, 04196 287, 52, 145, 236, 239, 295, 297, 298, 301, 303, 04197 321, 156, 95, 187, 173, 185, 111, 163, 185, 163, 04198 185, 165, 144, 87, 163, 185, 163, 185, 165, 187, 04199 198, 257, 321, 15, 231, 321, 14, 230, 231, 231, 04200 204, 206, 227, 140, 228, 317, 162, 319, 162, 155, 04201 317, 227, 316, 291, 155, 319, 178, 156, 156, 185, 04202 237, 87, 140, 316, 187, 235, 140, 293, 140, 316, 04203 239, 156, 156, 294, 299, 301, 303, 295, 296, 301, 04204 295, 156, 109, 52, 240, 241, 292, 239, 114, 140, 04205 304, 140, 304, 140, 304, 10, 187, 185, 163, 185, 04206 88, 258, 321, 156, 9, 259, 321, 162, 227, 227, 04207 156, 156, 187, 156, 229, 211, 319, 227, 316, 227, 04208 215, 10, 137, 156, 316, 234, 140, 95, 233, 316, 04209 10, 137, 140, 304, 140, 304, 140, 304, 140, 304, 04210 304, 137, 86, 216, 140, 114, 298, 301, 295, 297, 04211 301, 295, 86, 175, 216, 283, 284, 287, 228, 156, 04212 228, 227, 227, 231, 254, 255, 208, 155, 290, 137, 04213 140, 234, 140, 293, 295, 301, 295, 295, 56, 85, 04214 241, 140, 304, 140, 304, 304, 140, 304, 304, 56, 04215 85, 138, 139, 156, 156, 156, 227, 155, 234, 140, 04216 304, 140, 304, 304, 304, 52, 56, 295, 301, 295, 04217 295, 52, 56, 191, 52, 56, 256, 230, 227, 227, 04218 234, 295, 304, 140, 304, 304, 304, 317, 304, 295, 04219 304 04220 }; 04221 04222 #define yyerrok (yyerrstatus = 0) 04223 #define yyclearin (yychar = YYEMPTY) 04224 #define YYEMPTY (-2) 04225 #define YYEOF 0 04226 04227 #define YYACCEPT goto yyacceptlab 04228 #define YYABORT goto yyabortlab 04229 #define YYERROR goto yyerrorlab 04230 04231 04232 /* Like YYERROR except do call yyerror. This remains here temporarily 04233 to ease the transition to the new meaning of YYERROR, for GCC. 04234 Once GCC version 2 has supplanted version 1, this can go. However, 04235 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 04236 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 04237 discussed. */ 04238 04239 #define YYFAIL goto yyerrlab 04240 #if defined YYFAIL 04241 /* This is here to suppress warnings from the GCC cpp's 04242 -Wunused-macros. Normally we don't worry about that warning, but 04243 some users do, and we want to make it easy for users to remove 04244 YYFAIL uses, which will produce warnings from Bison 2.5. */ 04245 #endif 04246 04247 #define YYRECOVERING() (!!yyerrstatus) 04248 04249 #define YYBACKUP(Token, Value) \ 04250 do \ 04251 if (yychar == YYEMPTY) \ 04252 { \ 04253 yychar = (Token); \ 04254 yylval = (Value); \ 04255 YYPOPSTACK (yylen); \ 04256 yystate = *yyssp; \ 04257 goto yybackup; \ 04258 } \ 04259 else \ 04260 { \ 04261 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04262 YYERROR; \ 04263 } \ 04264 while (YYID (0)) 04265 04266 /* Error token number */ 04267 #define YYTERROR 1 04268 #define YYERRCODE 256 04269 04270 04271 /* This macro is provided for backward compatibility. */ 04272 #ifndef YY_LOCATION_PRINT 04273 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04274 #endif 04275 04276 04277 /* YYLEX -- calling `yylex' with the right arguments. */ 04278 #ifdef YYLEX_PARAM 04279 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04280 #else 04281 # define YYLEX yylex (&yylval, parser) 04282 #endif 04283 04284 /* Enable debugging if requested. */ 04285 #if YYDEBUG 04286 04287 # ifndef YYFPRINTF 04288 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04289 # define YYFPRINTF fprintf 04290 # endif 04291 04292 # define YYDPRINTF(Args) \ 04293 do { \ 04294 if (yydebug) \ 04295 YYFPRINTF Args; \ 04296 } while (YYID (0)) 04297 04298 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04299 do { \ 04300 if (yydebug) \ 04301 { \ 04302 YYFPRINTF (stderr, "%s ", Title); \ 04303 yy_symbol_print (stderr, \ 04304 Type, Value, parser); \ 04305 YYFPRINTF (stderr, "\n"); \ 04306 } \ 04307 } while (YYID (0)) 04308 04309 04310 /*--------------------------------. 04311 | Print this symbol on YYOUTPUT. | 04312 `--------------------------------*/ 04313 04314 /*ARGSUSED*/ 04315 #if (defined __STDC__ || defined __C99__FUNC__ \ 04316 || defined __cplusplus || defined _MSC_VER) 04317 static void 04318 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04319 #else 04320 static void 04321 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04322 FILE *yyoutput; 04323 int yytype; 04324 YYSTYPE const * const yyvaluep; 04325 struct parser_params *parser; 04326 #endif 04327 { 04328 FILE *yyo = yyoutput; 04329 YYUSE (yyo); 04330 if (!yyvaluep) 04331 return; 04332 YYUSE (parser); 04333 # ifdef YYPRINT 04334 if (yytype < YYNTOKENS) 04335 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04336 # else 04337 YYUSE (yyoutput); 04338 # endif 04339 YYUSE (yytype); 04340 } 04341 04342 04343 /*--------------------------------. 04344 | Print this symbol on YYOUTPUT. | 04345 `--------------------------------*/ 04346 04347 #if (defined __STDC__ || defined __C99__FUNC__ \ 04348 || defined __cplusplus || defined _MSC_VER) 04349 static void 04350 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04351 #else 04352 static void 04353 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04354 FILE *yyoutput; 04355 int yytype; 04356 YYSTYPE const * const yyvaluep; 04357 struct parser_params *parser; 04358 #endif 04359 { 04360 if (yytype < YYNTOKENS) 04361 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04362 else 04363 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04364 04365 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04366 YYFPRINTF (yyoutput, ")"); 04367 } 04368 04369 /*------------------------------------------------------------------. 04370 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04371 | TOP (included). | 04372 `------------------------------------------------------------------*/ 04373 04374 #if (defined __STDC__ || defined __C99__FUNC__ \ 04375 || defined __cplusplus || defined _MSC_VER) 04376 static void 04377 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 04378 #else 04379 static void 04380 yy_stack_print (yybottom, yytop) 04381 yytype_int16 *yybottom; 04382 yytype_int16 *yytop; 04383 #endif 04384 { 04385 YYFPRINTF (stderr, "Stack now"); 04386 for (; yybottom <= yytop; yybottom++) 04387 { 04388 int yybot = *yybottom; 04389 YYFPRINTF (stderr, " %d", yybot); 04390 } 04391 YYFPRINTF (stderr, "\n"); 04392 } 04393 04394 # define YY_STACK_PRINT(Bottom, Top) \ 04395 do { \ 04396 if (yydebug) \ 04397 yy_stack_print ((Bottom), (Top)); \ 04398 } while (YYID (0)) 04399 04400 04401 /*------------------------------------------------. 04402 | Report that the YYRULE is going to be reduced. | 04403 `------------------------------------------------*/ 04404 04405 #if (defined __STDC__ || defined __C99__FUNC__ \ 04406 || defined __cplusplus || defined _MSC_VER) 04407 static void 04408 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04409 #else 04410 static void 04411 yy_reduce_print (yyvsp, yyrule, parser) 04412 YYSTYPE *yyvsp; 04413 int yyrule; 04414 struct parser_params *parser; 04415 #endif 04416 { 04417 int yynrhs = yyr2[yyrule]; 04418 int yyi; 04419 unsigned long int yylno = yyrline[yyrule]; 04420 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04421 yyrule - 1, yylno); 04422 /* The symbols being reduced. */ 04423 for (yyi = 0; yyi < yynrhs; yyi++) 04424 { 04425 YYFPRINTF (stderr, " $%d = ", yyi + 1); 04426 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04427 &(yyvsp[(yyi + 1) - (yynrhs)]) 04428 , parser); 04429 YYFPRINTF (stderr, "\n"); 04430 } 04431 } 04432 04433 # define YY_REDUCE_PRINT(Rule) \ 04434 do { \ 04435 if (yydebug) \ 04436 yy_reduce_print (yyvsp, Rule, parser); \ 04437 } while (YYID (0)) 04438 04439 /* Nonzero means print parse trace. It is left uninitialized so that 04440 multiple parsers can coexist. */ 04441 #ifndef yydebug 04442 int yydebug; 04443 #endif 04444 #else /* !YYDEBUG */ 04445 # define YYDPRINTF(Args) 04446 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04447 # define YY_STACK_PRINT(Bottom, Top) 04448 # define YY_REDUCE_PRINT(Rule) 04449 #endif /* !YYDEBUG */ 04450 04451 04452 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04453 #ifndef YYINITDEPTH 04454 # define YYINITDEPTH 200 04455 #endif 04456 04457 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04458 if the built-in stack extension method is used). 04459 04460 Do not make this value too large; the results are undefined if 04461 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04462 evaluated with infinite-precision integer arithmetic. */ 04463 04464 #ifndef YYMAXDEPTH 04465 # define YYMAXDEPTH 10000 04466 #endif 04467 04468 04469 #if YYERROR_VERBOSE 04470 04471 # ifndef yystrlen 04472 # if defined __GLIBC__ && defined _STRING_H 04473 # define yystrlen strlen 04474 # else 04475 /* Return the length of YYSTR. */ 04476 #if (defined __STDC__ || defined __C99__FUNC__ \ 04477 || defined __cplusplus || defined _MSC_VER) 04478 static YYSIZE_T 04479 yystrlen (const char *yystr) 04480 #else 04481 static YYSIZE_T 04482 yystrlen (yystr) 04483 const char *yystr; 04484 #endif 04485 { 04486 YYSIZE_T yylen; 04487 for (yylen = 0; yystr[yylen]; yylen++) 04488 continue; 04489 return yylen; 04490 } 04491 # endif 04492 # endif 04493 04494 # ifndef yystpcpy 04495 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04496 # define yystpcpy stpcpy 04497 # else 04498 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04499 YYDEST. */ 04500 #if (defined __STDC__ || defined __C99__FUNC__ \ 04501 || defined __cplusplus || defined _MSC_VER) 04502 static char * 04503 yystpcpy (char *yydest, const char *yysrc) 04504 #else 04505 static char * 04506 yystpcpy (yydest, yysrc) 04507 char *yydest; 04508 const char *yysrc; 04509 #endif 04510 { 04511 char *yyd = yydest; 04512 const char *yys = yysrc; 04513 04514 while ((*yyd++ = *yys++) != '\0') 04515 continue; 04516 04517 return yyd - 1; 04518 } 04519 # endif 04520 # endif 04521 04522 # ifndef yytnamerr 04523 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04524 quotes and backslashes, so that it's suitable for yyerror. The 04525 heuristic is that double-quoting is unnecessary unless the string 04526 contains an apostrophe, a comma, or backslash (other than 04527 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04528 null, do not copy; instead, return the length of what the result 04529 would have been. */ 04530 static YYSIZE_T 04531 yytnamerr (char *yyres, const char *yystr) 04532 { 04533 if (*yystr == '"') 04534 { 04535 YYSIZE_T yyn = 0; 04536 char const *yyp = yystr; 04537 04538 for (;;) 04539 switch (*++yyp) 04540 { 04541 case '\'': 04542 case ',': 04543 goto do_not_strip_quotes; 04544 04545 case '\\': 04546 if (*++yyp != '\\') 04547 goto do_not_strip_quotes; 04548 /* Fall through. */ 04549 default: 04550 if (yyres) 04551 yyres[yyn] = *yyp; 04552 yyn++; 04553 break; 04554 04555 case '"': 04556 if (yyres) 04557 yyres[yyn] = '\0'; 04558 return yyn; 04559 } 04560 do_not_strip_quotes: ; 04561 } 04562 04563 if (! yyres) 04564 return yystrlen (yystr); 04565 04566 return yystpcpy (yyres, yystr) - yyres; 04567 } 04568 # endif 04569 04570 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 04571 about the unexpected token YYTOKEN for the state stack whose top is 04572 YYSSP. 04573 04574 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 04575 not large enough to hold the message. In that case, also set 04576 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 04577 required number of bytes is too large to store. */ 04578 static int 04579 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 04580 yytype_int16 *yyssp, int yytoken) 04581 { 04582 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 04583 YYSIZE_T yysize = yysize0; 04584 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04585 /* Internationalized format string. */ 04586 const char *yyformat = YY_NULL; 04587 /* Arguments of yyformat. */ 04588 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04589 /* Number of reported tokens (one for the "unexpected", one per 04590 "expected"). */ 04591 int yycount = 0; 04592 04593 /* There are many possibilities here to consider: 04594 - Assume YYFAIL is not used. It's too flawed to consider. See 04595 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 04596 for details. YYERROR is fine as it does not invoke this 04597 function. 04598 - If this state is a consistent state with a default action, then 04599 the only way this function was invoked is if the default action 04600 is an error action. In that case, don't check for expected 04601 tokens because there are none. 04602 - The only way there can be no lookahead present (in yychar) is if 04603 this state is a consistent state with a default action. Thus, 04604 detecting the absence of a lookahead is sufficient to determine 04605 that there is no unexpected or expected token to report. In that 04606 case, just report a simple "syntax error". 04607 - Don't assume there isn't a lookahead just because this state is a 04608 consistent state with a default action. There might have been a 04609 previous inconsistent state, consistent state with a non-default 04610 action, or user semantic action that manipulated yychar. 04611 - Of course, the expected token list depends on states to have 04612 correct lookahead information, and it depends on the parser not 04613 to perform extra reductions after fetching a lookahead from the 04614 scanner and before detecting a syntax error. Thus, state merging 04615 (from LALR or IELR) and default reductions corrupt the expected 04616 token list. However, the list is correct for canonical LR with 04617 one exception: it will still contain any token that will not be 04618 accepted due to an error action in a later state. 04619 */ 04620 if (yytoken != YYEMPTY) 04621 { 04622 int yyn = yypact[*yyssp]; 04623 yyarg[yycount++] = yytname[yytoken]; 04624 if (!yypact_value_is_default (yyn)) 04625 { 04626 /* Start YYX at -YYN if negative to avoid negative indexes in 04627 YYCHECK. In other words, skip the first -YYN actions for 04628 this state because they are default actions. */ 04629 int yyxbegin = yyn < 0 ? -yyn : 0; 04630 /* Stay within bounds of both yycheck and yytname. */ 04631 int yychecklim = YYLAST - yyn + 1; 04632 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04633 int yyx; 04634 04635 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04636 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 04637 && !yytable_value_is_error (yytable[yyx + yyn])) 04638 { 04639 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04640 { 04641 yycount = 1; 04642 yysize = yysize0; 04643 break; 04644 } 04645 yyarg[yycount++] = yytname[yyx]; 04646 { 04647 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 04648 if (! (yysize <= yysize1 04649 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04650 return 2; 04651 yysize = yysize1; 04652 } 04653 } 04654 } 04655 } 04656 04657 switch (yycount) 04658 { 04659 # define YYCASE_(N, S) \ 04660 case N: \ 04661 yyformat = S; \ 04662 break 04663 YYCASE_(0, YY_("syntax error")); 04664 YYCASE_(1, YY_("syntax error, unexpected %s")); 04665 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 04666 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 04667 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 04668 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 04669 # undef YYCASE_ 04670 } 04671 04672 { 04673 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 04674 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04675 return 2; 04676 yysize = yysize1; 04677 } 04678 04679 if (*yymsg_alloc < yysize) 04680 { 04681 *yymsg_alloc = 2 * yysize; 04682 if (! (yysize <= *yymsg_alloc 04683 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 04684 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 04685 return 1; 04686 } 04687 04688 /* Avoid sprintf, as that infringes on the user's name space. 04689 Don't have undefined behavior even if the translation 04690 produced a string with the wrong number of "%s"s. */ 04691 { 04692 char *yyp = *yymsg; 04693 int yyi = 0; 04694 while ((*yyp = *yyformat) != '\0') 04695 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 04696 { 04697 yyp += yytnamerr (yyp, yyarg[yyi++]); 04698 yyformat += 2; 04699 } 04700 else 04701 { 04702 yyp++; 04703 yyformat++; 04704 } 04705 } 04706 return 0; 04707 } 04708 #endif /* YYERROR_VERBOSE */ 04709 04710 /*-----------------------------------------------. 04711 | Release the memory associated to this symbol. | 04712 `-----------------------------------------------*/ 04713 04714 /*ARGSUSED*/ 04715 #if (defined __STDC__ || defined __C99__FUNC__ \ 04716 || defined __cplusplus || defined _MSC_VER) 04717 static void 04718 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04719 #else 04720 static void 04721 yydestruct (yymsg, yytype, yyvaluep, parser) 04722 const char *yymsg; 04723 int yytype; 04724 YYSTYPE *yyvaluep; 04725 struct parser_params *parser; 04726 #endif 04727 { 04728 YYUSE (yyvaluep); 04729 YYUSE (parser); 04730 04731 if (!yymsg) 04732 yymsg = "Deleting"; 04733 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04734 04735 YYUSE (yytype); 04736 } 04737 04738 04739 04740 04741 /*----------. 04742 | yyparse. | 04743 `----------*/ 04744 04745 #ifdef YYPARSE_PARAM 04746 #if (defined __STDC__ || defined __C99__FUNC__ \ 04747 || defined __cplusplus || defined _MSC_VER) 04748 int 04749 yyparse (void *YYPARSE_PARAM) 04750 #else 04751 int 04752 yyparse (YYPARSE_PARAM) 04753 void *YYPARSE_PARAM; 04754 #endif 04755 #else /* ! YYPARSE_PARAM */ 04756 #if (defined __STDC__ || defined __C99__FUNC__ \ 04757 || defined __cplusplus || defined _MSC_VER) 04758 int 04759 yyparse (struct parser_params *parser) 04760 #else 04761 int 04762 yyparse (parser) 04763 struct parser_params *parser; 04764 #endif 04765 #endif 04766 { 04767 /* The lookahead symbol. */ 04768 int yychar; 04769 04770 04771 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 04772 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 04773 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 04774 _Pragma ("GCC diagnostic push") \ 04775 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 04776 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 04777 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 04778 _Pragma ("GCC diagnostic pop") 04779 #else 04780 /* Default value used for initialization, for pacifying older GCCs 04781 or non-GCC compilers. */ 04782 static YYSTYPE yyval_default; 04783 # define YY_INITIAL_VALUE(Value) = Value 04784 #endif 04785 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 04786 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 04787 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 04788 #endif 04789 #ifndef YY_INITIAL_VALUE 04790 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 04791 #endif 04792 04793 /* The semantic value of the lookahead symbol. */ 04794 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 04795 04796 /* Number of syntax errors so far. */ 04797 int yynerrs; 04798 04799 int yystate; 04800 /* Number of tokens to shift before error messages enabled. */ 04801 int yyerrstatus; 04802 04803 /* The stacks and their tools: 04804 `yyss': related to states. 04805 `yyvs': related to semantic values. 04806 04807 Refer to the stacks through separate pointers, to allow yyoverflow 04808 to reallocate them elsewhere. */ 04809 04810 /* The state stack. */ 04811 yytype_int16 yyssa[YYINITDEPTH]; 04812 yytype_int16 *yyss; 04813 yytype_int16 *yyssp; 04814 04815 /* The semantic value stack. */ 04816 YYSTYPE yyvsa[YYINITDEPTH]; 04817 YYSTYPE *yyvs; 04818 YYSTYPE *yyvsp; 04819 04820 YYSIZE_T yystacksize; 04821 04822 int yyn; 04823 int yyresult; 04824 /* Lookahead token as an internal (translated) token number. */ 04825 int yytoken = 0; 04826 /* The variables used to return semantic value and location from the 04827 action routines. */ 04828 YYSTYPE yyval; 04829 04830 #if YYERROR_VERBOSE 04831 /* Buffer for error messages, and its allocated size. */ 04832 char yymsgbuf[128]; 04833 char *yymsg = yymsgbuf; 04834 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 04835 #endif 04836 04837 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 04838 04839 /* The number of symbols on the RHS of the reduced rule. 04840 Keep to zero when no symbol should be popped. */ 04841 int yylen = 0; 04842 04843 yyssp = yyss = yyssa; 04844 yyvsp = yyvs = yyvsa; 04845 yystacksize = YYINITDEPTH; 04846 04847 YYDPRINTF ((stderr, "Starting parse\n")); 04848 04849 yystate = 0; 04850 yyerrstatus = 0; 04851 yynerrs = 0; 04852 yychar = YYEMPTY; /* Cause a token to be read. */ 04853 goto yysetstate; 04854 04855 /*------------------------------------------------------------. 04856 | yynewstate -- Push a new state, which is found in yystate. | 04857 `------------------------------------------------------------*/ 04858 yynewstate: 04859 /* In all cases, when you get here, the value and location stacks 04860 have just been pushed. So pushing a state here evens the stacks. */ 04861 yyssp++; 04862 04863 yysetstate: 04864 *yyssp = yystate; 04865 04866 if (yyss + yystacksize - 1 <= yyssp) 04867 { 04868 /* Get the current used size of the three stacks, in elements. */ 04869 YYSIZE_T yysize = yyssp - yyss + 1; 04870 04871 #ifdef yyoverflow 04872 { 04873 /* Give user a chance to reallocate the stack. Use copies of 04874 these so that the &'s don't force the real ones into 04875 memory. */ 04876 YYSTYPE *yyvs1 = yyvs; 04877 yytype_int16 *yyss1 = yyss; 04878 04879 /* Each stack pointer address is followed by the size of the 04880 data in use in that stack, in bytes. This used to be a 04881 conditional around just the two extra args, but that might 04882 be undefined if yyoverflow is a macro. */ 04883 yyoverflow (YY_("memory exhausted"), 04884 &yyss1, yysize * sizeof (*yyssp), 04885 &yyvs1, yysize * sizeof (*yyvsp), 04886 &yystacksize); 04887 04888 yyss = yyss1; 04889 yyvs = yyvs1; 04890 } 04891 #else /* no yyoverflow */ 04892 # ifndef YYSTACK_RELOCATE 04893 goto yyexhaustedlab; 04894 # else 04895 /* Extend the stack our own way. */ 04896 if (YYMAXDEPTH <= yystacksize) 04897 goto yyexhaustedlab; 04898 yystacksize *= 2; 04899 if (YYMAXDEPTH < yystacksize) 04900 yystacksize = YYMAXDEPTH; 04901 04902 { 04903 yytype_int16 *yyss1 = yyss; 04904 union yyalloc *yyptr = 04905 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 04906 if (! yyptr) 04907 goto yyexhaustedlab; 04908 YYSTACK_RELOCATE (yyss_alloc, yyss); 04909 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 04910 # undef YYSTACK_RELOCATE 04911 if (yyss1 != yyssa) 04912 YYSTACK_FREE (yyss1); 04913 } 04914 # endif 04915 #endif /* no yyoverflow */ 04916 04917 yyssp = yyss + yysize - 1; 04918 yyvsp = yyvs + yysize - 1; 04919 04920 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 04921 (unsigned long int) yystacksize)); 04922 04923 if (yyss + yystacksize - 1 <= yyssp) 04924 YYABORT; 04925 } 04926 04927 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 04928 04929 if (yystate == YYFINAL) 04930 YYACCEPT; 04931 04932 goto yybackup; 04933 04934 /*-----------. 04935 | yybackup. | 04936 `-----------*/ 04937 yybackup: 04938 04939 /* Do appropriate processing given the current state. Read a 04940 lookahead token if we need one and don't already have one. */ 04941 04942 /* First try to decide what to do without reference to lookahead token. */ 04943 yyn = yypact[yystate]; 04944 if (yypact_value_is_default (yyn)) 04945 goto yydefault; 04946 04947 /* Not known => get a lookahead token if don't already have one. */ 04948 04949 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 04950 if (yychar == YYEMPTY) 04951 { 04952 YYDPRINTF ((stderr, "Reading a token: ")); 04953 yychar = YYLEX; 04954 } 04955 04956 if (yychar <= YYEOF) 04957 { 04958 yychar = yytoken = YYEOF; 04959 YYDPRINTF ((stderr, "Now at end of input.\n")); 04960 } 04961 else 04962 { 04963 yytoken = YYTRANSLATE (yychar); 04964 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 04965 } 04966 04967 /* If the proper action on seeing token YYTOKEN is to reduce or to 04968 detect an error, take that action. */ 04969 yyn += yytoken; 04970 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 04971 goto yydefault; 04972 yyn = yytable[yyn]; 04973 if (yyn <= 0) 04974 { 04975 if (yytable_value_is_error (yyn)) 04976 goto yyerrlab; 04977 yyn = -yyn; 04978 goto yyreduce; 04979 } 04980 04981 /* Count tokens shifted since error; after three, turn off error 04982 status. */ 04983 if (yyerrstatus) 04984 yyerrstatus--; 04985 04986 /* Shift the lookahead token. */ 04987 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 04988 04989 /* Discard the shifted token. */ 04990 yychar = YYEMPTY; 04991 04992 yystate = yyn; 04993 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 04994 *++yyvsp = yylval; 04995 YY_IGNORE_MAYBE_UNINITIALIZED_END 04996 04997 goto yynewstate; 04998 04999 05000 /*-----------------------------------------------------------. 05001 | yydefault -- do the default action for the current state. | 05002 `-----------------------------------------------------------*/ 05003 yydefault: 05004 yyn = yydefact[yystate]; 05005 if (yyn == 0) 05006 goto yyerrlab; 05007 goto yyreduce; 05008 05009 05010 /*-----------------------------. 05011 | yyreduce -- Do a reduction. | 05012 `-----------------------------*/ 05013 yyreduce: 05014 /* yyn is the number of a rule to reduce with. */ 05015 yylen = yyr2[yyn]; 05016 05017 /* If YYLEN is nonzero, implement the default value of the action: 05018 `$$ = $1'. 05019 05020 Otherwise, the following line sets YYVAL to garbage. 05021 This behavior is undocumented and Bison 05022 users should not rely upon it. Assigning to YYVAL 05023 unconditionally makes the parser a bit smaller, and it avoids a 05024 GCC warning that YYVAL may be used uninitialized. */ 05025 yyval = yyvsp[1-yylen]; 05026 05027 05028 YY_REDUCE_PRINT (yyn); 05029 switch (yyn) 05030 { 05031 case 2: 05032 /* Line 1787 of yacc.c */ 05033 #line 786 "parse.y" 05034 { 05035 lex_state = EXPR_BEG; 05036 /*%%%*/ 05037 local_push(compile_for_eval || rb_parse_in_main()); 05038 /*% 05039 local_push(0); 05040 %*/ 05041 } 05042 break; 05043 05044 case 3: 05045 /* Line 1787 of yacc.c */ 05046 #line 795 "parse.y" 05047 { 05048 /*%%%*/ 05049 if ((yyvsp[(2) - (2)].node) && !compile_for_eval) { 05050 /* last expression should not be void */ 05051 if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node)); 05052 else { 05053 NODE *node = (yyvsp[(2) - (2)].node); 05054 while (node->nd_next) { 05055 node = node->nd_next; 05056 } 05057 void_expr(node->nd_head); 05058 } 05059 } 05060 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node))); 05061 /*% 05062 $$ = $2; 05063 parser->result = dispatch1(program, $$); 05064 %*/ 05065 local_pop(); 05066 } 05067 break; 05068 05069 case 4: 05070 /* Line 1787 of yacc.c */ 05071 #line 818 "parse.y" 05072 { 05073 /*%%%*/ 05074 void_stmts((yyvsp[(1) - (2)].node)); 05075 fixup_nodes(&deferred_nodes); 05076 /*% 05077 %*/ 05078 (yyval.node) = (yyvsp[(1) - (2)].node); 05079 } 05080 break; 05081 05082 case 5: 05083 /* Line 1787 of yacc.c */ 05084 #line 829 "parse.y" 05085 { 05086 /*%%%*/ 05087 (yyval.node) = NEW_BEGIN(0); 05088 /*% 05089 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05090 dispatch0(void_stmt)); 05091 %*/ 05092 } 05093 break; 05094 05095 case 6: 05096 /* Line 1787 of yacc.c */ 05097 #line 838 "parse.y" 05098 { 05099 /*%%%*/ 05100 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05101 /*% 05102 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05103 %*/ 05104 } 05105 break; 05106 05107 case 7: 05108 /* Line 1787 of yacc.c */ 05109 #line 846 "parse.y" 05110 { 05111 /*%%%*/ 05112 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05113 /*% 05114 $$ = dispatch2(stmts_add, $1, $3); 05115 %*/ 05116 } 05117 break; 05118 05119 case 8: 05120 /* Line 1787 of yacc.c */ 05121 #line 854 "parse.y" 05122 { 05123 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05124 } 05125 break; 05126 05127 case 10: 05128 /* Line 1787 of yacc.c */ 05129 #line 861 "parse.y" 05130 { 05131 if (in_def || in_single) { 05132 yyerror("BEGIN in method"); 05133 } 05134 /*%%%*/ 05135 /* local_push(0); */ 05136 /*% 05137 %*/ 05138 } 05139 break; 05140 05141 case 11: 05142 /* Line 1787 of yacc.c */ 05143 #line 871 "parse.y" 05144 { 05145 /*%%%*/ 05146 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05147 (yyvsp[(4) - (5)].node)); 05148 /* NEW_PREEXE($4)); */ 05149 /* local_pop(); */ 05150 (yyval.node) = NEW_BEGIN(0); 05151 /*% 05152 $$ = dispatch1(BEGIN, $4); 05153 %*/ 05154 } 05155 break; 05156 05157 case 12: 05158 /* Line 1787 of yacc.c */ 05159 #line 888 "parse.y" 05160 { 05161 /*%%%*/ 05162 (yyval.node) = (yyvsp[(1) - (4)].node); 05163 if ((yyvsp[(2) - (4)].node)) { 05164 (yyval.node) = NEW_RESCUE((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node)); 05165 } 05166 else if ((yyvsp[(3) - (4)].node)) { 05167 rb_warn0("else without rescue is useless"); 05168 (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node)); 05169 } 05170 if ((yyvsp[(4) - (4)].node)) { 05171 if ((yyval.node)) { 05172 (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node)); 05173 } 05174 else { 05175 (yyval.node) = block_append((yyvsp[(4) - (4)].node), NEW_NIL()); 05176 } 05177 } 05178 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05179 /*% 05180 $$ = dispatch4(bodystmt, 05181 escape_Qundef($1), 05182 escape_Qundef($2), 05183 escape_Qundef($3), 05184 escape_Qundef($4)); 05185 %*/ 05186 } 05187 break; 05188 05189 case 13: 05190 /* Line 1787 of yacc.c */ 05191 #line 918 "parse.y" 05192 { 05193 /*%%%*/ 05194 void_stmts((yyvsp[(1) - (2)].node)); 05195 fixup_nodes(&deferred_nodes); 05196 /*% 05197 %*/ 05198 (yyval.node) = (yyvsp[(1) - (2)].node); 05199 } 05200 break; 05201 05202 case 14: 05203 /* Line 1787 of yacc.c */ 05204 #line 929 "parse.y" 05205 { 05206 /*%%%*/ 05207 (yyval.node) = NEW_BEGIN(0); 05208 /*% 05209 $$ = dispatch2(stmts_add, dispatch0(stmts_new), 05210 dispatch0(void_stmt)); 05211 %*/ 05212 } 05213 break; 05214 05215 case 15: 05216 /* Line 1787 of yacc.c */ 05217 #line 938 "parse.y" 05218 { 05219 /*%%%*/ 05220 (yyval.node) = newline_node((yyvsp[(1) - (1)].node)); 05221 /*% 05222 $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1); 05223 %*/ 05224 } 05225 break; 05226 05227 case 16: 05228 /* Line 1787 of yacc.c */ 05229 #line 946 "parse.y" 05230 { 05231 /*%%%*/ 05232 (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node))); 05233 /*% 05234 $$ = dispatch2(stmts_add, $1, $3); 05235 %*/ 05236 } 05237 break; 05238 05239 case 17: 05240 /* Line 1787 of yacc.c */ 05241 #line 954 "parse.y" 05242 { 05243 (yyval.node) = remove_begin((yyvsp[(2) - (2)].node)); 05244 } 05245 break; 05246 05247 case 18: 05248 /* Line 1787 of yacc.c */ 05249 #line 959 "parse.y" 05250 {lex_state = EXPR_FNAME;} 05251 break; 05252 05253 case 19: 05254 /* Line 1787 of yacc.c */ 05255 #line 960 "parse.y" 05256 { 05257 /*%%%*/ 05258 (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node)); 05259 /*% 05260 $$ = dispatch2(alias, $2, $4); 05261 %*/ 05262 } 05263 break; 05264 05265 case 20: 05266 /* Line 1787 of yacc.c */ 05267 #line 968 "parse.y" 05268 { 05269 /*%%%*/ 05270 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id)); 05271 /*% 05272 $$ = dispatch2(var_alias, $2, $3); 05273 %*/ 05274 } 05275 break; 05276 05277 case 21: 05278 /* Line 1787 of yacc.c */ 05279 #line 976 "parse.y" 05280 { 05281 /*%%%*/ 05282 char buf[2]; 05283 buf[0] = '$'; 05284 buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth; 05285 (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2)); 05286 /*% 05287 $$ = dispatch2(var_alias, $2, $3); 05288 %*/ 05289 } 05290 break; 05291 05292 case 22: 05293 /* Line 1787 of yacc.c */ 05294 #line 987 "parse.y" 05295 { 05296 /*%%%*/ 05297 yyerror("can't make alias for the number variables"); 05298 (yyval.node) = NEW_BEGIN(0); 05299 /*% 05300 $$ = dispatch2(var_alias, $2, $3); 05301 $$ = dispatch1(alias_error, $$); 05302 %*/ 05303 } 05304 break; 05305 05306 case 23: 05307 /* Line 1787 of yacc.c */ 05308 #line 997 "parse.y" 05309 { 05310 /*%%%*/ 05311 (yyval.node) = (yyvsp[(2) - (2)].node); 05312 /*% 05313 $$ = dispatch1(undef, $2); 05314 %*/ 05315 } 05316 break; 05317 05318 case 24: 05319 /* Line 1787 of yacc.c */ 05320 #line 1005 "parse.y" 05321 { 05322 /*%%%*/ 05323 (yyval.node) = NEW_IF(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05324 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05325 /*% 05326 $$ = dispatch2(if_mod, $3, $1); 05327 %*/ 05328 } 05329 break; 05330 05331 case 25: 05332 /* Line 1787 of yacc.c */ 05333 #line 1014 "parse.y" 05334 { 05335 /*%%%*/ 05336 (yyval.node) = NEW_UNLESS(cond((yyvsp[(3) - (3)].node)), remove_begin((yyvsp[(1) - (3)].node)), 0); 05337 fixpos((yyval.node), (yyvsp[(3) - (3)].node)); 05338 /*% 05339 $$ = dispatch2(unless_mod, $3, $1); 05340 %*/ 05341 } 05342 break; 05343 05344 case 26: 05345 /* Line 1787 of yacc.c */ 05346 #line 1023 "parse.y" 05347 { 05348 /*%%%*/ 05349 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05350 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05351 } 05352 else { 05353 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05354 } 05355 /*% 05356 $$ = dispatch2(while_mod, $3, $1); 05357 %*/ 05358 } 05359 break; 05360 05361 case 27: 05362 /* Line 1787 of yacc.c */ 05363 #line 1036 "parse.y" 05364 { 05365 /*%%%*/ 05366 if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) { 05367 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node)->nd_body, 0); 05368 } 05369 else { 05370 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node)), (yyvsp[(1) - (3)].node), 1); 05371 } 05372 /*% 05373 $$ = dispatch2(until_mod, $3, $1); 05374 %*/ 05375 } 05376 break; 05377 05378 case 28: 05379 /* Line 1787 of yacc.c */ 05380 #line 1049 "parse.y" 05381 { 05382 /*%%%*/ 05383 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].node)), 0); 05384 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].node)), resq, 0); 05385 /*% 05386 $$ = dispatch2(rescue_mod, $1, $3); 05387 %*/ 05388 } 05389 break; 05390 05391 case 29: 05392 /* Line 1787 of yacc.c */ 05393 #line 1058 "parse.y" 05394 { 05395 if (in_def || in_single) { 05396 rb_warn0("END in method; use at_exit"); 05397 } 05398 /*%%%*/ 05399 (yyval.node) = NEW_POSTEXE(NEW_NODE( 05400 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */)); 05401 /*% 05402 $$ = dispatch1(END, $3); 05403 %*/ 05404 } 05405 break; 05406 05407 case 31: 05408 /* Line 1787 of yacc.c */ 05409 #line 1071 "parse.y" 05410 { 05411 /*%%%*/ 05412 value_expr((yyvsp[(3) - (3)].node)); 05413 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05414 (yyval.node) = (yyvsp[(1) - (3)].node); 05415 /*% 05416 $$ = dispatch2(massign, $1, $3); 05417 %*/ 05418 } 05419 break; 05420 05421 case 32: 05422 /* Line 1787 of yacc.c */ 05423 #line 1081 "parse.y" 05424 { 05425 /*%%%*/ 05426 value_expr((yyvsp[(3) - (3)].node)); 05427 if ((yyvsp[(1) - (3)].node)) { 05428 ID vid = (yyvsp[(1) - (3)].node)->nd_vid; 05429 if ((yyvsp[(2) - (3)].id) == tOROP) { 05430 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05431 (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node)); 05432 if (is_asgn_or_id(vid)) { 05433 (yyval.node)->nd_aid = vid; 05434 } 05435 } 05436 else if ((yyvsp[(2) - (3)].id) == tANDOP) { 05437 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05438 (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node)); 05439 } 05440 else { 05441 (yyval.node) = (yyvsp[(1) - (3)].node); 05442 (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node))); 05443 } 05444 } 05445 else { 05446 (yyval.node) = NEW_BEGIN(0); 05447 } 05448 /*% 05449 $$ = dispatch3(opassign, $1, $2, $3); 05450 %*/ 05451 } 05452 break; 05453 05454 case 33: 05455 /* Line 1787 of yacc.c */ 05456 #line 1110 "parse.y" 05457 { 05458 /*%%%*/ 05459 NODE *args; 05460 05461 value_expr((yyvsp[(6) - (6)].node)); 05462 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 05463 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 05464 if ((yyvsp[(5) - (6)].id) == tOROP) { 05465 (yyvsp[(5) - (6)].id) = 0; 05466 } 05467 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 05468 (yyvsp[(5) - (6)].id) = 1; 05469 } 05470 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 05471 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 05472 /*% 05473 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 05474 $$ = dispatch3(opassign, $$, $5, $6); 05475 %*/ 05476 } 05477 break; 05478 05479 case 34: 05480 /* Line 1787 of yacc.c */ 05481 #line 1131 "parse.y" 05482 { 05483 /*%%%*/ 05484 value_expr((yyvsp[(5) - (5)].node)); 05485 if ((yyvsp[(4) - (5)].id) == tOROP) { 05486 (yyvsp[(4) - (5)].id) = 0; 05487 } 05488 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 05489 (yyvsp[(4) - (5)].id) = 1; 05490 } 05491 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05492 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05493 /*% 05494 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 05495 $$ = dispatch3(opassign, $$, $4, $5); 05496 %*/ 05497 } 05498 break; 05499 05500 case 35: 05501 /* Line 1787 of yacc.c */ 05502 #line 1148 "parse.y" 05503 { 05504 /*%%%*/ 05505 value_expr((yyvsp[(5) - (5)].node)); 05506 if ((yyvsp[(4) - (5)].id) == tOROP) { 05507 (yyvsp[(4) - (5)].id) = 0; 05508 } 05509 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 05510 (yyvsp[(4) - (5)].id) = 1; 05511 } 05512 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05513 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05514 /*% 05515 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 05516 $$ = dispatch3(opassign, $$, $4, $5); 05517 %*/ 05518 } 05519 break; 05520 05521 case 36: 05522 /* Line 1787 of yacc.c */ 05523 #line 1165 "parse.y" 05524 { 05525 /*%%%*/ 05526 yyerror("constant re-assignment"); 05527 (yyval.node) = 0; 05528 /*% 05529 $$ = dispatch2(const_path_field, $1, $3); 05530 $$ = dispatch3(opassign, $$, $4, $5); 05531 $$ = dispatch1(assign_error, $$); 05532 %*/ 05533 } 05534 break; 05535 05536 case 37: 05537 /* Line 1787 of yacc.c */ 05538 #line 1176 "parse.y" 05539 { 05540 /*%%%*/ 05541 value_expr((yyvsp[(5) - (5)].node)); 05542 if ((yyvsp[(4) - (5)].id) == tOROP) { 05543 (yyvsp[(4) - (5)].id) = 0; 05544 } 05545 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 05546 (yyvsp[(4) - (5)].id) = 1; 05547 } 05548 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 05549 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05550 /*% 05551 $$ = dispatch3(field, $1, ripper_intern("::"), $3); 05552 $$ = dispatch3(opassign, $$, $4, $5); 05553 %*/ 05554 } 05555 break; 05556 05557 case 38: 05558 /* Line 1787 of yacc.c */ 05559 #line 1193 "parse.y" 05560 { 05561 /*%%%*/ 05562 rb_backref_error((yyvsp[(1) - (3)].node)); 05563 (yyval.node) = NEW_BEGIN(0); 05564 /*% 05565 $$ = dispatch2(assign, dispatch1(var_field, $1), $3); 05566 $$ = dispatch1(assign_error, $$); 05567 %*/ 05568 } 05569 break; 05570 05571 case 39: 05572 /* Line 1787 of yacc.c */ 05573 #line 1203 "parse.y" 05574 { 05575 /*%%%*/ 05576 value_expr((yyvsp[(3) - (3)].node)); 05577 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05578 /*% 05579 $$ = dispatch2(assign, $1, $3); 05580 %*/ 05581 } 05582 break; 05583 05584 case 40: 05585 /* Line 1787 of yacc.c */ 05586 #line 1212 "parse.y" 05587 { 05588 /*%%%*/ 05589 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05590 (yyval.node) = (yyvsp[(1) - (3)].node); 05591 /*% 05592 $$ = dispatch2(massign, $1, $3); 05593 %*/ 05594 } 05595 break; 05596 05597 case 41: 05598 /* Line 1787 of yacc.c */ 05599 #line 1221 "parse.y" 05600 { 05601 /*%%%*/ 05602 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 05603 (yyval.node) = (yyvsp[(1) - (3)].node); 05604 /*% 05605 $$ = dispatch2(massign, $1, $3); 05606 %*/ 05607 } 05608 break; 05609 05610 case 43: 05611 /* Line 1787 of yacc.c */ 05612 #line 1233 "parse.y" 05613 { 05614 /*%%%*/ 05615 value_expr((yyvsp[(3) - (3)].node)); 05616 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05617 /*% 05618 $$ = dispatch2(assign, $1, $3); 05619 %*/ 05620 } 05621 break; 05622 05623 case 44: 05624 /* Line 1787 of yacc.c */ 05625 #line 1242 "parse.y" 05626 { 05627 /*%%%*/ 05628 value_expr((yyvsp[(3) - (3)].node)); 05629 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05630 /*% 05631 $$ = dispatch2(assign, $1, $3); 05632 %*/ 05633 } 05634 break; 05635 05636 case 46: 05637 /* Line 1787 of yacc.c */ 05638 #line 1255 "parse.y" 05639 { 05640 /*%%%*/ 05641 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05642 /*% 05643 $$ = dispatch3(binary, $1, ripper_intern("and"), $3); 05644 %*/ 05645 } 05646 break; 05647 05648 case 47: 05649 /* Line 1787 of yacc.c */ 05650 #line 1263 "parse.y" 05651 { 05652 /*%%%*/ 05653 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05654 /*% 05655 $$ = dispatch3(binary, $1, ripper_intern("or"), $3); 05656 %*/ 05657 } 05658 break; 05659 05660 case 48: 05661 /* Line 1787 of yacc.c */ 05662 #line 1271 "parse.y" 05663 { 05664 /*%%%*/ 05665 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (3)].node)), '!'); 05666 /*% 05667 $$ = dispatch2(unary, ripper_intern("not"), $3); 05668 %*/ 05669 } 05670 break; 05671 05672 case 49: 05673 /* Line 1787 of yacc.c */ 05674 #line 1279 "parse.y" 05675 { 05676 /*%%%*/ 05677 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 05678 /*% 05679 $$ = dispatch2(unary, ripper_id2sym('!'), $2); 05680 %*/ 05681 } 05682 break; 05683 05684 case 51: 05685 /* Line 1787 of yacc.c */ 05686 #line 1290 "parse.y" 05687 { 05688 /*%%%*/ 05689 value_expr((yyvsp[(1) - (1)].node)); 05690 (yyval.node) = (yyvsp[(1) - (1)].node); 05691 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 05692 /*% 05693 $$ = $1; 05694 %*/ 05695 } 05696 break; 05697 05698 case 55: 05699 /* Line 1787 of yacc.c */ 05700 #line 1307 "parse.y" 05701 { 05702 /*%%%*/ 05703 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05704 /*% 05705 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 05706 $$ = method_arg($$, $4); 05707 %*/ 05708 } 05709 break; 05710 05711 case 56: 05712 /* Line 1787 of yacc.c */ 05713 #line 1316 "parse.y" 05714 { 05715 /*%%%*/ 05716 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05717 /*% 05718 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 05719 $$ = method_arg($$, $4); 05720 %*/ 05721 } 05722 break; 05723 05724 case 57: 05725 /* Line 1787 of yacc.c */ 05726 #line 1327 "parse.y" 05727 { 05728 (yyvsp[(1) - (1)].vars) = dyna_push(); 05729 /*%%%*/ 05730 (yyval.num) = ruby_sourceline; 05731 /*% 05732 %*/ 05733 } 05734 break; 05735 05736 case 58: 05737 /* Line 1787 of yacc.c */ 05738 #line 1337 "parse.y" 05739 { 05740 /*%%%*/ 05741 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 05742 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 05743 /*% 05744 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 05745 %*/ 05746 dyna_pop((yyvsp[(1) - (5)].vars)); 05747 } 05748 break; 05749 05750 case 59: 05751 /* Line 1787 of yacc.c */ 05752 #line 1349 "parse.y" 05753 { 05754 /*%%%*/ 05755 (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 05756 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05757 /*% 05758 $$ = dispatch2(command, $1, $2); 05759 %*/ 05760 } 05761 break; 05762 05763 case 60: 05764 /* Line 1787 of yacc.c */ 05765 #line 1358 "parse.y" 05766 { 05767 /*%%%*/ 05768 block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node)); 05769 (yyvsp[(3) - (3)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].id), (yyvsp[(2) - (3)].node)); 05770 (yyval.node) = (yyvsp[(3) - (3)].node); 05771 fixpos((yyval.node), (yyvsp[(2) - (3)].node)); 05772 /*% 05773 $$ = dispatch2(command, $1, $2); 05774 $$ = method_add_block($$, $3); 05775 %*/ 05776 } 05777 break; 05778 05779 case 61: 05780 /* Line 1787 of yacc.c */ 05781 #line 1370 "parse.y" 05782 { 05783 /*%%%*/ 05784 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05785 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05786 /*% 05787 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 05788 %*/ 05789 } 05790 break; 05791 05792 case 62: 05793 /* Line 1787 of yacc.c */ 05794 #line 1379 "parse.y" 05795 { 05796 /*%%%*/ 05797 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 05798 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 05799 (yyval.node) = (yyvsp[(5) - (5)].node); 05800 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05801 /*% 05802 $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4); 05803 $$ = method_add_block($$, $5); 05804 %*/ 05805 } 05806 break; 05807 05808 case 63: 05809 /* Line 1787 of yacc.c */ 05810 #line 1391 "parse.y" 05811 { 05812 /*%%%*/ 05813 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 05814 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 05815 /*% 05816 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 05817 %*/ 05818 } 05819 break; 05820 05821 case 64: 05822 /* Line 1787 of yacc.c */ 05823 #line 1400 "parse.y" 05824 { 05825 /*%%%*/ 05826 block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node)); 05827 (yyvsp[(5) - (5)].node)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node)); 05828 (yyval.node) = (yyvsp[(5) - (5)].node); 05829 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 05830 /*% 05831 $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4); 05832 $$ = method_add_block($$, $5); 05833 %*/ 05834 } 05835 break; 05836 05837 case 65: 05838 /* Line 1787 of yacc.c */ 05839 #line 1412 "parse.y" 05840 { 05841 /*%%%*/ 05842 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 05843 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05844 /*% 05845 $$ = dispatch1(super, $2); 05846 %*/ 05847 } 05848 break; 05849 05850 case 66: 05851 /* Line 1787 of yacc.c */ 05852 #line 1421 "parse.y" 05853 { 05854 /*%%%*/ 05855 (yyval.node) = new_yield((yyvsp[(2) - (2)].node)); 05856 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 05857 /*% 05858 $$ = dispatch1(yield, $2); 05859 %*/ 05860 } 05861 break; 05862 05863 case 67: 05864 /* Line 1787 of yacc.c */ 05865 #line 1430 "parse.y" 05866 { 05867 /*%%%*/ 05868 (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node))); 05869 /*% 05870 $$ = dispatch1(return, $2); 05871 %*/ 05872 } 05873 break; 05874 05875 case 68: 05876 /* Line 1787 of yacc.c */ 05877 #line 1438 "parse.y" 05878 { 05879 /*%%%*/ 05880 (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node))); 05881 /*% 05882 $$ = dispatch1(break, $2); 05883 %*/ 05884 } 05885 break; 05886 05887 case 69: 05888 /* Line 1787 of yacc.c */ 05889 #line 1446 "parse.y" 05890 { 05891 /*%%%*/ 05892 (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node))); 05893 /*% 05894 $$ = dispatch1(next, $2); 05895 %*/ 05896 } 05897 break; 05898 05899 case 71: 05900 /* Line 1787 of yacc.c */ 05901 #line 1457 "parse.y" 05902 { 05903 /*%%%*/ 05904 (yyval.node) = (yyvsp[(2) - (3)].node); 05905 /*% 05906 $$ = dispatch1(mlhs_paren, $2); 05907 %*/ 05908 } 05909 break; 05910 05911 case 73: 05912 /* Line 1787 of yacc.c */ 05913 #line 1468 "parse.y" 05914 { 05915 /*%%%*/ 05916 (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].node)), 0); 05917 /*% 05918 $$ = dispatch1(mlhs_paren, $2); 05919 %*/ 05920 } 05921 break; 05922 05923 case 74: 05924 /* Line 1787 of yacc.c */ 05925 #line 1478 "parse.y" 05926 { 05927 /*%%%*/ 05928 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 05929 /*% 05930 $$ = $1; 05931 %*/ 05932 } 05933 break; 05934 05935 case 75: 05936 /* Line 1787 of yacc.c */ 05937 #line 1486 "parse.y" 05938 { 05939 /*%%%*/ 05940 (yyval.node) = NEW_MASGN(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node)), 0); 05941 /*% 05942 $$ = mlhs_add($1, $2); 05943 %*/ 05944 } 05945 break; 05946 05947 case 76: 05948 /* Line 1787 of yacc.c */ 05949 #line 1494 "parse.y" 05950 { 05951 /*%%%*/ 05952 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 05953 /*% 05954 $$ = mlhs_add_star($1, $3); 05955 %*/ 05956 } 05957 break; 05958 05959 case 77: 05960 /* Line 1787 of yacc.c */ 05961 #line 1502 "parse.y" 05962 { 05963 /*%%%*/ 05964 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node))); 05965 /*% 05966 $1 = mlhs_add_star($1, $3); 05967 $$ = mlhs_add($1, $5); 05968 %*/ 05969 } 05970 break; 05971 05972 case 78: 05973 /* Line 1787 of yacc.c */ 05974 #line 1511 "parse.y" 05975 { 05976 /*%%%*/ 05977 (yyval.node) = NEW_MASGN((yyvsp[(1) - (2)].node), -1); 05978 /*% 05979 $$ = mlhs_add_star($1, Qnil); 05980 %*/ 05981 } 05982 break; 05983 05984 case 79: 05985 /* Line 1787 of yacc.c */ 05986 #line 1519 "parse.y" 05987 { 05988 /*%%%*/ 05989 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), NEW_POSTARG(-1, (yyvsp[(4) - (4)].node))); 05990 /*% 05991 $1 = mlhs_add_star($1, Qnil); 05992 $$ = mlhs_add($1, $4); 05993 %*/ 05994 } 05995 break; 05996 05997 case 80: 05998 /* Line 1787 of yacc.c */ 05999 #line 1528 "parse.y" 06000 { 06001 /*%%%*/ 06002 (yyval.node) = NEW_MASGN(0, (yyvsp[(2) - (2)].node)); 06003 /*% 06004 $$ = mlhs_add_star(mlhs_new(), $2); 06005 %*/ 06006 } 06007 break; 06008 06009 case 81: 06010 /* Line 1787 of yacc.c */ 06011 #line 1536 "parse.y" 06012 { 06013 /*%%%*/ 06014 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node))); 06015 /*% 06016 $2 = mlhs_add_star(mlhs_new(), $2); 06017 $$ = mlhs_add($2, $4); 06018 %*/ 06019 } 06020 break; 06021 06022 case 82: 06023 /* Line 1787 of yacc.c */ 06024 #line 1545 "parse.y" 06025 { 06026 /*%%%*/ 06027 (yyval.node) = NEW_MASGN(0, -1); 06028 /*% 06029 $$ = mlhs_add_star(mlhs_new(), Qnil); 06030 %*/ 06031 } 06032 break; 06033 06034 case 83: 06035 /* Line 1787 of yacc.c */ 06036 #line 1553 "parse.y" 06037 { 06038 /*%%%*/ 06039 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 06040 /*% 06041 $$ = mlhs_add_star(mlhs_new(), Qnil); 06042 $$ = mlhs_add($$, $3); 06043 %*/ 06044 } 06045 break; 06046 06047 case 85: 06048 /* Line 1787 of yacc.c */ 06049 #line 1565 "parse.y" 06050 { 06051 /*%%%*/ 06052 (yyval.node) = (yyvsp[(2) - (3)].node); 06053 /*% 06054 $$ = dispatch1(mlhs_paren, $2); 06055 %*/ 06056 } 06057 break; 06058 06059 case 86: 06060 /* Line 1787 of yacc.c */ 06061 #line 1575 "parse.y" 06062 { 06063 /*%%%*/ 06064 (yyval.node) = NEW_LIST((yyvsp[(1) - (2)].node)); 06065 /*% 06066 $$ = mlhs_add(mlhs_new(), $1); 06067 %*/ 06068 } 06069 break; 06070 06071 case 87: 06072 /* Line 1787 of yacc.c */ 06073 #line 1583 "parse.y" 06074 { 06075 /*%%%*/ 06076 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 06077 /*% 06078 $$ = mlhs_add($1, $2); 06079 %*/ 06080 } 06081 break; 06082 06083 case 88: 06084 /* Line 1787 of yacc.c */ 06085 #line 1593 "parse.y" 06086 { 06087 /*%%%*/ 06088 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 06089 /*% 06090 $$ = mlhs_add(mlhs_new(), $1); 06091 %*/ 06092 } 06093 break; 06094 06095 case 89: 06096 /* Line 1787 of yacc.c */ 06097 #line 1601 "parse.y" 06098 { 06099 /*%%%*/ 06100 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06101 /*% 06102 $$ = mlhs_add($1, $3); 06103 %*/ 06104 } 06105 break; 06106 06107 case 90: 06108 /* Line 1787 of yacc.c */ 06109 #line 1611 "parse.y" 06110 { 06111 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06112 } 06113 break; 06114 06115 case 91: 06116 /* Line 1787 of yacc.c */ 06117 #line 1615 "parse.y" 06118 { 06119 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06120 } 06121 break; 06122 06123 case 92: 06124 /* Line 1787 of yacc.c */ 06125 #line 1619 "parse.y" 06126 { 06127 /*%%%*/ 06128 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06129 /*% 06130 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06131 %*/ 06132 } 06133 break; 06134 06135 case 93: 06136 /* Line 1787 of yacc.c */ 06137 #line 1627 "parse.y" 06138 { 06139 /*%%%*/ 06140 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06141 /*% 06142 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06143 %*/ 06144 } 06145 break; 06146 06147 case 94: 06148 /* Line 1787 of yacc.c */ 06149 #line 1635 "parse.y" 06150 { 06151 /*%%%*/ 06152 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06153 /*% 06154 $$ = dispatch2(const_path_field, $1, $3); 06155 %*/ 06156 } 06157 break; 06158 06159 case 95: 06160 /* Line 1787 of yacc.c */ 06161 #line 1643 "parse.y" 06162 { 06163 /*%%%*/ 06164 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06165 /*% 06166 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06167 %*/ 06168 } 06169 break; 06170 06171 case 96: 06172 /* Line 1787 of yacc.c */ 06173 #line 1651 "parse.y" 06174 { 06175 /*%%%*/ 06176 if (in_def || in_single) 06177 yyerror("dynamic constant assignment"); 06178 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06179 /*% 06180 if (in_def || in_single) 06181 yyerror("dynamic constant assignment"); 06182 $$ = dispatch2(const_path_field, $1, $3); 06183 %*/ 06184 } 06185 break; 06186 06187 case 97: 06188 /* Line 1787 of yacc.c */ 06189 #line 1663 "parse.y" 06190 { 06191 /*%%%*/ 06192 if (in_def || in_single) 06193 yyerror("dynamic constant assignment"); 06194 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06195 /*% 06196 $$ = dispatch1(top_const_field, $2); 06197 %*/ 06198 } 06199 break; 06200 06201 case 98: 06202 /* Line 1787 of yacc.c */ 06203 #line 1673 "parse.y" 06204 { 06205 /*%%%*/ 06206 rb_backref_error((yyvsp[(1) - (1)].node)); 06207 (yyval.node) = NEW_BEGIN(0); 06208 /*% 06209 $$ = dispatch1(var_field, $1); 06210 $$ = dispatch1(assign_error, $$); 06211 %*/ 06212 } 06213 break; 06214 06215 case 99: 06216 /* Line 1787 of yacc.c */ 06217 #line 1685 "parse.y" 06218 { 06219 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06220 /*%%%*/ 06221 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06222 /*% 06223 $$ = dispatch1(var_field, $$); 06224 %*/ 06225 } 06226 break; 06227 06228 case 100: 06229 /* Line 1787 of yacc.c */ 06230 #line 1694 "parse.y" 06231 { 06232 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 06233 /*%%%*/ 06234 if (!(yyval.node)) (yyval.node) = NEW_BEGIN(0); 06235 /*% 06236 $$ = dispatch1(var_field, $$); 06237 %*/ 06238 } 06239 break; 06240 06241 case 101: 06242 /* Line 1787 of yacc.c */ 06243 #line 1703 "parse.y" 06244 { 06245 /*%%%*/ 06246 (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node)); 06247 /*% 06248 $$ = dispatch2(aref_field, $1, escape_Qundef($3)); 06249 %*/ 06250 } 06251 break; 06252 06253 case 102: 06254 /* Line 1787 of yacc.c */ 06255 #line 1711 "parse.y" 06256 { 06257 /*%%%*/ 06258 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06259 /*% 06260 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06261 %*/ 06262 } 06263 break; 06264 06265 case 103: 06266 /* Line 1787 of yacc.c */ 06267 #line 1719 "parse.y" 06268 { 06269 /*%%%*/ 06270 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06271 /*% 06272 $$ = dispatch3(field, $1, ripper_intern("::"), $3); 06273 %*/ 06274 } 06275 break; 06276 06277 case 104: 06278 /* Line 1787 of yacc.c */ 06279 #line 1727 "parse.y" 06280 { 06281 /*%%%*/ 06282 (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06283 /*% 06284 $$ = dispatch3(field, $1, ripper_id2sym('.'), $3); 06285 %*/ 06286 } 06287 break; 06288 06289 case 105: 06290 /* Line 1787 of yacc.c */ 06291 #line 1735 "parse.y" 06292 { 06293 /*%%%*/ 06294 if (in_def || in_single) 06295 yyerror("dynamic constant assignment"); 06296 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id))); 06297 /*% 06298 $$ = dispatch2(const_path_field, $1, $3); 06299 if (in_def || in_single) { 06300 $$ = dispatch1(assign_error, $$); 06301 } 06302 %*/ 06303 } 06304 break; 06305 06306 case 106: 06307 /* Line 1787 of yacc.c */ 06308 #line 1748 "parse.y" 06309 { 06310 /*%%%*/ 06311 if (in_def || in_single) 06312 yyerror("dynamic constant assignment"); 06313 (yyval.node) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].id))); 06314 /*% 06315 $$ = dispatch1(top_const_field, $2); 06316 if (in_def || in_single) { 06317 $$ = dispatch1(assign_error, $$); 06318 } 06319 %*/ 06320 } 06321 break; 06322 06323 case 107: 06324 /* Line 1787 of yacc.c */ 06325 #line 1761 "parse.y" 06326 { 06327 /*%%%*/ 06328 rb_backref_error((yyvsp[(1) - (1)].node)); 06329 (yyval.node) = NEW_BEGIN(0); 06330 /*% 06331 $$ = dispatch1(assign_error, $1); 06332 %*/ 06333 } 06334 break; 06335 06336 case 108: 06337 /* Line 1787 of yacc.c */ 06338 #line 1772 "parse.y" 06339 { 06340 /*%%%*/ 06341 yyerror("class/module name must be CONSTANT"); 06342 /*% 06343 $$ = dispatch1(class_name_error, $1); 06344 %*/ 06345 } 06346 break; 06347 06348 case 110: 06349 /* Line 1787 of yacc.c */ 06350 #line 1783 "parse.y" 06351 { 06352 /*%%%*/ 06353 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 06354 /*% 06355 $$ = dispatch1(top_const_ref, $2); 06356 %*/ 06357 } 06358 break; 06359 06360 case 111: 06361 /* Line 1787 of yacc.c */ 06362 #line 1791 "parse.y" 06363 { 06364 /*%%%*/ 06365 (yyval.node) = NEW_COLON2(0, (yyval.node)); 06366 /*% 06367 $$ = dispatch1(const_ref, $1); 06368 %*/ 06369 } 06370 break; 06371 06372 case 112: 06373 /* Line 1787 of yacc.c */ 06374 #line 1799 "parse.y" 06375 { 06376 /*%%%*/ 06377 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 06378 /*% 06379 $$ = dispatch2(const_path_ref, $1, $3); 06380 %*/ 06381 } 06382 break; 06383 06384 case 116: 06385 /* Line 1787 of yacc.c */ 06386 #line 1812 "parse.y" 06387 { 06388 lex_state = EXPR_ENDFN; 06389 (yyval.id) = (yyvsp[(1) - (1)].id); 06390 } 06391 break; 06392 06393 case 117: 06394 /* Line 1787 of yacc.c */ 06395 #line 1817 "parse.y" 06396 { 06397 lex_state = EXPR_ENDFN; 06398 /*%%%*/ 06399 (yyval.id) = (yyvsp[(1) - (1)].id); 06400 /*% 06401 $$ = $1; 06402 %*/ 06403 } 06404 break; 06405 06406 case 120: 06407 /* Line 1787 of yacc.c */ 06408 #line 1832 "parse.y" 06409 { 06410 /*%%%*/ 06411 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 06412 /*% 06413 $$ = dispatch1(symbol_literal, $1); 06414 %*/ 06415 } 06416 break; 06417 06418 case 122: 06419 /* Line 1787 of yacc.c */ 06420 #line 1843 "parse.y" 06421 { 06422 /*%%%*/ 06423 (yyval.node) = NEW_UNDEF((yyvsp[(1) - (1)].node)); 06424 /*% 06425 $$ = rb_ary_new3(1, $1); 06426 %*/ 06427 } 06428 break; 06429 06430 case 123: 06431 /* Line 1787 of yacc.c */ 06432 #line 1850 "parse.y" 06433 {lex_state = EXPR_FNAME;} 06434 break; 06435 06436 case 124: 06437 /* Line 1787 of yacc.c */ 06438 #line 1851 "parse.y" 06439 { 06440 /*%%%*/ 06441 (yyval.node) = block_append((yyvsp[(1) - (4)].node), NEW_UNDEF((yyvsp[(4) - (4)].node))); 06442 /*% 06443 rb_ary_push($1, $4); 06444 %*/ 06445 } 06446 break; 06447 06448 case 125: 06449 /* Line 1787 of yacc.c */ 06450 #line 1860 "parse.y" 06451 { ifndef_ripper((yyval.id) = '|'); } 06452 break; 06453 06454 case 126: 06455 /* Line 1787 of yacc.c */ 06456 #line 1861 "parse.y" 06457 { ifndef_ripper((yyval.id) = '^'); } 06458 break; 06459 06460 case 127: 06461 /* Line 1787 of yacc.c */ 06462 #line 1862 "parse.y" 06463 { ifndef_ripper((yyval.id) = '&'); } 06464 break; 06465 06466 case 128: 06467 /* Line 1787 of yacc.c */ 06468 #line 1863 "parse.y" 06469 { ifndef_ripper((yyval.id) = tCMP); } 06470 break; 06471 06472 case 129: 06473 /* Line 1787 of yacc.c */ 06474 #line 1864 "parse.y" 06475 { ifndef_ripper((yyval.id) = tEQ); } 06476 break; 06477 06478 case 130: 06479 /* Line 1787 of yacc.c */ 06480 #line 1865 "parse.y" 06481 { ifndef_ripper((yyval.id) = tEQQ); } 06482 break; 06483 06484 case 131: 06485 /* Line 1787 of yacc.c */ 06486 #line 1866 "parse.y" 06487 { ifndef_ripper((yyval.id) = tMATCH); } 06488 break; 06489 06490 case 132: 06491 /* Line 1787 of yacc.c */ 06492 #line 1867 "parse.y" 06493 { ifndef_ripper((yyval.id) = tNMATCH); } 06494 break; 06495 06496 case 133: 06497 /* Line 1787 of yacc.c */ 06498 #line 1868 "parse.y" 06499 { ifndef_ripper((yyval.id) = '>'); } 06500 break; 06501 06502 case 134: 06503 /* Line 1787 of yacc.c */ 06504 #line 1869 "parse.y" 06505 { ifndef_ripper((yyval.id) = tGEQ); } 06506 break; 06507 06508 case 135: 06509 /* Line 1787 of yacc.c */ 06510 #line 1870 "parse.y" 06511 { ifndef_ripper((yyval.id) = '<'); } 06512 break; 06513 06514 case 136: 06515 /* Line 1787 of yacc.c */ 06516 #line 1871 "parse.y" 06517 { ifndef_ripper((yyval.id) = tLEQ); } 06518 break; 06519 06520 case 137: 06521 /* Line 1787 of yacc.c */ 06522 #line 1872 "parse.y" 06523 { ifndef_ripper((yyval.id) = tNEQ); } 06524 break; 06525 06526 case 138: 06527 /* Line 1787 of yacc.c */ 06528 #line 1873 "parse.y" 06529 { ifndef_ripper((yyval.id) = tLSHFT); } 06530 break; 06531 06532 case 139: 06533 /* Line 1787 of yacc.c */ 06534 #line 1874 "parse.y" 06535 { ifndef_ripper((yyval.id) = tRSHFT); } 06536 break; 06537 06538 case 140: 06539 /* Line 1787 of yacc.c */ 06540 #line 1875 "parse.y" 06541 { ifndef_ripper((yyval.id) = '+'); } 06542 break; 06543 06544 case 141: 06545 /* Line 1787 of yacc.c */ 06546 #line 1876 "parse.y" 06547 { ifndef_ripper((yyval.id) = '-'); } 06548 break; 06549 06550 case 142: 06551 /* Line 1787 of yacc.c */ 06552 #line 1877 "parse.y" 06553 { ifndef_ripper((yyval.id) = '*'); } 06554 break; 06555 06556 case 143: 06557 /* Line 1787 of yacc.c */ 06558 #line 1878 "parse.y" 06559 { ifndef_ripper((yyval.id) = '*'); } 06560 break; 06561 06562 case 144: 06563 /* Line 1787 of yacc.c */ 06564 #line 1879 "parse.y" 06565 { ifndef_ripper((yyval.id) = '/'); } 06566 break; 06567 06568 case 145: 06569 /* Line 1787 of yacc.c */ 06570 #line 1880 "parse.y" 06571 { ifndef_ripper((yyval.id) = '%'); } 06572 break; 06573 06574 case 146: 06575 /* Line 1787 of yacc.c */ 06576 #line 1881 "parse.y" 06577 { ifndef_ripper((yyval.id) = tPOW); } 06578 break; 06579 06580 case 147: 06581 /* Line 1787 of yacc.c */ 06582 #line 1882 "parse.y" 06583 { ifndef_ripper((yyval.id) = '!'); } 06584 break; 06585 06586 case 148: 06587 /* Line 1787 of yacc.c */ 06588 #line 1883 "parse.y" 06589 { ifndef_ripper((yyval.id) = '~'); } 06590 break; 06591 06592 case 149: 06593 /* Line 1787 of yacc.c */ 06594 #line 1884 "parse.y" 06595 { ifndef_ripper((yyval.id) = tUPLUS); } 06596 break; 06597 06598 case 150: 06599 /* Line 1787 of yacc.c */ 06600 #line 1885 "parse.y" 06601 { ifndef_ripper((yyval.id) = tUMINUS); } 06602 break; 06603 06604 case 151: 06605 /* Line 1787 of yacc.c */ 06606 #line 1886 "parse.y" 06607 { ifndef_ripper((yyval.id) = tAREF); } 06608 break; 06609 06610 case 152: 06611 /* Line 1787 of yacc.c */ 06612 #line 1887 "parse.y" 06613 { ifndef_ripper((yyval.id) = tASET); } 06614 break; 06615 06616 case 153: 06617 /* Line 1787 of yacc.c */ 06618 #line 1888 "parse.y" 06619 { ifndef_ripper((yyval.id) = '`'); } 06620 break; 06621 06622 case 195: 06623 /* Line 1787 of yacc.c */ 06624 #line 1906 "parse.y" 06625 { 06626 /*%%%*/ 06627 value_expr((yyvsp[(3) - (3)].node)); 06628 (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06629 /*% 06630 $$ = dispatch2(assign, $1, $3); 06631 %*/ 06632 } 06633 break; 06634 06635 case 196: 06636 /* Line 1787 of yacc.c */ 06637 #line 1915 "parse.y" 06638 { 06639 /*%%%*/ 06640 value_expr((yyvsp[(3) - (5)].node)); 06641 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06642 (yyval.node) = node_assign((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node)); 06643 /*% 06644 $$ = dispatch2(assign, $1, dispatch2(rescue_mod, $3, $5)); 06645 %*/ 06646 } 06647 break; 06648 06649 case 197: 06650 /* Line 1787 of yacc.c */ 06651 #line 1925 "parse.y" 06652 { 06653 /*%%%*/ 06654 value_expr((yyvsp[(3) - (3)].node)); 06655 if ((yyvsp[(1) - (3)].node)) { 06656 ID vid = (yyvsp[(1) - (3)].node)->nd_vid; 06657 if ((yyvsp[(2) - (3)].id) == tOROP) { 06658 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 06659 (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].node)); 06660 if (is_asgn_or_id(vid)) { 06661 (yyval.node)->nd_aid = vid; 06662 } 06663 } 06664 else if ((yyvsp[(2) - (3)].id) == tANDOP) { 06665 (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node); 06666 (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].node)); 06667 } 06668 else { 06669 (yyval.node) = (yyvsp[(1) - (3)].node); 06670 (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].id), NEW_LIST((yyvsp[(3) - (3)].node))); 06671 } 06672 } 06673 else { 06674 (yyval.node) = NEW_BEGIN(0); 06675 } 06676 /*% 06677 $$ = dispatch3(opassign, $1, $2, $3); 06678 %*/ 06679 } 06680 break; 06681 06682 case 198: 06683 /* Line 1787 of yacc.c */ 06684 #line 1954 "parse.y" 06685 { 06686 /*%%%*/ 06687 value_expr((yyvsp[(3) - (5)].node)); 06688 (yyvsp[(3) - (5)].node) = NEW_RESCUE((yyvsp[(3) - (5)].node), NEW_RESBODY(0,(yyvsp[(5) - (5)].node),0), 0); 06689 if ((yyvsp[(1) - (5)].node)) { 06690 ID vid = (yyvsp[(1) - (5)].node)->nd_vid; 06691 if ((yyvsp[(2) - (5)].id) == tOROP) { 06692 (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node); 06693 (yyval.node) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].node)); 06694 if (is_asgn_or_id(vid)) { 06695 (yyval.node)->nd_aid = vid; 06696 } 06697 } 06698 else if ((yyvsp[(2) - (5)].id) == tANDOP) { 06699 (yyvsp[(1) - (5)].node)->nd_value = (yyvsp[(3) - (5)].node); 06700 (yyval.node) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].node)); 06701 } 06702 else { 06703 (yyval.node) = (yyvsp[(1) - (5)].node); 06704 (yyval.node)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].id), NEW_LIST((yyvsp[(3) - (5)].node))); 06705 } 06706 } 06707 else { 06708 (yyval.node) = NEW_BEGIN(0); 06709 } 06710 /*% 06711 $3 = dispatch2(rescue_mod, $3, $5); 06712 $$ = dispatch3(opassign, $1, $2, $3); 06713 %*/ 06714 } 06715 break; 06716 06717 case 199: 06718 /* Line 1787 of yacc.c */ 06719 #line 1985 "parse.y" 06720 { 06721 /*%%%*/ 06722 NODE *args; 06723 06724 value_expr((yyvsp[(6) - (6)].node)); 06725 if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = NEW_ZARRAY(); 06726 if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) { 06727 args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06728 } 06729 else { 06730 args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 06731 } 06732 if ((yyvsp[(5) - (6)].id) == tOROP) { 06733 (yyvsp[(5) - (6)].id) = 0; 06734 } 06735 else if ((yyvsp[(5) - (6)].id) == tANDOP) { 06736 (yyvsp[(5) - (6)].id) = 1; 06737 } 06738 (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args); 06739 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 06740 /*% 06741 $1 = dispatch2(aref_field, $1, escape_Qundef($3)); 06742 $$ = dispatch3(opassign, $1, $5, $6); 06743 %*/ 06744 } 06745 break; 06746 06747 case 200: 06748 /* Line 1787 of yacc.c */ 06749 #line 2011 "parse.y" 06750 { 06751 /*%%%*/ 06752 value_expr((yyvsp[(5) - (5)].node)); 06753 if ((yyvsp[(4) - (5)].id) == tOROP) { 06754 (yyvsp[(4) - (5)].id) = 0; 06755 } 06756 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 06757 (yyvsp[(4) - (5)].id) = 1; 06758 } 06759 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06760 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06761 /*% 06762 $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); 06763 $$ = dispatch3(opassign, $1, $4, $5); 06764 %*/ 06765 } 06766 break; 06767 06768 case 201: 06769 /* Line 1787 of yacc.c */ 06770 #line 2028 "parse.y" 06771 { 06772 /*%%%*/ 06773 value_expr((yyvsp[(5) - (5)].node)); 06774 if ((yyvsp[(4) - (5)].id) == tOROP) { 06775 (yyvsp[(4) - (5)].id) = 0; 06776 } 06777 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 06778 (yyvsp[(4) - (5)].id) = 1; 06779 } 06780 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06781 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06782 /*% 06783 $1 = dispatch3(field, $1, ripper_id2sym('.'), $3); 06784 $$ = dispatch3(opassign, $1, $4, $5); 06785 %*/ 06786 } 06787 break; 06788 06789 case 202: 06790 /* Line 1787 of yacc.c */ 06791 #line 2045 "parse.y" 06792 { 06793 /*%%%*/ 06794 value_expr((yyvsp[(5) - (5)].node)); 06795 if ((yyvsp[(4) - (5)].id) == tOROP) { 06796 (yyvsp[(4) - (5)].id) = 0; 06797 } 06798 else if ((yyvsp[(4) - (5)].id) == tANDOP) { 06799 (yyvsp[(4) - (5)].id) = 1; 06800 } 06801 (yyval.node) = NEW_OP_ASGN2((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node)); 06802 fixpos((yyval.node), (yyvsp[(1) - (5)].node)); 06803 /*% 06804 $1 = dispatch3(field, $1, ripper_intern("::"), $3); 06805 $$ = dispatch3(opassign, $1, $4, $5); 06806 %*/ 06807 } 06808 break; 06809 06810 case 203: 06811 /* Line 1787 of yacc.c */ 06812 #line 2062 "parse.y" 06813 { 06814 /*%%%*/ 06815 yyerror("constant re-assignment"); 06816 (yyval.node) = NEW_BEGIN(0); 06817 /*% 06818 $$ = dispatch2(const_path_field, $1, $3); 06819 $$ = dispatch3(opassign, $$, $4, $5); 06820 $$ = dispatch1(assign_error, $$); 06821 %*/ 06822 } 06823 break; 06824 06825 case 204: 06826 /* Line 1787 of yacc.c */ 06827 #line 2073 "parse.y" 06828 { 06829 /*%%%*/ 06830 yyerror("constant re-assignment"); 06831 (yyval.node) = NEW_BEGIN(0); 06832 /*% 06833 $$ = dispatch1(top_const_field, $2); 06834 $$ = dispatch3(opassign, $$, $3, $4); 06835 $$ = dispatch1(assign_error, $$); 06836 %*/ 06837 } 06838 break; 06839 06840 case 205: 06841 /* Line 1787 of yacc.c */ 06842 #line 2084 "parse.y" 06843 { 06844 /*%%%*/ 06845 rb_backref_error((yyvsp[(1) - (3)].node)); 06846 (yyval.node) = NEW_BEGIN(0); 06847 /*% 06848 $$ = dispatch1(var_field, $1); 06849 $$ = dispatch3(opassign, $$, $2, $3); 06850 $$ = dispatch1(assign_error, $$); 06851 %*/ 06852 } 06853 break; 06854 06855 case 206: 06856 /* Line 1787 of yacc.c */ 06857 #line 2095 "parse.y" 06858 { 06859 /*%%%*/ 06860 value_expr((yyvsp[(1) - (3)].node)); 06861 value_expr((yyvsp[(3) - (3)].node)); 06862 (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06863 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 06864 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 06865 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 06866 } 06867 /*% 06868 $$ = dispatch2(dot2, $1, $3); 06869 %*/ 06870 } 06871 break; 06872 06873 case 207: 06874 /* Line 1787 of yacc.c */ 06875 #line 2109 "parse.y" 06876 { 06877 /*%%%*/ 06878 value_expr((yyvsp[(1) - (3)].node)); 06879 value_expr((yyvsp[(3) - (3)].node)); 06880 (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 06881 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].node)->nd_lit) && 06882 nd_type((yyvsp[(3) - (3)].node)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].node)->nd_lit)) { 06883 deferred_nodes = list_append(deferred_nodes, (yyval.node)); 06884 } 06885 /*% 06886 $$ = dispatch2(dot3, $1, $3); 06887 %*/ 06888 } 06889 break; 06890 06891 case 208: 06892 /* Line 1787 of yacc.c */ 06893 #line 2123 "parse.y" 06894 { 06895 /*%%%*/ 06896 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node)); 06897 /*% 06898 $$ = dispatch3(binary, $1, ID2SYM('+'), $3); 06899 %*/ 06900 } 06901 break; 06902 06903 case 209: 06904 /* Line 1787 of yacc.c */ 06905 #line 2131 "parse.y" 06906 { 06907 /*%%%*/ 06908 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node)); 06909 /*% 06910 $$ = dispatch3(binary, $1, ID2SYM('-'), $3); 06911 %*/ 06912 } 06913 break; 06914 06915 case 210: 06916 /* Line 1787 of yacc.c */ 06917 #line 2139 "parse.y" 06918 { 06919 /*%%%*/ 06920 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node)); 06921 /*% 06922 $$ = dispatch3(binary, $1, ID2SYM('*'), $3); 06923 %*/ 06924 } 06925 break; 06926 06927 case 211: 06928 /* Line 1787 of yacc.c */ 06929 #line 2147 "parse.y" 06930 { 06931 /*%%%*/ 06932 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node)); 06933 /*% 06934 $$ = dispatch3(binary, $1, ID2SYM('/'), $3); 06935 %*/ 06936 } 06937 break; 06938 06939 case 212: 06940 /* Line 1787 of yacc.c */ 06941 #line 2155 "parse.y" 06942 { 06943 /*%%%*/ 06944 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node)); 06945 /*% 06946 $$ = dispatch3(binary, $1, ID2SYM('%'), $3); 06947 %*/ 06948 } 06949 break; 06950 06951 case 213: 06952 /* Line 1787 of yacc.c */ 06953 #line 2163 "parse.y" 06954 { 06955 /*%%%*/ 06956 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tPOW, (yyvsp[(3) - (3)].node)); 06957 /*% 06958 $$ = dispatch3(binary, $1, ripper_intern("**"), $3); 06959 %*/ 06960 } 06961 break; 06962 06963 case 214: 06964 /* Line 1787 of yacc.c */ 06965 #line 2171 "parse.y" 06966 { 06967 /*%%%*/ 06968 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 06969 /*% 06970 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 06971 $$ = dispatch2(unary, ripper_intern("-@"), $$); 06972 %*/ 06973 } 06974 break; 06975 06976 case 215: 06977 /* Line 1787 of yacc.c */ 06978 #line 2180 "parse.y" 06979 { 06980 /*%%%*/ 06981 (yyval.node) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].node), tPOW, (yyvsp[(4) - (4)].node)), tUMINUS, 0); 06982 /*% 06983 $$ = dispatch3(binary, $2, ripper_intern("**"), $4); 06984 $$ = dispatch2(unary, ripper_intern("-@"), $$); 06985 %*/ 06986 } 06987 break; 06988 06989 case 216: 06990 /* Line 1787 of yacc.c */ 06991 #line 2189 "parse.y" 06992 { 06993 /*%%%*/ 06994 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUPLUS); 06995 /*% 06996 $$ = dispatch2(unary, ripper_intern("+@"), $2); 06997 %*/ 06998 } 06999 break; 07000 07001 case 217: 07002 /* Line 1787 of yacc.c */ 07003 #line 2197 "parse.y" 07004 { 07005 /*%%%*/ 07006 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), tUMINUS); 07007 /*% 07008 $$ = dispatch2(unary, ripper_intern("-@"), $2); 07009 %*/ 07010 } 07011 break; 07012 07013 case 218: 07014 /* Line 1787 of yacc.c */ 07015 #line 2205 "parse.y" 07016 { 07017 /*%%%*/ 07018 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node)); 07019 /*% 07020 $$ = dispatch3(binary, $1, ID2SYM('|'), $3); 07021 %*/ 07022 } 07023 break; 07024 07025 case 219: 07026 /* Line 1787 of yacc.c */ 07027 #line 2213 "parse.y" 07028 { 07029 /*%%%*/ 07030 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node)); 07031 /*% 07032 $$ = dispatch3(binary, $1, ID2SYM('^'), $3); 07033 %*/ 07034 } 07035 break; 07036 07037 case 220: 07038 /* Line 1787 of yacc.c */ 07039 #line 2221 "parse.y" 07040 { 07041 /*%%%*/ 07042 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node)); 07043 /*% 07044 $$ = dispatch3(binary, $1, ID2SYM('&'), $3); 07045 %*/ 07046 } 07047 break; 07048 07049 case 221: 07050 /* Line 1787 of yacc.c */ 07051 #line 2229 "parse.y" 07052 { 07053 /*%%%*/ 07054 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tCMP, (yyvsp[(3) - (3)].node)); 07055 /*% 07056 $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3); 07057 %*/ 07058 } 07059 break; 07060 07061 case 222: 07062 /* Line 1787 of yacc.c */ 07063 #line 2237 "parse.y" 07064 { 07065 /*%%%*/ 07066 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '>', (yyvsp[(3) - (3)].node)); 07067 /*% 07068 $$ = dispatch3(binary, $1, ID2SYM('>'), $3); 07069 %*/ 07070 } 07071 break; 07072 07073 case 223: 07074 /* Line 1787 of yacc.c */ 07075 #line 2245 "parse.y" 07076 { 07077 /*%%%*/ 07078 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tGEQ, (yyvsp[(3) - (3)].node)); 07079 /*% 07080 $$ = dispatch3(binary, $1, ripper_intern(">="), $3); 07081 %*/ 07082 } 07083 break; 07084 07085 case 224: 07086 /* Line 1787 of yacc.c */ 07087 #line 2253 "parse.y" 07088 { 07089 /*%%%*/ 07090 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '<', (yyvsp[(3) - (3)].node)); 07091 /*% 07092 $$ = dispatch3(binary, $1, ID2SYM('<'), $3); 07093 %*/ 07094 } 07095 break; 07096 07097 case 225: 07098 /* Line 1787 of yacc.c */ 07099 #line 2261 "parse.y" 07100 { 07101 /*%%%*/ 07102 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLEQ, (yyvsp[(3) - (3)].node)); 07103 /*% 07104 $$ = dispatch3(binary, $1, ripper_intern("<="), $3); 07105 %*/ 07106 } 07107 break; 07108 07109 case 226: 07110 /* Line 1787 of yacc.c */ 07111 #line 2269 "parse.y" 07112 { 07113 /*%%%*/ 07114 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQ, (yyvsp[(3) - (3)].node)); 07115 /*% 07116 $$ = dispatch3(binary, $1, ripper_intern("=="), $3); 07117 %*/ 07118 } 07119 break; 07120 07121 case 227: 07122 /* Line 1787 of yacc.c */ 07123 #line 2277 "parse.y" 07124 { 07125 /*%%%*/ 07126 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tEQQ, (yyvsp[(3) - (3)].node)); 07127 /*% 07128 $$ = dispatch3(binary, $1, ripper_intern("==="), $3); 07129 %*/ 07130 } 07131 break; 07132 07133 case 228: 07134 /* Line 1787 of yacc.c */ 07135 #line 2285 "parse.y" 07136 { 07137 /*%%%*/ 07138 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNEQ, (yyvsp[(3) - (3)].node)); 07139 /*% 07140 $$ = dispatch3(binary, $1, ripper_intern("!="), $3); 07141 %*/ 07142 } 07143 break; 07144 07145 case 229: 07146 /* Line 1787 of yacc.c */ 07147 #line 2293 "parse.y" 07148 { 07149 /*%%%*/ 07150 (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07151 if (nd_type((yyvsp[(1) - (3)].node)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].node)->nd_lit) == T_REGEXP) { 07152 (yyval.node) = reg_named_capture_assign((yyvsp[(1) - (3)].node)->nd_lit, (yyval.node)); 07153 } 07154 /*% 07155 $$ = dispatch3(binary, $1, ripper_intern("=~"), $3); 07156 %*/ 07157 } 07158 break; 07159 07160 case 230: 07161 /* Line 1787 of yacc.c */ 07162 #line 2304 "parse.y" 07163 { 07164 /*%%%*/ 07165 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tNMATCH, (yyvsp[(3) - (3)].node)); 07166 /*% 07167 $$ = dispatch3(binary, $1, ripper_intern("!~"), $3); 07168 %*/ 07169 } 07170 break; 07171 07172 case 231: 07173 /* Line 1787 of yacc.c */ 07174 #line 2312 "parse.y" 07175 { 07176 /*%%%*/ 07177 (yyval.node) = call_uni_op(cond((yyvsp[(2) - (2)].node)), '!'); 07178 /*% 07179 $$ = dispatch2(unary, ID2SYM('!'), $2); 07180 %*/ 07181 } 07182 break; 07183 07184 case 232: 07185 /* Line 1787 of yacc.c */ 07186 #line 2320 "parse.y" 07187 { 07188 /*%%%*/ 07189 (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~'); 07190 /*% 07191 $$ = dispatch2(unary, ID2SYM('~'), $2); 07192 %*/ 07193 } 07194 break; 07195 07196 case 233: 07197 /* Line 1787 of yacc.c */ 07198 #line 2328 "parse.y" 07199 { 07200 /*%%%*/ 07201 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tLSHFT, (yyvsp[(3) - (3)].node)); 07202 /*% 07203 $$ = dispatch3(binary, $1, ripper_intern("<<"), $3); 07204 %*/ 07205 } 07206 break; 07207 07208 case 234: 07209 /* Line 1787 of yacc.c */ 07210 #line 2336 "parse.y" 07211 { 07212 /*%%%*/ 07213 (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), tRSHFT, (yyvsp[(3) - (3)].node)); 07214 /*% 07215 $$ = dispatch3(binary, $1, ripper_intern(">>"), $3); 07216 %*/ 07217 } 07218 break; 07219 07220 case 235: 07221 /* Line 1787 of yacc.c */ 07222 #line 2344 "parse.y" 07223 { 07224 /*%%%*/ 07225 (yyval.node) = logop(NODE_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07226 /*% 07227 $$ = dispatch3(binary, $1, ripper_intern("&&"), $3); 07228 %*/ 07229 } 07230 break; 07231 07232 case 236: 07233 /* Line 1787 of yacc.c */ 07234 #line 2352 "parse.y" 07235 { 07236 /*%%%*/ 07237 (yyval.node) = logop(NODE_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07238 /*% 07239 $$ = dispatch3(binary, $1, ripper_intern("||"), $3); 07240 %*/ 07241 } 07242 break; 07243 07244 case 237: 07245 /* Line 1787 of yacc.c */ 07246 #line 2359 "parse.y" 07247 {in_defined = 1;} 07248 break; 07249 07250 case 238: 07251 /* Line 1787 of yacc.c */ 07252 #line 2360 "parse.y" 07253 { 07254 /*%%%*/ 07255 in_defined = 0; 07256 (yyval.node) = NEW_DEFINED((yyvsp[(4) - (4)].node)); 07257 /*% 07258 in_defined = 0; 07259 $$ = dispatch1(defined, $4); 07260 %*/ 07261 } 07262 break; 07263 07264 case 239: 07265 /* Line 1787 of yacc.c */ 07266 #line 2370 "parse.y" 07267 { 07268 /*%%%*/ 07269 value_expr((yyvsp[(1) - (6)].node)); 07270 (yyval.node) = NEW_IF(cond((yyvsp[(1) - (6)].node)), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node)); 07271 fixpos((yyval.node), (yyvsp[(1) - (6)].node)); 07272 /*% 07273 $$ = dispatch3(ifop, $1, $3, $6); 07274 %*/ 07275 } 07276 break; 07277 07278 case 240: 07279 /* Line 1787 of yacc.c */ 07280 #line 2380 "parse.y" 07281 { 07282 (yyval.node) = (yyvsp[(1) - (1)].node); 07283 } 07284 break; 07285 07286 case 241: 07287 /* Line 1787 of yacc.c */ 07288 #line 2386 "parse.y" 07289 { 07290 /*%%%*/ 07291 value_expr((yyvsp[(1) - (1)].node)); 07292 (yyval.node) = (yyvsp[(1) - (1)].node); 07293 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 07294 /*% 07295 $$ = $1; 07296 %*/ 07297 } 07298 break; 07299 07300 case 243: 07301 /* Line 1787 of yacc.c */ 07302 #line 2399 "parse.y" 07303 { 07304 (yyval.node) = (yyvsp[(1) - (2)].node); 07305 } 07306 break; 07307 07308 case 244: 07309 /* Line 1787 of yacc.c */ 07310 #line 2403 "parse.y" 07311 { 07312 /*%%%*/ 07313 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07314 /*% 07315 $$ = arg_add_assocs($1, $3); 07316 %*/ 07317 } 07318 break; 07319 07320 case 245: 07321 /* Line 1787 of yacc.c */ 07322 #line 2411 "parse.y" 07323 { 07324 /*%%%*/ 07325 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07326 /*% 07327 $$ = arg_add_assocs(arg_new(), $1); 07328 %*/ 07329 } 07330 break; 07331 07332 case 246: 07333 /* Line 1787 of yacc.c */ 07334 #line 2421 "parse.y" 07335 { 07336 /*%%%*/ 07337 (yyval.node) = (yyvsp[(2) - (3)].node); 07338 /*% 07339 $$ = dispatch1(arg_paren, escape_Qundef($2)); 07340 %*/ 07341 } 07342 break; 07343 07344 case 251: 07345 /* Line 1787 of yacc.c */ 07346 #line 2437 "parse.y" 07347 { 07348 (yyval.node) = (yyvsp[(1) - (2)].node); 07349 } 07350 break; 07351 07352 case 252: 07353 /* Line 1787 of yacc.c */ 07354 #line 2441 "parse.y" 07355 { 07356 /*%%%*/ 07357 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07358 /*% 07359 $$ = arg_add_assocs($1, $3); 07360 %*/ 07361 } 07362 break; 07363 07364 case 253: 07365 /* Line 1787 of yacc.c */ 07366 #line 2449 "parse.y" 07367 { 07368 /*%%%*/ 07369 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07370 /*% 07371 $$ = arg_add_assocs(arg_new(), $1); 07372 %*/ 07373 } 07374 break; 07375 07376 case 254: 07377 /* Line 1787 of yacc.c */ 07378 #line 2459 "parse.y" 07379 { 07380 /*%%%*/ 07381 value_expr((yyvsp[(1) - (1)].node)); 07382 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07383 /*% 07384 $$ = arg_add(arg_new(), $1); 07385 %*/ 07386 } 07387 break; 07388 07389 case 255: 07390 /* Line 1787 of yacc.c */ 07391 #line 2468 "parse.y" 07392 { 07393 /*%%%*/ 07394 (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 07395 /*% 07396 $$ = arg_add_optblock($1, $2); 07397 %*/ 07398 } 07399 break; 07400 07401 case 256: 07402 /* Line 1787 of yacc.c */ 07403 #line 2476 "parse.y" 07404 { 07405 /*%%%*/ 07406 (yyval.node) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].node))); 07407 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node)); 07408 /*% 07409 $$ = arg_add_assocs(arg_new(), $1); 07410 $$ = arg_add_optblock($$, $2); 07411 %*/ 07412 } 07413 break; 07414 07415 case 257: 07416 /* Line 1787 of yacc.c */ 07417 #line 2486 "parse.y" 07418 { 07419 /*%%%*/ 07420 (yyval.node) = arg_append((yyvsp[(1) - (4)].node), NEW_HASH((yyvsp[(3) - (4)].node))); 07421 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node)); 07422 /*% 07423 $$ = arg_add_optblock(arg_add_assocs($1, $3), $4); 07424 %*/ 07425 } 07426 break; 07427 07428 case 259: 07429 /* Line 1787 of yacc.c */ 07430 #line 2503 "parse.y" 07431 { 07432 (yyval.val) = cmdarg_stack; 07433 CMDARG_PUSH(1); 07434 } 07435 break; 07436 07437 case 260: 07438 /* Line 1787 of yacc.c */ 07439 #line 2508 "parse.y" 07440 { 07441 /* CMDARG_POP() */ 07442 cmdarg_stack = (yyvsp[(1) - (2)].val); 07443 (yyval.node) = (yyvsp[(2) - (2)].node); 07444 } 07445 break; 07446 07447 case 261: 07448 /* Line 1787 of yacc.c */ 07449 #line 2516 "parse.y" 07450 { 07451 /*%%%*/ 07452 (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node)); 07453 /*% 07454 $$ = $2; 07455 %*/ 07456 } 07457 break; 07458 07459 case 262: 07460 /* Line 1787 of yacc.c */ 07461 #line 2526 "parse.y" 07462 { 07463 (yyval.node) = (yyvsp[(2) - (2)].node); 07464 } 07465 break; 07466 07467 case 263: 07468 /* Line 1787 of yacc.c */ 07469 #line 2530 "parse.y" 07470 { 07471 (yyval.node) = 0; 07472 } 07473 break; 07474 07475 case 264: 07476 /* Line 1787 of yacc.c */ 07477 #line 2536 "parse.y" 07478 { 07479 /*%%%*/ 07480 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 07481 /*% 07482 $$ = arg_add(arg_new(), $1); 07483 %*/ 07484 } 07485 break; 07486 07487 case 265: 07488 /* Line 1787 of yacc.c */ 07489 #line 2544 "parse.y" 07490 { 07491 /*%%%*/ 07492 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07493 /*% 07494 $$ = arg_add_star(arg_new(), $2); 07495 %*/ 07496 } 07497 break; 07498 07499 case 266: 07500 /* Line 1787 of yacc.c */ 07501 #line 2552 "parse.y" 07502 { 07503 /*%%%*/ 07504 NODE *n1; 07505 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07506 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07507 } 07508 else { 07509 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07510 } 07511 /*% 07512 $$ = arg_add($1, $3); 07513 %*/ 07514 } 07515 break; 07516 07517 case 267: 07518 /* Line 1787 of yacc.c */ 07519 #line 2566 "parse.y" 07520 { 07521 /*%%%*/ 07522 NODE *n1; 07523 if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07524 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07525 } 07526 else { 07527 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07528 } 07529 /*% 07530 $$ = arg_add_star($1, $4); 07531 %*/ 07532 } 07533 break; 07534 07535 case 268: 07536 /* Line 1787 of yacc.c */ 07537 #line 2582 "parse.y" 07538 { 07539 /*%%%*/ 07540 NODE *n1; 07541 if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) { 07542 (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node)); 07543 } 07544 else { 07545 (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 07546 } 07547 /*% 07548 $$ = mrhs_add(args2mrhs($1), $3); 07549 %*/ 07550 } 07551 break; 07552 07553 case 269: 07554 /* Line 1787 of yacc.c */ 07555 #line 2596 "parse.y" 07556 { 07557 /*%%%*/ 07558 NODE *n1; 07559 if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY && 07560 (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) { 07561 (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node)); 07562 } 07563 else { 07564 (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); 07565 } 07566 /*% 07567 $$ = mrhs_add_star(args2mrhs($1), $4); 07568 %*/ 07569 } 07570 break; 07571 07572 case 270: 07573 /* Line 1787 of yacc.c */ 07574 #line 2611 "parse.y" 07575 { 07576 /*%%%*/ 07577 (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node)); 07578 /*% 07579 $$ = mrhs_add_star(mrhs_new(), $2); 07580 %*/ 07581 } 07582 break; 07583 07584 case 279: 07585 /* Line 1787 of yacc.c */ 07586 #line 2629 "parse.y" 07587 { 07588 /*%%%*/ 07589 (yyval.node) = NEW_FCALL((yyvsp[(1) - (1)].id), 0); 07590 /*% 07591 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07592 %*/ 07593 } 07594 break; 07595 07596 case 280: 07597 /* Line 1787 of yacc.c */ 07598 #line 2637 "parse.y" 07599 { 07600 /*%%%*/ 07601 (yyval.num) = ruby_sourceline; 07602 /*% 07603 %*/ 07604 } 07605 break; 07606 07607 case 281: 07608 /* Line 1787 of yacc.c */ 07609 #line 2645 "parse.y" 07610 { 07611 /*%%%*/ 07612 if ((yyvsp[(3) - (4)].node) == NULL) { 07613 (yyval.node) = NEW_NIL(); 07614 } 07615 else { 07616 if (nd_type((yyvsp[(3) - (4)].node)) == NODE_RESCUE || 07617 nd_type((yyvsp[(3) - (4)].node)) == NODE_ENSURE) 07618 nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num)); 07619 (yyval.node) = NEW_BEGIN((yyvsp[(3) - (4)].node)); 07620 } 07621 nd_set_line((yyval.node), (yyvsp[(2) - (4)].num)); 07622 /*% 07623 $$ = dispatch1(begin, $3); 07624 %*/ 07625 } 07626 break; 07627 07628 case 282: 07629 /* Line 1787 of yacc.c */ 07630 #line 2661 "parse.y" 07631 {lex_state = EXPR_ENDARG;} 07632 break; 07633 07634 case 283: 07635 /* Line 1787 of yacc.c */ 07636 #line 2662 "parse.y" 07637 { 07638 rb_warning0("(...) interpreted as grouped expression"); 07639 /*%%%*/ 07640 (yyval.node) = (yyvsp[(2) - (4)].node); 07641 /*% 07642 $$ = dispatch1(paren, $2); 07643 %*/ 07644 } 07645 break; 07646 07647 case 284: 07648 /* Line 1787 of yacc.c */ 07649 #line 2671 "parse.y" 07650 { 07651 /*%%%*/ 07652 (yyval.node) = (yyvsp[(2) - (3)].node); 07653 /*% 07654 $$ = dispatch1(paren, $2); 07655 %*/ 07656 } 07657 break; 07658 07659 case 285: 07660 /* Line 1787 of yacc.c */ 07661 #line 2679 "parse.y" 07662 { 07663 /*%%%*/ 07664 (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id)); 07665 /*% 07666 $$ = dispatch2(const_path_ref, $1, $3); 07667 %*/ 07668 } 07669 break; 07670 07671 case 286: 07672 /* Line 1787 of yacc.c */ 07673 #line 2687 "parse.y" 07674 { 07675 /*%%%*/ 07676 (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id)); 07677 /*% 07678 $$ = dispatch1(top_const_ref, $2); 07679 %*/ 07680 } 07681 break; 07682 07683 case 287: 07684 /* Line 1787 of yacc.c */ 07685 #line 2695 "parse.y" 07686 { 07687 /*%%%*/ 07688 if ((yyvsp[(2) - (3)].node) == 0) { 07689 (yyval.node) = NEW_ZARRAY(); /* zero length array*/ 07690 } 07691 else { 07692 (yyval.node) = (yyvsp[(2) - (3)].node); 07693 } 07694 /*% 07695 $$ = dispatch1(array, escape_Qundef($2)); 07696 %*/ 07697 } 07698 break; 07699 07700 case 288: 07701 /* Line 1787 of yacc.c */ 07702 #line 2708 "parse.y" 07703 { 07704 /*%%%*/ 07705 (yyval.node) = NEW_HASH((yyvsp[(2) - (3)].node)); 07706 /*% 07707 $$ = dispatch1(hash, escape_Qundef($2)); 07708 %*/ 07709 } 07710 break; 07711 07712 case 289: 07713 /* Line 1787 of yacc.c */ 07714 #line 2716 "parse.y" 07715 { 07716 /*%%%*/ 07717 (yyval.node) = NEW_RETURN(0); 07718 /*% 07719 $$ = dispatch0(return0); 07720 %*/ 07721 } 07722 break; 07723 07724 case 290: 07725 /* Line 1787 of yacc.c */ 07726 #line 2724 "parse.y" 07727 { 07728 /*%%%*/ 07729 (yyval.node) = new_yield((yyvsp[(3) - (4)].node)); 07730 /*% 07731 $$ = dispatch1(yield, dispatch1(paren, $3)); 07732 %*/ 07733 } 07734 break; 07735 07736 case 291: 07737 /* Line 1787 of yacc.c */ 07738 #line 2732 "parse.y" 07739 { 07740 /*%%%*/ 07741 (yyval.node) = NEW_YIELD(0, Qfalse); 07742 /*% 07743 $$ = dispatch1(yield, dispatch1(paren, arg_new())); 07744 %*/ 07745 } 07746 break; 07747 07748 case 292: 07749 /* Line 1787 of yacc.c */ 07750 #line 2740 "parse.y" 07751 { 07752 /*%%%*/ 07753 (yyval.node) = NEW_YIELD(0, Qfalse); 07754 /*% 07755 $$ = dispatch0(yield0); 07756 %*/ 07757 } 07758 break; 07759 07760 case 293: 07761 /* Line 1787 of yacc.c */ 07762 #line 2747 "parse.y" 07763 {in_defined = 1;} 07764 break; 07765 07766 case 294: 07767 /* Line 1787 of yacc.c */ 07768 #line 2748 "parse.y" 07769 { 07770 /*%%%*/ 07771 in_defined = 0; 07772 (yyval.node) = NEW_DEFINED((yyvsp[(5) - (6)].node)); 07773 /*% 07774 in_defined = 0; 07775 $$ = dispatch1(defined, $5); 07776 %*/ 07777 } 07778 break; 07779 07780 case 295: 07781 /* Line 1787 of yacc.c */ 07782 #line 2758 "parse.y" 07783 { 07784 /*%%%*/ 07785 (yyval.node) = call_uni_op(cond((yyvsp[(3) - (4)].node)), '!'); 07786 /*% 07787 $$ = dispatch2(unary, ripper_intern("not"), $3); 07788 %*/ 07789 } 07790 break; 07791 07792 case 296: 07793 /* Line 1787 of yacc.c */ 07794 #line 2766 "parse.y" 07795 { 07796 /*%%%*/ 07797 (yyval.node) = call_uni_op(cond(NEW_NIL()), '!'); 07798 /*% 07799 $$ = dispatch2(unary, ripper_intern("not"), Qnil); 07800 %*/ 07801 } 07802 break; 07803 07804 case 297: 07805 /* Line 1787 of yacc.c */ 07806 #line 2774 "parse.y" 07807 { 07808 /*%%%*/ 07809 (yyvsp[(2) - (2)].node)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].id), 0); 07810 (yyval.node) = (yyvsp[(2) - (2)].node); 07811 fixpos((yyvsp[(2) - (2)].node)->nd_iter, (yyvsp[(2) - (2)].node)); 07812 /*% 07813 $$ = method_arg(dispatch1(fcall, $1), arg_new()); 07814 $$ = method_add_block($$, $2); 07815 %*/ 07816 } 07817 break; 07818 07819 case 299: 07820 /* Line 1787 of yacc.c */ 07821 #line 2786 "parse.y" 07822 { 07823 /*%%%*/ 07824 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 07825 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 07826 (yyval.node) = (yyvsp[(2) - (2)].node); 07827 fixpos((yyval.node), (yyvsp[(1) - (2)].node)); 07828 /*% 07829 $$ = method_add_block($1, $2); 07830 %*/ 07831 } 07832 break; 07833 07834 case 300: 07835 /* Line 1787 of yacc.c */ 07836 #line 2797 "parse.y" 07837 { 07838 (yyval.node) = (yyvsp[(2) - (2)].node); 07839 } 07840 break; 07841 07842 case 301: 07843 /* Line 1787 of yacc.c */ 07844 #line 2804 "parse.y" 07845 { 07846 /*%%%*/ 07847 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 07848 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 07849 /*% 07850 $$ = dispatch3(if, $2, $4, escape_Qundef($5)); 07851 %*/ 07852 } 07853 break; 07854 07855 case 302: 07856 /* Line 1787 of yacc.c */ 07857 #line 2816 "parse.y" 07858 { 07859 /*%%%*/ 07860 (yyval.node) = NEW_UNLESS(cond((yyvsp[(2) - (6)].node)), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node)); 07861 fixpos((yyval.node), (yyvsp[(2) - (6)].node)); 07862 /*% 07863 $$ = dispatch3(unless, $2, $4, escape_Qundef($5)); 07864 %*/ 07865 } 07866 break; 07867 07868 case 303: 07869 /* Line 1787 of yacc.c */ 07870 #line 2824 "parse.y" 07871 {COND_PUSH(1);} 07872 break; 07873 07874 case 304: 07875 /* Line 1787 of yacc.c */ 07876 #line 2824 "parse.y" 07877 {COND_POP();} 07878 break; 07879 07880 case 305: 07881 /* Line 1787 of yacc.c */ 07882 #line 2827 "parse.y" 07883 { 07884 /*%%%*/ 07885 (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 07886 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 07887 /*% 07888 $$ = dispatch2(while, $3, $6); 07889 %*/ 07890 } 07891 break; 07892 07893 case 306: 07894 /* Line 1787 of yacc.c */ 07895 #line 2835 "parse.y" 07896 {COND_PUSH(1);} 07897 break; 07898 07899 case 307: 07900 /* Line 1787 of yacc.c */ 07901 #line 2835 "parse.y" 07902 {COND_POP();} 07903 break; 07904 07905 case 308: 07906 /* Line 1787 of yacc.c */ 07907 #line 2838 "parse.y" 07908 { 07909 /*%%%*/ 07910 (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node)), (yyvsp[(6) - (7)].node), 1); 07911 fixpos((yyval.node), (yyvsp[(3) - (7)].node)); 07912 /*% 07913 $$ = dispatch2(until, $3, $6); 07914 %*/ 07915 } 07916 break; 07917 07918 case 309: 07919 /* Line 1787 of yacc.c */ 07920 #line 2849 "parse.y" 07921 { 07922 /*%%%*/ 07923 (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 07924 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 07925 /*% 07926 $$ = dispatch2(case, $2, $4); 07927 %*/ 07928 } 07929 break; 07930 07931 case 310: 07932 /* Line 1787 of yacc.c */ 07933 #line 2858 "parse.y" 07934 { 07935 /*%%%*/ 07936 (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node)); 07937 /*% 07938 $$ = dispatch2(case, Qnil, $3); 07939 %*/ 07940 } 07941 break; 07942 07943 case 311: 07944 /* Line 1787 of yacc.c */ 07945 #line 2866 "parse.y" 07946 {COND_PUSH(1);} 07947 break; 07948 07949 case 312: 07950 /* Line 1787 of yacc.c */ 07951 #line 2868 "parse.y" 07952 {COND_POP();} 07953 break; 07954 07955 case 313: 07956 /* Line 1787 of yacc.c */ 07957 #line 2871 "parse.y" 07958 { 07959 /*%%%*/ 07960 /* 07961 * for a, b, c in e 07962 * #=> 07963 * e.each{|*x| a, b, c = x 07964 * 07965 * for a in e 07966 * #=> 07967 * e.each{|x| a, = x} 07968 */ 07969 ID id = internal_id(); 07970 ID *tbl = ALLOC_N(ID, 2); 07971 NODE *m = NEW_ARGS_AUX(0, 0); 07972 NODE *args, *scope; 07973 07974 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_MASGN) { 07975 /* if args.length == 1 && args[0].kind_of?(Array) 07976 * args = args[0] 07977 * end 07978 */ 07979 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 07980 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 07981 m->nd_next = block_append( 07982 NEW_IF( 07983 NEW_NODE(NODE_AND, 07984 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), 07985 rb_intern("=="), one), 07986 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), 07987 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 07988 0), 07989 NEW_DASGN_CURR(id, 07990 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), 07991 0), 07992 node_assign((yyvsp[(2) - (9)].node), NEW_DVAR(id))); 07993 07994 args = new_args(m, 0, id, 0, 0); 07995 } 07996 else { 07997 if (nd_type((yyvsp[(2) - (9)].node)) == NODE_LASGN || 07998 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN || 07999 nd_type((yyvsp[(2) - (9)].node)) == NODE_DASGN_CURR) { 08000 (yyvsp[(2) - (9)].node)->nd_value = NEW_DVAR(id); 08001 m->nd_plen = 1; 08002 m->nd_next = (yyvsp[(2) - (9)].node); 08003 args = new_args(m, 0, 0, 0, 0); 08004 } 08005 else { 08006 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].node)), 0), NEW_DVAR(id)); 08007 args = new_args(m, 0, id, 0, 0); 08008 } 08009 } 08010 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args); 08011 tbl[0] = 1; tbl[1] = id; 08012 (yyval.node) = NEW_FOR(0, (yyvsp[(5) - (9)].node), scope); 08013 fixpos((yyval.node), (yyvsp[(2) - (9)].node)); 08014 /*% 08015 $$ = dispatch3(for, $2, $5, $8); 08016 %*/ 08017 } 08018 break; 08019 08020 case 314: 08021 /* Line 1787 of yacc.c */ 08022 #line 2932 "parse.y" 08023 { 08024 if (in_def || in_single) 08025 yyerror("class definition in method body"); 08026 local_push(0); 08027 /*%%%*/ 08028 (yyval.num) = ruby_sourceline; 08029 /*% 08030 %*/ 08031 } 08032 break; 08033 08034 case 315: 08035 /* Line 1787 of yacc.c */ 08036 #line 2943 "parse.y" 08037 { 08038 /*%%%*/ 08039 (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node)); 08040 nd_set_line((yyval.node), (yyvsp[(4) - (6)].num)); 08041 /*% 08042 $$ = dispatch3(class, $2, $3, $5); 08043 %*/ 08044 local_pop(); 08045 } 08046 break; 08047 08048 case 316: 08049 /* Line 1787 of yacc.c */ 08050 #line 2953 "parse.y" 08051 { 08052 (yyval.num) = in_def; 08053 in_def = 0; 08054 } 08055 break; 08056 08057 case 317: 08058 /* Line 1787 of yacc.c */ 08059 #line 2958 "parse.y" 08060 { 08061 (yyval.num) = in_single; 08062 in_single = 0; 08063 local_push(0); 08064 } 08065 break; 08066 08067 case 318: 08068 /* Line 1787 of yacc.c */ 08069 #line 2965 "parse.y" 08070 { 08071 /*%%%*/ 08072 (yyval.node) = NEW_SCLASS((yyvsp[(3) - (8)].node), (yyvsp[(7) - (8)].node)); 08073 fixpos((yyval.node), (yyvsp[(3) - (8)].node)); 08074 /*% 08075 $$ = dispatch2(sclass, $3, $7); 08076 %*/ 08077 local_pop(); 08078 in_def = (yyvsp[(4) - (8)].num); 08079 in_single = (yyvsp[(6) - (8)].num); 08080 } 08081 break; 08082 08083 case 319: 08084 /* Line 1787 of yacc.c */ 08085 #line 2977 "parse.y" 08086 { 08087 if (in_def || in_single) 08088 yyerror("module definition in method body"); 08089 local_push(0); 08090 /*%%%*/ 08091 (yyval.num) = ruby_sourceline; 08092 /*% 08093 %*/ 08094 } 08095 break; 08096 08097 case 320: 08098 /* Line 1787 of yacc.c */ 08099 #line 2988 "parse.y" 08100 { 08101 /*%%%*/ 08102 (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node)); 08103 nd_set_line((yyval.node), (yyvsp[(3) - (5)].num)); 08104 /*% 08105 $$ = dispatch2(module, $2, $4); 08106 %*/ 08107 local_pop(); 08108 } 08109 break; 08110 08111 case 321: 08112 /* Line 1787 of yacc.c */ 08113 #line 2998 "parse.y" 08114 { 08115 (yyval.id) = cur_mid; 08116 cur_mid = (yyvsp[(2) - (2)].id); 08117 in_def++; 08118 local_push(0); 08119 } 08120 break; 08121 08122 case 322: 08123 /* Line 1787 of yacc.c */ 08124 #line 3007 "parse.y" 08125 { 08126 /*%%%*/ 08127 NODE *body = remove_begin((yyvsp[(5) - (6)].node)); 08128 reduce_nodes(&body); 08129 (yyval.node) = NEW_DEFN((yyvsp[(2) - (6)].id), (yyvsp[(4) - (6)].node), body, NOEX_PRIVATE); 08130 nd_set_line((yyval.node), (yyvsp[(1) - (6)].num)); 08131 /*% 08132 $$ = dispatch3(def, $2, $4, $5); 08133 %*/ 08134 local_pop(); 08135 in_def--; 08136 cur_mid = (yyvsp[(3) - (6)].id); 08137 } 08138 break; 08139 08140 case 323: 08141 /* Line 1787 of yacc.c */ 08142 #line 3020 "parse.y" 08143 {lex_state = EXPR_FNAME;} 08144 break; 08145 08146 case 324: 08147 /* Line 1787 of yacc.c */ 08148 #line 3021 "parse.y" 08149 { 08150 in_single++; 08151 lex_state = EXPR_ENDFN; /* force for args */ 08152 local_push(0); 08153 } 08154 break; 08155 08156 case 325: 08157 /* Line 1787 of yacc.c */ 08158 #line 3029 "parse.y" 08159 { 08160 /*%%%*/ 08161 NODE *body = remove_begin((yyvsp[(8) - (9)].node)); 08162 reduce_nodes(&body); 08163 (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body); 08164 nd_set_line((yyval.node), (yyvsp[(1) - (9)].num)); 08165 /*% 08166 $$ = dispatch5(defs, $2, $3, $5, $7, $8); 08167 %*/ 08168 local_pop(); 08169 in_single--; 08170 } 08171 break; 08172 08173 case 326: 08174 /* Line 1787 of yacc.c */ 08175 #line 3042 "parse.y" 08176 { 08177 /*%%%*/ 08178 (yyval.node) = NEW_BREAK(0); 08179 /*% 08180 $$ = dispatch1(break, arg_new()); 08181 %*/ 08182 } 08183 break; 08184 08185 case 327: 08186 /* Line 1787 of yacc.c */ 08187 #line 3050 "parse.y" 08188 { 08189 /*%%%*/ 08190 (yyval.node) = NEW_NEXT(0); 08191 /*% 08192 $$ = dispatch1(next, arg_new()); 08193 %*/ 08194 } 08195 break; 08196 08197 case 328: 08198 /* Line 1787 of yacc.c */ 08199 #line 3058 "parse.y" 08200 { 08201 /*%%%*/ 08202 (yyval.node) = NEW_REDO(); 08203 /*% 08204 $$ = dispatch0(redo); 08205 %*/ 08206 } 08207 break; 08208 08209 case 329: 08210 /* Line 1787 of yacc.c */ 08211 #line 3066 "parse.y" 08212 { 08213 /*%%%*/ 08214 (yyval.node) = NEW_RETRY(); 08215 /*% 08216 $$ = dispatch0(retry); 08217 %*/ 08218 } 08219 break; 08220 08221 case 330: 08222 /* Line 1787 of yacc.c */ 08223 #line 3076 "parse.y" 08224 { 08225 /*%%%*/ 08226 value_expr((yyvsp[(1) - (1)].node)); 08227 (yyval.node) = (yyvsp[(1) - (1)].node); 08228 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 08229 /*% 08230 $$ = $1; 08231 %*/ 08232 } 08233 break; 08234 08235 case 331: 08236 /* Line 1787 of yacc.c */ 08237 #line 3088 "parse.y" 08238 { 08239 token_info_push("begin"); 08240 } 08241 break; 08242 08243 case 332: 08244 /* Line 1787 of yacc.c */ 08245 #line 3094 "parse.y" 08246 { 08247 token_info_push("if"); 08248 } 08249 break; 08250 08251 case 333: 08252 /* Line 1787 of yacc.c */ 08253 #line 3100 "parse.y" 08254 { 08255 token_info_push("unless"); 08256 } 08257 break; 08258 08259 case 334: 08260 /* Line 1787 of yacc.c */ 08261 #line 3106 "parse.y" 08262 { 08263 token_info_push("while"); 08264 } 08265 break; 08266 08267 case 335: 08268 /* Line 1787 of yacc.c */ 08269 #line 3112 "parse.y" 08270 { 08271 token_info_push("until"); 08272 } 08273 break; 08274 08275 case 336: 08276 /* Line 1787 of yacc.c */ 08277 #line 3118 "parse.y" 08278 { 08279 token_info_push("case"); 08280 } 08281 break; 08282 08283 case 337: 08284 /* Line 1787 of yacc.c */ 08285 #line 3124 "parse.y" 08286 { 08287 token_info_push("for"); 08288 } 08289 break; 08290 08291 case 338: 08292 /* Line 1787 of yacc.c */ 08293 #line 3130 "parse.y" 08294 { 08295 token_info_push("class"); 08296 } 08297 break; 08298 08299 case 339: 08300 /* Line 1787 of yacc.c */ 08301 #line 3136 "parse.y" 08302 { 08303 token_info_push("module"); 08304 } 08305 break; 08306 08307 case 340: 08308 /* Line 1787 of yacc.c */ 08309 #line 3142 "parse.y" 08310 { 08311 token_info_push("def"); 08312 /*%%%*/ 08313 (yyval.num) = ruby_sourceline; 08314 /*% 08315 %*/ 08316 } 08317 break; 08318 08319 case 341: 08320 /* Line 1787 of yacc.c */ 08321 #line 3152 "parse.y" 08322 { 08323 token_info_pop("end"); 08324 } 08325 break; 08326 08327 case 348: 08328 /* Line 1787 of yacc.c */ 08329 #line 3182 "parse.y" 08330 { 08331 /*%%%*/ 08332 (yyval.node) = NEW_IF(cond((yyvsp[(2) - (5)].node)), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 08333 fixpos((yyval.node), (yyvsp[(2) - (5)].node)); 08334 /*% 08335 $$ = dispatch3(elsif, $2, $4, escape_Qundef($5)); 08336 %*/ 08337 } 08338 break; 08339 08340 case 350: 08341 /* Line 1787 of yacc.c */ 08342 #line 3194 "parse.y" 08343 { 08344 /*%%%*/ 08345 (yyval.node) = (yyvsp[(2) - (2)].node); 08346 /*% 08347 $$ = dispatch1(else, $2); 08348 %*/ 08349 } 08350 break; 08351 08352 case 353: 08353 /* Line 1787 of yacc.c */ 08354 #line 3208 "parse.y" 08355 { 08356 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 08357 /*%%%*/ 08358 /*% 08359 $$ = dispatch1(mlhs_paren, $$); 08360 %*/ 08361 } 08362 break; 08363 08364 case 354: 08365 /* Line 1787 of yacc.c */ 08366 #line 3216 "parse.y" 08367 { 08368 /*%%%*/ 08369 (yyval.node) = (yyvsp[(2) - (3)].node); 08370 /*% 08371 $$ = dispatch1(mlhs_paren, $2); 08372 %*/ 08373 } 08374 break; 08375 08376 case 355: 08377 /* Line 1787 of yacc.c */ 08378 #line 3226 "parse.y" 08379 { 08380 /*%%%*/ 08381 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 08382 /*% 08383 $$ = mlhs_add(mlhs_new(), $1); 08384 %*/ 08385 } 08386 break; 08387 08388 case 356: 08389 /* Line 1787 of yacc.c */ 08390 #line 3234 "parse.y" 08391 { 08392 /*%%%*/ 08393 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 08394 /*% 08395 $$ = mlhs_add($1, $3); 08396 %*/ 08397 } 08398 break; 08399 08400 case 357: 08401 /* Line 1787 of yacc.c */ 08402 #line 3244 "parse.y" 08403 { 08404 /*%%%*/ 08405 (yyval.node) = NEW_MASGN((yyvsp[(1) - (1)].node), 0); 08406 /*% 08407 $$ = $1; 08408 %*/ 08409 } 08410 break; 08411 08412 case 358: 08413 /* Line 1787 of yacc.c */ 08414 #line 3252 "parse.y" 08415 { 08416 (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0); 08417 /*%%%*/ 08418 (yyval.node) = NEW_MASGN((yyvsp[(1) - (4)].node), (yyval.node)); 08419 /*% 08420 $$ = mlhs_add_star($1, $$); 08421 %*/ 08422 } 08423 break; 08424 08425 case 359: 08426 /* Line 1787 of yacc.c */ 08427 #line 3261 "parse.y" 08428 { 08429 (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0); 08430 /*%%%*/ 08431 (yyval.node) = NEW_MASGN((yyvsp[(1) - (6)].node), NEW_POSTARG((yyval.node), (yyvsp[(6) - (6)].node))); 08432 /*% 08433 $$ = mlhs_add_star($1, $$); 08434 %*/ 08435 } 08436 break; 08437 08438 case 360: 08439 /* Line 1787 of yacc.c */ 08440 #line 3270 "parse.y" 08441 { 08442 /*%%%*/ 08443 (yyval.node) = NEW_MASGN((yyvsp[(1) - (3)].node), -1); 08444 /*% 08445 $$ = mlhs_add_star($1, Qnil); 08446 %*/ 08447 } 08448 break; 08449 08450 case 361: 08451 /* Line 1787 of yacc.c */ 08452 #line 3278 "parse.y" 08453 { 08454 /*%%%*/ 08455 (yyval.node) = NEW_MASGN((yyvsp[(1) - (5)].node), NEW_POSTARG(-1, (yyvsp[(5) - (5)].node))); 08456 /*% 08457 $$ = mlhs_add_star($1, $5); 08458 %*/ 08459 } 08460 break; 08461 08462 case 362: 08463 /* Line 1787 of yacc.c */ 08464 #line 3286 "parse.y" 08465 { 08466 (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0); 08467 /*%%%*/ 08468 (yyval.node) = NEW_MASGN(0, (yyval.node)); 08469 /*% 08470 $$ = mlhs_add_star(mlhs_new(), $$); 08471 %*/ 08472 } 08473 break; 08474 08475 case 363: 08476 /* Line 1787 of yacc.c */ 08477 #line 3295 "parse.y" 08478 { 08479 (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0); 08480 /*%%%*/ 08481 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyval.node), (yyvsp[(4) - (4)].node))); 08482 /*% 08483 #if 0 08484 TODO: Check me 08485 #endif 08486 $$ = mlhs_add_star($$, $4); 08487 %*/ 08488 } 08489 break; 08490 08491 case 364: 08492 /* Line 1787 of yacc.c */ 08493 #line 3307 "parse.y" 08494 { 08495 /*%%%*/ 08496 (yyval.node) = NEW_MASGN(0, -1); 08497 /*% 08498 $$ = mlhs_add_star(mlhs_new(), Qnil); 08499 %*/ 08500 } 08501 break; 08502 08503 case 365: 08504 /* Line 1787 of yacc.c */ 08505 #line 3315 "parse.y" 08506 { 08507 /*%%%*/ 08508 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].node))); 08509 /*% 08510 $$ = mlhs_add_star(mlhs_new(), Qnil); 08511 %*/ 08512 } 08513 break; 08514 08515 case 366: 08516 /* Line 1787 of yacc.c */ 08517 #line 3325 "parse.y" 08518 { 08519 /*%%%*/ 08520 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); 08521 /*% 08522 $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); 08523 %*/ 08524 } 08525 break; 08526 08527 case 367: 08528 /* Line 1787 of yacc.c */ 08529 #line 3333 "parse.y" 08530 { 08531 /*%%%*/ 08532 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id)); 08533 /*% 08534 $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); 08535 %*/ 08536 } 08537 break; 08538 08539 case 368: 08540 /* Line 1787 of yacc.c */ 08541 #line 3341 "parse.y" 08542 { 08543 /*%%%*/ 08544 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id)); 08545 /*% 08546 $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); 08547 %*/ 08548 } 08549 break; 08550 08551 case 369: 08552 /* Line 1787 of yacc.c */ 08553 #line 3349 "parse.y" 08554 { 08555 /*%%%*/ 08556 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 08557 /*% 08558 $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); 08559 %*/ 08560 } 08561 break; 08562 08563 case 370: 08564 /* Line 1787 of yacc.c */ 08565 #line 3357 "parse.y" 08566 { 08567 /*%%%*/ 08568 (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 08569 /*% 08570 $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); 08571 %*/ 08572 } 08573 break; 08574 08575 case 371: 08576 /* Line 1787 of yacc.c */ 08577 #line 3365 "parse.y" 08578 { 08579 /*%%%*/ 08580 (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 1, 0, 0); 08581 /*% 08582 $$ = params_new($1, Qnil, Qnil, Qnil, Qnil); 08583 dispatch1(excessed_comma, $$); 08584 %*/ 08585 } 08586 break; 08587 08588 case 372: 08589 /* Line 1787 of yacc.c */ 08590 #line 3374 "parse.y" 08591 { 08592 /*%%%*/ 08593 (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 08594 /*% 08595 $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); 08596 %*/ 08597 } 08598 break; 08599 08600 case 373: 08601 /* Line 1787 of yacc.c */ 08602 #line 3382 "parse.y" 08603 { 08604 /*%%%*/ 08605 (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id)); 08606 /*% 08607 $$ = params_new($1, Qnil,Qnil, Qnil, escape_Qundef($2)); 08608 %*/ 08609 } 08610 break; 08611 08612 case 374: 08613 /* Line 1787 of yacc.c */ 08614 #line 3390 "parse.y" 08615 { 08616 /*%%%*/ 08617 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 08618 /*% 08619 $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); 08620 %*/ 08621 } 08622 break; 08623 08624 case 375: 08625 /* Line 1787 of yacc.c */ 08626 #line 3398 "parse.y" 08627 { 08628 /*%%%*/ 08629 (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 08630 /*% 08631 $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); 08632 %*/ 08633 } 08634 break; 08635 08636 case 376: 08637 /* Line 1787 of yacc.c */ 08638 #line 3406 "parse.y" 08639 { 08640 /*%%%*/ 08641 (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id)); 08642 /*% 08643 $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); 08644 %*/ 08645 } 08646 break; 08647 08648 case 377: 08649 /* Line 1787 of yacc.c */ 08650 #line 3414 "parse.y" 08651 { 08652 /*%%%*/ 08653 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 08654 /*% 08655 $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); 08656 %*/ 08657 } 08658 break; 08659 08660 case 378: 08661 /* Line 1787 of yacc.c */ 08662 #line 3422 "parse.y" 08663 { 08664 /*%%%*/ 08665 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id)); 08666 /*% 08667 $$ = params_new(Qnil, Qnil, $1, Qnil, escape_Qundef($2)); 08668 %*/ 08669 } 08670 break; 08671 08672 case 379: 08673 /* Line 1787 of yacc.c */ 08674 #line 3430 "parse.y" 08675 { 08676 /*%%%*/ 08677 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 08678 /*% 08679 $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); 08680 %*/ 08681 } 08682 break; 08683 08684 case 380: 08685 /* Line 1787 of yacc.c */ 08686 #line 3438 "parse.y" 08687 { 08688 /*%%%*/ 08689 (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id)); 08690 /*% 08691 $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); 08692 %*/ 08693 } 08694 break; 08695 08696 case 382: 08697 /* Line 1787 of yacc.c */ 08698 #line 3449 "parse.y" 08699 { 08700 command_start = TRUE; 08701 } 08702 break; 08703 08704 case 383: 08705 /* Line 1787 of yacc.c */ 08706 #line 3455 "parse.y" 08707 { 08708 /*%%%*/ 08709 (yyval.node) = 0; 08710 /*% 08711 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08712 escape_Qundef($2)); 08713 %*/ 08714 } 08715 break; 08716 08717 case 384: 08718 /* Line 1787 of yacc.c */ 08719 #line 3464 "parse.y" 08720 { 08721 /*%%%*/ 08722 (yyval.node) = 0; 08723 /*% 08724 $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 08725 Qnil); 08726 %*/ 08727 } 08728 break; 08729 08730 case 385: 08731 /* Line 1787 of yacc.c */ 08732 #line 3473 "parse.y" 08733 { 08734 /*%%%*/ 08735 (yyval.node) = (yyvsp[(2) - (4)].node); 08736 /*% 08737 $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3)); 08738 %*/ 08739 } 08740 break; 08741 08742 case 387: 08743 /* Line 1787 of yacc.c */ 08744 #line 3485 "parse.y" 08745 { 08746 /*%%%*/ 08747 (yyval.node) = 0; 08748 /*% 08749 $$ = $2; 08750 %*/ 08751 } 08752 break; 08753 08754 case 390: 08755 /* Line 1787 of yacc.c */ 08756 #line 3511 "parse.y" 08757 { 08758 new_bv(get_id((yyvsp[(1) - (1)].id))); 08759 /*%%%*/ 08760 /*% 08761 $$ = get_value($1); 08762 %*/ 08763 } 08764 break; 08765 08766 case 391: 08767 /* Line 1787 of yacc.c */ 08768 #line 3519 "parse.y" 08769 { 08770 (yyval.node) = 0; 08771 } 08772 break; 08773 08774 case 392: 08775 /* Line 1787 of yacc.c */ 08776 #line 3524 "parse.y" 08777 { 08778 (yyval.vars) = dyna_push(); 08779 } 08780 break; 08781 08782 case 393: 08783 /* Line 1787 of yacc.c */ 08784 #line 3527 "parse.y" 08785 { 08786 (yyval.num) = lpar_beg; 08787 lpar_beg = ++paren_nest; 08788 } 08789 break; 08790 08791 case 394: 08792 /* Line 1787 of yacc.c */ 08793 #line 3533 "parse.y" 08794 { 08795 lpar_beg = (yyvsp[(2) - (4)].num); 08796 /*%%%*/ 08797 (yyval.node) = (yyvsp[(3) - (4)].node); 08798 (yyval.node)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].node)->nd_head, (yyvsp[(4) - (4)].node)); 08799 /*% 08800 $$ = dispatch2(lambda, $3, $4); 08801 %*/ 08802 dyna_pop((yyvsp[(1) - (4)].vars)); 08803 } 08804 break; 08805 08806 case 395: 08807 /* Line 1787 of yacc.c */ 08808 #line 3546 "parse.y" 08809 { 08810 /*%%%*/ 08811 (yyval.node) = NEW_LAMBDA((yyvsp[(2) - (4)].node)); 08812 /*% 08813 $$ = dispatch1(paren, $2); 08814 %*/ 08815 } 08816 break; 08817 08818 case 396: 08819 /* Line 1787 of yacc.c */ 08820 #line 3554 "parse.y" 08821 { 08822 /*%%%*/ 08823 (yyval.node) = NEW_LAMBDA((yyvsp[(1) - (1)].node)); 08824 /*% 08825 $$ = $1; 08826 %*/ 08827 } 08828 break; 08829 08830 case 397: 08831 /* Line 1787 of yacc.c */ 08832 #line 3564 "parse.y" 08833 { 08834 (yyval.node) = (yyvsp[(2) - (3)].node); 08835 } 08836 break; 08837 08838 case 398: 08839 /* Line 1787 of yacc.c */ 08840 #line 3568 "parse.y" 08841 { 08842 (yyval.node) = (yyvsp[(2) - (3)].node); 08843 } 08844 break; 08845 08846 case 399: 08847 /* Line 1787 of yacc.c */ 08848 #line 3574 "parse.y" 08849 { 08850 (yyvsp[(1) - (1)].vars) = dyna_push(); 08851 /*%%%*/ 08852 (yyval.num) = ruby_sourceline; 08853 /*% %*/ 08854 } 08855 break; 08856 08857 case 400: 08858 /* Line 1787 of yacc.c */ 08859 #line 3583 "parse.y" 08860 { 08861 /*%%%*/ 08862 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 08863 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 08864 /*% 08865 $$ = dispatch2(do_block, escape_Qundef($3), $4); 08866 %*/ 08867 dyna_pop((yyvsp[(1) - (5)].vars)); 08868 } 08869 break; 08870 08871 case 401: 08872 /* Line 1787 of yacc.c */ 08873 #line 3595 "parse.y" 08874 { 08875 /*%%%*/ 08876 if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) { 08877 compile_error(PARSER_ARG "block given to yield"); 08878 } 08879 else { 08880 block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node)); 08881 } 08882 (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node); 08883 (yyval.node) = (yyvsp[(2) - (2)].node); 08884 fixpos((yyval.node), (yyvsp[(1) - (2)].node)); 08885 /*% 08886 $$ = method_add_block($1, $2); 08887 %*/ 08888 } 08889 break; 08890 08891 case 402: 08892 /* Line 1787 of yacc.c */ 08893 #line 3611 "parse.y" 08894 { 08895 /*%%%*/ 08896 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08897 /*% 08898 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08899 $$ = method_optarg($$, $4); 08900 %*/ 08901 } 08902 break; 08903 08904 case 403: 08905 /* Line 1787 of yacc.c */ 08906 #line 3620 "parse.y" 08907 { 08908 /*%%%*/ 08909 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08910 /*% 08911 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 08912 $$ = method_optarg($$, $4); 08913 %*/ 08914 } 08915 break; 08916 08917 case 404: 08918 /* Line 1787 of yacc.c */ 08919 #line 3631 "parse.y" 08920 { 08921 /*%%%*/ 08922 (yyval.node) = NEW_FCALL((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node)); 08923 fixpos((yyval.node), (yyvsp[(2) - (2)].node)); 08924 /*% 08925 $$ = method_arg(dispatch1(fcall, $1), $2); 08926 %*/ 08927 } 08928 break; 08929 08930 case 405: 08931 /* Line 1787 of yacc.c */ 08932 #line 3640 "parse.y" 08933 { 08934 /*%%%*/ 08935 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08936 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 08937 /*% 08938 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08939 $$ = method_optarg($$, $4); 08940 %*/ 08941 } 08942 break; 08943 08944 case 406: 08945 /* Line 1787 of yacc.c */ 08946 #line 3650 "parse.y" 08947 { 08948 /*%%%*/ 08949 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node)); 08950 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 08951 /*% 08952 $$ = dispatch3(call, $1, ripper_id2sym('.'), $3); 08953 $$ = method_optarg($$, $4); 08954 %*/ 08955 } 08956 break; 08957 08958 case 407: 08959 /* Line 1787 of yacc.c */ 08960 #line 3660 "parse.y" 08961 { 08962 /*%%%*/ 08963 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), 0); 08964 /*% 08965 $$ = dispatch3(call, $1, ripper_intern("::"), $3); 08966 %*/ 08967 } 08968 break; 08969 08970 case 408: 08971 /* Line 1787 of yacc.c */ 08972 #line 3668 "parse.y" 08973 { 08974 /*%%%*/ 08975 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node)); 08976 fixpos((yyval.node), (yyvsp[(1) - (3)].node)); 08977 /*% 08978 $$ = dispatch3(call, $1, ripper_id2sym('.'), 08979 ripper_intern("call")); 08980 $$ = method_optarg($$, $3); 08981 %*/ 08982 } 08983 break; 08984 08985 case 409: 08986 /* Line 1787 of yacc.c */ 08987 #line 3679 "parse.y" 08988 { 08989 /*%%%*/ 08990 (yyval.node) = NEW_CALL((yyvsp[(1) - (3)].node), rb_intern("call"), (yyvsp[(3) - (3)].node)); 08991 fixpos((yyval.node), (yyvsp[(1) - (3)].node)); 08992 /*% 08993 $$ = dispatch3(call, $1, ripper_intern("::"), 08994 ripper_intern("call")); 08995 $$ = method_optarg($$, $3); 08996 %*/ 08997 } 08998 break; 08999 09000 case 410: 09001 /* Line 1787 of yacc.c */ 09002 #line 3690 "parse.y" 09003 { 09004 /*%%%*/ 09005 (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node)); 09006 /*% 09007 $$ = dispatch1(super, $2); 09008 %*/ 09009 } 09010 break; 09011 09012 case 411: 09013 /* Line 1787 of yacc.c */ 09014 #line 3698 "parse.y" 09015 { 09016 /*%%%*/ 09017 (yyval.node) = NEW_ZSUPER(); 09018 /*% 09019 $$ = dispatch0(zsuper); 09020 %*/ 09021 } 09022 break; 09023 09024 case 412: 09025 /* Line 1787 of yacc.c */ 09026 #line 3706 "parse.y" 09027 { 09028 /*%%%*/ 09029 if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF) 09030 (yyval.node) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].node)); 09031 else 09032 (yyval.node) = NEW_CALL((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node)); 09033 fixpos((yyval.node), (yyvsp[(1) - (4)].node)); 09034 /*% 09035 $$ = dispatch2(aref, $1, escape_Qundef($3)); 09036 %*/ 09037 } 09038 break; 09039 09040 case 413: 09041 /* Line 1787 of yacc.c */ 09042 #line 3720 "parse.y" 09043 { 09044 (yyvsp[(1) - (1)].vars) = dyna_push(); 09045 /*%%%*/ 09046 (yyval.num) = ruby_sourceline; 09047 /*% 09048 %*/ 09049 } 09050 break; 09051 09052 case 414: 09053 /* Line 1787 of yacc.c */ 09054 #line 3729 "parse.y" 09055 { 09056 /*%%%*/ 09057 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 09058 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 09059 /*% 09060 $$ = dispatch2(brace_block, escape_Qundef($3), $4); 09061 %*/ 09062 dyna_pop((yyvsp[(1) - (5)].vars)); 09063 } 09064 break; 09065 09066 case 415: 09067 /* Line 1787 of yacc.c */ 09068 #line 3739 "parse.y" 09069 { 09070 (yyvsp[(1) - (1)].vars) = dyna_push(); 09071 /*%%%*/ 09072 (yyval.num) = ruby_sourceline; 09073 /*% 09074 %*/ 09075 } 09076 break; 09077 09078 case 416: 09079 /* Line 1787 of yacc.c */ 09080 #line 3748 "parse.y" 09081 { 09082 /*%%%*/ 09083 (yyval.node) = NEW_ITER((yyvsp[(3) - (5)].node),(yyvsp[(4) - (5)].node)); 09084 nd_set_line((yyval.node), (yyvsp[(2) - (5)].num)); 09085 /*% 09086 $$ = dispatch2(do_block, escape_Qundef($3), $4); 09087 %*/ 09088 dyna_pop((yyvsp[(1) - (5)].vars)); 09089 } 09090 break; 09091 09092 case 417: 09093 /* Line 1787 of yacc.c */ 09094 #line 3762 "parse.y" 09095 { 09096 /*%%%*/ 09097 (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node)); 09098 /*% 09099 $$ = dispatch3(when, $2, $4, escape_Qundef($5)); 09100 %*/ 09101 } 09102 break; 09103 09104 case 420: 09105 /* Line 1787 of yacc.c */ 09106 #line 3778 "parse.y" 09107 { 09108 /*%%%*/ 09109 if ((yyvsp[(3) - (6)].node)) { 09110 (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), NEW_ERRINFO()); 09111 (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node)); 09112 } 09113 (yyval.node) = NEW_RESBODY((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node)); 09114 fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node)); 09115 /*% 09116 $$ = dispatch4(rescue, 09117 escape_Qundef($2), 09118 escape_Qundef($3), 09119 escape_Qundef($5), 09120 escape_Qundef($6)); 09121 %*/ 09122 } 09123 break; 09124 09125 case 422: 09126 /* Line 1787 of yacc.c */ 09127 #line 3798 "parse.y" 09128 { 09129 /*%%%*/ 09130 (yyval.node) = NEW_LIST((yyvsp[(1) - (1)].node)); 09131 /*% 09132 $$ = rb_ary_new3(1, $1); 09133 %*/ 09134 } 09135 break; 09136 09137 case 423: 09138 /* Line 1787 of yacc.c */ 09139 #line 3806 "parse.y" 09140 { 09141 /*%%%*/ 09142 if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node); 09143 /*% 09144 $$ = $1; 09145 %*/ 09146 } 09147 break; 09148 09149 case 425: 09150 /* Line 1787 of yacc.c */ 09151 #line 3817 "parse.y" 09152 { 09153 (yyval.node) = (yyvsp[(2) - (2)].node); 09154 } 09155 break; 09156 09157 case 427: 09158 /* Line 1787 of yacc.c */ 09159 #line 3824 "parse.y" 09160 { 09161 /*%%%*/ 09162 (yyval.node) = (yyvsp[(2) - (2)].node); 09163 /*% 09164 $$ = dispatch1(ensure, $2); 09165 %*/ 09166 } 09167 break; 09168 09169 case 430: 09170 /* Line 1787 of yacc.c */ 09171 #line 3836 "parse.y" 09172 { 09173 /*%%%*/ 09174 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].id))); 09175 /*% 09176 $$ = dispatch1(symbol_literal, $1); 09177 %*/ 09178 } 09179 break; 09180 09181 case 432: 09182 /* Line 1787 of yacc.c */ 09183 #line 3847 "parse.y" 09184 { 09185 /*%%%*/ 09186 NODE *node = (yyvsp[(1) - (1)].node); 09187 if (!node) { 09188 node = NEW_STR(STR_NEW0()); 09189 } 09190 else { 09191 node = evstr2dstr(node); 09192 } 09193 (yyval.node) = node; 09194 /*% 09195 $$ = $1; 09196 %*/ 09197 } 09198 break; 09199 09200 case 435: 09201 /* Line 1787 of yacc.c */ 09202 #line 3866 "parse.y" 09203 { 09204 /*%%%*/ 09205 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09206 /*% 09207 $$ = dispatch2(string_concat, $1, $2); 09208 %*/ 09209 } 09210 break; 09211 09212 case 436: 09213 /* Line 1787 of yacc.c */ 09214 #line 3876 "parse.y" 09215 { 09216 /*%%%*/ 09217 (yyval.node) = (yyvsp[(2) - (3)].node); 09218 /*% 09219 $$ = dispatch1(string_literal, $2); 09220 %*/ 09221 } 09222 break; 09223 09224 case 437: 09225 /* Line 1787 of yacc.c */ 09226 #line 3886 "parse.y" 09227 { 09228 /*%%%*/ 09229 NODE *node = (yyvsp[(2) - (3)].node); 09230 if (!node) { 09231 node = NEW_XSTR(STR_NEW0()); 09232 } 09233 else { 09234 switch (nd_type(node)) { 09235 case NODE_STR: 09236 nd_set_type(node, NODE_XSTR); 09237 break; 09238 case NODE_DSTR: 09239 nd_set_type(node, NODE_DXSTR); 09240 break; 09241 default: 09242 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09243 break; 09244 } 09245 } 09246 (yyval.node) = node; 09247 /*% 09248 $$ = dispatch1(xstring_literal, $2); 09249 %*/ 09250 } 09251 break; 09252 09253 case 438: 09254 /* Line 1787 of yacc.c */ 09255 #line 3913 "parse.y" 09256 { 09257 /*%%%*/ 09258 int options = (yyvsp[(3) - (3)].num); 09259 NODE *node = (yyvsp[(2) - (3)].node); 09260 NODE *list, *prev; 09261 if (!node) { 09262 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09263 } 09264 else switch (nd_type(node)) { 09265 case NODE_STR: 09266 { 09267 VALUE src = node->nd_lit; 09268 nd_set_type(node, NODE_LIT); 09269 node->nd_lit = reg_compile(src, options); 09270 } 09271 break; 09272 default: 09273 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09274 case NODE_DSTR: 09275 if (options & RE_OPTION_ONCE) { 09276 nd_set_type(node, NODE_DREGX_ONCE); 09277 } 09278 else { 09279 nd_set_type(node, NODE_DREGX); 09280 } 09281 node->nd_cflag = options & RE_OPTION_MASK; 09282 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09283 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09284 if (nd_type(list->nd_head) == NODE_STR) { 09285 VALUE tail = list->nd_head->nd_lit; 09286 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09287 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09288 if (!literal_concat0(parser, lit, tail)) { 09289 node = 0; 09290 break; 09291 } 09292 rb_str_resize(tail, 0); 09293 prev->nd_next = list->nd_next; 09294 rb_gc_force_recycle((VALUE)list->nd_head); 09295 rb_gc_force_recycle((VALUE)list); 09296 list = prev; 09297 } 09298 else { 09299 prev = list; 09300 } 09301 } 09302 else { 09303 prev = 0; 09304 } 09305 } 09306 if (!node->nd_next) { 09307 VALUE src = node->nd_lit; 09308 nd_set_type(node, NODE_LIT); 09309 node->nd_lit = reg_compile(src, options); 09310 } 09311 break; 09312 } 09313 (yyval.node) = node; 09314 /*% 09315 $$ = dispatch2(regexp_literal, $2, $3); 09316 %*/ 09317 } 09318 break; 09319 09320 case 439: 09321 /* Line 1787 of yacc.c */ 09322 #line 3978 "parse.y" 09323 { 09324 /*%%%*/ 09325 (yyval.node) = NEW_ZARRAY(); 09326 /*% 09327 $$ = dispatch0(words_new); 09328 $$ = dispatch1(array, $$); 09329 %*/ 09330 } 09331 break; 09332 09333 case 440: 09334 /* Line 1787 of yacc.c */ 09335 #line 3987 "parse.y" 09336 { 09337 /*%%%*/ 09338 (yyval.node) = (yyvsp[(2) - (3)].node); 09339 /*% 09340 $$ = dispatch1(array, $2); 09341 %*/ 09342 } 09343 break; 09344 09345 case 441: 09346 /* Line 1787 of yacc.c */ 09347 #line 3997 "parse.y" 09348 { 09349 /*%%%*/ 09350 (yyval.node) = 0; 09351 /*% 09352 $$ = dispatch0(words_new); 09353 %*/ 09354 } 09355 break; 09356 09357 case 442: 09358 /* Line 1787 of yacc.c */ 09359 #line 4005 "parse.y" 09360 { 09361 /*%%%*/ 09362 (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node))); 09363 /*% 09364 $$ = dispatch2(words_add, $1, $2); 09365 %*/ 09366 } 09367 break; 09368 09369 case 444: 09370 /* Line 1787 of yacc.c */ 09371 #line 4023 "parse.y" 09372 { 09373 /*%%%*/ 09374 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09375 /*% 09376 $$ = dispatch2(word_add, $1, $2); 09377 %*/ 09378 } 09379 break; 09380 09381 case 445: 09382 /* Line 1787 of yacc.c */ 09383 #line 4033 "parse.y" 09384 { 09385 /*%%%*/ 09386 (yyval.node) = NEW_ZARRAY(); 09387 /*% 09388 $$ = dispatch0(qwords_new); 09389 $$ = dispatch1(array, $$); 09390 %*/ 09391 } 09392 break; 09393 09394 case 446: 09395 /* Line 1787 of yacc.c */ 09396 #line 4042 "parse.y" 09397 { 09398 /*%%%*/ 09399 (yyval.node) = (yyvsp[(2) - (3)].node); 09400 /*% 09401 $$ = dispatch1(array, $2); 09402 %*/ 09403 } 09404 break; 09405 09406 case 447: 09407 /* Line 1787 of yacc.c */ 09408 #line 4052 "parse.y" 09409 { 09410 /*%%%*/ 09411 (yyval.node) = 0; 09412 /*% 09413 $$ = dispatch0(qwords_new); 09414 %*/ 09415 } 09416 break; 09417 09418 case 448: 09419 /* Line 1787 of yacc.c */ 09420 #line 4060 "parse.y" 09421 { 09422 /*%%%*/ 09423 (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node)); 09424 /*% 09425 $$ = dispatch2(qwords_add, $1, $2); 09426 %*/ 09427 } 09428 break; 09429 09430 case 449: 09431 /* Line 1787 of yacc.c */ 09432 #line 4070 "parse.y" 09433 { 09434 /*%%%*/ 09435 (yyval.node) = 0; 09436 /*% 09437 $$ = dispatch0(string_content); 09438 %*/ 09439 } 09440 break; 09441 09442 case 450: 09443 /* Line 1787 of yacc.c */ 09444 #line 4078 "parse.y" 09445 { 09446 /*%%%*/ 09447 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09448 /*% 09449 $$ = dispatch2(string_add, $1, $2); 09450 %*/ 09451 } 09452 break; 09453 09454 case 451: 09455 /* Line 1787 of yacc.c */ 09456 #line 4088 "parse.y" 09457 { 09458 /*%%%*/ 09459 (yyval.node) = 0; 09460 /*% 09461 $$ = dispatch0(xstring_new); 09462 %*/ 09463 } 09464 break; 09465 09466 case 452: 09467 /* Line 1787 of yacc.c */ 09468 #line 4096 "parse.y" 09469 { 09470 /*%%%*/ 09471 (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node)); 09472 /*% 09473 $$ = dispatch2(xstring_add, $1, $2); 09474 %*/ 09475 } 09476 break; 09477 09478 case 453: 09479 /* Line 1787 of yacc.c */ 09480 #line 4106 "parse.y" 09481 { 09482 /*%%%*/ 09483 (yyval.node) = 0; 09484 /*% 09485 $$ = dispatch0(regexp_new); 09486 %*/ 09487 } 09488 break; 09489 09490 case 454: 09491 /* Line 1787 of yacc.c */ 09492 #line 4114 "parse.y" 09493 { 09494 /*%%%*/ 09495 NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node); 09496 if (!head) { 09497 (yyval.node) = tail; 09498 } 09499 else if (!tail) { 09500 (yyval.node) = head; 09501 } 09502 else { 09503 switch (nd_type(head)) { 09504 case NODE_STR: 09505 nd_set_type(head, NODE_DSTR); 09506 break; 09507 case NODE_DSTR: 09508 break; 09509 default: 09510 head = list_append(NEW_DSTR(Qnil), head); 09511 break; 09512 } 09513 (yyval.node) = list_append(head, tail); 09514 } 09515 /*% 09516 $$ = dispatch2(regexp_add, $1, $2); 09517 %*/ 09518 } 09519 break; 09520 09521 case 456: 09522 /* Line 1787 of yacc.c */ 09523 #line 4144 "parse.y" 09524 { 09525 (yyval.node) = lex_strterm; 09526 lex_strterm = 0; 09527 lex_state = EXPR_BEG; 09528 } 09529 break; 09530 09531 case 457: 09532 /* Line 1787 of yacc.c */ 09533 #line 4150 "parse.y" 09534 { 09535 /*%%%*/ 09536 lex_strterm = (yyvsp[(2) - (3)].node); 09537 (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node)); 09538 /*% 09539 lex_strterm = $<node>2; 09540 $$ = dispatch1(string_dvar, $3); 09541 %*/ 09542 } 09543 break; 09544 09545 case 458: 09546 /* Line 1787 of yacc.c */ 09547 #line 4160 "parse.y" 09548 { 09549 (yyvsp[(1) - (1)].val) = cond_stack; 09550 (yyval.val) = cmdarg_stack; 09551 cond_stack = 0; 09552 cmdarg_stack = 0; 09553 } 09554 break; 09555 09556 case 459: 09557 /* Line 1787 of yacc.c */ 09558 #line 4166 "parse.y" 09559 { 09560 (yyval.node) = lex_strterm; 09561 lex_strterm = 0; 09562 lex_state = EXPR_BEG; 09563 } 09564 break; 09565 09566 case 460: 09567 /* Line 1787 of yacc.c */ 09568 #line 4172 "parse.y" 09569 { 09570 cond_stack = (yyvsp[(1) - (5)].val); 09571 cmdarg_stack = (yyvsp[(2) - (5)].val); 09572 lex_strterm = (yyvsp[(3) - (5)].node); 09573 /*%%%*/ 09574 if ((yyvsp[(4) - (5)].node)) (yyvsp[(4) - (5)].node)->flags &= ~NODE_FL_NEWLINE; 09575 (yyval.node) = new_evstr((yyvsp[(4) - (5)].node)); 09576 /*% 09577 $$ = dispatch1(string_embexpr, $4); 09578 %*/ 09579 } 09580 break; 09581 09582 case 461: 09583 /* Line 1787 of yacc.c */ 09584 #line 4186 "parse.y" 09585 { 09586 /*%%%*/ 09587 (yyval.node) = NEW_GVAR((yyvsp[(1) - (1)].id)); 09588 /*% 09589 $$ = dispatch1(var_ref, $1); 09590 %*/ 09591 } 09592 break; 09593 09594 case 462: 09595 /* Line 1787 of yacc.c */ 09596 #line 4194 "parse.y" 09597 { 09598 /*%%%*/ 09599 (yyval.node) = NEW_IVAR((yyvsp[(1) - (1)].id)); 09600 /*% 09601 $$ = dispatch1(var_ref, $1); 09602 %*/ 09603 } 09604 break; 09605 09606 case 463: 09607 /* Line 1787 of yacc.c */ 09608 #line 4202 "parse.y" 09609 { 09610 /*%%%*/ 09611 (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id)); 09612 /*% 09613 $$ = dispatch1(var_ref, $1); 09614 %*/ 09615 } 09616 break; 09617 09618 case 465: 09619 /* Line 1787 of yacc.c */ 09620 #line 4213 "parse.y" 09621 { 09622 lex_state = EXPR_END; 09623 /*%%%*/ 09624 (yyval.id) = (yyvsp[(2) - (2)].id); 09625 /*% 09626 $$ = dispatch1(symbol, $2); 09627 %*/ 09628 } 09629 break; 09630 09631 case 470: 09632 /* Line 1787 of yacc.c */ 09633 #line 4230 "parse.y" 09634 { 09635 lex_state = EXPR_END; 09636 /*%%%*/ 09637 if (!((yyval.node) = (yyvsp[(2) - (3)].node))) { 09638 (yyval.node) = NEW_LIT(ID2SYM(rb_intern(""))); 09639 } 09640 else { 09641 VALUE lit; 09642 09643 switch (nd_type((yyval.node))) { 09644 case NODE_DSTR: 09645 nd_set_type((yyval.node), NODE_DSYM); 09646 break; 09647 case NODE_STR: 09648 lit = (yyval.node)->nd_lit; 09649 (yyval.node)->nd_lit = ID2SYM(rb_intern_str(lit)); 09650 nd_set_type((yyval.node), NODE_LIT); 09651 break; 09652 default: 09653 (yyval.node) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.node))); 09654 break; 09655 } 09656 } 09657 /*% 09658 $$ = dispatch1(dyna_symbol, $2); 09659 %*/ 09660 } 09661 break; 09662 09663 case 473: 09664 /* Line 1787 of yacc.c */ 09665 #line 4262 "parse.y" 09666 { 09667 /*%%%*/ 09668 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 09669 /*% 09670 $$ = dispatch2(unary, ripper_intern("-@"), $2); 09671 %*/ 09672 } 09673 break; 09674 09675 case 474: 09676 /* Line 1787 of yacc.c */ 09677 #line 4270 "parse.y" 09678 { 09679 /*%%%*/ 09680 (yyval.node) = negate_lit((yyvsp[(2) - (2)].node)); 09681 /*% 09682 $$ = dispatch2(unary, ripper_intern("-@"), $2); 09683 %*/ 09684 } 09685 break; 09686 09687 case 480: 09688 /* Line 1787 of yacc.c */ 09689 #line 4286 "parse.y" 09690 {ifndef_ripper((yyval.id) = keyword_nil);} 09691 break; 09692 09693 case 481: 09694 /* Line 1787 of yacc.c */ 09695 #line 4287 "parse.y" 09696 {ifndef_ripper((yyval.id) = keyword_self);} 09697 break; 09698 09699 case 482: 09700 /* Line 1787 of yacc.c */ 09701 #line 4288 "parse.y" 09702 {ifndef_ripper((yyval.id) = keyword_true);} 09703 break; 09704 09705 case 483: 09706 /* Line 1787 of yacc.c */ 09707 #line 4289 "parse.y" 09708 {ifndef_ripper((yyval.id) = keyword_false);} 09709 break; 09710 09711 case 484: 09712 /* Line 1787 of yacc.c */ 09713 #line 4290 "parse.y" 09714 {ifndef_ripper((yyval.id) = keyword__FILE__);} 09715 break; 09716 09717 case 485: 09718 /* Line 1787 of yacc.c */ 09719 #line 4291 "parse.y" 09720 {ifndef_ripper((yyval.id) = keyword__LINE__);} 09721 break; 09722 09723 case 486: 09724 /* Line 1787 of yacc.c */ 09725 #line 4292 "parse.y" 09726 {ifndef_ripper((yyval.id) = keyword__ENCODING__);} 09727 break; 09728 09729 case 487: 09730 /* Line 1787 of yacc.c */ 09731 #line 4296 "parse.y" 09732 { 09733 /*%%%*/ 09734 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 09735 /*% 09736 if (id_is_var(get_id($1))) { 09737 $$ = dispatch1(var_ref, $1); 09738 } 09739 else { 09740 $$ = dispatch1(vcall, $1); 09741 } 09742 %*/ 09743 } 09744 break; 09745 09746 case 488: 09747 /* Line 1787 of yacc.c */ 09748 #line 4309 "parse.y" 09749 { 09750 /*%%%*/ 09751 if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id)))) (yyval.node) = NEW_BEGIN(0); 09752 /*% 09753 $$ = dispatch1(var_ref, $1); 09754 %*/ 09755 } 09756 break; 09757 09758 case 489: 09759 /* Line 1787 of yacc.c */ 09760 #line 4319 "parse.y" 09761 { 09762 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 09763 /*%%%*/ 09764 /*% 09765 $$ = dispatch1(var_field, $$); 09766 %*/ 09767 } 09768 break; 09769 09770 case 490: 09771 /* Line 1787 of yacc.c */ 09772 #line 4327 "parse.y" 09773 { 09774 (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0); 09775 /*%%%*/ 09776 /*% 09777 $$ = dispatch1(var_field, $$); 09778 %*/ 09779 } 09780 break; 09781 09782 case 493: 09783 /* Line 1787 of yacc.c */ 09784 #line 4341 "parse.y" 09785 { 09786 /*%%%*/ 09787 (yyval.node) = 0; 09788 /*% 09789 $$ = Qnil; 09790 %*/ 09791 } 09792 break; 09793 09794 case 494: 09795 /* Line 1787 of yacc.c */ 09796 #line 4349 "parse.y" 09797 { 09798 lex_state = EXPR_BEG; 09799 } 09800 break; 09801 09802 case 495: 09803 /* Line 1787 of yacc.c */ 09804 #line 4353 "parse.y" 09805 { 09806 (yyval.node) = (yyvsp[(3) - (4)].node); 09807 } 09808 break; 09809 09810 case 496: 09811 /* Line 1787 of yacc.c */ 09812 #line 4357 "parse.y" 09813 { 09814 /*%%%*/ 09815 yyerrok; 09816 (yyval.node) = 0; 09817 /*% 09818 yyerrok; 09819 $$ = Qnil; 09820 %*/ 09821 } 09822 break; 09823 09824 case 497: 09825 /* Line 1787 of yacc.c */ 09826 #line 4369 "parse.y" 09827 { 09828 /*%%%*/ 09829 (yyval.node) = (yyvsp[(2) - (3)].node); 09830 /*% 09831 $$ = dispatch1(paren, $2); 09832 %*/ 09833 lex_state = EXPR_BEG; 09834 command_start = TRUE; 09835 } 09836 break; 09837 09838 case 498: 09839 /* Line 1787 of yacc.c */ 09840 #line 4379 "parse.y" 09841 { 09842 (yyval.node) = (yyvsp[(1) - (2)].node); 09843 lex_state = EXPR_BEG; 09844 command_start = TRUE; 09845 } 09846 break; 09847 09848 case 499: 09849 /* Line 1787 of yacc.c */ 09850 #line 4387 "parse.y" 09851 { 09852 /*%%%*/ 09853 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); 09854 /*% 09855 $$ = params_new($1, $3, $5, Qnil, escape_Qundef($6)); 09856 %*/ 09857 } 09858 break; 09859 09860 case 500: 09861 /* Line 1787 of yacc.c */ 09862 #line 4395 "parse.y" 09863 { 09864 /*%%%*/ 09865 (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].id)); 09866 /*% 09867 $$ = params_new($1, $3, $5, $7, escape_Qundef($8)); 09868 %*/ 09869 } 09870 break; 09871 09872 case 501: 09873 /* Line 1787 of yacc.c */ 09874 #line 4403 "parse.y" 09875 { 09876 /*%%%*/ 09877 (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), 0, 0, (yyvsp[(4) - (4)].id)); 09878 /*% 09879 $$ = params_new($1, $3, Qnil, Qnil, escape_Qundef($4)); 09880 %*/ 09881 } 09882 break; 09883 09884 case 502: 09885 /* Line 1787 of yacc.c */ 09886 #line 4411 "parse.y" 09887 { 09888 /*%%%*/ 09889 (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), 0, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 09890 /*% 09891 $$ = params_new($1, $3, Qnil, $5, escape_Qundef($6)); 09892 %*/ 09893 } 09894 break; 09895 09896 case 503: 09897 /* Line 1787 of yacc.c */ 09898 #line 4419 "parse.y" 09899 { 09900 /*%%%*/ 09901 (yyval.node) = new_args((yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 09902 /*% 09903 $$ = params_new($1, Qnil, $3, Qnil, escape_Qundef($4)); 09904 %*/ 09905 } 09906 break; 09907 09908 case 504: 09909 /* Line 1787 of yacc.c */ 09910 #line 4427 "parse.y" 09911 { 09912 /*%%%*/ 09913 (yyval.node) = new_args((yyvsp[(1) - (6)].node), 0, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 09914 /*% 09915 $$ = params_new($1, Qnil, $3, $5, escape_Qundef($6)); 09916 %*/ 09917 } 09918 break; 09919 09920 case 505: 09921 /* Line 1787 of yacc.c */ 09922 #line 4435 "parse.y" 09923 { 09924 /*%%%*/ 09925 (yyval.node) = new_args((yyvsp[(1) - (2)].node), 0, 0, 0, (yyvsp[(2) - (2)].id)); 09926 /*% 09927 $$ = params_new($1, Qnil, Qnil, Qnil,escape_Qundef($2)); 09928 %*/ 09929 } 09930 break; 09931 09932 case 506: 09933 /* Line 1787 of yacc.c */ 09934 #line 4443 "parse.y" 09935 { 09936 /*%%%*/ 09937 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); 09938 /*% 09939 $$ = params_new(Qnil, $1, $3, Qnil, escape_Qundef($4)); 09940 %*/ 09941 } 09942 break; 09943 09944 case 507: 09945 /* Line 1787 of yacc.c */ 09946 #line 4451 "parse.y" 09947 { 09948 /*%%%*/ 09949 (yyval.node) = new_args(0, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].id)); 09950 /*% 09951 $$ = params_new(Qnil, $1, $3, $5, escape_Qundef($6)); 09952 %*/ 09953 } 09954 break; 09955 09956 case 508: 09957 /* Line 1787 of yacc.c */ 09958 #line 4459 "parse.y" 09959 { 09960 /*%%%*/ 09961 (yyval.node) = new_args(0, (yyvsp[(1) - (2)].node), 0, 0, (yyvsp[(2) - (2)].id)); 09962 /*% 09963 $$ = params_new(Qnil, $1, Qnil, Qnil,escape_Qundef($2)); 09964 %*/ 09965 } 09966 break; 09967 09968 case 509: 09969 /* Line 1787 of yacc.c */ 09970 #line 4467 "parse.y" 09971 { 09972 /*%%%*/ 09973 (yyval.node) = new_args(0, (yyvsp[(1) - (4)].node), 0, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 09974 /*% 09975 $$ = params_new(Qnil, $1, Qnil, $3, escape_Qundef($4)); 09976 %*/ 09977 } 09978 break; 09979 09980 case 510: 09981 /* Line 1787 of yacc.c */ 09982 #line 4475 "parse.y" 09983 { 09984 /*%%%*/ 09985 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (2)].id), 0, (yyvsp[(2) - (2)].id)); 09986 /*% 09987 $$ = params_new(Qnil, Qnil, $1, Qnil,escape_Qundef($2)); 09988 %*/ 09989 } 09990 break; 09991 09992 case 511: 09993 /* Line 1787 of yacc.c */ 09994 #line 4483 "parse.y" 09995 { 09996 /*%%%*/ 09997 (yyval.node) = new_args(0, 0, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].id)); 09998 /*% 09999 $$ = params_new(Qnil, Qnil, $1, $3, escape_Qundef($4)); 10000 %*/ 10001 } 10002 break; 10003 10004 case 512: 10005 /* Line 1787 of yacc.c */ 10006 #line 4491 "parse.y" 10007 { 10008 /*%%%*/ 10009 (yyval.node) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].id)); 10010 /*% 10011 $$ = params_new(Qnil, Qnil, Qnil, Qnil, $1); 10012 %*/ 10013 } 10014 break; 10015 10016 case 513: 10017 /* Line 1787 of yacc.c */ 10018 #line 4499 "parse.y" 10019 { 10020 /*%%%*/ 10021 (yyval.node) = new_args(0, 0, 0, 0, 0); 10022 /*% 10023 $$ = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); 10024 %*/ 10025 } 10026 break; 10027 10028 case 514: 10029 /* Line 1787 of yacc.c */ 10030 #line 4509 "parse.y" 10031 { 10032 /*%%%*/ 10033 yyerror("formal argument cannot be a constant"); 10034 (yyval.id) = 0; 10035 /*% 10036 $$ = dispatch1(param_error, $1); 10037 %*/ 10038 } 10039 break; 10040 10041 case 515: 10042 /* Line 1787 of yacc.c */ 10043 #line 4518 "parse.y" 10044 { 10045 /*%%%*/ 10046 yyerror("formal argument cannot be an instance variable"); 10047 (yyval.id) = 0; 10048 /*% 10049 $$ = dispatch1(param_error, $1); 10050 %*/ 10051 } 10052 break; 10053 10054 case 516: 10055 /* Line 1787 of yacc.c */ 10056 #line 4527 "parse.y" 10057 { 10058 /*%%%*/ 10059 yyerror("formal argument cannot be a global variable"); 10060 (yyval.id) = 0; 10061 /*% 10062 $$ = dispatch1(param_error, $1); 10063 %*/ 10064 } 10065 break; 10066 10067 case 517: 10068 /* Line 1787 of yacc.c */ 10069 #line 4536 "parse.y" 10070 { 10071 /*%%%*/ 10072 yyerror("formal argument cannot be a class variable"); 10073 (yyval.id) = 0; 10074 /*% 10075 $$ = dispatch1(param_error, $1); 10076 %*/ 10077 } 10078 break; 10079 10080 case 519: 10081 /* Line 1787 of yacc.c */ 10082 #line 4548 "parse.y" 10083 { 10084 formal_argument(get_id((yyvsp[(1) - (1)].id))); 10085 (yyval.id) = (yyvsp[(1) - (1)].id); 10086 } 10087 break; 10088 10089 case 520: 10090 /* Line 1787 of yacc.c */ 10091 #line 4555 "parse.y" 10092 { 10093 arg_var(get_id((yyvsp[(1) - (1)].id))); 10094 /*%%%*/ 10095 (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1); 10096 /*% 10097 $$ = get_value($1); 10098 %*/ 10099 } 10100 break; 10101 10102 case 521: 10103 /* Line 1787 of yacc.c */ 10104 #line 4564 "parse.y" 10105 { 10106 ID tid = internal_id(); 10107 arg_var(tid); 10108 /*%%%*/ 10109 if (dyna_in_block()) { 10110 (yyvsp[(2) - (3)].node)->nd_value = NEW_DVAR(tid); 10111 } 10112 else { 10113 (yyvsp[(2) - (3)].node)->nd_value = NEW_LVAR(tid); 10114 } 10115 (yyval.node) = NEW_ARGS_AUX(tid, 1); 10116 (yyval.node)->nd_next = (yyvsp[(2) - (3)].node); 10117 /*% 10118 $$ = dispatch1(mlhs_paren, $2); 10119 %*/ 10120 } 10121 break; 10122 10123 case 523: 10124 /* Line 1787 of yacc.c */ 10125 #line 4590 "parse.y" 10126 { 10127 /*%%%*/ 10128 (yyval.node) = (yyvsp[(1) - (3)].node); 10129 (yyval.node)->nd_plen++; 10130 (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next); 10131 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node)); 10132 /*% 10133 $$ = rb_ary_push($1, $3); 10134 %*/ 10135 } 10136 break; 10137 10138 case 524: 10139 /* Line 1787 of yacc.c */ 10140 #line 4603 "parse.y" 10141 { 10142 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 10143 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 10144 /*%%%*/ 10145 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 10146 /*% 10147 $$ = rb_assoc_new($$, $3); 10148 %*/ 10149 } 10150 break; 10151 10152 case 525: 10153 /* Line 1787 of yacc.c */ 10154 #line 4615 "parse.y" 10155 { 10156 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].id)))); 10157 (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node)); 10158 /*%%%*/ 10159 (yyval.node) = NEW_OPT_ARG(0, (yyval.node)); 10160 /*% 10161 $$ = rb_assoc_new($$, $3); 10162 %*/ 10163 } 10164 break; 10165 10166 case 526: 10167 /* Line 1787 of yacc.c */ 10168 #line 4627 "parse.y" 10169 { 10170 /*%%%*/ 10171 (yyval.node) = (yyvsp[(1) - (1)].node); 10172 /*% 10173 $$ = rb_ary_new3(1, $1); 10174 %*/ 10175 } 10176 break; 10177 10178 case 527: 10179 /* Line 1787 of yacc.c */ 10180 #line 4635 "parse.y" 10181 { 10182 /*%%%*/ 10183 NODE *opts = (yyvsp[(1) - (3)].node); 10184 10185 while (opts->nd_next) { 10186 opts = opts->nd_next; 10187 } 10188 opts->nd_next = (yyvsp[(3) - (3)].node); 10189 (yyval.node) = (yyvsp[(1) - (3)].node); 10190 /*% 10191 $$ = rb_ary_push($1, $3); 10192 %*/ 10193 } 10194 break; 10195 10196 case 528: 10197 /* Line 1787 of yacc.c */ 10198 #line 4651 "parse.y" 10199 { 10200 /*%%%*/ 10201 (yyval.node) = (yyvsp[(1) - (1)].node); 10202 /*% 10203 $$ = rb_ary_new3(1, $1); 10204 %*/ 10205 } 10206 break; 10207 10208 case 529: 10209 /* Line 1787 of yacc.c */ 10210 #line 4659 "parse.y" 10211 { 10212 /*%%%*/ 10213 NODE *opts = (yyvsp[(1) - (3)].node); 10214 10215 while (opts->nd_next) { 10216 opts = opts->nd_next; 10217 } 10218 opts->nd_next = (yyvsp[(3) - (3)].node); 10219 (yyval.node) = (yyvsp[(1) - (3)].node); 10220 /*% 10221 $$ = rb_ary_push($1, $3); 10222 %*/ 10223 } 10224 break; 10225 10226 case 532: 10227 /* Line 1787 of yacc.c */ 10228 #line 4679 "parse.y" 10229 { 10230 /*%%%*/ 10231 if (!is_local_id((yyvsp[(2) - (2)].id))) 10232 yyerror("rest argument must be local variable"); 10233 /*% %*/ 10234 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 10235 /*%%%*/ 10236 (yyval.id) = (yyvsp[(2) - (2)].id); 10237 /*% 10238 $$ = dispatch1(rest_param, $2); 10239 %*/ 10240 } 10241 break; 10242 10243 case 533: 10244 /* Line 1787 of yacc.c */ 10245 #line 4692 "parse.y" 10246 { 10247 /*%%%*/ 10248 (yyval.id) = internal_id(); 10249 arg_var((yyval.id)); 10250 /*% 10251 $$ = dispatch1(rest_param, Qnil); 10252 %*/ 10253 } 10254 break; 10255 10256 case 536: 10257 /* Line 1787 of yacc.c */ 10258 #line 4707 "parse.y" 10259 { 10260 /*%%%*/ 10261 if (!is_local_id((yyvsp[(2) - (2)].id))) 10262 yyerror("block argument must be local variable"); 10263 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id))) 10264 yyerror("duplicated block argument name"); 10265 /*% %*/ 10266 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id)))); 10267 /*%%%*/ 10268 (yyval.id) = (yyvsp[(2) - (2)].id); 10269 /*% 10270 $$ = dispatch1(blockarg, $2); 10271 %*/ 10272 } 10273 break; 10274 10275 case 537: 10276 /* Line 1787 of yacc.c */ 10277 #line 4724 "parse.y" 10278 { 10279 (yyval.id) = (yyvsp[(2) - (2)].id); 10280 } 10281 break; 10282 10283 case 538: 10284 /* Line 1787 of yacc.c */ 10285 #line 4728 "parse.y" 10286 { 10287 /*%%%*/ 10288 (yyval.id) = 0; 10289 /*% 10290 $$ = Qundef; 10291 %*/ 10292 } 10293 break; 10294 10295 case 539: 10296 /* Line 1787 of yacc.c */ 10297 #line 4738 "parse.y" 10298 { 10299 /*%%%*/ 10300 value_expr((yyvsp[(1) - (1)].node)); 10301 (yyval.node) = (yyvsp[(1) - (1)].node); 10302 if (!(yyval.node)) (yyval.node) = NEW_NIL(); 10303 /*% 10304 $$ = $1; 10305 %*/ 10306 } 10307 break; 10308 10309 case 540: 10310 /* Line 1787 of yacc.c */ 10311 #line 4747 "parse.y" 10312 {lex_state = EXPR_BEG;} 10313 break; 10314 10315 case 541: 10316 /* Line 1787 of yacc.c */ 10317 #line 4748 "parse.y" 10318 { 10319 /*%%%*/ 10320 if ((yyvsp[(3) - (4)].node) == 0) { 10321 yyerror("can't define singleton method for ()."); 10322 } 10323 else { 10324 switch (nd_type((yyvsp[(3) - (4)].node))) { 10325 case NODE_STR: 10326 case NODE_DSTR: 10327 case NODE_XSTR: 10328 case NODE_DXSTR: 10329 case NODE_DREGX: 10330 case NODE_LIT: 10331 case NODE_ARRAY: 10332 case NODE_ZARRAY: 10333 yyerror("can't define singleton method for literals"); 10334 default: 10335 value_expr((yyvsp[(3) - (4)].node)); 10336 break; 10337 } 10338 } 10339 (yyval.node) = (yyvsp[(3) - (4)].node); 10340 /*% 10341 $$ = dispatch1(paren, $3); 10342 %*/ 10343 } 10344 break; 10345 10346 case 543: 10347 /* Line 1787 of yacc.c */ 10348 #line 4778 "parse.y" 10349 { 10350 /*%%%*/ 10351 (yyval.node) = (yyvsp[(1) - (2)].node); 10352 /*% 10353 $$ = dispatch1(assoclist_from_args, $1); 10354 %*/ 10355 } 10356 break; 10357 10358 case 545: 10359 /* Line 1787 of yacc.c */ 10360 #line 4795 "parse.y" 10361 { 10362 /*%%%*/ 10363 (yyval.node) = list_concat((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); 10364 /*% 10365 $$ = rb_ary_push($1, $3); 10366 %*/ 10367 } 10368 break; 10369 10370 case 546: 10371 /* Line 1787 of yacc.c */ 10372 #line 4805 "parse.y" 10373 { 10374 /*%%%*/ 10375 (yyval.node) = list_append(NEW_LIST((yyvsp[(1) - (3)].node)), (yyvsp[(3) - (3)].node)); 10376 /*% 10377 $$ = dispatch2(assoc_new, $1, $3); 10378 %*/ 10379 } 10380 break; 10381 10382 case 547: 10383 /* Line 1787 of yacc.c */ 10384 #line 4813 "parse.y" 10385 { 10386 /*%%%*/ 10387 (yyval.node) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].id)))), (yyvsp[(2) - (2)].node)); 10388 /*% 10389 $$ = dispatch2(assoc_new, $1, $2); 10390 %*/ 10391 } 10392 break; 10393 10394 case 569: 10395 /* Line 1787 of yacc.c */ 10396 #line 4869 "parse.y" 10397 {yyerrok;} 10398 break; 10399 10400 case 572: 10401 /* Line 1787 of yacc.c */ 10402 #line 4874 "parse.y" 10403 {yyerrok;} 10404 break; 10405 10406 case 573: 10407 /* Line 1787 of yacc.c */ 10408 #line 4878 "parse.y" 10409 { 10410 /*%%%*/ 10411 (yyval.node) = 0; 10412 /*% 10413 $$ = Qundef; 10414 %*/ 10415 } 10416 break; 10417 10418 10419 /* Line 1787 of yacc.c */ 10420 #line 10417 "parse.c" 10421 default: break; 10422 } 10423 /* User semantic actions sometimes alter yychar, and that requires 10424 that yytoken be updated with the new translation. We take the 10425 approach of translating immediately before every use of yytoken. 10426 One alternative is translating here after every semantic action, 10427 but that translation would be missed if the semantic action invokes 10428 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 10429 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 10430 incorrect destructor might then be invoked immediately. In the 10431 case of YYERROR or YYBACKUP, subsequent parser actions might lead 10432 to an incorrect destructor call or verbose syntax error message 10433 before the lookahead is translated. */ 10434 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 10435 10436 YYPOPSTACK (yylen); 10437 yylen = 0; 10438 YY_STACK_PRINT (yyss, yyssp); 10439 10440 *++yyvsp = yyval; 10441 10442 /* Now `shift' the result of the reduction. Determine what state 10443 that goes to, based on the state we popped back to and the rule 10444 number reduced by. */ 10445 10446 yyn = yyr1[yyn]; 10447 10448 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 10449 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 10450 yystate = yytable[yystate]; 10451 else 10452 yystate = yydefgoto[yyn - YYNTOKENS]; 10453 10454 goto yynewstate; 10455 10456 10457 /*------------------------------------. 10458 | yyerrlab -- here on detecting error | 10459 `------------------------------------*/ 10460 yyerrlab: 10461 /* Make sure we have latest lookahead translation. See comments at 10462 user semantic actions for why this is necessary. */ 10463 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 10464 10465 /* If not already recovering from an error, report this error. */ 10466 if (!yyerrstatus) 10467 { 10468 ++yynerrs; 10469 #if ! YYERROR_VERBOSE 10470 parser_yyerror (parser, YY_("syntax error")); 10471 #else 10472 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 10473 yyssp, yytoken) 10474 { 10475 char const *yymsgp = YY_("syntax error"); 10476 int yysyntax_error_status; 10477 yysyntax_error_status = YYSYNTAX_ERROR; 10478 if (yysyntax_error_status == 0) 10479 yymsgp = yymsg; 10480 else if (yysyntax_error_status == 1) 10481 { 10482 if (yymsg != yymsgbuf) 10483 YYSTACK_FREE (yymsg); 10484 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 10485 if (!yymsg) 10486 { 10487 yymsg = yymsgbuf; 10488 yymsg_alloc = sizeof yymsgbuf; 10489 yysyntax_error_status = 2; 10490 } 10491 else 10492 { 10493 yysyntax_error_status = YYSYNTAX_ERROR; 10494 yymsgp = yymsg; 10495 } 10496 } 10497 parser_yyerror (parser, yymsgp); 10498 if (yysyntax_error_status == 2) 10499 goto yyexhaustedlab; 10500 } 10501 # undef YYSYNTAX_ERROR 10502 #endif 10503 } 10504 10505 10506 10507 if (yyerrstatus == 3) 10508 { 10509 /* If just tried and failed to reuse lookahead token after an 10510 error, discard it. */ 10511 10512 if (yychar <= YYEOF) 10513 { 10514 /* Return failure if at end of input. */ 10515 if (yychar == YYEOF) 10516 YYABORT; 10517 } 10518 else 10519 { 10520 yydestruct ("Error: discarding", 10521 yytoken, &yylval, parser); 10522 yychar = YYEMPTY; 10523 } 10524 } 10525 10526 /* Else will try to reuse lookahead token after shifting the error 10527 token. */ 10528 goto yyerrlab1; 10529 10530 10531 /*---------------------------------------------------. 10532 | yyerrorlab -- error raised explicitly by YYERROR. | 10533 `---------------------------------------------------*/ 10534 yyerrorlab: 10535 10536 /* Pacify compilers like GCC when the user code never invokes 10537 YYERROR and the label yyerrorlab therefore never appears in user 10538 code. */ 10539 if (/*CONSTCOND*/ 0) 10540 goto yyerrorlab; 10541 10542 /* Do not reclaim the symbols of the rule which action triggered 10543 this YYERROR. */ 10544 YYPOPSTACK (yylen); 10545 yylen = 0; 10546 YY_STACK_PRINT (yyss, yyssp); 10547 yystate = *yyssp; 10548 goto yyerrlab1; 10549 10550 10551 /*-------------------------------------------------------------. 10552 | yyerrlab1 -- common code for both syntax error and YYERROR. | 10553 `-------------------------------------------------------------*/ 10554 yyerrlab1: 10555 yyerrstatus = 3; /* Each real token shifted decrements this. */ 10556 10557 for (;;) 10558 { 10559 yyn = yypact[yystate]; 10560 if (!yypact_value_is_default (yyn)) 10561 { 10562 yyn += YYTERROR; 10563 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 10564 { 10565 yyn = yytable[yyn]; 10566 if (0 < yyn) 10567 break; 10568 } 10569 } 10570 10571 /* Pop the current state because it cannot handle the error token. */ 10572 if (yyssp == yyss) 10573 YYABORT; 10574 10575 10576 yydestruct ("Error: popping", 10577 yystos[yystate], yyvsp, parser); 10578 YYPOPSTACK (1); 10579 yystate = *yyssp; 10580 YY_STACK_PRINT (yyss, yyssp); 10581 } 10582 10583 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 10584 *++yyvsp = yylval; 10585 YY_IGNORE_MAYBE_UNINITIALIZED_END 10586 10587 10588 /* Shift the error token. */ 10589 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 10590 10591 yystate = yyn; 10592 goto yynewstate; 10593 10594 10595 /*-------------------------------------. 10596 | yyacceptlab -- YYACCEPT comes here. | 10597 `-------------------------------------*/ 10598 yyacceptlab: 10599 yyresult = 0; 10600 goto yyreturn; 10601 10602 /*-----------------------------------. 10603 | yyabortlab -- YYABORT comes here. | 10604 `-----------------------------------*/ 10605 yyabortlab: 10606 yyresult = 1; 10607 goto yyreturn; 10608 10609 #if !defined yyoverflow || YYERROR_VERBOSE 10610 /*-------------------------------------------------. 10611 | yyexhaustedlab -- memory exhaustion comes here. | 10612 `-------------------------------------------------*/ 10613 yyexhaustedlab: 10614 parser_yyerror (parser, YY_("memory exhausted")); 10615 yyresult = 2; 10616 /* Fall through. */ 10617 #endif 10618 10619 yyreturn: 10620 if (yychar != YYEMPTY) 10621 { 10622 /* Make sure we have latest lookahead translation. See comments at 10623 user semantic actions for why this is necessary. */ 10624 yytoken = YYTRANSLATE (yychar); 10625 yydestruct ("Cleanup: discarding lookahead", 10626 yytoken, &yylval, parser); 10627 } 10628 /* Do not reclaim the symbols of the rule which action triggered 10629 this YYABORT or YYACCEPT. */ 10630 YYPOPSTACK (yylen); 10631 YY_STACK_PRINT (yyss, yyssp); 10632 while (yyssp != yyss) 10633 { 10634 yydestruct ("Cleanup: popping", 10635 yystos[*yyssp], yyvsp, parser); 10636 YYPOPSTACK (1); 10637 } 10638 #ifndef yyoverflow 10639 if (yyss != yyssa) 10640 YYSTACK_FREE (yyss); 10641 #endif 10642 #if YYERROR_VERBOSE 10643 if (yymsg != yymsgbuf) 10644 YYSTACK_FREE (yymsg); 10645 #endif 10646 /* Make sure YYID is used. */ 10647 return YYID (yyresult); 10648 } 10649 10650 10651 /* Line 2050 of yacc.c */ 10652 #line 4886 "parse.y" 10653 10654 # undef parser 10655 # undef yylex 10656 # undef yylval 10657 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 10658 10659 static int parser_regx_options(struct parser_params*); 10660 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 10661 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 10662 static int parser_parse_string(struct parser_params*,NODE*); 10663 static int parser_here_document(struct parser_params*,NODE*); 10664 10665 10666 # define nextc() parser_nextc(parser) 10667 # define pushback(c) parser_pushback(parser, (c)) 10668 # define newtok() parser_newtok(parser) 10669 # define tokspace(n) parser_tokspace(parser, (n)) 10670 # define tokadd(c) parser_tokadd(parser, (c)) 10671 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 10672 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 10673 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 10674 # define regx_options() parser_regx_options(parser) 10675 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 10676 # define parse_string(n) parser_parse_string(parser,(n)) 10677 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 10678 # define here_document(n) parser_here_document(parser,(n)) 10679 # define heredoc_identifier() parser_heredoc_identifier(parser) 10680 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 10681 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 10682 10683 #ifndef RIPPER 10684 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 10685 # define set_yylval_num(x) (yylval.num = (x)) 10686 # define set_yylval_id(x) (yylval.id = (x)) 10687 # define set_yylval_name(x) (yylval.id = (x)) 10688 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 10689 # define set_yylval_node(x) (yylval.node = (x)) 10690 # define yylval_id() (yylval.id) 10691 #else 10692 static inline VALUE 10693 ripper_yylval_id(ID x) 10694 { 10695 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 10696 } 10697 # define set_yylval_str(x) (void)(x) 10698 # define set_yylval_num(x) (void)(x) 10699 # define set_yylval_id(x) (void)(x) 10700 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 10701 # define set_yylval_literal(x) (void)(x) 10702 # define set_yylval_node(x) (void)(x) 10703 # define yylval_id() yylval.id 10704 #endif 10705 10706 #ifndef RIPPER 10707 #define ripper_flush(p) (void)(p) 10708 #else 10709 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 10710 10711 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 10712 10713 static int 10714 ripper_has_scan_event(struct parser_params *parser) 10715 { 10716 10717 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 10718 return lex_p > parser->tokp; 10719 } 10720 10721 static VALUE 10722 ripper_scan_event_val(struct parser_params *parser, int t) 10723 { 10724 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 10725 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 10726 ripper_flush(parser); 10727 return rval; 10728 } 10729 10730 static void 10731 ripper_dispatch_scan_event(struct parser_params *parser, int t) 10732 { 10733 if (!ripper_has_scan_event(parser)) return; 10734 yylval_rval = ripper_scan_event_val(parser, t); 10735 } 10736 10737 static void 10738 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 10739 { 10740 if (!ripper_has_scan_event(parser)) return; 10741 (void)ripper_scan_event_val(parser, t); 10742 } 10743 10744 static void 10745 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 10746 { 10747 int saved_line = ruby_sourceline; 10748 const char *saved_tokp = parser->tokp; 10749 10750 ruby_sourceline = parser->delayed_line; 10751 parser->tokp = lex_pbeg + parser->delayed_col; 10752 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 10753 parser->delayed = Qnil; 10754 ruby_sourceline = saved_line; 10755 parser->tokp = saved_tokp; 10756 } 10757 #endif /* RIPPER */ 10758 10759 #include "ruby/regex.h" 10760 #include "ruby/util.h" 10761 10762 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 10763 since ours (we hope) works properly with all combinations of 10764 machines, compilers, `char' and `unsigned char' argument types. 10765 (Per Bothner suggested the basic approach.) */ 10766 #undef SIGN_EXTEND_CHAR 10767 #if __STDC__ 10768 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 10769 #else /* not __STDC__ */ 10770 /* As in Harbison and Steele. */ 10771 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 10772 #endif 10773 10774 #define parser_encoding_name() (parser->enc->name) 10775 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) 10776 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) 10777 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 10778 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) 10779 10780 #define parser_isascii() ISASCII(*(lex_p-1)) 10781 10782 #ifndef RIPPER 10783 static int 10784 token_info_get_column(struct parser_params *parser, const char *token) 10785 { 10786 int column = 1; 10787 const char *p, *pend = lex_p - strlen(token); 10788 for (p = lex_pbeg; p < pend; p++) { 10789 if (*p == '\t') { 10790 column = (((column - 1) / 8) + 1) * 8; 10791 } 10792 column++; 10793 } 10794 return column; 10795 } 10796 10797 static int 10798 token_info_has_nonspaces(struct parser_params *parser, const char *token) 10799 { 10800 const char *p, *pend = lex_p - strlen(token); 10801 for (p = lex_pbeg; p < pend; p++) { 10802 if (*p != ' ' && *p != '\t') { 10803 return 1; 10804 } 10805 } 10806 return 0; 10807 } 10808 10809 #undef token_info_push 10810 static void 10811 token_info_push(struct parser_params *parser, const char *token) 10812 { 10813 token_info *ptinfo; 10814 10815 if (!parser->parser_token_info_enabled) return; 10816 ptinfo = ALLOC(token_info); 10817 ptinfo->token = token; 10818 ptinfo->linenum = ruby_sourceline; 10819 ptinfo->column = token_info_get_column(parser, token); 10820 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 10821 ptinfo->next = parser->parser_token_info; 10822 10823 parser->parser_token_info = ptinfo; 10824 } 10825 10826 #undef token_info_pop 10827 static void 10828 token_info_pop(struct parser_params *parser, const char *token) 10829 { 10830 int linenum; 10831 token_info *ptinfo = parser->parser_token_info; 10832 10833 if (!ptinfo) return; 10834 parser->parser_token_info = ptinfo->next; 10835 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 10836 goto finish; 10837 } 10838 linenum = ruby_sourceline; 10839 if (linenum == ptinfo->linenum) { /* SKIP */ 10840 goto finish; 10841 } 10842 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 10843 goto finish; 10844 } 10845 if (parser->parser_token_info_enabled) { 10846 rb_compile_warn(ruby_sourcefile, linenum, 10847 "mismatched indentations at '%s' with '%s' at %d", 10848 token, ptinfo->token, ptinfo->linenum); 10849 } 10850 10851 finish: 10852 xfree(ptinfo); 10853 } 10854 #endif /* RIPPER */ 10855 10856 static int 10857 parser_yyerror(struct parser_params *parser, const char *msg) 10858 { 10859 #ifndef RIPPER 10860 const int max_line_margin = 30; 10861 const char *p, *pe; 10862 char *buf; 10863 long len; 10864 int i; 10865 10866 compile_error(PARSER_ARG "%s", msg); 10867 p = lex_p; 10868 while (lex_pbeg <= p) { 10869 if (*p == '\n') break; 10870 p--; 10871 } 10872 p++; 10873 10874 pe = lex_p; 10875 while (pe < lex_pend) { 10876 if (*pe == '\n') break; 10877 pe++; 10878 } 10879 10880 len = pe - p; 10881 if (len > 4) { 10882 char *p2; 10883 const char *pre = "", *post = ""; 10884 10885 if (len > max_line_margin * 2 + 10) { 10886 if (lex_p - p > max_line_margin) { 10887 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 10888 pre = "..."; 10889 } 10890 if (pe - lex_p > max_line_margin) { 10891 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 10892 post = "..."; 10893 } 10894 len = pe - p; 10895 } 10896 buf = ALLOCA_N(char, len+2); 10897 MEMCPY(buf, p, char, len); 10898 buf[len] = '\0'; 10899 rb_compile_error_append("%s%s%s", pre, buf, post); 10900 10901 i = (int)(lex_p - p); 10902 p2 = buf; pe = buf + len; 10903 10904 while (p2 < pe) { 10905 if (*p2 != '\t') *p2 = ' '; 10906 p2++; 10907 } 10908 buf[i] = '^'; 10909 buf[i+1] = '\0'; 10910 rb_compile_error_append("%s%s", pre, buf); 10911 } 10912 #else 10913 dispatch1(parse_error, STR_NEW2(msg)); 10914 #endif /* !RIPPER */ 10915 return 0; 10916 } 10917 10918 static void parser_prepare(struct parser_params *parser); 10919 10920 #ifndef RIPPER 10921 static VALUE 10922 debug_lines(const char *f) 10923 { 10924 ID script_lines; 10925 CONST_ID(script_lines, "SCRIPT_LINES__"); 10926 if (rb_const_defined_at(rb_cObject, script_lines)) { 10927 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 10928 if (TYPE(hash) == T_HASH) { 10929 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10930 VALUE lines = rb_ary_new(); 10931 rb_hash_aset(hash, fname, lines); 10932 return lines; 10933 } 10934 } 10935 return 0; 10936 } 10937 10938 static VALUE 10939 coverage(const char *f, int n) 10940 { 10941 VALUE coverages = rb_get_coverages(); 10942 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 10943 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 10944 VALUE lines = rb_ary_new2(n); 10945 int i; 10946 RBASIC(lines)->klass = 0; 10947 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 10948 RARRAY(lines)->as.heap.len = n; 10949 rb_hash_aset(coverages, fname, lines); 10950 return lines; 10951 } 10952 return 0; 10953 } 10954 10955 static int 10956 e_option_supplied(struct parser_params *parser) 10957 { 10958 return strcmp(ruby_sourcefile, "-e") == 0; 10959 } 10960 10961 static VALUE 10962 yycompile0(VALUE arg, int tracing) 10963 { 10964 int n; 10965 NODE *tree; 10966 struct parser_params *parser = (struct parser_params *)arg; 10967 10968 if (!compile_for_eval && rb_safe_level() == 0) { 10969 ruby_debug_lines = debug_lines(ruby_sourcefile); 10970 if (ruby_debug_lines && ruby_sourceline > 0) { 10971 VALUE str = STR_NEW0(); 10972 n = ruby_sourceline; 10973 do { 10974 rb_ary_push(ruby_debug_lines, str); 10975 } while (--n); 10976 } 10977 10978 if (!e_option_supplied(parser)) { 10979 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); 10980 } 10981 } 10982 10983 parser_prepare(parser); 10984 deferred_nodes = 0; 10985 #ifndef RIPPER 10986 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 10987 #endif 10988 n = yyparse((void*)parser); 10989 ruby_debug_lines = 0; 10990 ruby_coverage = 0; 10991 compile_for_eval = 0; 10992 10993 lex_strterm = 0; 10994 lex_p = lex_pbeg = lex_pend = 0; 10995 lex_lastline = lex_nextline = 0; 10996 if (parser->nerr) { 10997 return 0; 10998 } 10999 tree = ruby_eval_tree; 11000 if (!tree) { 11001 tree = NEW_NIL(); 11002 } 11003 else if (ruby_eval_tree_begin) { 11004 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 11005 } 11006 return (VALUE)tree; 11007 } 11008 11009 static NODE* 11010 yycompile(struct parser_params *parser, const char *f, int line) 11011 { 11012 ruby_sourcefile = ruby_strdup(f); 11013 ruby_sourceline = line - 1; 11014 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE); 11015 } 11016 #endif /* !RIPPER */ 11017 11018 static rb_encoding * 11019 must_be_ascii_compatible(VALUE s) 11020 { 11021 rb_encoding *enc = rb_enc_get(s); 11022 if (!rb_enc_asciicompat(enc)) { 11023 rb_raise(rb_eArgError, "invalid source encoding"); 11024 } 11025 return enc; 11026 } 11027 11028 static VALUE 11029 lex_get_str(struct parser_params *parser, VALUE s) 11030 { 11031 char *beg, *end, *pend; 11032 rb_encoding *enc = must_be_ascii_compatible(s); 11033 11034 beg = RSTRING_PTR(s); 11035 if (lex_gets_ptr) { 11036 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11037 beg += lex_gets_ptr; 11038 } 11039 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11040 end = beg; 11041 while (end < pend) { 11042 if (*end++ == '\n') break; 11043 } 11044 lex_gets_ptr = end - RSTRING_PTR(s); 11045 return rb_enc_str_new(beg, end - beg, enc); 11046 } 11047 11048 static VALUE 11049 lex_getline(struct parser_params *parser) 11050 { 11051 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11052 if (NIL_P(line)) return line; 11053 must_be_ascii_compatible(line); 11054 #ifndef RIPPER 11055 if (ruby_debug_lines) { 11056 rb_enc_associate(line, parser->enc); 11057 rb_ary_push(ruby_debug_lines, line); 11058 } 11059 if (ruby_coverage) { 11060 rb_ary_push(ruby_coverage, Qnil); 11061 } 11062 #endif 11063 return line; 11064 } 11065 11066 #ifdef RIPPER 11067 static rb_data_type_t parser_data_type; 11068 #else 11069 static const rb_data_type_t parser_data_type; 11070 11071 static NODE* 11072 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11073 { 11074 struct parser_params *parser; 11075 NODE *node; 11076 volatile VALUE tmp; 11077 11078 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11079 lex_gets = lex_get_str; 11080 lex_gets_ptr = 0; 11081 lex_input = s; 11082 lex_pbeg = lex_p = lex_pend = 0; 11083 compile_for_eval = rb_parse_in_eval(); 11084 11085 node = yycompile(parser, f, line); 11086 tmp = vparser; /* prohibit tail call optimization */ 11087 11088 return node; 11089 } 11090 11091 NODE* 11092 rb_compile_string(const char *f, VALUE s, int line) 11093 { 11094 must_be_ascii_compatible(s); 11095 return parser_compile_string(rb_parser_new(), f, s, line); 11096 } 11097 11098 NODE* 11099 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11100 { 11101 must_be_ascii_compatible(s); 11102 return parser_compile_string(vparser, f, s, line); 11103 } 11104 11105 NODE* 11106 rb_compile_cstr(const char *f, const char *s, int len, int line) 11107 { 11108 VALUE str = rb_str_new(s, len); 11109 return parser_compile_string(rb_parser_new(), f, str, line); 11110 } 11111 11112 NODE* 11113 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 11114 { 11115 VALUE str = rb_str_new(s, len); 11116 return parser_compile_string(vparser, f, str, line); 11117 } 11118 11119 static VALUE 11120 lex_io_gets(struct parser_params *parser, VALUE io) 11121 { 11122 return rb_io_gets(io); 11123 } 11124 11125 NODE* 11126 rb_compile_file(const char *f, VALUE file, int start) 11127 { 11128 VALUE volatile vparser = rb_parser_new(); 11129 11130 return rb_parser_compile_file(vparser, f, file, start); 11131 } 11132 11133 NODE* 11134 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 11135 { 11136 struct parser_params *parser; 11137 volatile VALUE tmp; 11138 NODE *node; 11139 11140 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11141 lex_gets = lex_io_gets; 11142 lex_input = file; 11143 lex_pbeg = lex_p = lex_pend = 0; 11144 compile_for_eval = rb_parse_in_eval(); 11145 11146 node = yycompile(parser, f, start); 11147 tmp = vparser; /* prohibit tail call optimization */ 11148 11149 return node; 11150 } 11151 #endif /* !RIPPER */ 11152 11153 #define STR_FUNC_ESCAPE 0x01 11154 #define STR_FUNC_EXPAND 0x02 11155 #define STR_FUNC_REGEXP 0x04 11156 #define STR_FUNC_QWORDS 0x08 11157 #define STR_FUNC_SYMBOL 0x10 11158 #define STR_FUNC_INDENT 0x20 11159 11160 enum string_type { 11161 str_squote = (0), 11162 str_dquote = (STR_FUNC_EXPAND), 11163 str_xquote = (STR_FUNC_EXPAND), 11164 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 11165 str_sword = (STR_FUNC_QWORDS), 11166 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 11167 str_ssym = (STR_FUNC_SYMBOL), 11168 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 11169 }; 11170 11171 static VALUE 11172 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 11173 { 11174 VALUE str; 11175 11176 str = rb_enc_str_new(p, n, enc); 11177 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 11178 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 11179 } 11180 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 11181 rb_enc_associate(str, rb_ascii8bit_encoding()); 11182 } 11183 } 11184 11185 return str; 11186 } 11187 11188 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 11189 #define lex_eol_p() (lex_p >= lex_pend) 11190 #define peek(c) peek_n((c), 0) 11191 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 11192 11193 static inline int 11194 parser_nextc(struct parser_params *parser) 11195 { 11196 int c; 11197 11198 if (lex_p == lex_pend) { 11199 VALUE v = lex_nextline; 11200 lex_nextline = 0; 11201 if (!v) { 11202 if (parser->eofp) 11203 return -1; 11204 11205 if (!lex_input || NIL_P(v = lex_getline(parser))) { 11206 parser->eofp = Qtrue; 11207 lex_goto_eol(parser); 11208 return -1; 11209 } 11210 } 11211 { 11212 #ifdef RIPPER 11213 if (parser->tokp < lex_pend) { 11214 if (NIL_P(parser->delayed)) { 11215 parser->delayed = rb_str_buf_new(1024); 11216 rb_enc_associate(parser->delayed, parser->enc); 11217 rb_str_buf_cat(parser->delayed, 11218 parser->tokp, lex_pend - parser->tokp); 11219 parser->delayed_line = ruby_sourceline; 11220 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 11221 } 11222 else { 11223 rb_str_buf_cat(parser->delayed, 11224 parser->tokp, lex_pend - parser->tokp); 11225 } 11226 } 11227 #endif 11228 if (heredoc_end > 0) { 11229 ruby_sourceline = heredoc_end; 11230 heredoc_end = 0; 11231 } 11232 ruby_sourceline++; 11233 parser->line_count++; 11234 lex_pbeg = lex_p = RSTRING_PTR(v); 11235 lex_pend = lex_p + RSTRING_LEN(v); 11236 ripper_flush(parser); 11237 lex_lastline = v; 11238 } 11239 } 11240 c = (unsigned char)*lex_p++; 11241 if (c == '\r' && peek('\n')) { 11242 lex_p++; 11243 c = '\n'; 11244 } 11245 11246 return c; 11247 } 11248 11249 static void 11250 parser_pushback(struct parser_params *parser, int c) 11251 { 11252 if (c == -1) return; 11253 lex_p--; 11254 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 11255 lex_p--; 11256 } 11257 } 11258 11259 #define was_bol() (lex_p == lex_pbeg + 1) 11260 11261 #define tokfix() (tokenbuf[tokidx]='\0') 11262 #define tok() tokenbuf 11263 #define toklen() tokidx 11264 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 11265 11266 static char* 11267 parser_newtok(struct parser_params *parser) 11268 { 11269 tokidx = 0; 11270 if (!tokenbuf) { 11271 toksiz = 60; 11272 tokenbuf = ALLOC_N(char, 60); 11273 } 11274 if (toksiz > 4096) { 11275 toksiz = 60; 11276 REALLOC_N(tokenbuf, char, 60); 11277 } 11278 return tokenbuf; 11279 } 11280 11281 static char * 11282 parser_tokspace(struct parser_params *parser, int n) 11283 { 11284 tokidx += n; 11285 11286 if (tokidx >= toksiz) { 11287 do {toksiz *= 2;} while (toksiz < tokidx); 11288 REALLOC_N(tokenbuf, char, toksiz); 11289 } 11290 return &tokenbuf[tokidx-n]; 11291 } 11292 11293 static void 11294 parser_tokadd(struct parser_params *parser, int c) 11295 { 11296 tokenbuf[tokidx++] = (char)c; 11297 if (tokidx >= toksiz) { 11298 toksiz *= 2; 11299 REALLOC_N(tokenbuf, char, toksiz); 11300 } 11301 } 11302 11303 static int 11304 parser_tok_hex(struct parser_params *parser, size_t *numlen) 11305 { 11306 int c; 11307 11308 c = scan_hex(lex_p, 2, numlen); 11309 if (!*numlen) { 11310 yyerror("invalid hex escape"); 11311 return 0; 11312 } 11313 lex_p += *numlen; 11314 return c; 11315 } 11316 11317 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 11318 11319 static int 11320 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 11321 int string_literal, int symbol_literal, int regexp_literal) 11322 { 11323 /* 11324 * If string_literal is true, then we allow multiple codepoints 11325 * in \u{}, and add the codepoints to the current token. 11326 * Otherwise we're parsing a character literal and return a single 11327 * codepoint without adding it 11328 */ 11329 11330 int codepoint; 11331 size_t numlen; 11332 11333 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 11334 11335 if (peek('{')) { /* handle \u{...} form */ 11336 do { 11337 if (regexp_literal) { tokadd(*lex_p); } 11338 nextc(); 11339 codepoint = scan_hex(lex_p, 6, &numlen); 11340 if (numlen == 0) { 11341 yyerror("invalid Unicode escape"); 11342 return 0; 11343 } 11344 if (codepoint > 0x10ffff) { 11345 yyerror("invalid Unicode codepoint (too large)"); 11346 return 0; 11347 } 11348 lex_p += numlen; 11349 if (regexp_literal) { 11350 tokcopy((int)numlen); 11351 } 11352 else if (codepoint >= 0x80) { 11353 *encp = UTF8_ENC(); 11354 if (string_literal) tokaddmbc(codepoint, *encp); 11355 } 11356 else if (string_literal) { 11357 tokadd(codepoint); 11358 } 11359 } while (string_literal && (peek(' ') || peek('\t'))); 11360 11361 if (!peek('}')) { 11362 yyerror("unterminated Unicode escape"); 11363 return 0; 11364 } 11365 11366 if (regexp_literal) { tokadd('}'); } 11367 nextc(); 11368 } 11369 else { /* handle \uxxxx form */ 11370 codepoint = scan_hex(lex_p, 4, &numlen); 11371 if (numlen < 4) { 11372 yyerror("invalid Unicode escape"); 11373 return 0; 11374 } 11375 lex_p += 4; 11376 if (regexp_literal) { 11377 tokcopy(4); 11378 } 11379 else if (codepoint >= 0x80) { 11380 *encp = UTF8_ENC(); 11381 if (string_literal) tokaddmbc(codepoint, *encp); 11382 } 11383 else if (string_literal) { 11384 tokadd(codepoint); 11385 } 11386 } 11387 11388 return codepoint; 11389 } 11390 11391 #define ESCAPE_CONTROL 1 11392 #define ESCAPE_META 2 11393 11394 static int 11395 parser_read_escape(struct parser_params *parser, int flags, 11396 rb_encoding **encp) 11397 { 11398 int c; 11399 size_t numlen; 11400 11401 switch (c = nextc()) { 11402 case '\\': /* Backslash */ 11403 return c; 11404 11405 case 'n': /* newline */ 11406 return '\n'; 11407 11408 case 't': /* horizontal tab */ 11409 return '\t'; 11410 11411 case 'r': /* carriage-return */ 11412 return '\r'; 11413 11414 case 'f': /* form-feed */ 11415 return '\f'; 11416 11417 case 'v': /* vertical tab */ 11418 return '\13'; 11419 11420 case 'a': /* alarm(bell) */ 11421 return '\007'; 11422 11423 case 'e': /* escape */ 11424 return 033; 11425 11426 case '0': case '1': case '2': case '3': /* octal constant */ 11427 case '4': case '5': case '6': case '7': 11428 pushback(c); 11429 c = scan_oct(lex_p, 3, &numlen); 11430 lex_p += numlen; 11431 return c; 11432 11433 case 'x': /* hex constant */ 11434 c = tok_hex(&numlen); 11435 if (numlen == 0) return 0; 11436 return c; 11437 11438 case 'b': /* backspace */ 11439 return '\010'; 11440 11441 case 's': /* space */ 11442 return ' '; 11443 11444 case 'M': 11445 if (flags & ESCAPE_META) goto eof; 11446 if ((c = nextc()) != '-') { 11447 pushback(c); 11448 goto eof; 11449 } 11450 if ((c = nextc()) == '\\') { 11451 if (peek('u')) goto eof; 11452 return read_escape(flags|ESCAPE_META, encp) | 0x80; 11453 } 11454 else if (c == -1 || !ISASCII(c)) goto eof; 11455 else { 11456 return ((c & 0xff) | 0x80); 11457 } 11458 11459 case 'C': 11460 if ((c = nextc()) != '-') { 11461 pushback(c); 11462 goto eof; 11463 } 11464 case 'c': 11465 if (flags & ESCAPE_CONTROL) goto eof; 11466 if ((c = nextc())== '\\') { 11467 if (peek('u')) goto eof; 11468 c = read_escape(flags|ESCAPE_CONTROL, encp); 11469 } 11470 else if (c == '?') 11471 return 0177; 11472 else if (c == -1 || !ISASCII(c)) goto eof; 11473 return c & 0x9f; 11474 11475 eof: 11476 case -1: 11477 yyerror("Invalid escape character syntax"); 11478 return '\0'; 11479 11480 default: 11481 return c; 11482 } 11483 } 11484 11485 static void 11486 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 11487 { 11488 int len = rb_enc_codelen(c, enc); 11489 rb_enc_mbcput(c, tokspace(len), enc); 11490 } 11491 11492 static int 11493 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 11494 { 11495 int c; 11496 int flags = 0; 11497 size_t numlen; 11498 11499 first: 11500 switch (c = nextc()) { 11501 case '\n': 11502 return 0; /* just ignore */ 11503 11504 case '0': case '1': case '2': case '3': /* octal constant */ 11505 case '4': case '5': case '6': case '7': 11506 { 11507 ruby_scan_oct(--lex_p, 3, &numlen); 11508 if (numlen == 0) goto eof; 11509 lex_p += numlen; 11510 tokcopy((int)numlen + 1); 11511 } 11512 return 0; 11513 11514 case 'x': /* hex constant */ 11515 { 11516 tok_hex(&numlen); 11517 if (numlen == 0) return -1; 11518 tokcopy((int)numlen + 2); 11519 } 11520 return 0; 11521 11522 case 'M': 11523 if (flags & ESCAPE_META) goto eof; 11524 if ((c = nextc()) != '-') { 11525 pushback(c); 11526 goto eof; 11527 } 11528 tokcopy(3); 11529 flags |= ESCAPE_META; 11530 goto escaped; 11531 11532 case 'C': 11533 if (flags & ESCAPE_CONTROL) goto eof; 11534 if ((c = nextc()) != '-') { 11535 pushback(c); 11536 goto eof; 11537 } 11538 tokcopy(3); 11539 goto escaped; 11540 11541 case 'c': 11542 if (flags & ESCAPE_CONTROL) goto eof; 11543 tokcopy(2); 11544 flags |= ESCAPE_CONTROL; 11545 escaped: 11546 if ((c = nextc()) == '\\') { 11547 goto first; 11548 } 11549 else if (c == -1) goto eof; 11550 tokadd(c); 11551 return 0; 11552 11553 eof: 11554 case -1: 11555 yyerror("Invalid escape character syntax"); 11556 return -1; 11557 11558 default: 11559 tokadd('\\'); 11560 tokadd(c); 11561 } 11562 return 0; 11563 } 11564 11565 static int 11566 parser_regx_options(struct parser_params *parser) 11567 { 11568 int kcode = 0; 11569 int kopt = 0; 11570 int options = 0; 11571 int c, opt, kc; 11572 11573 newtok(); 11574 while (c = nextc(), ISALPHA(c)) { 11575 if (c == 'o') { 11576 options |= RE_OPTION_ONCE; 11577 } 11578 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 11579 if (kc >= 0) { 11580 if (kc != rb_ascii8bit_encindex()) kcode = c; 11581 kopt = opt; 11582 } 11583 else { 11584 options |= opt; 11585 } 11586 } 11587 else { 11588 tokadd(c); 11589 } 11590 } 11591 options |= kopt; 11592 pushback(c); 11593 if (toklen()) { 11594 tokfix(); 11595 compile_error(PARSER_ARG "unknown regexp option%s - %s", 11596 toklen() > 1 ? "s" : "", tok()); 11597 } 11598 return options | RE_OPTION_ENCODING(kcode); 11599 } 11600 11601 static void 11602 dispose_string(VALUE str) 11603 { 11604 /* TODO: should use another API? */ 11605 if (RBASIC(str)->flags & RSTRING_NOEMBED) 11606 xfree(RSTRING_PTR(str)); 11607 rb_gc_force_recycle(str); 11608 } 11609 11610 static int 11611 parser_tokadd_mbchar(struct parser_params *parser, int c) 11612 { 11613 int len = parser_precise_mbclen(); 11614 if (!MBCLEN_CHARFOUND_P(len)) { 11615 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 11616 return -1; 11617 } 11618 tokadd(c); 11619 lex_p += --len; 11620 if (len > 0) tokcopy(len); 11621 return c; 11622 } 11623 11624 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 11625 11626 static int 11627 parser_tokadd_string(struct parser_params *parser, 11628 int func, int term, int paren, long *nest, 11629 rb_encoding **encp) 11630 { 11631 int c; 11632 int has_nonascii = 0; 11633 rb_encoding *enc = *encp; 11634 char *errbuf = 0; 11635 static const char mixed_msg[] = "%s mixed within %s source"; 11636 11637 #define mixed_error(enc1, enc2) if (!errbuf) { \ 11638 size_t len = sizeof(mixed_msg) - 4; \ 11639 len += strlen(rb_enc_name(enc1)); \ 11640 len += strlen(rb_enc_name(enc2)); \ 11641 errbuf = ALLOCA_N(char, len); \ 11642 snprintf(errbuf, len, mixed_msg, \ 11643 rb_enc_name(enc1), \ 11644 rb_enc_name(enc2)); \ 11645 yyerror(errbuf); \ 11646 } 11647 #define mixed_escape(beg, enc1, enc2) do { \ 11648 const char *pos = lex_p; \ 11649 lex_p = (beg); \ 11650 mixed_error((enc1), (enc2)); \ 11651 lex_p = pos; \ 11652 } while (0) 11653 11654 while ((c = nextc()) != -1) { 11655 if (paren && c == paren) { 11656 ++*nest; 11657 } 11658 else if (c == term) { 11659 if (!nest || !*nest) { 11660 pushback(c); 11661 break; 11662 } 11663 --*nest; 11664 } 11665 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 11666 int c2 = *lex_p; 11667 if (c2 == '$' || c2 == '@' || c2 == '{') { 11668 pushback(c); 11669 break; 11670 } 11671 } 11672 else if (c == '\\') { 11673 const char *beg = lex_p - 1; 11674 c = nextc(); 11675 switch (c) { 11676 case '\n': 11677 if (func & STR_FUNC_QWORDS) break; 11678 if (func & STR_FUNC_EXPAND) continue; 11679 tokadd('\\'); 11680 break; 11681 11682 case '\\': 11683 if (func & STR_FUNC_ESCAPE) tokadd(c); 11684 break; 11685 11686 case 'u': 11687 if ((func & STR_FUNC_EXPAND) == 0) { 11688 tokadd('\\'); 11689 break; 11690 } 11691 parser_tokadd_utf8(parser, &enc, 1, 11692 func & STR_FUNC_SYMBOL, 11693 func & STR_FUNC_REGEXP); 11694 if (has_nonascii && enc != *encp) { 11695 mixed_escape(beg, enc, *encp); 11696 } 11697 continue; 11698 11699 default: 11700 if (c == -1) return -1; 11701 if (!ISASCII(c)) { 11702 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 11703 goto non_ascii; 11704 } 11705 if (func & STR_FUNC_REGEXP) { 11706 pushback(c); 11707 if ((c = tokadd_escape(&enc)) < 0) 11708 return -1; 11709 if (has_nonascii && enc != *encp) { 11710 mixed_escape(beg, enc, *encp); 11711 } 11712 continue; 11713 } 11714 else if (func & STR_FUNC_EXPAND) { 11715 pushback(c); 11716 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 11717 c = read_escape(0, &enc); 11718 } 11719 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11720 /* ignore backslashed spaces in %w */ 11721 } 11722 else if (c != term && !(paren && c == paren)) { 11723 tokadd('\\'); 11724 pushback(c); 11725 continue; 11726 } 11727 } 11728 } 11729 else if (!parser_isascii()) { 11730 non_ascii: 11731 has_nonascii = 1; 11732 if (enc != *encp) { 11733 mixed_error(enc, *encp); 11734 continue; 11735 } 11736 if (tokadd_mbchar(c) == -1) return -1; 11737 continue; 11738 } 11739 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11740 pushback(c); 11741 break; 11742 } 11743 if (c & 0x80) { 11744 has_nonascii = 1; 11745 if (enc != *encp) { 11746 mixed_error(enc, *encp); 11747 continue; 11748 } 11749 } 11750 tokadd(c); 11751 } 11752 *encp = enc; 11753 return c; 11754 } 11755 11756 #define NEW_STRTERM(func, term, paren) \ 11757 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 11758 11759 #ifdef RIPPER 11760 static void 11761 ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc) 11762 { 11763 if (!NIL_P(parser->delayed)) { 11764 ptrdiff_t len = lex_p - parser->tokp; 11765 if (len > 0) { 11766 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 11767 } 11768 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 11769 parser->tokp = lex_p; 11770 } 11771 } 11772 11773 #define flush_string_content(enc) ripper_flush_string_content(parser, (enc)) 11774 #else 11775 #define flush_string_content(enc) ((void)(enc)) 11776 #endif 11777 11778 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32]; 11779 /* this can be shared with ripper, since it's independent from struct 11780 * parser_params. */ 11781 #ifndef RIPPER 11782 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) 11783 #define SPECIAL_PUNCT(idx) ( \ 11784 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \ 11785 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \ 11786 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \ 11787 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \ 11788 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \ 11789 BIT('0', idx)) 11790 const unsigned int ruby_global_name_punct_bits[] = { 11791 SPECIAL_PUNCT(0), 11792 SPECIAL_PUNCT(1), 11793 SPECIAL_PUNCT(2), 11794 }; 11795 #undef BIT 11796 #undef SPECIAL_PUNCT 11797 #endif 11798 11799 static inline int 11800 is_global_name_punct(const char c) 11801 { 11802 if (c <= 0x20 || 0x7e < c) return 0; 11803 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1; 11804 } 11805 11806 static int 11807 parser_peek_variable_name(struct parser_params *parser) 11808 { 11809 int c; 11810 const char *p = lex_p; 11811 11812 if (p + 1 >= lex_pend) return 0; 11813 c = *p++; 11814 switch (c) { 11815 case '$': 11816 if ((c = *p) == '-') { 11817 if (++p >= lex_pend) return 0; 11818 c = *p; 11819 } 11820 else if (is_global_name_punct(c) || ISDIGIT(c)) { 11821 return tSTRING_DVAR; 11822 } 11823 break; 11824 case '@': 11825 if ((c = *p) == '@') { 11826 if (++p >= lex_pend) return 0; 11827 c = *p; 11828 } 11829 break; 11830 case '{': 11831 lex_p = p; 11832 command_start = TRUE; 11833 return tSTRING_DBEG; 11834 default: 11835 return 0; 11836 } 11837 if (!ISASCII(c) || c == '_' || ISALPHA(c)) 11838 return tSTRING_DVAR; 11839 return 0; 11840 } 11841 11842 static int 11843 parser_parse_string(struct parser_params *parser, NODE *quote) 11844 { 11845 int func = (int)quote->nd_func; 11846 int term = nd_term(quote); 11847 int paren = nd_paren(quote); 11848 int c, space = 0; 11849 rb_encoding *enc = parser->enc; 11850 11851 if (func == -1) return tSTRING_END; 11852 c = nextc(); 11853 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 11854 do {c = nextc();} while (ISSPACE(c)); 11855 space = 1; 11856 } 11857 if (c == term && !quote->nd_nest) { 11858 if (func & STR_FUNC_QWORDS) { 11859 quote->nd_func = -1; 11860 return ' '; 11861 } 11862 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 11863 set_yylval_num(regx_options()); 11864 return tREGEXP_END; 11865 } 11866 if (space) { 11867 pushback(c); 11868 return ' '; 11869 } 11870 newtok(); 11871 if ((func & STR_FUNC_EXPAND) && c == '#') { 11872 int t = parser_peek_variable_name(parser); 11873 if (t) return t; 11874 tokadd('#'); 11875 c = nextc(); 11876 } 11877 pushback(c); 11878 if (tokadd_string(func, term, paren, "e->nd_nest, 11879 &enc) == -1) { 11880 ruby_sourceline = nd_line(quote); 11881 if (func & STR_FUNC_REGEXP) { 11882 if (parser->eofp) 11883 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 11884 return tREGEXP_END; 11885 } 11886 else { 11887 if (parser->eofp) 11888 compile_error(PARSER_ARG "unterminated string meets end of file"); 11889 return tSTRING_END; 11890 } 11891 } 11892 11893 tokfix(); 11894 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 11895 flush_string_content(enc); 11896 11897 return tSTRING_CONTENT; 11898 } 11899 11900 static int 11901 parser_heredoc_identifier(struct parser_params *parser) 11902 { 11903 int c = nextc(), term, func = 0; 11904 long len; 11905 11906 if (c == '-') { 11907 c = nextc(); 11908 func = STR_FUNC_INDENT; 11909 } 11910 switch (c) { 11911 case '\'': 11912 func |= str_squote; goto quoted; 11913 case '"': 11914 func |= str_dquote; goto quoted; 11915 case '`': 11916 func |= str_xquote; 11917 quoted: 11918 newtok(); 11919 tokadd(func); 11920 term = c; 11921 while ((c = nextc()) != -1 && c != term) { 11922 if (tokadd_mbchar(c) == -1) return 0; 11923 } 11924 if (c == -1) { 11925 compile_error(PARSER_ARG "unterminated here document identifier"); 11926 return 0; 11927 } 11928 break; 11929 11930 default: 11931 if (!parser_is_identchar()) { 11932 pushback(c); 11933 if (func & STR_FUNC_INDENT) { 11934 pushback('-'); 11935 } 11936 return 0; 11937 } 11938 newtok(); 11939 term = '"'; 11940 tokadd(func |= str_dquote); 11941 do { 11942 if (tokadd_mbchar(c) == -1) return 0; 11943 } while ((c = nextc()) != -1 && parser_is_identchar()); 11944 pushback(c); 11945 break; 11946 } 11947 11948 tokfix(); 11949 #ifdef RIPPER 11950 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 11951 #endif 11952 len = lex_p - lex_pbeg; 11953 lex_goto_eol(parser); 11954 lex_strterm = rb_node_newnode(NODE_HEREDOC, 11955 STR_NEW(tok(), toklen()), /* nd_lit */ 11956 len, /* nd_nth */ 11957 lex_lastline); /* nd_orig */ 11958 nd_set_line(lex_strterm, ruby_sourceline); 11959 ripper_flush(parser); 11960 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 11961 } 11962 11963 static void 11964 parser_heredoc_restore(struct parser_params *parser, NODE *here) 11965 { 11966 VALUE line; 11967 11968 line = here->nd_orig; 11969 lex_lastline = line; 11970 lex_pbeg = RSTRING_PTR(line); 11971 lex_pend = lex_pbeg + RSTRING_LEN(line); 11972 lex_p = lex_pbeg + here->nd_nth; 11973 heredoc_end = ruby_sourceline; 11974 ruby_sourceline = nd_line(here); 11975 dispose_string(here->nd_lit); 11976 rb_gc_force_recycle((VALUE)here); 11977 ripper_flush(parser); 11978 } 11979 11980 static int 11981 parser_whole_match_p(struct parser_params *parser, 11982 const char *eos, long len, int indent) 11983 { 11984 const char *p = lex_pbeg; 11985 long n; 11986 11987 if (indent) { 11988 while (*p && ISSPACE(*p)) p++; 11989 } 11990 n = lex_pend - (p + len); 11991 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 11992 return strncmp(eos, p, len) == 0; 11993 } 11994 11995 #ifdef RIPPER 11996 static void 11997 ripper_dispatch_heredoc_end(struct parser_params *parser) 11998 { 11999 if (!NIL_P(parser->delayed)) 12000 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12001 lex_goto_eol(parser); 12002 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12003 } 12004 12005 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 12006 #else 12007 #define dispatch_heredoc_end() ((void)0) 12008 #endif 12009 12010 static int 12011 parser_here_document(struct parser_params *parser, NODE *here) 12012 { 12013 int c, func, indent = 0; 12014 const char *eos, *p, *pend; 12015 long len; 12016 VALUE str = 0; 12017 rb_encoding *enc = parser->enc; 12018 12019 eos = RSTRING_PTR(here->nd_lit); 12020 len = RSTRING_LEN(here->nd_lit) - 1; 12021 indent = (func = *eos++) & STR_FUNC_INDENT; 12022 12023 if ((c = nextc()) == -1) { 12024 error: 12025 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12026 #ifdef RIPPER 12027 if (NIL_P(parser->delayed)) { 12028 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12029 } 12030 else { 12031 if (str || 12032 ((len = lex_p - parser->tokp) > 0 && 12033 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 12034 rb_str_append(parser->delayed, str); 12035 } 12036 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12037 } 12038 lex_goto_eol(parser); 12039 #endif 12040 restore: 12041 heredoc_restore(lex_strterm); 12042 lex_strterm = 0; 12043 return 0; 12044 } 12045 if (was_bol() && whole_match_p(eos, len, indent)) { 12046 dispatch_heredoc_end(); 12047 heredoc_restore(lex_strterm); 12048 return tSTRING_END; 12049 } 12050 12051 if (!(func & STR_FUNC_EXPAND)) { 12052 do { 12053 p = RSTRING_PTR(lex_lastline); 12054 pend = lex_pend; 12055 if (pend > p) { 12056 switch (pend[-1]) { 12057 case '\n': 12058 if (--pend == p || pend[-1] != '\r') { 12059 pend++; 12060 break; 12061 } 12062 case '\r': 12063 --pend; 12064 } 12065 } 12066 if (str) 12067 rb_str_cat(str, p, pend - p); 12068 else 12069 str = STR_NEW(p, pend - p); 12070 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 12071 lex_goto_eol(parser); 12072 if (nextc() == -1) { 12073 if (str) dispose_string(str); 12074 goto error; 12075 } 12076 } while (!whole_match_p(eos, len, indent)); 12077 } 12078 else { 12079 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 12080 newtok(); 12081 if (c == '#') { 12082 int t = parser_peek_variable_name(parser); 12083 if (t) return t; 12084 tokadd('#'); 12085 c = nextc(); 12086 } 12087 do { 12088 pushback(c); 12089 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 12090 if (parser->eofp) goto error; 12091 goto restore; 12092 } 12093 if (c != '\n') { 12094 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12095 flush_string_content(enc); 12096 return tSTRING_CONTENT; 12097 } 12098 tokadd(nextc()); 12099 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 12100 if ((c = nextc()) == -1) goto error; 12101 } while (!whole_match_p(eos, len, indent)); 12102 str = STR_NEW3(tok(), toklen(), enc, func); 12103 } 12104 dispatch_heredoc_end(); 12105 heredoc_restore(lex_strterm); 12106 lex_strterm = NEW_STRTERM(-1, 0, 0); 12107 set_yylval_str(str); 12108 return tSTRING_CONTENT; 12109 } 12110 12111 #include "lex.c" 12112 12113 static void 12114 arg_ambiguous_gen(struct parser_params *parser) 12115 { 12116 #ifndef RIPPER 12117 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 12118 #else 12119 dispatch0(arg_ambiguous); 12120 #endif 12121 } 12122 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 12123 12124 static ID 12125 formal_argument_gen(struct parser_params *parser, ID lhs) 12126 { 12127 #ifndef RIPPER 12128 if (!is_local_id(lhs)) 12129 yyerror("formal argument must be local variable"); 12130 #endif 12131 shadowing_lvar(lhs); 12132 return lhs; 12133 } 12134 12135 static int 12136 lvar_defined_gen(struct parser_params *parser, ID id) 12137 { 12138 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 12139 } 12140 12141 /* emacsen -*- hack */ 12142 static long 12143 parser_encode_length(struct parser_params *parser, const char *name, long len) 12144 { 12145 long nlen; 12146 12147 if (len > 5 && name[nlen = len - 5] == '-') { 12148 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 12149 return nlen; 12150 } 12151 if (len > 4 && name[nlen = len - 4] == '-') { 12152 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 12153 return nlen; 12154 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 12155 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 12156 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 12157 return nlen; 12158 } 12159 return len; 12160 } 12161 12162 static void 12163 parser_set_encode(struct parser_params *parser, const char *name) 12164 { 12165 int idx = rb_enc_find_index(name); 12166 rb_encoding *enc; 12167 VALUE excargs[3]; 12168 12169 if (idx < 0) { 12170 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 12171 error: 12172 excargs[0] = rb_eArgError; 12173 excargs[2] = rb_make_backtrace(); 12174 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 12175 rb_exc_raise(rb_make_exception(3, excargs)); 12176 } 12177 enc = rb_enc_from_index(idx); 12178 if (!rb_enc_asciicompat(enc)) { 12179 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 12180 goto error; 12181 } 12182 parser->enc = enc; 12183 #ifndef RIPPER 12184 if (ruby_debug_lines) { 12185 long i, n = RARRAY_LEN(ruby_debug_lines); 12186 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 12187 for (i = 0; i < n; ++i) { 12188 rb_enc_associate_index(*p, idx); 12189 } 12190 } 12191 #endif 12192 } 12193 12194 static int 12195 comment_at_top(struct parser_params *parser) 12196 { 12197 const char *p = lex_pbeg, *pend = lex_p - 1; 12198 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 12199 while (p < pend) { 12200 if (!ISSPACE(*p)) return 0; 12201 p++; 12202 } 12203 return 1; 12204 } 12205 12206 #ifndef RIPPER 12207 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 12208 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 12209 12210 static void 12211 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 12212 { 12213 if (!comment_at_top(parser)) { 12214 return; 12215 } 12216 parser_set_encode(parser, val); 12217 } 12218 12219 static void 12220 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 12221 { 12222 int *p = &parser->parser_token_info_enabled; 12223 12224 switch (*val) { 12225 case 't': case 'T': 12226 if (strcasecmp(val, "true") == 0) { 12227 *p = TRUE; 12228 return; 12229 } 12230 break; 12231 case 'f': case 'F': 12232 if (strcasecmp(val, "false") == 0) { 12233 *p = FALSE; 12234 return; 12235 } 12236 break; 12237 } 12238 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 12239 } 12240 12241 struct magic_comment { 12242 const char *name; 12243 rb_magic_comment_setter_t func; 12244 rb_magic_comment_length_t length; 12245 }; 12246 12247 static const struct magic_comment magic_comments[] = { 12248 {"coding", magic_comment_encoding, parser_encode_length}, 12249 {"encoding", magic_comment_encoding, parser_encode_length}, 12250 {"warn_indent", parser_set_token_info}, 12251 }; 12252 #endif 12253 12254 static const char * 12255 magic_comment_marker(const char *str, long len) 12256 { 12257 long i = 2; 12258 12259 while (i < len) { 12260 switch (str[i]) { 12261 case '-': 12262 if (str[i-1] == '*' && str[i-2] == '-') { 12263 return str + i + 1; 12264 } 12265 i += 2; 12266 break; 12267 case '*': 12268 if (i + 1 >= len) return 0; 12269 if (str[i+1] != '-') { 12270 i += 4; 12271 } 12272 else if (str[i-1] != '-') { 12273 i += 2; 12274 } 12275 else { 12276 return str + i + 2; 12277 } 12278 break; 12279 default: 12280 i += 3; 12281 break; 12282 } 12283 } 12284 return 0; 12285 } 12286 12287 static int 12288 parser_magic_comment(struct parser_params *parser, const char *str, long len) 12289 { 12290 VALUE name = 0, val = 0; 12291 const char *beg, *end, *vbeg, *vend; 12292 #define str_copy(_s, _p, _n) ((_s) \ 12293 ? (void)(rb_str_resize((_s), (_n)), \ 12294 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 12295 : (void)((_s) = STR_NEW((_p), (_n)))) 12296 12297 if (len <= 7) return FALSE; 12298 if (!(beg = magic_comment_marker(str, len))) return FALSE; 12299 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 12300 str = beg; 12301 len = end - beg - 3; 12302 12303 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 12304 while (len > 0) { 12305 #ifndef RIPPER 12306 const struct magic_comment *p = magic_comments; 12307 #endif 12308 char *s; 12309 int i; 12310 long n = 0; 12311 12312 for (; len > 0 && *str; str++, --len) { 12313 switch (*str) { 12314 case '\'': case '"': case ':': case ';': 12315 continue; 12316 } 12317 if (!ISSPACE(*str)) break; 12318 } 12319 for (beg = str; len > 0; str++, --len) { 12320 switch (*str) { 12321 case '\'': case '"': case ':': case ';': 12322 break; 12323 default: 12324 if (ISSPACE(*str)) break; 12325 continue; 12326 } 12327 break; 12328 } 12329 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 12330 if (!len) break; 12331 if (*str != ':') continue; 12332 12333 do str++; while (--len > 0 && ISSPACE(*str)); 12334 if (!len) break; 12335 if (*str == '"') { 12336 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 12337 if (*str == '\\') { 12338 --len; 12339 ++str; 12340 } 12341 } 12342 vend = str; 12343 if (len) { 12344 --len; 12345 ++str; 12346 } 12347 } 12348 else { 12349 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 12350 vend = str; 12351 } 12352 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 12353 12354 n = end - beg; 12355 str_copy(name, beg, n); 12356 s = RSTRING_PTR(name); 12357 for (i = 0; i < n; ++i) { 12358 if (s[i] == '-') s[i] = '_'; 12359 } 12360 #ifndef RIPPER 12361 do { 12362 if (STRNCASECMP(p->name, s, n) == 0) { 12363 n = vend - vbeg; 12364 if (p->length) { 12365 n = (*p->length)(parser, vbeg, n); 12366 } 12367 str_copy(val, vbeg, n); 12368 (*p->func)(parser, s, RSTRING_PTR(val)); 12369 break; 12370 } 12371 } while (++p < magic_comments + numberof(magic_comments)); 12372 #else 12373 str_copy(val, vbeg, vend - vbeg); 12374 dispatch2(magic_comment, name, val); 12375 #endif 12376 } 12377 12378 return TRUE; 12379 } 12380 12381 static void 12382 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 12383 { 12384 int sep = 0; 12385 const char *beg = str; 12386 VALUE s; 12387 12388 for (;;) { 12389 if (send - str <= 6) return; 12390 switch (str[6]) { 12391 case 'C': case 'c': str += 6; continue; 12392 case 'O': case 'o': str += 5; continue; 12393 case 'D': case 'd': str += 4; continue; 12394 case 'I': case 'i': str += 3; continue; 12395 case 'N': case 'n': str += 2; continue; 12396 case 'G': case 'g': str += 1; continue; 12397 case '=': case ':': 12398 sep = 1; 12399 str += 6; 12400 break; 12401 default: 12402 str += 6; 12403 if (ISSPACE(*str)) break; 12404 continue; 12405 } 12406 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 12407 } 12408 for (;;) { 12409 do { 12410 if (++str >= send) return; 12411 } while (ISSPACE(*str)); 12412 if (sep) break; 12413 if (*str != '=' && *str != ':') return; 12414 sep = 1; 12415 str++; 12416 } 12417 beg = str; 12418 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 12419 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 12420 parser_set_encode(parser, RSTRING_PTR(s)); 12421 rb_str_resize(s, 0); 12422 } 12423 12424 static void 12425 parser_prepare(struct parser_params *parser) 12426 { 12427 int c = nextc(); 12428 switch (c) { 12429 case '#': 12430 if (peek('!')) parser->has_shebang = 1; 12431 break; 12432 case 0xef: /* UTF-8 BOM marker */ 12433 if (lex_pend - lex_p >= 2 && 12434 (unsigned char)lex_p[0] == 0xbb && 12435 (unsigned char)lex_p[1] == 0xbf) { 12436 parser->enc = rb_utf8_encoding(); 12437 lex_p += 2; 12438 lex_pbeg = lex_p; 12439 return; 12440 } 12441 break; 12442 case EOF: 12443 return; 12444 } 12445 pushback(c); 12446 parser->enc = rb_enc_get(lex_lastline); 12447 } 12448 12449 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) 12450 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) 12451 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) 12452 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 12453 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG()) 12454 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 12455 12456 #ifndef RIPPER 12457 #define ambiguous_operator(op, syn) ( \ 12458 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 12459 rb_warning0("even though it seems like "syn"")) 12460 #else 12461 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 12462 #endif 12463 #define warn_balanced(op, syn) ((void) \ 12464 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \ 12465 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \ 12466 last_state != EXPR_ENDARG && \ 12467 space_seen && !ISSPACE(c) && \ 12468 (ambiguous_operator(op, syn), 0))) 12469 12470 static int 12471 parser_yylex(struct parser_params *parser) 12472 { 12473 register int c; 12474 int space_seen = 0; 12475 int cmd_state; 12476 enum lex_state_e last_state; 12477 rb_encoding *enc; 12478 int mb; 12479 #ifdef RIPPER 12480 int fallthru = FALSE; 12481 #endif 12482 12483 if (lex_strterm) { 12484 int token; 12485 if (nd_type(lex_strterm) == NODE_HEREDOC) { 12486 token = here_document(lex_strterm); 12487 if (token == tSTRING_END) { 12488 lex_strterm = 0; 12489 lex_state = EXPR_END; 12490 } 12491 } 12492 else { 12493 token = parse_string(lex_strterm); 12494 if (token == tSTRING_END || token == tREGEXP_END) { 12495 rb_gc_force_recycle((VALUE)lex_strterm); 12496 lex_strterm = 0; 12497 lex_state = EXPR_END; 12498 } 12499 } 12500 return token; 12501 } 12502 cmd_state = command_start; 12503 command_start = FALSE; 12504 retry: 12505 last_state = lex_state; 12506 switch (c = nextc()) { 12507 case '\0': /* NUL */ 12508 case '\004': /* ^D */ 12509 case '\032': /* ^Z */ 12510 case -1: /* end of script. */ 12511 return 0; 12512 12513 /* white spaces */ 12514 case ' ': case '\t': case '\f': case '\r': 12515 case '\13': /* '\v' */ 12516 space_seen = 1; 12517 #ifdef RIPPER 12518 while ((c = nextc())) { 12519 switch (c) { 12520 case ' ': case '\t': case '\f': case '\r': 12521 case '\13': /* '\v' */ 12522 break; 12523 default: 12524 goto outofloop; 12525 } 12526 } 12527 outofloop: 12528 pushback(c); 12529 ripper_dispatch_scan_event(parser, tSP); 12530 #endif 12531 goto retry; 12532 12533 case '#': /* it's a comment */ 12534 /* no magic_comment in shebang line */ 12535 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 12536 if (comment_at_top(parser)) { 12537 set_file_encoding(parser, lex_p, lex_pend); 12538 } 12539 } 12540 lex_p = lex_pend; 12541 #ifdef RIPPER 12542 ripper_dispatch_scan_event(parser, tCOMMENT); 12543 fallthru = TRUE; 12544 #endif 12545 /* fall through */ 12546 case '\n': 12547 switch (lex_state) { 12548 case EXPR_BEG: 12549 case EXPR_FNAME: 12550 case EXPR_DOT: 12551 case EXPR_CLASS: 12552 case EXPR_VALUE: 12553 #ifdef RIPPER 12554 if (!fallthru) { 12555 ripper_dispatch_scan_event(parser, tIGNORED_NL); 12556 } 12557 fallthru = FALSE; 12558 #endif 12559 goto retry; 12560 default: 12561 break; 12562 } 12563 while ((c = nextc())) { 12564 switch (c) { 12565 case ' ': case '\t': case '\f': case '\r': 12566 case '\13': /* '\v' */ 12567 space_seen = 1; 12568 break; 12569 case '.': { 12570 if ((c = nextc()) != '.') { 12571 pushback(c); 12572 pushback('.'); 12573 goto retry; 12574 } 12575 } 12576 default: 12577 --ruby_sourceline; 12578 lex_nextline = lex_lastline; 12579 case -1: /* EOF no decrement*/ 12580 lex_goto_eol(parser); 12581 #ifdef RIPPER 12582 if (c != -1) { 12583 parser->tokp = lex_p; 12584 } 12585 #endif 12586 goto normal_newline; 12587 } 12588 } 12589 normal_newline: 12590 command_start = TRUE; 12591 lex_state = EXPR_BEG; 12592 return '\n'; 12593 12594 case '*': 12595 if ((c = nextc()) == '*') { 12596 if ((c = nextc()) == '=') { 12597 set_yylval_id(tPOW); 12598 lex_state = EXPR_BEG; 12599 return tOP_ASGN; 12600 } 12601 pushback(c); 12602 c = tPOW; 12603 } 12604 else { 12605 if (c == '=') { 12606 set_yylval_id('*'); 12607 lex_state = EXPR_BEG; 12608 return tOP_ASGN; 12609 } 12610 pushback(c); 12611 if (IS_SPCARG(c)) { 12612 rb_warning0("`*' interpreted as argument prefix"); 12613 c = tSTAR; 12614 } 12615 else if (IS_BEG()) { 12616 c = tSTAR; 12617 } 12618 else { 12619 warn_balanced("*", "argument prefix"); 12620 c = '*'; 12621 } 12622 } 12623 switch (lex_state) { 12624 case EXPR_FNAME: case EXPR_DOT: 12625 lex_state = EXPR_ARG; break; 12626 default: 12627 lex_state = EXPR_BEG; break; 12628 } 12629 return c; 12630 12631 case '!': 12632 c = nextc(); 12633 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12634 lex_state = EXPR_ARG; 12635 if (c == '@') { 12636 return '!'; 12637 } 12638 } 12639 else { 12640 lex_state = EXPR_BEG; 12641 } 12642 if (c == '=') { 12643 return tNEQ; 12644 } 12645 if (c == '~') { 12646 return tNMATCH; 12647 } 12648 pushback(c); 12649 return '!'; 12650 12651 case '=': 12652 if (was_bol()) { 12653 /* skip embedded rd document */ 12654 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 12655 #ifdef RIPPER 12656 int first_p = TRUE; 12657 12658 lex_goto_eol(parser); 12659 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 12660 #endif 12661 for (;;) { 12662 lex_goto_eol(parser); 12663 #ifdef RIPPER 12664 if (!first_p) { 12665 ripper_dispatch_scan_event(parser, tEMBDOC); 12666 } 12667 first_p = FALSE; 12668 #endif 12669 c = nextc(); 12670 if (c == -1) { 12671 compile_error(PARSER_ARG "embedded document meets end of file"); 12672 return 0; 12673 } 12674 if (c != '=') continue; 12675 if (strncmp(lex_p, "end", 3) == 0 && 12676 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 12677 break; 12678 } 12679 } 12680 lex_goto_eol(parser); 12681 #ifdef RIPPER 12682 ripper_dispatch_scan_event(parser, tEMBDOC_END); 12683 #endif 12684 goto retry; 12685 } 12686 } 12687 12688 switch (lex_state) { 12689 case EXPR_FNAME: case EXPR_DOT: 12690 lex_state = EXPR_ARG; break; 12691 default: 12692 lex_state = EXPR_BEG; break; 12693 } 12694 if ((c = nextc()) == '=') { 12695 if ((c = nextc()) == '=') { 12696 return tEQQ; 12697 } 12698 pushback(c); 12699 return tEQ; 12700 } 12701 if (c == '~') { 12702 return tMATCH; 12703 } 12704 else if (c == '>') { 12705 return tASSOC; 12706 } 12707 pushback(c); 12708 return '='; 12709 12710 case '<': 12711 last_state = lex_state; 12712 c = nextc(); 12713 if (c == '<' && 12714 lex_state != EXPR_DOT && 12715 lex_state != EXPR_CLASS && 12716 !IS_END() && 12717 (!IS_ARG() || space_seen)) { 12718 int token = heredoc_identifier(); 12719 if (token) return token; 12720 } 12721 switch (lex_state) { 12722 case EXPR_FNAME: case EXPR_DOT: 12723 lex_state = EXPR_ARG; break; 12724 default: 12725 lex_state = EXPR_BEG; break; 12726 } 12727 if (c == '=') { 12728 if ((c = nextc()) == '>') { 12729 return tCMP; 12730 } 12731 pushback(c); 12732 return tLEQ; 12733 } 12734 if (c == '<') { 12735 if ((c = nextc()) == '=') { 12736 set_yylval_id(tLSHFT); 12737 lex_state = EXPR_BEG; 12738 return tOP_ASGN; 12739 } 12740 pushback(c); 12741 warn_balanced("<<", "here document"); 12742 return tLSHFT; 12743 } 12744 pushback(c); 12745 return '<'; 12746 12747 case '>': 12748 switch (lex_state) { 12749 case EXPR_FNAME: case EXPR_DOT: 12750 lex_state = EXPR_ARG; break; 12751 default: 12752 lex_state = EXPR_BEG; break; 12753 } 12754 if ((c = nextc()) == '=') { 12755 return tGEQ; 12756 } 12757 if (c == '>') { 12758 if ((c = nextc()) == '=') { 12759 set_yylval_id(tRSHFT); 12760 lex_state = EXPR_BEG; 12761 return tOP_ASGN; 12762 } 12763 pushback(c); 12764 return tRSHFT; 12765 } 12766 pushback(c); 12767 return '>'; 12768 12769 case '"': 12770 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 12771 return tSTRING_BEG; 12772 12773 case '`': 12774 if (lex_state == EXPR_FNAME) { 12775 lex_state = EXPR_ENDFN; 12776 return c; 12777 } 12778 if (lex_state == EXPR_DOT) { 12779 if (cmd_state) 12780 lex_state = EXPR_CMDARG; 12781 else 12782 lex_state = EXPR_ARG; 12783 return c; 12784 } 12785 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 12786 return tXSTRING_BEG; 12787 12788 case '\'': 12789 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 12790 return tSTRING_BEG; 12791 12792 case '?': 12793 if (IS_END()) { 12794 lex_state = EXPR_VALUE; 12795 return '?'; 12796 } 12797 c = nextc(); 12798 if (c == -1) { 12799 compile_error(PARSER_ARG "incomplete character syntax"); 12800 return 0; 12801 } 12802 if (rb_enc_isspace(c, parser->enc)) { 12803 if (!IS_ARG()) { 12804 int c2 = 0; 12805 switch (c) { 12806 case ' ': 12807 c2 = 's'; 12808 break; 12809 case '\n': 12810 c2 = 'n'; 12811 break; 12812 case '\t': 12813 c2 = 't'; 12814 break; 12815 case '\v': 12816 c2 = 'v'; 12817 break; 12818 case '\r': 12819 c2 = 'r'; 12820 break; 12821 case '\f': 12822 c2 = 'f'; 12823 break; 12824 } 12825 if (c2) { 12826 rb_warnI("invalid character syntax; use ?\\%c", c2); 12827 } 12828 } 12829 ternary: 12830 pushback(c); 12831 lex_state = EXPR_VALUE; 12832 return '?'; 12833 } 12834 newtok(); 12835 enc = parser->enc; 12836 if (!parser_isascii()) { 12837 if (tokadd_mbchar(c) == -1) return 0; 12838 } 12839 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && 12840 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { 12841 goto ternary; 12842 } 12843 else if (c == '\\') { 12844 if (peek('u')) { 12845 nextc(); 12846 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 12847 if (0x80 <= c) { 12848 tokaddmbc(c, enc); 12849 } 12850 else { 12851 tokadd(c); 12852 } 12853 } 12854 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 12855 nextc(); 12856 if (tokadd_mbchar(c) == -1) return 0; 12857 } 12858 else { 12859 c = read_escape(0, &enc); 12860 tokadd(c); 12861 } 12862 } 12863 else { 12864 tokadd(c); 12865 } 12866 tokfix(); 12867 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 12868 lex_state = EXPR_END; 12869 return tCHAR; 12870 12871 case '&': 12872 if ((c = nextc()) == '&') { 12873 lex_state = EXPR_BEG; 12874 if ((c = nextc()) == '=') { 12875 set_yylval_id(tANDOP); 12876 lex_state = EXPR_BEG; 12877 return tOP_ASGN; 12878 } 12879 pushback(c); 12880 return tANDOP; 12881 } 12882 else if (c == '=') { 12883 set_yylval_id('&'); 12884 lex_state = EXPR_BEG; 12885 return tOP_ASGN; 12886 } 12887 pushback(c); 12888 if (IS_SPCARG(c)) { 12889 rb_warning0("`&' interpreted as argument prefix"); 12890 c = tAMPER; 12891 } 12892 else if (IS_BEG()) { 12893 c = tAMPER; 12894 } 12895 else { 12896 warn_balanced("&", "argument prefix"); 12897 c = '&'; 12898 } 12899 switch (lex_state) { 12900 case EXPR_FNAME: case EXPR_DOT: 12901 lex_state = EXPR_ARG; break; 12902 default: 12903 lex_state = EXPR_BEG; 12904 } 12905 return c; 12906 12907 case '|': 12908 if ((c = nextc()) == '|') { 12909 lex_state = EXPR_BEG; 12910 if ((c = nextc()) == '=') { 12911 set_yylval_id(tOROP); 12912 lex_state = EXPR_BEG; 12913 return tOP_ASGN; 12914 } 12915 pushback(c); 12916 return tOROP; 12917 } 12918 if (c == '=') { 12919 set_yylval_id('|'); 12920 lex_state = EXPR_BEG; 12921 return tOP_ASGN; 12922 } 12923 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12924 lex_state = EXPR_ARG; 12925 } 12926 else { 12927 lex_state = EXPR_BEG; 12928 } 12929 pushback(c); 12930 return '|'; 12931 12932 case '+': 12933 c = nextc(); 12934 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12935 lex_state = EXPR_ARG; 12936 if (c == '@') { 12937 return tUPLUS; 12938 } 12939 pushback(c); 12940 return '+'; 12941 } 12942 if (c == '=') { 12943 set_yylval_id('+'); 12944 lex_state = EXPR_BEG; 12945 return tOP_ASGN; 12946 } 12947 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12948 lex_state = EXPR_BEG; 12949 pushback(c); 12950 if (c != -1 && ISDIGIT(c)) { 12951 c = '+'; 12952 goto start_num; 12953 } 12954 return tUPLUS; 12955 } 12956 lex_state = EXPR_BEG; 12957 pushback(c); 12958 warn_balanced("+", "unary operator"); 12959 return '+'; 12960 12961 case '-': 12962 c = nextc(); 12963 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 12964 lex_state = EXPR_ARG; 12965 if (c == '@') { 12966 return tUMINUS; 12967 } 12968 pushback(c); 12969 return '-'; 12970 } 12971 if (c == '=') { 12972 set_yylval_id('-'); 12973 lex_state = EXPR_BEG; 12974 return tOP_ASGN; 12975 } 12976 if (c == '>') { 12977 lex_state = EXPR_ARG; 12978 return tLAMBDA; 12979 } 12980 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 12981 lex_state = EXPR_BEG; 12982 pushback(c); 12983 if (c != -1 && ISDIGIT(c)) { 12984 return tUMINUS_NUM; 12985 } 12986 return tUMINUS; 12987 } 12988 lex_state = EXPR_BEG; 12989 pushback(c); 12990 warn_balanced("-", "unary operator"); 12991 return '-'; 12992 12993 case '.': 12994 lex_state = EXPR_BEG; 12995 if ((c = nextc()) == '.') { 12996 if ((c = nextc()) == '.') { 12997 return tDOT3; 12998 } 12999 pushback(c); 13000 return tDOT2; 13001 } 13002 pushback(c); 13003 if (c != -1 && ISDIGIT(c)) { 13004 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13005 } 13006 lex_state = EXPR_DOT; 13007 return '.'; 13008 13009 start_num: 13010 case '0': case '1': case '2': case '3': case '4': 13011 case '5': case '6': case '7': case '8': case '9': 13012 { 13013 int is_float, seen_point, seen_e, nondigit; 13014 13015 is_float = seen_point = seen_e = nondigit = 0; 13016 lex_state = EXPR_END; 13017 newtok(); 13018 if (c == '-' || c == '+') { 13019 tokadd(c); 13020 c = nextc(); 13021 } 13022 if (c == '0') { 13023 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13024 int start = toklen(); 13025 c = nextc(); 13026 if (c == 'x' || c == 'X') { 13027 /* hexadecimal */ 13028 c = nextc(); 13029 if (c != -1 && ISXDIGIT(c)) { 13030 do { 13031 if (c == '_') { 13032 if (nondigit) break; 13033 nondigit = c; 13034 continue; 13035 } 13036 if (!ISXDIGIT(c)) break; 13037 nondigit = 0; 13038 tokadd(c); 13039 } while ((c = nextc()) != -1); 13040 } 13041 pushback(c); 13042 tokfix(); 13043 if (toklen() == start) { 13044 no_digits(); 13045 } 13046 else if (nondigit) goto trailing_uc; 13047 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13048 return tINTEGER; 13049 } 13050 if (c == 'b' || c == 'B') { 13051 /* binary */ 13052 c = nextc(); 13053 if (c == '0' || c == '1') { 13054 do { 13055 if (c == '_') { 13056 if (nondigit) break; 13057 nondigit = c; 13058 continue; 13059 } 13060 if (c != '0' && c != '1') break; 13061 nondigit = 0; 13062 tokadd(c); 13063 } while ((c = nextc()) != -1); 13064 } 13065 pushback(c); 13066 tokfix(); 13067 if (toklen() == start) { 13068 no_digits(); 13069 } 13070 else if (nondigit) goto trailing_uc; 13071 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 13072 return tINTEGER; 13073 } 13074 if (c == 'd' || c == 'D') { 13075 /* decimal */ 13076 c = nextc(); 13077 if (c != -1 && ISDIGIT(c)) { 13078 do { 13079 if (c == '_') { 13080 if (nondigit) break; 13081 nondigit = c; 13082 continue; 13083 } 13084 if (!ISDIGIT(c)) break; 13085 nondigit = 0; 13086 tokadd(c); 13087 } while ((c = nextc()) != -1); 13088 } 13089 pushback(c); 13090 tokfix(); 13091 if (toklen() == start) { 13092 no_digits(); 13093 } 13094 else if (nondigit) goto trailing_uc; 13095 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13096 return tINTEGER; 13097 } 13098 if (c == '_') { 13099 /* 0_0 */ 13100 goto octal_number; 13101 } 13102 if (c == 'o' || c == 'O') { 13103 /* prefixed octal */ 13104 c = nextc(); 13105 if (c == -1 || c == '_' || !ISDIGIT(c)) { 13106 no_digits(); 13107 } 13108 } 13109 if (c >= '0' && c <= '7') { 13110 /* octal */ 13111 octal_number: 13112 do { 13113 if (c == '_') { 13114 if (nondigit) break; 13115 nondigit = c; 13116 continue; 13117 } 13118 if (c < '0' || c > '9') break; 13119 if (c > '7') goto invalid_octal; 13120 nondigit = 0; 13121 tokadd(c); 13122 } while ((c = nextc()) != -1); 13123 if (toklen() > start) { 13124 pushback(c); 13125 tokfix(); 13126 if (nondigit) goto trailing_uc; 13127 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 13128 return tINTEGER; 13129 } 13130 if (nondigit) { 13131 pushback(c); 13132 goto trailing_uc; 13133 } 13134 } 13135 if (c > '7' && c <= '9') { 13136 invalid_octal: 13137 yyerror("Invalid octal digit"); 13138 } 13139 else if (c == '.' || c == 'e' || c == 'E') { 13140 tokadd('0'); 13141 } 13142 else { 13143 pushback(c); 13144 set_yylval_literal(INT2FIX(0)); 13145 return tINTEGER; 13146 } 13147 } 13148 13149 for (;;) { 13150 switch (c) { 13151 case '0': case '1': case '2': case '3': case '4': 13152 case '5': case '6': case '7': case '8': case '9': 13153 nondigit = 0; 13154 tokadd(c); 13155 break; 13156 13157 case '.': 13158 if (nondigit) goto trailing_uc; 13159 if (seen_point || seen_e) { 13160 goto decode_num; 13161 } 13162 else { 13163 int c0 = nextc(); 13164 if (c0 == -1 || !ISDIGIT(c0)) { 13165 pushback(c0); 13166 goto decode_num; 13167 } 13168 c = c0; 13169 } 13170 tokadd('.'); 13171 tokadd(c); 13172 is_float++; 13173 seen_point++; 13174 nondigit = 0; 13175 break; 13176 13177 case 'e': 13178 case 'E': 13179 if (nondigit) { 13180 pushback(c); 13181 c = nondigit; 13182 goto decode_num; 13183 } 13184 if (seen_e) { 13185 goto decode_num; 13186 } 13187 tokadd(c); 13188 seen_e++; 13189 is_float++; 13190 nondigit = c; 13191 c = nextc(); 13192 if (c != '-' && c != '+') continue; 13193 tokadd(c); 13194 nondigit = c; 13195 break; 13196 13197 case '_': /* `_' in number just ignored */ 13198 if (nondigit) goto decode_num; 13199 nondigit = c; 13200 break; 13201 13202 default: 13203 goto decode_num; 13204 } 13205 c = nextc(); 13206 } 13207 13208 decode_num: 13209 pushback(c); 13210 if (nondigit) { 13211 char tmp[30]; 13212 trailing_uc: 13213 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 13214 yyerror(tmp); 13215 } 13216 tokfix(); 13217 if (is_float) { 13218 double d = strtod(tok(), 0); 13219 if (errno == ERANGE) { 13220 rb_warningS("Float %s out of range", tok()); 13221 errno = 0; 13222 } 13223 set_yylval_literal(DBL2NUM(d)); 13224 return tFLOAT; 13225 } 13226 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13227 return tINTEGER; 13228 } 13229 13230 case ')': 13231 case ']': 13232 paren_nest--; 13233 case '}': 13234 COND_LEXPOP(); 13235 CMDARG_LEXPOP(); 13236 if (c == ')') 13237 lex_state = EXPR_ENDFN; 13238 else 13239 lex_state = EXPR_ENDARG; 13240 return c; 13241 13242 case ':': 13243 c = nextc(); 13244 if (c == ':') { 13245 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) { 13246 lex_state = EXPR_BEG; 13247 return tCOLON3; 13248 } 13249 lex_state = EXPR_DOT; 13250 return tCOLON2; 13251 } 13252 if (IS_END() || ISSPACE(c)) { 13253 pushback(c); 13254 warn_balanced(":", "symbol literal"); 13255 lex_state = EXPR_BEG; 13256 return ':'; 13257 } 13258 switch (c) { 13259 case '\'': 13260 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 13261 break; 13262 case '"': 13263 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 13264 break; 13265 default: 13266 pushback(c); 13267 break; 13268 } 13269 lex_state = EXPR_FNAME; 13270 return tSYMBEG; 13271 13272 case '/': 13273 if (IS_BEG()) { 13274 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13275 return tREGEXP_BEG; 13276 } 13277 if ((c = nextc()) == '=') { 13278 set_yylval_id('/'); 13279 lex_state = EXPR_BEG; 13280 return tOP_ASGN; 13281 } 13282 pushback(c); 13283 if (IS_SPCARG(c)) { 13284 (void)arg_ambiguous(); 13285 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13286 return tREGEXP_BEG; 13287 } 13288 switch (lex_state) { 13289 case EXPR_FNAME: case EXPR_DOT: 13290 lex_state = EXPR_ARG; break; 13291 default: 13292 lex_state = EXPR_BEG; break; 13293 } 13294 warn_balanced("/", "regexp literal"); 13295 return '/'; 13296 13297 case '^': 13298 if ((c = nextc()) == '=') { 13299 set_yylval_id('^'); 13300 lex_state = EXPR_BEG; 13301 return tOP_ASGN; 13302 } 13303 switch (lex_state) { 13304 case EXPR_FNAME: case EXPR_DOT: 13305 lex_state = EXPR_ARG; break; 13306 default: 13307 lex_state = EXPR_BEG; break; 13308 } 13309 pushback(c); 13310 return '^'; 13311 13312 case ';': 13313 lex_state = EXPR_BEG; 13314 command_start = TRUE; 13315 return ';'; 13316 13317 case ',': 13318 lex_state = EXPR_BEG; 13319 return ','; 13320 13321 case '~': 13322 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13323 if ((c = nextc()) != '@') { 13324 pushback(c); 13325 } 13326 lex_state = EXPR_ARG; 13327 } 13328 else { 13329 lex_state = EXPR_BEG; 13330 } 13331 return '~'; 13332 13333 case '(': 13334 if (IS_BEG()) { 13335 c = tLPAREN; 13336 } 13337 else if (IS_SPCARG(-1)) { 13338 c = tLPAREN_ARG; 13339 } 13340 paren_nest++; 13341 COND_PUSH(0); 13342 CMDARG_PUSH(0); 13343 lex_state = EXPR_BEG; 13344 return c; 13345 13346 case '[': 13347 paren_nest++; 13348 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13349 lex_state = EXPR_ARG; 13350 if ((c = nextc()) == ']') { 13351 if ((c = nextc()) == '=') { 13352 return tASET; 13353 } 13354 pushback(c); 13355 return tAREF; 13356 } 13357 pushback(c); 13358 return '['; 13359 } 13360 else if (IS_BEG()) { 13361 c = tLBRACK; 13362 } 13363 else if (IS_ARG() && space_seen) { 13364 c = tLBRACK; 13365 } 13366 lex_state = EXPR_BEG; 13367 COND_PUSH(0); 13368 CMDARG_PUSH(0); 13369 return c; 13370 13371 case '{': 13372 if (lpar_beg && lpar_beg == paren_nest) { 13373 lex_state = EXPR_BEG; 13374 lpar_beg = 0; 13375 --paren_nest; 13376 COND_PUSH(0); 13377 CMDARG_PUSH(0); 13378 return tLAMBEG; 13379 } 13380 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN) 13381 c = '{'; /* block (primary) */ 13382 else if (lex_state == EXPR_ENDARG) 13383 c = tLBRACE_ARG; /* block (expr) */ 13384 else 13385 c = tLBRACE; /* hash */ 13386 COND_PUSH(0); 13387 CMDARG_PUSH(0); 13388 lex_state = EXPR_BEG; 13389 if (c != tLBRACE) command_start = TRUE; 13390 return c; 13391 13392 case '\\': 13393 c = nextc(); 13394 if (c == '\n') { 13395 space_seen = 1; 13396 #ifdef RIPPER 13397 ripper_dispatch_scan_event(parser, tSP); 13398 #endif 13399 goto retry; /* skip \\n */ 13400 } 13401 pushback(c); 13402 return '\\'; 13403 13404 case '%': 13405 if (IS_BEG()) { 13406 int term; 13407 int paren; 13408 13409 c = nextc(); 13410 quotation: 13411 if (c == -1 || !ISALNUM(c)) { 13412 term = c; 13413 c = 'Q'; 13414 } 13415 else { 13416 term = nextc(); 13417 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { 13418 yyerror("unknown type of %string"); 13419 return 0; 13420 } 13421 } 13422 if (c == -1 || term == -1) { 13423 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 13424 return 0; 13425 } 13426 paren = term; 13427 if (term == '(') term = ')'; 13428 else if (term == '[') term = ']'; 13429 else if (term == '{') term = '}'; 13430 else if (term == '<') term = '>'; 13431 else paren = 0; 13432 13433 switch (c) { 13434 case 'Q': 13435 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 13436 return tSTRING_BEG; 13437 13438 case 'q': 13439 lex_strterm = NEW_STRTERM(str_squote, term, paren); 13440 return tSTRING_BEG; 13441 13442 case 'W': 13443 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13444 do {c = nextc();} while (ISSPACE(c)); 13445 pushback(c); 13446 return tWORDS_BEG; 13447 13448 case 'w': 13449 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13450 do {c = nextc();} while (ISSPACE(c)); 13451 pushback(c); 13452 return tQWORDS_BEG; 13453 13454 case 'x': 13455 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 13456 return tXSTRING_BEG; 13457 13458 case 'r': 13459 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 13460 return tREGEXP_BEG; 13461 13462 case 's': 13463 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 13464 lex_state = EXPR_FNAME; 13465 return tSYMBEG; 13466 13467 default: 13468 yyerror("unknown type of %string"); 13469 return 0; 13470 } 13471 } 13472 if ((c = nextc()) == '=') { 13473 set_yylval_id('%'); 13474 lex_state = EXPR_BEG; 13475 return tOP_ASGN; 13476 } 13477 if (IS_SPCARG(c)) { 13478 goto quotation; 13479 } 13480 switch (lex_state) { 13481 case EXPR_FNAME: case EXPR_DOT: 13482 lex_state = EXPR_ARG; break; 13483 default: 13484 lex_state = EXPR_BEG; break; 13485 } 13486 pushback(c); 13487 warn_balanced("%%", "string literal"); 13488 return '%'; 13489 13490 case '$': 13491 lex_state = EXPR_END; 13492 newtok(); 13493 c = nextc(); 13494 switch (c) { 13495 case '_': /* $_: last read line string */ 13496 c = nextc(); 13497 if (parser_is_identchar()) { 13498 tokadd('$'); 13499 tokadd('_'); 13500 break; 13501 } 13502 pushback(c); 13503 c = '_'; 13504 /* fall through */ 13505 case '~': /* $~: match-data */ 13506 case '*': /* $*: argv */ 13507 case '$': /* $$: pid */ 13508 case '?': /* $?: last status */ 13509 case '!': /* $!: error string */ 13510 case '@': /* $@: error position */ 13511 case '/': /* $/: input record separator */ 13512 case '\\': /* $\: output record separator */ 13513 case ';': /* $;: field separator */ 13514 case ',': /* $,: output field separator */ 13515 case '.': /* $.: last read line number */ 13516 case '=': /* $=: ignorecase */ 13517 case ':': /* $:: load path */ 13518 case '<': /* $<: reading filename */ 13519 case '>': /* $>: default output handle */ 13520 case '\"': /* $": already loaded files */ 13521 tokadd('$'); 13522 tokadd(c); 13523 tokfix(); 13524 set_yylval_name(rb_intern(tok())); 13525 return tGVAR; 13526 13527 case '-': 13528 tokadd('$'); 13529 tokadd(c); 13530 c = nextc(); 13531 if (parser_is_identchar()) { 13532 if (tokadd_mbchar(c) == -1) return 0; 13533 } 13534 else { 13535 pushback(c); 13536 } 13537 gvar: 13538 tokfix(); 13539 set_yylval_name(rb_intern(tok())); 13540 return tGVAR; 13541 13542 case '&': /* $&: last match */ 13543 case '`': /* $`: string before last match */ 13544 case '\'': /* $': string after last match */ 13545 case '+': /* $+: string matches last paren. */ 13546 if (last_state == EXPR_FNAME) { 13547 tokadd('$'); 13548 tokadd(c); 13549 goto gvar; 13550 } 13551 set_yylval_node(NEW_BACK_REF(c)); 13552 return tBACK_REF; 13553 13554 case '1': case '2': case '3': 13555 case '4': case '5': case '6': 13556 case '7': case '8': case '9': 13557 tokadd('$'); 13558 do { 13559 tokadd(c); 13560 c = nextc(); 13561 } while (c != -1 && ISDIGIT(c)); 13562 pushback(c); 13563 if (last_state == EXPR_FNAME) goto gvar; 13564 tokfix(); 13565 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 13566 return tNTH_REF; 13567 13568 default: 13569 if (!parser_is_identchar()) { 13570 pushback(c); 13571 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c); 13572 return 0; 13573 } 13574 case '0': 13575 tokadd('$'); 13576 } 13577 break; 13578 13579 case '@': 13580 c = nextc(); 13581 newtok(); 13582 tokadd('@'); 13583 if (c == '@') { 13584 tokadd('@'); 13585 c = nextc(); 13586 } 13587 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) { 13588 pushback(c); 13589 if (tokidx == 1) { 13590 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 13591 } 13592 else { 13593 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 13594 } 13595 return 0; 13596 } 13597 break; 13598 13599 case '_': 13600 if (was_bol() && whole_match_p("__END__", 7, 0)) { 13601 ruby__end__seen = 1; 13602 parser->eofp = Qtrue; 13603 #ifndef RIPPER 13604 return -1; 13605 #else 13606 lex_goto_eol(parser); 13607 ripper_dispatch_scan_event(parser, k__END__); 13608 return 0; 13609 #endif 13610 } 13611 newtok(); 13612 break; 13613 13614 default: 13615 if (!parser_is_identchar()) { 13616 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 13617 goto retry; 13618 } 13619 13620 newtok(); 13621 break; 13622 } 13623 13624 mb = ENC_CODERANGE_7BIT; 13625 do { 13626 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 13627 if (tokadd_mbchar(c) == -1) return 0; 13628 c = nextc(); 13629 } while (parser_is_identchar()); 13630 switch (tok()[0]) { 13631 case '@': case '$': 13632 pushback(c); 13633 break; 13634 default: 13635 if ((c == '!' || c == '?') && !peek('=')) { 13636 tokadd(c); 13637 } 13638 else { 13639 pushback(c); 13640 } 13641 } 13642 tokfix(); 13643 13644 { 13645 int result = 0; 13646 13647 last_state = lex_state; 13648 switch (tok()[0]) { 13649 case '$': 13650 lex_state = EXPR_END; 13651 result = tGVAR; 13652 break; 13653 case '@': 13654 lex_state = EXPR_END; 13655 if (tok()[1] == '@') 13656 result = tCVAR; 13657 else 13658 result = tIVAR; 13659 break; 13660 13661 default: 13662 if (toklast() == '!' || toklast() == '?') { 13663 result = tFID; 13664 } 13665 else { 13666 if (lex_state == EXPR_FNAME) { 13667 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 13668 (!peek('=') || (peek_n('>', 1)))) { 13669 result = tIDENTIFIER; 13670 tokadd(c); 13671 tokfix(); 13672 } 13673 else { 13674 pushback(c); 13675 } 13676 } 13677 if (result == 0 && ISUPPER(tok()[0])) { 13678 result = tCONSTANT; 13679 } 13680 else { 13681 result = tIDENTIFIER; 13682 } 13683 } 13684 13685 if (IS_LABEL_POSSIBLE()) { 13686 if (IS_LABEL_SUFFIX(0)) { 13687 lex_state = EXPR_BEG; 13688 nextc(); 13689 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 13690 return tLABEL; 13691 } 13692 } 13693 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { 13694 const struct kwtable *kw; 13695 13696 /* See if it is a reserved word. */ 13697 kw = rb_reserved_word(tok(), toklen()); 13698 if (kw) { 13699 enum lex_state_e state = lex_state; 13700 lex_state = kw->state; 13701 if (state == EXPR_FNAME) { 13702 set_yylval_name(rb_intern(kw->name)); 13703 return kw->id[0]; 13704 } 13705 if (kw->id[0] == keyword_do) { 13706 command_start = TRUE; 13707 if (lpar_beg && lpar_beg == paren_nest) { 13708 lpar_beg = 0; 13709 --paren_nest; 13710 return keyword_do_LAMBDA; 13711 } 13712 if (COND_P()) return keyword_do_cond; 13713 if (CMDARG_P() && state != EXPR_CMDARG) 13714 return keyword_do_block; 13715 if (state == EXPR_ENDARG || state == EXPR_BEG) 13716 return keyword_do_block; 13717 return keyword_do; 13718 } 13719 if (state == EXPR_BEG || state == EXPR_VALUE) 13720 return kw->id[0]; 13721 else { 13722 if (kw->id[0] != kw->id[1]) 13723 lex_state = EXPR_BEG; 13724 return kw->id[1]; 13725 } 13726 } 13727 } 13728 13729 if (IS_BEG() || 13730 lex_state == EXPR_DOT || 13731 IS_ARG()) { 13732 if (cmd_state) { 13733 lex_state = EXPR_CMDARG; 13734 } 13735 else { 13736 lex_state = EXPR_ARG; 13737 } 13738 } 13739 else if (lex_state == EXPR_FNAME) { 13740 lex_state = EXPR_ENDFN; 13741 } 13742 else { 13743 lex_state = EXPR_END; 13744 } 13745 } 13746 { 13747 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 13748 13749 set_yylval_name(ident); 13750 if (last_state != EXPR_DOT && last_state != EXPR_FNAME && 13751 is_local_id(ident) && lvar_defined(ident)) { 13752 lex_state = EXPR_END; 13753 } 13754 } 13755 return result; 13756 } 13757 } 13758 13759 #if YYPURE 13760 static int 13761 yylex(void *lval, void *p) 13762 #else 13763 yylex(void *p) 13764 #endif 13765 { 13766 struct parser_params *parser = (struct parser_params*)p; 13767 int t; 13768 13769 #if YYPURE 13770 parser->parser_yylval = lval; 13771 parser->parser_yylval->val = Qundef; 13772 #endif 13773 t = parser_yylex(parser); 13774 #ifdef RIPPER 13775 if (!NIL_P(parser->delayed)) { 13776 ripper_dispatch_delayed_token(parser, t); 13777 return t; 13778 } 13779 if (t != 0) 13780 ripper_dispatch_scan_event(parser, t); 13781 #endif 13782 13783 return t; 13784 } 13785 13786 #ifndef RIPPER 13787 static NODE* 13788 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 13789 { 13790 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 13791 nd_set_line(n, ruby_sourceline); 13792 return n; 13793 } 13794 13795 enum node_type 13796 nodetype(NODE *node) /* for debug */ 13797 { 13798 return (enum node_type)nd_type(node); 13799 } 13800 13801 int 13802 nodeline(NODE *node) 13803 { 13804 return nd_line(node); 13805 } 13806 13807 static NODE* 13808 newline_node(NODE *node) 13809 { 13810 if (node) { 13811 node = remove_begin(node); 13812 node->flags |= NODE_FL_NEWLINE; 13813 } 13814 return node; 13815 } 13816 13817 static void 13818 fixpos(NODE *node, NODE *orig) 13819 { 13820 if (!node) return; 13821 if (!orig) return; 13822 if (orig == (NODE*)1) return; 13823 nd_set_line(node, nd_line(orig)); 13824 } 13825 13826 static void 13827 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 13828 { 13829 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 13830 } 13831 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 13832 13833 static void 13834 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 13835 { 13836 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 13837 } 13838 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 13839 13840 static NODE* 13841 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 13842 { 13843 NODE *end, *h = head, *nd; 13844 13845 if (tail == 0) return head; 13846 13847 if (h == 0) return tail; 13848 switch (nd_type(h)) { 13849 case NODE_LIT: 13850 case NODE_STR: 13851 case NODE_SELF: 13852 case NODE_TRUE: 13853 case NODE_FALSE: 13854 case NODE_NIL: 13855 parser_warning(h, "unused literal ignored"); 13856 return tail; 13857 default: 13858 h = end = NEW_BLOCK(head); 13859 end->nd_end = end; 13860 fixpos(end, head); 13861 head = end; 13862 break; 13863 case NODE_BLOCK: 13864 end = h->nd_end; 13865 break; 13866 } 13867 13868 nd = end->nd_head; 13869 switch (nd_type(nd)) { 13870 case NODE_RETURN: 13871 case NODE_BREAK: 13872 case NODE_NEXT: 13873 case NODE_REDO: 13874 case NODE_RETRY: 13875 if (RTEST(ruby_verbose)) { 13876 parser_warning(nd, "statement not reached"); 13877 } 13878 break; 13879 13880 default: 13881 break; 13882 } 13883 13884 if (nd_type(tail) != NODE_BLOCK) { 13885 tail = NEW_BLOCK(tail); 13886 tail->nd_end = tail; 13887 } 13888 end->nd_next = tail; 13889 h->nd_end = tail->nd_end; 13890 return head; 13891 } 13892 13893 /* append item to the list */ 13894 static NODE* 13895 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 13896 { 13897 NODE *last; 13898 13899 if (list == 0) return NEW_LIST(item); 13900 if (list->nd_next) { 13901 last = list->nd_next->nd_end; 13902 } 13903 else { 13904 last = list; 13905 } 13906 13907 list->nd_alen += 1; 13908 last->nd_next = NEW_LIST(item); 13909 list->nd_next->nd_end = last->nd_next; 13910 return list; 13911 } 13912 13913 /* concat two lists */ 13914 static NODE* 13915 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13916 { 13917 NODE *last; 13918 13919 if (head->nd_next) { 13920 last = head->nd_next->nd_end; 13921 } 13922 else { 13923 last = head; 13924 } 13925 13926 head->nd_alen += tail->nd_alen; 13927 last->nd_next = tail; 13928 if (tail->nd_next) { 13929 head->nd_next->nd_end = tail->nd_next->nd_end; 13930 } 13931 else { 13932 head->nd_next->nd_end = tail; 13933 } 13934 13935 return head; 13936 } 13937 13938 static int 13939 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 13940 { 13941 if (NIL_P(tail)) return 1; 13942 if (!rb_enc_compatible(head, tail)) { 13943 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 13944 rb_enc_name(rb_enc_get(head)), 13945 rb_enc_name(rb_enc_get(tail))); 13946 rb_str_resize(head, 0); 13947 rb_str_resize(tail, 0); 13948 return 0; 13949 } 13950 rb_str_buf_append(head, tail); 13951 return 1; 13952 } 13953 13954 /* concat two string literals */ 13955 static NODE * 13956 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 13957 { 13958 enum node_type htype; 13959 13960 if (!head) return tail; 13961 if (!tail) return head; 13962 13963 htype = nd_type(head); 13964 if (htype == NODE_EVSTR) { 13965 NODE *node = NEW_DSTR(Qnil); 13966 head = list_append(node, head); 13967 } 13968 switch (nd_type(tail)) { 13969 case NODE_STR: 13970 if (htype == NODE_STR) { 13971 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { 13972 error: 13973 rb_gc_force_recycle((VALUE)head); 13974 rb_gc_force_recycle((VALUE)tail); 13975 return 0; 13976 } 13977 rb_gc_force_recycle((VALUE)tail); 13978 } 13979 else { 13980 list_append(head, tail); 13981 } 13982 break; 13983 13984 case NODE_DSTR: 13985 if (htype == NODE_STR) { 13986 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 13987 goto error; 13988 tail->nd_lit = head->nd_lit; 13989 rb_gc_force_recycle((VALUE)head); 13990 head = tail; 13991 } 13992 else if (NIL_P(tail->nd_lit)) { 13993 head->nd_alen += tail->nd_alen - 1; 13994 head->nd_next->nd_end->nd_next = tail->nd_next; 13995 head->nd_next->nd_end = tail->nd_next->nd_end; 13996 rb_gc_force_recycle((VALUE)tail); 13997 } 13998 else { 13999 nd_set_type(tail, NODE_ARRAY); 14000 tail->nd_head = NEW_STR(tail->nd_lit); 14001 list_concat(head, tail); 14002 } 14003 break; 14004 14005 case NODE_EVSTR: 14006 if (htype == NODE_STR) { 14007 nd_set_type(head, NODE_DSTR); 14008 head->nd_alen = 1; 14009 } 14010 list_append(head, tail); 14011 break; 14012 } 14013 return head; 14014 } 14015 14016 static NODE * 14017 evstr2dstr_gen(struct parser_params *parser, NODE *node) 14018 { 14019 if (nd_type(node) == NODE_EVSTR) { 14020 node = list_append(NEW_DSTR(Qnil), node); 14021 } 14022 return node; 14023 } 14024 14025 static NODE * 14026 new_evstr_gen(struct parser_params *parser, NODE *node) 14027 { 14028 NODE *head = node; 14029 14030 if (node) { 14031 switch (nd_type(node)) { 14032 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 14033 return node; 14034 } 14035 } 14036 return NEW_EVSTR(head); 14037 } 14038 14039 static NODE * 14040 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 14041 { 14042 value_expr(recv); 14043 value_expr(arg1); 14044 return NEW_CALL(recv, id, NEW_LIST(arg1)); 14045 } 14046 14047 static NODE * 14048 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 14049 { 14050 value_expr(recv); 14051 return NEW_CALL(recv, id, 0); 14052 } 14053 14054 static NODE* 14055 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14056 { 14057 value_expr(node1); 14058 value_expr(node2); 14059 if (node1) { 14060 switch (nd_type(node1)) { 14061 case NODE_DREGX: 14062 case NODE_DREGX_ONCE: 14063 return NEW_MATCH2(node1, node2); 14064 14065 case NODE_LIT: 14066 if (TYPE(node1->nd_lit) == T_REGEXP) { 14067 return NEW_MATCH2(node1, node2); 14068 } 14069 } 14070 } 14071 14072 if (node2) { 14073 switch (nd_type(node2)) { 14074 case NODE_DREGX: 14075 case NODE_DREGX_ONCE: 14076 return NEW_MATCH3(node2, node1); 14077 14078 case NODE_LIT: 14079 if (TYPE(node2->nd_lit) == T_REGEXP) { 14080 return NEW_MATCH3(node2, node1); 14081 } 14082 } 14083 } 14084 14085 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 14086 } 14087 14088 static NODE* 14089 gettable_gen(struct parser_params *parser, ID id) 14090 { 14091 if (id == keyword_self) { 14092 return NEW_SELF(); 14093 } 14094 else if (id == keyword_nil) { 14095 return NEW_NIL(); 14096 } 14097 else if (id == keyword_true) { 14098 return NEW_TRUE(); 14099 } 14100 else if (id == keyword_false) { 14101 return NEW_FALSE(); 14102 } 14103 else if (id == keyword__FILE__) { 14104 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 14105 rb_filesystem_encoding())); 14106 } 14107 else if (id == keyword__LINE__) { 14108 return NEW_LIT(INT2FIX(ruby_sourceline)); 14109 } 14110 else if (id == keyword__ENCODING__) { 14111 return NEW_LIT(rb_enc_from_encoding(parser->enc)); 14112 } 14113 else if (is_local_id(id)) { 14114 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 14115 if (local_id(id)) return NEW_LVAR(id); 14116 /* method call without arguments */ 14117 return NEW_VCALL(id); 14118 } 14119 else if (is_global_id(id)) { 14120 return NEW_GVAR(id); 14121 } 14122 else if (is_instance_id(id)) { 14123 return NEW_IVAR(id); 14124 } 14125 else if (is_const_id(id)) { 14126 return NEW_CONST(id); 14127 } 14128 else if (is_class_id(id)) { 14129 return NEW_CVAR(id); 14130 } 14131 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14132 return 0; 14133 } 14134 #else /* !RIPPER */ 14135 static int 14136 id_is_var_gen(struct parser_params *parser, ID id) 14137 { 14138 if (is_notop_id(id)) { 14139 switch (id & ID_SCOPE_MASK) { 14140 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 14141 return 1; 14142 case ID_LOCAL: 14143 if (dyna_in_block() && dvar_defined(id)) return 1; 14144 if (local_id(id)) return 1; 14145 /* method call without arguments */ 14146 return 0; 14147 } 14148 } 14149 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14150 return 0; 14151 } 14152 #endif /* !RIPPER */ 14153 14154 #ifdef RIPPER 14155 static VALUE 14156 assignable_gen(struct parser_params *parser, VALUE lhs) 14157 #else 14158 static NODE* 14159 assignable_gen(struct parser_params *parser, ID id, NODE *val) 14160 #endif 14161 { 14162 #ifdef RIPPER 14163 ID id = get_id(lhs); 14164 # define assignable_result(x) get_value(lhs) 14165 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 14166 #else 14167 # define assignable_result(x) (x) 14168 #endif 14169 if (!id) return assignable_result(0); 14170 if (id == keyword_self) { 14171 yyerror("Can't change the value of self"); 14172 } 14173 else if (id == keyword_nil) { 14174 yyerror("Can't assign to nil"); 14175 } 14176 else if (id == keyword_true) { 14177 yyerror("Can't assign to true"); 14178 } 14179 else if (id == keyword_false) { 14180 yyerror("Can't assign to false"); 14181 } 14182 else if (id == keyword__FILE__) { 14183 yyerror("Can't assign to __FILE__"); 14184 } 14185 else if (id == keyword__LINE__) { 14186 yyerror("Can't assign to __LINE__"); 14187 } 14188 else if (id == keyword__ENCODING__) { 14189 yyerror("Can't assign to __ENCODING__"); 14190 } 14191 else if (is_local_id(id)) { 14192 if (dyna_in_block()) { 14193 if (dvar_curr(id)) { 14194 return assignable_result(NEW_DASGN_CURR(id, val)); 14195 } 14196 else if (dvar_defined(id)) { 14197 return assignable_result(NEW_DASGN(id, val)); 14198 } 14199 else if (local_id(id)) { 14200 return assignable_result(NEW_LASGN(id, val)); 14201 } 14202 else { 14203 dyna_var(id); 14204 return assignable_result(NEW_DASGN_CURR(id, val)); 14205 } 14206 } 14207 else { 14208 if (!local_id(id)) { 14209 local_var(id); 14210 } 14211 return assignable_result(NEW_LASGN(id, val)); 14212 } 14213 } 14214 else if (is_global_id(id)) { 14215 return assignable_result(NEW_GASGN(id, val)); 14216 } 14217 else if (is_instance_id(id)) { 14218 return assignable_result(NEW_IASGN(id, val)); 14219 } 14220 else if (is_const_id(id)) { 14221 if (!in_def && !in_single) 14222 return assignable_result(NEW_CDECL(id, val, 0)); 14223 yyerror("dynamic constant assignment"); 14224 } 14225 else if (is_class_id(id)) { 14226 return assignable_result(NEW_CVASGN(id, val)); 14227 } 14228 else { 14229 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 14230 } 14231 return assignable_result(0); 14232 #undef assignable_result 14233 #undef parser_yyerror 14234 } 14235 14236 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1)) 14237 14238 static ID 14239 shadowing_lvar_gen(struct parser_params *parser, ID name) 14240 { 14241 if (idUScore == name) return name; 14242 if (dyna_in_block()) { 14243 if (dvar_curr(name)) { 14244 yyerror("duplicated argument name"); 14245 } 14246 else if (dvar_defined_get(name) || local_id(name)) { 14247 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 14248 vtable_add(lvtbl->vars, name); 14249 if (lvtbl->used) { 14250 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 14251 } 14252 } 14253 } 14254 else { 14255 if (local_id(name)) { 14256 yyerror("duplicated argument name"); 14257 } 14258 } 14259 return name; 14260 } 14261 14262 static void 14263 new_bv_gen(struct parser_params *parser, ID name) 14264 { 14265 if (!name) return; 14266 if (!is_local_id(name)) { 14267 compile_error(PARSER_ARG "invalid local variable - %s", 14268 rb_id2name(name)); 14269 return; 14270 } 14271 shadowing_lvar(name); 14272 dyna_var(name); 14273 } 14274 14275 #ifndef RIPPER 14276 static NODE * 14277 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 14278 { 14279 if (recv && nd_type(recv) == NODE_SELF) 14280 recv = (NODE *)1; 14281 return NEW_ATTRASGN(recv, tASET, idx); 14282 } 14283 14284 static void 14285 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14286 { 14287 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 14288 compile_error(PARSER_ARG "both block arg and actual block given"); 14289 } 14290 } 14291 14292 ID 14293 rb_id_attrset(ID id) 14294 { 14295 id &= ~ID_SCOPE_MASK; 14296 id |= ID_ATTRSET; 14297 return id; 14298 } 14299 14300 static NODE * 14301 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 14302 { 14303 if (recv && nd_type(recv) == NODE_SELF) 14304 recv = (NODE *)1; 14305 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 14306 } 14307 14308 static void 14309 rb_backref_error_gen(struct parser_params *parser, NODE *node) 14310 { 14311 switch (nd_type(node)) { 14312 case NODE_NTH_REF: 14313 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 14314 break; 14315 case NODE_BACK_REF: 14316 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 14317 break; 14318 } 14319 } 14320 14321 static NODE * 14322 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14323 { 14324 if (!node2) return node1; 14325 switch (nd_type(node1)) { 14326 case NODE_BLOCK_PASS: 14327 if (node1->nd_head) 14328 node1->nd_head = arg_concat(node1->nd_head, node2); 14329 else 14330 node1->nd_head = NEW_LIST(node2); 14331 return node1; 14332 case NODE_ARGSPUSH: 14333 if (nd_type(node2) != NODE_ARRAY) break; 14334 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 14335 nd_set_type(node1, NODE_ARGSCAT); 14336 return node1; 14337 case NODE_ARGSCAT: 14338 if (nd_type(node2) != NODE_ARRAY || 14339 nd_type(node1->nd_body) != NODE_ARRAY) break; 14340 node1->nd_body = list_concat(node1->nd_body, node2); 14341 return node1; 14342 } 14343 return NEW_ARGSCAT(node1, node2); 14344 } 14345 14346 static NODE * 14347 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14348 { 14349 if (!node1) return NEW_LIST(node2); 14350 switch (nd_type(node1)) { 14351 case NODE_ARRAY: 14352 return list_append(node1, node2); 14353 case NODE_BLOCK_PASS: 14354 node1->nd_head = arg_append(node1->nd_head, node2); 14355 return node1; 14356 case NODE_ARGSPUSH: 14357 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 14358 nd_set_type(node1, NODE_ARGSCAT); 14359 return node1; 14360 } 14361 return NEW_ARGSPUSH(node1, node2); 14362 } 14363 14364 static NODE * 14365 splat_array(NODE* node) 14366 { 14367 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 14368 if (nd_type(node) == NODE_ARRAY) return node; 14369 return 0; 14370 } 14371 14372 static NODE * 14373 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 14374 { 14375 if (!lhs) return 0; 14376 14377 switch (nd_type(lhs)) { 14378 case NODE_GASGN: 14379 case NODE_IASGN: 14380 case NODE_IASGN2: 14381 case NODE_LASGN: 14382 case NODE_DASGN: 14383 case NODE_DASGN_CURR: 14384 case NODE_MASGN: 14385 case NODE_CDECL: 14386 case NODE_CVASGN: 14387 lhs->nd_value = rhs; 14388 break; 14389 14390 case NODE_ATTRASGN: 14391 case NODE_CALL: 14392 lhs->nd_args = arg_append(lhs->nd_args, rhs); 14393 break; 14394 14395 default: 14396 /* should not happen */ 14397 break; 14398 } 14399 14400 return lhs; 14401 } 14402 14403 static int 14404 value_expr_gen(struct parser_params *parser, NODE *node) 14405 { 14406 int cond = 0; 14407 14408 if (!node) { 14409 rb_warning0("empty expression"); 14410 } 14411 while (node) { 14412 switch (nd_type(node)) { 14413 case NODE_DEFN: 14414 case NODE_DEFS: 14415 parser_warning(node, "void value expression"); 14416 return FALSE; 14417 14418 case NODE_RETURN: 14419 case NODE_BREAK: 14420 case NODE_NEXT: 14421 case NODE_REDO: 14422 case NODE_RETRY: 14423 if (!cond) yyerror("void value expression"); 14424 /* or "control never reach"? */ 14425 return FALSE; 14426 14427 case NODE_BLOCK: 14428 while (node->nd_next) { 14429 node = node->nd_next; 14430 } 14431 node = node->nd_head; 14432 break; 14433 14434 case NODE_BEGIN: 14435 node = node->nd_body; 14436 break; 14437 14438 case NODE_IF: 14439 if (!node->nd_body) { 14440 node = node->nd_else; 14441 break; 14442 } 14443 else if (!node->nd_else) { 14444 node = node->nd_body; 14445 break; 14446 } 14447 if (!value_expr(node->nd_body)) return FALSE; 14448 node = node->nd_else; 14449 break; 14450 14451 case NODE_AND: 14452 case NODE_OR: 14453 cond = 1; 14454 node = node->nd_2nd; 14455 break; 14456 14457 default: 14458 return TRUE; 14459 } 14460 } 14461 14462 return TRUE; 14463 } 14464 14465 static void 14466 void_expr_gen(struct parser_params *parser, NODE *node) 14467 { 14468 const char *useless = 0; 14469 14470 if (!RTEST(ruby_verbose)) return; 14471 14472 if (!node) return; 14473 switch (nd_type(node)) { 14474 case NODE_CALL: 14475 switch (node->nd_mid) { 14476 case '+': 14477 case '-': 14478 case '*': 14479 case '/': 14480 case '%': 14481 case tPOW: 14482 case tUPLUS: 14483 case tUMINUS: 14484 case '|': 14485 case '^': 14486 case '&': 14487 case tCMP: 14488 case '>': 14489 case tGEQ: 14490 case '<': 14491 case tLEQ: 14492 case tEQ: 14493 case tNEQ: 14494 useless = rb_id2name(node->nd_mid); 14495 break; 14496 } 14497 break; 14498 14499 case NODE_LVAR: 14500 case NODE_DVAR: 14501 case NODE_GVAR: 14502 case NODE_IVAR: 14503 case NODE_CVAR: 14504 case NODE_NTH_REF: 14505 case NODE_BACK_REF: 14506 useless = "a variable"; 14507 break; 14508 case NODE_CONST: 14509 useless = "a constant"; 14510 break; 14511 case NODE_LIT: 14512 case NODE_STR: 14513 case NODE_DSTR: 14514 case NODE_DREGX: 14515 case NODE_DREGX_ONCE: 14516 useless = "a literal"; 14517 break; 14518 case NODE_COLON2: 14519 case NODE_COLON3: 14520 useless = "::"; 14521 break; 14522 case NODE_DOT2: 14523 useless = ".."; 14524 break; 14525 case NODE_DOT3: 14526 useless = "..."; 14527 break; 14528 case NODE_SELF: 14529 useless = "self"; 14530 break; 14531 case NODE_NIL: 14532 useless = "nil"; 14533 break; 14534 case NODE_TRUE: 14535 useless = "true"; 14536 break; 14537 case NODE_FALSE: 14538 useless = "false"; 14539 break; 14540 case NODE_DEFINED: 14541 useless = "defined?"; 14542 break; 14543 } 14544 14545 if (useless) { 14546 int line = ruby_sourceline; 14547 14548 ruby_sourceline = nd_line(node); 14549 rb_warnS("possibly useless use of %s in void context", useless); 14550 ruby_sourceline = line; 14551 } 14552 } 14553 14554 static void 14555 void_stmts_gen(struct parser_params *parser, NODE *node) 14556 { 14557 if (!RTEST(ruby_verbose)) return; 14558 if (!node) return; 14559 if (nd_type(node) != NODE_BLOCK) return; 14560 14561 for (;;) { 14562 if (!node->nd_next) return; 14563 void_expr0(node->nd_head); 14564 node = node->nd_next; 14565 } 14566 } 14567 14568 static NODE * 14569 remove_begin(NODE *node) 14570 { 14571 NODE **n = &node, *n1 = node; 14572 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 14573 *n = n1 = n1->nd_body; 14574 } 14575 return node; 14576 } 14577 14578 static void 14579 reduce_nodes_gen(struct parser_params *parser, NODE **body) 14580 { 14581 NODE *node = *body; 14582 14583 if (!node) { 14584 *body = NEW_NIL(); 14585 return; 14586 } 14587 #define subnodes(n1, n2) \ 14588 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 14589 (!node->n2) ? (body = &node->n1, 1) : \ 14590 (reduce_nodes(&node->n1), body = &node->n2, 1)) 14591 14592 while (node) { 14593 int newline = (int)(node->flags & NODE_FL_NEWLINE); 14594 switch (nd_type(node)) { 14595 end: 14596 case NODE_NIL: 14597 *body = 0; 14598 return; 14599 case NODE_RETURN: 14600 *body = node = node->nd_stts; 14601 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14602 continue; 14603 case NODE_BEGIN: 14604 *body = node = node->nd_body; 14605 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14606 continue; 14607 case NODE_BLOCK: 14608 body = &node->nd_end->nd_head; 14609 break; 14610 case NODE_IF: 14611 if (subnodes(nd_body, nd_else)) break; 14612 return; 14613 case NODE_CASE: 14614 body = &node->nd_body; 14615 break; 14616 case NODE_WHEN: 14617 if (!subnodes(nd_body, nd_next)) goto end; 14618 break; 14619 case NODE_ENSURE: 14620 if (!subnodes(nd_head, nd_resq)) goto end; 14621 break; 14622 case NODE_RESCUE: 14623 if (node->nd_else) { 14624 body = &node->nd_resq; 14625 break; 14626 } 14627 if (!subnodes(nd_head, nd_resq)) goto end; 14628 break; 14629 default: 14630 return; 14631 } 14632 node = *body; 14633 if (newline && node) node->flags |= NODE_FL_NEWLINE; 14634 } 14635 14636 #undef subnodes 14637 } 14638 14639 static int 14640 assign_in_cond(struct parser_params *parser, NODE *node) 14641 { 14642 switch (nd_type(node)) { 14643 case NODE_MASGN: 14644 yyerror("multiple assignment in conditional"); 14645 return 1; 14646 14647 case NODE_LASGN: 14648 case NODE_DASGN: 14649 case NODE_DASGN_CURR: 14650 case NODE_GASGN: 14651 case NODE_IASGN: 14652 break; 14653 14654 default: 14655 return 0; 14656 } 14657 14658 if (!node->nd_value) return 1; 14659 switch (nd_type(node->nd_value)) { 14660 case NODE_LIT: 14661 case NODE_STR: 14662 case NODE_NIL: 14663 case NODE_TRUE: 14664 case NODE_FALSE: 14665 /* reports always */ 14666 parser_warn(node->nd_value, "found = in conditional, should be =="); 14667 return 1; 14668 14669 case NODE_DSTR: 14670 case NODE_XSTR: 14671 case NODE_DXSTR: 14672 case NODE_EVSTR: 14673 case NODE_DREGX: 14674 default: 14675 break; 14676 } 14677 return 1; 14678 } 14679 14680 static void 14681 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14682 { 14683 if (!e_option_supplied(parser)) parser_warn(node, str); 14684 } 14685 14686 static void 14687 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 14688 { 14689 if (!e_option_supplied(parser)) parser_warning(node, str); 14690 } 14691 14692 static void 14693 fixup_nodes(NODE **rootnode) 14694 { 14695 NODE *node, *next, *head; 14696 14697 for (node = *rootnode; node; node = next) { 14698 enum node_type type; 14699 VALUE val; 14700 14701 next = node->nd_next; 14702 head = node->nd_head; 14703 rb_gc_force_recycle((VALUE)node); 14704 *rootnode = next; 14705 switch (type = nd_type(head)) { 14706 case NODE_DOT2: 14707 case NODE_DOT3: 14708 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 14709 type == NODE_DOT3); 14710 rb_gc_force_recycle((VALUE)head->nd_beg); 14711 rb_gc_force_recycle((VALUE)head->nd_end); 14712 nd_set_type(head, NODE_LIT); 14713 head->nd_lit = val; 14714 break; 14715 default: 14716 break; 14717 } 14718 } 14719 } 14720 14721 static NODE *cond0(struct parser_params*,NODE*); 14722 14723 static NODE* 14724 range_op(struct parser_params *parser, NODE *node) 14725 { 14726 enum node_type type; 14727 14728 if (node == 0) return 0; 14729 14730 type = nd_type(node); 14731 value_expr(node); 14732 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 14733 warn_unless_e_option(parser, node, "integer literal in conditional range"); 14734 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 14735 } 14736 return cond0(parser, node); 14737 } 14738 14739 static int 14740 literal_node(NODE *node) 14741 { 14742 if (!node) return 1; /* same as NODE_NIL */ 14743 switch (nd_type(node)) { 14744 case NODE_LIT: 14745 case NODE_STR: 14746 case NODE_DSTR: 14747 case NODE_EVSTR: 14748 case NODE_DREGX: 14749 case NODE_DREGX_ONCE: 14750 case NODE_DSYM: 14751 return 2; 14752 case NODE_TRUE: 14753 case NODE_FALSE: 14754 case NODE_NIL: 14755 return 1; 14756 } 14757 return 0; 14758 } 14759 14760 static NODE* 14761 cond0(struct parser_params *parser, NODE *node) 14762 { 14763 if (node == 0) return 0; 14764 assign_in_cond(parser, node); 14765 14766 switch (nd_type(node)) { 14767 case NODE_DSTR: 14768 case NODE_EVSTR: 14769 case NODE_STR: 14770 rb_warn0("string literal in condition"); 14771 break; 14772 14773 case NODE_DREGX: 14774 case NODE_DREGX_ONCE: 14775 warning_unless_e_option(parser, node, "regex literal in condition"); 14776 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 14777 14778 case NODE_AND: 14779 case NODE_OR: 14780 node->nd_1st = cond0(parser, node->nd_1st); 14781 node->nd_2nd = cond0(parser, node->nd_2nd); 14782 break; 14783 14784 case NODE_DOT2: 14785 case NODE_DOT3: 14786 node->nd_beg = range_op(parser, node->nd_beg); 14787 node->nd_end = range_op(parser, node->nd_end); 14788 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 14789 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 14790 if (!e_option_supplied(parser)) { 14791 int b = literal_node(node->nd_beg); 14792 int e = literal_node(node->nd_end); 14793 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 14794 parser_warn(node, "range literal in condition"); 14795 } 14796 } 14797 break; 14798 14799 case NODE_DSYM: 14800 parser_warning(node, "literal in condition"); 14801 break; 14802 14803 case NODE_LIT: 14804 if (TYPE(node->nd_lit) == T_REGEXP) { 14805 warn_unless_e_option(parser, node, "regex literal in condition"); 14806 nd_set_type(node, NODE_MATCH); 14807 } 14808 else { 14809 parser_warning(node, "literal in condition"); 14810 } 14811 default: 14812 break; 14813 } 14814 return node; 14815 } 14816 14817 static NODE* 14818 cond_gen(struct parser_params *parser, NODE *node) 14819 { 14820 if (node == 0) return 0; 14821 return cond0(parser, node); 14822 } 14823 14824 static NODE* 14825 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 14826 { 14827 value_expr(left); 14828 if (left && (enum node_type)nd_type(left) == type) { 14829 NODE *node = left, *second; 14830 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 14831 node = second; 14832 } 14833 node->nd_2nd = NEW_NODE(type, second, right, 0); 14834 return left; 14835 } 14836 return NEW_NODE(type, left, right, 0); 14837 } 14838 14839 static void 14840 no_blockarg(struct parser_params *parser, NODE *node) 14841 { 14842 if (node && nd_type(node) == NODE_BLOCK_PASS) { 14843 compile_error(PARSER_ARG "block argument should not be given"); 14844 } 14845 } 14846 14847 static NODE * 14848 ret_args_gen(struct parser_params *parser, NODE *node) 14849 { 14850 if (node) { 14851 no_blockarg(parser, node); 14852 if (nd_type(node) == NODE_ARRAY) { 14853 if (node->nd_next == 0) { 14854 node = node->nd_head; 14855 } 14856 else { 14857 nd_set_type(node, NODE_VALUES); 14858 } 14859 } 14860 } 14861 return node; 14862 } 14863 14864 static NODE * 14865 new_yield_gen(struct parser_params *parser, NODE *node) 14866 { 14867 long state = Qtrue; 14868 14869 if (node) { 14870 no_blockarg(parser, node); 14871 if (node && nd_type(node) == NODE_SPLAT) { 14872 state = Qtrue; 14873 } 14874 } 14875 else { 14876 state = Qfalse; 14877 } 14878 return NEW_YIELD(node, state); 14879 } 14880 14881 static NODE* 14882 negate_lit(NODE *node) 14883 { 14884 switch (TYPE(node->nd_lit)) { 14885 case T_FIXNUM: 14886 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 14887 break; 14888 case T_BIGNUM: 14889 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 14890 break; 14891 case T_FLOAT: 14892 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 14893 break; 14894 default: 14895 break; 14896 } 14897 return node; 14898 } 14899 14900 static NODE * 14901 arg_blk_pass(NODE *node1, NODE *node2) 14902 { 14903 if (node2) { 14904 node2->nd_head = node1; 14905 return node2; 14906 } 14907 return node1; 14908 } 14909 14910 static NODE* 14911 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) 14912 { 14913 int saved_line = ruby_sourceline; 14914 NODE *node; 14915 NODE *i1, *i2 = 0; 14916 14917 node = NEW_ARGS(m ? m->nd_plen : 0, o); 14918 i1 = m ? m->nd_next : 0; 14919 node->nd_next = NEW_ARGS_AUX(r, b); 14920 14921 if (p) { 14922 i2 = p->nd_next; 14923 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); 14924 } 14925 else if (i1) { 14926 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); 14927 } 14928 if (i1 || i2) { 14929 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); 14930 } 14931 ruby_sourceline = saved_line; 14932 return node; 14933 } 14934 #endif /* !RIPPER */ 14935 14936 static void 14937 warn_unused_var(struct parser_params *parser, struct local_vars *local) 14938 { 14939 int i, cnt; 14940 ID *v, *u; 14941 14942 if (!local->used) return; 14943 v = local->vars->tbl; 14944 u = local->used->tbl; 14945 cnt = local->used->pos; 14946 if (cnt != local->vars->pos) { 14947 rb_bug("local->used->pos != local->vars->pos"); 14948 } 14949 for (i = 0; i < cnt; ++i) { 14950 if (!v[i] || (u[i] & LVAR_USED)) continue; 14951 if (idUScore == v[i]) continue; 14952 rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 14953 } 14954 } 14955 14956 static void 14957 local_push_gen(struct parser_params *parser, int inherit_dvars) 14958 { 14959 struct local_vars *local; 14960 14961 local = ALLOC(struct local_vars); 14962 local->prev = lvtbl; 14963 local->args = vtable_alloc(0); 14964 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 14965 local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 14966 local->cmdargs = cmdarg_stack; 14967 cmdarg_stack = 0; 14968 lvtbl = local; 14969 } 14970 14971 static void 14972 local_pop_gen(struct parser_params *parser) 14973 { 14974 struct local_vars *local = lvtbl->prev; 14975 if (lvtbl->used) { 14976 warn_unused_var(parser, lvtbl); 14977 vtable_free(lvtbl->used); 14978 } 14979 vtable_free(lvtbl->args); 14980 vtable_free(lvtbl->vars); 14981 cmdarg_stack = lvtbl->cmdargs; 14982 xfree(lvtbl); 14983 lvtbl = local; 14984 } 14985 14986 #ifndef RIPPER 14987 static ID* 14988 vtable_tblcpy(ID *buf, const struct vtable *src) 14989 { 14990 int i, cnt = vtable_size(src); 14991 14992 if (cnt > 0) { 14993 buf[0] = cnt; 14994 for (i = 0; i < cnt; i++) { 14995 buf[i] = src->tbl[i]; 14996 } 14997 return buf; 14998 } 14999 return 0; 15000 } 15001 15002 static ID* 15003 local_tbl_gen(struct parser_params *parser) 15004 { 15005 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 15006 ID *buf; 15007 15008 if (cnt <= 0) return 0; 15009 buf = ALLOC_N(ID, cnt + 1); 15010 vtable_tblcpy(buf+1, lvtbl->args); 15011 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 15012 buf[0] = cnt; 15013 return buf; 15014 } 15015 #endif 15016 15017 static int 15018 arg_var_gen(struct parser_params *parser, ID id) 15019 { 15020 vtable_add(lvtbl->args, id); 15021 return vtable_size(lvtbl->args) - 1; 15022 } 15023 15024 static int 15025 local_var_gen(struct parser_params *parser, ID id) 15026 { 15027 vtable_add(lvtbl->vars, id); 15028 if (lvtbl->used) { 15029 vtable_add(lvtbl->used, (ID)ruby_sourceline); 15030 } 15031 return vtable_size(lvtbl->vars) - 1; 15032 } 15033 15034 static int 15035 local_id_gen(struct parser_params *parser, ID id) 15036 { 15037 struct vtable *vars, *args, *used; 15038 15039 vars = lvtbl->vars; 15040 args = lvtbl->args; 15041 used = lvtbl->used; 15042 15043 while (vars && POINTER_P(vars->prev)) { 15044 vars = vars->prev; 15045 args = args->prev; 15046 if (used) used = used->prev; 15047 } 15048 15049 if (vars && vars->prev == DVARS_INHERIT) { 15050 return rb_local_defined(id); 15051 } 15052 else if (vtable_included(args, id)) { 15053 return 1; 15054 } 15055 else { 15056 int i = vtable_included(vars, id); 15057 if (i && used) used->tbl[i-1] |= LVAR_USED; 15058 return i != 0; 15059 } 15060 } 15061 15062 static const struct vtable * 15063 dyna_push_gen(struct parser_params *parser) 15064 { 15065 lvtbl->args = vtable_alloc(lvtbl->args); 15066 lvtbl->vars = vtable_alloc(lvtbl->vars); 15067 if (lvtbl->used) { 15068 lvtbl->used = vtable_alloc(lvtbl->used); 15069 } 15070 return lvtbl->args; 15071 } 15072 15073 static void 15074 dyna_pop_1(struct parser_params *parser) 15075 { 15076 struct vtable *tmp; 15077 15078 if ((tmp = lvtbl->used) != 0) { 15079 warn_unused_var(parser, lvtbl); 15080 lvtbl->used = lvtbl->used->prev; 15081 vtable_free(tmp); 15082 } 15083 tmp = lvtbl->args; 15084 lvtbl->args = lvtbl->args->prev; 15085 vtable_free(tmp); 15086 tmp = lvtbl->vars; 15087 lvtbl->vars = lvtbl->vars->prev; 15088 vtable_free(tmp); 15089 } 15090 15091 static void 15092 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 15093 { 15094 while (lvtbl->args != lvargs) { 15095 dyna_pop_1(parser); 15096 if (!lvtbl->args) { 15097 struct local_vars *local = lvtbl->prev; 15098 xfree(lvtbl); 15099 lvtbl = local; 15100 } 15101 } 15102 dyna_pop_1(parser); 15103 } 15104 15105 static int 15106 dyna_in_block_gen(struct parser_params *parser) 15107 { 15108 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 15109 } 15110 15111 static int 15112 dvar_defined_gen(struct parser_params *parser, ID id, int get) 15113 { 15114 struct vtable *vars, *args, *used; 15115 int i; 15116 15117 args = lvtbl->args; 15118 vars = lvtbl->vars; 15119 used = lvtbl->used; 15120 15121 while (POINTER_P(vars)) { 15122 if (vtable_included(args, id)) { 15123 return 1; 15124 } 15125 if ((i = vtable_included(vars, id)) != 0) { 15126 if (used) used->tbl[i-1] |= LVAR_USED; 15127 return 1; 15128 } 15129 args = args->prev; 15130 vars = vars->prev; 15131 if (get) used = 0; 15132 if (used) used = used->prev; 15133 } 15134 15135 if (vars == DVARS_INHERIT) { 15136 return rb_dvar_defined(id); 15137 } 15138 15139 return 0; 15140 } 15141 15142 static int 15143 dvar_curr_gen(struct parser_params *parser, ID id) 15144 { 15145 return (vtable_included(lvtbl->args, id) || 15146 vtable_included(lvtbl->vars, id)); 15147 } 15148 15149 #ifndef RIPPER 15150 static void 15151 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 15152 { 15153 int c = RE_OPTION_ENCODING_IDX(options); 15154 15155 if (c) { 15156 int opt, idx; 15157 rb_char_to_option_kcode(c, &opt, &idx); 15158 if (idx != ENCODING_GET(str) && 15159 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15160 goto error; 15161 } 15162 ENCODING_SET(str, idx); 15163 } 15164 else if (RE_OPTION_ENCODING_NONE(options)) { 15165 if (!ENCODING_IS_ASCII8BIT(str) && 15166 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15167 c = 'n'; 15168 goto error; 15169 } 15170 rb_enc_associate(str, rb_ascii8bit_encoding()); 15171 } 15172 else if (parser->enc == rb_usascii_encoding()) { 15173 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15174 /* raise in re.c */ 15175 rb_enc_associate(str, rb_usascii_encoding()); 15176 } 15177 else { 15178 rb_enc_associate(str, rb_ascii8bit_encoding()); 15179 } 15180 } 15181 return; 15182 15183 error: 15184 compile_error(PARSER_ARG 15185 "regexp encoding option '%c' differs from source encoding '%s'", 15186 c, rb_enc_name(rb_enc_get(str))); 15187 } 15188 15189 static int 15190 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 15191 { 15192 VALUE err; 15193 reg_fragment_setenc(str, options); 15194 err = rb_reg_check_preprocess(str); 15195 if (err != Qnil) { 15196 err = rb_obj_as_string(err); 15197 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 15198 RB_GC_GUARD(err); 15199 return 0; 15200 } 15201 return 1; 15202 } 15203 15204 typedef struct { 15205 struct parser_params* parser; 15206 rb_encoding *enc; 15207 NODE *succ_block; 15208 NODE *fail_block; 15209 int num; 15210 } reg_named_capture_assign_t; 15211 15212 static int 15213 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 15214 int back_num, int *back_refs, OnigRegex regex, void *arg0) 15215 { 15216 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 15217 struct parser_params* parser = arg->parser; 15218 rb_encoding *enc = arg->enc; 15219 long len = name_end - name; 15220 const char *s = (const char *)name; 15221 ID var; 15222 15223 arg->num++; 15224 15225 if (arg->succ_block == 0) { 15226 arg->succ_block = NEW_BEGIN(0); 15227 arg->fail_block = NEW_BEGIN(0); 15228 } 15229 15230 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 15231 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 15232 !rb_enc_symname2_p(s, len, enc)) { 15233 return ST_CONTINUE; 15234 } 15235 var = rb_intern3(s, len, enc); 15236 if (dvar_defined(var) || local_id(var)) { 15237 rb_warningS("named capture conflicts a local variable - %s", 15238 rb_id2name(var)); 15239 } 15240 arg->succ_block = block_append(arg->succ_block, 15241 newline_node(node_assign(assignable(var,0), 15242 NEW_CALL( 15243 gettable(rb_intern("$~")), 15244 idAREF, 15245 NEW_LIST(NEW_LIT(ID2SYM(var)))) 15246 ))); 15247 arg->fail_block = block_append(arg->fail_block, 15248 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 15249 return ST_CONTINUE; 15250 } 15251 15252 static NODE * 15253 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 15254 { 15255 reg_named_capture_assign_t arg; 15256 15257 arg.parser = parser; 15258 arg.enc = rb_enc_get(regexp); 15259 arg.succ_block = 0; 15260 arg.fail_block = 0; 15261 arg.num = 0; 15262 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 15263 15264 if (arg.num == 0) 15265 return match; 15266 15267 return 15268 block_append( 15269 newline_node(match), 15270 NEW_IF(gettable(rb_intern("$~")), 15271 block_append( 15272 newline_node(arg.succ_block), 15273 newline_node( 15274 NEW_CALL( 15275 gettable(rb_intern("$~")), 15276 rb_intern("begin"), 15277 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 15278 block_append( 15279 newline_node(arg.fail_block), 15280 newline_node( 15281 NEW_LIT(Qnil))))); 15282 } 15283 15284 static VALUE 15285 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 15286 { 15287 VALUE re; 15288 VALUE err; 15289 15290 reg_fragment_setenc(str, options); 15291 err = rb_errinfo(); 15292 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 15293 if (NIL_P(re)) { 15294 ID mesg = rb_intern("mesg"); 15295 VALUE m = rb_attr_get(rb_errinfo(), mesg); 15296 rb_set_errinfo(err); 15297 if (!NIL_P(err)) { 15298 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 15299 } 15300 else { 15301 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 15302 } 15303 return Qnil; 15304 } 15305 return re; 15306 } 15307 15308 void 15309 rb_gc_mark_parser(void) 15310 { 15311 } 15312 15313 NODE* 15314 rb_parser_append_print(VALUE vparser, NODE *node) 15315 { 15316 NODE *prelude = 0; 15317 NODE *scope = node; 15318 struct parser_params *parser; 15319 15320 if (!node) return node; 15321 15322 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15323 15324 node = node->nd_body; 15325 15326 if (nd_type(node) == NODE_PRELUDE) { 15327 prelude = node; 15328 node = node->nd_body; 15329 } 15330 15331 node = block_append(node, 15332 NEW_FCALL(rb_intern("print"), 15333 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 15334 if (prelude) { 15335 prelude->nd_body = node; 15336 scope->nd_body = prelude; 15337 } 15338 else { 15339 scope->nd_body = node; 15340 } 15341 15342 return scope; 15343 } 15344 15345 NODE * 15346 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 15347 { 15348 NODE *prelude = 0; 15349 NODE *scope = node; 15350 struct parser_params *parser; 15351 15352 if (!node) return node; 15353 15354 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15355 15356 node = node->nd_body; 15357 15358 if (nd_type(node) == NODE_PRELUDE) { 15359 prelude = node; 15360 node = node->nd_body; 15361 } 15362 if (split) { 15363 node = block_append(NEW_GASGN(rb_intern("$F"), 15364 NEW_CALL(NEW_GVAR(rb_intern("$_")), 15365 rb_intern("split"), 0)), 15366 node); 15367 } 15368 if (chop) { 15369 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 15370 rb_intern("chop!"), 0), node); 15371 } 15372 15373 node = NEW_OPT_N(node); 15374 15375 if (prelude) { 15376 prelude->nd_body = node; 15377 scope->nd_body = prelude; 15378 } 15379 else { 15380 scope->nd_body = node; 15381 } 15382 15383 return scope; 15384 } 15385 15386 static const struct { 15387 ID token; 15388 const char *name; 15389 } op_tbl[] = { 15390 {tDOT2, ".."}, 15391 {tDOT3, "..."}, 15392 {tPOW, "**"}, 15393 {tUPLUS, "+@"}, 15394 {tUMINUS, "-@"}, 15395 {tCMP, "<=>"}, 15396 {tGEQ, ">="}, 15397 {tLEQ, "<="}, 15398 {tEQ, "=="}, 15399 {tEQQ, "==="}, 15400 {tNEQ, "!="}, 15401 {tMATCH, "=~"}, 15402 {tNMATCH, "!~"}, 15403 {tAREF, "[]"}, 15404 {tASET, "[]="}, 15405 {tLSHFT, "<<"}, 15406 {tRSHFT, ">>"}, 15407 {tCOLON2, "::"}, 15408 }; 15409 15410 #define op_tbl_count numberof(op_tbl) 15411 15412 #ifndef ENABLE_SELECTOR_NAMESPACE 15413 #define ENABLE_SELECTOR_NAMESPACE 0 15414 #endif 15415 15416 static struct symbols { 15417 ID last_id; 15418 st_table *sym_id; 15419 st_table *id_str; 15420 #if ENABLE_SELECTOR_NAMESPACE 15421 st_table *ivar2_id; 15422 st_table *id_ivar2; 15423 #endif 15424 VALUE op_sym[tLAST_TOKEN]; 15425 } global_symbols = {tLAST_ID}; 15426 15427 static const struct st_hash_type symhash = { 15428 rb_str_hash_cmp, 15429 rb_str_hash, 15430 }; 15431 15432 #if ENABLE_SELECTOR_NAMESPACE 15433 struct ivar2_key { 15434 ID id; 15435 VALUE klass; 15436 }; 15437 15438 static int 15439 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 15440 { 15441 if (key1->id == key2->id && key1->klass == key2->klass) { 15442 return 0; 15443 } 15444 return 1; 15445 } 15446 15447 static int 15448 ivar2_hash(struct ivar2_key *key) 15449 { 15450 return (key->id << 8) ^ (key->klass >> 2); 15451 } 15452 15453 static const struct st_hash_type ivar2_hash_type = { 15454 ivar2_cmp, 15455 ivar2_hash, 15456 }; 15457 #endif 15458 15459 void 15460 Init_sym(void) 15461 { 15462 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 15463 global_symbols.id_str = st_init_numtable_with_size(1000); 15464 #if ENABLE_SELECTOR_NAMESPACE 15465 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 15466 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 15467 #endif 15468 15469 Init_id(); 15470 } 15471 15472 void 15473 rb_gc_mark_symbols(void) 15474 { 15475 rb_mark_tbl(global_symbols.id_str); 15476 rb_gc_mark_locations(global_symbols.op_sym, 15477 global_symbols.op_sym + tLAST_TOKEN); 15478 } 15479 #endif /* !RIPPER */ 15480 15481 static ID 15482 internal_id_gen(struct parser_params *parser) 15483 { 15484 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 15485 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 15486 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 15487 } 15488 15489 #ifndef RIPPER 15490 static int 15491 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 15492 { 15493 int mb = 0; 15494 15495 if (m >= e) return 0; 15496 if (is_global_name_punct(*m)) { 15497 ++m; 15498 } 15499 else if (*m == '-') { 15500 ++m; 15501 if (m < e && is_identchar(m, e, enc)) { 15502 if (!ISASCII(*m)) mb = 1; 15503 m += rb_enc_mbclen(m, e, enc); 15504 } 15505 } 15506 else { 15507 if (!rb_enc_isdigit(*m, enc)) return 0; 15508 do { 15509 if (!ISASCII(*m)) mb = 1; 15510 ++m; 15511 } while (m < e && rb_enc_isdigit(*m, enc)); 15512 } 15513 return m == e ? mb + 1 : 0; 15514 } 15515 15516 int 15517 rb_symname_p(const char *name) 15518 { 15519 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 15520 } 15521 15522 int 15523 rb_enc_symname_p(const char *name, rb_encoding *enc) 15524 { 15525 return rb_enc_symname2_p(name, strlen(name), enc); 15526 } 15527 15528 int 15529 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 15530 { 15531 const char *m = name; 15532 const char *e = m + len; 15533 int localid = FALSE; 15534 15535 if (!m || len <= 0) return FALSE; 15536 switch (*m) { 15537 case '\0': 15538 return FALSE; 15539 15540 case '$': 15541 if (is_special_global_name(++m, e, enc)) return TRUE; 15542 goto id; 15543 15544 case '@': 15545 if (*++m == '@') ++m; 15546 goto id; 15547 15548 case '<': 15549 switch (*++m) { 15550 case '<': ++m; break; 15551 case '=': if (*++m == '>') ++m; break; 15552 default: break; 15553 } 15554 break; 15555 15556 case '>': 15557 switch (*++m) { 15558 case '>': case '=': ++m; break; 15559 } 15560 break; 15561 15562 case '=': 15563 switch (*++m) { 15564 case '~': ++m; break; 15565 case '=': if (*++m == '=') ++m; break; 15566 default: return FALSE; 15567 } 15568 break; 15569 15570 case '*': 15571 if (*++m == '*') ++m; 15572 break; 15573 15574 case '+': case '-': 15575 if (*++m == '@') ++m; 15576 break; 15577 15578 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 15579 ++m; 15580 break; 15581 15582 case '[': 15583 if (*++m != ']') return FALSE; 15584 if (*++m == '=') ++m; 15585 break; 15586 15587 case '!': 15588 if (len == 1) return TRUE; 15589 switch (*++m) { 15590 case '=': case '~': ++m; break; 15591 default: return FALSE; 15592 } 15593 break; 15594 15595 default: 15596 localid = !rb_enc_isupper(*m, enc); 15597 id: 15598 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 15599 return FALSE; 15600 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 15601 if (localid) { 15602 switch (*m) { 15603 case '!': case '?': case '=': ++m; 15604 } 15605 } 15606 break; 15607 } 15608 return m == e; 15609 } 15610 15611 static ID 15612 register_symid(ID id, const char *name, long len, rb_encoding *enc) 15613 { 15614 VALUE str = rb_enc_str_new(name, len, enc); 15615 OBJ_FREEZE(str); 15616 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 15617 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 15618 return id; 15619 } 15620 15621 ID 15622 rb_intern3(const char *name, long len, rb_encoding *enc) 15623 { 15624 const char *m = name; 15625 const char *e = m + len; 15626 unsigned char c; 15627 VALUE str; 15628 ID id; 15629 long last; 15630 int mb; 15631 st_data_t data; 15632 struct RString fake_str; 15633 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 15634 fake_str.basic.klass = rb_cString; 15635 fake_str.as.heap.len = len; 15636 fake_str.as.heap.ptr = (char *)name; 15637 fake_str.as.heap.aux.capa = len; 15638 str = (VALUE)&fake_str; 15639 rb_enc_associate(str, enc); 15640 OBJ_FREEZE(str); 15641 15642 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { 15643 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 15644 } 15645 15646 if (st_lookup(global_symbols.sym_id, str, &data)) 15647 return (ID)data; 15648 15649 if (rb_cString && !rb_enc_asciicompat(enc)) { 15650 id = ID_JUNK; 15651 goto new_id; 15652 } 15653 last = len-1; 15654 id = 0; 15655 switch (*m) { 15656 case '$': 15657 id |= ID_GLOBAL; 15658 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 15659 if (!--mb) enc = rb_ascii8bit_encoding(); 15660 goto new_id; 15661 } 15662 break; 15663 case '@': 15664 if (m[1] == '@') { 15665 m++; 15666 id |= ID_CLASS; 15667 } 15668 else { 15669 id |= ID_INSTANCE; 15670 } 15671 m++; 15672 break; 15673 default: 15674 c = m[0]; 15675 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 15676 /* operators */ 15677 int i; 15678 15679 if (len == 1) { 15680 id = c; 15681 goto id_register; 15682 } 15683 for (i = 0; i < op_tbl_count; i++) { 15684 if (*op_tbl[i].name == *m && 15685 strcmp(op_tbl[i].name, m) == 0) { 15686 id = op_tbl[i].token; 15687 goto id_register; 15688 } 15689 } 15690 } 15691 15692 if (m[last] == '=') { 15693 /* attribute assignment */ 15694 id = rb_intern3(name, last, enc); 15695 if (id > tLAST_TOKEN && !is_attrset_id(id)) { 15696 enc = rb_enc_get(rb_id2str(id)); 15697 id = rb_id_attrset(id); 15698 goto id_register; 15699 } 15700 id = ID_ATTRSET; 15701 } 15702 else if (rb_enc_isupper(m[0], enc)) { 15703 id = ID_CONST; 15704 } 15705 else { 15706 id = ID_LOCAL; 15707 } 15708 break; 15709 } 15710 mb = 0; 15711 if (!rb_enc_isdigit(*m, enc)) { 15712 while (m <= name + last && is_identchar(m, e, enc)) { 15713 if (ISASCII(*m)) { 15714 m++; 15715 } 15716 else { 15717 mb = 1; 15718 m += rb_enc_mbclen(m, e, enc); 15719 } 15720 } 15721 } 15722 if (m - name < len) id = ID_JUNK; 15723 if (enc != rb_usascii_encoding()) { 15724 /* 15725 * this clause makes sense only when called from other than 15726 * rb_intern_str() taking care of code-range. 15727 */ 15728 if (!mb) { 15729 for (; m <= name + len; ++m) { 15730 if (!ISASCII(*m)) goto mbstr; 15731 } 15732 enc = rb_usascii_encoding(); 15733 } 15734 mbstr:; 15735 } 15736 new_id: 15737 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 15738 if (len > 20) { 15739 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 15740 name); 15741 } 15742 else { 15743 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 15744 (int)len, name); 15745 } 15746 } 15747 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 15748 id_register: 15749 return register_symid(id, name, len, enc); 15750 } 15751 15752 ID 15753 rb_intern2(const char *name, long len) 15754 { 15755 return rb_intern3(name, len, rb_usascii_encoding()); 15756 } 15757 15758 #undef rb_intern 15759 ID 15760 rb_intern(const char *name) 15761 { 15762 return rb_intern2(name, strlen(name)); 15763 } 15764 15765 ID 15766 rb_intern_str(VALUE str) 15767 { 15768 rb_encoding *enc; 15769 ID id; 15770 15771 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 15772 enc = rb_usascii_encoding(); 15773 } 15774 else { 15775 enc = rb_enc_get(str); 15776 } 15777 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); 15778 RB_GC_GUARD(str); 15779 return id; 15780 } 15781 15782 VALUE 15783 rb_id2str(ID id) 15784 { 15785 st_data_t data; 15786 15787 if (id < tLAST_TOKEN) { 15788 int i = 0; 15789 15790 if (id < INT_MAX && rb_ispunct((int)id)) { 15791 VALUE str = global_symbols.op_sym[i = (int)id]; 15792 if (!str) { 15793 char name[2]; 15794 name[0] = (char)id; 15795 name[1] = 0; 15796 str = rb_usascii_str_new(name, 1); 15797 OBJ_FREEZE(str); 15798 global_symbols.op_sym[i] = str; 15799 } 15800 return str; 15801 } 15802 for (i = 0; i < op_tbl_count; i++) { 15803 if (op_tbl[i].token == id) { 15804 VALUE str = global_symbols.op_sym[i]; 15805 if (!str) { 15806 str = rb_usascii_str_new2(op_tbl[i].name); 15807 OBJ_FREEZE(str); 15808 global_symbols.op_sym[i] = str; 15809 } 15810 return str; 15811 } 15812 } 15813 } 15814 15815 if (st_lookup(global_symbols.id_str, id, &data)) { 15816 VALUE str = (VALUE)data; 15817 if (RBASIC(str)->klass == 0) 15818 RBASIC(str)->klass = rb_cString; 15819 return str; 15820 } 15821 15822 if (is_attrset_id(id)) { 15823 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 15824 VALUE str; 15825 15826 while (!(str = rb_id2str(id2))) { 15827 if (!is_local_id(id2)) return 0; 15828 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 15829 } 15830 str = rb_str_dup(str); 15831 rb_str_cat(str, "=", 1); 15832 rb_intern_str(str); 15833 if (st_lookup(global_symbols.id_str, id, &data)) { 15834 VALUE str = (VALUE)data; 15835 if (RBASIC(str)->klass == 0) 15836 RBASIC(str)->klass = rb_cString; 15837 return str; 15838 } 15839 } 15840 return 0; 15841 } 15842 15843 const char * 15844 rb_id2name(ID id) 15845 { 15846 VALUE str = rb_id2str(id); 15847 15848 if (!str) return 0; 15849 return RSTRING_PTR(str); 15850 } 15851 15852 static int 15853 symbols_i(VALUE sym, ID value, VALUE ary) 15854 { 15855 rb_ary_push(ary, ID2SYM(value)); 15856 return ST_CONTINUE; 15857 } 15858 15859 /* 15860 * call-seq: 15861 * Symbol.all_symbols => array 15862 * 15863 * Returns an array of all the symbols currently in Ruby's symbol 15864 * table. 15865 * 15866 * Symbol.all_symbols.size #=> 903 15867 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 15868 * :chown, :EOFError, :$;, :String, 15869 * :LOCK_SH, :"setuid?", :$<, 15870 * :default_proc, :compact, :extend, 15871 * :Tms, :getwd, :$=, :ThreadGroup, 15872 * :wait2, :$>] 15873 */ 15874 15875 VALUE 15876 rb_sym_all_symbols(void) 15877 { 15878 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 15879 15880 st_foreach(global_symbols.sym_id, symbols_i, ary); 15881 return ary; 15882 } 15883 15884 int 15885 rb_is_const_id(ID id) 15886 { 15887 return is_const_id(id); 15888 } 15889 15890 int 15891 rb_is_class_id(ID id) 15892 { 15893 return is_class_id(id); 15894 } 15895 15896 int 15897 rb_is_instance_id(ID id) 15898 { 15899 return is_instance_id(id); 15900 } 15901 15902 int 15903 rb_is_local_id(ID id) 15904 { 15905 return is_local_id(id); 15906 } 15907 15908 int 15909 rb_is_junk_id(ID id) 15910 { 15911 return is_junk_id(id); 15912 } 15913 15914 #endif /* !RIPPER */ 15915 15916 static void 15917 parser_initialize(struct parser_params *parser) 15918 { 15919 parser->eofp = Qfalse; 15920 15921 parser->parser_lex_strterm = 0; 15922 parser->parser_cond_stack = 0; 15923 parser->parser_cmdarg_stack = 0; 15924 parser->parser_class_nest = 0; 15925 parser->parser_paren_nest = 0; 15926 parser->parser_lpar_beg = 0; 15927 parser->parser_in_single = 0; 15928 parser->parser_in_def = 0; 15929 parser->parser_in_defined = 0; 15930 parser->parser_compile_for_eval = 0; 15931 parser->parser_cur_mid = 0; 15932 parser->parser_tokenbuf = NULL; 15933 parser->parser_tokidx = 0; 15934 parser->parser_toksiz = 0; 15935 parser->parser_heredoc_end = 0; 15936 parser->parser_command_start = TRUE; 15937 parser->parser_deferred_nodes = 0; 15938 parser->parser_lex_pbeg = 0; 15939 parser->parser_lex_p = 0; 15940 parser->parser_lex_pend = 0; 15941 parser->parser_lvtbl = 0; 15942 parser->parser_ruby__end__seen = 0; 15943 parser->parser_ruby_sourcefile = 0; 15944 #ifndef RIPPER 15945 parser->is_ripper = 0; 15946 parser->parser_eval_tree_begin = 0; 15947 parser->parser_eval_tree = 0; 15948 #else 15949 parser->is_ripper = 1; 15950 parser->parser_ruby_sourcefile_string = Qnil; 15951 parser->delayed = Qnil; 15952 15953 parser->result = Qnil; 15954 parser->parsing_thread = Qnil; 15955 parser->toplevel_p = TRUE; 15956 #endif 15957 #ifdef YYMALLOC 15958 parser->heap = NULL; 15959 #endif 15960 parser->enc = rb_usascii_encoding(); 15961 } 15962 15963 #ifdef RIPPER 15964 #define parser_mark ripper_parser_mark 15965 #define parser_free ripper_parser_free 15966 #endif 15967 15968 static void 15969 parser_mark(void *ptr) 15970 { 15971 struct parser_params *p = (struct parser_params*)ptr; 15972 15973 rb_gc_mark((VALUE)p->parser_lex_strterm); 15974 rb_gc_mark((VALUE)p->parser_deferred_nodes); 15975 rb_gc_mark(p->parser_lex_input); 15976 rb_gc_mark(p->parser_lex_lastline); 15977 rb_gc_mark(p->parser_lex_nextline); 15978 #ifndef RIPPER 15979 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 15980 rb_gc_mark((VALUE)p->parser_eval_tree) ; 15981 rb_gc_mark(p->debug_lines); 15982 #else 15983 rb_gc_mark(p->parser_ruby_sourcefile_string); 15984 rb_gc_mark(p->delayed); 15985 rb_gc_mark(p->value); 15986 rb_gc_mark(p->result); 15987 rb_gc_mark(p->parsing_thread); 15988 #endif 15989 #ifdef YYMALLOC 15990 rb_gc_mark((VALUE)p->heap); 15991 #endif 15992 } 15993 15994 static void 15995 parser_free(void *ptr) 15996 { 15997 struct parser_params *p = (struct parser_params*)ptr; 15998 struct local_vars *local, *prev; 15999 16000 if (p->parser_tokenbuf) { 16001 xfree(p->parser_tokenbuf); 16002 } 16003 for (local = p->parser_lvtbl; local; local = prev) { 16004 if (local->vars) xfree(local->vars); 16005 prev = local->prev; 16006 xfree(local); 16007 } 16008 #ifndef RIPPER 16009 xfree(p->parser_ruby_sourcefile); 16010 #endif 16011 xfree(p); 16012 } 16013 16014 static size_t 16015 parser_memsize(const void *ptr) 16016 { 16017 struct parser_params *p = (struct parser_params*)ptr; 16018 struct local_vars *local; 16019 size_t size = sizeof(*p); 16020 16021 if (!ptr) return 0; 16022 size += p->parser_toksiz; 16023 for (local = p->parser_lvtbl; local; local = local->prev) { 16024 size += sizeof(*local); 16025 if (local->vars) size += local->vars->capa * sizeof(ID); 16026 } 16027 #ifndef RIPPER 16028 if (p->parser_ruby_sourcefile) { 16029 size += strlen(p->parser_ruby_sourcefile) + 1; 16030 } 16031 #endif 16032 return size; 16033 } 16034 16035 static 16036 #ifndef RIPPER 16037 const 16038 #endif 16039 rb_data_type_t parser_data_type = { 16040 "parser", 16041 { 16042 parser_mark, 16043 parser_free, 16044 parser_memsize, 16045 }, 16046 }; 16047 16048 #ifndef RIPPER 16049 #undef rb_reserved_word 16050 16051 const struct kwtable * 16052 rb_reserved_word(const char *str, unsigned int len) 16053 { 16054 return reserved_word(str, len); 16055 } 16056 16057 static struct parser_params * 16058 parser_new(void) 16059 { 16060 struct parser_params *p; 16061 16062 p = ALLOC_N(struct parser_params, 1); 16063 MEMZERO(p, struct parser_params, 1); 16064 parser_initialize(p); 16065 return p; 16066 } 16067 16068 VALUE 16069 rb_parser_new(void) 16070 { 16071 struct parser_params *p = parser_new(); 16072 16073 return TypedData_Wrap_Struct(0, &parser_data_type, p); 16074 } 16075 16076 /* 16077 * call-seq: 16078 * ripper#end_seen? -> Boolean 16079 * 16080 * Return true if parsed source ended by +\_\_END\_\_+. 16081 */ 16082 VALUE 16083 rb_parser_end_seen_p(VALUE vparser) 16084 { 16085 struct parser_params *parser; 16086 16087 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16088 return ruby__end__seen ? Qtrue : Qfalse; 16089 } 16090 16091 /* 16092 * call-seq: 16093 * ripper#encoding -> encoding 16094 * 16095 * Return encoding of the source. 16096 */ 16097 VALUE 16098 rb_parser_encoding(VALUE vparser) 16099 { 16100 struct parser_params *parser; 16101 16102 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16103 return rb_enc_from_encoding(parser->enc); 16104 } 16105 16106 /* 16107 * call-seq: 16108 * ripper.yydebug -> true or false 16109 * 16110 * Get yydebug. 16111 */ 16112 VALUE 16113 rb_parser_get_yydebug(VALUE self) 16114 { 16115 struct parser_params *parser; 16116 16117 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16118 return yydebug ? Qtrue : Qfalse; 16119 } 16120 16121 /* 16122 * call-seq: 16123 * ripper.yydebug = flag 16124 * 16125 * Set yydebug. 16126 */ 16127 VALUE 16128 rb_parser_set_yydebug(VALUE self, VALUE flag) 16129 { 16130 struct parser_params *parser; 16131 16132 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16133 yydebug = RTEST(flag); 16134 return flag; 16135 } 16136 16137 #ifdef YYMALLOC 16138 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 16139 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 16140 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 16141 (n)->u3.cnt = (c), (p)) 16142 16143 void * 16144 rb_parser_malloc(struct parser_params *parser, size_t size) 16145 { 16146 size_t cnt = HEAPCNT(1, size); 16147 NODE *n = NEWHEAP(); 16148 void *ptr = xmalloc(size); 16149 16150 return ADD2HEAP(n, cnt, ptr); 16151 } 16152 16153 void * 16154 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 16155 { 16156 size_t cnt = HEAPCNT(nelem, size); 16157 NODE *n = NEWHEAP(); 16158 void *ptr = xcalloc(nelem, size); 16159 16160 return ADD2HEAP(n, cnt, ptr); 16161 } 16162 16163 void * 16164 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 16165 { 16166 NODE *n; 16167 size_t cnt = HEAPCNT(1, size); 16168 16169 if (ptr && (n = parser->heap) != NULL) { 16170 do { 16171 if (n->u1.node == ptr) { 16172 n->u1.node = ptr = xrealloc(ptr, size); 16173 if (n->u3.cnt) n->u3.cnt = cnt; 16174 return ptr; 16175 } 16176 } while ((n = n->u2.node) != NULL); 16177 } 16178 n = NEWHEAP(); 16179 ptr = xrealloc(ptr, size); 16180 return ADD2HEAP(n, cnt, ptr); 16181 } 16182 16183 void 16184 rb_parser_free(struct parser_params *parser, void *ptr) 16185 { 16186 NODE **prev = &parser->heap, *n; 16187 16188 while ((n = *prev) != NULL) { 16189 if (n->u1.node == ptr) { 16190 *prev = n->u2.node; 16191 rb_gc_force_recycle((VALUE)n); 16192 break; 16193 } 16194 prev = &n->u2.node; 16195 } 16196 xfree(ptr); 16197 } 16198 #endif 16199 #endif 16200 16201 #ifdef RIPPER 16202 #ifdef RIPPER_DEBUG 16203 extern int rb_is_pointer_to_heap(VALUE); 16204 16205 /* :nodoc: */ 16206 static VALUE 16207 ripper_validate_object(VALUE self, VALUE x) 16208 { 16209 if (x == Qfalse) return x; 16210 if (x == Qtrue) return x; 16211 if (x == Qnil) return x; 16212 if (x == Qundef) 16213 rb_raise(rb_eArgError, "Qundef given"); 16214 if (FIXNUM_P(x)) return x; 16215 if (SYMBOL_P(x)) return x; 16216 if (!rb_is_pointer_to_heap(x)) 16217 rb_raise(rb_eArgError, "invalid pointer: %p", x); 16218 switch (TYPE(x)) { 16219 case T_STRING: 16220 case T_OBJECT: 16221 case T_ARRAY: 16222 case T_BIGNUM: 16223 case T_FLOAT: 16224 return x; 16225 case T_NODE: 16226 if (nd_type(x) != NODE_LASGN) { 16227 rb_raise(rb_eArgError, "NODE given: %p", x); 16228 } 16229 return ((NODE *)x)->nd_rval; 16230 default: 16231 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 16232 x, rb_obj_classname(x)); 16233 } 16234 return x; 16235 } 16236 #endif 16237 16238 #define validate(x) ((x) = get_value(x)) 16239 16240 static VALUE 16241 ripper_dispatch0(struct parser_params *parser, ID mid) 16242 { 16243 return rb_funcall(parser->value, mid, 0); 16244 } 16245 16246 static VALUE 16247 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 16248 { 16249 validate(a); 16250 return rb_funcall(parser->value, mid, 1, a); 16251 } 16252 16253 static VALUE 16254 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 16255 { 16256 validate(a); 16257 validate(b); 16258 return rb_funcall(parser->value, mid, 2, a, b); 16259 } 16260 16261 static VALUE 16262 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 16263 { 16264 validate(a); 16265 validate(b); 16266 validate(c); 16267 return rb_funcall(parser->value, mid, 3, a, b, c); 16268 } 16269 16270 static VALUE 16271 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 16272 { 16273 validate(a); 16274 validate(b); 16275 validate(c); 16276 validate(d); 16277 return rb_funcall(parser->value, mid, 4, a, b, c, d); 16278 } 16279 16280 static VALUE 16281 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 16282 { 16283 validate(a); 16284 validate(b); 16285 validate(c); 16286 validate(d); 16287 validate(e); 16288 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 16289 } 16290 16291 static const struct kw_assoc { 16292 ID id; 16293 const char *name; 16294 } keyword_to_name[] = { 16295 {keyword_class, "class"}, 16296 {keyword_module, "module"}, 16297 {keyword_def, "def"}, 16298 {keyword_undef, "undef"}, 16299 {keyword_begin, "begin"}, 16300 {keyword_rescue, "rescue"}, 16301 {keyword_ensure, "ensure"}, 16302 {keyword_end, "end"}, 16303 {keyword_if, "if"}, 16304 {keyword_unless, "unless"}, 16305 {keyword_then, "then"}, 16306 {keyword_elsif, "elsif"}, 16307 {keyword_else, "else"}, 16308 {keyword_case, "case"}, 16309 {keyword_when, "when"}, 16310 {keyword_while, "while"}, 16311 {keyword_until, "until"}, 16312 {keyword_for, "for"}, 16313 {keyword_break, "break"}, 16314 {keyword_next, "next"}, 16315 {keyword_redo, "redo"}, 16316 {keyword_retry, "retry"}, 16317 {keyword_in, "in"}, 16318 {keyword_do, "do"}, 16319 {keyword_do_cond, "do"}, 16320 {keyword_do_block, "do"}, 16321 {keyword_return, "return"}, 16322 {keyword_yield, "yield"}, 16323 {keyword_super, "super"}, 16324 {keyword_self, "self"}, 16325 {keyword_nil, "nil"}, 16326 {keyword_true, "true"}, 16327 {keyword_false, "false"}, 16328 {keyword_and, "and"}, 16329 {keyword_or, "or"}, 16330 {keyword_not, "not"}, 16331 {modifier_if, "if"}, 16332 {modifier_unless, "unless"}, 16333 {modifier_while, "while"}, 16334 {modifier_until, "until"}, 16335 {modifier_rescue, "rescue"}, 16336 {keyword_alias, "alias"}, 16337 {keyword_defined, "defined?"}, 16338 {keyword_BEGIN, "BEGIN"}, 16339 {keyword_END, "END"}, 16340 {keyword__LINE__, "__LINE__"}, 16341 {keyword__FILE__, "__FILE__"}, 16342 {keyword__ENCODING__, "__ENCODING__"}, 16343 {0, NULL} 16344 }; 16345 16346 static const char* 16347 keyword_id_to_str(ID id) 16348 { 16349 const struct kw_assoc *a; 16350 16351 for (a = keyword_to_name; a->id; a++) { 16352 if (a->id == id) 16353 return a->name; 16354 } 16355 return NULL; 16356 } 16357 16358 #undef ripper_id2sym 16359 static VALUE 16360 ripper_id2sym(ID id) 16361 { 16362 const char *name; 16363 char buf[8]; 16364 16365 if (id <= 256) { 16366 buf[0] = (char)id; 16367 buf[1] = '\0'; 16368 return ID2SYM(rb_intern2(buf, 1)); 16369 } 16370 if ((name = keyword_id_to_str(id))) { 16371 return ID2SYM(rb_intern(name)); 16372 } 16373 switch (id) { 16374 case tOROP: 16375 name = "||"; 16376 break; 16377 case tANDOP: 16378 name = "&&"; 16379 break; 16380 default: 16381 name = rb_id2name(id); 16382 if (!name) { 16383 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 16384 } 16385 return ID2SYM(id); 16386 } 16387 return ID2SYM(rb_intern(name)); 16388 } 16389 16390 static ID 16391 ripper_get_id(VALUE v) 16392 { 16393 NODE *nd; 16394 if (!RB_TYPE_P(v, T_NODE)) return 0; 16395 nd = (NODE *)v; 16396 if (nd_type(nd) != NODE_LASGN) return 0; 16397 return nd->nd_vid; 16398 } 16399 16400 static VALUE 16401 ripper_get_value(VALUE v) 16402 { 16403 NODE *nd; 16404 if (v == Qundef) return Qnil; 16405 if (!RB_TYPE_P(v, T_NODE)) return v; 16406 nd = (NODE *)v; 16407 if (nd_type(nd) != NODE_LASGN) return Qnil; 16408 return nd->nd_rval; 16409 } 16410 16411 static void 16412 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 16413 { 16414 VALUE str; 16415 va_list args; 16416 16417 va_start(args, fmt); 16418 str = rb_vsprintf(fmt, args); 16419 va_end(args); 16420 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 16421 } 16422 16423 static void 16424 ripper_warn0(struct parser_params *parser, const char *fmt) 16425 { 16426 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 16427 } 16428 16429 static void 16430 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 16431 { 16432 rb_funcall(parser->value, rb_intern("warn"), 2, 16433 STR_NEW2(fmt), INT2NUM(a)); 16434 } 16435 16436 #if 0 16437 static void 16438 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 16439 { 16440 rb_funcall(parser->value, rb_intern("warn"), 2, 16441 STR_NEW2(fmt), STR_NEW2(str)); 16442 } 16443 #endif 16444 16445 static void 16446 ripper_warning0(struct parser_params *parser, const char *fmt) 16447 { 16448 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 16449 } 16450 16451 static void 16452 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 16453 { 16454 rb_funcall(parser->value, rb_intern("warning"), 2, 16455 STR_NEW2(fmt), STR_NEW2(str)); 16456 } 16457 16458 static VALUE 16459 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 16460 { 16461 return rb_funcall(src, ripper_id_gets, 0); 16462 } 16463 16464 static VALUE 16465 ripper_s_allocate(VALUE klass) 16466 { 16467 struct parser_params *p; 16468 VALUE self; 16469 16470 p = ALLOC_N(struct parser_params, 1); 16471 MEMZERO(p, struct parser_params, 1); 16472 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 16473 p->value = self; 16474 return self; 16475 } 16476 16477 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 16478 16479 /* 16480 * call-seq: 16481 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 16482 * 16483 * Create a new Ripper object. 16484 * _src_ must be a String, an IO, or an Object which has #gets method. 16485 * 16486 * This method does not starts parsing. 16487 * See also Ripper#parse and Ripper.parse. 16488 */ 16489 static VALUE 16490 ripper_initialize(int argc, VALUE *argv, VALUE self) 16491 { 16492 struct parser_params *parser; 16493 VALUE src, fname, lineno; 16494 16495 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16496 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 16497 if (rb_obj_respond_to(src, ripper_id_gets, 0)) { 16498 parser->parser_lex_gets = ripper_lex_get_generic; 16499 } 16500 else { 16501 StringValue(src); 16502 parser->parser_lex_gets = lex_get_str; 16503 } 16504 parser->parser_lex_input = src; 16505 parser->eofp = Qfalse; 16506 if (NIL_P(fname)) { 16507 fname = STR_NEW2("(ripper)"); 16508 } 16509 else { 16510 StringValue(fname); 16511 } 16512 parser_initialize(parser); 16513 16514 parser->parser_ruby_sourcefile_string = fname; 16515 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 16516 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 16517 16518 return Qnil; 16519 } 16520 16521 struct ripper_args { 16522 struct parser_params *parser; 16523 int argc; 16524 VALUE *argv; 16525 }; 16526 16527 static VALUE 16528 ripper_parse0(VALUE parser_v) 16529 { 16530 struct parser_params *parser; 16531 16532 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16533 parser_prepare(parser); 16534 ripper_yyparse((void*)parser); 16535 return parser->result; 16536 } 16537 16538 static VALUE 16539 ripper_ensure(VALUE parser_v) 16540 { 16541 struct parser_params *parser; 16542 16543 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16544 parser->parsing_thread = Qnil; 16545 return Qnil; 16546 } 16547 16548 /* 16549 * call-seq: 16550 * ripper#parse 16551 * 16552 * Start parsing and returns the value of the root action. 16553 */ 16554 static VALUE 16555 ripper_parse(VALUE self) 16556 { 16557 struct parser_params *parser; 16558 16559 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16560 if (!ripper_initialized_p(parser)) { 16561 rb_raise(rb_eArgError, "method called for uninitialized object"); 16562 } 16563 if (!NIL_P(parser->parsing_thread)) { 16564 if (parser->parsing_thread == rb_thread_current()) 16565 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 16566 else 16567 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 16568 } 16569 parser->parsing_thread = rb_thread_current(); 16570 rb_ensure(ripper_parse0, self, ripper_ensure, self); 16571 16572 return parser->result; 16573 } 16574 16575 /* 16576 * call-seq: 16577 * ripper#column -> Integer 16578 * 16579 * Return column number of current parsing line. 16580 * This number starts from 0. 16581 */ 16582 static VALUE 16583 ripper_column(VALUE self) 16584 { 16585 struct parser_params *parser; 16586 long col; 16587 16588 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16589 if (!ripper_initialized_p(parser)) { 16590 rb_raise(rb_eArgError, "method called for uninitialized object"); 16591 } 16592 if (NIL_P(parser->parsing_thread)) return Qnil; 16593 col = parser->tokp - parser->parser_lex_pbeg; 16594 return LONG2NUM(col); 16595 } 16596 16597 /* 16598 * call-seq: 16599 * ripper#filename -> String 16600 * 16601 * Return current parsing filename. 16602 */ 16603 static VALUE 16604 ripper_filename(VALUE self) 16605 { 16606 struct parser_params *parser; 16607 16608 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16609 if (!ripper_initialized_p(parser)) { 16610 rb_raise(rb_eArgError, "method called for uninitialized object"); 16611 } 16612 return parser->parser_ruby_sourcefile_string; 16613 } 16614 16615 /* 16616 * call-seq: 16617 * ripper#lineno -> Integer 16618 * 16619 * Return line number of current parsing line. 16620 * This number starts from 1. 16621 */ 16622 static VALUE 16623 ripper_lineno(VALUE self) 16624 { 16625 struct parser_params *parser; 16626 16627 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16628 if (!ripper_initialized_p(parser)) { 16629 rb_raise(rb_eArgError, "method called for uninitialized object"); 16630 } 16631 if (NIL_P(parser->parsing_thread)) return Qnil; 16632 return INT2NUM(parser->parser_ruby_sourceline); 16633 } 16634 16635 #ifdef RIPPER_DEBUG 16636 /* :nodoc: */ 16637 static VALUE 16638 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 16639 { 16640 StringValue(msg); 16641 if (obj == Qundef) { 16642 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 16643 } 16644 return Qnil; 16645 } 16646 16647 /* :nodoc: */ 16648 static VALUE 16649 ripper_value(VALUE self, VALUE obj) 16650 { 16651 return ULONG2NUM(obj); 16652 } 16653 #endif 16654 16655 16656 void 16657 InitVM_ripper(void) 16658 { 16659 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 16660 } 16661 16662 void 16663 Init_ripper(void) 16664 { 16665 VALUE Ripper; 16666 16667 InitVM(ripper); 16668 Ripper = rb_define_class("Ripper", rb_cObject); 16669 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 16670 rb_define_alloc_func(Ripper, ripper_s_allocate); 16671 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 16672 rb_define_method(Ripper, "parse", ripper_parse, 0); 16673 rb_define_method(Ripper, "column", ripper_column, 0); 16674 rb_define_method(Ripper, "filename", ripper_filename, 0); 16675 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 16676 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 16677 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 16678 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 16679 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 16680 #ifdef RIPPER_DEBUG 16681 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 16682 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 16683 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 16684 #endif 16685 16686 ripper_id_gets = rb_intern("gets"); 16687 ripper_init_eventids1(Ripper); 16688 ripper_init_eventids2(Ripper); 16689 /* ensure existing in symbol table */ 16690 (void)rb_intern("||"); 16691 (void)rb_intern("&&"); 16692 16693 # if 0 16694 /* Hack to let RDoc document SCRIPT_LINES__ */ 16695 16696 /* 16697 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 16698 * after the assignment will be added as an Array of lines with the file 16699 * name as the key. 16700 */ 16701 rb_define_global_const("SCRIPT_LINES__", Qnil); 16702 #endif 16703 16704 } 16705 #endif /* RIPPER */ 16706
1.7.6.1