|
Ruby 1.9.3p194(2012-04-20revision35410)
|
00001 /* A Bison parser, made by GNU Bison 2.5. */ 00002 00003 /* Bison implementation for Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 /* As a special exception, you may create a larger work that contains 00021 part or all of the Bison parser skeleton and distribute that work 00022 under terms of your choice, so long as that work isn't itself a 00023 parser generator using the skeleton or a modified version thereof 00024 as a parser skeleton. Alternatively, if you modify or redistribute 00025 the parser skeleton itself, you may (at your option) remove this 00026 special exception, which will cause the skeleton and the resulting 00027 Bison output files to be licensed under the GNU General Public 00028 License without this special exception. 00029 00030 This special exception was added by the Free Software Foundation in 00031 version 2.2 of Bison. */ 00032 00033 /* C LALR(1) parser skeleton written by Richard Stallman, by 00034 simplifying the original so-called "semantic" parser. */ 00035 00036 /* All symbols defined below should begin with yy or YY, to avoid 00037 infringing on user name space. This should be done even for local 00038 variables, as they might otherwise be expanded by user macros. 00039 There are some unavoidable exceptions within include files to 00040 define necessary library symbols; they are noted "INFRINGES ON 00041 USER NAME SPACE" below. */ 00042 00043 /* Identify Bison output. */ 00044 #define YYBISON 1 00045 00046 /* Bison version. */ 00047 #define YYBISON_VERSION "2.5" 00048 00049 /* Skeleton name. */ 00050 #define YYSKELETON_NAME "yacc.c" 00051 00052 /* Pure parsers. */ 00053 #define YYPURE 1 00054 00055 /* Push parsers. */ 00056 #define YYPUSH 0 00057 00058 /* Pull parsers. */ 00059 #define YYPULL 1 00060 00061 /* Using locations. */ 00062 #define YYLSP_NEEDED 0 00063 00064 00065 00066 /* Copy the first part of user declarations. */ 00067 00068 /* Line 268 of yacc.c */ 00069 #line 12 "ripper.y" 00070 00071 00072 #define YYDEBUG 1 00073 #define YYERROR_VERBOSE 1 00074 #define YYSTACK_USE_ALLOCA 0 00075 00076 #include "ruby/ruby.h" 00077 #include "ruby/st.h" 00078 #include "ruby/encoding.h" 00079 #include "internal.h" 00080 #include "node.h" 00081 #include "parse.h" 00082 #include "id.h" 00083 #include "regenc.h" 00084 #include <stdio.h> 00085 #include <errno.h> 00086 #include <ctype.h> 00087 00088 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 00089 00090 #define YYMALLOC(size) rb_parser_malloc(parser, (size)) 00091 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 00092 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 00093 #define YYFREE(ptr) rb_parser_free(parser, (ptr)) 00094 #define malloc YYMALLOC 00095 #define realloc YYREALLOC 00096 #define calloc YYCALLOC 00097 #define free YYFREE 00098 00099 #ifndef RIPPER 00100 static ID register_symid(ID, const char *, long, rb_encoding *); 00101 #define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 00102 #include "id.c" 00103 #endif 00104 00105 #define is_notop_id(id) ((id)>tLAST_TOKEN) 00106 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 00107 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 00108 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 00109 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 00110 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 00111 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 00112 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 00113 00114 #define is_asgn_or_id(id) ((is_notop_id(id)) && \ 00115 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 00116 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 00117 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 00118 00119 enum lex_state_e { 00120 EXPR_BEG, /* ignore newline, +/- is a sign. */ 00121 EXPR_END, /* newline significant, +/- is an operator. */ 00122 EXPR_ENDARG, /* ditto, and unbound braces. */ 00123 EXPR_ENDFN, /* ditto, and unbound braces. */ 00124 EXPR_ARG, /* newline significant, +/- is an operator. */ 00125 EXPR_CMDARG, /* newline significant, +/- is an operator. */ 00126 EXPR_MID, /* newline significant, +/- is an operator. */ 00127 EXPR_FNAME, /* ignore newline, no reserved words. */ 00128 EXPR_DOT, /* right after `.' or `::', no reserved words. */ 00129 EXPR_CLASS, /* immediate after `class', no here document. */ 00130 EXPR_VALUE, /* alike EXPR_BEG but label is disallowed. */ 00131 EXPR_MAX_STATE 00132 }; 00133 00134 typedef VALUE stack_type; 00135 00136 # define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 00137 # define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 00138 # define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 00139 # define BITSTACK_SET_P(stack) ((stack)&1) 00140 00141 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 00142 #define COND_POP() BITSTACK_POP(cond_stack) 00143 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 00144 #define COND_P() BITSTACK_SET_P(cond_stack) 00145 00146 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 00147 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 00148 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 00149 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 00150 00151 struct vtable { 00152 ID *tbl; 00153 int pos; 00154 int capa; 00155 struct vtable *prev; 00156 }; 00157 00158 struct local_vars { 00159 struct vtable *args; 00160 struct vtable *vars; 00161 struct vtable *used; 00162 struct local_vars *prev; 00163 }; 00164 00165 #define DVARS_INHERIT ((void*)1) 00166 #define DVARS_TOPSCOPE NULL 00167 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 00168 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 00169 00170 static int 00171 vtable_size(const struct vtable *tbl) 00172 { 00173 if (POINTER_P(tbl)) { 00174 return tbl->pos; 00175 } 00176 else { 00177 return 0; 00178 } 00179 } 00180 00181 #define VTBL_DEBUG 0 00182 00183 static struct vtable * 00184 vtable_alloc(struct vtable *prev) 00185 { 00186 struct vtable *tbl = ALLOC(struct vtable); 00187 tbl->pos = 0; 00188 tbl->capa = 8; 00189 tbl->tbl = ALLOC_N(ID, tbl->capa); 00190 tbl->prev = prev; 00191 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 00192 return tbl; 00193 } 00194 00195 static void 00196 vtable_free(struct vtable *tbl) 00197 { 00198 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 00199 if (POINTER_P(tbl)) { 00200 if (tbl->tbl) { 00201 xfree(tbl->tbl); 00202 } 00203 xfree(tbl); 00204 } 00205 } 00206 00207 static void 00208 vtable_add(struct vtable *tbl, ID id) 00209 { 00210 if (!POINTER_P(tbl)) { 00211 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 00212 } 00213 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 00214 00215 if (tbl->pos == tbl->capa) { 00216 tbl->capa = tbl->capa * 2; 00217 REALLOC_N(tbl->tbl, ID, tbl->capa); 00218 } 00219 tbl->tbl[tbl->pos++] = id; 00220 } 00221 00222 static int 00223 vtable_included(const struct vtable * tbl, ID id) 00224 { 00225 int i; 00226 00227 if (POINTER_P(tbl)) { 00228 for (i = 0; i < tbl->pos; i++) { 00229 if (tbl->tbl[i] == id) { 00230 return i+1; 00231 } 00232 } 00233 } 00234 return 0; 00235 } 00236 00237 00238 #ifndef RIPPER 00239 typedef struct token_info { 00240 const char *token; 00241 int linenum; 00242 int column; 00243 int nonspc; 00244 struct token_info *next; 00245 } token_info; 00246 #endif 00247 00248 /* 00249 Structure of Lexer Buffer: 00250 00251 lex_pbeg tokp lex_p lex_pend 00252 | | | | 00253 |-----------+--------------+------------| 00254 |<------------>| 00255 token 00256 */ 00257 struct parser_params { 00258 int is_ripper; 00259 NODE *heap; 00260 00261 YYSTYPE *parser_yylval; 00262 VALUE eofp; 00263 00264 NODE *parser_lex_strterm; 00265 enum lex_state_e parser_lex_state; 00266 stack_type parser_cond_stack; 00267 stack_type parser_cmdarg_stack; 00268 int parser_class_nest; 00269 int parser_paren_nest; 00270 int parser_lpar_beg; 00271 int parser_in_single; 00272 int parser_in_def; 00273 int parser_compile_for_eval; 00274 VALUE parser_cur_mid; 00275 int parser_in_defined; 00276 char *parser_tokenbuf; 00277 int parser_tokidx; 00278 int parser_toksiz; 00279 VALUE parser_lex_input; 00280 VALUE parser_lex_lastline; 00281 VALUE parser_lex_nextline; 00282 const char *parser_lex_pbeg; 00283 const char *parser_lex_p; 00284 const char *parser_lex_pend; 00285 int parser_heredoc_end; 00286 int parser_command_start; 00287 NODE *parser_deferred_nodes; 00288 long parser_lex_gets_ptr; 00289 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 00290 struct local_vars *parser_lvtbl; 00291 int parser_ruby__end__seen; 00292 int line_count; 00293 int has_shebang; 00294 char *parser_ruby_sourcefile; /* current source file */ 00295 int parser_ruby_sourceline; /* current line no. */ 00296 rb_encoding *enc; 00297 rb_encoding *utf8; 00298 00299 int parser_yydebug; 00300 00301 #ifndef RIPPER 00302 /* Ruby core only */ 00303 NODE *parser_eval_tree_begin; 00304 NODE *parser_eval_tree; 00305 VALUE debug_lines; 00306 VALUE coverage; 00307 int nerr; 00308 00309 int parser_token_info_enabled; 00310 token_info *parser_token_info; 00311 #else 00312 /* Ripper only */ 00313 VALUE parser_ruby_sourcefile_string; 00314 const char *tokp; 00315 VALUE delayed; 00316 int delayed_line; 00317 int delayed_col; 00318 00319 VALUE value; 00320 VALUE result; 00321 VALUE parsing_thread; 00322 int toplevel_p; 00323 #endif 00324 }; 00325 00326 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \ 00327 (parser->utf8 = rb_utf8_encoding())) 00328 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc) 00329 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc) 00330 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc) 00331 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc) 00332 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 00333 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc) 00334 00335 static int parser_yyerror(struct parser_params*, const char*); 00336 #define yyerror(msg) parser_yyerror(parser, (msg)) 00337 00338 #define YYLEX_PARAM parser 00339 00340 #define lex_strterm (parser->parser_lex_strterm) 00341 #define lex_state (parser->parser_lex_state) 00342 #define cond_stack (parser->parser_cond_stack) 00343 #define cmdarg_stack (parser->parser_cmdarg_stack) 00344 #define class_nest (parser->parser_class_nest) 00345 #define paren_nest (parser->parser_paren_nest) 00346 #define lpar_beg (parser->parser_lpar_beg) 00347 #define in_single (parser->parser_in_single) 00348 #define in_def (parser->parser_in_def) 00349 #define compile_for_eval (parser->parser_compile_for_eval) 00350 #define cur_mid (parser->parser_cur_mid) 00351 #define in_defined (parser->parser_in_defined) 00352 #define tokenbuf (parser->parser_tokenbuf) 00353 #define tokidx (parser->parser_tokidx) 00354 #define toksiz (parser->parser_toksiz) 00355 #define lex_input (parser->parser_lex_input) 00356 #define lex_lastline (parser->parser_lex_lastline) 00357 #define lex_nextline (parser->parser_lex_nextline) 00358 #define lex_pbeg (parser->parser_lex_pbeg) 00359 #define lex_p (parser->parser_lex_p) 00360 #define lex_pend (parser->parser_lex_pend) 00361 #define heredoc_end (parser->parser_heredoc_end) 00362 #define command_start (parser->parser_command_start) 00363 #define deferred_nodes (parser->parser_deferred_nodes) 00364 #define lex_gets_ptr (parser->parser_lex_gets_ptr) 00365 #define lex_gets (parser->parser_lex_gets) 00366 #define lvtbl (parser->parser_lvtbl) 00367 #define ruby__end__seen (parser->parser_ruby__end__seen) 00368 #define ruby_sourceline (parser->parser_ruby_sourceline) 00369 #define ruby_sourcefile (parser->parser_ruby_sourcefile) 00370 #define current_enc (parser->enc) 00371 #define yydebug (parser->parser_yydebug) 00372 #ifdef RIPPER 00373 #else 00374 #define ruby_eval_tree (parser->parser_eval_tree) 00375 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 00376 #define ruby_debug_lines (parser->debug_lines) 00377 #define ruby_coverage (parser->coverage) 00378 #endif 00379 00380 static int yylex(void*, void*); 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 00671 /* Line 268 of yacc.c */ 00672 #line 673 "parse.c" 00673 00674 /* Enabling traces. */ 00675 #ifndef YYDEBUG 00676 # define YYDEBUG 1 00677 #endif 00678 00679 /* Enabling verbose error messages. */ 00680 #ifdef YYERROR_VERBOSE 00681 # undef YYERROR_VERBOSE 00682 # define YYERROR_VERBOSE 1 00683 #else 00684 # define YYERROR_VERBOSE 0 00685 #endif 00686 00687 /* Enabling the token table. */ 00688 #ifndef YYTOKEN_TABLE 00689 # define YYTOKEN_TABLE 0 00690 #endif 00691 00692 00693 /* Tokens. */ 00694 #ifndef YYTOKENTYPE 00695 # define YYTOKENTYPE 00696 /* Put the tokens into the symbol table, so that GDB and other debuggers 00697 know about them. */ 00698 enum yytokentype { 00699 keyword_class = 258, 00700 keyword_module = 259, 00701 keyword_def = 260, 00702 keyword_undef = 261, 00703 keyword_begin = 262, 00704 keyword_rescue = 263, 00705 keyword_ensure = 264, 00706 keyword_end = 265, 00707 keyword_if = 266, 00708 keyword_unless = 267, 00709 keyword_then = 268, 00710 keyword_elsif = 269, 00711 keyword_else = 270, 00712 keyword_case = 271, 00713 keyword_when = 272, 00714 keyword_while = 273, 00715 keyword_until = 274, 00716 keyword_for = 275, 00717 keyword_break = 276, 00718 keyword_next = 277, 00719 keyword_redo = 278, 00720 keyword_retry = 279, 00721 keyword_in = 280, 00722 keyword_do = 281, 00723 keyword_do_cond = 282, 00724 keyword_do_block = 283, 00725 keyword_do_LAMBDA = 284, 00726 keyword_return = 285, 00727 keyword_yield = 286, 00728 keyword_super = 287, 00729 keyword_self = 288, 00730 keyword_nil = 289, 00731 keyword_true = 290, 00732 keyword_false = 291, 00733 keyword_and = 292, 00734 keyword_or = 293, 00735 keyword_not = 294, 00736 modifier_if = 295, 00737 modifier_unless = 296, 00738 modifier_while = 297, 00739 modifier_until = 298, 00740 modifier_rescue = 299, 00741 keyword_alias = 300, 00742 keyword_defined = 301, 00743 keyword_BEGIN = 302, 00744 keyword_END = 303, 00745 keyword__LINE__ = 304, 00746 keyword__FILE__ = 305, 00747 keyword__ENCODING__ = 306, 00748 tIDENTIFIER = 307, 00749 tFID = 308, 00750 tGVAR = 309, 00751 tIVAR = 310, 00752 tCONSTANT = 311, 00753 tCVAR = 312, 00754 tLABEL = 313, 00755 tINTEGER = 314, 00756 tFLOAT = 315, 00757 tSTRING_CONTENT = 316, 00758 tCHAR = 317, 00759 tNTH_REF = 318, 00760 tBACK_REF = 319, 00761 tREGEXP_END = 320, 00762 tUPLUS = 321, 00763 tUMINUS = 322, 00764 tPOW = 323, 00765 tCMP = 324, 00766 tEQ = 325, 00767 tEQQ = 326, 00768 tNEQ = 327, 00769 tGEQ = 328, 00770 tLEQ = 329, 00771 tANDOP = 330, 00772 tOROP = 331, 00773 tMATCH = 332, 00774 tNMATCH = 333, 00775 tDOT2 = 334, 00776 tDOT3 = 335, 00777 tAREF = 336, 00778 tASET = 337, 00779 tLSHFT = 338, 00780 tRSHFT = 339, 00781 tCOLON2 = 340, 00782 tCOLON3 = 341, 00783 tOP_ASGN = 342, 00784 tASSOC = 343, 00785 tLPAREN = 344, 00786 tLPAREN_ARG = 345, 00787 tRPAREN = 346, 00788 tLBRACK = 347, 00789 tLBRACE = 348, 00790 tLBRACE_ARG = 349, 00791 tSTAR = 350, 00792 tAMPER = 351, 00793 tLAMBDA = 352, 00794 tSYMBEG = 353, 00795 tSTRING_BEG = 354, 00796 tXSTRING_BEG = 355, 00797 tREGEXP_BEG = 356, 00798 tWORDS_BEG = 357, 00799 tQWORDS_BEG = 358, 00800 tSTRING_DBEG = 359, 00801 tSTRING_DVAR = 360, 00802 tSTRING_END = 361, 00803 tLAMBEG = 362, 00804 tLOWEST = 363, 00805 tUMINUS_NUM = 364, 00806 idNULL = 365, 00807 idRespond_to = 366, 00808 idIFUNC = 367, 00809 idCFUNC = 368, 00810 id_core_set_method_alias = 369, 00811 id_core_set_variable_alias = 370, 00812 id_core_undef_method = 371, 00813 id_core_define_method = 372, 00814 id_core_define_singleton_method = 373, 00815 id_core_set_postexe = 374, 00816 tLAST_TOKEN = 375 00817 }; 00818 #endif 00819 00820 00821 00822 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00823 typedef union YYSTYPE 00824 { 00825 00826 /* Line 293 of yacc.c */ 00827 #line 616 "ripper.y" 00828 00829 VALUE val; 00830 NODE *node; 00831 ID id; 00832 int num; 00833 const struct vtable *vars; 00834 00835 00836 00837 /* Line 293 of yacc.c */ 00838 #line 839 "parse.c" 00839 } YYSTYPE; 00840 # define YYSTYPE_IS_TRIVIAL 1 00841 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00842 # define YYSTYPE_IS_DECLARED 1 00843 #endif 00844 00845 00846 /* Copy the second part of user declarations. */ 00847 00848 00849 /* Line 343 of yacc.c */ 00850 #line 851 "parse.c" 00851 00852 #ifdef short 00853 # undef short 00854 #endif 00855 00856 #ifdef YYTYPE_UINT8 00857 typedef YYTYPE_UINT8 yytype_uint8; 00858 #else 00859 typedef unsigned char yytype_uint8; 00860 #endif 00861 00862 #ifdef YYTYPE_INT8 00863 typedef YYTYPE_INT8 yytype_int8; 00864 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00865 || defined __cplusplus || defined _MSC_VER) 00866 typedef signed char yytype_int8; 00867 #else 00868 typedef short int yytype_int8; 00869 #endif 00870 00871 #ifdef YYTYPE_UINT16 00872 typedef YYTYPE_UINT16 yytype_uint16; 00873 #else 00874 typedef unsigned short int yytype_uint16; 00875 #endif 00876 00877 #ifdef YYTYPE_INT16 00878 typedef YYTYPE_INT16 yytype_int16; 00879 #else 00880 typedef short int yytype_int16; 00881 #endif 00882 00883 #ifndef YYSIZE_T 00884 # ifdef __SIZE_TYPE__ 00885 # define YYSIZE_T __SIZE_TYPE__ 00886 # elif defined size_t 00887 # define YYSIZE_T size_t 00888 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00889 || defined __cplusplus || defined _MSC_VER) 00890 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00891 # define YYSIZE_T size_t 00892 # else 00893 # define YYSIZE_T unsigned int 00894 # endif 00895 #endif 00896 00897 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00898 00899 #ifndef YY_ 00900 # if defined YYENABLE_NLS && YYENABLE_NLS 00901 # if ENABLE_NLS 00902 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00903 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00904 # endif 00905 # endif 00906 # ifndef YY_ 00907 # define YY_(msgid) msgid 00908 # endif 00909 #endif 00910 00911 /* Suppress unused-variable warnings by "using" E. */ 00912 #if ! defined lint || defined __GNUC__ 00913 # define YYUSE(e) ((void) (e)) 00914 #else 00915 # define YYUSE(e) /* empty */ 00916 #endif 00917 00918 /* Identity function, used to suppress warnings about constant conditions. */ 00919 #ifndef lint 00920 # define YYID(n) (n) 00921 #else 00922 #if (defined __STDC__ || defined __C99__FUNC__ \ 00923 || defined __cplusplus || defined _MSC_VER) 00924 static int 00925 YYID (int yyi) 00926 #else 00927 static int 00928 YYID (yyi) 00929 int yyi; 00930 #endif 00931 { 00932 return yyi; 00933 } 00934 #endif 00935 00936 #if ! defined yyoverflow || YYERROR_VERBOSE 00937 00938 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00939 00940 # ifdef YYSTACK_USE_ALLOCA 00941 # if YYSTACK_USE_ALLOCA 00942 # ifdef __GNUC__ 00943 # define YYSTACK_ALLOC __builtin_alloca 00944 # elif defined __BUILTIN_VA_ARG_INCR 00945 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00946 # elif defined _AIX 00947 # define YYSTACK_ALLOC __alloca 00948 # elif defined _MSC_VER 00949 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 00950 # define alloca _alloca 00951 # else 00952 # define YYSTACK_ALLOC alloca 00953 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00954 || defined __cplusplus || defined _MSC_VER) 00955 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00956 # ifndef EXIT_SUCCESS 00957 # define EXIT_SUCCESS 0 00958 # endif 00959 # endif 00960 # endif 00961 # endif 00962 # endif 00963 00964 # ifdef YYSTACK_ALLOC 00965 /* Pacify GCC's `empty if-body' warning. */ 00966 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00967 # ifndef YYSTACK_ALLOC_MAXIMUM 00968 /* The OS might guarantee only one guard page at the bottom of the stack, 00969 and a page size can be as small as 4096 bytes. So we cannot safely 00970 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 00971 to allow for a few compiler-allocated temporary stack slots. */ 00972 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 00973 # endif 00974 # else 00975 # define YYSTACK_ALLOC YYMALLOC 00976 # define YYSTACK_FREE YYFREE 00977 # ifndef YYSTACK_ALLOC_MAXIMUM 00978 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 00979 # endif 00980 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 00981 && ! ((defined YYMALLOC || defined malloc) \ 00982 && (defined YYFREE || defined free))) 00983 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00984 # ifndef EXIT_SUCCESS 00985 # define EXIT_SUCCESS 0 00986 # endif 00987 # endif 00988 # ifndef YYMALLOC 00989 # define YYMALLOC malloc 00990 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00991 || defined __cplusplus || defined _MSC_VER) 00992 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 00993 # endif 00994 # endif 00995 # ifndef YYFREE 00996 # define YYFREE free 00997 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 00998 || defined __cplusplus || defined _MSC_VER) 00999 void free (void *); /* INFRINGES ON USER NAME SPACE */ 01000 # endif 01001 # endif 01002 # endif 01003 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 01004 01005 01006 #if (! defined yyoverflow \ 01007 && (! defined __cplusplus \ 01008 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 01009 01010 /* A type that is properly aligned for any stack member. */ 01011 union yyalloc 01012 { 01013 yytype_int16 yyss_alloc; 01014 YYSTYPE yyvs_alloc; 01015 }; 01016 01017 /* The size of the maximum gap between one aligned stack and the next. */ 01018 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 01019 01020 /* The size of an array large to enough to hold all stacks, each with 01021 N elements. */ 01022 # define YYSTACK_BYTES(N) \ 01023 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 01024 + YYSTACK_GAP_MAXIMUM) 01025 01026 # define YYCOPY_NEEDED 1 01027 01028 /* Relocate STACK from its old location to the new one. The 01029 local variables YYSIZE and YYSTACKSIZE give the old and new number of 01030 elements in the stack, and YYPTR gives the new location of the 01031 stack. Advance YYPTR to a properly aligned location for the next 01032 stack. */ 01033 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 01034 do \ 01035 { \ 01036 YYSIZE_T yynewbytes; \ 01037 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 01038 Stack = &yyptr->Stack_alloc; \ 01039 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 01040 yyptr += yynewbytes / sizeof (*yyptr); \ 01041 } \ 01042 while (YYID (0)) 01043 01044 #endif 01045 01046 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 01047 /* Copy COUNT objects from FROM to TO. The source and destination do 01048 not overlap. */ 01049 # ifndef YYCOPY 01050 # if defined __GNUC__ && 1 < __GNUC__ 01051 # define YYCOPY(To, From, Count) \ 01052 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 01053 # else 01054 # define YYCOPY(To, From, Count) \ 01055 do \ 01056 { \ 01057 YYSIZE_T yyi; \ 01058 for (yyi = 0; yyi < (Count); yyi++) \ 01059 (To)[yyi] = (From)[yyi]; \ 01060 } \ 01061 while (YYID (0)) 01062 # endif 01063 # endif 01064 #endif /* !YYCOPY_NEEDED */ 01065 01066 /* YYFINAL -- State number of the termination state. */ 01067 #define YYFINAL 3 01068 /* YYLAST -- Last index in YYTABLE. */ 01069 #define YYLAST 10748 01070 01071 /* YYNTOKENS -- Number of terminals. */ 01072 #define YYNTOKENS 148 01073 /* YYNNTS -- Number of nonterminals. */ 01074 #define YYNNTS 174 01075 /* YYNRULES -- Number of rules. */ 01076 #define YYNRULES 573 01077 /* YYNRULES -- Number of states. */ 01078 #define YYNSTATES 991 01079 01080 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 01081 #define YYUNDEFTOK 2 01082 #define YYMAXUTOK 375 01083 01084 #define YYTRANSLATE(YYX) \ 01085 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 01086 01087 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 01088 static const yytype_uint8 yytranslate[] = 01089 { 01090 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01091 147, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01092 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01093 2, 2, 146, 123, 2, 2, 2, 121, 116, 2, 01094 142, 143, 119, 117, 140, 118, 139, 120, 2, 2, 01095 2, 2, 2, 2, 2, 2, 2, 2, 111, 145, 01096 113, 109, 112, 110, 2, 2, 2, 2, 2, 2, 01097 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01098 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01099 2, 138, 2, 144, 115, 2, 141, 2, 2, 2, 01100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01102 2, 2, 2, 136, 114, 137, 124, 2, 2, 2, 01103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01107 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01108 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01109 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01110 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01111 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01112 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01113 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01114 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 01115 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 01116 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 01117 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 01118 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 01119 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 01120 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 01121 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 01122 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 01123 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 01124 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 01125 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 01126 105, 106, 107, 108, 122, 125, 126, 127, 128, 129, 01127 130, 131, 132, 133, 134, 135 01128 }; 01129 01130 #if YYDEBUG 01131 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 01132 YYRHS. */ 01133 static const yytype_uint16 yyprhs[] = 01134 { 01135 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 01136 23, 24, 30, 35, 38, 40, 42, 46, 49, 50, 01137 55, 59, 63, 67, 70, 74, 78, 82, 86, 90, 01138 95, 97, 101, 105, 112, 118, 124, 130, 136, 140, 01139 144, 148, 152, 154, 158, 162, 164, 168, 172, 176, 01140 179, 181, 183, 185, 187, 189, 194, 199, 200, 206, 01141 209, 213, 218, 224, 229, 235, 238, 241, 244, 247, 01142 250, 252, 256, 258, 262, 264, 267, 271, 277, 280, 01143 285, 288, 293, 295, 299, 301, 305, 308, 312, 314, 01144 318, 320, 322, 327, 331, 335, 339, 343, 346, 348, 01145 350, 352, 357, 361, 365, 369, 373, 376, 378, 380, 01146 382, 385, 387, 391, 393, 395, 397, 399, 401, 403, 01147 405, 407, 409, 411, 412, 417, 419, 421, 423, 425, 01148 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 01149 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 01150 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 01151 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 01152 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 01153 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 01154 547, 549, 551, 553, 555, 557, 561, 567, 571, 577, 01155 584, 590, 596, 602, 608, 613, 617, 621, 625, 629, 01156 633, 637, 641, 645, 649, 654, 659, 662, 665, 669, 01157 673, 677, 681, 685, 689, 693, 697, 701, 705, 709, 01158 713, 717, 720, 723, 727, 731, 735, 739, 740, 745, 01159 752, 754, 756, 758, 761, 766, 769, 773, 775, 777, 01160 779, 781, 784, 789, 792, 794, 797, 800, 805, 807, 01161 808, 811, 814, 817, 819, 821, 824, 828, 833, 837, 01162 842, 845, 847, 849, 851, 853, 855, 857, 859, 861, 01163 863, 864, 869, 870, 875, 879, 883, 886, 890, 894, 01164 896, 901, 905, 907, 908, 915, 920, 924, 927, 929, 01165 932, 935, 942, 949, 950, 951, 959, 960, 961, 969, 01166 975, 980, 981, 982, 992, 993, 1000, 1001, 1002, 1011, 01167 1012, 1018, 1019, 1026, 1027, 1028, 1038, 1040, 1042, 1044, 01168 1046, 1048, 1050, 1052, 1054, 1056, 1058, 1060, 1062, 1064, 01169 1066, 1068, 1070, 1072, 1074, 1077, 1079, 1081, 1083, 1089, 01170 1091, 1094, 1096, 1098, 1100, 1104, 1106, 1110, 1112, 1117, 01171 1124, 1128, 1134, 1137, 1142, 1144, 1148, 1155, 1164, 1169, 01172 1176, 1181, 1184, 1191, 1194, 1199, 1206, 1209, 1214, 1217, 01173 1222, 1224, 1226, 1228, 1232, 1234, 1239, 1241, 1244, 1246, 01174 1250, 1252, 1254, 1255, 1256, 1261, 1266, 1268, 1272, 1276, 01175 1277, 1283, 1286, 1291, 1296, 1299, 1304, 1309, 1313, 1317, 01176 1321, 1324, 1326, 1331, 1332, 1338, 1339, 1345, 1351, 1353, 01177 1355, 1362, 1364, 1366, 1368, 1370, 1373, 1375, 1378, 1380, 01178 1382, 1384, 1386, 1388, 1390, 1392, 1395, 1399, 1403, 1407, 01179 1411, 1415, 1416, 1420, 1422, 1425, 1429, 1433, 1434, 1438, 01180 1439, 1442, 1443, 1446, 1447, 1450, 1452, 1453, 1457, 1458, 01181 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1480, 1482, 01182 1484, 1488, 1490, 1492, 1495, 1498, 1500, 1502, 1504, 1506, 01183 1508, 1510, 1512, 1514, 1516, 1518, 1520, 1522, 1524, 1526, 01184 1528, 1530, 1532, 1534, 1536, 1537, 1542, 1545, 1549, 1552, 01185 1559, 1568, 1573, 1580, 1585, 1592, 1595, 1600, 1607, 1610, 01186 1615, 1618, 1623, 1625, 1626, 1628, 1630, 1632, 1634, 1636, 01187 1638, 1640, 1644, 1646, 1650, 1654, 1658, 1660, 1664, 1666, 01188 1670, 1672, 1674, 1677, 1679, 1681, 1683, 1686, 1689, 1691, 01189 1693, 1694, 1699, 1701, 1704, 1706, 1710, 1714, 1717, 1719, 01190 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735, 1737, 1739, 01191 1741, 1742, 1744, 1745, 1747, 1750, 1753, 1754, 1756, 1758, 01192 1760, 1762, 1764, 1767 01193 }; 01194 01195 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 01196 static const yytype_int16 yyrhs[] = 01197 { 01198 149, 0, -1, -1, 150, 151, -1, 152, 314, -1, 01199 321, -1, 153, -1, 152, 320, 153, -1, 1, 153, 01200 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1, 01201 156, 256, 231, 259, -1, 157, 314, -1, 321, -1, 01202 158, -1, 157, 320, 158, -1, 1, 158, -1, -1, 01203 45, 180, 159, 180, -1, 45, 54, 54, -1, 45, 01204 54, 64, -1, 45, 54, 63, -1, 6, 181, -1, 01205 158, 40, 162, -1, 158, 41, 162, -1, 158, 42, 01206 162, -1, 158, 43, 162, -1, 158, 44, 158, -1, 01207 48, 136, 156, 137, -1, 160, -1, 168, 109, 163, 01208 -1, 286, 87, 163, -1, 216, 138, 191, 317, 87, 01209 163, -1, 216, 139, 52, 87, 163, -1, 216, 139, 01210 56, 87, 163, -1, 216, 85, 56, 87, 163, -1, 01211 216, 85, 52, 87, 163, -1, 287, 87, 163, -1, 01212 175, 109, 198, -1, 168, 109, 187, -1, 168, 109, 01213 198, -1, 161, -1, 175, 109, 163, -1, 175, 109, 01214 160, -1, 163, -1, 161, 37, 161, -1, 161, 38, 01215 161, -1, 39, 315, 161, -1, 123, 163, -1, 185, 01216 -1, 161, -1, 167, -1, 164, -1, 249, -1, 249, 01217 139, 311, 193, -1, 249, 85, 311, 193, -1, -1, 01218 94, 166, 237, 156, 137, -1, 310, 193, -1, 310, 01219 193, 165, -1, 216, 139, 311, 193, -1, 216, 139, 01220 311, 193, 165, -1, 216, 85, 311, 193, -1, 216, 01221 85, 311, 193, 165, -1, 32, 193, -1, 31, 193, 01222 -1, 30, 192, -1, 21, 192, -1, 22, 192, -1, 01223 170, -1, 89, 169, 316, -1, 170, -1, 89, 169, 01224 316, -1, 172, -1, 172, 171, -1, 172, 95, 174, 01225 -1, 172, 95, 174, 140, 173, -1, 172, 95, -1, 01226 172, 95, 140, 173, -1, 95, 174, -1, 95, 174, 01227 140, 173, -1, 95, -1, 95, 140, 173, -1, 174, 01228 -1, 89, 169, 316, -1, 171, 140, -1, 172, 171, 01229 140, -1, 171, -1, 173, 140, 171, -1, 283, -1, 01230 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01231 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01232 85, 56, -1, 86, 56, -1, 287, -1, 283, -1, 01233 284, -1, 216, 138, 191, 317, -1, 216, 139, 52, 01234 -1, 216, 85, 52, -1, 216, 139, 56, -1, 216, 01235 85, 56, -1, 86, 56, -1, 287, -1, 52, -1, 01236 56, -1, 86, 176, -1, 176, -1, 216, 85, 176, 01237 -1, 52, -1, 56, -1, 53, -1, 183, -1, 184, 01238 -1, 178, -1, 279, -1, 179, -1, 281, -1, 180, 01239 -1, -1, 181, 140, 182, 180, -1, 114, -1, 115, 01240 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77, 01241 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74, 01242 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118, 01243 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68, 01244 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81, 01245 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51, 01246 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7, 01247 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46, 01248 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9, 01249 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22, 01250 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8, 01251 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13, 01252 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11, 01253 -1, 12, -1, 18, -1, 19, -1, 175, 109, 185, 01254 -1, 175, 109, 185, 44, 185, -1, 286, 87, 185, 01255 -1, 286, 87, 185, 44, 185, -1, 216, 138, 191, 01256 317, 87, 185, -1, 216, 139, 52, 87, 185, -1, 01257 216, 139, 56, 87, 185, -1, 216, 85, 52, 87, 01258 185, -1, 216, 85, 56, 87, 185, -1, 86, 56, 01259 87, 185, -1, 287, 87, 185, -1, 185, 79, 185, 01260 -1, 185, 80, 185, -1, 185, 117, 185, -1, 185, 01261 118, 185, -1, 185, 119, 185, -1, 185, 120, 185, 01262 -1, 185, 121, 185, -1, 185, 68, 185, -1, 122, 01263 59, 68, 185, -1, 122, 60, 68, 185, -1, 66, 01264 185, -1, 67, 185, -1, 185, 114, 185, -1, 185, 01265 115, 185, -1, 185, 116, 185, -1, 185, 69, 185, 01266 -1, 185, 112, 185, -1, 185, 73, 185, -1, 185, 01267 113, 185, -1, 185, 74, 185, -1, 185, 70, 185, 01268 -1, 185, 71, 185, -1, 185, 72, 185, -1, 185, 01269 77, 185, -1, 185, 78, 185, -1, 123, 185, -1, 01270 124, 185, -1, 185, 83, 185, -1, 185, 84, 185, 01271 -1, 185, 75, 185, -1, 185, 76, 185, -1, -1, 01272 46, 315, 186, 185, -1, 185, 110, 185, 315, 111, 01273 185, -1, 199, -1, 185, -1, 321, -1, 197, 318, 01274 -1, 197, 140, 308, 318, -1, 308, 318, -1, 142, 01275 191, 316, -1, 321, -1, 189, -1, 321, -1, 192, 01276 -1, 197, 140, -1, 197, 140, 308, 140, -1, 308, 01277 140, -1, 167, -1, 197, 196, -1, 308, 196, -1, 01278 197, 140, 308, 196, -1, 195, -1, -1, 194, 192, 01279 -1, 96, 187, -1, 140, 195, -1, 321, -1, 187, 01280 -1, 95, 187, -1, 197, 140, 187, -1, 197, 140, 01281 95, 187, -1, 197, 140, 187, -1, 197, 140, 95, 01282 187, -1, 95, 187, -1, 260, -1, 261, -1, 264, 01283 -1, 265, -1, 266, -1, 269, -1, 285, -1, 287, 01284 -1, 53, -1, -1, 217, 200, 155, 227, -1, -1, 01285 90, 161, 201, 316, -1, 89, 156, 143, -1, 216, 01286 85, 56, -1, 86, 56, -1, 92, 188, 144, -1, 01287 93, 307, 137, -1, 30, -1, 31, 142, 192, 316, 01288 -1, 31, 142, 316, -1, 31, -1, -1, 46, 315, 01289 142, 202, 161, 316, -1, 39, 142, 161, 316, -1, 01290 39, 142, 316, -1, 310, 251, -1, 250, -1, 250, 01291 251, -1, 97, 242, -1, 218, 162, 228, 156, 230, 01292 227, -1, 219, 162, 228, 156, 231, 227, -1, -1, 01293 -1, 220, 203, 162, 229, 204, 156, 227, -1, -1, 01294 -1, 221, 205, 162, 229, 206, 156, 227, -1, 222, 01295 162, 314, 254, 227, -1, 222, 314, 254, 227, -1, 01296 -1, -1, 223, 232, 25, 207, 162, 229, 208, 156, 01297 227, -1, -1, 224, 177, 288, 209, 155, 227, -1, 01298 -1, -1, 224, 83, 161, 210, 319, 211, 155, 227, 01299 -1, -1, 225, 177, 212, 155, 227, -1, -1, 226, 01300 178, 213, 290, 155, 227, -1, -1, -1, 226, 305, 01301 313, 214, 178, 215, 290, 155, 227, -1, 21, -1, 01302 22, -1, 23, -1, 24, -1, 199, -1, 7, -1, 01303 11, -1, 12, -1, 18, -1, 19, -1, 16, -1, 01304 20, -1, 3, -1, 4, -1, 5, -1, 10, -1, 01305 319, -1, 13, -1, 319, 13, -1, 319, -1, 27, 01306 -1, 231, -1, 14, 162, 228, 156, 230, -1, 321, 01307 -1, 15, 156, -1, 175, -1, 168, -1, 293, -1, 01308 89, 235, 316, -1, 233, -1, 234, 140, 233, -1, 01309 234, -1, 234, 140, 95, 293, -1, 234, 140, 95, 01310 293, 140, 234, -1, 234, 140, 95, -1, 234, 140, 01311 95, 140, 234, -1, 95, 293, -1, 95, 293, 140, 01312 234, -1, 95, -1, 95, 140, 234, -1, 295, 140, 01313 298, 140, 301, 304, -1, 295, 140, 298, 140, 301, 01314 140, 295, 304, -1, 295, 140, 298, 304, -1, 295, 01315 140, 298, 140, 295, 304, -1, 295, 140, 301, 304, 01316 -1, 295, 140, -1, 295, 140, 301, 140, 295, 304, 01317 -1, 295, 304, -1, 298, 140, 301, 304, -1, 298, 01318 140, 301, 140, 295, 304, -1, 298, 304, -1, 298, 01319 140, 295, 304, -1, 301, 304, -1, 301, 140, 295, 01320 304, -1, 303, -1, 321, -1, 238, -1, 114, 239, 01321 114, -1, 76, -1, 114, 236, 239, 114, -1, 321, 01322 -1, 145, 240, -1, 241, -1, 240, 140, 241, -1, 01323 52, -1, 292, -1, -1, -1, 243, 244, 245, 246, 01324 -1, 142, 291, 239, 316, -1, 291, -1, 107, 156, 01325 137, -1, 29, 156, 10, -1, -1, 28, 248, 237, 01326 156, 10, -1, 167, 247, -1, 249, 139, 311, 190, 01327 -1, 249, 85, 311, 190, -1, 310, 189, -1, 216, 01328 139, 311, 190, -1, 216, 85, 311, 189, -1, 216, 01329 85, 312, -1, 216, 139, 189, -1, 216, 85, 189, 01330 -1, 32, 189, -1, 32, -1, 216, 138, 191, 317, 01331 -1, -1, 136, 252, 237, 156, 137, -1, -1, 26, 01332 253, 237, 156, 10, -1, 17, 197, 228, 156, 255, 01333 -1, 231, -1, 254, -1, 8, 257, 258, 228, 156, 01334 256, -1, 321, -1, 187, -1, 198, -1, 321, -1, 01335 88, 175, -1, 321, -1, 9, 156, -1, 321, -1, 01336 282, -1, 279, -1, 281, -1, 262, -1, 62, -1, 01337 263, -1, 262, 263, -1, 99, 271, 106, -1, 100, 01338 272, 106, -1, 101, 273, 65, -1, 102, 146, 106, 01339 -1, 102, 267, 106, -1, -1, 267, 268, 146, -1, 01340 274, -1, 268, 274, -1, 103, 146, 106, -1, 103, 01341 270, 106, -1, -1, 270, 61, 146, -1, -1, 271, 01342 274, -1, -1, 272, 274, -1, -1, 273, 274, -1, 01343 61, -1, -1, 105, 275, 278, -1, -1, -1, 104, 01344 276, 277, 156, 137, -1, 54, -1, 55, -1, 57, 01345 -1, 287, -1, 98, 280, -1, 178, -1, 55, -1, 01346 54, -1, 57, -1, 98, 272, 106, -1, 59, -1, 01347 60, -1, 122, 59, -1, 122, 60, -1, 52, -1, 01348 55, -1, 54, -1, 56, -1, 57, -1, 34, -1, 01349 33, -1, 35, -1, 36, -1, 50, -1, 49, -1, 01350 51, -1, 283, -1, 284, -1, 283, -1, 284, -1, 01351 63, -1, 64, -1, 319, -1, -1, 113, 289, 162, 01352 319, -1, 1, 319, -1, 142, 291, 316, -1, 291, 01353 319, -1, 295, 140, 299, 140, 301, 304, -1, 295, 01354 140, 299, 140, 301, 140, 295, 304, -1, 295, 140, 01355 299, 304, -1, 295, 140, 299, 140, 295, 304, -1, 01356 295, 140, 301, 304, -1, 295, 140, 301, 140, 295, 01357 304, -1, 295, 304, -1, 299, 140, 301, 304, -1, 01358 299, 140, 301, 140, 295, 304, -1, 299, 304, -1, 01359 299, 140, 295, 304, -1, 301, 304, -1, 301, 140, 01360 295, 304, -1, 303, -1, -1, 56, -1, 55, -1, 01361 54, -1, 57, -1, 292, -1, 52, -1, 293, -1, 01362 89, 235, 316, -1, 294, -1, 295, 140, 294, -1, 01363 52, 109, 187, -1, 52, 109, 216, -1, 297, -1, 01364 298, 140, 297, -1, 296, -1, 299, 140, 296, -1, 01365 119, -1, 95, -1, 300, 52, -1, 300, -1, 116, 01366 -1, 96, -1, 302, 52, -1, 140, 303, -1, 321, 01367 -1, 285, -1, -1, 142, 306, 161, 316, -1, 321, 01368 -1, 308, 318, -1, 309, -1, 308, 140, 309, -1, 01369 187, 88, 187, -1, 58, 187, -1, 52, -1, 56, 01370 -1, 53, -1, 52, -1, 56, -1, 53, -1, 183, 01371 -1, 52, -1, 53, -1, 183, -1, 139, -1, 85, 01372 -1, -1, 320, -1, -1, 147, -1, 315, 143, -1, 01373 315, 144, -1, -1, 147, -1, 140, -1, 145, -1, 01374 147, -1, 319, -1, 320, 145, -1, -1 01375 }; 01376 01377 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 01378 static const yytype_uint16 yyrline[] = 01379 { 01380 0, 782, 782, 782, 813, 824, 833, 841, 849, 855, 01381 857, 856, 880, 913, 924, 933, 941, 949, 955, 955, 01382 963, 971, 982, 992, 1000, 1009, 1018, 1031, 1044, 1053, 01383 1065, 1066, 1076, 1105, 1126, 1143, 1160, 1171, 1188, 1198, 01384 1207, 1216, 1225, 1228, 1237, 1249, 1250, 1258, 1266, 1274, 01385 1282, 1285, 1297, 1298, 1301, 1302, 1311, 1323, 1322, 1344, 01386 1353, 1365, 1374, 1386, 1395, 1407, 1416, 1425, 1433, 1441, 01387 1451, 1452, 1462, 1463, 1473, 1481, 1489, 1497, 1506, 1514, 01388 1523, 1531, 1540, 1548, 1559, 1560, 1570, 1578, 1588, 1596, 01389 1606, 1610, 1614, 1622, 1630, 1638, 1646, 1658, 1668, 1680, 01390 1689, 1698, 1706, 1714, 1722, 1730, 1743, 1756, 1767, 1775, 01391 1778, 1786, 1794, 1804, 1805, 1806, 1807, 1812, 1823, 1824, 01392 1827, 1835, 1838, 1846, 1846, 1856, 1857, 1858, 1859, 1860, 01393 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 01394 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 01395 1881, 1882, 1883, 1884, 1887, 1887, 1887, 1888, 1888, 1889, 01396 1889, 1889, 1890, 1890, 1890, 1890, 1891, 1891, 1891, 1891, 01397 1892, 1892, 1892, 1893, 1893, 1893, 1893, 1894, 1894, 1894, 01398 1894, 1895, 1895, 1895, 1895, 1896, 1896, 1896, 1896, 1897, 01399 1897, 1897, 1897, 1898, 1898, 1901, 1910, 1920, 1949, 1980, 01400 2006, 2023, 2040, 2057, 2068, 2079, 2090, 2104, 2118, 2126, 01401 2134, 2142, 2150, 2158, 2166, 2175, 2184, 2192, 2200, 2208, 01402 2216, 2224, 2232, 2240, 2248, 2256, 2264, 2272, 2280, 2288, 01403 2299, 2307, 2315, 2323, 2331, 2339, 2347, 2355, 2355, 2365, 01404 2375, 2381, 2393, 2394, 2398, 2406, 2416, 2426, 2427, 2430, 01405 2431, 2432, 2436, 2444, 2454, 2463, 2471, 2481, 2490, 2499, 01406 2499, 2511, 2521, 2525, 2531, 2539, 2547, 2561, 2577, 2591, 01407 2606, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 01408 2633, 2632, 2657, 2657, 2666, 2674, 2682, 2690, 2703, 2711, 01409 2719, 2727, 2735, 2743, 2743, 2753, 2761, 2769, 2780, 2781, 01410 2792, 2796, 2808, 2820, 2820, 2820, 2831, 2831, 2831, 2842, 01411 2853, 2862, 2864, 2861, 2928, 2927, 2949, 2954, 2948, 2973, 01412 2972, 2994, 2993, 3016, 3017, 3016, 3037, 3045, 3053, 3061, 01413 3071, 3083, 3089, 3095, 3101, 3107, 3113, 3119, 3125, 3131, 01414 3137, 3147, 3153, 3158, 3159, 3166, 3171, 3174, 3175, 3188, 01415 3189, 3199, 3200, 3203, 3211, 3221, 3229, 3239, 3247, 3256, 01416 3265, 3273, 3281, 3290, 3302, 3310, 3320, 3328, 3336, 3344, 01417 3352, 3360, 3369, 3377, 3385, 3393, 3401, 3409, 3417, 3425, 01418 3433, 3443, 3444, 3450, 3459, 3468, 3479, 3480, 3490, 3497, 01419 3506, 3514, 3520, 3523, 3520, 3541, 3549, 3559, 3563, 3570, 01420 3569, 3590, 3606, 3615, 3626, 3635, 3645, 3655, 3663, 3674, 01421 3685, 3693, 3701, 3716, 3715, 3735, 3734, 3755, 3767, 3768, 01422 3771, 3790, 3793, 3801, 3809, 3812, 3816, 3819, 3827, 3830, 01423 3831, 3839, 3842, 3859, 3860, 3861, 3871, 3881, 3908, 3973, 01424 3982, 3993, 4000, 4010, 4018, 4028, 4037, 4048, 4055, 4066, 01425 4073, 4084, 4091, 4102, 4109, 4138, 4140, 4139, 4156, 4162, 01426 4155, 4181, 4189, 4197, 4205, 4208, 4219, 4220, 4221, 4222, 01427 4225, 4255, 4256, 4257, 4265, 4275, 4276, 4277, 4278, 4279, 01428 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4291, 4304, 4314, 01429 4322, 4332, 4333, 4336, 4345, 4344, 4352, 4364, 4374, 4380, 01430 4388, 4396, 4404, 4412, 4420, 4428, 4436, 4444, 4452, 4460, 01431 4468, 4476, 4484, 4493, 4502, 4511, 4520, 4529, 4540, 4541, 01432 4548, 4557, 4576, 4583, 4596, 4608, 4620, 4628, 4644, 4652, 01433 4668, 4669, 4672, 4685, 4696, 4697, 4700, 4717, 4721, 4731, 01434 4741, 4741, 4770, 4771, 4781, 4788, 4798, 4806, 4816, 4817, 01435 4818, 4821, 4822, 4823, 4824, 4827, 4828, 4829, 4832, 4837, 01436 4844, 4845, 4848, 4849, 4852, 4855, 4858, 4859, 4860, 4863, 01437 4864, 4867, 4868, 4872 01438 }; 01439 #endif 01440 01441 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 01442 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 01443 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 01444 static const char *const yytname[] = 01445 { 01446 "$end", "error", "$undefined", "keyword_class", "keyword_module", 01447 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue", 01448 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless", 01449 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case", 01450 "keyword_when", "keyword_while", "keyword_until", "keyword_for", 01451 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry", 01452 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block", 01453 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super", 01454 "keyword_self", "keyword_nil", "keyword_true", "keyword_false", 01455 "keyword_and", "keyword_or", "keyword_not", "modifier_if", 01456 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue", 01457 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END", 01458 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__", 01459 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL", 01460 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", 01461 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ", 01462 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", 01463 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", 01464 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN", 01465 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA", 01466 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", 01467 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 01468 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 01469 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL", 01470 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias", 01471 "id_core_set_variable_alias", "id_core_undef_method", 01472 "id_core_define_method", "id_core_define_singleton_method", 01473 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','", 01474 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program", 01475 "$@1", "top_compstmt", "top_stmts", "top_stmt", "$@2", "bodystmt", 01476 "compstmt", "stmts", "stmt", "$@3", "command_asgn", "expr", "expr_value", 01477 "command_call", "block_command", "cmd_brace_block", "@4", "command", 01478 "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 01479 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 01480 "fitem", "undef_list", "$@5", "op", "reswords", "arg", "$@6", 01481 "arg_value", "aref_args", "paren_args", "opt_paren_args", 01482 "opt_call_args", "call_args", "command_args", "@7", "block_arg", 01483 "opt_block_arg", "args", "mrhs", "primary", "@8", "$@9", "$@10", "$@11", 01484 "$@12", "$@13", "$@14", "$@15", "$@16", "@17", "@18", "@19", "@20", 01485 "@21", "$@22", "$@23", "primary_value", "k_begin", "k_if", "k_unless", 01486 "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def", 01487 "k_end", "then", "do", "if_tail", "opt_else", "for_var", "f_marg", 01488 "f_marg_list", "f_margs", "block_param", "opt_block_param", 01489 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@24", 01490 "@25", "f_larglist", "lambda_body", "do_block", "@26", "block_call", 01491 "method_call", "brace_block", "@27", "@28", "case_body", "cases", 01492 "opt_rescue", "exc_list", "exc_var", "opt_ensure", "literal", "strings", 01493 "string", "string1", "xstring", "regexp", "words", "word_list", "word", 01494 "qwords", "qword_list", "string_contents", "xstring_contents", 01495 "regexp_contents", "string_content", "@29", "@30", "@31", "string_dvar", 01496 "symbol", "sym", "dsym", "numeric", "user_variable", "keyword_variable", 01497 "var_ref", "var_lhs", "backref", "superclass", "$@32", "f_arglist", 01498 "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_opt", 01499 "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark", 01500 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg", 01501 "singleton", "$@33", "assoc_list", "assocs", "assoc", "operation", 01502 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl", 01503 "rparen", "rbracket", "trailer", "term", "terms", "none", 0 01504 }; 01505 #endif 01506 01507 # ifdef YYPRINT 01508 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01509 token YYLEX-NUM. */ 01510 static const yytype_uint16 yytoknum[] = 01511 { 01512 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01513 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01514 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01515 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01516 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01517 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01518 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 01519 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 01520 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 01521 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 01522 355, 356, 357, 358, 359, 360, 361, 362, 363, 61, 01523 63, 58, 62, 60, 124, 94, 38, 43, 45, 42, 01524 47, 37, 364, 33, 126, 365, 366, 367, 368, 369, 01525 370, 371, 372, 373, 374, 375, 123, 125, 91, 46, 01526 44, 96, 40, 41, 93, 59, 32, 10 01527 }; 01528 # endif 01529 01530 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01531 static const yytype_uint16 yyr1[] = 01532 { 01533 0, 148, 150, 149, 151, 152, 152, 152, 152, 153, 01534 154, 153, 155, 156, 157, 157, 157, 157, 159, 158, 01535 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01536 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 01537 158, 158, 158, 160, 160, 161, 161, 161, 161, 161, 01538 161, 162, 163, 163, 164, 164, 164, 166, 165, 167, 01539 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 01540 168, 168, 169, 169, 170, 170, 170, 170, 170, 170, 01541 170, 170, 170, 170, 171, 171, 172, 172, 173, 173, 01542 174, 174, 174, 174, 174, 174, 174, 174, 174, 175, 01543 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, 01544 177, 177, 177, 178, 178, 178, 178, 178, 179, 179, 01545 180, 180, 181, 182, 181, 183, 183, 183, 183, 183, 01546 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01547 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 01548 183, 183, 183, 183, 184, 184, 184, 184, 184, 184, 01549 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01550 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01551 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 01552 184, 184, 184, 184, 184, 185, 185, 185, 185, 185, 01553 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01554 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01555 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 01556 185, 185, 185, 185, 185, 185, 185, 186, 185, 185, 01557 185, 187, 188, 188, 188, 188, 189, 190, 190, 191, 01558 191, 191, 191, 191, 192, 192, 192, 192, 192, 194, 01559 193, 195, 196, 196, 197, 197, 197, 197, 198, 198, 01560 198, 199, 199, 199, 199, 199, 199, 199, 199, 199, 01561 200, 199, 201, 199, 199, 199, 199, 199, 199, 199, 01562 199, 199, 199, 202, 199, 199, 199, 199, 199, 199, 01563 199, 199, 199, 203, 204, 199, 205, 206, 199, 199, 01564 199, 207, 208, 199, 209, 199, 210, 211, 199, 212, 01565 199, 213, 199, 214, 215, 199, 199, 199, 199, 199, 01566 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 01567 226, 227, 228, 228, 228, 229, 229, 230, 230, 231, 01568 231, 232, 232, 233, 233, 234, 234, 235, 235, 235, 01569 235, 235, 235, 235, 235, 235, 236, 236, 236, 236, 01570 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 01571 236, 237, 237, 238, 238, 238, 239, 239, 240, 240, 01572 241, 241, 243, 244, 242, 245, 245, 246, 246, 248, 01573 247, 249, 249, 249, 250, 250, 250, 250, 250, 250, 01574 250, 250, 250, 252, 251, 253, 251, 254, 255, 255, 01575 256, 256, 257, 257, 257, 258, 258, 259, 259, 260, 01576 260, 260, 261, 262, 262, 262, 263, 264, 265, 266, 01577 266, 267, 267, 268, 268, 269, 269, 270, 270, 271, 01578 271, 272, 272, 273, 273, 274, 275, 274, 276, 277, 01579 274, 278, 278, 278, 278, 279, 280, 280, 280, 280, 01580 281, 282, 282, 282, 282, 283, 283, 283, 283, 283, 01581 284, 284, 284, 284, 284, 284, 284, 285, 285, 286, 01582 286, 287, 287, 288, 289, 288, 288, 290, 290, 291, 01583 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 01584 291, 291, 291, 291, 292, 292, 292, 292, 293, 293, 01585 294, 294, 295, 295, 296, 297, 298, 298, 299, 299, 01586 300, 300, 301, 301, 302, 302, 303, 304, 304, 305, 01587 306, 305, 307, 307, 308, 308, 309, 309, 310, 310, 01588 310, 311, 311, 311, 311, 312, 312, 312, 313, 313, 01589 314, 314, 315, 315, 316, 317, 318, 318, 318, 319, 01590 319, 320, 320, 321 01591 }; 01592 01593 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01594 static const yytype_uint8 yyr2[] = 01595 { 01596 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 01597 0, 5, 4, 2, 1, 1, 3, 2, 0, 4, 01598 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 01599 1, 3, 3, 6, 5, 5, 5, 5, 3, 3, 01600 3, 3, 1, 3, 3, 1, 3, 3, 3, 2, 01601 1, 1, 1, 1, 1, 4, 4, 0, 5, 2, 01602 3, 4, 5, 4, 5, 2, 2, 2, 2, 2, 01603 1, 3, 1, 3, 1, 2, 3, 5, 2, 4, 01604 2, 4, 1, 3, 1, 3, 2, 3, 1, 3, 01605 1, 1, 4, 3, 3, 3, 3, 2, 1, 1, 01606 1, 4, 3, 3, 3, 3, 2, 1, 1, 1, 01607 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 01608 1, 1, 1, 0, 4, 1, 1, 1, 1, 1, 01609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01610 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01611 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01612 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01613 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01614 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01615 1, 1, 1, 1, 1, 3, 5, 3, 5, 6, 01616 5, 5, 5, 5, 4, 3, 3, 3, 3, 3, 01617 3, 3, 3, 3, 4, 4, 2, 2, 3, 3, 01618 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 01619 3, 2, 2, 3, 3, 3, 3, 0, 4, 6, 01620 1, 1, 1, 2, 4, 2, 3, 1, 1, 1, 01621 1, 2, 4, 2, 1, 2, 2, 4, 1, 0, 01622 2, 2, 2, 1, 1, 2, 3, 4, 3, 4, 01623 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01624 0, 4, 0, 4, 3, 3, 2, 3, 3, 1, 01625 4, 3, 1, 0, 6, 4, 3, 2, 1, 2, 01626 2, 6, 6, 0, 0, 7, 0, 0, 7, 5, 01627 4, 0, 0, 9, 0, 6, 0, 0, 8, 0, 01628 5, 0, 6, 0, 0, 9, 1, 1, 1, 1, 01629 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01630 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 01631 2, 1, 1, 1, 3, 1, 3, 1, 4, 6, 01632 3, 5, 2, 4, 1, 3, 6, 8, 4, 6, 01633 4, 2, 6, 2, 4, 6, 2, 4, 2, 4, 01634 1, 1, 1, 3, 1, 4, 1, 2, 1, 3, 01635 1, 1, 0, 0, 4, 4, 1, 3, 3, 0, 01636 5, 2, 4, 4, 2, 4, 4, 3, 3, 3, 01637 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 01638 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 01639 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 01640 3, 0, 3, 1, 2, 3, 3, 0, 3, 0, 01641 2, 0, 2, 0, 2, 1, 0, 3, 0, 0, 01642 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, 01643 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 01644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01645 1, 1, 1, 1, 0, 4, 2, 3, 2, 6, 01646 8, 4, 6, 4, 6, 2, 4, 6, 2, 4, 01647 2, 4, 1, 0, 1, 1, 1, 1, 1, 1, 01648 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 01649 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 01650 0, 4, 1, 2, 1, 3, 3, 2, 1, 1, 01651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 01652 0, 1, 0, 1, 2, 2, 0, 1, 1, 1, 01653 1, 1, 2, 0 01654 }; 01655 01656 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 01657 Performed when YYTABLE doesn't specify something else to do. Zero 01658 means the default is an error. */ 01659 static const yytype_uint16 yydefact[] = 01660 { 01661 2, 0, 0, 1, 0, 338, 339, 340, 0, 331, 01662 332, 333, 336, 334, 335, 337, 326, 327, 328, 329, 01663 289, 259, 259, 481, 480, 482, 483, 562, 0, 562, 01664 10, 0, 485, 484, 486, 475, 550, 477, 476, 478, 01665 479, 471, 472, 433, 491, 492, 0, 0, 0, 0, 01666 0, 573, 573, 82, 392, 451, 449, 451, 453, 441, 01667 447, 0, 0, 0, 3, 560, 6, 9, 30, 42, 01668 45, 53, 52, 0, 70, 0, 74, 84, 0, 50, 01669 240, 0, 280, 0, 0, 303, 306, 560, 0, 0, 01670 0, 0, 54, 298, 271, 272, 432, 434, 273, 274, 01671 275, 276, 430, 431, 429, 487, 488, 277, 0, 278, 01672 259, 5, 8, 164, 175, 165, 188, 161, 181, 171, 01673 170, 191, 192, 186, 169, 168, 163, 189, 193, 194, 01674 173, 162, 176, 180, 182, 174, 167, 183, 190, 185, 01675 184, 177, 187, 172, 160, 179, 178, 159, 166, 157, 01676 158, 154, 155, 156, 113, 115, 114, 149, 150, 146, 01677 128, 129, 130, 137, 134, 136, 131, 132, 151, 152, 01678 138, 139, 143, 133, 135, 125, 126, 127, 140, 141, 01679 142, 144, 145, 147, 148, 153, 118, 120, 122, 23, 01680 116, 117, 119, 121, 0, 0, 0, 0, 0, 0, 01681 0, 254, 0, 241, 264, 68, 258, 573, 0, 487, 01682 488, 0, 278, 573, 544, 69, 67, 562, 66, 0, 01683 573, 410, 65, 562, 563, 0, 0, 18, 237, 0, 01684 0, 326, 327, 289, 292, 411, 216, 0, 0, 217, 01685 286, 0, 0, 0, 560, 15, 562, 72, 14, 282, 01686 0, 566, 566, 242, 0, 0, 566, 542, 562, 0, 01687 0, 0, 80, 330, 0, 90, 91, 98, 300, 393, 01688 468, 467, 469, 466, 0, 465, 0, 0, 0, 0, 01689 0, 0, 0, 473, 474, 49, 231, 232, 569, 570, 01690 4, 571, 561, 0, 0, 0, 0, 0, 0, 0, 01691 399, 401, 0, 86, 0, 78, 75, 0, 0, 0, 01692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01694 0, 0, 0, 0, 0, 573, 0, 0, 51, 0, 01695 0, 0, 0, 560, 0, 561, 0, 352, 351, 0, 01696 0, 487, 488, 278, 108, 109, 0, 0, 111, 0, 01697 0, 487, 488, 278, 319, 184, 177, 187, 172, 154, 01698 155, 156, 113, 114, 540, 321, 539, 0, 0, 0, 01699 415, 413, 299, 435, 0, 0, 404, 59, 297, 123, 01700 547, 286, 265, 261, 0, 0, 0, 255, 263, 0, 01701 573, 0, 0, 0, 0, 256, 562, 0, 291, 260, 01702 562, 250, 573, 573, 249, 562, 296, 48, 20, 22, 01703 21, 0, 293, 0, 0, 0, 0, 0, 0, 17, 01704 562, 284, 13, 561, 71, 562, 287, 568, 567, 243, 01705 568, 245, 288, 543, 0, 97, 473, 474, 88, 83, 01706 0, 0, 573, 0, 513, 455, 458, 456, 470, 452, 01707 436, 450, 437, 438, 454, 439, 440, 0, 443, 445, 01708 0, 446, 0, 0, 572, 7, 24, 25, 26, 27, 01709 28, 46, 47, 573, 0, 31, 40, 0, 41, 562, 01710 0, 76, 87, 44, 43, 0, 195, 264, 39, 213, 01711 221, 226, 227, 228, 223, 225, 235, 236, 229, 230, 01712 206, 207, 233, 234, 562, 222, 224, 218, 219, 220, 01713 208, 209, 210, 211, 212, 551, 556, 552, 557, 409, 01714 259, 407, 562, 551, 553, 552, 554, 408, 259, 0, 01715 573, 343, 0, 342, 0, 0, 0, 0, 0, 0, 01716 286, 0, 573, 0, 311, 316, 108, 109, 110, 0, 01717 494, 314, 493, 0, 573, 0, 0, 0, 513, 559, 01718 558, 323, 551, 552, 259, 259, 573, 573, 32, 197, 01719 38, 205, 57, 60, 0, 195, 546, 0, 266, 262, 01720 573, 555, 552, 562, 551, 552, 545, 290, 564, 246, 01721 251, 253, 295, 19, 0, 238, 0, 29, 0, 573, 01722 204, 73, 16, 283, 566, 0, 81, 94, 96, 562, 01723 551, 552, 519, 516, 515, 514, 517, 0, 531, 535, 01724 534, 530, 513, 0, 396, 518, 520, 522, 573, 528, 01725 573, 533, 573, 0, 512, 459, 0, 442, 444, 448, 01726 214, 215, 384, 573, 0, 382, 381, 270, 0, 85, 01727 79, 0, 0, 0, 0, 0, 0, 406, 63, 0, 01728 412, 0, 0, 248, 405, 61, 247, 341, 281, 573, 01729 573, 421, 573, 344, 573, 346, 304, 345, 307, 0, 01730 0, 310, 555, 285, 562, 551, 552, 0, 0, 496, 01731 0, 0, 108, 109, 112, 562, 0, 562, 513, 0, 01732 0, 0, 403, 56, 402, 55, 0, 0, 0, 573, 01733 124, 267, 257, 0, 0, 412, 0, 0, 573, 562, 01734 11, 244, 89, 92, 0, 519, 0, 364, 355, 357, 01735 562, 353, 573, 0, 0, 394, 0, 505, 538, 0, 01736 508, 532, 0, 510, 536, 0, 461, 462, 463, 457, 01737 464, 519, 0, 573, 0, 573, 526, 573, 573, 380, 01738 386, 0, 0, 268, 77, 196, 0, 37, 202, 36, 01739 203, 64, 565, 0, 34, 200, 35, 201, 62, 422, 01740 423, 573, 424, 0, 573, 349, 0, 0, 347, 0, 01741 0, 0, 309, 0, 0, 412, 0, 317, 0, 0, 01742 412, 320, 541, 562, 0, 498, 324, 0, 0, 198, 01743 0, 0, 252, 294, 524, 562, 0, 362, 0, 521, 01744 562, 0, 0, 523, 573, 573, 537, 573, 529, 573, 01745 573, 0, 0, 390, 387, 388, 391, 0, 383, 371, 01746 373, 0, 376, 0, 378, 400, 269, 239, 33, 199, 01747 0, 0, 426, 350, 0, 12, 428, 0, 301, 302, 01748 0, 0, 266, 573, 312, 0, 495, 315, 497, 322, 01749 513, 416, 414, 0, 354, 365, 0, 360, 356, 395, 01750 398, 397, 0, 501, 0, 503, 0, 509, 0, 506, 01751 511, 460, 0, 525, 0, 385, 573, 573, 573, 527, 01752 573, 573, 0, 425, 0, 99, 100, 107, 0, 427, 01753 0, 305, 308, 418, 419, 417, 0, 0, 0, 58, 01754 0, 363, 0, 358, 573, 573, 573, 573, 286, 0, 01755 389, 0, 368, 0, 370, 377, 0, 374, 379, 106, 01756 0, 573, 0, 573, 573, 0, 318, 0, 361, 0, 01757 502, 0, 499, 504, 507, 555, 285, 573, 573, 573, 01758 573, 555, 105, 562, 551, 552, 420, 348, 313, 325, 01759 359, 573, 369, 0, 366, 372, 375, 412, 500, 573, 01760 367 01761 }; 01762 01763 /* YYDEFGOTO[NTERM-NUM]. */ 01764 static const yytype_int16 yydefgoto[] = 01765 { 01766 -1, 1, 2, 64, 65, 66, 229, 539, 540, 244, 01767 245, 421, 68, 69, 339, 70, 71, 583, 719, 72, 01768 73, 246, 74, 75, 76, 449, 77, 202, 358, 359, 01769 186, 187, 188, 189, 584, 536, 191, 79, 423, 204, 01770 250, 529, 674, 410, 411, 218, 219, 206, 397, 412, 01771 488, 80, 337, 435, 604, 341, 800, 342, 801, 697, 01772 926, 701, 698, 875, 566, 568, 711, 880, 237, 82, 01773 83, 84, 85, 86, 87, 88, 89, 90, 91, 678, 01774 542, 686, 797, 798, 350, 738, 739, 740, 763, 654, 01775 655, 764, 844, 845, 268, 269, 454, 633, 745, 301, 01776 483, 92, 93, 388, 577, 576, 549, 925, 680, 791, 01777 861, 865, 94, 95, 96, 97, 98, 99, 100, 280, 01778 467, 101, 282, 276, 274, 278, 459, 646, 645, 755, 01779 759, 102, 275, 103, 104, 209, 210, 107, 211, 212, 01780 561, 700, 709, 710, 635, 636, 637, 638, 639, 766, 01781 767, 640, 641, 642, 643, 836, 747, 377, 567, 255, 01782 413, 214, 238, 608, 531, 571, 290, 407, 408, 670, 01783 439, 543, 345, 248 01784 }; 01785 01786 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01787 STATE-NUM. */ 01788 #define YYPACT_NINF -747 01789 static const yytype_int16 yypact[] = 01790 { 01791 -747, 81, 2552, -747, 7102, -747, -747, -747, 6615, -747, 01792 -747, -747, -747, -747, -747, -747, 7320, 7320, -747, -747, 01793 7320, 3237, 2814, -747, -747, -747, -747, 100, 6476, -31, 01794 -747, -26, -747, -747, -747, 5715, 2955, -747, -747, 5842, 01795 -747, -747, -747, -747, -747, -747, 8519, 8519, 83, 4434, 01796 8628, 7538, 7865, 6878, -747, 6337, -747, -747, -747, -24, 01797 29, 252, 8737, 8519, -747, 193, -747, 1104, -747, 458, 01798 -747, -747, 129, 77, -747, 69, 8846, -747, 139, 2797, 01799 22, 41, -747, 8628, 8628, -747, -747, 5078, 8951, 9056, 01800 9161, 5588, 33, 46, -747, -747, 157, -747, -747, -747, 01801 -747, -747, -747, -747, -747, 25, 58, -747, 179, 613, 01802 51, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01803 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01804 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01805 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01806 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01807 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01808 -747, -747, -747, -747, -747, -747, -747, -747, -747, -747, 01809 -747, -747, -747, -747, -747, -747, -747, -747, -747, 134, 01810 -747, -747, -747, -747, 182, 8519, 279, 4564, 8519, 8519, 01811 8519, -747, 263, 2797, 260, -747, -747, 237, 207, 43, 01812 206, 298, 254, 265, -747, -747, -747, 4969, -747, 7320, 01813 7320, -747, -747, 5208, -747, 8628, 661, -747, 272, 287, 01814 4694, -747, -747, -747, 295, 307, -747, 304, 51, 416, 01815 619, 7211, 4434, 384, 193, 1104, -31, 399, -747, 458, 01816 419, 221, 300, -747, 260, 430, 300, -747, -31, 497, 01817 501, 9266, 442, -747, 351, 366, 383, 409, -747, -747, 01818 -747, -747, -747, -747, 644, -747, 754, 813, 605, 464, 01819 819, 478, 68, 530, 532, -747, -747, -747, -747, -747, 01820 -747, -747, 5317, 8628, 8628, 8628, 8628, 7211, 8628, 8628, 01821 -747, -747, 7974, -747, 4434, 6990, 470, 7974, 8519, 8519, 01822 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01823 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 8519, 01824 8519, 8519, 8519, 8519, 9548, 7320, 9625, 3609, 458, 86, 01825 86, 8628, 8628, 193, 597, 480, 562, -747, -747, 454, 01826 601, 54, 76, 99, 331, 349, 8628, 481, -747, 45, 01827 473, -747, -747, -747, -747, 217, 286, 305, 318, 321, 01828 347, 363, 376, 381, -747, -747, -747, 391, 10549, 10549, 01829 -747, -747, -747, -747, 8737, 8737, -747, 535, -747, -747, 01830 -747, 388, -747, -747, 8519, 8519, 7429, -747, -747, 9702, 01831 7320, 9779, 8519, 8519, 7647, -747, -31, 492, -747, -747, 01832 -31, -747, 506, 539, -747, 106, -747, -747, -747, -747, 01833 -747, 6615, -747, 8519, 4029, 508, 9702, 9779, 8519, 1104, 01834 -31, -747, -747, 5445, 541, -31, -747, 7756, -747, -747, 01835 7865, -747, -747, -747, 272, 510, -747, -747, -747, 543, 01836 9266, 9856, 7320, 9933, 774, -747, -747, -747, -747, -747, 01837 -747, -747, -747, -747, -747, -747, -747, 313, -747, -747, 01838 491, -747, 8519, 8519, -747, -747, -747, -747, -747, -747, 01839 -747, -747, -747, 32, 8519, -747, 545, 546, -747, -31, 01840 9266, 551, -747, -747, -747, 566, 9473, -747, -747, 416, 01841 2184, 2184, 2184, 2184, 781, 781, 2273, 2938, 2184, 2184, 01842 1364, 1364, 662, 662, 2656, 781, 781, 927, 927, 768, 01843 397, 397, 416, 416, 416, 3378, 6083, 3464, 6197, -747, 01844 307, -747, -31, 647, -747, 660, -747, -747, 3096, 650, 01845 688, -747, 3754, 685, 4174, 56, 56, 597, 8083, 650, 01846 112, 10010, 7320, 10087, -747, 458, -747, 510, -747, 193, 01847 -747, -747, -747, 10164, 7320, 10241, 3609, 8628, 1131, -747, 01848 -747, -747, -747, -747, 1739, 1739, 32, 32, -747, 10608, 01849 -747, 2797, -747, -747, 6615, 10627, -747, 8519, 260, -747, 01850 265, 5969, 2673, -31, 490, 500, -747, -747, -747, -747, 01851 7429, 7647, -747, -747, 8628, 2797, 570, -747, 307, 307, 01852 2797, 213, 1104, -747, 300, 9266, 543, 505, 282, -31, 01853 38, 261, 603, -747, -747, -747, -747, 972, -747, -747, 01854 -747, -747, 1223, 66, -747, -747, -747, -747, 580, -747, 01855 583, 683, 589, 687, -747, -747, 893, -747, -747, -747, 01856 416, 416, -747, 576, 4839, -747, -747, 604, 8192, -747, 01857 543, 9266, 8737, 8519, 630, 8737, 8737, -747, 535, 608, 01858 677, 8737, 8737, -747, -747, 535, -747, -747, -747, 8301, 01859 740, -747, 588, -747, 740, -747, -747, -747, -747, 650, 01860 44, -747, 239, 257, -31, 141, 145, 8628, 193, -747, 01861 8628, 3609, 505, 282, -747, -31, 650, 106, 1223, 3609, 01862 193, 6754, -747, -747, -747, -747, 4839, 4694, 8519, 32, 01863 -747, -747, -747, 8519, 8519, 507, 8519, 8519, 636, 106, 01864 -747, -747, -747, 291, 8519, -747, 972, 457, -747, 651, 01865 -31, -747, 639, 4839, 4694, -747, 1223, -747, -747, 1223, 01866 -747, -747, 598, -747, -747, 4694, -747, -747, -747, -747, 01867 -747, 681, 1017, 639, 679, 654, -747, 656, 657, -747, 01868 -747, 789, 8519, 664, 543, 2797, 8519, -747, 2797, -747, 01869 2797, -747, -747, 8737, -747, 2797, -747, 2797, -747, 545, 01870 -747, 713, -747, 4304, 796, -747, 8628, 650, -747, 650, 01871 4839, 4839, -747, 8410, 3899, 189, 56, -747, 193, 650, 01872 -747, -747, -747, -31, 650, -747, -747, 799, 673, 2797, 01873 4694, 8519, 7647, -747, -747, -31, 884, 671, 1079, -747, 01874 -31, 803, 686, -747, 676, 678, -747, 684, -747, 694, 01875 684, 690, 9371, -747, 699, -747, -747, 711, -747, 1251, 01876 -747, 1251, -747, 598, -747, -747, 700, 2797, -747, 2797, 01877 9476, 86, -747, -747, 4839, -747, -747, 86, -747, -747, 01878 650, 650, -747, 365, -747, 3609, -747, -747, -747, -747, 01879 1131, -747, -747, 706, -747, 707, 884, 716, -747, -747, 01880 -747, -747, 1223, -747, 598, -747, 598, -747, 598, -747, 01881 -747, -747, 790, 520, 1017, -747, 708, 715, 684, -747, 01882 717, 684, 797, -747, 523, 366, 383, 409, 3609, -747, 01883 3754, -747, -747, -747, -747, -747, 4839, 650, 3609, -747, 01884 884, 707, 884, 721, 684, 727, 684, 684, -747, 10318, 01885 -747, 1251, -747, 598, -747, -747, 598, -747, -747, 510, 01886 10395, 7320, 10472, 688, 588, 650, -747, 650, 707, 884, 01887 -747, 598, -747, -747, -747, 730, 731, 684, 735, 684, 01888 684, 55, 282, -31, 128, 158, -747, -747, -747, -747, 01889 707, 684, -747, 598, -747, -747, -747, 163, -747, 684, 01890 -747 01891 }; 01892 01893 /* YYPGOTO[NTERM-NUM]. */ 01894 static const yytype_int16 yypgoto[] = 01895 { 01896 -747, -747, -747, 452, -747, 28, -747, -545, 277, -747, 01897 39, -747, -293, 184, -58, 71, -747, -169, -747, -7, 01898 791, -142, -13, -37, -747, -396, -29, 1623, -312, 788, 01899 -54, -747, -25, -747, -747, 20, -747, 1066, -747, -45, 01900 -747, 11, 47, -324, 115, 5, -747, -322, -196, 53, 01901 -295, 8, -747, -747, -747, -747, -747, -747, -747, -747, 01902 -747, -747, -747, -747, -747, -747, -747, -747, 2, -747, 01903 -747, -747, -747, -747, -747, -747, -747, -747, -747, 205, 01904 -338, -516, -72, -618, -747, -722, -671, 147, -747, -489, 01905 -747, -600, -747, -12, -747, -747, -747, -747, -747, -747, 01906 -747, -747, -747, 798, -747, -747, -531, -747, -50, -747, 01907 -747, -747, -747, -747, -747, 811, -747, -747, -747, -747, 01908 -747, -747, -747, -747, 856, -747, -140, -747, -747, -747, 01909 -747, 7, -747, 12, -747, 1268, 1605, 823, 1289, 1575, 01910 -747, -747, 35, -387, -697, -568, -690, 273, -696, -746, 01911 72, 181, -747, -526, -747, -449, 270, -747, -747, -747, 01912 97, -360, 758, -276, -747, -747, -56, -4, 278, -585, 01913 -214, 6, -18, -2 01914 }; 01915 01916 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 01917 positive, shift that token. If negative, reduce the rule which 01918 number is the opposite. If YYTABLE_NINF, syntax error. */ 01919 #define YYTABLE_NINF -574 01920 static const yytype_int16 yytable[] = 01921 { 01922 111, 273, 544, 227, 81, 644, 81, 254, 725, 201, 01923 201, 532, 498, 201, 493, 192, 689, 405, 208, 208, 01924 193, 706, 208, 225, 262, 228, 340, 222, 190, 343, 01925 688, 344, 112, 221, 733, 192, 247, 375, 441, 306, 01926 193, 67, 443, 67, 596, 558, 559, 292, 190, 253, 01927 257, 81, 208, 838, 616, 264, 833, 541, 530, 741, 01928 538, 263, 794, -93, 208, 846, 799, 634, -103, 207, 01929 207, 291, 380, 207, 589, 190, 593, 380, 264, -99, 01930 596, 3, 589, 685, 263, 208, 208, 716, 717, 208, 01931 349, 360, 360, 291, 660, 743, 263, 263, 263, 541, 01932 430, -100, 574, 575, 251, 909, 888, -330, 652, 805, 01933 230, 190, -489, 213, 213, 387, 224, 213, 378, 644, 01934 810, 386, 279, 530, -107, 538, 334, 768, 619, 470, 01935 -489, 205, 215, 285, -99, 216, 461, -106, 464, 240, 01936 468, -102, 830, 298, 299, -490, 653, -93, 252, 256, 01937 390, 609, -99, 392, 393, 885, 809, 300, 560, 833, 01938 -330, -330, 489, 847, 814, -90, -102, -100, 741, 827, 01939 -104, -104, 379, 744, 471, 281, -101, 609, -93, 335, 01940 336, -93, 381, 644, 803, -93, 302, 381, 432, 288, 01941 288, 289, 289, 220, -90, 909, 838, -551, -91, 81, 01942 -103, 288, -103, 289, 769, 398, 833, 846, 888, 303, 01943 201, 398, 201, 201, -101, 931, -91, 405, 414, 208, 01944 835, 208, 208, 839, 448, 208, 433, 208, 694, 247, 01945 820, 288, 81, 289, 249, 476, 477, 478, 479, -98, 01946 705, 596, 223, 81, 81, 742, 221, 224, 307, 386, 01947 291, 704, -97, 224, 444, 923, 56, 486, 741, 644, 01948 741, 958, 497, 264, -103, 774, 384, 338, 338, 263, 01949 207, 338, 207, -102, 389, -102, 491, 609, 589, 589, 01950 429, -93, -105, 545, 546, -95, -95, 547, 980, 609, 01951 874, 247, 399, -490, 81, 208, 208, 208, 208, 81, 01952 208, 208, -481, -104, 208, -104, 81, 264, -101, 208, 01953 -101, 283, 284, 263, 213, -100, 213, -412, 741, 933, 01954 475, 813, -71, 907, 223, 910, 243, 648, 201, -92, 01955 927, 67, 406, 414, 409, 391, 480, 208, 288, 81, 01956 289, 403, 924, 208, 208, 400, 401, 537, 395, 291, 01957 586, 588, 804, -85, 528, 487, -481, -548, 208, 254, 01958 487, 437, 741, -107, 741, 562, 935, -285, 438, 493, 01959 -95, -480, 394, 485, 455, -549, -412, 396, 494, -94, 01960 793, -551, 548, 957, 790, 402, 208, 208, 987, 426, 01961 -482, 741, 588, 201, 722, 254, 603, -96, 414, -552, 01962 731, -95, 208, -483, -95, 404, -485, 415, -95, 417, 01963 398, 398, 537, 448, 422, 968, -475, 456, 457, 528, 01964 -285, -285, 111, 424, -552, -480, 81, -412, 192, -412, 01965 -412, 644, -484, 193, -478, 81, 451, 217, 537, 657, 01966 440, 190, 400, 427, -482, 201, 528, 438, -486, 220, 01967 414, -487, 264, 448, 208, 578, 580, -483, 263, 647, 01968 -485, -475, 596, 67, 537, 308, -478, -548, -488, -475, 01969 -475, 528, 612, -548, 243, 428, 569, 338, 338, 338, 01970 338, 656, 481, 482, 308, -549, -484, -478, -478, 452, 01971 453, -549, 264, 590, -278, 298, 299, -106, 263, 781, 01972 589, 416, -486, 497, -487, -487, 788, 425, -70, 735, 01973 664, 623, 624, 625, 626, -475, 331, 332, 333, 243, 01974 -478, -488, -488, 918, 434, 338, 338, 431, 669, 920, 01975 570, -555, 722, 556, 614, 668, 676, 557, 681, 551, 01976 555, 667, 721, 675, 81, 201, 81, -278, -278, 673, 01977 414, 687, 687, 445, 208, 588, 254, 201, 563, 720, 01978 446, 447, 414, 436, 537, 699, 208, 442, 81, 208, 01979 465, 528, 676, 676, 656, 656, 537, 726, 732, 713, 01980 715, 243, 450, 528, 469, 673, 673, 727, 398, 669, 01981 -555, 192, 552, 553, 821, -286, 193, 826, 472, -102, 01982 473, 690, 796, 793, 190, 939, 208, 676, 950, -104, 01983 492, 564, 565, 773, 548, 669, -101, 264, 550, 667, 01984 673, 712, 714, 263, 448, 474, 554, 973, 761, 582, 01985 623, 624, 625, 626, 789, 598, 748, 649, 748, 806, 01986 748, -555, 808, -555, -555, 607, 600, -551, -286, -286, 01987 735, 770, 623, 624, 625, 626, 81, 816, 564, 565, 01988 677, 951, 952, 264, 208, 627, 455, 208, 208, 263, 01989 463, 628, 629, 208, 208, 662, 609, 792, 795, 601, 01990 795, -85, 795, 615, 597, -264, 658, 627, 599, 824, 01991 669, 661, 630, 602, 629, 631, 679, 728, 683, 208, 01992 385, 669, 208, 81, 807, 455, 428, 730, 611, 456, 01993 457, 81, 734, 613, 630, 418, 815, 656, 81, 81, 01994 746, 762, -107, 749, 419, 420, 398, 856, -106, 752, 01995 308, 190, 487, 494, 671, 751, 777, 779, 867, 754, 01996 770, 776, 784, 786, -265, 81, 81, 672, 456, 457, 01997 458, 707, 782, -98, 691, 793, -102, 81, 872, -97, 01998 110, 770, 110, 748, 783, 748, 748, 659, 735, -104, 01999 623, 624, 625, 626, 110, 110, 822, 254, 110, 329, 02000 330, 331, 332, 333, 762, 208, -101, -93, 729, 862, 02001 842, 828, 866, 848, 849, 81, 851, 853, 208, 855, 02002 -95, 860, 81, 81, -266, 864, 81, 110, 110, 881, 02003 882, 886, 687, 890, 876, 455, 892, -92, 894, 682, 02004 110, 684, 81, 891, 896, 905, 622, 901, 623, 624, 02005 625, 626, 748, 748, 898, 748, 308, 748, 748, 904, 02006 -267, 110, 110, 929, 903, 110, 938, 930, 941, 308, 02007 263, 321, 322, 949, 858, 943, 932, 946, 456, 457, 02008 460, 959, 914, 627, 321, 322, 81, 961, 263, 628, 02009 629, 795, -551, -552, 455, 983, 606, 81, 364, 347, 02010 455, 338, 977, 825, 338, 329, 330, 331, 332, 333, 02011 630, 382, 940, 631, 802, 326, 327, 328, 329, 330, 02012 331, 332, 333, 976, 748, 748, 748, 383, 748, 748, 02013 750, 811, 753, 277, 376, 928, 632, 456, 457, 462, 02014 81, 906, 81, 456, 457, 466, 765, 834, 81, 0, 02015 81, 771, 748, 748, 748, 748, 735, 0, 623, 624, 02016 625, 626, 0, 0, 201, 0, 0, 756, 757, 414, 02017 758, 681, 795, 208, 0, 110, 44, 45, 0, 528, 02018 0, 0, 0, 537, 0, 748, 748, 748, 748, 669, 02019 528, 0, 0, 736, 0, 110, 0, 110, 110, 748, 02020 338, 110, 0, 110, 0, 812, 0, 748, 110, 0, 02021 0, 0, 0, 817, 818, 308, 0, 0, 0, 110, 02022 110, 0, 868, 0, 869, 0, 0, 823, 0, 0, 02023 321, 322, 0, 0, 877, 0, 0, 0, 829, 879, 02024 831, 832, 837, 0, 735, 840, 623, 624, 625, 626, 02025 0, 0, 841, 0, 0, 850, 0, 852, 854, 0, 02026 0, 0, 0, 328, 329, 330, 331, 332, 333, 0, 02027 110, 110, 110, 110, 110, 110, 110, 110, 0, 0, 02028 110, 736, 110, 0, 0, 110, 0, 737, 0, 843, 02029 863, 623, 624, 625, 626, 921, 922, 870, 871, 0, 02030 0, 873, 203, 203, 0, 0, 203, 0, 0, 0, 02031 0, 878, 0, 110, 0, 110, 0, 883, 0, 110, 02032 110, 0, 0, 884, 893, 895, 0, 897, 889, 899, 02033 900, 0, 236, 239, 110, 0, 0, 203, 203, 0, 02034 0, 0, 0, 0, 908, 0, 911, 0, 286, 287, 02035 0, 735, 956, 623, 624, 625, 626, 0, 0, 0, 02036 0, 919, 110, 110, 293, 294, 295, 296, 297, 0, 02037 0, 0, 0, 0, 0, 0, 0, 0, 110, 0, 02038 978, 0, 979, 0, 0, 934, 0, 936, 736, 0, 02039 0, 937, 0, 0, 887, 0, 942, 944, 945, 0, 02040 947, 948, 110, 622, 0, 623, 624, 625, 626, 0, 02041 0, 110, 0, 0, 0, 953, 0, 954, 0, 0, 02042 0, 0, 0, 955, 960, 962, 963, 964, 0, 0, 02043 110, 0, 0, 0, 967, 0, 969, 0, 0, 970, 02044 627, 0, 0, 0, 0, 0, 628, 629, 0, 0, 02045 0, 0, 0, 0, 981, 0, 0, 982, 984, 985, 02046 986, 0, 0, 0, 0, 0, 0, 630, 0, 0, 02047 631, 988, 0, 0, 0, 0, 989, 0, 0, 990, 02048 0, 203, 0, 0, 203, 203, 286, 0, 0, 0, 02049 105, 0, 105, 708, 0, 622, 0, 623, 624, 625, 02050 626, 0, 0, 203, 0, 203, 203, 0, 0, 0, 02051 0, 108, 0, 108, 0, 0, 0, 0, 0, 0, 02052 110, 0, 110, 761, 0, 623, 624, 625, 626, 0, 02053 110, 0, 627, 0, 0, 0, 0, 105, 628, 629, 02054 0, 265, 110, 0, 110, 110, 0, 0, 0, 0, 02055 0, 0, 0, 0, 0, 0, 0, 0, 108, 630, 02056 627, 0, 631, 0, 265, 0, 628, 629, 0, 0, 02057 0, 0, 0, 0, 0, 0, 351, 361, 361, 361, 02058 0, 0, 110, 0, 0, 0, 0, 630, 203, 0, 02059 631, 0, 0, 496, 499, 500, 501, 502, 503, 504, 02060 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 02061 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 02062 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 02063 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 02064 110, 0, 0, 110, 110, 0, 0, 0, 0, 110, 02065 110, 0, 308, 309, 310, 311, 312, 313, 314, 315, 02066 316, 317, 318, -574, -574, 0, 0, 321, 322, 0, 02067 579, 581, 0, 0, 0, 110, 0, 0, 110, 110, 02068 585, 203, 203, 0, 0, 105, 203, 110, 579, 581, 02069 203, 0, 0, 0, 110, 110, 324, 325, 326, 327, 02070 328, 329, 330, 331, 332, 333, 108, 0, 0, 605, 02071 0, 0, 0, 0, 610, 0, 0, 0, 105, 0, 02072 0, 110, 110, 203, 0, 0, 203, 0, 0, 105, 02073 105, 0, 0, 110, 0, 0, 0, 0, 203, 108, 02074 0, 0, 0, 0, 0, 0, 0, 0, 0, 265, 02075 108, 108, 0, 0, 0, 0, 0, 0, 650, 651, 02076 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 02077 203, 110, 0, 0, 110, 0, 0, 0, 110, 110, 02078 105, 0, 110, 0, 0, 105, 0, 0, 0, 0, 02079 0, 0, 105, 265, 0, 0, 0, 109, 110, 109, 02080 0, 108, 0, 0, 0, 0, 108, 0, 0, 0, 02081 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02082 0, 0, 0, 0, 0, 105, 0, 106, 0, 106, 02083 0, 0, 0, 0, 203, 0, 0, 0, 203, 0, 02084 0, 0, 110, 0, 109, 78, 108, 78, 267, 0, 02085 203, 0, 0, 110, 0, 0, 0, 0, 0, 0, 02086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02087 0, 267, 0, 203, 106, 0, 0, 0, 266, 0, 02088 0, 0, 0, 353, 363, 363, 203, 203, 0, 0, 02089 0, 0, 78, 0, 0, 0, 110, 0, 110, 0, 02090 0, 266, 0, 0, 110, 0, 110, 0, 0, 0, 02091 0, 0, 105, 352, 362, 362, 362, 0, 0, 0, 02092 0, 105, 0, 0, 0, 0, 0, 0, 0, 110, 02093 0, 348, 0, 108, 0, 0, 0, 0, 265, 0, 02094 0, 0, 108, 0, 203, 0, 0, 0, 585, 775, 02095 0, 778, 780, 0, 0, 0, 0, 785, 787, -573, 02096 0, 0, 0, 0, 0, 203, 0, -573, -573, -573, 02097 0, 0, -573, -573, -573, 0, -573, 0, 265, 0, 02098 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02099 0, 0, 109, 0, 0, 0, -573, -573, 0, -573, 02100 -573, -573, -573, -573, 819, 0, 0, 0, 0, 778, 02101 780, 0, 785, 787, 0, 0, 0, 0, 0, 0, 02102 203, 0, 106, 0, 0, 109, 0, 0, 0, 0, 02103 105, 0, 105, 0, 0, 0, 109, 109, 0, 0, 02104 78, 0, 0, 0, -573, 0, 0, 0, 0, 0, 02105 0, 108, 0, 108, 105, 106, 267, 0, 203, 0, 02106 0, 0, 857, 0, 0, 0, 106, 106, 0, 859, 02107 0, 0, 0, 78, 0, 108, 0, 0, 0, 0, 02108 0, 0, 0, 0, 78, 78, 266, 109, 0, 203, 02109 0, 0, 109, 0, 0, 0, -573, 0, -573, 109, 02110 267, 220, -573, 265, -573, 0, -573, 859, 203, 0, 02111 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 02112 0, 0, 106, 0, 0, 0, 0, 0, 0, 106, 02113 266, 0, 109, 0, 0, 78, 0, 0, 0, 0, 02114 78, 0, 105, 0, 0, 0, 0, 78, 0, 265, 02115 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02116 0, 0, 106, 108, 0, 0, 0, 0, 0, 0, 02117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02118 78, 0, 0, 0, 0, 0, 0, 0, 0, 105, 02119 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 02120 0, 0, 0, 0, 105, 105, 0, 0, 0, 0, 02121 108, 0, 0, 0, 0, 0, 0, 0, 108, 109, 02122 0, 0, 0, 0, 0, 108, 108, 0, 109, 0, 02123 0, 105, 105, 0, 0, 0, 0, 203, 0, 0, 02124 0, 0, 0, 105, 0, 267, 0, 0, 0, 106, 02125 0, 0, 108, 108, 0, 0, 0, 0, 106, 0, 02126 0, 0, 0, 0, 108, 0, 0, 78, 0, 0, 02127 0, 0, 0, 0, 0, 266, 78, 0, 0, 0, 02128 0, 105, 0, 0, 0, 267, 0, 0, 105, 105, 02129 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02130 0, 0, 108, 0, 0, 0, 0, 0, 105, 108, 02131 108, 0, 0, 108, 0, 266, 0, 0, 0, 0, 02132 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 02133 361, 0, 0, 0, 0, 0, 0, 109, 0, 109, 02134 0, 0, 0, 0, 0, 0, 0, 0, 915, 0, 02135 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 02136 0, 109, 0, 105, 0, 0, 0, 106, 0, 106, 02137 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 02138 0, 0, 0, 0, 108, 78, 0, 78, 0, 0, 02139 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 02140 0, 0, 0, 0, 0, 0, 105, 0, 105, 78, 02141 267, 0, 0, 0, 105, 0, 105, 0, 0, 0, 02142 0, 0, 0, 0, 0, 0, 0, 108, 0, 108, 02143 0, 0, 0, 0, 0, 108, 0, 108, 0, 0, 02144 266, 760, 0, 0, 0, 0, 0, 0, 0, 109, 02145 0, 0, 0, 0, 0, 0, 267, 0, 0, 0, 02146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02147 0, 0, 308, -574, -574, -574, -574, 313, 314, 106, 02148 0, -574, -574, 0, 0, 0, 266, 321, 322, 0, 02149 0, 0, 0, 0, 0, 0, 109, 78, 0, 0, 02150 0, 0, 0, 0, 109, 495, 0, 0, 0, 0, 02151 0, 109, 109, 0, 0, 0, 324, 325, 326, 327, 02152 328, 329, 330, 331, 332, 333, 106, 0, 0, 0, 02153 0, 0, 0, 0, 106, 0, 0, 0, 109, 109, 02154 0, 106, 106, 0, 78, 0, 0, 0, 0, 0, 02155 109, 0, 78, 0, 0, 0, 0, 0, 0, 78, 02156 78, 308, 309, 310, 311, 312, 313, 314, 106, 106, 02157 317, 318, 0, 0, 0, 0, 321, 322, 0, 0, 02158 106, 0, 0, 0, 0, 0, 78, 78, 109, 0, 02159 0, 0, 0, 0, 0, 109, 109, 0, 78, 109, 02160 0, 0, 0, 0, 0, 324, 325, 326, 327, 328, 02161 329, 330, 331, 332, 333, 109, 0, 0, 106, 0, 02162 0, 0, 0, 0, 0, 106, 106, 0, 0, 106, 02163 0, 0, 0, 0, 0, 0, 78, 363, 0, 0, 02164 0, 0, 0, 78, 78, 106, 0, 78, 0, 0, 02165 0, 0, 0, 0, 0, 917, 0, 0, 0, 109, 02166 0, 0, 0, 78, 0, 0, 0, 362, 0, 0, 02167 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02168 0, 0, 0, 0, 0, 916, 0, 0, 0, 106, 02169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02170 106, 0, 0, 913, 0, 0, 0, 78, 0, 0, 02171 0, 0, 0, 109, 0, 109, 0, 0, 78, 0, 02172 0, 109, 0, 109, 0, 0, 0, 0, 0, 0, 02173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02174 0, 0, 0, 106, 0, 106, 0, 0, 0, 0, 02175 0, 106, 0, 106, 0, 0, 0, 0, 0, 0, 02176 0, 78, 0, 78, 0, 0, 0, 0, 0, 78, 02177 0, 78, -573, 4, 0, 5, 6, 7, 8, 9, 02178 0, 0, 0, 10, 11, 0, 0, 0, 12, 0, 02179 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02180 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02181 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02182 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02183 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02185 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02186 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02187 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02189 0, 0, 0, -285, 61, 62, 63, 0, 0, 0, 02190 0, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02191 -285, 0, 0, 0, 0, 0, 0, -573, 0, -573, 02192 -285, -285, -285, 0, 0, 0, 0, 0, 0, 0, 02193 -285, -285, 0, -285, -285, -285, -285, -285, 0, 0, 02194 0, 0, 0, 0, 308, 309, 310, 311, 312, 313, 02195 314, 315, 316, 317, 318, 319, 320, 0, 0, 321, 02196 322, -285, -285, -285, -285, -285, -285, -285, -285, -285, 02197 -285, -285, -285, -285, 0, 0, -285, -285, -285, 0, 02198 724, -285, 0, 0, 0, 0, 323, -285, 324, 325, 02199 326, 327, 328, 329, 330, 331, 332, 333, 0, 0, 02200 -285, 0, -105, -285, -285, -285, -285, -285, -285, -285, 02201 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 02202 0, 0, 0, 224, 0, 0, 0, 0, 0, 0, 02203 -285, -285, -285, -285, -411, 0, -285, -285, -285, 0, 02204 -285, 0, -411, -411, -411, 0, 0, -411, -411, -411, 02205 0, -411, 0, 0, 0, 0, 0, 0, 0, 0, 02206 -411, -411, -411, 0, 0, 0, 0, 0, 0, 0, 02207 0, -411, -411, 0, -411, -411, -411, -411, -411, 0, 02208 0, 0, 0, 0, 0, 308, 309, 310, 311, 312, 02209 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 02210 321, 322, -411, -411, -411, -411, -411, -411, -411, -411, 02211 -411, -411, -411, -411, -411, 0, 0, -411, -411, -411, 02212 0, 0, -411, 0, 0, 0, 0, 323, -411, 324, 02213 325, 326, 327, 328, 329, 330, 331, 332, 333, 0, 02214 0, 0, 0, 0, -411, 0, -411, -411, -411, -411, 02215 -411, -411, -411, -411, -411, -411, 0, 0, 0, 0, 02216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02217 -411, -411, -411, -411, -411, -279, 220, -411, -411, -411, 02218 0, -411, 0, -279, -279, -279, 0, 0, -279, -279, 02219 -279, 0, -279, 0, 0, 0, 0, 0, 0, 0, 02220 0, 0, -279, -279, -279, 0, 0, 0, 0, 0, 02221 0, 0, -279, -279, 0, -279, -279, -279, -279, -279, 02222 0, 0, 0, 0, 0, 0, 308, 309, 310, 311, 02223 312, 313, 314, 315, 0, 317, 318, 0, 0, 0, 02224 0, 321, 322, -279, -279, -279, -279, -279, -279, -279, 02225 -279, -279, -279, -279, -279, -279, 0, 0, -279, -279, 02226 -279, 0, 0, -279, 0, 0, 0, 0, 0, -279, 02227 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 02228 0, 0, -279, 0, 0, -279, -279, -279, -279, -279, 02229 -279, -279, -279, -279, -279, -279, -279, 0, 0, 0, 02230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02231 0, 0, -279, -279, -279, -279, -573, 0, -279, -279, 02232 -279, 0, -279, 0, -573, -573, -573, 0, 0, -573, 02233 -573, -573, 0, -573, 0, 0, 0, 0, 0, 0, 02234 0, 0, -573, -573, -573, 0, 0, 0, 0, 0, 02235 0, 0, 0, -573, -573, 0, -573, -573, -573, -573, 02236 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02238 0, 0, 0, 0, -573, -573, -573, -573, -573, -573, 02239 -573, -573, -573, -573, -573, -573, -573, 0, 0, -573, 02240 -573, -573, 0, 0, -573, 0, 0, 0, 0, 0, 02241 -573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02242 0, 0, 0, 0, 0, 0, -573, 0, -573, -573, 02243 -573, -573, -573, -573, -573, -573, -573, -573, 0, 0, 02244 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02245 0, 0, -573, -573, -573, -573, -573, -292, 220, -573, 02246 -573, -573, 0, -573, 0, -292, -292, -292, 0, 0, 02247 -292, -292, -292, 0, -292, 0, 0, 0, 0, 0, 02248 0, 0, 0, 0, -292, -292, 0, 0, 0, 0, 02249 0, 0, 0, 0, -292, -292, 0, -292, -292, -292, 02250 -292, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02252 0, 0, 0, 0, 0, -292, -292, -292, -292, -292, 02253 -292, -292, -292, -292, -292, -292, -292, -292, 0, 0, 02254 -292, -292, -292, 0, 0, -292, 0, 0, 0, 0, 02255 0, -292, 0, 0, 0, 0, 0, 0, 0, 0, 02256 0, 0, 0, 0, 0, 0, 0, -292, 0, -292, 02257 -292, -292, -292, -292, -292, -292, -292, -292, -292, 0, 02258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02259 0, 0, 0, 0, -292, -292, -292, -292, -555, 217, 02260 -292, -292, -292, 0, -292, 0, -555, -555, -555, 0, 02261 0, 0, -555, -555, 0, -555, 0, 0, 0, 0, 02262 0, 0, 0, 0, -555, 0, 0, 0, 0, 0, 02263 0, 0, 0, 0, 0, -555, -555, 0, -555, -555, 02264 -555, -555, -555, 0, 0, 0, 0, 0, 0, 0, 02265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02266 0, 0, 0, 0, 0, 0, -555, -555, -555, -555, 02267 -555, -555, -555, -555, -555, -555, -555, -555, -555, 0, 02268 0, -555, -555, -555, -285, 665, 0, 0, 0, 0, 02269 0, 0, -285, -285, -285, 0, 0, 0, -285, -285, 02270 0, -285, 0, 0, 0, 0, 0, -103, -555, 0, 02271 -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, 02272 0, -285, -285, 0, -285, -285, -285, -285, -285, 0, 02273 0, 0, 0, 0, -555, -555, -555, -555, -94, 0, 02274 0, -555, 0, -555, 0, -555, 0, 0, 0, 0, 02275 0, 0, -285, -285, -285, -285, -285, -285, -285, -285, 02276 -285, -285, -285, -285, -285, 0, 0, -285, -285, -285, 02277 0, 666, 0, 0, 0, 0, 0, 0, 0, 0, 02278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02279 0, 0, 0, -105, -285, 0, -285, -285, -285, -285, 02280 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 02281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02282 0, -285, -285, -285, -96, 0, 0, -285, 0, -285, 02283 241, -285, 5, 6, 7, 8, 9, -573, -573, -573, 02284 10, 11, 0, 0, -573, 12, 0, 13, 14, 15, 02285 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02286 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02287 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02288 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02289 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02291 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02292 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02293 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02295 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02297 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02298 8, 9, 0, 0, -573, 10, 11, 0, -573, -573, 02299 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02300 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02301 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02302 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02303 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02304 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02305 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02306 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02307 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02308 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02309 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02311 0, 0, 0, 0, 0, 0, 0, 0, 0, -573, 02312 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02313 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02314 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02315 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02316 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02317 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02318 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02320 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02321 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02322 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02323 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02324 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02325 4, 0, 5, 6, 7, 8, 9, 0, 0, 0, 02326 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02327 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02328 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02329 0, 0, 0, 0, 28, 29, 30, 31, 32, 33, 02330 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02331 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02333 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02334 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02335 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02336 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02337 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02338 0, 0, 0, 0, 0, 0, -573, 0, 0, 0, 02339 0, 0, 0, 0, -573, 241, -573, 5, 6, 7, 02340 8, 9, 0, 0, -573, 10, 11, 0, 0, -573, 02341 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02342 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02343 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02344 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02345 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02346 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02348 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02349 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02351 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02352 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02353 8, 9, 0, -573, -573, 10, 11, 0, 0, -573, 02354 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02355 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02356 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02357 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02358 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02359 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02361 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02362 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02364 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02365 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02366 8, 9, 0, 0, 0, 10, 11, 0, 0, -573, 02367 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02368 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02369 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02370 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02371 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02372 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02373 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02374 48, 0, 0, 242, 50, 0, 51, 52, 0, 53, 02375 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02376 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02377 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02378 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02379 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02380 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02381 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02382 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02383 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02384 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02385 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02387 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02388 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02390 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02391 0, 0, 0, 0, 0, 241, 0, 5, 6, 7, 02392 8, 9, 0, 0, 0, 10, 11, -573, 0, -573, 02393 12, -573, 13, 14, 15, 16, 17, 18, 19, 0, 02394 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02395 26, 0, 0, 27, 0, 0, 0, 0, 0, 28, 02396 29, 0, 31, 32, 33, 34, 35, 36, 37, 38, 02397 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02398 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02400 48, 0, 0, 49, 50, 0, 51, 52, 0, 53, 02401 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02403 0, 0, 0, 0, 0, 0, 61, 62, 63, 0, 02404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02405 0, -573, 0, 0, 0, 0, 0, 0, 0, -573, 02406 241, -573, 5, 6, 7, 8, 9, 0, 0, -573, 02407 10, 11, 0, 0, 0, 12, 0, 13, 14, 15, 02408 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02409 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 02410 0, 0, 0, 0, 28, 29, 0, 31, 32, 33, 02411 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02412 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02414 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 02415 0, 51, 52, 0, 53, 0, 54, 55, 56, 57, 02416 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02418 0, 61, 62, 63, 0, 0, 0, 0, 0, 0, 02419 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02420 10, 11, 0, 0, -573, 12, -573, 13, 14, 15, 02421 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 02422 21, 22, 23, 24, 25, 26, 0, 0, 194, 0, 02423 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02424 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02425 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02427 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02428 0, 51, 52, 0, 198, 199, 54, 55, 56, 57, 02429 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02430 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02431 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02432 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02433 22, 23, 24, 25, 26, 0, 224, 27, 0, 0, 02434 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02435 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02436 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02437 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02438 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02439 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02440 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02442 61, 62, 63, 0, 0, 0, 0, 0, 0, 0, 02443 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02444 11, 0, 0, 288, 12, 289, 13, 14, 15, 16, 02445 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02446 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02447 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02448 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02449 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02451 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02452 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02453 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02454 5, 6, 7, 8, 9, 0, 0, 0, 10, 11, 02455 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02456 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02457 23, 24, 25, 26, 0, 224, 27, 0, 0, 0, 02458 0, 0, 28, 29, 30, 31, 32, 33, 34, 35, 02459 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02460 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02462 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 02463 52, 0, 53, 0, 54, 55, 56, 57, 58, 59, 02464 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02465 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 02466 62, 63, 0, 0, 0, 0, 0, 0, 5, 6, 02467 7, 8, 9, 0, 0, 0, 10, 11, 0, 0, 02468 0, 12, 474, 13, 14, 15, 16, 17, 18, 19, 02469 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 02470 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 02471 28, 29, 0, 31, 32, 33, 34, 35, 36, 37, 02472 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 02473 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02475 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 02476 53, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02478 0, 0, 0, 0, 0, 0, 0, 61, 62, 63, 02479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02480 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02481 474, 113, 114, 115, 116, 117, 118, 119, 120, 121, 02482 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 02483 132, 133, 134, 135, 136, 0, 0, 0, 137, 138, 02484 139, 365, 366, 367, 368, 144, 145, 146, 0, 0, 02485 0, 0, 0, 147, 148, 149, 150, 369, 370, 371, 02486 372, 155, 37, 38, 373, 40, 0, 0, 0, 0, 02487 0, 0, 0, 0, 157, 158, 159, 160, 161, 162, 02488 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02489 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02490 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02491 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02492 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02493 0, 183, 184, 0, 0, 0, 0, 0, -548, -548, 02494 -548, 0, -548, 0, 0, 0, -548, -548, 0, 185, 02495 374, -548, 0, -548, -548, -548, -548, -548, -548, -548, 02496 0, -548, 0, 0, 0, -548, -548, -548, -548, -548, 02497 -548, -548, 0, 0, -548, 0, 0, 0, 0, 0, 02498 0, -548, 0, 0, -548, -548, -548, -548, -548, -548, 02499 -548, -548, -548, -548, -548, -548, 0, -548, -548, -548, 02500 0, -548, -548, 0, 0, 0, 0, 0, 0, 0, 02501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02502 0, -548, 0, 0, -548, -548, 0, -548, -548, 0, 02503 -548, -548, -548, -548, -548, -548, -548, -548, -548, 0, 02504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02505 0, 0, 0, 0, 0, 0, 0, -548, -548, -548, 02506 0, 0, 0, 0, 0, -549, -549, -549, 0, -549, 02507 0, -548, 0, -549, -549, 0, 0, -548, -549, 0, 02508 -549, -549, -549, -549, -549, -549, -549, 0, -549, 0, 02509 0, 0, -549, -549, -549, -549, -549, -549, -549, 0, 02510 0, -549, 0, 0, 0, 0, 0, 0, -549, 0, 02511 0, -549, -549, -549, -549, -549, -549, -549, -549, -549, 02512 -549, -549, -549, 0, -549, -549, -549, 0, -549, -549, 02513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02514 0, 0, 0, 0, 0, 0, 0, 0, -549, 0, 02515 0, -549, -549, 0, -549, -549, 0, -549, -549, -549, 02516 -549, -549, -549, -549, -549, -549, 0, 0, 0, 0, 02517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02518 0, 0, 0, 0, -549, -549, -549, 0, 0, 0, 02519 0, 0, -551, -551, -551, 0, -551, 0, -549, 0, 02520 -551, -551, 0, 0, -549, -551, 0, -551, -551, -551, 02521 -551, -551, -551, -551, 0, 0, 0, 0, 0, -551, 02522 -551, -551, -551, -551, -551, -551, 0, 0, -551, 0, 02523 0, 0, 0, 0, 0, -551, 0, 0, -551, -551, 02524 -551, -551, -551, -551, -551, -551, -551, -551, -551, -551, 02525 0, -551, -551, -551, 0, -551, -551, 0, 0, 0, 02526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02527 0, 0, 0, 0, 0, -551, 723, 0, -551, -551, 02528 0, -551, -551, 0, -551, -551, -551, -551, -551, -551, 02529 -551, -551, -551, 0, 0, 0, 0, 0, -103, 0, 02530 0, 0, 0, 0, 0, 0, -553, -553, -553, 0, 02531 -553, -551, -551, -551, -553, -553, 0, 0, 0, -553, 02532 0, -553, -553, -553, -553, -553, -553, -553, 0, 0, 02533 0, -551, 0, -553, -553, -553, -553, -553, -553, -553, 02534 0, 0, -553, 0, 0, 0, 0, 0, 0, -553, 02535 0, 0, -553, -553, -553, -553, -553, -553, -553, -553, 02536 -553, -553, -553, -553, 0, -553, -553, -553, 0, -553, 02537 -553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02538 0, 0, 0, 0, 0, 0, 0, 0, 0, -553, 02539 0, 0, -553, -553, 0, -553, -553, 0, -553, -553, 02540 -553, -553, -553, -553, -553, -553, -553, 0, 0, 0, 02541 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02542 -554, -554, -554, 0, -554, -553, -553, -553, -554, -554, 02543 0, 0, 0, -554, 0, -554, -554, -554, -554, -554, 02544 -554, -554, 0, 0, 0, -553, 0, -554, -554, -554, 02545 -554, -554, -554, -554, 0, 0, -554, 0, 0, 0, 02546 0, 0, 0, -554, 0, 0, -554, -554, -554, -554, 02547 -554, -554, -554, -554, -554, -554, -554, -554, 0, -554, 02548 -554, -554, 0, -554, -554, 0, 0, 0, 0, 0, 02549 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02550 0, 0, 0, -554, 0, 0, -554, -554, 0, -554, 02551 -554, 0, -554, -554, -554, -554, -554, -554, -554, -554, 02552 -554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02553 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02554 -554, -554, 0, 0, 0, 0, 0, 0, 0, 0, 02555 0, 0, 0, 0, 0, 0, 0, 0, 0, -554, 02556 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 02557 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 02558 133, 134, 135, 136, 0, 0, 0, 137, 138, 139, 02559 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 02560 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, 02561 155, 270, 271, 156, 272, 0, 0, 0, 0, 0, 02562 0, 0, 0, 157, 158, 159, 160, 161, 162, 163, 02563 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 02564 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 02565 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 02566 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 02567 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 02568 183, 184, 0, 0, 0, 0, 0, 0, 0, 0, 02569 0, 0, 0, 0, 0, 0, 0, 0, 185, 113, 02570 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 02571 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 02572 134, 135, 136, 0, 0, 0, 137, 138, 139, 140, 02573 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 02574 0, 147, 148, 149, 150, 151, 152, 153, 154, 155, 02575 226, 0, 156, 0, 0, 0, 0, 0, 0, 0, 02576 0, 0, 157, 158, 159, 160, 161, 162, 163, 164, 02577 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 02578 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02579 0, 172, 0, 0, 55, 0, 0, 0, 0, 0, 02580 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 02581 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 02582 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02583 0, 0, 0, 0, 0, 0, 0, 185, 113, 114, 02584 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 02585 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 02586 135, 136, 0, 0, 0, 137, 138, 139, 140, 141, 02587 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 02588 147, 148, 149, 150, 151, 152, 153, 154, 155, 0, 02589 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 02590 0, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02591 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02593 172, 0, 0, 55, 0, 0, 0, 0, 0, 0, 02594 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02595 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02597 0, 0, 0, 0, 0, 0, 185, 113, 114, 115, 02598 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 02599 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 02600 136, 0, 0, 0, 137, 138, 139, 140, 141, 142, 02601 143, 144, 145, 146, 0, 0, 0, 0, 0, 147, 02602 148, 149, 150, 151, 152, 153, 154, 155, 0, 0, 02603 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02604 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 02605 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 02606 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 02607 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02608 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 02609 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 02610 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02611 11, 0, 0, 0, 12, 185, 13, 14, 15, 231, 02612 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02613 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02614 0, 0, 0, 0, 258, 0, 0, 32, 33, 34, 02615 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02616 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 02617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02618 0, 0, 0, 0, 259, 0, 0, 197, 50, 0, 02619 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02620 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02621 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02622 260, 10, 11, 0, 0, 0, 12, 0, 13, 14, 02623 15, 231, 232, 18, 19, 0, 0, 0, 261, 0, 02624 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02625 0, 0, 0, 0, 0, 0, 258, 0, 0, 32, 02626 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02627 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 02628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02629 0, 0, 0, 0, 0, 0, 259, 0, 0, 197, 02630 50, 0, 51, 52, 0, 0, 0, 54, 55, 56, 02631 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02632 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 02633 0, 0, 260, 10, 11, 0, 0, 0, 12, 0, 02634 13, 14, 15, 16, 17, 18, 19, 0, 0, 0, 02635 490, 0, 20, 21, 22, 23, 24, 25, 26, 0, 02636 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 02637 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02638 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02640 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 02641 0, 49, 50, 0, 51, 52, 0, 53, 0, 54, 02642 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02643 0, 0, 0, 0, 5, 6, 7, 8, 9, 0, 02644 0, 0, 10, 11, 61, 62, 63, 12, 0, 13, 02645 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 02646 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 02647 27, 0, 0, 0, 0, 0, 28, 29, 0, 31, 02648 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02649 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02651 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 02652 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02653 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02654 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02655 0, 10, 11, 61, 62, 63, 12, 0, 13, 14, 02656 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 02657 20, 21, 22, 23, 24, 25, 26, 0, 0, 194, 02658 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02659 33, 34, 35, 36, 37, 38, 39, 40, 195, 41, 02660 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02662 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02663 50, 0, 51, 52, 0, 198, 199, 54, 55, 56, 02664 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02665 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02666 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02667 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02668 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02669 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02670 34, 35, 36, 37, 38, 39, 40, 195, 41, 42, 02671 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02673 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02674 0, 51, 52, 0, 587, 199, 54, 55, 56, 57, 02675 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02676 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02677 11, 61, 200, 63, 12, 0, 13, 14, 15, 231, 02678 232, 18, 19, 0, 0, 0, 0, 0, 233, 234, 02679 235, 23, 24, 25, 26, 0, 0, 194, 0, 0, 02680 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02681 35, 36, 37, 38, 39, 40, 195, 41, 42, 0, 02682 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02683 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02684 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02685 51, 52, 0, 198, 0, 54, 55, 56, 57, 58, 02686 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02687 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02688 61, 200, 63, 12, 0, 13, 14, 15, 231, 232, 02689 18, 19, 0, 0, 0, 0, 0, 233, 234, 235, 02690 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02691 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02692 36, 37, 38, 39, 40, 195, 41, 42, 0, 43, 02693 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02695 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02696 52, 0, 0, 199, 54, 55, 56, 57, 58, 59, 02697 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02698 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02699 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02700 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02701 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02702 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 02703 37, 38, 39, 40, 195, 41, 42, 0, 43, 44, 02704 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 02705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02706 0, 0, 196, 0, 0, 197, 50, 0, 51, 52, 02707 0, 587, 0, 54, 55, 56, 57, 58, 59, 60, 02708 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 02709 7, 0, 9, 0, 0, 0, 10, 11, 61, 200, 02710 63, 12, 0, 13, 14, 15, 231, 232, 18, 19, 02711 0, 0, 0, 0, 0, 233, 234, 235, 23, 24, 02712 25, 26, 0, 0, 194, 0, 0, 0, 0, 0, 02713 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 02714 38, 39, 40, 195, 41, 42, 0, 43, 44, 45, 02715 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 02716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02717 0, 196, 0, 0, 197, 50, 0, 51, 52, 0, 02718 0, 0, 54, 55, 56, 57, 58, 59, 60, 0, 02719 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 02720 0, 9, 0, 0, 0, 10, 11, 61, 200, 63, 02721 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 02722 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 02723 26, 0, 0, 194, 0, 0, 0, 0, 0, 0, 02724 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 02725 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 02726 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 02727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02728 196, 0, 0, 197, 50, 0, 51, 52, 0, 484, 02729 0, 54, 55, 56, 57, 58, 59, 60, 0, 0, 02730 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 02731 9, 0, 0, 0, 10, 11, 61, 200, 63, 12, 02732 0, 13, 14, 15, 231, 232, 18, 19, 0, 0, 02733 0, 0, 0, 233, 234, 235, 23, 24, 25, 26, 02734 0, 0, 194, 0, 0, 0, 0, 0, 0, 29, 02735 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 02736 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 02737 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02738 0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 02739 0, 0, 197, 50, 0, 51, 52, 0, 198, 0, 02740 54, 55, 56, 57, 58, 59, 60, 0, 0, 0, 02741 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 02742 0, 0, 0, 10, 11, 61, 200, 63, 12, 0, 02743 13, 14, 15, 231, 232, 18, 19, 0, 0, 0, 02744 0, 0, 233, 234, 235, 23, 24, 25, 26, 0, 02745 0, 194, 0, 0, 0, 0, 0, 0, 29, 0, 02746 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 02747 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 02748 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02749 0, 0, 0, 0, 0, 0, 0, 0, 196, 0, 02750 0, 197, 50, 0, 51, 52, 0, 772, 0, 54, 02751 55, 56, 57, 58, 59, 60, 0, 0, 0, 0, 02752 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02753 0, 0, 10, 11, 61, 200, 63, 12, 0, 13, 02754 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02755 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02756 194, 0, 0, 0, 0, 0, 0, 29, 0, 0, 02757 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02758 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 02759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02760 0, 0, 0, 0, 0, 0, 0, 196, 0, 0, 02761 197, 50, 0, 51, 52, 0, 484, 0, 54, 55, 02762 56, 57, 58, 59, 60, 0, 0, 0, 0, 0, 02763 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 02764 0, 10, 11, 61, 200, 63, 12, 0, 13, 14, 02765 15, 231, 232, 18, 19, 0, 0, 0, 0, 0, 02766 233, 234, 235, 23, 24, 25, 26, 0, 0, 194, 02767 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 02768 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 02769 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 02770 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02771 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, 02772 50, 0, 51, 52, 0, 587, 0, 54, 55, 56, 02773 57, 58, 59, 60, 0, 0, 0, 0, 0, 0, 02774 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 02775 10, 11, 61, 200, 63, 12, 0, 13, 14, 15, 02776 231, 232, 18, 19, 0, 0, 0, 0, 0, 233, 02777 234, 235, 23, 24, 25, 26, 0, 0, 194, 0, 02778 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 02779 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 02780 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 02781 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02782 0, 0, 0, 0, 0, 196, 0, 0, 197, 50, 02783 0, 51, 52, 0, 0, 0, 54, 55, 56, 57, 02784 58, 59, 60, 0, 0, 0, 0, 0, 0, 0, 02785 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 02786 11, 61, 200, 63, 12, 0, 13, 14, 15, 16, 02787 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 02788 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 02789 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 02790 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 02791 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 02792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02793 0, 0, 0, 0, 196, 0, 0, 197, 50, 0, 02794 51, 52, 0, 0, 0, 54, 55, 56, 57, 58, 02795 59, 60, 0, 0, 0, 0, 0, 0, 0, 0, 02796 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 02797 61, 62, 63, 12, 0, 13, 14, 15, 16, 17, 02798 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 02799 23, 24, 25, 26, 0, 0, 194, 0, 0, 0, 02800 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 02801 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 02802 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 02803 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02804 0, 0, 0, 196, 0, 0, 197, 50, 0, 51, 02805 52, 0, 0, 0, 54, 55, 56, 57, 58, 59, 02806 60, 0, 0, 0, 0, 0, 0, 0, 0, 5, 02807 6, 7, 0, 9, 0, 0, 0, 10, 11, 61, 02808 200, 63, 12, 0, 13, 14, 15, 231, 232, 18, 02809 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02810 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02811 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02812 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02813 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02814 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02815 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02816 0, 305, 0, 54, 55, 56, 57, 58, 59, 60, 02817 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02818 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02819 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02820 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02821 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02822 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02823 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02825 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 02826 49, 50, 0, 51, 52, 0, 53, 0, 54, 55, 02827 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02828 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02829 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02830 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02831 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02832 0, 0, 258, 0, 0, 32, 33, 34, 354, 36, 02833 37, 38, 355, 40, 0, 41, 42, 0, 43, 44, 02834 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02835 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 02836 0, 0, 357, 0, 0, 197, 50, 0, 51, 52, 02837 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02838 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02839 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02840 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02841 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02842 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02843 32, 33, 34, 354, 36, 37, 38, 355, 40, 0, 02844 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02846 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 02847 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02848 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02849 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02850 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02851 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02852 24, 25, 26, 0, 0, 194, 0, 0, 0, 0, 02853 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02854 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02855 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02857 0, 0, 259, 0, 0, 304, 50, 0, 51, 52, 02858 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02859 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 02860 0, 0, 10, 11, 0, 0, 0, 12, 260, 13, 02861 14, 15, 231, 232, 18, 19, 0, 0, 0, 0, 02862 0, 233, 234, 235, 23, 24, 25, 26, 0, 0, 02863 194, 0, 0, 0, 0, 0, 0, 258, 0, 0, 02864 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 02865 41, 42, 0, 43, 44, 45, 0, 0, 0, 0, 02866 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02867 0, 0, 0, 0, 0, 0, 0, 902, 0, 0, 02868 197, 50, 0, 51, 52, 0, 0, 0, 54, 55, 02869 56, 57, 58, 59, 60, 0, 0, 0, 0, 5, 02870 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 02871 0, 0, 12, 260, 13, 14, 15, 231, 232, 18, 02872 19, 0, 0, 0, 0, 0, 233, 234, 235, 23, 02873 24, 25, 26, 0, 0, 194, 0, 663, 0, 0, 02874 0, 0, 258, 0, 0, 32, 33, 34, 35, 36, 02875 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 02876 45, 308, 309, 310, 311, 312, 313, 314, 315, 316, 02877 317, 318, 319, 320, 0, 0, 321, 322, 0, 0, 02878 0, 0, 912, 0, 0, 197, 50, 0, 51, 52, 02879 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 02880 0, 0, 0, 323, 0, 324, 325, 326, 327, 328, 02881 329, 330, 331, 332, 333, 0, 0, 0, 260, 0, 02882 525, 526, 0, 0, 527, 0, 0, 0, 0, 0, 02883 0, 0, 0, -241, 157, 158, 159, 160, 161, 162, 02884 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02885 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02886 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02888 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02889 0, 183, 184, 0, 0, 0, 0, 533, 534, 0, 02890 0, 535, 0, 0, 0, 0, 0, 0, 0, 185, 02891 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02892 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02894 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02895 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02896 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02897 0, 0, 0, 0, 591, 526, 0, 0, 592, 0, 02898 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 02899 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 02900 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 02901 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 02902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02903 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 02904 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 02905 0, 594, 534, 0, 0, 595, 0, 0, 0, 0, 02906 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 02907 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 02908 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 02909 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 02910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02911 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 02912 182, 0, 183, 184, 0, 0, 0, 0, 617, 526, 02913 0, 0, 618, 0, 0, 0, 0, 0, 0, 0, 02914 185, 220, 157, 158, 159, 160, 161, 162, 163, 164, 02915 165, 0, 0, 166, 167, 0, 0, 168, 169, 170, 02916 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02917 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 02918 0, 0, 0, 0, 0, 0, 0, 0, 173, 174, 02919 175, 176, 177, 178, 179, 180, 181, 182, 0, 183, 02920 184, 0, 0, 0, 0, 620, 534, 0, 0, 621, 02921 0, 0, 0, 0, 0, 0, 0, 185, 220, 157, 02922 158, 159, 160, 161, 162, 163, 164, 165, 0, 0, 02923 166, 167, 0, 0, 168, 169, 170, 171, 0, 0, 02924 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 02925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02926 0, 0, 0, 0, 0, 173, 174, 175, 176, 177, 02927 178, 179, 180, 181, 182, 0, 183, 184, 0, 0, 02928 0, 0, 692, 526, 0, 0, 693, 0, 0, 0, 02929 0, 0, 0, 0, 185, 220, 157, 158, 159, 160, 02930 161, 162, 163, 164, 165, 0, 0, 166, 167, 0, 02931 0, 168, 169, 170, 171, 0, 0, 0, 0, 0, 02932 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 02933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02934 0, 0, 173, 174, 175, 176, 177, 178, 179, 180, 02935 181, 182, 0, 183, 184, 0, 0, 0, 0, 695, 02936 534, 0, 0, 696, 0, 0, 0, 0, 0, 0, 02937 0, 185, 220, 157, 158, 159, 160, 161, 162, 163, 02938 164, 165, 0, 0, 166, 167, 0, 0, 168, 169, 02939 170, 171, 0, 0, 0, 0, 0, 0, 0, 0, 02940 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 02941 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 02942 174, 175, 176, 177, 178, 179, 180, 181, 182, 0, 02943 183, 184, 0, 0, 0, 0, 702, 526, 0, 0, 02944 703, 0, 0, 0, 0, 0, 0, 0, 185, 220, 02945 157, 158, 159, 160, 161, 162, 163, 164, 165, 0, 02946 0, 166, 167, 0, 0, 168, 169, 170, 171, 0, 02947 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 02948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02949 0, 0, 0, 0, 0, 0, 173, 174, 175, 176, 02950 177, 178, 179, 180, 181, 182, 0, 183, 184, 0, 02951 0, 0, 0, 572, 534, 0, 0, 573, 0, 0, 02952 0, 0, 0, 0, 0, 185, 220, 157, 158, 159, 02953 160, 161, 162, 163, 164, 165, 0, 0, 166, 167, 02954 0, 0, 168, 169, 170, 171, 0, 0, 0, 0, 02955 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 02956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02957 0, 0, 0, 173, 174, 175, 176, 177, 178, 179, 02958 180, 181, 182, 0, 183, 184, 0, 0, 0, 0, 02959 965, 526, 0, 0, 966, 0, 0, 0, 0, 0, 02960 0, 0, 185, 220, 157, 158, 159, 160, 161, 162, 02961 163, 164, 165, 0, 0, 166, 167, 0, 0, 168, 02962 169, 170, 171, 0, 0, 0, 0, 0, 0, 0, 02963 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 02964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02965 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 02966 0, 183, 184, 0, 0, 0, 0, 971, 526, 0, 02967 0, 972, 0, 0, 0, 0, 0, 0, 0, 185, 02968 220, 157, 158, 159, 160, 161, 162, 163, 164, 165, 02969 0, 0, 166, 167, 0, 0, 168, 169, 170, 171, 02970 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02971 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02972 0, 0, 0, 0, 0, 0, 0, 173, 174, 175, 02973 176, 177, 178, 179, 180, 181, 182, 0, 183, 184, 02974 0, 0, 0, 0, 974, 534, 0, 0, 975, 0, 02975 0, 0, 0, 0, 0, 0, 185, 220, 157, 158, 02976 159, 160, 161, 162, 163, 164, 165, 0, 0, 166, 02977 167, 0, 0, 168, 169, 170, 171, 0, 0, 0, 02978 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 02979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 02980 0, 0, 0, 0, 173, 174, 175, 176, 177, 178, 02981 179, 180, 181, 182, 0, 183, 184, 0, 0, 0, 02982 0, 572, 534, 0, 0, 573, 0, 0, 0, 0, 02983 0, 0, 0, 185, 220, 157, 158, 159, 160, 161, 02984 162, 163, 164, 165, 0, 0, 166, 167, 0, 0, 02985 168, 169, 170, 171, 0, 0, 0, 0, 0, 0, 02986 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 02987 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 02988 0, 173, 174, 175, 176, 177, 178, 179, 180, 181, 02989 182, 663, 183, 184, 0, 0, 308, 309, 310, 311, 02990 312, 313, 314, 315, 316, 317, 318, 319, 320, 0, 02991 185, 321, 322, 0, 0, 308, 309, 310, 311, 312, 02992 313, 314, 315, 316, 317, 318, 319, 320, 0, 0, 02993 321, 322, 0, 0, 0, 0, 0, 0, 323, 0, 02994 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 02995 0, 0, 0, 0, 0, 0, 0, 323, 0, 324, 02996 325, 326, 327, 328, 329, 330, 331, 332, 333 02997 }; 02998 02999 #define yypact_value_is_default(yystate) \ 03000 ((yystate) == (-747)) 03001 03002 #define yytable_value_is_error(yytable_value) \ 03003 ((yytable_value) == (-574)) 03004 03005 static const yytype_int16 yycheck[] = 03006 { 03007 2, 55, 340, 28, 2, 454, 4, 52, 593, 16, 03008 17, 335, 307, 20, 307, 8, 547, 213, 16, 17, 03009 8, 566, 20, 27, 53, 29, 84, 22, 8, 87, 03010 546, 87, 4, 22, 619, 28, 49, 91, 252, 76, 03011 28, 2, 256, 4, 404, 357, 1, 65, 28, 51, 03012 52, 49, 50, 749, 450, 53, 746, 13, 334, 627, 03013 336, 53, 680, 25, 62, 762, 684, 454, 13, 16, 03014 17, 65, 26, 20, 396, 55, 400, 26, 76, 25, 03015 440, 0, 404, 27, 76, 83, 84, 576, 577, 87, 03016 88, 89, 90, 87, 490, 29, 88, 89, 90, 13, 03017 242, 25, 378, 379, 51, 851, 828, 85, 76, 694, 03018 136, 91, 87, 16, 17, 110, 147, 20, 85, 568, 03019 705, 110, 146, 399, 25, 401, 85, 653, 452, 61, 03020 87, 16, 17, 62, 109, 20, 276, 25, 278, 56, 03021 280, 13, 742, 37, 38, 87, 114, 109, 51, 52, 03022 195, 427, 109, 198, 199, 826, 701, 28, 113, 849, 03023 138, 139, 304, 763, 709, 140, 25, 109, 736, 737, 03024 25, 13, 139, 107, 106, 146, 13, 453, 140, 138, 03025 139, 143, 136, 632, 140, 147, 109, 136, 244, 145, 03026 145, 147, 147, 142, 140, 941, 892, 142, 140, 197, 03027 145, 145, 147, 147, 653, 207, 896, 904, 930, 140, 03028 217, 213, 219, 220, 25, 886, 140, 413, 220, 217, 03029 746, 219, 220, 749, 261, 223, 244, 225, 552, 242, 03030 719, 145, 230, 147, 50, 293, 294, 295, 296, 140, 03031 564, 601, 142, 241, 242, 632, 235, 147, 109, 238, 03032 244, 563, 140, 147, 258, 873, 99, 302, 826, 708, 03033 828, 932, 307, 261, 25, 661, 87, 83, 84, 261, 03034 217, 87, 219, 145, 140, 147, 305, 553, 600, 601, 03035 241, 140, 25, 341, 342, 140, 25, 343, 959, 565, 03036 806, 304, 85, 87, 292, 293, 294, 295, 296, 297, 03037 298, 299, 85, 145, 302, 147, 304, 305, 145, 307, 03038 147, 59, 60, 305, 217, 109, 219, 26, 886, 887, 03039 292, 708, 109, 849, 142, 851, 49, 467, 335, 140, 03040 875, 292, 217, 335, 219, 56, 297, 335, 145, 337, 03041 147, 87, 873, 341, 342, 138, 139, 336, 88, 343, 03042 395, 396, 690, 140, 334, 302, 139, 26, 356, 404, 03043 307, 140, 930, 109, 932, 359, 892, 85, 147, 662, 03044 109, 85, 109, 302, 61, 26, 85, 140, 307, 140, 03045 15, 142, 17, 928, 679, 87, 384, 385, 973, 85, 03046 85, 959, 437, 400, 590, 440, 421, 140, 400, 142, 03047 614, 140, 400, 85, 143, 140, 85, 223, 147, 225, 03048 412, 413, 401, 450, 142, 941, 85, 104, 105, 399, 03049 138, 139, 424, 136, 142, 139, 424, 136, 421, 138, 03050 139, 880, 85, 421, 85, 433, 85, 142, 427, 484, 03051 140, 421, 138, 139, 139, 452, 426, 147, 85, 142, 03052 452, 85, 450, 490, 452, 384, 385, 139, 450, 146, 03053 139, 85, 822, 424, 453, 68, 85, 136, 85, 138, 03054 139, 451, 433, 142, 197, 87, 85, 293, 294, 295, 03055 296, 483, 298, 299, 68, 136, 139, 138, 139, 138, 03056 139, 142, 490, 396, 85, 37, 38, 109, 490, 668, 03057 822, 223, 139, 548, 138, 139, 675, 230, 109, 52, 03058 514, 54, 55, 56, 57, 139, 119, 120, 121, 242, 03059 139, 138, 139, 861, 246, 341, 342, 143, 532, 867, 03060 139, 26, 728, 52, 437, 530, 538, 56, 540, 85, 03061 356, 530, 587, 538, 542, 552, 544, 138, 139, 538, 03062 552, 545, 546, 56, 552, 600, 601, 564, 85, 584, 03063 59, 60, 564, 144, 553, 559, 564, 137, 566, 567, 03064 106, 551, 574, 575, 576, 577, 565, 87, 615, 574, 03065 575, 304, 140, 563, 106, 574, 575, 87, 590, 593, 03066 85, 584, 138, 139, 87, 85, 584, 140, 68, 109, 03067 68, 548, 14, 15, 584, 85, 604, 609, 85, 109, 03068 140, 138, 139, 658, 17, 619, 109, 615, 56, 608, 03069 609, 574, 575, 615, 661, 145, 25, 951, 52, 94, 03070 54, 55, 56, 57, 679, 143, 638, 146, 640, 697, 03071 642, 136, 700, 138, 139, 137, 140, 142, 138, 139, 03072 52, 653, 54, 55, 56, 57, 654, 711, 138, 139, 03073 10, 138, 139, 661, 662, 89, 61, 665, 666, 661, 03074 65, 95, 96, 671, 672, 109, 952, 679, 680, 140, 03075 682, 140, 684, 140, 406, 140, 140, 89, 410, 734, 03076 694, 140, 116, 415, 96, 119, 8, 600, 13, 697, 03077 87, 705, 700, 701, 698, 61, 87, 137, 430, 104, 03078 105, 709, 109, 435, 116, 54, 710, 719, 716, 717, 03079 140, 145, 109, 140, 63, 64, 728, 772, 109, 140, 03080 68, 711, 679, 662, 87, 52, 665, 666, 796, 52, 03081 742, 111, 671, 672, 140, 743, 744, 87, 104, 105, 03082 106, 567, 144, 140, 549, 15, 109, 755, 803, 140, 03083 2, 763, 4, 765, 87, 767, 768, 489, 52, 109, 03084 54, 55, 56, 57, 16, 17, 140, 822, 20, 117, 03085 118, 119, 120, 121, 145, 783, 109, 140, 604, 791, 03086 109, 140, 794, 114, 140, 793, 140, 140, 796, 10, 03087 140, 88, 800, 801, 140, 9, 804, 49, 50, 10, 03088 137, 140, 806, 10, 808, 61, 140, 140, 140, 542, 03089 62, 544, 820, 137, 140, 114, 52, 137, 54, 55, 03090 56, 57, 834, 835, 140, 837, 68, 839, 840, 140, 03091 140, 83, 84, 137, 842, 87, 56, 140, 140, 68, 03092 842, 83, 84, 56, 783, 140, 140, 140, 104, 105, 03093 106, 140, 860, 89, 83, 84, 864, 140, 860, 95, 03094 96, 873, 142, 142, 61, 140, 424, 875, 90, 88, 03095 61, 697, 954, 736, 700, 117, 118, 119, 120, 121, 03096 116, 93, 904, 119, 689, 114, 115, 116, 117, 118, 03097 119, 120, 121, 953, 906, 907, 908, 96, 910, 911, 03098 640, 706, 642, 57, 91, 880, 142, 104, 105, 106, 03099 918, 849, 920, 104, 105, 106, 653, 746, 926, -1, 03100 928, 654, 934, 935, 936, 937, 52, -1, 54, 55, 03101 56, 57, -1, -1, 951, -1, -1, 54, 55, 951, 03102 57, 953, 954, 951, -1, 197, 63, 64, -1, 939, 03103 -1, -1, -1, 952, -1, 967, 968, 969, 970, 973, 03104 950, -1, -1, 89, -1, 217, -1, 219, 220, 981, 03105 796, 223, -1, 225, -1, 707, -1, 989, 230, -1, 03106 -1, -1, -1, 716, 717, 68, -1, -1, -1, 241, 03107 242, -1, 797, -1, 799, -1, -1, 729, -1, -1, 03108 83, 84, -1, -1, 809, -1, -1, -1, 740, 814, 03109 743, 744, 749, -1, 52, 752, 54, 55, 56, 57, 03110 -1, -1, 755, -1, -1, 765, -1, 767, 768, -1, 03111 -1, -1, -1, 116, 117, 118, 119, 120, 121, -1, 03112 292, 293, 294, 295, 296, 297, 298, 299, -1, -1, 03113 302, 89, 304, -1, -1, 307, -1, 95, -1, 52, 03114 793, 54, 55, 56, 57, 870, 871, 800, 801, -1, 03115 -1, 804, 16, 17, -1, -1, 20, -1, -1, -1, 03116 -1, 813, -1, 335, -1, 337, -1, 820, -1, 341, 03117 342, -1, -1, 825, 834, 835, -1, 837, 830, 839, 03118 840, -1, 46, 47, 356, -1, -1, 51, 52, -1, 03119 -1, -1, -1, -1, 851, -1, 853, -1, 62, 63, 03120 -1, 52, 927, 54, 55, 56, 57, -1, -1, -1, 03121 -1, 864, 384, 385, 40, 41, 42, 43, 44, -1, 03122 -1, -1, -1, -1, -1, -1, -1, -1, 400, -1, 03123 955, -1, 957, -1, -1, 892, -1, 894, 89, -1, 03124 -1, 898, -1, -1, 95, -1, 906, 907, 908, -1, 03125 910, 911, 424, 52, -1, 54, 55, 56, 57, -1, 03126 -1, 433, -1, -1, -1, 918, -1, 920, -1, -1, 03127 -1, -1, -1, 926, 934, 935, 936, 937, -1, -1, 03128 452, -1, -1, -1, 941, -1, 943, -1, -1, 946, 03129 89, -1, -1, -1, -1, -1, 95, 96, -1, -1, 03130 -1, -1, -1, -1, 961, -1, -1, 967, 968, 969, 03131 970, -1, -1, -1, -1, -1, -1, 116, -1, -1, 03132 119, 981, -1, -1, -1, -1, 983, -1, -1, 989, 03133 -1, 195, -1, -1, 198, 199, 200, -1, -1, -1, 03134 2, -1, 4, 142, -1, 52, -1, 54, 55, 56, 03135 57, -1, -1, 217, -1, 219, 220, -1, -1, -1, 03136 -1, 2, -1, 4, -1, -1, -1, -1, -1, -1, 03137 542, -1, 544, 52, -1, 54, 55, 56, 57, -1, 03138 552, -1, 89, -1, -1, -1, -1, 49, 95, 96, 03139 -1, 53, 564, -1, 566, 567, -1, -1, -1, -1, 03140 -1, -1, -1, -1, -1, -1, -1, -1, 49, 116, 03141 89, -1, 119, -1, 76, -1, 95, 96, -1, -1, 03142 -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 03143 -1, -1, 604, -1, -1, -1, -1, 116, 302, -1, 03144 119, -1, -1, 307, 308, 309, 310, 311, 312, 313, 03145 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 03146 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 03147 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1, 03148 -1, -1, 654, -1, -1, -1, -1, -1, -1, -1, 03149 662, -1, -1, 665, 666, -1, -1, -1, -1, 671, 03150 672, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03151 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 03152 384, 385, -1, -1, -1, 697, -1, -1, 700, 701, 03153 394, 395, 396, -1, -1, 197, 400, 709, 402, 403, 03154 404, -1, -1, -1, 716, 717, 112, 113, 114, 115, 03155 116, 117, 118, 119, 120, 121, 197, -1, -1, 423, 03156 -1, -1, -1, -1, 428, -1, -1, -1, 230, -1, 03157 -1, 743, 744, 437, -1, -1, 440, -1, -1, 241, 03158 242, -1, -1, 755, -1, -1, -1, -1, 452, 230, 03159 -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, 03160 241, 242, -1, -1, -1, -1, -1, -1, 472, 473, 03161 -1, 783, -1, -1, -1, -1, -1, -1, -1, -1, 03162 484, 793, -1, -1, 796, -1, -1, -1, 800, 801, 03163 292, -1, 804, -1, -1, 297, -1, -1, -1, -1, 03164 -1, -1, 304, 305, -1, -1, -1, 2, 820, 4, 03165 -1, 292, -1, -1, -1, -1, 297, -1, -1, -1, 03166 -1, -1, -1, 304, -1, -1, -1, -1, -1, -1, 03167 -1, -1, -1, -1, -1, 337, -1, 2, -1, 4, 03168 -1, -1, -1, -1, 548, -1, -1, -1, 552, -1, 03169 -1, -1, 864, -1, 49, 2, 337, 4, 53, -1, 03170 564, -1, -1, 875, -1, -1, -1, -1, -1, -1, 03171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03172 -1, 76, -1, 587, 49, -1, -1, -1, 53, -1, 03173 -1, -1, -1, 88, 89, 90, 600, 601, -1, -1, 03174 -1, -1, 49, -1, -1, -1, 918, -1, 920, -1, 03175 -1, 76, -1, -1, 926, -1, 928, -1, -1, -1, 03176 -1, -1, 424, 88, 89, 90, 91, -1, -1, -1, 03177 -1, 433, -1, -1, -1, -1, -1, -1, -1, 951, 03178 -1, 88, -1, 424, -1, -1, -1, -1, 450, -1, 03179 -1, -1, 433, -1, 658, -1, -1, -1, 662, 663, 03180 -1, 665, 666, -1, -1, -1, -1, 671, 672, 0, 03181 -1, -1, -1, -1, -1, 679, -1, 8, 9, 10, 03182 -1, -1, 13, 14, 15, -1, 17, -1, 490, -1, 03183 -1, -1, -1, -1, -1, -1, 27, -1, -1, -1, 03184 -1, -1, 197, -1, -1, -1, 37, 38, -1, 40, 03185 41, 42, 43, 44, 718, -1, -1, -1, -1, 723, 03186 724, -1, 726, 727, -1, -1, -1, -1, -1, -1, 03187 734, -1, 197, -1, -1, 230, -1, -1, -1, -1, 03188 542, -1, 544, -1, -1, -1, 241, 242, -1, -1, 03189 197, -1, -1, -1, 85, -1, -1, -1, -1, -1, 03190 -1, 542, -1, 544, 566, 230, 261, -1, 772, -1, 03191 -1, -1, 776, -1, -1, -1, 241, 242, -1, 783, 03192 -1, -1, -1, 230, -1, 566, -1, -1, -1, -1, 03193 -1, -1, -1, -1, 241, 242, 261, 292, -1, 803, 03194 -1, -1, 297, -1, -1, -1, 137, -1, 139, 304, 03195 305, 142, 143, 615, 145, -1, 147, 821, 822, -1, 03196 -1, -1, -1, -1, -1, -1, -1, 292, -1, -1, 03197 -1, -1, 297, -1, -1, -1, -1, -1, -1, 304, 03198 305, -1, 337, -1, -1, 292, -1, -1, -1, -1, 03199 297, -1, 654, -1, -1, -1, -1, 304, -1, 661, 03200 307, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03201 -1, -1, 337, 654, -1, -1, -1, -1, -1, -1, 03202 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03203 337, -1, -1, -1, -1, -1, -1, -1, -1, 701, 03204 -1, -1, -1, -1, -1, -1, -1, 709, -1, -1, 03205 -1, -1, -1, -1, 716, 717, -1, -1, -1, -1, 03206 701, -1, -1, -1, -1, -1, -1, -1, 709, 424, 03207 -1, -1, -1, -1, -1, 716, 717, -1, 433, -1, 03208 -1, 743, 744, -1, -1, -1, -1, 951, -1, -1, 03209 -1, -1, -1, 755, -1, 450, -1, -1, -1, 424, 03210 -1, -1, 743, 744, -1, -1, -1, -1, 433, -1, 03211 -1, -1, -1, -1, 755, -1, -1, 424, -1, -1, 03212 -1, -1, -1, -1, -1, 450, 433, -1, -1, -1, 03213 -1, 793, -1, -1, -1, 490, -1, -1, 800, 801, 03214 -1, -1, 804, -1, -1, -1, -1, -1, -1, -1, 03215 -1, -1, 793, -1, -1, -1, -1, -1, 820, 800, 03216 801, -1, -1, 804, -1, 490, -1, -1, -1, -1, 03217 -1, -1, -1, -1, -1, -1, -1, -1, -1, 820, 03218 842, -1, -1, -1, -1, -1, -1, 542, -1, 544, 03219 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1, 03220 -1, -1, 864, -1, -1, -1, -1, -1, -1, -1, 03221 -1, 566, -1, 875, -1, -1, -1, 542, -1, 544, 03222 -1, -1, -1, 864, -1, -1, -1, -1, -1, -1, 03223 -1, -1, -1, -1, 875, 542, -1, 544, -1, -1, 03224 -1, 566, -1, -1, -1, -1, -1, -1, -1, -1, 03225 -1, -1, -1, -1, -1, -1, 918, -1, 920, 566, 03226 615, -1, -1, -1, 926, -1, 928, -1, -1, -1, 03227 -1, -1, -1, -1, -1, -1, -1, 918, -1, 920, 03228 -1, -1, -1, -1, -1, 926, -1, 928, -1, -1, 03229 615, 646, -1, -1, -1, -1, -1, -1, -1, 654, 03230 -1, -1, -1, -1, -1, -1, 661, -1, -1, -1, 03231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03232 -1, -1, 68, 69, 70, 71, 72, 73, 74, 654, 03233 -1, 77, 78, -1, -1, -1, 661, 83, 84, -1, 03234 -1, -1, -1, -1, -1, -1, 701, 654, -1, -1, 03235 -1, -1, -1, -1, 709, 662, -1, -1, -1, -1, 03236 -1, 716, 717, -1, -1, -1, 112, 113, 114, 115, 03237 116, 117, 118, 119, 120, 121, 701, -1, -1, -1, 03238 -1, -1, -1, -1, 709, -1, -1, -1, 743, 744, 03239 -1, 716, 717, -1, 701, -1, -1, -1, -1, -1, 03240 755, -1, 709, -1, -1, -1, -1, -1, -1, 716, 03241 717, 68, 69, 70, 71, 72, 73, 74, 743, 744, 03242 77, 78, -1, -1, -1, -1, 83, 84, -1, -1, 03243 755, -1, -1, -1, -1, -1, 743, 744, 793, -1, 03244 -1, -1, -1, -1, -1, 800, 801, -1, 755, 804, 03245 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 03246 117, 118, 119, 120, 121, 820, -1, -1, 793, -1, 03247 -1, -1, -1, -1, -1, 800, 801, -1, -1, 804, 03248 -1, -1, -1, -1, -1, -1, 793, 842, -1, -1, 03249 -1, -1, -1, 800, 801, 820, -1, 804, -1, -1, 03250 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03251 -1, -1, -1, 820, -1, -1, -1, 842, -1, -1, 03252 875, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03253 -1, -1, -1, -1, -1, 860, -1, -1, -1, 864, 03254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03255 875, -1, -1, 860, -1, -1, -1, 864, -1, -1, 03256 -1, -1, -1, 918, -1, 920, -1, -1, 875, -1, 03257 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03259 -1, -1, -1, 918, -1, 920, -1, -1, -1, -1, 03260 -1, 926, -1, 928, -1, -1, -1, -1, -1, -1, 03261 -1, 918, -1, 920, -1, -1, -1, -1, -1, 926, 03262 -1, 928, 0, 1, -1, 3, 4, 5, 6, 7, 03263 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1, 03264 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03265 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03266 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03267 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03268 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03270 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03271 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03272 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03273 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03274 -1, -1, -1, 0, 122, 123, 124, -1, -1, -1, 03275 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1, 03276 17, -1, -1, -1, -1, -1, -1, 145, -1, 147, 03277 27, 28, 29, -1, -1, -1, -1, -1, -1, -1, 03278 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, 03279 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03280 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03281 84, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03282 77, 78, 79, 80, -1, -1, 83, 84, 85, -1, 03283 87, 88, -1, -1, -1, -1, 110, 94, 112, 113, 03284 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03285 107, -1, 109, 110, 111, 112, 113, 114, 115, 116, 03286 117, 118, 119, 120, 121, -1, -1, -1, -1, -1, 03287 -1, -1, -1, 147, -1, -1, -1, -1, -1, -1, 03288 137, 138, 139, 140, 0, -1, 143, 144, 145, -1, 03289 147, -1, 8, 9, 10, -1, -1, 13, 14, 15, 03290 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 03291 26, 27, 28, -1, -1, -1, -1, -1, -1, -1, 03292 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03293 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03294 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03295 83, 84, 68, 69, 70, 71, 72, 73, 74, 75, 03296 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03297 -1, -1, 88, -1, -1, -1, -1, 110, 94, 112, 03298 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03299 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115, 03300 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03302 136, 137, 138, 139, 140, 0, 142, 143, 144, 145, 03303 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14, 03304 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 03305 -1, -1, 27, 28, 29, -1, -1, -1, -1, -1, 03306 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 03307 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03308 72, 73, 74, 75, -1, 77, 78, -1, -1, -1, 03309 -1, 83, 84, 68, 69, 70, 71, 72, 73, 74, 03310 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 03311 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 03312 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03313 -1, -1, 107, -1, -1, 110, 111, 112, 113, 114, 03314 115, 116, 117, 118, 119, 120, 121, -1, -1, -1, 03315 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03316 -1, -1, 137, 138, 139, 140, 0, -1, 143, 144, 03317 145, -1, 147, -1, 8, 9, 10, -1, -1, 13, 03318 14, 15, -1, 17, -1, -1, -1, -1, -1, -1, 03319 -1, -1, 26, 27, 28, -1, -1, -1, -1, -1, 03320 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43, 03321 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03322 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03323 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73, 03324 74, 75, 76, 77, 78, 79, 80, -1, -1, 83, 03325 84, 85, -1, -1, 88, -1, -1, -1, -1, -1, 03326 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03327 -1, -1, -1, -1, -1, -1, 110, -1, 112, 113, 03328 114, 115, 116, 117, 118, 119, 120, 121, -1, -1, 03329 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03330 -1, -1, 136, 137, 138, 139, 140, 0, 142, 143, 03331 144, 145, -1, 147, -1, 8, 9, 10, -1, -1, 03332 13, 14, 15, -1, 17, -1, -1, -1, -1, -1, 03333 -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, 03334 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42, 03335 43, 44, -1, -1, -1, -1, -1, -1, -1, -1, 03336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03337 -1, -1, -1, -1, -1, 68, 69, 70, 71, 72, 03338 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 03339 83, 84, 85, -1, -1, 88, -1, -1, -1, -1, 03340 -1, 94, -1, -1, -1, -1, -1, -1, -1, -1, 03341 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 03342 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03343 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03344 -1, -1, -1, -1, 137, 138, 139, 140, 0, 142, 03345 143, 144, 145, -1, 147, -1, 8, 9, 10, -1, 03346 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1, 03347 -1, -1, -1, -1, 26, -1, -1, -1, -1, -1, 03348 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41, 03349 42, 43, 44, -1, -1, -1, -1, -1, -1, -1, 03350 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03351 -1, -1, -1, -1, -1, -1, 68, 69, 70, 71, 03352 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 03353 -1, 83, 84, 85, 0, 87, -1, -1, -1, -1, 03354 -1, -1, 8, 9, 10, -1, -1, -1, 14, 15, 03355 -1, 17, -1, -1, -1, -1, -1, 109, 110, -1, 03356 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03357 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1, 03358 -1, -1, -1, -1, 136, 137, 138, 139, 140, -1, 03359 -1, 143, -1, 145, -1, 147, -1, -1, -1, -1, 03360 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 03361 76, 77, 78, 79, 80, -1, -1, 83, 84, 85, 03362 -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, 03363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03364 -1, -1, -1, 109, 110, -1, 112, 113, 114, 115, 03365 116, 117, 118, 119, 120, 121, -1, -1, -1, -1, 03366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03367 -1, 137, 138, 139, 140, -1, -1, 143, -1, 145, 03368 1, 147, 3, 4, 5, 6, 7, 8, 9, 10, 03369 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 03370 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03371 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03372 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03373 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03374 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03375 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03376 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03377 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03378 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03380 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03381 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03382 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03383 6, 7, -1, -1, 10, 11, 12, -1, 14, 15, 03384 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03385 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03386 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03387 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03388 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03389 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03390 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03391 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03392 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03394 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03396 -1, -1, -1, -1, -1, -1, -1, -1, -1, 145, 03397 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03398 11, 12, -1, -1, 15, 16, 17, 18, 19, 20, 03399 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03400 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03401 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03402 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03403 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03404 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03405 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03406 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03407 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03409 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03410 1, -1, 3, 4, 5, 6, 7, -1, -1, -1, 03411 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03412 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03413 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03414 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 03415 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03416 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03418 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03419 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03420 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03421 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03422 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03423 -1, -1, -1, -1, -1, -1, 137, -1, -1, -1, 03424 -1, -1, -1, -1, 145, 1, 147, 3, 4, 5, 03425 6, 7, -1, -1, 10, 11, 12, -1, -1, 15, 03426 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03427 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03428 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03429 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03430 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03431 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03432 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03433 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03434 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03436 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03437 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03438 6, 7, -1, 9, 10, 11, 12, -1, -1, 145, 03439 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03440 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03441 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03442 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03443 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03444 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03445 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03446 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03447 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03449 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03450 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03451 6, 7, -1, -1, -1, 11, 12, -1, -1, 145, 03452 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03453 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03454 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03455 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03456 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03457 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03459 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03460 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03462 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03463 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03464 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03465 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03466 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03467 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03468 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03469 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03470 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03471 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03472 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03473 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03474 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03475 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03476 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 03477 6, 7, -1, -1, -1, 11, 12, 143, -1, 145, 03478 16, 147, 18, 19, 20, 21, 22, 23, 24, -1, 03479 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03480 36, -1, -1, 39, -1, -1, -1, -1, -1, 45, 03481 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 03482 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03483 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03485 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03486 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03488 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, 03489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03490 -1, 137, -1, -1, -1, -1, -1, -1, -1, 145, 03491 1, 147, 3, 4, 5, 6, 7, -1, -1, 10, 03492 11, 12, -1, -1, -1, 16, -1, 18, 19, 20, 03493 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03494 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03495 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50, 03496 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03497 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03498 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03499 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03500 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100, 03501 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03503 -1, 122, 123, 124, -1, -1, -1, -1, -1, -1, 03504 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03505 11, 12, -1, -1, 145, 16, 147, 18, 19, 20, 03506 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03507 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03508 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03509 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03510 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03512 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03513 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03514 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03515 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03516 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03517 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03518 32, 33, 34, 35, 36, -1, 147, 39, -1, -1, 03519 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03520 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03521 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03522 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03523 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03524 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03525 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03526 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03527 122, 123, 124, -1, -1, -1, -1, -1, -1, -1, 03528 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03529 12, -1, -1, 145, 16, 147, 18, 19, 20, 21, 03530 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03531 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03532 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03533 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03534 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03536 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03537 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03538 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03539 3, 4, 5, 6, 7, -1, -1, -1, 11, 12, 03540 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03541 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03542 33, 34, 35, 36, -1, 147, 39, -1, -1, -1, 03543 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03544 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03545 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03546 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03547 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03548 93, -1, 95, -1, 97, 98, 99, 100, 101, 102, 03549 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03550 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03551 123, 124, -1, -1, -1, -1, -1, -1, 3, 4, 03552 5, 6, 7, -1, -1, -1, 11, 12, -1, -1, 03553 -1, 16, 145, 18, 19, 20, 21, 22, 23, 24, 03554 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03555 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03556 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, 03557 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 03558 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03559 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03560 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03561 95, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03562 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03563 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03564 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03566 145, 3, 4, 5, 6, 7, 8, 9, 10, 11, 03567 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 03568 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 03569 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 03570 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 03571 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, 03572 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 03573 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03574 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03575 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 03576 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03577 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03578 -1, 123, 124, -1, -1, -1, -1, -1, 3, 4, 03579 5, -1, 7, -1, -1, -1, 11, 12, -1, 141, 03580 142, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03581 -1, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03582 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03583 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03584 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03585 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03587 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03588 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, 03589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03590 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124, 03591 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03592 -1, 136, -1, 11, 12, -1, -1, 142, 16, -1, 03593 18, 19, 20, 21, 22, 23, 24, -1, 26, -1, 03594 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03595 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03596 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03597 58, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03599 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03600 -1, 89, 90, -1, 92, 93, -1, 95, 96, 97, 03601 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03602 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03603 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1, 03604 -1, -1, 3, 4, 5, -1, 7, -1, 136, -1, 03605 11, 12, -1, -1, 142, 16, -1, 18, 19, 20, 03606 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03607 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03608 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03609 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03610 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03611 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03612 -1, -1, -1, -1, -1, 86, 87, -1, 89, 90, 03613 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03614 101, 102, 103, -1, -1, -1, -1, -1, 109, -1, 03615 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03616 7, 122, 123, 124, 11, 12, -1, -1, -1, 16, 03617 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03618 -1, 142, -1, 30, 31, 32, 33, 34, 35, 36, 03619 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03620 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03621 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 03622 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03623 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03624 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96, 03625 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03626 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03627 3, 4, 5, -1, 7, 122, 123, 124, 11, 12, 03628 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22, 03629 23, 24, -1, -1, -1, 142, -1, 30, 31, 32, 03630 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03631 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03632 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03633 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03634 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03635 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03636 93, -1, 95, 96, 97, 98, 99, 100, 101, 102, 03637 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03638 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122, 03639 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03640 -1, -1, -1, -1, -1, -1, -1, -1, -1, 142, 03641 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 03642 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 03643 23, 24, 25, 26, -1, -1, -1, 30, 31, 32, 03644 33, 34, 35, 36, 37, 38, 39, -1, -1, -1, 03645 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 03646 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, 03647 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 03648 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 03649 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 03650 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 03651 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 03652 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 03653 123, 124, -1, -1, -1, -1, -1, -1, -1, -1, 03654 -1, -1, -1, -1, -1, -1, -1, -1, 141, 3, 03655 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 03656 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 03657 24, 25, 26, -1, -1, -1, 30, 31, 32, 33, 03658 34, 35, 36, 37, 38, 39, -1, -1, -1, -1, 03659 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 03660 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03661 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 03662 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 03663 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03664 -1, 95, -1, -1, 98, -1, -1, -1, -1, -1, 03665 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 03666 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 03667 124, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03668 -1, -1, -1, -1, -1, -1, -1, 141, 3, 4, 03669 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 03670 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 03671 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 03672 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 03673 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 03674 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 03675 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03676 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03677 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03678 95, -1, -1, 98, -1, -1, -1, -1, -1, -1, 03679 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03680 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03682 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5, 03683 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 03684 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 03685 26, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03686 36, 37, 38, 39, -1, -1, -1, -1, -1, 45, 03687 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, 03688 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03689 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 03690 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 03691 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 03692 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03693 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 03694 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 03695 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03696 12, -1, -1, -1, 16, 141, 18, 19, 20, 21, 03697 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03698 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03699 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03700 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03701 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 03702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03703 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03704 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03705 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03706 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03707 122, 11, 12, -1, -1, -1, 16, -1, 18, 19, 03708 20, 21, 22, 23, 24, -1, -1, -1, 140, -1, 03709 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03710 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03711 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03712 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 03713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03714 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03715 90, -1, 92, 93, -1, -1, -1, 97, 98, 99, 03716 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03717 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 03718 -1, -1, 122, 11, 12, -1, -1, -1, 16, -1, 03719 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03720 140, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03721 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 03722 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03723 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03725 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03726 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03727 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03728 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, 03729 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03730 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03731 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03732 39, -1, -1, -1, -1, -1, 45, 46, -1, 48, 03733 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03734 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03735 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03736 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03737 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03738 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03739 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03740 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03741 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03742 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03743 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03744 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 03745 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03747 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03748 90, -1, 92, 93, -1, 95, 96, 97, 98, 99, 03749 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03750 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03751 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03752 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03753 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03754 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03755 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 03756 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03757 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03758 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03759 -1, 92, 93, -1, 95, 96, 97, 98, 99, 100, 03760 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03761 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03762 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03763 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03764 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03765 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03766 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 03767 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03768 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03769 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03770 92, 93, -1, 95, -1, 97, 98, 99, 100, 101, 03771 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03772 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03773 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03774 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03775 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03776 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03777 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 03778 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03779 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03780 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03781 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 03782 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03783 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03784 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03785 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03786 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03787 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03788 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 03789 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 03790 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03791 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03792 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03793 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 03794 5, -1, 7, -1, -1, -1, 11, 12, 122, 123, 03795 124, 16, -1, 18, 19, 20, 21, 22, 23, 24, 03796 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 03797 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 03798 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 03799 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 03800 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 03801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03802 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 03803 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, 03804 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 03805 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124, 03806 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 03807 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 03808 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 03809 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 03810 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 03811 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 03812 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03813 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 03814 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, 03815 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 03816 7, -1, -1, -1, 11, 12, 122, 123, 124, 16, 03817 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 03818 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 03819 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 03820 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 03821 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 03822 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03823 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 03824 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 03825 97, 98, 99, 100, 101, 102, 103, -1, -1, -1, 03826 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 03827 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1, 03828 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 03829 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 03830 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 03831 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 03832 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 03833 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03834 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 03835 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97, 03836 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, 03837 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03838 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18, 03839 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03840 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03841 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03842 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03843 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 03844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03845 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03846 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03847 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, 03848 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 03849 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19, 03850 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 03851 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 03852 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 03853 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 03854 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 03855 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03856 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 03857 90, -1, 92, 93, -1, 95, -1, 97, 98, 99, 03858 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, 03859 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 03860 11, 12, 122, 123, 124, 16, -1, 18, 19, 20, 03861 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 03862 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 03863 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 03864 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 03865 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 03866 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03867 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 03868 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100, 03869 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, 03870 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 03871 12, 122, 123, 124, 16, -1, 18, 19, 20, 21, 03872 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 03873 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 03874 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 03875 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 03876 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 03877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03878 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 03879 92, 93, -1, -1, -1, 97, 98, 99, 100, 101, 03880 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, 03881 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 03882 122, 123, 124, 16, -1, 18, 19, 20, 21, 22, 03883 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 03884 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 03885 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 03886 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 03887 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 03888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03889 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 03890 93, -1, -1, -1, 97, 98, 99, 100, 101, 102, 03891 103, -1, -1, -1, -1, -1, -1, -1, -1, 3, 03892 4, 5, -1, 7, -1, -1, -1, 11, 12, 122, 03893 123, 124, 16, -1, 18, 19, 20, 21, 22, 23, 03894 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03895 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03896 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03897 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03898 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03899 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03900 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03901 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, 03902 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03903 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 03904 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03905 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03906 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03907 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03908 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 03909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03910 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03911 89, 90, -1, 92, 93, -1, 95, -1, 97, 98, 03912 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 03913 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03914 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 03915 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03916 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03917 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03918 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03919 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03920 -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, 03921 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03922 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03923 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03924 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 03925 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03926 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03927 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03928 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03929 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 03930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03931 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03932 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 03933 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 03934 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03935 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 03936 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03937 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 03938 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03939 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03940 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03941 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03942 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03943 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03944 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 03945 -1, -1, 11, 12, -1, -1, -1, 16, 122, 18, 03946 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 03947 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 03948 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 03949 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 03950 59, 60, -1, 62, 63, 64, -1, -1, -1, -1, 03951 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03952 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 03953 89, 90, -1, 92, 93, -1, -1, -1, 97, 98, 03954 99, 100, 101, 102, 103, -1, -1, -1, -1, 3, 03955 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 03956 -1, -1, 16, 122, 18, 19, 20, 21, 22, 23, 03957 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 03958 34, 35, 36, -1, -1, 39, -1, 44, -1, -1, 03959 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 03960 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 03961 64, 68, 69, 70, 71, 72, 73, 74, 75, 76, 03962 77, 78, 79, 80, -1, -1, 83, 84, -1, -1, 03963 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 03964 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103, 03965 -1, -1, -1, 110, -1, 112, 113, 114, 115, 116, 03966 117, 118, 119, 120, 121, -1, -1, -1, 122, -1, 03967 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 03968 -1, -1, -1, 140, 66, 67, 68, 69, 70, 71, 03969 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 03970 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 03971 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 03972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03973 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 03974 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 03975 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 03976 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 03977 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 03978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03979 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03980 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 03981 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 03982 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 03983 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 03984 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 03985 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 03986 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 03987 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03988 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 03989 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 03990 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 03991 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 03992 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 03993 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 03994 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 03995 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 03996 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 03997 121, -1, 123, 124, -1, -1, -1, -1, 52, 53, 03998 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, 03999 141, 142, 66, 67, 68, 69, 70, 71, 72, 73, 04000 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 04001 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04002 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1, 04003 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113, 04004 114, 115, 116, 117, 118, 119, 120, 121, -1, 123, 04005 124, -1, -1, -1, -1, 52, 53, -1, -1, 56, 04006 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66, 04007 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 04008 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 04009 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1, 04010 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04011 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116, 04012 117, 118, 119, 120, 121, -1, 123, 124, -1, -1, 04013 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, 04014 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69, 04015 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 04016 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 04017 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1, 04018 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04019 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119, 04020 120, 121, -1, 123, 124, -1, -1, -1, -1, 52, 04021 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, 04022 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72, 04023 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 04024 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 04025 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1, 04026 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112, 04027 113, 114, 115, 116, 117, 118, 119, 120, 121, -1, 04028 123, 124, -1, -1, -1, -1, 52, 53, -1, -1, 04029 56, -1, -1, -1, -1, -1, -1, -1, 141, 142, 04030 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 04031 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 04032 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 04033 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04034 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115, 04035 116, 117, 118, 119, 120, 121, -1, 123, 124, -1, 04036 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, 04037 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68, 04038 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 04039 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 04040 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1, 04041 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04042 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118, 04043 119, 120, 121, -1, 123, 124, -1, -1, -1, -1, 04044 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 04045 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71, 04046 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 04047 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 04048 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1, 04049 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04050 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04051 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1, 04052 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141, 04053 142, 66, 67, 68, 69, 70, 71, 72, 73, 74, 04054 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 04055 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04056 95, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04057 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114, 04058 115, 116, 117, 118, 119, 120, 121, -1, 123, 124, 04059 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, 04060 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67, 04061 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 04062 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 04063 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1, 04064 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 04065 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117, 04066 118, 119, 120, 121, -1, 123, 124, -1, -1, -1, 04067 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, 04068 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70, 04069 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 04070 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 04071 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1, 04072 -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, 04073 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120, 04074 121, 44, 123, 124, -1, -1, 68, 69, 70, 71, 04075 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, 04076 141, 83, 84, -1, -1, 68, 69, 70, 71, 72, 04077 73, 74, 75, 76, 77, 78, 79, 80, -1, -1, 04078 83, 84, -1, -1, -1, -1, -1, -1, 110, -1, 04079 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 04080 -1, -1, -1, -1, -1, -1, -1, 110, -1, 112, 04081 113, 114, 115, 116, 117, 118, 119, 120, 121 04082 }; 04083 04084 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 04085 symbol of state STATE-NUM. */ 04086 static const yytype_uint16 yystos[] = 04087 { 04088 0, 149, 150, 0, 1, 3, 4, 5, 6, 7, 04089 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 04090 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 04091 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 04092 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 04093 90, 92, 93, 95, 97, 98, 99, 100, 101, 102, 04094 103, 122, 123, 124, 151, 152, 153, 158, 160, 161, 04095 163, 164, 167, 168, 170, 171, 172, 174, 175, 185, 04096 199, 216, 217, 218, 219, 220, 221, 222, 223, 224, 04097 225, 226, 249, 250, 260, 261, 262, 263, 264, 265, 04098 266, 269, 279, 281, 282, 283, 284, 285, 286, 287, 04099 310, 321, 153, 3, 4, 5, 6, 7, 8, 9, 04100 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 04101 20, 21, 22, 23, 24, 25, 26, 30, 31, 32, 04102 33, 34, 35, 36, 37, 38, 39, 45, 46, 47, 04103 48, 49, 50, 51, 52, 53, 56, 66, 67, 68, 04104 69, 70, 71, 72, 73, 74, 77, 78, 81, 82, 04105 83, 84, 95, 112, 113, 114, 115, 116, 117, 118, 04106 119, 120, 121, 123, 124, 141, 178, 179, 180, 181, 04107 183, 184, 279, 281, 39, 58, 86, 89, 95, 96, 04108 123, 167, 175, 185, 187, 192, 195, 197, 216, 283, 04109 284, 286, 287, 308, 309, 192, 192, 142, 193, 194, 04110 142, 189, 193, 142, 147, 315, 54, 180, 315, 154, 04111 136, 21, 22, 30, 31, 32, 185, 216, 310, 185, 04112 56, 1, 89, 156, 157, 158, 169, 170, 321, 161, 04113 188, 197, 308, 321, 187, 307, 308, 321, 46, 86, 04114 122, 140, 174, 199, 216, 283, 284, 287, 242, 243, 04115 54, 55, 57, 178, 272, 280, 271, 272, 273, 146, 04116 267, 146, 270, 59, 60, 163, 185, 185, 145, 147, 04117 314, 319, 320, 40, 41, 42, 43, 44, 37, 38, 04118 28, 247, 109, 140, 89, 95, 171, 109, 68, 69, 04119 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 04120 80, 83, 84, 110, 112, 113, 114, 115, 116, 117, 04121 118, 119, 120, 121, 85, 138, 139, 200, 161, 162, 04122 162, 203, 205, 162, 314, 320, 86, 168, 175, 216, 04123 232, 283, 284, 287, 52, 56, 83, 86, 176, 177, 04124 216, 283, 284, 287, 177, 33, 34, 35, 36, 49, 04125 50, 51, 52, 56, 142, 178, 285, 305, 85, 139, 04126 26, 136, 251, 263, 87, 87, 189, 193, 251, 140, 04127 187, 56, 187, 187, 109, 88, 140, 196, 321, 85, 04128 138, 139, 87, 87, 140, 196, 192, 315, 316, 192, 04129 191, 192, 197, 308, 321, 161, 316, 161, 54, 63, 04130 64, 159, 142, 186, 136, 156, 85, 139, 87, 158, 04131 169, 143, 314, 320, 316, 201, 144, 140, 147, 318, 04132 140, 318, 137, 318, 315, 56, 59, 60, 171, 173, 04133 140, 85, 138, 139, 244, 61, 104, 105, 106, 274, 04134 106, 274, 106, 65, 274, 106, 106, 268, 274, 106, 04135 61, 106, 68, 68, 145, 153, 162, 162, 162, 162, 04136 158, 161, 161, 248, 95, 163, 187, 197, 198, 169, 04137 140, 174, 140, 160, 163, 175, 185, 187, 198, 185, 04138 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04139 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 04140 185, 185, 185, 185, 185, 52, 53, 56, 183, 189, 04141 311, 312, 191, 52, 53, 56, 183, 189, 311, 155, 04142 156, 13, 228, 319, 228, 162, 162, 314, 17, 254, 04143 56, 85, 138, 139, 25, 161, 52, 56, 176, 1, 04144 113, 288, 319, 85, 138, 139, 212, 306, 213, 85, 04145 139, 313, 52, 56, 311, 311, 253, 252, 163, 185, 04146 163, 185, 94, 165, 182, 185, 187, 95, 187, 195, 04147 308, 52, 56, 191, 52, 56, 309, 316, 143, 316, 04148 140, 140, 316, 180, 202, 185, 151, 137, 311, 311, 04149 185, 316, 158, 316, 308, 140, 173, 52, 56, 191, 04150 52, 56, 52, 54, 55, 56, 57, 89, 95, 96, 04151 116, 119, 142, 245, 291, 292, 293, 294, 295, 296, 04152 299, 300, 301, 302, 303, 276, 275, 146, 274, 146, 04153 185, 185, 76, 114, 237, 238, 321, 187, 140, 316, 04154 173, 140, 109, 44, 315, 87, 87, 189, 193, 315, 04155 317, 87, 87, 189, 190, 193, 321, 10, 227, 8, 04156 256, 321, 156, 13, 156, 27, 229, 319, 229, 254, 04157 197, 227, 52, 56, 191, 52, 56, 207, 210, 319, 04158 289, 209, 52, 56, 176, 191, 155, 161, 142, 290, 04159 291, 214, 190, 193, 190, 193, 237, 237, 44, 166, 04160 180, 187, 196, 87, 87, 317, 87, 87, 308, 161, 04161 137, 318, 171, 317, 109, 52, 89, 95, 233, 234, 04162 235, 293, 291, 29, 107, 246, 140, 304, 321, 140, 04163 304, 52, 140, 304, 52, 277, 54, 55, 57, 278, 04164 287, 52, 145, 236, 239, 295, 297, 298, 301, 303, 04165 321, 156, 95, 187, 173, 185, 111, 163, 185, 163, 04166 185, 165, 144, 87, 163, 185, 163, 185, 165, 187, 04167 198, 257, 321, 15, 231, 321, 14, 230, 231, 231, 04168 204, 206, 227, 140, 228, 317, 162, 319, 162, 155, 04169 317, 227, 316, 291, 155, 319, 178, 156, 156, 185, 04170 237, 87, 140, 316, 187, 235, 140, 293, 140, 316, 04171 239, 156, 156, 294, 299, 301, 303, 295, 296, 301, 04172 295, 156, 109, 52, 240, 241, 292, 239, 114, 140, 04173 304, 140, 304, 140, 304, 10, 187, 185, 163, 185, 04174 88, 258, 321, 156, 9, 259, 321, 162, 227, 227, 04175 156, 156, 187, 156, 229, 211, 319, 227, 316, 227, 04176 215, 10, 137, 156, 316, 234, 140, 95, 233, 316, 04177 10, 137, 140, 304, 140, 304, 140, 304, 140, 304, 04178 304, 137, 86, 216, 140, 114, 298, 301, 295, 297, 04179 301, 295, 86, 175, 216, 283, 284, 287, 228, 156, 04180 228, 227, 227, 231, 254, 255, 208, 155, 290, 137, 04181 140, 234, 140, 293, 295, 301, 295, 295, 56, 85, 04182 241, 140, 304, 140, 304, 304, 140, 304, 304, 56, 04183 85, 138, 139, 156, 156, 156, 227, 155, 234, 140, 04184 304, 140, 304, 304, 304, 52, 56, 295, 301, 295, 04185 295, 52, 56, 191, 52, 56, 256, 230, 227, 227, 04186 234, 295, 304, 140, 304, 304, 304, 317, 304, 295, 04187 304 04188 }; 04189 04190 #define yyerrok (yyerrstatus = 0) 04191 #define yyclearin (yychar = YYEMPTY) 04192 #define YYEMPTY (-2) 04193 #define YYEOF 0 04194 04195 #define YYACCEPT goto yyacceptlab 04196 #define YYABORT goto yyabortlab 04197 #define YYERROR goto yyerrorlab 04198 04199 04200 /* Like YYERROR except do call yyerror. This remains here temporarily 04201 to ease the transition to the new meaning of YYERROR, for GCC. 04202 Once GCC version 2 has supplanted version 1, this can go. However, 04203 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 04204 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 04205 discussed. */ 04206 04207 #define YYFAIL goto yyerrlab 04208 #if defined YYFAIL 04209 /* This is here to suppress warnings from the GCC cpp's 04210 -Wunused-macros. Normally we don't worry about that warning, but 04211 some users do, and we want to make it easy for users to remove 04212 YYFAIL uses, which will produce warnings from Bison 2.5. */ 04213 #endif 04214 04215 #define YYRECOVERING() (!!yyerrstatus) 04216 04217 #define YYBACKUP(Token, Value) \ 04218 do \ 04219 if (yychar == YYEMPTY && yylen == 1) \ 04220 { \ 04221 yychar = (Token); \ 04222 yylval = (Value); \ 04223 YYPOPSTACK (1); \ 04224 goto yybackup; \ 04225 } \ 04226 else \ 04227 { \ 04228 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 04229 YYERROR; \ 04230 } \ 04231 while (YYID (0)) 04232 04233 04234 #define YYTERROR 1 04235 #define YYERRCODE 256 04236 04237 04238 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 04239 If N is 0, then set CURRENT to the empty location which ends 04240 the previous symbol: RHS[0] (always defined). */ 04241 04242 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 04243 #ifndef YYLLOC_DEFAULT 04244 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 04245 do \ 04246 if (YYID (N)) \ 04247 { \ 04248 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 04249 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 04250 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 04251 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 04252 } \ 04253 else \ 04254 { \ 04255 (Current).first_line = (Current).last_line = \ 04256 YYRHSLOC (Rhs, 0).last_line; \ 04257 (Current).first_column = (Current).last_column = \ 04258 YYRHSLOC (Rhs, 0).last_column; \ 04259 } \ 04260 while (YYID (0)) 04261 #endif 04262 04263 04264 /* This macro is provided for backward compatibility. */ 04265 04266 #ifndef YY_LOCATION_PRINT 04267 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 04268 #endif 04269 04270 04271 /* YYLEX -- calling `yylex' with the right arguments. */ 04272 04273 #ifdef YYLEX_PARAM 04274 # define YYLEX yylex (&yylval, YYLEX_PARAM) 04275 #else 04276 # define YYLEX yylex (&yylval) 04277 #endif 04278 04279 /* Enable debugging if requested. */ 04280 #if YYDEBUG 04281 04282 # ifndef YYFPRINTF 04283 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 04284 # define YYFPRINTF fprintf 04285 # endif 04286 04287 # define YYDPRINTF(Args) \ 04288 do { \ 04289 if (yydebug) \ 04290 YYFPRINTF Args; \ 04291 } while (YYID (0)) 04292 04293 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 04294 do { \ 04295 if (yydebug) \ 04296 { \ 04297 YYFPRINTF (stderr, "%s ", Title); \ 04298 yy_symbol_print (stderr, \ 04299 Type, Value, parser); \ 04300 YYFPRINTF (stderr, "\n"); \ 04301 } \ 04302 } while (YYID (0)) 04303 04304 04305 /*--------------------------------. 04306 | Print this symbol on YYOUTPUT. | 04307 `--------------------------------*/ 04308 04309 /*ARGSUSED*/ 04310 #if (defined __STDC__ || defined __C99__FUNC__ \ 04311 || defined __cplusplus || defined _MSC_VER) 04312 static void 04313 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04314 #else 04315 static void 04316 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 04317 FILE *yyoutput; 04318 int yytype; 04319 YYSTYPE const * const yyvaluep; 04320 struct parser_params *parser; 04321 #endif 04322 { 04323 if (!yyvaluep) 04324 return; 04325 YYUSE (parser); 04326 # ifdef YYPRINT 04327 if (yytype < YYNTOKENS) 04328 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 04329 # else 04330 YYUSE (yyoutput); 04331 # endif 04332 switch (yytype) 04333 { 04334 default: 04335 break; 04336 } 04337 } 04338 04339 04340 /*--------------------------------. 04341 | Print this symbol on YYOUTPUT. | 04342 `--------------------------------*/ 04343 04344 #if (defined __STDC__ || defined __C99__FUNC__ \ 04345 || defined __cplusplus || defined _MSC_VER) 04346 static void 04347 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 04348 #else 04349 static void 04350 yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 04351 FILE *yyoutput; 04352 int yytype; 04353 YYSTYPE const * const yyvaluep; 04354 struct parser_params *parser; 04355 #endif 04356 { 04357 if (yytype < YYNTOKENS) 04358 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 04359 else 04360 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 04361 04362 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 04363 YYFPRINTF (yyoutput, ")"); 04364 } 04365 04366 /*------------------------------------------------------------------. 04367 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 04368 | TOP (included). | 04369 `------------------------------------------------------------------*/ 04370 04371 #if (defined __STDC__ || defined __C99__FUNC__ \ 04372 || defined __cplusplus || defined _MSC_VER) 04373 static void 04374 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 04375 #else 04376 static void 04377 yy_stack_print (yybottom, yytop) 04378 yytype_int16 *yybottom; 04379 yytype_int16 *yytop; 04380 #endif 04381 { 04382 YYFPRINTF (stderr, "Stack now"); 04383 for (; yybottom <= yytop; yybottom++) 04384 { 04385 int yybot = *yybottom; 04386 YYFPRINTF (stderr, " %d", yybot); 04387 } 04388 YYFPRINTF (stderr, "\n"); 04389 } 04390 04391 # define YY_STACK_PRINT(Bottom, Top) \ 04392 do { \ 04393 if (yydebug) \ 04394 yy_stack_print ((Bottom), (Top)); \ 04395 } while (YYID (0)) 04396 04397 04398 /*------------------------------------------------. 04399 | Report that the YYRULE is going to be reduced. | 04400 `------------------------------------------------*/ 04401 04402 #if (defined __STDC__ || defined __C99__FUNC__ \ 04403 || defined __cplusplus || defined _MSC_VER) 04404 static void 04405 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 04406 #else 04407 static void 04408 yy_reduce_print (yyvsp, yyrule, parser) 04409 YYSTYPE *yyvsp; 04410 int yyrule; 04411 struct parser_params *parser; 04412 #endif 04413 { 04414 int yynrhs = yyr2[yyrule]; 04415 int yyi; 04416 unsigned long int yylno = yyrline[yyrule]; 04417 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 04418 yyrule - 1, yylno); 04419 /* The symbols being reduced. */ 04420 for (yyi = 0; yyi < yynrhs; yyi++) 04421 { 04422 YYFPRINTF (stderr, " $%d = ", yyi + 1); 04423 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 04424 &(yyvsp[(yyi + 1) - (yynrhs)]) 04425 , parser); 04426 YYFPRINTF (stderr, "\n"); 04427 } 04428 } 04429 04430 # define YY_REDUCE_PRINT(Rule) \ 04431 do { \ 04432 if (yydebug) \ 04433 yy_reduce_print (yyvsp, Rule, parser); \ 04434 } while (YYID (0)) 04435 04436 /* Nonzero means print parse trace. It is left uninitialized so that 04437 multiple parsers can coexist. */ 04438 #ifndef yydebug 04439 int yydebug; 04440 #endif 04441 #else /* !YYDEBUG */ 04442 # define YYDPRINTF(Args) 04443 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 04444 # define YY_STACK_PRINT(Bottom, Top) 04445 # define YY_REDUCE_PRINT(Rule) 04446 #endif /* !YYDEBUG */ 04447 04448 04449 /* YYINITDEPTH -- initial size of the parser's stacks. */ 04450 #ifndef YYINITDEPTH 04451 # define YYINITDEPTH 200 04452 #endif 04453 04454 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 04455 if the built-in stack extension method is used). 04456 04457 Do not make this value too large; the results are undefined if 04458 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 04459 evaluated with infinite-precision integer arithmetic. */ 04460 04461 #ifndef YYMAXDEPTH 04462 # define YYMAXDEPTH 10000 04463 #endif 04464 04465 04466 #if YYERROR_VERBOSE 04467 04468 # ifndef yystrlen 04469 # if defined __GLIBC__ && defined _STRING_H 04470 # define yystrlen strlen 04471 # else 04472 /* Return the length of YYSTR. */ 04473 #if (defined __STDC__ || defined __C99__FUNC__ \ 04474 || defined __cplusplus || defined _MSC_VER) 04475 static YYSIZE_T 04476 yystrlen (const char *yystr) 04477 #else 04478 static YYSIZE_T 04479 yystrlen (yystr) 04480 const char *yystr; 04481 #endif 04482 { 04483 YYSIZE_T yylen; 04484 for (yylen = 0; yystr[yylen]; yylen++) 04485 continue; 04486 return yylen; 04487 } 04488 # endif 04489 # endif 04490 04491 # ifndef yystpcpy 04492 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 04493 # define yystpcpy stpcpy 04494 # else 04495 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 04496 YYDEST. */ 04497 #if (defined __STDC__ || defined __C99__FUNC__ \ 04498 || defined __cplusplus || defined _MSC_VER) 04499 static char * 04500 yystpcpy (char *yydest, const char *yysrc) 04501 #else 04502 static char * 04503 yystpcpy (yydest, yysrc) 04504 char *yydest; 04505 const char *yysrc; 04506 #endif 04507 { 04508 char *yyd = yydest; 04509 const char *yys = yysrc; 04510 04511 while ((*yyd++ = *yys++) != '\0') 04512 continue; 04513 04514 return yyd - 1; 04515 } 04516 # endif 04517 # endif 04518 04519 # ifndef yytnamerr 04520 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 04521 quotes and backslashes, so that it's suitable for yyerror. The 04522 heuristic is that double-quoting is unnecessary unless the string 04523 contains an apostrophe, a comma, or backslash (other than 04524 backslash-backslash). YYSTR is taken from yytname. If YYRES is 04525 null, do not copy; instead, return the length of what the result 04526 would have been. */ 04527 static YYSIZE_T 04528 yytnamerr (char *yyres, const char *yystr) 04529 { 04530 if (*yystr == '"') 04531 { 04532 YYSIZE_T yyn = 0; 04533 char const *yyp = yystr; 04534 04535 for (;;) 04536 switch (*++yyp) 04537 { 04538 case '\'': 04539 case ',': 04540 goto do_not_strip_quotes; 04541 04542 case '\\': 04543 if (*++yyp != '\\') 04544 goto do_not_strip_quotes; 04545 /* Fall through. */ 04546 default: 04547 if (yyres) 04548 yyres[yyn] = *yyp; 04549 yyn++; 04550 break; 04551 04552 case '"': 04553 if (yyres) 04554 yyres[yyn] = '\0'; 04555 return yyn; 04556 } 04557 do_not_strip_quotes: ; 04558 } 04559 04560 if (! yyres) 04561 return yystrlen (yystr); 04562 04563 return yystpcpy (yyres, yystr) - yyres; 04564 } 04565 # endif 04566 04567 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 04568 about the unexpected token YYTOKEN for the state stack whose top is 04569 YYSSP. 04570 04571 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 04572 not large enough to hold the message. In that case, also set 04573 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 04574 required number of bytes is too large to store. */ 04575 static int 04576 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 04577 yytype_int16 *yyssp, int yytoken) 04578 { 04579 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 04580 YYSIZE_T yysize = yysize0; 04581 YYSIZE_T yysize1; 04582 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 04583 /* Internationalized format string. */ 04584 const char *yyformat = 0; 04585 /* Arguments of yyformat. */ 04586 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 04587 /* Number of reported tokens (one for the "unexpected", one per 04588 "expected"). */ 04589 int yycount = 0; 04590 04591 /* There are many possibilities here to consider: 04592 - Assume YYFAIL is not used. It's too flawed to consider. See 04593 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 04594 for details. YYERROR is fine as it does not invoke this 04595 function. 04596 - If this state is a consistent state with a default action, then 04597 the only way this function was invoked is if the default action 04598 is an error action. In that case, don't check for expected 04599 tokens because there are none. 04600 - The only way there can be no lookahead present (in yychar) is if 04601 this state is a consistent state with a default action. Thus, 04602 detecting the absence of a lookahead is sufficient to determine 04603 that there is no unexpected or expected token to report. In that 04604 case, just report a simple "syntax error". 04605 - Don't assume there isn't a lookahead just because this state is a 04606 consistent state with a default action. There might have been a 04607 previous inconsistent state, consistent state with a non-default 04608 action, or user semantic action that manipulated yychar. 04609 - Of course, the expected token list depends on states to have 04610 correct lookahead information, and it depends on the parser not 04611 to perform extra reductions after fetching a lookahead from the 04612 scanner and before detecting a syntax error. Thus, state merging 04613 (from LALR or IELR) and default reductions corrupt the expected 04614 token list. However, the list is correct for canonical LR with 04615 one exception: it will still contain any token that will not be 04616 accepted due to an error action in a later state. 04617 */ 04618 if (yytoken != YYEMPTY) 04619 { 04620 int yyn = yypact[*yyssp]; 04621 yyarg[yycount++] = yytname[yytoken]; 04622 if (!yypact_value_is_default (yyn)) 04623 { 04624 /* Start YYX at -YYN if negative to avoid negative indexes in 04625 YYCHECK. In other words, skip the first -YYN actions for 04626 this state because they are default actions. */ 04627 int yyxbegin = yyn < 0 ? -yyn : 0; 04628 /* Stay within bounds of both yycheck and yytname. */ 04629 int yychecklim = YYLAST - yyn + 1; 04630 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 04631 int yyx; 04632 04633 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 04634 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 04635 && !yytable_value_is_error (yytable[yyx + yyn])) 04636 { 04637 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 04638 { 04639 yycount = 1; 04640 yysize = yysize0; 04641 break; 04642 } 04643 yyarg[yycount++] = yytname[yyx]; 04644 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 04645 if (! (yysize <= yysize1 04646 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04647 return 2; 04648 yysize = yysize1; 04649 } 04650 } 04651 } 04652 04653 switch (yycount) 04654 { 04655 # define YYCASE_(N, S) \ 04656 case N: \ 04657 yyformat = S; \ 04658 break 04659 YYCASE_(0, YY_("syntax error")); 04660 YYCASE_(1, YY_("syntax error, unexpected %s")); 04661 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 04662 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 04663 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 04664 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 04665 # undef YYCASE_ 04666 } 04667 04668 yysize1 = yysize + yystrlen (yyformat); 04669 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 04670 return 2; 04671 yysize = yysize1; 04672 04673 if (*yymsg_alloc < yysize) 04674 { 04675 *yymsg_alloc = 2 * yysize; 04676 if (! (yysize <= *yymsg_alloc 04677 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 04678 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 04679 return 1; 04680 } 04681 04682 /* Avoid sprintf, as that infringes on the user's name space. 04683 Don't have undefined behavior even if the translation 04684 produced a string with the wrong number of "%s"s. */ 04685 { 04686 char *yyp = *yymsg; 04687 int yyi = 0; 04688 while ((*yyp = *yyformat) != '\0') 04689 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 04690 { 04691 yyp += yytnamerr (yyp, yyarg[yyi++]); 04692 yyformat += 2; 04693 } 04694 else 04695 { 04696 yyp++; 04697 yyformat++; 04698 } 04699 } 04700 return 0; 04701 } 04702 #endif /* YYERROR_VERBOSE */ 04703 04704 /*-----------------------------------------------. 04705 | Release the memory associated to this symbol. | 04706 `-----------------------------------------------*/ 04707 04708 /*ARGSUSED*/ 04709 #if (defined __STDC__ || defined __C99__FUNC__ \ 04710 || defined __cplusplus || defined _MSC_VER) 04711 static void 04712 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 04713 #else 04714 static void 04715 yydestruct (yymsg, yytype, yyvaluep, parser) 04716 const char *yymsg; 04717 int yytype; 04718 YYSTYPE *yyvaluep; 04719 struct parser_params *parser; 04720 #endif 04721 { 04722 YYUSE (yyvaluep); 04723 YYUSE (parser); 04724 04725 if (!yymsg) 04726 yymsg = "Deleting"; 04727 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 04728 04729 switch (yytype) 04730 { 04731 04732 default: 04733 break; 04734 } 04735 } 04736 04737 04738 /* Prevent warnings from -Wmissing-prototypes. */ 04739 #ifdef YYPARSE_PARAM 04740 #if defined __STDC__ || defined __cplusplus 04741 int yyparse (void *YYPARSE_PARAM); 04742 #else 04743 int yyparse (); 04744 #endif 04745 #else /* ! YYPARSE_PARAM */ 04746 #if defined __STDC__ || defined __cplusplus 04747 int yyparse (struct parser_params *parser); 04748 #else 04749 int yyparse (); 04750 #endif 04751 #endif /* ! YYPARSE_PARAM */ 04752 04753 04754 /*----------. 04755 | yyparse. | 04756 `----------*/ 04757 04758 #ifdef YYPARSE_PARAM 04759 #if (defined __STDC__ || defined __C99__FUNC__ \ 04760 || defined __cplusplus || defined _MSC_VER) 04761 int 04762 yyparse (void *YYPARSE_PARAM) 04763 #else 04764 int 04765 yyparse (YYPARSE_PARAM) 04766 void *YYPARSE_PARAM; 04767 #endif 04768 #else /* ! YYPARSE_PARAM */ 04769 #if (defined __STDC__ || defined __C99__FUNC__ \ 04770 || defined __cplusplus || defined _MSC_VER) 04771 int 04772 yyparse (struct parser_params *parser) 04773 #else 04774 int 04775 yyparse (parser) 04776 struct parser_params *parser; 04777 #endif 04778 #endif 04779 { 04780 /* The lookahead symbol. */ 04781 int yychar; 04782 04783 /* The semantic value of the lookahead symbol. */ 04784 YYSTYPE yylval; 04785 04786 /* Number of syntax errors so far. */ 04787 int yynerrs; 04788 04789 int yystate; 04790 /* Number of tokens to shift before error messages enabled. */ 04791 int yyerrstatus; 04792 04793 /* The stacks and their tools: 04794 `yyss': related to states. 04795 `yyvs': related to semantic values. 04796 04797 Refer to the stacks thru separate pointers, to allow yyoverflow 04798 to reallocate them elsewhere. */ 04799 04800 /* The state stack. */ 04801 yytype_int16 yyssa[YYINITDEPTH]; 04802 yytype_int16 *yyss; 04803 yytype_int16 *yyssp; 04804 04805 /* The semantic value stack. */ 04806 YYSTYPE yyvsa[YYINITDEPTH]; 04807 YYSTYPE *yyvs; 04808 YYSTYPE *yyvsp; 04809 04810 YYSIZE_T yystacksize; 04811 04812 int yyn; 04813 int yyresult; 04814 /* Lookahead token as an internal (translated) token number. */ 04815 int yytoken; 04816 /* The variables used to return semantic value and location from the 04817 action routines. */ 04818 YYSTYPE yyval; 04819 04820 #if YYERROR_VERBOSE 04821 /* Buffer for error messages, and its allocated size. */ 04822 char yymsgbuf[128]; 04823 char *yymsg = yymsgbuf; 04824 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 04825 #endif 04826 04827 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 04828 04829 /* The number of symbols on the RHS of the reduced rule. 04830 Keep to zero when no symbol should be popped. */ 04831 int yylen = 0; 04832 04833 yytoken = 0; 04834 yyss = yyssa; 04835 yyvs = yyvsa; 04836 yystacksize = YYINITDEPTH; 04837 04838 YYDPRINTF ((stderr, "Starting parse\n")); 04839 04840 yystate = 0; 04841 yyerrstatus = 0; 04842 yynerrs = 0; 04843 yychar = YYEMPTY; /* Cause a token to be read. */ 04844 04845 /* Initialize stack pointers. 04846 Waste one element of value and location stack 04847 so that they stay on the same level as the state stack. 04848 The wasted elements are never initialized. */ 04849 yyssp = yyss; 04850 yyvsp = yyvs; 04851 04852 goto yysetstate; 04853 04854 /*------------------------------------------------------------. 04855 | yynewstate -- Push a new state, which is found in yystate. | 04856 `------------------------------------------------------------*/ 04857 yynewstate: 04858 /* In all cases, when you get here, the value and location stacks 04859 have just been pushed. So pushing a state here evens the stacks. */ 04860 yyssp++; 04861 04862 yysetstate: 04863 *yyssp = yystate; 04864 04865 if (yyss + yystacksize - 1 <= yyssp) 04866 { 04867 /* Get the current used size of the three stacks, in elements. */ 04868 YYSIZE_T yysize = yyssp - yyss + 1; 04869 04870 #ifdef yyoverflow 04871 { 04872 /* Give user a chance to reallocate the stack. Use copies of 04873 these so that the &'s don't force the real ones into 04874 memory. */ 04875 YYSTYPE *yyvs1 = yyvs; 04876 yytype_int16 *yyss1 = yyss; 04877 04878 /* Each stack pointer address is followed by the size of the 04879 data in use in that stack, in bytes. This used to be a 04880 conditional around just the two extra args, but that might 04881 be undefined if yyoverflow is a macro. */ 04882 yyoverflow (YY_("memory exhausted"), 04883 &yyss1, yysize * sizeof (*yyssp), 04884 &yyvs1, yysize * sizeof (*yyvsp), 04885 &yystacksize); 04886 04887 yyss = yyss1; 04888 yyvs = yyvs1; 04889 } 04890 #else /* no yyoverflow */ 04891 # ifndef YYSTACK_RELOCATE 04892 goto yyexhaustedlab; 04893 # else 04894 /* Extend the stack our own way. */ 04895 if (YYMAXDEPTH <= yystacksize) 04896 goto yyexhaustedlab; 04897 yystacksize *= 2; 04898 if (YYMAXDEPTH < yystacksize) 04899 yystacksize = YYMAXDEPTH; 04900 04901 { 04902 yytype_int16 *yyss1 = yyss; 04903 union yyalloc *yyptr = 04904 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 04905 if (! yyptr) 04906 goto yyexhaustedlab; 04907 YYSTACK_RELOCATE (yyss_alloc, yyss); 04908 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 04909 # undef YYSTACK_RELOCATE 04910 if (yyss1 != yyssa) 04911 YYSTACK_FREE (yyss1); 04912 } 04913 # endif 04914 #endif /* no yyoverflow */ 04915 04916 yyssp = yyss + yysize - 1; 04917 yyvsp = yyvs + yysize - 1; 04918 04919 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 04920 (unsigned long int) yystacksize)); 04921 04922 if (yyss + yystacksize - 1 <= yyssp) 04923 YYABORT; 04924 } 04925 04926 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 04927 04928 if (yystate == YYFINAL) 04929 YYACCEPT; 04930 04931 goto yybackup; 04932 04933 /*-----------. 04934 | yybackup. | 04935 `-----------*/ 04936 yybackup: 04937 04938 /* Do appropriate processing given the current state. Read a 04939 lookahead token if we need one and don't already have one. */ 04940 04941 /* First try to decide what to do without reference to lookahead token. */ 04942 yyn = yypact[yystate]; 04943 if (yypact_value_is_default (yyn)) 04944 goto yydefault; 04945 04946 /* Not known => get a lookahead token if don't already have one. */ 04947 04948 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 04949 if (yychar == YYEMPTY) 04950 { 04951 YYDPRINTF ((stderr, "Reading a token: ")); 04952 yychar = YYLEX; 04953 } 04954 04955 if (yychar <= YYEOF) 04956 { 04957 yychar = yytoken = YYEOF; 04958 YYDPRINTF ((stderr, "Now at end of input.\n")); 04959 } 04960 else 04961 { 04962 yytoken = YYTRANSLATE (yychar); 04963 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 04964 } 04965 04966 /* If the proper action on seeing token YYTOKEN is to reduce or to 04967 detect an error, take that action. */ 04968 yyn += yytoken; 04969 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 04970 goto yydefault; 04971 yyn = yytable[yyn]; 04972 if (yyn <= 0) 04973 { 04974 if (yytable_value_is_error (yyn)) 04975 goto yyerrlab; 04976 yyn = -yyn; 04977 goto yyreduce; 04978 } 04979 04980 /* Count tokens shifted since error; after three, turn off error 04981 status. */ 04982 if (yyerrstatus) 04983 yyerrstatus--; 04984 04985 /* Shift the lookahead token. */ 04986 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 04987 04988 /* Discard the shifted token. */ 04989 yychar = YYEMPTY; 04990 04991 yystate = yyn; 04992 *++yyvsp = yylval; 04993 04994 goto yynewstate; 04995 04996 04997 /*-----------------------------------------------------------. 04998 | yydefault -- do the default action for the current state. | 04999 `-----------------------------------------------------------*/ 05000 yydefault: 05001 yyn = yydefact[yystate]; 05002 if (yyn == 0) 05003 goto yyerrlab; 05004 goto yyreduce; 05005 05006 05007 /*-----------------------------. 05008 | yyreduce -- Do a reduction. | 05009 `-----------------------------*/ 05010 yyreduce: 05011 /* yyn is the number of a rule to reduce with. */ 05012 yylen = yyr2[yyn]; 05013 05014 /* If YYLEN is nonzero, implement the default value of the action: 05015 `$$ = $1'. 05016 05017 Otherwise, the following line sets YYVAL to garbage. 05018 This behavior is undocumented and Bison 05019 users should not rely upon it. Assigning to YYVAL 05020 unconditionally makes the parser a bit smaller, and it avoids a 05021 GCC warning that YYVAL may be used uninitialized. */ 05022 yyval = yyvsp[1-yylen]; 05023 05024 05025 YY_REDUCE_PRINT (yyn); 05026 switch (yyn) 05027 { 05028 case 2: 05029 05030 /* Line 1806 of yacc.c */ 05031 #line 782 "ripper.y" 05032 { 05033 lex_state = EXPR_BEG; 05034 #if 0 05035 local_push(compile_for_eval || rb_parse_in_main()); 05036 #endif 05037 local_push(0); 05038 05039 } 05040 break; 05041 05042 case 3: 05043 05044 /* Line 1806 of yacc.c */ 05045 #line 791 "ripper.y" 05046 { 05047 #if 0 05048 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { 05049 /* last expression should not be void */ 05050 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); 05051 else { 05052 NODE *node = (yyvsp[(2) - (2)].val); 05053 while (node->nd_next) { 05054 node = node->nd_next; 05055 } 05056 void_expr(node->nd_head); 05057 } 05058 } 05059 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val))); 05060 #endif 05061 (yyval.val) = (yyvsp[(2) - (2)].val); 05062 parser->result = dispatch1(program, (yyval.val)); 05063 05064 local_pop(); 05065 } 05066 break; 05067 05068 case 4: 05069 05070 /* Line 1806 of yacc.c */ 05071 #line 814 "ripper.y" 05072 { 05073 #if 0 05074 void_stmts((yyvsp[(1) - (2)].val)); 05075 fixup_nodes(&deferred_nodes); 05076 #endif 05077 05078 (yyval.val) = (yyvsp[(1) - (2)].val); 05079 } 05080 break; 05081 05082 case 5: 05083 05084 /* Line 1806 of yacc.c */ 05085 #line 825 "ripper.y" 05086 { 05087 #if 0 05088 (yyval.val) = NEW_BEGIN(0); 05089 #endif 05090 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05091 dispatch0(void_stmt)); 05092 05093 } 05094 break; 05095 05096 case 6: 05097 05098 /* Line 1806 of yacc.c */ 05099 #line 834 "ripper.y" 05100 { 05101 #if 0 05102 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05103 #endif 05104 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05105 05106 } 05107 break; 05108 05109 case 7: 05110 05111 /* Line 1806 of yacc.c */ 05112 #line 842 "ripper.y" 05113 { 05114 #if 0 05115 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05116 #endif 05117 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05118 05119 } 05120 break; 05121 05122 case 8: 05123 05124 /* Line 1806 of yacc.c */ 05125 #line 850 "ripper.y" 05126 { 05127 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05128 } 05129 break; 05130 05131 case 10: 05132 05133 /* Line 1806 of yacc.c */ 05134 #line 857 "ripper.y" 05135 { 05136 if (in_def || in_single) { 05137 yyerror("BEGIN in method"); 05138 } 05139 #if 0 05140 /* local_push(0); */ 05141 #endif 05142 05143 } 05144 break; 05145 05146 case 11: 05147 05148 /* Line 1806 of yacc.c */ 05149 #line 867 "ripper.y" 05150 { 05151 #if 0 05152 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 05153 (yyvsp[(4) - (5)].val)); 05154 /* NEW_PREEXE($4)); */ 05155 /* local_pop(); */ 05156 (yyval.val) = NEW_BEGIN(0); 05157 #endif 05158 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 05159 05160 } 05161 break; 05162 05163 case 12: 05164 05165 /* Line 1806 of yacc.c */ 05166 #line 884 "ripper.y" 05167 { 05168 #if 0 05169 (yyval.val) = (yyvsp[(1) - (4)].val); 05170 if ((yyvsp[(2) - (4)].val)) { 05171 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 05172 } 05173 else if ((yyvsp[(3) - (4)].val)) { 05174 rb_warn0("else without rescue is useless"); 05175 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); 05176 } 05177 if ((yyvsp[(4) - (4)].val)) { 05178 if ((yyval.val)) { 05179 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); 05180 } 05181 else { 05182 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); 05183 } 05184 } 05185 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05186 #endif 05187 (yyval.val) = dispatch4(bodystmt, 05188 escape_Qundef((yyvsp[(1) - (4)].val)), 05189 escape_Qundef((yyvsp[(2) - (4)].val)), 05190 escape_Qundef((yyvsp[(3) - (4)].val)), 05191 escape_Qundef((yyvsp[(4) - (4)].val))); 05192 05193 } 05194 break; 05195 05196 case 13: 05197 05198 /* Line 1806 of yacc.c */ 05199 #line 914 "ripper.y" 05200 { 05201 #if 0 05202 void_stmts((yyvsp[(1) - (2)].val)); 05203 fixup_nodes(&deferred_nodes); 05204 #endif 05205 05206 (yyval.val) = (yyvsp[(1) - (2)].val); 05207 } 05208 break; 05209 05210 case 14: 05211 05212 /* Line 1806 of yacc.c */ 05213 #line 925 "ripper.y" 05214 { 05215 #if 0 05216 (yyval.val) = NEW_BEGIN(0); 05217 #endif 05218 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 05219 dispatch0(void_stmt)); 05220 05221 } 05222 break; 05223 05224 case 15: 05225 05226 /* Line 1806 of yacc.c */ 05227 #line 934 "ripper.y" 05228 { 05229 #if 0 05230 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 05231 #endif 05232 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 05233 05234 } 05235 break; 05236 05237 case 16: 05238 05239 /* Line 1806 of yacc.c */ 05240 #line 942 "ripper.y" 05241 { 05242 #if 0 05243 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 05244 #endif 05245 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05246 05247 } 05248 break; 05249 05250 case 17: 05251 05252 /* Line 1806 of yacc.c */ 05253 #line 950 "ripper.y" 05254 { 05255 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 05256 } 05257 break; 05258 05259 case 18: 05260 05261 /* Line 1806 of yacc.c */ 05262 #line 955 "ripper.y" 05263 {lex_state = EXPR_FNAME;} 05264 break; 05265 05266 case 19: 05267 05268 /* Line 1806 of yacc.c */ 05269 #line 956 "ripper.y" 05270 { 05271 #if 0 05272 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05273 #endif 05274 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 05275 05276 } 05277 break; 05278 05279 case 20: 05280 05281 /* Line 1806 of yacc.c */ 05282 #line 964 "ripper.y" 05283 { 05284 #if 0 05285 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05286 #endif 05287 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05288 05289 } 05290 break; 05291 05292 case 21: 05293 05294 /* Line 1806 of yacc.c */ 05295 #line 972 "ripper.y" 05296 { 05297 #if 0 05298 char buf[2]; 05299 buf[0] = '$'; 05300 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth; 05301 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2)); 05302 #endif 05303 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05304 05305 } 05306 break; 05307 05308 case 22: 05309 05310 /* Line 1806 of yacc.c */ 05311 #line 983 "ripper.y" 05312 { 05313 #if 0 05314 yyerror("can't make alias for the number variables"); 05315 (yyval.val) = NEW_BEGIN(0); 05316 #endif 05317 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05318 (yyval.val) = dispatch1(alias_error, (yyval.val)); 05319 05320 } 05321 break; 05322 05323 case 23: 05324 05325 /* Line 1806 of yacc.c */ 05326 #line 993 "ripper.y" 05327 { 05328 #if 0 05329 (yyval.val) = (yyvsp[(2) - (2)].val); 05330 #endif 05331 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); 05332 05333 } 05334 break; 05335 05336 case 24: 05337 05338 /* Line 1806 of yacc.c */ 05339 #line 1001 "ripper.y" 05340 { 05341 #if 0 05342 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05343 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05344 #endif 05345 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05346 05347 } 05348 break; 05349 05350 case 25: 05351 05352 /* Line 1806 of yacc.c */ 05353 #line 1010 "ripper.y" 05354 { 05355 #if 0 05356 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 05357 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 05358 #endif 05359 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05360 05361 } 05362 break; 05363 05364 case 26: 05365 05366 /* Line 1806 of yacc.c */ 05367 #line 1019 "ripper.y" 05368 { 05369 #if 0 05370 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05371 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05372 } 05373 else { 05374 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05375 } 05376 #endif 05377 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05378 05379 } 05380 break; 05381 05382 case 27: 05383 05384 /* Line 1806 of yacc.c */ 05385 #line 1032 "ripper.y" 05386 { 05387 #if 0 05388 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 05389 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 05390 } 05391 else { 05392 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 05393 } 05394 #endif 05395 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 05396 05397 } 05398 break; 05399 05400 case 28: 05401 05402 /* Line 1806 of yacc.c */ 05403 #line 1045 "ripper.y" 05404 { 05405 #if 0 05406 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); 05407 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); 05408 #endif 05409 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05410 05411 } 05412 break; 05413 05414 case 29: 05415 05416 /* Line 1806 of yacc.c */ 05417 #line 1054 "ripper.y" 05418 { 05419 if (in_def || in_single) { 05420 rb_warn0("END in method; use at_exit"); 05421 } 05422 #if 0 05423 (yyval.val) = NEW_POSTEXE(NEW_NODE( 05424 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); 05425 #endif 05426 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); 05427 05428 } 05429 break; 05430 05431 case 31: 05432 05433 /* Line 1806 of yacc.c */ 05434 #line 1067 "ripper.y" 05435 { 05436 #if 0 05437 value_expr((yyvsp[(3) - (3)].val)); 05438 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05439 (yyval.val) = (yyvsp[(1) - (3)].val); 05440 #endif 05441 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05442 05443 } 05444 break; 05445 05446 case 32: 05447 05448 /* Line 1806 of yacc.c */ 05449 #line 1077 "ripper.y" 05450 { 05451 #if 0 05452 value_expr((yyvsp[(3) - (3)].val)); 05453 if ((yyvsp[(1) - (3)].val)) { 05454 ID vid = (yyvsp[(1) - (3)].val)->nd_vid; 05455 if ((yyvsp[(2) - (3)].val) == tOROP) { 05456 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05457 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); 05458 if (is_asgn_or_id(vid)) { 05459 (yyval.val)->nd_aid = vid; 05460 } 05461 } 05462 else if ((yyvsp[(2) - (3)].val) == tANDOP) { 05463 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05464 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); 05465 } 05466 else { 05467 (yyval.val) = (yyvsp[(1) - (3)].val); 05468 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); 05469 } 05470 } 05471 else { 05472 (yyval.val) = NEW_BEGIN(0); 05473 } 05474 #endif 05475 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 05476 05477 } 05478 break; 05479 05480 case 33: 05481 05482 /* Line 1806 of yacc.c */ 05483 #line 1106 "ripper.y" 05484 { 05485 #if 0 05486 NODE *args; 05487 05488 value_expr((yyvsp[(6) - (6)].val)); 05489 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 05490 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 05491 if ((yyvsp[(5) - (6)].val) == tOROP) { 05492 (yyvsp[(5) - (6)].val) = 0; 05493 } 05494 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 05495 (yyvsp[(5) - (6)].val) = 1; 05496 } 05497 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 05498 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 05499 #endif 05500 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 05501 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 05502 05503 } 05504 break; 05505 05506 case 34: 05507 05508 /* Line 1806 of yacc.c */ 05509 #line 1127 "ripper.y" 05510 { 05511 #if 0 05512 value_expr((yyvsp[(5) - (5)].val)); 05513 if ((yyvsp[(4) - (5)].val) == tOROP) { 05514 (yyvsp[(4) - (5)].val) = 0; 05515 } 05516 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05517 (yyvsp[(4) - (5)].val) = 1; 05518 } 05519 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05520 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05521 #endif 05522 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 05523 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05524 05525 } 05526 break; 05527 05528 case 35: 05529 05530 /* Line 1806 of yacc.c */ 05531 #line 1144 "ripper.y" 05532 { 05533 #if 0 05534 value_expr((yyvsp[(5) - (5)].val)); 05535 if ((yyvsp[(4) - (5)].val) == tOROP) { 05536 (yyvsp[(4) - (5)].val) = 0; 05537 } 05538 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05539 (yyvsp[(4) - (5)].val) = 1; 05540 } 05541 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05542 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05543 #endif 05544 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 05545 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05546 05547 } 05548 break; 05549 05550 case 36: 05551 05552 /* Line 1806 of yacc.c */ 05553 #line 1161 "ripper.y" 05554 { 05555 #if 0 05556 yyerror("constant re-assignment"); 05557 (yyval.val) = 0; 05558 #endif 05559 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 05560 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05561 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05562 05563 } 05564 break; 05565 05566 case 37: 05567 05568 /* Line 1806 of yacc.c */ 05569 #line 1172 "ripper.y" 05570 { 05571 #if 0 05572 value_expr((yyvsp[(5) - (5)].val)); 05573 if ((yyvsp[(4) - (5)].val) == tOROP) { 05574 (yyvsp[(4) - (5)].val) = 0; 05575 } 05576 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 05577 (yyvsp[(4) - (5)].val) = 1; 05578 } 05579 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05580 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05581 #endif 05582 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); 05583 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 05584 05585 } 05586 break; 05587 05588 case 38: 05589 05590 /* Line 1806 of yacc.c */ 05591 #line 1189 "ripper.y" 05592 { 05593 #if 0 05594 rb_backref_error((yyvsp[(1) - (3)].val)); 05595 (yyval.val) = NEW_BEGIN(0); 05596 #endif 05597 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 05598 (yyval.val) = dispatch1(assign_error, (yyval.val)); 05599 05600 } 05601 break; 05602 05603 case 39: 05604 05605 /* Line 1806 of yacc.c */ 05606 #line 1199 "ripper.y" 05607 { 05608 #if 0 05609 value_expr((yyvsp[(3) - (3)].val)); 05610 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05611 #endif 05612 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05613 05614 } 05615 break; 05616 05617 case 40: 05618 05619 /* Line 1806 of yacc.c */ 05620 #line 1208 "ripper.y" 05621 { 05622 #if 0 05623 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05624 (yyval.val) = (yyvsp[(1) - (3)].val); 05625 #endif 05626 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05627 05628 } 05629 break; 05630 05631 case 41: 05632 05633 /* Line 1806 of yacc.c */ 05634 #line 1217 "ripper.y" 05635 { 05636 #if 0 05637 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 05638 (yyval.val) = (yyvsp[(1) - (3)].val); 05639 #endif 05640 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05641 05642 } 05643 break; 05644 05645 case 43: 05646 05647 /* Line 1806 of yacc.c */ 05648 #line 1229 "ripper.y" 05649 { 05650 #if 0 05651 value_expr((yyvsp[(3) - (3)].val)); 05652 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05653 #endif 05654 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05655 05656 } 05657 break; 05658 05659 case 44: 05660 05661 /* Line 1806 of yacc.c */ 05662 #line 1238 "ripper.y" 05663 { 05664 #if 0 05665 value_expr((yyvsp[(3) - (3)].val)); 05666 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05667 #endif 05668 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05669 05670 } 05671 break; 05672 05673 case 46: 05674 05675 /* Line 1806 of yacc.c */ 05676 #line 1251 "ripper.y" 05677 { 05678 #if 0 05679 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05680 #endif 05681 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); 05682 05683 } 05684 break; 05685 05686 case 47: 05687 05688 /* Line 1806 of yacc.c */ 05689 #line 1259 "ripper.y" 05690 { 05691 #if 0 05692 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 05693 #endif 05694 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); 05695 05696 } 05697 break; 05698 05699 case 48: 05700 05701 /* Line 1806 of yacc.c */ 05702 #line 1267 "ripper.y" 05703 { 05704 #if 0 05705 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); 05706 #endif 05707 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); 05708 05709 } 05710 break; 05711 05712 case 49: 05713 05714 /* Line 1806 of yacc.c */ 05715 #line 1275 "ripper.y" 05716 { 05717 #if 0 05718 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 05719 #endif 05720 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); 05721 05722 } 05723 break; 05724 05725 case 51: 05726 05727 /* Line 1806 of yacc.c */ 05728 #line 1286 "ripper.y" 05729 { 05730 #if 0 05731 value_expr((yyvsp[(1) - (1)].val)); 05732 (yyval.val) = (yyvsp[(1) - (1)].val); 05733 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 05734 #endif 05735 (yyval.val) = (yyvsp[(1) - (1)].val); 05736 05737 } 05738 break; 05739 05740 case 55: 05741 05742 /* Line 1806 of yacc.c */ 05743 #line 1303 "ripper.y" 05744 { 05745 #if 0 05746 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05747 #endif 05748 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 05749 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05750 05751 } 05752 break; 05753 05754 case 56: 05755 05756 /* Line 1806 of yacc.c */ 05757 #line 1312 "ripper.y" 05758 { 05759 #if 0 05760 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05761 #endif 05762 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); 05763 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 05764 05765 } 05766 break; 05767 05768 case 57: 05769 05770 /* Line 1806 of yacc.c */ 05771 #line 1323 "ripper.y" 05772 { 05773 (yyvsp[(1) - (1)].vars) = dyna_push(); 05774 #if 0 05775 (yyval.num) = ruby_sourceline; 05776 #endif 05777 05778 } 05779 break; 05780 05781 case 58: 05782 05783 /* Line 1806 of yacc.c */ 05784 #line 1333 "ripper.y" 05785 { 05786 #if 0 05787 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 05788 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 05789 #endif 05790 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 05791 05792 dyna_pop((yyvsp[(1) - (5)].vars)); 05793 } 05794 break; 05795 05796 case 59: 05797 05798 /* Line 1806 of yacc.c */ 05799 #line 1345 "ripper.y" 05800 { 05801 #if 0 05802 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05803 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05804 #endif 05805 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 05806 05807 } 05808 break; 05809 05810 case 60: 05811 05812 /* Line 1806 of yacc.c */ 05813 #line 1354 "ripper.y" 05814 { 05815 #if 0 05816 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); 05817 (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05818 (yyval.val) = (yyvsp[(3) - (3)].val); 05819 fixpos((yyval.val), (yyvsp[(2) - (3)].val)); 05820 #endif 05821 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 05822 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); 05823 05824 } 05825 break; 05826 05827 case 61: 05828 05829 /* Line 1806 of yacc.c */ 05830 #line 1366 "ripper.y" 05831 { 05832 #if 0 05833 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05834 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05835 #endif 05836 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05837 05838 } 05839 break; 05840 05841 case 62: 05842 05843 /* Line 1806 of yacc.c */ 05844 #line 1375 "ripper.y" 05845 { 05846 #if 0 05847 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 05848 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05849 (yyval.val) = (yyvsp[(5) - (5)].val); 05850 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05851 #endif 05852 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05853 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 05854 05855 } 05856 break; 05857 05858 case 63: 05859 05860 /* Line 1806 of yacc.c */ 05861 #line 1387 "ripper.y" 05862 { 05863 #if 0 05864 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05865 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 05866 #endif 05867 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 05868 05869 } 05870 break; 05871 05872 case 64: 05873 05874 /* Line 1806 of yacc.c */ 05875 #line 1396 "ripper.y" 05876 { 05877 #if 0 05878 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 05879 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05880 (yyval.val) = (yyvsp[(5) - (5)].val); 05881 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 05882 #endif 05883 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 05884 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 05885 05886 } 05887 break; 05888 05889 case 65: 05890 05891 /* Line 1806 of yacc.c */ 05892 #line 1408 "ripper.y" 05893 { 05894 #if 0 05895 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 05896 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05897 #endif 05898 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 05899 05900 } 05901 break; 05902 05903 case 66: 05904 05905 /* Line 1806 of yacc.c */ 05906 #line 1417 "ripper.y" 05907 { 05908 #if 0 05909 (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); 05910 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 05911 #endif 05912 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); 05913 05914 } 05915 break; 05916 05917 case 67: 05918 05919 /* Line 1806 of yacc.c */ 05920 #line 1426 "ripper.y" 05921 { 05922 #if 0 05923 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); 05924 #endif 05925 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); 05926 05927 } 05928 break; 05929 05930 case 68: 05931 05932 /* Line 1806 of yacc.c */ 05933 #line 1434 "ripper.y" 05934 { 05935 #if 0 05936 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); 05937 #endif 05938 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); 05939 05940 } 05941 break; 05942 05943 case 69: 05944 05945 /* Line 1806 of yacc.c */ 05946 #line 1442 "ripper.y" 05947 { 05948 #if 0 05949 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); 05950 #endif 05951 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); 05952 05953 } 05954 break; 05955 05956 case 71: 05957 05958 /* Line 1806 of yacc.c */ 05959 #line 1453 "ripper.y" 05960 { 05961 #if 0 05962 (yyval.val) = (yyvsp[(2) - (3)].val); 05963 #endif 05964 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 05965 05966 } 05967 break; 05968 05969 case 73: 05970 05971 /* Line 1806 of yacc.c */ 05972 #line 1464 "ripper.y" 05973 { 05974 #if 0 05975 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); 05976 #endif 05977 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 05978 05979 } 05980 break; 05981 05982 case 74: 05983 05984 /* Line 1806 of yacc.c */ 05985 #line 1474 "ripper.y" 05986 { 05987 #if 0 05988 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 05989 #endif 05990 (yyval.val) = (yyvsp[(1) - (1)].val); 05991 05992 } 05993 break; 05994 05995 case 75: 05996 05997 /* Line 1806 of yacc.c */ 05998 #line 1482 "ripper.y" 05999 { 06000 #if 0 06001 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); 06002 #endif 06003 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 06004 06005 } 06006 break; 06007 06008 case 76: 06009 06010 /* Line 1806 of yacc.c */ 06011 #line 1490 "ripper.y" 06012 { 06013 #if 0 06014 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06015 #endif 06016 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06017 06018 } 06019 break; 06020 06021 case 77: 06022 06023 /* Line 1806 of yacc.c */ 06024 #line 1498 "ripper.y" 06025 { 06026 #if 0 06027 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); 06028 #endif 06029 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06030 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 06031 06032 } 06033 break; 06034 06035 case 78: 06036 06037 /* Line 1806 of yacc.c */ 06038 #line 1507 "ripper.y" 06039 { 06040 #if 0 06041 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); 06042 #endif 06043 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); 06044 06045 } 06046 break; 06047 06048 case 79: 06049 06050 /* Line 1806 of yacc.c */ 06051 #line 1515 "ripper.y" 06052 { 06053 #if 0 06054 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); 06055 #endif 06056 (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); 06057 (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06058 06059 } 06060 break; 06061 06062 case 80: 06063 06064 /* Line 1806 of yacc.c */ 06065 #line 1524 "ripper.y" 06066 { 06067 #if 0 06068 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); 06069 #endif 06070 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); 06071 06072 } 06073 break; 06074 06075 case 81: 06076 06077 /* Line 1806 of yacc.c */ 06078 #line 1532 "ripper.y" 06079 { 06080 #if 0 06081 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); 06082 #endif 06083 (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); 06084 (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 06085 06086 } 06087 break; 06088 06089 case 82: 06090 06091 /* Line 1806 of yacc.c */ 06092 #line 1541 "ripper.y" 06093 { 06094 #if 0 06095 (yyval.val) = NEW_MASGN(0, -1); 06096 #endif 06097 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06098 06099 } 06100 break; 06101 06102 case 83: 06103 06104 /* Line 1806 of yacc.c */ 06105 #line 1549 "ripper.y" 06106 { 06107 #if 0 06108 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 06109 #endif 06110 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 06111 (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val)); 06112 06113 } 06114 break; 06115 06116 case 85: 06117 06118 /* Line 1806 of yacc.c */ 06119 #line 1561 "ripper.y" 06120 { 06121 #if 0 06122 (yyval.val) = (yyvsp[(2) - (3)].val); 06123 #endif 06124 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 06125 06126 } 06127 break; 06128 06129 case 86: 06130 06131 /* Line 1806 of yacc.c */ 06132 #line 1571 "ripper.y" 06133 { 06134 #if 0 06135 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); 06136 #endif 06137 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); 06138 06139 } 06140 break; 06141 06142 case 87: 06143 06144 /* Line 1806 of yacc.c */ 06145 #line 1579 "ripper.y" 06146 { 06147 #if 0 06148 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06149 #endif 06150 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 06151 06152 } 06153 break; 06154 06155 case 88: 06156 06157 /* Line 1806 of yacc.c */ 06158 #line 1589 "ripper.y" 06159 { 06160 #if 0 06161 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 06162 #endif 06163 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 06164 06165 } 06166 break; 06167 06168 case 89: 06169 06170 /* Line 1806 of yacc.c */ 06171 #line 1597 "ripper.y" 06172 { 06173 #if 0 06174 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06175 #endif 06176 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06177 06178 } 06179 break; 06180 06181 case 90: 06182 06183 /* Line 1806 of yacc.c */ 06184 #line 1607 "ripper.y" 06185 { 06186 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06187 } 06188 break; 06189 06190 case 91: 06191 06192 /* Line 1806 of yacc.c */ 06193 #line 1611 "ripper.y" 06194 { 06195 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06196 } 06197 break; 06198 06199 case 92: 06200 06201 /* Line 1806 of yacc.c */ 06202 #line 1615 "ripper.y" 06203 { 06204 #if 0 06205 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06206 #endif 06207 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06208 06209 } 06210 break; 06211 06212 case 93: 06213 06214 /* Line 1806 of yacc.c */ 06215 #line 1623 "ripper.y" 06216 { 06217 #if 0 06218 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06219 #endif 06220 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06221 06222 } 06223 break; 06224 06225 case 94: 06226 06227 /* Line 1806 of yacc.c */ 06228 #line 1631 "ripper.y" 06229 { 06230 #if 0 06231 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06232 #endif 06233 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06234 06235 } 06236 break; 06237 06238 case 95: 06239 06240 /* Line 1806 of yacc.c */ 06241 #line 1639 "ripper.y" 06242 { 06243 #if 0 06244 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06245 #endif 06246 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06247 06248 } 06249 break; 06250 06251 case 96: 06252 06253 /* Line 1806 of yacc.c */ 06254 #line 1647 "ripper.y" 06255 { 06256 #if 0 06257 if (in_def || in_single) 06258 yyerror("dynamic constant assignment"); 06259 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06260 #endif 06261 if (in_def || in_single) 06262 yyerror("dynamic constant assignment"); 06263 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06264 06265 } 06266 break; 06267 06268 case 97: 06269 06270 /* Line 1806 of yacc.c */ 06271 #line 1659 "ripper.y" 06272 { 06273 #if 0 06274 if (in_def || in_single) 06275 yyerror("dynamic constant assignment"); 06276 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06277 #endif 06278 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06279 06280 } 06281 break; 06282 06283 case 98: 06284 06285 /* Line 1806 of yacc.c */ 06286 #line 1669 "ripper.y" 06287 { 06288 #if 0 06289 rb_backref_error((yyvsp[(1) - (1)].val)); 06290 (yyval.val) = NEW_BEGIN(0); 06291 #endif 06292 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); 06293 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06294 06295 } 06296 break; 06297 06298 case 99: 06299 06300 /* Line 1806 of yacc.c */ 06301 #line 1681 "ripper.y" 06302 { 06303 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06304 #if 0 06305 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06306 #endif 06307 (yyval.val) = dispatch1(var_field, (yyval.val)); 06308 06309 } 06310 break; 06311 06312 case 100: 06313 06314 /* Line 1806 of yacc.c */ 06315 #line 1690 "ripper.y" 06316 { 06317 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 06318 #if 0 06319 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 06320 #endif 06321 (yyval.val) = dispatch1(var_field, (yyval.val)); 06322 06323 } 06324 break; 06325 06326 case 101: 06327 06328 /* Line 1806 of yacc.c */ 06329 #line 1699 "ripper.y" 06330 { 06331 #if 0 06332 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 06333 #endif 06334 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 06335 06336 } 06337 break; 06338 06339 case 102: 06340 06341 /* Line 1806 of yacc.c */ 06342 #line 1707 "ripper.y" 06343 { 06344 #if 0 06345 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06346 #endif 06347 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06348 06349 } 06350 break; 06351 06352 case 103: 06353 06354 /* Line 1806 of yacc.c */ 06355 #line 1715 "ripper.y" 06356 { 06357 #if 0 06358 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06359 #endif 06360 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 06361 06362 } 06363 break; 06364 06365 case 104: 06366 06367 /* Line 1806 of yacc.c */ 06368 #line 1723 "ripper.y" 06369 { 06370 #if 0 06371 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06372 #endif 06373 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 06374 06375 } 06376 break; 06377 06378 case 105: 06379 06380 /* Line 1806 of yacc.c */ 06381 #line 1731 "ripper.y" 06382 { 06383 #if 0 06384 if (in_def || in_single) 06385 yyerror("dynamic constant assignment"); 06386 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 06387 #endif 06388 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06389 if (in_def || in_single) { 06390 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06391 } 06392 06393 } 06394 break; 06395 06396 case 106: 06397 06398 /* Line 1806 of yacc.c */ 06399 #line 1744 "ripper.y" 06400 { 06401 #if 0 06402 if (in_def || in_single) 06403 yyerror("dynamic constant assignment"); 06404 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 06405 #endif 06406 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 06407 if (in_def || in_single) { 06408 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06409 } 06410 06411 } 06412 break; 06413 06414 case 107: 06415 06416 /* Line 1806 of yacc.c */ 06417 #line 1757 "ripper.y" 06418 { 06419 #if 0 06420 rb_backref_error((yyvsp[(1) - (1)].val)); 06421 (yyval.val) = NEW_BEGIN(0); 06422 #endif 06423 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); 06424 06425 } 06426 break; 06427 06428 case 108: 06429 06430 /* Line 1806 of yacc.c */ 06431 #line 1768 "ripper.y" 06432 { 06433 #if 0 06434 yyerror("class/module name must be CONSTANT"); 06435 #endif 06436 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); 06437 06438 } 06439 break; 06440 06441 case 110: 06442 06443 /* Line 1806 of yacc.c */ 06444 #line 1779 "ripper.y" 06445 { 06446 #if 0 06447 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 06448 #endif 06449 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 06450 06451 } 06452 break; 06453 06454 case 111: 06455 06456 /* Line 1806 of yacc.c */ 06457 #line 1787 "ripper.y" 06458 { 06459 #if 0 06460 (yyval.val) = NEW_COLON2(0, (yyval.val)); 06461 #endif 06462 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); 06463 06464 } 06465 break; 06466 06467 case 112: 06468 06469 /* Line 1806 of yacc.c */ 06470 #line 1795 "ripper.y" 06471 { 06472 #if 0 06473 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06474 #endif 06475 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06476 06477 } 06478 break; 06479 06480 case 116: 06481 06482 /* Line 1806 of yacc.c */ 06483 #line 1808 "ripper.y" 06484 { 06485 lex_state = EXPR_ENDFN; 06486 (yyval.val) = (yyvsp[(1) - (1)].val); 06487 } 06488 break; 06489 06490 case 117: 06491 06492 /* Line 1806 of yacc.c */ 06493 #line 1813 "ripper.y" 06494 { 06495 lex_state = EXPR_ENDFN; 06496 #if 0 06497 (yyval.val) = (yyvsp[(1) - (1)].id); 06498 #endif 06499 (yyval.val) = (yyvsp[(1) - (1)].val); 06500 06501 } 06502 break; 06503 06504 case 120: 06505 06506 /* Line 1806 of yacc.c */ 06507 #line 1828 "ripper.y" 06508 { 06509 #if 0 06510 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 06511 #endif 06512 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 06513 06514 } 06515 break; 06516 06517 case 122: 06518 06519 /* Line 1806 of yacc.c */ 06520 #line 1839 "ripper.y" 06521 { 06522 #if 0 06523 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); 06524 #endif 06525 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 06526 06527 } 06528 break; 06529 06530 case 123: 06531 06532 /* Line 1806 of yacc.c */ 06533 #line 1846 "ripper.y" 06534 {lex_state = EXPR_FNAME;} 06535 break; 06536 06537 case 124: 06538 06539 /* Line 1806 of yacc.c */ 06540 #line 1847 "ripper.y" 06541 { 06542 #if 0 06543 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); 06544 #endif 06545 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 06546 06547 } 06548 break; 06549 06550 case 125: 06551 06552 /* Line 1806 of yacc.c */ 06553 #line 1856 "ripper.y" 06554 { ifndef_ripper((yyval.val) = '|'); } 06555 break; 06556 06557 case 126: 06558 06559 /* Line 1806 of yacc.c */ 06560 #line 1857 "ripper.y" 06561 { ifndef_ripper((yyval.val) = '^'); } 06562 break; 06563 06564 case 127: 06565 06566 /* Line 1806 of yacc.c */ 06567 #line 1858 "ripper.y" 06568 { ifndef_ripper((yyval.val) = '&'); } 06569 break; 06570 06571 case 128: 06572 06573 /* Line 1806 of yacc.c */ 06574 #line 1859 "ripper.y" 06575 { ifndef_ripper((yyval.val) = tCMP); } 06576 break; 06577 06578 case 129: 06579 06580 /* Line 1806 of yacc.c */ 06581 #line 1860 "ripper.y" 06582 { ifndef_ripper((yyval.val) = tEQ); } 06583 break; 06584 06585 case 130: 06586 06587 /* Line 1806 of yacc.c */ 06588 #line 1861 "ripper.y" 06589 { ifndef_ripper((yyval.val) = tEQQ); } 06590 break; 06591 06592 case 131: 06593 06594 /* Line 1806 of yacc.c */ 06595 #line 1862 "ripper.y" 06596 { ifndef_ripper((yyval.val) = tMATCH); } 06597 break; 06598 06599 case 132: 06600 06601 /* Line 1806 of yacc.c */ 06602 #line 1863 "ripper.y" 06603 { ifndef_ripper((yyval.val) = tNMATCH); } 06604 break; 06605 06606 case 133: 06607 06608 /* Line 1806 of yacc.c */ 06609 #line 1864 "ripper.y" 06610 { ifndef_ripper((yyval.val) = '>'); } 06611 break; 06612 06613 case 134: 06614 06615 /* Line 1806 of yacc.c */ 06616 #line 1865 "ripper.y" 06617 { ifndef_ripper((yyval.val) = tGEQ); } 06618 break; 06619 06620 case 135: 06621 06622 /* Line 1806 of yacc.c */ 06623 #line 1866 "ripper.y" 06624 { ifndef_ripper((yyval.val) = '<'); } 06625 break; 06626 06627 case 136: 06628 06629 /* Line 1806 of yacc.c */ 06630 #line 1867 "ripper.y" 06631 { ifndef_ripper((yyval.val) = tLEQ); } 06632 break; 06633 06634 case 137: 06635 06636 /* Line 1806 of yacc.c */ 06637 #line 1868 "ripper.y" 06638 { ifndef_ripper((yyval.val) = tNEQ); } 06639 break; 06640 06641 case 138: 06642 06643 /* Line 1806 of yacc.c */ 06644 #line 1869 "ripper.y" 06645 { ifndef_ripper((yyval.val) = tLSHFT); } 06646 break; 06647 06648 case 139: 06649 06650 /* Line 1806 of yacc.c */ 06651 #line 1870 "ripper.y" 06652 { ifndef_ripper((yyval.val) = tRSHFT); } 06653 break; 06654 06655 case 140: 06656 06657 /* Line 1806 of yacc.c */ 06658 #line 1871 "ripper.y" 06659 { ifndef_ripper((yyval.val) = '+'); } 06660 break; 06661 06662 case 141: 06663 06664 /* Line 1806 of yacc.c */ 06665 #line 1872 "ripper.y" 06666 { ifndef_ripper((yyval.val) = '-'); } 06667 break; 06668 06669 case 142: 06670 06671 /* Line 1806 of yacc.c */ 06672 #line 1873 "ripper.y" 06673 { ifndef_ripper((yyval.val) = '*'); } 06674 break; 06675 06676 case 143: 06677 06678 /* Line 1806 of yacc.c */ 06679 #line 1874 "ripper.y" 06680 { ifndef_ripper((yyval.val) = '*'); } 06681 break; 06682 06683 case 144: 06684 06685 /* Line 1806 of yacc.c */ 06686 #line 1875 "ripper.y" 06687 { ifndef_ripper((yyval.val) = '/'); } 06688 break; 06689 06690 case 145: 06691 06692 /* Line 1806 of yacc.c */ 06693 #line 1876 "ripper.y" 06694 { ifndef_ripper((yyval.val) = '%'); } 06695 break; 06696 06697 case 146: 06698 06699 /* Line 1806 of yacc.c */ 06700 #line 1877 "ripper.y" 06701 { ifndef_ripper((yyval.val) = tPOW); } 06702 break; 06703 06704 case 147: 06705 06706 /* Line 1806 of yacc.c */ 06707 #line 1878 "ripper.y" 06708 { ifndef_ripper((yyval.val) = '!'); } 06709 break; 06710 06711 case 148: 06712 06713 /* Line 1806 of yacc.c */ 06714 #line 1879 "ripper.y" 06715 { ifndef_ripper((yyval.val) = '~'); } 06716 break; 06717 06718 case 149: 06719 06720 /* Line 1806 of yacc.c */ 06721 #line 1880 "ripper.y" 06722 { ifndef_ripper((yyval.val) = tUPLUS); } 06723 break; 06724 06725 case 150: 06726 06727 /* Line 1806 of yacc.c */ 06728 #line 1881 "ripper.y" 06729 { ifndef_ripper((yyval.val) = tUMINUS); } 06730 break; 06731 06732 case 151: 06733 06734 /* Line 1806 of yacc.c */ 06735 #line 1882 "ripper.y" 06736 { ifndef_ripper((yyval.val) = tAREF); } 06737 break; 06738 06739 case 152: 06740 06741 /* Line 1806 of yacc.c */ 06742 #line 1883 "ripper.y" 06743 { ifndef_ripper((yyval.val) = tASET); } 06744 break; 06745 06746 case 153: 06747 06748 /* Line 1806 of yacc.c */ 06749 #line 1884 "ripper.y" 06750 { ifndef_ripper((yyval.val) = '`'); } 06751 break; 06752 06753 case 195: 06754 06755 /* Line 1806 of yacc.c */ 06756 #line 1902 "ripper.y" 06757 { 06758 #if 0 06759 value_expr((yyvsp[(3) - (3)].val)); 06760 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06761 #endif 06762 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 06763 06764 } 06765 break; 06766 06767 case 196: 06768 06769 /* Line 1806 of yacc.c */ 06770 #line 1911 "ripper.y" 06771 { 06772 #if 0 06773 value_expr((yyvsp[(3) - (5)].val)); 06774 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06775 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06776 #endif 06777 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); 06778 06779 } 06780 break; 06781 06782 case 197: 06783 06784 /* Line 1806 of yacc.c */ 06785 #line 1921 "ripper.y" 06786 { 06787 #if 0 06788 value_expr((yyvsp[(3) - (3)].val)); 06789 if ((yyvsp[(1) - (3)].val)) { 06790 ID vid = (yyvsp[(1) - (3)].val)->nd_vid; 06791 if ((yyvsp[(2) - (3)].val) == tOROP) { 06792 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 06793 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val)); 06794 if (is_asgn_or_id(vid)) { 06795 (yyval.val)->nd_aid = vid; 06796 } 06797 } 06798 else if ((yyvsp[(2) - (3)].val) == tANDOP) { 06799 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 06800 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val)); 06801 } 06802 else { 06803 (yyval.val) = (yyvsp[(1) - (3)].val); 06804 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val))); 06805 } 06806 } 06807 else { 06808 (yyval.val) = NEW_BEGIN(0); 06809 } 06810 #endif 06811 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06812 06813 } 06814 break; 06815 06816 case 198: 06817 06818 /* Line 1806 of yacc.c */ 06819 #line 1950 "ripper.y" 06820 { 06821 #if 0 06822 value_expr((yyvsp[(3) - (5)].val)); 06823 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 06824 if ((yyvsp[(1) - (5)].val)) { 06825 ID vid = (yyvsp[(1) - (5)].val)->nd_vid; 06826 if ((yyvsp[(2) - (5)].val) == tOROP) { 06827 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); 06828 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val)); 06829 if (is_asgn_or_id(vid)) { 06830 (yyval.val)->nd_aid = vid; 06831 } 06832 } 06833 else if ((yyvsp[(2) - (5)].val) == tANDOP) { 06834 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val); 06835 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val)); 06836 } 06837 else { 06838 (yyval.val) = (yyvsp[(1) - (5)].val); 06839 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val))); 06840 } 06841 } 06842 else { 06843 (yyval.val) = NEW_BEGIN(0); 06844 } 06845 #endif 06846 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 06847 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); 06848 06849 } 06850 break; 06851 06852 case 199: 06853 06854 /* Line 1806 of yacc.c */ 06855 #line 1981 "ripper.y" 06856 { 06857 #if 0 06858 NODE *args; 06859 06860 value_expr((yyvsp[(6) - (6)].val)); 06861 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 06862 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) { 06863 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06864 } 06865 else { 06866 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 06867 } 06868 if ((yyvsp[(5) - (6)].val) == tOROP) { 06869 (yyvsp[(5) - (6)].val) = 0; 06870 } 06871 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 06872 (yyvsp[(5) - (6)].val) = 1; 06873 } 06874 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 06875 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 06876 #endif 06877 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 06878 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 06879 06880 } 06881 break; 06882 06883 case 200: 06884 06885 /* Line 1806 of yacc.c */ 06886 #line 2007 "ripper.y" 06887 { 06888 #if 0 06889 value_expr((yyvsp[(5) - (5)].val)); 06890 if ((yyvsp[(4) - (5)].val) == tOROP) { 06891 (yyvsp[(4) - (5)].val) = 0; 06892 } 06893 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06894 (yyvsp[(4) - (5)].val) = 1; 06895 } 06896 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06897 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06898 #endif 06899 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 06900 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06901 06902 } 06903 break; 06904 06905 case 201: 06906 06907 /* Line 1806 of yacc.c */ 06908 #line 2024 "ripper.y" 06909 { 06910 #if 0 06911 value_expr((yyvsp[(5) - (5)].val)); 06912 if ((yyvsp[(4) - (5)].val) == tOROP) { 06913 (yyvsp[(4) - (5)].val) = 0; 06914 } 06915 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06916 (yyvsp[(4) - (5)].val) = 1; 06917 } 06918 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06919 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06920 #endif 06921 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 06922 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06923 06924 } 06925 break; 06926 06927 case 202: 06928 06929 /* Line 1806 of yacc.c */ 06930 #line 2041 "ripper.y" 06931 { 06932 #if 0 06933 value_expr((yyvsp[(5) - (5)].val)); 06934 if ((yyvsp[(4) - (5)].val) == tOROP) { 06935 (yyvsp[(4) - (5)].val) = 0; 06936 } 06937 else if ((yyvsp[(4) - (5)].val) == tANDOP) { 06938 (yyvsp[(4) - (5)].val) = 1; 06939 } 06940 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06941 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 06942 #endif 06943 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val)); 06944 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06945 06946 } 06947 break; 06948 06949 case 203: 06950 06951 /* Line 1806 of yacc.c */ 06952 #line 2058 "ripper.y" 06953 { 06954 #if 0 06955 yyerror("constant re-assignment"); 06956 (yyval.val) = NEW_BEGIN(0); 06957 #endif 06958 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 06959 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 06960 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06961 06962 } 06963 break; 06964 06965 case 204: 06966 06967 /* Line 1806 of yacc.c */ 06968 #line 2069 "ripper.y" 06969 { 06970 #if 0 06971 yyerror("constant re-assignment"); 06972 (yyval.val) = NEW_BEGIN(0); 06973 #endif 06974 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); 06975 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 06976 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06977 06978 } 06979 break; 06980 06981 case 205: 06982 06983 /* Line 1806 of yacc.c */ 06984 #line 2080 "ripper.y" 06985 { 06986 #if 0 06987 rb_backref_error((yyvsp[(1) - (3)].val)); 06988 (yyval.val) = NEW_BEGIN(0); 06989 #endif 06990 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); 06991 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 06992 (yyval.val) = dispatch1(assign_error, (yyval.val)); 06993 06994 } 06995 break; 06996 06997 case 206: 06998 06999 /* Line 1806 of yacc.c */ 07000 #line 2091 "ripper.y" 07001 { 07002 #if 0 07003 value_expr((yyvsp[(1) - (3)].val)); 07004 value_expr((yyvsp[(3) - (3)].val)); 07005 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07006 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 07007 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 07008 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 07009 } 07010 #endif 07011 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07012 07013 } 07014 break; 07015 07016 case 207: 07017 07018 /* Line 1806 of yacc.c */ 07019 #line 2105 "ripper.y" 07020 { 07021 #if 0 07022 value_expr((yyvsp[(1) - (3)].val)); 07023 value_expr((yyvsp[(3) - (3)].val)); 07024 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07025 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 07026 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 07027 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 07028 } 07029 #endif 07030 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07031 07032 } 07033 break; 07034 07035 case 208: 07036 07037 /* Line 1806 of yacc.c */ 07038 #line 2119 "ripper.y" 07039 { 07040 #if 0 07041 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); 07042 #endif 07043 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); 07044 07045 } 07046 break; 07047 07048 case 209: 07049 07050 /* Line 1806 of yacc.c */ 07051 #line 2127 "ripper.y" 07052 { 07053 #if 0 07054 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); 07055 #endif 07056 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); 07057 07058 } 07059 break; 07060 07061 case 210: 07062 07063 /* Line 1806 of yacc.c */ 07064 #line 2135 "ripper.y" 07065 { 07066 #if 0 07067 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); 07068 #endif 07069 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); 07070 07071 } 07072 break; 07073 07074 case 211: 07075 07076 /* Line 1806 of yacc.c */ 07077 #line 2143 "ripper.y" 07078 { 07079 #if 0 07080 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); 07081 #endif 07082 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); 07083 07084 } 07085 break; 07086 07087 case 212: 07088 07089 /* Line 1806 of yacc.c */ 07090 #line 2151 "ripper.y" 07091 { 07092 #if 0 07093 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); 07094 #endif 07095 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); 07096 07097 } 07098 break; 07099 07100 case 213: 07101 07102 /* Line 1806 of yacc.c */ 07103 #line 2159 "ripper.y" 07104 { 07105 #if 0 07106 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); 07107 #endif 07108 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); 07109 07110 } 07111 break; 07112 07113 case 214: 07114 07115 /* Line 1806 of yacc.c */ 07116 #line 2167 "ripper.y" 07117 { 07118 #if 0 07119 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 07120 #endif 07121 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 07122 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07123 07124 } 07125 break; 07126 07127 case 215: 07128 07129 /* Line 1806 of yacc.c */ 07130 #line 2176 "ripper.y" 07131 { 07132 #if 0 07133 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 07134 #endif 07135 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 07136 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 07137 07138 } 07139 break; 07140 07141 case 216: 07142 07143 /* Line 1806 of yacc.c */ 07144 #line 2185 "ripper.y" 07145 { 07146 #if 0 07147 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); 07148 #endif 07149 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); 07150 07151 } 07152 break; 07153 07154 case 217: 07155 07156 /* Line 1806 of yacc.c */ 07157 #line 2193 "ripper.y" 07158 { 07159 #if 0 07160 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); 07161 #endif 07162 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 07163 07164 } 07165 break; 07166 07167 case 218: 07168 07169 /* Line 1806 of yacc.c */ 07170 #line 2201 "ripper.y" 07171 { 07172 #if 0 07173 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); 07174 #endif 07175 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); 07176 07177 } 07178 break; 07179 07180 case 219: 07181 07182 /* Line 1806 of yacc.c */ 07183 #line 2209 "ripper.y" 07184 { 07185 #if 0 07186 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); 07187 #endif 07188 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); 07189 07190 } 07191 break; 07192 07193 case 220: 07194 07195 /* Line 1806 of yacc.c */ 07196 #line 2217 "ripper.y" 07197 { 07198 #if 0 07199 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); 07200 #endif 07201 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); 07202 07203 } 07204 break; 07205 07206 case 221: 07207 07208 /* Line 1806 of yacc.c */ 07209 #line 2225 "ripper.y" 07210 { 07211 #if 0 07212 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); 07213 #endif 07214 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); 07215 07216 } 07217 break; 07218 07219 case 222: 07220 07221 /* Line 1806 of yacc.c */ 07222 #line 2233 "ripper.y" 07223 { 07224 #if 0 07225 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); 07226 #endif 07227 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); 07228 07229 } 07230 break; 07231 07232 case 223: 07233 07234 /* Line 1806 of yacc.c */ 07235 #line 2241 "ripper.y" 07236 { 07237 #if 0 07238 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); 07239 #endif 07240 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); 07241 07242 } 07243 break; 07244 07245 case 224: 07246 07247 /* Line 1806 of yacc.c */ 07248 #line 2249 "ripper.y" 07249 { 07250 #if 0 07251 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); 07252 #endif 07253 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); 07254 07255 } 07256 break; 07257 07258 case 225: 07259 07260 /* Line 1806 of yacc.c */ 07261 #line 2257 "ripper.y" 07262 { 07263 #if 0 07264 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); 07265 #endif 07266 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); 07267 07268 } 07269 break; 07270 07271 case 226: 07272 07273 /* Line 1806 of yacc.c */ 07274 #line 2265 "ripper.y" 07275 { 07276 #if 0 07277 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); 07278 #endif 07279 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); 07280 07281 } 07282 break; 07283 07284 case 227: 07285 07286 /* Line 1806 of yacc.c */ 07287 #line 2273 "ripper.y" 07288 { 07289 #if 0 07290 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); 07291 #endif 07292 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); 07293 07294 } 07295 break; 07296 07297 case 228: 07298 07299 /* Line 1806 of yacc.c */ 07300 #line 2281 "ripper.y" 07301 { 07302 #if 0 07303 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); 07304 #endif 07305 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); 07306 07307 } 07308 break; 07309 07310 case 229: 07311 07312 /* Line 1806 of yacc.c */ 07313 #line 2289 "ripper.y" 07314 { 07315 #if 0 07316 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07317 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) { 07318 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); 07319 } 07320 #endif 07321 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); 07322 07323 } 07324 break; 07325 07326 case 230: 07327 07328 /* Line 1806 of yacc.c */ 07329 #line 2300 "ripper.y" 07330 { 07331 #if 0 07332 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); 07333 #endif 07334 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); 07335 07336 } 07337 break; 07338 07339 case 231: 07340 07341 /* Line 1806 of yacc.c */ 07342 #line 2308 "ripper.y" 07343 { 07344 #if 0 07345 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 07346 #endif 07347 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); 07348 07349 } 07350 break; 07351 07352 case 232: 07353 07354 /* Line 1806 of yacc.c */ 07355 #line 2316 "ripper.y" 07356 { 07357 #if 0 07358 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); 07359 #endif 07360 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); 07361 07362 } 07363 break; 07364 07365 case 233: 07366 07367 /* Line 1806 of yacc.c */ 07368 #line 2324 "ripper.y" 07369 { 07370 #if 0 07371 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); 07372 #endif 07373 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); 07374 07375 } 07376 break; 07377 07378 case 234: 07379 07380 /* Line 1806 of yacc.c */ 07381 #line 2332 "ripper.y" 07382 { 07383 #if 0 07384 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); 07385 #endif 07386 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); 07387 07388 } 07389 break; 07390 07391 case 235: 07392 07393 /* Line 1806 of yacc.c */ 07394 #line 2340 "ripper.y" 07395 { 07396 #if 0 07397 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07398 #endif 07399 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); 07400 07401 } 07402 break; 07403 07404 case 236: 07405 07406 /* Line 1806 of yacc.c */ 07407 #line 2348 "ripper.y" 07408 { 07409 #if 0 07410 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07411 #endif 07412 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); 07413 07414 } 07415 break; 07416 07417 case 237: 07418 07419 /* Line 1806 of yacc.c */ 07420 #line 2355 "ripper.y" 07421 {in_defined = 1;} 07422 break; 07423 07424 case 238: 07425 07426 /* Line 1806 of yacc.c */ 07427 #line 2356 "ripper.y" 07428 { 07429 #if 0 07430 in_defined = 0; 07431 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); 07432 #endif 07433 in_defined = 0; 07434 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); 07435 07436 } 07437 break; 07438 07439 case 239: 07440 07441 /* Line 1806 of yacc.c */ 07442 #line 2366 "ripper.y" 07443 { 07444 #if 0 07445 value_expr((yyvsp[(1) - (6)].val)); 07446 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07447 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 07448 #endif 07449 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 07450 07451 } 07452 break; 07453 07454 case 240: 07455 07456 /* Line 1806 of yacc.c */ 07457 #line 2376 "ripper.y" 07458 { 07459 (yyval.val) = (yyvsp[(1) - (1)].val); 07460 } 07461 break; 07462 07463 case 241: 07464 07465 /* Line 1806 of yacc.c */ 07466 #line 2382 "ripper.y" 07467 { 07468 #if 0 07469 value_expr((yyvsp[(1) - (1)].val)); 07470 (yyval.val) = (yyvsp[(1) - (1)].val); 07471 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 07472 #endif 07473 (yyval.val) = (yyvsp[(1) - (1)].val); 07474 07475 } 07476 break; 07477 07478 case 243: 07479 07480 /* Line 1806 of yacc.c */ 07481 #line 2395 "ripper.y" 07482 { 07483 (yyval.val) = (yyvsp[(1) - (2)].val); 07484 } 07485 break; 07486 07487 case 244: 07488 07489 /* Line 1806 of yacc.c */ 07490 #line 2399 "ripper.y" 07491 { 07492 #if 0 07493 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07494 #endif 07495 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07496 07497 } 07498 break; 07499 07500 case 245: 07501 07502 /* Line 1806 of yacc.c */ 07503 #line 2407 "ripper.y" 07504 { 07505 #if 0 07506 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07507 #endif 07508 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07509 07510 } 07511 break; 07512 07513 case 246: 07514 07515 /* Line 1806 of yacc.c */ 07516 #line 2417 "ripper.y" 07517 { 07518 #if 0 07519 (yyval.val) = (yyvsp[(2) - (3)].val); 07520 #endif 07521 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); 07522 07523 } 07524 break; 07525 07526 case 251: 07527 07528 /* Line 1806 of yacc.c */ 07529 #line 2433 "ripper.y" 07530 { 07531 (yyval.val) = (yyvsp[(1) - (2)].val); 07532 } 07533 break; 07534 07535 case 252: 07536 07537 /* Line 1806 of yacc.c */ 07538 #line 2437 "ripper.y" 07539 { 07540 #if 0 07541 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07542 #endif 07543 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 07544 07545 } 07546 break; 07547 07548 case 253: 07549 07550 /* Line 1806 of yacc.c */ 07551 #line 2445 "ripper.y" 07552 { 07553 #if 0 07554 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07555 #endif 07556 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07557 07558 } 07559 break; 07560 07561 case 254: 07562 07563 /* Line 1806 of yacc.c */ 07564 #line 2455 "ripper.y" 07565 { 07566 #if 0 07567 value_expr((yyvsp[(1) - (1)].val)); 07568 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07569 #endif 07570 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07571 07572 } 07573 break; 07574 07575 case 255: 07576 07577 /* Line 1806 of yacc.c */ 07578 #line 2464 "ripper.y" 07579 { 07580 #if 0 07581 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07582 #endif 07583 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 07584 07585 } 07586 break; 07587 07588 case 256: 07589 07590 /* Line 1806 of yacc.c */ 07591 #line 2472 "ripper.y" 07592 { 07593 #if 0 07594 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 07595 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); 07596 #endif 07597 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 07598 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); 07599 07600 } 07601 break; 07602 07603 case 257: 07604 07605 /* Line 1806 of yacc.c */ 07606 #line 2482 "ripper.y" 07607 { 07608 #if 0 07609 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 07610 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); 07611 #endif 07612 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); 07613 07614 } 07615 break; 07616 07617 case 258: 07618 07619 /* Line 1806 of yacc.c */ 07620 #line 2493 "ripper.y" 07621 { 07622 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); 07623 } 07624 break; 07625 07626 case 259: 07627 07628 /* Line 1806 of yacc.c */ 07629 #line 2499 "ripper.y" 07630 { 07631 (yyval.val) = cmdarg_stack; 07632 CMDARG_PUSH(1); 07633 } 07634 break; 07635 07636 case 260: 07637 07638 /* Line 1806 of yacc.c */ 07639 #line 2504 "ripper.y" 07640 { 07641 /* CMDARG_POP() */ 07642 cmdarg_stack = (yyvsp[(1) - (2)].val); 07643 (yyval.val) = (yyvsp[(2) - (2)].val); 07644 } 07645 break; 07646 07647 case 261: 07648 07649 /* Line 1806 of yacc.c */ 07650 #line 2512 "ripper.y" 07651 { 07652 #if 0 07653 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); 07654 #endif 07655 (yyval.val) = (yyvsp[(2) - (2)].val); 07656 07657 } 07658 break; 07659 07660 case 262: 07661 07662 /* Line 1806 of yacc.c */ 07663 #line 2522 "ripper.y" 07664 { 07665 (yyval.val) = (yyvsp[(2) - (2)].val); 07666 } 07667 break; 07668 07669 case 263: 07670 07671 /* Line 1806 of yacc.c */ 07672 #line 2526 "ripper.y" 07673 { 07674 (yyval.val) = 0; 07675 } 07676 break; 07677 07678 case 264: 07679 07680 /* Line 1806 of yacc.c */ 07681 #line 2532 "ripper.y" 07682 { 07683 #if 0 07684 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 07685 #endif 07686 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 07687 07688 } 07689 break; 07690 07691 case 265: 07692 07693 /* Line 1806 of yacc.c */ 07694 #line 2540 "ripper.y" 07695 { 07696 #if 0 07697 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07698 #endif 07699 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); 07700 07701 } 07702 break; 07703 07704 case 266: 07705 07706 /* Line 1806 of yacc.c */ 07707 #line 2548 "ripper.y" 07708 { 07709 #if 0 07710 NODE *n1; 07711 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07712 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07713 } 07714 else { 07715 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07716 } 07717 #endif 07718 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07719 07720 } 07721 break; 07722 07723 case 267: 07724 07725 /* Line 1806 of yacc.c */ 07726 #line 2562 "ripper.y" 07727 { 07728 #if 0 07729 NODE *n1; 07730 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07731 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07732 } 07733 else { 07734 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07735 } 07736 #endif 07737 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07738 07739 } 07740 break; 07741 07742 case 268: 07743 07744 /* Line 1806 of yacc.c */ 07745 #line 2578 "ripper.y" 07746 { 07747 #if 0 07748 NODE *n1; 07749 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 07750 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 07751 } 07752 else { 07753 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07754 } 07755 #endif 07756 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 07757 07758 } 07759 break; 07760 07761 case 269: 07762 07763 /* Line 1806 of yacc.c */ 07764 #line 2592 "ripper.y" 07765 { 07766 #if 0 07767 NODE *n1; 07768 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && 07769 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 07770 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 07771 } 07772 else { 07773 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 07774 } 07775 #endif 07776 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); 07777 07778 } 07779 break; 07780 07781 case 270: 07782 07783 /* Line 1806 of yacc.c */ 07784 #line 2607 "ripper.y" 07785 { 07786 #if 0 07787 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 07788 #endif 07789 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); 07790 07791 } 07792 break; 07793 07794 case 279: 07795 07796 /* Line 1806 of yacc.c */ 07797 #line 2625 "ripper.y" 07798 { 07799 #if 0 07800 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 07801 #endif 07802 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); 07803 07804 } 07805 break; 07806 07807 case 280: 07808 07809 /* Line 1806 of yacc.c */ 07810 #line 2633 "ripper.y" 07811 { 07812 #if 0 07813 (yyval.num) = ruby_sourceline; 07814 #endif 07815 07816 } 07817 break; 07818 07819 case 281: 07820 07821 /* Line 1806 of yacc.c */ 07822 #line 2641 "ripper.y" 07823 { 07824 #if 0 07825 if ((yyvsp[(3) - (4)].val) == NULL) { 07826 (yyval.val) = NEW_NIL(); 07827 } 07828 else { 07829 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || 07830 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) 07831 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); 07832 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); 07833 } 07834 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); 07835 #endif 07836 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); 07837 07838 } 07839 break; 07840 07841 case 282: 07842 07843 /* Line 1806 of yacc.c */ 07844 #line 2657 "ripper.y" 07845 {lex_state = EXPR_ENDARG;} 07846 break; 07847 07848 case 283: 07849 07850 /* Line 1806 of yacc.c */ 07851 #line 2658 "ripper.y" 07852 { 07853 rb_warning0("(...) interpreted as grouped expression"); 07854 #if 0 07855 (yyval.val) = (yyvsp[(2) - (4)].val); 07856 #endif 07857 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 07858 07859 } 07860 break; 07861 07862 case 284: 07863 07864 /* Line 1806 of yacc.c */ 07865 #line 2667 "ripper.y" 07866 { 07867 #if 0 07868 (yyval.val) = (yyvsp[(2) - (3)].val); 07869 #endif 07870 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 07871 07872 } 07873 break; 07874 07875 case 285: 07876 07877 /* Line 1806 of yacc.c */ 07878 #line 2675 "ripper.y" 07879 { 07880 #if 0 07881 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07882 #endif 07883 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 07884 07885 } 07886 break; 07887 07888 case 286: 07889 07890 /* Line 1806 of yacc.c */ 07891 #line 2683 "ripper.y" 07892 { 07893 #if 0 07894 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 07895 #endif 07896 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 07897 07898 } 07899 break; 07900 07901 case 287: 07902 07903 /* Line 1806 of yacc.c */ 07904 #line 2691 "ripper.y" 07905 { 07906 #if 0 07907 if ((yyvsp[(2) - (3)].val) == 0) { 07908 (yyval.val) = NEW_ZARRAY(); /* zero length array*/ 07909 } 07910 else { 07911 (yyval.val) = (yyvsp[(2) - (3)].val); 07912 } 07913 #endif 07914 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); 07915 07916 } 07917 break; 07918 07919 case 288: 07920 07921 /* Line 1806 of yacc.c */ 07922 #line 2704 "ripper.y" 07923 { 07924 #if 0 07925 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); 07926 #endif 07927 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); 07928 07929 } 07930 break; 07931 07932 case 289: 07933 07934 /* Line 1806 of yacc.c */ 07935 #line 2712 "ripper.y" 07936 { 07937 #if 0 07938 (yyval.val) = NEW_RETURN(0); 07939 #endif 07940 (yyval.val) = dispatch0(return0); 07941 07942 } 07943 break; 07944 07945 case 290: 07946 07947 /* Line 1806 of yacc.c */ 07948 #line 2720 "ripper.y" 07949 { 07950 #if 0 07951 (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); 07952 #endif 07953 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); 07954 07955 } 07956 break; 07957 07958 case 291: 07959 07960 /* Line 1806 of yacc.c */ 07961 #line 2728 "ripper.y" 07962 { 07963 #if 0 07964 (yyval.val) = NEW_YIELD(0, Qfalse); 07965 #endif 07966 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); 07967 07968 } 07969 break; 07970 07971 case 292: 07972 07973 /* Line 1806 of yacc.c */ 07974 #line 2736 "ripper.y" 07975 { 07976 #if 0 07977 (yyval.val) = NEW_YIELD(0, Qfalse); 07978 #endif 07979 (yyval.val) = dispatch0(yield0); 07980 07981 } 07982 break; 07983 07984 case 293: 07985 07986 /* Line 1806 of yacc.c */ 07987 #line 2743 "ripper.y" 07988 {in_defined = 1;} 07989 break; 07990 07991 case 294: 07992 07993 /* Line 1806 of yacc.c */ 07994 #line 2744 "ripper.y" 07995 { 07996 #if 0 07997 in_defined = 0; 07998 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); 07999 #endif 08000 in_defined = 0; 08001 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); 08002 08003 } 08004 break; 08005 08006 case 295: 08007 08008 /* Line 1806 of yacc.c */ 08009 #line 2754 "ripper.y" 08010 { 08011 #if 0 08012 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); 08013 #endif 08014 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); 08015 08016 } 08017 break; 08018 08019 case 296: 08020 08021 /* Line 1806 of yacc.c */ 08022 #line 2762 "ripper.y" 08023 { 08024 #if 0 08025 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); 08026 #endif 08027 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); 08028 08029 } 08030 break; 08031 08032 case 297: 08033 08034 /* Line 1806 of yacc.c */ 08035 #line 2770 "ripper.y" 08036 { 08037 #if 0 08038 (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0); 08039 (yyval.val) = (yyvsp[(2) - (2)].val); 08040 fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val)); 08041 #endif 08042 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); 08043 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); 08044 08045 } 08046 break; 08047 08048 case 299: 08049 08050 /* Line 1806 of yacc.c */ 08051 #line 2782 "ripper.y" 08052 { 08053 #if 0 08054 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 08055 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 08056 (yyval.val) = (yyvsp[(2) - (2)].val); 08057 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 08058 #endif 08059 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 08060 08061 } 08062 break; 08063 08064 case 300: 08065 08066 /* Line 1806 of yacc.c */ 08067 #line 2793 "ripper.y" 08068 { 08069 (yyval.val) = (yyvsp[(2) - (2)].val); 08070 } 08071 break; 08072 08073 case 301: 08074 08075 /* Line 1806 of yacc.c */ 08076 #line 2800 "ripper.y" 08077 { 08078 #if 0 08079 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08080 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 08081 #endif 08082 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 08083 08084 } 08085 break; 08086 08087 case 302: 08088 08089 /* Line 1806 of yacc.c */ 08090 #line 2812 "ripper.y" 08091 { 08092 #if 0 08093 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08094 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 08095 #endif 08096 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 08097 08098 } 08099 break; 08100 08101 case 303: 08102 08103 /* Line 1806 of yacc.c */ 08104 #line 2820 "ripper.y" 08105 {COND_PUSH(1);} 08106 break; 08107 08108 case 304: 08109 08110 /* Line 1806 of yacc.c */ 08111 #line 2820 "ripper.y" 08112 {COND_POP();} 08113 break; 08114 08115 case 305: 08116 08117 /* Line 1806 of yacc.c */ 08118 #line 2823 "ripper.y" 08119 { 08120 #if 0 08121 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 08122 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 08123 #endif 08124 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 08125 08126 } 08127 break; 08128 08129 case 306: 08130 08131 /* Line 1806 of yacc.c */ 08132 #line 2831 "ripper.y" 08133 {COND_PUSH(1);} 08134 break; 08135 08136 case 307: 08137 08138 /* Line 1806 of yacc.c */ 08139 #line 2831 "ripper.y" 08140 {COND_POP();} 08141 break; 08142 08143 case 308: 08144 08145 /* Line 1806 of yacc.c */ 08146 #line 2834 "ripper.y" 08147 { 08148 #if 0 08149 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 08150 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 08151 #endif 08152 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 08153 08154 } 08155 break; 08156 08157 case 309: 08158 08159 /* Line 1806 of yacc.c */ 08160 #line 2845 "ripper.y" 08161 { 08162 #if 0 08163 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08164 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08165 #endif 08166 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08167 08168 } 08169 break; 08170 08171 case 310: 08172 08173 /* Line 1806 of yacc.c */ 08174 #line 2854 "ripper.y" 08175 { 08176 #if 0 08177 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); 08178 #endif 08179 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); 08180 08181 } 08182 break; 08183 08184 case 311: 08185 08186 /* Line 1806 of yacc.c */ 08187 #line 2862 "ripper.y" 08188 {COND_PUSH(1);} 08189 break; 08190 08191 case 312: 08192 08193 /* Line 1806 of yacc.c */ 08194 #line 2864 "ripper.y" 08195 {COND_POP();} 08196 break; 08197 08198 case 313: 08199 08200 /* Line 1806 of yacc.c */ 08201 #line 2867 "ripper.y" 08202 { 08203 #if 0 08204 /* 08205 * for a, b, c in e 08206 * #=> 08207 * e.each{|*x| a, b, c = x 08208 * 08209 * for a in e 08210 * #=> 08211 * e.each{|x| a, = x} 08212 */ 08213 ID id = internal_id(); 08214 ID *tbl = ALLOC_N(ID, 2); 08215 NODE *m = NEW_ARGS_AUX(0, 0); 08216 NODE *args, *scope; 08217 08218 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { 08219 /* if args.length == 1 && args[0].kind_of?(Array) 08220 * args = args[0] 08221 * end 08222 */ 08223 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 08224 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 08225 m->nd_next = block_append( 08226 NEW_IF( 08227 NEW_NODE(NODE_AND, 08228 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0), 08229 rb_intern("=="), one), 08230 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero), 08231 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 08232 0), 08233 NEW_DASGN_CURR(id, 08234 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)), 08235 0), 08236 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); 08237 08238 args = new_args(m, 0, id, 0, 0); 08239 } 08240 else { 08241 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || 08242 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || 08243 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { 08244 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); 08245 m->nd_plen = 1; 08246 m->nd_next = (yyvsp[(2) - (9)].val); 08247 args = new_args(m, 0, 0, 0, 0); 08248 } 08249 else { 08250 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); 08251 args = new_args(m, 0, id, 0, 0); 08252 } 08253 } 08254 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); 08255 tbl[0] = 1; tbl[1] = id; 08256 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); 08257 fixpos((yyval.val), (yyvsp[(2) - (9)].val)); 08258 #endif 08259 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); 08260 08261 } 08262 break; 08263 08264 case 314: 08265 08266 /* Line 1806 of yacc.c */ 08267 #line 2928 "ripper.y" 08268 { 08269 if (in_def || in_single) 08270 yyerror("class definition in method body"); 08271 local_push(0); 08272 #if 0 08273 (yyval.num) = ruby_sourceline; 08274 #endif 08275 08276 } 08277 break; 08278 08279 case 315: 08280 08281 /* Line 1806 of yacc.c */ 08282 #line 2939 "ripper.y" 08283 { 08284 #if 0 08285 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); 08286 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); 08287 #endif 08288 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 08289 08290 local_pop(); 08291 } 08292 break; 08293 08294 case 316: 08295 08296 /* Line 1806 of yacc.c */ 08297 #line 2949 "ripper.y" 08298 { 08299 (yyval.num) = in_def; 08300 in_def = 0; 08301 } 08302 break; 08303 08304 case 317: 08305 08306 /* Line 1806 of yacc.c */ 08307 #line 2954 "ripper.y" 08308 { 08309 (yyval.num) = in_single; 08310 in_single = 0; 08311 local_push(0); 08312 } 08313 break; 08314 08315 case 318: 08316 08317 /* Line 1806 of yacc.c */ 08318 #line 2961 "ripper.y" 08319 { 08320 #if 0 08321 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08322 fixpos((yyval.val), (yyvsp[(3) - (8)].val)); 08323 #endif 08324 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 08325 08326 local_pop(); 08327 in_def = (yyvsp[(4) - (8)].num); 08328 in_single = (yyvsp[(6) - (8)].num); 08329 } 08330 break; 08331 08332 case 319: 08333 08334 /* Line 1806 of yacc.c */ 08335 #line 2973 "ripper.y" 08336 { 08337 if (in_def || in_single) 08338 yyerror("module definition in method body"); 08339 local_push(0); 08340 #if 0 08341 (yyval.num) = ruby_sourceline; 08342 #endif 08343 08344 } 08345 break; 08346 08347 case 320: 08348 08349 /* Line 1806 of yacc.c */ 08350 #line 2984 "ripper.y" 08351 { 08352 #if 0 08353 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08354 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); 08355 #endif 08356 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 08357 08358 local_pop(); 08359 } 08360 break; 08361 08362 case 321: 08363 08364 /* Line 1806 of yacc.c */ 08365 #line 2994 "ripper.y" 08366 { 08367 (yyval.id) = cur_mid; 08368 cur_mid = (yyvsp[(2) - (2)].val); 08369 in_def++; 08370 local_push(0); 08371 } 08372 break; 08373 08374 case 322: 08375 08376 /* Line 1806 of yacc.c */ 08377 #line 3003 "ripper.y" 08378 { 08379 #if 0 08380 NODE *body = remove_begin((yyvsp[(5) - (6)].val)); 08381 reduce_nodes(&body); 08382 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); 08383 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num)); 08384 #endif 08385 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 08386 08387 local_pop(); 08388 in_def--; 08389 cur_mid = (yyvsp[(3) - (6)].id); 08390 } 08391 break; 08392 08393 case 323: 08394 08395 /* Line 1806 of yacc.c */ 08396 #line 3016 "ripper.y" 08397 {lex_state = EXPR_FNAME;} 08398 break; 08399 08400 case 324: 08401 08402 /* Line 1806 of yacc.c */ 08403 #line 3017 "ripper.y" 08404 { 08405 in_single++; 08406 lex_state = EXPR_ENDFN; /* force for args */ 08407 local_push(0); 08408 } 08409 break; 08410 08411 case 325: 08412 08413 /* Line 1806 of yacc.c */ 08414 #line 3025 "ripper.y" 08415 { 08416 #if 0 08417 NODE *body = remove_begin((yyvsp[(8) - (9)].val)); 08418 reduce_nodes(&body); 08419 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); 08420 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num)); 08421 #endif 08422 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); 08423 08424 local_pop(); 08425 in_single--; 08426 } 08427 break; 08428 08429 case 326: 08430 08431 /* Line 1806 of yacc.c */ 08432 #line 3038 "ripper.y" 08433 { 08434 #if 0 08435 (yyval.val) = NEW_BREAK(0); 08436 #endif 08437 (yyval.val) = dispatch1(break, arg_new()); 08438 08439 } 08440 break; 08441 08442 case 327: 08443 08444 /* Line 1806 of yacc.c */ 08445 #line 3046 "ripper.y" 08446 { 08447 #if 0 08448 (yyval.val) = NEW_NEXT(0); 08449 #endif 08450 (yyval.val) = dispatch1(next, arg_new()); 08451 08452 } 08453 break; 08454 08455 case 328: 08456 08457 /* Line 1806 of yacc.c */ 08458 #line 3054 "ripper.y" 08459 { 08460 #if 0 08461 (yyval.val) = NEW_REDO(); 08462 #endif 08463 (yyval.val) = dispatch0(redo); 08464 08465 } 08466 break; 08467 08468 case 329: 08469 08470 /* Line 1806 of yacc.c */ 08471 #line 3062 "ripper.y" 08472 { 08473 #if 0 08474 (yyval.val) = NEW_RETRY(); 08475 #endif 08476 (yyval.val) = dispatch0(retry); 08477 08478 } 08479 break; 08480 08481 case 330: 08482 08483 /* Line 1806 of yacc.c */ 08484 #line 3072 "ripper.y" 08485 { 08486 #if 0 08487 value_expr((yyvsp[(1) - (1)].val)); 08488 (yyval.val) = (yyvsp[(1) - (1)].val); 08489 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 08490 #endif 08491 (yyval.val) = (yyvsp[(1) - (1)].val); 08492 08493 } 08494 break; 08495 08496 case 331: 08497 08498 /* Line 1806 of yacc.c */ 08499 #line 3084 "ripper.y" 08500 { 08501 token_info_push("begin"); 08502 } 08503 break; 08504 08505 case 332: 08506 08507 /* Line 1806 of yacc.c */ 08508 #line 3090 "ripper.y" 08509 { 08510 token_info_push("if"); 08511 } 08512 break; 08513 08514 case 333: 08515 08516 /* Line 1806 of yacc.c */ 08517 #line 3096 "ripper.y" 08518 { 08519 token_info_push("unless"); 08520 } 08521 break; 08522 08523 case 334: 08524 08525 /* Line 1806 of yacc.c */ 08526 #line 3102 "ripper.y" 08527 { 08528 token_info_push("while"); 08529 } 08530 break; 08531 08532 case 335: 08533 08534 /* Line 1806 of yacc.c */ 08535 #line 3108 "ripper.y" 08536 { 08537 token_info_push("until"); 08538 } 08539 break; 08540 08541 case 336: 08542 08543 /* Line 1806 of yacc.c */ 08544 #line 3114 "ripper.y" 08545 { 08546 token_info_push("case"); 08547 } 08548 break; 08549 08550 case 337: 08551 08552 /* Line 1806 of yacc.c */ 08553 #line 3120 "ripper.y" 08554 { 08555 token_info_push("for"); 08556 } 08557 break; 08558 08559 case 338: 08560 08561 /* Line 1806 of yacc.c */ 08562 #line 3126 "ripper.y" 08563 { 08564 token_info_push("class"); 08565 } 08566 break; 08567 08568 case 339: 08569 08570 /* Line 1806 of yacc.c */ 08571 #line 3132 "ripper.y" 08572 { 08573 token_info_push("module"); 08574 } 08575 break; 08576 08577 case 340: 08578 08579 /* Line 1806 of yacc.c */ 08580 #line 3138 "ripper.y" 08581 { 08582 token_info_push("def"); 08583 #if 0 08584 (yyval.num) = ruby_sourceline; 08585 #endif 08586 08587 } 08588 break; 08589 08590 case 341: 08591 08592 /* Line 1806 of yacc.c */ 08593 #line 3148 "ripper.y" 08594 { 08595 token_info_pop("end"); 08596 } 08597 break; 08598 08599 case 342: 08600 08601 /* Line 1806 of yacc.c */ 08602 #line 3156 "ripper.y" 08603 { (yyval.val) = Qnil; } 08604 break; 08605 08606 case 344: 08607 08608 /* Line 1806 of yacc.c */ 08609 #line 3162 "ripper.y" 08610 { (yyval.val) = (yyvsp[(2) - (2)].val); } 08611 break; 08612 08613 case 345: 08614 08615 /* Line 1806 of yacc.c */ 08616 #line 3169 "ripper.y" 08617 { (yyval.val) = Qnil; } 08618 break; 08619 08620 case 348: 08621 08622 /* Line 1806 of yacc.c */ 08623 #line 3178 "ripper.y" 08624 { 08625 #if 0 08626 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 08627 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 08628 #endif 08629 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 08630 08631 } 08632 break; 08633 08634 case 350: 08635 08636 /* Line 1806 of yacc.c */ 08637 #line 3190 "ripper.y" 08638 { 08639 #if 0 08640 (yyval.val) = (yyvsp[(2) - (2)].val); 08641 #endif 08642 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); 08643 08644 } 08645 break; 08646 08647 case 353: 08648 08649 /* Line 1806 of yacc.c */ 08650 #line 3204 "ripper.y" 08651 { 08652 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 08653 #if 0 08654 #endif 08655 (yyval.val) = dispatch1(mlhs_paren, (yyval.val)); 08656 08657 } 08658 break; 08659 08660 case 354: 08661 08662 /* Line 1806 of yacc.c */ 08663 #line 3212 "ripper.y" 08664 { 08665 #if 0 08666 (yyval.val) = (yyvsp[(2) - (3)].val); 08667 #endif 08668 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 08669 08670 } 08671 break; 08672 08673 case 355: 08674 08675 /* Line 1806 of yacc.c */ 08676 #line 3222 "ripper.y" 08677 { 08678 #if 0 08679 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 08680 #endif 08681 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 08682 08683 } 08684 break; 08685 08686 case 356: 08687 08688 /* Line 1806 of yacc.c */ 08689 #line 3230 "ripper.y" 08690 { 08691 #if 0 08692 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08693 #endif 08694 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 08695 08696 } 08697 break; 08698 08699 case 357: 08700 08701 /* Line 1806 of yacc.c */ 08702 #line 3240 "ripper.y" 08703 { 08704 #if 0 08705 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 08706 #endif 08707 (yyval.val) = (yyvsp[(1) - (1)].val); 08708 08709 } 08710 break; 08711 08712 case 358: 08713 08714 /* Line 1806 of yacc.c */ 08715 #line 3248 "ripper.y" 08716 { 08717 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0); 08718 #if 0 08719 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val)); 08720 #endif 08721 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val)); 08722 08723 } 08724 break; 08725 08726 case 359: 08727 08728 /* Line 1806 of yacc.c */ 08729 #line 3257 "ripper.y" 08730 { 08731 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0); 08732 #if 0 08733 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val))); 08734 #endif 08735 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val)); 08736 08737 } 08738 break; 08739 08740 case 360: 08741 08742 /* Line 1806 of yacc.c */ 08743 #line 3266 "ripper.y" 08744 { 08745 #if 0 08746 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); 08747 #endif 08748 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); 08749 08750 } 08751 break; 08752 08753 case 361: 08754 08755 /* Line 1806 of yacc.c */ 08756 #line 3274 "ripper.y" 08757 { 08758 #if 0 08759 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); 08760 #endif 08761 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 08762 08763 } 08764 break; 08765 08766 case 362: 08767 08768 /* Line 1806 of yacc.c */ 08769 #line 3282 "ripper.y" 08770 { 08771 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0); 08772 #if 0 08773 (yyval.val) = NEW_MASGN(0, (yyval.val)); 08774 #endif 08775 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val)); 08776 08777 } 08778 break; 08779 08780 case 363: 08781 08782 /* Line 1806 of yacc.c */ 08783 #line 3291 "ripper.y" 08784 { 08785 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0); 08786 #if 0 08787 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val))); 08788 #endif 08789 #if 0 08790 TODO: Check me 08791 #endif 08792 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val)); 08793 08794 } 08795 break; 08796 08797 case 364: 08798 08799 /* Line 1806 of yacc.c */ 08800 #line 3303 "ripper.y" 08801 { 08802 #if 0 08803 (yyval.val) = NEW_MASGN(0, -1); 08804 #endif 08805 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08806 08807 } 08808 break; 08809 08810 case 365: 08811 08812 /* Line 1806 of yacc.c */ 08813 #line 3311 "ripper.y" 08814 { 08815 #if 0 08816 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 08817 #endif 08818 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 08819 08820 } 08821 break; 08822 08823 case 366: 08824 08825 /* Line 1806 of yacc.c */ 08826 #line 3321 "ripper.y" 08827 { 08828 #if 0 08829 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); 08830 #endif 08831 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); 08832 08833 } 08834 break; 08835 08836 case 367: 08837 08838 /* Line 1806 of yacc.c */ 08839 #line 3329 "ripper.y" 08840 { 08841 #if 0 08842 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 08843 #endif 08844 (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val))); 08845 08846 } 08847 break; 08848 08849 case 368: 08850 08851 /* Line 1806 of yacc.c */ 08852 #line 3337 "ripper.y" 08853 { 08854 #if 0 08855 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); 08856 #endif 08857 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08858 08859 } 08860 break; 08861 08862 case 369: 08863 08864 /* Line 1806 of yacc.c */ 08865 #line 3345 "ripper.y" 08866 { 08867 #if 0 08868 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08869 #endif 08870 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08871 08872 } 08873 break; 08874 08875 case 370: 08876 08877 /* Line 1806 of yacc.c */ 08878 #line 3353 "ripper.y" 08879 { 08880 #if 0 08881 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 08882 #endif 08883 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08884 08885 } 08886 break; 08887 08888 case 371: 08889 08890 /* Line 1806 of yacc.c */ 08891 #line 3361 "ripper.y" 08892 { 08893 #if 0 08894 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0); 08895 #endif 08896 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil); 08897 dispatch1(excessed_comma, (yyval.val)); 08898 08899 } 08900 break; 08901 08902 case 372: 08903 08904 /* Line 1806 of yacc.c */ 08905 #line 3370 "ripper.y" 08906 { 08907 #if 0 08908 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08909 #endif 08910 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08911 08912 } 08913 break; 08914 08915 case 373: 08916 08917 /* Line 1806 of yacc.c */ 08918 #line 3378 "ripper.y" 08919 { 08920 #if 0 08921 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); 08922 #endif 08923 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); 08924 08925 } 08926 break; 08927 08928 case 374: 08929 08930 /* Line 1806 of yacc.c */ 08931 #line 3386 "ripper.y" 08932 { 08933 #if 0 08934 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 08935 #endif 08936 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 08937 08938 } 08939 break; 08940 08941 case 375: 08942 08943 /* Line 1806 of yacc.c */ 08944 #line 3394 "ripper.y" 08945 { 08946 #if 0 08947 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 08948 #endif 08949 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 08950 08951 } 08952 break; 08953 08954 case 376: 08955 08956 /* Line 1806 of yacc.c */ 08957 #line 3402 "ripper.y" 08958 { 08959 #if 0 08960 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); 08961 #endif 08962 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 08963 08964 } 08965 break; 08966 08967 case 377: 08968 08969 /* Line 1806 of yacc.c */ 08970 #line 3410 "ripper.y" 08971 { 08972 #if 0 08973 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 08974 #endif 08975 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 08976 08977 } 08978 break; 08979 08980 case 378: 08981 08982 /* Line 1806 of yacc.c */ 08983 #line 3418 "ripper.y" 08984 { 08985 #if 0 08986 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); 08987 #endif 08988 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val))); 08989 08990 } 08991 break; 08992 08993 case 379: 08994 08995 /* Line 1806 of yacc.c */ 08996 #line 3426 "ripper.y" 08997 { 08998 #if 0 08999 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09000 #endif 09001 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 09002 09003 } 09004 break; 09005 09006 case 380: 09007 09008 /* Line 1806 of yacc.c */ 09009 #line 3434 "ripper.y" 09010 { 09011 #if 0 09012 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); 09013 #endif 09014 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); 09015 09016 } 09017 break; 09018 09019 case 382: 09020 09021 /* Line 1806 of yacc.c */ 09022 #line 3445 "ripper.y" 09023 { 09024 command_start = TRUE; 09025 } 09026 break; 09027 09028 case 383: 09029 09030 /* Line 1806 of yacc.c */ 09031 #line 3451 "ripper.y" 09032 { 09033 #if 0 09034 (yyval.val) = 0; 09035 #endif 09036 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 09037 escape_Qundef((yyvsp[(2) - (3)].val))); 09038 09039 } 09040 break; 09041 09042 case 384: 09043 09044 /* Line 1806 of yacc.c */ 09045 #line 3460 "ripper.y" 09046 { 09047 #if 0 09048 (yyval.val) = 0; 09049 #endif 09050 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil), 09051 Qnil); 09052 09053 } 09054 break; 09055 09056 case 385: 09057 09058 /* Line 1806 of yacc.c */ 09059 #line 3469 "ripper.y" 09060 { 09061 #if 0 09062 (yyval.val) = (yyvsp[(2) - (4)].val); 09063 #endif 09064 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); 09065 09066 } 09067 break; 09068 09069 case 387: 09070 09071 /* Line 1806 of yacc.c */ 09072 #line 3481 "ripper.y" 09073 { 09074 #if 0 09075 (yyval.val) = 0; 09076 #endif 09077 (yyval.val) = (yyvsp[(2) - (2)].val); 09078 09079 } 09080 break; 09081 09082 case 388: 09083 09084 /* Line 1806 of yacc.c */ 09085 #line 3493 "ripper.y" 09086 { 09087 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09088 } 09089 break; 09090 09091 case 389: 09092 09093 /* Line 1806 of yacc.c */ 09094 #line 3500 "ripper.y" 09095 { 09096 rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val)); 09097 } 09098 break; 09099 09100 case 390: 09101 09102 /* Line 1806 of yacc.c */ 09103 #line 3507 "ripper.y" 09104 { 09105 new_bv(get_id((yyvsp[(1) - (1)].val))); 09106 #if 0 09107 #endif 09108 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 09109 09110 } 09111 break; 09112 09113 case 391: 09114 09115 /* Line 1806 of yacc.c */ 09116 #line 3515 "ripper.y" 09117 { 09118 (yyval.val) = 0; 09119 } 09120 break; 09121 09122 case 392: 09123 09124 /* Line 1806 of yacc.c */ 09125 #line 3520 "ripper.y" 09126 { 09127 (yyval.vars) = dyna_push(); 09128 } 09129 break; 09130 09131 case 393: 09132 09133 /* Line 1806 of yacc.c */ 09134 #line 3523 "ripper.y" 09135 { 09136 (yyval.num) = lpar_beg; 09137 lpar_beg = ++paren_nest; 09138 } 09139 break; 09140 09141 case 394: 09142 09143 /* Line 1806 of yacc.c */ 09144 #line 3529 "ripper.y" 09145 { 09146 lpar_beg = (yyvsp[(2) - (4)].num); 09147 #if 0 09148 (yyval.val) = (yyvsp[(3) - (4)].val); 09149 (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].val)->nd_head, (yyvsp[(4) - (4)].val)); 09150 #endif 09151 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09152 09153 dyna_pop((yyvsp[(1) - (4)].vars)); 09154 } 09155 break; 09156 09157 case 395: 09158 09159 /* Line 1806 of yacc.c */ 09160 #line 3542 "ripper.y" 09161 { 09162 #if 0 09163 (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val)); 09164 #endif 09165 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 09166 09167 } 09168 break; 09169 09170 case 396: 09171 09172 /* Line 1806 of yacc.c */ 09173 #line 3550 "ripper.y" 09174 { 09175 #if 0 09176 (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val)); 09177 #endif 09178 (yyval.val) = (yyvsp[(1) - (1)].val); 09179 09180 } 09181 break; 09182 09183 case 397: 09184 09185 /* Line 1806 of yacc.c */ 09186 #line 3560 "ripper.y" 09187 { 09188 (yyval.val) = (yyvsp[(2) - (3)].val); 09189 } 09190 break; 09191 09192 case 398: 09193 09194 /* Line 1806 of yacc.c */ 09195 #line 3564 "ripper.y" 09196 { 09197 (yyval.val) = (yyvsp[(2) - (3)].val); 09198 } 09199 break; 09200 09201 case 399: 09202 09203 /* Line 1806 of yacc.c */ 09204 #line 3570 "ripper.y" 09205 { 09206 (yyvsp[(1) - (1)].vars) = dyna_push(); 09207 #if 0 09208 (yyval.num) = ruby_sourceline; 09209 #endif 09210 } 09211 break; 09212 09213 case 400: 09214 09215 /* Line 1806 of yacc.c */ 09216 #line 3579 "ripper.y" 09217 { 09218 #if 0 09219 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09220 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09221 #endif 09222 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09223 09224 dyna_pop((yyvsp[(1) - (5)].vars)); 09225 } 09226 break; 09227 09228 case 401: 09229 09230 /* Line 1806 of yacc.c */ 09231 #line 3591 "ripper.y" 09232 { 09233 #if 0 09234 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { 09235 compile_error(PARSER_ARG "block given to yield"); 09236 } 09237 else { 09238 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 09239 } 09240 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 09241 (yyval.val) = (yyvsp[(2) - (2)].val); 09242 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 09243 #endif 09244 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09245 09246 } 09247 break; 09248 09249 case 402: 09250 09251 /* Line 1806 of yacc.c */ 09252 #line 3607 "ripper.y" 09253 { 09254 #if 0 09255 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09256 #endif 09257 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 09258 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09259 09260 } 09261 break; 09262 09263 case 403: 09264 09265 /* Line 1806 of yacc.c */ 09266 #line 3616 "ripper.y" 09267 { 09268 #if 0 09269 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09270 #endif 09271 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val)); 09272 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09273 09274 } 09275 break; 09276 09277 case 404: 09278 09279 /* Line 1806 of yacc.c */ 09280 #line 3627 "ripper.y" 09281 { 09282 #if 0 09283 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09284 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 09285 #endif 09286 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); 09287 09288 } 09289 break; 09290 09291 case 405: 09292 09293 /* Line 1806 of yacc.c */ 09294 #line 3636 "ripper.y" 09295 { 09296 #if 0 09297 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09298 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09299 #endif 09300 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 09301 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09302 09303 } 09304 break; 09305 09306 case 406: 09307 09308 /* Line 1806 of yacc.c */ 09309 #line 3646 "ripper.y" 09310 { 09311 #if 0 09312 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 09313 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09314 #endif 09315 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val)); 09316 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 09317 09318 } 09319 break; 09320 09321 case 407: 09322 09323 /* Line 1806 of yacc.c */ 09324 #line 3656 "ripper.y" 09325 { 09326 #if 0 09327 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); 09328 #endif 09329 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 09330 09331 } 09332 break; 09333 09334 case 408: 09335 09336 /* Line 1806 of yacc.c */ 09337 #line 3664 "ripper.y" 09338 { 09339 #if 0 09340 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); 09341 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 09342 #endif 09343 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), 09344 ripper_intern("call")); 09345 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); 09346 09347 } 09348 break; 09349 09350 case 409: 09351 09352 /* Line 1806 of yacc.c */ 09353 #line 3675 "ripper.y" 09354 { 09355 #if 0 09356 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val)); 09357 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 09358 #endif 09359 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), 09360 ripper_intern("call")); 09361 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val)); 09362 09363 } 09364 break; 09365 09366 case 410: 09367 09368 /* Line 1806 of yacc.c */ 09369 #line 3686 "ripper.y" 09370 { 09371 #if 0 09372 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 09373 #endif 09374 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 09375 09376 } 09377 break; 09378 09379 case 411: 09380 09381 /* Line 1806 of yacc.c */ 09382 #line 3694 "ripper.y" 09383 { 09384 #if 0 09385 (yyval.val) = NEW_ZSUPER(); 09386 #endif 09387 (yyval.val) = dispatch0(zsuper); 09388 09389 } 09390 break; 09391 09392 case 412: 09393 09394 /* Line 1806 of yacc.c */ 09395 #line 3702 "ripper.y" 09396 { 09397 #if 0 09398 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) 09399 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); 09400 else 09401 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); 09402 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 09403 #endif 09404 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 09405 09406 } 09407 break; 09408 09409 case 413: 09410 09411 /* Line 1806 of yacc.c */ 09412 #line 3716 "ripper.y" 09413 { 09414 (yyvsp[(1) - (1)].vars) = dyna_push(); 09415 #if 0 09416 (yyval.num) = ruby_sourceline; 09417 #endif 09418 09419 } 09420 break; 09421 09422 case 414: 09423 09424 /* Line 1806 of yacc.c */ 09425 #line 3725 "ripper.y" 09426 { 09427 #if 0 09428 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09429 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09430 #endif 09431 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09432 09433 dyna_pop((yyvsp[(1) - (5)].vars)); 09434 } 09435 break; 09436 09437 case 415: 09438 09439 /* Line 1806 of yacc.c */ 09440 #line 3735 "ripper.y" 09441 { 09442 (yyvsp[(1) - (1)].vars) = dyna_push(); 09443 #if 0 09444 (yyval.num) = ruby_sourceline; 09445 #endif 09446 09447 } 09448 break; 09449 09450 case 416: 09451 09452 /* Line 1806 of yacc.c */ 09453 #line 3744 "ripper.y" 09454 { 09455 #if 0 09456 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 09457 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 09458 #endif 09459 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 09460 09461 dyna_pop((yyvsp[(1) - (5)].vars)); 09462 } 09463 break; 09464 09465 case 417: 09466 09467 /* Line 1806 of yacc.c */ 09468 #line 3758 "ripper.y" 09469 { 09470 #if 0 09471 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 09472 #endif 09473 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 09474 09475 } 09476 break; 09477 09478 case 420: 09479 09480 /* Line 1806 of yacc.c */ 09481 #line 3774 "ripper.y" 09482 { 09483 #if 0 09484 if ((yyvsp[(3) - (6)].val)) { 09485 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); 09486 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 09487 } 09488 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 09489 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); 09490 #endif 09491 (yyval.val) = dispatch4(rescue, 09492 escape_Qundef((yyvsp[(2) - (6)].val)), 09493 escape_Qundef((yyvsp[(3) - (6)].val)), 09494 escape_Qundef((yyvsp[(5) - (6)].val)), 09495 escape_Qundef((yyvsp[(6) - (6)].val))); 09496 09497 } 09498 break; 09499 09500 case 422: 09501 09502 /* Line 1806 of yacc.c */ 09503 #line 3794 "ripper.y" 09504 { 09505 #if 0 09506 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 09507 #endif 09508 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 09509 09510 } 09511 break; 09512 09513 case 423: 09514 09515 /* Line 1806 of yacc.c */ 09516 #line 3802 "ripper.y" 09517 { 09518 #if 0 09519 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); 09520 #endif 09521 (yyval.val) = (yyvsp[(1) - (1)].val); 09522 09523 } 09524 break; 09525 09526 case 425: 09527 09528 /* Line 1806 of yacc.c */ 09529 #line 3813 "ripper.y" 09530 { 09531 (yyval.val) = (yyvsp[(2) - (2)].val); 09532 } 09533 break; 09534 09535 case 427: 09536 09537 /* Line 1806 of yacc.c */ 09538 #line 3820 "ripper.y" 09539 { 09540 #if 0 09541 (yyval.val) = (yyvsp[(2) - (2)].val); 09542 #endif 09543 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); 09544 09545 } 09546 break; 09547 09548 case 430: 09549 09550 /* Line 1806 of yacc.c */ 09551 #line 3832 "ripper.y" 09552 { 09553 #if 0 09554 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 09555 #endif 09556 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 09557 09558 } 09559 break; 09560 09561 case 432: 09562 09563 /* Line 1806 of yacc.c */ 09564 #line 3843 "ripper.y" 09565 { 09566 #if 0 09567 NODE *node = (yyvsp[(1) - (1)].val); 09568 if (!node) { 09569 node = NEW_STR(STR_NEW0()); 09570 } 09571 else { 09572 node = evstr2dstr(node); 09573 } 09574 (yyval.val) = node; 09575 #endif 09576 (yyval.val) = (yyvsp[(1) - (1)].val); 09577 09578 } 09579 break; 09580 09581 case 435: 09582 09583 /* Line 1806 of yacc.c */ 09584 #line 3862 "ripper.y" 09585 { 09586 #if 0 09587 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09588 #endif 09589 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09590 09591 } 09592 break; 09593 09594 case 436: 09595 09596 /* Line 1806 of yacc.c */ 09597 #line 3872 "ripper.y" 09598 { 09599 #if 0 09600 (yyval.val) = (yyvsp[(2) - (3)].val); 09601 #endif 09602 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); 09603 09604 } 09605 break; 09606 09607 case 437: 09608 09609 /* Line 1806 of yacc.c */ 09610 #line 3882 "ripper.y" 09611 { 09612 #if 0 09613 NODE *node = (yyvsp[(2) - (3)].val); 09614 if (!node) { 09615 node = NEW_XSTR(STR_NEW0()); 09616 } 09617 else { 09618 switch (nd_type(node)) { 09619 case NODE_STR: 09620 nd_set_type(node, NODE_XSTR); 09621 break; 09622 case NODE_DSTR: 09623 nd_set_type(node, NODE_DXSTR); 09624 break; 09625 default: 09626 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 09627 break; 09628 } 09629 } 09630 (yyval.val) = node; 09631 #endif 09632 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); 09633 09634 } 09635 break; 09636 09637 case 438: 09638 09639 /* Line 1806 of yacc.c */ 09640 #line 3909 "ripper.y" 09641 { 09642 #if 0 09643 int options = (yyvsp[(3) - (3)].val); 09644 NODE *node = (yyvsp[(2) - (3)].val); 09645 NODE *list, *prev; 09646 if (!node) { 09647 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 09648 } 09649 else switch (nd_type(node)) { 09650 case NODE_STR: 09651 { 09652 VALUE src = node->nd_lit; 09653 nd_set_type(node, NODE_LIT); 09654 node->nd_lit = reg_compile(src, options); 09655 } 09656 break; 09657 default: 09658 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 09659 case NODE_DSTR: 09660 if (options & RE_OPTION_ONCE) { 09661 nd_set_type(node, NODE_DREGX_ONCE); 09662 } 09663 else { 09664 nd_set_type(node, NODE_DREGX); 09665 } 09666 node->nd_cflag = options & RE_OPTION_MASK; 09667 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 09668 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 09669 if (nd_type(list->nd_head) == NODE_STR) { 09670 VALUE tail = list->nd_head->nd_lit; 09671 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 09672 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 09673 if (!literal_concat0(parser, lit, tail)) { 09674 node = 0; 09675 break; 09676 } 09677 rb_str_resize(tail, 0); 09678 prev->nd_next = list->nd_next; 09679 rb_gc_force_recycle((VALUE)list->nd_head); 09680 rb_gc_force_recycle((VALUE)list); 09681 list = prev; 09682 } 09683 else { 09684 prev = list; 09685 } 09686 } 09687 else { 09688 prev = 0; 09689 } 09690 } 09691 if (!node->nd_next) { 09692 VALUE src = node->nd_lit; 09693 nd_set_type(node, NODE_LIT); 09694 node->nd_lit = reg_compile(src, options); 09695 } 09696 break; 09697 } 09698 (yyval.val) = node; 09699 #endif 09700 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 09701 09702 } 09703 break; 09704 09705 case 439: 09706 09707 /* Line 1806 of yacc.c */ 09708 #line 3974 "ripper.y" 09709 { 09710 #if 0 09711 (yyval.val) = NEW_ZARRAY(); 09712 #endif 09713 (yyval.val) = dispatch0(words_new); 09714 (yyval.val) = dispatch1(array, (yyval.val)); 09715 09716 } 09717 break; 09718 09719 case 440: 09720 09721 /* Line 1806 of yacc.c */ 09722 #line 3983 "ripper.y" 09723 { 09724 #if 0 09725 (yyval.val) = (yyvsp[(2) - (3)].val); 09726 #endif 09727 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09728 09729 } 09730 break; 09731 09732 case 441: 09733 09734 /* Line 1806 of yacc.c */ 09735 #line 3993 "ripper.y" 09736 { 09737 #if 0 09738 (yyval.val) = 0; 09739 #endif 09740 (yyval.val) = dispatch0(words_new); 09741 09742 } 09743 break; 09744 09745 case 442: 09746 09747 /* Line 1806 of yacc.c */ 09748 #line 4001 "ripper.y" 09749 { 09750 #if 0 09751 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); 09752 #endif 09753 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09754 09755 } 09756 break; 09757 09758 case 443: 09759 09760 /* Line 1806 of yacc.c */ 09761 #line 4013 "ripper.y" 09762 { 09763 (yyval.val) = dispatch0(word_new); 09764 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); 09765 } 09766 break; 09767 09768 case 444: 09769 09770 /* Line 1806 of yacc.c */ 09771 #line 4019 "ripper.y" 09772 { 09773 #if 0 09774 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09775 #endif 09776 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09777 09778 } 09779 break; 09780 09781 case 445: 09782 09783 /* Line 1806 of yacc.c */ 09784 #line 4029 "ripper.y" 09785 { 09786 #if 0 09787 (yyval.val) = NEW_ZARRAY(); 09788 #endif 09789 (yyval.val) = dispatch0(qwords_new); 09790 (yyval.val) = dispatch1(array, (yyval.val)); 09791 09792 } 09793 break; 09794 09795 case 446: 09796 09797 /* Line 1806 of yacc.c */ 09798 #line 4038 "ripper.y" 09799 { 09800 #if 0 09801 (yyval.val) = (yyvsp[(2) - (3)].val); 09802 #endif 09803 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 09804 09805 } 09806 break; 09807 09808 case 447: 09809 09810 /* Line 1806 of yacc.c */ 09811 #line 4048 "ripper.y" 09812 { 09813 #if 0 09814 (yyval.val) = 0; 09815 #endif 09816 (yyval.val) = dispatch0(qwords_new); 09817 09818 } 09819 break; 09820 09821 case 448: 09822 09823 /* Line 1806 of yacc.c */ 09824 #line 4056 "ripper.y" 09825 { 09826 #if 0 09827 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09828 #endif 09829 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 09830 09831 } 09832 break; 09833 09834 case 449: 09835 09836 /* Line 1806 of yacc.c */ 09837 #line 4066 "ripper.y" 09838 { 09839 #if 0 09840 (yyval.val) = 0; 09841 #endif 09842 (yyval.val) = dispatch0(string_content); 09843 09844 } 09845 break; 09846 09847 case 450: 09848 09849 /* Line 1806 of yacc.c */ 09850 #line 4074 "ripper.y" 09851 { 09852 #if 0 09853 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09854 #endif 09855 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09856 09857 } 09858 break; 09859 09860 case 451: 09861 09862 /* Line 1806 of yacc.c */ 09863 #line 4084 "ripper.y" 09864 { 09865 #if 0 09866 (yyval.val) = 0; 09867 #endif 09868 (yyval.val) = dispatch0(xstring_new); 09869 09870 } 09871 break; 09872 09873 case 452: 09874 09875 /* Line 1806 of yacc.c */ 09876 #line 4092 "ripper.y" 09877 { 09878 #if 0 09879 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09880 #endif 09881 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09882 09883 } 09884 break; 09885 09886 case 453: 09887 09888 /* Line 1806 of yacc.c */ 09889 #line 4102 "ripper.y" 09890 { 09891 #if 0 09892 (yyval.val) = 0; 09893 #endif 09894 (yyval.val) = dispatch0(regexp_new); 09895 09896 } 09897 break; 09898 09899 case 454: 09900 09901 /* Line 1806 of yacc.c */ 09902 #line 4110 "ripper.y" 09903 { 09904 #if 0 09905 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val); 09906 if (!head) { 09907 (yyval.val) = tail; 09908 } 09909 else if (!tail) { 09910 (yyval.val) = head; 09911 } 09912 else { 09913 switch (nd_type(head)) { 09914 case NODE_STR: 09915 nd_set_type(head, NODE_DSTR); 09916 break; 09917 case NODE_DSTR: 09918 break; 09919 default: 09920 head = list_append(NEW_DSTR(Qnil), head); 09921 break; 09922 } 09923 (yyval.val) = list_append(head, tail); 09924 } 09925 #endif 09926 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 09927 09928 } 09929 break; 09930 09931 case 456: 09932 09933 /* Line 1806 of yacc.c */ 09934 #line 4140 "ripper.y" 09935 { 09936 (yyval.node) = lex_strterm; 09937 lex_strterm = 0; 09938 lex_state = EXPR_BEG; 09939 } 09940 break; 09941 09942 case 457: 09943 09944 /* Line 1806 of yacc.c */ 09945 #line 4146 "ripper.y" 09946 { 09947 #if 0 09948 lex_strterm = (yyvsp[(2) - (3)].node); 09949 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); 09950 #endif 09951 lex_strterm = (yyvsp[(2) - (3)].node); 09952 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); 09953 09954 } 09955 break; 09956 09957 case 458: 09958 09959 /* Line 1806 of yacc.c */ 09960 #line 4156 "ripper.y" 09961 { 09962 (yyvsp[(1) - (1)].val) = cond_stack; 09963 (yyval.val) = cmdarg_stack; 09964 cond_stack = 0; 09965 cmdarg_stack = 0; 09966 } 09967 break; 09968 09969 case 459: 09970 09971 /* Line 1806 of yacc.c */ 09972 #line 4162 "ripper.y" 09973 { 09974 (yyval.node) = lex_strterm; 09975 lex_strterm = 0; 09976 lex_state = EXPR_BEG; 09977 } 09978 break; 09979 09980 case 460: 09981 09982 /* Line 1806 of yacc.c */ 09983 #line 4168 "ripper.y" 09984 { 09985 cond_stack = (yyvsp[(1) - (5)].val); 09986 cmdarg_stack = (yyvsp[(2) - (5)].val); 09987 lex_strterm = (yyvsp[(3) - (5)].node); 09988 #if 0 09989 if ((yyvsp[(4) - (5)].val)) (yyvsp[(4) - (5)].val)->flags &= ~NODE_FL_NEWLINE; 09990 (yyval.val) = new_evstr((yyvsp[(4) - (5)].val)); 09991 #endif 09992 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(4) - (5)].val)); 09993 09994 } 09995 break; 09996 09997 case 461: 09998 09999 /* Line 1806 of yacc.c */ 10000 #line 4182 "ripper.y" 10001 { 10002 #if 0 10003 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); 10004 #endif 10005 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10006 10007 } 10008 break; 10009 10010 case 462: 10011 10012 /* Line 1806 of yacc.c */ 10013 #line 4190 "ripper.y" 10014 { 10015 #if 0 10016 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); 10017 #endif 10018 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10019 10020 } 10021 break; 10022 10023 case 463: 10024 10025 /* Line 1806 of yacc.c */ 10026 #line 4198 "ripper.y" 10027 { 10028 #if 0 10029 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); 10030 #endif 10031 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10032 10033 } 10034 break; 10035 10036 case 465: 10037 10038 /* Line 1806 of yacc.c */ 10039 #line 4209 "ripper.y" 10040 { 10041 lex_state = EXPR_END; 10042 #if 0 10043 (yyval.val) = (yyvsp[(2) - (2)].val); 10044 #endif 10045 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); 10046 10047 } 10048 break; 10049 10050 case 470: 10051 10052 /* Line 1806 of yacc.c */ 10053 #line 4226 "ripper.y" 10054 { 10055 lex_state = EXPR_END; 10056 #if 0 10057 if (!((yyval.val) = (yyvsp[(2) - (3)].val))) { 10058 (yyval.val) = NEW_LIT(ID2SYM(rb_intern(""))); 10059 } 10060 else { 10061 VALUE lit; 10062 10063 switch (nd_type((yyval.val))) { 10064 case NODE_DSTR: 10065 nd_set_type((yyval.val), NODE_DSYM); 10066 break; 10067 case NODE_STR: 10068 lit = (yyval.val)->nd_lit; 10069 (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit)); 10070 nd_set_type((yyval.val), NODE_LIT); 10071 break; 10072 default: 10073 (yyval.val) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.val))); 10074 break; 10075 } 10076 } 10077 #endif 10078 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); 10079 10080 } 10081 break; 10082 10083 case 473: 10084 10085 /* Line 1806 of yacc.c */ 10086 #line 4258 "ripper.y" 10087 { 10088 #if 0 10089 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10090 #endif 10091 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10092 10093 } 10094 break; 10095 10096 case 474: 10097 10098 /* Line 1806 of yacc.c */ 10099 #line 4266 "ripper.y" 10100 { 10101 #if 0 10102 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10103 #endif 10104 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10105 10106 } 10107 break; 10108 10109 case 480: 10110 10111 /* Line 1806 of yacc.c */ 10112 #line 4282 "ripper.y" 10113 {ifndef_ripper((yyval.val) = keyword_nil);} 10114 break; 10115 10116 case 481: 10117 10118 /* Line 1806 of yacc.c */ 10119 #line 4283 "ripper.y" 10120 {ifndef_ripper((yyval.val) = keyword_self);} 10121 break; 10122 10123 case 482: 10124 10125 /* Line 1806 of yacc.c */ 10126 #line 4284 "ripper.y" 10127 {ifndef_ripper((yyval.val) = keyword_true);} 10128 break; 10129 10130 case 483: 10131 10132 /* Line 1806 of yacc.c */ 10133 #line 4285 "ripper.y" 10134 {ifndef_ripper((yyval.val) = keyword_false);} 10135 break; 10136 10137 case 484: 10138 10139 /* Line 1806 of yacc.c */ 10140 #line 4286 "ripper.y" 10141 {ifndef_ripper((yyval.val) = keyword__FILE__);} 10142 break; 10143 10144 case 485: 10145 10146 /* Line 1806 of yacc.c */ 10147 #line 4287 "ripper.y" 10148 {ifndef_ripper((yyval.val) = keyword__LINE__);} 10149 break; 10150 10151 case 486: 10152 10153 /* Line 1806 of yacc.c */ 10154 #line 4288 "ripper.y" 10155 {ifndef_ripper((yyval.val) = keyword__ENCODING__);} 10156 break; 10157 10158 case 487: 10159 10160 /* Line 1806 of yacc.c */ 10161 #line 4292 "ripper.y" 10162 { 10163 #if 0 10164 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10165 #endif 10166 if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) { 10167 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10168 } 10169 else { 10170 (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val)); 10171 } 10172 10173 } 10174 break; 10175 10176 case 488: 10177 10178 /* Line 1806 of yacc.c */ 10179 #line 4305 "ripper.y" 10180 { 10181 #if 0 10182 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10183 #endif 10184 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10185 10186 } 10187 break; 10188 10189 case 489: 10190 10191 /* Line 1806 of yacc.c */ 10192 #line 4315 "ripper.y" 10193 { 10194 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10195 #if 0 10196 #endif 10197 (yyval.val) = dispatch1(var_field, (yyval.val)); 10198 10199 } 10200 break; 10201 10202 case 490: 10203 10204 /* Line 1806 of yacc.c */ 10205 #line 4323 "ripper.y" 10206 { 10207 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10208 #if 0 10209 #endif 10210 (yyval.val) = dispatch1(var_field, (yyval.val)); 10211 10212 } 10213 break; 10214 10215 case 493: 10216 10217 /* Line 1806 of yacc.c */ 10218 #line 4337 "ripper.y" 10219 { 10220 #if 0 10221 (yyval.val) = 0; 10222 #endif 10223 (yyval.val) = Qnil; 10224 10225 } 10226 break; 10227 10228 case 494: 10229 10230 /* Line 1806 of yacc.c */ 10231 #line 4345 "ripper.y" 10232 { 10233 lex_state = EXPR_BEG; 10234 } 10235 break; 10236 10237 case 495: 10238 10239 /* Line 1806 of yacc.c */ 10240 #line 4349 "ripper.y" 10241 { 10242 (yyval.val) = (yyvsp[(3) - (4)].val); 10243 } 10244 break; 10245 10246 case 496: 10247 10248 /* Line 1806 of yacc.c */ 10249 #line 4353 "ripper.y" 10250 { 10251 #if 0 10252 yyerrok; 10253 (yyval.val) = 0; 10254 #endif 10255 yyerrok; 10256 (yyval.val) = Qnil; 10257 10258 } 10259 break; 10260 10261 case 497: 10262 10263 /* Line 1806 of yacc.c */ 10264 #line 4365 "ripper.y" 10265 { 10266 #if 0 10267 (yyval.val) = (yyvsp[(2) - (3)].val); 10268 #endif 10269 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 10270 10271 lex_state = EXPR_BEG; 10272 command_start = TRUE; 10273 } 10274 break; 10275 10276 case 498: 10277 10278 /* Line 1806 of yacc.c */ 10279 #line 4375 "ripper.y" 10280 { 10281 (yyval.val) = (yyvsp[(1) - (2)].val); 10282 } 10283 break; 10284 10285 case 499: 10286 10287 /* Line 1806 of yacc.c */ 10288 #line 4381 "ripper.y" 10289 { 10290 #if 0 10291 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val)); 10292 #endif 10293 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val))); 10294 10295 } 10296 break; 10297 10298 case 500: 10299 10300 /* Line 1806 of yacc.c */ 10301 #line 4389 "ripper.y" 10302 { 10303 #if 0 10304 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 10305 #endif 10306 (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val))); 10307 10308 } 10309 break; 10310 10311 case 501: 10312 10313 /* Line 1806 of yacc.c */ 10314 #line 4397 "ripper.y" 10315 { 10316 #if 0 10317 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val)); 10318 #endif 10319 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 10320 10321 } 10322 break; 10323 10324 case 502: 10325 10326 /* Line 1806 of yacc.c */ 10327 #line 4405 "ripper.y" 10328 { 10329 #if 0 10330 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10331 #endif 10332 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 10333 10334 } 10335 break; 10336 10337 case 503: 10338 10339 /* Line 1806 of yacc.c */ 10340 #line 4413 "ripper.y" 10341 { 10342 #if 0 10343 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 10344 #endif 10345 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 10346 10347 } 10348 break; 10349 10350 case 504: 10351 10352 /* Line 1806 of yacc.c */ 10353 #line 4421 "ripper.y" 10354 { 10355 #if 0 10356 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10357 #endif 10358 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 10359 10360 } 10361 break; 10362 10363 case 505: 10364 10365 /* Line 1806 of yacc.c */ 10366 #line 4429 "ripper.y" 10367 { 10368 #if 0 10369 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val)); 10370 #endif 10371 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 10372 10373 } 10374 break; 10375 10376 case 506: 10377 10378 /* Line 1806 of yacc.c */ 10379 #line 4437 "ripper.y" 10380 { 10381 #if 0 10382 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val)); 10383 #endif 10384 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val))); 10385 10386 } 10387 break; 10388 10389 case 507: 10390 10391 /* Line 1806 of yacc.c */ 10392 #line 4445 "ripper.y" 10393 { 10394 #if 0 10395 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10396 #endif 10397 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val))); 10398 10399 } 10400 break; 10401 10402 case 508: 10403 10404 /* Line 1806 of yacc.c */ 10405 #line 4453 "ripper.y" 10406 { 10407 #if 0 10408 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val)); 10409 #endif 10410 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 10411 10412 } 10413 break; 10414 10415 case 509: 10416 10417 /* Line 1806 of yacc.c */ 10418 #line 4461 "ripper.y" 10419 { 10420 #if 0 10421 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10422 #endif 10423 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 10424 10425 } 10426 break; 10427 10428 case 510: 10429 10430 /* Line 1806 of yacc.c */ 10431 #line 4469 "ripper.y" 10432 { 10433 #if 0 10434 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val)); 10435 #endif 10436 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val))); 10437 10438 } 10439 break; 10440 10441 case 511: 10442 10443 /* Line 1806 of yacc.c */ 10444 #line 4477 "ripper.y" 10445 { 10446 #if 0 10447 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10448 #endif 10449 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val))); 10450 10451 } 10452 break; 10453 10454 case 512: 10455 10456 /* Line 1806 of yacc.c */ 10457 #line 4485 "ripper.y" 10458 { 10459 #if 0 10460 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val)); 10461 #endif 10462 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val)); 10463 10464 } 10465 break; 10466 10467 case 513: 10468 10469 /* Line 1806 of yacc.c */ 10470 #line 4493 "ripper.y" 10471 { 10472 #if 0 10473 (yyval.val) = new_args(0, 0, 0, 0, 0); 10474 #endif 10475 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil); 10476 10477 } 10478 break; 10479 10480 case 514: 10481 10482 /* Line 1806 of yacc.c */ 10483 #line 4503 "ripper.y" 10484 { 10485 #if 0 10486 yyerror("formal argument cannot be a constant"); 10487 (yyval.val) = 0; 10488 #endif 10489 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10490 10491 } 10492 break; 10493 10494 case 515: 10495 10496 /* Line 1806 of yacc.c */ 10497 #line 4512 "ripper.y" 10498 { 10499 #if 0 10500 yyerror("formal argument cannot be an instance variable"); 10501 (yyval.val) = 0; 10502 #endif 10503 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10504 10505 } 10506 break; 10507 10508 case 516: 10509 10510 /* Line 1806 of yacc.c */ 10511 #line 4521 "ripper.y" 10512 { 10513 #if 0 10514 yyerror("formal argument cannot be a global variable"); 10515 (yyval.val) = 0; 10516 #endif 10517 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10518 10519 } 10520 break; 10521 10522 case 517: 10523 10524 /* Line 1806 of yacc.c */ 10525 #line 4530 "ripper.y" 10526 { 10527 #if 0 10528 yyerror("formal argument cannot be a class variable"); 10529 (yyval.val) = 0; 10530 #endif 10531 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10532 10533 } 10534 break; 10535 10536 case 519: 10537 10538 /* Line 1806 of yacc.c */ 10539 #line 4542 "ripper.y" 10540 { 10541 formal_argument(get_id((yyvsp[(1) - (1)].val))); 10542 (yyval.val) = (yyvsp[(1) - (1)].val); 10543 } 10544 break; 10545 10546 case 520: 10547 10548 /* Line 1806 of yacc.c */ 10549 #line 4549 "ripper.y" 10550 { 10551 arg_var(get_id((yyvsp[(1) - (1)].val))); 10552 #if 0 10553 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); 10554 #endif 10555 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 10556 10557 } 10558 break; 10559 10560 case 521: 10561 10562 /* Line 1806 of yacc.c */ 10563 #line 4558 "ripper.y" 10564 { 10565 ID tid = internal_id(); 10566 arg_var(tid); 10567 #if 0 10568 if (dyna_in_block()) { 10569 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); 10570 } 10571 else { 10572 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); 10573 } 10574 (yyval.val) = NEW_ARGS_AUX(tid, 1); 10575 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); 10576 #endif 10577 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 10578 10579 } 10580 break; 10581 10582 case 522: 10583 10584 /* Line 1806 of yacc.c */ 10585 #line 4579 "ripper.y" 10586 { 10587 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10588 } 10589 break; 10590 10591 case 523: 10592 10593 /* Line 1806 of yacc.c */ 10594 #line 4584 "ripper.y" 10595 { 10596 #if 0 10597 (yyval.val) = (yyvsp[(1) - (3)].val); 10598 (yyval.val)->nd_plen++; 10599 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); 10600 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); 10601 #endif 10602 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10603 10604 } 10605 break; 10606 10607 case 524: 10608 10609 /* Line 1806 of yacc.c */ 10610 #line 4597 "ripper.y" 10611 { 10612 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 10613 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10614 #if 0 10615 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 10616 #endif 10617 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 10618 10619 } 10620 break; 10621 10622 case 525: 10623 10624 /* Line 1806 of yacc.c */ 10625 #line 4609 "ripper.y" 10626 { 10627 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 10628 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10629 #if 0 10630 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 10631 #endif 10632 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 10633 10634 } 10635 break; 10636 10637 case 526: 10638 10639 /* Line 1806 of yacc.c */ 10640 #line 4621 "ripper.y" 10641 { 10642 #if 0 10643 (yyval.val) = (yyvsp[(1) - (1)].val); 10644 #endif 10645 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10646 10647 } 10648 break; 10649 10650 case 527: 10651 10652 /* Line 1806 of yacc.c */ 10653 #line 4629 "ripper.y" 10654 { 10655 #if 0 10656 NODE *opts = (yyvsp[(1) - (3)].val); 10657 10658 while (opts->nd_next) { 10659 opts = opts->nd_next; 10660 } 10661 opts->nd_next = (yyvsp[(3) - (3)].val); 10662 (yyval.val) = (yyvsp[(1) - (3)].val); 10663 #endif 10664 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10665 10666 } 10667 break; 10668 10669 case 528: 10670 10671 /* Line 1806 of yacc.c */ 10672 #line 4645 "ripper.y" 10673 { 10674 #if 0 10675 (yyval.val) = (yyvsp[(1) - (1)].val); 10676 #endif 10677 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10678 10679 } 10680 break; 10681 10682 case 529: 10683 10684 /* Line 1806 of yacc.c */ 10685 #line 4653 "ripper.y" 10686 { 10687 #if 0 10688 NODE *opts = (yyvsp[(1) - (3)].val); 10689 10690 while (opts->nd_next) { 10691 opts = opts->nd_next; 10692 } 10693 opts->nd_next = (yyvsp[(3) - (3)].val); 10694 (yyval.val) = (yyvsp[(1) - (3)].val); 10695 #endif 10696 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10697 10698 } 10699 break; 10700 10701 case 532: 10702 10703 /* Line 1806 of yacc.c */ 10704 #line 4673 "ripper.y" 10705 { 10706 #if 0 10707 if (!is_local_id((yyvsp[(2) - (2)].val))) 10708 yyerror("rest argument must be local variable"); 10709 #endif 10710 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 10711 #if 0 10712 (yyval.val) = (yyvsp[(2) - (2)].val); 10713 #endif 10714 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); 10715 10716 } 10717 break; 10718 10719 case 533: 10720 10721 /* Line 1806 of yacc.c */ 10722 #line 4686 "ripper.y" 10723 { 10724 #if 0 10725 (yyval.val) = internal_id(); 10726 arg_var((yyval.val)); 10727 #endif 10728 (yyval.val) = dispatch1(rest_param, Qnil); 10729 10730 } 10731 break; 10732 10733 case 536: 10734 10735 /* Line 1806 of yacc.c */ 10736 #line 4701 "ripper.y" 10737 { 10738 #if 0 10739 if (!is_local_id((yyvsp[(2) - (2)].val))) 10740 yyerror("block argument must be local variable"); 10741 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) 10742 yyerror("duplicated block argument name"); 10743 #endif 10744 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 10745 #if 0 10746 (yyval.val) = (yyvsp[(2) - (2)].val); 10747 #endif 10748 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); 10749 10750 } 10751 break; 10752 10753 case 537: 10754 10755 /* Line 1806 of yacc.c */ 10756 #line 4718 "ripper.y" 10757 { 10758 (yyval.val) = (yyvsp[(2) - (2)].val); 10759 } 10760 break; 10761 10762 case 538: 10763 10764 /* Line 1806 of yacc.c */ 10765 #line 4722 "ripper.y" 10766 { 10767 #if 0 10768 (yyval.val) = 0; 10769 #endif 10770 (yyval.val) = Qundef; 10771 10772 } 10773 break; 10774 10775 case 539: 10776 10777 /* Line 1806 of yacc.c */ 10778 #line 4732 "ripper.y" 10779 { 10780 #if 0 10781 value_expr((yyvsp[(1) - (1)].val)); 10782 (yyval.val) = (yyvsp[(1) - (1)].val); 10783 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 10784 #endif 10785 (yyval.val) = (yyvsp[(1) - (1)].val); 10786 10787 } 10788 break; 10789 10790 case 540: 10791 10792 /* Line 1806 of yacc.c */ 10793 #line 4741 "ripper.y" 10794 {lex_state = EXPR_BEG;} 10795 break; 10796 10797 case 541: 10798 10799 /* Line 1806 of yacc.c */ 10800 #line 4742 "ripper.y" 10801 { 10802 #if 0 10803 if ((yyvsp[(3) - (4)].val) == 0) { 10804 yyerror("can't define singleton method for ()."); 10805 } 10806 else { 10807 switch (nd_type((yyvsp[(3) - (4)].val))) { 10808 case NODE_STR: 10809 case NODE_DSTR: 10810 case NODE_XSTR: 10811 case NODE_DXSTR: 10812 case NODE_DREGX: 10813 case NODE_LIT: 10814 case NODE_ARRAY: 10815 case NODE_ZARRAY: 10816 yyerror("can't define singleton method for literals"); 10817 default: 10818 value_expr((yyvsp[(3) - (4)].val)); 10819 break; 10820 } 10821 } 10822 (yyval.val) = (yyvsp[(3) - (4)].val); 10823 #endif 10824 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); 10825 10826 } 10827 break; 10828 10829 case 543: 10830 10831 /* Line 1806 of yacc.c */ 10832 #line 4772 "ripper.y" 10833 { 10834 #if 0 10835 (yyval.val) = (yyvsp[(1) - (2)].val); 10836 #endif 10837 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); 10838 10839 } 10840 break; 10841 10842 case 544: 10843 10844 /* Line 1806 of yacc.c */ 10845 #line 4784 "ripper.y" 10846 { 10847 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10848 } 10849 break; 10850 10851 case 545: 10852 10853 /* Line 1806 of yacc.c */ 10854 #line 4789 "ripper.y" 10855 { 10856 #if 0 10857 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10858 #endif 10859 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10860 10861 } 10862 break; 10863 10864 case 546: 10865 10866 /* Line 1806 of yacc.c */ 10867 #line 4799 "ripper.y" 10868 { 10869 #if 0 10870 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 10871 #endif 10872 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10873 10874 } 10875 break; 10876 10877 case 547: 10878 10879 /* Line 1806 of yacc.c */ 10880 #line 4807 "ripper.y" 10881 { 10882 #if 0 10883 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); 10884 #endif 10885 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10886 10887 } 10888 break; 10889 10890 case 558: 10891 10892 /* Line 1806 of yacc.c */ 10893 #line 4835 "ripper.y" 10894 { (yyval.val) = (yyvsp[(1) - (1)].val); } 10895 break; 10896 10897 case 559: 10898 10899 /* Line 1806 of yacc.c */ 10900 #line 4840 "ripper.y" 10901 { (yyval.val) = (yyvsp[(1) - (1)].val); } 10902 break; 10903 10904 case 569: 10905 10906 /* Line 1806 of yacc.c */ 10907 #line 4863 "ripper.y" 10908 {yyerrok;} 10909 break; 10910 10911 case 572: 10912 10913 /* Line 1806 of yacc.c */ 10914 #line 4868 "ripper.y" 10915 {yyerrok;} 10916 break; 10917 10918 case 573: 10919 10920 /* Line 1806 of yacc.c */ 10921 #line 4872 "ripper.y" 10922 { 10923 #if 0 10924 (yyval.val) = 0; 10925 #endif 10926 (yyval.val) = Qundef; 10927 10928 } 10929 break; 10930 10931 10932 10933 /* Line 1806 of yacc.c */ 10934 #line 10933 "parse.c" 10935 default: break; 10936 } 10937 /* User semantic actions sometimes alter yychar, and that requires 10938 that yytoken be updated with the new translation. We take the 10939 approach of translating immediately before every use of yytoken. 10940 One alternative is translating here after every semantic action, 10941 but that translation would be missed if the semantic action invokes 10942 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 10943 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 10944 incorrect destructor might then be invoked immediately. In the 10945 case of YYERROR or YYBACKUP, subsequent parser actions might lead 10946 to an incorrect destructor call or verbose syntax error message 10947 before the lookahead is translated. */ 10948 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 10949 10950 YYPOPSTACK (yylen); 10951 yylen = 0; 10952 YY_STACK_PRINT (yyss, yyssp); 10953 10954 *++yyvsp = yyval; 10955 10956 /* Now `shift' the result of the reduction. Determine what state 10957 that goes to, based on the state we popped back to and the rule 10958 number reduced by. */ 10959 10960 yyn = yyr1[yyn]; 10961 10962 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 10963 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 10964 yystate = yytable[yystate]; 10965 else 10966 yystate = yydefgoto[yyn - YYNTOKENS]; 10967 10968 goto yynewstate; 10969 10970 10971 /*------------------------------------. 10972 | yyerrlab -- here on detecting error | 10973 `------------------------------------*/ 10974 yyerrlab: 10975 /* Make sure we have latest lookahead translation. See comments at 10976 user semantic actions for why this is necessary. */ 10977 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 10978 10979 /* If not already recovering from an error, report this error. */ 10980 if (!yyerrstatus) 10981 { 10982 ++yynerrs; 10983 #if ! YYERROR_VERBOSE 10984 parser_yyerror (parser, YY_("syntax error")); 10985 #else 10986 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 10987 yyssp, yytoken) 10988 { 10989 char const *yymsgp = YY_("syntax error"); 10990 int yysyntax_error_status; 10991 yysyntax_error_status = YYSYNTAX_ERROR; 10992 if (yysyntax_error_status == 0) 10993 yymsgp = yymsg; 10994 else if (yysyntax_error_status == 1) 10995 { 10996 if (yymsg != yymsgbuf) 10997 YYSTACK_FREE (yymsg); 10998 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 10999 if (!yymsg) 11000 { 11001 yymsg = yymsgbuf; 11002 yymsg_alloc = sizeof yymsgbuf; 11003 yysyntax_error_status = 2; 11004 } 11005 else 11006 { 11007 yysyntax_error_status = YYSYNTAX_ERROR; 11008 yymsgp = yymsg; 11009 } 11010 } 11011 parser_yyerror (parser, yymsgp); 11012 if (yysyntax_error_status == 2) 11013 goto yyexhaustedlab; 11014 } 11015 # undef YYSYNTAX_ERROR 11016 #endif 11017 } 11018 11019 11020 11021 if (yyerrstatus == 3) 11022 { 11023 /* If just tried and failed to reuse lookahead token after an 11024 error, discard it. */ 11025 11026 if (yychar <= YYEOF) 11027 { 11028 /* Return failure if at end of input. */ 11029 if (yychar == YYEOF) 11030 YYABORT; 11031 } 11032 else 11033 { 11034 yydestruct ("Error: discarding", 11035 yytoken, &yylval, parser); 11036 yychar = YYEMPTY; 11037 } 11038 } 11039 11040 /* Else will try to reuse lookahead token after shifting the error 11041 token. */ 11042 goto yyerrlab1; 11043 11044 11045 /*---------------------------------------------------. 11046 | yyerrorlab -- error raised explicitly by YYERROR. | 11047 `---------------------------------------------------*/ 11048 yyerrorlab: 11049 11050 /* Pacify compilers like GCC when the user code never invokes 11051 YYERROR and the label yyerrorlab therefore never appears in user 11052 code. */ 11053 if (/*CONSTCOND*/ 0) 11054 goto yyerrorlab; 11055 11056 /* Do not reclaim the symbols of the rule which action triggered 11057 this YYERROR. */ 11058 YYPOPSTACK (yylen); 11059 yylen = 0; 11060 YY_STACK_PRINT (yyss, yyssp); 11061 yystate = *yyssp; 11062 goto yyerrlab1; 11063 11064 11065 /*-------------------------------------------------------------. 11066 | yyerrlab1 -- common code for both syntax error and YYERROR. | 11067 `-------------------------------------------------------------*/ 11068 yyerrlab1: 11069 yyerrstatus = 3; /* Each real token shifted decrements this. */ 11070 11071 for (;;) 11072 { 11073 yyn = yypact[yystate]; 11074 if (!yypact_value_is_default (yyn)) 11075 { 11076 yyn += YYTERROR; 11077 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 11078 { 11079 yyn = yytable[yyn]; 11080 if (0 < yyn) 11081 break; 11082 } 11083 } 11084 11085 /* Pop the current state because it cannot handle the error token. */ 11086 if (yyssp == yyss) 11087 YYABORT; 11088 11089 11090 yydestruct ("Error: popping", 11091 yystos[yystate], yyvsp, parser); 11092 YYPOPSTACK (1); 11093 yystate = *yyssp; 11094 YY_STACK_PRINT (yyss, yyssp); 11095 } 11096 11097 *++yyvsp = yylval; 11098 11099 11100 /* Shift the error token. */ 11101 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 11102 11103 yystate = yyn; 11104 goto yynewstate; 11105 11106 11107 /*-------------------------------------. 11108 | yyacceptlab -- YYACCEPT comes here. | 11109 `-------------------------------------*/ 11110 yyacceptlab: 11111 yyresult = 0; 11112 goto yyreturn; 11113 11114 /*-----------------------------------. 11115 | yyabortlab -- YYABORT comes here. | 11116 `-----------------------------------*/ 11117 yyabortlab: 11118 yyresult = 1; 11119 goto yyreturn; 11120 11121 #if !defined(yyoverflow) || YYERROR_VERBOSE 11122 /*-------------------------------------------------. 11123 | yyexhaustedlab -- memory exhaustion comes here. | 11124 `-------------------------------------------------*/ 11125 yyexhaustedlab: 11126 parser_yyerror (parser, YY_("memory exhausted")); 11127 yyresult = 2; 11128 /* Fall through. */ 11129 #endif 11130 11131 yyreturn: 11132 if (yychar != YYEMPTY) 11133 { 11134 /* Make sure we have latest lookahead translation. See comments at 11135 user semantic actions for why this is necessary. */ 11136 yytoken = YYTRANSLATE (yychar); 11137 yydestruct ("Cleanup: discarding lookahead", 11138 yytoken, &yylval, parser); 11139 } 11140 /* Do not reclaim the symbols of the rule which action triggered 11141 this YYABORT or YYACCEPT. */ 11142 YYPOPSTACK (yylen); 11143 YY_STACK_PRINT (yyss, yyssp); 11144 while (yyssp != yyss) 11145 { 11146 yydestruct ("Cleanup: popping", 11147 yystos[*yyssp], yyvsp, parser); 11148 YYPOPSTACK (1); 11149 } 11150 #ifndef yyoverflow 11151 if (yyss != yyssa) 11152 YYSTACK_FREE (yyss); 11153 #endif 11154 #if YYERROR_VERBOSE 11155 if (yymsg != yymsgbuf) 11156 YYSTACK_FREE (yymsg); 11157 #endif 11158 /* Make sure YYID is used. */ 11159 return YYID (yyresult); 11160 } 11161 11162 11163 11164 /* Line 2067 of yacc.c */ 11165 #line 4880 "ripper.y" 11166 11167 # undef parser 11168 # undef yylex 11169 # undef yylval 11170 # define yylval (*((YYSTYPE*)(parser->parser_yylval))) 11171 11172 static int parser_regx_options(struct parser_params*); 11173 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 11174 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 11175 static int parser_parse_string(struct parser_params*,NODE*); 11176 static int parser_here_document(struct parser_params*,NODE*); 11177 11178 11179 # define nextc() parser_nextc(parser) 11180 # define pushback(c) parser_pushback(parser, (c)) 11181 # define newtok() parser_newtok(parser) 11182 # define tokspace(n) parser_tokspace(parser, (n)) 11183 # define tokadd(c) parser_tokadd(parser, (c)) 11184 # define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 11185 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 11186 # define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 11187 # define regx_options() parser_regx_options(parser) 11188 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 11189 # define parse_string(n) parser_parse_string(parser,(n)) 11190 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 11191 # define here_document(n) parser_here_document(parser,(n)) 11192 # define heredoc_identifier() parser_heredoc_identifier(parser) 11193 # define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 11194 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 11195 11196 #ifndef RIPPER 11197 # define set_yylval_str(x) (yylval.node = NEW_STR(x)) 11198 # define set_yylval_num(x) (yylval.num = (x)) 11199 # define set_yylval_id(x) (yylval.id = (x)) 11200 # define set_yylval_name(x) (yylval.id = (x)) 11201 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 11202 # define set_yylval_node(x) (yylval.node = (x)) 11203 # define yylval_id() (yylval.id) 11204 #else 11205 static inline VALUE 11206 ripper_yylval_id(ID x) 11207 { 11208 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 11209 } 11210 # define set_yylval_str(x) (void)(x) 11211 # define set_yylval_num(x) (void)(x) 11212 # define set_yylval_id(x) (void)(x) 11213 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 11214 # define set_yylval_literal(x) (void)(x) 11215 # define set_yylval_node(x) (void)(x) 11216 # define yylval_id() yylval.id 11217 #endif 11218 11219 #ifndef RIPPER 11220 #define ripper_flush(p) (void)(p) 11221 #else 11222 #define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 11223 11224 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 11225 11226 static int 11227 ripper_has_scan_event(struct parser_params *parser) 11228 { 11229 11230 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 11231 return lex_p > parser->tokp; 11232 } 11233 11234 static VALUE 11235 ripper_scan_event_val(struct parser_params *parser, int t) 11236 { 11237 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 11238 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 11239 ripper_flush(parser); 11240 return rval; 11241 } 11242 11243 static void 11244 ripper_dispatch_scan_event(struct parser_params *parser, int t) 11245 { 11246 if (!ripper_has_scan_event(parser)) return; 11247 yylval_rval = ripper_scan_event_val(parser, t); 11248 } 11249 11250 static void 11251 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 11252 { 11253 if (!ripper_has_scan_event(parser)) return; 11254 (void)ripper_scan_event_val(parser, t); 11255 } 11256 11257 static void 11258 ripper_dispatch_delayed_token(struct parser_params *parser, int t) 11259 { 11260 int saved_line = ruby_sourceline; 11261 const char *saved_tokp = parser->tokp; 11262 11263 ruby_sourceline = parser->delayed_line; 11264 parser->tokp = lex_pbeg + parser->delayed_col; 11265 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 11266 parser->delayed = Qnil; 11267 ruby_sourceline = saved_line; 11268 parser->tokp = saved_tokp; 11269 } 11270 #endif /* RIPPER */ 11271 11272 #include "ruby/regex.h" 11273 #include "ruby/util.h" 11274 11275 /* We remove any previous definition of `SIGN_EXTEND_CHAR', 11276 since ours (we hope) works properly with all combinations of 11277 machines, compilers, `char' and `unsigned char' argument types. 11278 (Per Bothner suggested the basic approach.) */ 11279 #undef SIGN_EXTEND_CHAR 11280 #if __STDC__ 11281 # define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 11282 #else /* not __STDC__ */ 11283 /* As in Harbison and Steele. */ 11284 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 11285 #endif 11286 11287 #define parser_encoding_name() (parser->enc->name) 11288 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc) 11289 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc) 11290 #define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 11291 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc)) 11292 11293 #define parser_isascii() ISASCII(*(lex_p-1)) 11294 11295 #ifndef RIPPER 11296 static int 11297 token_info_get_column(struct parser_params *parser, const char *token) 11298 { 11299 int column = 1; 11300 const char *p, *pend = lex_p - strlen(token); 11301 for (p = lex_pbeg; p < pend; p++) { 11302 if (*p == '\t') { 11303 column = (((column - 1) / 8) + 1) * 8; 11304 } 11305 column++; 11306 } 11307 return column; 11308 } 11309 11310 static int 11311 token_info_has_nonspaces(struct parser_params *parser, const char *token) 11312 { 11313 const char *p, *pend = lex_p - strlen(token); 11314 for (p = lex_pbeg; p < pend; p++) { 11315 if (*p != ' ' && *p != '\t') { 11316 return 1; 11317 } 11318 } 11319 return 0; 11320 } 11321 11322 #undef token_info_push 11323 static void 11324 token_info_push(struct parser_params *parser, const char *token) 11325 { 11326 token_info *ptinfo; 11327 11328 if (!parser->parser_token_info_enabled) return; 11329 ptinfo = ALLOC(token_info); 11330 ptinfo->token = token; 11331 ptinfo->linenum = ruby_sourceline; 11332 ptinfo->column = token_info_get_column(parser, token); 11333 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 11334 ptinfo->next = parser->parser_token_info; 11335 11336 parser->parser_token_info = ptinfo; 11337 } 11338 11339 #undef token_info_pop 11340 static void 11341 token_info_pop(struct parser_params *parser, const char *token) 11342 { 11343 int linenum; 11344 token_info *ptinfo = parser->parser_token_info; 11345 11346 if (!ptinfo) return; 11347 parser->parser_token_info = ptinfo->next; 11348 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 11349 goto finish; 11350 } 11351 linenum = ruby_sourceline; 11352 if (linenum == ptinfo->linenum) { /* SKIP */ 11353 goto finish; 11354 } 11355 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 11356 goto finish; 11357 } 11358 if (parser->parser_token_info_enabled) { 11359 rb_compile_warn(ruby_sourcefile, linenum, 11360 "mismatched indentations at '%s' with '%s' at %d", 11361 token, ptinfo->token, ptinfo->linenum); 11362 } 11363 11364 finish: 11365 xfree(ptinfo); 11366 } 11367 #endif /* RIPPER */ 11368 11369 static int 11370 parser_yyerror(struct parser_params *parser, const char *msg) 11371 { 11372 #ifndef RIPPER 11373 const int max_line_margin = 30; 11374 const char *p, *pe; 11375 char *buf; 11376 long len; 11377 int i; 11378 11379 compile_error(PARSER_ARG "%s", msg); 11380 p = lex_p; 11381 while (lex_pbeg <= p) { 11382 if (*p == '\n') break; 11383 p--; 11384 } 11385 p++; 11386 11387 pe = lex_p; 11388 while (pe < lex_pend) { 11389 if (*pe == '\n') break; 11390 pe++; 11391 } 11392 11393 len = pe - p; 11394 if (len > 4) { 11395 char *p2; 11396 const char *pre = "", *post = ""; 11397 11398 if (len > max_line_margin * 2 + 10) { 11399 if (lex_p - p > max_line_margin) { 11400 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 11401 pre = "..."; 11402 } 11403 if (pe - lex_p > max_line_margin) { 11404 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 11405 post = "..."; 11406 } 11407 len = pe - p; 11408 } 11409 buf = ALLOCA_N(char, len+2); 11410 MEMCPY(buf, p, char, len); 11411 buf[len] = '\0'; 11412 rb_compile_error_append("%s%s%s", pre, buf, post); 11413 11414 i = (int)(lex_p - p); 11415 p2 = buf; pe = buf + len; 11416 11417 while (p2 < pe) { 11418 if (*p2 != '\t') *p2 = ' '; 11419 p2++; 11420 } 11421 buf[i] = '^'; 11422 buf[i+1] = '\0'; 11423 rb_compile_error_append("%s%s", pre, buf); 11424 } 11425 #else 11426 dispatch1(parse_error, STR_NEW2(msg)); 11427 #endif /* !RIPPER */ 11428 return 0; 11429 } 11430 11431 static void parser_prepare(struct parser_params *parser); 11432 11433 #ifndef RIPPER 11434 static VALUE 11435 debug_lines(const char *f) 11436 { 11437 ID script_lines; 11438 CONST_ID(script_lines, "SCRIPT_LINES__"); 11439 if (rb_const_defined_at(rb_cObject, script_lines)) { 11440 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 11441 if (TYPE(hash) == T_HASH) { 11442 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 11443 VALUE lines = rb_ary_new(); 11444 rb_hash_aset(hash, fname, lines); 11445 return lines; 11446 } 11447 } 11448 return 0; 11449 } 11450 11451 static VALUE 11452 coverage(const char *f, int n) 11453 { 11454 VALUE coverages = rb_get_coverages(); 11455 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 11456 VALUE fname = rb_external_str_new_with_enc(f, strlen(f), rb_filesystem_encoding()); 11457 VALUE lines = rb_ary_new2(n); 11458 int i; 11459 RBASIC(lines)->klass = 0; 11460 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 11461 RARRAY(lines)->as.heap.len = n; 11462 rb_hash_aset(coverages, fname, lines); 11463 return lines; 11464 } 11465 return 0; 11466 } 11467 11468 static int 11469 e_option_supplied(struct parser_params *parser) 11470 { 11471 return strcmp(ruby_sourcefile, "-e") == 0; 11472 } 11473 11474 static VALUE 11475 yycompile0(VALUE arg, int tracing) 11476 { 11477 int n; 11478 NODE *tree; 11479 struct parser_params *parser = (struct parser_params *)arg; 11480 11481 if (!compile_for_eval && rb_safe_level() == 0) { 11482 ruby_debug_lines = debug_lines(ruby_sourcefile); 11483 if (ruby_debug_lines && ruby_sourceline > 0) { 11484 VALUE str = STR_NEW0(); 11485 n = ruby_sourceline; 11486 do { 11487 rb_ary_push(ruby_debug_lines, str); 11488 } while (--n); 11489 } 11490 11491 if (!e_option_supplied(parser)) { 11492 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline); 11493 } 11494 } 11495 11496 parser_prepare(parser); 11497 deferred_nodes = 0; 11498 #ifndef RIPPER 11499 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 11500 #endif 11501 n = yyparse((void*)parser); 11502 ruby_debug_lines = 0; 11503 ruby_coverage = 0; 11504 compile_for_eval = 0; 11505 11506 lex_strterm = 0; 11507 lex_p = lex_pbeg = lex_pend = 0; 11508 lex_lastline = lex_nextline = 0; 11509 if (parser->nerr) { 11510 return 0; 11511 } 11512 tree = ruby_eval_tree; 11513 if (!tree) { 11514 tree = NEW_NIL(); 11515 } 11516 else if (ruby_eval_tree_begin) { 11517 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 11518 } 11519 return (VALUE)tree; 11520 } 11521 11522 static NODE* 11523 yycompile(struct parser_params *parser, const char *f, int line) 11524 { 11525 ruby_sourcefile = ruby_strdup(f); 11526 ruby_sourceline = line - 1; 11527 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE); 11528 } 11529 #endif /* !RIPPER */ 11530 11531 static rb_encoding * 11532 must_be_ascii_compatible(VALUE s) 11533 { 11534 rb_encoding *enc = rb_enc_get(s); 11535 if (!rb_enc_asciicompat(enc)) { 11536 rb_raise(rb_eArgError, "invalid source encoding"); 11537 } 11538 return enc; 11539 } 11540 11541 static VALUE 11542 lex_get_str(struct parser_params *parser, VALUE s) 11543 { 11544 char *beg, *end, *pend; 11545 rb_encoding *enc = must_be_ascii_compatible(s); 11546 11547 beg = RSTRING_PTR(s); 11548 if (lex_gets_ptr) { 11549 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11550 beg += lex_gets_ptr; 11551 } 11552 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11553 end = beg; 11554 while (end < pend) { 11555 if (*end++ == '\n') break; 11556 } 11557 lex_gets_ptr = end - RSTRING_PTR(s); 11558 return rb_enc_str_new(beg, end - beg, enc); 11559 } 11560 11561 static VALUE 11562 lex_getline(struct parser_params *parser) 11563 { 11564 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11565 if (NIL_P(line)) return line; 11566 must_be_ascii_compatible(line); 11567 #ifndef RIPPER 11568 if (ruby_debug_lines) { 11569 rb_enc_associate(line, parser->enc); 11570 rb_ary_push(ruby_debug_lines, line); 11571 } 11572 if (ruby_coverage) { 11573 rb_ary_push(ruby_coverage, Qnil); 11574 } 11575 #endif 11576 return line; 11577 } 11578 11579 #ifdef RIPPER 11580 static rb_data_type_t parser_data_type; 11581 #else 11582 static const rb_data_type_t parser_data_type; 11583 11584 static NODE* 11585 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11586 { 11587 struct parser_params *parser; 11588 NODE *node; 11589 volatile VALUE tmp; 11590 11591 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11592 lex_gets = lex_get_str; 11593 lex_gets_ptr = 0; 11594 lex_input = s; 11595 lex_pbeg = lex_p = lex_pend = 0; 11596 compile_for_eval = rb_parse_in_eval(); 11597 11598 node = yycompile(parser, f, line); 11599 tmp = vparser; /* prohibit tail call optimization */ 11600 11601 return node; 11602 } 11603 11604 NODE* 11605 rb_compile_string(const char *f, VALUE s, int line) 11606 { 11607 must_be_ascii_compatible(s); 11608 return parser_compile_string(rb_parser_new(), f, s, line); 11609 } 11610 11611 NODE* 11612 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 11613 { 11614 must_be_ascii_compatible(s); 11615 return parser_compile_string(vparser, f, s, line); 11616 } 11617 11618 NODE* 11619 rb_compile_cstr(const char *f, const char *s, int len, int line) 11620 { 11621 VALUE str = rb_str_new(s, len); 11622 return parser_compile_string(rb_parser_new(), f, str, line); 11623 } 11624 11625 NODE* 11626 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 11627 { 11628 VALUE str = rb_str_new(s, len); 11629 return parser_compile_string(vparser, f, str, line); 11630 } 11631 11632 static VALUE 11633 lex_io_gets(struct parser_params *parser, VALUE io) 11634 { 11635 return rb_io_gets(io); 11636 } 11637 11638 NODE* 11639 rb_compile_file(const char *f, VALUE file, int start) 11640 { 11641 VALUE volatile vparser = rb_parser_new(); 11642 11643 return rb_parser_compile_file(vparser, f, file, start); 11644 } 11645 11646 NODE* 11647 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 11648 { 11649 struct parser_params *parser; 11650 volatile VALUE tmp; 11651 NODE *node; 11652 11653 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 11654 lex_gets = lex_io_gets; 11655 lex_input = file; 11656 lex_pbeg = lex_p = lex_pend = 0; 11657 compile_for_eval = rb_parse_in_eval(); 11658 11659 node = yycompile(parser, f, start); 11660 tmp = vparser; /* prohibit tail call optimization */ 11661 11662 return node; 11663 } 11664 #endif /* !RIPPER */ 11665 11666 #define STR_FUNC_ESCAPE 0x01 11667 #define STR_FUNC_EXPAND 0x02 11668 #define STR_FUNC_REGEXP 0x04 11669 #define STR_FUNC_QWORDS 0x08 11670 #define STR_FUNC_SYMBOL 0x10 11671 #define STR_FUNC_INDENT 0x20 11672 11673 enum string_type { 11674 str_squote = (0), 11675 str_dquote = (STR_FUNC_EXPAND), 11676 str_xquote = (STR_FUNC_EXPAND), 11677 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 11678 str_sword = (STR_FUNC_QWORDS), 11679 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 11680 str_ssym = (STR_FUNC_SYMBOL), 11681 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 11682 }; 11683 11684 static VALUE 11685 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 11686 { 11687 VALUE str; 11688 11689 str = rb_enc_str_new(p, n, enc); 11690 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 11691 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 11692 } 11693 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 11694 rb_enc_associate(str, rb_ascii8bit_encoding()); 11695 } 11696 } 11697 11698 return str; 11699 } 11700 11701 #define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 11702 #define lex_eol_p() (lex_p >= lex_pend) 11703 #define peek(c) peek_n((c), 0) 11704 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 11705 11706 static inline int 11707 parser_nextc(struct parser_params *parser) 11708 { 11709 int c; 11710 11711 if (lex_p == lex_pend) { 11712 VALUE v = lex_nextline; 11713 lex_nextline = 0; 11714 if (!v) { 11715 if (parser->eofp) 11716 return -1; 11717 11718 if (!lex_input || NIL_P(v = lex_getline(parser))) { 11719 parser->eofp = Qtrue; 11720 lex_goto_eol(parser); 11721 return -1; 11722 } 11723 } 11724 { 11725 #ifdef RIPPER 11726 if (parser->tokp < lex_pend) { 11727 if (NIL_P(parser->delayed)) { 11728 parser->delayed = rb_str_buf_new(1024); 11729 rb_enc_associate(parser->delayed, parser->enc); 11730 rb_str_buf_cat(parser->delayed, 11731 parser->tokp, lex_pend - parser->tokp); 11732 parser->delayed_line = ruby_sourceline; 11733 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 11734 } 11735 else { 11736 rb_str_buf_cat(parser->delayed, 11737 parser->tokp, lex_pend - parser->tokp); 11738 } 11739 } 11740 #endif 11741 if (heredoc_end > 0) { 11742 ruby_sourceline = heredoc_end; 11743 heredoc_end = 0; 11744 } 11745 ruby_sourceline++; 11746 parser->line_count++; 11747 lex_pbeg = lex_p = RSTRING_PTR(v); 11748 lex_pend = lex_p + RSTRING_LEN(v); 11749 ripper_flush(parser); 11750 lex_lastline = v; 11751 } 11752 } 11753 c = (unsigned char)*lex_p++; 11754 if (c == '\r' && peek('\n')) { 11755 lex_p++; 11756 c = '\n'; 11757 } 11758 11759 return c; 11760 } 11761 11762 static void 11763 parser_pushback(struct parser_params *parser, int c) 11764 { 11765 if (c == -1) return; 11766 lex_p--; 11767 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 11768 lex_p--; 11769 } 11770 } 11771 11772 #define was_bol() (lex_p == lex_pbeg + 1) 11773 11774 #define tokfix() (tokenbuf[tokidx]='\0') 11775 #define tok() tokenbuf 11776 #define toklen() tokidx 11777 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 11778 11779 static char* 11780 parser_newtok(struct parser_params *parser) 11781 { 11782 tokidx = 0; 11783 if (!tokenbuf) { 11784 toksiz = 60; 11785 tokenbuf = ALLOC_N(char, 60); 11786 } 11787 if (toksiz > 4096) { 11788 toksiz = 60; 11789 REALLOC_N(tokenbuf, char, 60); 11790 } 11791 return tokenbuf; 11792 } 11793 11794 static char * 11795 parser_tokspace(struct parser_params *parser, int n) 11796 { 11797 tokidx += n; 11798 11799 if (tokidx >= toksiz) { 11800 do {toksiz *= 2;} while (toksiz < tokidx); 11801 REALLOC_N(tokenbuf, char, toksiz); 11802 } 11803 return &tokenbuf[tokidx-n]; 11804 } 11805 11806 static void 11807 parser_tokadd(struct parser_params *parser, int c) 11808 { 11809 tokenbuf[tokidx++] = (char)c; 11810 if (tokidx >= toksiz) { 11811 toksiz *= 2; 11812 REALLOC_N(tokenbuf, char, toksiz); 11813 } 11814 } 11815 11816 static int 11817 parser_tok_hex(struct parser_params *parser, size_t *numlen) 11818 { 11819 int c; 11820 11821 c = scan_hex(lex_p, 2, numlen); 11822 if (!*numlen) { 11823 yyerror("invalid hex escape"); 11824 return 0; 11825 } 11826 lex_p += *numlen; 11827 return c; 11828 } 11829 11830 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 11831 11832 static int 11833 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 11834 int string_literal, int symbol_literal, int regexp_literal) 11835 { 11836 /* 11837 * If string_literal is true, then we allow multiple codepoints 11838 * in \u{}, and add the codepoints to the current token. 11839 * Otherwise we're parsing a character literal and return a single 11840 * codepoint without adding it 11841 */ 11842 11843 int codepoint; 11844 size_t numlen; 11845 11846 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 11847 11848 if (peek('{')) { /* handle \u{...} form */ 11849 do { 11850 if (regexp_literal) { tokadd(*lex_p); } 11851 nextc(); 11852 codepoint = scan_hex(lex_p, 6, &numlen); 11853 if (numlen == 0) { 11854 yyerror("invalid Unicode escape"); 11855 return 0; 11856 } 11857 if (codepoint > 0x10ffff) { 11858 yyerror("invalid Unicode codepoint (too large)"); 11859 return 0; 11860 } 11861 lex_p += numlen; 11862 if (regexp_literal) { 11863 tokcopy((int)numlen); 11864 } 11865 else if (codepoint >= 0x80) { 11866 *encp = UTF8_ENC(); 11867 if (string_literal) tokaddmbc(codepoint, *encp); 11868 } 11869 else if (string_literal) { 11870 tokadd(codepoint); 11871 } 11872 } while (string_literal && (peek(' ') || peek('\t'))); 11873 11874 if (!peek('}')) { 11875 yyerror("unterminated Unicode escape"); 11876 return 0; 11877 } 11878 11879 if (regexp_literal) { tokadd('}'); } 11880 nextc(); 11881 } 11882 else { /* handle \uxxxx form */ 11883 codepoint = scan_hex(lex_p, 4, &numlen); 11884 if (numlen < 4) { 11885 yyerror("invalid Unicode escape"); 11886 return 0; 11887 } 11888 lex_p += 4; 11889 if (regexp_literal) { 11890 tokcopy(4); 11891 } 11892 else if (codepoint >= 0x80) { 11893 *encp = UTF8_ENC(); 11894 if (string_literal) tokaddmbc(codepoint, *encp); 11895 } 11896 else if (string_literal) { 11897 tokadd(codepoint); 11898 } 11899 } 11900 11901 return codepoint; 11902 } 11903 11904 #define ESCAPE_CONTROL 1 11905 #define ESCAPE_META 2 11906 11907 static int 11908 parser_read_escape(struct parser_params *parser, int flags, 11909 rb_encoding **encp) 11910 { 11911 int c; 11912 size_t numlen; 11913 11914 switch (c = nextc()) { 11915 case '\\': /* Backslash */ 11916 return c; 11917 11918 case 'n': /* newline */ 11919 return '\n'; 11920 11921 case 't': /* horizontal tab */ 11922 return '\t'; 11923 11924 case 'r': /* carriage-return */ 11925 return '\r'; 11926 11927 case 'f': /* form-feed */ 11928 return '\f'; 11929 11930 case 'v': /* vertical tab */ 11931 return '\13'; 11932 11933 case 'a': /* alarm(bell) */ 11934 return '\007'; 11935 11936 case 'e': /* escape */ 11937 return 033; 11938 11939 case '0': case '1': case '2': case '3': /* octal constant */ 11940 case '4': case '5': case '6': case '7': 11941 pushback(c); 11942 c = scan_oct(lex_p, 3, &numlen); 11943 lex_p += numlen; 11944 return c; 11945 11946 case 'x': /* hex constant */ 11947 c = tok_hex(&numlen); 11948 if (numlen == 0) return 0; 11949 return c; 11950 11951 case 'b': /* backspace */ 11952 return '\010'; 11953 11954 case 's': /* space */ 11955 return ' '; 11956 11957 case 'M': 11958 if (flags & ESCAPE_META) goto eof; 11959 if ((c = nextc()) != '-') { 11960 pushback(c); 11961 goto eof; 11962 } 11963 if ((c = nextc()) == '\\') { 11964 if (peek('u')) goto eof; 11965 return read_escape(flags|ESCAPE_META, encp) | 0x80; 11966 } 11967 else if (c == -1 || !ISASCII(c)) goto eof; 11968 else { 11969 return ((c & 0xff) | 0x80); 11970 } 11971 11972 case 'C': 11973 if ((c = nextc()) != '-') { 11974 pushback(c); 11975 goto eof; 11976 } 11977 case 'c': 11978 if (flags & ESCAPE_CONTROL) goto eof; 11979 if ((c = nextc())== '\\') { 11980 if (peek('u')) goto eof; 11981 c = read_escape(flags|ESCAPE_CONTROL, encp); 11982 } 11983 else if (c == '?') 11984 return 0177; 11985 else if (c == -1 || !ISASCII(c)) goto eof; 11986 return c & 0x9f; 11987 11988 eof: 11989 case -1: 11990 yyerror("Invalid escape character syntax"); 11991 return '\0'; 11992 11993 default: 11994 return c; 11995 } 11996 } 11997 11998 static void 11999 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 12000 { 12001 int len = rb_enc_codelen(c, enc); 12002 rb_enc_mbcput(c, tokspace(len), enc); 12003 } 12004 12005 static int 12006 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 12007 { 12008 int c; 12009 int flags = 0; 12010 size_t numlen; 12011 12012 first: 12013 switch (c = nextc()) { 12014 case '\n': 12015 return 0; /* just ignore */ 12016 12017 case '0': case '1': case '2': case '3': /* octal constant */ 12018 case '4': case '5': case '6': case '7': 12019 { 12020 ruby_scan_oct(--lex_p, 3, &numlen); 12021 if (numlen == 0) goto eof; 12022 lex_p += numlen; 12023 tokcopy((int)numlen + 1); 12024 } 12025 return 0; 12026 12027 case 'x': /* hex constant */ 12028 { 12029 tok_hex(&numlen); 12030 if (numlen == 0) return -1; 12031 tokcopy((int)numlen + 2); 12032 } 12033 return 0; 12034 12035 case 'M': 12036 if (flags & ESCAPE_META) goto eof; 12037 if ((c = nextc()) != '-') { 12038 pushback(c); 12039 goto eof; 12040 } 12041 tokcopy(3); 12042 flags |= ESCAPE_META; 12043 goto escaped; 12044 12045 case 'C': 12046 if (flags & ESCAPE_CONTROL) goto eof; 12047 if ((c = nextc()) != '-') { 12048 pushback(c); 12049 goto eof; 12050 } 12051 tokcopy(3); 12052 goto escaped; 12053 12054 case 'c': 12055 if (flags & ESCAPE_CONTROL) goto eof; 12056 tokcopy(2); 12057 flags |= ESCAPE_CONTROL; 12058 escaped: 12059 if ((c = nextc()) == '\\') { 12060 goto first; 12061 } 12062 else if (c == -1) goto eof; 12063 tokadd(c); 12064 return 0; 12065 12066 eof: 12067 case -1: 12068 yyerror("Invalid escape character syntax"); 12069 return -1; 12070 12071 default: 12072 tokadd('\\'); 12073 tokadd(c); 12074 } 12075 return 0; 12076 } 12077 12078 static int 12079 parser_regx_options(struct parser_params *parser) 12080 { 12081 int kcode = 0; 12082 int kopt = 0; 12083 int options = 0; 12084 int c, opt, kc; 12085 12086 newtok(); 12087 while (c = nextc(), ISALPHA(c)) { 12088 if (c == 'o') { 12089 options |= RE_OPTION_ONCE; 12090 } 12091 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 12092 if (kc >= 0) { 12093 if (kc != rb_ascii8bit_encindex()) kcode = c; 12094 kopt = opt; 12095 } 12096 else { 12097 options |= opt; 12098 } 12099 } 12100 else { 12101 tokadd(c); 12102 } 12103 } 12104 options |= kopt; 12105 pushback(c); 12106 if (toklen()) { 12107 tokfix(); 12108 compile_error(PARSER_ARG "unknown regexp option%s - %s", 12109 toklen() > 1 ? "s" : "", tok()); 12110 } 12111 return options | RE_OPTION_ENCODING(kcode); 12112 } 12113 12114 static void 12115 dispose_string(VALUE str) 12116 { 12117 /* TODO: should use another API? */ 12118 if (RBASIC(str)->flags & RSTRING_NOEMBED) 12119 xfree(RSTRING_PTR(str)); 12120 rb_gc_force_recycle(str); 12121 } 12122 12123 static int 12124 parser_tokadd_mbchar(struct parser_params *parser, int c) 12125 { 12126 int len = parser_precise_mbclen(); 12127 if (!MBCLEN_CHARFOUND_P(len)) { 12128 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 12129 return -1; 12130 } 12131 tokadd(c); 12132 lex_p += --len; 12133 if (len > 0) tokcopy(len); 12134 return c; 12135 } 12136 12137 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 12138 12139 static int 12140 parser_tokadd_string(struct parser_params *parser, 12141 int func, int term, int paren, long *nest, 12142 rb_encoding **encp) 12143 { 12144 int c; 12145 int has_nonascii = 0; 12146 rb_encoding *enc = *encp; 12147 char *errbuf = 0; 12148 static const char mixed_msg[] = "%s mixed within %s source"; 12149 12150 #define mixed_error(enc1, enc2) if (!errbuf) { \ 12151 size_t len = sizeof(mixed_msg) - 4; \ 12152 len += strlen(rb_enc_name(enc1)); \ 12153 len += strlen(rb_enc_name(enc2)); \ 12154 errbuf = ALLOCA_N(char, len); \ 12155 snprintf(errbuf, len, mixed_msg, \ 12156 rb_enc_name(enc1), \ 12157 rb_enc_name(enc2)); \ 12158 yyerror(errbuf); \ 12159 } 12160 #define mixed_escape(beg, enc1, enc2) do { \ 12161 const char *pos = lex_p; \ 12162 lex_p = (beg); \ 12163 mixed_error((enc1), (enc2)); \ 12164 lex_p = pos; \ 12165 } while (0) 12166 12167 while ((c = nextc()) != -1) { 12168 if (paren && c == paren) { 12169 ++*nest; 12170 } 12171 else if (c == term) { 12172 if (!nest || !*nest) { 12173 pushback(c); 12174 break; 12175 } 12176 --*nest; 12177 } 12178 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 12179 int c2 = *lex_p; 12180 if (c2 == '$' || c2 == '@' || c2 == '{') { 12181 pushback(c); 12182 break; 12183 } 12184 } 12185 else if (c == '\\') { 12186 const char *beg = lex_p - 1; 12187 c = nextc(); 12188 switch (c) { 12189 case '\n': 12190 if (func & STR_FUNC_QWORDS) break; 12191 if (func & STR_FUNC_EXPAND) continue; 12192 tokadd('\\'); 12193 break; 12194 12195 case '\\': 12196 if (func & STR_FUNC_ESCAPE) tokadd(c); 12197 break; 12198 12199 case 'u': 12200 if ((func & STR_FUNC_EXPAND) == 0) { 12201 tokadd('\\'); 12202 break; 12203 } 12204 parser_tokadd_utf8(parser, &enc, 1, 12205 func & STR_FUNC_SYMBOL, 12206 func & STR_FUNC_REGEXP); 12207 if (has_nonascii && enc != *encp) { 12208 mixed_escape(beg, enc, *encp); 12209 } 12210 continue; 12211 12212 default: 12213 if (c == -1) return -1; 12214 if (!ISASCII(c)) { 12215 tokadd('\\'); 12216 goto non_ascii; 12217 } 12218 if (func & STR_FUNC_REGEXP) { 12219 pushback(c); 12220 if ((c = tokadd_escape(&enc)) < 0) 12221 return -1; 12222 if (has_nonascii && enc != *encp) { 12223 mixed_escape(beg, enc, *encp); 12224 } 12225 continue; 12226 } 12227 else if (func & STR_FUNC_EXPAND) { 12228 pushback(c); 12229 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 12230 c = read_escape(0, &enc); 12231 } 12232 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12233 /* ignore backslashed spaces in %w */ 12234 } 12235 else if (c != term && !(paren && c == paren)) { 12236 tokadd('\\'); 12237 pushback(c); 12238 continue; 12239 } 12240 } 12241 } 12242 else if (!parser_isascii()) { 12243 non_ascii: 12244 has_nonascii = 1; 12245 if (enc != *encp) { 12246 mixed_error(enc, *encp); 12247 continue; 12248 } 12249 if (tokadd_mbchar(c) == -1) return -1; 12250 continue; 12251 } 12252 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12253 pushback(c); 12254 break; 12255 } 12256 if (c & 0x80) { 12257 has_nonascii = 1; 12258 if (enc != *encp) { 12259 mixed_error(enc, *encp); 12260 continue; 12261 } 12262 } 12263 tokadd(c); 12264 } 12265 *encp = enc; 12266 return c; 12267 } 12268 12269 #define NEW_STRTERM(func, term, paren) \ 12270 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 12271 12272 static int 12273 parser_parse_string(struct parser_params *parser, NODE *quote) 12274 { 12275 int func = (int)quote->nd_func; 12276 int term = nd_term(quote); 12277 int paren = nd_paren(quote); 12278 int c, space = 0; 12279 rb_encoding *enc = parser->enc; 12280 12281 if (func == -1) return tSTRING_END; 12282 c = nextc(); 12283 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12284 do {c = nextc();} while (ISSPACE(c)); 12285 space = 1; 12286 } 12287 if (c == term && !quote->nd_nest) { 12288 if (func & STR_FUNC_QWORDS) { 12289 quote->nd_func = -1; 12290 return ' '; 12291 } 12292 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 12293 set_yylval_num(regx_options()); 12294 return tREGEXP_END; 12295 } 12296 if (space) { 12297 pushback(c); 12298 return ' '; 12299 } 12300 newtok(); 12301 if ((func & STR_FUNC_EXPAND) && c == '#') { 12302 switch (c = nextc()) { 12303 case '$': 12304 case '@': 12305 pushback(c); 12306 return tSTRING_DVAR; 12307 case '{': 12308 return tSTRING_DBEG; 12309 } 12310 tokadd('#'); 12311 } 12312 pushback(c); 12313 if (tokadd_string(func, term, paren, "e->nd_nest, 12314 &enc) == -1) { 12315 ruby_sourceline = nd_line(quote); 12316 if (func & STR_FUNC_REGEXP) { 12317 if (parser->eofp) 12318 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 12319 return tREGEXP_END; 12320 } 12321 else { 12322 if (parser->eofp) 12323 compile_error(PARSER_ARG "unterminated string meets end of file"); 12324 return tSTRING_END; 12325 } 12326 } 12327 12328 tokfix(); 12329 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12330 12331 #ifdef RIPPER 12332 if (!NIL_P(parser->delayed)) { 12333 ptrdiff_t len = lex_p - parser->tokp; 12334 if (len > 0) { 12335 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 12336 } 12337 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12338 parser->tokp = lex_p; 12339 } 12340 #endif 12341 12342 return tSTRING_CONTENT; 12343 } 12344 12345 static int 12346 parser_heredoc_identifier(struct parser_params *parser) 12347 { 12348 int c = nextc(), term, func = 0; 12349 long len; 12350 12351 if (c == '-') { 12352 c = nextc(); 12353 func = STR_FUNC_INDENT; 12354 } 12355 switch (c) { 12356 case '\'': 12357 func |= str_squote; goto quoted; 12358 case '"': 12359 func |= str_dquote; goto quoted; 12360 case '`': 12361 func |= str_xquote; 12362 quoted: 12363 newtok(); 12364 tokadd(func); 12365 term = c; 12366 while ((c = nextc()) != -1 && c != term) { 12367 if (tokadd_mbchar(c) == -1) return 0; 12368 } 12369 if (c == -1) { 12370 compile_error(PARSER_ARG "unterminated here document identifier"); 12371 return 0; 12372 } 12373 break; 12374 12375 default: 12376 if (!parser_is_identchar()) { 12377 pushback(c); 12378 if (func & STR_FUNC_INDENT) { 12379 pushback('-'); 12380 } 12381 return 0; 12382 } 12383 newtok(); 12384 term = '"'; 12385 tokadd(func |= str_dquote); 12386 do { 12387 if (tokadd_mbchar(c) == -1) return 0; 12388 } while ((c = nextc()) != -1 && parser_is_identchar()); 12389 pushback(c); 12390 break; 12391 } 12392 12393 tokfix(); 12394 #ifdef RIPPER 12395 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 12396 #endif 12397 len = lex_p - lex_pbeg; 12398 lex_goto_eol(parser); 12399 lex_strterm = rb_node_newnode(NODE_HEREDOC, 12400 STR_NEW(tok(), toklen()), /* nd_lit */ 12401 len, /* nd_nth */ 12402 lex_lastline); /* nd_orig */ 12403 nd_set_line(lex_strterm, ruby_sourceline); 12404 ripper_flush(parser); 12405 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 12406 } 12407 12408 static void 12409 parser_heredoc_restore(struct parser_params *parser, NODE *here) 12410 { 12411 VALUE line; 12412 12413 line = here->nd_orig; 12414 lex_lastline = line; 12415 lex_pbeg = RSTRING_PTR(line); 12416 lex_pend = lex_pbeg + RSTRING_LEN(line); 12417 lex_p = lex_pbeg + here->nd_nth; 12418 heredoc_end = ruby_sourceline; 12419 ruby_sourceline = nd_line(here); 12420 dispose_string(here->nd_lit); 12421 rb_gc_force_recycle((VALUE)here); 12422 ripper_flush(parser); 12423 } 12424 12425 static int 12426 parser_whole_match_p(struct parser_params *parser, 12427 const char *eos, long len, int indent) 12428 { 12429 const char *p = lex_pbeg; 12430 long n; 12431 12432 if (indent) { 12433 while (*p && ISSPACE(*p)) p++; 12434 } 12435 n = lex_pend - (p + len); 12436 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 12437 return strncmp(eos, p, len) == 0; 12438 } 12439 12440 #ifdef RIPPER 12441 static void 12442 ripper_dispatch_heredoc_end(struct parser_params *parser) 12443 { 12444 if (!NIL_P(parser->delayed)) 12445 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12446 lex_goto_eol(parser); 12447 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12448 } 12449 12450 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 12451 #else 12452 #define dispatch_heredoc_end() ((void)0) 12453 #endif 12454 12455 static int 12456 parser_here_document(struct parser_params *parser, NODE *here) 12457 { 12458 int c, func, indent = 0; 12459 const char *eos, *p, *pend; 12460 long len; 12461 VALUE str = 0; 12462 rb_encoding *enc = parser->enc; 12463 12464 eos = RSTRING_PTR(here->nd_lit); 12465 len = RSTRING_LEN(here->nd_lit) - 1; 12466 indent = (func = *eos++) & STR_FUNC_INDENT; 12467 12468 if ((c = nextc()) == -1) { 12469 error: 12470 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12471 #ifdef RIPPER 12472 if (NIL_P(parser->delayed)) { 12473 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12474 } 12475 else { 12476 if (str || 12477 ((len = lex_p - parser->tokp) > 0 && 12478 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 12479 rb_str_append(parser->delayed, str); 12480 } 12481 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12482 } 12483 lex_goto_eol(parser); 12484 #endif 12485 restore: 12486 heredoc_restore(lex_strterm); 12487 lex_strterm = 0; 12488 return 0; 12489 } 12490 if (was_bol() && whole_match_p(eos, len, indent)) { 12491 dispatch_heredoc_end(); 12492 heredoc_restore(lex_strterm); 12493 return tSTRING_END; 12494 } 12495 12496 if (!(func & STR_FUNC_EXPAND)) { 12497 do { 12498 p = RSTRING_PTR(lex_lastline); 12499 pend = lex_pend; 12500 if (pend > p) { 12501 switch (pend[-1]) { 12502 case '\n': 12503 if (--pend == p || pend[-1] != '\r') { 12504 pend++; 12505 break; 12506 } 12507 case '\r': 12508 --pend; 12509 } 12510 } 12511 if (str) 12512 rb_str_cat(str, p, pend - p); 12513 else 12514 str = STR_NEW(p, pend - p); 12515 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 12516 lex_goto_eol(parser); 12517 if (nextc() == -1) { 12518 if (str) dispose_string(str); 12519 goto error; 12520 } 12521 } while (!whole_match_p(eos, len, indent)); 12522 } 12523 else { 12524 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 12525 newtok(); 12526 if (c == '#') { 12527 switch (c = nextc()) { 12528 case '$': 12529 case '@': 12530 pushback(c); 12531 return tSTRING_DVAR; 12532 case '{': 12533 return tSTRING_DBEG; 12534 } 12535 tokadd('#'); 12536 } 12537 do { 12538 pushback(c); 12539 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 12540 if (parser->eofp) goto error; 12541 goto restore; 12542 } 12543 if (c != '\n') { 12544 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12545 return tSTRING_CONTENT; 12546 } 12547 tokadd(nextc()); 12548 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 12549 if ((c = nextc()) == -1) goto error; 12550 } while (!whole_match_p(eos, len, indent)); 12551 str = STR_NEW3(tok(), toklen(), enc, func); 12552 } 12553 dispatch_heredoc_end(); 12554 heredoc_restore(lex_strterm); 12555 lex_strterm = NEW_STRTERM(-1, 0, 0); 12556 set_yylval_str(str); 12557 return tSTRING_CONTENT; 12558 } 12559 12560 #include "lex.c" 12561 12562 static void 12563 arg_ambiguous_gen(struct parser_params *parser) 12564 { 12565 #ifndef RIPPER 12566 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 12567 #else 12568 dispatch0(arg_ambiguous); 12569 #endif 12570 } 12571 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 12572 12573 static ID 12574 formal_argument_gen(struct parser_params *parser, ID lhs) 12575 { 12576 #ifndef RIPPER 12577 if (!is_local_id(lhs)) 12578 yyerror("formal argument must be local variable"); 12579 #endif 12580 shadowing_lvar(lhs); 12581 return lhs; 12582 } 12583 12584 static int 12585 lvar_defined_gen(struct parser_params *parser, ID id) 12586 { 12587 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 12588 } 12589 12590 /* emacsen -*- hack */ 12591 static long 12592 parser_encode_length(struct parser_params *parser, const char *name, long len) 12593 { 12594 long nlen; 12595 12596 if (len > 5 && name[nlen = len - 5] == '-') { 12597 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 12598 return nlen; 12599 } 12600 if (len > 4 && name[nlen = len - 4] == '-') { 12601 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 12602 return nlen; 12603 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 12604 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 12605 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 12606 return nlen; 12607 } 12608 return len; 12609 } 12610 12611 static void 12612 parser_set_encode(struct parser_params *parser, const char *name) 12613 { 12614 int idx = rb_enc_find_index(name); 12615 rb_encoding *enc; 12616 VALUE excargs[3]; 12617 12618 if (idx < 0) { 12619 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 12620 error: 12621 excargs[0] = rb_eArgError; 12622 excargs[2] = rb_make_backtrace(); 12623 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 12624 rb_exc_raise(rb_make_exception(3, excargs)); 12625 } 12626 enc = rb_enc_from_index(idx); 12627 if (!rb_enc_asciicompat(enc)) { 12628 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 12629 goto error; 12630 } 12631 parser->enc = enc; 12632 #ifndef RIPPER 12633 if (ruby_debug_lines) { 12634 long i, n = RARRAY_LEN(ruby_debug_lines); 12635 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 12636 for (i = 0; i < n; ++i) { 12637 rb_enc_associate_index(*p, idx); 12638 } 12639 } 12640 #endif 12641 } 12642 12643 static int 12644 comment_at_top(struct parser_params *parser) 12645 { 12646 const char *p = lex_pbeg, *pend = lex_p - 1; 12647 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 12648 while (p < pend) { 12649 if (!ISSPACE(*p)) return 0; 12650 p++; 12651 } 12652 return 1; 12653 } 12654 12655 #ifndef RIPPER 12656 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 12657 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 12658 12659 static void 12660 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 12661 { 12662 if (!comment_at_top(parser)) { 12663 return; 12664 } 12665 parser_set_encode(parser, val); 12666 } 12667 12668 static void 12669 parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 12670 { 12671 int *p = &parser->parser_token_info_enabled; 12672 12673 switch (*val) { 12674 case 't': case 'T': 12675 if (strcasecmp(val, "true") == 0) { 12676 *p = TRUE; 12677 return; 12678 } 12679 break; 12680 case 'f': case 'F': 12681 if (strcasecmp(val, "false") == 0) { 12682 *p = FALSE; 12683 return; 12684 } 12685 break; 12686 } 12687 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 12688 } 12689 12690 struct magic_comment { 12691 const char *name; 12692 rb_magic_comment_setter_t func; 12693 rb_magic_comment_length_t length; 12694 }; 12695 12696 static const struct magic_comment magic_comments[] = { 12697 {"coding", magic_comment_encoding, parser_encode_length}, 12698 {"encoding", magic_comment_encoding, parser_encode_length}, 12699 {"warn_indent", parser_set_token_info}, 12700 }; 12701 #endif 12702 12703 static const char * 12704 magic_comment_marker(const char *str, long len) 12705 { 12706 long i = 2; 12707 12708 while (i < len) { 12709 switch (str[i]) { 12710 case '-': 12711 if (str[i-1] == '*' && str[i-2] == '-') { 12712 return str + i + 1; 12713 } 12714 i += 2; 12715 break; 12716 case '*': 12717 if (i + 1 >= len) return 0; 12718 if (str[i+1] != '-') { 12719 i += 4; 12720 } 12721 else if (str[i-1] != '-') { 12722 i += 2; 12723 } 12724 else { 12725 return str + i + 2; 12726 } 12727 break; 12728 default: 12729 i += 3; 12730 break; 12731 } 12732 } 12733 return 0; 12734 } 12735 12736 static int 12737 parser_magic_comment(struct parser_params *parser, const char *str, long len) 12738 { 12739 VALUE name = 0, val = 0; 12740 const char *beg, *end, *vbeg, *vend; 12741 #define str_copy(_s, _p, _n) ((_s) \ 12742 ? (void)(rb_str_resize((_s), (_n)), \ 12743 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 12744 : (void)((_s) = STR_NEW((_p), (_n)))) 12745 12746 if (len <= 7) return FALSE; 12747 if (!(beg = magic_comment_marker(str, len))) return FALSE; 12748 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 12749 str = beg; 12750 len = end - beg - 3; 12751 12752 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 12753 while (len > 0) { 12754 #ifndef RIPPER 12755 const struct magic_comment *p = magic_comments; 12756 #endif 12757 char *s; 12758 int i; 12759 long n = 0; 12760 12761 for (; len > 0 && *str; str++, --len) { 12762 switch (*str) { 12763 case '\'': case '"': case ':': case ';': 12764 continue; 12765 } 12766 if (!ISSPACE(*str)) break; 12767 } 12768 for (beg = str; len > 0; str++, --len) { 12769 switch (*str) { 12770 case '\'': case '"': case ':': case ';': 12771 break; 12772 default: 12773 if (ISSPACE(*str)) break; 12774 continue; 12775 } 12776 break; 12777 } 12778 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 12779 if (!len) break; 12780 if (*str != ':') continue; 12781 12782 do str++; while (--len > 0 && ISSPACE(*str)); 12783 if (!len) break; 12784 if (*str == '"') { 12785 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 12786 if (*str == '\\') { 12787 --len; 12788 ++str; 12789 } 12790 } 12791 vend = str; 12792 if (len) { 12793 --len; 12794 ++str; 12795 } 12796 } 12797 else { 12798 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 12799 vend = str; 12800 } 12801 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 12802 12803 n = end - beg; 12804 str_copy(name, beg, n); 12805 s = RSTRING_PTR(name); 12806 for (i = 0; i < n; ++i) { 12807 if (s[i] == '-') s[i] = '_'; 12808 } 12809 #ifndef RIPPER 12810 do { 12811 if (STRNCASECMP(p->name, s, n) == 0) { 12812 n = vend - vbeg; 12813 if (p->length) { 12814 n = (*p->length)(parser, vbeg, n); 12815 } 12816 str_copy(val, vbeg, n); 12817 (*p->func)(parser, s, RSTRING_PTR(val)); 12818 break; 12819 } 12820 } while (++p < magic_comments + numberof(magic_comments)); 12821 #else 12822 dispatch2(magic_comment, name, val); 12823 #endif 12824 } 12825 12826 return TRUE; 12827 } 12828 12829 static void 12830 set_file_encoding(struct parser_params *parser, const char *str, const char *send) 12831 { 12832 int sep = 0; 12833 const char *beg = str; 12834 VALUE s; 12835 12836 for (;;) { 12837 if (send - str <= 6) return; 12838 switch (str[6]) { 12839 case 'C': case 'c': str += 6; continue; 12840 case 'O': case 'o': str += 5; continue; 12841 case 'D': case 'd': str += 4; continue; 12842 case 'I': case 'i': str += 3; continue; 12843 case 'N': case 'n': str += 2; continue; 12844 case 'G': case 'g': str += 1; continue; 12845 case '=': case ':': 12846 sep = 1; 12847 str += 6; 12848 break; 12849 default: 12850 str += 6; 12851 if (ISSPACE(*str)) break; 12852 continue; 12853 } 12854 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 12855 } 12856 for (;;) { 12857 do { 12858 if (++str >= send) return; 12859 } while (ISSPACE(*str)); 12860 if (sep) break; 12861 if (*str != '=' && *str != ':') return; 12862 sep = 1; 12863 str++; 12864 } 12865 beg = str; 12866 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 12867 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 12868 parser_set_encode(parser, RSTRING_PTR(s)); 12869 rb_str_resize(s, 0); 12870 } 12871 12872 static void 12873 parser_prepare(struct parser_params *parser) 12874 { 12875 int c = nextc(); 12876 switch (c) { 12877 case '#': 12878 if (peek('!')) parser->has_shebang = 1; 12879 break; 12880 case 0xef: /* UTF-8 BOM marker */ 12881 if (lex_pend - lex_p >= 2 && 12882 (unsigned char)lex_p[0] == 0xbb && 12883 (unsigned char)lex_p[1] == 0xbf) { 12884 parser->enc = rb_utf8_encoding(); 12885 lex_p += 2; 12886 lex_pbeg = lex_p; 12887 return; 12888 } 12889 break; 12890 case EOF: 12891 return; 12892 } 12893 pushback(c); 12894 parser->enc = rb_enc_get(lex_lastline); 12895 } 12896 12897 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG) 12898 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN) 12899 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS) 12900 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 12901 #define IS_LABEL_POSSIBLE() ((lex_state == EXPR_BEG && !cmd_state) || IS_ARG()) 12902 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 12903 12904 #ifndef RIPPER 12905 #define ambiguous_operator(op, syn) ( \ 12906 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 12907 rb_warning0("even though it seems like "syn"")) 12908 #else 12909 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 12910 #endif 12911 #define warn_balanced(op, syn) ((void) \ 12912 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \ 12913 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \ 12914 last_state != EXPR_ENDARG && \ 12915 space_seen && !ISSPACE(c) && \ 12916 (ambiguous_operator(op, syn), 0))) 12917 12918 static int 12919 parser_yylex(struct parser_params *parser) 12920 { 12921 register int c; 12922 int space_seen = 0; 12923 int cmd_state; 12924 enum lex_state_e last_state; 12925 rb_encoding *enc; 12926 int mb; 12927 #ifdef RIPPER 12928 int fallthru = FALSE; 12929 #endif 12930 12931 if (lex_strterm) { 12932 int token; 12933 if (nd_type(lex_strterm) == NODE_HEREDOC) { 12934 token = here_document(lex_strterm); 12935 if (token == tSTRING_END) { 12936 lex_strterm = 0; 12937 lex_state = EXPR_END; 12938 } 12939 } 12940 else { 12941 token = parse_string(lex_strterm); 12942 if (token == tSTRING_END || token == tREGEXP_END) { 12943 rb_gc_force_recycle((VALUE)lex_strterm); 12944 lex_strterm = 0; 12945 lex_state = EXPR_END; 12946 } 12947 } 12948 return token; 12949 } 12950 cmd_state = command_start; 12951 command_start = FALSE; 12952 retry: 12953 last_state = lex_state; 12954 switch (c = nextc()) { 12955 case '\0': /* NUL */ 12956 case '\004': /* ^D */ 12957 case '\032': /* ^Z */ 12958 case -1: /* end of script. */ 12959 return 0; 12960 12961 /* white spaces */ 12962 case ' ': case '\t': case '\f': case '\r': 12963 case '\13': /* '\v' */ 12964 space_seen = 1; 12965 #ifdef RIPPER 12966 while ((c = nextc())) { 12967 switch (c) { 12968 case ' ': case '\t': case '\f': case '\r': 12969 case '\13': /* '\v' */ 12970 break; 12971 default: 12972 goto outofloop; 12973 } 12974 } 12975 outofloop: 12976 pushback(c); 12977 ripper_dispatch_scan_event(parser, tSP); 12978 #endif 12979 goto retry; 12980 12981 case '#': /* it's a comment */ 12982 /* no magic_comment in shebang line */ 12983 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 12984 if (comment_at_top(parser)) { 12985 set_file_encoding(parser, lex_p, lex_pend); 12986 } 12987 } 12988 lex_p = lex_pend; 12989 #ifdef RIPPER 12990 ripper_dispatch_scan_event(parser, tCOMMENT); 12991 fallthru = TRUE; 12992 #endif 12993 /* fall through */ 12994 case '\n': 12995 switch (lex_state) { 12996 case EXPR_BEG: 12997 case EXPR_FNAME: 12998 case EXPR_DOT: 12999 case EXPR_CLASS: 13000 case EXPR_VALUE: 13001 #ifdef RIPPER 13002 if (!fallthru) { 13003 ripper_dispatch_scan_event(parser, tIGNORED_NL); 13004 } 13005 fallthru = FALSE; 13006 #endif 13007 goto retry; 13008 default: 13009 break; 13010 } 13011 while ((c = nextc())) { 13012 switch (c) { 13013 case ' ': case '\t': case '\f': case '\r': 13014 case '\13': /* '\v' */ 13015 space_seen = 1; 13016 break; 13017 case '.': { 13018 if ((c = nextc()) != '.') { 13019 pushback(c); 13020 pushback('.'); 13021 goto retry; 13022 } 13023 } 13024 default: 13025 --ruby_sourceline; 13026 lex_nextline = lex_lastline; 13027 case -1: /* EOF no decrement*/ 13028 lex_goto_eol(parser); 13029 #ifdef RIPPER 13030 if (c != -1) { 13031 parser->tokp = lex_p; 13032 } 13033 #endif 13034 goto normal_newline; 13035 } 13036 } 13037 normal_newline: 13038 command_start = TRUE; 13039 lex_state = EXPR_BEG; 13040 return '\n'; 13041 13042 case '*': 13043 if ((c = nextc()) == '*') { 13044 if ((c = nextc()) == '=') { 13045 set_yylval_id(tPOW); 13046 lex_state = EXPR_BEG; 13047 return tOP_ASGN; 13048 } 13049 pushback(c); 13050 c = tPOW; 13051 } 13052 else { 13053 if (c == '=') { 13054 set_yylval_id('*'); 13055 lex_state = EXPR_BEG; 13056 return tOP_ASGN; 13057 } 13058 pushback(c); 13059 if (IS_SPCARG(c)) { 13060 rb_warning0("`*' interpreted as argument prefix"); 13061 c = tSTAR; 13062 } 13063 else if (IS_BEG()) { 13064 c = tSTAR; 13065 } 13066 else { 13067 warn_balanced("*", "argument prefix"); 13068 c = '*'; 13069 } 13070 } 13071 switch (lex_state) { 13072 case EXPR_FNAME: case EXPR_DOT: 13073 lex_state = EXPR_ARG; break; 13074 default: 13075 lex_state = EXPR_BEG; break; 13076 } 13077 return c; 13078 13079 case '!': 13080 c = nextc(); 13081 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13082 lex_state = EXPR_ARG; 13083 if (c == '@') { 13084 return '!'; 13085 } 13086 } 13087 else { 13088 lex_state = EXPR_BEG; 13089 } 13090 if (c == '=') { 13091 return tNEQ; 13092 } 13093 if (c == '~') { 13094 return tNMATCH; 13095 } 13096 pushback(c); 13097 return '!'; 13098 13099 case '=': 13100 if (was_bol()) { 13101 /* skip embedded rd document */ 13102 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 13103 #ifdef RIPPER 13104 int first_p = TRUE; 13105 13106 lex_goto_eol(parser); 13107 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 13108 #endif 13109 for (;;) { 13110 lex_goto_eol(parser); 13111 #ifdef RIPPER 13112 if (!first_p) { 13113 ripper_dispatch_scan_event(parser, tEMBDOC); 13114 } 13115 first_p = FALSE; 13116 #endif 13117 c = nextc(); 13118 if (c == -1) { 13119 compile_error(PARSER_ARG "embedded document meets end of file"); 13120 return 0; 13121 } 13122 if (c != '=') continue; 13123 if (strncmp(lex_p, "end", 3) == 0 && 13124 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 13125 break; 13126 } 13127 } 13128 lex_goto_eol(parser); 13129 #ifdef RIPPER 13130 ripper_dispatch_scan_event(parser, tEMBDOC_END); 13131 #endif 13132 goto retry; 13133 } 13134 } 13135 13136 switch (lex_state) { 13137 case EXPR_FNAME: case EXPR_DOT: 13138 lex_state = EXPR_ARG; break; 13139 default: 13140 lex_state = EXPR_BEG; break; 13141 } 13142 if ((c = nextc()) == '=') { 13143 if ((c = nextc()) == '=') { 13144 return tEQQ; 13145 } 13146 pushback(c); 13147 return tEQ; 13148 } 13149 if (c == '~') { 13150 return tMATCH; 13151 } 13152 else if (c == '>') { 13153 return tASSOC; 13154 } 13155 pushback(c); 13156 return '='; 13157 13158 case '<': 13159 last_state = lex_state; 13160 c = nextc(); 13161 if (c == '<' && 13162 lex_state != EXPR_DOT && 13163 lex_state != EXPR_CLASS && 13164 !IS_END() && 13165 (!IS_ARG() || space_seen)) { 13166 int token = heredoc_identifier(); 13167 if (token) return token; 13168 } 13169 switch (lex_state) { 13170 case EXPR_FNAME: case EXPR_DOT: 13171 lex_state = EXPR_ARG; break; 13172 default: 13173 lex_state = EXPR_BEG; break; 13174 } 13175 if (c == '=') { 13176 if ((c = nextc()) == '>') { 13177 return tCMP; 13178 } 13179 pushback(c); 13180 return tLEQ; 13181 } 13182 if (c == '<') { 13183 if ((c = nextc()) == '=') { 13184 set_yylval_id(tLSHFT); 13185 lex_state = EXPR_BEG; 13186 return tOP_ASGN; 13187 } 13188 pushback(c); 13189 warn_balanced("<<", "here document"); 13190 return tLSHFT; 13191 } 13192 pushback(c); 13193 return '<'; 13194 13195 case '>': 13196 switch (lex_state) { 13197 case EXPR_FNAME: case EXPR_DOT: 13198 lex_state = EXPR_ARG; break; 13199 default: 13200 lex_state = EXPR_BEG; break; 13201 } 13202 if ((c = nextc()) == '=') { 13203 return tGEQ; 13204 } 13205 if (c == '>') { 13206 if ((c = nextc()) == '=') { 13207 set_yylval_id(tRSHFT); 13208 lex_state = EXPR_BEG; 13209 return tOP_ASGN; 13210 } 13211 pushback(c); 13212 return tRSHFT; 13213 } 13214 pushback(c); 13215 return '>'; 13216 13217 case '"': 13218 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 13219 return tSTRING_BEG; 13220 13221 case '`': 13222 if (lex_state == EXPR_FNAME) { 13223 lex_state = EXPR_ENDFN; 13224 return c; 13225 } 13226 if (lex_state == EXPR_DOT) { 13227 if (cmd_state) 13228 lex_state = EXPR_CMDARG; 13229 else 13230 lex_state = EXPR_ARG; 13231 return c; 13232 } 13233 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 13234 return tXSTRING_BEG; 13235 13236 case '\'': 13237 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 13238 return tSTRING_BEG; 13239 13240 case '?': 13241 if (IS_END()) { 13242 lex_state = EXPR_VALUE; 13243 return '?'; 13244 } 13245 c = nextc(); 13246 if (c == -1) { 13247 compile_error(PARSER_ARG "incomplete character syntax"); 13248 return 0; 13249 } 13250 if (rb_enc_isspace(c, parser->enc)) { 13251 if (!IS_ARG()) { 13252 int c2 = 0; 13253 switch (c) { 13254 case ' ': 13255 c2 = 's'; 13256 break; 13257 case '\n': 13258 c2 = 'n'; 13259 break; 13260 case '\t': 13261 c2 = 't'; 13262 break; 13263 case '\v': 13264 c2 = 'v'; 13265 break; 13266 case '\r': 13267 c2 = 'r'; 13268 break; 13269 case '\f': 13270 c2 = 'f'; 13271 break; 13272 } 13273 if (c2) { 13274 rb_warnI("invalid character syntax; use ?\\%c", c2); 13275 } 13276 } 13277 ternary: 13278 pushback(c); 13279 lex_state = EXPR_VALUE; 13280 return '?'; 13281 } 13282 newtok(); 13283 enc = parser->enc; 13284 if (!parser_isascii()) { 13285 if (tokadd_mbchar(c) == -1) return 0; 13286 } 13287 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') && 13288 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) { 13289 goto ternary; 13290 } 13291 else if (c == '\\') { 13292 if (peek('u')) { 13293 nextc(); 13294 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 13295 if (0x80 <= c) { 13296 tokaddmbc(c, enc); 13297 } 13298 else { 13299 tokadd(c); 13300 } 13301 } 13302 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 13303 nextc(); 13304 tokadd('\\'); 13305 if (tokadd_mbchar(c) == -1) return 0; 13306 } 13307 else { 13308 c = read_escape(0, &enc); 13309 tokadd(c); 13310 } 13311 } 13312 else { 13313 tokadd(c); 13314 } 13315 tokfix(); 13316 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 13317 lex_state = EXPR_END; 13318 return tCHAR; 13319 13320 case '&': 13321 if ((c = nextc()) == '&') { 13322 lex_state = EXPR_BEG; 13323 if ((c = nextc()) == '=') { 13324 set_yylval_id(tANDOP); 13325 lex_state = EXPR_BEG; 13326 return tOP_ASGN; 13327 } 13328 pushback(c); 13329 return tANDOP; 13330 } 13331 else if (c == '=') { 13332 set_yylval_id('&'); 13333 lex_state = EXPR_BEG; 13334 return tOP_ASGN; 13335 } 13336 pushback(c); 13337 if (IS_SPCARG(c)) { 13338 rb_warning0("`&' interpreted as argument prefix"); 13339 c = tAMPER; 13340 } 13341 else if (IS_BEG()) { 13342 c = tAMPER; 13343 } 13344 else { 13345 warn_balanced("&", "argument prefix"); 13346 c = '&'; 13347 } 13348 switch (lex_state) { 13349 case EXPR_FNAME: case EXPR_DOT: 13350 lex_state = EXPR_ARG; break; 13351 default: 13352 lex_state = EXPR_BEG; 13353 } 13354 return c; 13355 13356 case '|': 13357 if ((c = nextc()) == '|') { 13358 lex_state = EXPR_BEG; 13359 if ((c = nextc()) == '=') { 13360 set_yylval_id(tOROP); 13361 lex_state = EXPR_BEG; 13362 return tOP_ASGN; 13363 } 13364 pushback(c); 13365 return tOROP; 13366 } 13367 if (c == '=') { 13368 set_yylval_id('|'); 13369 lex_state = EXPR_BEG; 13370 return tOP_ASGN; 13371 } 13372 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13373 lex_state = EXPR_ARG; 13374 } 13375 else { 13376 lex_state = EXPR_BEG; 13377 } 13378 pushback(c); 13379 return '|'; 13380 13381 case '+': 13382 c = nextc(); 13383 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13384 lex_state = EXPR_ARG; 13385 if (c == '@') { 13386 return tUPLUS; 13387 } 13388 pushback(c); 13389 return '+'; 13390 } 13391 if (c == '=') { 13392 set_yylval_id('+'); 13393 lex_state = EXPR_BEG; 13394 return tOP_ASGN; 13395 } 13396 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13397 lex_state = EXPR_BEG; 13398 pushback(c); 13399 if (c != -1 && ISDIGIT(c)) { 13400 c = '+'; 13401 goto start_num; 13402 } 13403 return tUPLUS; 13404 } 13405 lex_state = EXPR_BEG; 13406 pushback(c); 13407 warn_balanced("+", "unary operator"); 13408 return '+'; 13409 13410 case '-': 13411 c = nextc(); 13412 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13413 lex_state = EXPR_ARG; 13414 if (c == '@') { 13415 return tUMINUS; 13416 } 13417 pushback(c); 13418 return '-'; 13419 } 13420 if (c == '=') { 13421 set_yylval_id('-'); 13422 lex_state = EXPR_BEG; 13423 return tOP_ASGN; 13424 } 13425 if (c == '>') { 13426 lex_state = EXPR_ARG; 13427 return tLAMBDA; 13428 } 13429 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13430 lex_state = EXPR_BEG; 13431 pushback(c); 13432 if (c != -1 && ISDIGIT(c)) { 13433 return tUMINUS_NUM; 13434 } 13435 return tUMINUS; 13436 } 13437 lex_state = EXPR_BEG; 13438 pushback(c); 13439 warn_balanced("-", "unary operator"); 13440 return '-'; 13441 13442 case '.': 13443 lex_state = EXPR_BEG; 13444 if ((c = nextc()) == '.') { 13445 if ((c = nextc()) == '.') { 13446 return tDOT3; 13447 } 13448 pushback(c); 13449 return tDOT2; 13450 } 13451 pushback(c); 13452 if (c != -1 && ISDIGIT(c)) { 13453 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13454 } 13455 lex_state = EXPR_DOT; 13456 return '.'; 13457 13458 start_num: 13459 case '0': case '1': case '2': case '3': case '4': 13460 case '5': case '6': case '7': case '8': case '9': 13461 { 13462 int is_float, seen_point, seen_e, nondigit; 13463 13464 is_float = seen_point = seen_e = nondigit = 0; 13465 lex_state = EXPR_END; 13466 newtok(); 13467 if (c == '-' || c == '+') { 13468 tokadd(c); 13469 c = nextc(); 13470 } 13471 if (c == '0') { 13472 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13473 int start = toklen(); 13474 c = nextc(); 13475 if (c == 'x' || c == 'X') { 13476 /* hexadecimal */ 13477 c = nextc(); 13478 if (c != -1 && ISXDIGIT(c)) { 13479 do { 13480 if (c == '_') { 13481 if (nondigit) break; 13482 nondigit = c; 13483 continue; 13484 } 13485 if (!ISXDIGIT(c)) break; 13486 nondigit = 0; 13487 tokadd(c); 13488 } while ((c = nextc()) != -1); 13489 } 13490 pushback(c); 13491 tokfix(); 13492 if (toklen() == start) { 13493 no_digits(); 13494 } 13495 else if (nondigit) goto trailing_uc; 13496 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13497 return tINTEGER; 13498 } 13499 if (c == 'b' || c == 'B') { 13500 /* binary */ 13501 c = nextc(); 13502 if (c == '0' || c == '1') { 13503 do { 13504 if (c == '_') { 13505 if (nondigit) break; 13506 nondigit = c; 13507 continue; 13508 } 13509 if (c != '0' && c != '1') break; 13510 nondigit = 0; 13511 tokadd(c); 13512 } while ((c = nextc()) != -1); 13513 } 13514 pushback(c); 13515 tokfix(); 13516 if (toklen() == start) { 13517 no_digits(); 13518 } 13519 else if (nondigit) goto trailing_uc; 13520 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 13521 return tINTEGER; 13522 } 13523 if (c == 'd' || c == 'D') { 13524 /* decimal */ 13525 c = nextc(); 13526 if (c != -1 && ISDIGIT(c)) { 13527 do { 13528 if (c == '_') { 13529 if (nondigit) break; 13530 nondigit = c; 13531 continue; 13532 } 13533 if (!ISDIGIT(c)) break; 13534 nondigit = 0; 13535 tokadd(c); 13536 } while ((c = nextc()) != -1); 13537 } 13538 pushback(c); 13539 tokfix(); 13540 if (toklen() == start) { 13541 no_digits(); 13542 } 13543 else if (nondigit) goto trailing_uc; 13544 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13545 return tINTEGER; 13546 } 13547 if (c == '_') { 13548 /* 0_0 */ 13549 goto octal_number; 13550 } 13551 if (c == 'o' || c == 'O') { 13552 /* prefixed octal */ 13553 c = nextc(); 13554 if (c == -1 || c == '_' || !ISDIGIT(c)) { 13555 no_digits(); 13556 } 13557 } 13558 if (c >= '0' && c <= '7') { 13559 /* octal */ 13560 octal_number: 13561 do { 13562 if (c == '_') { 13563 if (nondigit) break; 13564 nondigit = c; 13565 continue; 13566 } 13567 if (c < '0' || c > '9') break; 13568 if (c > '7') goto invalid_octal; 13569 nondigit = 0; 13570 tokadd(c); 13571 } while ((c = nextc()) != -1); 13572 if (toklen() > start) { 13573 pushback(c); 13574 tokfix(); 13575 if (nondigit) goto trailing_uc; 13576 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 13577 return tINTEGER; 13578 } 13579 if (nondigit) { 13580 pushback(c); 13581 goto trailing_uc; 13582 } 13583 } 13584 if (c > '7' && c <= '9') { 13585 invalid_octal: 13586 yyerror("Invalid octal digit"); 13587 } 13588 else if (c == '.' || c == 'e' || c == 'E') { 13589 tokadd('0'); 13590 } 13591 else { 13592 pushback(c); 13593 set_yylval_literal(INT2FIX(0)); 13594 return tINTEGER; 13595 } 13596 } 13597 13598 for (;;) { 13599 switch (c) { 13600 case '0': case '1': case '2': case '3': case '4': 13601 case '5': case '6': case '7': case '8': case '9': 13602 nondigit = 0; 13603 tokadd(c); 13604 break; 13605 13606 case '.': 13607 if (nondigit) goto trailing_uc; 13608 if (seen_point || seen_e) { 13609 goto decode_num; 13610 } 13611 else { 13612 int c0 = nextc(); 13613 if (c0 == -1 || !ISDIGIT(c0)) { 13614 pushback(c0); 13615 goto decode_num; 13616 } 13617 c = c0; 13618 } 13619 tokadd('.'); 13620 tokadd(c); 13621 is_float++; 13622 seen_point++; 13623 nondigit = 0; 13624 break; 13625 13626 case 'e': 13627 case 'E': 13628 if (nondigit) { 13629 pushback(c); 13630 c = nondigit; 13631 goto decode_num; 13632 } 13633 if (seen_e) { 13634 goto decode_num; 13635 } 13636 tokadd(c); 13637 seen_e++; 13638 is_float++; 13639 nondigit = c; 13640 c = nextc(); 13641 if (c != '-' && c != '+') continue; 13642 tokadd(c); 13643 nondigit = c; 13644 break; 13645 13646 case '_': /* `_' in number just ignored */ 13647 if (nondigit) goto decode_num; 13648 nondigit = c; 13649 break; 13650 13651 default: 13652 goto decode_num; 13653 } 13654 c = nextc(); 13655 } 13656 13657 decode_num: 13658 pushback(c); 13659 if (nondigit) { 13660 char tmp[30]; 13661 trailing_uc: 13662 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 13663 yyerror(tmp); 13664 } 13665 tokfix(); 13666 if (is_float) { 13667 double d = strtod(tok(), 0); 13668 if (errno == ERANGE) { 13669 rb_warningS("Float %s out of range", tok()); 13670 errno = 0; 13671 } 13672 set_yylval_literal(DBL2NUM(d)); 13673 return tFLOAT; 13674 } 13675 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 13676 return tINTEGER; 13677 } 13678 13679 case ')': 13680 case ']': 13681 paren_nest--; 13682 case '}': 13683 COND_LEXPOP(); 13684 CMDARG_LEXPOP(); 13685 if (c == ')') 13686 lex_state = EXPR_ENDFN; 13687 else 13688 lex_state = EXPR_ENDARG; 13689 return c; 13690 13691 case ':': 13692 c = nextc(); 13693 if (c == ':') { 13694 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) { 13695 lex_state = EXPR_BEG; 13696 return tCOLON3; 13697 } 13698 lex_state = EXPR_DOT; 13699 return tCOLON2; 13700 } 13701 if (IS_END() || ISSPACE(c)) { 13702 pushback(c); 13703 warn_balanced(":", "symbol literal"); 13704 lex_state = EXPR_BEG; 13705 return ':'; 13706 } 13707 switch (c) { 13708 case '\'': 13709 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 13710 break; 13711 case '"': 13712 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 13713 break; 13714 default: 13715 pushback(c); 13716 break; 13717 } 13718 lex_state = EXPR_FNAME; 13719 return tSYMBEG; 13720 13721 case '/': 13722 if (IS_BEG()) { 13723 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13724 return tREGEXP_BEG; 13725 } 13726 if ((c = nextc()) == '=') { 13727 set_yylval_id('/'); 13728 lex_state = EXPR_BEG; 13729 return tOP_ASGN; 13730 } 13731 pushback(c); 13732 if (IS_SPCARG(c)) { 13733 (void)arg_ambiguous(); 13734 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 13735 return tREGEXP_BEG; 13736 } 13737 switch (lex_state) { 13738 case EXPR_FNAME: case EXPR_DOT: 13739 lex_state = EXPR_ARG; break; 13740 default: 13741 lex_state = EXPR_BEG; break; 13742 } 13743 warn_balanced("/", "regexp literal"); 13744 return '/'; 13745 13746 case '^': 13747 if ((c = nextc()) == '=') { 13748 set_yylval_id('^'); 13749 lex_state = EXPR_BEG; 13750 return tOP_ASGN; 13751 } 13752 switch (lex_state) { 13753 case EXPR_FNAME: case EXPR_DOT: 13754 lex_state = EXPR_ARG; break; 13755 default: 13756 lex_state = EXPR_BEG; break; 13757 } 13758 pushback(c); 13759 return '^'; 13760 13761 case ';': 13762 lex_state = EXPR_BEG; 13763 command_start = TRUE; 13764 return ';'; 13765 13766 case ',': 13767 lex_state = EXPR_BEG; 13768 return ','; 13769 13770 case '~': 13771 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13772 if ((c = nextc()) != '@') { 13773 pushback(c); 13774 } 13775 lex_state = EXPR_ARG; 13776 } 13777 else { 13778 lex_state = EXPR_BEG; 13779 } 13780 return '~'; 13781 13782 case '(': 13783 if (IS_BEG()) { 13784 c = tLPAREN; 13785 } 13786 else if (IS_SPCARG(-1)) { 13787 c = tLPAREN_ARG; 13788 } 13789 paren_nest++; 13790 COND_PUSH(0); 13791 CMDARG_PUSH(0); 13792 lex_state = EXPR_BEG; 13793 return c; 13794 13795 case '[': 13796 paren_nest++; 13797 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) { 13798 lex_state = EXPR_ARG; 13799 if ((c = nextc()) == ']') { 13800 if ((c = nextc()) == '=') { 13801 return tASET; 13802 } 13803 pushback(c); 13804 return tAREF; 13805 } 13806 pushback(c); 13807 return '['; 13808 } 13809 else if (IS_BEG()) { 13810 c = tLBRACK; 13811 } 13812 else if (IS_ARG() && space_seen) { 13813 c = tLBRACK; 13814 } 13815 lex_state = EXPR_BEG; 13816 COND_PUSH(0); 13817 CMDARG_PUSH(0); 13818 return c; 13819 13820 case '{': 13821 if (lpar_beg && lpar_beg == paren_nest) { 13822 lex_state = EXPR_BEG; 13823 lpar_beg = 0; 13824 --paren_nest; 13825 COND_PUSH(0); 13826 CMDARG_PUSH(0); 13827 return tLAMBEG; 13828 } 13829 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN) 13830 c = '{'; /* block (primary) */ 13831 else if (lex_state == EXPR_ENDARG) 13832 c = tLBRACE_ARG; /* block (expr) */ 13833 else 13834 c = tLBRACE; /* hash */ 13835 COND_PUSH(0); 13836 CMDARG_PUSH(0); 13837 lex_state = EXPR_BEG; 13838 if (c != tLBRACE) command_start = TRUE; 13839 return c; 13840 13841 case '\\': 13842 c = nextc(); 13843 if (c == '\n') { 13844 space_seen = 1; 13845 #ifdef RIPPER 13846 ripper_dispatch_scan_event(parser, tSP); 13847 #endif 13848 goto retry; /* skip \\n */ 13849 } 13850 pushback(c); 13851 return '\\'; 13852 13853 case '%': 13854 if (IS_BEG()) { 13855 int term; 13856 int paren; 13857 13858 c = nextc(); 13859 quotation: 13860 if (c == -1 || !ISALNUM(c)) { 13861 term = c; 13862 c = 'Q'; 13863 } 13864 else { 13865 term = nextc(); 13866 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) { 13867 yyerror("unknown type of %string"); 13868 return 0; 13869 } 13870 } 13871 if (c == -1 || term == -1) { 13872 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 13873 return 0; 13874 } 13875 paren = term; 13876 if (term == '(') term = ')'; 13877 else if (term == '[') term = ']'; 13878 else if (term == '{') term = '}'; 13879 else if (term == '<') term = '>'; 13880 else paren = 0; 13881 13882 switch (c) { 13883 case 'Q': 13884 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 13885 return tSTRING_BEG; 13886 13887 case 'q': 13888 lex_strterm = NEW_STRTERM(str_squote, term, paren); 13889 return tSTRING_BEG; 13890 13891 case 'W': 13892 lex_strterm = NEW_STRTERM(str_dword, term, paren); 13893 do {c = nextc();} while (ISSPACE(c)); 13894 pushback(c); 13895 return tWORDS_BEG; 13896 13897 case 'w': 13898 lex_strterm = NEW_STRTERM(str_sword, term, paren); 13899 do {c = nextc();} while (ISSPACE(c)); 13900 pushback(c); 13901 return tQWORDS_BEG; 13902 13903 case 'x': 13904 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 13905 return tXSTRING_BEG; 13906 13907 case 'r': 13908 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 13909 return tREGEXP_BEG; 13910 13911 case 's': 13912 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 13913 lex_state = EXPR_FNAME; 13914 return tSYMBEG; 13915 13916 default: 13917 yyerror("unknown type of %string"); 13918 return 0; 13919 } 13920 } 13921 if ((c = nextc()) == '=') { 13922 set_yylval_id('%'); 13923 lex_state = EXPR_BEG; 13924 return tOP_ASGN; 13925 } 13926 if (IS_SPCARG(c)) { 13927 goto quotation; 13928 } 13929 switch (lex_state) { 13930 case EXPR_FNAME: case EXPR_DOT: 13931 lex_state = EXPR_ARG; break; 13932 default: 13933 lex_state = EXPR_BEG; break; 13934 } 13935 pushback(c); 13936 warn_balanced("%%", "string literal"); 13937 return '%'; 13938 13939 case '$': 13940 lex_state = EXPR_END; 13941 newtok(); 13942 c = nextc(); 13943 switch (c) { 13944 case '_': /* $_: last read line string */ 13945 c = nextc(); 13946 if (parser_is_identchar()) { 13947 tokadd('$'); 13948 tokadd('_'); 13949 break; 13950 } 13951 pushback(c); 13952 c = '_'; 13953 /* fall through */ 13954 case '~': /* $~: match-data */ 13955 case '*': /* $*: argv */ 13956 case '$': /* $$: pid */ 13957 case '?': /* $?: last status */ 13958 case '!': /* $!: error string */ 13959 case '@': /* $@: error position */ 13960 case '/': /* $/: input record separator */ 13961 case '\\': /* $\: output record separator */ 13962 case ';': /* $;: field separator */ 13963 case ',': /* $,: output field separator */ 13964 case '.': /* $.: last read line number */ 13965 case '=': /* $=: ignorecase */ 13966 case ':': /* $:: load path */ 13967 case '<': /* $<: reading filename */ 13968 case '>': /* $>: default output handle */ 13969 case '\"': /* $": already loaded files */ 13970 tokadd('$'); 13971 tokadd(c); 13972 tokfix(); 13973 set_yylval_name(rb_intern(tok())); 13974 return tGVAR; 13975 13976 case '-': 13977 tokadd('$'); 13978 tokadd(c); 13979 c = nextc(); 13980 if (parser_is_identchar()) { 13981 if (tokadd_mbchar(c) == -1) return 0; 13982 } 13983 else { 13984 pushback(c); 13985 } 13986 gvar: 13987 tokfix(); 13988 set_yylval_name(rb_intern(tok())); 13989 return tGVAR; 13990 13991 case '&': /* $&: last match */ 13992 case '`': /* $`: string before last match */ 13993 case '\'': /* $': string after last match */ 13994 case '+': /* $+: string matches last paren. */ 13995 if (last_state == EXPR_FNAME) { 13996 tokadd('$'); 13997 tokadd(c); 13998 goto gvar; 13999 } 14000 set_yylval_node(NEW_BACK_REF(c)); 14001 return tBACK_REF; 14002 14003 case '1': case '2': case '3': 14004 case '4': case '5': case '6': 14005 case '7': case '8': case '9': 14006 tokadd('$'); 14007 do { 14008 tokadd(c); 14009 c = nextc(); 14010 } while (c != -1 && ISDIGIT(c)); 14011 pushback(c); 14012 if (last_state == EXPR_FNAME) goto gvar; 14013 tokfix(); 14014 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 14015 return tNTH_REF; 14016 14017 default: 14018 if (!parser_is_identchar()) { 14019 pushback(c); 14020 return '$'; 14021 } 14022 case '0': 14023 tokadd('$'); 14024 } 14025 break; 14026 14027 case '@': 14028 c = nextc(); 14029 newtok(); 14030 tokadd('@'); 14031 if (c == '@') { 14032 tokadd('@'); 14033 c = nextc(); 14034 } 14035 if (c != -1 && ISDIGIT(c)) { 14036 if (tokidx == 1) { 14037 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 14038 } 14039 else { 14040 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 14041 } 14042 return 0; 14043 } 14044 if (!parser_is_identchar()) { 14045 pushback(c); 14046 return '@'; 14047 } 14048 break; 14049 14050 case '_': 14051 if (was_bol() && whole_match_p("__END__", 7, 0)) { 14052 ruby__end__seen = 1; 14053 parser->eofp = Qtrue; 14054 #ifndef RIPPER 14055 return -1; 14056 #else 14057 lex_goto_eol(parser); 14058 ripper_dispatch_scan_event(parser, k__END__); 14059 return 0; 14060 #endif 14061 } 14062 newtok(); 14063 break; 14064 14065 default: 14066 if (!parser_is_identchar()) { 14067 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 14068 goto retry; 14069 } 14070 14071 newtok(); 14072 break; 14073 } 14074 14075 mb = ENC_CODERANGE_7BIT; 14076 do { 14077 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 14078 if (tokadd_mbchar(c) == -1) return 0; 14079 c = nextc(); 14080 } while (parser_is_identchar()); 14081 switch (tok()[0]) { 14082 case '@': case '$': 14083 pushback(c); 14084 break; 14085 default: 14086 if ((c == '!' || c == '?') && !peek('=')) { 14087 tokadd(c); 14088 } 14089 else { 14090 pushback(c); 14091 } 14092 } 14093 tokfix(); 14094 14095 { 14096 int result = 0; 14097 14098 last_state = lex_state; 14099 switch (tok()[0]) { 14100 case '$': 14101 lex_state = EXPR_END; 14102 result = tGVAR; 14103 break; 14104 case '@': 14105 lex_state = EXPR_END; 14106 if (tok()[1] == '@') 14107 result = tCVAR; 14108 else 14109 result = tIVAR; 14110 break; 14111 14112 default: 14113 if (toklast() == '!' || toklast() == '?') { 14114 result = tFID; 14115 } 14116 else { 14117 if (lex_state == EXPR_FNAME) { 14118 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 14119 (!peek('=') || (peek_n('>', 1)))) { 14120 result = tIDENTIFIER; 14121 tokadd(c); 14122 tokfix(); 14123 } 14124 else { 14125 pushback(c); 14126 } 14127 } 14128 if (result == 0 && ISUPPER(tok()[0])) { 14129 result = tCONSTANT; 14130 } 14131 else { 14132 result = tIDENTIFIER; 14133 } 14134 } 14135 14136 if (IS_LABEL_POSSIBLE()) { 14137 if (IS_LABEL_SUFFIX(0)) { 14138 lex_state = EXPR_BEG; 14139 nextc(); 14140 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 14141 return tLABEL; 14142 } 14143 } 14144 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) { 14145 const struct kwtable *kw; 14146 14147 /* See if it is a reserved word. */ 14148 kw = rb_reserved_word(tok(), toklen()); 14149 if (kw) { 14150 enum lex_state_e state = lex_state; 14151 lex_state = kw->state; 14152 if (state == EXPR_FNAME) { 14153 set_yylval_name(rb_intern(kw->name)); 14154 return kw->id[0]; 14155 } 14156 if (kw->id[0] == keyword_do) { 14157 command_start = TRUE; 14158 if (lpar_beg && lpar_beg == paren_nest) { 14159 lpar_beg = 0; 14160 --paren_nest; 14161 return keyword_do_LAMBDA; 14162 } 14163 if (COND_P()) return keyword_do_cond; 14164 if (CMDARG_P() && state != EXPR_CMDARG) 14165 return keyword_do_block; 14166 if (state == EXPR_ENDARG || state == EXPR_BEG) 14167 return keyword_do_block; 14168 return keyword_do; 14169 } 14170 if (state == EXPR_BEG || state == EXPR_VALUE) 14171 return kw->id[0]; 14172 else { 14173 if (kw->id[0] != kw->id[1]) 14174 lex_state = EXPR_BEG; 14175 return kw->id[1]; 14176 } 14177 } 14178 } 14179 14180 if (IS_BEG() || 14181 lex_state == EXPR_DOT || 14182 IS_ARG()) { 14183 if (cmd_state) { 14184 lex_state = EXPR_CMDARG; 14185 } 14186 else { 14187 lex_state = EXPR_ARG; 14188 } 14189 } 14190 else if (lex_state == EXPR_FNAME) { 14191 lex_state = EXPR_ENDFN; 14192 } 14193 else { 14194 lex_state = EXPR_END; 14195 } 14196 } 14197 { 14198 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 14199 14200 set_yylval_name(ident); 14201 if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) { 14202 lex_state = EXPR_END; 14203 } 14204 } 14205 return result; 14206 } 14207 } 14208 14209 #if YYPURE 14210 static int 14211 yylex(void *lval, void *p) 14212 #else 14213 yylex(void *p) 14214 #endif 14215 { 14216 struct parser_params *parser = (struct parser_params*)p; 14217 int t; 14218 14219 #if YYPURE 14220 parser->parser_yylval = lval; 14221 parser->parser_yylval->val = Qundef; 14222 #endif 14223 t = parser_yylex(parser); 14224 #ifdef RIPPER 14225 if (!NIL_P(parser->delayed)) { 14226 ripper_dispatch_delayed_token(parser, t); 14227 return t; 14228 } 14229 if (t != 0) 14230 ripper_dispatch_scan_event(parser, t); 14231 #endif 14232 14233 return t; 14234 } 14235 14236 #ifndef RIPPER 14237 static NODE* 14238 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 14239 { 14240 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 14241 nd_set_line(n, ruby_sourceline); 14242 return n; 14243 } 14244 14245 enum node_type 14246 nodetype(NODE *node) /* for debug */ 14247 { 14248 return (enum node_type)nd_type(node); 14249 } 14250 14251 int 14252 nodeline(NODE *node) 14253 { 14254 return nd_line(node); 14255 } 14256 14257 static NODE* 14258 newline_node(NODE *node) 14259 { 14260 if (node) { 14261 node = remove_begin(node); 14262 node->flags |= NODE_FL_NEWLINE; 14263 } 14264 return node; 14265 } 14266 14267 static void 14268 fixpos(NODE *node, NODE *orig) 14269 { 14270 if (!node) return; 14271 if (!orig) return; 14272 if (orig == (NODE*)1) return; 14273 nd_set_line(node, nd_line(orig)); 14274 } 14275 14276 static void 14277 parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 14278 { 14279 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 14280 } 14281 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 14282 14283 static void 14284 parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 14285 { 14286 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 14287 } 14288 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 14289 14290 static NODE* 14291 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 14292 { 14293 NODE *end, *h = head, *nd; 14294 14295 if (tail == 0) return head; 14296 14297 if (h == 0) return tail; 14298 switch (nd_type(h)) { 14299 case NODE_LIT: 14300 case NODE_STR: 14301 case NODE_SELF: 14302 case NODE_TRUE: 14303 case NODE_FALSE: 14304 case NODE_NIL: 14305 parser_warning(h, "unused literal ignored"); 14306 return tail; 14307 default: 14308 h = end = NEW_BLOCK(head); 14309 end->nd_end = end; 14310 fixpos(end, head); 14311 head = end; 14312 break; 14313 case NODE_BLOCK: 14314 end = h->nd_end; 14315 break; 14316 } 14317 14318 nd = end->nd_head; 14319 switch (nd_type(nd)) { 14320 case NODE_RETURN: 14321 case NODE_BREAK: 14322 case NODE_NEXT: 14323 case NODE_REDO: 14324 case NODE_RETRY: 14325 if (RTEST(ruby_verbose)) { 14326 parser_warning(nd, "statement not reached"); 14327 } 14328 break; 14329 14330 default: 14331 break; 14332 } 14333 14334 if (nd_type(tail) != NODE_BLOCK) { 14335 tail = NEW_BLOCK(tail); 14336 tail->nd_end = tail; 14337 } 14338 end->nd_next = tail; 14339 h->nd_end = tail->nd_end; 14340 return head; 14341 } 14342 14343 /* append item to the list */ 14344 static NODE* 14345 list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 14346 { 14347 NODE *last; 14348 14349 if (list == 0) return NEW_LIST(item); 14350 if (list->nd_next) { 14351 last = list->nd_next->nd_end; 14352 } 14353 else { 14354 last = list; 14355 } 14356 14357 list->nd_alen += 1; 14358 last->nd_next = NEW_LIST(item); 14359 list->nd_next->nd_end = last->nd_next; 14360 return list; 14361 } 14362 14363 /* concat two lists */ 14364 static NODE* 14365 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14366 { 14367 NODE *last; 14368 14369 if (head->nd_next) { 14370 last = head->nd_next->nd_end; 14371 } 14372 else { 14373 last = head; 14374 } 14375 14376 head->nd_alen += tail->nd_alen; 14377 last->nd_next = tail; 14378 if (tail->nd_next) { 14379 head->nd_next->nd_end = tail->nd_next->nd_end; 14380 } 14381 else { 14382 head->nd_next->nd_end = tail; 14383 } 14384 14385 return head; 14386 } 14387 14388 static int 14389 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 14390 { 14391 if (NIL_P(tail)) return 1; 14392 if (!rb_enc_compatible(head, tail)) { 14393 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 14394 rb_enc_name(rb_enc_get(head)), 14395 rb_enc_name(rb_enc_get(tail))); 14396 rb_str_resize(head, 0); 14397 rb_str_resize(tail, 0); 14398 return 0; 14399 } 14400 rb_str_buf_append(head, tail); 14401 return 1; 14402 } 14403 14404 /* concat two string literals */ 14405 static NODE * 14406 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14407 { 14408 enum node_type htype; 14409 14410 if (!head) return tail; 14411 if (!tail) return head; 14412 14413 htype = nd_type(head); 14414 if (htype == NODE_EVSTR) { 14415 NODE *node = NEW_DSTR(Qnil); 14416 head = list_append(node, head); 14417 } 14418 switch (nd_type(tail)) { 14419 case NODE_STR: 14420 if (htype == NODE_STR) { 14421 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) { 14422 error: 14423 rb_gc_force_recycle((VALUE)head); 14424 rb_gc_force_recycle((VALUE)tail); 14425 return 0; 14426 } 14427 rb_gc_force_recycle((VALUE)tail); 14428 } 14429 else { 14430 list_append(head, tail); 14431 } 14432 break; 14433 14434 case NODE_DSTR: 14435 if (htype == NODE_STR) { 14436 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 14437 goto error; 14438 tail->nd_lit = head->nd_lit; 14439 rb_gc_force_recycle((VALUE)head); 14440 head = tail; 14441 } 14442 else if (NIL_P(tail->nd_lit)) { 14443 head->nd_alen += tail->nd_alen - 1; 14444 head->nd_next->nd_end->nd_next = tail->nd_next; 14445 head->nd_next->nd_end = tail->nd_next->nd_end; 14446 rb_gc_force_recycle((VALUE)tail); 14447 } 14448 else { 14449 nd_set_type(tail, NODE_ARRAY); 14450 tail->nd_head = NEW_STR(tail->nd_lit); 14451 list_concat(head, tail); 14452 } 14453 break; 14454 14455 case NODE_EVSTR: 14456 if (htype == NODE_STR) { 14457 nd_set_type(head, NODE_DSTR); 14458 head->nd_alen = 1; 14459 } 14460 list_append(head, tail); 14461 break; 14462 } 14463 return head; 14464 } 14465 14466 static NODE * 14467 evstr2dstr_gen(struct parser_params *parser, NODE *node) 14468 { 14469 if (nd_type(node) == NODE_EVSTR) { 14470 node = list_append(NEW_DSTR(Qnil), node); 14471 } 14472 return node; 14473 } 14474 14475 static NODE * 14476 new_evstr_gen(struct parser_params *parser, NODE *node) 14477 { 14478 NODE *head = node; 14479 14480 if (node) { 14481 switch (nd_type(node)) { 14482 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 14483 return node; 14484 } 14485 } 14486 return NEW_EVSTR(head); 14487 } 14488 14489 static NODE * 14490 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 14491 { 14492 value_expr(recv); 14493 value_expr(arg1); 14494 return NEW_CALL(recv, id, NEW_LIST(arg1)); 14495 } 14496 14497 static NODE * 14498 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 14499 { 14500 value_expr(recv); 14501 return NEW_CALL(recv, id, 0); 14502 } 14503 14504 static NODE* 14505 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14506 { 14507 value_expr(node1); 14508 value_expr(node2); 14509 if (node1) { 14510 switch (nd_type(node1)) { 14511 case NODE_DREGX: 14512 case NODE_DREGX_ONCE: 14513 return NEW_MATCH2(node1, node2); 14514 14515 case NODE_LIT: 14516 if (TYPE(node1->nd_lit) == T_REGEXP) { 14517 return NEW_MATCH2(node1, node2); 14518 } 14519 } 14520 } 14521 14522 if (node2) { 14523 switch (nd_type(node2)) { 14524 case NODE_DREGX: 14525 case NODE_DREGX_ONCE: 14526 return NEW_MATCH3(node2, node1); 14527 14528 case NODE_LIT: 14529 if (TYPE(node2->nd_lit) == T_REGEXP) { 14530 return NEW_MATCH3(node2, node1); 14531 } 14532 } 14533 } 14534 14535 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 14536 } 14537 14538 static NODE* 14539 gettable_gen(struct parser_params *parser, ID id) 14540 { 14541 if (id == keyword_self) { 14542 return NEW_SELF(); 14543 } 14544 else if (id == keyword_nil) { 14545 return NEW_NIL(); 14546 } 14547 else if (id == keyword_true) { 14548 return NEW_TRUE(); 14549 } 14550 else if (id == keyword_false) { 14551 return NEW_FALSE(); 14552 } 14553 else if (id == keyword__FILE__) { 14554 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile), 14555 rb_filesystem_encoding())); 14556 } 14557 else if (id == keyword__LINE__) { 14558 return NEW_LIT(INT2FIX(ruby_sourceline)); 14559 } 14560 else if (id == keyword__ENCODING__) { 14561 return NEW_LIT(rb_enc_from_encoding(parser->enc)); 14562 } 14563 else if (is_local_id(id)) { 14564 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 14565 if (local_id(id)) return NEW_LVAR(id); 14566 /* method call without arguments */ 14567 return NEW_VCALL(id); 14568 } 14569 else if (is_global_id(id)) { 14570 return NEW_GVAR(id); 14571 } 14572 else if (is_instance_id(id)) { 14573 return NEW_IVAR(id); 14574 } 14575 else if (is_const_id(id)) { 14576 return NEW_CONST(id); 14577 } 14578 else if (is_class_id(id)) { 14579 return NEW_CVAR(id); 14580 } 14581 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14582 return 0; 14583 } 14584 #else /* !RIPPER */ 14585 static int 14586 id_is_var_gen(struct parser_params *parser, ID id) 14587 { 14588 if (is_notop_id(id)) { 14589 switch (id & ID_SCOPE_MASK) { 14590 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 14591 return 1; 14592 case ID_LOCAL: 14593 if (dyna_in_block() && dvar_defined(id)) return 1; 14594 if (local_id(id)) return 1; 14595 /* method call without arguments */ 14596 return 0; 14597 } 14598 } 14599 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 14600 return 0; 14601 } 14602 #endif /* !RIPPER */ 14603 14604 #ifdef RIPPER 14605 static VALUE 14606 assignable_gen(struct parser_params *parser, VALUE lhs) 14607 #else 14608 static NODE* 14609 assignable_gen(struct parser_params *parser, ID id, NODE *val) 14610 #endif 14611 { 14612 #ifdef RIPPER 14613 ID id = get_id(lhs); 14614 # define assignable_result(x) get_value(lhs) 14615 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 14616 #else 14617 # define assignable_result(x) (x) 14618 #endif 14619 if (!id) return assignable_result(0); 14620 if (id == keyword_self) { 14621 yyerror("Can't change the value of self"); 14622 } 14623 else if (id == keyword_nil) { 14624 yyerror("Can't assign to nil"); 14625 } 14626 else if (id == keyword_true) { 14627 yyerror("Can't assign to true"); 14628 } 14629 else if (id == keyword_false) { 14630 yyerror("Can't assign to false"); 14631 } 14632 else if (id == keyword__FILE__) { 14633 yyerror("Can't assign to __FILE__"); 14634 } 14635 else if (id == keyword__LINE__) { 14636 yyerror("Can't assign to __LINE__"); 14637 } 14638 else if (id == keyword__ENCODING__) { 14639 yyerror("Can't assign to __ENCODING__"); 14640 } 14641 else if (is_local_id(id)) { 14642 if (dyna_in_block()) { 14643 if (dvar_curr(id)) { 14644 return assignable_result(NEW_DASGN_CURR(id, val)); 14645 } 14646 else if (dvar_defined(id)) { 14647 return assignable_result(NEW_DASGN(id, val)); 14648 } 14649 else if (local_id(id)) { 14650 return assignable_result(NEW_LASGN(id, val)); 14651 } 14652 else { 14653 dyna_var(id); 14654 return assignable_result(NEW_DASGN_CURR(id, val)); 14655 } 14656 } 14657 else { 14658 if (!local_id(id)) { 14659 local_var(id); 14660 } 14661 return assignable_result(NEW_LASGN(id, val)); 14662 } 14663 } 14664 else if (is_global_id(id)) { 14665 return assignable_result(NEW_GASGN(id, val)); 14666 } 14667 else if (is_instance_id(id)) { 14668 return assignable_result(NEW_IASGN(id, val)); 14669 } 14670 else if (is_const_id(id)) { 14671 if (!in_def && !in_single) 14672 return assignable_result(NEW_CDECL(id, val, 0)); 14673 yyerror("dynamic constant assignment"); 14674 } 14675 else if (is_class_id(id)) { 14676 return assignable_result(NEW_CVASGN(id, val)); 14677 } 14678 else { 14679 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 14680 } 14681 return assignable_result(0); 14682 #undef assignable_result 14683 #undef parser_yyerror 14684 } 14685 14686 #define LVAR_USED ((int)1 << (sizeof(int) * CHAR_BIT - 1)) 14687 14688 static ID 14689 shadowing_lvar_gen(struct parser_params *parser, ID name) 14690 { 14691 if (idUScore == name) return name; 14692 if (dyna_in_block()) { 14693 if (dvar_curr(name)) { 14694 yyerror("duplicated argument name"); 14695 } 14696 else if (dvar_defined_get(name) || local_id(name)) { 14697 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 14698 vtable_add(lvtbl->vars, name); 14699 if (lvtbl->used) { 14700 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 14701 } 14702 } 14703 } 14704 else { 14705 if (local_id(name)) { 14706 yyerror("duplicated argument name"); 14707 } 14708 } 14709 return name; 14710 } 14711 14712 static void 14713 new_bv_gen(struct parser_params *parser, ID name) 14714 { 14715 if (!name) return; 14716 if (!is_local_id(name)) { 14717 compile_error(PARSER_ARG "invalid local variable - %s", 14718 rb_id2name(name)); 14719 return; 14720 } 14721 shadowing_lvar(name); 14722 dyna_var(name); 14723 } 14724 14725 #ifndef RIPPER 14726 static NODE * 14727 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 14728 { 14729 if (recv && nd_type(recv) == NODE_SELF) 14730 recv = (NODE *)1; 14731 return NEW_ATTRASGN(recv, tASET, idx); 14732 } 14733 14734 static void 14735 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14736 { 14737 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 14738 compile_error(PARSER_ARG "both block arg and actual block given"); 14739 } 14740 } 14741 14742 ID 14743 rb_id_attrset(ID id) 14744 { 14745 id &= ~ID_SCOPE_MASK; 14746 id |= ID_ATTRSET; 14747 return id; 14748 } 14749 14750 static NODE * 14751 attrset_gen(struct parser_params *parser, NODE *recv, ID id) 14752 { 14753 if (recv && nd_type(recv) == NODE_SELF) 14754 recv = (NODE *)1; 14755 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 14756 } 14757 14758 static void 14759 rb_backref_error_gen(struct parser_params *parser, NODE *node) 14760 { 14761 switch (nd_type(node)) { 14762 case NODE_NTH_REF: 14763 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 14764 break; 14765 case NODE_BACK_REF: 14766 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 14767 break; 14768 } 14769 } 14770 14771 static NODE * 14772 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14773 { 14774 if (!node2) return node1; 14775 switch (nd_type(node1)) { 14776 case NODE_BLOCK_PASS: 14777 if (node1->nd_head) 14778 node1->nd_head = arg_concat(node1->nd_head, node2); 14779 else 14780 node1->nd_head = NEW_LIST(node2); 14781 return node1; 14782 case NODE_ARGSPUSH: 14783 if (nd_type(node2) != NODE_ARRAY) break; 14784 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 14785 nd_set_type(node1, NODE_ARGSCAT); 14786 return node1; 14787 case NODE_ARGSCAT: 14788 if (nd_type(node2) != NODE_ARRAY || 14789 nd_type(node1->nd_body) != NODE_ARRAY) break; 14790 node1->nd_body = list_concat(node1->nd_body, node2); 14791 return node1; 14792 } 14793 return NEW_ARGSCAT(node1, node2); 14794 } 14795 14796 static NODE * 14797 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 14798 { 14799 if (!node1) return NEW_LIST(node2); 14800 switch (nd_type(node1)) { 14801 case NODE_ARRAY: 14802 return list_append(node1, node2); 14803 case NODE_BLOCK_PASS: 14804 node1->nd_head = arg_append(node1->nd_head, node2); 14805 return node1; 14806 case NODE_ARGSPUSH: 14807 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 14808 nd_set_type(node1, NODE_ARGSCAT); 14809 return node1; 14810 } 14811 return NEW_ARGSPUSH(node1, node2); 14812 } 14813 14814 static NODE * 14815 splat_array(NODE* node) 14816 { 14817 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 14818 if (nd_type(node) == NODE_ARRAY) return node; 14819 return 0; 14820 } 14821 14822 static NODE * 14823 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 14824 { 14825 if (!lhs) return 0; 14826 14827 switch (nd_type(lhs)) { 14828 case NODE_GASGN: 14829 case NODE_IASGN: 14830 case NODE_IASGN2: 14831 case NODE_LASGN: 14832 case NODE_DASGN: 14833 case NODE_DASGN_CURR: 14834 case NODE_MASGN: 14835 case NODE_CDECL: 14836 case NODE_CVASGN: 14837 lhs->nd_value = rhs; 14838 break; 14839 14840 case NODE_ATTRASGN: 14841 case NODE_CALL: 14842 lhs->nd_args = arg_append(lhs->nd_args, rhs); 14843 break; 14844 14845 default: 14846 /* should not happen */ 14847 break; 14848 } 14849 14850 return lhs; 14851 } 14852 14853 static int 14854 value_expr_gen(struct parser_params *parser, NODE *node) 14855 { 14856 int cond = 0; 14857 14858 if (!node) { 14859 rb_warning0("empty expression"); 14860 } 14861 while (node) { 14862 switch (nd_type(node)) { 14863 case NODE_DEFN: 14864 case NODE_DEFS: 14865 parser_warning(node, "void value expression"); 14866 return FALSE; 14867 14868 case NODE_RETURN: 14869 case NODE_BREAK: 14870 case NODE_NEXT: 14871 case NODE_REDO: 14872 case NODE_RETRY: 14873 if (!cond) yyerror("void value expression"); 14874 /* or "control never reach"? */ 14875 return FALSE; 14876 14877 case NODE_BLOCK: 14878 while (node->nd_next) { 14879 node = node->nd_next; 14880 } 14881 node = node->nd_head; 14882 break; 14883 14884 case NODE_BEGIN: 14885 node = node->nd_body; 14886 break; 14887 14888 case NODE_IF: 14889 if (!node->nd_body) { 14890 node = node->nd_else; 14891 break; 14892 } 14893 else if (!node->nd_else) { 14894 node = node->nd_body; 14895 break; 14896 } 14897 if (!value_expr(node->nd_body)) return FALSE; 14898 node = node->nd_else; 14899 break; 14900 14901 case NODE_AND: 14902 case NODE_OR: 14903 cond = 1; 14904 node = node->nd_2nd; 14905 break; 14906 14907 default: 14908 return TRUE; 14909 } 14910 } 14911 14912 return TRUE; 14913 } 14914 14915 static void 14916 void_expr_gen(struct parser_params *parser, NODE *node) 14917 { 14918 const char *useless = 0; 14919 14920 if (!RTEST(ruby_verbose)) return; 14921 14922 if (!node) return; 14923 switch (nd_type(node)) { 14924 case NODE_CALL: 14925 switch (node->nd_mid) { 14926 case '+': 14927 case '-': 14928 case '*': 14929 case '/': 14930 case '%': 14931 case tPOW: 14932 case tUPLUS: 14933 case tUMINUS: 14934 case '|': 14935 case '^': 14936 case '&': 14937 case tCMP: 14938 case '>': 14939 case tGEQ: 14940 case '<': 14941 case tLEQ: 14942 case tEQ: 14943 case tNEQ: 14944 useless = rb_id2name(node->nd_mid); 14945 break; 14946 } 14947 break; 14948 14949 case NODE_LVAR: 14950 case NODE_DVAR: 14951 case NODE_GVAR: 14952 case NODE_IVAR: 14953 case NODE_CVAR: 14954 case NODE_NTH_REF: 14955 case NODE_BACK_REF: 14956 useless = "a variable"; 14957 break; 14958 case NODE_CONST: 14959 useless = "a constant"; 14960 break; 14961 case NODE_LIT: 14962 case NODE_STR: 14963 case NODE_DSTR: 14964 case NODE_DREGX: 14965 case NODE_DREGX_ONCE: 14966 useless = "a literal"; 14967 break; 14968 case NODE_COLON2: 14969 case NODE_COLON3: 14970 useless = "::"; 14971 break; 14972 case NODE_DOT2: 14973 useless = ".."; 14974 break; 14975 case NODE_DOT3: 14976 useless = "..."; 14977 break; 14978 case NODE_SELF: 14979 useless = "self"; 14980 break; 14981 case NODE_NIL: 14982 useless = "nil"; 14983 break; 14984 case NODE_TRUE: 14985 useless = "true"; 14986 break; 14987 case NODE_FALSE: 14988 useless = "false"; 14989 break; 14990 case NODE_DEFINED: 14991 useless = "defined?"; 14992 break; 14993 } 14994 14995 if (useless) { 14996 int line = ruby_sourceline; 14997 14998 ruby_sourceline = nd_line(node); 14999 rb_warnS("possibly useless use of %s in void context", useless); 15000 ruby_sourceline = line; 15001 } 15002 } 15003 15004 static void 15005 void_stmts_gen(struct parser_params *parser, NODE *node) 15006 { 15007 if (!RTEST(ruby_verbose)) return; 15008 if (!node) return; 15009 if (nd_type(node) != NODE_BLOCK) return; 15010 15011 for (;;) { 15012 if (!node->nd_next) return; 15013 void_expr0(node->nd_head); 15014 node = node->nd_next; 15015 } 15016 } 15017 15018 static NODE * 15019 remove_begin(NODE *node) 15020 { 15021 NODE **n = &node, *n1 = node; 15022 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 15023 *n = n1 = n1->nd_body; 15024 } 15025 return node; 15026 } 15027 15028 static void 15029 reduce_nodes_gen(struct parser_params *parser, NODE **body) 15030 { 15031 NODE *node = *body; 15032 15033 if (!node) { 15034 *body = NEW_NIL(); 15035 return; 15036 } 15037 #define subnodes(n1, n2) \ 15038 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 15039 (!node->n2) ? (body = &node->n1, 1) : \ 15040 (reduce_nodes(&node->n1), body = &node->n2, 1)) 15041 15042 while (node) { 15043 int newline = (int)(node->flags & NODE_FL_NEWLINE); 15044 switch (nd_type(node)) { 15045 end: 15046 case NODE_NIL: 15047 *body = 0; 15048 return; 15049 case NODE_RETURN: 15050 *body = node = node->nd_stts; 15051 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15052 continue; 15053 case NODE_BEGIN: 15054 *body = node = node->nd_body; 15055 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15056 continue; 15057 case NODE_BLOCK: 15058 body = &node->nd_end->nd_head; 15059 break; 15060 case NODE_IF: 15061 if (subnodes(nd_body, nd_else)) break; 15062 return; 15063 case NODE_CASE: 15064 body = &node->nd_body; 15065 break; 15066 case NODE_WHEN: 15067 if (!subnodes(nd_body, nd_next)) goto end; 15068 break; 15069 case NODE_ENSURE: 15070 if (!subnodes(nd_head, nd_resq)) goto end; 15071 break; 15072 case NODE_RESCUE: 15073 if (node->nd_else) { 15074 body = &node->nd_resq; 15075 break; 15076 } 15077 if (!subnodes(nd_head, nd_resq)) goto end; 15078 break; 15079 default: 15080 return; 15081 } 15082 node = *body; 15083 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15084 } 15085 15086 #undef subnodes 15087 } 15088 15089 static int 15090 assign_in_cond(struct parser_params *parser, NODE *node) 15091 { 15092 switch (nd_type(node)) { 15093 case NODE_MASGN: 15094 yyerror("multiple assignment in conditional"); 15095 return 1; 15096 15097 case NODE_LASGN: 15098 case NODE_DASGN: 15099 case NODE_DASGN_CURR: 15100 case NODE_GASGN: 15101 case NODE_IASGN: 15102 break; 15103 15104 default: 15105 return 0; 15106 } 15107 15108 if (!node->nd_value) return 1; 15109 switch (nd_type(node->nd_value)) { 15110 case NODE_LIT: 15111 case NODE_STR: 15112 case NODE_NIL: 15113 case NODE_TRUE: 15114 case NODE_FALSE: 15115 /* reports always */ 15116 parser_warn(node->nd_value, "found = in conditional, should be =="); 15117 return 1; 15118 15119 case NODE_DSTR: 15120 case NODE_XSTR: 15121 case NODE_DXSTR: 15122 case NODE_EVSTR: 15123 case NODE_DREGX: 15124 default: 15125 break; 15126 } 15127 return 1; 15128 } 15129 15130 static void 15131 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15132 { 15133 if (!e_option_supplied(parser)) parser_warn(node, str); 15134 } 15135 15136 static void 15137 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15138 { 15139 if (!e_option_supplied(parser)) parser_warning(node, str); 15140 } 15141 15142 static void 15143 fixup_nodes(NODE **rootnode) 15144 { 15145 NODE *node, *next, *head; 15146 15147 for (node = *rootnode; node; node = next) { 15148 enum node_type type; 15149 VALUE val; 15150 15151 next = node->nd_next; 15152 head = node->nd_head; 15153 rb_gc_force_recycle((VALUE)node); 15154 *rootnode = next; 15155 switch (type = nd_type(head)) { 15156 case NODE_DOT2: 15157 case NODE_DOT3: 15158 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 15159 type == NODE_DOT3); 15160 rb_gc_force_recycle((VALUE)head->nd_beg); 15161 rb_gc_force_recycle((VALUE)head->nd_end); 15162 nd_set_type(head, NODE_LIT); 15163 head->nd_lit = val; 15164 break; 15165 default: 15166 break; 15167 } 15168 } 15169 } 15170 15171 static NODE *cond0(struct parser_params*,NODE*); 15172 15173 static NODE* 15174 range_op(struct parser_params *parser, NODE *node) 15175 { 15176 enum node_type type; 15177 15178 if (node == 0) return 0; 15179 15180 type = nd_type(node); 15181 value_expr(node); 15182 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 15183 warn_unless_e_option(parser, node, "integer literal in conditional range"); 15184 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 15185 } 15186 return cond0(parser, node); 15187 } 15188 15189 static int 15190 literal_node(NODE *node) 15191 { 15192 if (!node) return 1; /* same as NODE_NIL */ 15193 switch (nd_type(node)) { 15194 case NODE_LIT: 15195 case NODE_STR: 15196 case NODE_DSTR: 15197 case NODE_EVSTR: 15198 case NODE_DREGX: 15199 case NODE_DREGX_ONCE: 15200 case NODE_DSYM: 15201 return 2; 15202 case NODE_TRUE: 15203 case NODE_FALSE: 15204 case NODE_NIL: 15205 return 1; 15206 } 15207 return 0; 15208 } 15209 15210 static NODE* 15211 cond0(struct parser_params *parser, NODE *node) 15212 { 15213 if (node == 0) return 0; 15214 assign_in_cond(parser, node); 15215 15216 switch (nd_type(node)) { 15217 case NODE_DSTR: 15218 case NODE_EVSTR: 15219 case NODE_STR: 15220 rb_warn0("string literal in condition"); 15221 break; 15222 15223 case NODE_DREGX: 15224 case NODE_DREGX_ONCE: 15225 warning_unless_e_option(parser, node, "regex literal in condition"); 15226 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 15227 15228 case NODE_AND: 15229 case NODE_OR: 15230 node->nd_1st = cond0(parser, node->nd_1st); 15231 node->nd_2nd = cond0(parser, node->nd_2nd); 15232 break; 15233 15234 case NODE_DOT2: 15235 case NODE_DOT3: 15236 node->nd_beg = range_op(parser, node->nd_beg); 15237 node->nd_end = range_op(parser, node->nd_end); 15238 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 15239 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 15240 if (!e_option_supplied(parser)) { 15241 int b = literal_node(node->nd_beg); 15242 int e = literal_node(node->nd_end); 15243 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 15244 parser_warn(node, "range literal in condition"); 15245 } 15246 } 15247 break; 15248 15249 case NODE_DSYM: 15250 parser_warning(node, "literal in condition"); 15251 break; 15252 15253 case NODE_LIT: 15254 if (TYPE(node->nd_lit) == T_REGEXP) { 15255 warn_unless_e_option(parser, node, "regex literal in condition"); 15256 nd_set_type(node, NODE_MATCH); 15257 } 15258 else { 15259 parser_warning(node, "literal in condition"); 15260 } 15261 default: 15262 break; 15263 } 15264 return node; 15265 } 15266 15267 static NODE* 15268 cond_gen(struct parser_params *parser, NODE *node) 15269 { 15270 if (node == 0) return 0; 15271 return cond0(parser, node); 15272 } 15273 15274 static NODE* 15275 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 15276 { 15277 value_expr(left); 15278 if (left && (enum node_type)nd_type(left) == type) { 15279 NODE *node = left, *second; 15280 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 15281 node = second; 15282 } 15283 node->nd_2nd = NEW_NODE(type, second, right, 0); 15284 return left; 15285 } 15286 return NEW_NODE(type, left, right, 0); 15287 } 15288 15289 static void 15290 no_blockarg(struct parser_params *parser, NODE *node) 15291 { 15292 if (node && nd_type(node) == NODE_BLOCK_PASS) { 15293 compile_error(PARSER_ARG "block argument should not be given"); 15294 } 15295 } 15296 15297 static NODE * 15298 ret_args_gen(struct parser_params *parser, NODE *node) 15299 { 15300 if (node) { 15301 no_blockarg(parser, node); 15302 if (nd_type(node) == NODE_ARRAY) { 15303 if (node->nd_next == 0) { 15304 node = node->nd_head; 15305 } 15306 else { 15307 nd_set_type(node, NODE_VALUES); 15308 } 15309 } 15310 } 15311 return node; 15312 } 15313 15314 static NODE * 15315 new_yield_gen(struct parser_params *parser, NODE *node) 15316 { 15317 long state = Qtrue; 15318 15319 if (node) { 15320 no_blockarg(parser, node); 15321 if (node && nd_type(node) == NODE_SPLAT) { 15322 state = Qtrue; 15323 } 15324 } 15325 else { 15326 state = Qfalse; 15327 } 15328 return NEW_YIELD(node, state); 15329 } 15330 15331 static NODE* 15332 negate_lit(NODE *node) 15333 { 15334 switch (TYPE(node->nd_lit)) { 15335 case T_FIXNUM: 15336 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 15337 break; 15338 case T_BIGNUM: 15339 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 15340 break; 15341 case T_FLOAT: 15342 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15343 break; 15344 default: 15345 break; 15346 } 15347 return node; 15348 } 15349 15350 static NODE * 15351 arg_blk_pass(NODE *node1, NODE *node2) 15352 { 15353 if (node2) { 15354 node2->nd_head = node1; 15355 return node2; 15356 } 15357 return node1; 15358 } 15359 15360 static NODE* 15361 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b) 15362 { 15363 int saved_line = ruby_sourceline; 15364 NODE *node; 15365 NODE *i1, *i2 = 0; 15366 15367 node = NEW_ARGS(m ? m->nd_plen : 0, o); 15368 i1 = m ? m->nd_next : 0; 15369 node->nd_next = NEW_ARGS_AUX(r, b); 15370 15371 if (p) { 15372 i2 = p->nd_next; 15373 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen); 15374 } 15375 else if (i1) { 15376 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0); 15377 } 15378 if (i1 || i2) { 15379 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0); 15380 } 15381 ruby_sourceline = saved_line; 15382 return node; 15383 } 15384 #endif /* !RIPPER */ 15385 15386 static void 15387 warn_unused_var(struct parser_params *parser, struct local_vars *local) 15388 { 15389 int i, cnt; 15390 ID *v, *u; 15391 15392 if (!local->used) return; 15393 v = local->vars->tbl; 15394 u = local->used->tbl; 15395 cnt = local->used->pos; 15396 if (cnt != local->vars->pos) { 15397 rb_bug("local->used->pos != local->vars->pos"); 15398 } 15399 for (i = 0; i < cnt; ++i) { 15400 if (!v[i] || (u[i] & LVAR_USED)) continue; 15401 if (idUScore == v[i]) continue; 15402 rb_compile_warn(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 15403 } 15404 } 15405 15406 static void 15407 local_push_gen(struct parser_params *parser, int inherit_dvars) 15408 { 15409 struct local_vars *local; 15410 15411 local = ALLOC(struct local_vars); 15412 local->prev = lvtbl; 15413 local->args = vtable_alloc(0); 15414 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 15415 local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 15416 lvtbl = local; 15417 } 15418 15419 static void 15420 local_pop_gen(struct parser_params *parser) 15421 { 15422 struct local_vars *local = lvtbl->prev; 15423 if (lvtbl->used) { 15424 warn_unused_var(parser, lvtbl); 15425 vtable_free(lvtbl->used); 15426 } 15427 vtable_free(lvtbl->args); 15428 vtable_free(lvtbl->vars); 15429 xfree(lvtbl); 15430 lvtbl = local; 15431 } 15432 15433 #ifndef RIPPER 15434 static ID* 15435 vtable_tblcpy(ID *buf, const struct vtable *src) 15436 { 15437 int i, cnt = vtable_size(src); 15438 15439 if (cnt > 0) { 15440 buf[0] = cnt; 15441 for (i = 0; i < cnt; i++) { 15442 buf[i] = src->tbl[i]; 15443 } 15444 return buf; 15445 } 15446 return 0; 15447 } 15448 15449 static ID* 15450 local_tbl_gen(struct parser_params *parser) 15451 { 15452 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 15453 ID *buf; 15454 15455 if (cnt <= 0) return 0; 15456 buf = ALLOC_N(ID, cnt + 1); 15457 vtable_tblcpy(buf+1, lvtbl->args); 15458 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 15459 buf[0] = cnt; 15460 return buf; 15461 } 15462 #endif 15463 15464 static int 15465 arg_var_gen(struct parser_params *parser, ID id) 15466 { 15467 vtable_add(lvtbl->args, id); 15468 return vtable_size(lvtbl->args) - 1; 15469 } 15470 15471 static int 15472 local_var_gen(struct parser_params *parser, ID id) 15473 { 15474 vtable_add(lvtbl->vars, id); 15475 if (lvtbl->used) { 15476 vtable_add(lvtbl->used, (ID)ruby_sourceline); 15477 } 15478 return vtable_size(lvtbl->vars) - 1; 15479 } 15480 15481 static int 15482 local_id_gen(struct parser_params *parser, ID id) 15483 { 15484 struct vtable *vars, *args, *used; 15485 15486 vars = lvtbl->vars; 15487 args = lvtbl->args; 15488 used = lvtbl->used; 15489 15490 while (vars && POINTER_P(vars->prev)) { 15491 vars = vars->prev; 15492 args = args->prev; 15493 if (used) used = used->prev; 15494 } 15495 15496 if (vars && vars->prev == DVARS_INHERIT) { 15497 return rb_local_defined(id); 15498 } 15499 else if (vtable_included(args, id)) { 15500 return 1; 15501 } 15502 else { 15503 int i = vtable_included(vars, id); 15504 if (i && used) used->tbl[i-1] |= LVAR_USED; 15505 return i != 0; 15506 } 15507 } 15508 15509 static const struct vtable * 15510 dyna_push_gen(struct parser_params *parser) 15511 { 15512 lvtbl->args = vtable_alloc(lvtbl->args); 15513 lvtbl->vars = vtable_alloc(lvtbl->vars); 15514 if (lvtbl->used) { 15515 lvtbl->used = vtable_alloc(lvtbl->used); 15516 } 15517 return lvtbl->args; 15518 } 15519 15520 static void 15521 dyna_pop_1(struct parser_params *parser) 15522 { 15523 struct vtable *tmp; 15524 15525 if ((tmp = lvtbl->used) != 0) { 15526 warn_unused_var(parser, lvtbl); 15527 lvtbl->used = lvtbl->used->prev; 15528 vtable_free(tmp); 15529 } 15530 tmp = lvtbl->args; 15531 lvtbl->args = lvtbl->args->prev; 15532 vtable_free(tmp); 15533 tmp = lvtbl->vars; 15534 lvtbl->vars = lvtbl->vars->prev; 15535 vtable_free(tmp); 15536 } 15537 15538 static void 15539 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 15540 { 15541 while (lvtbl->args != lvargs) { 15542 dyna_pop_1(parser); 15543 if (!lvtbl->args) { 15544 struct local_vars *local = lvtbl->prev; 15545 xfree(lvtbl); 15546 lvtbl = local; 15547 } 15548 } 15549 dyna_pop_1(parser); 15550 } 15551 15552 static int 15553 dyna_in_block_gen(struct parser_params *parser) 15554 { 15555 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 15556 } 15557 15558 static int 15559 dvar_defined_gen(struct parser_params *parser, ID id, int get) 15560 { 15561 struct vtable *vars, *args, *used; 15562 int i; 15563 15564 args = lvtbl->args; 15565 vars = lvtbl->vars; 15566 used = lvtbl->used; 15567 15568 while (POINTER_P(vars)) { 15569 if (vtable_included(args, id)) { 15570 return 1; 15571 } 15572 if ((i = vtable_included(vars, id)) != 0) { 15573 if (used) used->tbl[i-1] |= LVAR_USED; 15574 return 1; 15575 } 15576 args = args->prev; 15577 vars = vars->prev; 15578 if (get) used = 0; 15579 if (used) used = used->prev; 15580 } 15581 15582 if (vars == DVARS_INHERIT) { 15583 return rb_dvar_defined(id); 15584 } 15585 15586 return 0; 15587 } 15588 15589 static int 15590 dvar_curr_gen(struct parser_params *parser, ID id) 15591 { 15592 return (vtable_included(lvtbl->args, id) || 15593 vtable_included(lvtbl->vars, id)); 15594 } 15595 15596 #ifndef RIPPER 15597 static void 15598 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 15599 { 15600 int c = RE_OPTION_ENCODING_IDX(options); 15601 15602 if (c) { 15603 int opt, idx; 15604 rb_char_to_option_kcode(c, &opt, &idx); 15605 if (idx != ENCODING_GET(str) && 15606 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15607 goto error; 15608 } 15609 ENCODING_SET(str, idx); 15610 } 15611 else if (RE_OPTION_ENCODING_NONE(options)) { 15612 if (!ENCODING_IS_ASCII8BIT(str) && 15613 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15614 c = 'n'; 15615 goto error; 15616 } 15617 rb_enc_associate(str, rb_ascii8bit_encoding()); 15618 } 15619 else if (parser->enc == rb_usascii_encoding()) { 15620 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 15621 /* raise in re.c */ 15622 rb_enc_associate(str, rb_usascii_encoding()); 15623 } 15624 else { 15625 rb_enc_associate(str, rb_ascii8bit_encoding()); 15626 } 15627 } 15628 return; 15629 15630 error: 15631 compile_error(PARSER_ARG 15632 "regexp encoding option '%c' differs from source encoding '%s'", 15633 c, rb_enc_name(rb_enc_get(str))); 15634 } 15635 15636 static int 15637 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 15638 { 15639 VALUE err; 15640 reg_fragment_setenc(str, options); 15641 err = rb_reg_check_preprocess(str); 15642 if (err != Qnil) { 15643 err = rb_obj_as_string(err); 15644 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 15645 RB_GC_GUARD(err); 15646 return 0; 15647 } 15648 return 1; 15649 } 15650 15651 typedef struct { 15652 struct parser_params* parser; 15653 rb_encoding *enc; 15654 NODE *succ_block; 15655 NODE *fail_block; 15656 int num; 15657 } reg_named_capture_assign_t; 15658 15659 static int 15660 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 15661 int back_num, int *back_refs, OnigRegex regex, void *arg0) 15662 { 15663 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 15664 struct parser_params* parser = arg->parser; 15665 rb_encoding *enc = arg->enc; 15666 long len = name_end - name; 15667 const char *s = (const char *)name; 15668 ID var; 15669 15670 arg->num++; 15671 15672 if (arg->succ_block == 0) { 15673 arg->succ_block = NEW_BEGIN(0); 15674 arg->fail_block = NEW_BEGIN(0); 15675 } 15676 15677 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 15678 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 15679 !rb_enc_symname2_p(s, len, enc)) { 15680 return ST_CONTINUE; 15681 } 15682 var = rb_intern3(s, len, enc); 15683 if (dvar_defined(var) || local_id(var)) { 15684 rb_warningS("named capture conflicts a local variable - %s", 15685 rb_id2name(var)); 15686 } 15687 arg->succ_block = block_append(arg->succ_block, 15688 newline_node(node_assign(assignable(var,0), 15689 NEW_CALL( 15690 gettable(rb_intern("$~")), 15691 idAREF, 15692 NEW_LIST(NEW_LIT(ID2SYM(var)))) 15693 ))); 15694 arg->fail_block = block_append(arg->fail_block, 15695 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 15696 return ST_CONTINUE; 15697 } 15698 15699 static NODE * 15700 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 15701 { 15702 reg_named_capture_assign_t arg; 15703 15704 arg.parser = parser; 15705 arg.enc = rb_enc_get(regexp); 15706 arg.succ_block = 0; 15707 arg.fail_block = 0; 15708 arg.num = 0; 15709 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 15710 15711 if (arg.num == 0) 15712 return match; 15713 15714 return 15715 block_append( 15716 newline_node(match), 15717 NEW_IF(gettable(rb_intern("$~")), 15718 block_append( 15719 newline_node(arg.succ_block), 15720 newline_node( 15721 NEW_CALL( 15722 gettable(rb_intern("$~")), 15723 rb_intern("begin"), 15724 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 15725 block_append( 15726 newline_node(arg.fail_block), 15727 newline_node( 15728 NEW_LIT(Qnil))))); 15729 } 15730 15731 static VALUE 15732 reg_compile_gen(struct parser_params* parser, VALUE str, int options) 15733 { 15734 VALUE re; 15735 VALUE err; 15736 15737 reg_fragment_setenc(str, options); 15738 err = rb_errinfo(); 15739 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 15740 if (NIL_P(re)) { 15741 ID mesg = rb_intern("mesg"); 15742 VALUE m = rb_attr_get(rb_errinfo(), mesg); 15743 rb_set_errinfo(err); 15744 if (!NIL_P(err)) { 15745 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 15746 } 15747 else { 15748 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 15749 } 15750 return Qnil; 15751 } 15752 return re; 15753 } 15754 15755 void 15756 rb_gc_mark_parser(void) 15757 { 15758 } 15759 15760 NODE* 15761 rb_parser_append_print(VALUE vparser, NODE *node) 15762 { 15763 NODE *prelude = 0; 15764 NODE *scope = node; 15765 struct parser_params *parser; 15766 15767 if (!node) return node; 15768 15769 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15770 15771 node = node->nd_body; 15772 15773 if (nd_type(node) == NODE_PRELUDE) { 15774 prelude = node; 15775 node = node->nd_body; 15776 } 15777 15778 node = block_append(node, 15779 NEW_FCALL(rb_intern("print"), 15780 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 15781 if (prelude) { 15782 prelude->nd_body = node; 15783 scope->nd_body = prelude; 15784 } 15785 else { 15786 scope->nd_body = node; 15787 } 15788 15789 return scope; 15790 } 15791 15792 NODE * 15793 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 15794 { 15795 NODE *prelude = 0; 15796 NODE *scope = node; 15797 struct parser_params *parser; 15798 15799 if (!node) return node; 15800 15801 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 15802 15803 node = node->nd_body; 15804 15805 if (nd_type(node) == NODE_PRELUDE) { 15806 prelude = node; 15807 node = node->nd_body; 15808 } 15809 if (split) { 15810 node = block_append(NEW_GASGN(rb_intern("$F"), 15811 NEW_CALL(NEW_GVAR(rb_intern("$_")), 15812 rb_intern("split"), 0)), 15813 node); 15814 } 15815 if (chop) { 15816 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 15817 rb_intern("chop!"), 0), node); 15818 } 15819 15820 node = NEW_OPT_N(node); 15821 15822 if (prelude) { 15823 prelude->nd_body = node; 15824 scope->nd_body = prelude; 15825 } 15826 else { 15827 scope->nd_body = node; 15828 } 15829 15830 return scope; 15831 } 15832 15833 static const struct { 15834 ID token; 15835 const char *name; 15836 } op_tbl[] = { 15837 {tDOT2, ".."}, 15838 {tDOT3, "..."}, 15839 {'+', "+(binary)"}, 15840 {'-', "-(binary)"}, 15841 {tPOW, "**"}, 15842 {tUPLUS, "+@"}, 15843 {tUMINUS, "-@"}, 15844 {tCMP, "<=>"}, 15845 {tGEQ, ">="}, 15846 {tLEQ, "<="}, 15847 {tEQ, "=="}, 15848 {tEQQ, "==="}, 15849 {tNEQ, "!="}, 15850 {tMATCH, "=~"}, 15851 {tNMATCH, "!~"}, 15852 {tAREF, "[]"}, 15853 {tASET, "[]="}, 15854 {tLSHFT, "<<"}, 15855 {tRSHFT, ">>"}, 15856 {tCOLON2, "::"}, 15857 }; 15858 15859 #define op_tbl_count numberof(op_tbl) 15860 15861 #ifndef ENABLE_SELECTOR_NAMESPACE 15862 #define ENABLE_SELECTOR_NAMESPACE 0 15863 #endif 15864 15865 static struct symbols { 15866 ID last_id; 15867 st_table *sym_id; 15868 st_table *id_str; 15869 #if ENABLE_SELECTOR_NAMESPACE 15870 st_table *ivar2_id; 15871 st_table *id_ivar2; 15872 #endif 15873 VALUE op_sym[tLAST_TOKEN]; 15874 } global_symbols = {tLAST_ID}; 15875 15876 static const struct st_hash_type symhash = { 15877 rb_str_hash_cmp, 15878 rb_str_hash, 15879 }; 15880 15881 #if ENABLE_SELECTOR_NAMESPACE 15882 struct ivar2_key { 15883 ID id; 15884 VALUE klass; 15885 }; 15886 15887 static int 15888 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 15889 { 15890 if (key1->id == key2->id && key1->klass == key2->klass) { 15891 return 0; 15892 } 15893 return 1; 15894 } 15895 15896 static int 15897 ivar2_hash(struct ivar2_key *key) 15898 { 15899 return (key->id << 8) ^ (key->klass >> 2); 15900 } 15901 15902 static const struct st_hash_type ivar2_hash_type = { 15903 ivar2_cmp, 15904 ivar2_hash, 15905 }; 15906 #endif 15907 15908 void 15909 Init_sym(void) 15910 { 15911 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 15912 global_symbols.id_str = st_init_numtable_with_size(1000); 15913 #if ENABLE_SELECTOR_NAMESPACE 15914 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 15915 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 15916 #endif 15917 15918 Init_id(); 15919 } 15920 15921 void 15922 rb_gc_mark_symbols(void) 15923 { 15924 rb_mark_tbl(global_symbols.id_str); 15925 rb_gc_mark_locations(global_symbols.op_sym, 15926 global_symbols.op_sym + tLAST_TOKEN); 15927 } 15928 #endif /* !RIPPER */ 15929 15930 static ID 15931 internal_id_gen(struct parser_params *parser) 15932 { 15933 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 15934 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 15935 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 15936 } 15937 15938 #ifndef RIPPER 15939 static int 15940 is_special_global_name(const char *m, const char *e, rb_encoding *enc) 15941 { 15942 int mb = 0; 15943 15944 if (m >= e) return 0; 15945 switch (*m) { 15946 case '~': case '*': case '$': case '?': case '!': case '@': 15947 case '/': case '\\': case ';': case ',': case '.': case '=': 15948 case ':': case '<': case '>': case '\"': 15949 case '&': case '`': case '\'': case '+': 15950 case '0': 15951 ++m; 15952 break; 15953 case '-': 15954 ++m; 15955 if (m < e && is_identchar(m, e, enc)) { 15956 if (!ISASCII(*m)) mb = 1; 15957 m += rb_enc_mbclen(m, e, enc); 15958 } 15959 break; 15960 default: 15961 if (!rb_enc_isdigit(*m, enc)) return 0; 15962 do { 15963 if (!ISASCII(*m)) mb = 1; 15964 ++m; 15965 } while (m < e && rb_enc_isdigit(*m, enc)); 15966 } 15967 return m == e ? mb + 1 : 0; 15968 } 15969 15970 int 15971 rb_symname_p(const char *name) 15972 { 15973 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 15974 } 15975 15976 int 15977 rb_enc_symname_p(const char *name, rb_encoding *enc) 15978 { 15979 return rb_enc_symname2_p(name, strlen(name), enc); 15980 } 15981 15982 int 15983 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 15984 { 15985 const char *m = name; 15986 const char *e = m + len; 15987 int localid = FALSE; 15988 15989 if (!m || len <= 0) return FALSE; 15990 switch (*m) { 15991 case '\0': 15992 return FALSE; 15993 15994 case '$': 15995 if (is_special_global_name(++m, e, enc)) return TRUE; 15996 goto id; 15997 15998 case '@': 15999 if (*++m == '@') ++m; 16000 goto id; 16001 16002 case '<': 16003 switch (*++m) { 16004 case '<': ++m; break; 16005 case '=': if (*++m == '>') ++m; break; 16006 default: break; 16007 } 16008 break; 16009 16010 case '>': 16011 switch (*++m) { 16012 case '>': case '=': ++m; break; 16013 } 16014 break; 16015 16016 case '=': 16017 switch (*++m) { 16018 case '~': ++m; break; 16019 case '=': if (*++m == '=') ++m; break; 16020 default: return FALSE; 16021 } 16022 break; 16023 16024 case '*': 16025 if (*++m == '*') ++m; 16026 break; 16027 16028 case '+': case '-': 16029 if (*++m == '@') ++m; 16030 break; 16031 16032 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 16033 ++m; 16034 break; 16035 16036 case '[': 16037 if (*++m != ']') return FALSE; 16038 if (*++m == '=') ++m; 16039 break; 16040 16041 case '!': 16042 if (len == 1) return TRUE; 16043 switch (*++m) { 16044 case '=': case '~': ++m; break; 16045 default: return FALSE; 16046 } 16047 break; 16048 16049 default: 16050 localid = !rb_enc_isupper(*m, enc); 16051 id: 16052 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 16053 return FALSE; 16054 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 16055 if (localid) { 16056 switch (*m) { 16057 case '!': case '?': case '=': ++m; 16058 } 16059 } 16060 break; 16061 } 16062 return m == e; 16063 } 16064 16065 static ID 16066 register_symid(ID id, const char *name, long len, rb_encoding *enc) 16067 { 16068 VALUE str = rb_enc_str_new(name, len, enc); 16069 OBJ_FREEZE(str); 16070 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 16071 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 16072 return id; 16073 } 16074 16075 ID 16076 rb_intern3(const char *name, long len, rb_encoding *enc) 16077 { 16078 const char *m = name; 16079 const char *e = m + len; 16080 unsigned char c; 16081 VALUE str; 16082 ID id; 16083 long last; 16084 int mb; 16085 st_data_t data; 16086 struct RString fake_str; 16087 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16088 fake_str.basic.klass = rb_cString; 16089 fake_str.as.heap.len = len; 16090 fake_str.as.heap.ptr = (char *)name; 16091 fake_str.as.heap.aux.capa = len; 16092 str = (VALUE)&fake_str; 16093 rb_enc_associate(str, enc); 16094 OBJ_FREEZE(str); 16095 16096 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { 16097 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 16098 } 16099 16100 if (st_lookup(global_symbols.sym_id, str, &data)) 16101 return (ID)data; 16102 16103 if (rb_cString && !rb_enc_asciicompat(enc)) { 16104 id = ID_JUNK; 16105 goto new_id; 16106 } 16107 last = len-1; 16108 id = 0; 16109 switch (*m) { 16110 case '$': 16111 id |= ID_GLOBAL; 16112 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 16113 if (!--mb) enc = rb_ascii8bit_encoding(); 16114 goto new_id; 16115 } 16116 break; 16117 case '@': 16118 if (m[1] == '@') { 16119 m++; 16120 id |= ID_CLASS; 16121 } 16122 else { 16123 id |= ID_INSTANCE; 16124 } 16125 m++; 16126 break; 16127 default: 16128 c = m[0]; 16129 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 16130 /* operators */ 16131 int i; 16132 16133 if (len == 1) { 16134 id = c; 16135 goto id_register; 16136 } 16137 for (i = 0; i < op_tbl_count; i++) { 16138 if (*op_tbl[i].name == *m && 16139 strcmp(op_tbl[i].name, m) == 0) { 16140 id = op_tbl[i].token; 16141 goto id_register; 16142 } 16143 } 16144 } 16145 16146 if (m[last] == '=') { 16147 /* attribute assignment */ 16148 id = rb_intern3(name, last, enc); 16149 if (id > tLAST_TOKEN && !is_attrset_id(id)) { 16150 enc = rb_enc_get(rb_id2str(id)); 16151 id = rb_id_attrset(id); 16152 goto id_register; 16153 } 16154 id = ID_ATTRSET; 16155 } 16156 else if (rb_enc_isupper(m[0], enc)) { 16157 id = ID_CONST; 16158 } 16159 else { 16160 id = ID_LOCAL; 16161 } 16162 break; 16163 } 16164 mb = 0; 16165 if (!rb_enc_isdigit(*m, enc)) { 16166 while (m <= name + last && is_identchar(m, e, enc)) { 16167 if (ISASCII(*m)) { 16168 m++; 16169 } 16170 else { 16171 mb = 1; 16172 m += rb_enc_mbclen(m, e, enc); 16173 } 16174 } 16175 } 16176 if (m - name < len) id = ID_JUNK; 16177 if (enc != rb_usascii_encoding()) { 16178 /* 16179 * this clause makes sense only when called from other than 16180 * rb_intern_str() taking care of code-range. 16181 */ 16182 if (!mb) { 16183 for (; m <= name + len; ++m) { 16184 if (!ISASCII(*m)) goto mbstr; 16185 } 16186 enc = rb_usascii_encoding(); 16187 } 16188 mbstr:; 16189 } 16190 new_id: 16191 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 16192 if (len > 20) { 16193 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 16194 name); 16195 } 16196 else { 16197 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 16198 (int)len, name); 16199 } 16200 } 16201 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 16202 id_register: 16203 return register_symid(id, name, len, enc); 16204 } 16205 16206 ID 16207 rb_intern2(const char *name, long len) 16208 { 16209 return rb_intern3(name, len, rb_usascii_encoding()); 16210 } 16211 16212 #undef rb_intern 16213 ID 16214 rb_intern(const char *name) 16215 { 16216 return rb_intern2(name, strlen(name)); 16217 } 16218 16219 ID 16220 rb_intern_str(VALUE str) 16221 { 16222 rb_encoding *enc; 16223 ID id; 16224 16225 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 16226 enc = rb_usascii_encoding(); 16227 } 16228 else { 16229 enc = rb_enc_get(str); 16230 } 16231 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc); 16232 RB_GC_GUARD(str); 16233 return id; 16234 } 16235 16236 VALUE 16237 rb_id2str(ID id) 16238 { 16239 st_data_t data; 16240 16241 if (id < tLAST_TOKEN) { 16242 int i = 0; 16243 16244 if (id < INT_MAX && rb_ispunct((int)id)) { 16245 VALUE str = global_symbols.op_sym[i = (int)id]; 16246 if (!str) { 16247 char name[2]; 16248 name[0] = (char)id; 16249 name[1] = 0; 16250 str = rb_usascii_str_new(name, 1); 16251 OBJ_FREEZE(str); 16252 global_symbols.op_sym[i] = str; 16253 } 16254 return str; 16255 } 16256 for (i = 0; i < op_tbl_count; i++) { 16257 if (op_tbl[i].token == id) { 16258 VALUE str = global_symbols.op_sym[i]; 16259 if (!str) { 16260 str = rb_usascii_str_new2(op_tbl[i].name); 16261 OBJ_FREEZE(str); 16262 global_symbols.op_sym[i] = str; 16263 } 16264 return str; 16265 } 16266 } 16267 } 16268 16269 if (st_lookup(global_symbols.id_str, id, &data)) { 16270 VALUE str = (VALUE)data; 16271 if (RBASIC(str)->klass == 0) 16272 RBASIC(str)->klass = rb_cString; 16273 return str; 16274 } 16275 16276 if (is_attrset_id(id)) { 16277 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL; 16278 VALUE str; 16279 16280 while (!(str = rb_id2str(id2))) { 16281 if (!is_local_id(id2)) return 0; 16282 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST; 16283 } 16284 str = rb_str_dup(str); 16285 rb_str_cat(str, "=", 1); 16286 rb_intern_str(str); 16287 if (st_lookup(global_symbols.id_str, id, &data)) { 16288 VALUE str = (VALUE)data; 16289 if (RBASIC(str)->klass == 0) 16290 RBASIC(str)->klass = rb_cString; 16291 return str; 16292 } 16293 } 16294 return 0; 16295 } 16296 16297 const char * 16298 rb_id2name(ID id) 16299 { 16300 VALUE str = rb_id2str(id); 16301 16302 if (!str) return 0; 16303 return RSTRING_PTR(str); 16304 } 16305 16306 static int 16307 symbols_i(VALUE sym, ID value, VALUE ary) 16308 { 16309 rb_ary_push(ary, ID2SYM(value)); 16310 return ST_CONTINUE; 16311 } 16312 16313 /* 16314 * call-seq: 16315 * Symbol.all_symbols => array 16316 * 16317 * Returns an array of all the symbols currently in Ruby's symbol 16318 * table. 16319 * 16320 * Symbol.all_symbols.size #=> 903 16321 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 16322 * :chown, :EOFError, :$;, :String, 16323 * :LOCK_SH, :"setuid?", :$<, 16324 * :default_proc, :compact, :extend, 16325 * :Tms, :getwd, :$=, :ThreadGroup, 16326 * :wait2, :$>] 16327 */ 16328 16329 VALUE 16330 rb_sym_all_symbols(void) 16331 { 16332 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 16333 16334 st_foreach(global_symbols.sym_id, symbols_i, ary); 16335 return ary; 16336 } 16337 16338 int 16339 rb_is_const_id(ID id) 16340 { 16341 return is_const_id(id); 16342 } 16343 16344 int 16345 rb_is_class_id(ID id) 16346 { 16347 return is_class_id(id); 16348 } 16349 16350 int 16351 rb_is_instance_id(ID id) 16352 { 16353 return is_instance_id(id); 16354 } 16355 16356 int 16357 rb_is_local_id(ID id) 16358 { 16359 return is_local_id(id); 16360 } 16361 16362 int 16363 rb_is_junk_id(ID id) 16364 { 16365 return is_junk_id(id); 16366 } 16367 16368 #endif /* !RIPPER */ 16369 16370 static void 16371 parser_initialize(struct parser_params *parser) 16372 { 16373 parser->eofp = Qfalse; 16374 16375 parser->parser_lex_strterm = 0; 16376 parser->parser_cond_stack = 0; 16377 parser->parser_cmdarg_stack = 0; 16378 parser->parser_class_nest = 0; 16379 parser->parser_paren_nest = 0; 16380 parser->parser_lpar_beg = 0; 16381 parser->parser_in_single = 0; 16382 parser->parser_in_def = 0; 16383 parser->parser_in_defined = 0; 16384 parser->parser_compile_for_eval = 0; 16385 parser->parser_cur_mid = 0; 16386 parser->parser_tokenbuf = NULL; 16387 parser->parser_tokidx = 0; 16388 parser->parser_toksiz = 0; 16389 parser->parser_heredoc_end = 0; 16390 parser->parser_command_start = TRUE; 16391 parser->parser_deferred_nodes = 0; 16392 parser->parser_lex_pbeg = 0; 16393 parser->parser_lex_p = 0; 16394 parser->parser_lex_pend = 0; 16395 parser->parser_lvtbl = 0; 16396 parser->parser_ruby__end__seen = 0; 16397 parser->parser_ruby_sourcefile = 0; 16398 #ifndef RIPPER 16399 parser->is_ripper = 0; 16400 parser->parser_eval_tree_begin = 0; 16401 parser->parser_eval_tree = 0; 16402 #else 16403 parser->is_ripper = 1; 16404 parser->parser_ruby_sourcefile_string = Qnil; 16405 parser->delayed = Qnil; 16406 16407 parser->result = Qnil; 16408 parser->parsing_thread = Qnil; 16409 parser->toplevel_p = TRUE; 16410 #endif 16411 #ifdef YYMALLOC 16412 parser->heap = NULL; 16413 #endif 16414 parser->enc = rb_usascii_encoding(); 16415 } 16416 16417 #ifdef RIPPER 16418 #define parser_mark ripper_parser_mark 16419 #define parser_free ripper_parser_free 16420 #endif 16421 16422 static void 16423 parser_mark(void *ptr) 16424 { 16425 struct parser_params *p = (struct parser_params*)ptr; 16426 16427 rb_gc_mark((VALUE)p->parser_lex_strterm); 16428 rb_gc_mark((VALUE)p->parser_deferred_nodes); 16429 rb_gc_mark(p->parser_lex_input); 16430 rb_gc_mark(p->parser_lex_lastline); 16431 rb_gc_mark(p->parser_lex_nextline); 16432 #ifndef RIPPER 16433 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 16434 rb_gc_mark((VALUE)p->parser_eval_tree) ; 16435 rb_gc_mark(p->debug_lines); 16436 #else 16437 rb_gc_mark(p->parser_ruby_sourcefile_string); 16438 rb_gc_mark(p->delayed); 16439 rb_gc_mark(p->value); 16440 rb_gc_mark(p->result); 16441 rb_gc_mark(p->parsing_thread); 16442 #endif 16443 #ifdef YYMALLOC 16444 rb_gc_mark((VALUE)p->heap); 16445 #endif 16446 } 16447 16448 static void 16449 parser_free(void *ptr) 16450 { 16451 struct parser_params *p = (struct parser_params*)ptr; 16452 struct local_vars *local, *prev; 16453 16454 if (p->parser_tokenbuf) { 16455 xfree(p->parser_tokenbuf); 16456 } 16457 for (local = p->parser_lvtbl; local; local = prev) { 16458 if (local->vars) xfree(local->vars); 16459 prev = local->prev; 16460 xfree(local); 16461 } 16462 #ifndef RIPPER 16463 xfree(p->parser_ruby_sourcefile); 16464 #endif 16465 xfree(p); 16466 } 16467 16468 static size_t 16469 parser_memsize(const void *ptr) 16470 { 16471 struct parser_params *p = (struct parser_params*)ptr; 16472 struct local_vars *local; 16473 size_t size = sizeof(*p); 16474 16475 if (!ptr) return 0; 16476 size += p->parser_toksiz; 16477 for (local = p->parser_lvtbl; local; local = local->prev) { 16478 size += sizeof(*local); 16479 if (local->vars) size += local->vars->capa * sizeof(ID); 16480 } 16481 #ifndef RIPPER 16482 if (p->parser_ruby_sourcefile) { 16483 size += strlen(p->parser_ruby_sourcefile) + 1; 16484 } 16485 #endif 16486 return size; 16487 } 16488 16489 static 16490 #ifndef RIPPER 16491 const 16492 #endif 16493 rb_data_type_t parser_data_type = { 16494 "parser", 16495 { 16496 parser_mark, 16497 parser_free, 16498 parser_memsize, 16499 }, 16500 }; 16501 16502 #ifndef RIPPER 16503 #undef rb_reserved_word 16504 16505 const struct kwtable * 16506 rb_reserved_word(const char *str, unsigned int len) 16507 { 16508 return reserved_word(str, len); 16509 } 16510 16511 static struct parser_params * 16512 parser_new(void) 16513 { 16514 struct parser_params *p; 16515 16516 p = ALLOC_N(struct parser_params, 1); 16517 MEMZERO(p, struct parser_params, 1); 16518 parser_initialize(p); 16519 return p; 16520 } 16521 16522 VALUE 16523 rb_parser_new(void) 16524 { 16525 struct parser_params *p = parser_new(); 16526 16527 return TypedData_Wrap_Struct(0, &parser_data_type, p); 16528 } 16529 16530 /* 16531 * call-seq: 16532 * ripper#end_seen? -> Boolean 16533 * 16534 * Return true if parsed source ended by +\_\_END\_\_+. 16535 */ 16536 VALUE 16537 rb_parser_end_seen_p(VALUE vparser) 16538 { 16539 struct parser_params *parser; 16540 16541 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16542 return ruby__end__seen ? Qtrue : Qfalse; 16543 } 16544 16545 /* 16546 * call-seq: 16547 * ripper#encoding -> encoding 16548 * 16549 * Return encoding of the source. 16550 */ 16551 VALUE 16552 rb_parser_encoding(VALUE vparser) 16553 { 16554 struct parser_params *parser; 16555 16556 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16557 return rb_enc_from_encoding(parser->enc); 16558 } 16559 16560 /* 16561 * call-seq: 16562 * ripper.yydebug -> true or false 16563 * 16564 * Get yydebug. 16565 */ 16566 VALUE 16567 rb_parser_get_yydebug(VALUE self) 16568 { 16569 struct parser_params *parser; 16570 16571 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16572 return yydebug ? Qtrue : Qfalse; 16573 } 16574 16575 /* 16576 * call-seq: 16577 * ripper.yydebug = flag 16578 * 16579 * Set yydebug. 16580 */ 16581 VALUE 16582 rb_parser_set_yydebug(VALUE self, VALUE flag) 16583 { 16584 struct parser_params *parser; 16585 16586 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16587 yydebug = RTEST(flag); 16588 return flag; 16589 } 16590 16591 #ifdef YYMALLOC 16592 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 16593 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 16594 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 16595 (n)->u3.cnt = (c), (p)) 16596 16597 void * 16598 rb_parser_malloc(struct parser_params *parser, size_t size) 16599 { 16600 size_t cnt = HEAPCNT(1, size); 16601 NODE *n = NEWHEAP(); 16602 void *ptr = xmalloc(size); 16603 16604 return ADD2HEAP(n, cnt, ptr); 16605 } 16606 16607 void * 16608 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 16609 { 16610 size_t cnt = HEAPCNT(nelem, size); 16611 NODE *n = NEWHEAP(); 16612 void *ptr = xcalloc(nelem, size); 16613 16614 return ADD2HEAP(n, cnt, ptr); 16615 } 16616 16617 void * 16618 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 16619 { 16620 NODE *n; 16621 size_t cnt = HEAPCNT(1, size); 16622 16623 if (ptr && (n = parser->heap) != NULL) { 16624 do { 16625 if (n->u1.node == ptr) { 16626 n->u1.node = ptr = xrealloc(ptr, size); 16627 if (n->u3.cnt) n->u3.cnt = cnt; 16628 return ptr; 16629 } 16630 } while ((n = n->u2.node) != NULL); 16631 } 16632 n = NEWHEAP(); 16633 ptr = xrealloc(ptr, size); 16634 return ADD2HEAP(n, cnt, ptr); 16635 } 16636 16637 void 16638 rb_parser_free(struct parser_params *parser, void *ptr) 16639 { 16640 NODE **prev = &parser->heap, *n; 16641 16642 while ((n = *prev) != NULL) { 16643 if (n->u1.node == ptr) { 16644 *prev = n->u2.node; 16645 rb_gc_force_recycle((VALUE)n); 16646 break; 16647 } 16648 prev = &n->u2.node; 16649 } 16650 xfree(ptr); 16651 } 16652 #endif 16653 #endif 16654 16655 #ifdef RIPPER 16656 #ifdef RIPPER_DEBUG 16657 extern int rb_is_pointer_to_heap(VALUE); 16658 16659 /* :nodoc: */ 16660 static VALUE 16661 ripper_validate_object(VALUE self, VALUE x) 16662 { 16663 if (x == Qfalse) return x; 16664 if (x == Qtrue) return x; 16665 if (x == Qnil) return x; 16666 if (x == Qundef) 16667 rb_raise(rb_eArgError, "Qundef given"); 16668 if (FIXNUM_P(x)) return x; 16669 if (SYMBOL_P(x)) return x; 16670 if (!rb_is_pointer_to_heap(x)) 16671 rb_raise(rb_eArgError, "invalid pointer: %p", x); 16672 switch (TYPE(x)) { 16673 case T_STRING: 16674 case T_OBJECT: 16675 case T_ARRAY: 16676 case T_BIGNUM: 16677 case T_FLOAT: 16678 return x; 16679 case T_NODE: 16680 if (nd_type(x) != NODE_LASGN) { 16681 rb_raise(rb_eArgError, "NODE given: %p", x); 16682 } 16683 return ((NODE *)x)->nd_rval; 16684 default: 16685 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 16686 x, rb_obj_classname(x)); 16687 } 16688 return x; 16689 } 16690 #endif 16691 16692 #define validate(x) ((x) = get_value(x)) 16693 16694 static VALUE 16695 ripper_dispatch0(struct parser_params *parser, ID mid) 16696 { 16697 return rb_funcall(parser->value, mid, 0); 16698 } 16699 16700 static VALUE 16701 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 16702 { 16703 validate(a); 16704 return rb_funcall(parser->value, mid, 1, a); 16705 } 16706 16707 static VALUE 16708 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 16709 { 16710 validate(a); 16711 validate(b); 16712 return rb_funcall(parser->value, mid, 2, a, b); 16713 } 16714 16715 static VALUE 16716 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 16717 { 16718 validate(a); 16719 validate(b); 16720 validate(c); 16721 return rb_funcall(parser->value, mid, 3, a, b, c); 16722 } 16723 16724 static VALUE 16725 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 16726 { 16727 validate(a); 16728 validate(b); 16729 validate(c); 16730 validate(d); 16731 return rb_funcall(parser->value, mid, 4, a, b, c, d); 16732 } 16733 16734 static VALUE 16735 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 16736 { 16737 validate(a); 16738 validate(b); 16739 validate(c); 16740 validate(d); 16741 validate(e); 16742 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 16743 } 16744 16745 static const struct kw_assoc { 16746 ID id; 16747 const char *name; 16748 } keyword_to_name[] = { 16749 {keyword_class, "class"}, 16750 {keyword_module, "module"}, 16751 {keyword_def, "def"}, 16752 {keyword_undef, "undef"}, 16753 {keyword_begin, "begin"}, 16754 {keyword_rescue, "rescue"}, 16755 {keyword_ensure, "ensure"}, 16756 {keyword_end, "end"}, 16757 {keyword_if, "if"}, 16758 {keyword_unless, "unless"}, 16759 {keyword_then, "then"}, 16760 {keyword_elsif, "elsif"}, 16761 {keyword_else, "else"}, 16762 {keyword_case, "case"}, 16763 {keyword_when, "when"}, 16764 {keyword_while, "while"}, 16765 {keyword_until, "until"}, 16766 {keyword_for, "for"}, 16767 {keyword_break, "break"}, 16768 {keyword_next, "next"}, 16769 {keyword_redo, "redo"}, 16770 {keyword_retry, "retry"}, 16771 {keyword_in, "in"}, 16772 {keyword_do, "do"}, 16773 {keyword_do_cond, "do"}, 16774 {keyword_do_block, "do"}, 16775 {keyword_return, "return"}, 16776 {keyword_yield, "yield"}, 16777 {keyword_super, "super"}, 16778 {keyword_self, "self"}, 16779 {keyword_nil, "nil"}, 16780 {keyword_true, "true"}, 16781 {keyword_false, "false"}, 16782 {keyword_and, "and"}, 16783 {keyword_or, "or"}, 16784 {keyword_not, "not"}, 16785 {modifier_if, "if"}, 16786 {modifier_unless, "unless"}, 16787 {modifier_while, "while"}, 16788 {modifier_until, "until"}, 16789 {modifier_rescue, "rescue"}, 16790 {keyword_alias, "alias"}, 16791 {keyword_defined, "defined?"}, 16792 {keyword_BEGIN, "BEGIN"}, 16793 {keyword_END, "END"}, 16794 {keyword__LINE__, "__LINE__"}, 16795 {keyword__FILE__, "__FILE__"}, 16796 {keyword__ENCODING__, "__ENCODING__"}, 16797 {0, NULL} 16798 }; 16799 16800 static const char* 16801 keyword_id_to_str(ID id) 16802 { 16803 const struct kw_assoc *a; 16804 16805 for (a = keyword_to_name; a->id; a++) { 16806 if (a->id == id) 16807 return a->name; 16808 } 16809 return NULL; 16810 } 16811 16812 #undef ripper_id2sym 16813 static VALUE 16814 ripper_id2sym(ID id) 16815 { 16816 const char *name; 16817 char buf[8]; 16818 16819 if (id <= 256) { 16820 buf[0] = (char)id; 16821 buf[1] = '\0'; 16822 return ID2SYM(rb_intern2(buf, 1)); 16823 } 16824 if ((name = keyword_id_to_str(id))) { 16825 return ID2SYM(rb_intern(name)); 16826 } 16827 switch (id) { 16828 case tOROP: 16829 name = "||"; 16830 break; 16831 case tANDOP: 16832 name = "&&"; 16833 break; 16834 default: 16835 name = rb_id2name(id); 16836 if (!name) { 16837 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 16838 } 16839 return ID2SYM(id); 16840 } 16841 return ID2SYM(rb_intern(name)); 16842 } 16843 16844 static ID 16845 ripper_get_id(VALUE v) 16846 { 16847 NODE *nd; 16848 if (!RB_TYPE_P(v, T_NODE)) return 0; 16849 nd = (NODE *)v; 16850 if (nd_type(nd) != NODE_LASGN) return 0; 16851 return nd->nd_vid; 16852 } 16853 16854 static VALUE 16855 ripper_get_value(VALUE v) 16856 { 16857 NODE *nd; 16858 if (v == Qundef) return Qnil; 16859 if (!RB_TYPE_P(v, T_NODE)) return v; 16860 nd = (NODE *)v; 16861 if (nd_type(nd) != NODE_LASGN) return Qnil; 16862 return nd->nd_rval; 16863 } 16864 16865 static void 16866 ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 16867 { 16868 VALUE str; 16869 va_list args; 16870 16871 va_start(args, fmt); 16872 str = rb_vsprintf(fmt, args); 16873 va_end(args); 16874 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 16875 } 16876 16877 static void 16878 ripper_warn0(struct parser_params *parser, const char *fmt) 16879 { 16880 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 16881 } 16882 16883 static void 16884 ripper_warnI(struct parser_params *parser, const char *fmt, int a) 16885 { 16886 rb_funcall(parser->value, rb_intern("warn"), 2, 16887 STR_NEW2(fmt), INT2NUM(a)); 16888 } 16889 16890 #if 0 16891 static void 16892 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 16893 { 16894 rb_funcall(parser->value, rb_intern("warn"), 2, 16895 STR_NEW2(fmt), STR_NEW2(str)); 16896 } 16897 #endif 16898 16899 static void 16900 ripper_warning0(struct parser_params *parser, const char *fmt) 16901 { 16902 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 16903 } 16904 16905 static void 16906 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 16907 { 16908 rb_funcall(parser->value, rb_intern("warning"), 2, 16909 STR_NEW2(fmt), STR_NEW2(str)); 16910 } 16911 16912 static VALUE 16913 ripper_lex_get_generic(struct parser_params *parser, VALUE src) 16914 { 16915 return rb_funcall(src, ripper_id_gets, 0); 16916 } 16917 16918 static VALUE 16919 ripper_s_allocate(VALUE klass) 16920 { 16921 struct parser_params *p; 16922 VALUE self; 16923 16924 p = ALLOC_N(struct parser_params, 1); 16925 MEMZERO(p, struct parser_params, 1); 16926 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 16927 p->value = self; 16928 return self; 16929 } 16930 16931 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 16932 16933 /* 16934 * call-seq: 16935 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 16936 * 16937 * Create a new Ripper object. 16938 * _src_ must be a String, an IO, or an Object which has #gets method. 16939 * 16940 * This method does not starts parsing. 16941 * See also Ripper#parse and Ripper.parse. 16942 */ 16943 static VALUE 16944 ripper_initialize(int argc, VALUE *argv, VALUE self) 16945 { 16946 struct parser_params *parser; 16947 VALUE src, fname, lineno; 16948 16949 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 16950 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 16951 if (rb_obj_respond_to(src, ripper_id_gets, 0)) { 16952 parser->parser_lex_gets = ripper_lex_get_generic; 16953 } 16954 else { 16955 StringValue(src); 16956 parser->parser_lex_gets = lex_get_str; 16957 } 16958 parser->parser_lex_input = src; 16959 parser->eofp = Qfalse; 16960 if (NIL_P(fname)) { 16961 fname = STR_NEW2("(ripper)"); 16962 } 16963 else { 16964 StringValue(fname); 16965 } 16966 parser_initialize(parser); 16967 16968 parser->parser_ruby_sourcefile_string = fname; 16969 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 16970 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 16971 16972 return Qnil; 16973 } 16974 16975 struct ripper_args { 16976 struct parser_params *parser; 16977 int argc; 16978 VALUE *argv; 16979 }; 16980 16981 static VALUE 16982 ripper_parse0(VALUE parser_v) 16983 { 16984 struct parser_params *parser; 16985 16986 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16987 parser_prepare(parser); 16988 ripper_yyparse((void*)parser); 16989 return parser->result; 16990 } 16991 16992 static VALUE 16993 ripper_ensure(VALUE parser_v) 16994 { 16995 struct parser_params *parser; 16996 16997 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 16998 parser->parsing_thread = Qnil; 16999 return Qnil; 17000 } 17001 17002 /* 17003 * call-seq: 17004 * ripper#parse 17005 * 17006 * Start parsing and returns the value of the root action. 17007 */ 17008 static VALUE 17009 ripper_parse(VALUE self) 17010 { 17011 struct parser_params *parser; 17012 17013 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17014 if (!ripper_initialized_p(parser)) { 17015 rb_raise(rb_eArgError, "method called for uninitialized object"); 17016 } 17017 if (!NIL_P(parser->parsing_thread)) { 17018 if (parser->parsing_thread == rb_thread_current()) 17019 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 17020 else 17021 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 17022 } 17023 parser->parsing_thread = rb_thread_current(); 17024 rb_ensure(ripper_parse0, self, ripper_ensure, self); 17025 17026 return parser->result; 17027 } 17028 17029 /* 17030 * call-seq: 17031 * ripper#column -> Integer 17032 * 17033 * Return column number of current parsing line. 17034 * This number starts from 0. 17035 */ 17036 static VALUE 17037 ripper_column(VALUE self) 17038 { 17039 struct parser_params *parser; 17040 long col; 17041 17042 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17043 if (!ripper_initialized_p(parser)) { 17044 rb_raise(rb_eArgError, "method called for uninitialized object"); 17045 } 17046 if (NIL_P(parser->parsing_thread)) return Qnil; 17047 col = parser->tokp - parser->parser_lex_pbeg; 17048 return LONG2NUM(col); 17049 } 17050 17051 /* 17052 * call-seq: 17053 * ripper#filename -> String 17054 * 17055 * Return current parsing filename. 17056 */ 17057 static VALUE 17058 ripper_filename(VALUE self) 17059 { 17060 struct parser_params *parser; 17061 17062 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17063 if (!ripper_initialized_p(parser)) { 17064 rb_raise(rb_eArgError, "method called for uninitialized object"); 17065 } 17066 return parser->parser_ruby_sourcefile_string; 17067 } 17068 17069 /* 17070 * call-seq: 17071 * ripper#lineno -> Integer 17072 * 17073 * Return line number of current parsing line. 17074 * This number starts from 1. 17075 */ 17076 static VALUE 17077 ripper_lineno(VALUE self) 17078 { 17079 struct parser_params *parser; 17080 17081 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17082 if (!ripper_initialized_p(parser)) { 17083 rb_raise(rb_eArgError, "method called for uninitialized object"); 17084 } 17085 if (NIL_P(parser->parsing_thread)) return Qnil; 17086 return INT2NUM(parser->parser_ruby_sourceline); 17087 } 17088 17089 #ifdef RIPPER_DEBUG 17090 /* :nodoc: */ 17091 static VALUE 17092 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 17093 { 17094 StringValue(msg); 17095 if (obj == Qundef) { 17096 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 17097 } 17098 return Qnil; 17099 } 17100 17101 /* :nodoc: */ 17102 static VALUE 17103 ripper_value(VALUE self, VALUE obj) 17104 { 17105 return ULONG2NUM(obj); 17106 } 17107 #endif 17108 17109 17110 void 17111 InitVM_ripper(void) 17112 { 17113 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 17114 } 17115 17116 void 17117 Init_ripper(void) 17118 { 17119 VALUE Ripper; 17120 17121 InitVM(ripper); 17122 Ripper = rb_define_class("Ripper", rb_cObject); 17123 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 17124 rb_define_alloc_func(Ripper, ripper_s_allocate); 17125 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 17126 rb_define_method(Ripper, "parse", ripper_parse, 0); 17127 rb_define_method(Ripper, "column", ripper_column, 0); 17128 rb_define_method(Ripper, "filename", ripper_filename, 0); 17129 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 17130 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 17131 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 17132 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 17133 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 17134 #ifdef RIPPER_DEBUG 17135 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 17136 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 17137 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 17138 #endif 17139 17140 ripper_id_gets = rb_intern("gets"); 17141 ripper_init_eventids1(Ripper); 17142 ripper_init_eventids2(Ripper); 17143 /* ensure existing in symbol table */ 17144 (void)rb_intern("||"); 17145 (void)rb_intern("&&"); 17146 17147 # if 0 17148 /* Hack to let RDoc document SCRIPT_LINES__ */ 17149 17150 /* 17151 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 17152 * after the assignment will be added as an Array of lines with the file 17153 * name as the key. 17154 */ 17155 rb_define_global_const("SCRIPT_LINES__", Qnil); 17156 #endif 17157 17158 } 17159 #endif /* RIPPER */ 17160 17161
1.7.3