1/* A Bison parser, made by GNU Bison 2.5. */ 2 3/* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20/* As a special exception, you may create a larger work that contains 21 part or all of the Bison parser skeleton and distribute that work 22 under terms of your choice, so long as that work isn't itself a 23 parser generator using the skeleton or a modified version thereof 24 as a parser skeleton. Alternatively, if you modify or redistribute 25 the parser skeleton itself, you may (at your option) remove this 26 special exception, which will cause the skeleton and the resulting 27 Bison output files to be licensed under the GNU General Public 28 License without this special exception. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33/* Apple Note: For the avoidance of doubt, Apple elects to distribute this file under the terms of the BSD license. */ 34 35/* C LALR(1) parser skeleton written by Richard Stallman, by 36 simplifying the original so-called "semantic" parser. */ 37 38/* All symbols defined below should begin with yy or YY, to avoid 39 infringing on user name space. This should be done even for local 40 variables, as they might otherwise be expanded by user macros. 41 There are some unavoidable exceptions within include files to 42 define necessary library symbols; they are noted "INFRINGES ON 43 USER NAME SPACE" below. */ 44 45/* Identify Bison output. */ 46#define YYBISON 1 47 48/* Bison version. */ 49#define YYBISON_VERSION "2.5" 50 51/* Skeleton name. */ 52#define YYSKELETON_NAME "yacc.c" 53 54/* Pure parsers. */ 55#define YYPURE 1 56 57/* Push parsers. */ 58#define YYPUSH 0 59 60/* Pull parsers. */ 61#define YYPULL 1 62 63/* Using locations. */ 64#define YYLSP_NEEDED 0 65 66 67 68/* Copy the first part of user declarations. */ 69 70/* Line 268 of yacc.c */ 71#line 12 "ripper.y" 72 73 74#ifndef PARSER_DEBUG 75#define PARSER_DEBUG 0 76#endif 77#define YYDEBUG 1 78#define YYERROR_VERBOSE 1 79#define YYSTACK_USE_ALLOCA 0 80 81#include "ruby/ruby.h" 82#include "ruby/st.h" 83#include "ruby/encoding.h" 84#include "internal.h" 85#include "node.h" 86#include "parse.h" 87#include "id.h" 88#include "regenc.h" 89#include <stdio.h> 90#include <errno.h> 91#include <ctype.h> 92#include "probes.h" 93 94#define numberof(array) (int)(sizeof(array) / sizeof((array)[0])) 95 96#define YYMALLOC(size) rb_parser_malloc(parser, (size)) 97#define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size)) 98#define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size)) 99#define YYFREE(ptr) rb_parser_free(parser, (ptr)) 100#define malloc YYMALLOC 101#define realloc YYREALLOC 102#define calloc YYCALLOC 103#define free YYFREE 104 105#ifndef RIPPER 106static ID register_symid(ID, const char *, long, rb_encoding *); 107static ID register_symid_str(ID, VALUE); 108#define REGISTER_SYMID(id, name) register_symid((id), (name), strlen(name), enc) 109#include "id.c" 110#endif 111 112#define is_notop_id(id) ((id)>tLAST_OP_ID) 113#define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL) 114#define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL) 115#define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE) 116#define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET) 117#define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST) 118#define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS) 119#define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK) 120#define id_type(id) (is_notop_id(id) ? (int)((id)&ID_SCOPE_MASK) : -1) 121 122#define is_asgn_or_id(id) ((is_notop_id(id)) && \ 123 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \ 124 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \ 125 ((id)&ID_SCOPE_MASK) == ID_CLASS)) 126 127enum lex_state_bits { 128 EXPR_BEG_bit, /* ignore newline, +/- is a sign. */ 129 EXPR_END_bit, /* newline significant, +/- is an operator. */ 130 EXPR_ENDARG_bit, /* ditto, and unbound braces. */ 131 EXPR_ENDFN_bit, /* ditto, and unbound braces. */ 132 EXPR_ARG_bit, /* newline significant, +/- is an operator. */ 133 EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */ 134 EXPR_MID_bit, /* newline significant, +/- is an operator. */ 135 EXPR_FNAME_bit, /* ignore newline, no reserved words. */ 136 EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */ 137 EXPR_CLASS_bit, /* immediate after `class', no here document. */ 138 EXPR_VALUE_bit, /* alike EXPR_BEG but label is disallowed. */ 139 EXPR_MAX_STATE 140}; 141/* examine combinations */ 142enum lex_state_e { 143#define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit) 144 DEF_EXPR(BEG), 145 DEF_EXPR(END), 146 DEF_EXPR(ENDARG), 147 DEF_EXPR(ENDFN), 148 DEF_EXPR(ARG), 149 DEF_EXPR(CMDARG), 150 DEF_EXPR(MID), 151 DEF_EXPR(FNAME), 152 DEF_EXPR(DOT), 153 DEF_EXPR(CLASS), 154 DEF_EXPR(VALUE), 155 EXPR_BEG_ANY = (EXPR_BEG | EXPR_VALUE | EXPR_MID | EXPR_CLASS), 156 EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG), 157 EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN) 158}; 159#define IS_lex_state_for(x, ls) ((x) & (ls)) 160#define IS_lex_state(ls) IS_lex_state_for(lex_state, (ls)) 161 162#if PARSER_DEBUG 163static const char *lex_state_name(enum lex_state_e state); 164#endif 165 166typedef VALUE stack_type; 167 168# define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) 169# define BITSTACK_POP(stack) ((stack) = (stack) >> 1) 170# define BITSTACK_LEXPOP(stack) ((stack) = ((stack) >> 1) | ((stack) & 1)) 171# define BITSTACK_SET_P(stack) ((stack)&1) 172 173#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n)) 174#define COND_POP() BITSTACK_POP(cond_stack) 175#define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack) 176#define COND_P() BITSTACK_SET_P(cond_stack) 177 178#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n)) 179#define CMDARG_POP() BITSTACK_POP(cmdarg_stack) 180#define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack) 181#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack) 182 183struct vtable { 184 ID *tbl; 185 int pos; 186 int capa; 187 struct vtable *prev; 188}; 189 190struct local_vars { 191 struct vtable *args; 192 struct vtable *vars; 193 struct vtable *used; 194 struct local_vars *prev; 195 stack_type cmdargs; 196}; 197 198#define DVARS_INHERIT ((void*)1) 199#define DVARS_TOPSCOPE NULL 200#define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl)) 201#define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3) 202 203static int 204vtable_size(const struct vtable *tbl) 205{ 206 if (POINTER_P(tbl)) { 207 return tbl->pos; 208 } 209 else { 210 return 0; 211 } 212} 213 214#define VTBL_DEBUG 0 215 216static struct vtable * 217vtable_alloc(struct vtable *prev) 218{ 219 struct vtable *tbl = ALLOC(struct vtable); 220 tbl->pos = 0; 221 tbl->capa = 8; 222 tbl->tbl = ALLOC_N(ID, tbl->capa); 223 tbl->prev = prev; 224 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl); 225 return tbl; 226} 227 228static void 229vtable_free(struct vtable *tbl) 230{ 231 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl); 232 if (POINTER_P(tbl)) { 233 if (tbl->tbl) { 234 xfree(tbl->tbl); 235 } 236 xfree(tbl); 237 } 238} 239 240static void 241vtable_add(struct vtable *tbl, ID id) 242{ 243 if (!POINTER_P(tbl)) { 244 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl); 245 } 246 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id)); 247 248 if (tbl->pos == tbl->capa) { 249 tbl->capa = tbl->capa * 2; 250 REALLOC_N(tbl->tbl, ID, tbl->capa); 251 } 252 tbl->tbl[tbl->pos++] = id; 253} 254 255static int 256vtable_included(const struct vtable * tbl, ID id) 257{ 258 int i; 259 260 if (POINTER_P(tbl)) { 261 for (i = 0; i < tbl->pos; i++) { 262 if (tbl->tbl[i] == id) { 263 return i+1; 264 } 265 } 266 } 267 return 0; 268} 269 270 271#ifndef RIPPER 272typedef struct token_info { 273 const char *token; 274 int linenum; 275 int column; 276 int nonspc; 277 struct token_info *next; 278} token_info; 279#endif 280 281/* 282 Structure of Lexer Buffer: 283 284 lex_pbeg tokp lex_p lex_pend 285 | | | | 286 |-----------+--------------+------------| 287 |<------------>| 288 token 289*/ 290struct parser_params { 291 int is_ripper; 292 NODE *heap; 293 294 YYSTYPE *parser_yylval; 295 VALUE eofp; 296 297 NODE *parser_lex_strterm; 298 enum lex_state_e parser_lex_state; 299 stack_type parser_cond_stack; 300 stack_type parser_cmdarg_stack; 301 int parser_class_nest; 302 int parser_paren_nest; 303 int parser_lpar_beg; 304 int parser_in_single; 305 int parser_in_def; 306 int parser_brace_nest; 307 int parser_compile_for_eval; 308 VALUE parser_cur_mid; 309 int parser_in_defined; 310 char *parser_tokenbuf; 311 int parser_tokidx; 312 int parser_toksiz; 313 int parser_tokline; 314 VALUE parser_lex_input; 315 VALUE parser_lex_lastline; 316 VALUE parser_lex_nextline; 317 const char *parser_lex_pbeg; 318 const char *parser_lex_p; 319 const char *parser_lex_pend; 320 int parser_heredoc_end; 321 int parser_command_start; 322 NODE *parser_deferred_nodes; 323 long parser_lex_gets_ptr; 324 VALUE (*parser_lex_gets)(struct parser_params*,VALUE); 325 struct local_vars *parser_lvtbl; 326 int parser_ruby__end__seen; 327 int line_count; 328 int has_shebang; 329 char *parser_ruby_sourcefile; /* current source file */ 330 int parser_ruby_sourceline; /* current line no. */ 331 VALUE parser_ruby_sourcefile_string; 332 rb_encoding *enc; 333 334 int parser_yydebug; 335 336#ifndef RIPPER 337 /* Ruby core only */ 338 NODE *parser_eval_tree_begin; 339 NODE *parser_eval_tree; 340 VALUE debug_lines; 341 VALUE coverage; 342 int nerr; 343 344 int parser_token_info_enabled; 345 token_info *parser_token_info; 346#else 347 /* Ripper only */ 348 const char *tokp; 349 VALUE delayed; 350 int delayed_line; 351 int delayed_col; 352 353 VALUE value; 354 VALUE result; 355 VALUE parsing_thread; 356 int toplevel_p; 357#endif 358}; 359 360#define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc) 361#define STR_NEW0() rb_enc_str_new(0,0,current_enc) 362#define STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc) 363#define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),current_enc) 364#define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT) 365#define TOK_INTERN(mb) rb_intern3(tok(), toklen(), current_enc) 366 367static int parser_yyerror(struct parser_params*, const char*); 368#define yyerror(msg) parser_yyerror(parser, (msg)) 369 370#define lex_strterm (parser->parser_lex_strterm) 371#define lex_state (parser->parser_lex_state) 372#define cond_stack (parser->parser_cond_stack) 373#define cmdarg_stack (parser->parser_cmdarg_stack) 374#define class_nest (parser->parser_class_nest) 375#define paren_nest (parser->parser_paren_nest) 376#define lpar_beg (parser->parser_lpar_beg) 377#define brace_nest (parser->parser_brace_nest) 378#define in_single (parser->parser_in_single) 379#define in_def (parser->parser_in_def) 380#define compile_for_eval (parser->parser_compile_for_eval) 381#define cur_mid (parser->parser_cur_mid) 382#define in_defined (parser->parser_in_defined) 383#define tokenbuf (parser->parser_tokenbuf) 384#define tokidx (parser->parser_tokidx) 385#define toksiz (parser->parser_toksiz) 386#define tokline (parser->parser_tokline) 387#define lex_input (parser->parser_lex_input) 388#define lex_lastline (parser->parser_lex_lastline) 389#define lex_nextline (parser->parser_lex_nextline) 390#define lex_pbeg (parser->parser_lex_pbeg) 391#define lex_p (parser->parser_lex_p) 392#define lex_pend (parser->parser_lex_pend) 393#define heredoc_end (parser->parser_heredoc_end) 394#define command_start (parser->parser_command_start) 395#define deferred_nodes (parser->parser_deferred_nodes) 396#define lex_gets_ptr (parser->parser_lex_gets_ptr) 397#define lex_gets (parser->parser_lex_gets) 398#define lvtbl (parser->parser_lvtbl) 399#define ruby__end__seen (parser->parser_ruby__end__seen) 400#define ruby_sourceline (parser->parser_ruby_sourceline) 401#define ruby_sourcefile (parser->parser_ruby_sourcefile) 402#define ruby_sourcefile_string (parser->parser_ruby_sourcefile_string) 403#define current_enc (parser->enc) 404#define yydebug (parser->parser_yydebug) 405#ifdef RIPPER 406#else 407#define ruby_eval_tree (parser->parser_eval_tree) 408#define ruby_eval_tree_begin (parser->parser_eval_tree_begin) 409#define ruby_debug_lines (parser->debug_lines) 410#define ruby_coverage (parser->coverage) 411#endif 412 413#if YYPURE 414static int yylex(void*, void*); 415#else 416static int yylex(void*); 417#endif 418 419#ifndef RIPPER 420#define yyparse ruby_yyparse 421 422static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE); 423#define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3)) 424 425static NODE *cond_gen(struct parser_params*,NODE*); 426#define cond(node) cond_gen(parser, (node)) 427static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*); 428#define logop(type,node1,node2) logop_gen(parser, (type), (node1), (node2)) 429 430static NODE *newline_node(NODE*); 431static void fixpos(NODE*,NODE*); 432 433static int value_expr_gen(struct parser_params*,NODE*); 434static void void_expr_gen(struct parser_params*,NODE*); 435static NODE *remove_begin(NODE*); 436#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node)) 437#define void_expr0(node) void_expr_gen(parser, (node)) 438#define void_expr(node) void_expr0((node) = remove_begin(node)) 439static void void_stmts_gen(struct parser_params*,NODE*); 440#define void_stmts(node) void_stmts_gen(parser, (node)) 441static void reduce_nodes_gen(struct parser_params*,NODE**); 442#define reduce_nodes(n) reduce_nodes_gen(parser,(n)) 443static void block_dup_check_gen(struct parser_params*,NODE*,NODE*); 444#define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2)) 445 446static NODE *block_append_gen(struct parser_params*,NODE*,NODE*); 447#define block_append(h,t) block_append_gen(parser,(h),(t)) 448static NODE *list_append_gen(struct parser_params*,NODE*,NODE*); 449#define list_append(l,i) list_append_gen(parser,(l),(i)) 450static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*); 451#define list_concat(h,t) list_concat_gen(parser,(h),(t)) 452static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*); 453#define arg_append(h,t) arg_append_gen(parser,(h),(t)) 454static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*); 455#define arg_concat(h,t) arg_concat_gen(parser,(h),(t)) 456static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*); 457#define literal_concat(h,t) literal_concat_gen(parser,(h),(t)) 458static int literal_concat0(struct parser_params *, VALUE, VALUE); 459static NODE *new_evstr_gen(struct parser_params*,NODE*); 460#define new_evstr(n) new_evstr_gen(parser,(n)) 461static NODE *evstr2dstr_gen(struct parser_params*,NODE*); 462#define evstr2dstr(n) evstr2dstr_gen(parser,(n)) 463static NODE *splat_array(NODE*); 464 465static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*); 466#define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, (recv),(id),(arg1)) 467static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID); 468#define call_uni_op(recv,id) call_uni_op_gen(parser, (recv),(id)) 469 470static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*); 471#define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 472static NODE *new_args_tail_gen(struct parser_params*,NODE*,ID,ID); 473#define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 474 475static NODE *negate_lit(NODE*); 476static NODE *ret_args_gen(struct parser_params*,NODE*); 477#define ret_args(node) ret_args_gen(parser, (node)) 478static NODE *arg_blk_pass(NODE*,NODE*); 479static NODE *new_yield_gen(struct parser_params*,NODE*); 480#define new_yield(node) new_yield_gen(parser, (node)) 481static NODE *dsym_node_gen(struct parser_params*,NODE*); 482#define dsym_node(node) dsym_node_gen(parser, (node)) 483 484static NODE *gettable_gen(struct parser_params*,ID); 485#define gettable(id) gettable_gen(parser,(id)) 486static NODE *assignable_gen(struct parser_params*,ID,NODE*); 487#define assignable(id,node) assignable_gen(parser, (id), (node)) 488 489static NODE *aryset_gen(struct parser_params*,NODE*,NODE*); 490#define aryset(node1,node2) aryset_gen(parser, (node1), (node2)) 491static NODE *attrset_gen(struct parser_params*,NODE*,ID); 492#define attrset(node,id) attrset_gen(parser, (node), (id)) 493 494static void rb_backref_error_gen(struct parser_params*,NODE*); 495#define rb_backref_error(n) rb_backref_error_gen(parser,(n)) 496static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*); 497#define node_assign(node1, node2) node_assign_gen(parser, (node1), (node2)) 498 499static NODE *new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 500static NODE *new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs); 501#define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (attr), (op), (rhs)) 502static NODE *new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs); 503#define new_const_op_assign(lhs, op, rhs) new_const_op_assign_gen(parser, (lhs), (op), (rhs)) 504 505static NODE *match_op_gen(struct parser_params*,NODE*,NODE*); 506#define match_op(node1,node2) match_op_gen(parser, (node1), (node2)) 507 508static ID *local_tbl_gen(struct parser_params*); 509#define local_tbl() local_tbl_gen(parser) 510 511static void fixup_nodes(NODE **); 512 513static VALUE reg_compile_gen(struct parser_params*, VALUE, int); 514#define reg_compile(str,options) reg_compile_gen(parser, (str), (options)) 515static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int); 516#define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options)) 517static int reg_fragment_check_gen(struct parser_params*, VALUE, int); 518#define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options)) 519static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match); 520#define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,(regexp),(match)) 521 522#define get_id(id) (id) 523#define get_value(val) (val) 524#else 525#define value_expr(node) ((void)(node)) 526#define remove_begin(node) (node) 527#define rb_dvar_defined(id) 0 528#define rb_local_defined(id) 0 529static ID ripper_get_id(VALUE); 530#define get_id(id) ripper_get_id(id) 531static VALUE ripper_get_value(VALUE); 532#define get_value(val) ripper_get_value(val) 533static VALUE assignable_gen(struct parser_params*,VALUE); 534#define assignable(lhs,node) assignable_gen(parser, (lhs)) 535static int id_is_var_gen(struct parser_params *parser, ID id); 536#define id_is_var(id) id_is_var_gen(parser, (id)) 537 538#define node_assign(node1, node2) dispatch2(assign, (node1), (node2)) 539 540static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs); 541static VALUE new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs); 542#define new_attr_op_assign(lhs, type, attr, op, rhs) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs)) 543 544#endif /* !RIPPER */ 545 546#define new_op_assign(lhs, op, rhs) new_op_assign_gen(parser, (lhs), (op), (rhs)) 547 548static ID formal_argument_gen(struct parser_params*, ID); 549#define formal_argument(id) formal_argument_gen(parser, (id)) 550static ID shadowing_lvar_gen(struct parser_params*,ID); 551#define shadowing_lvar(name) shadowing_lvar_gen(parser, (name)) 552static void new_bv_gen(struct parser_params*,ID); 553#define new_bv(id) new_bv_gen(parser, (id)) 554 555static void local_push_gen(struct parser_params*,int); 556#define local_push(top) local_push_gen(parser,(top)) 557static void local_pop_gen(struct parser_params*); 558#define local_pop() local_pop_gen(parser) 559static int local_var_gen(struct parser_params*, ID); 560#define local_var(id) local_var_gen(parser, (id)) 561static int arg_var_gen(struct parser_params*, ID); 562#define arg_var(id) arg_var_gen(parser, (id)) 563static int local_id_gen(struct parser_params*, ID); 564#define local_id(id) local_id_gen(parser, (id)) 565static ID internal_id_gen(struct parser_params*); 566#define internal_id() internal_id_gen(parser) 567 568static const struct vtable *dyna_push_gen(struct parser_params *); 569#define dyna_push() dyna_push_gen(parser) 570static void dyna_pop_gen(struct parser_params*, const struct vtable *); 571#define dyna_pop(node) dyna_pop_gen(parser, (node)) 572static int dyna_in_block_gen(struct parser_params*); 573#define dyna_in_block() dyna_in_block_gen(parser) 574#define dyna_var(id) local_var(id) 575static int dvar_defined_gen(struct parser_params*,ID,int); 576#define dvar_defined(id) dvar_defined_gen(parser, (id), 0) 577#define dvar_defined_get(id) dvar_defined_gen(parser, (id), 1) 578static int dvar_curr_gen(struct parser_params*,ID); 579#define dvar_curr(id) dvar_curr_gen(parser, (id)) 580 581static int lvar_defined_gen(struct parser_params*, ID); 582#define lvar_defined(id) lvar_defined_gen(parser, (id)) 583 584#define RE_OPTION_ONCE (1<<16) 585#define RE_OPTION_ENCODING_SHIFT 8 586#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT) 587#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff) 588#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE) 589#define RE_OPTION_MASK 0xff 590#define RE_OPTION_ARG_ENCODING_NONE 32 591 592#define NODE_STRTERM NODE_ZARRAY /* nothing to gc */ 593#define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */ 594#define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1)) 595#define nd_func u1.id 596#if SIZEOF_SHORT == 2 597#define nd_term(node) ((signed short)(node)->u2.id) 598#else 599#define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2) 600#endif 601#define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2) 602#define nd_nest u3.cnt 603 604/****** Ripper *******/ 605 606#ifdef RIPPER 607#define RIPPER_VERSION "0.1.0" 608 609#include "eventids1.c" 610#include "eventids2.c" 611 612static VALUE ripper_dispatch0(struct parser_params*,ID); 613static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE); 614static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE); 615static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE); 616static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE); 617static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE); 618static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE); 619 620#define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n)) 621#define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a)) 622#define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b)) 623#define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c)) 624#define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d)) 625#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e)) 626#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e), (f), (g)) 627 628#define yyparse ripper_yyparse 629 630#define ripper_intern(s) ID2SYM(rb_intern(s)) 631static VALUE ripper_id2sym(ID); 632#ifdef __GNUC__ 633#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \ 634 ID2SYM(id) : ripper_id2sym(id)) 635#endif 636 637#define arg_new() dispatch0(args_new) 638#define arg_add(l,a) dispatch2(args_add, (l), (a)) 639#define arg_add_star(l,a) dispatch2(args_add_star, (l), (a)) 640#define arg_add_block(l,b) dispatch2(args_add_block, (l), (b)) 641#define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b))) 642#define bare_assoc(v) dispatch1(bare_assoc_hash, (v)) 643#define arg_add_assocs(l,b) arg_add((l), bare_assoc(b)) 644 645#define args2mrhs(a) dispatch1(mrhs_new_from_args, (a)) 646#define mrhs_new() dispatch0(mrhs_new) 647#define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a)) 648#define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a)) 649 650#define mlhs_new() dispatch0(mlhs_new) 651#define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a)) 652#define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a)) 653 654#define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \ 655 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk)) 656 657#define blockvar_new(p,v) dispatch2(block_var, (p), (v)) 658#define blockvar_add_star(l,a) dispatch2(block_var_add_star, (l), (a)) 659#define blockvar_add_block(l,a) dispatch2(block_var_add_block, (l), (a)) 660 661#define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a))) 662#define method_arg(m,a) dispatch2(method_add_arg,(m),(a)) 663#define method_add_block(m,b) dispatch2(method_add_block, (m), (b)) 664 665#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x)) 666 667static inline VALUE 668new_args_gen(struct parser_params *parser, VALUE f, VALUE o, VALUE r, VALUE p, VALUE tail) 669{ 670 NODE *t = (NODE *)tail; 671 VALUE k = t->u1.value, kr = t->u2.value, b = t->u3.value; 672 return params_new(f, o, r, p, k, kr, escape_Qundef(b)); 673} 674#define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t)) 675 676static inline VALUE 677new_args_tail_gen(struct parser_params *parser, VALUE k, VALUE kr, VALUE b) 678{ 679 return (VALUE)rb_node_newnode(NODE_MEMO, k, kr, b); 680} 681#define new_args_tail(k,kr,b) new_args_tail_gen(parser, (k),(kr),(b)) 682 683#define FIXME 0 684 685#endif /* RIPPER */ 686 687#ifndef RIPPER 688# define Qnone 0 689# define ifndef_ripper(x) (x) 690#else 691# define Qnone Qnil 692# define ifndef_ripper(x) 693#endif 694 695#ifndef RIPPER 696# define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt)) 697# define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 698# define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 699# define rb_warn4S(file,line,fmt,a) rb_compile_warn((file), (line), (fmt), (a)) 700# define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt)) 701# define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, (fmt), (a)) 702#else 703# define rb_warn0(fmt) ripper_warn0(parser, (fmt)) 704# define rb_warnI(fmt,a) ripper_warnI(parser, (fmt), (a)) 705# define rb_warnS(fmt,a) ripper_warnS(parser, (fmt), (a)) 706# define rb_warn4S(file,line,fmt,a) ripper_warnS(parser, (fmt), (a)) 707# define rb_warning0(fmt) ripper_warning0(parser, (fmt)) 708# define rb_warningS(fmt,a) ripper_warningS(parser, (fmt), (a)) 709static void ripper_warn0(struct parser_params*, const char*); 710static void ripper_warnI(struct parser_params*, const char*, int); 711static void ripper_warnS(struct parser_params*, const char*, const char*); 712static void ripper_warning0(struct parser_params*, const char*); 713static void ripper_warningS(struct parser_params*, const char*, const char*); 714#endif 715 716#ifdef RIPPER 717static void ripper_compile_error(struct parser_params*, const char *fmt, ...); 718# define rb_compile_error ripper_compile_error 719# define compile_error ripper_compile_error 720# define PARSER_ARG parser, 721#else 722# define rb_compile_error rb_compile_error_with_enc 723# define compile_error parser->nerr++,rb_compile_error_with_enc 724# define PARSER_ARG ruby_sourcefile, ruby_sourceline, current_enc, 725#endif 726 727/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150, 728 for instance). This is too low for Ruby to parse some files, such as 729 date/format.rb, therefore bump the value up to at least Bison's default. */ 730#ifdef OLD_YACC 731#ifndef YYMAXDEPTH 732#define YYMAXDEPTH 10000 733#endif 734#endif 735 736#ifndef RIPPER 737static void token_info_push(struct parser_params*, const char *token); 738static void token_info_pop(struct parser_params*, const char *token); 739#define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, (token)) : (void)0) 740#define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, (token)) : (void)0) 741#else 742#define token_info_push(token) /* nothing */ 743#define token_info_pop(token) /* nothing */ 744#endif 745 746 747/* Line 268 of yacc.c */ 748#line 747 "parse.c" 749 750/* Enabling traces. */ 751#ifndef YYDEBUG 752# define YYDEBUG 1 753#endif 754 755/* Enabling verbose error messages. */ 756#ifdef YYERROR_VERBOSE 757# undef YYERROR_VERBOSE 758# define YYERROR_VERBOSE 1 759#else 760# define YYERROR_VERBOSE 0 761#endif 762 763/* Enabling the token table. */ 764#ifndef YYTOKEN_TABLE 765# define YYTOKEN_TABLE 0 766#endif 767 768 769/* Tokens. */ 770#ifndef YYTOKENTYPE 771# define YYTOKENTYPE 772 /* Put the tokens into the symbol table, so that GDB and other debuggers 773 know about them. */ 774 enum yytokentype { 775 END_OF_INPUT = 0, 776 keyword_class = 258, 777 keyword_module = 259, 778 keyword_def = 260, 779 keyword_undef = 261, 780 keyword_begin = 262, 781 keyword_rescue = 263, 782 keyword_ensure = 264, 783 keyword_end = 265, 784 keyword_if = 266, 785 keyword_unless = 267, 786 keyword_then = 268, 787 keyword_elsif = 269, 788 keyword_else = 270, 789 keyword_case = 271, 790 keyword_when = 272, 791 keyword_while = 273, 792 keyword_until = 274, 793 keyword_for = 275, 794 keyword_break = 276, 795 keyword_next = 277, 796 keyword_redo = 278, 797 keyword_retry = 279, 798 keyword_in = 280, 799 keyword_do = 281, 800 keyword_do_cond = 282, 801 keyword_do_block = 283, 802 keyword_do_LAMBDA = 284, 803 keyword_return = 285, 804 keyword_yield = 286, 805 keyword_super = 287, 806 keyword_self = 288, 807 keyword_nil = 289, 808 keyword_true = 290, 809 keyword_false = 291, 810 keyword_and = 292, 811 keyword_or = 293, 812 keyword_not = 294, 813 modifier_if = 295, 814 modifier_unless = 296, 815 modifier_while = 297, 816 modifier_until = 298, 817 modifier_rescue = 299, 818 keyword_alias = 300, 819 keyword_defined = 301, 820 keyword_BEGIN = 302, 821 keyword_END = 303, 822 keyword__LINE__ = 304, 823 keyword__FILE__ = 305, 824 keyword__ENCODING__ = 306, 825 tIDENTIFIER = 307, 826 tFID = 308, 827 tGVAR = 309, 828 tIVAR = 310, 829 tCONSTANT = 311, 830 tCVAR = 312, 831 tLABEL = 313, 832 tINTEGER = 314, 833 tFLOAT = 315, 834 tSTRING_CONTENT = 316, 835 tCHAR = 317, 836 tNTH_REF = 318, 837 tBACK_REF = 319, 838 tREGEXP_END = 320, 839 tUPLUS = 130, 840 tUMINUS = 131, 841 tPOW = 132, 842 tCMP = 134, 843 tEQ = 139, 844 tEQQ = 140, 845 tNEQ = 141, 846 tGEQ = 138, 847 tLEQ = 137, 848 tANDOP = 321, 849 tOROP = 322, 850 tMATCH = 142, 851 tNMATCH = 143, 852 tDOT2 = 128, 853 tDOT3 = 129, 854 tAREF = 144, 855 tASET = 145, 856 tLSHFT = 135, 857 tRSHFT = 136, 858 tCOLON2 = 323, 859 tCOLON3 = 324, 860 tOP_ASGN = 325, 861 tASSOC = 326, 862 tLPAREN = 327, 863 tLPAREN_ARG = 328, 864 tRPAREN = 329, 865 tLBRACK = 330, 866 tLBRACE = 331, 867 tLBRACE_ARG = 332, 868 tSTAR = 333, 869 tDSTAR = 334, 870 tAMPER = 335, 871 tLAMBDA = 336, 872 tSYMBEG = 337, 873 tSTRING_BEG = 338, 874 tXSTRING_BEG = 339, 875 tREGEXP_BEG = 340, 876 tWORDS_BEG = 341, 877 tQWORDS_BEG = 342, 878 tSYMBOLS_BEG = 343, 879 tQSYMBOLS_BEG = 344, 880 tSTRING_DBEG = 345, 881 tSTRING_DEND = 346, 882 tSTRING_DVAR = 347, 883 tSTRING_END = 348, 884 tLAMBEG = 349, 885 tLOWEST = 350, 886 tUMINUS_NUM = 351, 887 tLAST_TOKEN = 352 888 }; 889#endif 890 891 892 893#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 894typedef union YYSTYPE 895{ 896 897/* Line 293 of yacc.c */ 898#line 691 "ripper.y" 899 900 VALUE val; 901 NODE *node; 902 ID id; 903 int num; 904 const struct vtable *vars; 905 906 907 908/* Line 293 of yacc.c */ 909#line 908 "parse.c" 910} YYSTYPE; 911# define YYSTYPE_IS_TRIVIAL 1 912# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 913# define YYSTYPE_IS_DECLARED 1 914#endif 915 916 917/* Copy the second part of user declarations. */ 918 919 920/* Line 343 of yacc.c */ 921#line 920 "parse.c" 922 923#ifdef short 924# undef short 925#endif 926 927#ifdef YYTYPE_UINT8 928typedef YYTYPE_UINT8 yytype_uint8; 929#else 930typedef unsigned char yytype_uint8; 931#endif 932 933#ifdef YYTYPE_INT8 934typedef YYTYPE_INT8 yytype_int8; 935#elif (defined __STDC__ || defined __C99__FUNC__ \ 936 || defined __cplusplus || defined _MSC_VER) 937typedef signed char yytype_int8; 938#else 939typedef short int yytype_int8; 940#endif 941 942#ifdef YYTYPE_UINT16 943typedef YYTYPE_UINT16 yytype_uint16; 944#else 945typedef unsigned short int yytype_uint16; 946#endif 947 948#ifdef YYTYPE_INT16 949typedef YYTYPE_INT16 yytype_int16; 950#else 951typedef short int yytype_int16; 952#endif 953 954#ifndef YYSIZE_T 955# ifdef __SIZE_TYPE__ 956# define YYSIZE_T __SIZE_TYPE__ 957# elif defined size_t 958# define YYSIZE_T size_t 959# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 960 || defined __cplusplus || defined _MSC_VER) 961# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 962# define YYSIZE_T size_t 963# else 964# define YYSIZE_T unsigned int 965# endif 966#endif 967 968#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 969 970#ifndef YY_ 971# if defined YYENABLE_NLS && YYENABLE_NLS 972# if ENABLE_NLS 973# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 974# define YY_(msgid) dgettext ("bison-runtime", msgid) 975# endif 976# endif 977# ifndef YY_ 978# define YY_(msgid) msgid 979# endif 980#endif 981 982/* Suppress unused-variable warnings by "using" E. */ 983#if ! defined lint || defined __GNUC__ 984# define YYUSE(e) ((void) (e)) 985#else 986# define YYUSE(e) /* empty */ 987#endif 988 989/* Identity function, used to suppress warnings about constant conditions. */ 990#ifndef lint 991# define YYID(n) (n) 992#else 993#if (defined __STDC__ || defined __C99__FUNC__ \ 994 || defined __cplusplus || defined _MSC_VER) 995static int 996YYID (int yyi) 997#else 998static int 999YYID (yyi) 1000 int yyi; 1001#endif 1002{ 1003 return yyi; 1004} 1005#endif 1006 1007#if ! defined yyoverflow || YYERROR_VERBOSE 1008 1009/* The parser invokes alloca or malloc; define the necessary symbols. */ 1010 1011# ifdef YYSTACK_USE_ALLOCA 1012# if YYSTACK_USE_ALLOCA 1013# ifdef __GNUC__ 1014# define YYSTACK_ALLOC __builtin_alloca 1015# elif defined __BUILTIN_VA_ARG_INCR 1016# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 1017# elif defined _AIX 1018# define YYSTACK_ALLOC __alloca 1019# elif defined _MSC_VER 1020# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 1021# define alloca _alloca 1022# else 1023# define YYSTACK_ALLOC alloca 1024# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 1025 || defined __cplusplus || defined _MSC_VER) 1026# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 1027# ifndef EXIT_SUCCESS 1028# define EXIT_SUCCESS 0 1029# endif 1030# endif 1031# endif 1032# endif 1033# endif 1034 1035# ifdef YYSTACK_ALLOC 1036 /* Pacify GCC's `empty if-body' warning. */ 1037# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 1038# ifndef YYSTACK_ALLOC_MAXIMUM 1039 /* The OS might guarantee only one guard page at the bottom of the stack, 1040 and a page size can be as small as 4096 bytes. So we cannot safely 1041 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 1042 to allow for a few compiler-allocated temporary stack slots. */ 1043# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 1044# endif 1045# else 1046# define YYSTACK_ALLOC YYMALLOC 1047# define YYSTACK_FREE YYFREE 1048# ifndef YYSTACK_ALLOC_MAXIMUM 1049# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 1050# endif 1051# if (defined __cplusplus && ! defined EXIT_SUCCESS \ 1052 && ! ((defined YYMALLOC || defined malloc) \ 1053 && (defined YYFREE || defined free))) 1054# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 1055# ifndef EXIT_SUCCESS 1056# define EXIT_SUCCESS 0 1057# endif 1058# endif 1059# ifndef YYMALLOC 1060# define YYMALLOC malloc 1061# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 1062 || defined __cplusplus || defined _MSC_VER) 1063void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 1064# endif 1065# endif 1066# ifndef YYFREE 1067# define YYFREE free 1068# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 1069 || defined __cplusplus || defined _MSC_VER) 1070void free (void *); /* INFRINGES ON USER NAME SPACE */ 1071# endif 1072# endif 1073# endif 1074#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 1075 1076 1077#if (! defined yyoverflow \ 1078 && (! defined __cplusplus \ 1079 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 1080 1081/* A type that is properly aligned for any stack member. */ 1082union yyalloc 1083{ 1084 yytype_int16 yyss_alloc; 1085 YYSTYPE yyvs_alloc; 1086}; 1087 1088/* The size of the maximum gap between one aligned stack and the next. */ 1089# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 1090 1091/* The size of an array large to enough to hold all stacks, each with 1092 N elements. */ 1093# define YYSTACK_BYTES(N) \ 1094 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 1095 + YYSTACK_GAP_MAXIMUM) 1096 1097# define YYCOPY_NEEDED 1 1098 1099/* Relocate STACK from its old location to the new one. The 1100 local variables YYSIZE and YYSTACKSIZE give the old and new number of 1101 elements in the stack, and YYPTR gives the new location of the 1102 stack. Advance YYPTR to a properly aligned location for the next 1103 stack. */ 1104# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 1105 do \ 1106 { \ 1107 YYSIZE_T yynewbytes; \ 1108 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 1109 Stack = &yyptr->Stack_alloc; \ 1110 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 1111 yyptr += yynewbytes / sizeof (*yyptr); \ 1112 } \ 1113 while (YYID (0)) 1114 1115#endif 1116 1117#if defined YYCOPY_NEEDED && YYCOPY_NEEDED 1118/* Copy COUNT objects from FROM to TO. The source and destination do 1119 not overlap. */ 1120# ifndef YYCOPY 1121# if defined __GNUC__ && 1 < __GNUC__ 1122# define YYCOPY(To, From, Count) \ 1123 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 1124# else 1125# define YYCOPY(To, From, Count) \ 1126 do \ 1127 { \ 1128 YYSIZE_T yyi; \ 1129 for (yyi = 0; yyi < (Count); yyi++) \ 1130 (To)[yyi] = (From)[yyi]; \ 1131 } \ 1132 while (YYID (0)) 1133# endif 1134# endif 1135#endif /* !YYCOPY_NEEDED */ 1136 1137/* YYFINAL -- State number of the termination state. */ 1138#define YYFINAL 3 1139/* YYLAST -- Last index in YYTABLE. */ 1140#define YYLAST 11084 1141 1142/* YYNTOKENS -- Number of terminals. */ 1143#define YYNTOKENS 142 1144/* YYNNTS -- Number of nonterminals. */ 1145#define YYNNTS 198 1146/* YYNRULES -- Number of rules. */ 1147#define YYNRULES 619 1148/* YYNRULES -- Number of states. */ 1149#define YYNSTATES 1056 1150 1151/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 1152#define YYUNDEFTOK 2 1153#define YYMAXUTOK 352 1154 1155#define YYTRANSLATE(YYX) \ 1156 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 1157 1158/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 1159static const yytype_uint8 yytranslate[] = 1160{ 1161 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1162 141, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1163 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1164 2, 2, 140, 127, 2, 2, 2, 125, 120, 2, 1165 136, 137, 123, 121, 134, 122, 133, 124, 2, 2, 1166 2, 2, 2, 2, 2, 2, 2, 2, 115, 139, 1167 117, 113, 116, 114, 2, 2, 2, 2, 2, 2, 1168 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1169 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1170 2, 132, 2, 138, 119, 2, 135, 2, 2, 2, 1171 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1172 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1173 2, 2, 2, 130, 118, 131, 128, 2, 79, 80, 1174 66, 67, 68, 2, 69, 83, 84, 74, 73, 70, 1175 71, 72, 77, 78, 81, 82, 2, 2, 2, 2, 1176 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1177 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1179 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1181 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1183 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1184 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1186 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 1187 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1188 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1189 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 1190 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1191 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 1192 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1193 65, 75, 76, 85, 86, 87, 88, 89, 90, 91, 1194 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 1195 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 1196 112, 126, 129 1197}; 1198 1199#if YYDEBUG 1200/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 1201 YYRHS. */ 1202static const yytype_uint16 yyprhs[] = 1203{ 1204 0, 0, 3, 4, 7, 10, 12, 14, 18, 21, 1205 23, 24, 30, 35, 38, 40, 42, 46, 49, 51, 1206 52, 58, 59, 64, 68, 72, 76, 79, 83, 87, 1207 91, 95, 99, 104, 106, 110, 114, 121, 127, 133, 1208 139, 145, 149, 153, 157, 161, 163, 167, 171, 173, 1209 177, 181, 185, 188, 190, 192, 194, 196, 198, 203, 1210 204, 210, 212, 215, 219, 224, 230, 235, 241, 244, 1211 247, 250, 253, 256, 258, 262, 264, 268, 270, 273, 1212 277, 283, 286, 291, 294, 299, 301, 305, 307, 311, 1213 314, 318, 320, 324, 326, 328, 333, 337, 341, 345, 1214 349, 352, 354, 356, 358, 363, 367, 371, 375, 379, 1215 382, 384, 386, 388, 391, 393, 397, 399, 401, 403, 1216 405, 407, 409, 411, 413, 415, 417, 418, 423, 425, 1217 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 1218 447, 449, 451, 453, 455, 457, 459, 461, 463, 465, 1219 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, 1220 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 1221 507, 509, 511, 513, 515, 517, 519, 521, 523, 525, 1222 527, 529, 531, 533, 535, 537, 539, 541, 543, 545, 1223 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 1224 569, 575, 579, 585, 592, 598, 604, 610, 616, 621, 1225 625, 629, 633, 637, 641, 645, 649, 653, 657, 662, 1226 667, 670, 673, 677, 681, 685, 689, 693, 697, 701, 1227 705, 709, 713, 717, 721, 725, 728, 731, 735, 739, 1228 743, 747, 748, 753, 760, 762, 764, 766, 769, 774, 1229 777, 781, 783, 785, 787, 789, 792, 797, 800, 802, 1230 805, 808, 813, 815, 816, 819, 822, 825, 827, 829, 1231 832, 836, 841, 845, 850, 853, 855, 857, 859, 861, 1232 863, 865, 867, 869, 871, 873, 875, 876, 881, 882, 1233 886, 887, 892, 896, 900, 903, 907, 911, 913, 918, 1234 922, 924, 925, 932, 937, 941, 944, 946, 949, 952, 1235 959, 966, 967, 968, 976, 977, 978, 986, 992, 997, 1236 998, 999, 1009, 1010, 1017, 1018, 1019, 1028, 1029, 1035, 1237 1036, 1043, 1044, 1045, 1055, 1057, 1059, 1061, 1063, 1065, 1238 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1239 1087, 1089, 1091, 1094, 1096, 1098, 1100, 1106, 1108, 1111, 1240 1113, 1115, 1117, 1121, 1123, 1127, 1129, 1134, 1141, 1145, 1241 1151, 1154, 1159, 1161, 1165, 1170, 1173, 1176, 1178, 1181, 1242 1182, 1189, 1198, 1203, 1210, 1215, 1218, 1225, 1228, 1233, 1243 1240, 1243, 1248, 1251, 1256, 1258, 1260, 1262, 1266, 1268, 1244 1273, 1275, 1280, 1282, 1286, 1288, 1290, 1291, 1292, 1293, 1245 1299, 1304, 1306, 1310, 1314, 1315, 1321, 1324, 1329, 1335, 1246 1341, 1344, 1345, 1351, 1352, 1358, 1362, 1363, 1368, 1369, 1247 1374, 1377, 1379, 1384, 1385, 1391, 1392, 1398, 1404, 1406, 1248 1408, 1415, 1417, 1419, 1421, 1423, 1426, 1428, 1431, 1433, 1249 1435, 1437, 1439, 1441, 1443, 1445, 1448, 1452, 1456, 1460, 1250 1464, 1468, 1469, 1473, 1475, 1478, 1482, 1486, 1487, 1491, 1251 1495, 1499, 1503, 1507, 1508, 1512, 1513, 1517, 1518, 1521, 1252 1522, 1525, 1526, 1529, 1531, 1532, 1536, 1537, 1538, 1539, 1253 1546, 1548, 1550, 1552, 1554, 1557, 1559, 1561, 1563, 1565, 1254 1569, 1571, 1573, 1576, 1579, 1581, 1583, 1585, 1587, 1589, 1255 1591, 1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 1256 1611, 1613, 1615, 1617, 1618, 1623, 1626, 1630, 1633, 1638, 1257 1641, 1644, 1646, 1649, 1650, 1657, 1666, 1671, 1678, 1683, 1258 1690, 1693, 1698, 1705, 1708, 1713, 1716, 1721, 1723, 1724, 1259 1726, 1728, 1730, 1732, 1734, 1736, 1738, 1742, 1744, 1748, 1260 1751, 1754, 1756, 1760, 1762, 1766, 1768, 1770, 1773, 1775, 1261 1779, 1783, 1785, 1789, 1791, 1795, 1797, 1799, 1802, 1804, 1262 1806, 1808, 1811, 1814, 1816, 1818, 1819, 1824, 1826, 1829, 1263 1831, 1835, 1839, 1842, 1845, 1847, 1849, 1851, 1853, 1855, 1264 1857, 1859, 1861, 1863, 1865, 1867, 1869, 1870, 1872, 1873, 1265 1875, 1878, 1881, 1882, 1884, 1886, 1888, 1890, 1892, 1895 1266}; 1267 1268/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 1269static const yytype_int16 yyrhs[] = 1270{ 1271 143, 0, -1, -1, 144, 145, -1, 146, 332, -1, 1272 339, -1, 147, -1, 146, 338, 147, -1, 1, 147, 1273 -1, 154, -1, -1, 47, 148, 130, 145, 131, -1, 1274 150, 261, 229, 264, -1, 151, 332, -1, 339, -1, 1275 152, -1, 151, 338, 152, -1, 1, 154, -1, 154, 1276 -1, -1, 47, 153, 130, 145, 131, -1, -1, 45, 1277 177, 155, 177, -1, 45, 54, 54, -1, 45, 54, 1278 64, -1, 45, 54, 63, -1, 6, 178, -1, 154, 1279 40, 158, -1, 154, 41, 158, -1, 154, 42, 158, 1280 -1, 154, 43, 158, -1, 154, 44, 154, -1, 48, 1281 130, 150, 131, -1, 156, -1, 165, 113, 159, -1, 1282 296, 87, 159, -1, 214, 132, 188, 335, 87, 159, 1283 -1, 214, 133, 52, 87, 159, -1, 214, 133, 56, 1284 87, 159, -1, 214, 85, 56, 87, 159, -1, 214, 1285 85, 52, 87, 159, -1, 297, 87, 159, -1, 172, 1286 113, 195, -1, 165, 113, 184, -1, 165, 113, 195, 1287 -1, 157, -1, 172, 113, 159, -1, 172, 113, 156, 1288 -1, 159, -1, 157, 37, 157, -1, 157, 38, 157, 1289 -1, 39, 333, 157, -1, 127, 159, -1, 182, -1, 1290 157, -1, 164, -1, 160, -1, 250, -1, 250, 331, 1291 329, 190, -1, -1, 94, 162, 237, 150, 131, -1, 1292 328, -1, 163, 190, -1, 163, 190, 161, -1, 214, 1293 133, 329, 190, -1, 214, 133, 329, 190, 161, -1, 1294 214, 85, 329, 190, -1, 214, 85, 329, 190, 161, 1295 -1, 32, 190, -1, 31, 190, -1, 30, 189, -1, 1296 21, 189, -1, 22, 189, -1, 167, -1, 89, 166, 1297 334, -1, 167, -1, 89, 166, 334, -1, 169, -1, 1298 169, 168, -1, 169, 95, 171, -1, 169, 95, 171, 1299 134, 170, -1, 169, 95, -1, 169, 95, 134, 170, 1300 -1, 95, 171, -1, 95, 171, 134, 170, -1, 95, 1301 -1, 95, 134, 170, -1, 171, -1, 89, 166, 334, 1302 -1, 168, 134, -1, 169, 168, 134, -1, 168, -1, 1303 170, 134, 168, -1, 293, -1, 294, -1, 214, 132, 1304 188, 335, -1, 214, 133, 52, -1, 214, 85, 52, 1305 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 1306 56, -1, 297, -1, 293, -1, 294, -1, 214, 132, 1307 188, 335, -1, 214, 133, 52, -1, 214, 85, 52, 1308 -1, 214, 133, 56, -1, 214, 85, 56, -1, 86, 1309 56, -1, 297, -1, 52, -1, 56, -1, 86, 173, 1310 -1, 173, -1, 214, 85, 173, -1, 52, -1, 56, 1311 -1, 53, -1, 180, -1, 181, -1, 175, -1, 289, 1312 -1, 176, -1, 291, -1, 177, -1, -1, 178, 134, 1313 179, 177, -1, 118, -1, 119, -1, 120, -1, 69, 1314 -1, 70, -1, 71, -1, 77, -1, 78, -1, 116, 1315 -1, 73, -1, 117, -1, 74, -1, 72, -1, 83, 1316 -1, 84, -1, 121, -1, 122, -1, 123, -1, 95, 1317 -1, 124, -1, 125, -1, 68, -1, 96, -1, 127, 1318 -1, 128, -1, 66, -1, 67, -1, 81, -1, 82, 1319 -1, 135, -1, 49, -1, 50, -1, 51, -1, 47, 1320 -1, 48, -1, 45, -1, 37, -1, 7, -1, 21, 1321 -1, 16, -1, 3, -1, 5, -1, 46, -1, 26, 1322 -1, 15, -1, 14, -1, 10, -1, 9, -1, 36, 1323 -1, 20, -1, 25, -1, 4, -1, 22, -1, 34, 1324 -1, 39, -1, 38, -1, 23, -1, 8, -1, 24, 1325 -1, 30, -1, 33, -1, 32, -1, 13, -1, 35, 1326 -1, 6, -1, 17, -1, 31, -1, 11, -1, 12, 1327 -1, 18, -1, 19, -1, 172, 113, 182, -1, 172, 1328 113, 182, 44, 182, -1, 296, 87, 182, -1, 296, 1329 87, 182, 44, 182, -1, 214, 132, 188, 335, 87, 1330 182, -1, 214, 133, 52, 87, 182, -1, 214, 133, 1331 56, 87, 182, -1, 214, 85, 52, 87, 182, -1, 1332 214, 85, 56, 87, 182, -1, 86, 56, 87, 182, 1333 -1, 297, 87, 182, -1, 182, 79, 182, -1, 182, 1334 80, 182, -1, 182, 121, 182, -1, 182, 122, 182, 1335 -1, 182, 123, 182, -1, 182, 124, 182, -1, 182, 1336 125, 182, -1, 182, 68, 182, -1, 126, 59, 68, 1337 182, -1, 126, 60, 68, 182, -1, 66, 182, -1, 1338 67, 182, -1, 182, 118, 182, -1, 182, 119, 182, 1339 -1, 182, 120, 182, -1, 182, 69, 182, -1, 182, 1340 116, 182, -1, 182, 73, 182, -1, 182, 117, 182, 1341 -1, 182, 74, 182, -1, 182, 70, 182, -1, 182, 1342 71, 182, -1, 182, 72, 182, -1, 182, 77, 182, 1343 -1, 182, 78, 182, -1, 127, 182, -1, 128, 182, 1344 -1, 182, 83, 182, -1, 182, 84, 182, -1, 182, 1345 75, 182, -1, 182, 76, 182, -1, -1, 46, 333, 1346 183, 182, -1, 182, 114, 182, 333, 115, 182, -1, 1347 196, -1, 182, -1, 339, -1, 194, 336, -1, 194, 1348 134, 326, 336, -1, 326, 336, -1, 136, 188, 334, 1349 -1, 339, -1, 186, -1, 339, -1, 189, -1, 194, 1350 134, -1, 194, 134, 326, 134, -1, 326, 134, -1, 1351 164, -1, 194, 193, -1, 326, 193, -1, 194, 134, 1352 326, 193, -1, 192, -1, -1, 191, 189, -1, 97, 1353 184, -1, 134, 192, -1, 339, -1, 184, -1, 95, 1354 184, -1, 194, 134, 184, -1, 194, 134, 95, 184, 1355 -1, 194, 134, 184, -1, 194, 134, 95, 184, -1, 1356 95, 184, -1, 265, -1, 266, -1, 269, -1, 270, 1357 -1, 271, -1, 276, -1, 274, -1, 277, -1, 295, 1358 -1, 297, -1, 53, -1, -1, 215, 197, 149, 225, 1359 -1, -1, 90, 198, 334, -1, -1, 90, 157, 199, 1360 334, -1, 89, 150, 137, -1, 214, 85, 56, -1, 1361 86, 56, -1, 92, 185, 138, -1, 93, 325, 131, 1362 -1, 30, -1, 31, 136, 189, 334, -1, 31, 136, 1363 334, -1, 31, -1, -1, 46, 333, 136, 200, 157, 1364 334, -1, 39, 136, 157, 334, -1, 39, 136, 334, 1365 -1, 163, 256, -1, 251, -1, 251, 256, -1, 98, 1366 242, -1, 216, 158, 226, 150, 228, 225, -1, 217, 1367 158, 226, 150, 229, 225, -1, -1, -1, 218, 201, 1368 158, 227, 202, 150, 225, -1, -1, -1, 219, 203, 1369 158, 227, 204, 150, 225, -1, 220, 158, 332, 259, 1370 225, -1, 220, 332, 259, 225, -1, -1, -1, 221, 1371 230, 25, 205, 158, 227, 206, 150, 225, -1, -1, 1372 222, 174, 298, 207, 149, 225, -1, -1, -1, 222, 1373 83, 157, 208, 337, 209, 149, 225, -1, -1, 223, 1374 174, 210, 149, 225, -1, -1, 224, 175, 211, 300, 1375 149, 225, -1, -1, -1, 224, 323, 331, 212, 175, 1376 213, 300, 149, 225, -1, 21, -1, 22, -1, 23, 1377 -1, 24, -1, 196, -1, 7, -1, 11, -1, 12, 1378 -1, 18, -1, 19, -1, 16, -1, 20, -1, 3, 1379 -1, 4, -1, 5, -1, 10, -1, 337, -1, 13, 1380 -1, 337, 13, -1, 337, -1, 27, -1, 229, -1, 1381 14, 158, 226, 150, 228, -1, 339, -1, 15, 150, 1382 -1, 172, -1, 165, -1, 305, -1, 89, 233, 334, 1383 -1, 231, -1, 232, 134, 231, -1, 232, -1, 232, 1384 134, 95, 305, -1, 232, 134, 95, 305, 134, 232, 1385 -1, 232, 134, 95, -1, 232, 134, 95, 134, 232, 1386 -1, 95, 305, -1, 95, 305, 134, 232, -1, 95, 1387 -1, 95, 134, 232, -1, 310, 134, 313, 322, -1, 1388 310, 322, -1, 313, 322, -1, 321, -1, 134, 234, 1389 -1, -1, 307, 134, 316, 134, 319, 235, -1, 307, 1390 134, 316, 134, 319, 134, 307, 235, -1, 307, 134, 1391 316, 235, -1, 307, 134, 316, 134, 307, 235, -1, 1392 307, 134, 319, 235, -1, 307, 134, -1, 307, 134, 1393 319, 134, 307, 235, -1, 307, 235, -1, 316, 134, 1394 319, 235, -1, 316, 134, 319, 134, 307, 235, -1, 1395 316, 235, -1, 316, 134, 307, 235, -1, 319, 235, 1396 -1, 319, 134, 307, 235, -1, 234, -1, 339, -1, 1397 238, -1, 118, 239, 118, -1, 76, -1, 118, 236, 1398 239, 118, -1, 333, -1, 333, 139, 240, 333, -1, 1399 241, -1, 240, 134, 241, -1, 52, -1, 304, -1, 1400 -1, -1, -1, 243, 244, 246, 245, 247, -1, 136, 1401 303, 239, 137, -1, 303, -1, 111, 150, 131, -1, 1402 29, 150, 10, -1, -1, 28, 249, 237, 150, 10, 1403 -1, 164, 248, -1, 250, 331, 329, 187, -1, 250, 1404 331, 329, 187, 256, -1, 250, 331, 329, 190, 248, 1405 -1, 163, 186, -1, -1, 214, 133, 329, 252, 187, 1406 -1, -1, 214, 85, 329, 253, 186, -1, 214, 85, 1407 330, -1, -1, 214, 133, 254, 186, -1, -1, 214, 1408 85, 255, 186, -1, 32, 186, -1, 32, -1, 214, 1409 132, 188, 335, -1, -1, 130, 257, 237, 150, 131, 1410 -1, -1, 26, 258, 237, 150, 10, -1, 17, 194, 1411 226, 150, 260, -1, 229, -1, 259, -1, 8, 262, 1412 263, 226, 150, 261, -1, 339, -1, 184, -1, 195, 1413 -1, 339, -1, 88, 172, -1, 339, -1, 9, 150, 1414 -1, 339, -1, 292, -1, 289, -1, 291, -1, 267, 1415 -1, 62, -1, 268, -1, 267, 268, -1, 100, 280, 1416 110, -1, 101, 281, 110, -1, 102, 282, 65, -1, 1417 103, 140, 110, -1, 103, 272, 110, -1, -1, 272, 1418 273, 140, -1, 283, -1, 273, 283, -1, 105, 140, 1419 110, -1, 105, 275, 110, -1, -1, 275, 273, 140, 1420 -1, 104, 140, 110, -1, 104, 278, 110, -1, 106, 1421 140, 110, -1, 106, 279, 110, -1, -1, 278, 61, 1422 140, -1, -1, 279, 61, 140, -1, -1, 280, 283, 1423 -1, -1, 281, 283, -1, -1, 282, 283, -1, 61, 1424 -1, -1, 109, 284, 288, -1, -1, -1, -1, 107, 1425 285, 286, 287, 150, 108, -1, 54, -1, 55, -1, 1426 57, -1, 297, -1, 99, 290, -1, 175, -1, 55, 1427 -1, 54, -1, 57, -1, 99, 281, 110, -1, 59, 1428 -1, 60, -1, 126, 59, -1, 126, 60, -1, 52, 1429 -1, 55, -1, 54, -1, 56, -1, 57, -1, 34, 1430 -1, 33, -1, 35, -1, 36, -1, 50, -1, 49, 1431 -1, 51, -1, 293, -1, 294, -1, 293, -1, 294, 1432 -1, 63, -1, 64, -1, 337, -1, -1, 117, 299, 1433 158, 337, -1, 1, 337, -1, 136, 303, 334, -1, 1434 303, 337, -1, 311, 134, 313, 322, -1, 311, 322, 1435 -1, 313, 322, -1, 321, -1, 134, 301, -1, -1, 1436 307, 134, 317, 134, 319, 302, -1, 307, 134, 317, 1437 134, 319, 134, 307, 302, -1, 307, 134, 317, 302, 1438 -1, 307, 134, 317, 134, 307, 302, -1, 307, 134, 1439 319, 302, -1, 307, 134, 319, 134, 307, 302, -1, 1440 307, 302, -1, 317, 134, 319, 302, -1, 317, 134, 1441 319, 134, 307, 302, -1, 317, 302, -1, 317, 134, 1442 307, 302, -1, 319, 302, -1, 319, 134, 307, 302, 1443 -1, 301, -1, -1, 56, -1, 55, -1, 54, -1, 1444 57, -1, 304, -1, 52, -1, 305, -1, 89, 233, 1445 334, -1, 306, -1, 307, 134, 306, -1, 58, 184, 1446 -1, 58, 214, -1, 309, -1, 310, 134, 309, -1, 1447 308, -1, 311, 134, 308, -1, 68, -1, 96, -1, 1448 312, 52, -1, 312, -1, 52, 113, 184, -1, 52, 1449 113, 214, -1, 315, -1, 316, 134, 315, -1, 314, 1450 -1, 317, 134, 314, -1, 123, -1, 95, -1, 318, 1451 52, -1, 318, -1, 120, -1, 97, -1, 320, 52, 1452 -1, 134, 321, -1, 339, -1, 295, -1, -1, 136, 1453 324, 157, 334, -1, 339, -1, 326, 336, -1, 327, 1454 -1, 326, 134, 327, -1, 184, 88, 184, -1, 58, 1455 184, -1, 96, 184, -1, 52, -1, 56, -1, 53, 1456 -1, 52, -1, 56, -1, 53, -1, 180, -1, 52, 1457 -1, 53, -1, 180, -1, 133, -1, 85, -1, -1, 1458 338, -1, -1, 141, -1, 333, 137, -1, 333, 138, 1459 -1, -1, 141, -1, 134, -1, 139, -1, 141, -1, 1460 337, -1, 338, 139, -1, -1 1461}; 1462 1463/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 1464static const yytype_uint16 yyrline[] = 1465{ 1466 0, 855, 855, 855, 886, 897, 906, 914, 922, 928, 1467 930, 929, 950, 983, 994, 1003, 1011, 1019, 1025, 1030, 1468 1029, 1050, 1050, 1058, 1066, 1077, 1087, 1095, 1104, 1113, 1469 1126, 1139, 1148, 1160, 1161, 1171, 1176, 1197, 1202, 1207, 1470 1217, 1222, 1232, 1241, 1250, 1259, 1262, 1271, 1283, 1284, 1471 1292, 1300, 1308, 1316, 1319, 1331, 1332, 1335, 1336, 1348, 1472 1347, 1369, 1379, 1388, 1401, 1410, 1422, 1431, 1443, 1452, 1473 1461, 1469, 1477, 1487, 1488, 1498, 1499, 1509, 1517, 1525, 1474 1533, 1542, 1550, 1559, 1567, 1576, 1584, 1595, 1596, 1606, 1475 1614, 1624, 1632, 1642, 1646, 1650, 1658, 1666, 1674, 1682, 1476 1694, 1704, 1716, 1725, 1734, 1742, 1750, 1758, 1766, 1779, 1477 1792, 1803, 1811, 1814, 1822, 1830, 1840, 1841, 1842, 1843, 1478 1848, 1859, 1860, 1863, 1871, 1874, 1882, 1882, 1892, 1893, 1479 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1480 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1481 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1924, 1924, 1482 1924, 1925, 1925, 1926, 1926, 1926, 1927, 1927, 1927, 1927, 1483 1928, 1928, 1928, 1928, 1929, 1929, 1929, 1930, 1930, 1930, 1484 1930, 1931, 1931, 1931, 1931, 1932, 1932, 1932, 1932, 1933, 1485 1933, 1933, 1933, 1934, 1934, 1934, 1934, 1935, 1935, 1938, 1486 1947, 1957, 1962, 1972, 1998, 2003, 2008, 2013, 2023, 2033, 1487 2044, 2058, 2072, 2080, 2088, 2096, 2104, 2112, 2120, 2129, 1488 2138, 2146, 2154, 2162, 2170, 2178, 2186, 2194, 2202, 2210, 1489 2218, 2226, 2234, 2242, 2253, 2261, 2269, 2277, 2285, 2293, 1490 2301, 2309, 2309, 2319, 2329, 2335, 2347, 2348, 2352, 2360, 1491 2370, 2380, 2381, 2384, 2385, 2386, 2390, 2398, 2408, 2417, 1492 2425, 2435, 2444, 2453, 2453, 2465, 2475, 2479, 2485, 2493, 1493 2501, 2515, 2531, 2545, 2560, 2570, 2571, 2572, 2573, 2574, 1494 2575, 2576, 2577, 2578, 2579, 2580, 2589, 2588, 2616, 2616, 1495 2624, 2624, 2632, 2640, 2648, 2656, 2669, 2677, 2685, 2693, 1496 2701, 2709, 2709, 2719, 2727, 2735, 2745, 2746, 2756, 2760, 1497 2772, 2784, 2784, 2784, 2795, 2795, 2795, 2806, 2817, 2826, 1498 2828, 2825, 2892, 2891, 2913, 2918, 2912, 2937, 2936, 2958, 1499 2957, 2980, 2981, 2980, 3001, 3009, 3017, 3025, 3035, 3047, 1500 3053, 3059, 3065, 3071, 3077, 3083, 3089, 3095, 3101, 3111, 1501 3117, 3122, 3123, 3130, 3135, 3138, 3139, 3152, 3153, 3163, 1502 3164, 3167, 3175, 3185, 3193, 3203, 3211, 3220, 3229, 3237, 1503 3245, 3254, 3266, 3274, 3285, 3289, 3293, 3297, 3303, 3308, 1504 3313, 3317, 3321, 3325, 3329, 3333, 3341, 3345, 3349, 3353, 1505 3357, 3361, 3365, 3369, 3373, 3379, 3380, 3386, 3395, 3404, 1506 3415, 3419, 3429, 3436, 3445, 3453, 3459, 3462, 3467, 3459, 1507 3483, 3491, 3501, 3505, 3512, 3511, 3532, 3548, 3557, 3569, 1508 3583, 3593, 3592, 3609, 3608, 3624, 3633, 3632, 3650, 3649, 1509 3666, 3674, 3682, 3697, 3696, 3716, 3715, 3736, 3748, 3749, 1510 3752, 3771, 3774, 3782, 3790, 3793, 3797, 3800, 3808, 3811, 1511 3812, 3820, 3823, 3840, 3841, 3842, 3852, 3862, 3889, 3954, 1512 3963, 3974, 3981, 3991, 3999, 4009, 4018, 4029, 4036, 4048, 1513 4057, 4067, 4076, 4087, 4094, 4105, 4112, 4127, 4134, 4145, 1514 4152, 4163, 4170, 4199, 4201, 4200, 4217, 4223, 4228, 4216, 1515 4247, 4255, 4263, 4271, 4274, 4285, 4286, 4287, 4288, 4291, 1516 4302, 4303, 4304, 4312, 4322, 4323, 4324, 4325, 4326, 4329, 1517 4330, 4331, 4332, 4333, 4334, 4335, 4338, 4351, 4361, 4369, 1518 4379, 4380, 4383, 4392, 4391, 4400, 4412, 4422, 4430, 4434, 1519 4438, 4442, 4448, 4453, 4458, 4462, 4466, 4470, 4474, 4478, 1520 4482, 4486, 4490, 4494, 4498, 4502, 4506, 4510, 4515, 4521, 1521 4530, 4539, 4548, 4559, 4560, 4567, 4576, 4595, 4602, 4615, 1522 4627, 4639, 4647, 4664, 4672, 4688, 4689, 4692, 4697, 4703, 1523 4715, 4727, 4735, 4751, 4759, 4775, 4776, 4779, 4792, 4803, 1524 4804, 4807, 4824, 4828, 4838, 4848, 4848, 4877, 4878, 4888, 1525 4895, 4905, 4913, 4921, 4933, 4934, 4935, 4938, 4939, 4940, 1526 4941, 4944, 4945, 4946, 4949, 4954, 4961, 4962, 4965, 4966, 1527 4969, 4972, 4975, 4976, 4977, 4980, 4981, 4984, 4985, 4989 1528}; 1529#endif 1530 1531#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 1532/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 1533 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 1534static const char *const yytname[] = 1535{ 1536 "\"end-of-input\"", "error", "$undefined", "keyword_class", 1537 "keyword_module", "keyword_def", "keyword_undef", "keyword_begin", 1538 "keyword_rescue", "keyword_ensure", "keyword_end", "keyword_if", 1539 "keyword_unless", "keyword_then", "keyword_elsif", "keyword_else", 1540 "keyword_case", "keyword_when", "keyword_while", "keyword_until", 1541 "keyword_for", "keyword_break", "keyword_next", "keyword_redo", 1542 "keyword_retry", "keyword_in", "keyword_do", "keyword_do_cond", 1543 "keyword_do_block", "keyword_do_LAMBDA", "keyword_return", 1544 "keyword_yield", "keyword_super", "keyword_self", "keyword_nil", 1545 "keyword_true", "keyword_false", "keyword_and", "keyword_or", 1546 "keyword_not", "modifier_if", "modifier_unless", "modifier_while", 1547 "modifier_until", "modifier_rescue", "keyword_alias", "keyword_defined", 1548 "keyword_BEGIN", "keyword_END", "keyword__LINE__", "keyword__FILE__", 1549 "keyword__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", 1550 "tCONSTANT", "tCVAR", "tLABEL", "tINTEGER", "tFLOAT", "tSTRING_CONTENT", 1551 "tCHAR", "tNTH_REF", "tBACK_REF", "tREGEXP_END", "\"unary+\"", 1552 "\"unary-\"", "\"**\"", "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", 1553 "\">=\"", "\"<=\"", "\"&&\"", "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", 1554 "\"...\"", "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"::\"", 1555 "\":: at EXPR_BEG\"", "tOP_ASGN", "\"=>\"", "\"(\"", "\"( arg\"", 1556 "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"", "\"&\"", 1557 "\"->\"", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", 1558 "tWORDS_BEG", "tQWORDS_BEG", "tSYMBOLS_BEG", "tQSYMBOLS_BEG", 1559 "tSTRING_DBEG", "tSTRING_DEND", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG", 1560 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", 1561 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", 1562 "'{'", "'}'", "'['", "'.'", "','", "'`'", "'('", "')'", "']'", "';'", 1563 "' '", "'\\n'", "$accept", "program", "$@1", "top_compstmt", "top_stmts", 1564 "top_stmt", "$@2", "bodystmt", "compstmt", "stmts", "stmt_or_begin", 1565 "$@3", "stmt", "$@4", "command_asgn", "expr", "expr_value", 1566 "command_call", "block_command", "cmd_brace_block", "@5", "fcall", 1567 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", 1568 "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", 1569 "fitem", "undef_list", "$@6", "op", "reswords", "arg", "$@7", 1570 "arg_value", "aref_args", "paren_args", "opt_paren_args", 1571 "opt_call_args", "call_args", "command_args", "@8", "block_arg", 1572 "opt_block_arg", "args", "mrhs", "primary", "@9", "$@10", "$@11", "$@12", 1573 "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "@19", "@20", "@21", 1574 "@22", "@23", "$@24", "$@25", "primary_value", "k_begin", "k_if", 1575 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class", 1576 "k_module", "k_def", "k_end", "then", "do", "if_tail", "opt_else", 1577 "for_var", "f_marg", "f_marg_list", "f_margs", "block_args_tail", 1578 "opt_block_args_tail", "block_param", "opt_block_param", 1579 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@26", 1580 "@27", "@28", "f_larglist", "lambda_body", "do_block", "@29", 1581 "block_call", "method_call", "@30", "@31", "@32", "@33", "brace_block", 1582 "@34", "@35", "case_body", "cases", "opt_rescue", "exc_list", "exc_var", 1583 "opt_ensure", "literal", "strings", "string", "string1", "xstring", 1584 "regexp", "words", "word_list", "word", "symbols", "symbol_list", 1585 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents", 1586 "xstring_contents", "regexp_contents", "string_content", "@36", "@37", 1587 "@38", "@39", "string_dvar", "symbol", "sym", "dsym", "numeric", 1588 "user_variable", "keyword_variable", "var_ref", "var_lhs", "backref", 1589 "superclass", "$@40", "f_arglist", "args_tail", "opt_args_tail", 1590 "f_args", "f_bad_arg", "f_norm_arg", "f_arg_item", "f_arg", "f_kw", 1591 "f_block_kw", "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_kwrest", 1592 "f_opt", "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark", 1593 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg", 1594 "singleton", "$@41", "assoc_list", "assocs", "assoc", "operation", 1595 "operation2", "operation3", "dot_or_colon", "opt_terms", "opt_nl", 1596 "rparen", "rbracket", "trailer", "term", "terms", "none", 0 1597}; 1598#endif 1599 1600# ifdef YYPRINT 1601/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 1602 token YYLEX-NUM. */ 1603static const yytype_uint16 yytoknum[] = 1604{ 1605 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 1606 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 1607 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 1608 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 1609 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 1610 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 1611 315, 316, 317, 318, 319, 320, 130, 131, 132, 134, 1612 139, 140, 141, 138, 137, 321, 322, 142, 143, 128, 1613 129, 144, 145, 135, 136, 323, 324, 325, 326, 327, 1614 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 1615 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 1616 348, 349, 350, 61, 63, 58, 62, 60, 124, 94, 1617 38, 43, 45, 42, 47, 37, 351, 33, 126, 352, 1618 123, 125, 91, 46, 44, 96, 40, 41, 93, 59, 1619 32, 10 1620}; 1621# endif 1622 1623/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 1624static const yytype_uint16 yyr1[] = 1625{ 1626 0, 142, 144, 143, 145, 146, 146, 146, 146, 147, 1627 148, 147, 149, 150, 151, 151, 151, 151, 152, 153, 1628 152, 155, 154, 154, 154, 154, 154, 154, 154, 154, 1629 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 1630 154, 154, 154, 154, 154, 154, 156, 156, 157, 157, 1631 157, 157, 157, 157, 158, 159, 159, 160, 160, 162, 1632 161, 163, 164, 164, 164, 164, 164, 164, 164, 164, 1633 164, 164, 164, 165, 165, 166, 166, 167, 167, 167, 1634 167, 167, 167, 167, 167, 167, 167, 168, 168, 169, 1635 169, 170, 170, 171, 171, 171, 171, 171, 171, 171, 1636 171, 171, 172, 172, 172, 172, 172, 172, 172, 172, 1637 172, 173, 173, 174, 174, 174, 175, 175, 175, 175, 1638 175, 176, 176, 177, 177, 178, 179, 178, 180, 180, 1639 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 1640 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 1641 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 1642 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 1643 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 1644 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 1645 181, 181, 181, 181, 181, 181, 181, 181, 181, 182, 1646 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 1647 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 1648 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 1649 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 1650 182, 183, 182, 182, 182, 184, 185, 185, 185, 185, 1651 186, 187, 187, 188, 188, 188, 188, 188, 189, 189, 1652 189, 189, 189, 191, 190, 192, 193, 193, 194, 194, 1653 194, 194, 195, 195, 195, 196, 196, 196, 196, 196, 1654 196, 196, 196, 196, 196, 196, 197, 196, 198, 196, 1655 199, 196, 196, 196, 196, 196, 196, 196, 196, 196, 1656 196, 200, 196, 196, 196, 196, 196, 196, 196, 196, 1657 196, 201, 202, 196, 203, 204, 196, 196, 196, 205, 1658 206, 196, 207, 196, 208, 209, 196, 210, 196, 211, 1659 196, 212, 213, 196, 196, 196, 196, 196, 214, 215, 1660 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 1661 226, 226, 226, 227, 227, 228, 228, 229, 229, 230, 1662 230, 231, 231, 232, 232, 233, 233, 233, 233, 233, 1663 233, 233, 233, 233, 234, 234, 234, 234, 235, 235, 1664 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 1665 236, 236, 236, 236, 236, 237, 237, 238, 238, 238, 1666 239, 239, 240, 240, 241, 241, 243, 244, 245, 242, 1667 246, 246, 247, 247, 249, 248, 250, 250, 250, 250, 1668 251, 252, 251, 253, 251, 251, 254, 251, 255, 251, 1669 251, 251, 251, 257, 256, 258, 256, 259, 260, 260, 1670 261, 261, 262, 262, 262, 263, 263, 264, 264, 265, 1671 265, 265, 266, 267, 267, 267, 268, 269, 270, 271, 1672 271, 272, 272, 273, 273, 274, 274, 275, 275, 276, 1673 276, 277, 277, 278, 278, 279, 279, 280, 280, 281, 1674 281, 282, 282, 283, 284, 283, 285, 286, 287, 283, 1675 288, 288, 288, 288, 289, 290, 290, 290, 290, 291, 1676 292, 292, 292, 292, 293, 293, 293, 293, 293, 294, 1677 294, 294, 294, 294, 294, 294, 295, 295, 296, 296, 1678 297, 297, 298, 299, 298, 298, 300, 300, 301, 301, 1679 301, 301, 302, 302, 303, 303, 303, 303, 303, 303, 1680 303, 303, 303, 303, 303, 303, 303, 303, 303, 304, 1681 304, 304, 304, 305, 305, 306, 306, 307, 307, 308, 1682 309, 310, 310, 311, 311, 312, 312, 313, 313, 314, 1683 315, 316, 316, 317, 317, 318, 318, 319, 319, 320, 1684 320, 321, 322, 322, 323, 324, 323, 325, 325, 326, 1685 326, 327, 327, 327, 328, 328, 328, 329, 329, 329, 1686 329, 330, 330, 330, 331, 331, 332, 332, 333, 333, 1687 334, 335, 336, 336, 336, 337, 337, 338, 338, 339 1688}; 1689 1690/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 1691static const yytype_uint8 yyr2[] = 1692{ 1693 0, 2, 0, 2, 2, 1, 1, 3, 2, 1, 1694 0, 5, 4, 2, 1, 1, 3, 2, 1, 0, 1695 5, 0, 4, 3, 3, 3, 2, 3, 3, 3, 1696 3, 3, 4, 1, 3, 3, 6, 5, 5, 5, 1697 5, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1698 3, 3, 2, 1, 1, 1, 1, 1, 4, 0, 1699 5, 1, 2, 3, 4, 5, 4, 5, 2, 2, 1700 2, 2, 2, 1, 3, 1, 3, 1, 2, 3, 1701 5, 2, 4, 2, 4, 1, 3, 1, 3, 2, 1702 3, 1, 3, 1, 1, 4, 3, 3, 3, 3, 1703 2, 1, 1, 1, 4, 3, 3, 3, 3, 2, 1704 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1705 1, 1, 1, 1, 1, 1, 0, 4, 1, 1, 1706 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1707 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1708 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1709 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1710 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1711 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1712 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1713 5, 3, 5, 6, 5, 5, 5, 5, 4, 3, 1714 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 1715 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 1716 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 1717 3, 0, 4, 6, 1, 1, 1, 2, 4, 2, 1718 3, 1, 1, 1, 1, 2, 4, 2, 1, 2, 1719 2, 4, 1, 0, 2, 2, 2, 1, 1, 2, 1720 3, 4, 3, 4, 2, 1, 1, 1, 1, 1, 1721 1, 1, 1, 1, 1, 1, 0, 4, 0, 3, 1722 0, 4, 3, 3, 2, 3, 3, 1, 4, 3, 1723 1, 0, 6, 4, 3, 2, 1, 2, 2, 6, 1724 6, 0, 0, 7, 0, 0, 7, 5, 4, 0, 1725 0, 9, 0, 6, 0, 0, 8, 0, 5, 0, 1726 6, 0, 0, 9, 1, 1, 1, 1, 1, 1, 1727 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1728 1, 1, 2, 1, 1, 1, 5, 1, 2, 1, 1729 1, 1, 3, 1, 3, 1, 4, 6, 3, 5, 1730 2, 4, 1, 3, 4, 2, 2, 1, 2, 0, 1731 6, 8, 4, 6, 4, 2, 6, 2, 4, 6, 1732 2, 4, 2, 4, 1, 1, 1, 3, 1, 4, 1733 1, 4, 1, 3, 1, 1, 0, 0, 0, 5, 1734 4, 1, 3, 3, 0, 5, 2, 4, 5, 5, 1735 2, 0, 5, 0, 5, 3, 0, 4, 0, 4, 1736 2, 1, 4, 0, 5, 0, 5, 5, 1, 1, 1737 6, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1738 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 1739 3, 0, 3, 1, 2, 3, 3, 0, 3, 3, 1740 3, 3, 3, 0, 3, 0, 3, 0, 2, 0, 1741 2, 0, 2, 1, 0, 3, 0, 0, 0, 6, 1742 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1743 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1744 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1745 1, 1, 1, 0, 4, 2, 3, 2, 4, 2, 1746 2, 1, 2, 0, 6, 8, 4, 6, 4, 6, 1747 2, 4, 6, 2, 4, 2, 4, 1, 0, 1, 1748 1, 1, 1, 1, 1, 1, 3, 1, 3, 2, 1749 2, 1, 3, 1, 3, 1, 1, 2, 1, 3, 1750 3, 1, 3, 1, 3, 1, 1, 2, 1, 1, 1751 1, 2, 2, 1, 1, 0, 4, 1, 2, 1, 1752 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1753 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1754 2, 2, 0, 1, 1, 1, 1, 1, 2, 0 1755}; 1756 1757/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 1758 Performed when YYTABLE doesn't specify something else to do. Zero 1759 means the default is an error. */ 1760static const yytype_uint16 yydefact[] = 1761{ 1762 2, 0, 0, 1, 0, 346, 347, 348, 0, 339, 1763 340, 341, 344, 342, 343, 345, 334, 335, 336, 337, 1764 297, 263, 263, 510, 509, 511, 512, 608, 0, 608, 1765 10, 0, 514, 513, 515, 594, 596, 506, 505, 595, 1766 508, 500, 501, 453, 520, 521, 0, 0, 0, 0, 1767 288, 619, 619, 85, 406, 479, 477, 479, 481, 461, 1768 473, 467, 475, 0, 0, 0, 3, 606, 6, 9, 1769 33, 45, 48, 56, 263, 55, 0, 73, 0, 77, 1770 87, 0, 53, 244, 0, 286, 0, 0, 311, 314, 1771 606, 0, 0, 0, 0, 57, 306, 275, 276, 452, 1772 454, 277, 278, 279, 281, 280, 282, 450, 451, 449, 1773 516, 517, 283, 0, 284, 61, 5, 8, 168, 179, 1774 169, 192, 165, 185, 175, 174, 195, 196, 190, 173, 1775 172, 167, 193, 197, 198, 177, 166, 180, 184, 186, 1776 178, 171, 187, 194, 189, 188, 181, 191, 176, 164, 1777 183, 182, 163, 170, 161, 162, 158, 159, 160, 116, 1778 118, 117, 153, 154, 149, 131, 132, 133, 140, 137, 1779 139, 134, 135, 155, 156, 141, 142, 146, 150, 136, 1780 138, 128, 129, 130, 143, 144, 145, 147, 148, 151, 1781 152, 157, 121, 123, 125, 26, 119, 120, 122, 124, 1782 0, 0, 0, 0, 0, 0, 0, 0, 258, 0, 1783 245, 268, 71, 262, 619, 0, 516, 517, 0, 284, 1784 619, 589, 72, 70, 608, 69, 0, 619, 430, 68, 1785 608, 609, 0, 0, 21, 241, 0, 0, 334, 335, 1786 297, 300, 431, 0, 220, 0, 221, 294, 0, 19, 1787 0, 0, 606, 15, 18, 608, 75, 14, 290, 608, 1788 0, 612, 612, 246, 0, 0, 612, 587, 608, 0, 1789 0, 0, 83, 338, 0, 93, 94, 101, 308, 407, 1790 497, 496, 498, 495, 0, 494, 0, 0, 0, 0, 1791 0, 0, 0, 0, 0, 0, 0, 502, 503, 52, 1792 235, 236, 615, 616, 4, 617, 607, 0, 0, 0, 1793 0, 0, 0, 0, 435, 433, 420, 62, 305, 414, 1794 416, 0, 89, 0, 81, 78, 0, 0, 0, 0, 1795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1797 0, 0, 0, 428, 619, 426, 0, 54, 0, 0, 1798 0, 0, 606, 0, 607, 0, 360, 359, 0, 0, 1799 516, 517, 284, 111, 112, 0, 0, 114, 0, 0, 1800 516, 517, 284, 327, 188, 181, 191, 176, 158, 159, 1801 160, 116, 117, 585, 329, 584, 0, 605, 604, 0, 1802 307, 455, 0, 0, 126, 592, 294, 269, 593, 265, 1803 0, 0, 0, 259, 267, 428, 619, 426, 0, 0, 1804 0, 260, 608, 0, 299, 264, 608, 254, 619, 619, 1805 253, 608, 304, 51, 23, 25, 24, 0, 301, 0, 1806 0, 0, 428, 426, 0, 17, 0, 608, 292, 13, 1807 607, 74, 608, 289, 295, 614, 613, 247, 614, 249, 1808 296, 588, 0, 100, 502, 503, 91, 86, 0, 428, 1809 619, 426, 548, 483, 486, 484, 499, 480, 456, 478, 1810 457, 458, 482, 459, 460, 0, 463, 469, 0, 470, 1811 465, 466, 0, 471, 0, 472, 0, 0, 618, 7, 1812 27, 28, 29, 30, 31, 49, 50, 619, 619, 59, 1813 63, 619, 0, 34, 43, 0, 44, 608, 0, 79, 1814 90, 47, 46, 0, 199, 268, 42, 217, 225, 230, 1815 231, 232, 227, 229, 239, 240, 233, 234, 210, 211, 1816 237, 238, 608, 226, 228, 222, 223, 224, 212, 213, 1817 214, 215, 216, 597, 599, 598, 600, 0, 263, 425, 1818 608, 597, 599, 598, 600, 0, 263, 0, 619, 351, 1819 0, 350, 0, 0, 0, 0, 0, 0, 294, 428, 1820 619, 426, 319, 324, 111, 112, 113, 0, 523, 322, 1821 522, 428, 619, 426, 0, 0, 548, 331, 597, 598, 1822 263, 35, 201, 41, 209, 0, 199, 591, 0, 270, 1823 266, 619, 597, 598, 608, 597, 598, 590, 298, 610, 1824 250, 255, 257, 303, 22, 0, 242, 0, 32, 423, 1825 421, 208, 0, 76, 16, 291, 612, 0, 84, 97, 1826 99, 608, 597, 598, 554, 551, 550, 549, 552, 0, 1827 565, 0, 576, 566, 580, 579, 575, 548, 408, 547, 1828 411, 553, 555, 557, 533, 563, 619, 568, 619, 573, 1829 533, 578, 533, 0, 531, 487, 0, 462, 464, 474, 1830 468, 476, 218, 219, 398, 608, 0, 396, 395, 0, 1831 619, 0, 274, 0, 88, 82, 0, 0, 0, 0, 1832 0, 0, 429, 66, 0, 0, 432, 0, 0, 427, 1833 64, 619, 349, 287, 619, 619, 441, 619, 352, 619, 1834 354, 312, 353, 315, 0, 0, 318, 601, 293, 608, 1835 597, 598, 0, 0, 525, 0, 0, 111, 112, 115, 1836 608, 0, 608, 548, 0, 0, 0, 252, 417, 58, 1837 251, 0, 127, 271, 261, 0, 0, 432, 0, 0, 1838 619, 608, 11, 0, 248, 92, 95, 0, 559, 554, 1839 0, 372, 363, 365, 608, 361, 608, 0, 0, 540, 1840 0, 529, 583, 567, 0, 530, 0, 543, 577, 0, 1841 545, 581, 488, 490, 491, 492, 485, 493, 554, 0, 1842 394, 608, 0, 379, 561, 619, 619, 571, 379, 379, 1843 377, 400, 0, 0, 0, 0, 0, 272, 80, 200, 1844 0, 40, 206, 39, 207, 67, 424, 611, 0, 37, 1845 204, 38, 205, 65, 422, 442, 443, 619, 444, 0, 1846 619, 357, 0, 0, 355, 0, 0, 0, 317, 0, 1847 0, 432, 0, 325, 0, 0, 432, 328, 586, 608, 1848 0, 527, 332, 418, 419, 202, 0, 256, 302, 20, 1849 569, 608, 0, 370, 0, 556, 0, 0, 0, 409, 1850 532, 558, 533, 533, 564, 619, 582, 533, 574, 533, 1851 533, 0, 0, 0, 560, 0, 397, 385, 387, 0, 1852 375, 376, 0, 390, 0, 392, 0, 436, 434, 0, 1853 415, 273, 243, 36, 203, 0, 0, 446, 358, 0, 1854 12, 448, 0, 309, 310, 0, 0, 270, 619, 320, 1855 0, 524, 323, 526, 330, 548, 362, 373, 0, 368, 1856 364, 410, 0, 0, 0, 536, 0, 538, 528, 0, 1857 544, 0, 541, 546, 0, 570, 294, 428, 399, 378, 1858 379, 379, 562, 619, 379, 572, 379, 379, 404, 608, 1859 402, 405, 60, 0, 445, 0, 102, 103, 110, 0, 1860 447, 0, 313, 316, 438, 439, 437, 0, 0, 0, 1861 0, 371, 0, 366, 413, 412, 533, 533, 533, 533, 1862 489, 601, 293, 0, 382, 0, 384, 374, 0, 391, 1863 0, 388, 393, 0, 401, 109, 428, 619, 426, 619, 1864 619, 0, 326, 0, 369, 0, 537, 0, 534, 539, 1865 542, 379, 379, 379, 379, 403, 601, 108, 608, 597, 1866 598, 440, 356, 321, 333, 367, 533, 383, 0, 380, 1867 386, 389, 432, 535, 379, 381 1868}; 1869 1870/* YYDEFGOTO[NTERM-NUM]. */ 1871static const yytype_int16 yydefgoto[] = 1872{ 1873 -1, 1, 2, 66, 67, 68, 236, 567, 568, 252, 1874 253, 446, 254, 437, 70, 71, 358, 72, 73, 510, 1875 690, 243, 75, 76, 255, 77, 78, 79, 467, 80, 1876 209, 377, 378, 192, 193, 194, 195, 605, 556, 197, 1877 82, 439, 211, 260, 228, 748, 426, 427, 225, 226, 1878 213, 413, 428, 516, 83, 356, 259, 452, 625, 360, 1879 846, 361, 847, 732, 987, 736, 733, 930, 594, 596, 1880 746, 935, 245, 85, 86, 87, 88, 89, 90, 91, 1881 92, 93, 94, 713, 570, 721, 843, 844, 369, 772, 1882 773, 774, 959, 898, 801, 686, 687, 802, 969, 970, 1883 278, 279, 472, 777, 658, 879, 320, 511, 95, 96, 1884 711, 704, 565, 557, 318, 508, 507, 577, 986, 715, 1885 837, 916, 920, 97, 98, 99, 100, 101, 102, 103, 1886 290, 485, 104, 294, 105, 106, 292, 296, 286, 284, 1887 288, 477, 676, 675, 792, 891, 796, 107, 285, 108, 1888 109, 216, 217, 112, 218, 219, 589, 735, 744, 880, 1889 779, 745, 661, 662, 663, 664, 665, 804, 805, 666, 1890 667, 668, 669, 807, 808, 670, 671, 672, 673, 674, 1891 781, 396, 595, 265, 429, 221, 115, 629, 559, 399, 1892 304, 423, 424, 706, 457, 571, 364, 257 1893}; 1894 1895/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 1896 STATE-NUM. */ 1897#define YYPACT_NINF -810 1898static const yytype_int16 yypact[] = 1899{ 1900 -810, 102, 2888, -810, 7502, -810, -810, -810, 7025, -810, 1901 -810, -810, -810, -810, -810, -810, 7615, 7615, -810, -810, 1902 7615, 4210, 3805, -810, -810, -810, -810, 190, 6892, -21, 1903 -810, 10, -810, -810, -810, 3130, 3940, -810, -810, 3265, 1904 -810, -810, -810, -810, -810, -810, 8971, 8971, 130, 5262, 1905 9084, 7954, 8293, 7284, -810, 6759, -810, -810, -810, 54, 1906 70, 225, 228, 515, 9197, 8971, -810, 245, -810, 1021, 1907 -810, 269, -810, -810, 73, 120, 87, -810, 98, 9310, 1908 -810, 148, 3109, 44, 359, -810, 9084, 9084, -810, -810, 1909 6149, 9419, 9528, 9637, 6625, 30, 86, -810, -810, 230, 1910 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1911 3, 385, -810, 348, 490, -810, -810, -810, -810, -810, 1912 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1913 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1914 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1915 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1916 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1917 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1918 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 1919 -810, -810, -810, -810, -810, 285, -810, -810, -810, -810, 1920 253, 8971, 374, 5401, 8971, 8971, 8971, 8971, -810, 328, 1921 3109, 364, -810, -810, 313, 369, 208, 224, 395, 247, 1922 354, -810, -810, -810, 6036, -810, 7615, 7615, -810, -810, 1923 6262, -810, 9084, 844, -810, 360, 388, 5540, -810, -810, 1924 -810, 379, 400, 73, -810, 464, 463, 501, 7728, -810, 1925 5262, 402, 245, -810, 1021, -21, 437, -810, 269, -21, 1926 415, 8, 317, -810, 364, 440, 317, -810, -21, 525, 1927 615, 9746, 470, -810, 488, 508, 575, 612, -810, -810, 1928 -810, -810, -810, -810, 438, -810, 447, 451, 284, 475, 1929 540, 496, 60, 502, 576, 516, 61, 550, 565, -810, 1930 -810, -810, -810, -810, -810, -810, 6375, 9084, 9084, 9084, 1931 9084, 7728, 9084, 9084, -810, -810, -810, 549, -810, -810, 1932 -810, 8406, -810, 5262, 7393, 527, 8406, 8971, 8971, 8971, 1933 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 1934 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 8971, 1935 8971, 8971, 8971, 10025, 7615, 10102, 4619, 269, 110, 110, 1936 9084, 9084, 245, 654, 538, 631, -810, -810, 645, 668, 1937 85, 93, 108, 405, 410, 9084, 377, -810, 123, 661, 1938 -810, -810, -810, -810, 40, 42, 56, 167, 180, 279, 1939 332, 336, 343, -810, -810, -810, 30, -810, -810, 10179, 1940 -810, -810, 9197, 9197, -810, -810, 394, -810, -810, -810, 1941 8971, 8971, 7841, -810, -810, 10256, 7615, 10333, 8971, 8971, 1942 8067, -810, -21, 558, -810, -810, -21, -810, 564, 566, 1943 -810, 66, -810, -810, -810, -810, -810, 7025, -810, 8971, 1944 5671, 574, 10256, 10333, 8971, 1021, 581, -21, -810, -810, 1945 6488, 572, -21, -810, -810, 8180, -810, -810, 8293, -810, 1946 -810, -810, 360, 678, -810, -810, -810, 588, 9746, 10410, 1947 7615, 10487, 1081, -810, -810, -810, -810, -810, -810, -810, 1948 -810, -810, -810, -810, -810, 302, -810, -810, 594, -810, 1949 -810, -810, 306, -810, 597, -810, 8971, 8971, -810, -810, 1950 -810, -810, -810, -810, -810, -810, -810, 63, 63, -810, 1951 -810, 63, 8971, -810, 605, 607, -810, -21, 9746, 617, 1952 -810, -810, -810, 636, 1231, -810, -810, 463, 2567, 2567, 1953 2567, 2567, 976, 976, 2722, 2633, 2567, 2567, 3244, 3244, 1954 339, 339, 1305, 976, 976, 986, 986, 1119, 255, 255, 1955 463, 463, 463, 4345, 3400, 4480, 3535, 400, 620, -810, 1956 -21, 591, -810, 742, -810, 400, 4075, 747, 754, -810, 1957 4758, 756, 5036, 52, 52, 654, 8519, 747, 121, 10564, 1958 7615, 10641, -810, 269, -810, 678, -810, 245, -810, -810, 1959 -810, 10718, 7615, 10179, 4619, 9084, 1274, -810, -810, -810, 1960 1148, -810, 2322, -810, 3109, 7025, 2974, -810, 8971, 364, 1961 -810, 354, 2995, 3670, -21, 398, 497, -810, -810, -810, 1962 -810, 7841, 8067, -810, -810, 9084, 3109, 644, -810, -810, 1963 -810, 3109, 5671, 212, -810, -810, 317, 9746, 588, 495, 1964 323, -21, 337, 376, 676, -810, -810, -810, -810, 8971, 1965 -810, 896, -810, -810, -810, -810, -810, 1142, -810, -810, 1966 -810, -810, -810, -810, 656, -810, 657, 743, 663, -810, 1967 667, 750, 671, 760, -810, -810, 763, -810, -810, -810, 1968 -810, -810, 463, 463, -810, 793, 5810, -810, -810, 5540, 1969 63, 5810, 679, 8632, -810, 588, 9746, 9197, 8971, 699, 1970 9197, 9197, -810, 549, 400, 681, 759, 9197, 9197, -810, 1971 549, 400, -810, -810, 8745, 810, -810, 718, -810, 810, 1972 -810, -810, -810, -810, 747, 92, -810, 81, 149, -21, 1973 144, 155, 9084, 245, -810, 9084, 4619, 495, 323, -810, 1974 -21, 747, 66, 1142, 4619, 245, 7158, -810, 86, 120, 1975 -810, 8971, -810, -810, -810, 8971, 8971, 504, 8971, 8971, 1976 694, 66, -810, 700, -810, -810, 390, 8971, -810, -810, 1977 896, 473, -810, 702, -21, -810, -21, 124, 1142, -810, 1978 571, -810, -810, -810, 38, -810, 1142, -810, -810, 881, 1979 -810, -810, -810, -810, -810, -810, -810, -810, 720, 9855, 1980 -810, -21, 716, 703, -810, 707, 663, -810, 723, 724, 1981 -810, 725, 856, 737, 5540, 859, 8971, 740, 588, 3109, 1982 8971, -810, 3109, -810, 3109, -810, -810, -810, 9197, -810, 1983 3109, -810, 3109, -810, -810, 605, -810, 797, -810, 5149, 1984 872, -810, 9084, 747, -810, 747, 5810, 5810, -810, 8858, 1985 4897, 159, 52, -810, 245, 747, -810, -810, -810, -21, 1986 747, -810, -810, -810, -810, 3109, 8971, 8067, -810, -810, 1987 -810, -21, 875, 752, 953, -810, 762, 5810, 5540, -810, 1988 -810, -810, 753, 757, -810, 663, -810, 767, -810, 768, 1989 767, 5923, 9855, 848, 689, 787, -810, 1386, -810, 622, 1990 -810, -810, 1386, -810, 1533, -810, 1028, -810, -810, 778, 1991 -810, 784, 3109, -810, 3109, 9964, 110, -810, -810, 5810, 1992 -810, -810, 110, -810, -810, 747, 747, -810, 383, -810, 1993 4619, -810, -810, -810, -810, 1274, -810, 785, 875, 672, 1994 -810, -810, 911, 792, 1142, -810, 881, -810, -810, 881, 1995 -810, 881, -810, -810, 820, 689, -810, 10795, -810, -810, 1996 806, 809, -810, 663, 811, -810, 812, 811, -810, 352, 1997 -810, -810, -810, 891, -810, 691, 508, 575, 612, 4619, 1998 -810, 4758, -810, -810, -810, -810, -810, 5810, 747, 4619, 1999 875, 785, 875, 823, -810, -810, 767, 824, 767, 767, 2000 -810, 818, 826, 1386, -810, 1533, -810, -810, 1533, -810, 2001 1533, -810, -810, 1028, -810, 678, 10872, 7615, 10949, 754, 2002 718, 747, -810, 747, 785, 875, -810, 881, -810, -810, 2003 -810, 811, 825, 811, 811, -810, 49, 323, -21, 179, 2004 215, -810, -810, -810, -810, 785, 767, -810, 1533, -810, 2005 -810, -810, 216, -810, 811, -810 2006}; 2007 2008/* YYPGOTO[NTERM-NUM]. */ 2009static const yytype_int16 yypgoto[] = 2010{ 2011 -810, -810, -810, -382, -810, 26, -810, -549, -7, -810, 2012 513, -810, 33, -810, -315, -33, -63, -55, -810, -216, 2013 -810, 766, -13, 874, -164, 20, -73, -810, -409, 29, 2014 1882, -309, 882, -54, -810, -5, -810, -810, 6, -810, 2015 1208, -810, 1366, -810, -41, 256, -344, 78, -14, -810, 2016 -384, -205, -4, -304, -15, -810, -810, -810, -810, -810, 2017 -810, -810, -810, -810, -810, -810, -810, -810, -810, -810, 2018 -810, -810, 64, -810, -810, -810, -810, -810, -810, -810, 2019 -810, -810, -810, -1, -333, -519, -44, -623, -810, -789, 2020 -771, 211, 297, 71, -810, -437, -810, -693, -810, -29, 2021 -810, -810, -810, -810, -810, -810, 237, -810, -810, -810, 2022 -810, -810, -810, -810, -94, -810, -810, -531, -810, -31, 2023 -810, -810, -810, -810, -810, -810, 890, -810, -810, -810, 2024 -810, 701, -810, -810, -810, -810, -810, -810, -810, 940, 2025 -810, -126, -810, -810, -810, -810, -810, -3, -810, 11, 2026 -810, 1400, 1673, 905, 1898, 1689, -810, -810, 65, -451, 2027 -102, -385, -809, -588, -689, -289, 222, 107, -810, -810, 2028 -810, 18, -721, -764, 115, 235, -810, -634, -810, -37, 2029 -627, -810, -810, -810, 114, -388, -810, -324, -810, 623, 2030 -47, -9, -123, -568, -214, 21, -11, -2 2031}; 2032 2033/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 2034 positive, shift that token. If negative, reduce the rule which 2035 number is the opposite. If YYTABLE_NINF, syntax error. */ 2036#define YYTABLE_NINF -620 2037static const yytype_int16 yytable[] = 2038{ 2039 116, 283, 400, 208, 208, 198, 325, 208, 229, 299, 2040 560, 521, 214, 214, 196, 421, 214, 258, 232, 199, 2041 235, 659, 526, 234, 359, 198, 572, 362, 610, 558, 2042 117, 566, 617, 316, 196, 69, 610, 69, 273, 199, 2043 394, 785, 251, 363, 724, 741, 757, 261, 459, 263, 2044 267, 809, 461, 357, 357, 723, 306, 357, 627, 638, 2045 317, 196, -106, 775, 273, 888, 84, 586, 84, 256, 2046 617, 689, 614, 766, 691, 600, 273, 273, 273, 720, 2047 215, 215, 272, 876, 215, 940, 447, 660, 305, 881, 2048 -518, 558, 840, 566, 212, 222, 845, 971, 223, 314, 2049 196, 937, 3, 312, 313, 569, -106, 432, 895, 695, 2050 -102, 305, 314, 84, 215, 397, -102, 274, -103, 630, 2051 231, 488, 494, 569, 587, -510, 641, -509, 215, -338, 2052 220, 220, 451, -110, 220, 654, 453, -93, 965, 684, 2053 237, -511, 455, 274, 883, 659, -109, 630, 319, 456, 2054 215, 215, 889, 877, 215, 368, 379, 379, 655, 517, 2055 479, 851, 482, 398, 486, 262, 266, 991, 486, -105, 2056 489, 495, 856, -510, -108, -509, -338, -338, 900, 901, 2057 -107, 685, 775, 873, -104, -597, 247, 855, -106, -511, 2058 -106, 302, -105, 303, 289, 860, 251, 431, 466, 433, 2059 321, 940, 316, 315, 971, 449, 659, 231, 881, 227, 2060 291, 208, 414, 208, 208, -97, 315, -597, 414, -93, 2061 214, 1024, 214, 888, 421, 430, 849, -94, -107, -104, 2062 441, 302, 322, 303, 617, 878, 729, 610, 610, 965, 2063 588, 450, -101, 251, 500, 501, 502, 503, 740, 302, 2064 763, 303, -512, 814, 1045, -100, 273, 630, 948, 462, 2065 881, 326, 302, 961, 303, -514, 513, 84, 966, 630, 2066 256, 522, 776, 305, 357, 357, 357, 357, -96, 505, 2067 506, 445, 739, -99, 775, -598, 775, 818, 215, -98, 2068 215, 215, 659, -95, 215, -518, 215, 573, 574, 618, 2069 -512, 84, 422, 620, 425, 984, 312, 313, 623, 273, 2070 997, -519, 84, -514, 84, 575, 251, 515, -105, 881, 2071 -105, -102, 515, 327, 633, -74, 230, 357, 357, 635, 2072 56, 231, 499, 929, 419, 274, 1007, -103, 220, 69, 2073 220, 208, 583, 256, 504, 473, -88, 601, 603, 481, 2074 775, 993, 430, 519, -107, -104, -107, -104, 859, 678, 2075 -110, 564, -96, 473, -513, 293, 678, 473, 295, 1032, 2076 84, 215, 215, 215, 215, 84, 215, 215, 350, 351, 2077 352, 988, 521, 305, 302, 215, 303, 84, 274, 230, 2078 215, 474, 850, 475, 694, 466, 803, 985, 839, 590, 2079 576, -98, 775, 208, 775, 564, 754, 327, -293, 474, 2080 836, 475, -513, 474, 430, 475, -432, -515, 215, 404, 2081 84, -504, 764, 564, 215, 215, 414, 414, -507, 584, 2082 406, -594, 624, 585, 198, 402, -595, 775, 116, 215, 2083 1023, 410, 677, 196, 353, 466, 680, 412, 199, 564, 2084 -96, 458, 411, 273, 415, -293, -293, 208, 456, -598, 2085 348, 349, 350, 351, 352, -515, 215, 215, 430, -504, 2086 1052, -96, -519, 69, -96, -432, -507, 564, -96, 617, 2087 215, 444, 418, 610, 659, 758, 1013, 825, 420, -98, 2088 -504, 354, 355, 231, 833, -507, 438, 887, -103, 473, 2089 890, 416, 417, 273, 84, 688, 688, -109, 473, 688, 2090 -98, -105, 473, -98, 84, 224, 702, -98, 440, -94, 2091 -432, -601, -432, -432, 709, 769, 611, 645, 646, 647, 2092 648, 327, 274, 699, 215, -594, 227, -504, -504, 448, 2093 -595, -594, -507, -507, 703, 474, -595, 475, 476, 442, 2094 -73, 705, 710, 454, 474, 754, 475, 478, 474, 747, 2095 475, 480, 742, 717, 765, 719, 716, 208, 787, 636, 2096 790, 460, 725, 469, 297, 298, 726, 403, 430, 208, 2097 -601, 463, 274, 979, 759, 483, 749, 564, 444, 981, 2098 430, 866, 761, -516, 722, 722, 416, 443, 750, 564, 2099 752, 473, 198, -110, 468, 705, 487, 872, 734, 414, 2100 -107, 196, 490, 964, -109, 967, 199, -104, 496, 858, 2101 470, 471, 273, 466, -101, -601, 493, -601, -601, 649, 2102 116, -597, 705, 497, 84, -100, 84, 473, 868, 650, 2103 -516, -516, 522, 509, 215, 821, 823, 474, 810, 475, 2104 484, 875, 829, 831, 863, 996, 215, 998, 84, 215, 2105 -517, 520, 999, 826, 782, 69, 782, 653, 654, 852, 2106 747, 576, 854, 1038, 464, 465, 811, 498, 707, 812, 2107 799, 273, 813, 474, 815, 475, 491, 578, 688, 215, 2108 650, 655, 862, 582, 630, 619, 84, -284, 621, 357, 2109 622, 274, 357, 806, -105, 628, -88, -517, -517, 750, 2110 515, 632, 838, 841, 1031, 841, 1033, 841, 653, 654, 2111 705, 1034, 637, 848, 769, -96, 645, 646, 647, 648, 2112 579, 705, 842, 839, 679, 760, 933, 681, 1046, -268, 2113 857, 693, 655, 886, -284, -284, 591, 886, 936, 697, 2114 84, 696, 196, 84, 853, 84, -423, 712, 414, 1054, 2115 274, 215, 714, -294, 215, 215, 861, 811, 74, 718, 2116 74, 215, 215, 913, 957, 762, 1016, 580, 581, 922, 2117 945, 947, 74, 74, 273, 950, 74, 952, 953, 767, 2118 778, 780, 811, 592, 593, 783, 215, 784, 885, 215, 2119 84, 786, 788, 782, 782, 789, 992, 909, 84, 357, 2120 -294, -294, 791, -269, 820, 74, 74, 793, 794, 827, 2121 795, 592, 593, 1017, 1018, 839, 44, 45, 867, 708, 2122 74, 869, 918, 892, 896, 917, 874, 897, 921, 925, 2123 926, 899, 923, 928, 924, 798, 828, 645, 646, 647, 2124 648, 799, 74, 74, 932, -107, 74, 902, 904, 934, 2125 810, 650, 886, 894, 906, 810, 907, 810, 908, 910, 2126 942, 943, -104, 722, -270, 931, -98, 273, 84, 903, 2127 905, 919, 651, 782, 954, 915, 938, 944, 652, 653, 2128 654, 946, 215, -95, 1026, 1028, 1029, 1030, 434, 941, 2129 273, 949, 951, 84, 956, 958, 215, 435, 436, 972, 2130 84, 84, 980, 655, 84, 806, 656, 963, -271, 990, 2131 806, 994, 806, 995, 982, 983, 841, 769, 1000, 645, 2132 646, 647, 648, 769, 231, 645, 646, 647, 648, 649, 2133 1003, 84, 84, 1005, 1053, 1008, 1010, 1015, 769, 650, 2134 645, 646, 647, 648, -597, 84, 955, 1025, 1027, 1048, 2135 1014, 782, -598, 634, 770, 366, 810, 834, 810, 74, 2136 651, 810, 1019, 810, 1020, 383, 1042, 653, 654, 975, 2137 1021, 871, 800, 84, 1035, 770, 864, 1022, 1041, 401, 2138 74, 771, 74, 74, 84, 492, 74, 287, 74, 395, 2139 989, 655, 884, 74, 208, 769, 962, 645, 646, 647, 2140 648, 810, 960, 882, 74, 430, 74, 716, 841, 597, 2141 1043, 806, 1044, 806, 564, 0, 806, 0, 806, 705, 2142 0, 1004, 1006, 0, 0, 1009, 0, 1011, 1012, 0, 2143 0, 0, 770, 84, 327, 84, 0, 0, 939, 0, 2144 0, 84, 0, 84, 327, 0, 0, 0, 0, 340, 2145 341, 307, 308, 309, 310, 311, 806, 0, 0, 340, 2146 341, 0, 74, 74, 74, 74, 74, 74, 74, 74, 2147 968, 215, 645, 646, 647, 648, 0, 74, 0, 74, 2148 0, 0, 74, 0, 345, 346, 347, 348, 349, 350, 2149 351, 352, 1047, 1049, 1050, 1051, 347, 348, 349, 350, 2150 351, 352, 0, 0, 0, 0, 0, 0, 0, 0, 2151 74, 0, 74, 0, 0, 1055, 74, 74, 0, 0, 2152 0, 0, 0, 644, 0, 645, 646, 647, 648, 649, 2153 0, 74, 0, 0, 0, 0, 0, 0, -619, 650, 2154 0, 0, 0, 0, 0, 0, -619, -619, -619, 0, 2155 0, -619, -619, -619, 0, -619, 0, 0, 74, 74, 2156 651, 0, 0, 0, -619, -619, 652, 653, 654, 0, 2157 0, 0, 74, 0, 0, -619, -619, 327, -619, -619, 2158 -619, -619, -619, 0, 644, 0, 645, 646, 647, 648, 2159 649, 655, 340, 341, 656, 0, 74, 0, 0, 0, 2160 650, 0, 0, 0, 0, 0, 74, 657, 0, 0, 2161 0, 0, 0, 0, 210, 210, 0, 0, 210, 0, 2162 0, 651, 0, -619, 0, 0, 74, 652, 653, 654, 2163 348, 349, 350, 351, 352, 0, 0, 0, 0, 0, 2164 0, 0, 0, 0, 244, 246, -619, 0, 0, 210, 2165 210, 0, 655, 0, 0, 656, 0, 0, 0, 0, 2166 0, 0, 300, 301, 0, 698, 0, 0, -619, -619, 2167 0, -619, 0, 0, 227, -619, 0, -619, 0, -619, 2168 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 2169 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 2170 338, 339, 0, 0, 340, 341, 0, 0, 0, 0, 2171 0, 0, 0, 0, 0, 0, 644, 0, 645, 646, 2172 647, 648, 649, 0, 0, 0, 74, 0, 74, 0, 2173 0, 0, 650, 0, 0, 342, 74, 343, 344, 345, 2174 346, 347, 348, 349, 350, 351, 352, 0, 74, 0, 2175 74, 74, 0, 651, 0, -245, 0, 0, 0, 652, 2176 653, 654, 0, 327, 328, 329, 330, 331, 332, 333, 2177 334, 335, 336, 337, 338, 339, 0, 0, 340, 341, 2178 0, 74, 0, 0, 655, 0, 0, 656, 74, 0, 2179 0, 0, 110, 0, 110, 0, 0, 0, 0, 210, 2180 743, 0, 210, 210, 210, 300, 0, 0, 264, 342, 2181 0, 343, 344, 345, 346, 347, 348, 349, 350, 351, 2182 352, 0, 210, 0, 210, 210, 0, 0, 798, 0, 2183 645, 646, 647, 648, 799, 0, 231, 0, 0, 110, 2184 0, 0, 74, 275, 650, 74, 0, 74, 0, 0, 2185 0, 0, 0, 74, 0, 0, 74, 74, 0, 0, 2186 0, 0, 0, 74, 74, 651, 0, 0, 0, 275, 2187 0, 652, 653, 654, 0, 0, 0, 0, 0, 0, 2188 0, 370, 380, 380, 380, 0, 0, 0, 74, 0, 2189 0, 74, 74, 0, 0, 0, 655, 0, 0, 656, 2190 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2191 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 2192 0, 0, 0, 0, 524, 527, 528, 529, 530, 531, 2193 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 2194 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 2195 552, 0, 210, 0, 0, 0, 0, 405, 0, 0, 2196 407, 408, 409, 0, 0, 0, 0, 0, 0, 0, 2197 74, 0, 0, 0, 0, 769, 0, 645, 646, 647, 2198 648, 799, 0, 0, 74, 0, 0, 0, 0, 0, 2199 0, 650, 0, 110, 0, 74, 0, 0, 74, 0, 2200 602, 604, 74, 74, 0, 0, 74, 0, 606, 210, 2201 210, 0, 651, 0, 210, 0, 602, 604, 210, 653, 2202 654, 0, 0, 0, 0, 0, 0, 110, 0, 0, 2203 0, 0, 0, 74, 74, 0, 0, 626, 110, 0, 2204 110, 0, 631, 655, 0, 0, 0, 74, 0, 0, 2205 0, 0, 0, 210, 0, 0, 210, 0, 0, 0, 2206 0, 275, 0, 0, 0, 111, 0, 111, 210, 0, 2207 0, 0, 0, 0, 0, 74, 0, 514, 0, 0, 2208 0, 114, 525, 114, 0, 0, 74, 0, 0, 0, 2209 0, 0, 0, 0, 682, 683, 110, 0, 0, 0, 2210 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 2211 210, 0, 111, 110, 275, 0, 276, 0, 0, 0, 2212 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 2213 0, 0, 277, 0, 0, 74, 0, 74, 0, 0, 2214 0, 0, 276, 74, 0, 74, 110, 0, 0, 0, 2215 0, 0, 0, 0, 371, 381, 381, 381, 277, 0, 2216 0, 0, 0, 0, 0, 0, 0, 607, 609, 0, 2217 372, 382, 382, 74, 210, 0, 264, 0, 210, 0, 2218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2219 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 2221 0, 609, 0, 0, 264, 0, 0, 0, 0, 210, 2222 210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2223 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2224 110, 0, 0, 0, 0, 0, 0, 210, 0, 0, 2225 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 2226 0, 0, 0, 0, 0, 0, 111, 0, 692, 0, 2227 0, 0, 0, 0, 81, 0, 81, 0, 0, 0, 2228 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 2229 113, 210, 113, 0, 0, 606, 819, 0, 822, 824, 2230 111, 0, 0, 0, 0, 830, 832, 0, 275, 0, 2231 0, 111, 210, 111, 0, 0, 114, 0, 0, 0, 2232 0, 81, 0, 0, 0, 0, 0, 114, 0, 114, 2233 0, 0, 525, 0, 276, 0, 0, 113, 0, 0, 2234 0, 0, 0, 0, 0, 0, 0, 0, 0, 865, 2235 277, 0, 0, 822, 824, 0, 830, 832, 0, 0, 2236 110, 0, 110, 367, 753, 210, 0, 0, 0, 111, 2237 0, 0, 0, 0, 111, 0, 0, 609, 264, 0, 2238 0, 0, 0, 0, 110, 114, 111, 276, 0, 0, 2239 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2240 0, 0, 114, 277, 0, 768, 0, 0, 0, 0, 2241 0, 0, 0, 0, 210, 0, 0, 0, 912, 111, 2242 0, 0, 110, 0, 0, 0, 914, 275, 0, 0, 2243 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 2244 0, 0, 0, 0, 0, 0, 0, 210, 0, 817, 2245 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2246 0, 0, 0, 0, 914, 210, 0, 0, 0, 0, 2247 835, 0, 0, 0, 0, 81, 110, 0, 0, 110, 2248 0, 110, 0, 0, 0, 0, 275, 0, 0, 0, 2249 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 2250 0, 0, 0, 111, 0, 0, 0, 0, 0, 81, 2251 0, 0, 0, 111, 0, 0, 0, 0, 0, 114, 2252 81, 0, 81, 870, 0, 113, 110, 0, 0, 114, 2253 0, 276, 0, 0, 110, 0, 113, 0, 113, 0, 2254 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, 2255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2257 0, 0, 911, 0, 0, 0, 0, 0, 81, 0, 2258 0, 276, 0, 81, 0, 0, 0, 0, 0, 380, 2259 0, 0, 0, 0, 113, 81, 0, 277, 523, 113, 2260 0, 0, 0, 0, 110, 927, 0, 0, 0, 0, 2261 0, 113, 0, 0, 0, 210, 0, 0, 0, 0, 2262 0, 0, 0, 264, 0, 0, 0, 0, 81, 110, 2263 0, 0, 0, 111, 0, 111, 110, 110, 0, 0, 2264 110, 0, 0, 0, 113, 0, 0, 0, 0, 114, 2265 0, 114, 0, 0, 0, 0, 0, 111, 0, 0, 2266 0, 0, 0, 0, 0, 0, 0, 110, 110, 0, 2267 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 2268 0, 110, 380, 0, 0, 0, 0, 0, 0, 0, 2269 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 2270 276, 0, 0, 0, 0, 976, 0, 0, 0, 110, 2271 0, 114, 81, 0, 0, 0, 277, 0, 0, 0, 2272 110, 0, 81, 0, 0, 0, 0, 0, 113, 0, 2273 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 2274 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 2275 0, 0, 111, 0, 111, 797, 751, 0, 0, 276, 2276 0, 0, 0, 0, 0, 114, 0, 0, 114, 110, 2277 114, 110, 0, 0, 0, 277, 0, 110, 0, 110, 2278 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 2279 337, 338, 339, 0, 0, 340, 341, 0, 0, 111, 2280 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 2281 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 2282 0, 0, 0, 114, 0, 0, 342, 0, 343, 344, 2283 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 2284 0, 0, 81, 0, 81, 0, 0, 0, 0, 0, 2285 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 2286 113, 0, 381, 0, 0, 0, 81, 0, 0, 0, 2287 0, 0, 0, 0, 0, 0, 0, 111, 382, 0, 2288 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 2289 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 2290 0, 0, 111, 0, 81, 0, 0, 0, 0, 111, 2291 111, 0, 0, 111, 0, 0, 0, 0, 114, 0, 2292 113, 0, 0, 0, 0, 114, 114, 0, 0, 114, 2293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2294 111, 111, 0, 0, 0, 0, 0, 0, 0, 0, 2295 0, 0, 0, 0, 111, 381, 114, 114, 81, 0, 2296 0, 81, 0, 81, 0, 0, 0, 0, 0, 523, 2297 114, 382, 0, 0, 113, 0, 0, 113, 977, 113, 2298 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 2299 0, 0, 0, 111, 978, 0, 0, 0, 114, 0, 2300 0, 0, 0, 0, 0, 0, 0, 0, 81, 114, 2301 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 2302 0, 0, 0, 0, 113, 327, -620, -620, -620, -620, 2303 332, 333, 113, 0, -620, -620, 0, 0, 0, 0, 2304 340, 341, 111, 0, 111, 0, 0, 0, 0, 0, 2305 111, 0, 111, 0, 0, 0, 0, 0, 114, 0, 2306 114, 0, 0, 0, 0, 0, 114, 0, 114, 0, 2307 0, 0, 0, 343, 344, 345, 346, 347, 348, 349, 2308 350, 351, 352, 0, 0, 0, 81, 0, 0, 0, 2309 0, 327, 328, 329, 330, 331, 332, 333, 334, 0, 2310 336, 337, 113, 0, 0, 0, 340, 341, 0, 0, 2311 0, 81, 0, 0, 0, 0, 0, 0, 81, 81, 2312 0, 0, 81, 0, 0, 0, 0, 113, 0, 0, 2313 0, 0, 0, 0, 113, 113, 0, 0, 113, 343, 2314 344, 345, 346, 347, 348, 349, 350, 351, 352, 81, 2315 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2316 0, 0, 0, 81, 0, 113, 113, 0, 0, 0, 2317 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 2318 327, 328, 329, 330, 331, 332, 333, 974, 0, 336, 2319 337, 81, 0, 0, 0, 340, 341, 0, 0, 0, 2320 0, 0, 81, 0, 0, 0, 0, 113, 0, 0, 2321 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 2322 0, 0, 0, 0, 0, 0, 0, 0, 343, 344, 2323 345, 346, 347, 348, 349, 350, 351, 352, 0, 0, 2324 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2325 0, 81, 0, 81, 0, 0, 0, 0, 0, 81, 2326 0, 81, 0, 0, 0, 0, 0, 113, 0, 113, 2327 0, 0, 0, 0, 0, 113, 0, 113, -619, 4, 2328 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 2329 11, 0, 0, 0, 12, 0, 13, 14, 15, 16, 2330 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 2331 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 2332 0, 0, 0, 28, 29, 30, 31, 32, 33, 34, 2333 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 2334 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 2335 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2336 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 2337 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 2338 58, 59, 60, 61, 62, -601, 0, 0, 0, 0, 2339 0, 0, 0, -601, -601, -601, 0, 0, -601, -601, 2340 -601, 0, -601, 0, 63, 64, 65, 0, 698, 0, 2341 0, -601, -601, -601, -601, 0, 0, -619, 0, -619, 2342 0, 0, -601, -601, 0, -601, -601, -601, -601, -601, 2343 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 2344 335, 336, 337, 338, 339, 0, 0, 340, 341, 0, 2345 0, 0, 0, -601, -601, -601, -601, -601, -601, -601, 2346 -601, -601, -601, -601, -601, -601, 0, 0, -601, -601, 2347 -601, 0, 755, -601, 0, 0, 0, 0, 342, -601, 2348 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 2349 0, 0, 0, -601, 0, 0, -601, 0, -106, -601, 2350 -601, -601, -601, -601, -601, -601, -601, -601, -601, -601, 2351 -601, 0, 0, 0, 0, -601, -601, -601, -601, -601, 2352 -504, 0, -601, -601, -601, 0, -601, 0, -504, -504, 2353 -504, 0, 0, -504, -504, -504, 0, -504, 0, 0, 2354 0, 0, 0, 0, 0, -504, 0, -504, -504, -504, 2355 0, 0, 0, 0, 0, 0, 0, -504, -504, 0, 2356 -504, -504, -504, -504, -504, 0, 0, 327, 328, 329, 2357 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 2358 0, 0, 340, 341, 0, 0, 0, 0, -504, -504, 2359 -504, -504, -504, -504, -504, -504, -504, -504, -504, -504, 2360 -504, 0, 0, -504, -504, -504, 0, -504, -504, 0, 2361 0, 0, 0, 342, -504, 343, 344, 345, 346, 347, 2362 348, 349, 350, 351, 352, 0, 0, 0, -504, 0, 2363 0, -504, 0, -504, -504, -504, -504, -504, -504, -504, 2364 -504, -504, -504, -504, -504, -504, 0, 0, 0, 0, 2365 0, -504, -504, -504, -504, -507, 0, -504, -504, -504, 2366 0, -504, 0, -507, -507, -507, 0, 0, -507, -507, 2367 -507, 0, -507, 0, 0, 0, 0, 0, 0, 0, 2368 -507, 0, -507, -507, -507, 0, 0, 0, 0, 0, 2369 0, 0, -507, -507, 0, -507, -507, -507, -507, -507, 2370 0, 0, 327, 328, 329, 330, 331, 332, 333, 334, 2371 335, 336, 337, -620, -620, 0, 0, 340, 341, 0, 2372 0, 0, 0, -507, -507, -507, -507, -507, -507, -507, 2373 -507, -507, -507, -507, -507, -507, 0, 0, -507, -507, 2374 -507, 0, -507, -507, 0, 0, 0, 0, 0, -507, 2375 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 2376 0, 0, 0, -507, 0, 0, -507, 0, -507, -507, 2377 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, 2378 -507, 0, 0, 0, 0, 0, -507, -507, -507, -507, 2379 -602, 0, -507, -507, -507, 0, -507, 0, -602, -602, 2380 -602, 0, 0, -602, -602, -602, 0, -602, 0, 0, 2381 0, 0, 0, 0, 0, 0, -602, -602, -602, -602, 2382 0, 0, 0, 0, 0, 0, 0, -602, -602, 0, 2383 -602, -602, -602, -602, -602, 0, 0, 0, 0, 0, 2384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2385 0, 0, 0, 0, 0, 0, 0, 0, -602, -602, 2386 -602, -602, -602, -602, -602, -602, -602, -602, -602, -602, 2387 -602, 0, 0, -602, -602, -602, 0, 0, -602, 0, 2388 0, 0, 0, 0, -602, 0, 0, 0, 0, 0, 2389 0, 0, 0, 0, 0, 0, 0, 0, -602, 0, 2390 0, -602, 0, 0, -602, -602, -602, -602, -602, -602, 2391 -602, -602, -602, -602, -602, -602, 0, 0, 0, 0, 2392 -602, -602, -602, -602, -602, -603, 0, -602, -602, -602, 2393 0, -602, 0, -603, -603, -603, 0, 0, -603, -603, 2394 -603, 0, -603, 0, 0, 0, 0, 0, 0, 0, 2395 0, -603, -603, -603, -603, 0, 0, 0, 0, 0, 2396 0, 0, -603, -603, 0, -603, -603, -603, -603, -603, 2397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2399 0, 0, 0, -603, -603, -603, -603, -603, -603, -603, 2400 -603, -603, -603, -603, -603, -603, 0, 0, -603, -603, 2401 -603, 0, 0, -603, 0, 0, 0, 0, 0, -603, 2402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2403 0, 0, 0, -603, 0, 0, -603, 0, 0, -603, 2404 -603, -603, -603, -603, -603, -603, -603, -603, -603, -603, 2405 -603, 0, 0, 0, 0, -603, -603, -603, -603, -603, 2406 -293, 0, -603, -603, -603, 0, -603, 0, -293, -293, 2407 -293, 0, 0, -293, -293, -293, 0, -293, 0, 0, 2408 0, 0, 0, 0, 0, 0, 0, -293, -293, -293, 2409 0, 0, 0, 0, 0, 0, 0, -293, -293, 0, 2410 -293, -293, -293, -293, -293, 0, 0, 0, 0, 0, 2411 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2412 0, 0, 0, 0, 0, 0, 0, 0, -293, -293, 2413 -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 2414 -293, 0, 0, -293, -293, -293, 0, 756, -293, 0, 2415 0, 0, 0, 0, -293, 0, 0, 0, 0, 0, 2416 0, 0, 0, 0, 0, 0, 0, 0, -293, 0, 2417 0, -293, 0, -108, -293, -293, -293, -293, -293, -293, 2418 -293, -293, -293, -293, -293, -293, 0, 0, 0, 0, 2419 0, -293, -293, -293, -293, -431, 0, -293, -293, -293, 2420 0, -293, 0, -431, -431, -431, 0, 0, -431, -431, 2421 -431, 0, -431, 0, 0, 0, 0, 0, 0, 0, 2422 0, -431, -431, -431, 0, 0, 0, 0, 0, 0, 2423 0, 0, -431, -431, 0, -431, -431, -431, -431, -431, 2424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2426 0, 0, 0, -431, -431, -431, -431, -431, -431, -431, 2427 -431, -431, -431, -431, -431, -431, 0, 0, -431, -431, 2428 -431, 0, 0, -431, 0, 0, 0, 0, 0, -431, 2429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2430 0, 0, 0, -431, 0, 0, 0, 0, 0, -431, 2431 0, -431, -431, -431, -431, -431, -431, -431, -431, -431, 2432 -431, 0, 0, 0, 0, -431, -431, -431, -431, -431, 2433 -285, 227, -431, -431, -431, 0, -431, 0, -285, -285, 2434 -285, 0, 0, -285, -285, -285, 0, -285, 0, 0, 2435 0, 0, 0, 0, 0, 0, 0, -285, -285, -285, 2436 0, 0, 0, 0, 0, 0, 0, -285, -285, 0, 2437 -285, -285, -285, -285, -285, 0, 0, 0, 0, 0, 2438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2439 0, 0, 0, 0, 0, 0, 0, 0, -285, -285, 2440 -285, -285, -285, -285, -285, -285, -285, -285, -285, -285, 2441 -285, 0, 0, -285, -285, -285, 0, 0, -285, 0, 2442 0, 0, 0, 0, -285, 0, 0, 0, 0, 0, 2443 0, 0, 0, 0, 0, 0, 0, 0, -285, 0, 2444 0, -285, 0, 0, -285, -285, -285, -285, -285, -285, 2445 -285, -285, -285, -285, -285, -285, 0, 0, 0, 0, 2446 0, -285, -285, -285, -285, -421, 0, -285, -285, -285, 2447 0, -285, 0, -421, -421, -421, 0, 0, -421, -421, 2448 -421, 0, -421, 0, 0, 0, 0, 0, 0, 0, 2449 0, -421, -421, -421, 0, 0, 0, 0, 0, 0, 2450 0, 0, -421, -421, 0, -421, -421, -421, -421, -421, 2451 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2453 0, 0, 0, -421, -421, -421, -421, -421, -421, -421, 2454 -421, -421, -421, -421, -421, -421, 0, 0, -421, -421, 2455 -421, 0, 0, -421, 0, 0, 0, 0, 0, -421, 2456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2457 0, 0, 0, -421, 0, 0, 0, 0, 0, -421, 2458 0, -421, -421, -421, -421, -421, -421, -421, -421, -421, 2459 -421, 0, 0, 0, 0, -421, -421, -421, -421, -421, 2460 -300, -421, -421, -421, -421, 0, -421, 0, -300, -300, 2461 -300, 0, 0, -300, -300, -300, 0, -300, 0, 0, 2462 0, 0, 0, 0, 0, 0, 0, -300, -300, 0, 2463 0, 0, 0, 0, 0, 0, 0, -300, -300, 0, 2464 -300, -300, -300, -300, -300, 0, 0, 0, 0, 0, 2465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2466 0, 0, 0, 0, 0, 0, 0, 0, -300, -300, 2467 -300, -300, -300, -300, -300, -300, -300, -300, -300, -300, 2468 -300, 0, 0, -300, -300, -300, 0, 0, -300, 0, 2469 0, 0, 0, 0, -300, 0, 0, 0, 0, 0, 2470 0, 0, 0, 0, 0, 0, 0, 0, -300, 0, 2471 0, 0, 0, 0, -300, 0, -300, -300, -300, -300, 2472 -300, -300, -300, -300, -300, -300, 0, 0, 0, 0, 2473 0, -300, -300, -300, -300, -601, 224, -300, -300, -300, 2474 0, -300, 0, -601, -601, -601, 0, 0, 0, -601, 2475 -601, 0, -601, 0, 0, 0, 0, 0, 0, 0, 2476 0, -601, 0, 0, 0, 0, 0, 0, 0, 0, 2477 0, 0, -601, -601, 0, -601, -601, -601, -601, -601, 2478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2480 0, 0, 0, -601, -601, -601, -601, -601, -601, -601, 2481 -601, -601, -601, -601, -601, -601, 0, 0, -601, -601, 2482 -601, 0, 700, 0, 0, 0, 0, 0, 0, 0, 2483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2484 0, 0, 0, -601, 0, 0, 0, 0, -106, -601, 2485 0, -601, -601, -601, -601, -601, -601, -601, -601, -601, 2486 -601, 0, 0, 0, 0, -601, -601, -601, -601, -97, 2487 -293, 0, -601, 0, -601, 0, -601, 0, -293, -293, 2488 -293, 0, 0, 0, -293, -293, 0, -293, 0, 0, 2489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2490 0, 0, 0, 0, 0, 0, 0, -293, -293, 0, 2491 -293, -293, -293, -293, -293, 0, 0, 0, 0, 0, 2492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2493 0, 0, 0, 0, 0, 0, 0, 0, -293, -293, 2494 -293, -293, -293, -293, -293, -293, -293, -293, -293, -293, 2495 -293, 0, 0, -293, -293, -293, 0, 701, 0, 0, 2496 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2497 0, 0, 0, 0, 0, 0, 0, 0, -293, 0, 2498 0, 0, 0, -108, -293, 0, -293, -293, -293, -293, 2499 -293, -293, -293, -293, -293, -293, 0, 0, 0, 0, 2500 0, -293, -293, -293, -99, 0, 0, -293, 0, -293, 2501 248, -293, 5, 6, 7, 8, 9, -619, -619, -619, 2502 10, 11, 0, 0, -619, 12, 0, 13, 14, 15, 2503 16, 17, 18, 19, 0, 0, 0, 0, 0, 20, 2504 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 2505 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 2506 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 2507 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 2508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2509 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 2510 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 2511 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 2512 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2513 0, 0, 0, 0, 0, 63, 64, 65, 0, 0, 2514 0, 0, 0, 0, 0, 0, 0, 0, -619, 248, 2515 -619, 5, 6, 7, 8, 9, 0, 0, -619, 10, 2516 11, 0, -619, -619, 12, 0, 13, 14, 15, 16, 2517 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 2518 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 2519 0, 0, 0, 28, 29, 249, 31, 32, 33, 34, 2520 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 2521 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 2522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2523 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 2524 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 2525 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 2526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2527 0, 0, 0, 0, 63, 64, 65, 0, 0, 0, 2528 0, 0, 0, 0, 0, 0, 0, -619, 248, -619, 2529 5, 6, 7, 8, 9, 0, 0, -619, 10, 11, 2530 0, 0, -619, 12, -619, 13, 14, 15, 16, 17, 2531 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 2532 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 2533 0, 0, 28, 29, 249, 31, 32, 33, 34, 35, 2534 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 2535 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 2536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2537 0, 0, 0, 48, 0, 0, 49, 50, 0, 51, 2538 52, 0, 53, 0, 0, 54, 55, 56, 57, 58, 2539 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 2540 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2541 0, 0, 0, 63, 64, 65, 0, 0, 0, 0, 2542 0, 0, 0, 0, 0, 0, -619, 248, -619, 5, 2543 6, 7, 8, 9, 0, 0, -619, 10, 11, 0, 2544 0, -619, 12, 0, 13, 14, 15, 16, 17, 18, 2545 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 2546 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 2547 0, 28, 29, 249, 31, 32, 33, 34, 35, 36, 2548 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 2549 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 2550 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2551 0, 0, 48, 0, 0, 49, 50, 0, 51, 52, 2552 0, 53, 0, 0, 54, 55, 56, 57, 58, 59, 2553 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 2554 248, 0, 5, 6, 7, 8, 9, 0, -619, -619, 2555 10, 11, 63, 64, 65, 12, 0, 13, 14, 15, 2556 16, 17, 18, 19, 0, -619, 0, -619, 0, 20, 2557 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 2558 0, 0, 0, 0, 28, 29, 249, 31, 32, 33, 2559 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 2560 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 2561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2562 0, 0, 0, 0, 0, 48, 0, 0, 49, 50, 2563 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 2564 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 2565 0, 0, 0, 248, 0, 5, 6, 7, 8, 9, 2566 0, 0, 0, 10, 11, 63, 64, 65, 12, 0, 2567 13, 14, 15, 16, 17, 18, 19, 0, -619, 0, 2568 -619, 0, 20, 21, 22, 23, 24, 25, 26, 0, 2569 0, 27, 0, 0, 0, 0, 0, 28, 29, 249, 2570 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2571 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 2572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2573 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 2574 0, 250, 50, 0, 51, 52, 0, 53, 0, 0, 2575 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 2576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2577 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 2578 65, 0, 0, 0, 0, 0, 0, 0, 0, -619, 2579 0, -619, 248, -619, 5, 6, 7, 8, 9, 0, 2580 0, 0, 10, 11, 0, 0, 0, 12, 0, 13, 2581 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 2582 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 2583 27, 0, 0, 0, 0, 0, 28, 29, 249, 31, 2584 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 2585 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 2586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2587 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 2588 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 2589 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 2590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2591 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 2592 0, 0, 0, 0, 0, 0, 0, 0, -619, 0, 2593 -619, 248, -619, 5, 6, 7, 8, 9, 0, 0, 2594 0, 10, 11, 0, 0, 0, 12, 0, 13, 14, 2595 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 2596 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 2597 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 2598 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 2599 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 2600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2601 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 2602 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 2603 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 2604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2605 0, 0, 0, 0, 0, 0, 63, 64, 65, 0, 2606 0, -619, 4, 0, 5, 6, 7, 8, 9, -619, 2607 0, -619, 10, 11, 0, 0, 0, 12, 0, 13, 2608 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 2609 0, 20, 21, 22, 23, 24, 25, 26, 0, 0, 2610 27, 0, 0, 0, 0, 0, 28, 29, 30, 31, 2611 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 2612 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 2613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2614 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 2615 49, 50, 0, 51, 52, 0, 53, 0, 0, 54, 2616 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 2617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2618 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 2619 0, 0, -619, 0, 0, 0, 0, 0, 0, 0, 2620 -619, 248, -619, 5, 6, 7, 8, 9, 0, 0, 2621 -619, 10, 11, 0, 0, 0, 12, 0, 13, 14, 2622 15, 16, 17, 18, 19, 0, 0, 0, 0, 0, 2623 20, 21, 22, 23, 24, 25, 26, 0, 0, 27, 2624 0, 0, 0, 0, 0, 28, 29, 249, 31, 32, 2625 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 2626 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 2627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2628 0, 0, 0, 0, 0, 0, 48, 0, 0, 49, 2629 50, 0, 51, 52, 0, 53, 0, 0, 54, 55, 2630 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 2631 0, 0, 0, 0, 248, 0, 5, 6, 7, 8, 2632 9, 0, 0, 0, 10, 11, 63, 64, 65, 12, 2633 0, 13, 14, 15, 16, 17, 18, 19, 0, -619, 2634 0, -619, 0, 20, 21, 22, 23, 24, 25, 26, 2635 0, 0, 27, 0, 0, 0, 0, 0, 28, 29, 2636 249, 31, 32, 33, 34, 35, 36, 37, 38, 39, 2637 40, 0, 41, 42, 0, 43, 44, 45, 0, 46, 2638 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2639 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2640 0, 0, 49, 50, 0, 51, 52, 0, 53, 0, 2641 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 2642 0, -619, 0, 0, 0, 0, 0, 0, 0, 5, 2643 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 2644 64, 65, 12, 0, 13, 14, 15, 16, 17, 18, 2645 19, 0, -619, 0, -619, 0, 20, 21, 22, 23, 2646 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 2647 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 2648 37, 38, 39, 40, 201, 41, 42, 0, 43, 44, 2649 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 2650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2651 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 2652 0, 204, 205, 206, 54, 55, 56, 57, 58, 59, 2653 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 2654 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 2655 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 2656 16, 17, 18, 19, 0, 0, 0, 231, 0, 20, 2657 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 2658 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 2659 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 2660 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 2661 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2662 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 2663 0, 51, 52, 0, 0, 0, 0, 54, 55, 56, 2664 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 2665 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 2666 0, 0, 0, 10, 11, 63, 64, 65, 12, 0, 2667 13, 14, 15, 16, 17, 18, 19, 0, 302, 0, 2668 303, 0, 20, 21, 22, 23, 24, 25, 26, 0, 2669 0, 27, 0, 0, 0, 0, 0, 0, 29, 0, 2670 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2671 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 2672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2673 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 2674 0, 203, 50, 0, 51, 52, 0, 0, 0, 0, 2675 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 2676 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 2677 7, 8, 9, 0, 0, 0, 10, 11, 63, 64, 2678 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 2679 0, 0, 0, 231, 0, 20, 21, 22, 23, 24, 2680 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 2681 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 2682 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 2683 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 2684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2685 0, 48, 0, 0, 49, 50, 0, 51, 52, 0, 2686 53, 0, 0, 54, 55, 56, 57, 58, 59, 60, 2687 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 2688 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 2689 11, 63, 64, 65, 12, 0, 13, 14, 15, 16, 2690 17, 18, 19, 0, 498, 0, 0, 0, 20, 21, 2691 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 2692 0, 0, 0, 28, 29, 249, 31, 32, 33, 34, 2693 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 2694 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 2695 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2696 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 2697 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 2698 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 2699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2700 0, 0, 0, 0, 63, 64, 65, 0, 0, 0, 2701 0, 0, 0, 0, 0, 0, 0, 498, 118, 119, 2702 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 2703 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 2704 140, 141, 0, 0, 0, 142, 143, 144, 384, 385, 2705 386, 387, 149, 150, 151, 0, 0, 0, 0, 0, 2706 152, 153, 154, 155, 388, 389, 390, 391, 160, 37, 2707 38, 392, 40, 0, 0, 0, 0, 0, 0, 0, 2708 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 2709 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 2710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2711 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 2712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2713 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 2714 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 2715 191, 393, 118, 119, 120, 121, 122, 123, 124, 125, 2716 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 2717 136, 137, 138, 139, 140, 141, 0, 0, 0, 142, 2718 143, 144, 145, 146, 147, 148, 149, 150, 151, 0, 2719 0, 0, 0, 0, 152, 153, 154, 155, 156, 157, 2720 158, 159, 160, 280, 281, 161, 282, 0, 0, 0, 2721 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 2722 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 2723 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 2724 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 2725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2726 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 2727 184, 185, 186, 187, 188, 0, 189, 190, 0, 0, 2728 0, 0, 0, 0, 191, 118, 119, 120, 121, 122, 2729 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 2730 133, 134, 135, 136, 137, 138, 139, 140, 141, 0, 2731 0, 0, 142, 143, 144, 145, 146, 147, 148, 149, 2732 150, 151, 0, 0, 0, 0, 0, 152, 153, 154, 2733 155, 156, 157, 158, 159, 160, 233, 0, 161, 0, 2734 0, 0, 0, 0, 0, 0, 0, 0, 162, 163, 2735 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 2736 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 2737 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 2738 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 2739 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 2740 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 2741 190, 0, 0, 0, 0, 0, 0, 191, 118, 119, 2742 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 2743 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 2744 140, 141, 0, 0, 0, 142, 143, 144, 145, 146, 2745 147, 148, 149, 150, 151, 0, 0, 0, 0, 0, 2746 152, 153, 154, 155, 156, 157, 158, 159, 160, 0, 2747 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 2748 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 2749 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 2750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2751 177, 178, 0, 0, 55, 0, 0, 0, 0, 0, 2752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2753 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 2754 188, 0, 189, 190, 0, 0, 0, 0, 0, 0, 2755 191, 118, 119, 120, 121, 122, 123, 124, 125, 126, 2756 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 2757 137, 138, 139, 140, 141, 0, 0, 0, 142, 143, 2758 144, 145, 146, 147, 148, 149, 150, 151, 0, 0, 2759 0, 0, 0, 152, 153, 154, 155, 156, 157, 158, 2760 159, 160, 0, 0, 161, 0, 0, 0, 0, 0, 2761 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 2762 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 2763 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 2764 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 2765 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2766 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 2767 185, 186, 187, 188, 0, 189, 190, 5, 6, 7, 2768 0, 9, 0, 191, 0, 10, 11, 0, 0, 0, 2769 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 2770 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 2771 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 2772 268, 0, 0, 32, 33, 34, 35, 36, 37, 38, 2773 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 2774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2776 269, 0, 0, 203, 50, 0, 51, 52, 0, 0, 2777 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 2778 62, 0, 0, 0, 0, 0, 5, 6, 7, 0, 2779 9, 0, 0, 0, 10, 11, 0, 0, 0, 12, 2780 270, 13, 14, 15, 238, 239, 18, 19, 271, 0, 2781 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 2782 0, 0, 200, 0, 0, 0, 0, 0, 0, 268, 2783 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 2784 40, 0, 41, 42, 0, 43, 44, 45, 0, 0, 2785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2786 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 2787 0, 0, 203, 50, 0, 51, 52, 0, 0, 0, 2788 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 2789 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 2790 0, 0, 0, 10, 11, 0, 0, 0, 12, 270, 2791 13, 14, 15, 16, 17, 18, 19, 518, 0, 0, 2792 0, 0, 20, 21, 22, 23, 24, 25, 26, 0, 2793 0, 27, 0, 0, 0, 0, 0, 28, 29, 30, 2794 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2795 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 2796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2797 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 2798 0, 49, 50, 0, 51, 52, 0, 53, 0, 0, 2799 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 2800 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 2801 7, 0, 9, 0, 0, 0, 10, 11, 63, 64, 2802 65, 12, 0, 13, 14, 15, 16, 17, 18, 19, 2803 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 2804 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 2805 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 2806 38, 39, 40, 201, 41, 42, 0, 43, 44, 45, 2807 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 2808 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2809 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 2810 204, 205, 206, 54, 55, 56, 57, 58, 59, 60, 2811 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 2812 0, 5, 6, 7, 8, 9, 0, 0, 0, 10, 2813 11, 63, 207, 65, 12, 0, 13, 14, 15, 16, 2814 17, 18, 19, 0, 0, 0, 0, 0, 20, 21, 2815 22, 23, 24, 25, 26, 0, 0, 27, 0, 0, 2816 0, 0, 0, 28, 29, 0, 31, 32, 33, 34, 2817 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 2818 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 2819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2820 0, 0, 0, 0, 48, 0, 0, 49, 50, 0, 2821 51, 52, 0, 53, 0, 0, 54, 55, 56, 57, 2822 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 2823 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 2824 0, 0, 10, 11, 63, 64, 65, 12, 0, 13, 2825 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 2826 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 2827 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 2828 32, 33, 34, 35, 36, 37, 38, 39, 40, 201, 2829 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 2830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2831 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 2832 203, 50, 0, 51, 52, 0, 608, 205, 206, 54, 2833 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 2834 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 2835 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 2836 12, 0, 13, 14, 15, 238, 239, 18, 19, 0, 2837 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 2838 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 2839 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 2840 39, 40, 201, 41, 42, 0, 43, 44, 45, 0, 2841 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 2842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2843 202, 0, 0, 203, 50, 0, 51, 52, 0, 204, 2844 205, 0, 54, 55, 56, 57, 58, 59, 60, 61, 2845 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2846 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 2847 63, 207, 65, 12, 0, 13, 14, 15, 238, 239, 2848 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 2849 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 2850 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 2851 36, 37, 38, 39, 40, 201, 41, 42, 0, 43, 2852 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 2853 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2854 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 2855 52, 0, 0, 205, 206, 54, 55, 56, 57, 58, 2856 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 2857 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 2858 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 2859 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 2860 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 2861 0, 0, 0, 0, 0, 0, 29, 0, 0, 32, 2862 33, 34, 35, 36, 37, 38, 39, 40, 201, 41, 2863 42, 0, 43, 44, 45, 0, 46, 47, 0, 0, 2864 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2865 0, 0, 0, 0, 0, 0, 202, 0, 0, 203, 2866 50, 0, 51, 52, 0, 608, 205, 0, 54, 55, 2867 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 2868 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 2869 9, 0, 0, 0, 10, 11, 63, 207, 65, 12, 2870 0, 13, 14, 15, 238, 239, 18, 19, 0, 0, 2871 0, 0, 0, 240, 241, 242, 23, 24, 25, 26, 2872 0, 0, 200, 0, 0, 0, 0, 0, 0, 29, 2873 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 2874 40, 201, 41, 42, 0, 43, 44, 45, 0, 46, 2875 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2876 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 2877 0, 0, 203, 50, 0, 51, 52, 0, 0, 205, 2878 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 2879 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2880 6, 7, 0, 9, 0, 0, 0, 10, 11, 63, 2881 207, 65, 12, 0, 13, 14, 15, 16, 17, 18, 2882 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 2883 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 2884 0, 0, 29, 0, 0, 32, 33, 34, 35, 36, 2885 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 2886 45, 0, 46, 47, 0, 0, 0, 0, 0, 0, 2887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2888 0, 0, 202, 0, 0, 203, 50, 0, 51, 52, 2889 0, 512, 0, 0, 54, 55, 56, 57, 58, 59, 2890 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 2891 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 2892 10, 11, 63, 207, 65, 12, 0, 13, 14, 15, 2893 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 2894 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 2895 0, 0, 0, 0, 0, 29, 0, 0, 32, 33, 2896 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 2897 0, 43, 44, 45, 0, 46, 47, 0, 0, 0, 2898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2899 0, 0, 0, 0, 0, 202, 0, 0, 203, 50, 2900 0, 51, 52, 0, 204, 0, 0, 54, 55, 56, 2901 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 2902 0, 0, 0, 0, 0, 5, 6, 7, 0, 9, 2903 0, 0, 0, 10, 11, 63, 207, 65, 12, 0, 2904 13, 14, 15, 238, 239, 18, 19, 0, 0, 0, 2905 0, 0, 240, 241, 242, 23, 24, 25, 26, 0, 2906 0, 200, 0, 0, 0, 0, 0, 0, 29, 0, 2907 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2908 0, 41, 42, 0, 43, 44, 45, 0, 46, 47, 2909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2910 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 2911 0, 203, 50, 0, 51, 52, 0, 816, 0, 0, 2912 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 2913 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 2914 7, 0, 9, 0, 0, 0, 10, 11, 63, 207, 2915 65, 12, 0, 13, 14, 15, 238, 239, 18, 19, 2916 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 2917 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 2918 0, 29, 0, 0, 32, 33, 34, 35, 36, 37, 2919 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 2920 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 2921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2922 0, 202, 0, 0, 203, 50, 0, 51, 52, 0, 2923 512, 0, 0, 54, 55, 56, 57, 58, 59, 60, 2924 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 2925 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 2926 11, 63, 207, 65, 12, 0, 13, 14, 15, 238, 2927 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 2928 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 2929 0, 0, 0, 0, 29, 0, 0, 32, 33, 34, 2930 35, 36, 37, 38, 39, 40, 0, 41, 42, 0, 2931 43, 44, 45, 0, 46, 47, 0, 0, 0, 0, 2932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2933 0, 0, 0, 0, 202, 0, 0, 203, 50, 0, 2934 51, 52, 0, 608, 0, 0, 54, 55, 56, 57, 2935 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 2936 0, 0, 0, 0, 5, 6, 7, 0, 9, 0, 2937 0, 0, 10, 11, 63, 207, 65, 12, 0, 13, 2938 14, 15, 238, 239, 18, 19, 0, 0, 0, 0, 2939 0, 240, 241, 242, 23, 24, 25, 26, 0, 0, 2940 200, 0, 0, 0, 0, 0, 0, 29, 0, 0, 2941 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 2942 41, 42, 0, 43, 44, 45, 0, 46, 47, 0, 2943 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2944 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 2945 203, 50, 0, 51, 52, 0, 0, 0, 0, 54, 2946 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 2947 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 2948 0, 9, 0, 0, 0, 10, 11, 63, 207, 65, 2949 12, 0, 13, 14, 15, 16, 17, 18, 19, 0, 2950 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 2951 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, 2952 29, 0, 0, 32, 33, 34, 35, 36, 37, 38, 2953 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 2954 46, 47, 0, 0, 0, 0, 0, 0, 0, 0, 2955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2956 202, 0, 0, 203, 50, 0, 51, 52, 0, 0, 2957 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 2958 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2959 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 2960 63, 64, 65, 12, 0, 13, 14, 15, 16, 17, 2961 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 2962 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 2963 0, 0, 0, 29, 0, 0, 32, 33, 34, 35, 2964 36, 37, 38, 39, 40, 0, 41, 42, 0, 43, 2965 44, 45, 0, 46, 47, 0, 0, 0, 0, 0, 2966 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2967 0, 0, 0, 202, 0, 0, 203, 50, 0, 51, 2968 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 2969 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 2970 0, 0, 0, 5, 6, 7, 0, 9, 0, 0, 2971 0, 10, 11, 63, 207, 65, 12, 0, 13, 14, 2972 15, 238, 239, 18, 19, 0, 0, 0, 0, 0, 2973 240, 241, 242, 23, 24, 25, 26, 0, 0, 200, 2974 0, 0, 0, 0, 0, 0, 268, 0, 0, 32, 2975 33, 34, 35, 36, 37, 38, 39, 40, 0, 41, 2976 42, 0, 43, 44, 45, 0, 0, 0, 0, 0, 2977 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2978 0, 0, 0, 0, 0, 0, 269, 0, 0, 323, 2979 50, 0, 51, 52, 0, 324, 0, 0, 54, 55, 2980 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 2981 0, 0, 5, 6, 7, 0, 9, 0, 0, 0, 2982 10, 11, 0, 0, 0, 12, 270, 13, 14, 15, 2983 238, 239, 18, 19, 0, 0, 0, 0, 0, 240, 2984 241, 242, 23, 24, 25, 26, 0, 0, 200, 0, 2985 0, 0, 0, 0, 0, 268, 0, 0, 32, 33, 2986 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 2987 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 2988 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2989 0, 0, 0, 0, 0, 365, 0, 0, 49, 50, 2990 0, 51, 52, 0, 53, 0, 0, 54, 55, 56, 2991 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 2992 0, 5, 6, 7, 0, 9, 0, 0, 0, 10, 2993 11, 0, 0, 0, 12, 270, 13, 14, 15, 238, 2994 239, 18, 19, 0, 0, 0, 0, 0, 240, 241, 2995 242, 23, 24, 25, 26, 0, 0, 200, 0, 0, 2996 0, 0, 0, 0, 268, 0, 0, 32, 33, 34, 2997 373, 36, 37, 38, 374, 40, 0, 41, 42, 0, 2998 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 2999 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3000 0, 375, 0, 0, 376, 0, 0, 203, 50, 0, 3001 51, 52, 0, 0, 0, 0, 54, 55, 56, 57, 3002 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 3003 5, 6, 7, 0, 9, 0, 0, 0, 10, 11, 3004 0, 0, 0, 12, 270, 13, 14, 15, 238, 239, 3005 18, 19, 0, 0, 0, 0, 0, 240, 241, 242, 3006 23, 24, 25, 26, 0, 0, 200, 0, 0, 0, 3007 0, 0, 0, 268, 0, 0, 32, 33, 34, 373, 3008 36, 37, 38, 374, 40, 0, 41, 42, 0, 43, 3009 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 3010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3011 0, 0, 0, 376, 0, 0, 203, 50, 0, 51, 3012 52, 0, 0, 0, 0, 54, 55, 56, 57, 58, 3013 59, 60, 61, 62, 0, 0, 0, 0, 0, 5, 3014 6, 7, 0, 9, 0, 0, 0, 10, 11, 0, 3015 0, 0, 12, 270, 13, 14, 15, 238, 239, 18, 3016 19, 0, 0, 0, 0, 0, 240, 241, 242, 23, 3017 24, 25, 26, 0, 0, 200, 0, 0, 0, 0, 3018 0, 0, 268, 0, 0, 32, 33, 34, 35, 36, 3019 37, 38, 39, 40, 0, 41, 42, 0, 43, 44, 3020 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3021 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3022 0, 0, 269, 0, 0, 323, 50, 0, 51, 52, 3023 0, 0, 0, 0, 54, 55, 56, 57, 58, 59, 3024 60, 61, 62, 0, 0, 0, 0, 0, 5, 6, 3025 7, 0, 9, 0, 0, 0, 10, 11, 0, 0, 3026 0, 12, 270, 13, 14, 15, 238, 239, 18, 19, 3027 0, 0, 0, 0, 0, 240, 241, 242, 23, 24, 3028 25, 26, 0, 0, 200, 0, 0, 0, 0, 0, 3029 0, 268, 0, 0, 32, 33, 34, 35, 36, 37, 3030 38, 39, 40, 0, 41, 42, 0, 43, 44, 45, 3031 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3032 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3033 0, 893, 0, 0, 203, 50, 0, 51, 52, 0, 3034 0, 0, 0, 54, 55, 56, 57, 58, 59, 60, 3035 61, 62, 0, 0, 0, 0, 0, 5, 6, 7, 3036 0, 9, 0, 0, 0, 10, 11, 0, 0, 0, 3037 12, 270, 13, 14, 15, 238, 239, 18, 19, 0, 3038 0, 0, 0, 0, 240, 241, 242, 23, 24, 25, 3039 26, 0, 0, 200, 0, 0, 0, 0, 0, 0, 3040 268, 0, 0, 32, 33, 34, 35, 36, 37, 38, 3041 39, 40, 0, 41, 42, 0, 43, 44, 45, 0, 3042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3043 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3044 973, 0, 0, 203, 50, 0, 51, 52, 0, 0, 3045 0, 0, 54, 55, 56, 57, 58, 59, 60, 61, 3046 62, 0, 0, 0, 0, 0, 0, 553, 554, 0, 3047 0, 555, 0, 0, 0, 0, 0, 0, 0, 0, 3048 270, 162, 163, 164, 165, 166, 167, 168, 169, 170, 3049 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 3050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3051 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 3052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3053 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 3054 188, 0, 189, 190, 561, 562, 0, 0, 563, 0, 3055 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 3056 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 3057 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 3058 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 3059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3060 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 3061 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 3062 190, 598, 562, 0, 0, 599, 0, 191, 0, 0, 3063 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 3064 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 3065 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 3066 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 3067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3068 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 3069 184, 185, 186, 187, 188, 0, 189, 190, 612, 554, 3070 0, 0, 613, 0, 191, 0, 0, 0, 0, 0, 3071 0, 0, 162, 163, 164, 165, 166, 167, 168, 169, 3072 170, 0, 0, 171, 172, 0, 0, 173, 174, 175, 3073 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3074 0, 177, 178, 0, 0, 0, 0, 0, 0, 0, 3075 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3076 0, 0, 179, 180, 181, 182, 183, 184, 185, 186, 3077 187, 188, 0, 189, 190, 615, 562, 0, 0, 616, 3078 0, 191, 0, 0, 0, 0, 0, 0, 0, 162, 3079 163, 164, 165, 166, 167, 168, 169, 170, 0, 0, 3080 171, 172, 0, 0, 173, 174, 175, 176, 0, 0, 3081 0, 0, 0, 0, 0, 0, 0, 0, 177, 178, 3082 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3083 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, 3084 180, 181, 182, 183, 184, 185, 186, 187, 188, 0, 3085 189, 190, 639, 554, 0, 0, 640, 0, 191, 0, 3086 0, 0, 0, 0, 0, 0, 162, 163, 164, 165, 3087 166, 167, 168, 169, 170, 0, 0, 171, 172, 0, 3088 0, 173, 174, 175, 176, 0, 0, 0, 0, 0, 3089 0, 0, 0, 0, 0, 177, 178, 0, 0, 0, 3090 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3091 0, 0, 0, 0, 0, 0, 179, 180, 181, 182, 3092 183, 184, 185, 186, 187, 188, 0, 189, 190, 642, 3093 562, 0, 0, 643, 0, 191, 0, 0, 0, 0, 3094 0, 0, 0, 162, 163, 164, 165, 166, 167, 168, 3095 169, 170, 0, 0, 171, 172, 0, 0, 173, 174, 3096 175, 176, 0, 0, 0, 0, 0, 0, 0, 0, 3097 0, 0, 177, 178, 0, 0, 0, 0, 0, 0, 3098 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3099 0, 0, 0, 179, 180, 181, 182, 183, 184, 185, 3100 186, 187, 188, 0, 189, 190, 727, 554, 0, 0, 3101 728, 0, 191, 0, 0, 0, 0, 0, 0, 0, 3102 162, 163, 164, 165, 166, 167, 168, 169, 170, 0, 3103 0, 171, 172, 0, 0, 173, 174, 175, 176, 0, 3104 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 3105 178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3107 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 3108 0, 189, 190, 730, 562, 0, 0, 731, 0, 191, 3109 0, 0, 0, 0, 0, 0, 0, 162, 163, 164, 3110 165, 166, 167, 168, 169, 170, 0, 0, 171, 172, 3111 0, 0, 173, 174, 175, 176, 0, 0, 0, 0, 3112 0, 0, 0, 0, 0, 0, 177, 178, 0, 0, 3113 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3114 0, 0, 0, 0, 0, 0, 0, 179, 180, 181, 3115 182, 183, 184, 185, 186, 187, 188, 0, 189, 190, 3116 737, 554, 0, 0, 738, 0, 191, 0, 0, 0, 3117 0, 0, 0, 0, 162, 163, 164, 165, 166, 167, 3118 168, 169, 170, 0, 0, 171, 172, 0, 0, 173, 3119 174, 175, 176, 0, 0, 0, 0, 0, 0, 0, 3120 0, 0, 0, 177, 178, 0, 0, 0, 0, 0, 3121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3122 0, 0, 0, 0, 179, 180, 181, 182, 183, 184, 3123 185, 186, 187, 188, 0, 189, 190, 1001, 554, 0, 3124 0, 1002, 0, 191, 0, 0, 0, 0, 0, 0, 3125 0, 162, 163, 164, 165, 166, 167, 168, 169, 170, 3126 0, 0, 171, 172, 0, 0, 173, 174, 175, 176, 3127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3128 177, 178, 0, 0, 0, 0, 0, 0, 0, 0, 3129 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3130 0, 179, 180, 181, 182, 183, 184, 185, 186, 187, 3131 188, 0, 189, 190, 1036, 554, 0, 0, 1037, 0, 3132 191, 0, 0, 0, 0, 0, 0, 0, 162, 163, 3133 164, 165, 166, 167, 168, 169, 170, 0, 0, 171, 3134 172, 0, 0, 173, 174, 175, 176, 0, 0, 0, 3135 0, 0, 0, 0, 0, 0, 0, 177, 178, 0, 3136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3137 0, 0, 0, 0, 0, 0, 0, 0, 179, 180, 3138 181, 182, 183, 184, 185, 186, 187, 188, 0, 189, 3139 190, 1039, 562, 0, 0, 1040, 0, 191, 0, 0, 3140 0, 0, 0, 0, 0, 162, 163, 164, 165, 166, 3141 167, 168, 169, 170, 0, 0, 171, 172, 0, 0, 3142 173, 174, 175, 176, 0, 0, 0, 0, 0, 0, 3143 0, 0, 0, 0, 177, 178, 0, 0, 0, 0, 3144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3145 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, 3146 184, 185, 186, 187, 188, 0, 189, 190, 0, 0, 3147 0, 0, 0, 0, 191 3148}; 3149 3150#define yypact_value_is_default(yystate) \ 3151 ((yystate) == (-810)) 3152 3153#define yytable_value_is_error(yytable_value) \ 3154 ((yytable_value) == (-620)) 3155 3156static const yytype_int16 yycheck[] = 3157{ 3158 2, 55, 96, 16, 17, 8, 79, 20, 22, 64, 3159 354, 326, 16, 17, 8, 220, 20, 50, 27, 8, 3160 29, 472, 326, 28, 87, 28, 359, 90, 412, 353, 3161 4, 355, 420, 74, 28, 2, 420, 4, 53, 28, 3162 94, 668, 49, 90, 575, 594, 614, 51, 262, 51, 3163 52, 685, 266, 86, 87, 574, 67, 90, 440, 468, 3164 74, 55, 13, 651, 79, 786, 2, 376, 4, 49, 3165 458, 508, 416, 641, 511, 399, 91, 92, 93, 27, 3166 16, 17, 53, 776, 20, 874, 250, 472, 67, 778, 3167 87, 415, 715, 417, 16, 17, 719, 906, 20, 26, 3168 94, 872, 0, 37, 38, 13, 25, 230, 801, 518, 3169 25, 90, 26, 49, 50, 85, 113, 53, 25, 443, 3170 141, 61, 61, 13, 1, 85, 470, 85, 64, 85, 3171 16, 17, 255, 25, 20, 97, 259, 134, 902, 76, 3172 130, 85, 134, 79, 778, 596, 25, 471, 28, 141, 3173 86, 87, 786, 29, 90, 91, 92, 93, 120, 323, 3174 286, 729, 288, 133, 290, 51, 52, 938, 294, 25, 3175 110, 110, 740, 133, 25, 133, 132, 133, 805, 806, 3176 25, 118, 770, 771, 25, 136, 56, 736, 139, 133, 3177 141, 139, 13, 141, 140, 744, 203, 230, 271, 232, 3178 113, 990, 243, 130, 1013, 252, 657, 141, 897, 136, 3179 140, 224, 214, 226, 227, 134, 130, 136, 220, 134, 3180 224, 992, 226, 944, 429, 227, 134, 134, 13, 13, 3181 237, 139, 134, 141, 622, 111, 580, 621, 622, 1003, 3182 117, 252, 134, 250, 307, 308, 309, 310, 592, 139, 3183 632, 141, 85, 690, 1025, 134, 271, 581, 885, 268, 3184 949, 113, 139, 897, 141, 85, 321, 203, 902, 593, 3185 250, 326, 657, 252, 307, 308, 309, 310, 134, 312, 3186 313, 248, 591, 134, 872, 136, 874, 696, 224, 134, 3187 226, 227, 743, 134, 230, 87, 232, 360, 361, 422, 3188 133, 237, 224, 426, 226, 928, 37, 38, 431, 324, 3189 944, 87, 248, 133, 250, 362, 323, 321, 139, 1008, 3190 141, 113, 326, 68, 447, 113, 136, 360, 361, 452, 3191 100, 141, 306, 852, 87, 271, 963, 113, 224, 306, 3192 226, 354, 375, 323, 311, 61, 134, 402, 403, 65, 3193 938, 939, 354, 324, 139, 139, 141, 141, 743, 485, 3194 113, 355, 25, 61, 85, 140, 492, 61, 140, 1003, 3195 306, 307, 308, 309, 310, 311, 312, 313, 123, 124, 3196 125, 930, 697, 362, 139, 321, 141, 323, 324, 136, 3197 326, 107, 725, 109, 517, 468, 685, 928, 15, 378, 3198 17, 25, 990, 416, 992, 399, 611, 68, 85, 107, 3199 714, 109, 133, 107, 416, 109, 26, 85, 354, 134, 3200 356, 85, 636, 417, 360, 361, 428, 429, 85, 52, 3201 56, 26, 437, 56, 437, 87, 26, 1025, 440, 375, 3202 989, 113, 140, 437, 85, 518, 140, 134, 437, 443, 3203 113, 134, 88, 468, 85, 132, 133, 470, 141, 136, 3204 121, 122, 123, 124, 125, 133, 402, 403, 470, 133, 3205 1038, 134, 87, 440, 137, 85, 133, 471, 141, 867, 3206 416, 87, 87, 867, 935, 87, 134, 703, 134, 113, 3207 85, 132, 133, 141, 710, 85, 136, 786, 113, 61, 3208 789, 132, 133, 518, 440, 507, 508, 113, 61, 511, 3209 134, 113, 61, 137, 450, 136, 557, 141, 130, 134, 3210 130, 26, 132, 133, 565, 52, 412, 54, 55, 56, 3211 57, 68, 468, 542, 470, 130, 136, 132, 133, 137, 3212 130, 136, 132, 133, 558, 107, 136, 109, 110, 85, 3213 113, 560, 566, 138, 107, 760, 109, 110, 107, 600, 3214 109, 110, 595, 570, 637, 572, 568, 580, 670, 455, 3215 672, 131, 576, 85, 59, 60, 577, 87, 580, 592, 3216 85, 56, 518, 916, 87, 110, 600, 581, 87, 922, 3217 592, 87, 625, 85, 573, 574, 132, 133, 600, 593, 3218 605, 61, 605, 113, 134, 614, 110, 134, 587, 611, 3219 113, 605, 110, 902, 113, 904, 605, 113, 68, 742, 3220 132, 133, 637, 696, 134, 130, 110, 132, 133, 58, 3221 632, 136, 641, 68, 570, 134, 572, 61, 761, 68, 3222 132, 133, 697, 94, 580, 700, 701, 107, 685, 109, 3223 110, 774, 707, 708, 748, 944, 592, 946, 594, 595, 3224 85, 134, 951, 704, 666, 632, 668, 96, 97, 732, 3225 711, 17, 735, 1017, 59, 60, 685, 139, 87, 686, 3226 58, 696, 689, 107, 691, 109, 110, 56, 690, 625, 3227 68, 120, 746, 25, 1018, 137, 632, 85, 134, 732, 3228 134, 637, 735, 685, 113, 131, 134, 132, 133, 711, 3229 714, 130, 714, 715, 1003, 717, 1005, 719, 96, 97, 3230 729, 1010, 134, 724, 52, 134, 54, 55, 56, 57, 3231 85, 740, 14, 15, 140, 621, 859, 140, 1027, 134, 3232 741, 134, 120, 780, 132, 133, 85, 784, 871, 113, 3233 686, 134, 746, 689, 733, 691, 136, 10, 760, 1048, 3234 696, 697, 8, 85, 700, 701, 745, 776, 2, 13, 3235 4, 707, 708, 828, 85, 131, 85, 132, 133, 842, 3236 882, 883, 16, 17, 799, 887, 20, 889, 890, 113, 3237 134, 134, 801, 132, 133, 52, 732, 134, 780, 735, 3238 736, 134, 52, 805, 806, 134, 134, 814, 744, 842, 3239 132, 133, 52, 134, 115, 49, 50, 54, 55, 138, 3240 57, 132, 133, 132, 133, 15, 63, 64, 134, 87, 3241 64, 131, 839, 113, 118, 837, 134, 134, 840, 846, 3242 847, 134, 843, 850, 845, 52, 87, 54, 55, 56, 3243 57, 58, 86, 87, 855, 113, 90, 134, 134, 860, 3244 897, 68, 899, 799, 139, 902, 10, 904, 131, 10, 3245 877, 878, 113, 852, 134, 854, 134, 892, 814, 808, 3246 809, 9, 89, 885, 891, 88, 134, 134, 95, 96, 3247 97, 134, 828, 134, 996, 997, 998, 999, 54, 137, 3248 915, 134, 134, 839, 56, 118, 842, 63, 64, 131, 3249 846, 847, 919, 120, 850, 897, 123, 899, 134, 134, 3250 902, 10, 904, 131, 925, 926, 928, 52, 108, 54, 3251 55, 56, 57, 52, 141, 54, 55, 56, 57, 58, 3252 134, 877, 878, 134, 1046, 134, 134, 56, 52, 68, 3253 54, 55, 56, 57, 136, 891, 892, 134, 134, 134, 3254 969, 963, 136, 450, 89, 91, 1003, 711, 1005, 203, 3255 89, 1008, 979, 1010, 981, 93, 1020, 96, 97, 915, 3256 987, 770, 685, 919, 1013, 89, 749, 988, 1019, 99, 3257 224, 95, 226, 227, 930, 294, 230, 57, 232, 94, 3258 935, 120, 780, 237, 1017, 52, 899, 54, 55, 56, 3259 57, 1048, 897, 778, 248, 1017, 250, 1019, 1020, 396, 3260 1021, 1003, 1023, 1005, 1018, -1, 1008, -1, 1010, 1038, 3261 -1, 960, 961, -1, -1, 964, -1, 966, 967, -1, 3262 -1, -1, 89, 979, 68, 981, -1, -1, 95, -1, 3263 -1, 987, -1, 989, 68, -1, -1, -1, -1, 83, 3264 84, 40, 41, 42, 43, 44, 1048, -1, -1, 83, 3265 84, -1, 306, 307, 308, 309, 310, 311, 312, 313, 3266 52, 1017, 54, 55, 56, 57, -1, 321, -1, 323, 3267 -1, -1, 326, -1, 118, 119, 120, 121, 122, 123, 3268 124, 125, 1031, 1032, 1033, 1034, 120, 121, 122, 123, 3269 124, 125, -1, -1, -1, -1, -1, -1, -1, -1, 3270 354, -1, 356, -1, -1, 1054, 360, 361, -1, -1, 3271 -1, -1, -1, 52, -1, 54, 55, 56, 57, 58, 3272 -1, 375, -1, -1, -1, -1, -1, -1, 0, 68, 3273 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1, 3274 -1, 13, 14, 15, -1, 17, -1, -1, 402, 403, 3275 89, -1, -1, -1, 26, 27, 95, 96, 97, -1, 3276 -1, -1, 416, -1, -1, 37, 38, 68, 40, 41, 3277 42, 43, 44, -1, 52, -1, 54, 55, 56, 57, 3278 58, 120, 83, 84, 123, -1, 440, -1, -1, -1, 3279 68, -1, -1, -1, -1, -1, 450, 136, -1, -1, 3280 -1, -1, -1, -1, 16, 17, -1, -1, 20, -1, 3281 -1, 89, -1, 85, -1, -1, 470, 95, 96, 97, 3282 121, 122, 123, 124, 125, -1, -1, -1, -1, -1, 3283 -1, -1, -1, -1, 46, 47, 108, -1, -1, 51, 3284 52, -1, 120, -1, -1, 123, -1, -1, -1, -1, 3285 -1, -1, 64, 65, -1, 44, -1, -1, 130, 131, 3286 -1, 133, -1, -1, 136, 137, -1, 139, -1, 141, 3287 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 3288 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 3289 79, 80, -1, -1, 83, 84, -1, -1, -1, -1, 3290 -1, -1, -1, -1, -1, -1, 52, -1, 54, 55, 3291 56, 57, 58, -1, -1, -1, 570, -1, 572, -1, 3292 -1, -1, 68, -1, -1, 114, 580, 116, 117, 118, 3293 119, 120, 121, 122, 123, 124, 125, -1, 592, -1, 3294 594, 595, -1, 89, -1, 134, -1, -1, -1, 95, 3295 96, 97, -1, 68, 69, 70, 71, 72, 73, 74, 3296 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3297 -1, 625, -1, -1, 120, -1, -1, 123, 632, -1, 3298 -1, -1, 2, -1, 4, -1, -1, -1, -1, 201, 3299 136, -1, 204, 205, 206, 207, -1, -1, 52, 114, 3300 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3301 125, -1, 224, -1, 226, 227, -1, -1, 52, -1, 3302 54, 55, 56, 57, 58, -1, 141, -1, -1, 49, 3303 -1, -1, 686, 53, 68, 689, -1, 691, -1, -1, 3304 -1, -1, -1, 697, -1, -1, 700, 701, -1, -1, 3305 -1, -1, -1, 707, 708, 89, -1, -1, -1, 79, 3306 -1, 95, 96, 97, -1, -1, -1, -1, -1, -1, 3307 -1, 91, 92, 93, 94, -1, -1, -1, 732, -1, 3308 -1, 735, 736, -1, -1, -1, 120, -1, -1, 123, 3309 744, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3310 -1, -1, -1, -1, -1, -1, -1, -1, -1, 321, 3311 -1, -1, -1, -1, 326, 327, 328, 329, 330, 331, 3312 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 3313 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 3314 352, -1, 354, -1, -1, -1, -1, 201, -1, -1, 3315 204, 205, 206, -1, -1, -1, -1, -1, -1, -1, 3316 814, -1, -1, -1, -1, 52, -1, 54, 55, 56, 3317 57, 58, -1, -1, 828, -1, -1, -1, -1, -1, 3318 -1, 68, -1, 203, -1, 839, -1, -1, 842, -1, 3319 402, 403, 846, 847, -1, -1, 850, -1, 410, 411, 3320 412, -1, 89, -1, 416, -1, 418, 419, 420, 96, 3321 97, -1, -1, -1, -1, -1, -1, 237, -1, -1, 3322 -1, -1, -1, 877, 878, -1, -1, 439, 248, -1, 3323 250, -1, 444, 120, -1, -1, -1, 891, -1, -1, 3324 -1, -1, -1, 455, -1, -1, 458, -1, -1, -1, 3325 -1, 271, -1, -1, -1, 2, -1, 4, 470, -1, 3326 -1, -1, -1, -1, -1, 919, -1, 321, -1, -1, 3327 -1, 2, 326, 4, -1, -1, 930, -1, -1, -1, 3328 -1, -1, -1, -1, 496, 497, 306, -1, -1, -1, 3329 -1, 311, -1, -1, -1, -1, -1, -1, -1, -1, 3330 512, -1, 49, 323, 324, -1, 53, -1, -1, -1, 3331 -1, -1, -1, -1, -1, -1, -1, -1, 49, -1, 3332 -1, -1, 53, -1, -1, 979, -1, 981, -1, -1, 3333 -1, -1, 79, 987, -1, 989, 356, -1, -1, -1, 3334 -1, -1, -1, -1, 91, 92, 93, 94, 79, -1, 3335 -1, -1, -1, -1, -1, -1, -1, 411, 412, -1, 3336 91, 92, 93, 1017, 576, -1, 420, -1, 580, -1, 3337 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3338 592, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3339 -1, -1, -1, -1, -1, -1, 608, -1, -1, -1, 3340 -1, 455, -1, -1, 458, -1, -1, -1, -1, 621, 3341 622, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3342 440, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3343 450, -1, -1, -1, -1, -1, -1, 649, -1, -1, 3344 -1, -1, -1, -1, -1, -1, -1, -1, 468, -1, 3345 -1, -1, -1, -1, -1, -1, 203, -1, 512, -1, 3346 -1, -1, -1, -1, 2, -1, 4, -1, -1, -1, 3347 -1, -1, 203, -1, -1, -1, -1, -1, -1, -1, 3348 2, 693, 4, -1, -1, 697, 698, -1, 700, 701, 3349 237, -1, -1, -1, -1, 707, 708, -1, 518, -1, 3350 -1, 248, 714, 250, -1, -1, 237, -1, -1, -1, 3351 -1, 49, -1, -1, -1, -1, -1, 248, -1, 250, 3352 -1, -1, 576, -1, 271, -1, -1, 49, -1, -1, 3353 -1, -1, -1, -1, -1, -1, -1, -1, -1, 751, 3354 271, -1, -1, 755, 756, -1, 758, 759, -1, -1, 3355 570, -1, 572, 91, 608, 767, -1, -1, -1, 306, 3356 -1, -1, -1, -1, 311, -1, -1, 621, 622, -1, 3357 -1, -1, -1, -1, 594, 306, 323, 324, -1, -1, 3358 311, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3359 -1, -1, 323, 324, -1, 649, -1, -1, -1, -1, 3360 -1, -1, -1, -1, 816, -1, -1, -1, 820, 356, 3361 -1, -1, 632, -1, -1, -1, 828, 637, -1, -1, 3362 -1, -1, -1, -1, -1, 356, -1, -1, -1, -1, 3363 -1, -1, -1, -1, -1, -1, -1, 849, -1, 693, 3364 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3365 -1, -1, -1, -1, 866, 867, -1, -1, -1, -1, 3366 714, -1, -1, -1, -1, 203, 686, -1, -1, 689, 3367 -1, 691, -1, -1, -1, -1, 696, -1, -1, -1, 3368 -1, 203, -1, -1, -1, -1, -1, -1, -1, -1, 3369 -1, -1, -1, 440, -1, -1, -1, -1, -1, 237, 3370 -1, -1, -1, 450, -1, -1, -1, -1, -1, 440, 3371 248, -1, 250, 767, -1, 237, 736, -1, -1, 450, 3372 -1, 468, -1, -1, 744, -1, 248, -1, 250, -1, 3373 -1, -1, -1, -1, -1, -1, -1, 468, -1, -1, 3374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3375 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3376 -1, -1, 816, -1, -1, -1, -1, -1, 306, -1, 3377 -1, 518, -1, 311, -1, -1, -1, -1, -1, 799, 3378 -1, -1, -1, -1, 306, 323, -1, 518, 326, 311, 3379 -1, -1, -1, -1, 814, 849, -1, -1, -1, -1, 3380 -1, 323, -1, -1, -1, 1017, -1, -1, -1, -1, 3381 -1, -1, -1, 867, -1, -1, -1, -1, 356, 839, 3382 -1, -1, -1, 570, -1, 572, 846, 847, -1, -1, 3383 850, -1, -1, -1, 356, -1, -1, -1, -1, 570, 3384 -1, 572, -1, -1, -1, -1, -1, 594, -1, -1, 3385 -1, -1, -1, -1, -1, -1, -1, 877, 878, -1, 3386 -1, -1, -1, 594, -1, -1, -1, -1, -1, -1, 3387 -1, 891, 892, -1, -1, -1, -1, -1, -1, -1, 3388 -1, -1, -1, -1, -1, 632, -1, -1, -1, -1, 3389 637, -1, -1, -1, -1, 915, -1, -1, -1, 919, 3390 -1, 632, 440, -1, -1, -1, 637, -1, -1, -1, 3391 930, -1, 450, -1, -1, -1, -1, -1, 440, -1, 3392 -1, -1, -1, -1, -1, -1, -1, -1, 450, -1, 3393 -1, -1, -1, -1, -1, -1, -1, -1, -1, 686, 3394 -1, -1, 689, -1, 691, 676, 44, -1, -1, 696, 3395 -1, -1, -1, -1, -1, 686, -1, -1, 689, 979, 3396 691, 981, -1, -1, -1, 696, -1, 987, -1, 989, 3397 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 3398 78, 79, 80, -1, -1, 83, 84, -1, -1, 736, 3399 -1, -1, -1, -1, -1, -1, -1, 744, -1, -1, 3400 -1, -1, -1, -1, -1, 736, -1, -1, -1, -1, 3401 -1, -1, -1, 744, -1, -1, 114, -1, 116, 117, 3402 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 3403 -1, -1, 570, -1, 572, -1, -1, -1, -1, -1, 3404 -1, -1, -1, -1, -1, -1, -1, -1, 570, -1, 3405 572, -1, 799, -1, -1, -1, 594, -1, -1, -1, 3406 -1, -1, -1, -1, -1, -1, -1, 814, 799, -1, 3407 -1, -1, 594, -1, -1, -1, -1, -1, -1, -1, 3408 -1, -1, -1, 814, -1, -1, -1, -1, -1, -1, 3409 -1, -1, 839, -1, 632, -1, -1, -1, -1, 846, 3410 847, -1, -1, 850, -1, -1, -1, -1, 839, -1, 3411 632, -1, -1, -1, -1, 846, 847, -1, -1, 850, 3412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3413 877, 878, -1, -1, -1, -1, -1, -1, -1, -1, 3414 -1, -1, -1, -1, 891, 892, 877, 878, 686, -1, 3415 -1, 689, -1, 691, -1, -1, -1, -1, -1, 697, 3416 891, 892, -1, -1, 686, -1, -1, 689, 915, 691, 3417 -1, -1, 919, -1, -1, -1, -1, -1, -1, -1, 3418 -1, -1, -1, 930, 915, -1, -1, -1, 919, -1, 3419 -1, -1, -1, -1, -1, -1, -1, -1, 736, 930, 3420 -1, -1, -1, -1, -1, -1, 744, -1, -1, -1, 3421 -1, -1, -1, -1, 736, 68, 69, 70, 71, 72, 3422 73, 74, 744, -1, 77, 78, -1, -1, -1, -1, 3423 83, 84, 979, -1, 981, -1, -1, -1, -1, -1, 3424 987, -1, 989, -1, -1, -1, -1, -1, 979, -1, 3425 981, -1, -1, -1, -1, -1, 987, -1, 989, -1, 3426 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 3427 123, 124, 125, -1, -1, -1, 814, -1, -1, -1, 3428 -1, 68, 69, 70, 71, 72, 73, 74, 75, -1, 3429 77, 78, 814, -1, -1, -1, 83, 84, -1, -1, 3430 -1, 839, -1, -1, -1, -1, -1, -1, 846, 847, 3431 -1, -1, 850, -1, -1, -1, -1, 839, -1, -1, 3432 -1, -1, -1, -1, 846, 847, -1, -1, 850, 116, 3433 117, 118, 119, 120, 121, 122, 123, 124, 125, 877, 3434 878, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3435 -1, -1, -1, 891, -1, 877, 878, -1, -1, -1, 3436 -1, -1, -1, -1, -1, -1, -1, -1, -1, 891, 3437 68, 69, 70, 71, 72, 73, 74, 915, -1, 77, 3438 78, 919, -1, -1, -1, 83, 84, -1, -1, -1, 3439 -1, -1, 930, -1, -1, -1, -1, 919, -1, -1, 3440 -1, -1, -1, -1, -1, -1, -1, -1, 930, -1, 3441 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 3442 118, 119, 120, 121, 122, 123, 124, 125, -1, -1, 3443 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3444 -1, 979, -1, 981, -1, -1, -1, -1, -1, 987, 3445 -1, 989, -1, -1, -1, -1, -1, 979, -1, 981, 3446 -1, -1, -1, -1, -1, 987, -1, 989, 0, 1, 3447 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 3448 12, -1, -1, -1, 16, -1, 18, 19, 20, 21, 3449 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 3450 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 3451 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 3452 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 3453 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 3454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3455 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 3456 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 3457 102, 103, 104, 105, 106, 0, -1, -1, -1, -1, 3458 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14, 3459 15, -1, 17, -1, 126, 127, 128, -1, 44, -1, 3460 -1, 26, 27, 28, 29, -1, -1, 139, -1, 141, 3461 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 3462 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 3463 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 3464 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 3465 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3466 85, -1, 87, 88, -1, -1, -1, -1, 114, 94, 3467 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 3468 -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, 3469 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3470 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 3471 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 3472 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 3473 -1, -1, -1, -1, -1, 25, -1, 27, 28, 29, 3474 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 3475 40, 41, 42, 43, 44, -1, -1, 68, 69, 70, 3476 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 3477 -1, -1, 83, 84, -1, -1, -1, -1, 68, 69, 3478 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 3479 80, -1, -1, 83, 84, 85, -1, 87, 88, -1, 3480 -1, -1, -1, 114, 94, 116, 117, 118, 119, 120, 3481 121, 122, 123, 124, 125, -1, -1, -1, 108, -1, 3482 -1, 111, -1, 113, 114, 115, 116, 117, 118, 119, 3483 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 3484 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 3485 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 3486 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 3487 25, -1, 27, 28, 29, -1, -1, -1, -1, -1, 3488 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 3489 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 3490 76, 77, 78, 79, 80, -1, -1, 83, 84, -1, 3491 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 3492 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3493 85, -1, 87, 88, -1, -1, -1, -1, -1, 94, 3494 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 3495 -1, -1, -1, 108, -1, -1, 111, -1, 113, 114, 3496 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3497 125, -1, -1, -1, -1, -1, 131, 132, 133, 134, 3498 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 3499 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 3500 -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 3501 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 3502 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 3503 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3504 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 3505 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 3506 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 3507 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 3508 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 3509 -1, 111, -1, -1, 114, 115, 116, 117, 118, 119, 3510 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 3511 130, 131, 132, 133, 134, 0, -1, 137, 138, 139, 3512 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 3513 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 3514 -1, 26, 27, 28, 29, -1, -1, -1, -1, -1, 3515 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 3516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3518 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 3519 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3520 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 3521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3522 -1, -1, -1, 108, -1, -1, 111, -1, -1, 114, 3523 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3524 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 3525 0, -1, 137, 138, 139, -1, 141, -1, 8, 9, 3526 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 3527 -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 3528 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 3529 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 3530 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3531 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 3532 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 3533 80, -1, -1, 83, 84, 85, -1, 87, 88, -1, 3534 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 3535 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 3536 -1, 111, -1, 113, 114, 115, 116, 117, 118, 119, 3537 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 3538 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 3539 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 3540 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 3541 -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, 3542 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 3543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3544 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3545 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 3546 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3547 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 3548 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3549 -1, -1, -1, 108, -1, -1, -1, -1, -1, 114, 3550 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3551 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 3552 0, 136, 137, 138, 139, -1, 141, -1, 8, 9, 3553 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 3554 -1, -1, -1, -1, -1, -1, -1, 27, 28, 29, 3555 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 3556 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 3557 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3558 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 3559 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 3560 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 3561 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 3562 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 3563 -1, 111, -1, -1, 114, 115, 116, 117, 118, 119, 3564 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 3565 -1, 131, 132, 133, 134, 0, -1, 137, 138, 139, 3566 -1, 141, -1, 8, 9, 10, -1, -1, 13, 14, 3567 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 3568 -1, 26, 27, 28, -1, -1, -1, -1, -1, -1, 3569 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 3570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3572 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 3573 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3574 85, -1, -1, 88, -1, -1, -1, -1, -1, 94, 3575 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3576 -1, -1, -1, 108, -1, -1, -1, -1, -1, 114, 3577 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3578 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 3579 0, 136, 137, 138, 139, -1, 141, -1, 8, 9, 3580 10, -1, -1, 13, 14, 15, -1, 17, -1, -1, 3581 -1, -1, -1, -1, -1, -1, -1, 27, 28, -1, 3582 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 3583 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 3584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3585 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 3586 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 3587 80, -1, -1, 83, 84, 85, -1, -1, 88, -1, 3588 -1, -1, -1, -1, 94, -1, -1, -1, -1, -1, 3589 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 3590 -1, -1, -1, -1, 114, -1, 116, 117, 118, 119, 3591 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 3592 -1, 131, 132, 133, 134, 0, 136, 137, 138, 139, 3593 -1, 141, -1, 8, 9, 10, -1, -1, -1, 14, 3594 15, -1, 17, -1, -1, -1, -1, -1, -1, -1, 3595 -1, 26, -1, -1, -1, -1, -1, -1, -1, -1, 3596 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44, 3597 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3599 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74, 3600 75, 76, 77, 78, 79, 80, -1, -1, 83, 84, 3601 85, -1, 87, -1, -1, -1, -1, -1, -1, -1, 3602 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3603 -1, -1, -1, 108, -1, -1, -1, -1, 113, 114, 3604 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3605 125, -1, -1, -1, -1, 130, 131, 132, 133, 134, 3606 0, -1, 137, -1, 139, -1, 141, -1, 8, 9, 3607 10, -1, -1, -1, 14, 15, -1, 17, -1, -1, 3608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3609 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1, 3610 40, 41, 42, 43, 44, -1, -1, -1, -1, -1, 3611 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3612 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, 3613 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 3614 80, -1, -1, 83, 84, 85, -1, 87, -1, -1, 3615 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3616 -1, -1, -1, -1, -1, -1, -1, -1, 108, -1, 3617 -1, -1, -1, 113, 114, -1, 116, 117, 118, 119, 3618 120, 121, 122, 123, 124, 125, -1, -1, -1, -1, 3619 -1, 131, 132, 133, 134, -1, -1, 137, -1, 139, 3620 1, 141, 3, 4, 5, 6, 7, 8, 9, 10, 3621 11, 12, -1, -1, 15, 16, -1, 18, 19, 20, 3622 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 3623 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 3624 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 3625 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 3626 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 3627 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3628 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 3629 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 3630 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 3631 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3632 -1, -1, -1, -1, -1, 126, 127, 128, -1, -1, 3633 -1, -1, -1, -1, -1, -1, -1, -1, 139, 1, 3634 141, 3, 4, 5, 6, 7, -1, -1, 10, 11, 3635 12, -1, 14, 15, 16, -1, 18, 19, 20, 21, 3636 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 3637 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 3638 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 3639 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 3640 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 3641 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3642 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 3643 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 3644 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 3645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3646 -1, -1, -1, -1, 126, 127, 128, -1, -1, -1, 3647 -1, -1, -1, -1, -1, -1, -1, 139, 1, 141, 3648 3, 4, 5, 6, 7, -1, -1, 10, 11, 12, 3649 -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, 3650 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 3651 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 3652 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52, 3653 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 3654 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 3655 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3656 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 3657 93, -1, 95, -1, -1, 98, 99, 100, 101, 102, 3658 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 3659 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3660 -1, -1, -1, 126, 127, 128, -1, -1, -1, -1, 3661 -1, -1, -1, -1, -1, -1, 139, 1, 141, 3, 3662 4, 5, 6, 7, -1, -1, 10, 11, 12, -1, 3663 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23, 3664 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 3665 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 3666 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, 3667 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 3668 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 3669 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3670 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 3671 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 3672 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 3673 1, -1, 3, 4, 5, 6, 7, -1, 9, 10, 3674 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 3675 21, 22, 23, 24, -1, 139, -1, 141, -1, 30, 3676 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 3677 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 3678 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 3679 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 3680 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3681 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 3682 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 3683 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 3684 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 3685 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 3686 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 3687 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 3688 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 3689 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 3690 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 3691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3692 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 3693 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 3694 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 3695 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3696 -1, -1, -1, -1, -1, -1, -1, -1, 126, 127, 3697 128, -1, -1, -1, -1, -1, -1, -1, -1, 137, 3698 -1, 139, 1, 141, 3, 4, 5, 6, 7, -1, 3699 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18, 3700 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 3701 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 3702 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 3703 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 3704 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 3705 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3706 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 3707 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 3708 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 3709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3710 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 3711 -1, -1, -1, -1, -1, -1, -1, -1, 137, -1, 3712 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 3713 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19, 3714 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 3715 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 3716 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 3717 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 3718 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 3719 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3720 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 3721 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 3722 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 3723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3724 -1, -1, -1, -1, -1, -1, 126, 127, 128, -1, 3725 -1, 131, 1, -1, 3, 4, 5, 6, 7, 139, 3726 -1, 141, 11, 12, -1, -1, -1, 16, -1, 18, 3727 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 3728 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 3729 39, -1, -1, -1, -1, -1, 45, 46, 47, 48, 3730 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 3731 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 3732 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3733 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 3734 89, 90, -1, 92, 93, -1, 95, -1, -1, 98, 3735 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 3736 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3737 -1, -1, -1, -1, -1, -1, -1, 126, 127, 128, 3738 -1, -1, 131, -1, -1, -1, -1, -1, -1, -1, 3739 139, 1, 141, 3, 4, 5, 6, 7, -1, -1, 3740 10, 11, 12, -1, -1, -1, 16, -1, 18, 19, 3741 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 3742 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 3743 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49, 3744 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 3745 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 3746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3747 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 3748 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 3749 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 3750 -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 3751 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 3752 -1, 18, 19, 20, 21, 22, 23, 24, -1, 139, 3753 -1, 141, -1, 30, 31, 32, 33, 34, 35, 36, 3754 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46, 3755 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 3756 57, -1, 59, 60, -1, 62, 63, 64, -1, 66, 3757 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3758 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 3759 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1, 3760 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 3761 -1, 108, -1, -1, -1, -1, -1, -1, -1, 3, 3762 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 3763 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 3764 24, -1, 139, -1, 141, -1, 30, 31, 32, 33, 3765 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 3766 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 3767 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 3768 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 3769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3770 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 3771 -1, 95, 96, 97, 98, 99, 100, 101, 102, 103, 3772 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 3773 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 3774 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 3775 21, 22, 23, 24, -1, -1, -1, 141, -1, 30, 3776 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 3777 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 3778 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 3779 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 3780 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3781 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 3782 -1, 92, 93, -1, -1, -1, -1, 98, 99, 100, 3783 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 3784 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 3785 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 3786 18, 19, 20, 21, 22, 23, 24, -1, 139, -1, 3787 141, -1, 30, 31, 32, 33, 34, 35, 36, -1, 3788 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 3789 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 3790 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 3791 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3792 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 3793 -1, 89, 90, -1, 92, 93, -1, -1, -1, -1, 3794 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 3795 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 3796 5, 6, 7, -1, -1, -1, 11, 12, 126, 127, 3797 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 3798 -1, -1, -1, 141, -1, 30, 31, 32, 33, 34, 3799 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 3800 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 3801 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 3802 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 3803 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3804 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 3805 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 3806 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 3807 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 3808 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 3809 22, 23, 24, -1, 139, -1, -1, -1, 30, 31, 3810 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 3811 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 3812 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 3813 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 3814 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3815 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 3816 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 3817 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 3818 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3819 -1, -1, -1, -1, 126, 127, 128, -1, -1, -1, 3820 -1, -1, -1, -1, -1, -1, -1, 139, 3, 4, 3821 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 3822 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 3823 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 3824 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 3825 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 3826 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, 3827 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 3828 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 3829 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3830 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 3831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3832 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3833 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 3834 135, 136, 3, 4, 5, 6, 7, 8, 9, 10, 3835 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 3836 21, 22, 23, 24, 25, 26, -1, -1, -1, 30, 3837 31, 32, 33, 34, 35, 36, 37, 38, 39, -1, 3838 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, 3839 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, 3840 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 3841 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 3842 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 3843 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 3844 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3845 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 3846 121, 122, 123, 124, 125, -1, 127, 128, -1, -1, 3847 -1, -1, -1, -1, 135, 3, 4, 5, 6, 7, 3848 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 3849 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, 3850 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, 3851 38, 39, -1, -1, -1, -1, -1, 45, 46, 47, 3852 48, 49, 50, 51, 52, 53, 54, -1, 56, -1, 3853 -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 3854 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 3855 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 3856 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 3857 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1, 3858 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 3859 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 3860 128, -1, -1, -1, -1, -1, -1, 135, 3, 4, 3861 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 3862 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 3863 25, 26, -1, -1, -1, 30, 31, 32, 33, 34, 3864 35, 36, 37, 38, 39, -1, -1, -1, -1, -1, 3865 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, 3866 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 3867 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 3868 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 3869 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3870 95, 96, -1, -1, 99, -1, -1, -1, -1, -1, 3871 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3872 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 3873 125, -1, 127, 128, -1, -1, -1, -1, -1, -1, 3874 135, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3875 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 3876 22, 23, 24, 25, 26, -1, -1, -1, 30, 31, 3877 32, 33, 34, 35, 36, 37, 38, 39, -1, -1, 3878 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51, 3879 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, 3880 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 3881 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 3882 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 3883 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 3884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3885 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 3886 122, 123, 124, 125, -1, 127, 128, 3, 4, 5, 3887 -1, 7, -1, 135, -1, 11, 12, -1, -1, -1, 3888 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 3889 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 3890 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 3891 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 3892 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 3893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3895 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 3896 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 3897 106, -1, -1, -1, -1, -1, 3, 4, 5, -1, 3898 7, -1, -1, -1, 11, 12, -1, -1, -1, 16, 3899 126, 18, 19, 20, 21, 22, 23, 24, 134, -1, 3900 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 3901 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 3902 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 3903 57, -1, 59, 60, -1, 62, 63, 64, -1, -1, 3904 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3905 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 3906 -1, -1, 89, 90, -1, 92, 93, -1, -1, -1, 3907 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 3908 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, 3909 -1, -1, -1, 11, 12, -1, -1, -1, 16, 126, 3910 18, 19, 20, 21, 22, 23, 24, 134, -1, -1, 3911 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 3912 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47, 3913 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 3914 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 3915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3916 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 3917 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 3918 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 3919 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 3920 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 3921 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 3922 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 3923 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 3924 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 3925 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 3926 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 3927 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3928 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 3929 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 3930 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 3931 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11, 3932 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 3933 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 3934 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 3935 -1, -1, -1, 45, 46, -1, 48, 49, 50, 51, 3936 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 3937 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 3938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3939 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 3940 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 3941 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 3942 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 3943 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 3944 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 3945 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 3946 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 3947 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 3948 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 3949 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3950 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 3951 89, 90, -1, 92, 93, -1, 95, 96, 97, 98, 3952 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 3953 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 3954 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 3955 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 3956 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 3957 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 3958 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 3959 56, 57, 58, 59, 60, -1, 62, 63, 64, -1, 3960 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 3961 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3962 86, -1, -1, 89, 90, -1, 92, 93, -1, 95, 3963 96, -1, 98, 99, 100, 101, 102, 103, 104, 105, 3964 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3965 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 3966 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 3967 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 3968 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 3969 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 3970 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 3971 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 3972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3973 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 3974 93, -1, -1, 96, 97, 98, 99, 100, 101, 102, 3975 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 3976 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 3977 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 3978 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 3979 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 3980 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 3981 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 3982 60, -1, 62, 63, 64, -1, 66, 67, -1, -1, 3983 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3984 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 3985 90, -1, 92, 93, -1, 95, 96, -1, 98, 99, 3986 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 3987 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1, 3988 7, -1, -1, -1, 11, 12, 126, 127, 128, 16, 3989 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1, 3990 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, 3991 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46, 3992 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56, 3993 57, 58, 59, 60, -1, 62, 63, 64, -1, 66, 3994 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3995 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 3996 -1, -1, 89, 90, -1, 92, 93, -1, -1, 96, 3997 -1, 98, 99, 100, 101, 102, 103, 104, 105, 106, 3998 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 3999 4, 5, -1, 7, -1, -1, -1, 11, 12, 126, 4000 127, 128, 16, -1, 18, 19, 20, 21, 22, 23, 4001 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 4002 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 4003 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 4004 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 4005 64, -1, 66, 67, -1, -1, -1, -1, -1, -1, 4006 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4007 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 4008 -1, 95, -1, -1, 98, 99, 100, 101, 102, 103, 4009 104, 105, 106, -1, -1, -1, -1, -1, -1, -1, 4010 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 4011 11, 12, 126, 127, 128, 16, -1, 18, 19, 20, 4012 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 4013 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 4014 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 4015 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 4016 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1, 4017 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4018 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 4019 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 4020 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 4021 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7, 4022 -1, -1, -1, 11, 12, 126, 127, 128, 16, -1, 4023 18, 19, 20, 21, 22, 23, 24, -1, -1, -1, 4024 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1, 4025 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1, 4026 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 4027 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67, 4028 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4029 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1, 4030 -1, 89, 90, -1, 92, 93, -1, 95, -1, -1, 4031 98, 99, 100, 101, 102, 103, 104, 105, 106, -1, 4032 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 4033 5, -1, 7, -1, -1, -1, 11, 12, 126, 127, 4034 128, 16, -1, 18, 19, 20, 21, 22, 23, 24, 4035 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 4036 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 4037 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 4038 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 4039 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 4040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4041 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 4042 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, 4043 105, 106, -1, -1, -1, -1, -1, -1, -1, -1, 4044 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 4045 12, 126, 127, 128, 16, -1, 18, 19, 20, 21, 4046 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 4047 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 4048 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 4049 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 4050 62, 63, 64, -1, 66, 67, -1, -1, -1, -1, 4051 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4052 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1, 4053 92, 93, -1, 95, -1, -1, 98, 99, 100, 101, 4054 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 4055 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1, 4056 -1, -1, 11, 12, 126, 127, 128, 16, -1, 18, 4057 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, 4058 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1, 4059 39, -1, -1, -1, -1, -1, -1, 46, -1, -1, 4060 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, 4061 59, 60, -1, 62, 63, 64, -1, 66, 67, -1, 4062 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4063 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1, 4064 89, 90, -1, 92, 93, -1, -1, -1, -1, 98, 4065 99, 100, 101, 102, 103, 104, 105, 106, -1, -1, 4066 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 4067 -1, 7, -1, -1, -1, 11, 12, 126, 127, 128, 4068 16, -1, 18, 19, 20, 21, 22, 23, 24, -1, 4069 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 4070 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 4071 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 4072 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 4073 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, 4074 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4075 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 4076 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 4077 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4078 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 4079 126, 127, 128, 16, -1, 18, 19, 20, 21, 22, 4080 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 4081 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 4082 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 4083 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 4084 63, 64, -1, 66, 67, -1, -1, -1, -1, -1, 4085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4086 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 4087 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 4088 103, 104, 105, 106, -1, -1, -1, -1, -1, -1, 4089 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1, 4090 -1, 11, 12, 126, 127, 128, 16, -1, 18, 19, 4091 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, 4092 30, 31, 32, 33, 34, 35, 36, -1, -1, 39, 4093 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49, 4094 50, 51, 52, 53, 54, 55, 56, 57, -1, 59, 4095 60, -1, 62, 63, 64, -1, -1, -1, -1, -1, 4096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4097 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89, 4098 90, -1, 92, 93, -1, 95, -1, -1, 98, 99, 4099 100, 101, 102, 103, 104, 105, 106, -1, -1, -1, 4100 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1, 4101 11, 12, -1, -1, -1, 16, 126, 18, 19, 20, 4102 21, 22, 23, 24, -1, -1, -1, -1, -1, 30, 4103 31, 32, 33, 34, 35, 36, -1, -1, 39, -1, 4104 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50, 4105 51, 52, 53, 54, 55, 56, 57, -1, 59, 60, 4106 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1, 4107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4108 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90, 4109 -1, 92, 93, -1, 95, -1, -1, 98, 99, 100, 4110 101, 102, 103, 104, 105, 106, -1, -1, -1, -1, 4111 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11, 4112 12, -1, -1, -1, 16, 126, 18, 19, 20, 21, 4113 22, 23, 24, -1, -1, -1, -1, -1, 30, 31, 4114 32, 33, 34, 35, 36, -1, -1, 39, -1, -1, 4115 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51, 4116 52, 53, 54, 55, 56, 57, -1, 59, 60, -1, 4117 62, 63, 64, -1, -1, -1, -1, -1, -1, -1, 4118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4119 -1, 83, -1, -1, 86, -1, -1, 89, 90, -1, 4120 92, 93, -1, -1, -1, -1, 98, 99, 100, 101, 4121 102, 103, 104, 105, 106, -1, -1, -1, -1, -1, 4122 3, 4, 5, -1, 7, -1, -1, -1, 11, 12, 4123 -1, -1, -1, 16, 126, 18, 19, 20, 21, 22, 4124 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, 4125 33, 34, 35, 36, -1, -1, 39, -1, -1, -1, 4126 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52, 4127 53, 54, 55, 56, 57, -1, 59, 60, -1, 62, 4128 63, 64, -1, -1, -1, -1, -1, -1, -1, -1, 4129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4130 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92, 4131 93, -1, -1, -1, -1, 98, 99, 100, 101, 102, 4132 103, 104, 105, 106, -1, -1, -1, -1, -1, 3, 4133 4, 5, -1, 7, -1, -1, -1, 11, 12, -1, 4134 -1, -1, 16, 126, 18, 19, 20, 21, 22, 23, 4135 24, -1, -1, -1, -1, -1, 30, 31, 32, 33, 4136 34, 35, 36, -1, -1, 39, -1, -1, -1, -1, 4137 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53, 4138 54, 55, 56, 57, -1, 59, 60, -1, 62, 63, 4139 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4141 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93, 4142 -1, -1, -1, -1, 98, 99, 100, 101, 102, 103, 4143 104, 105, 106, -1, -1, -1, -1, -1, 3, 4, 4144 5, -1, 7, -1, -1, -1, 11, 12, -1, -1, 4145 -1, 16, 126, 18, 19, 20, 21, 22, 23, 24, 4146 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, 4147 35, 36, -1, -1, 39, -1, -1, -1, -1, -1, 4148 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54, 4149 55, 56, 57, -1, 59, 60, -1, 62, 63, 64, 4150 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4151 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4152 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1, 4153 -1, -1, -1, 98, 99, 100, 101, 102, 103, 104, 4154 105, 106, -1, -1, -1, -1, -1, 3, 4, 5, 4155 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1, 4156 16, 126, 18, 19, 20, 21, 22, 23, 24, -1, 4157 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, 4158 36, -1, -1, 39, -1, -1, -1, -1, -1, -1, 4159 46, -1, -1, 49, 50, 51, 52, 53, 54, 55, 4160 56, 57, -1, 59, 60, -1, 62, 63, 64, -1, 4161 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4162 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4163 86, -1, -1, 89, 90, -1, 92, 93, -1, -1, 4164 -1, -1, 98, 99, 100, 101, 102, 103, 104, 105, 4165 106, -1, -1, -1, -1, -1, -1, 52, 53, -1, 4166 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 4167 126, 66, 67, 68, 69, 70, 71, 72, 73, 74, 4168 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 4169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4170 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 4171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4172 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 4173 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 4174 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 4175 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 4176 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 4177 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 4178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4179 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 4180 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 4181 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 4182 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 4183 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 4184 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 4185 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 4186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4187 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 4188 121, 122, 123, 124, 125, -1, 127, 128, 52, 53, 4189 -1, -1, 56, -1, 135, -1, -1, -1, -1, -1, 4190 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 4191 74, -1, -1, 77, 78, -1, -1, 81, 82, 83, 4192 84, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4193 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1, 4194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4195 -1, -1, 116, 117, 118, 119, 120, 121, 122, 123, 4196 124, 125, -1, 127, 128, 52, 53, -1, -1, 56, 4197 -1, 135, -1, -1, -1, -1, -1, -1, -1, 66, 4198 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, 4199 77, 78, -1, -1, 81, 82, 83, 84, -1, -1, 4200 -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 4201 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4202 -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, 4203 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, 4204 127, 128, 52, 53, -1, -1, 56, -1, 135, -1, 4205 -1, -1, -1, -1, -1, -1, 66, 67, 68, 69, 4206 70, 71, 72, 73, 74, -1, -1, 77, 78, -1, 4207 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1, 4208 -1, -1, -1, -1, -1, 95, 96, -1, -1, -1, 4209 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4210 -1, -1, -1, -1, -1, -1, 116, 117, 118, 119, 4211 120, 121, 122, 123, 124, 125, -1, 127, 128, 52, 4212 53, -1, -1, 56, -1, 135, -1, -1, -1, -1, 4213 -1, -1, -1, 66, 67, 68, 69, 70, 71, 72, 4214 73, 74, -1, -1, 77, 78, -1, -1, 81, 82, 4215 83, 84, -1, -1, -1, -1, -1, -1, -1, -1, 4216 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1, 4217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4218 -1, -1, -1, 116, 117, 118, 119, 120, 121, 122, 4219 123, 124, 125, -1, 127, 128, 52, 53, -1, -1, 4220 56, -1, 135, -1, -1, -1, -1, -1, -1, -1, 4221 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, 4222 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1, 4223 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 4224 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4225 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4226 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 4227 -1, 127, 128, 52, 53, -1, -1, 56, -1, 135, 4228 -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, 4229 69, 70, 71, 72, 73, 74, -1, -1, 77, 78, 4230 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1, 4231 -1, -1, -1, -1, -1, -1, 95, 96, -1, -1, 4232 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4233 -1, -1, -1, -1, -1, -1, -1, 116, 117, 118, 4234 119, 120, 121, 122, 123, 124, 125, -1, 127, 128, 4235 52, 53, -1, -1, 56, -1, 135, -1, -1, -1, 4236 -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, 4237 72, 73, 74, -1, -1, 77, 78, -1, -1, 81, 4238 82, 83, 84, -1, -1, -1, -1, -1, -1, -1, 4239 -1, -1, -1, 95, 96, -1, -1, -1, -1, -1, 4240 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4241 -1, -1, -1, -1, 116, 117, 118, 119, 120, 121, 4242 122, 123, 124, 125, -1, 127, 128, 52, 53, -1, 4243 -1, 56, -1, 135, -1, -1, -1, -1, -1, -1, 4244 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 4245 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84, 4246 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4247 95, 96, -1, -1, -1, -1, -1, -1, -1, -1, 4248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4249 -1, 116, 117, 118, 119, 120, 121, 122, 123, 124, 4250 125, -1, 127, 128, 52, 53, -1, -1, 56, -1, 4251 135, -1, -1, -1, -1, -1, -1, -1, 66, 67, 4252 68, 69, 70, 71, 72, 73, 74, -1, -1, 77, 4253 78, -1, -1, 81, 82, 83, 84, -1, -1, -1, 4254 -1, -1, -1, -1, -1, -1, -1, 95, 96, -1, 4255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4256 -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, 4257 118, 119, 120, 121, 122, 123, 124, 125, -1, 127, 4258 128, 52, 53, -1, -1, 56, -1, 135, -1, -1, 4259 -1, -1, -1, -1, -1, 66, 67, 68, 69, 70, 4260 71, 72, 73, 74, -1, -1, 77, 78, -1, -1, 4261 81, 82, 83, 84, -1, -1, -1, -1, -1, -1, 4262 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1, 4263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4264 -1, -1, -1, -1, -1, 116, 117, 118, 119, 120, 4265 121, 122, 123, 124, 125, -1, 127, 128, -1, -1, 4266 -1, -1, -1, -1, 135 4267}; 4268 4269/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 4270 symbol of state STATE-NUM. */ 4271static const yytype_uint16 yystos[] = 4272{ 4273 0, 143, 144, 0, 1, 3, 4, 5, 6, 7, 4274 11, 12, 16, 18, 19, 20, 21, 22, 23, 24, 4275 30, 31, 32, 33, 34, 35, 36, 39, 45, 46, 4276 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 4277 57, 59, 60, 62, 63, 64, 66, 67, 86, 89, 4278 90, 92, 93, 95, 98, 99, 100, 101, 102, 103, 4279 104, 105, 106, 126, 127, 128, 145, 146, 147, 154, 4280 156, 157, 159, 160, 163, 164, 165, 167, 168, 169, 4281 171, 172, 182, 196, 214, 215, 216, 217, 218, 219, 4282 220, 221, 222, 223, 224, 250, 251, 265, 266, 267, 4283 268, 269, 270, 271, 274, 276, 277, 289, 291, 292, 4284 293, 294, 295, 296, 297, 328, 339, 147, 3, 4, 4285 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 4286 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 4287 25, 26, 30, 31, 32, 33, 34, 35, 36, 37, 4288 38, 39, 45, 46, 47, 48, 49, 50, 51, 52, 4289 53, 56, 66, 67, 68, 69, 70, 71, 72, 73, 4290 74, 77, 78, 81, 82, 83, 84, 95, 96, 116, 4291 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 4292 128, 135, 175, 176, 177, 178, 180, 181, 289, 291, 4293 39, 58, 86, 89, 95, 96, 97, 127, 164, 172, 4294 182, 184, 189, 192, 194, 214, 293, 294, 296, 297, 4295 326, 327, 189, 189, 136, 190, 191, 136, 186, 190, 4296 136, 141, 333, 54, 177, 333, 148, 130, 21, 22, 4297 30, 31, 32, 163, 182, 214, 182, 56, 1, 47, 4298 89, 150, 151, 152, 154, 166, 167, 339, 157, 198, 4299 185, 194, 326, 339, 184, 325, 326, 339, 46, 86, 4300 126, 134, 171, 196, 214, 293, 294, 297, 242, 243, 4301 54, 55, 57, 175, 281, 290, 280, 281, 282, 140, 4302 272, 140, 278, 140, 275, 140, 279, 59, 60, 159, 4303 182, 182, 139, 141, 332, 337, 338, 40, 41, 42, 4304 43, 44, 37, 38, 26, 130, 186, 190, 256, 28, 4305 248, 113, 134, 89, 95, 168, 113, 68, 69, 70, 4306 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 4307 83, 84, 114, 116, 117, 118, 119, 120, 121, 122, 4308 123, 124, 125, 85, 132, 133, 197, 157, 158, 158, 4309 201, 203, 158, 332, 338, 86, 165, 172, 214, 230, 4310 293, 294, 297, 52, 56, 83, 86, 173, 174, 214, 4311 293, 294, 297, 174, 33, 34, 35, 36, 49, 50, 4312 51, 52, 56, 136, 175, 295, 323, 85, 133, 331, 4313 256, 268, 87, 87, 134, 184, 56, 184, 184, 184, 4314 113, 88, 134, 193, 339, 85, 132, 133, 87, 87, 4315 134, 193, 189, 333, 334, 189, 188, 189, 194, 326, 4316 339, 157, 334, 157, 54, 63, 64, 155, 136, 183, 4317 130, 150, 85, 133, 87, 154, 153, 166, 137, 332, 4318 338, 334, 199, 334, 138, 134, 141, 336, 134, 336, 4319 131, 336, 333, 56, 59, 60, 168, 170, 134, 85, 4320 132, 133, 244, 61, 107, 109, 110, 283, 110, 283, 4321 110, 65, 283, 110, 110, 273, 283, 110, 61, 110, 4322 110, 110, 273, 110, 61, 110, 68, 68, 139, 147, 4323 158, 158, 158, 158, 154, 157, 157, 258, 257, 94, 4324 161, 249, 95, 159, 184, 194, 195, 166, 134, 171, 4325 134, 156, 159, 172, 182, 184, 195, 182, 182, 182, 4326 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 4327 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 4328 182, 182, 182, 52, 53, 56, 180, 255, 329, 330, 4329 188, 52, 53, 56, 180, 254, 329, 149, 150, 13, 4330 226, 337, 226, 158, 158, 332, 17, 259, 56, 85, 4331 132, 133, 25, 157, 52, 56, 173, 1, 117, 298, 4332 337, 85, 132, 133, 210, 324, 211, 331, 52, 56, 4333 329, 159, 182, 159, 182, 179, 182, 184, 95, 184, 4334 192, 326, 52, 56, 188, 52, 56, 327, 334, 137, 4335 334, 134, 134, 334, 177, 200, 182, 145, 131, 329, 4336 329, 182, 130, 334, 152, 334, 326, 134, 170, 52, 4337 56, 188, 52, 56, 52, 54, 55, 56, 57, 58, 4338 68, 89, 95, 96, 97, 120, 123, 136, 246, 301, 4339 303, 304, 305, 306, 307, 308, 311, 312, 313, 314, 4340 317, 318, 319, 320, 321, 285, 284, 140, 283, 140, 4341 140, 140, 182, 182, 76, 118, 237, 238, 339, 237, 4342 162, 237, 184, 134, 334, 170, 134, 113, 44, 333, 4343 87, 87, 186, 190, 253, 333, 335, 87, 87, 186, 4344 190, 252, 10, 225, 8, 261, 339, 150, 13, 150, 4345 27, 227, 337, 227, 259, 194, 225, 52, 56, 188, 4346 52, 56, 205, 208, 337, 299, 207, 52, 56, 173, 4347 188, 149, 157, 136, 300, 303, 212, 186, 187, 190, 4348 339, 44, 177, 184, 193, 87, 87, 335, 87, 87, 4349 326, 157, 131, 145, 336, 168, 335, 113, 184, 52, 4350 89, 95, 231, 232, 233, 305, 303, 245, 134, 302, 4351 134, 322, 339, 52, 134, 322, 134, 302, 52, 134, 4352 302, 52, 286, 54, 55, 57, 288, 297, 52, 58, 4353 234, 236, 239, 307, 309, 310, 313, 315, 316, 319, 4354 321, 333, 150, 150, 237, 150, 95, 184, 170, 182, 4355 115, 159, 182, 159, 182, 161, 186, 138, 87, 159, 4356 182, 159, 182, 161, 187, 184, 195, 262, 339, 15, 4357 229, 339, 14, 228, 229, 229, 202, 204, 225, 134, 4358 226, 335, 158, 337, 158, 149, 335, 225, 334, 303, 4359 149, 337, 175, 256, 248, 182, 87, 134, 334, 131, 4360 184, 233, 134, 305, 134, 334, 239, 29, 111, 247, 4361 301, 306, 317, 319, 308, 313, 321, 307, 314, 319, 4362 307, 287, 113, 86, 214, 239, 118, 134, 235, 134, 4363 322, 322, 134, 235, 134, 235, 139, 10, 131, 150, 4364 10, 184, 182, 159, 182, 88, 263, 339, 150, 9, 4365 264, 339, 158, 225, 225, 150, 150, 184, 150, 227, 4366 209, 337, 225, 334, 225, 213, 334, 232, 134, 95, 4367 231, 137, 150, 150, 134, 302, 134, 302, 322, 134, 4368 302, 134, 302, 302, 150, 214, 56, 85, 118, 234, 4369 316, 319, 309, 313, 307, 315, 319, 307, 52, 240, 4370 241, 304, 131, 86, 172, 214, 293, 294, 297, 226, 4371 150, 226, 225, 225, 229, 259, 260, 206, 149, 300, 4372 134, 232, 134, 305, 10, 131, 307, 319, 307, 307, 4373 108, 52, 56, 134, 235, 134, 235, 322, 134, 235, 4374 134, 235, 235, 134, 333, 56, 85, 132, 133, 150, 4375 150, 150, 225, 149, 232, 134, 302, 134, 302, 302, 4376 302, 307, 319, 307, 307, 241, 52, 56, 188, 52, 4377 56, 261, 228, 225, 225, 232, 307, 235, 134, 235, 4378 235, 235, 335, 302, 307, 235 4379}; 4380 4381#define yyerrok (yyerrstatus = 0) 4382#define yyclearin (yychar = YYEMPTY) 4383#define YYEMPTY (-2) 4384#define YYEOF 0 4385 4386#define YYACCEPT goto yyacceptlab 4387#define YYABORT goto yyabortlab 4388#define YYERROR goto yyerrorlab 4389 4390 4391/* Like YYERROR except do call yyerror. This remains here temporarily 4392 to ease the transition to the new meaning of YYERROR, for GCC. 4393 Once GCC version 2 has supplanted version 1, this can go. However, 4394 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 4395 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 4396 discussed. */ 4397 4398#define YYFAIL goto yyerrlab 4399#if defined YYFAIL 4400 /* This is here to suppress warnings from the GCC cpp's 4401 -Wunused-macros. Normally we don't worry about that warning, but 4402 some users do, and we want to make it easy for users to remove 4403 YYFAIL uses, which will produce warnings from Bison 2.5. */ 4404#endif 4405 4406#define YYRECOVERING() (!!yyerrstatus) 4407 4408#define YYBACKUP(Token, Value) \ 4409do \ 4410 if (yychar == YYEMPTY && yylen == 1) \ 4411 { \ 4412 yychar = (Token); \ 4413 yylval = (Value); \ 4414 YYPOPSTACK (1); \ 4415 goto yybackup; \ 4416 } \ 4417 else \ 4418 { \ 4419 parser_yyerror (parser, YY_("syntax error: cannot back up")); \ 4420 YYERROR; \ 4421 } \ 4422while (YYID (0)) 4423 4424 4425#define YYTERROR 1 4426#define YYERRCODE 256 4427 4428 4429/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 4430 If N is 0, then set CURRENT to the empty location which ends 4431 the previous symbol: RHS[0] (always defined). */ 4432 4433#define YYRHSLOC(Rhs, K) ((Rhs)[K]) 4434#ifndef YYLLOC_DEFAULT 4435# define YYLLOC_DEFAULT(Current, Rhs, N) \ 4436 do \ 4437 if (YYID (N)) \ 4438 { \ 4439 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 4440 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 4441 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 4442 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 4443 } \ 4444 else \ 4445 { \ 4446 (Current).first_line = (Current).last_line = \ 4447 YYRHSLOC (Rhs, 0).last_line; \ 4448 (Current).first_column = (Current).last_column = \ 4449 YYRHSLOC (Rhs, 0).last_column; \ 4450 } \ 4451 while (YYID (0)) 4452#endif 4453 4454 4455/* This macro is provided for backward compatibility. */ 4456 4457#ifndef YY_LOCATION_PRINT 4458# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 4459#endif 4460 4461 4462/* YYLEX -- calling `yylex' with the right arguments. */ 4463 4464#ifdef YYLEX_PARAM 4465# define YYLEX yylex (&yylval, YYLEX_PARAM) 4466#else 4467# define YYLEX yylex (&yylval, parser) 4468#endif 4469 4470/* Enable debugging if requested. */ 4471#if YYDEBUG 4472 4473# ifndef YYFPRINTF 4474# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 4475# define YYFPRINTF fprintf 4476# endif 4477 4478# define YYDPRINTF(Args) \ 4479do { \ 4480 if (yydebug) \ 4481 YYFPRINTF Args; \ 4482} while (YYID (0)) 4483 4484# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 4485do { \ 4486 if (yydebug) \ 4487 { \ 4488 YYFPRINTF (stderr, "%s ", Title); \ 4489 yy_symbol_print (stderr, \ 4490 Type, Value, parser); \ 4491 YYFPRINTF (stderr, "\n"); \ 4492 } \ 4493} while (YYID (0)) 4494 4495 4496/*--------------------------------. 4497| Print this symbol on YYOUTPUT. | 4498`--------------------------------*/ 4499 4500/*ARGSUSED*/ 4501#if (defined __STDC__ || defined __C99__FUNC__ \ 4502 || defined __cplusplus || defined _MSC_VER) 4503static void 4504yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 4505#else 4506static void 4507yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) 4508 FILE *yyoutput; 4509 int yytype; 4510 YYSTYPE const * const yyvaluep; 4511 struct parser_params *parser; 4512#endif 4513{ 4514 if (!yyvaluep) 4515 return; 4516 YYUSE (parser); 4517# ifdef YYPRINT 4518 if (yytype < YYNTOKENS) 4519 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 4520# else 4521 YYUSE (yyoutput); 4522# endif 4523 switch (yytype) 4524 { 4525 default: 4526 break; 4527 } 4528} 4529 4530 4531/*--------------------------------. 4532| Print this symbol on YYOUTPUT. | 4533`--------------------------------*/ 4534 4535#if (defined __STDC__ || defined __C99__FUNC__ \ 4536 || defined __cplusplus || defined _MSC_VER) 4537static void 4538yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser) 4539#else 4540static void 4541yy_symbol_print (yyoutput, yytype, yyvaluep, parser) 4542 FILE *yyoutput; 4543 int yytype; 4544 YYSTYPE const * const yyvaluep; 4545 struct parser_params *parser; 4546#endif 4547{ 4548 if (yytype < YYNTOKENS) 4549 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 4550 else 4551 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 4552 4553 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser); 4554 YYFPRINTF (yyoutput, ")"); 4555} 4556 4557/*------------------------------------------------------------------. 4558| yy_stack_print -- Print the state stack from its BOTTOM up to its | 4559| TOP (included). | 4560`------------------------------------------------------------------*/ 4561 4562#if (defined __STDC__ || defined __C99__FUNC__ \ 4563 || defined __cplusplus || defined _MSC_VER) 4564static void 4565yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 4566#else 4567static void 4568yy_stack_print (yybottom, yytop) 4569 yytype_int16 *yybottom; 4570 yytype_int16 *yytop; 4571#endif 4572{ 4573 YYFPRINTF (stderr, "Stack now"); 4574 for (; yybottom <= yytop; yybottom++) 4575 { 4576 int yybot = *yybottom; 4577 YYFPRINTF (stderr, " %d", yybot); 4578 } 4579 YYFPRINTF (stderr, "\n"); 4580} 4581 4582# define YY_STACK_PRINT(Bottom, Top) \ 4583do { \ 4584 if (yydebug) \ 4585 yy_stack_print ((Bottom), (Top)); \ 4586} while (YYID (0)) 4587 4588 4589/*------------------------------------------------. 4590| Report that the YYRULE is going to be reduced. | 4591`------------------------------------------------*/ 4592 4593#if (defined __STDC__ || defined __C99__FUNC__ \ 4594 || defined __cplusplus || defined _MSC_VER) 4595static void 4596yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser) 4597#else 4598static void 4599yy_reduce_print (yyvsp, yyrule, parser) 4600 YYSTYPE *yyvsp; 4601 int yyrule; 4602 struct parser_params *parser; 4603#endif 4604{ 4605 int yynrhs = yyr2[yyrule]; 4606 int yyi; 4607 unsigned long int yylno = yyrline[yyrule]; 4608 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 4609 yyrule - 1, yylno); 4610 /* The symbols being reduced. */ 4611 for (yyi = 0; yyi < yynrhs; yyi++) 4612 { 4613 YYFPRINTF (stderr, " $%d = ", yyi + 1); 4614 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 4615 &(yyvsp[(yyi + 1) - (yynrhs)]) 4616 , parser); 4617 YYFPRINTF (stderr, "\n"); 4618 } 4619} 4620 4621# define YY_REDUCE_PRINT(Rule) \ 4622do { \ 4623 if (yydebug) \ 4624 yy_reduce_print (yyvsp, Rule, parser); \ 4625} while (YYID (0)) 4626 4627/* Nonzero means print parse trace. It is left uninitialized so that 4628 multiple parsers can coexist. */ 4629#ifndef yydebug 4630int yydebug; 4631#endif 4632#else /* !YYDEBUG */ 4633# define YYDPRINTF(Args) 4634# define YY_SYMBOL_PRINT(Title, Type, Value, Location) 4635# define YY_STACK_PRINT(Bottom, Top) 4636# define YY_REDUCE_PRINT(Rule) 4637#endif /* !YYDEBUG */ 4638 4639 4640/* YYINITDEPTH -- initial size of the parser's stacks. */ 4641#ifndef YYINITDEPTH 4642# define YYINITDEPTH 200 4643#endif 4644 4645/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 4646 if the built-in stack extension method is used). 4647 4648 Do not make this value too large; the results are undefined if 4649 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 4650 evaluated with infinite-precision integer arithmetic. */ 4651 4652#ifndef YYMAXDEPTH 4653# define YYMAXDEPTH 10000 4654#endif 4655 4656 4657#if YYERROR_VERBOSE 4658 4659# ifndef yystrlen 4660# if defined __GLIBC__ && defined _STRING_H 4661# define yystrlen strlen 4662# else 4663/* Return the length of YYSTR. */ 4664#if (defined __STDC__ || defined __C99__FUNC__ \ 4665 || defined __cplusplus || defined _MSC_VER) 4666static YYSIZE_T 4667yystrlen (const char *yystr) 4668#else 4669static YYSIZE_T 4670yystrlen (yystr) 4671 const char *yystr; 4672#endif 4673{ 4674 YYSIZE_T yylen; 4675 for (yylen = 0; yystr[yylen]; yylen++) 4676 continue; 4677 return yylen; 4678} 4679# endif 4680# endif 4681 4682# ifndef yystpcpy 4683# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 4684# define yystpcpy stpcpy 4685# else 4686/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 4687 YYDEST. */ 4688#if (defined __STDC__ || defined __C99__FUNC__ \ 4689 || defined __cplusplus || defined _MSC_VER) 4690static char * 4691yystpcpy (char *yydest, const char *yysrc) 4692#else 4693static char * 4694yystpcpy (yydest, yysrc) 4695 char *yydest; 4696 const char *yysrc; 4697#endif 4698{ 4699 char *yyd = yydest; 4700 const char *yys = yysrc; 4701 4702 while ((*yyd++ = *yys++) != '\0') 4703 continue; 4704 4705 return yyd - 1; 4706} 4707# endif 4708# endif 4709 4710# ifndef yytnamerr 4711/* Copy to YYRES the contents of YYSTR after stripping away unnecessary 4712 quotes and backslashes, so that it's suitable for yyerror. The 4713 heuristic is that double-quoting is unnecessary unless the string 4714 contains an apostrophe, a comma, or backslash (other than 4715 backslash-backslash). YYSTR is taken from yytname. If YYRES is 4716 null, do not copy; instead, return the length of what the result 4717 would have been. */ 4718static YYSIZE_T 4719yytnamerr (char *yyres, const char *yystr) 4720{ 4721 if (*yystr == '"') 4722 { 4723 YYSIZE_T yyn = 0; 4724 char const *yyp = yystr; 4725 4726 for (;;) 4727 switch (*++yyp) 4728 { 4729 case '\'': 4730 case ',': 4731 goto do_not_strip_quotes; 4732 4733 case '\\': 4734 if (*++yyp != '\\') 4735 goto do_not_strip_quotes; 4736 /* Fall through. */ 4737 default: 4738 if (yyres) 4739 yyres[yyn] = *yyp; 4740 yyn++; 4741 break; 4742 4743 case '"': 4744 if (yyres) 4745 yyres[yyn] = '\0'; 4746 return yyn; 4747 } 4748 do_not_strip_quotes: ; 4749 } 4750 4751 if (! yyres) 4752 return yystrlen (yystr); 4753 4754 return yystpcpy (yyres, yystr) - yyres; 4755} 4756# endif 4757 4758/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 4759 about the unexpected token YYTOKEN for the state stack whose top is 4760 YYSSP. 4761 4762 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 4763 not large enough to hold the message. In that case, also set 4764 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 4765 required number of bytes is too large to store. */ 4766static int 4767yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 4768 yytype_int16 *yyssp, int yytoken) 4769{ 4770 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 4771 YYSIZE_T yysize = yysize0; 4772 YYSIZE_T yysize1; 4773 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 4774 /* Internationalized format string. */ 4775 const char *yyformat = 0; 4776 /* Arguments of yyformat. */ 4777 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 4778 /* Number of reported tokens (one for the "unexpected", one per 4779 "expected"). */ 4780 int yycount = 0; 4781 4782 /* There are many possibilities here to consider: 4783 - Assume YYFAIL is not used. It's too flawed to consider. See 4784 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 4785 for details. YYERROR is fine as it does not invoke this 4786 function. 4787 - If this state is a consistent state with a default action, then 4788 the only way this function was invoked is if the default action 4789 is an error action. In that case, don't check for expected 4790 tokens because there are none. 4791 - The only way there can be no lookahead present (in yychar) is if 4792 this state is a consistent state with a default action. Thus, 4793 detecting the absence of a lookahead is sufficient to determine 4794 that there is no unexpected or expected token to report. In that 4795 case, just report a simple "syntax error". 4796 - Don't assume there isn't a lookahead just because this state is a 4797 consistent state with a default action. There might have been a 4798 previous inconsistent state, consistent state with a non-default 4799 action, or user semantic action that manipulated yychar. 4800 - Of course, the expected token list depends on states to have 4801 correct lookahead information, and it depends on the parser not 4802 to perform extra reductions after fetching a lookahead from the 4803 scanner and before detecting a syntax error. Thus, state merging 4804 (from LALR or IELR) and default reductions corrupt the expected 4805 token list. However, the list is correct for canonical LR with 4806 one exception: it will still contain any token that will not be 4807 accepted due to an error action in a later state. 4808 */ 4809 if (yytoken != YYEMPTY) 4810 { 4811 int yyn = yypact[*yyssp]; 4812 yyarg[yycount++] = yytname[yytoken]; 4813 if (!yypact_value_is_default (yyn)) 4814 { 4815 /* Start YYX at -YYN if negative to avoid negative indexes in 4816 YYCHECK. In other words, skip the first -YYN actions for 4817 this state because they are default actions. */ 4818 int yyxbegin = yyn < 0 ? -yyn : 0; 4819 /* Stay within bounds of both yycheck and yytname. */ 4820 int yychecklim = YYLAST - yyn + 1; 4821 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 4822 int yyx; 4823 4824 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 4825 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 4826 && !yytable_value_is_error (yytable[yyx + yyn])) 4827 { 4828 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 4829 { 4830 yycount = 1; 4831 yysize = yysize0; 4832 break; 4833 } 4834 yyarg[yycount++] = yytname[yyx]; 4835 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 4836 if (! (yysize <= yysize1 4837 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 4838 return 2; 4839 yysize = yysize1; 4840 } 4841 } 4842 } 4843 4844 switch (yycount) 4845 { 4846# define YYCASE_(N, S) \ 4847 case N: \ 4848 yyformat = S; \ 4849 break 4850 YYCASE_(0, YY_("syntax error")); 4851 YYCASE_(1, YY_("syntax error, unexpected %s")); 4852 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 4853 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 4854 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 4855 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 4856# undef YYCASE_ 4857 } 4858 4859 yysize1 = yysize + yystrlen (yyformat); 4860 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 4861 return 2; 4862 yysize = yysize1; 4863 4864 if (*yymsg_alloc < yysize) 4865 { 4866 *yymsg_alloc = 2 * yysize; 4867 if (! (yysize <= *yymsg_alloc 4868 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 4869 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 4870 return 1; 4871 } 4872 4873 /* Avoid sprintf, as that infringes on the user's name space. 4874 Don't have undefined behavior even if the translation 4875 produced a string with the wrong number of "%s"s. */ 4876 { 4877 char *yyp = *yymsg; 4878 int yyi = 0; 4879 while ((*yyp = *yyformat) != '\0') 4880 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 4881 { 4882 yyp += yytnamerr (yyp, yyarg[yyi++]); 4883 yyformat += 2; 4884 } 4885 else 4886 { 4887 yyp++; 4888 yyformat++; 4889 } 4890 } 4891 return 0; 4892} 4893#endif /* YYERROR_VERBOSE */ 4894 4895/*-----------------------------------------------. 4896| Release the memory associated to this symbol. | 4897`-----------------------------------------------*/ 4898 4899/*ARGSUSED*/ 4900#if (defined __STDC__ || defined __C99__FUNC__ \ 4901 || defined __cplusplus || defined _MSC_VER) 4902static void 4903yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser) 4904#else 4905static void 4906yydestruct (yymsg, yytype, yyvaluep, parser) 4907 const char *yymsg; 4908 int yytype; 4909 YYSTYPE *yyvaluep; 4910 struct parser_params *parser; 4911#endif 4912{ 4913 YYUSE (yyvaluep); 4914 YYUSE (parser); 4915 4916 if (!yymsg) 4917 yymsg = "Deleting"; 4918 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 4919 4920 switch (yytype) 4921 { 4922 4923 default: 4924 break; 4925 } 4926} 4927 4928 4929/* Prevent warnings from -Wmissing-prototypes. */ 4930#ifdef YYPARSE_PARAM 4931#if defined __STDC__ || defined __cplusplus 4932int yyparse (void *YYPARSE_PARAM); 4933#else 4934int yyparse (); 4935#endif 4936#else /* ! YYPARSE_PARAM */ 4937#if defined __STDC__ || defined __cplusplus 4938int yyparse (struct parser_params *parser); 4939#else 4940int yyparse (); 4941#endif 4942#endif /* ! YYPARSE_PARAM */ 4943 4944 4945/*----------. 4946| yyparse. | 4947`----------*/ 4948 4949#ifdef YYPARSE_PARAM 4950#if (defined __STDC__ || defined __C99__FUNC__ \ 4951 || defined __cplusplus || defined _MSC_VER) 4952int 4953yyparse (void *YYPARSE_PARAM) 4954#else 4955int 4956yyparse (YYPARSE_PARAM) 4957 void *YYPARSE_PARAM; 4958#endif 4959#else /* ! YYPARSE_PARAM */ 4960#if (defined __STDC__ || defined __C99__FUNC__ \ 4961 || defined __cplusplus || defined _MSC_VER) 4962int 4963yyparse (struct parser_params *parser) 4964#else 4965int 4966yyparse (parser) 4967 struct parser_params *parser; 4968#endif 4969#endif 4970{ 4971/* The lookahead symbol. */ 4972int yychar; 4973 4974/* The semantic value of the lookahead symbol. */ 4975YYSTYPE yylval; 4976 4977 /* Number of syntax errors so far. */ 4978 int yynerrs; 4979 4980 int yystate; 4981 /* Number of tokens to shift before error messages enabled. */ 4982 int yyerrstatus; 4983 4984 /* The stacks and their tools: 4985 `yyss': related to states. 4986 `yyvs': related to semantic values. 4987 4988 Refer to the stacks thru separate pointers, to allow yyoverflow 4989 to reallocate them elsewhere. */ 4990 4991 /* The state stack. */ 4992 yytype_int16 yyssa[YYINITDEPTH]; 4993 yytype_int16 *yyss; 4994 yytype_int16 *yyssp; 4995 4996 /* The semantic value stack. */ 4997 YYSTYPE yyvsa[YYINITDEPTH]; 4998 YYSTYPE *yyvs; 4999 YYSTYPE *yyvsp; 5000 5001 YYSIZE_T yystacksize; 5002 5003 int yyn; 5004 int yyresult; 5005 /* Lookahead token as an internal (translated) token number. */ 5006 int yytoken; 5007 /* The variables used to return semantic value and location from the 5008 action routines. */ 5009 YYSTYPE yyval; 5010 5011#if YYERROR_VERBOSE 5012 /* Buffer for error messages, and its allocated size. */ 5013 char yymsgbuf[128]; 5014 char *yymsg = yymsgbuf; 5015 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 5016#endif 5017 5018#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 5019 5020 /* The number of symbols on the RHS of the reduced rule. 5021 Keep to zero when no symbol should be popped. */ 5022 int yylen = 0; 5023 5024 yytoken = 0; 5025 yyss = yyssa; 5026 yyvs = yyvsa; 5027 yystacksize = YYINITDEPTH; 5028 5029 YYDPRINTF ((stderr, "Starting parse\n")); 5030 5031 yystate = 0; 5032 yyerrstatus = 0; 5033 yynerrs = 0; 5034 yychar = YYEMPTY; /* Cause a token to be read. */ 5035 5036 /* Initialize stack pointers. 5037 Waste one element of value and location stack 5038 so that they stay on the same level as the state stack. 5039 The wasted elements are never initialized. */ 5040 yyssp = yyss; 5041 yyvsp = yyvs; 5042 5043 goto yysetstate; 5044 5045/*------------------------------------------------------------. 5046| yynewstate -- Push a new state, which is found in yystate. | 5047`------------------------------------------------------------*/ 5048 yynewstate: 5049 /* In all cases, when you get here, the value and location stacks 5050 have just been pushed. So pushing a state here evens the stacks. */ 5051 yyssp++; 5052 5053 yysetstate: 5054 *yyssp = yystate; 5055 5056 if (yyss + yystacksize - 1 <= yyssp) 5057 { 5058 /* Get the current used size of the three stacks, in elements. */ 5059 YYSIZE_T yysize = yyssp - yyss + 1; 5060 5061#ifdef yyoverflow 5062 { 5063 /* Give user a chance to reallocate the stack. Use copies of 5064 these so that the &'s don't force the real ones into 5065 memory. */ 5066 YYSTYPE *yyvs1 = yyvs; 5067 yytype_int16 *yyss1 = yyss; 5068 5069 /* Each stack pointer address is followed by the size of the 5070 data in use in that stack, in bytes. This used to be a 5071 conditional around just the two extra args, but that might 5072 be undefined if yyoverflow is a macro. */ 5073 yyoverflow (YY_("memory exhausted"), 5074 &yyss1, yysize * sizeof (*yyssp), 5075 &yyvs1, yysize * sizeof (*yyvsp), 5076 &yystacksize); 5077 5078 yyss = yyss1; 5079 yyvs = yyvs1; 5080 } 5081#else /* no yyoverflow */ 5082# ifndef YYSTACK_RELOCATE 5083 goto yyexhaustedlab; 5084# else 5085 /* Extend the stack our own way. */ 5086 if (YYMAXDEPTH <= yystacksize) 5087 goto yyexhaustedlab; 5088 yystacksize *= 2; 5089 if (YYMAXDEPTH < yystacksize) 5090 yystacksize = YYMAXDEPTH; 5091 5092 { 5093 yytype_int16 *yyss1 = yyss; 5094 union yyalloc *yyptr = 5095 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 5096 if (! yyptr) 5097 goto yyexhaustedlab; 5098 YYSTACK_RELOCATE (yyss_alloc, yyss); 5099 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 5100# undef YYSTACK_RELOCATE 5101 if (yyss1 != yyssa) 5102 YYSTACK_FREE (yyss1); 5103 } 5104# endif 5105#endif /* no yyoverflow */ 5106 5107 yyssp = yyss + yysize - 1; 5108 yyvsp = yyvs + yysize - 1; 5109 5110 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 5111 (unsigned long int) yystacksize)); 5112 5113 if (yyss + yystacksize - 1 <= yyssp) 5114 YYABORT; 5115 } 5116 5117 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 5118 5119 if (yystate == YYFINAL) 5120 YYACCEPT; 5121 5122 goto yybackup; 5123 5124/*-----------. 5125| yybackup. | 5126`-----------*/ 5127yybackup: 5128 5129 /* Do appropriate processing given the current state. Read a 5130 lookahead token if we need one and don't already have one. */ 5131 5132 /* First try to decide what to do without reference to lookahead token. */ 5133 yyn = yypact[yystate]; 5134 if (yypact_value_is_default (yyn)) 5135 goto yydefault; 5136 5137 /* Not known => get a lookahead token if don't already have one. */ 5138 5139 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 5140 if (yychar == YYEMPTY) 5141 { 5142 YYDPRINTF ((stderr, "Reading a token: ")); 5143 yychar = YYLEX; 5144 } 5145 5146 if (yychar <= YYEOF) 5147 { 5148 yychar = yytoken = YYEOF; 5149 YYDPRINTF ((stderr, "Now at end of input.\n")); 5150 } 5151 else 5152 { 5153 yytoken = YYTRANSLATE (yychar); 5154 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 5155 } 5156 5157 /* If the proper action on seeing token YYTOKEN is to reduce or to 5158 detect an error, take that action. */ 5159 yyn += yytoken; 5160 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 5161 goto yydefault; 5162 yyn = yytable[yyn]; 5163 if (yyn <= 0) 5164 { 5165 if (yytable_value_is_error (yyn)) 5166 goto yyerrlab; 5167 yyn = -yyn; 5168 goto yyreduce; 5169 } 5170 5171 /* Count tokens shifted since error; after three, turn off error 5172 status. */ 5173 if (yyerrstatus) 5174 yyerrstatus--; 5175 5176 /* Shift the lookahead token. */ 5177 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 5178 5179 /* Discard the shifted token. */ 5180 yychar = YYEMPTY; 5181 5182 yystate = yyn; 5183 *++yyvsp = yylval; 5184 5185 goto yynewstate; 5186 5187 5188/*-----------------------------------------------------------. 5189| yydefault -- do the default action for the current state. | 5190`-----------------------------------------------------------*/ 5191yydefault: 5192 yyn = yydefact[yystate]; 5193 if (yyn == 0) 5194 goto yyerrlab; 5195 goto yyreduce; 5196 5197 5198/*-----------------------------. 5199| yyreduce -- Do a reduction. | 5200`-----------------------------*/ 5201yyreduce: 5202 /* yyn is the number of a rule to reduce with. */ 5203 yylen = yyr2[yyn]; 5204 5205 /* If YYLEN is nonzero, implement the default value of the action: 5206 `$$ = $1'. 5207 5208 Otherwise, the following line sets YYVAL to garbage. 5209 This behavior is undocumented and Bison 5210 users should not rely upon it. Assigning to YYVAL 5211 unconditionally makes the parser a bit smaller, and it avoids a 5212 GCC warning that YYVAL may be used uninitialized. */ 5213 yyval = yyvsp[1-yylen]; 5214 5215 5216 YY_REDUCE_PRINT (yyn); 5217 switch (yyn) 5218 { 5219 case 2: 5220 5221/* Line 1806 of yacc.c */ 5222#line 855 "ripper.y" 5223 { 5224 lex_state = EXPR_BEG; 5225#if 0 5226 local_push(compile_for_eval || rb_parse_in_main()); 5227#endif 5228 local_push(0); 5229 5230 } 5231 break; 5232 5233 case 3: 5234 5235/* Line 1806 of yacc.c */ 5236#line 864 "ripper.y" 5237 { 5238#if 0 5239 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) { 5240 /* last expression should not be void */ 5241 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val)); 5242 else { 5243 NODE *node = (yyvsp[(2) - (2)].val); 5244 while (node->nd_next) { 5245 node = node->nd_next; 5246 } 5247 void_expr(node->nd_head); 5248 } 5249 } 5250 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val))); 5251#endif 5252 (yyval.val) = (yyvsp[(2) - (2)].val); 5253 parser->result = dispatch1(program, (yyval.val)); 5254 5255 local_pop(); 5256 } 5257 break; 5258 5259 case 4: 5260 5261/* Line 1806 of yacc.c */ 5262#line 887 "ripper.y" 5263 { 5264#if 0 5265 void_stmts((yyvsp[(1) - (2)].val)); 5266 fixup_nodes(&deferred_nodes); 5267#endif 5268 5269 (yyval.val) = (yyvsp[(1) - (2)].val); 5270 } 5271 break; 5272 5273 case 5: 5274 5275/* Line 1806 of yacc.c */ 5276#line 898 "ripper.y" 5277 { 5278#if 0 5279 (yyval.val) = NEW_BEGIN(0); 5280#endif 5281 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 5282 dispatch0(void_stmt)); 5283 5284 } 5285 break; 5286 5287 case 6: 5288 5289/* Line 1806 of yacc.c */ 5290#line 907 "ripper.y" 5291 { 5292#if 0 5293 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 5294#endif 5295 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 5296 5297 } 5298 break; 5299 5300 case 7: 5301 5302/* Line 1806 of yacc.c */ 5303#line 915 "ripper.y" 5304 { 5305#if 0 5306 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 5307#endif 5308 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5309 5310 } 5311 break; 5312 5313 case 8: 5314 5315/* Line 1806 of yacc.c */ 5316#line 923 "ripper.y" 5317 { 5318 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 5319 } 5320 break; 5321 5322 case 10: 5323 5324/* Line 1806 of yacc.c */ 5325#line 930 "ripper.y" 5326 { 5327#if 0 5328 /* local_push(0); */ 5329#endif 5330 5331 } 5332 break; 5333 5334 case 11: 5335 5336/* Line 1806 of yacc.c */ 5337#line 937 "ripper.y" 5338 { 5339#if 0 5340 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 5341 (yyvsp[(4) - (5)].val)); 5342 /* NEW_PREEXE($4)); */ 5343 /* local_pop(); */ 5344 (yyval.val) = NEW_BEGIN(0); 5345#endif 5346 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 5347 5348 } 5349 break; 5350 5351 case 12: 5352 5353/* Line 1806 of yacc.c */ 5354#line 954 "ripper.y" 5355 { 5356#if 0 5357 (yyval.val) = (yyvsp[(1) - (4)].val); 5358 if ((yyvsp[(2) - (4)].val)) { 5359 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 5360 } 5361 else if ((yyvsp[(3) - (4)].val)) { 5362 rb_warn0("else without rescue is useless"); 5363 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val)); 5364 } 5365 if ((yyvsp[(4) - (4)].val)) { 5366 if ((yyval.val)) { 5367 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val)); 5368 } 5369 else { 5370 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL()); 5371 } 5372 } 5373 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 5374#endif 5375 (yyval.val) = dispatch4(bodystmt, 5376 escape_Qundef((yyvsp[(1) - (4)].val)), 5377 escape_Qundef((yyvsp[(2) - (4)].val)), 5378 escape_Qundef((yyvsp[(3) - (4)].val)), 5379 escape_Qundef((yyvsp[(4) - (4)].val))); 5380 5381 } 5382 break; 5383 5384 case 13: 5385 5386/* Line 1806 of yacc.c */ 5387#line 984 "ripper.y" 5388 { 5389#if 0 5390 void_stmts((yyvsp[(1) - (2)].val)); 5391 fixup_nodes(&deferred_nodes); 5392#endif 5393 5394 (yyval.val) = (yyvsp[(1) - (2)].val); 5395 } 5396 break; 5397 5398 case 14: 5399 5400/* Line 1806 of yacc.c */ 5401#line 995 "ripper.y" 5402 { 5403#if 0 5404 (yyval.val) = NEW_BEGIN(0); 5405#endif 5406 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), 5407 dispatch0(void_stmt)); 5408 5409 } 5410 break; 5411 5412 case 15: 5413 5414/* Line 1806 of yacc.c */ 5415#line 1004 "ripper.y" 5416 { 5417#if 0 5418 (yyval.val) = newline_node((yyvsp[(1) - (1)].val)); 5419#endif 5420 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val)); 5421 5422 } 5423 break; 5424 5425 case 16: 5426 5427/* Line 1806 of yacc.c */ 5428#line 1012 "ripper.y" 5429 { 5430#if 0 5431 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val))); 5432#endif 5433 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5434 5435 } 5436 break; 5437 5438 case 17: 5439 5440/* Line 1806 of yacc.c */ 5441#line 1020 "ripper.y" 5442 { 5443 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val)); 5444 } 5445 break; 5446 5447 case 18: 5448 5449/* Line 1806 of yacc.c */ 5450#line 1026 "ripper.y" 5451 { 5452 (yyval.val) = (yyvsp[(1) - (1)].val); 5453 } 5454 break; 5455 5456 case 19: 5457 5458/* Line 1806 of yacc.c */ 5459#line 1030 "ripper.y" 5460 { 5461 yyerror("BEGIN is permitted only at toplevel"); 5462#if 0 5463 /* local_push(0); */ 5464#endif 5465 5466 } 5467 break; 5468 5469 case 20: 5470 5471/* Line 1806 of yacc.c */ 5472#line 1038 "ripper.y" 5473 { 5474#if 0 5475 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin, 5476 (yyvsp[(4) - (5)].val)); 5477 /* NEW_PREEXE($4)); */ 5478 /* local_pop(); */ 5479 (yyval.val) = NEW_BEGIN(0); 5480#endif 5481 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val)); 5482 5483 } 5484 break; 5485 5486 case 21: 5487 5488/* Line 1806 of yacc.c */ 5489#line 1050 "ripper.y" 5490 {lex_state = EXPR_FNAME;} 5491 break; 5492 5493 case 22: 5494 5495/* Line 1806 of yacc.c */ 5496#line 1051 "ripper.y" 5497 { 5498#if 0 5499 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 5500#endif 5501 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 5502 5503 } 5504 break; 5505 5506 case 23: 5507 5508/* Line 1806 of yacc.c */ 5509#line 1059 "ripper.y" 5510 { 5511#if 0 5512 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 5513#endif 5514 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 5515 5516 } 5517 break; 5518 5519 case 24: 5520 5521/* Line 1806 of yacc.c */ 5522#line 1067 "ripper.y" 5523 { 5524#if 0 5525 char buf[2]; 5526 buf[0] = '$'; 5527 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth; 5528 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2)); 5529#endif 5530 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 5531 5532 } 5533 break; 5534 5535 case 25: 5536 5537/* Line 1806 of yacc.c */ 5538#line 1078 "ripper.y" 5539 { 5540#if 0 5541 yyerror("can't make alias for the number variables"); 5542 (yyval.val) = NEW_BEGIN(0); 5543#endif 5544 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 5545 (yyval.val) = dispatch1(alias_error, (yyval.val)); 5546 5547 } 5548 break; 5549 5550 case 26: 5551 5552/* Line 1806 of yacc.c */ 5553#line 1088 "ripper.y" 5554 { 5555#if 0 5556 (yyval.val) = (yyvsp[(2) - (2)].val); 5557#endif 5558 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val)); 5559 5560 } 5561 break; 5562 5563 case 27: 5564 5565/* Line 1806 of yacc.c */ 5566#line 1096 "ripper.y" 5567 { 5568#if 0 5569 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 5570 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 5571#endif 5572 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 5573 5574 } 5575 break; 5576 5577 case 28: 5578 5579/* Line 1806 of yacc.c */ 5580#line 1105 "ripper.y" 5581 { 5582#if 0 5583 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0); 5584 fixpos((yyval.val), (yyvsp[(3) - (3)].val)); 5585#endif 5586 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 5587 5588 } 5589 break; 5590 5591 case 29: 5592 5593/* Line 1806 of yacc.c */ 5594#line 1114 "ripper.y" 5595 { 5596#if 0 5597 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 5598 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 5599 } 5600 else { 5601 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 5602 } 5603#endif 5604 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 5605 5606 } 5607 break; 5608 5609 case 30: 5610 5611/* Line 1806 of yacc.c */ 5612#line 1127 "ripper.y" 5613 { 5614#if 0 5615 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) { 5616 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0); 5617 } 5618 else { 5619 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1); 5620 } 5621#endif 5622 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val)); 5623 5624 } 5625 break; 5626 5627 case 31: 5628 5629/* Line 1806 of yacc.c */ 5630#line 1140 "ripper.y" 5631 { 5632#if 0 5633 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0); 5634 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0); 5635#endif 5636 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5637 5638 } 5639 break; 5640 5641 case 32: 5642 5643/* Line 1806 of yacc.c */ 5644#line 1149 "ripper.y" 5645 { 5646 if (in_def || in_single) { 5647 rb_warn0("END in method; use at_exit"); 5648 } 5649#if 0 5650 (yyval.val) = NEW_POSTEXE(NEW_NODE( 5651 NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].val) /* body */, 0 /* args */)); 5652#endif 5653 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val)); 5654 5655 } 5656 break; 5657 5658 case 34: 5659 5660/* Line 1806 of yacc.c */ 5661#line 1162 "ripper.y" 5662 { 5663#if 0 5664 value_expr((yyvsp[(3) - (3)].val)); 5665 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 5666 (yyval.val) = (yyvsp[(1) - (3)].val); 5667#endif 5668 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5669 5670 } 5671 break; 5672 5673 case 35: 5674 5675/* Line 1806 of yacc.c */ 5676#line 1172 "ripper.y" 5677 { 5678 value_expr((yyvsp[(3) - (3)].val)); 5679 (yyval.val) = new_op_assign((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 5680 } 5681 break; 5682 5683 case 36: 5684 5685/* Line 1806 of yacc.c */ 5686#line 1177 "ripper.y" 5687 { 5688#if 0 5689 NODE *args; 5690 5691 value_expr((yyvsp[(6) - (6)].val)); 5692 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 5693 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 5694 if ((yyvsp[(5) - (6)].val) == tOROP) { 5695 (yyvsp[(5) - (6)].val) = 0; 5696 } 5697 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 5698 (yyvsp[(5) - (6)].val) = 1; 5699 } 5700 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 5701 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 5702#endif 5703 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 5704 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 5705 5706 } 5707 break; 5708 5709 case 37: 5710 5711/* Line 1806 of yacc.c */ 5712#line 1198 "ripper.y" 5713 { 5714 value_expr((yyvsp[(5) - (5)].val)); 5715 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 5716 } 5717 break; 5718 5719 case 38: 5720 5721/* Line 1806 of yacc.c */ 5722#line 1203 "ripper.y" 5723 { 5724 value_expr((yyvsp[(5) - (5)].val)); 5725 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 5726 } 5727 break; 5728 5729 case 39: 5730 5731/* Line 1806 of yacc.c */ 5732#line 1208 "ripper.y" 5733 { 5734#if 0 5735 (yyval.val) = NEW_COLON2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 5736 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 5737#endif 5738 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 5739 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 5740 5741 } 5742 break; 5743 5744 case 40: 5745 5746/* Line 1806 of yacc.c */ 5747#line 1218 "ripper.y" 5748 { 5749 value_expr((yyvsp[(5) - (5)].val)); 5750 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 5751 } 5752 break; 5753 5754 case 41: 5755 5756/* Line 1806 of yacc.c */ 5757#line 1223 "ripper.y" 5758 { 5759#if 0 5760 rb_backref_error((yyvsp[(1) - (3)].val)); 5761 (yyval.val) = NEW_BEGIN(0); 5762#endif 5763 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 5764 (yyval.val) = dispatch1(assign_error, (yyval.val)); 5765 5766 } 5767 break; 5768 5769 case 42: 5770 5771/* Line 1806 of yacc.c */ 5772#line 1233 "ripper.y" 5773 { 5774#if 0 5775 value_expr((yyvsp[(3) - (3)].val)); 5776 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5777#endif 5778 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5779 5780 } 5781 break; 5782 5783 case 43: 5784 5785/* Line 1806 of yacc.c */ 5786#line 1242 "ripper.y" 5787 { 5788#if 0 5789 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 5790 (yyval.val) = (yyvsp[(1) - (3)].val); 5791#endif 5792 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5793 5794 } 5795 break; 5796 5797 case 44: 5798 5799/* Line 1806 of yacc.c */ 5800#line 1251 "ripper.y" 5801 { 5802#if 0 5803 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val); 5804 (yyval.val) = (yyvsp[(1) - (3)].val); 5805#endif 5806 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5807 5808 } 5809 break; 5810 5811 case 46: 5812 5813/* Line 1806 of yacc.c */ 5814#line 1263 "ripper.y" 5815 { 5816#if 0 5817 value_expr((yyvsp[(3) - (3)].val)); 5818 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5819#endif 5820 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5821 5822 } 5823 break; 5824 5825 case 47: 5826 5827/* Line 1806 of yacc.c */ 5828#line 1272 "ripper.y" 5829 { 5830#if 0 5831 value_expr((yyvsp[(3) - (3)].val)); 5832 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5833#endif 5834 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5835 5836 } 5837 break; 5838 5839 case 49: 5840 5841/* Line 1806 of yacc.c */ 5842#line 1285 "ripper.y" 5843 { 5844#if 0 5845 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5846#endif 5847 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val)); 5848 5849 } 5850 break; 5851 5852 case 50: 5853 5854/* Line 1806 of yacc.c */ 5855#line 1293 "ripper.y" 5856 { 5857#if 0 5858 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 5859#endif 5860 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val)); 5861 5862 } 5863 break; 5864 5865 case 51: 5866 5867/* Line 1806 of yacc.c */ 5868#line 1301 "ripper.y" 5869 { 5870#if 0 5871 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!'); 5872#endif 5873 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val)); 5874 5875 } 5876 break; 5877 5878 case 52: 5879 5880/* Line 1806 of yacc.c */ 5881#line 1309 "ripper.y" 5882 { 5883#if 0 5884 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 5885#endif 5886 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val)); 5887 5888 } 5889 break; 5890 5891 case 54: 5892 5893/* Line 1806 of yacc.c */ 5894#line 1320 "ripper.y" 5895 { 5896#if 0 5897 value_expr((yyvsp[(1) - (1)].val)); 5898 (yyval.val) = (yyvsp[(1) - (1)].val); 5899 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 5900#endif 5901 (yyval.val) = (yyvsp[(1) - (1)].val); 5902 5903 } 5904 break; 5905 5906 case 58: 5907 5908/* Line 1806 of yacc.c */ 5909#line 1337 "ripper.y" 5910 { 5911#if 0 5912 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 5913#endif 5914 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 5915 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val)); 5916 5917 } 5918 break; 5919 5920 case 59: 5921 5922/* Line 1806 of yacc.c */ 5923#line 1348 "ripper.y" 5924 { 5925 (yyvsp[(1) - (1)].vars) = dyna_push(); 5926#if 0 5927 (yyval.num) = ruby_sourceline; 5928#endif 5929 5930 } 5931 break; 5932 5933 case 60: 5934 5935/* Line 1806 of yacc.c */ 5936#line 1358 "ripper.y" 5937 { 5938#if 0 5939 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 5940 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 5941#endif 5942 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 5943 5944 dyna_pop((yyvsp[(1) - (5)].vars)); 5945 } 5946 break; 5947 5948 case 61: 5949 5950/* Line 1806 of yacc.c */ 5951#line 1370 "ripper.y" 5952 { 5953#if 0 5954 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 5955 nd_set_line((yyval.val), tokline); 5956#endif 5957 5958 } 5959 break; 5960 5961 case 62: 5962 5963/* Line 1806 of yacc.c */ 5964#line 1380 "ripper.y" 5965 { 5966#if 0 5967 (yyval.val) = (yyvsp[(1) - (2)].val); 5968 (yyval.val)->nd_args = (yyvsp[(2) - (2)].val); 5969#endif 5970 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 5971 5972 } 5973 break; 5974 5975 case 63: 5976 5977/* Line 1806 of yacc.c */ 5978#line 1389 "ripper.y" 5979 { 5980#if 0 5981 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val)); 5982 (yyvsp[(1) - (3)].val)->nd_args = (yyvsp[(2) - (3)].val); 5983 (yyvsp[(3) - (3)].val)->nd_iter = (yyvsp[(1) - (3)].val); 5984 (yyval.val) = (yyvsp[(3) - (3)].val); 5985 fixpos((yyval.val), (yyvsp[(1) - (3)].val)); 5986#endif 5987 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 5988 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val)); 5989 5990 } 5991 break; 5992 5993 case 64: 5994 5995/* Line 1806 of yacc.c */ 5996#line 1402 "ripper.y" 5997 { 5998#if 0 5999 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 6000 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 6001#endif 6002 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 6003 6004 } 6005 break; 6006 6007 case 65: 6008 6009/* Line 1806 of yacc.c */ 6010#line 1411 "ripper.y" 6011 { 6012#if 0 6013 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 6014 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 6015 (yyval.val) = (yyvsp[(5) - (5)].val); 6016 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 6017#endif 6018 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 6019 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 6020 6021 } 6022 break; 6023 6024 case 66: 6025 6026/* Line 1806 of yacc.c */ 6027#line 1423 "ripper.y" 6028 { 6029#if 0 6030 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 6031 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 6032#endif 6033 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 6034 6035 } 6036 break; 6037 6038 case 67: 6039 6040/* Line 1806 of yacc.c */ 6041#line 1432 "ripper.y" 6042 { 6043#if 0 6044 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val)); 6045 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 6046 (yyval.val) = (yyvsp[(5) - (5)].val); 6047 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 6048#endif 6049 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 6050 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 6051 6052 } 6053 break; 6054 6055 case 68: 6056 6057/* Line 1806 of yacc.c */ 6058#line 1444 "ripper.y" 6059 { 6060#if 0 6061 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 6062 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 6063#endif 6064 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 6065 6066 } 6067 break; 6068 6069 case 69: 6070 6071/* Line 1806 of yacc.c */ 6072#line 1453 "ripper.y" 6073 { 6074#if 0 6075 (yyval.val) = new_yield((yyvsp[(2) - (2)].val)); 6076 fixpos((yyval.val), (yyvsp[(2) - (2)].val)); 6077#endif 6078 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val)); 6079 6080 } 6081 break; 6082 6083 case 70: 6084 6085/* Line 1806 of yacc.c */ 6086#line 1462 "ripper.y" 6087 { 6088#if 0 6089 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val))); 6090#endif 6091 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val)); 6092 6093 } 6094 break; 6095 6096 case 71: 6097 6098/* Line 1806 of yacc.c */ 6099#line 1470 "ripper.y" 6100 { 6101#if 0 6102 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val))); 6103#endif 6104 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val)); 6105 6106 } 6107 break; 6108 6109 case 72: 6110 6111/* Line 1806 of yacc.c */ 6112#line 1478 "ripper.y" 6113 { 6114#if 0 6115 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val))); 6116#endif 6117 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val)); 6118 6119 } 6120 break; 6121 6122 case 74: 6123 6124/* Line 1806 of yacc.c */ 6125#line 1489 "ripper.y" 6126 { 6127#if 0 6128 (yyval.val) = (yyvsp[(2) - (3)].val); 6129#endif 6130 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 6131 6132 } 6133 break; 6134 6135 case 76: 6136 6137/* Line 1806 of yacc.c */ 6138#line 1500 "ripper.y" 6139 { 6140#if 0 6141 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0); 6142#endif 6143 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 6144 6145 } 6146 break; 6147 6148 case 77: 6149 6150/* Line 1806 of yacc.c */ 6151#line 1510 "ripper.y" 6152 { 6153#if 0 6154 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 6155#endif 6156 (yyval.val) = (yyvsp[(1) - (1)].val); 6157 6158 } 6159 break; 6160 6161 case 78: 6162 6163/* Line 1806 of yacc.c */ 6164#line 1518 "ripper.y" 6165 { 6166#if 0 6167 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0); 6168#endif 6169 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 6170 6171 } 6172 break; 6173 6174 case 79: 6175 6176/* Line 1806 of yacc.c */ 6177#line 1526 "ripper.y" 6178 { 6179#if 0 6180 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6181#endif 6182 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6183 6184 } 6185 break; 6186 6187 case 80: 6188 6189/* Line 1806 of yacc.c */ 6190#line 1534 "ripper.y" 6191 { 6192#if 0 6193 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val))); 6194#endif 6195 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 6196 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 6197 6198 } 6199 break; 6200 6201 case 81: 6202 6203/* Line 1806 of yacc.c */ 6204#line 1543 "ripper.y" 6205 { 6206#if 0 6207 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1); 6208#endif 6209 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil); 6210 6211 } 6212 break; 6213 6214 case 82: 6215 6216/* Line 1806 of yacc.c */ 6217#line 1551 "ripper.y" 6218 { 6219#if 0 6220 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val))); 6221#endif 6222 (yyvsp[(1) - (4)].val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil); 6223 (yyval.val) = mlhs_add((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 6224 6225 } 6226 break; 6227 6228 case 83: 6229 6230/* Line 1806 of yacc.c */ 6231#line 1560 "ripper.y" 6232 { 6233#if 0 6234 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val)); 6235#endif 6236 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val)); 6237 6238 } 6239 break; 6240 6241 case 84: 6242 6243/* Line 1806 of yacc.c */ 6244#line 1568 "ripper.y" 6245 { 6246#if 0 6247 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val))); 6248#endif 6249 (yyvsp[(2) - (4)].val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val)); 6250 (yyval.val) = mlhs_add((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val)); 6251 6252 } 6253 break; 6254 6255 case 85: 6256 6257/* Line 1806 of yacc.c */ 6258#line 1577 "ripper.y" 6259 { 6260#if 0 6261 (yyval.val) = NEW_MASGN(0, -1); 6262#endif 6263 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 6264 6265 } 6266 break; 6267 6268 case 86: 6269 6270/* Line 1806 of yacc.c */ 6271#line 1585 "ripper.y" 6272 { 6273#if 0 6274 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 6275#endif 6276 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 6277 (yyval.val) = mlhs_add((yyval.val), (yyvsp[(3) - (3)].val)); 6278 6279 } 6280 break; 6281 6282 case 88: 6283 6284/* Line 1806 of yacc.c */ 6285#line 1597 "ripper.y" 6286 { 6287#if 0 6288 (yyval.val) = (yyvsp[(2) - (3)].val); 6289#endif 6290 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 6291 6292 } 6293 break; 6294 6295 case 89: 6296 6297/* Line 1806 of yacc.c */ 6298#line 1607 "ripper.y" 6299 { 6300#if 0 6301 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val)); 6302#endif 6303 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val)); 6304 6305 } 6306 break; 6307 6308 case 90: 6309 6310/* Line 1806 of yacc.c */ 6311#line 1615 "ripper.y" 6312 { 6313#if 0 6314 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 6315#endif 6316 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 6317 6318 } 6319 break; 6320 6321 case 91: 6322 6323/* Line 1806 of yacc.c */ 6324#line 1625 "ripper.y" 6325 { 6326#if 0 6327 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 6328#endif 6329 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 6330 6331 } 6332 break; 6333 6334 case 92: 6335 6336/* Line 1806 of yacc.c */ 6337#line 1633 "ripper.y" 6338 { 6339#if 0 6340 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6341#endif 6342 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6343 6344 } 6345 break; 6346 6347 case 93: 6348 6349/* Line 1806 of yacc.c */ 6350#line 1643 "ripper.y" 6351 { 6352 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 6353 } 6354 break; 6355 6356 case 94: 6357 6358/* Line 1806 of yacc.c */ 6359#line 1647 "ripper.y" 6360 { 6361 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 6362 } 6363 break; 6364 6365 case 95: 6366 6367/* Line 1806 of yacc.c */ 6368#line 1651 "ripper.y" 6369 { 6370#if 0 6371 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 6372#endif 6373 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 6374 6375 } 6376 break; 6377 6378 case 96: 6379 6380/* Line 1806 of yacc.c */ 6381#line 1659 "ripper.y" 6382 { 6383#if 0 6384 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6385#endif 6386 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 6387 6388 } 6389 break; 6390 6391 case 97: 6392 6393/* Line 1806 of yacc.c */ 6394#line 1667 "ripper.y" 6395 { 6396#if 0 6397 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6398#endif 6399 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6400 6401 } 6402 break; 6403 6404 case 98: 6405 6406/* Line 1806 of yacc.c */ 6407#line 1675 "ripper.y" 6408 { 6409#if 0 6410 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6411#endif 6412 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 6413 6414 } 6415 break; 6416 6417 case 99: 6418 6419/* Line 1806 of yacc.c */ 6420#line 1683 "ripper.y" 6421 { 6422#if 0 6423 if (in_def || in_single) 6424 yyerror("dynamic constant assignment"); 6425 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 6426#endif 6427 if (in_def || in_single) 6428 yyerror("dynamic constant assignment"); 6429 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6430 6431 } 6432 break; 6433 6434 case 100: 6435 6436/* Line 1806 of yacc.c */ 6437#line 1695 "ripper.y" 6438 { 6439#if 0 6440 if (in_def || in_single) 6441 yyerror("dynamic constant assignment"); 6442 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 6443#endif 6444 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 6445 6446 } 6447 break; 6448 6449 case 101: 6450 6451/* Line 1806 of yacc.c */ 6452#line 1705 "ripper.y" 6453 { 6454#if 0 6455 rb_backref_error((yyvsp[(1) - (1)].val)); 6456 (yyval.val) = NEW_BEGIN(0); 6457#endif 6458 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val)); 6459 (yyval.val) = dispatch1(assign_error, (yyval.val)); 6460 6461 } 6462 break; 6463 6464 case 102: 6465 6466/* Line 1806 of yacc.c */ 6467#line 1717 "ripper.y" 6468 { 6469 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 6470#if 0 6471 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 6472#endif 6473 (yyval.val) = dispatch1(var_field, (yyval.val)); 6474 6475 } 6476 break; 6477 6478 case 103: 6479 6480/* Line 1806 of yacc.c */ 6481#line 1726 "ripper.y" 6482 { 6483 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 6484#if 0 6485 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0); 6486#endif 6487 (yyval.val) = dispatch1(var_field, (yyval.val)); 6488 6489 } 6490 break; 6491 6492 case 104: 6493 6494/* Line 1806 of yacc.c */ 6495#line 1735 "ripper.y" 6496 { 6497#if 0 6498 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 6499#endif 6500 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 6501 6502 } 6503 break; 6504 6505 case 105: 6506 6507/* Line 1806 of yacc.c */ 6508#line 1743 "ripper.y" 6509 { 6510#if 0 6511 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6512#endif 6513 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 6514 6515 } 6516 break; 6517 6518 case 106: 6519 6520/* Line 1806 of yacc.c */ 6521#line 1751 "ripper.y" 6522 { 6523#if 0 6524 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6525#endif 6526 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 6527 6528 } 6529 break; 6530 6531 case 107: 6532 6533/* Line 1806 of yacc.c */ 6534#line 1759 "ripper.y" 6535 { 6536#if 0 6537 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6538#endif 6539 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val)); 6540 6541 } 6542 break; 6543 6544 case 108: 6545 6546/* Line 1806 of yacc.c */ 6547#line 1767 "ripper.y" 6548 { 6549#if 0 6550 if (in_def || in_single) 6551 yyerror("dynamic constant assignment"); 6552 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val))); 6553#endif 6554 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6555 if (in_def || in_single) { 6556 (yyval.val) = dispatch1(assign_error, (yyval.val)); 6557 } 6558 6559 } 6560 break; 6561 6562 case 109: 6563 6564/* Line 1806 of yacc.c */ 6565#line 1780 "ripper.y" 6566 { 6567#if 0 6568 if (in_def || in_single) 6569 yyerror("dynamic constant assignment"); 6570 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val))); 6571#endif 6572 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val)); 6573 if (in_def || in_single) { 6574 (yyval.val) = dispatch1(assign_error, (yyval.val)); 6575 } 6576 6577 } 6578 break; 6579 6580 case 110: 6581 6582/* Line 1806 of yacc.c */ 6583#line 1793 "ripper.y" 6584 { 6585#if 0 6586 rb_backref_error((yyvsp[(1) - (1)].val)); 6587 (yyval.val) = NEW_BEGIN(0); 6588#endif 6589 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val)); 6590 6591 } 6592 break; 6593 6594 case 111: 6595 6596/* Line 1806 of yacc.c */ 6597#line 1804 "ripper.y" 6598 { 6599#if 0 6600 yyerror("class/module name must be CONSTANT"); 6601#endif 6602 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val)); 6603 6604 } 6605 break; 6606 6607 case 113: 6608 6609/* Line 1806 of yacc.c */ 6610#line 1815 "ripper.y" 6611 { 6612#if 0 6613 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 6614#endif 6615 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 6616 6617 } 6618 break; 6619 6620 case 114: 6621 6622/* Line 1806 of yacc.c */ 6623#line 1823 "ripper.y" 6624 { 6625#if 0 6626 (yyval.val) = NEW_COLON2(0, (yyval.val)); 6627#endif 6628 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val)); 6629 6630 } 6631 break; 6632 6633 case 115: 6634 6635/* Line 1806 of yacc.c */ 6636#line 1831 "ripper.y" 6637 { 6638#if 0 6639 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6640#endif 6641 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6642 6643 } 6644 break; 6645 6646 case 119: 6647 6648/* Line 1806 of yacc.c */ 6649#line 1844 "ripper.y" 6650 { 6651 lex_state = EXPR_ENDFN; 6652 (yyval.val) = (yyvsp[(1) - (1)].val); 6653 } 6654 break; 6655 6656 case 120: 6657 6658/* Line 1806 of yacc.c */ 6659#line 1849 "ripper.y" 6660 { 6661 lex_state = EXPR_ENDFN; 6662#if 0 6663 (yyval.val) = (yyvsp[(1) - (1)].id); 6664#endif 6665 (yyval.val) = (yyvsp[(1) - (1)].val); 6666 6667 } 6668 break; 6669 6670 case 123: 6671 6672/* Line 1806 of yacc.c */ 6673#line 1864 "ripper.y" 6674 { 6675#if 0 6676 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 6677#endif 6678 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 6679 6680 } 6681 break; 6682 6683 case 125: 6684 6685/* Line 1806 of yacc.c */ 6686#line 1875 "ripper.y" 6687 { 6688#if 0 6689 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val)); 6690#endif 6691 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 6692 6693 } 6694 break; 6695 6696 case 126: 6697 6698/* Line 1806 of yacc.c */ 6699#line 1882 "ripper.y" 6700 {lex_state = EXPR_FNAME;} 6701 break; 6702 6703 case 127: 6704 6705/* Line 1806 of yacc.c */ 6706#line 1883 "ripper.y" 6707 { 6708#if 0 6709 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val))); 6710#endif 6711 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 6712 6713 } 6714 break; 6715 6716 case 128: 6717 6718/* Line 1806 of yacc.c */ 6719#line 1892 "ripper.y" 6720 { ifndef_ripper((yyval.val) = '|'); } 6721 break; 6722 6723 case 129: 6724 6725/* Line 1806 of yacc.c */ 6726#line 1893 "ripper.y" 6727 { ifndef_ripper((yyval.val) = '^'); } 6728 break; 6729 6730 case 130: 6731 6732/* Line 1806 of yacc.c */ 6733#line 1894 "ripper.y" 6734 { ifndef_ripper((yyval.val) = '&'); } 6735 break; 6736 6737 case 131: 6738 6739/* Line 1806 of yacc.c */ 6740#line 1895 "ripper.y" 6741 { ifndef_ripper((yyval.val) = tCMP); } 6742 break; 6743 6744 case 132: 6745 6746/* Line 1806 of yacc.c */ 6747#line 1896 "ripper.y" 6748 { ifndef_ripper((yyval.val) = tEQ); } 6749 break; 6750 6751 case 133: 6752 6753/* Line 1806 of yacc.c */ 6754#line 1897 "ripper.y" 6755 { ifndef_ripper((yyval.val) = tEQQ); } 6756 break; 6757 6758 case 134: 6759 6760/* Line 1806 of yacc.c */ 6761#line 1898 "ripper.y" 6762 { ifndef_ripper((yyval.val) = tMATCH); } 6763 break; 6764 6765 case 135: 6766 6767/* Line 1806 of yacc.c */ 6768#line 1899 "ripper.y" 6769 { ifndef_ripper((yyval.val) = tNMATCH); } 6770 break; 6771 6772 case 136: 6773 6774/* Line 1806 of yacc.c */ 6775#line 1900 "ripper.y" 6776 { ifndef_ripper((yyval.val) = '>'); } 6777 break; 6778 6779 case 137: 6780 6781/* Line 1806 of yacc.c */ 6782#line 1901 "ripper.y" 6783 { ifndef_ripper((yyval.val) = tGEQ); } 6784 break; 6785 6786 case 138: 6787 6788/* Line 1806 of yacc.c */ 6789#line 1902 "ripper.y" 6790 { ifndef_ripper((yyval.val) = '<'); } 6791 break; 6792 6793 case 139: 6794 6795/* Line 1806 of yacc.c */ 6796#line 1903 "ripper.y" 6797 { ifndef_ripper((yyval.val) = tLEQ); } 6798 break; 6799 6800 case 140: 6801 6802/* Line 1806 of yacc.c */ 6803#line 1904 "ripper.y" 6804 { ifndef_ripper((yyval.val) = tNEQ); } 6805 break; 6806 6807 case 141: 6808 6809/* Line 1806 of yacc.c */ 6810#line 1905 "ripper.y" 6811 { ifndef_ripper((yyval.val) = tLSHFT); } 6812 break; 6813 6814 case 142: 6815 6816/* Line 1806 of yacc.c */ 6817#line 1906 "ripper.y" 6818 { ifndef_ripper((yyval.val) = tRSHFT); } 6819 break; 6820 6821 case 143: 6822 6823/* Line 1806 of yacc.c */ 6824#line 1907 "ripper.y" 6825 { ifndef_ripper((yyval.val) = '+'); } 6826 break; 6827 6828 case 144: 6829 6830/* Line 1806 of yacc.c */ 6831#line 1908 "ripper.y" 6832 { ifndef_ripper((yyval.val) = '-'); } 6833 break; 6834 6835 case 145: 6836 6837/* Line 1806 of yacc.c */ 6838#line 1909 "ripper.y" 6839 { ifndef_ripper((yyval.val) = '*'); } 6840 break; 6841 6842 case 146: 6843 6844/* Line 1806 of yacc.c */ 6845#line 1910 "ripper.y" 6846 { ifndef_ripper((yyval.val) = '*'); } 6847 break; 6848 6849 case 147: 6850 6851/* Line 1806 of yacc.c */ 6852#line 1911 "ripper.y" 6853 { ifndef_ripper((yyval.val) = '/'); } 6854 break; 6855 6856 case 148: 6857 6858/* Line 1806 of yacc.c */ 6859#line 1912 "ripper.y" 6860 { ifndef_ripper((yyval.val) = '%'); } 6861 break; 6862 6863 case 149: 6864 6865/* Line 1806 of yacc.c */ 6866#line 1913 "ripper.y" 6867 { ifndef_ripper((yyval.val) = tPOW); } 6868 break; 6869 6870 case 150: 6871 6872/* Line 1806 of yacc.c */ 6873#line 1914 "ripper.y" 6874 { ifndef_ripper((yyval.val) = tDSTAR); } 6875 break; 6876 6877 case 151: 6878 6879/* Line 1806 of yacc.c */ 6880#line 1915 "ripper.y" 6881 { ifndef_ripper((yyval.val) = '!'); } 6882 break; 6883 6884 case 152: 6885 6886/* Line 1806 of yacc.c */ 6887#line 1916 "ripper.y" 6888 { ifndef_ripper((yyval.val) = '~'); } 6889 break; 6890 6891 case 153: 6892 6893/* Line 1806 of yacc.c */ 6894#line 1917 "ripper.y" 6895 { ifndef_ripper((yyval.val) = tUPLUS); } 6896 break; 6897 6898 case 154: 6899 6900/* Line 1806 of yacc.c */ 6901#line 1918 "ripper.y" 6902 { ifndef_ripper((yyval.val) = tUMINUS); } 6903 break; 6904 6905 case 155: 6906 6907/* Line 1806 of yacc.c */ 6908#line 1919 "ripper.y" 6909 { ifndef_ripper((yyval.val) = tAREF); } 6910 break; 6911 6912 case 156: 6913 6914/* Line 1806 of yacc.c */ 6915#line 1920 "ripper.y" 6916 { ifndef_ripper((yyval.val) = tASET); } 6917 break; 6918 6919 case 157: 6920 6921/* Line 1806 of yacc.c */ 6922#line 1921 "ripper.y" 6923 { ifndef_ripper((yyval.val) = '`'); } 6924 break; 6925 6926 case 199: 6927 6928/* Line 1806 of yacc.c */ 6929#line 1939 "ripper.y" 6930 { 6931#if 0 6932 value_expr((yyvsp[(3) - (3)].val)); 6933 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6934#endif 6935 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 6936 6937 } 6938 break; 6939 6940 case 200: 6941 6942/* Line 1806 of yacc.c */ 6943#line 1948 "ripper.y" 6944 { 6945#if 0 6946 value_expr((yyvsp[(3) - (5)].val)); 6947 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 6948 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 6949#endif 6950 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val))); 6951 6952 } 6953 break; 6954 6955 case 201: 6956 6957/* Line 1806 of yacc.c */ 6958#line 1958 "ripper.y" 6959 { 6960 value_expr((yyvsp[(3) - (3)].val)); 6961 (yyval.val) = new_op_assign((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 6962 } 6963 break; 6964 6965 case 202: 6966 6967/* Line 1806 of yacc.c */ 6968#line 1963 "ripper.y" 6969 { 6970#if 0 6971 value_expr((yyvsp[(3) - (5)].val)); 6972 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0); 6973#endif 6974 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 6975 6976 (yyval.val) = new_op_assign((yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val)); 6977 } 6978 break; 6979 6980 case 203: 6981 6982/* Line 1806 of yacc.c */ 6983#line 1973 "ripper.y" 6984 { 6985#if 0 6986 NODE *args; 6987 6988 value_expr((yyvsp[(6) - (6)].val)); 6989 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY(); 6990 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) { 6991 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 6992 } 6993 else { 6994 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 6995 } 6996 if ((yyvsp[(5) - (6)].val) == tOROP) { 6997 (yyvsp[(5) - (6)].val) = 0; 6998 } 6999 else if ((yyvsp[(5) - (6)].val) == tANDOP) { 7000 (yyvsp[(5) - (6)].val) = 1; 7001 } 7002 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args); 7003 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 7004#endif 7005 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val))); 7006 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 7007 7008 } 7009 break; 7010 7011 case 204: 7012 7013/* Line 1806 of yacc.c */ 7014#line 1999 "ripper.y" 7015 { 7016 value_expr((yyvsp[(5) - (5)].val)); 7017 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 7018 } 7019 break; 7020 7021 case 205: 7022 7023/* Line 1806 of yacc.c */ 7024#line 2004 "ripper.y" 7025 { 7026 value_expr((yyvsp[(5) - (5)].val)); 7027 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 7028 } 7029 break; 7030 7031 case 206: 7032 7033/* Line 1806 of yacc.c */ 7034#line 2009 "ripper.y" 7035 { 7036 value_expr((yyvsp[(5) - (5)].val)); 7037 (yyval.val) = new_attr_op_assign((yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 7038 } 7039 break; 7040 7041 case 207: 7042 7043/* Line 1806 of yacc.c */ 7044#line 2014 "ripper.y" 7045 { 7046#if 0 7047 (yyval.val) = NEW_COLON2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 7048 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 7049#endif 7050 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val)); 7051 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 7052 7053 } 7054 break; 7055 7056 case 208: 7057 7058/* Line 1806 of yacc.c */ 7059#line 2024 "ripper.y" 7060 { 7061#if 0 7062 (yyval.val) = NEW_COLON3((yyvsp[(2) - (4)].val)); 7063 (yyval.val) = new_const_op_assign((yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 7064#endif 7065 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val)); 7066 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 7067 7068 } 7069 break; 7070 7071 case 209: 7072 7073/* Line 1806 of yacc.c */ 7074#line 2034 "ripper.y" 7075 { 7076#if 0 7077 rb_backref_error((yyvsp[(1) - (3)].val)); 7078 (yyval.val) = NEW_BEGIN(0); 7079#endif 7080 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val)); 7081 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 7082 (yyval.val) = dispatch1(assign_error, (yyval.val)); 7083 7084 } 7085 break; 7086 7087 case 210: 7088 7089/* Line 1806 of yacc.c */ 7090#line 2045 "ripper.y" 7091 { 7092#if 0 7093 value_expr((yyvsp[(1) - (3)].val)); 7094 value_expr((yyvsp[(3) - (3)].val)); 7095 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7096 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 7097 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 7098 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 7099 } 7100#endif 7101 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7102 7103 } 7104 break; 7105 7106 case 211: 7107 7108/* Line 1806 of yacc.c */ 7109#line 2059 "ripper.y" 7110 { 7111#if 0 7112 value_expr((yyvsp[(1) - (3)].val)); 7113 value_expr((yyvsp[(3) - (3)].val)); 7114 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7115 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) && 7116 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) { 7117 deferred_nodes = list_append(deferred_nodes, (yyval.val)); 7118 } 7119#endif 7120 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7121 7122 } 7123 break; 7124 7125 case 212: 7126 7127/* Line 1806 of yacc.c */ 7128#line 2073 "ripper.y" 7129 { 7130#if 0 7131 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val)); 7132#endif 7133 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val)); 7134 7135 } 7136 break; 7137 7138 case 213: 7139 7140/* Line 1806 of yacc.c */ 7141#line 2081 "ripper.y" 7142 { 7143#if 0 7144 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val)); 7145#endif 7146 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val)); 7147 7148 } 7149 break; 7150 7151 case 214: 7152 7153/* Line 1806 of yacc.c */ 7154#line 2089 "ripper.y" 7155 { 7156#if 0 7157 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val)); 7158#endif 7159 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val)); 7160 7161 } 7162 break; 7163 7164 case 215: 7165 7166/* Line 1806 of yacc.c */ 7167#line 2097 "ripper.y" 7168 { 7169#if 0 7170 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val)); 7171#endif 7172 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val)); 7173 7174 } 7175 break; 7176 7177 case 216: 7178 7179/* Line 1806 of yacc.c */ 7180#line 2105 "ripper.y" 7181 { 7182#if 0 7183 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val)); 7184#endif 7185 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val)); 7186 7187 } 7188 break; 7189 7190 case 217: 7191 7192/* Line 1806 of yacc.c */ 7193#line 2113 "ripper.y" 7194 { 7195#if 0 7196 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val)); 7197#endif 7198 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val)); 7199 7200 } 7201 break; 7202 7203 case 218: 7204 7205/* Line 1806 of yacc.c */ 7206#line 2121 "ripper.y" 7207 { 7208#if 0 7209 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 7210#endif 7211 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 7212 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 7213 7214 } 7215 break; 7216 7217 case 219: 7218 7219/* Line 1806 of yacc.c */ 7220#line 2130 "ripper.y" 7221 { 7222#if 0 7223 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0); 7224#endif 7225 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val)); 7226 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val)); 7227 7228 } 7229 break; 7230 7231 case 220: 7232 7233/* Line 1806 of yacc.c */ 7234#line 2139 "ripper.y" 7235 { 7236#if 0 7237 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS); 7238#endif 7239 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val)); 7240 7241 } 7242 break; 7243 7244 case 221: 7245 7246/* Line 1806 of yacc.c */ 7247#line 2147 "ripper.y" 7248 { 7249#if 0 7250 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS); 7251#endif 7252 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 7253 7254 } 7255 break; 7256 7257 case 222: 7258 7259/* Line 1806 of yacc.c */ 7260#line 2155 "ripper.y" 7261 { 7262#if 0 7263 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val)); 7264#endif 7265 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val)); 7266 7267 } 7268 break; 7269 7270 case 223: 7271 7272/* Line 1806 of yacc.c */ 7273#line 2163 "ripper.y" 7274 { 7275#if 0 7276 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val)); 7277#endif 7278 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val)); 7279 7280 } 7281 break; 7282 7283 case 224: 7284 7285/* Line 1806 of yacc.c */ 7286#line 2171 "ripper.y" 7287 { 7288#if 0 7289 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val)); 7290#endif 7291 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val)); 7292 7293 } 7294 break; 7295 7296 case 225: 7297 7298/* Line 1806 of yacc.c */ 7299#line 2179 "ripper.y" 7300 { 7301#if 0 7302 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val)); 7303#endif 7304 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val)); 7305 7306 } 7307 break; 7308 7309 case 226: 7310 7311/* Line 1806 of yacc.c */ 7312#line 2187 "ripper.y" 7313 { 7314#if 0 7315 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val)); 7316#endif 7317 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val)); 7318 7319 } 7320 break; 7321 7322 case 227: 7323 7324/* Line 1806 of yacc.c */ 7325#line 2195 "ripper.y" 7326 { 7327#if 0 7328 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val)); 7329#endif 7330 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val)); 7331 7332 } 7333 break; 7334 7335 case 228: 7336 7337/* Line 1806 of yacc.c */ 7338#line 2203 "ripper.y" 7339 { 7340#if 0 7341 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val)); 7342#endif 7343 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val)); 7344 7345 } 7346 break; 7347 7348 case 229: 7349 7350/* Line 1806 of yacc.c */ 7351#line 2211 "ripper.y" 7352 { 7353#if 0 7354 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val)); 7355#endif 7356 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val)); 7357 7358 } 7359 break; 7360 7361 case 230: 7362 7363/* Line 1806 of yacc.c */ 7364#line 2219 "ripper.y" 7365 { 7366#if 0 7367 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val)); 7368#endif 7369 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val)); 7370 7371 } 7372 break; 7373 7374 case 231: 7375 7376/* Line 1806 of yacc.c */ 7377#line 2227 "ripper.y" 7378 { 7379#if 0 7380 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val)); 7381#endif 7382 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val)); 7383 7384 } 7385 break; 7386 7387 case 232: 7388 7389/* Line 1806 of yacc.c */ 7390#line 2235 "ripper.y" 7391 { 7392#if 0 7393 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val)); 7394#endif 7395 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val)); 7396 7397 } 7398 break; 7399 7400 case 233: 7401 7402/* Line 1806 of yacc.c */ 7403#line 2243 "ripper.y" 7404 { 7405#if 0 7406 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7407 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && RB_TYPE_P((yyvsp[(1) - (3)].val)->nd_lit, T_REGEXP)) { 7408 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val)); 7409 } 7410#endif 7411 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val)); 7412 7413 } 7414 break; 7415 7416 case 234: 7417 7418/* Line 1806 of yacc.c */ 7419#line 2254 "ripper.y" 7420 { 7421#if 0 7422 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val)); 7423#endif 7424 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val)); 7425 7426 } 7427 break; 7428 7429 case 235: 7430 7431/* Line 1806 of yacc.c */ 7432#line 2262 "ripper.y" 7433 { 7434#if 0 7435 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!'); 7436#endif 7437 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val)); 7438 7439 } 7440 break; 7441 7442 case 236: 7443 7444/* Line 1806 of yacc.c */ 7445#line 2270 "ripper.y" 7446 { 7447#if 0 7448 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~'); 7449#endif 7450 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val)); 7451 7452 } 7453 break; 7454 7455 case 237: 7456 7457/* Line 1806 of yacc.c */ 7458#line 2278 "ripper.y" 7459 { 7460#if 0 7461 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val)); 7462#endif 7463 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val)); 7464 7465 } 7466 break; 7467 7468 case 238: 7469 7470/* Line 1806 of yacc.c */ 7471#line 2286 "ripper.y" 7472 { 7473#if 0 7474 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val)); 7475#endif 7476 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val)); 7477 7478 } 7479 break; 7480 7481 case 239: 7482 7483/* Line 1806 of yacc.c */ 7484#line 2294 "ripper.y" 7485 { 7486#if 0 7487 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7488#endif 7489 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val)); 7490 7491 } 7492 break; 7493 7494 case 240: 7495 7496/* Line 1806 of yacc.c */ 7497#line 2302 "ripper.y" 7498 { 7499#if 0 7500 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7501#endif 7502 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val)); 7503 7504 } 7505 break; 7506 7507 case 241: 7508 7509/* Line 1806 of yacc.c */ 7510#line 2309 "ripper.y" 7511 {in_defined = 1;} 7512 break; 7513 7514 case 242: 7515 7516/* Line 1806 of yacc.c */ 7517#line 2310 "ripper.y" 7518 { 7519#if 0 7520 in_defined = 0; 7521 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val)); 7522#endif 7523 in_defined = 0; 7524 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val)); 7525 7526 } 7527 break; 7528 7529 case 243: 7530 7531/* Line 1806 of yacc.c */ 7532#line 2320 "ripper.y" 7533 { 7534#if 0 7535 value_expr((yyvsp[(1) - (6)].val)); 7536 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 7537 fixpos((yyval.val), (yyvsp[(1) - (6)].val)); 7538#endif 7539 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val)); 7540 7541 } 7542 break; 7543 7544 case 244: 7545 7546/* Line 1806 of yacc.c */ 7547#line 2330 "ripper.y" 7548 { 7549 (yyval.val) = (yyvsp[(1) - (1)].val); 7550 } 7551 break; 7552 7553 case 245: 7554 7555/* Line 1806 of yacc.c */ 7556#line 2336 "ripper.y" 7557 { 7558#if 0 7559 value_expr((yyvsp[(1) - (1)].val)); 7560 (yyval.val) = (yyvsp[(1) - (1)].val); 7561 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 7562#endif 7563 (yyval.val) = (yyvsp[(1) - (1)].val); 7564 7565 } 7566 break; 7567 7568 case 247: 7569 7570/* Line 1806 of yacc.c */ 7571#line 2349 "ripper.y" 7572 { 7573 (yyval.val) = (yyvsp[(1) - (2)].val); 7574 } 7575 break; 7576 7577 case 248: 7578 7579/* Line 1806 of yacc.c */ 7580#line 2353 "ripper.y" 7581 { 7582#if 0 7583 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 7584#endif 7585 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 7586 7587 } 7588 break; 7589 7590 case 249: 7591 7592/* Line 1806 of yacc.c */ 7593#line 2361 "ripper.y" 7594 { 7595#if 0 7596 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 7597#endif 7598 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 7599 7600 } 7601 break; 7602 7603 case 250: 7604 7605/* Line 1806 of yacc.c */ 7606#line 2371 "ripper.y" 7607 { 7608#if 0 7609 (yyval.val) = (yyvsp[(2) - (3)].val); 7610#endif 7611 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val))); 7612 7613 } 7614 break; 7615 7616 case 255: 7617 7618/* Line 1806 of yacc.c */ 7619#line 2387 "ripper.y" 7620 { 7621 (yyval.val) = (yyvsp[(1) - (2)].val); 7622 } 7623 break; 7624 7625 case 256: 7626 7627/* Line 1806 of yacc.c */ 7628#line 2391 "ripper.y" 7629 { 7630#if 0 7631 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 7632#endif 7633 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)); 7634 7635 } 7636 break; 7637 7638 case 257: 7639 7640/* Line 1806 of yacc.c */ 7641#line 2399 "ripper.y" 7642 { 7643#if 0 7644 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 7645#endif 7646 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 7647 7648 } 7649 break; 7650 7651 case 258: 7652 7653/* Line 1806 of yacc.c */ 7654#line 2409 "ripper.y" 7655 { 7656#if 0 7657 value_expr((yyvsp[(1) - (1)].val)); 7658 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 7659#endif 7660 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 7661 7662 } 7663 break; 7664 7665 case 259: 7666 7667/* Line 1806 of yacc.c */ 7668#line 2418 "ripper.y" 7669 { 7670#if 0 7671 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 7672#endif 7673 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 7674 7675 } 7676 break; 7677 7678 case 260: 7679 7680/* Line 1806 of yacc.c */ 7681#line 2426 "ripper.y" 7682 { 7683#if 0 7684 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val))); 7685 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val)); 7686#endif 7687 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val)); 7688 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val)); 7689 7690 } 7691 break; 7692 7693 case 261: 7694 7695/* Line 1806 of yacc.c */ 7696#line 2436 "ripper.y" 7697 { 7698#if 0 7699 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val))); 7700 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val)); 7701#endif 7702 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val)); 7703 7704 } 7705 break; 7706 7707 case 262: 7708 7709/* Line 1806 of yacc.c */ 7710#line 2447 "ripper.y" 7711 { 7712 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val)); 7713 } 7714 break; 7715 7716 case 263: 7717 7718/* Line 1806 of yacc.c */ 7719#line 2453 "ripper.y" 7720 { 7721 (yyval.val) = cmdarg_stack; 7722 CMDARG_PUSH(1); 7723 } 7724 break; 7725 7726 case 264: 7727 7728/* Line 1806 of yacc.c */ 7729#line 2458 "ripper.y" 7730 { 7731 /* CMDARG_POP() */ 7732 cmdarg_stack = (yyvsp[(1) - (2)].val); 7733 (yyval.val) = (yyvsp[(2) - (2)].val); 7734 } 7735 break; 7736 7737 case 265: 7738 7739/* Line 1806 of yacc.c */ 7740#line 2466 "ripper.y" 7741 { 7742#if 0 7743 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val)); 7744#endif 7745 (yyval.val) = (yyvsp[(2) - (2)].val); 7746 7747 } 7748 break; 7749 7750 case 266: 7751 7752/* Line 1806 of yacc.c */ 7753#line 2476 "ripper.y" 7754 { 7755 (yyval.val) = (yyvsp[(2) - (2)].val); 7756 } 7757 break; 7758 7759 case 267: 7760 7761/* Line 1806 of yacc.c */ 7762#line 2480 "ripper.y" 7763 { 7764 (yyval.val) = 0; 7765 } 7766 break; 7767 7768 case 268: 7769 7770/* Line 1806 of yacc.c */ 7771#line 2486 "ripper.y" 7772 { 7773#if 0 7774 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 7775#endif 7776 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val)); 7777 7778 } 7779 break; 7780 7781 case 269: 7782 7783/* Line 1806 of yacc.c */ 7784#line 2494 "ripper.y" 7785 { 7786#if 0 7787 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 7788#endif 7789 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val)); 7790 7791 } 7792 break; 7793 7794 case 270: 7795 7796/* Line 1806 of yacc.c */ 7797#line 2502 "ripper.y" 7798 { 7799#if 0 7800 NODE *n1; 7801 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 7802 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 7803 } 7804 else { 7805 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7806 } 7807#endif 7808 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7809 7810 } 7811 break; 7812 7813 case 271: 7814 7815/* Line 1806 of yacc.c */ 7816#line 2516 "ripper.y" 7817 { 7818#if 0 7819 NODE *n1; 7820 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 7821 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 7822 } 7823 else { 7824 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 7825 } 7826#endif 7827 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 7828 7829 } 7830 break; 7831 7832 case 272: 7833 7834/* Line 1806 of yacc.c */ 7835#line 2532 "ripper.y" 7836 { 7837#if 0 7838 NODE *n1; 7839 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) { 7840 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val)); 7841 } 7842 else { 7843 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7844 } 7845#endif 7846 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 7847 7848 } 7849 break; 7850 7851 case 273: 7852 7853/* Line 1806 of yacc.c */ 7854#line 2546 "ripper.y" 7855 { 7856#if 0 7857 NODE *n1; 7858 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY && 7859 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) { 7860 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val)); 7861 } 7862 else { 7863 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val)); 7864 } 7865#endif 7866 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val)); 7867 7868 } 7869 break; 7870 7871 case 274: 7872 7873/* Line 1806 of yacc.c */ 7874#line 2561 "ripper.y" 7875 { 7876#if 0 7877 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val)); 7878#endif 7879 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val)); 7880 7881 } 7882 break; 7883 7884 case 285: 7885 7886/* Line 1806 of yacc.c */ 7887#line 2581 "ripper.y" 7888 { 7889#if 0 7890 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0); 7891#endif 7892 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new()); 7893 7894 } 7895 break; 7896 7897 case 286: 7898 7899/* Line 1806 of yacc.c */ 7900#line 2589 "ripper.y" 7901 { 7902 (yyvsp[(1) - (1)].val) = cmdarg_stack; 7903 cmdarg_stack = 0; 7904#if 0 7905 (yyval.num) = ruby_sourceline; 7906#endif 7907 7908 } 7909 break; 7910 7911 case 287: 7912 7913/* Line 1806 of yacc.c */ 7914#line 2599 "ripper.y" 7915 { 7916 cmdarg_stack = (yyvsp[(1) - (4)].val); 7917#if 0 7918 if ((yyvsp[(3) - (4)].val) == NULL) { 7919 (yyval.val) = NEW_NIL(); 7920 } 7921 else { 7922 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE || 7923 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE) 7924 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num)); 7925 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val)); 7926 } 7927 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num)); 7928#endif 7929 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val)); 7930 7931 } 7932 break; 7933 7934 case 288: 7935 7936/* Line 1806 of yacc.c */ 7937#line 2616 "ripper.y" 7938 {lex_state = EXPR_ENDARG;} 7939 break; 7940 7941 case 289: 7942 7943/* Line 1806 of yacc.c */ 7944#line 2617 "ripper.y" 7945 { 7946#if 0 7947 (yyval.val) = 0; 7948#endif 7949 (yyval.val) = dispatch1(paren, 0); 7950 7951 } 7952 break; 7953 7954 case 290: 7955 7956/* Line 1806 of yacc.c */ 7957#line 2624 "ripper.y" 7958 {lex_state = EXPR_ENDARG;} 7959 break; 7960 7961 case 291: 7962 7963/* Line 1806 of yacc.c */ 7964#line 2625 "ripper.y" 7965 { 7966#if 0 7967 (yyval.val) = (yyvsp[(2) - (4)].val); 7968#endif 7969 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 7970 7971 } 7972 break; 7973 7974 case 292: 7975 7976/* Line 1806 of yacc.c */ 7977#line 2633 "ripper.y" 7978 { 7979#if 0 7980 (yyval.val) = (yyvsp[(2) - (3)].val); 7981#endif 7982 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 7983 7984 } 7985 break; 7986 7987 case 293: 7988 7989/* Line 1806 of yacc.c */ 7990#line 2641 "ripper.y" 7991 { 7992#if 0 7993 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7994#endif 7995 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 7996 7997 } 7998 break; 7999 8000 case 294: 8001 8002/* Line 1806 of yacc.c */ 8003#line 2649 "ripper.y" 8004 { 8005#if 0 8006 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val)); 8007#endif 8008 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val)); 8009 8010 } 8011 break; 8012 8013 case 295: 8014 8015/* Line 1806 of yacc.c */ 8016#line 2657 "ripper.y" 8017 { 8018#if 0 8019 if ((yyvsp[(2) - (3)].val) == 0) { 8020 (yyval.val) = NEW_ZARRAY(); /* zero length array*/ 8021 } 8022 else { 8023 (yyval.val) = (yyvsp[(2) - (3)].val); 8024 } 8025#endif 8026 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val))); 8027 8028 } 8029 break; 8030 8031 case 296: 8032 8033/* Line 1806 of yacc.c */ 8034#line 2670 "ripper.y" 8035 { 8036#if 0 8037 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val)); 8038#endif 8039 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val))); 8040 8041 } 8042 break; 8043 8044 case 297: 8045 8046/* Line 1806 of yacc.c */ 8047#line 2678 "ripper.y" 8048 { 8049#if 0 8050 (yyval.val) = NEW_RETURN(0); 8051#endif 8052 (yyval.val) = dispatch0(return0); 8053 8054 } 8055 break; 8056 8057 case 298: 8058 8059/* Line 1806 of yacc.c */ 8060#line 2686 "ripper.y" 8061 { 8062#if 0 8063 (yyval.val) = new_yield((yyvsp[(3) - (4)].val)); 8064#endif 8065 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val))); 8066 8067 } 8068 break; 8069 8070 case 299: 8071 8072/* Line 1806 of yacc.c */ 8073#line 2694 "ripper.y" 8074 { 8075#if 0 8076 (yyval.val) = NEW_YIELD(0); 8077#endif 8078 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new())); 8079 8080 } 8081 break; 8082 8083 case 300: 8084 8085/* Line 1806 of yacc.c */ 8086#line 2702 "ripper.y" 8087 { 8088#if 0 8089 (yyval.val) = NEW_YIELD(0); 8090#endif 8091 (yyval.val) = dispatch0(yield0); 8092 8093 } 8094 break; 8095 8096 case 301: 8097 8098/* Line 1806 of yacc.c */ 8099#line 2709 "ripper.y" 8100 {in_defined = 1;} 8101 break; 8102 8103 case 302: 8104 8105/* Line 1806 of yacc.c */ 8106#line 2710 "ripper.y" 8107 { 8108#if 0 8109 in_defined = 0; 8110 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val)); 8111#endif 8112 in_defined = 0; 8113 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val)); 8114 8115 } 8116 break; 8117 8118 case 303: 8119 8120/* Line 1806 of yacc.c */ 8121#line 2720 "ripper.y" 8122 { 8123#if 0 8124 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!'); 8125#endif 8126 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val)); 8127 8128 } 8129 break; 8130 8131 case 304: 8132 8133/* Line 1806 of yacc.c */ 8134#line 2728 "ripper.y" 8135 { 8136#if 0 8137 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!'); 8138#endif 8139 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil); 8140 8141 } 8142 break; 8143 8144 case 305: 8145 8146/* Line 1806 of yacc.c */ 8147#line 2736 "ripper.y" 8148 { 8149#if 0 8150 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 8151 (yyval.val) = (yyvsp[(2) - (2)].val); 8152#endif 8153 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new()); 8154 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val)); 8155 8156 } 8157 break; 8158 8159 case 307: 8160 8161/* Line 1806 of yacc.c */ 8162#line 2747 "ripper.y" 8163 { 8164#if 0 8165 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 8166 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 8167 (yyval.val) = (yyvsp[(2) - (2)].val); 8168#endif 8169 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 8170 8171 } 8172 break; 8173 8174 case 308: 8175 8176/* Line 1806 of yacc.c */ 8177#line 2757 "ripper.y" 8178 { 8179 (yyval.val) = (yyvsp[(2) - (2)].val); 8180 } 8181 break; 8182 8183 case 309: 8184 8185/* Line 1806 of yacc.c */ 8186#line 2764 "ripper.y" 8187 { 8188#if 0 8189 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 8190 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 8191#endif 8192 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 8193 8194 } 8195 break; 8196 8197 case 310: 8198 8199/* Line 1806 of yacc.c */ 8200#line 2776 "ripper.y" 8201 { 8202#if 0 8203 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 8204 fixpos((yyval.val), (yyvsp[(2) - (6)].val)); 8205#endif 8206 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val))); 8207 8208 } 8209 break; 8210 8211 case 311: 8212 8213/* Line 1806 of yacc.c */ 8214#line 2784 "ripper.y" 8215 {COND_PUSH(1);} 8216 break; 8217 8218 case 312: 8219 8220/* Line 1806 of yacc.c */ 8221#line 2784 "ripper.y" 8222 {COND_POP();} 8223 break; 8224 8225 case 313: 8226 8227/* Line 1806 of yacc.c */ 8228#line 2787 "ripper.y" 8229 { 8230#if 0 8231 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 8232 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 8233#endif 8234 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 8235 8236 } 8237 break; 8238 8239 case 314: 8240 8241/* Line 1806 of yacc.c */ 8242#line 2795 "ripper.y" 8243 {COND_PUSH(1);} 8244 break; 8245 8246 case 315: 8247 8248/* Line 1806 of yacc.c */ 8249#line 2795 "ripper.y" 8250 {COND_POP();} 8251 break; 8252 8253 case 316: 8254 8255/* Line 1806 of yacc.c */ 8256#line 2798 "ripper.y" 8257 { 8258#if 0 8259 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1); 8260 fixpos((yyval.val), (yyvsp[(3) - (7)].val)); 8261#endif 8262 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val)); 8263 8264 } 8265 break; 8266 8267 case 317: 8268 8269/* Line 1806 of yacc.c */ 8270#line 2809 "ripper.y" 8271 { 8272#if 0 8273 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 8274 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 8275#endif 8276 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 8277 8278 } 8279 break; 8280 8281 case 318: 8282 8283/* Line 1806 of yacc.c */ 8284#line 2818 "ripper.y" 8285 { 8286#if 0 8287 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val)); 8288#endif 8289 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val)); 8290 8291 } 8292 break; 8293 8294 case 319: 8295 8296/* Line 1806 of yacc.c */ 8297#line 2826 "ripper.y" 8298 {COND_PUSH(1);} 8299 break; 8300 8301 case 320: 8302 8303/* Line 1806 of yacc.c */ 8304#line 2828 "ripper.y" 8305 {COND_POP();} 8306 break; 8307 8308 case 321: 8309 8310/* Line 1806 of yacc.c */ 8311#line 2831 "ripper.y" 8312 { 8313#if 0 8314 /* 8315 * for a, b, c in e 8316 * #=> 8317 * e.each{|*x| a, b, c = x 8318 * 8319 * for a in e 8320 * #=> 8321 * e.each{|x| a, = x} 8322 */ 8323 ID id = internal_id(); 8324 ID *tbl = ALLOC_N(ID, 2); 8325 NODE *m = NEW_ARGS_AUX(0, 0); 8326 NODE *args, *scope; 8327 8328 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) { 8329 /* if args.length == 1 && args[0].kind_of?(Array) 8330 * args = args[0] 8331 * end 8332 */ 8333 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1))); 8334 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0))); 8335 m->nd_next = block_append( 8336 NEW_IF( 8337 NEW_NODE(NODE_AND, 8338 NEW_CALL(NEW_CALL(NEW_DVAR(id), idLength, 0), 8339 idEq, one), 8340 NEW_CALL(NEW_CALL(NEW_DVAR(id), idAREF, zero), 8341 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))), 8342 0), 8343 NEW_DASGN_CURR(id, 8344 NEW_CALL(NEW_DVAR(id), idAREF, zero)), 8345 0), 8346 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id))); 8347 8348 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 8349 } 8350 else { 8351 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN || 8352 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN || 8353 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) { 8354 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id); 8355 m->nd_plen = 1; 8356 m->nd_next = (yyvsp[(2) - (9)].val); 8357 args = new_args(m, 0, 0, 0, new_args_tail(0, 0, 0)); 8358 } 8359 else { 8360 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id)); 8361 args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0)); 8362 } 8363 } 8364 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args); 8365 tbl[0] = 1; tbl[1] = id; 8366 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope); 8367 fixpos((yyval.val), (yyvsp[(2) - (9)].val)); 8368#endif 8369 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val)); 8370 8371 } 8372 break; 8373 8374 case 322: 8375 8376/* Line 1806 of yacc.c */ 8377#line 2892 "ripper.y" 8378 { 8379 if (in_def || in_single) 8380 yyerror("class definition in method body"); 8381 local_push(0); 8382#if 0 8383 (yyval.num) = ruby_sourceline; 8384#endif 8385 8386 } 8387 break; 8388 8389 case 323: 8390 8391/* Line 1806 of yacc.c */ 8392#line 2903 "ripper.y" 8393 { 8394#if 0 8395 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val)); 8396 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num)); 8397#endif 8398 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 8399 8400 local_pop(); 8401 } 8402 break; 8403 8404 case 324: 8405 8406/* Line 1806 of yacc.c */ 8407#line 2913 "ripper.y" 8408 { 8409 (yyval.num) = in_def; 8410 in_def = 0; 8411 } 8412 break; 8413 8414 case 325: 8415 8416/* Line 1806 of yacc.c */ 8417#line 2918 "ripper.y" 8418 { 8419 (yyval.num) = in_single; 8420 in_single = 0; 8421 local_push(0); 8422 } 8423 break; 8424 8425 case 326: 8426 8427/* Line 1806 of yacc.c */ 8428#line 2925 "ripper.y" 8429 { 8430#if 0 8431 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 8432 fixpos((yyval.val), (yyvsp[(3) - (8)].val)); 8433#endif 8434 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val)); 8435 8436 local_pop(); 8437 in_def = (yyvsp[(4) - (8)].num); 8438 in_single = (yyvsp[(6) - (8)].num); 8439 } 8440 break; 8441 8442 case 327: 8443 8444/* Line 1806 of yacc.c */ 8445#line 2937 "ripper.y" 8446 { 8447 if (in_def || in_single) 8448 yyerror("module definition in method body"); 8449 local_push(0); 8450#if 0 8451 (yyval.num) = ruby_sourceline; 8452#endif 8453 8454 } 8455 break; 8456 8457 case 328: 8458 8459/* Line 1806 of yacc.c */ 8460#line 2948 "ripper.y" 8461 { 8462#if 0 8463 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 8464 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num)); 8465#endif 8466 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val)); 8467 8468 local_pop(); 8469 } 8470 break; 8471 8472 case 329: 8473 8474/* Line 1806 of yacc.c */ 8475#line 2958 "ripper.y" 8476 { 8477 (yyval.id) = cur_mid; 8478 cur_mid = (yyvsp[(2) - (2)].val); 8479 in_def++; 8480 local_push(0); 8481 } 8482 break; 8483 8484 case 330: 8485 8486/* Line 1806 of yacc.c */ 8487#line 2967 "ripper.y" 8488 { 8489#if 0 8490 NODE *body = remove_begin((yyvsp[(5) - (6)].val)); 8491 reduce_nodes(&body); 8492 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE); 8493 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num)); 8494#endif 8495 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val)); 8496 8497 local_pop(); 8498 in_def--; 8499 cur_mid = (yyvsp[(3) - (6)].id); 8500 } 8501 break; 8502 8503 case 331: 8504 8505/* Line 1806 of yacc.c */ 8506#line 2980 "ripper.y" 8507 {lex_state = EXPR_FNAME;} 8508 break; 8509 8510 case 332: 8511 8512/* Line 1806 of yacc.c */ 8513#line 2981 "ripper.y" 8514 { 8515 in_single++; 8516 lex_state = EXPR_ENDFN; /* force for args */ 8517 local_push(0); 8518 } 8519 break; 8520 8521 case 333: 8522 8523/* Line 1806 of yacc.c */ 8524#line 2989 "ripper.y" 8525 { 8526#if 0 8527 NODE *body = remove_begin((yyvsp[(8) - (9)].val)); 8528 reduce_nodes(&body); 8529 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body); 8530 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num)); 8531#endif 8532 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val)); 8533 8534 local_pop(); 8535 in_single--; 8536 } 8537 break; 8538 8539 case 334: 8540 8541/* Line 1806 of yacc.c */ 8542#line 3002 "ripper.y" 8543 { 8544#if 0 8545 (yyval.val) = NEW_BREAK(0); 8546#endif 8547 (yyval.val) = dispatch1(break, arg_new()); 8548 8549 } 8550 break; 8551 8552 case 335: 8553 8554/* Line 1806 of yacc.c */ 8555#line 3010 "ripper.y" 8556 { 8557#if 0 8558 (yyval.val) = NEW_NEXT(0); 8559#endif 8560 (yyval.val) = dispatch1(next, arg_new()); 8561 8562 } 8563 break; 8564 8565 case 336: 8566 8567/* Line 1806 of yacc.c */ 8568#line 3018 "ripper.y" 8569 { 8570#if 0 8571 (yyval.val) = NEW_REDO(); 8572#endif 8573 (yyval.val) = dispatch0(redo); 8574 8575 } 8576 break; 8577 8578 case 337: 8579 8580/* Line 1806 of yacc.c */ 8581#line 3026 "ripper.y" 8582 { 8583#if 0 8584 (yyval.val) = NEW_RETRY(); 8585#endif 8586 (yyval.val) = dispatch0(retry); 8587 8588 } 8589 break; 8590 8591 case 338: 8592 8593/* Line 1806 of yacc.c */ 8594#line 3036 "ripper.y" 8595 { 8596#if 0 8597 value_expr((yyvsp[(1) - (1)].val)); 8598 (yyval.val) = (yyvsp[(1) - (1)].val); 8599 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 8600#endif 8601 (yyval.val) = (yyvsp[(1) - (1)].val); 8602 8603 } 8604 break; 8605 8606 case 339: 8607 8608/* Line 1806 of yacc.c */ 8609#line 3048 "ripper.y" 8610 { 8611 token_info_push("begin"); 8612 } 8613 break; 8614 8615 case 340: 8616 8617/* Line 1806 of yacc.c */ 8618#line 3054 "ripper.y" 8619 { 8620 token_info_push("if"); 8621 } 8622 break; 8623 8624 case 341: 8625 8626/* Line 1806 of yacc.c */ 8627#line 3060 "ripper.y" 8628 { 8629 token_info_push("unless"); 8630 } 8631 break; 8632 8633 case 342: 8634 8635/* Line 1806 of yacc.c */ 8636#line 3066 "ripper.y" 8637 { 8638 token_info_push("while"); 8639 } 8640 break; 8641 8642 case 343: 8643 8644/* Line 1806 of yacc.c */ 8645#line 3072 "ripper.y" 8646 { 8647 token_info_push("until"); 8648 } 8649 break; 8650 8651 case 344: 8652 8653/* Line 1806 of yacc.c */ 8654#line 3078 "ripper.y" 8655 { 8656 token_info_push("case"); 8657 } 8658 break; 8659 8660 case 345: 8661 8662/* Line 1806 of yacc.c */ 8663#line 3084 "ripper.y" 8664 { 8665 token_info_push("for"); 8666 } 8667 break; 8668 8669 case 346: 8670 8671/* Line 1806 of yacc.c */ 8672#line 3090 "ripper.y" 8673 { 8674 token_info_push("class"); 8675 } 8676 break; 8677 8678 case 347: 8679 8680/* Line 1806 of yacc.c */ 8681#line 3096 "ripper.y" 8682 { 8683 token_info_push("module"); 8684 } 8685 break; 8686 8687 case 348: 8688 8689/* Line 1806 of yacc.c */ 8690#line 3102 "ripper.y" 8691 { 8692 token_info_push("def"); 8693#if 0 8694 (yyval.num) = ruby_sourceline; 8695#endif 8696 8697 } 8698 break; 8699 8700 case 349: 8701 8702/* Line 1806 of yacc.c */ 8703#line 3112 "ripper.y" 8704 { 8705 token_info_pop("end"); 8706 } 8707 break; 8708 8709 case 350: 8710 8711/* Line 1806 of yacc.c */ 8712#line 3120 "ripper.y" 8713 { (yyval.val) = Qnil; } 8714 break; 8715 8716 case 352: 8717 8718/* Line 1806 of yacc.c */ 8719#line 3126 "ripper.y" 8720 { (yyval.val) = (yyvsp[(2) - (2)].val); } 8721 break; 8722 8723 case 353: 8724 8725/* Line 1806 of yacc.c */ 8726#line 3133 "ripper.y" 8727 { (yyval.val) = Qnil; } 8728 break; 8729 8730 case 356: 8731 8732/* Line 1806 of yacc.c */ 8733#line 3142 "ripper.y" 8734 { 8735#if 0 8736 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 8737 fixpos((yyval.val), (yyvsp[(2) - (5)].val)); 8738#endif 8739 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 8740 8741 } 8742 break; 8743 8744 case 358: 8745 8746/* Line 1806 of yacc.c */ 8747#line 3154 "ripper.y" 8748 { 8749#if 0 8750 (yyval.val) = (yyvsp[(2) - (2)].val); 8751#endif 8752 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val)); 8753 8754 } 8755 break; 8756 8757 case 361: 8758 8759/* Line 1806 of yacc.c */ 8760#line 3168 "ripper.y" 8761 { 8762 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 8763#if 0 8764#endif 8765 (yyval.val) = dispatch1(mlhs_paren, (yyval.val)); 8766 8767 } 8768 break; 8769 8770 case 362: 8771 8772/* Line 1806 of yacc.c */ 8773#line 3176 "ripper.y" 8774 { 8775#if 0 8776 (yyval.val) = (yyvsp[(2) - (3)].val); 8777#endif 8778 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 8779 8780 } 8781 break; 8782 8783 case 363: 8784 8785/* Line 1806 of yacc.c */ 8786#line 3186 "ripper.y" 8787 { 8788#if 0 8789 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 8790#endif 8791 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val)); 8792 8793 } 8794 break; 8795 8796 case 364: 8797 8798/* Line 1806 of yacc.c */ 8799#line 3194 "ripper.y" 8800 { 8801#if 0 8802 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 8803#endif 8804 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 8805 8806 } 8807 break; 8808 8809 case 365: 8810 8811/* Line 1806 of yacc.c */ 8812#line 3204 "ripper.y" 8813 { 8814#if 0 8815 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0); 8816#endif 8817 (yyval.val) = (yyvsp[(1) - (1)].val); 8818 8819 } 8820 break; 8821 8822 case 366: 8823 8824/* Line 1806 of yacc.c */ 8825#line 3212 "ripper.y" 8826 { 8827 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0); 8828#if 0 8829 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val)); 8830#endif 8831 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val)); 8832 8833 } 8834 break; 8835 8836 case 367: 8837 8838/* Line 1806 of yacc.c */ 8839#line 3221 "ripper.y" 8840 { 8841 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0); 8842#if 0 8843 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val))); 8844#endif 8845 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val)); 8846 8847 } 8848 break; 8849 8850 case 368: 8851 8852/* Line 1806 of yacc.c */ 8853#line 3230 "ripper.y" 8854 { 8855#if 0 8856 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1); 8857#endif 8858 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil); 8859 8860 } 8861 break; 8862 8863 case 369: 8864 8865/* Line 1806 of yacc.c */ 8866#line 3238 "ripper.y" 8867 { 8868#if 0 8869 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val))); 8870#endif 8871 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val)); 8872 8873 } 8874 break; 8875 8876 case 370: 8877 8878/* Line 1806 of yacc.c */ 8879#line 3246 "ripper.y" 8880 { 8881 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0); 8882#if 0 8883 (yyval.val) = NEW_MASGN(0, (yyval.val)); 8884#endif 8885 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val)); 8886 8887 } 8888 break; 8889 8890 case 371: 8891 8892/* Line 1806 of yacc.c */ 8893#line 3255 "ripper.y" 8894 { 8895 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0); 8896#if 0 8897 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val))); 8898#endif 8899 #if 0 8900 TODO: Check me 8901 #endif 8902 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val)); 8903 8904 } 8905 break; 8906 8907 case 372: 8908 8909/* Line 1806 of yacc.c */ 8910#line 3267 "ripper.y" 8911 { 8912#if 0 8913 (yyval.val) = NEW_MASGN(0, -1); 8914#endif 8915 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 8916 8917 } 8918 break; 8919 8920 case 373: 8921 8922/* Line 1806 of yacc.c */ 8923#line 3275 "ripper.y" 8924 { 8925#if 0 8926 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val))); 8927#endif 8928 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil); 8929 8930 } 8931 break; 8932 8933 case 374: 8934 8935/* Line 1806 of yacc.c */ 8936#line 3286 "ripper.y" 8937 { 8938 (yyval.val) = new_args_tail((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 8939 } 8940 break; 8941 8942 case 375: 8943 8944/* Line 1806 of yacc.c */ 8945#line 3290 "ripper.y" 8946 { 8947 (yyval.val) = new_args_tail((yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 8948 } 8949 break; 8950 8951 case 376: 8952 8953/* Line 1806 of yacc.c */ 8954#line 3294 "ripper.y" 8955 { 8956 (yyval.val) = new_args_tail(Qnone, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 8957 } 8958 break; 8959 8960 case 377: 8961 8962/* Line 1806 of yacc.c */ 8963#line 3298 "ripper.y" 8964 { 8965 (yyval.val) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].val)); 8966 } 8967 break; 8968 8969 case 378: 8970 8971/* Line 1806 of yacc.c */ 8972#line 3304 "ripper.y" 8973 { 8974 (yyval.val) = (yyvsp[(2) - (2)].val); 8975 } 8976 break; 8977 8978 case 379: 8979 8980/* Line 1806 of yacc.c */ 8981#line 3308 "ripper.y" 8982 { 8983 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 8984 } 8985 break; 8986 8987 case 380: 8988 8989/* Line 1806 of yacc.c */ 8990#line 3314 "ripper.y" 8991 { 8992 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnone, (yyvsp[(6) - (6)].val)); 8993 } 8994 break; 8995 8996 case 381: 8997 8998/* Line 1806 of yacc.c */ 8999#line 3318 "ripper.y" 9000 { 9001 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 9002 } 9003 break; 9004 9005 case 382: 9006 9007/* Line 1806 of yacc.c */ 9008#line 3322 "ripper.y" 9009 { 9010 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, Qnone, (yyvsp[(4) - (4)].val)); 9011 } 9012 break; 9013 9014 case 383: 9015 9016/* Line 1806 of yacc.c */ 9017#line 3326 "ripper.y" 9018 { 9019 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnone, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 9020 } 9021 break; 9022 9023 case 384: 9024 9025/* Line 1806 of yacc.c */ 9026#line 3330 "ripper.y" 9027 { 9028 (yyval.val) = new_args((yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 9029 } 9030 break; 9031 9032 case 385: 9033 9034/* Line 1806 of yacc.c */ 9035#line 3334 "ripper.y" 9036 { 9037 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone)); 9038#if 0 9039#endif 9040 dispatch1(excessed_comma, (yyval.val)); 9041 9042 } 9043 break; 9044 9045 case 386: 9046 9047/* Line 1806 of yacc.c */ 9048#line 3342 "ripper.y" 9049 { 9050 (yyval.val) = new_args((yyvsp[(1) - (6)].val), Qnone, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 9051 } 9052 break; 9053 9054 case 387: 9055 9056/* Line 1806 of yacc.c */ 9057#line 3346 "ripper.y" 9058 { 9059 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].val)); 9060 } 9061 break; 9062 9063 case 388: 9064 9065/* Line 1806 of yacc.c */ 9066#line 3350 "ripper.y" 9067 { 9068 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 9069 } 9070 break; 9071 9072 case 389: 9073 9074/* Line 1806 of yacc.c */ 9075#line 3354 "ripper.y" 9076 { 9077 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 9078 } 9079 break; 9080 9081 case 390: 9082 9083/* Line 1806 of yacc.c */ 9084#line 3358 "ripper.y" 9085 { 9086 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (2)].val), Qnone, Qnone, (yyvsp[(2) - (2)].val)); 9087 } 9088 break; 9089 9090 case 391: 9091 9092/* Line 1806 of yacc.c */ 9093#line 3362 "ripper.y" 9094 { 9095 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 9096 } 9097 break; 9098 9099 case 392: 9100 9101/* Line 1806 of yacc.c */ 9102#line 3366 "ripper.y" 9103 { 9104 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 9105 } 9106 break; 9107 9108 case 393: 9109 9110/* Line 1806 of yacc.c */ 9111#line 3370 "ripper.y" 9112 { 9113 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 9114 } 9115 break; 9116 9117 case 394: 9118 9119/* Line 1806 of yacc.c */ 9120#line 3374 "ripper.y" 9121 { 9122 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].val)); 9123 } 9124 break; 9125 9126 case 396: 9127 9128/* Line 1806 of yacc.c */ 9129#line 3381 "ripper.y" 9130 { 9131 command_start = TRUE; 9132 } 9133 break; 9134 9135 case 397: 9136 9137/* Line 1806 of yacc.c */ 9138#line 3387 "ripper.y" 9139 { 9140#if 0 9141 (yyval.val) = 0; 9142#endif 9143 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 9144 escape_Qundef((yyvsp[(2) - (3)].val))); 9145 9146 } 9147 break; 9148 9149 case 398: 9150 9151/* Line 1806 of yacc.c */ 9152#line 3396 "ripper.y" 9153 { 9154#if 0 9155 (yyval.val) = 0; 9156#endif 9157 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), 9158 Qnil); 9159 9160 } 9161 break; 9162 9163 case 399: 9164 9165/* Line 1806 of yacc.c */ 9166#line 3405 "ripper.y" 9167 { 9168#if 0 9169 (yyval.val) = (yyvsp[(2) - (4)].val); 9170#endif 9171 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val))); 9172 9173 } 9174 break; 9175 9176 case 400: 9177 9178/* Line 1806 of yacc.c */ 9179#line 3416 "ripper.y" 9180 { 9181 (yyval.val) = 0; 9182 } 9183 break; 9184 9185 case 401: 9186 9187/* Line 1806 of yacc.c */ 9188#line 3420 "ripper.y" 9189 { 9190#if 0 9191 (yyval.val) = 0; 9192#endif 9193 (yyval.val) = (yyvsp[(3) - (4)].val); 9194 9195 } 9196 break; 9197 9198 case 402: 9199 9200/* Line 1806 of yacc.c */ 9201#line 3432 "ripper.y" 9202 { 9203 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 9204 } 9205 break; 9206 9207 case 403: 9208 9209/* Line 1806 of yacc.c */ 9210#line 3439 "ripper.y" 9211 { 9212 rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 9213 } 9214 break; 9215 9216 case 404: 9217 9218/* Line 1806 of yacc.c */ 9219#line 3446 "ripper.y" 9220 { 9221 new_bv(get_id((yyvsp[(1) - (1)].val))); 9222#if 0 9223#endif 9224 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 9225 9226 } 9227 break; 9228 9229 case 405: 9230 9231/* Line 1806 of yacc.c */ 9232#line 3454 "ripper.y" 9233 { 9234 (yyval.val) = 0; 9235 } 9236 break; 9237 9238 case 406: 9239 9240/* Line 1806 of yacc.c */ 9241#line 3459 "ripper.y" 9242 { 9243 (yyval.vars) = dyna_push(); 9244 } 9245 break; 9246 9247 case 407: 9248 9249/* Line 1806 of yacc.c */ 9250#line 3462 "ripper.y" 9251 { 9252 (yyval.num) = lpar_beg; 9253 lpar_beg = ++paren_nest; 9254 } 9255 break; 9256 9257 case 408: 9258 9259/* Line 1806 of yacc.c */ 9260#line 3467 "ripper.y" 9261 { 9262 (yyval.num) = ruby_sourceline; 9263 } 9264 break; 9265 9266 case 409: 9267 9268/* Line 1806 of yacc.c */ 9269#line 3471 "ripper.y" 9270 { 9271 lpar_beg = (yyvsp[(2) - (5)].num); 9272#if 0 9273 (yyval.val) = NEW_LAMBDA((yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 9274 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 9275#endif 9276 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 9277 9278 dyna_pop((yyvsp[(1) - (5)].vars)); 9279 } 9280 break; 9281 9282 case 410: 9283 9284/* Line 1806 of yacc.c */ 9285#line 3484 "ripper.y" 9286 { 9287#if 0 9288 (yyval.val) = (yyvsp[(2) - (4)].val); 9289#endif 9290 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val)); 9291 9292 } 9293 break; 9294 9295 case 411: 9296 9297/* Line 1806 of yacc.c */ 9298#line 3492 "ripper.y" 9299 { 9300#if 0 9301 (yyval.val) = (yyvsp[(1) - (1)].val); 9302#endif 9303 (yyval.val) = (yyvsp[(1) - (1)].val); 9304 9305 } 9306 break; 9307 9308 case 412: 9309 9310/* Line 1806 of yacc.c */ 9311#line 3502 "ripper.y" 9312 { 9313 (yyval.val) = (yyvsp[(2) - (3)].val); 9314 } 9315 break; 9316 9317 case 413: 9318 9319/* Line 1806 of yacc.c */ 9320#line 3506 "ripper.y" 9321 { 9322 (yyval.val) = (yyvsp[(2) - (3)].val); 9323 } 9324 break; 9325 9326 case 414: 9327 9328/* Line 1806 of yacc.c */ 9329#line 3512 "ripper.y" 9330 { 9331 (yyvsp[(1) - (1)].vars) = dyna_push(); 9332#if 0 9333 (yyval.num) = ruby_sourceline; 9334#endif 9335 } 9336 break; 9337 9338 case 415: 9339 9340/* Line 1806 of yacc.c */ 9341#line 3521 "ripper.y" 9342 { 9343#if 0 9344 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 9345 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 9346#endif 9347 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 9348 9349 dyna_pop((yyvsp[(1) - (5)].vars)); 9350 } 9351 break; 9352 9353 case 416: 9354 9355/* Line 1806 of yacc.c */ 9356#line 3533 "ripper.y" 9357 { 9358#if 0 9359 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) { 9360 compile_error(PARSER_ARG "block given to yield"); 9361 } 9362 else { 9363 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val)); 9364 } 9365 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val); 9366 (yyval.val) = (yyvsp[(2) - (2)].val); 9367 fixpos((yyval.val), (yyvsp[(1) - (2)].val)); 9368#endif 9369 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 9370 9371 } 9372 break; 9373 9374 case 417: 9375 9376/* Line 1806 of yacc.c */ 9377#line 3549 "ripper.y" 9378 { 9379#if 0 9380 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 9381#endif 9382 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val)); 9383 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 9384 9385 } 9386 break; 9387 9388 case 418: 9389 9390/* Line 1806 of yacc.c */ 9391#line 3558 "ripper.y" 9392 { 9393#if 0 9394 block_dup_check((yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 9395 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 9396 (yyval.val) = (yyvsp[(5) - (5)].val); 9397 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 9398#endif 9399 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 9400 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 9401 9402 } 9403 break; 9404 9405 case 419: 9406 9407/* Line 1806 of yacc.c */ 9408#line 3570 "ripper.y" 9409 { 9410#if 0 9411 block_dup_check((yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 9412 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 9413 (yyval.val) = (yyvsp[(5) - (5)].val); 9414 fixpos((yyval.val), (yyvsp[(1) - (5)].val)); 9415#endif 9416 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val)); 9417 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val)); 9418 9419 } 9420 break; 9421 9422 case 420: 9423 9424/* Line 1806 of yacc.c */ 9425#line 3584 "ripper.y" 9426 { 9427#if 0 9428 (yyval.val) = (yyvsp[(1) - (2)].val); 9429 (yyval.val)->nd_args = (yyvsp[(2) - (2)].val); 9430#endif 9431 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val)); 9432 9433 } 9434 break; 9435 9436 case 421: 9437 9438/* Line 1806 of yacc.c */ 9439#line 3593 "ripper.y" 9440 { 9441#if 0 9442 (yyval.num) = ruby_sourceline; 9443#endif 9444 } 9445 break; 9446 9447 case 422: 9448 9449/* Line 1806 of yacc.c */ 9450#line 3599 "ripper.y" 9451 { 9452#if 0 9453 (yyval.val) = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 9454 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 9455#endif 9456 (yyval.val) = dispatch3(call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 9457 (yyval.val) = method_optarg((yyval.val), (yyvsp[(5) - (5)].val)); 9458 9459 } 9460 break; 9461 9462 case 423: 9463 9464/* Line 1806 of yacc.c */ 9465#line 3609 "ripper.y" 9466 { 9467#if 0 9468 (yyval.num) = ruby_sourceline; 9469#endif 9470 } 9471 break; 9472 9473 case 424: 9474 9475/* Line 1806 of yacc.c */ 9476#line 3615 "ripper.y" 9477 { 9478#if 0 9479 (yyval.val) = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 9480 nd_set_line((yyval.val), (yyvsp[(4) - (5)].num)); 9481#endif 9482 (yyval.val) = dispatch3(call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val)); 9483 (yyval.val) = method_optarg((yyval.val), (yyvsp[(5) - (5)].val)); 9484 9485 } 9486 break; 9487 9488 case 425: 9489 9490/* Line 1806 of yacc.c */ 9491#line 3625 "ripper.y" 9492 { 9493#if 0 9494 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0); 9495#endif 9496 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val)); 9497 9498 } 9499 break; 9500 9501 case 426: 9502 9503/* Line 1806 of yacc.c */ 9504#line 3633 "ripper.y" 9505 { 9506#if 0 9507 (yyval.num) = ruby_sourceline; 9508#endif 9509 } 9510 break; 9511 9512 case 427: 9513 9514/* Line 1806 of yacc.c */ 9515#line 3639 "ripper.y" 9516 { 9517#if 0 9518 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), rb_intern("call"), (yyvsp[(4) - (4)].val)); 9519 nd_set_line((yyval.val), (yyvsp[(3) - (4)].num)); 9520#endif 9521 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), 9522 ripper_intern("call")); 9523 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 9524 9525 } 9526 break; 9527 9528 case 428: 9529 9530/* Line 1806 of yacc.c */ 9531#line 3650 "ripper.y" 9532 { 9533#if 0 9534 (yyval.num) = ruby_sourceline; 9535#endif 9536 } 9537 break; 9538 9539 case 429: 9540 9541/* Line 1806 of yacc.c */ 9542#line 3656 "ripper.y" 9543 { 9544#if 0 9545 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), rb_intern("call"), (yyvsp[(4) - (4)].val)); 9546 nd_set_line((yyval.val), (yyvsp[(3) - (4)].num)); 9547#endif 9548 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), 9549 ripper_intern("call")); 9550 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val)); 9551 9552 } 9553 break; 9554 9555 case 430: 9556 9557/* Line 1806 of yacc.c */ 9558#line 3667 "ripper.y" 9559 { 9560#if 0 9561 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val)); 9562#endif 9563 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val)); 9564 9565 } 9566 break; 9567 9568 case 431: 9569 9570/* Line 1806 of yacc.c */ 9571#line 3675 "ripper.y" 9572 { 9573#if 0 9574 (yyval.val) = NEW_ZSUPER(); 9575#endif 9576 (yyval.val) = dispatch0(zsuper); 9577 9578 } 9579 break; 9580 9581 case 432: 9582 9583/* Line 1806 of yacc.c */ 9584#line 3683 "ripper.y" 9585 { 9586#if 0 9587 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF) 9588 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val)); 9589 else 9590 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val)); 9591 fixpos((yyval.val), (yyvsp[(1) - (4)].val)); 9592#endif 9593 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val))); 9594 9595 } 9596 break; 9597 9598 case 433: 9599 9600/* Line 1806 of yacc.c */ 9601#line 3697 "ripper.y" 9602 { 9603 (yyvsp[(1) - (1)].vars) = dyna_push(); 9604#if 0 9605 (yyval.num) = ruby_sourceline; 9606#endif 9607 9608 } 9609 break; 9610 9611 case 434: 9612 9613/* Line 1806 of yacc.c */ 9614#line 3706 "ripper.y" 9615 { 9616#if 0 9617 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 9618 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 9619#endif 9620 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 9621 9622 dyna_pop((yyvsp[(1) - (5)].vars)); 9623 } 9624 break; 9625 9626 case 435: 9627 9628/* Line 1806 of yacc.c */ 9629#line 3716 "ripper.y" 9630 { 9631 (yyvsp[(1) - (1)].vars) = dyna_push(); 9632#if 0 9633 (yyval.num) = ruby_sourceline; 9634#endif 9635 9636 } 9637 break; 9638 9639 case 436: 9640 9641/* Line 1806 of yacc.c */ 9642#line 3725 "ripper.y" 9643 { 9644#if 0 9645 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val)); 9646 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num)); 9647#endif 9648 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val)); 9649 9650 dyna_pop((yyvsp[(1) - (5)].vars)); 9651 } 9652 break; 9653 9654 case 437: 9655 9656/* Line 1806 of yacc.c */ 9657#line 3739 "ripper.y" 9658 { 9659#if 0 9660 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val)); 9661#endif 9662 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val))); 9663 9664 } 9665 break; 9666 9667 case 440: 9668 9669/* Line 1806 of yacc.c */ 9670#line 3755 "ripper.y" 9671 { 9672#if 0 9673 if ((yyvsp[(3) - (6)].val)) { 9674 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO()); 9675 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val)); 9676 } 9677 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 9678 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val)); 9679#endif 9680 (yyval.val) = dispatch4(rescue, 9681 escape_Qundef((yyvsp[(2) - (6)].val)), 9682 escape_Qundef((yyvsp[(3) - (6)].val)), 9683 escape_Qundef((yyvsp[(5) - (6)].val)), 9684 escape_Qundef((yyvsp[(6) - (6)].val))); 9685 9686 } 9687 break; 9688 9689 case 442: 9690 9691/* Line 1806 of yacc.c */ 9692#line 3775 "ripper.y" 9693 { 9694#if 0 9695 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val)); 9696#endif 9697 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 9698 9699 } 9700 break; 9701 9702 case 443: 9703 9704/* Line 1806 of yacc.c */ 9705#line 3783 "ripper.y" 9706 { 9707#if 0 9708 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val); 9709#endif 9710 (yyval.val) = (yyvsp[(1) - (1)].val); 9711 9712 } 9713 break; 9714 9715 case 445: 9716 9717/* Line 1806 of yacc.c */ 9718#line 3794 "ripper.y" 9719 { 9720 (yyval.val) = (yyvsp[(2) - (2)].val); 9721 } 9722 break; 9723 9724 case 447: 9725 9726/* Line 1806 of yacc.c */ 9727#line 3801 "ripper.y" 9728 { 9729#if 0 9730 (yyval.val) = (yyvsp[(2) - (2)].val); 9731#endif 9732 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val)); 9733 9734 } 9735 break; 9736 9737 case 450: 9738 9739/* Line 1806 of yacc.c */ 9740#line 3813 "ripper.y" 9741 { 9742#if 0 9743 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val))); 9744#endif 9745 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val)); 9746 9747 } 9748 break; 9749 9750 case 452: 9751 9752/* Line 1806 of yacc.c */ 9753#line 3824 "ripper.y" 9754 { 9755#if 0 9756 NODE *node = (yyvsp[(1) - (1)].val); 9757 if (!node) { 9758 node = NEW_STR(STR_NEW0()); 9759 } 9760 else { 9761 node = evstr2dstr(node); 9762 } 9763 (yyval.val) = node; 9764#endif 9765 (yyval.val) = (yyvsp[(1) - (1)].val); 9766 9767 } 9768 break; 9769 9770 case 455: 9771 9772/* Line 1806 of yacc.c */ 9773#line 3843 "ripper.y" 9774 { 9775#if 0 9776 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 9777#endif 9778 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 9779 9780 } 9781 break; 9782 9783 case 456: 9784 9785/* Line 1806 of yacc.c */ 9786#line 3853 "ripper.y" 9787 { 9788#if 0 9789 (yyval.val) = (yyvsp[(2) - (3)].val); 9790#endif 9791 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val)); 9792 9793 } 9794 break; 9795 9796 case 457: 9797 9798/* Line 1806 of yacc.c */ 9799#line 3863 "ripper.y" 9800 { 9801#if 0 9802 NODE *node = (yyvsp[(2) - (3)].val); 9803 if (!node) { 9804 node = NEW_XSTR(STR_NEW0()); 9805 } 9806 else { 9807 switch (nd_type(node)) { 9808 case NODE_STR: 9809 nd_set_type(node, NODE_XSTR); 9810 break; 9811 case NODE_DSTR: 9812 nd_set_type(node, NODE_DXSTR); 9813 break; 9814 default: 9815 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node)); 9816 break; 9817 } 9818 } 9819 (yyval.val) = node; 9820#endif 9821 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val)); 9822 9823 } 9824 break; 9825 9826 case 458: 9827 9828/* Line 1806 of yacc.c */ 9829#line 3890 "ripper.y" 9830 { 9831#if 0 9832 int options = (yyvsp[(3) - (3)].val); 9833 NODE *node = (yyvsp[(2) - (3)].val); 9834 NODE *list, *prev; 9835 if (!node) { 9836 node = NEW_LIT(reg_compile(STR_NEW0(), options)); 9837 } 9838 else switch (nd_type(node)) { 9839 case NODE_STR: 9840 { 9841 VALUE src = node->nd_lit; 9842 nd_set_type(node, NODE_LIT); 9843 node->nd_lit = reg_compile(src, options); 9844 } 9845 break; 9846 default: 9847 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node)); 9848 case NODE_DSTR: 9849 if (options & RE_OPTION_ONCE) { 9850 nd_set_type(node, NODE_DREGX_ONCE); 9851 } 9852 else { 9853 nd_set_type(node, NODE_DREGX); 9854 } 9855 node->nd_cflag = options & RE_OPTION_MASK; 9856 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options); 9857 for (list = (prev = node)->nd_next; list; list = list->nd_next) { 9858 if (nd_type(list->nd_head) == NODE_STR) { 9859 VALUE tail = list->nd_head->nd_lit; 9860 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { 9861 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; 9862 if (!literal_concat0(parser, lit, tail)) { 9863 node = 0; 9864 break; 9865 } 9866 rb_str_resize(tail, 0); 9867 prev->nd_next = list->nd_next; 9868 rb_gc_force_recycle((VALUE)list->nd_head); 9869 rb_gc_force_recycle((VALUE)list); 9870 list = prev; 9871 } 9872 else { 9873 prev = list; 9874 } 9875 } 9876 else { 9877 prev = 0; 9878 } 9879 } 9880 if (!node->nd_next) { 9881 VALUE src = node->nd_lit; 9882 nd_set_type(node, NODE_LIT); 9883 node->nd_lit = reg_compile(src, options); 9884 } 9885 break; 9886 } 9887 (yyval.val) = node; 9888#endif 9889 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val)); 9890 9891 } 9892 break; 9893 9894 case 459: 9895 9896/* Line 1806 of yacc.c */ 9897#line 3955 "ripper.y" 9898 { 9899#if 0 9900 (yyval.val) = NEW_ZARRAY(); 9901#endif 9902 (yyval.val) = dispatch0(words_new); 9903 (yyval.val) = dispatch1(array, (yyval.val)); 9904 9905 } 9906 break; 9907 9908 case 460: 9909 9910/* Line 1806 of yacc.c */ 9911#line 3964 "ripper.y" 9912 { 9913#if 0 9914 (yyval.val) = (yyvsp[(2) - (3)].val); 9915#endif 9916 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 9917 9918 } 9919 break; 9920 9921 case 461: 9922 9923/* Line 1806 of yacc.c */ 9924#line 3974 "ripper.y" 9925 { 9926#if 0 9927 (yyval.val) = 0; 9928#endif 9929 (yyval.val) = dispatch0(words_new); 9930 9931 } 9932 break; 9933 9934 case 462: 9935 9936/* Line 1806 of yacc.c */ 9937#line 3982 "ripper.y" 9938 { 9939#if 0 9940 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val))); 9941#endif 9942 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 9943 9944 } 9945 break; 9946 9947 case 463: 9948 9949/* Line 1806 of yacc.c */ 9950#line 3994 "ripper.y" 9951 { 9952 (yyval.val) = dispatch0(word_new); 9953 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val)); 9954 } 9955 break; 9956 9957 case 464: 9958 9959/* Line 1806 of yacc.c */ 9960#line 4000 "ripper.y" 9961 { 9962#if 0 9963 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 9964#endif 9965 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 9966 9967 } 9968 break; 9969 9970 case 465: 9971 9972/* Line 1806 of yacc.c */ 9973#line 4010 "ripper.y" 9974 { 9975#if 0 9976 (yyval.val) = NEW_ZARRAY(); 9977#endif 9978 (yyval.val) = dispatch0(symbols_new); 9979 (yyval.val) = dispatch1(array, (yyval.val)); 9980 9981 } 9982 break; 9983 9984 case 466: 9985 9986/* Line 1806 of yacc.c */ 9987#line 4019 "ripper.y" 9988 { 9989#if 0 9990 (yyval.val) = (yyvsp[(2) - (3)].val); 9991#endif 9992 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 9993 9994 } 9995 break; 9996 9997 case 467: 9998 9999/* Line 1806 of yacc.c */ 10000#line 4029 "ripper.y" 10001 { 10002#if 0 10003 (yyval.val) = 0; 10004#endif 10005 (yyval.val) = dispatch0(symbols_new); 10006 10007 } 10008 break; 10009 10010 case 468: 10011 10012/* Line 1806 of yacc.c */ 10013#line 4037 "ripper.y" 10014 { 10015#if 0 10016 (yyvsp[(2) - (3)].val) = evstr2dstr((yyvsp[(2) - (3)].val)); 10017 nd_set_type((yyvsp[(2) - (3)].val), NODE_DSYM); 10018 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10019#endif 10020 (yyval.val) = dispatch2(symbols_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10021 10022 } 10023 break; 10024 10025 case 469: 10026 10027/* Line 1806 of yacc.c */ 10028#line 4049 "ripper.y" 10029 { 10030#if 0 10031 (yyval.val) = NEW_ZARRAY(); 10032#endif 10033 (yyval.val) = dispatch0(qwords_new); 10034 (yyval.val) = dispatch1(array, (yyval.val)); 10035 10036 } 10037 break; 10038 10039 case 470: 10040 10041/* Line 1806 of yacc.c */ 10042#line 4058 "ripper.y" 10043 { 10044#if 0 10045 (yyval.val) = (yyvsp[(2) - (3)].val); 10046#endif 10047 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 10048 10049 } 10050 break; 10051 10052 case 471: 10053 10054/* Line 1806 of yacc.c */ 10055#line 4068 "ripper.y" 10056 { 10057#if 0 10058 (yyval.val) = NEW_ZARRAY(); 10059#endif 10060 (yyval.val) = dispatch0(qsymbols_new); 10061 (yyval.val) = dispatch1(array, (yyval.val)); 10062 10063 } 10064 break; 10065 10066 case 472: 10067 10068/* Line 1806 of yacc.c */ 10069#line 4077 "ripper.y" 10070 { 10071#if 0 10072 (yyval.val) = (yyvsp[(2) - (3)].val); 10073#endif 10074 (yyval.val) = dispatch1(array, (yyvsp[(2) - (3)].val)); 10075 10076 } 10077 break; 10078 10079 case 473: 10080 10081/* Line 1806 of yacc.c */ 10082#line 4087 "ripper.y" 10083 { 10084#if 0 10085 (yyval.val) = 0; 10086#endif 10087 (yyval.val) = dispatch0(qwords_new); 10088 10089 } 10090 break; 10091 10092 case 474: 10093 10094/* Line 1806 of yacc.c */ 10095#line 4095 "ripper.y" 10096 { 10097#if 0 10098 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10099#endif 10100 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10101 10102 } 10103 break; 10104 10105 case 475: 10106 10107/* Line 1806 of yacc.c */ 10108#line 4105 "ripper.y" 10109 { 10110#if 0 10111 (yyval.val) = 0; 10112#endif 10113 (yyval.val) = dispatch0(qsymbols_new); 10114 10115 } 10116 break; 10117 10118 case 476: 10119 10120/* Line 1806 of yacc.c */ 10121#line 4113 "ripper.y" 10122 { 10123#if 0 10124 VALUE lit; 10125 lit = (yyvsp[(2) - (3)].val)->nd_lit; 10126 (yyvsp[(2) - (3)].val)->nd_lit = ID2SYM(rb_intern_str(lit)); 10127 nd_set_type((yyvsp[(2) - (3)].val), NODE_LIT); 10128 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10129#endif 10130 (yyval.val) = dispatch2(qsymbols_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val)); 10131 10132 } 10133 break; 10134 10135 case 477: 10136 10137/* Line 1806 of yacc.c */ 10138#line 4127 "ripper.y" 10139 { 10140#if 0 10141 (yyval.val) = 0; 10142#endif 10143 (yyval.val) = dispatch0(string_content); 10144 10145 } 10146 break; 10147 10148 case 478: 10149 10150/* Line 1806 of yacc.c */ 10151#line 4135 "ripper.y" 10152 { 10153#if 0 10154 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10155#endif 10156 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10157 10158 } 10159 break; 10160 10161 case 479: 10162 10163/* Line 1806 of yacc.c */ 10164#line 4145 "ripper.y" 10165 { 10166#if 0 10167 (yyval.val) = 0; 10168#endif 10169 (yyval.val) = dispatch0(xstring_new); 10170 10171 } 10172 break; 10173 10174 case 480: 10175 10176/* Line 1806 of yacc.c */ 10177#line 4153 "ripper.y" 10178 { 10179#if 0 10180 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10181#endif 10182 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10183 10184 } 10185 break; 10186 10187 case 481: 10188 10189/* Line 1806 of yacc.c */ 10190#line 4163 "ripper.y" 10191 { 10192#if 0 10193 (yyval.val) = 0; 10194#endif 10195 (yyval.val) = dispatch0(regexp_new); 10196 10197 } 10198 break; 10199 10200 case 482: 10201 10202/* Line 1806 of yacc.c */ 10203#line 4171 "ripper.y" 10204 { 10205#if 0 10206 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val); 10207 if (!head) { 10208 (yyval.val) = tail; 10209 } 10210 else if (!tail) { 10211 (yyval.val) = head; 10212 } 10213 else { 10214 switch (nd_type(head)) { 10215 case NODE_STR: 10216 nd_set_type(head, NODE_DSTR); 10217 break; 10218 case NODE_DSTR: 10219 break; 10220 default: 10221 head = list_append(NEW_DSTR(Qnil), head); 10222 break; 10223 } 10224 (yyval.val) = list_append(head, tail); 10225 } 10226#endif 10227 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10228 10229 } 10230 break; 10231 10232 case 484: 10233 10234/* Line 1806 of yacc.c */ 10235#line 4201 "ripper.y" 10236 { 10237 (yyval.node) = lex_strterm; 10238 lex_strterm = 0; 10239 lex_state = EXPR_BEG; 10240 } 10241 break; 10242 10243 case 485: 10244 10245/* Line 1806 of yacc.c */ 10246#line 4207 "ripper.y" 10247 { 10248#if 0 10249 lex_strterm = (yyvsp[(2) - (3)].node); 10250 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val)); 10251#endif 10252 lex_strterm = (yyvsp[(2) - (3)].node); 10253 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val)); 10254 10255 } 10256 break; 10257 10258 case 486: 10259 10260/* Line 1806 of yacc.c */ 10261#line 4217 "ripper.y" 10262 { 10263 (yyvsp[(1) - (1)].val) = cond_stack; 10264 (yyval.val) = cmdarg_stack; 10265 cond_stack = 0; 10266 cmdarg_stack = 0; 10267 } 10268 break; 10269 10270 case 487: 10271 10272/* Line 1806 of yacc.c */ 10273#line 4223 "ripper.y" 10274 { 10275 (yyval.node) = lex_strterm; 10276 lex_strterm = 0; 10277 lex_state = EXPR_BEG; 10278 } 10279 break; 10280 10281 case 488: 10282 10283/* Line 1806 of yacc.c */ 10284#line 4228 "ripper.y" 10285 { 10286 (yyval.num) = brace_nest; 10287 brace_nest = 0; 10288 } 10289 break; 10290 10291 case 489: 10292 10293/* Line 1806 of yacc.c */ 10294#line 4233 "ripper.y" 10295 { 10296 cond_stack = (yyvsp[(1) - (6)].val); 10297 cmdarg_stack = (yyvsp[(2) - (6)].val); 10298 lex_strterm = (yyvsp[(3) - (6)].node); 10299 brace_nest = (yyvsp[(4) - (6)].num); 10300#if 0 10301 if ((yyvsp[(5) - (6)].val)) (yyvsp[(5) - (6)].val)->flags &= ~NODE_FL_NEWLINE; 10302 (yyval.val) = new_evstr((yyvsp[(5) - (6)].val)); 10303#endif 10304 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(5) - (6)].val)); 10305 10306 } 10307 break; 10308 10309 case 490: 10310 10311/* Line 1806 of yacc.c */ 10312#line 4248 "ripper.y" 10313 { 10314#if 0 10315 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val)); 10316#endif 10317 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10318 10319 } 10320 break; 10321 10322 case 491: 10323 10324/* Line 1806 of yacc.c */ 10325#line 4256 "ripper.y" 10326 { 10327#if 0 10328 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val)); 10329#endif 10330 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10331 10332 } 10333 break; 10334 10335 case 492: 10336 10337/* Line 1806 of yacc.c */ 10338#line 4264 "ripper.y" 10339 { 10340#if 0 10341 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val)); 10342#endif 10343 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10344 10345 } 10346 break; 10347 10348 case 494: 10349 10350/* Line 1806 of yacc.c */ 10351#line 4275 "ripper.y" 10352 { 10353 lex_state = EXPR_END; 10354#if 0 10355 (yyval.val) = (yyvsp[(2) - (2)].val); 10356#endif 10357 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val)); 10358 10359 } 10360 break; 10361 10362 case 499: 10363 10364/* Line 1806 of yacc.c */ 10365#line 4292 "ripper.y" 10366 { 10367 lex_state = EXPR_END; 10368#if 0 10369 (yyval.val) = dsym_node((yyvsp[(2) - (3)].val)); 10370#endif 10371 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val)); 10372 10373 } 10374 break; 10375 10376 case 502: 10377 10378/* Line 1806 of yacc.c */ 10379#line 4305 "ripper.y" 10380 { 10381#if 0 10382 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10383#endif 10384 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10385 10386 } 10387 break; 10388 10389 case 503: 10390 10391/* Line 1806 of yacc.c */ 10392#line 4313 "ripper.y" 10393 { 10394#if 0 10395 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val)); 10396#endif 10397 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val)); 10398 10399 } 10400 break; 10401 10402 case 509: 10403 10404/* Line 1806 of yacc.c */ 10405#line 4329 "ripper.y" 10406 {ifndef_ripper((yyval.val) = keyword_nil);} 10407 break; 10408 10409 case 510: 10410 10411/* Line 1806 of yacc.c */ 10412#line 4330 "ripper.y" 10413 {ifndef_ripper((yyval.val) = keyword_self);} 10414 break; 10415 10416 case 511: 10417 10418/* Line 1806 of yacc.c */ 10419#line 4331 "ripper.y" 10420 {ifndef_ripper((yyval.val) = keyword_true);} 10421 break; 10422 10423 case 512: 10424 10425/* Line 1806 of yacc.c */ 10426#line 4332 "ripper.y" 10427 {ifndef_ripper((yyval.val) = keyword_false);} 10428 break; 10429 10430 case 513: 10431 10432/* Line 1806 of yacc.c */ 10433#line 4333 "ripper.y" 10434 {ifndef_ripper((yyval.val) = keyword__FILE__);} 10435 break; 10436 10437 case 514: 10438 10439/* Line 1806 of yacc.c */ 10440#line 4334 "ripper.y" 10441 {ifndef_ripper((yyval.val) = keyword__LINE__);} 10442 break; 10443 10444 case 515: 10445 10446/* Line 1806 of yacc.c */ 10447#line 4335 "ripper.y" 10448 {ifndef_ripper((yyval.val) = keyword__ENCODING__);} 10449 break; 10450 10451 case 516: 10452 10453/* Line 1806 of yacc.c */ 10454#line 4339 "ripper.y" 10455 { 10456#if 0 10457 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10458#endif 10459 if (id_is_var(get_id((yyvsp[(1) - (1)].val)))) { 10460 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10461 } 10462 else { 10463 (yyval.val) = dispatch1(vcall, (yyvsp[(1) - (1)].val)); 10464 } 10465 10466 } 10467 break; 10468 10469 case 517: 10470 10471/* Line 1806 of yacc.c */ 10472#line 4352 "ripper.y" 10473 { 10474#if 0 10475 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0); 10476#endif 10477 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val)); 10478 10479 } 10480 break; 10481 10482 case 518: 10483 10484/* Line 1806 of yacc.c */ 10485#line 4362 "ripper.y" 10486 { 10487 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10488#if 0 10489#endif 10490 (yyval.val) = dispatch1(var_field, (yyval.val)); 10491 10492 } 10493 break; 10494 10495 case 519: 10496 10497/* Line 1806 of yacc.c */ 10498#line 4370 "ripper.y" 10499 { 10500 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0); 10501#if 0 10502#endif 10503 (yyval.val) = dispatch1(var_field, (yyval.val)); 10504 10505 } 10506 break; 10507 10508 case 522: 10509 10510/* Line 1806 of yacc.c */ 10511#line 4384 "ripper.y" 10512 { 10513#if 0 10514 (yyval.val) = 0; 10515#endif 10516 (yyval.val) = Qnil; 10517 10518 } 10519 break; 10520 10521 case 523: 10522 10523/* Line 1806 of yacc.c */ 10524#line 4392 "ripper.y" 10525 { 10526 lex_state = EXPR_BEG; 10527 command_start = TRUE; 10528 } 10529 break; 10530 10531 case 524: 10532 10533/* Line 1806 of yacc.c */ 10534#line 4397 "ripper.y" 10535 { 10536 (yyval.val) = (yyvsp[(3) - (4)].val); 10537 } 10538 break; 10539 10540 case 525: 10541 10542/* Line 1806 of yacc.c */ 10543#line 4401 "ripper.y" 10544 { 10545#if 0 10546 yyerrok; 10547 (yyval.val) = 0; 10548#endif 10549 yyerrok; 10550 (yyval.val) = Qnil; 10551 10552 } 10553 break; 10554 10555 case 526: 10556 10557/* Line 1806 of yacc.c */ 10558#line 4413 "ripper.y" 10559 { 10560#if 0 10561 (yyval.val) = (yyvsp[(2) - (3)].val); 10562#endif 10563 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val)); 10564 10565 lex_state = EXPR_BEG; 10566 command_start = TRUE; 10567 } 10568 break; 10569 10570 case 527: 10571 10572/* Line 1806 of yacc.c */ 10573#line 4423 "ripper.y" 10574 { 10575 (yyval.val) = (yyvsp[(1) - (2)].val); 10576 lex_state = EXPR_BEG; 10577 command_start = TRUE; 10578 } 10579 break; 10580 10581 case 528: 10582 10583/* Line 1806 of yacc.c */ 10584#line 4431 "ripper.y" 10585 { 10586 (yyval.val) = new_args_tail((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10587 } 10588 break; 10589 10590 case 529: 10591 10592/* Line 1806 of yacc.c */ 10593#line 4435 "ripper.y" 10594 { 10595 (yyval.val) = new_args_tail((yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 10596 } 10597 break; 10598 10599 case 530: 10600 10601/* Line 1806 of yacc.c */ 10602#line 4439 "ripper.y" 10603 { 10604 (yyval.val) = new_args_tail(Qnone, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10605 } 10606 break; 10607 10608 case 531: 10609 10610/* Line 1806 of yacc.c */ 10611#line 4443 "ripper.y" 10612 { 10613 (yyval.val) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].val)); 10614 } 10615 break; 10616 10617 case 532: 10618 10619/* Line 1806 of yacc.c */ 10620#line 4449 "ripper.y" 10621 { 10622 (yyval.val) = (yyvsp[(2) - (2)].val); 10623 } 10624 break; 10625 10626 case 533: 10627 10628/* Line 1806 of yacc.c */ 10629#line 4453 "ripper.y" 10630 { 10631 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 10632 } 10633 break; 10634 10635 case 534: 10636 10637/* Line 1806 of yacc.c */ 10638#line 4459 "ripper.y" 10639 { 10640 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnone, (yyvsp[(6) - (6)].val)); 10641 } 10642 break; 10643 10644 case 535: 10645 10646/* Line 1806 of yacc.c */ 10647#line 4463 "ripper.y" 10648 { 10649 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val)); 10650 } 10651 break; 10652 10653 case 536: 10654 10655/* Line 1806 of yacc.c */ 10656#line 4467 "ripper.y" 10657 { 10658 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, Qnone, (yyvsp[(4) - (4)].val)); 10659 } 10660 break; 10661 10662 case 537: 10663 10664/* Line 1806 of yacc.c */ 10665#line 4471 "ripper.y" 10666 { 10667 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnone, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10668 } 10669 break; 10670 10671 case 538: 10672 10673/* Line 1806 of yacc.c */ 10674#line 4475 "ripper.y" 10675 { 10676 (yyval.val) = new_args((yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 10677 } 10678 break; 10679 10680 case 539: 10681 10682/* Line 1806 of yacc.c */ 10683#line 4479 "ripper.y" 10684 { 10685 (yyval.val) = new_args((yyvsp[(1) - (6)].val), Qnone, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10686 } 10687 break; 10688 10689 case 540: 10690 10691/* Line 1806 of yacc.c */ 10692#line 4483 "ripper.y" 10693 { 10694 (yyval.val) = new_args((yyvsp[(1) - (2)].val), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].val)); 10695 } 10696 break; 10697 10698 case 541: 10699 10700/* Line 1806 of yacc.c */ 10701#line 4487 "ripper.y" 10702 { 10703 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnone, (yyvsp[(4) - (4)].val)); 10704 } 10705 break; 10706 10707 case 542: 10708 10709/* Line 1806 of yacc.c */ 10710#line 4491 "ripper.y" 10711 { 10712 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val)); 10713 } 10714 break; 10715 10716 case 543: 10717 10718/* Line 1806 of yacc.c */ 10719#line 4495 "ripper.y" 10720 { 10721 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (2)].val), Qnone, Qnone, (yyvsp[(2) - (2)].val)); 10722 } 10723 break; 10724 10725 case 544: 10726 10727/* Line 1806 of yacc.c */ 10728#line 4499 "ripper.y" 10729 { 10730 (yyval.val) = new_args(Qnone, (yyvsp[(1) - (4)].val), Qnone, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10731 } 10732 break; 10733 10734 case 545: 10735 10736/* Line 1806 of yacc.c */ 10737#line 4503 "ripper.y" 10738 { 10739 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].val), Qnone, (yyvsp[(2) - (2)].val)); 10740 } 10741 break; 10742 10743 case 546: 10744 10745/* Line 1806 of yacc.c */ 10746#line 4507 "ripper.y" 10747 { 10748 (yyval.val) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val)); 10749 } 10750 break; 10751 10752 case 547: 10753 10754/* Line 1806 of yacc.c */ 10755#line 4511 "ripper.y" 10756 { 10757 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].val)); 10758 } 10759 break; 10760 10761 case 548: 10762 10763/* Line 1806 of yacc.c */ 10764#line 4515 "ripper.y" 10765 { 10766 (yyval.val) = new_args_tail(Qnone, Qnone, Qnone); 10767 (yyval.val) = new_args(Qnone, Qnone, Qnone, Qnone, (yyval.val)); 10768 } 10769 break; 10770 10771 case 549: 10772 10773/* Line 1806 of yacc.c */ 10774#line 4522 "ripper.y" 10775 { 10776#if 0 10777 yyerror("formal argument cannot be a constant"); 10778 (yyval.val) = 0; 10779#endif 10780 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10781 10782 } 10783 break; 10784 10785 case 550: 10786 10787/* Line 1806 of yacc.c */ 10788#line 4531 "ripper.y" 10789 { 10790#if 0 10791 yyerror("formal argument cannot be an instance variable"); 10792 (yyval.val) = 0; 10793#endif 10794 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10795 10796 } 10797 break; 10798 10799 case 551: 10800 10801/* Line 1806 of yacc.c */ 10802#line 4540 "ripper.y" 10803 { 10804#if 0 10805 yyerror("formal argument cannot be a global variable"); 10806 (yyval.val) = 0; 10807#endif 10808 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10809 10810 } 10811 break; 10812 10813 case 552: 10814 10815/* Line 1806 of yacc.c */ 10816#line 4549 "ripper.y" 10817 { 10818#if 0 10819 yyerror("formal argument cannot be a class variable"); 10820 (yyval.val) = 0; 10821#endif 10822 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val)); 10823 10824 } 10825 break; 10826 10827 case 554: 10828 10829/* Line 1806 of yacc.c */ 10830#line 4561 "ripper.y" 10831 { 10832 formal_argument(get_id((yyvsp[(1) - (1)].val))); 10833 (yyval.val) = (yyvsp[(1) - (1)].val); 10834 } 10835 break; 10836 10837 case 555: 10838 10839/* Line 1806 of yacc.c */ 10840#line 4568 "ripper.y" 10841 { 10842 arg_var(get_id((yyvsp[(1) - (1)].val))); 10843#if 0 10844 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1); 10845#endif 10846 (yyval.val) = get_value((yyvsp[(1) - (1)].val)); 10847 10848 } 10849 break; 10850 10851 case 556: 10852 10853/* Line 1806 of yacc.c */ 10854#line 4577 "ripper.y" 10855 { 10856 ID tid = internal_id(); 10857 arg_var(tid); 10858#if 0 10859 if (dyna_in_block()) { 10860 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid); 10861 } 10862 else { 10863 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid); 10864 } 10865 (yyval.val) = NEW_ARGS_AUX(tid, 1); 10866 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val); 10867#endif 10868 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val)); 10869 10870 } 10871 break; 10872 10873 case 557: 10874 10875/* Line 1806 of yacc.c */ 10876#line 4598 "ripper.y" 10877 { 10878 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10879 } 10880 break; 10881 10882 case 558: 10883 10884/* Line 1806 of yacc.c */ 10885#line 4603 "ripper.y" 10886 { 10887#if 0 10888 (yyval.val) = (yyvsp[(1) - (3)].val); 10889 (yyval.val)->nd_plen++; 10890 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next); 10891 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val)); 10892#endif 10893 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10894 10895 } 10896 break; 10897 10898 case 559: 10899 10900/* Line 1806 of yacc.c */ 10901#line 4616 "ripper.y" 10902 { 10903 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].val)))); 10904 (yyval.val) = assignable((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10905#if 0 10906 (yyval.val) = NEW_KW_ARG(0, (yyval.val)); 10907#endif 10908 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(2) - (2)].val)); 10909 10910 } 10911 break; 10912 10913 case 560: 10914 10915/* Line 1806 of yacc.c */ 10916#line 4628 "ripper.y" 10917 { 10918 arg_var(formal_argument(get_id((yyvsp[(1) - (2)].val)))); 10919 (yyval.val) = assignable((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 10920#if 0 10921 (yyval.val) = NEW_KW_ARG(0, (yyval.val)); 10922#endif 10923 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(2) - (2)].val)); 10924 10925 } 10926 break; 10927 10928 case 561: 10929 10930/* Line 1806 of yacc.c */ 10931#line 4640 "ripper.y" 10932 { 10933#if 0 10934 (yyval.val) = (yyvsp[(1) - (1)].val); 10935#endif 10936 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10937 10938 } 10939 break; 10940 10941 case 562: 10942 10943/* Line 1806 of yacc.c */ 10944#line 4648 "ripper.y" 10945 { 10946#if 0 10947 NODE *kws = (yyvsp[(1) - (3)].val); 10948 10949 while (kws->nd_next) { 10950 kws = kws->nd_next; 10951 } 10952 kws->nd_next = (yyvsp[(3) - (3)].val); 10953 (yyval.val) = (yyvsp[(1) - (3)].val); 10954#endif 10955 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10956 10957 } 10958 break; 10959 10960 case 563: 10961 10962/* Line 1806 of yacc.c */ 10963#line 4665 "ripper.y" 10964 { 10965#if 0 10966 (yyval.val) = (yyvsp[(1) - (1)].val); 10967#endif 10968 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 10969 10970 } 10971 break; 10972 10973 case 564: 10974 10975/* Line 1806 of yacc.c */ 10976#line 4673 "ripper.y" 10977 { 10978#if 0 10979 NODE *kws = (yyvsp[(1) - (3)].val); 10980 10981 while (kws->nd_next) { 10982 kws = kws->nd_next; 10983 } 10984 kws->nd_next = (yyvsp[(3) - (3)].val); 10985 (yyval.val) = (yyvsp[(1) - (3)].val); 10986#endif 10987 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 10988 10989 } 10990 break; 10991 10992 case 567: 10993 10994/* Line 1806 of yacc.c */ 10995#line 4693 "ripper.y" 10996 { 10997 shadowing_lvar(get_id((yyvsp[(2) - (2)].val))); 10998 (yyval.val) = (yyvsp[(2) - (2)].val); 10999 } 11000 break; 11001 11002 case 568: 11003 11004/* Line 1806 of yacc.c */ 11005#line 4698 "ripper.y" 11006 { 11007 (yyval.val) = internal_id(); 11008 } 11009 break; 11010 11011 case 569: 11012 11013/* Line 1806 of yacc.c */ 11014#line 4704 "ripper.y" 11015 { 11016 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 11017 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11018#if 0 11019 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 11020#endif 11021 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 11022 11023 } 11024 break; 11025 11026 case 570: 11027 11028/* Line 1806 of yacc.c */ 11029#line 4716 "ripper.y" 11030 { 11031 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val)))); 11032 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11033#if 0 11034 (yyval.val) = NEW_OPT_ARG(0, (yyval.val)); 11035#endif 11036 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val)); 11037 11038 } 11039 break; 11040 11041 case 571: 11042 11043/* Line 1806 of yacc.c */ 11044#line 4728 "ripper.y" 11045 { 11046#if 0 11047 (yyval.val) = (yyvsp[(1) - (1)].val); 11048#endif 11049 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11050 11051 } 11052 break; 11053 11054 case 572: 11055 11056/* Line 1806 of yacc.c */ 11057#line 4736 "ripper.y" 11058 { 11059#if 0 11060 NODE *opts = (yyvsp[(1) - (3)].val); 11061 11062 while (opts->nd_next) { 11063 opts = opts->nd_next; 11064 } 11065 opts->nd_next = (yyvsp[(3) - (3)].val); 11066 (yyval.val) = (yyvsp[(1) - (3)].val); 11067#endif 11068 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11069 11070 } 11071 break; 11072 11073 case 573: 11074 11075/* Line 1806 of yacc.c */ 11076#line 4752 "ripper.y" 11077 { 11078#if 0 11079 (yyval.val) = (yyvsp[(1) - (1)].val); 11080#endif 11081 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11082 11083 } 11084 break; 11085 11086 case 574: 11087 11088/* Line 1806 of yacc.c */ 11089#line 4760 "ripper.y" 11090 { 11091#if 0 11092 NODE *opts = (yyvsp[(1) - (3)].val); 11093 11094 while (opts->nd_next) { 11095 opts = opts->nd_next; 11096 } 11097 opts->nd_next = (yyvsp[(3) - (3)].val); 11098 (yyval.val) = (yyvsp[(1) - (3)].val); 11099#endif 11100 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11101 11102 } 11103 break; 11104 11105 case 577: 11106 11107/* Line 1806 of yacc.c */ 11108#line 4780 "ripper.y" 11109 { 11110#if 0 11111 if (!is_local_id((yyvsp[(2) - (2)].val))) 11112 yyerror("rest argument must be local variable"); 11113#endif 11114 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 11115#if 0 11116 (yyval.val) = (yyvsp[(2) - (2)].val); 11117#endif 11118 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val)); 11119 11120 } 11121 break; 11122 11123 case 578: 11124 11125/* Line 1806 of yacc.c */ 11126#line 4793 "ripper.y" 11127 { 11128#if 0 11129 (yyval.val) = internal_id(); 11130 arg_var((yyval.val)); 11131#endif 11132 (yyval.val) = dispatch1(rest_param, Qnil); 11133 11134 } 11135 break; 11136 11137 case 581: 11138 11139/* Line 1806 of yacc.c */ 11140#line 4808 "ripper.y" 11141 { 11142#if 0 11143 if (!is_local_id((yyvsp[(2) - (2)].val))) 11144 yyerror("block argument must be local variable"); 11145 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val))) 11146 yyerror("duplicated block argument name"); 11147#endif 11148 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val)))); 11149#if 0 11150 (yyval.val) = (yyvsp[(2) - (2)].val); 11151#endif 11152 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val)); 11153 11154 } 11155 break; 11156 11157 case 582: 11158 11159/* Line 1806 of yacc.c */ 11160#line 4825 "ripper.y" 11161 { 11162 (yyval.val) = (yyvsp[(2) - (2)].val); 11163 } 11164 break; 11165 11166 case 583: 11167 11168/* Line 1806 of yacc.c */ 11169#line 4829 "ripper.y" 11170 { 11171#if 0 11172 (yyval.val) = 0; 11173#endif 11174 (yyval.val) = Qundef; 11175 11176 } 11177 break; 11178 11179 case 584: 11180 11181/* Line 1806 of yacc.c */ 11182#line 4839 "ripper.y" 11183 { 11184#if 0 11185 value_expr((yyvsp[(1) - (1)].val)); 11186 (yyval.val) = (yyvsp[(1) - (1)].val); 11187 if (!(yyval.val)) (yyval.val) = NEW_NIL(); 11188#endif 11189 (yyval.val) = (yyvsp[(1) - (1)].val); 11190 11191 } 11192 break; 11193 11194 case 585: 11195 11196/* Line 1806 of yacc.c */ 11197#line 4848 "ripper.y" 11198 {lex_state = EXPR_BEG;} 11199 break; 11200 11201 case 586: 11202 11203/* Line 1806 of yacc.c */ 11204#line 4849 "ripper.y" 11205 { 11206#if 0 11207 if ((yyvsp[(3) - (4)].val) == 0) { 11208 yyerror("can't define singleton method for ()."); 11209 } 11210 else { 11211 switch (nd_type((yyvsp[(3) - (4)].val))) { 11212 case NODE_STR: 11213 case NODE_DSTR: 11214 case NODE_XSTR: 11215 case NODE_DXSTR: 11216 case NODE_DREGX: 11217 case NODE_LIT: 11218 case NODE_ARRAY: 11219 case NODE_ZARRAY: 11220 yyerror("can't define singleton method for literals"); 11221 default: 11222 value_expr((yyvsp[(3) - (4)].val)); 11223 break; 11224 } 11225 } 11226 (yyval.val) = (yyvsp[(3) - (4)].val); 11227#endif 11228 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val)); 11229 11230 } 11231 break; 11232 11233 case 588: 11234 11235/* Line 1806 of yacc.c */ 11236#line 4879 "ripper.y" 11237 { 11238#if 0 11239 (yyval.val) = (yyvsp[(1) - (2)].val); 11240#endif 11241 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val)); 11242 11243 } 11244 break; 11245 11246 case 589: 11247 11248/* Line 1806 of yacc.c */ 11249#line 4891 "ripper.y" 11250 { 11251 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val)); 11252 } 11253 break; 11254 11255 case 590: 11256 11257/* Line 1806 of yacc.c */ 11258#line 4896 "ripper.y" 11259 { 11260#if 0 11261 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11262#endif 11263 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11264 11265 } 11266 break; 11267 11268 case 591: 11269 11270/* Line 1806 of yacc.c */ 11271#line 4906 "ripper.y" 11272 { 11273#if 0 11274 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val)); 11275#endif 11276 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 11277 11278 } 11279 break; 11280 11281 case 592: 11282 11283/* Line 1806 of yacc.c */ 11284#line 4914 "ripper.y" 11285 { 11286#if 0 11287 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val)); 11288#endif 11289 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val)); 11290 11291 } 11292 break; 11293 11294 case 593: 11295 11296/* Line 1806 of yacc.c */ 11297#line 4922 "ripper.y" 11298 { 11299#if 0 11300 (yyval.val) = list_append(NEW_LIST(0), (yyvsp[(2) - (2)].val)); 11301#endif 11302 (yyval.val) = dispatch1(assoc_splat, (yyvsp[(2) - (2)].val)); 11303 11304 } 11305 break; 11306 11307 case 604: 11308 11309/* Line 1806 of yacc.c */ 11310#line 4952 "ripper.y" 11311 { (yyval.val) = (yyvsp[(1) - (1)].val); } 11312 break; 11313 11314 case 605: 11315 11316/* Line 1806 of yacc.c */ 11317#line 4957 "ripper.y" 11318 { (yyval.val) = (yyvsp[(1) - (1)].val); } 11319 break; 11320 11321 case 615: 11322 11323/* Line 1806 of yacc.c */ 11324#line 4980 "ripper.y" 11325 {yyerrok;} 11326 break; 11327 11328 case 618: 11329 11330/* Line 1806 of yacc.c */ 11331#line 4985 "ripper.y" 11332 {yyerrok;} 11333 break; 11334 11335 case 619: 11336 11337/* Line 1806 of yacc.c */ 11338#line 4989 "ripper.y" 11339 { 11340#if 0 11341 (yyval.val) = 0; 11342#endif 11343 (yyval.val) = Qundef; 11344 11345 } 11346 break; 11347 11348 11349 11350/* Line 1806 of yacc.c */ 11351#line 11348 "parse.c" 11352 default: break; 11353 } 11354 /* User semantic actions sometimes alter yychar, and that requires 11355 that yytoken be updated with the new translation. We take the 11356 approach of translating immediately before every use of yytoken. 11357 One alternative is translating here after every semantic action, 11358 but that translation would be missed if the semantic action invokes 11359 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 11360 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 11361 incorrect destructor might then be invoked immediately. In the 11362 case of YYERROR or YYBACKUP, subsequent parser actions might lead 11363 to an incorrect destructor call or verbose syntax error message 11364 before the lookahead is translated. */ 11365 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 11366 11367 YYPOPSTACK (yylen); 11368 yylen = 0; 11369 YY_STACK_PRINT (yyss, yyssp); 11370 11371 *++yyvsp = yyval; 11372 11373 /* Now `shift' the result of the reduction. Determine what state 11374 that goes to, based on the state we popped back to and the rule 11375 number reduced by. */ 11376 11377 yyn = yyr1[yyn]; 11378 11379 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 11380 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 11381 yystate = yytable[yystate]; 11382 else 11383 yystate = yydefgoto[yyn - YYNTOKENS]; 11384 11385 goto yynewstate; 11386 11387 11388/*------------------------------------. 11389| yyerrlab -- here on detecting error | 11390`------------------------------------*/ 11391yyerrlab: 11392 /* Make sure we have latest lookahead translation. See comments at 11393 user semantic actions for why this is necessary. */ 11394 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 11395 11396 /* If not already recovering from an error, report this error. */ 11397 if (!yyerrstatus) 11398 { 11399 ++yynerrs; 11400#if ! YYERROR_VERBOSE 11401 parser_yyerror (parser, YY_("syntax error")); 11402#else 11403# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 11404 yyssp, yytoken) 11405 { 11406 char const *yymsgp = YY_("syntax error"); 11407 int yysyntax_error_status; 11408 yysyntax_error_status = YYSYNTAX_ERROR; 11409 if (yysyntax_error_status == 0) 11410 yymsgp = yymsg; 11411 else if (yysyntax_error_status == 1) 11412 { 11413 if (yymsg != yymsgbuf) 11414 YYSTACK_FREE (yymsg); 11415 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 11416 if (!yymsg) 11417 { 11418 yymsg = yymsgbuf; 11419 yymsg_alloc = sizeof yymsgbuf; 11420 yysyntax_error_status = 2; 11421 } 11422 else 11423 { 11424 yysyntax_error_status = YYSYNTAX_ERROR; 11425 yymsgp = yymsg; 11426 } 11427 } 11428 parser_yyerror (parser, yymsgp); 11429 if (yysyntax_error_status == 2) 11430 goto yyexhaustedlab; 11431 } 11432# undef YYSYNTAX_ERROR 11433#endif 11434 } 11435 11436 11437 11438 if (yyerrstatus == 3) 11439 { 11440 /* If just tried and failed to reuse lookahead token after an 11441 error, discard it. */ 11442 11443 if (yychar <= YYEOF) 11444 { 11445 /* Return failure if at end of input. */ 11446 if (yychar == YYEOF) 11447 YYABORT; 11448 } 11449 else 11450 { 11451 yydestruct ("Error: discarding", 11452 yytoken, &yylval, parser); 11453 yychar = YYEMPTY; 11454 } 11455 } 11456 11457 /* Else will try to reuse lookahead token after shifting the error 11458 token. */ 11459 goto yyerrlab1; 11460 11461 11462/*---------------------------------------------------. 11463| yyerrorlab -- error raised explicitly by YYERROR. | 11464`---------------------------------------------------*/ 11465yyerrorlab: 11466 11467 /* Pacify compilers like GCC when the user code never invokes 11468 YYERROR and the label yyerrorlab therefore never appears in user 11469 code. */ 11470 if (/*CONSTCOND*/ 0) 11471 goto yyerrorlab; 11472 11473 /* Do not reclaim the symbols of the rule which action triggered 11474 this YYERROR. */ 11475 YYPOPSTACK (yylen); 11476 yylen = 0; 11477 YY_STACK_PRINT (yyss, yyssp); 11478 yystate = *yyssp; 11479 goto yyerrlab1; 11480 11481 11482/*-------------------------------------------------------------. 11483| yyerrlab1 -- common code for both syntax error and YYERROR. | 11484`-------------------------------------------------------------*/ 11485yyerrlab1: 11486 yyerrstatus = 3; /* Each real token shifted decrements this. */ 11487 11488 for (;;) 11489 { 11490 yyn = yypact[yystate]; 11491 if (!yypact_value_is_default (yyn)) 11492 { 11493 yyn += YYTERROR; 11494 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 11495 { 11496 yyn = yytable[yyn]; 11497 if (0 < yyn) 11498 break; 11499 } 11500 } 11501 11502 /* Pop the current state because it cannot handle the error token. */ 11503 if (yyssp == yyss) 11504 YYABORT; 11505 11506 11507 yydestruct ("Error: popping", 11508 yystos[yystate], yyvsp, parser); 11509 YYPOPSTACK (1); 11510 yystate = *yyssp; 11511 YY_STACK_PRINT (yyss, yyssp); 11512 } 11513 11514 *++yyvsp = yylval; 11515 11516 11517 /* Shift the error token. */ 11518 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 11519 11520 yystate = yyn; 11521 goto yynewstate; 11522 11523 11524/*-------------------------------------. 11525| yyacceptlab -- YYACCEPT comes here. | 11526`-------------------------------------*/ 11527yyacceptlab: 11528 yyresult = 0; 11529 goto yyreturn; 11530 11531/*-----------------------------------. 11532| yyabortlab -- YYABORT comes here. | 11533`-----------------------------------*/ 11534yyabortlab: 11535 yyresult = 1; 11536 goto yyreturn; 11537 11538#if !defined(yyoverflow) || YYERROR_VERBOSE 11539/*-------------------------------------------------. 11540| yyexhaustedlab -- memory exhaustion comes here. | 11541`-------------------------------------------------*/ 11542yyexhaustedlab: 11543 parser_yyerror (parser, YY_("memory exhausted")); 11544 yyresult = 2; 11545 /* Fall through. */ 11546#endif 11547 11548yyreturn: 11549 if (yychar != YYEMPTY) 11550 { 11551 /* Make sure we have latest lookahead translation. See comments at 11552 user semantic actions for why this is necessary. */ 11553 yytoken = YYTRANSLATE (yychar); 11554 yydestruct ("Cleanup: discarding lookahead", 11555 yytoken, &yylval, parser); 11556 } 11557 /* Do not reclaim the symbols of the rule which action triggered 11558 this YYABORT or YYACCEPT. */ 11559 YYPOPSTACK (yylen); 11560 YY_STACK_PRINT (yyss, yyssp); 11561 while (yyssp != yyss) 11562 { 11563 yydestruct ("Cleanup: popping", 11564 yystos[*yyssp], yyvsp, parser); 11565 YYPOPSTACK (1); 11566 } 11567#ifndef yyoverflow 11568 if (yyss != yyssa) 11569 YYSTACK_FREE (yyss); 11570#endif 11571#if YYERROR_VERBOSE 11572 if (yymsg != yymsgbuf) 11573 YYSTACK_FREE (yymsg); 11574#endif 11575 /* Make sure YYID is used. */ 11576 return YYID (yyresult); 11577} 11578 11579 11580 11581/* Line 2067 of yacc.c */ 11582#line 4997 "ripper.y" 11583 11584# undef parser 11585# undef yylex 11586# undef yylval 11587# define yylval (*((YYSTYPE*)(parser->parser_yylval))) 11588 11589static int parser_regx_options(struct parser_params*); 11590static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**); 11591static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc); 11592static int parser_parse_string(struct parser_params*,NODE*); 11593static int parser_here_document(struct parser_params*,NODE*); 11594 11595 11596# define nextc() parser_nextc(parser) 11597# define pushback(c) parser_pushback(parser, (c)) 11598# define newtok() parser_newtok(parser) 11599# define tokspace(n) parser_tokspace(parser, (n)) 11600# define tokadd(c) parser_tokadd(parser, (c)) 11601# define tok_hex(numlen) parser_tok_hex(parser, (numlen)) 11602# define read_escape(flags,e) parser_read_escape(parser, (flags), (e)) 11603# define tokadd_escape(e) parser_tokadd_escape(parser, (e)) 11604# define regx_options() parser_regx_options(parser) 11605# define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e)) 11606# define parse_string(n) parser_parse_string(parser,(n)) 11607# define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc)) 11608# define here_document(n) parser_here_document(parser,(n)) 11609# define heredoc_identifier() parser_heredoc_identifier(parser) 11610# define heredoc_restore(n) parser_heredoc_restore(parser,(n)) 11611# define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i)) 11612 11613#ifndef RIPPER 11614# define set_yylval_str(x) (yylval.node = NEW_STR(x)) 11615# define set_yylval_num(x) (yylval.num = (x)) 11616# define set_yylval_id(x) (yylval.id = (x)) 11617# define set_yylval_name(x) (yylval.id = (x)) 11618# define set_yylval_literal(x) (yylval.node = NEW_LIT(x)) 11619# define set_yylval_node(x) (yylval.node = (x)) 11620# define yylval_id() (yylval.id) 11621#else 11622static inline VALUE 11623ripper_yylval_id(ID x) 11624{ 11625 return (VALUE)NEW_LASGN(x, ID2SYM(x)); 11626} 11627# define set_yylval_str(x) (void)(x) 11628# define set_yylval_num(x) (void)(x) 11629# define set_yylval_id(x) (void)(x) 11630# define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) 11631# define set_yylval_literal(x) (void)(x) 11632# define set_yylval_node(x) (void)(x) 11633# define yylval_id() yylval.id 11634#endif 11635 11636#ifndef RIPPER 11637#define ripper_flush(p) (void)(p) 11638#else 11639#define ripper_flush(p) ((p)->tokp = (p)->parser_lex_p) 11640 11641#define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)) 11642 11643static int 11644ripper_has_scan_event(struct parser_params *parser) 11645{ 11646 11647 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp"); 11648 return lex_p > parser->tokp; 11649} 11650 11651static VALUE 11652ripper_scan_event_val(struct parser_params *parser, int t) 11653{ 11654 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp); 11655 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str); 11656 ripper_flush(parser); 11657 return rval; 11658} 11659 11660static void 11661ripper_dispatch_scan_event(struct parser_params *parser, int t) 11662{ 11663 if (!ripper_has_scan_event(parser)) return; 11664 yylval_rval = ripper_scan_event_val(parser, t); 11665} 11666 11667static void 11668ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t) 11669{ 11670 if (!ripper_has_scan_event(parser)) return; 11671 (void)ripper_scan_event_val(parser, t); 11672} 11673 11674static void 11675ripper_dispatch_delayed_token(struct parser_params *parser, int t) 11676{ 11677 int saved_line = ruby_sourceline; 11678 const char *saved_tokp = parser->tokp; 11679 11680 ruby_sourceline = parser->delayed_line; 11681 parser->tokp = lex_pbeg + parser->delayed_col; 11682 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed); 11683 parser->delayed = Qnil; 11684 ruby_sourceline = saved_line; 11685 parser->tokp = saved_tokp; 11686} 11687#endif /* RIPPER */ 11688 11689#include "ruby/regex.h" 11690#include "ruby/util.h" 11691 11692/* We remove any previous definition of `SIGN_EXTEND_CHAR', 11693 since ours (we hope) works properly with all combinations of 11694 machines, compilers, `char' and `unsigned char' argument types. 11695 (Per Bothner suggested the basic approach.) */ 11696#undef SIGN_EXTEND_CHAR 11697#if __STDC__ 11698# define SIGN_EXTEND_CHAR(c) ((signed char)(c)) 11699#else /* not __STDC__ */ 11700/* As in Harbison and Steele. */ 11701# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128) 11702#endif 11703 11704#define parser_encoding_name() (current_enc->name) 11705#define parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc) 11706#define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,current_enc) 11707#define is_identchar(p,e,enc) (rb_enc_isalnum(*(p),(enc)) || (*(p)) == '_' || !ISASCII(*(p))) 11708#define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc)) 11709 11710#define parser_isascii() ISASCII(*(lex_p-1)) 11711 11712#ifndef RIPPER 11713static int 11714token_info_get_column(struct parser_params *parser, const char *token) 11715{ 11716 int column = 1; 11717 const char *p, *pend = lex_p - strlen(token); 11718 for (p = lex_pbeg; p < pend; p++) { 11719 if (*p == '\t') { 11720 column = (((column - 1) / 8) + 1) * 8; 11721 } 11722 column++; 11723 } 11724 return column; 11725} 11726 11727static int 11728token_info_has_nonspaces(struct parser_params *parser, const char *token) 11729{ 11730 const char *p, *pend = lex_p - strlen(token); 11731 for (p = lex_pbeg; p < pend; p++) { 11732 if (*p != ' ' && *p != '\t') { 11733 return 1; 11734 } 11735 } 11736 return 0; 11737} 11738 11739#undef token_info_push 11740static void 11741token_info_push(struct parser_params *parser, const char *token) 11742{ 11743 token_info *ptinfo; 11744 11745 if (!parser->parser_token_info_enabled) return; 11746 ptinfo = ALLOC(token_info); 11747 ptinfo->token = token; 11748 ptinfo->linenum = ruby_sourceline; 11749 ptinfo->column = token_info_get_column(parser, token); 11750 ptinfo->nonspc = token_info_has_nonspaces(parser, token); 11751 ptinfo->next = parser->parser_token_info; 11752 11753 parser->parser_token_info = ptinfo; 11754} 11755 11756#undef token_info_pop 11757static void 11758token_info_pop(struct parser_params *parser, const char *token) 11759{ 11760 int linenum; 11761 token_info *ptinfo = parser->parser_token_info; 11762 11763 if (!ptinfo) return; 11764 parser->parser_token_info = ptinfo->next; 11765 if (token_info_get_column(parser, token) == ptinfo->column) { /* OK */ 11766 goto finish; 11767 } 11768 linenum = ruby_sourceline; 11769 if (linenum == ptinfo->linenum) { /* SKIP */ 11770 goto finish; 11771 } 11772 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /* SKIP */ 11773 goto finish; 11774 } 11775 if (parser->parser_token_info_enabled) { 11776 rb_compile_warn(ruby_sourcefile, linenum, 11777 "mismatched indentations at '%s' with '%s' at %d", 11778 token, ptinfo->token, ptinfo->linenum); 11779 } 11780 11781 finish: 11782 xfree(ptinfo); 11783} 11784#endif /* RIPPER */ 11785 11786static int 11787parser_yyerror(struct parser_params *parser, const char *msg) 11788{ 11789#ifndef RIPPER 11790 const int max_line_margin = 30; 11791 const char *p, *pe; 11792 char *buf; 11793 long len; 11794 int i; 11795 11796 compile_error(PARSER_ARG "%s", msg); 11797 p = lex_p; 11798 while (lex_pbeg <= p) { 11799 if (*p == '\n') break; 11800 p--; 11801 } 11802 p++; 11803 11804 pe = lex_p; 11805 while (pe < lex_pend) { 11806 if (*pe == '\n') break; 11807 pe++; 11808 } 11809 11810 len = pe - p; 11811 if (len > 4) { 11812 char *p2; 11813 const char *pre = "", *post = ""; 11814 11815 if (len > max_line_margin * 2 + 10) { 11816 if (lex_p - p > max_line_margin) { 11817 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline)); 11818 pre = "..."; 11819 } 11820 if (pe - lex_p > max_line_margin) { 11821 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline)); 11822 post = "..."; 11823 } 11824 len = pe - p; 11825 } 11826 buf = ALLOCA_N(char, len+2); 11827 MEMCPY(buf, p, char, len); 11828 buf[len] = '\0'; 11829 rb_compile_error_append("%s%s%s", pre, buf, post); 11830 11831 i = (int)(lex_p - p); 11832 p2 = buf; pe = buf + len; 11833 11834 while (p2 < pe) { 11835 if (*p2 != '\t') *p2 = ' '; 11836 p2++; 11837 } 11838 buf[i] = '^'; 11839 buf[i+1] = '\0'; 11840 rb_compile_error_append("%s%s", pre, buf); 11841 } 11842#else 11843 dispatch1(parse_error, STR_NEW2(msg)); 11844#endif /* !RIPPER */ 11845 return 0; 11846} 11847 11848static void parser_prepare(struct parser_params *parser); 11849 11850#ifndef RIPPER 11851static VALUE 11852debug_lines(VALUE fname) 11853{ 11854 ID script_lines; 11855 CONST_ID(script_lines, "SCRIPT_LINES__"); 11856 if (rb_const_defined_at(rb_cObject, script_lines)) { 11857 VALUE hash = rb_const_get_at(rb_cObject, script_lines); 11858 if (RB_TYPE_P(hash, T_HASH)) { 11859 VALUE lines = rb_ary_new(); 11860 rb_hash_aset(hash, fname, lines); 11861 return lines; 11862 } 11863 } 11864 return 0; 11865} 11866 11867static VALUE 11868coverage(VALUE fname, int n) 11869{ 11870 VALUE coverages = rb_get_coverages(); 11871 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) { 11872 VALUE lines = rb_ary_new2(n); 11873 int i; 11874 RBASIC(lines)->klass = 0; 11875 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil; 11876 RARRAY(lines)->as.heap.len = n; 11877 rb_hash_aset(coverages, fname, lines); 11878 return lines; 11879 } 11880 return 0; 11881} 11882 11883static int 11884e_option_supplied(struct parser_params *parser) 11885{ 11886 return strcmp(ruby_sourcefile, "-e") == 0; 11887} 11888 11889static VALUE 11890yycompile0(VALUE arg) 11891{ 11892 int n; 11893 NODE *tree; 11894 struct parser_params *parser = (struct parser_params *)arg; 11895 11896 if (!compile_for_eval && rb_safe_level() == 0) { 11897 ruby_debug_lines = debug_lines(ruby_sourcefile_string); 11898 if (ruby_debug_lines && ruby_sourceline > 0) { 11899 VALUE str = STR_NEW0(); 11900 n = ruby_sourceline; 11901 do { 11902 rb_ary_push(ruby_debug_lines, str); 11903 } while (--n); 11904 } 11905 11906 if (!e_option_supplied(parser)) { 11907 ruby_coverage = coverage(ruby_sourcefile_string, ruby_sourceline); 11908 } 11909 } 11910 11911 parser_prepare(parser); 11912 deferred_nodes = 0; 11913#ifndef RIPPER 11914 parser->parser_token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); 11915#endif 11916#ifndef RIPPER 11917 if (RUBY_DTRACE_PARSE_BEGIN_ENABLED()) { 11918 RUBY_DTRACE_PARSE_BEGIN(parser->parser_ruby_sourcefile, 11919 parser->parser_ruby_sourceline); 11920 } 11921#endif 11922 n = yyparse((void*)parser); 11923#ifndef RIPPER 11924 if (RUBY_DTRACE_PARSE_END_ENABLED()) { 11925 RUBY_DTRACE_PARSE_END(parser->parser_ruby_sourcefile, 11926 parser->parser_ruby_sourceline); 11927 } 11928#endif 11929 ruby_debug_lines = 0; 11930 ruby_coverage = 0; 11931 compile_for_eval = 0; 11932 11933 lex_strterm = 0; 11934 lex_p = lex_pbeg = lex_pend = 0; 11935 lex_lastline = lex_nextline = 0; 11936 if (parser->nerr) { 11937 return 0; 11938 } 11939 tree = ruby_eval_tree; 11940 if (!tree) { 11941 tree = NEW_NIL(); 11942 } 11943 else if (ruby_eval_tree_begin) { 11944 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body); 11945 } 11946 return (VALUE)tree; 11947} 11948 11949static NODE* 11950yycompile(struct parser_params *parser, VALUE fname, int line) 11951{ 11952 ruby_sourcefile_string = rb_str_new_frozen(fname); 11953 ruby_sourcefile = RSTRING_PTR(fname); 11954 ruby_sourceline = line - 1; 11955 return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser); 11956} 11957#endif /* !RIPPER */ 11958 11959static rb_encoding * 11960must_be_ascii_compatible(VALUE s) 11961{ 11962 rb_encoding *enc = rb_enc_get(s); 11963 if (!rb_enc_asciicompat(enc)) { 11964 rb_raise(rb_eArgError, "invalid source encoding"); 11965 } 11966 return enc; 11967} 11968 11969static VALUE 11970lex_get_str(struct parser_params *parser, VALUE s) 11971{ 11972 char *beg, *end, *pend; 11973 rb_encoding *enc = must_be_ascii_compatible(s); 11974 11975 beg = RSTRING_PTR(s); 11976 if (lex_gets_ptr) { 11977 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil; 11978 beg += lex_gets_ptr; 11979 } 11980 pend = RSTRING_PTR(s) + RSTRING_LEN(s); 11981 end = beg; 11982 while (end < pend) { 11983 if (*end++ == '\n') break; 11984 } 11985 lex_gets_ptr = end - RSTRING_PTR(s); 11986 return rb_enc_str_new(beg, end - beg, enc); 11987} 11988 11989static VALUE 11990lex_getline(struct parser_params *parser) 11991{ 11992 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input); 11993 if (NIL_P(line)) return line; 11994 must_be_ascii_compatible(line); 11995#ifndef RIPPER 11996 if (ruby_debug_lines) { 11997 rb_enc_associate(line, current_enc); 11998 rb_ary_push(ruby_debug_lines, line); 11999 } 12000 if (ruby_coverage) { 12001 rb_ary_push(ruby_coverage, Qnil); 12002 } 12003#endif 12004 return line; 12005} 12006 12007#ifdef RIPPER 12008static rb_data_type_t parser_data_type; 12009#else 12010static const rb_data_type_t parser_data_type; 12011 12012static NODE* 12013parser_compile_string(volatile VALUE vparser, VALUE fname, VALUE s, int line) 12014{ 12015 struct parser_params *parser; 12016 NODE *node; 12017 12018 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12019 lex_gets = lex_get_str; 12020 lex_gets_ptr = 0; 12021 lex_input = s; 12022 lex_pbeg = lex_p = lex_pend = 0; 12023 compile_for_eval = rb_parse_in_eval(); 12024 12025 node = yycompile(parser, fname, line); 12026 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12027 12028 return node; 12029} 12030 12031NODE* 12032rb_compile_string(const char *f, VALUE s, int line) 12033{ 12034 must_be_ascii_compatible(s); 12035 return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line); 12036} 12037 12038NODE* 12039rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) 12040{ 12041 return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line); 12042} 12043 12044NODE* 12045rb_parser_compile_string_path(volatile VALUE vparser, VALUE f, VALUE s, int line) 12046{ 12047 must_be_ascii_compatible(s); 12048 return parser_compile_string(vparser, f, s, line); 12049} 12050 12051NODE* 12052rb_compile_cstr(const char *f, const char *s, int len, int line) 12053{ 12054 VALUE str = rb_str_new(s, len); 12055 return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line); 12056} 12057 12058NODE* 12059rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) 12060{ 12061 VALUE str = rb_str_new(s, len); 12062 return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line); 12063} 12064 12065static VALUE 12066lex_io_gets(struct parser_params *parser, VALUE io) 12067{ 12068 return rb_io_gets(io); 12069} 12070 12071NODE* 12072rb_compile_file(const char *f, VALUE file, int start) 12073{ 12074 VALUE volatile vparser = rb_parser_new(); 12075 12076 return rb_parser_compile_file(vparser, f, file, start); 12077} 12078 12079NODE* 12080rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) 12081{ 12082 return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start); 12083} 12084 12085NODE* 12086rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE file, int start) 12087{ 12088 struct parser_params *parser; 12089 NODE *node; 12090 12091 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 12092 lex_gets = lex_io_gets; 12093 lex_input = file; 12094 lex_pbeg = lex_p = lex_pend = 0; 12095 compile_for_eval = rb_parse_in_eval(); 12096 12097 node = yycompile(parser, fname, start); 12098 RB_GC_GUARD(vparser); /* prohibit tail call optimization */ 12099 12100 return node; 12101} 12102#endif /* !RIPPER */ 12103 12104#define STR_FUNC_ESCAPE 0x01 12105#define STR_FUNC_EXPAND 0x02 12106#define STR_FUNC_REGEXP 0x04 12107#define STR_FUNC_QWORDS 0x08 12108#define STR_FUNC_SYMBOL 0x10 12109#define STR_FUNC_INDENT 0x20 12110 12111enum string_type { 12112 str_squote = (0), 12113 str_dquote = (STR_FUNC_EXPAND), 12114 str_xquote = (STR_FUNC_EXPAND), 12115 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND), 12116 str_sword = (STR_FUNC_QWORDS), 12117 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND), 12118 str_ssym = (STR_FUNC_SYMBOL), 12119 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND) 12120}; 12121 12122static VALUE 12123parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0) 12124{ 12125 VALUE str; 12126 12127 str = rb_enc_str_new(p, n, enc); 12128 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) { 12129 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) { 12130 } 12131 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) { 12132 rb_enc_associate(str, rb_ascii8bit_encoding()); 12133 } 12134 } 12135 12136 return str; 12137} 12138 12139#define lex_goto_eol(parser) ((parser)->parser_lex_p = (parser)->parser_lex_pend) 12140#define lex_eol_p() (lex_p >= lex_pend) 12141#define peek(c) peek_n((c), 0) 12142#define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n]) 12143 12144static inline int 12145parser_nextc(struct parser_params *parser) 12146{ 12147 int c; 12148 12149 if (lex_p == lex_pend) { 12150 VALUE v = lex_nextline; 12151 lex_nextline = 0; 12152 if (!v) { 12153 if (parser->eofp) 12154 return -1; 12155 12156 if (!lex_input || NIL_P(v = lex_getline(parser))) { 12157 parser->eofp = Qtrue; 12158 lex_goto_eol(parser); 12159 return -1; 12160 } 12161 } 12162 { 12163#ifdef RIPPER 12164 if (parser->tokp < lex_pend) { 12165 if (NIL_P(parser->delayed)) { 12166 parser->delayed = rb_str_buf_new(1024); 12167 rb_enc_associate(parser->delayed, current_enc); 12168 rb_str_buf_cat(parser->delayed, 12169 parser->tokp, lex_pend - parser->tokp); 12170 parser->delayed_line = ruby_sourceline; 12171 parser->delayed_col = (int)(parser->tokp - lex_pbeg); 12172 } 12173 else { 12174 rb_str_buf_cat(parser->delayed, 12175 parser->tokp, lex_pend - parser->tokp); 12176 } 12177 } 12178#endif 12179 if (heredoc_end > 0) { 12180 ruby_sourceline = heredoc_end; 12181 heredoc_end = 0; 12182 } 12183 ruby_sourceline++; 12184 parser->line_count++; 12185 lex_pbeg = lex_p = RSTRING_PTR(v); 12186 lex_pend = lex_p + RSTRING_LEN(v); 12187 ripper_flush(parser); 12188 lex_lastline = v; 12189 } 12190 } 12191 c = (unsigned char)*lex_p++; 12192 if (c == '\r' && peek('\n')) { 12193 lex_p++; 12194 c = '\n'; 12195 } 12196 12197 return c; 12198} 12199 12200static void 12201parser_pushback(struct parser_params *parser, int c) 12202{ 12203 if (c == -1) return; 12204 lex_p--; 12205 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') { 12206 lex_p--; 12207 } 12208} 12209 12210#define was_bol() (lex_p == lex_pbeg + 1) 12211 12212#define tokfix() (tokenbuf[tokidx]='\0') 12213#define tok() tokenbuf 12214#define toklen() tokidx 12215#define toklast() (tokidx>0?tokenbuf[tokidx-1]:0) 12216 12217static char* 12218parser_newtok(struct parser_params *parser) 12219{ 12220 tokidx = 0; 12221 tokline = ruby_sourceline; 12222 if (!tokenbuf) { 12223 toksiz = 60; 12224 tokenbuf = ALLOC_N(char, 60); 12225 } 12226 if (toksiz > 4096) { 12227 toksiz = 60; 12228 REALLOC_N(tokenbuf, char, 60); 12229 } 12230 return tokenbuf; 12231} 12232 12233static char * 12234parser_tokspace(struct parser_params *parser, int n) 12235{ 12236 tokidx += n; 12237 12238 if (tokidx >= toksiz) { 12239 do {toksiz *= 2;} while (toksiz < tokidx); 12240 REALLOC_N(tokenbuf, char, toksiz); 12241 } 12242 return &tokenbuf[tokidx-n]; 12243} 12244 12245static void 12246parser_tokadd(struct parser_params *parser, int c) 12247{ 12248 tokenbuf[tokidx++] = (char)c; 12249 if (tokidx >= toksiz) { 12250 toksiz *= 2; 12251 REALLOC_N(tokenbuf, char, toksiz); 12252 } 12253} 12254 12255static int 12256parser_tok_hex(struct parser_params *parser, size_t *numlen) 12257{ 12258 int c; 12259 12260 c = scan_hex(lex_p, 2, numlen); 12261 if (!*numlen) { 12262 yyerror("invalid hex escape"); 12263 return 0; 12264 } 12265 lex_p += *numlen; 12266 return c; 12267} 12268 12269#define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n)) 12270 12271/* return value is for ?\u3042 */ 12272static int 12273parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, 12274 int string_literal, int symbol_literal, int regexp_literal) 12275{ 12276 /* 12277 * If string_literal is true, then we allow multiple codepoints 12278 * in \u{}, and add the codepoints to the current token. 12279 * Otherwise we're parsing a character literal and return a single 12280 * codepoint without adding it 12281 */ 12282 12283 int codepoint; 12284 size_t numlen; 12285 12286 if (regexp_literal) { tokadd('\\'); tokadd('u'); } 12287 12288 if (peek('{')) { /* handle \u{...} form */ 12289 do { 12290 if (regexp_literal) { tokadd(*lex_p); } 12291 nextc(); 12292 codepoint = scan_hex(lex_p, 6, &numlen); 12293 if (numlen == 0) { 12294 yyerror("invalid Unicode escape"); 12295 return 0; 12296 } 12297 if (codepoint > 0x10ffff) { 12298 yyerror("invalid Unicode codepoint (too large)"); 12299 return 0; 12300 } 12301 lex_p += numlen; 12302 if (regexp_literal) { 12303 tokcopy((int)numlen); 12304 } 12305 else if (codepoint >= 0x80) { 12306 *encp = rb_utf8_encoding(); 12307 if (string_literal) tokaddmbc(codepoint, *encp); 12308 } 12309 else if (string_literal) { 12310 tokadd(codepoint); 12311 } 12312 } while (string_literal && (peek(' ') || peek('\t'))); 12313 12314 if (!peek('}')) { 12315 yyerror("unterminated Unicode escape"); 12316 return 0; 12317 } 12318 12319 if (regexp_literal) { tokadd('}'); } 12320 nextc(); 12321 } 12322 else { /* handle \uxxxx form */ 12323 codepoint = scan_hex(lex_p, 4, &numlen); 12324 if (numlen < 4) { 12325 yyerror("invalid Unicode escape"); 12326 return 0; 12327 } 12328 lex_p += 4; 12329 if (regexp_literal) { 12330 tokcopy(4); 12331 } 12332 else if (codepoint >= 0x80) { 12333 *encp = rb_utf8_encoding(); 12334 if (string_literal) tokaddmbc(codepoint, *encp); 12335 } 12336 else if (string_literal) { 12337 tokadd(codepoint); 12338 } 12339 } 12340 12341 return codepoint; 12342} 12343 12344#define ESCAPE_CONTROL 1 12345#define ESCAPE_META 2 12346 12347static int 12348parser_read_escape(struct parser_params *parser, int flags, 12349 rb_encoding **encp) 12350{ 12351 int c; 12352 size_t numlen; 12353 12354 switch (c = nextc()) { 12355 case '\\': /* Backslash */ 12356 return c; 12357 12358 case 'n': /* newline */ 12359 return '\n'; 12360 12361 case 't': /* horizontal tab */ 12362 return '\t'; 12363 12364 case 'r': /* carriage-return */ 12365 return '\r'; 12366 12367 case 'f': /* form-feed */ 12368 return '\f'; 12369 12370 case 'v': /* vertical tab */ 12371 return '\13'; 12372 12373 case 'a': /* alarm(bell) */ 12374 return '\007'; 12375 12376 case 'e': /* escape */ 12377 return 033; 12378 12379 case '0': case '1': case '2': case '3': /* octal constant */ 12380 case '4': case '5': case '6': case '7': 12381 pushback(c); 12382 c = scan_oct(lex_p, 3, &numlen); 12383 lex_p += numlen; 12384 return c; 12385 12386 case 'x': /* hex constant */ 12387 c = tok_hex(&numlen); 12388 if (numlen == 0) return 0; 12389 return c; 12390 12391 case 'b': /* backspace */ 12392 return '\010'; 12393 12394 case 's': /* space */ 12395 return ' '; 12396 12397 case 'M': 12398 if (flags & ESCAPE_META) goto eof; 12399 if ((c = nextc()) != '-') { 12400 pushback(c); 12401 goto eof; 12402 } 12403 if ((c = nextc()) == '\\') { 12404 if (peek('u')) goto eof; 12405 return read_escape(flags|ESCAPE_META, encp) | 0x80; 12406 } 12407 else if (c == -1 || !ISASCII(c)) goto eof; 12408 else { 12409 return ((c & 0xff) | 0x80); 12410 } 12411 12412 case 'C': 12413 if ((c = nextc()) != '-') { 12414 pushback(c); 12415 goto eof; 12416 } 12417 case 'c': 12418 if (flags & ESCAPE_CONTROL) goto eof; 12419 if ((c = nextc())== '\\') { 12420 if (peek('u')) goto eof; 12421 c = read_escape(flags|ESCAPE_CONTROL, encp); 12422 } 12423 else if (c == '?') 12424 return 0177; 12425 else if (c == -1 || !ISASCII(c)) goto eof; 12426 return c & 0x9f; 12427 12428 eof: 12429 case -1: 12430 yyerror("Invalid escape character syntax"); 12431 return '\0'; 12432 12433 default: 12434 return c; 12435 } 12436} 12437 12438static void 12439parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc) 12440{ 12441 int len = rb_enc_codelen(c, enc); 12442 rb_enc_mbcput(c, tokspace(len), enc); 12443} 12444 12445static int 12446parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp) 12447{ 12448 int c; 12449 int flags = 0; 12450 size_t numlen; 12451 12452 first: 12453 switch (c = nextc()) { 12454 case '\n': 12455 return 0; /* just ignore */ 12456 12457 case '0': case '1': case '2': case '3': /* octal constant */ 12458 case '4': case '5': case '6': case '7': 12459 { 12460 ruby_scan_oct(--lex_p, 3, &numlen); 12461 if (numlen == 0) goto eof; 12462 lex_p += numlen; 12463 tokcopy((int)numlen + 1); 12464 } 12465 return 0; 12466 12467 case 'x': /* hex constant */ 12468 { 12469 tok_hex(&numlen); 12470 if (numlen == 0) return -1; 12471 tokcopy((int)numlen + 2); 12472 } 12473 return 0; 12474 12475 case 'M': 12476 if (flags & ESCAPE_META) goto eof; 12477 if ((c = nextc()) != '-') { 12478 pushback(c); 12479 goto eof; 12480 } 12481 tokcopy(3); 12482 flags |= ESCAPE_META; 12483 goto escaped; 12484 12485 case 'C': 12486 if (flags & ESCAPE_CONTROL) goto eof; 12487 if ((c = nextc()) != '-') { 12488 pushback(c); 12489 goto eof; 12490 } 12491 tokcopy(3); 12492 goto escaped; 12493 12494 case 'c': 12495 if (flags & ESCAPE_CONTROL) goto eof; 12496 tokcopy(2); 12497 flags |= ESCAPE_CONTROL; 12498 escaped: 12499 if ((c = nextc()) == '\\') { 12500 goto first; 12501 } 12502 else if (c == -1) goto eof; 12503 tokadd(c); 12504 return 0; 12505 12506 eof: 12507 case -1: 12508 yyerror("Invalid escape character syntax"); 12509 return -1; 12510 12511 default: 12512 tokadd('\\'); 12513 tokadd(c); 12514 } 12515 return 0; 12516} 12517 12518static int 12519parser_regx_options(struct parser_params *parser) 12520{ 12521 int kcode = 0; 12522 int kopt = 0; 12523 int options = 0; 12524 int c, opt, kc; 12525 12526 newtok(); 12527 while (c = nextc(), ISALPHA(c)) { 12528 if (c == 'o') { 12529 options |= RE_OPTION_ONCE; 12530 } 12531 else if (rb_char_to_option_kcode(c, &opt, &kc)) { 12532 if (kc >= 0) { 12533 if (kc != rb_ascii8bit_encindex()) kcode = c; 12534 kopt = opt; 12535 } 12536 else { 12537 options |= opt; 12538 } 12539 } 12540 else { 12541 tokadd(c); 12542 } 12543 } 12544 options |= kopt; 12545 pushback(c); 12546 if (toklen()) { 12547 tokfix(); 12548 compile_error(PARSER_ARG "unknown regexp option%s - %s", 12549 toklen() > 1 ? "s" : "", tok()); 12550 } 12551 return options | RE_OPTION_ENCODING(kcode); 12552} 12553 12554static void 12555dispose_string(VALUE str) 12556{ 12557 rb_str_free(str); 12558 rb_gc_force_recycle(str); 12559} 12560 12561static int 12562parser_tokadd_mbchar(struct parser_params *parser, int c) 12563{ 12564 int len = parser_precise_mbclen(); 12565 if (!MBCLEN_CHARFOUND_P(len)) { 12566 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name()); 12567 return -1; 12568 } 12569 tokadd(c); 12570 lex_p += --len; 12571 if (len > 0) tokcopy(len); 12572 return c; 12573} 12574 12575#define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c)) 12576 12577static inline int 12578simple_re_meta(int c) 12579{ 12580 switch (c) { 12581 case '$': case '*': case '+': case '.': 12582 case '?': case '^': case '|': 12583 case ')': case ']': case '}': case '>': 12584 return TRUE; 12585 default: 12586 return FALSE; 12587 } 12588} 12589 12590static int 12591parser_tokadd_string(struct parser_params *parser, 12592 int func, int term, int paren, long *nest, 12593 rb_encoding **encp) 12594{ 12595 int c; 12596 int has_nonascii = 0; 12597 rb_encoding *enc = *encp; 12598 char *errbuf = 0; 12599 static const char mixed_msg[] = "%s mixed within %s source"; 12600 12601#define mixed_error(enc1, enc2) if (!errbuf) { \ 12602 size_t len = sizeof(mixed_msg) - 4; \ 12603 len += strlen(rb_enc_name(enc1)); \ 12604 len += strlen(rb_enc_name(enc2)); \ 12605 errbuf = ALLOCA_N(char, len); \ 12606 snprintf(errbuf, len, mixed_msg, \ 12607 rb_enc_name(enc1), \ 12608 rb_enc_name(enc2)); \ 12609 yyerror(errbuf); \ 12610 } 12611#define mixed_escape(beg, enc1, enc2) do { \ 12612 const char *pos = lex_p; \ 12613 lex_p = (beg); \ 12614 mixed_error((enc1), (enc2)); \ 12615 lex_p = pos; \ 12616 } while (0) 12617 12618 while ((c = nextc()) != -1) { 12619 if (paren && c == paren) { 12620 ++*nest; 12621 } 12622 else if (c == term) { 12623 if (!nest || !*nest) { 12624 pushback(c); 12625 break; 12626 } 12627 --*nest; 12628 } 12629 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) { 12630 int c2 = *lex_p; 12631 if (c2 == '$' || c2 == '@' || c2 == '{') { 12632 pushback(c); 12633 break; 12634 } 12635 } 12636 else if (c == '\\') { 12637 const char *beg = lex_p - 1; 12638 c = nextc(); 12639 switch (c) { 12640 case '\n': 12641 if (func & STR_FUNC_QWORDS) break; 12642 if (func & STR_FUNC_EXPAND) continue; 12643 tokadd('\\'); 12644 break; 12645 12646 case '\\': 12647 if (func & STR_FUNC_ESCAPE) tokadd(c); 12648 break; 12649 12650 case 'u': 12651 if ((func & STR_FUNC_EXPAND) == 0) { 12652 tokadd('\\'); 12653 break; 12654 } 12655 parser_tokadd_utf8(parser, &enc, 1, 12656 func & STR_FUNC_SYMBOL, 12657 func & STR_FUNC_REGEXP); 12658 if (has_nonascii && enc != *encp) { 12659 mixed_escape(beg, enc, *encp); 12660 } 12661 continue; 12662 12663 default: 12664 if (c == -1) return -1; 12665 if (!ISASCII(c)) { 12666 if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\'); 12667 goto non_ascii; 12668 } 12669 if (func & STR_FUNC_REGEXP) { 12670 if (c == term && !simple_re_meta(c)) { 12671 tokadd(c); 12672 continue; 12673 } 12674 pushback(c); 12675 if ((c = tokadd_escape(&enc)) < 0) 12676 return -1; 12677 if (has_nonascii && enc != *encp) { 12678 mixed_escape(beg, enc, *encp); 12679 } 12680 continue; 12681 } 12682 else if (func & STR_FUNC_EXPAND) { 12683 pushback(c); 12684 if (func & STR_FUNC_ESCAPE) tokadd('\\'); 12685 c = read_escape(0, &enc); 12686 } 12687 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12688 /* ignore backslashed spaces in %w */ 12689 } 12690 else if (c != term && !(paren && c == paren)) { 12691 tokadd('\\'); 12692 pushback(c); 12693 continue; 12694 } 12695 } 12696 } 12697 else if (!parser_isascii()) { 12698 non_ascii: 12699 has_nonascii = 1; 12700 if (enc != *encp) { 12701 mixed_error(enc, *encp); 12702 continue; 12703 } 12704 if (tokadd_mbchar(c) == -1) return -1; 12705 continue; 12706 } 12707 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12708 pushback(c); 12709 break; 12710 } 12711 if (c & 0x80) { 12712 has_nonascii = 1; 12713 if (enc != *encp) { 12714 mixed_error(enc, *encp); 12715 continue; 12716 } 12717 } 12718 tokadd(c); 12719 } 12720 *encp = enc; 12721 return c; 12722} 12723 12724#define NEW_STRTERM(func, term, paren) \ 12725 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0) 12726 12727#ifdef RIPPER 12728static void 12729ripper_flush_string_content(struct parser_params *parser, rb_encoding *enc) 12730{ 12731 if (!NIL_P(parser->delayed)) { 12732 ptrdiff_t len = lex_p - parser->tokp; 12733 if (len > 0) { 12734 rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc); 12735 } 12736 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12737 parser->tokp = lex_p; 12738 } 12739} 12740 12741#define flush_string_content(enc) ripper_flush_string_content(parser, (enc)) 12742#else 12743#define flush_string_content(enc) ((void)(enc)) 12744#endif 12745 12746RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32]; 12747/* this can be shared with ripper, since it's independent from struct 12748 * parser_params. */ 12749#ifndef RIPPER 12750#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0) 12751#define SPECIAL_PUNCT(idx) ( \ 12752 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \ 12753 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \ 12754 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \ 12755 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \ 12756 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \ 12757 BIT('0', idx)) 12758const unsigned int ruby_global_name_punct_bits[] = { 12759 SPECIAL_PUNCT(0), 12760 SPECIAL_PUNCT(1), 12761 SPECIAL_PUNCT(2), 12762}; 12763#undef BIT 12764#undef SPECIAL_PUNCT 12765#endif 12766 12767static inline int 12768is_global_name_punct(const char c) 12769{ 12770 if (c <= 0x20 || 0x7e < c) return 0; 12771 return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1; 12772} 12773 12774static int 12775parser_peek_variable_name(struct parser_params *parser) 12776{ 12777 int c; 12778 const char *p = lex_p; 12779 12780 if (p + 1 >= lex_pend) return 0; 12781 c = *p++; 12782 switch (c) { 12783 case '$': 12784 if ((c = *p) == '-') { 12785 if (++p >= lex_pend) return 0; 12786 c = *p; 12787 } 12788 else if (is_global_name_punct(c) || ISDIGIT(c)) { 12789 return tSTRING_DVAR; 12790 } 12791 break; 12792 case '@': 12793 if ((c = *p) == '@') { 12794 if (++p >= lex_pend) return 0; 12795 c = *p; 12796 } 12797 break; 12798 case '{': 12799 lex_p = p; 12800 command_start = TRUE; 12801 return tSTRING_DBEG; 12802 default: 12803 return 0; 12804 } 12805 if (!ISASCII(c) || c == '_' || ISALPHA(c)) 12806 return tSTRING_DVAR; 12807 return 0; 12808} 12809 12810static int 12811parser_parse_string(struct parser_params *parser, NODE *quote) 12812{ 12813 int func = (int)quote->nd_func; 12814 int term = nd_term(quote); 12815 int paren = nd_paren(quote); 12816 int c, space = 0; 12817 rb_encoding *enc = current_enc; 12818 12819 if (func == -1) return tSTRING_END; 12820 c = nextc(); 12821 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { 12822 do {c = nextc();} while (ISSPACE(c)); 12823 space = 1; 12824 } 12825 if (c == term && !quote->nd_nest) { 12826 if (func & STR_FUNC_QWORDS) { 12827 quote->nd_func = -1; 12828 return ' '; 12829 } 12830 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END; 12831 set_yylval_num(regx_options()); 12832 return tREGEXP_END; 12833 } 12834 if (space) { 12835 pushback(c); 12836 return ' '; 12837 } 12838 newtok(); 12839 if ((func & STR_FUNC_EXPAND) && c == '#') { 12840 int t = parser_peek_variable_name(parser); 12841 if (t) return t; 12842 tokadd('#'); 12843 c = nextc(); 12844 } 12845 pushback(c); 12846 if (tokadd_string(func, term, paren, "e->nd_nest, 12847 &enc) == -1) { 12848 ruby_sourceline = nd_line(quote); 12849 if (func & STR_FUNC_REGEXP) { 12850 if (parser->eofp) 12851 compile_error(PARSER_ARG "unterminated regexp meets end of file"); 12852 return tREGEXP_END; 12853 } 12854 else { 12855 if (parser->eofp) 12856 compile_error(PARSER_ARG "unterminated string meets end of file"); 12857 return tSTRING_END; 12858 } 12859 } 12860 12861 tokfix(); 12862 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 12863 flush_string_content(enc); 12864 12865 return tSTRING_CONTENT; 12866} 12867 12868static int 12869parser_heredoc_identifier(struct parser_params *parser) 12870{ 12871 int c = nextc(), term, func = 0; 12872 long len; 12873 12874 if (c == '-') { 12875 c = nextc(); 12876 func = STR_FUNC_INDENT; 12877 } 12878 switch (c) { 12879 case '\'': 12880 func |= str_squote; goto quoted; 12881 case '"': 12882 func |= str_dquote; goto quoted; 12883 case '`': 12884 func |= str_xquote; 12885 quoted: 12886 newtok(); 12887 tokadd(func); 12888 term = c; 12889 while ((c = nextc()) != -1 && c != term) { 12890 if (tokadd_mbchar(c) == -1) return 0; 12891 } 12892 if (c == -1) { 12893 compile_error(PARSER_ARG "unterminated here document identifier"); 12894 return 0; 12895 } 12896 break; 12897 12898 default: 12899 if (!parser_is_identchar()) { 12900 pushback(c); 12901 if (func & STR_FUNC_INDENT) { 12902 pushback('-'); 12903 } 12904 return 0; 12905 } 12906 newtok(); 12907 term = '"'; 12908 tokadd(func |= str_dquote); 12909 do { 12910 if (tokadd_mbchar(c) == -1) return 0; 12911 } while ((c = nextc()) != -1 && parser_is_identchar()); 12912 pushback(c); 12913 break; 12914 } 12915 12916 tokfix(); 12917#ifdef RIPPER 12918 ripper_dispatch_scan_event(parser, tHEREDOC_BEG); 12919#endif 12920 len = lex_p - lex_pbeg; 12921 lex_goto_eol(parser); 12922 lex_strterm = rb_node_newnode(NODE_HEREDOC, 12923 STR_NEW(tok(), toklen()), /* nd_lit */ 12924 len, /* nd_nth */ 12925 lex_lastline); /* nd_orig */ 12926 nd_set_line(lex_strterm, ruby_sourceline); 12927 ripper_flush(parser); 12928 return term == '`' ? tXSTRING_BEG : tSTRING_BEG; 12929} 12930 12931static void 12932parser_heredoc_restore(struct parser_params *parser, NODE *here) 12933{ 12934 VALUE line; 12935 12936 line = here->nd_orig; 12937 lex_lastline = line; 12938 lex_pbeg = RSTRING_PTR(line); 12939 lex_pend = lex_pbeg + RSTRING_LEN(line); 12940 lex_p = lex_pbeg + here->nd_nth; 12941 heredoc_end = ruby_sourceline; 12942 ruby_sourceline = nd_line(here); 12943 dispose_string(here->nd_lit); 12944 rb_gc_force_recycle((VALUE)here); 12945 ripper_flush(parser); 12946} 12947 12948static int 12949parser_whole_match_p(struct parser_params *parser, 12950 const char *eos, long len, int indent) 12951{ 12952 const char *p = lex_pbeg; 12953 long n; 12954 12955 if (indent) { 12956 while (*p && ISSPACE(*p)) p++; 12957 } 12958 n = lex_pend - (p + len); 12959 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE; 12960 return strncmp(eos, p, len) == 0; 12961} 12962 12963#ifdef RIPPER 12964static void 12965ripper_dispatch_heredoc_end(struct parser_params *parser) 12966{ 12967 if (!NIL_P(parser->delayed)) 12968 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 12969 lex_goto_eol(parser); 12970 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END); 12971} 12972 12973#define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser) 12974#else 12975#define dispatch_heredoc_end() ((void)0) 12976#endif 12977 12978static int 12979parser_here_document(struct parser_params *parser, NODE *here) 12980{ 12981 int c, func, indent = 0; 12982 const char *eos, *p, *pend; 12983 long len; 12984 VALUE str = 0; 12985 rb_encoding *enc = current_enc; 12986 12987 eos = RSTRING_PTR(here->nd_lit); 12988 len = RSTRING_LEN(here->nd_lit) - 1; 12989 indent = (func = *eos++) & STR_FUNC_INDENT; 12990 12991 if ((c = nextc()) == -1) { 12992 error: 12993 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos); 12994#ifdef RIPPER 12995 if (NIL_P(parser->delayed)) { 12996 ripper_dispatch_scan_event(parser, tSTRING_CONTENT); 12997 } 12998 else { 12999 if (str || 13000 ((len = lex_p - parser->tokp) > 0 && 13001 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) { 13002 rb_str_append(parser->delayed, str); 13003 } 13004 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT); 13005 } 13006 lex_goto_eol(parser); 13007#endif 13008 restore: 13009 heredoc_restore(lex_strterm); 13010 lex_strterm = 0; 13011 return 0; 13012 } 13013 if (was_bol() && whole_match_p(eos, len, indent)) { 13014 dispatch_heredoc_end(); 13015 heredoc_restore(lex_strterm); 13016 return tSTRING_END; 13017 } 13018 13019 if (!(func & STR_FUNC_EXPAND)) { 13020 do { 13021 p = RSTRING_PTR(lex_lastline); 13022 pend = lex_pend; 13023 if (pend > p) { 13024 switch (pend[-1]) { 13025 case '\n': 13026 if (--pend == p || pend[-1] != '\r') { 13027 pend++; 13028 break; 13029 } 13030 case '\r': 13031 --pend; 13032 } 13033 } 13034 if (str) 13035 rb_str_cat(str, p, pend - p); 13036 else 13037 str = STR_NEW(p, pend - p); 13038 if (pend < lex_pend) rb_str_cat(str, "\n", 1); 13039 lex_goto_eol(parser); 13040 if (nextc() == -1) { 13041 if (str) dispose_string(str); 13042 goto error; 13043 } 13044 } while (!whole_match_p(eos, len, indent)); 13045 } 13046 else { 13047 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/ 13048 newtok(); 13049 if (c == '#') { 13050 int t = parser_peek_variable_name(parser); 13051 if (t) return t; 13052 tokadd('#'); 13053 c = nextc(); 13054 } 13055 do { 13056 pushback(c); 13057 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) { 13058 if (parser->eofp) goto error; 13059 goto restore; 13060 } 13061 if (c != '\n') { 13062 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func)); 13063 flush_string_content(enc); 13064 return tSTRING_CONTENT; 13065 } 13066 tokadd(nextc()); 13067 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/ 13068 if ((c = nextc()) == -1) goto error; 13069 } while (!whole_match_p(eos, len, indent)); 13070 str = STR_NEW3(tok(), toklen(), enc, func); 13071 } 13072 dispatch_heredoc_end(); 13073 heredoc_restore(lex_strterm); 13074 lex_strterm = NEW_STRTERM(-1, 0, 0); 13075 set_yylval_str(str); 13076 return tSTRING_CONTENT; 13077} 13078 13079#include "lex.c" 13080 13081static void 13082arg_ambiguous_gen(struct parser_params *parser) 13083{ 13084#ifndef RIPPER 13085 rb_warning0("ambiguous first argument; put parentheses or even spaces"); 13086#else 13087 dispatch0(arg_ambiguous); 13088#endif 13089} 13090#define arg_ambiguous() (arg_ambiguous_gen(parser), 1) 13091 13092static ID 13093formal_argument_gen(struct parser_params *parser, ID lhs) 13094{ 13095#ifndef RIPPER 13096 if (!is_local_id(lhs)) 13097 yyerror("formal argument must be local variable"); 13098#endif 13099 shadowing_lvar(lhs); 13100 return lhs; 13101} 13102 13103static int 13104lvar_defined_gen(struct parser_params *parser, ID id) 13105{ 13106 return (dyna_in_block() && dvar_defined_get(id)) || local_id(id); 13107} 13108 13109/* emacsen -*- hack */ 13110static long 13111parser_encode_length(struct parser_params *parser, const char *name, long len) 13112{ 13113 long nlen; 13114 13115 if (len > 5 && name[nlen = len - 5] == '-') { 13116 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0) 13117 return nlen; 13118 } 13119 if (len > 4 && name[nlen = len - 4] == '-') { 13120 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0) 13121 return nlen; 13122 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 && 13123 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0)) 13124 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */ 13125 return nlen; 13126 } 13127 return len; 13128} 13129 13130static void 13131parser_set_encode(struct parser_params *parser, const char *name) 13132{ 13133 int idx = rb_enc_find_index(name); 13134 rb_encoding *enc; 13135 VALUE excargs[3]; 13136 13137 if (idx < 0) { 13138 excargs[1] = rb_sprintf("unknown encoding name: %s", name); 13139 error: 13140 excargs[0] = rb_eArgError; 13141 excargs[2] = rb_make_backtrace(); 13142 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline)); 13143 rb_exc_raise(rb_make_exception(3, excargs)); 13144 } 13145 enc = rb_enc_from_index(idx); 13146 if (!rb_enc_asciicompat(enc)) { 13147 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc)); 13148 goto error; 13149 } 13150 parser->enc = enc; 13151#ifndef RIPPER 13152 if (ruby_debug_lines) { 13153 long i, n = RARRAY_LEN(ruby_debug_lines); 13154 const VALUE *p = RARRAY_PTR(ruby_debug_lines); 13155 for (i = 0; i < n; ++i) { 13156 rb_enc_associate_index(*p, idx); 13157 } 13158 } 13159#endif 13160} 13161 13162static int 13163comment_at_top(struct parser_params *parser) 13164{ 13165 const char *p = lex_pbeg, *pend = lex_p - 1; 13166 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0; 13167 while (p < pend) { 13168 if (!ISSPACE(*p)) return 0; 13169 p++; 13170 } 13171 return 1; 13172} 13173 13174#ifndef RIPPER 13175typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len); 13176typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val); 13177 13178static void 13179magic_comment_encoding(struct parser_params *parser, const char *name, const char *val) 13180{ 13181 if (!comment_at_top(parser)) { 13182 return; 13183 } 13184 parser_set_encode(parser, val); 13185} 13186 13187static void 13188parser_set_token_info(struct parser_params *parser, const char *name, const char *val) 13189{ 13190 int *p = &parser->parser_token_info_enabled; 13191 13192 switch (*val) { 13193 case 't': case 'T': 13194 if (strcasecmp(val, "true") == 0) { 13195 *p = TRUE; 13196 return; 13197 } 13198 break; 13199 case 'f': case 'F': 13200 if (strcasecmp(val, "false") == 0) { 13201 *p = FALSE; 13202 return; 13203 } 13204 break; 13205 } 13206 rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val); 13207} 13208 13209struct magic_comment { 13210 const char *name; 13211 rb_magic_comment_setter_t func; 13212 rb_magic_comment_length_t length; 13213}; 13214 13215static const struct magic_comment magic_comments[] = { 13216 {"coding", magic_comment_encoding, parser_encode_length}, 13217 {"encoding", magic_comment_encoding, parser_encode_length}, 13218 {"warn_indent", parser_set_token_info}, 13219}; 13220#endif 13221 13222static const char * 13223magic_comment_marker(const char *str, long len) 13224{ 13225 long i = 2; 13226 13227 while (i < len) { 13228 switch (str[i]) { 13229 case '-': 13230 if (str[i-1] == '*' && str[i-2] == '-') { 13231 return str + i + 1; 13232 } 13233 i += 2; 13234 break; 13235 case '*': 13236 if (i + 1 >= len) return 0; 13237 if (str[i+1] != '-') { 13238 i += 4; 13239 } 13240 else if (str[i-1] != '-') { 13241 i += 2; 13242 } 13243 else { 13244 return str + i + 2; 13245 } 13246 break; 13247 default: 13248 i += 3; 13249 break; 13250 } 13251 } 13252 return 0; 13253} 13254 13255static int 13256parser_magic_comment(struct parser_params *parser, const char *str, long len) 13257{ 13258 VALUE name = 0, val = 0; 13259 const char *beg, *end, *vbeg, *vend; 13260#define str_copy(_s, _p, _n) ((_s) \ 13261 ? (void)(rb_str_resize((_s), (_n)), \ 13262 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \ 13263 : (void)((_s) = STR_NEW((_p), (_n)))) 13264 13265 if (len <= 7) return FALSE; 13266 if (!(beg = magic_comment_marker(str, len))) return FALSE; 13267 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE; 13268 str = beg; 13269 len = end - beg - 3; 13270 13271 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */ 13272 while (len > 0) { 13273#ifndef RIPPER 13274 const struct magic_comment *p = magic_comments; 13275#endif 13276 char *s; 13277 int i; 13278 long n = 0; 13279 13280 for (; len > 0 && *str; str++, --len) { 13281 switch (*str) { 13282 case '\'': case '"': case ':': case ';': 13283 continue; 13284 } 13285 if (!ISSPACE(*str)) break; 13286 } 13287 for (beg = str; len > 0; str++, --len) { 13288 switch (*str) { 13289 case '\'': case '"': case ':': case ';': 13290 break; 13291 default: 13292 if (ISSPACE(*str)) break; 13293 continue; 13294 } 13295 break; 13296 } 13297 for (end = str; len > 0 && ISSPACE(*str); str++, --len); 13298 if (!len) break; 13299 if (*str != ':') continue; 13300 13301 do str++; while (--len > 0 && ISSPACE(*str)); 13302 if (!len) break; 13303 if (*str == '"') { 13304 for (vbeg = ++str; --len > 0 && *str != '"'; str++) { 13305 if (*str == '\\') { 13306 --len; 13307 ++str; 13308 } 13309 } 13310 vend = str; 13311 if (len) { 13312 --len; 13313 ++str; 13314 } 13315 } 13316 else { 13317 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++); 13318 vend = str; 13319 } 13320 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++; 13321 13322 n = end - beg; 13323 str_copy(name, beg, n); 13324 s = RSTRING_PTR(name); 13325 for (i = 0; i < n; ++i) { 13326 if (s[i] == '-') s[i] = '_'; 13327 } 13328#ifndef RIPPER 13329 do { 13330 if (STRNCASECMP(p->name, s, n) == 0) { 13331 n = vend - vbeg; 13332 if (p->length) { 13333 n = (*p->length)(parser, vbeg, n); 13334 } 13335 str_copy(val, vbeg, n); 13336 (*p->func)(parser, s, RSTRING_PTR(val)); 13337 break; 13338 } 13339 } while (++p < magic_comments + numberof(magic_comments)); 13340#else 13341 str_copy(val, vbeg, vend - vbeg); 13342 dispatch2(magic_comment, name, val); 13343#endif 13344 } 13345 13346 return TRUE; 13347} 13348 13349static void 13350set_file_encoding(struct parser_params *parser, const char *str, const char *send) 13351{ 13352 int sep = 0; 13353 const char *beg = str; 13354 VALUE s; 13355 13356 for (;;) { 13357 if (send - str <= 6) return; 13358 switch (str[6]) { 13359 case 'C': case 'c': str += 6; continue; 13360 case 'O': case 'o': str += 5; continue; 13361 case 'D': case 'd': str += 4; continue; 13362 case 'I': case 'i': str += 3; continue; 13363 case 'N': case 'n': str += 2; continue; 13364 case 'G': case 'g': str += 1; continue; 13365 case '=': case ':': 13366 sep = 1; 13367 str += 6; 13368 break; 13369 default: 13370 str += 6; 13371 if (ISSPACE(*str)) break; 13372 continue; 13373 } 13374 if (STRNCASECMP(str-6, "coding", 6) == 0) break; 13375 } 13376 for (;;) { 13377 do { 13378 if (++str >= send) return; 13379 } while (ISSPACE(*str)); 13380 if (sep) break; 13381 if (*str != '=' && *str != ':') return; 13382 sep = 1; 13383 str++; 13384 } 13385 beg = str; 13386 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send); 13387 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg)); 13388 parser_set_encode(parser, RSTRING_PTR(s)); 13389 rb_str_resize(s, 0); 13390} 13391 13392static void 13393parser_prepare(struct parser_params *parser) 13394{ 13395 int c = nextc(); 13396 switch (c) { 13397 case '#': 13398 if (peek('!')) parser->has_shebang = 1; 13399 break; 13400 case 0xef: /* UTF-8 BOM marker */ 13401 if (lex_pend - lex_p >= 2 && 13402 (unsigned char)lex_p[0] == 0xbb && 13403 (unsigned char)lex_p[1] == 0xbf) { 13404 parser->enc = rb_utf8_encoding(); 13405 lex_p += 2; 13406 lex_pbeg = lex_p; 13407 return; 13408 } 13409 break; 13410 case EOF: 13411 return; 13412 } 13413 pushback(c); 13414 parser->enc = rb_enc_get(lex_lastline); 13415} 13416 13417#define IS_ARG() IS_lex_state(EXPR_ARG_ANY) 13418#define IS_END() IS_lex_state(EXPR_END_ANY) 13419#define IS_BEG() IS_lex_state(EXPR_BEG_ANY) 13420#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c)) 13421#define IS_LABEL_POSSIBLE() ((IS_lex_state(EXPR_BEG | EXPR_ENDFN) && !cmd_state) || IS_ARG()) 13422#define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1)) 13423#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT) 13424 13425#ifndef RIPPER 13426#define ambiguous_operator(op, syn) ( \ 13427 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \ 13428 rb_warning0("even though it seems like "syn"")) 13429#else 13430#define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn)) 13431#endif 13432#define warn_balanced(op, syn) ((void) \ 13433 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN|EXPR_ENDARG) && \ 13434 space_seen && !ISSPACE(c) && \ 13435 (ambiguous_operator(op, syn), 0))) 13436 13437static int 13438parser_yylex(struct parser_params *parser) 13439{ 13440 register int c; 13441 int space_seen = 0; 13442 int cmd_state; 13443 enum lex_state_e last_state; 13444 rb_encoding *enc; 13445 int mb; 13446#ifdef RIPPER 13447 int fallthru = FALSE; 13448#endif 13449 13450 if (lex_strterm) { 13451 int token; 13452 if (nd_type(lex_strterm) == NODE_HEREDOC) { 13453 token = here_document(lex_strterm); 13454 if (token == tSTRING_END) { 13455 lex_strterm = 0; 13456 lex_state = EXPR_END; 13457 } 13458 } 13459 else { 13460 token = parse_string(lex_strterm); 13461 if (token == tSTRING_END || token == tREGEXP_END) { 13462 rb_gc_force_recycle((VALUE)lex_strterm); 13463 lex_strterm = 0; 13464 lex_state = EXPR_END; 13465 } 13466 } 13467 return token; 13468 } 13469 cmd_state = command_start; 13470 command_start = FALSE; 13471 retry: 13472 last_state = lex_state; 13473 switch (c = nextc()) { 13474 case '\0': /* NUL */ 13475 case '\004': /* ^D */ 13476 case '\032': /* ^Z */ 13477 case -1: /* end of script. */ 13478 return 0; 13479 13480 /* white spaces */ 13481 case ' ': case '\t': case '\f': case '\r': 13482 case '\13': /* '\v' */ 13483 space_seen = 1; 13484#ifdef RIPPER 13485 while ((c = nextc())) { 13486 switch (c) { 13487 case ' ': case '\t': case '\f': case '\r': 13488 case '\13': /* '\v' */ 13489 break; 13490 default: 13491 goto outofloop; 13492 } 13493 } 13494 outofloop: 13495 pushback(c); 13496 ripper_dispatch_scan_event(parser, tSP); 13497#endif 13498 goto retry; 13499 13500 case '#': /* it's a comment */ 13501 /* no magic_comment in shebang line */ 13502 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) { 13503 if (comment_at_top(parser)) { 13504 set_file_encoding(parser, lex_p, lex_pend); 13505 } 13506 } 13507 lex_p = lex_pend; 13508#ifdef RIPPER 13509 ripper_dispatch_scan_event(parser, tCOMMENT); 13510 fallthru = TRUE; 13511#endif 13512 /* fall through */ 13513 case '\n': 13514 if (IS_lex_state(EXPR_BEG | EXPR_VALUE | EXPR_CLASS | EXPR_FNAME | EXPR_DOT)) { 13515#ifdef RIPPER 13516 if (!fallthru) { 13517 ripper_dispatch_scan_event(parser, tIGNORED_NL); 13518 } 13519 fallthru = FALSE; 13520#endif 13521 goto retry; 13522 } 13523 while ((c = nextc())) { 13524 switch (c) { 13525 case ' ': case '\t': case '\f': case '\r': 13526 case '\13': /* '\v' */ 13527 space_seen = 1; 13528 break; 13529 case '.': { 13530 if ((c = nextc()) != '.') { 13531 pushback(c); 13532 pushback('.'); 13533 goto retry; 13534 } 13535 } 13536 default: 13537 --ruby_sourceline; 13538 lex_nextline = lex_lastline; 13539 case -1: /* EOF no decrement*/ 13540 lex_goto_eol(parser); 13541#ifdef RIPPER 13542 if (c != -1) { 13543 parser->tokp = lex_p; 13544 } 13545#endif 13546 goto normal_newline; 13547 } 13548 } 13549 normal_newline: 13550 command_start = TRUE; 13551 lex_state = EXPR_BEG; 13552 return '\n'; 13553 13554 case '*': 13555 if ((c = nextc()) == '*') { 13556 if ((c = nextc()) == '=') { 13557 set_yylval_id(tPOW); 13558 lex_state = EXPR_BEG; 13559 return tOP_ASGN; 13560 } 13561 pushback(c); 13562 if (IS_SPCARG(c)) { 13563 rb_warning0("`**' interpreted as argument prefix"); 13564 c = tDSTAR; 13565 } 13566 else if (IS_BEG()) { 13567 c = tDSTAR; 13568 } 13569 else { 13570 warn_balanced("**", "argument prefix"); 13571 c = tPOW; 13572 } 13573 } 13574 else { 13575 if (c == '=') { 13576 set_yylval_id('*'); 13577 lex_state = EXPR_BEG; 13578 return tOP_ASGN; 13579 } 13580 pushback(c); 13581 if (IS_SPCARG(c)) { 13582 rb_warning0("`*' interpreted as argument prefix"); 13583 c = tSTAR; 13584 } 13585 else if (IS_BEG()) { 13586 c = tSTAR; 13587 } 13588 else { 13589 warn_balanced("*", "argument prefix"); 13590 c = '*'; 13591 } 13592 } 13593 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13594 return c; 13595 13596 case '!': 13597 c = nextc(); 13598 if (IS_AFTER_OPERATOR()) { 13599 lex_state = EXPR_ARG; 13600 if (c == '@') { 13601 return '!'; 13602 } 13603 } 13604 else { 13605 lex_state = EXPR_BEG; 13606 } 13607 if (c == '=') { 13608 return tNEQ; 13609 } 13610 if (c == '~') { 13611 return tNMATCH; 13612 } 13613 pushback(c); 13614 return '!'; 13615 13616 case '=': 13617 if (was_bol()) { 13618 /* skip embedded rd document */ 13619 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) { 13620#ifdef RIPPER 13621 int first_p = TRUE; 13622 13623 lex_goto_eol(parser); 13624 ripper_dispatch_scan_event(parser, tEMBDOC_BEG); 13625#endif 13626 for (;;) { 13627 lex_goto_eol(parser); 13628#ifdef RIPPER 13629 if (!first_p) { 13630 ripper_dispatch_scan_event(parser, tEMBDOC); 13631 } 13632 first_p = FALSE; 13633#endif 13634 c = nextc(); 13635 if (c == -1) { 13636 compile_error(PARSER_ARG "embedded document meets end of file"); 13637 return 0; 13638 } 13639 if (c != '=') continue; 13640 if (strncmp(lex_p, "end", 3) == 0 && 13641 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) { 13642 break; 13643 } 13644 } 13645 lex_goto_eol(parser); 13646#ifdef RIPPER 13647 ripper_dispatch_scan_event(parser, tEMBDOC_END); 13648#endif 13649 goto retry; 13650 } 13651 } 13652 13653 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13654 if ((c = nextc()) == '=') { 13655 if ((c = nextc()) == '=') { 13656 return tEQQ; 13657 } 13658 pushback(c); 13659 return tEQ; 13660 } 13661 if (c == '~') { 13662 return tMATCH; 13663 } 13664 else if (c == '>') { 13665 return tASSOC; 13666 } 13667 pushback(c); 13668 return '='; 13669 13670 case '<': 13671 last_state = lex_state; 13672 c = nextc(); 13673 if (c == '<' && 13674 !IS_lex_state(EXPR_DOT | EXPR_CLASS) && 13675 !IS_END() && 13676 (!IS_ARG() || space_seen)) { 13677 int token = heredoc_identifier(); 13678 if (token) return token; 13679 } 13680 if (IS_AFTER_OPERATOR()) { 13681 lex_state = EXPR_ARG; 13682 } 13683 else { 13684 if (IS_lex_state(EXPR_CLASS)) 13685 command_start = TRUE; 13686 lex_state = EXPR_BEG; 13687 } 13688 if (c == '=') { 13689 if ((c = nextc()) == '>') { 13690 return tCMP; 13691 } 13692 pushback(c); 13693 return tLEQ; 13694 } 13695 if (c == '<') { 13696 if ((c = nextc()) == '=') { 13697 set_yylval_id(tLSHFT); 13698 lex_state = EXPR_BEG; 13699 return tOP_ASGN; 13700 } 13701 pushback(c); 13702 warn_balanced("<<", "here document"); 13703 return tLSHFT; 13704 } 13705 pushback(c); 13706 return '<'; 13707 13708 case '>': 13709 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13710 if ((c = nextc()) == '=') { 13711 return tGEQ; 13712 } 13713 if (c == '>') { 13714 if ((c = nextc()) == '=') { 13715 set_yylval_id(tRSHFT); 13716 lex_state = EXPR_BEG; 13717 return tOP_ASGN; 13718 } 13719 pushback(c); 13720 return tRSHFT; 13721 } 13722 pushback(c); 13723 return '>'; 13724 13725 case '"': 13726 lex_strterm = NEW_STRTERM(str_dquote, '"', 0); 13727 return tSTRING_BEG; 13728 13729 case '`': 13730 if (IS_lex_state(EXPR_FNAME)) { 13731 lex_state = EXPR_ENDFN; 13732 return c; 13733 } 13734 if (IS_lex_state(EXPR_DOT)) { 13735 if (cmd_state) 13736 lex_state = EXPR_CMDARG; 13737 else 13738 lex_state = EXPR_ARG; 13739 return c; 13740 } 13741 lex_strterm = NEW_STRTERM(str_xquote, '`', 0); 13742 return tXSTRING_BEG; 13743 13744 case '\'': 13745 lex_strterm = NEW_STRTERM(str_squote, '\'', 0); 13746 return tSTRING_BEG; 13747 13748 case '?': 13749 if (IS_END()) { 13750 lex_state = EXPR_VALUE; 13751 return '?'; 13752 } 13753 c = nextc(); 13754 if (c == -1) { 13755 compile_error(PARSER_ARG "incomplete character syntax"); 13756 return 0; 13757 } 13758 if (rb_enc_isspace(c, current_enc)) { 13759 if (!IS_ARG()) { 13760 int c2 = 0; 13761 switch (c) { 13762 case ' ': 13763 c2 = 's'; 13764 break; 13765 case '\n': 13766 c2 = 'n'; 13767 break; 13768 case '\t': 13769 c2 = 't'; 13770 break; 13771 case '\v': 13772 c2 = 'v'; 13773 break; 13774 case '\r': 13775 c2 = 'r'; 13776 break; 13777 case '\f': 13778 c2 = 'f'; 13779 break; 13780 } 13781 if (c2) { 13782 rb_warnI("invalid character syntax; use ?\\%c", c2); 13783 } 13784 } 13785 ternary: 13786 pushback(c); 13787 lex_state = EXPR_VALUE; 13788 return '?'; 13789 } 13790 newtok(); 13791 enc = current_enc; 13792 if (!parser_isascii()) { 13793 if (tokadd_mbchar(c) == -1) return 0; 13794 } 13795 else if ((rb_enc_isalnum(c, current_enc) || c == '_') && 13796 lex_p < lex_pend && is_identchar(lex_p, lex_pend, current_enc)) { 13797 goto ternary; 13798 } 13799 else if (c == '\\') { 13800 if (peek('u')) { 13801 nextc(); 13802 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0); 13803 if (0x80 <= c) { 13804 tokaddmbc(c, enc); 13805 } 13806 else { 13807 tokadd(c); 13808 } 13809 } 13810 else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) { 13811 nextc(); 13812 if (tokadd_mbchar(c) == -1) return 0; 13813 } 13814 else { 13815 c = read_escape(0, &enc); 13816 tokadd(c); 13817 } 13818 } 13819 else { 13820 tokadd(c); 13821 } 13822 tokfix(); 13823 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0)); 13824 lex_state = EXPR_END; 13825 return tCHAR; 13826 13827 case '&': 13828 if ((c = nextc()) == '&') { 13829 lex_state = EXPR_BEG; 13830 if ((c = nextc()) == '=') { 13831 set_yylval_id(tANDOP); 13832 lex_state = EXPR_BEG; 13833 return tOP_ASGN; 13834 } 13835 pushback(c); 13836 return tANDOP; 13837 } 13838 else if (c == '=') { 13839 set_yylval_id('&'); 13840 lex_state = EXPR_BEG; 13841 return tOP_ASGN; 13842 } 13843 pushback(c); 13844 if (IS_SPCARG(c)) { 13845 rb_warning0("`&' interpreted as argument prefix"); 13846 c = tAMPER; 13847 } 13848 else if (IS_BEG()) { 13849 c = tAMPER; 13850 } 13851 else { 13852 warn_balanced("&", "argument prefix"); 13853 c = '&'; 13854 } 13855 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13856 return c; 13857 13858 case '|': 13859 if ((c = nextc()) == '|') { 13860 lex_state = EXPR_BEG; 13861 if ((c = nextc()) == '=') { 13862 set_yylval_id(tOROP); 13863 lex_state = EXPR_BEG; 13864 return tOP_ASGN; 13865 } 13866 pushback(c); 13867 return tOROP; 13868 } 13869 if (c == '=') { 13870 set_yylval_id('|'); 13871 lex_state = EXPR_BEG; 13872 return tOP_ASGN; 13873 } 13874 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 13875 pushback(c); 13876 return '|'; 13877 13878 case '+': 13879 c = nextc(); 13880 if (IS_AFTER_OPERATOR()) { 13881 lex_state = EXPR_ARG; 13882 if (c == '@') { 13883 return tUPLUS; 13884 } 13885 pushback(c); 13886 return '+'; 13887 } 13888 if (c == '=') { 13889 set_yylval_id('+'); 13890 lex_state = EXPR_BEG; 13891 return tOP_ASGN; 13892 } 13893 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13894 lex_state = EXPR_BEG; 13895 pushback(c); 13896 if (c != -1 && ISDIGIT(c)) { 13897 c = '+'; 13898 goto start_num; 13899 } 13900 return tUPLUS; 13901 } 13902 lex_state = EXPR_BEG; 13903 pushback(c); 13904 warn_balanced("+", "unary operator"); 13905 return '+'; 13906 13907 case '-': 13908 c = nextc(); 13909 if (IS_AFTER_OPERATOR()) { 13910 lex_state = EXPR_ARG; 13911 if (c == '@') { 13912 return tUMINUS; 13913 } 13914 pushback(c); 13915 return '-'; 13916 } 13917 if (c == '=') { 13918 set_yylval_id('-'); 13919 lex_state = EXPR_BEG; 13920 return tOP_ASGN; 13921 } 13922 if (c == '>') { 13923 lex_state = EXPR_ENDFN; 13924 return tLAMBDA; 13925 } 13926 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) { 13927 lex_state = EXPR_BEG; 13928 pushback(c); 13929 if (c != -1 && ISDIGIT(c)) { 13930 return tUMINUS_NUM; 13931 } 13932 return tUMINUS; 13933 } 13934 lex_state = EXPR_BEG; 13935 pushback(c); 13936 warn_balanced("-", "unary operator"); 13937 return '-'; 13938 13939 case '.': 13940 lex_state = EXPR_BEG; 13941 if ((c = nextc()) == '.') { 13942 if ((c = nextc()) == '.') { 13943 return tDOT3; 13944 } 13945 pushback(c); 13946 return tDOT2; 13947 } 13948 pushback(c); 13949 if (c != -1 && ISDIGIT(c)) { 13950 yyerror("no .<digit> floating literal anymore; put 0 before dot"); 13951 } 13952 lex_state = EXPR_DOT; 13953 return '.'; 13954 13955 start_num: 13956 case '0': case '1': case '2': case '3': case '4': 13957 case '5': case '6': case '7': case '8': case '9': 13958 { 13959 int is_float, seen_point, seen_e, nondigit; 13960 13961 is_float = seen_point = seen_e = nondigit = 0; 13962 lex_state = EXPR_END; 13963 newtok(); 13964 if (c == '-' || c == '+') { 13965 tokadd(c); 13966 c = nextc(); 13967 } 13968 if (c == '0') { 13969#define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0) 13970 int start = toklen(); 13971 c = nextc(); 13972 if (c == 'x' || c == 'X') { 13973 /* hexadecimal */ 13974 c = nextc(); 13975 if (c != -1 && ISXDIGIT(c)) { 13976 do { 13977 if (c == '_') { 13978 if (nondigit) break; 13979 nondigit = c; 13980 continue; 13981 } 13982 if (!ISXDIGIT(c)) break; 13983 nondigit = 0; 13984 tokadd(c); 13985 } while ((c = nextc()) != -1); 13986 } 13987 pushback(c); 13988 tokfix(); 13989 if (toklen() == start) { 13990 no_digits(); 13991 } 13992 else if (nondigit) goto trailing_uc; 13993 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE)); 13994 return tINTEGER; 13995 } 13996 if (c == 'b' || c == 'B') { 13997 /* binary */ 13998 c = nextc(); 13999 if (c == '0' || c == '1') { 14000 do { 14001 if (c == '_') { 14002 if (nondigit) break; 14003 nondigit = c; 14004 continue; 14005 } 14006 if (c != '0' && c != '1') break; 14007 nondigit = 0; 14008 tokadd(c); 14009 } while ((c = nextc()) != -1); 14010 } 14011 pushback(c); 14012 tokfix(); 14013 if (toklen() == start) { 14014 no_digits(); 14015 } 14016 else if (nondigit) goto trailing_uc; 14017 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE)); 14018 return tINTEGER; 14019 } 14020 if (c == 'd' || c == 'D') { 14021 /* decimal */ 14022 c = nextc(); 14023 if (c != -1 && ISDIGIT(c)) { 14024 do { 14025 if (c == '_') { 14026 if (nondigit) break; 14027 nondigit = c; 14028 continue; 14029 } 14030 if (!ISDIGIT(c)) break; 14031 nondigit = 0; 14032 tokadd(c); 14033 } while ((c = nextc()) != -1); 14034 } 14035 pushback(c); 14036 tokfix(); 14037 if (toklen() == start) { 14038 no_digits(); 14039 } 14040 else if (nondigit) goto trailing_uc; 14041 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14042 return tINTEGER; 14043 } 14044 if (c == '_') { 14045 /* 0_0 */ 14046 goto octal_number; 14047 } 14048 if (c == 'o' || c == 'O') { 14049 /* prefixed octal */ 14050 c = nextc(); 14051 if (c == -1 || c == '_' || !ISDIGIT(c)) { 14052 no_digits(); 14053 } 14054 } 14055 if (c >= '0' && c <= '7') { 14056 /* octal */ 14057 octal_number: 14058 do { 14059 if (c == '_') { 14060 if (nondigit) break; 14061 nondigit = c; 14062 continue; 14063 } 14064 if (c < '0' || c > '9') break; 14065 if (c > '7') goto invalid_octal; 14066 nondigit = 0; 14067 tokadd(c); 14068 } while ((c = nextc()) != -1); 14069 if (toklen() > start) { 14070 pushback(c); 14071 tokfix(); 14072 if (nondigit) goto trailing_uc; 14073 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE)); 14074 return tINTEGER; 14075 } 14076 if (nondigit) { 14077 pushback(c); 14078 goto trailing_uc; 14079 } 14080 } 14081 if (c > '7' && c <= '9') { 14082 invalid_octal: 14083 yyerror("Invalid octal digit"); 14084 } 14085 else if (c == '.' || c == 'e' || c == 'E') { 14086 tokadd('0'); 14087 } 14088 else { 14089 pushback(c); 14090 set_yylval_literal(INT2FIX(0)); 14091 return tINTEGER; 14092 } 14093 } 14094 14095 for (;;) { 14096 switch (c) { 14097 case '0': case '1': case '2': case '3': case '4': 14098 case '5': case '6': case '7': case '8': case '9': 14099 nondigit = 0; 14100 tokadd(c); 14101 break; 14102 14103 case '.': 14104 if (nondigit) goto trailing_uc; 14105 if (seen_point || seen_e) { 14106 goto decode_num; 14107 } 14108 else { 14109 int c0 = nextc(); 14110 if (c0 == -1 || !ISDIGIT(c0)) { 14111 pushback(c0); 14112 goto decode_num; 14113 } 14114 c = c0; 14115 } 14116 tokadd('.'); 14117 tokadd(c); 14118 is_float++; 14119 seen_point++; 14120 nondigit = 0; 14121 break; 14122 14123 case 'e': 14124 case 'E': 14125 if (nondigit) { 14126 pushback(c); 14127 c = nondigit; 14128 goto decode_num; 14129 } 14130 if (seen_e) { 14131 goto decode_num; 14132 } 14133 tokadd(c); 14134 seen_e++; 14135 is_float++; 14136 nondigit = c; 14137 c = nextc(); 14138 if (c != '-' && c != '+') continue; 14139 tokadd(c); 14140 nondigit = c; 14141 break; 14142 14143 case '_': /* `_' in number just ignored */ 14144 if (nondigit) goto decode_num; 14145 nondigit = c; 14146 break; 14147 14148 default: 14149 goto decode_num; 14150 } 14151 c = nextc(); 14152 } 14153 14154 decode_num: 14155 pushback(c); 14156 if (nondigit) { 14157 char tmp[30]; 14158 trailing_uc: 14159 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit); 14160 yyerror(tmp); 14161 } 14162 tokfix(); 14163 if (is_float) { 14164 double d = strtod(tok(), 0); 14165 if (errno == ERANGE) { 14166 rb_warningS("Float %s out of range", tok()); 14167 errno = 0; 14168 } 14169 set_yylval_literal(DBL2NUM(d)); 14170 return tFLOAT; 14171 } 14172 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE)); 14173 return tINTEGER; 14174 } 14175 14176 case ')': 14177 case ']': 14178 paren_nest--; 14179 case '}': 14180 COND_LEXPOP(); 14181 CMDARG_LEXPOP(); 14182 if (c == ')') 14183 lex_state = EXPR_ENDFN; 14184 else 14185 lex_state = EXPR_ENDARG; 14186 if (c == '}') { 14187 if (!brace_nest--) c = tSTRING_DEND; 14188 } 14189 return c; 14190 14191 case ':': 14192 c = nextc(); 14193 if (c == ':') { 14194 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) { 14195 lex_state = EXPR_BEG; 14196 return tCOLON3; 14197 } 14198 lex_state = EXPR_DOT; 14199 return tCOLON2; 14200 } 14201 if (IS_END() || ISSPACE(c)) { 14202 pushback(c); 14203 warn_balanced(":", "symbol literal"); 14204 lex_state = EXPR_BEG; 14205 return ':'; 14206 } 14207 switch (c) { 14208 case '\'': 14209 lex_strterm = NEW_STRTERM(str_ssym, c, 0); 14210 break; 14211 case '"': 14212 lex_strterm = NEW_STRTERM(str_dsym, c, 0); 14213 break; 14214 default: 14215 pushback(c); 14216 break; 14217 } 14218 lex_state = EXPR_FNAME; 14219 return tSYMBEG; 14220 14221 case '/': 14222 if (IS_lex_state(EXPR_BEG_ANY)) { 14223 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14224 return tREGEXP_BEG; 14225 } 14226 if ((c = nextc()) == '=') { 14227 set_yylval_id('/'); 14228 lex_state = EXPR_BEG; 14229 return tOP_ASGN; 14230 } 14231 pushback(c); 14232 if (IS_SPCARG(c)) { 14233 (void)arg_ambiguous(); 14234 lex_strterm = NEW_STRTERM(str_regexp, '/', 0); 14235 return tREGEXP_BEG; 14236 } 14237 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14238 warn_balanced("/", "regexp literal"); 14239 return '/'; 14240 14241 case '^': 14242 if ((c = nextc()) == '=') { 14243 set_yylval_id('^'); 14244 lex_state = EXPR_BEG; 14245 return tOP_ASGN; 14246 } 14247 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14248 pushback(c); 14249 return '^'; 14250 14251 case ';': 14252 lex_state = EXPR_BEG; 14253 command_start = TRUE; 14254 return ';'; 14255 14256 case ',': 14257 lex_state = EXPR_BEG; 14258 return ','; 14259 14260 case '~': 14261 if (IS_AFTER_OPERATOR()) { 14262 if ((c = nextc()) != '@') { 14263 pushback(c); 14264 } 14265 lex_state = EXPR_ARG; 14266 } 14267 else { 14268 lex_state = EXPR_BEG; 14269 } 14270 return '~'; 14271 14272 case '(': 14273 if (IS_BEG()) { 14274 c = tLPAREN; 14275 } 14276 else if (IS_SPCARG(-1)) { 14277 c = tLPAREN_ARG; 14278 } 14279 paren_nest++; 14280 COND_PUSH(0); 14281 CMDARG_PUSH(0); 14282 lex_state = EXPR_BEG; 14283 return c; 14284 14285 case '[': 14286 paren_nest++; 14287 if (IS_AFTER_OPERATOR()) { 14288 lex_state = EXPR_ARG; 14289 if ((c = nextc()) == ']') { 14290 if ((c = nextc()) == '=') { 14291 return tASET; 14292 } 14293 pushback(c); 14294 return tAREF; 14295 } 14296 pushback(c); 14297 return '['; 14298 } 14299 else if (IS_BEG()) { 14300 c = tLBRACK; 14301 } 14302 else if (IS_ARG() && space_seen) { 14303 c = tLBRACK; 14304 } 14305 lex_state = EXPR_BEG; 14306 COND_PUSH(0); 14307 CMDARG_PUSH(0); 14308 return c; 14309 14310 case '{': 14311 ++brace_nest; 14312 if (lpar_beg && lpar_beg == paren_nest) { 14313 lex_state = EXPR_BEG; 14314 lpar_beg = 0; 14315 --paren_nest; 14316 COND_PUSH(0); 14317 CMDARG_PUSH(0); 14318 return tLAMBEG; 14319 } 14320 if (IS_ARG() || IS_lex_state(EXPR_END | EXPR_ENDFN)) 14321 c = '{'; /* block (primary) */ 14322 else if (IS_lex_state(EXPR_ENDARG)) 14323 c = tLBRACE_ARG; /* block (expr) */ 14324 else 14325 c = tLBRACE; /* hash */ 14326 COND_PUSH(0); 14327 CMDARG_PUSH(0); 14328 lex_state = EXPR_BEG; 14329 if (c != tLBRACE) command_start = TRUE; 14330 return c; 14331 14332 case '\\': 14333 c = nextc(); 14334 if (c == '\n') { 14335 space_seen = 1; 14336#ifdef RIPPER 14337 ripper_dispatch_scan_event(parser, tSP); 14338#endif 14339 goto retry; /* skip \\n */ 14340 } 14341 pushback(c); 14342 return '\\'; 14343 14344 case '%': 14345 if (IS_lex_state(EXPR_BEG_ANY)) { 14346 int term; 14347 int paren; 14348 14349 c = nextc(); 14350 quotation: 14351 if (c == -1 || !ISALNUM(c)) { 14352 term = c; 14353 c = 'Q'; 14354 } 14355 else { 14356 term = nextc(); 14357 if (rb_enc_isalnum(term, current_enc) || !parser_isascii()) { 14358 yyerror("unknown type of %string"); 14359 return 0; 14360 } 14361 } 14362 if (c == -1 || term == -1) { 14363 compile_error(PARSER_ARG "unterminated quoted string meets end of file"); 14364 return 0; 14365 } 14366 paren = term; 14367 if (term == '(') term = ')'; 14368 else if (term == '[') term = ']'; 14369 else if (term == '{') term = '}'; 14370 else if (term == '<') term = '>'; 14371 else paren = 0; 14372 14373 switch (c) { 14374 case 'Q': 14375 lex_strterm = NEW_STRTERM(str_dquote, term, paren); 14376 return tSTRING_BEG; 14377 14378 case 'q': 14379 lex_strterm = NEW_STRTERM(str_squote, term, paren); 14380 return tSTRING_BEG; 14381 14382 case 'W': 14383 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14384 do {c = nextc();} while (ISSPACE(c)); 14385 pushback(c); 14386 return tWORDS_BEG; 14387 14388 case 'w': 14389 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14390 do {c = nextc();} while (ISSPACE(c)); 14391 pushback(c); 14392 return tQWORDS_BEG; 14393 14394 case 'I': 14395 lex_strterm = NEW_STRTERM(str_dword, term, paren); 14396 do {c = nextc();} while (ISSPACE(c)); 14397 pushback(c); 14398 return tSYMBOLS_BEG; 14399 14400 case 'i': 14401 lex_strterm = NEW_STRTERM(str_sword, term, paren); 14402 do {c = nextc();} while (ISSPACE(c)); 14403 pushback(c); 14404 return tQSYMBOLS_BEG; 14405 14406 case 'x': 14407 lex_strterm = NEW_STRTERM(str_xquote, term, paren); 14408 return tXSTRING_BEG; 14409 14410 case 'r': 14411 lex_strterm = NEW_STRTERM(str_regexp, term, paren); 14412 return tREGEXP_BEG; 14413 14414 case 's': 14415 lex_strterm = NEW_STRTERM(str_ssym, term, paren); 14416 lex_state = EXPR_FNAME; 14417 return tSYMBEG; 14418 14419 default: 14420 yyerror("unknown type of %string"); 14421 return 0; 14422 } 14423 } 14424 if ((c = nextc()) == '=') { 14425 set_yylval_id('%'); 14426 lex_state = EXPR_BEG; 14427 return tOP_ASGN; 14428 } 14429 if (IS_SPCARG(c)) { 14430 goto quotation; 14431 } 14432 lex_state = IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG; 14433 pushback(c); 14434 warn_balanced("%%", "string literal"); 14435 return '%'; 14436 14437 case '$': 14438 lex_state = EXPR_END; 14439 newtok(); 14440 c = nextc(); 14441 switch (c) { 14442 case '_': /* $_: last read line string */ 14443 c = nextc(); 14444 if (parser_is_identchar()) { 14445 tokadd('$'); 14446 tokadd('_'); 14447 break; 14448 } 14449 pushback(c); 14450 c = '_'; 14451 /* fall through */ 14452 case '~': /* $~: match-data */ 14453 case '*': /* $*: argv */ 14454 case '$': /* $$: pid */ 14455 case '?': /* $?: last status */ 14456 case '!': /* $!: error string */ 14457 case '@': /* $@: error position */ 14458 case '/': /* $/: input record separator */ 14459 case '\\': /* $\: output record separator */ 14460 case ';': /* $;: field separator */ 14461 case ',': /* $,: output field separator */ 14462 case '.': /* $.: last read line number */ 14463 case '=': /* $=: ignorecase */ 14464 case ':': /* $:: load path */ 14465 case '<': /* $<: reading filename */ 14466 case '>': /* $>: default output handle */ 14467 case '\"': /* $": already loaded files */ 14468 tokadd('$'); 14469 tokadd(c); 14470 tokfix(); 14471 set_yylval_name(rb_intern(tok())); 14472 return tGVAR; 14473 14474 case '-': 14475 tokadd('$'); 14476 tokadd(c); 14477 c = nextc(); 14478 if (parser_is_identchar()) { 14479 if (tokadd_mbchar(c) == -1) return 0; 14480 } 14481 else { 14482 pushback(c); 14483 } 14484 gvar: 14485 tokfix(); 14486 set_yylval_name(rb_intern(tok())); 14487 return tGVAR; 14488 14489 case '&': /* $&: last match */ 14490 case '`': /* $`: string before last match */ 14491 case '\'': /* $': string after last match */ 14492 case '+': /* $+: string matches last paren. */ 14493 if (IS_lex_state_for(last_state, EXPR_FNAME)) { 14494 tokadd('$'); 14495 tokadd(c); 14496 goto gvar; 14497 } 14498 set_yylval_node(NEW_BACK_REF(c)); 14499 return tBACK_REF; 14500 14501 case '1': case '2': case '3': 14502 case '4': case '5': case '6': 14503 case '7': case '8': case '9': 14504 tokadd('$'); 14505 do { 14506 tokadd(c); 14507 c = nextc(); 14508 } while (c != -1 && ISDIGIT(c)); 14509 pushback(c); 14510 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar; 14511 tokfix(); 14512 set_yylval_node(NEW_NTH_REF(atoi(tok()+1))); 14513 return tNTH_REF; 14514 14515 default: 14516 if (!parser_is_identchar()) { 14517 pushback(c); 14518 compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c); 14519 return 0; 14520 } 14521 case '0': 14522 tokadd('$'); 14523 } 14524 break; 14525 14526 case '@': 14527 c = nextc(); 14528 newtok(); 14529 tokadd('@'); 14530 if (c == '@') { 14531 tokadd('@'); 14532 c = nextc(); 14533 } 14534 if (c != -1 && (ISDIGIT(c) || !parser_is_identchar())) { 14535 pushback(c); 14536 if (tokidx == 1) { 14537 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c); 14538 } 14539 else { 14540 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c); 14541 } 14542 return 0; 14543 } 14544 break; 14545 14546 case '_': 14547 if (was_bol() && whole_match_p("__END__", 7, 0)) { 14548 ruby__end__seen = 1; 14549 parser->eofp = Qtrue; 14550#ifndef RIPPER 14551 return -1; 14552#else 14553 lex_goto_eol(parser); 14554 ripper_dispatch_scan_event(parser, k__END__); 14555 return 0; 14556#endif 14557 } 14558 newtok(); 14559 break; 14560 14561 default: 14562 if (!parser_is_identchar()) { 14563 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c); 14564 goto retry; 14565 } 14566 14567 newtok(); 14568 break; 14569 } 14570 14571 mb = ENC_CODERANGE_7BIT; 14572 do { 14573 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; 14574 if (tokadd_mbchar(c) == -1) return 0; 14575 c = nextc(); 14576 } while (parser_is_identchar()); 14577 switch (tok()[0]) { 14578 case '@': case '$': 14579 pushback(c); 14580 break; 14581 default: 14582 if ((c == '!' || c == '?') && !peek('=')) { 14583 tokadd(c); 14584 } 14585 else { 14586 pushback(c); 14587 } 14588 } 14589 tokfix(); 14590 14591 { 14592 int result = 0; 14593 14594 last_state = lex_state; 14595 switch (tok()[0]) { 14596 case '$': 14597 lex_state = EXPR_END; 14598 result = tGVAR; 14599 break; 14600 case '@': 14601 lex_state = EXPR_END; 14602 if (tok()[1] == '@') 14603 result = tCVAR; 14604 else 14605 result = tIVAR; 14606 break; 14607 14608 default: 14609 if (toklast() == '!' || toklast() == '?') { 14610 result = tFID; 14611 } 14612 else { 14613 if (IS_lex_state(EXPR_FNAME)) { 14614 if ((c = nextc()) == '=' && !peek('~') && !peek('>') && 14615 (!peek('=') || (peek_n('>', 1)))) { 14616 result = tIDENTIFIER; 14617 tokadd(c); 14618 tokfix(); 14619 } 14620 else { 14621 pushback(c); 14622 } 14623 } 14624 if (result == 0 && ISUPPER(tok()[0])) { 14625 result = tCONSTANT; 14626 } 14627 else { 14628 result = tIDENTIFIER; 14629 } 14630 } 14631 14632 if (IS_LABEL_POSSIBLE()) { 14633 if (IS_LABEL_SUFFIX(0)) { 14634 lex_state = EXPR_BEG; 14635 nextc(); 14636 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb))); 14637 return tLABEL; 14638 } 14639 } 14640 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) { 14641 const struct kwtable *kw; 14642 14643 /* See if it is a reserved word. */ 14644 kw = rb_reserved_word(tok(), toklen()); 14645 if (kw) { 14646 enum lex_state_e state = lex_state; 14647 lex_state = kw->state; 14648 if (state == EXPR_FNAME) { 14649 set_yylval_name(rb_intern(kw->name)); 14650 return kw->id[0]; 14651 } 14652 if (lex_state == EXPR_BEG) { 14653 command_start = TRUE; 14654 } 14655 if (kw->id[0] == keyword_do) { 14656 if (lpar_beg && lpar_beg == paren_nest) { 14657 lpar_beg = 0; 14658 --paren_nest; 14659 return keyword_do_LAMBDA; 14660 } 14661 if (COND_P()) return keyword_do_cond; 14662 if (CMDARG_P() && state != EXPR_CMDARG) 14663 return keyword_do_block; 14664 if (state & (EXPR_BEG | EXPR_ENDARG)) 14665 return keyword_do_block; 14666 return keyword_do; 14667 } 14668 if (state & (EXPR_BEG | EXPR_VALUE)) 14669 return kw->id[0]; 14670 else { 14671 if (kw->id[0] != kw->id[1]) 14672 lex_state = EXPR_BEG; 14673 return kw->id[1]; 14674 } 14675 } 14676 } 14677 14678 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) { 14679 if (cmd_state) { 14680 lex_state = EXPR_CMDARG; 14681 } 14682 else { 14683 lex_state = EXPR_ARG; 14684 } 14685 } 14686 else if (lex_state == EXPR_FNAME) { 14687 lex_state = EXPR_ENDFN; 14688 } 14689 else { 14690 lex_state = EXPR_END; 14691 } 14692 } 14693 { 14694 ID ident = TOK_INTERN(!ENC_SINGLE(mb)); 14695 14696 set_yylval_name(ident); 14697 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) && 14698 is_local_id(ident) && lvar_defined(ident)) { 14699 lex_state = EXPR_END; 14700 } 14701 } 14702 return result; 14703 } 14704} 14705 14706#if YYPURE 14707static int 14708yylex(void *lval, void *p) 14709#else 14710yylex(void *p) 14711#endif 14712{ 14713 struct parser_params *parser = (struct parser_params*)p; 14714 int t; 14715 14716#if YYPURE 14717 parser->parser_yylval = lval; 14718 parser->parser_yylval->val = Qundef; 14719#endif 14720 t = parser_yylex(parser); 14721#ifdef RIPPER 14722 if (!NIL_P(parser->delayed)) { 14723 ripper_dispatch_delayed_token(parser, t); 14724 return t; 14725 } 14726 if (t != 0) 14727 ripper_dispatch_scan_event(parser, t); 14728#endif 14729 14730 return t; 14731} 14732 14733#ifndef RIPPER 14734static NODE* 14735node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2) 14736{ 14737 NODE *n = (rb_node_newnode)(type, a0, a1, a2); 14738 nd_set_line(n, ruby_sourceline); 14739 return n; 14740} 14741 14742static enum node_type 14743nodetype(NODE *node) /* for debug */ 14744{ 14745 return (enum node_type)nd_type(node); 14746} 14747 14748static int 14749nodeline(NODE *node) 14750{ 14751 return nd_line(node); 14752} 14753 14754static NODE* 14755newline_node(NODE *node) 14756{ 14757 if (node) { 14758 node = remove_begin(node); 14759 node->flags |= NODE_FL_NEWLINE; 14760 } 14761 return node; 14762} 14763 14764static void 14765fixpos(NODE *node, NODE *orig) 14766{ 14767 if (!node) return; 14768 if (!orig) return; 14769 if (orig == (NODE*)1) return; 14770 nd_set_line(node, nd_line(orig)); 14771} 14772 14773static void 14774parser_warning(struct parser_params *parser, NODE *node, const char *mesg) 14775{ 14776 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg); 14777} 14778#define parser_warning(node, mesg) parser_warning(parser, (node), (mesg)) 14779 14780static void 14781parser_warn(struct parser_params *parser, NODE *node, const char *mesg) 14782{ 14783 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg); 14784} 14785#define parser_warn(node, mesg) parser_warn(parser, (node), (mesg)) 14786 14787static NODE* 14788block_append_gen(struct parser_params *parser, NODE *head, NODE *tail) 14789{ 14790 NODE *end, *h = head, *nd; 14791 14792 if (tail == 0) return head; 14793 14794 if (h == 0) return tail; 14795 switch (nd_type(h)) { 14796 case NODE_LIT: 14797 case NODE_STR: 14798 case NODE_SELF: 14799 case NODE_TRUE: 14800 case NODE_FALSE: 14801 case NODE_NIL: 14802 parser_warning(h, "unused literal ignored"); 14803 return tail; 14804 default: 14805 h = end = NEW_BLOCK(head); 14806 end->nd_end = end; 14807 fixpos(end, head); 14808 head = end; 14809 break; 14810 case NODE_BLOCK: 14811 end = h->nd_end; 14812 break; 14813 } 14814 14815 nd = end->nd_head; 14816 switch (nd_type(nd)) { 14817 case NODE_RETURN: 14818 case NODE_BREAK: 14819 case NODE_NEXT: 14820 case NODE_REDO: 14821 case NODE_RETRY: 14822 if (RTEST(ruby_verbose)) { 14823 parser_warning(tail, "statement not reached"); 14824 } 14825 break; 14826 14827 default: 14828 break; 14829 } 14830 14831 if (nd_type(tail) != NODE_BLOCK) { 14832 tail = NEW_BLOCK(tail); 14833 tail->nd_end = tail; 14834 } 14835 end->nd_next = tail; 14836 h->nd_end = tail->nd_end; 14837 return head; 14838} 14839 14840/* append item to the list */ 14841static NODE* 14842list_append_gen(struct parser_params *parser, NODE *list, NODE *item) 14843{ 14844 NODE *last; 14845 14846 if (list == 0) return NEW_LIST(item); 14847 if (list->nd_next) { 14848 last = list->nd_next->nd_end; 14849 } 14850 else { 14851 last = list; 14852 } 14853 14854 list->nd_alen += 1; 14855 last->nd_next = NEW_LIST(item); 14856 list->nd_next->nd_end = last->nd_next; 14857 return list; 14858} 14859 14860/* concat two lists */ 14861static NODE* 14862list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14863{ 14864 NODE *last; 14865 14866 if (head->nd_next) { 14867 last = head->nd_next->nd_end; 14868 } 14869 else { 14870 last = head; 14871 } 14872 14873 head->nd_alen += tail->nd_alen; 14874 last->nd_next = tail; 14875 if (tail->nd_next) { 14876 head->nd_next->nd_end = tail->nd_next->nd_end; 14877 } 14878 else { 14879 head->nd_next->nd_end = tail; 14880 } 14881 14882 return head; 14883} 14884 14885static int 14886literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) 14887{ 14888 if (NIL_P(tail)) return 1; 14889 if (!rb_enc_compatible(head, tail)) { 14890 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", 14891 rb_enc_name(rb_enc_get(head)), 14892 rb_enc_name(rb_enc_get(tail))); 14893 rb_str_resize(head, 0); 14894 rb_str_resize(tail, 0); 14895 return 0; 14896 } 14897 rb_str_buf_append(head, tail); 14898 return 1; 14899} 14900 14901/* concat two string literals */ 14902static NODE * 14903literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) 14904{ 14905 enum node_type htype; 14906 NODE *headlast; 14907 VALUE lit; 14908 14909 if (!head) return tail; 14910 if (!tail) return head; 14911 14912 htype = nd_type(head); 14913 if (htype == NODE_EVSTR) { 14914 NODE *node = NEW_DSTR(Qnil); 14915 head = list_append(node, head); 14916 htype = NODE_DSTR; 14917 } 14918 switch (nd_type(tail)) { 14919 case NODE_STR: 14920 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14921 nd_type(headlast) == NODE_STR) { 14922 htype = NODE_STR; 14923 lit = headlast->nd_lit; 14924 } 14925 else { 14926 lit = head->nd_lit; 14927 } 14928 if (htype == NODE_STR) { 14929 if (!literal_concat0(parser, lit, tail->nd_lit)) { 14930 error: 14931 rb_gc_force_recycle((VALUE)head); 14932 rb_gc_force_recycle((VALUE)tail); 14933 return 0; 14934 } 14935 rb_gc_force_recycle((VALUE)tail); 14936 } 14937 else { 14938 list_append(head, tail); 14939 } 14940 break; 14941 14942 case NODE_DSTR: 14943 if (htype == NODE_STR) { 14944 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) 14945 goto error; 14946 tail->nd_lit = head->nd_lit; 14947 rb_gc_force_recycle((VALUE)head); 14948 head = tail; 14949 } 14950 else if (NIL_P(tail->nd_lit)) { 14951 append: 14952 head->nd_alen += tail->nd_alen - 1; 14953 head->nd_next->nd_end->nd_next = tail->nd_next; 14954 head->nd_next->nd_end = tail->nd_next->nd_end; 14955 rb_gc_force_recycle((VALUE)tail); 14956 } 14957 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) && 14958 nd_type(headlast) == NODE_STR) { 14959 lit = headlast->nd_lit; 14960 if (!literal_concat0(parser, lit, tail->nd_lit)) 14961 goto error; 14962 tail->nd_lit = Qnil; 14963 goto append; 14964 } 14965 else { 14966 nd_set_type(tail, NODE_ARRAY); 14967 tail->nd_head = NEW_STR(tail->nd_lit); 14968 list_concat(head, tail); 14969 } 14970 break; 14971 14972 case NODE_EVSTR: 14973 if (htype == NODE_STR) { 14974 nd_set_type(head, NODE_DSTR); 14975 head->nd_alen = 1; 14976 } 14977 list_append(head, tail); 14978 break; 14979 } 14980 return head; 14981} 14982 14983static NODE * 14984evstr2dstr_gen(struct parser_params *parser, NODE *node) 14985{ 14986 if (nd_type(node) == NODE_EVSTR) { 14987 node = list_append(NEW_DSTR(Qnil), node); 14988 } 14989 return node; 14990} 14991 14992static NODE * 14993new_evstr_gen(struct parser_params *parser, NODE *node) 14994{ 14995 NODE *head = node; 14996 14997 if (node) { 14998 switch (nd_type(node)) { 14999 case NODE_STR: case NODE_DSTR: case NODE_EVSTR: 15000 return node; 15001 } 15002 } 15003 return NEW_EVSTR(head); 15004} 15005 15006static NODE * 15007call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1) 15008{ 15009 value_expr(recv); 15010 value_expr(arg1); 15011 return NEW_CALL(recv, id, NEW_LIST(arg1)); 15012} 15013 15014static NODE * 15015call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id) 15016{ 15017 value_expr(recv); 15018 return NEW_CALL(recv, id, 0); 15019} 15020 15021static NODE* 15022match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15023{ 15024 value_expr(node1); 15025 value_expr(node2); 15026 if (node1) { 15027 switch (nd_type(node1)) { 15028 case NODE_DREGX: 15029 case NODE_DREGX_ONCE: 15030 return NEW_MATCH2(node1, node2); 15031 15032 case NODE_LIT: 15033 if (RB_TYPE_P(node1->nd_lit, T_REGEXP)) { 15034 return NEW_MATCH2(node1, node2); 15035 } 15036 } 15037 } 15038 15039 if (node2) { 15040 switch (nd_type(node2)) { 15041 case NODE_DREGX: 15042 case NODE_DREGX_ONCE: 15043 return NEW_MATCH3(node2, node1); 15044 15045 case NODE_LIT: 15046 if (RB_TYPE_P(node2->nd_lit, T_REGEXP)) { 15047 return NEW_MATCH3(node2, node1); 15048 } 15049 } 15050 } 15051 15052 return NEW_CALL(node1, tMATCH, NEW_LIST(node2)); 15053} 15054 15055static NODE* 15056gettable_gen(struct parser_params *parser, ID id) 15057{ 15058 switch (id) { 15059 case keyword_self: 15060 return NEW_SELF(); 15061 case keyword_nil: 15062 return NEW_NIL(); 15063 case keyword_true: 15064 return NEW_TRUE(); 15065 case keyword_false: 15066 return NEW_FALSE(); 15067 case keyword__FILE__: 15068 return NEW_STR(rb_str_dup(ruby_sourcefile_string)); 15069 case keyword__LINE__: 15070 return NEW_LIT(INT2FIX(tokline)); 15071 case keyword__ENCODING__: 15072 return NEW_LIT(rb_enc_from_encoding(current_enc)); 15073 } 15074 switch (id_type(id)) { 15075 case ID_LOCAL: 15076 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id); 15077 if (local_id(id)) return NEW_LVAR(id); 15078 /* method call without arguments */ 15079 return NEW_VCALL(id); 15080 case ID_GLOBAL: 15081 return NEW_GVAR(id); 15082 case ID_INSTANCE: 15083 return NEW_IVAR(id); 15084 case ID_CONST: 15085 return NEW_CONST(id); 15086 case ID_CLASS: 15087 return NEW_CVAR(id); 15088 } 15089 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15090 return 0; 15091} 15092#else /* !RIPPER */ 15093static int 15094id_is_var_gen(struct parser_params *parser, ID id) 15095{ 15096 if (is_notop_id(id)) { 15097 switch (id & ID_SCOPE_MASK) { 15098 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS: 15099 return 1; 15100 case ID_LOCAL: 15101 if (dyna_in_block() && dvar_defined(id)) return 1; 15102 if (local_id(id)) return 1; 15103 /* method call without arguments */ 15104 return 0; 15105 } 15106 } 15107 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id)); 15108 return 0; 15109} 15110#endif /* !RIPPER */ 15111 15112#if PARSER_DEBUG 15113static const char * 15114lex_state_name(enum lex_state_e state) 15115{ 15116 static const char names[][12] = { 15117 "EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG", 15118 "EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS", 15119 "EXPR_VALUE", 15120 }; 15121 15122 if ((unsigned)state & ~(~0u << EXPR_MAX_STATE)) 15123 return names[ffs(state)]; 15124 return NULL; 15125} 15126#endif 15127 15128#ifdef RIPPER 15129static VALUE 15130assignable_gen(struct parser_params *parser, VALUE lhs) 15131#else 15132static NODE* 15133assignable_gen(struct parser_params *parser, ID id, NODE *val) 15134#endif 15135{ 15136#ifdef RIPPER 15137 ID id = get_id(lhs); 15138# define assignable_result(x) get_value(lhs) 15139# define parser_yyerror(parser, x) dispatch1(assign_error, lhs) 15140#else 15141# define assignable_result(x) (x) 15142#endif 15143 if (!id) return assignable_result(0); 15144 switch (id) { 15145 case keyword_self: 15146 yyerror("Can't change the value of self"); 15147 goto error; 15148 case keyword_nil: 15149 yyerror("Can't assign to nil"); 15150 goto error; 15151 case keyword_true: 15152 yyerror("Can't assign to true"); 15153 goto error; 15154 case keyword_false: 15155 yyerror("Can't assign to false"); 15156 goto error; 15157 case keyword__FILE__: 15158 yyerror("Can't assign to __FILE__"); 15159 goto error; 15160 case keyword__LINE__: 15161 yyerror("Can't assign to __LINE__"); 15162 goto error; 15163 case keyword__ENCODING__: 15164 yyerror("Can't assign to __ENCODING__"); 15165 goto error; 15166 } 15167 switch (id_type(id)) { 15168 case ID_LOCAL: 15169 if (dyna_in_block()) { 15170 if (dvar_curr(id)) { 15171 return assignable_result(NEW_DASGN_CURR(id, val)); 15172 } 15173 else if (dvar_defined(id)) { 15174 return assignable_result(NEW_DASGN(id, val)); 15175 } 15176 else if (local_id(id)) { 15177 return assignable_result(NEW_LASGN(id, val)); 15178 } 15179 else { 15180 dyna_var(id); 15181 return assignable_result(NEW_DASGN_CURR(id, val)); 15182 } 15183 } 15184 else { 15185 if (!local_id(id)) { 15186 local_var(id); 15187 } 15188 return assignable_result(NEW_LASGN(id, val)); 15189 } 15190 break; 15191 case ID_GLOBAL: 15192 return assignable_result(NEW_GASGN(id, val)); 15193 case ID_INSTANCE: 15194 return assignable_result(NEW_IASGN(id, val)); 15195 case ID_CONST: 15196 if (!in_def && !in_single) 15197 return assignable_result(NEW_CDECL(id, val, 0)); 15198 yyerror("dynamic constant assignment"); 15199 break; 15200 case ID_CLASS: 15201 return assignable_result(NEW_CVASGN(id, val)); 15202 default: 15203 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id)); 15204 } 15205 error: 15206 return assignable_result(0); 15207#undef assignable_result 15208#undef parser_yyerror 15209} 15210 15211static int 15212is_private_local_id(ID name) 15213{ 15214 VALUE s; 15215 if (name == idUScore) return 1; 15216 if (!is_local_id(name)) return 0; 15217 s = rb_id2str(name); 15218 if (!s) return 0; 15219 return RSTRING_PTR(s)[0] == '_'; 15220} 15221 15222#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1)) 15223 15224static ID 15225shadowing_lvar_gen(struct parser_params *parser, ID name) 15226{ 15227 if (is_private_local_id(name)) return name; 15228 if (dyna_in_block()) { 15229 if (dvar_curr(name)) { 15230 yyerror("duplicated argument name"); 15231 } 15232 else if (dvar_defined_get(name) || local_id(name)) { 15233 rb_warningS("shadowing outer local variable - %s", rb_id2name(name)); 15234 vtable_add(lvtbl->vars, name); 15235 if (lvtbl->used) { 15236 vtable_add(lvtbl->used, (ID)ruby_sourceline | LVAR_USED); 15237 } 15238 } 15239 } 15240 else { 15241 if (local_id(name)) { 15242 yyerror("duplicated argument name"); 15243 } 15244 } 15245 return name; 15246} 15247 15248static void 15249new_bv_gen(struct parser_params *parser, ID name) 15250{ 15251 if (!name) return; 15252 if (!is_local_id(name)) { 15253 compile_error(PARSER_ARG "invalid local variable - %s", 15254 rb_id2name(name)); 15255 return; 15256 } 15257 shadowing_lvar(name); 15258 dyna_var(name); 15259} 15260 15261#ifndef RIPPER 15262static NODE * 15263aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx) 15264{ 15265 if (recv && nd_type(recv) == NODE_SELF) 15266 recv = (NODE *)1; 15267 return NEW_ATTRASGN(recv, tASET, idx); 15268} 15269 15270static void 15271block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15272{ 15273 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) { 15274 compile_error(PARSER_ARG "both block arg and actual block given"); 15275 } 15276} 15277 15278static const char id_type_names[][9] = { 15279 "LOCAL", 15280 "INSTANCE", 15281 "", /* INSTANCE2 */ 15282 "GLOBAL", 15283 "ATTRSET", 15284 "CONST", 15285 "CLASS", 15286 "JUNK", 15287}; 15288 15289ID 15290rb_id_attrset(ID id) 15291{ 15292 if (!is_notop_id(id)) { 15293 switch (id) { 15294 case tAREF: case tASET: 15295 return tASET; /* only exception */ 15296 } 15297 rb_name_error(id, "cannot make operator ID :%s attrset", rb_id2name(id)); 15298 } 15299 else { 15300 int scope = (int)(id & ID_SCOPE_MASK); 15301 switch (scope) { 15302 case ID_LOCAL: case ID_INSTANCE: case ID_GLOBAL: 15303 case ID_CONST: case ID_CLASS: case ID_JUNK: 15304 break; 15305 case ID_ATTRSET: 15306 return id; 15307 default: 15308 rb_name_error(id, "cannot make %s ID %+"PRIsVALUE" attrset", 15309 id_type_names[scope], ID2SYM(id)); 15310 15311 } 15312 } 15313 id &= ~ID_SCOPE_MASK; 15314 id |= ID_ATTRSET; 15315 return id; 15316} 15317 15318static NODE * 15319attrset_gen(struct parser_params *parser, NODE *recv, ID id) 15320{ 15321 if (recv && nd_type(recv) == NODE_SELF) 15322 recv = (NODE *)1; 15323 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0); 15324} 15325 15326static void 15327rb_backref_error_gen(struct parser_params *parser, NODE *node) 15328{ 15329 switch (nd_type(node)) { 15330 case NODE_NTH_REF: 15331 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth); 15332 break; 15333 case NODE_BACK_REF: 15334 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth); 15335 break; 15336 } 15337} 15338 15339static NODE * 15340arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15341{ 15342 if (!node2) return node1; 15343 switch (nd_type(node1)) { 15344 case NODE_BLOCK_PASS: 15345 if (node1->nd_head) 15346 node1->nd_head = arg_concat(node1->nd_head, node2); 15347 else 15348 node1->nd_head = NEW_LIST(node2); 15349 return node1; 15350 case NODE_ARGSPUSH: 15351 if (nd_type(node2) != NODE_ARRAY) break; 15352 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2); 15353 nd_set_type(node1, NODE_ARGSCAT); 15354 return node1; 15355 case NODE_ARGSCAT: 15356 if (nd_type(node2) != NODE_ARRAY || 15357 nd_type(node1->nd_body) != NODE_ARRAY) break; 15358 node1->nd_body = list_concat(node1->nd_body, node2); 15359 return node1; 15360 } 15361 return NEW_ARGSCAT(node1, node2); 15362} 15363 15364static NODE * 15365arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2) 15366{ 15367 if (!node1) return NEW_LIST(node2); 15368 switch (nd_type(node1)) { 15369 case NODE_ARRAY: 15370 return list_append(node1, node2); 15371 case NODE_BLOCK_PASS: 15372 node1->nd_head = arg_append(node1->nd_head, node2); 15373 return node1; 15374 case NODE_ARGSPUSH: 15375 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2); 15376 nd_set_type(node1, NODE_ARGSCAT); 15377 return node1; 15378 } 15379 return NEW_ARGSPUSH(node1, node2); 15380} 15381 15382static NODE * 15383splat_array(NODE* node) 15384{ 15385 if (nd_type(node) == NODE_SPLAT) node = node->nd_head; 15386 if (nd_type(node) == NODE_ARRAY) return node; 15387 return 0; 15388} 15389 15390static NODE * 15391node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs) 15392{ 15393 if (!lhs) return 0; 15394 15395 switch (nd_type(lhs)) { 15396 case NODE_GASGN: 15397 case NODE_IASGN: 15398 case NODE_IASGN2: 15399 case NODE_LASGN: 15400 case NODE_DASGN: 15401 case NODE_DASGN_CURR: 15402 case NODE_MASGN: 15403 case NODE_CDECL: 15404 case NODE_CVASGN: 15405 lhs->nd_value = rhs; 15406 break; 15407 15408 case NODE_ATTRASGN: 15409 case NODE_CALL: 15410 lhs->nd_args = arg_append(lhs->nd_args, rhs); 15411 break; 15412 15413 default: 15414 /* should not happen */ 15415 break; 15416 } 15417 15418 return lhs; 15419} 15420 15421static int 15422value_expr_gen(struct parser_params *parser, NODE *node) 15423{ 15424 int cond = 0; 15425 15426 if (!node) { 15427 rb_warning0("empty expression"); 15428 } 15429 while (node) { 15430 switch (nd_type(node)) { 15431 case NODE_DEFN: 15432 case NODE_DEFS: 15433 parser_warning(node, "void value expression"); 15434 return FALSE; 15435 15436 case NODE_RETURN: 15437 case NODE_BREAK: 15438 case NODE_NEXT: 15439 case NODE_REDO: 15440 case NODE_RETRY: 15441 if (!cond) yyerror("void value expression"); 15442 /* or "control never reach"? */ 15443 return FALSE; 15444 15445 case NODE_BLOCK: 15446 while (node->nd_next) { 15447 node = node->nd_next; 15448 } 15449 node = node->nd_head; 15450 break; 15451 15452 case NODE_BEGIN: 15453 node = node->nd_body; 15454 break; 15455 15456 case NODE_IF: 15457 if (!node->nd_body) { 15458 node = node->nd_else; 15459 break; 15460 } 15461 else if (!node->nd_else) { 15462 node = node->nd_body; 15463 break; 15464 } 15465 if (!value_expr(node->nd_body)) return FALSE; 15466 node = node->nd_else; 15467 break; 15468 15469 case NODE_AND: 15470 case NODE_OR: 15471 cond = 1; 15472 node = node->nd_2nd; 15473 break; 15474 15475 default: 15476 return TRUE; 15477 } 15478 } 15479 15480 return TRUE; 15481} 15482 15483static void 15484void_expr_gen(struct parser_params *parser, NODE *node) 15485{ 15486 const char *useless = 0; 15487 15488 if (!RTEST(ruby_verbose)) return; 15489 15490 if (!node) return; 15491 switch (nd_type(node)) { 15492 case NODE_CALL: 15493 switch (node->nd_mid) { 15494 case '+': 15495 case '-': 15496 case '*': 15497 case '/': 15498 case '%': 15499 case tPOW: 15500 case tUPLUS: 15501 case tUMINUS: 15502 case '|': 15503 case '^': 15504 case '&': 15505 case tCMP: 15506 case '>': 15507 case tGEQ: 15508 case '<': 15509 case tLEQ: 15510 case tEQ: 15511 case tNEQ: 15512 useless = rb_id2name(node->nd_mid); 15513 break; 15514 } 15515 break; 15516 15517 case NODE_LVAR: 15518 case NODE_DVAR: 15519 case NODE_GVAR: 15520 case NODE_IVAR: 15521 case NODE_CVAR: 15522 case NODE_NTH_REF: 15523 case NODE_BACK_REF: 15524 useless = "a variable"; 15525 break; 15526 case NODE_CONST: 15527 useless = "a constant"; 15528 break; 15529 case NODE_LIT: 15530 case NODE_STR: 15531 case NODE_DSTR: 15532 case NODE_DREGX: 15533 case NODE_DREGX_ONCE: 15534 useless = "a literal"; 15535 break; 15536 case NODE_COLON2: 15537 case NODE_COLON3: 15538 useless = "::"; 15539 break; 15540 case NODE_DOT2: 15541 useless = ".."; 15542 break; 15543 case NODE_DOT3: 15544 useless = "..."; 15545 break; 15546 case NODE_SELF: 15547 useless = "self"; 15548 break; 15549 case NODE_NIL: 15550 useless = "nil"; 15551 break; 15552 case NODE_TRUE: 15553 useless = "true"; 15554 break; 15555 case NODE_FALSE: 15556 useless = "false"; 15557 break; 15558 case NODE_DEFINED: 15559 useless = "defined?"; 15560 break; 15561 } 15562 15563 if (useless) { 15564 int line = ruby_sourceline; 15565 15566 ruby_sourceline = nd_line(node); 15567 rb_warnS("possibly useless use of %s in void context", useless); 15568 ruby_sourceline = line; 15569 } 15570} 15571 15572static void 15573void_stmts_gen(struct parser_params *parser, NODE *node) 15574{ 15575 if (!RTEST(ruby_verbose)) return; 15576 if (!node) return; 15577 if (nd_type(node) != NODE_BLOCK) return; 15578 15579 for (;;) { 15580 if (!node->nd_next) return; 15581 void_expr0(node->nd_head); 15582 node = node->nd_next; 15583 } 15584} 15585 15586static NODE * 15587remove_begin(NODE *node) 15588{ 15589 NODE **n = &node, *n1 = node; 15590 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) { 15591 *n = n1 = n1->nd_body; 15592 } 15593 return node; 15594} 15595 15596static void 15597reduce_nodes_gen(struct parser_params *parser, NODE **body) 15598{ 15599 NODE *node = *body; 15600 15601 if (!node) { 15602 *body = NEW_NIL(); 15603 return; 15604 } 15605#define subnodes(n1, n2) \ 15606 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \ 15607 (!node->n2) ? (body = &node->n1, 1) : \ 15608 (reduce_nodes(&node->n1), body = &node->n2, 1)) 15609 15610 while (node) { 15611 int newline = (int)(node->flags & NODE_FL_NEWLINE); 15612 switch (nd_type(node)) { 15613 end: 15614 case NODE_NIL: 15615 *body = 0; 15616 return; 15617 case NODE_RETURN: 15618 *body = node = node->nd_stts; 15619 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15620 continue; 15621 case NODE_BEGIN: 15622 *body = node = node->nd_body; 15623 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15624 continue; 15625 case NODE_BLOCK: 15626 body = &node->nd_end->nd_head; 15627 break; 15628 case NODE_IF: 15629 if (subnodes(nd_body, nd_else)) break; 15630 return; 15631 case NODE_CASE: 15632 body = &node->nd_body; 15633 break; 15634 case NODE_WHEN: 15635 if (!subnodes(nd_body, nd_next)) goto end; 15636 break; 15637 case NODE_ENSURE: 15638 if (!subnodes(nd_head, nd_resq)) goto end; 15639 break; 15640 case NODE_RESCUE: 15641 if (node->nd_else) { 15642 body = &node->nd_resq; 15643 break; 15644 } 15645 if (!subnodes(nd_head, nd_resq)) goto end; 15646 break; 15647 default: 15648 return; 15649 } 15650 node = *body; 15651 if (newline && node) node->flags |= NODE_FL_NEWLINE; 15652 } 15653 15654#undef subnodes 15655} 15656 15657static int 15658is_static_content(NODE *node) 15659{ 15660 if (!node) return 1; 15661 switch (nd_type(node)) { 15662 case NODE_HASH: 15663 if (!(node = node->nd_head)) break; 15664 case NODE_ARRAY: 15665 do { 15666 if (!is_static_content(node->nd_head)) return 0; 15667 } while ((node = node->nd_next) != 0); 15668 case NODE_LIT: 15669 case NODE_STR: 15670 case NODE_NIL: 15671 case NODE_TRUE: 15672 case NODE_FALSE: 15673 case NODE_ZARRAY: 15674 break; 15675 default: 15676 return 0; 15677 } 15678 return 1; 15679} 15680 15681static int 15682assign_in_cond(struct parser_params *parser, NODE *node) 15683{ 15684 switch (nd_type(node)) { 15685 case NODE_MASGN: 15686 yyerror("multiple assignment in conditional"); 15687 return 1; 15688 15689 case NODE_LASGN: 15690 case NODE_DASGN: 15691 case NODE_DASGN_CURR: 15692 case NODE_GASGN: 15693 case NODE_IASGN: 15694 break; 15695 15696 default: 15697 return 0; 15698 } 15699 15700 if (!node->nd_value) return 1; 15701 if (is_static_content(node->nd_value)) { 15702 /* reports always */ 15703 parser_warn(node->nd_value, "found = in conditional, should be =="); 15704 } 15705 return 1; 15706} 15707 15708static void 15709warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15710{ 15711 if (!e_option_supplied(parser)) parser_warn(node, str); 15712} 15713 15714static void 15715warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str) 15716{ 15717 if (!e_option_supplied(parser)) parser_warning(node, str); 15718} 15719 15720static void 15721fixup_nodes(NODE **rootnode) 15722{ 15723 NODE *node, *next, *head; 15724 15725 for (node = *rootnode; node; node = next) { 15726 enum node_type type; 15727 VALUE val; 15728 15729 next = node->nd_next; 15730 head = node->nd_head; 15731 rb_gc_force_recycle((VALUE)node); 15732 *rootnode = next; 15733 switch (type = nd_type(head)) { 15734 case NODE_DOT2: 15735 case NODE_DOT3: 15736 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit, 15737 type == NODE_DOT3); 15738 rb_gc_force_recycle((VALUE)head->nd_beg); 15739 rb_gc_force_recycle((VALUE)head->nd_end); 15740 nd_set_type(head, NODE_LIT); 15741 head->nd_lit = val; 15742 break; 15743 default: 15744 break; 15745 } 15746 } 15747} 15748 15749static NODE *cond0(struct parser_params*,NODE*); 15750 15751static NODE* 15752range_op(struct parser_params *parser, NODE *node) 15753{ 15754 enum node_type type; 15755 15756 if (node == 0) return 0; 15757 15758 type = nd_type(node); 15759 value_expr(node); 15760 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) { 15761 warn_unless_e_option(parser, node, "integer literal in conditional range"); 15762 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$.")))); 15763 } 15764 return cond0(parser, node); 15765} 15766 15767static int 15768literal_node(NODE *node) 15769{ 15770 if (!node) return 1; /* same as NODE_NIL */ 15771 switch (nd_type(node)) { 15772 case NODE_LIT: 15773 case NODE_STR: 15774 case NODE_DSTR: 15775 case NODE_EVSTR: 15776 case NODE_DREGX: 15777 case NODE_DREGX_ONCE: 15778 case NODE_DSYM: 15779 return 2; 15780 case NODE_TRUE: 15781 case NODE_FALSE: 15782 case NODE_NIL: 15783 return 1; 15784 } 15785 return 0; 15786} 15787 15788static NODE* 15789cond0(struct parser_params *parser, NODE *node) 15790{ 15791 if (node == 0) return 0; 15792 assign_in_cond(parser, node); 15793 15794 switch (nd_type(node)) { 15795 case NODE_DSTR: 15796 case NODE_EVSTR: 15797 case NODE_STR: 15798 rb_warn0("string literal in condition"); 15799 break; 15800 15801 case NODE_DREGX: 15802 case NODE_DREGX_ONCE: 15803 warning_unless_e_option(parser, node, "regex literal in condition"); 15804 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_"))); 15805 15806 case NODE_AND: 15807 case NODE_OR: 15808 node->nd_1st = cond0(parser, node->nd_1st); 15809 node->nd_2nd = cond0(parser, node->nd_2nd); 15810 break; 15811 15812 case NODE_DOT2: 15813 case NODE_DOT3: 15814 node->nd_beg = range_op(parser, node->nd_beg); 15815 node->nd_end = range_op(parser, node->nd_end); 15816 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2); 15817 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3); 15818 if (!e_option_supplied(parser)) { 15819 int b = literal_node(node->nd_beg); 15820 int e = literal_node(node->nd_end); 15821 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) { 15822 parser_warn(node, "range literal in condition"); 15823 } 15824 } 15825 break; 15826 15827 case NODE_DSYM: 15828 parser_warning(node, "literal in condition"); 15829 break; 15830 15831 case NODE_LIT: 15832 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) { 15833 warn_unless_e_option(parser, node, "regex literal in condition"); 15834 nd_set_type(node, NODE_MATCH); 15835 } 15836 else { 15837 parser_warning(node, "literal in condition"); 15838 } 15839 default: 15840 break; 15841 } 15842 return node; 15843} 15844 15845static NODE* 15846cond_gen(struct parser_params *parser, NODE *node) 15847{ 15848 if (node == 0) return 0; 15849 return cond0(parser, node); 15850} 15851 15852static NODE* 15853logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right) 15854{ 15855 value_expr(left); 15856 if (left && (enum node_type)nd_type(left) == type) { 15857 NODE *node = left, *second; 15858 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) { 15859 node = second; 15860 } 15861 node->nd_2nd = NEW_NODE(type, second, right, 0); 15862 return left; 15863 } 15864 return NEW_NODE(type, left, right, 0); 15865} 15866 15867static void 15868no_blockarg(struct parser_params *parser, NODE *node) 15869{ 15870 if (node && nd_type(node) == NODE_BLOCK_PASS) { 15871 compile_error(PARSER_ARG "block argument should not be given"); 15872 } 15873} 15874 15875static NODE * 15876ret_args_gen(struct parser_params *parser, NODE *node) 15877{ 15878 if (node) { 15879 no_blockarg(parser, node); 15880 if (nd_type(node) == NODE_ARRAY) { 15881 if (node->nd_next == 0) { 15882 node = node->nd_head; 15883 } 15884 else { 15885 nd_set_type(node, NODE_VALUES); 15886 } 15887 } 15888 } 15889 return node; 15890} 15891 15892static NODE * 15893new_yield_gen(struct parser_params *parser, NODE *node) 15894{ 15895 if (node) no_blockarg(parser, node); 15896 15897 return NEW_YIELD(node); 15898} 15899 15900static NODE* 15901negate_lit(NODE *node) 15902{ 15903 switch (TYPE(node->nd_lit)) { 15904 case T_FIXNUM: 15905 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit)); 15906 break; 15907 case T_BIGNUM: 15908 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0); 15909 break; 15910 case T_FLOAT: 15911#if USE_FLONUM 15912 if (FLONUM_P(node->nd_lit)) { 15913 node->nd_lit = DBL2NUM(-RFLOAT_VALUE(node->nd_lit)); 15914 } 15915 else { 15916 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15917 } 15918#else 15919 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit); 15920#endif 15921 break; 15922 default: 15923 break; 15924 } 15925 return node; 15926} 15927 15928static NODE * 15929arg_blk_pass(NODE *node1, NODE *node2) 15930{ 15931 if (node2) { 15932 node2->nd_head = node1; 15933 return node2; 15934 } 15935 return node1; 15936} 15937 15938 15939static NODE* 15940new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail) 15941{ 15942 int saved_line = ruby_sourceline; 15943 struct rb_args_info *args = tail->nd_ainfo; 15944 15945 args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0; 15946 args->pre_init = m ? m->nd_next : 0; 15947 15948 args->post_args_num = p ? rb_long2int(p->nd_plen) : 0; 15949 args->post_init = p ? p->nd_next : 0; 15950 args->first_post_arg = p ? p->nd_pid : 0; 15951 15952 args->rest_arg = r; 15953 15954 args->opt_args = o; 15955 15956 ruby_sourceline = saved_line; 15957 15958 return tail; 15959} 15960 15961static NODE* 15962new_args_tail_gen(struct parser_params *parser, NODE *k, ID kr, ID b) 15963{ 15964 int saved_line = ruby_sourceline; 15965 struct rb_args_info *args; 15966 NODE *kw_rest_arg = 0; 15967 NODE *node; 15968 15969 args = ALLOC(struct rb_args_info); 15970 MEMZERO(args, struct rb_args_info, 1); 15971 node = NEW_NODE(NODE_ARGS, 0, 0, args); 15972 15973 args->block_arg = b; 15974 args->kw_args = k; 15975 if (k && !kr) kr = internal_id(); 15976 if (kr) { 15977 arg_var(kr); 15978 kw_rest_arg = NEW_DVAR(kr); 15979 } 15980 args->kw_rest_arg = kw_rest_arg; 15981 15982 ruby_sourceline = saved_line; 15983 return node; 15984} 15985 15986static NODE* 15987dsym_node_gen(struct parser_params *parser, NODE *node) 15988{ 15989 VALUE lit; 15990 15991 if (!node) { 15992 return NEW_LIT(ID2SYM(idNULL)); 15993 } 15994 15995 switch (nd_type(node)) { 15996 case NODE_DSTR: 15997 nd_set_type(node, NODE_DSYM); 15998 break; 15999 case NODE_STR: 16000 lit = node->nd_lit; 16001 node->nd_lit = ID2SYM(rb_intern_str(lit)); 16002 nd_set_type(node, NODE_LIT); 16003 break; 16004 default: 16005 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node)); 16006 break; 16007 } 16008 return node; 16009} 16010#endif /* !RIPPER */ 16011 16012#ifndef RIPPER 16013static NODE * 16014new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 16015{ 16016 NODE *asgn; 16017 16018 if (lhs) { 16019 ID vid = lhs->nd_vid; 16020 if (op == tOROP) { 16021 lhs->nd_value = rhs; 16022 asgn = NEW_OP_ASGN_OR(gettable(vid), lhs); 16023 if (is_asgn_or_id(vid)) { 16024 asgn->nd_aid = vid; 16025 } 16026 } 16027 else if (op == tANDOP) { 16028 lhs->nd_value = rhs; 16029 asgn = NEW_OP_ASGN_AND(gettable(vid), lhs); 16030 } 16031 else { 16032 asgn = lhs; 16033 asgn->nd_value = NEW_CALL(gettable(vid), op, NEW_LIST(rhs)); 16034 } 16035 } 16036 else { 16037 asgn = NEW_BEGIN(0); 16038 } 16039 return asgn; 16040} 16041 16042static NODE * 16043new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID attr, ID op, NODE *rhs) 16044{ 16045 NODE *asgn; 16046 16047 if (op == tOROP) { 16048 op = 0; 16049 } 16050 else if (op == tANDOP) { 16051 op = 1; 16052 } 16053 asgn = NEW_OP_ASGN2(lhs, attr, op, rhs); 16054 fixpos(asgn, lhs); 16055 return asgn; 16056} 16057 16058static NODE * 16059new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs) 16060{ 16061 NODE *asgn; 16062 16063 if (op == tOROP) { 16064 op = 0; 16065 } 16066 else if (op == tANDOP) { 16067 op = 1; 16068 } 16069 if (lhs) { 16070 asgn = NEW_OP_CDECL(lhs, op, rhs); 16071 } 16072 else { 16073 asgn = NEW_BEGIN(0); 16074 } 16075 fixpos(asgn, lhs); 16076 return asgn; 16077} 16078#else 16079static VALUE 16080new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs) 16081{ 16082 return dispatch3(opassign, lhs, op, rhs); 16083} 16084 16085static VALUE 16086new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs) 16087{ 16088 VALUE recv = dispatch3(field, lhs, type, attr); 16089 return dispatch3(opassign, recv, op, rhs); 16090} 16091#endif 16092 16093static void 16094warn_unused_var(struct parser_params *parser, struct local_vars *local) 16095{ 16096 int i, cnt; 16097 ID *v, *u; 16098 16099 if (!local->used) return; 16100 v = local->vars->tbl; 16101 u = local->used->tbl; 16102 cnt = local->used->pos; 16103 if (cnt != local->vars->pos) { 16104 rb_bug("local->used->pos != local->vars->pos"); 16105 } 16106 for (i = 0; i < cnt; ++i) { 16107 if (!v[i] || (u[i] & LVAR_USED)) continue; 16108 if (is_private_local_id(v[i])) continue; 16109 rb_warn4S(ruby_sourcefile, (int)u[i], "assigned but unused variable - %s", rb_id2name(v[i])); 16110 } 16111} 16112 16113static void 16114local_push_gen(struct parser_params *parser, int inherit_dvars) 16115{ 16116 struct local_vars *local; 16117 16118 local = ALLOC(struct local_vars); 16119 local->prev = lvtbl; 16120 local->args = vtable_alloc(0); 16121 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); 16122 local->used = !(inherit_dvars && 16123 (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) && 16124 RTEST(ruby_verbose) ? vtable_alloc(0) : 0; 16125 local->cmdargs = cmdarg_stack; 16126 cmdarg_stack = 0; 16127 lvtbl = local; 16128} 16129 16130static void 16131local_pop_gen(struct parser_params *parser) 16132{ 16133 struct local_vars *local = lvtbl->prev; 16134 if (lvtbl->used) { 16135 warn_unused_var(parser, lvtbl); 16136 vtable_free(lvtbl->used); 16137 } 16138 vtable_free(lvtbl->args); 16139 vtable_free(lvtbl->vars); 16140 cmdarg_stack = lvtbl->cmdargs; 16141 xfree(lvtbl); 16142 lvtbl = local; 16143} 16144 16145#ifndef RIPPER 16146static ID* 16147vtable_tblcpy(ID *buf, const struct vtable *src) 16148{ 16149 int i, cnt = vtable_size(src); 16150 16151 if (cnt > 0) { 16152 buf[0] = cnt; 16153 for (i = 0; i < cnt; i++) { 16154 buf[i] = src->tbl[i]; 16155 } 16156 return buf; 16157 } 16158 return 0; 16159} 16160 16161static ID* 16162local_tbl_gen(struct parser_params *parser) 16163{ 16164 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars); 16165 ID *buf; 16166 16167 if (cnt <= 0) return 0; 16168 buf = ALLOC_N(ID, cnt + 1); 16169 vtable_tblcpy(buf+1, lvtbl->args); 16170 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars); 16171 buf[0] = cnt; 16172 return buf; 16173} 16174#endif 16175 16176static int 16177arg_var_gen(struct parser_params *parser, ID id) 16178{ 16179 vtable_add(lvtbl->args, id); 16180 return vtable_size(lvtbl->args) - 1; 16181} 16182 16183static int 16184local_var_gen(struct parser_params *parser, ID id) 16185{ 16186 vtable_add(lvtbl->vars, id); 16187 if (lvtbl->used) { 16188 vtable_add(lvtbl->used, (ID)ruby_sourceline); 16189 } 16190 return vtable_size(lvtbl->vars) - 1; 16191} 16192 16193static int 16194local_id_gen(struct parser_params *parser, ID id) 16195{ 16196 struct vtable *vars, *args, *used; 16197 16198 vars = lvtbl->vars; 16199 args = lvtbl->args; 16200 used = lvtbl->used; 16201 16202 while (vars && POINTER_P(vars->prev)) { 16203 vars = vars->prev; 16204 args = args->prev; 16205 if (used) used = used->prev; 16206 } 16207 16208 if (vars && vars->prev == DVARS_INHERIT) { 16209 return rb_local_defined(id); 16210 } 16211 else if (vtable_included(args, id)) { 16212 return 1; 16213 } 16214 else { 16215 int i = vtable_included(vars, id); 16216 if (i && used) used->tbl[i-1] |= LVAR_USED; 16217 return i != 0; 16218 } 16219} 16220 16221static const struct vtable * 16222dyna_push_gen(struct parser_params *parser) 16223{ 16224 lvtbl->args = vtable_alloc(lvtbl->args); 16225 lvtbl->vars = vtable_alloc(lvtbl->vars); 16226 if (lvtbl->used) { 16227 lvtbl->used = vtable_alloc(lvtbl->used); 16228 } 16229 return lvtbl->args; 16230} 16231 16232static void 16233dyna_pop_1(struct parser_params *parser) 16234{ 16235 struct vtable *tmp; 16236 16237 if ((tmp = lvtbl->used) != 0) { 16238 warn_unused_var(parser, lvtbl); 16239 lvtbl->used = lvtbl->used->prev; 16240 vtable_free(tmp); 16241 } 16242 tmp = lvtbl->args; 16243 lvtbl->args = lvtbl->args->prev; 16244 vtable_free(tmp); 16245 tmp = lvtbl->vars; 16246 lvtbl->vars = lvtbl->vars->prev; 16247 vtable_free(tmp); 16248} 16249 16250static void 16251dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs) 16252{ 16253 while (lvtbl->args != lvargs) { 16254 dyna_pop_1(parser); 16255 if (!lvtbl->args) { 16256 struct local_vars *local = lvtbl->prev; 16257 xfree(lvtbl); 16258 lvtbl = local; 16259 } 16260 } 16261 dyna_pop_1(parser); 16262} 16263 16264static int 16265dyna_in_block_gen(struct parser_params *parser) 16266{ 16267 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE; 16268} 16269 16270static int 16271dvar_defined_gen(struct parser_params *parser, ID id, int get) 16272{ 16273 struct vtable *vars, *args, *used; 16274 int i; 16275 16276 args = lvtbl->args; 16277 vars = lvtbl->vars; 16278 used = lvtbl->used; 16279 16280 while (POINTER_P(vars)) { 16281 if (vtable_included(args, id)) { 16282 return 1; 16283 } 16284 if ((i = vtable_included(vars, id)) != 0) { 16285 if (used) used->tbl[i-1] |= LVAR_USED; 16286 return 1; 16287 } 16288 args = args->prev; 16289 vars = vars->prev; 16290 if (get) used = 0; 16291 if (used) used = used->prev; 16292 } 16293 16294 if (vars == DVARS_INHERIT) { 16295 return rb_dvar_defined(id); 16296 } 16297 16298 return 0; 16299} 16300 16301static int 16302dvar_curr_gen(struct parser_params *parser, ID id) 16303{ 16304 return (vtable_included(lvtbl->args, id) || 16305 vtable_included(lvtbl->vars, id)); 16306} 16307 16308#ifndef RIPPER 16309static void 16310reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options) 16311{ 16312 int c = RE_OPTION_ENCODING_IDX(options); 16313 16314 if (c) { 16315 int opt, idx; 16316 rb_char_to_option_kcode(c, &opt, &idx); 16317 if (idx != ENCODING_GET(str) && 16318 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16319 goto error; 16320 } 16321 ENCODING_SET(str, idx); 16322 } 16323 else if (RE_OPTION_ENCODING_NONE(options)) { 16324 if (!ENCODING_IS_ASCII8BIT(str) && 16325 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16326 c = 'n'; 16327 goto error; 16328 } 16329 rb_enc_associate(str, rb_ascii8bit_encoding()); 16330 } 16331 else if (current_enc == rb_usascii_encoding()) { 16332 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { 16333 /* raise in re.c */ 16334 rb_enc_associate(str, rb_usascii_encoding()); 16335 } 16336 else { 16337 rb_enc_associate(str, rb_ascii8bit_encoding()); 16338 } 16339 } 16340 return; 16341 16342 error: 16343 compile_error(PARSER_ARG 16344 "regexp encoding option '%c' differs from source encoding '%s'", 16345 c, rb_enc_name(rb_enc_get(str))); 16346} 16347 16348static int 16349reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options) 16350{ 16351 VALUE err; 16352 reg_fragment_setenc(str, options); 16353 err = rb_reg_check_preprocess(str); 16354 if (err != Qnil) { 16355 err = rb_obj_as_string(err); 16356 compile_error(PARSER_ARG "%s", RSTRING_PTR(err)); 16357 RB_GC_GUARD(err); 16358 return 0; 16359 } 16360 return 1; 16361} 16362 16363typedef struct { 16364 struct parser_params* parser; 16365 rb_encoding *enc; 16366 NODE *succ_block; 16367 NODE *fail_block; 16368 int num; 16369} reg_named_capture_assign_t; 16370 16371static int 16372reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end, 16373 int back_num, int *back_refs, OnigRegex regex, void *arg0) 16374{ 16375 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0; 16376 struct parser_params* parser = arg->parser; 16377 rb_encoding *enc = arg->enc; 16378 long len = name_end - name; 16379 const char *s = (const char *)name; 16380 ID var; 16381 16382 arg->num++; 16383 16384 if (arg->succ_block == 0) { 16385 arg->succ_block = NEW_BEGIN(0); 16386 arg->fail_block = NEW_BEGIN(0); 16387 } 16388 16389 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) || 16390 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) || 16391 !rb_enc_symname2_p(s, len, enc)) { 16392 return ST_CONTINUE; 16393 } 16394 var = rb_intern3(s, len, enc); 16395 if (dvar_defined(var) || local_id(var)) { 16396 rb_warningS("named capture conflicts a local variable - %s", 16397 rb_id2name(var)); 16398 } 16399 arg->succ_block = block_append(arg->succ_block, 16400 newline_node(node_assign(assignable(var,0), 16401 NEW_CALL( 16402 gettable(rb_intern("$~")), 16403 idAREF, 16404 NEW_LIST(NEW_LIT(ID2SYM(var)))) 16405 ))); 16406 arg->fail_block = block_append(arg->fail_block, 16407 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil)))); 16408 return ST_CONTINUE; 16409} 16410 16411static NODE * 16412reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match) 16413{ 16414 reg_named_capture_assign_t arg; 16415 16416 arg.parser = parser; 16417 arg.enc = rb_enc_get(regexp); 16418 arg.succ_block = 0; 16419 arg.fail_block = 0; 16420 arg.num = 0; 16421 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg); 16422 16423 if (arg.num == 0) 16424 return match; 16425 16426 return 16427 block_append( 16428 newline_node(match), 16429 NEW_IF(gettable(rb_intern("$~")), 16430 block_append( 16431 newline_node(arg.succ_block), 16432 newline_node( 16433 NEW_CALL( 16434 gettable(rb_intern("$~")), 16435 rb_intern("begin"), 16436 NEW_LIST(NEW_LIT(INT2FIX(0)))))), 16437 block_append( 16438 newline_node(arg.fail_block), 16439 newline_node( 16440 NEW_LIT(Qnil))))); 16441} 16442 16443static VALUE 16444reg_compile_gen(struct parser_params* parser, VALUE str, int options) 16445{ 16446 VALUE re; 16447 VALUE err; 16448 16449 reg_fragment_setenc(str, options); 16450 err = rb_errinfo(); 16451 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline); 16452 if (NIL_P(re)) { 16453 ID mesg = rb_intern("mesg"); 16454 VALUE m = rb_attr_get(rb_errinfo(), mesg); 16455 rb_set_errinfo(err); 16456 if (!NIL_P(err)) { 16457 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m); 16458 } 16459 else { 16460 compile_error(PARSER_ARG "%s", RSTRING_PTR(m)); 16461 } 16462 return Qnil; 16463 } 16464 return re; 16465} 16466 16467void 16468rb_gc_mark_parser(void) 16469{ 16470} 16471 16472NODE* 16473rb_parser_append_print(VALUE vparser, NODE *node) 16474{ 16475 NODE *prelude = 0; 16476 NODE *scope = node; 16477 struct parser_params *parser; 16478 16479 if (!node) return node; 16480 16481 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16482 16483 node = node->nd_body; 16484 16485 if (nd_type(node) == NODE_PRELUDE) { 16486 prelude = node; 16487 node = node->nd_body; 16488 } 16489 16490 node = block_append(node, 16491 NEW_FCALL(rb_intern("print"), 16492 NEW_ARRAY(NEW_GVAR(rb_intern("$_"))))); 16493 if (prelude) { 16494 prelude->nd_body = node; 16495 scope->nd_body = prelude; 16496 } 16497 else { 16498 scope->nd_body = node; 16499 } 16500 16501 return scope; 16502} 16503 16504NODE * 16505rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split) 16506{ 16507 NODE *prelude = 0; 16508 NODE *scope = node; 16509 struct parser_params *parser; 16510 16511 if (!node) return node; 16512 16513 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 16514 16515 node = node->nd_body; 16516 16517 if (nd_type(node) == NODE_PRELUDE) { 16518 prelude = node; 16519 node = node->nd_body; 16520 } 16521 if (split) { 16522 node = block_append(NEW_GASGN(rb_intern("$F"), 16523 NEW_CALL(NEW_GVAR(rb_intern("$_")), 16524 rb_intern("split"), 0)), 16525 node); 16526 } 16527 if (chop) { 16528 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")), 16529 rb_intern("chop!"), 0), node); 16530 } 16531 16532 node = NEW_OPT_N(node); 16533 16534 if (prelude) { 16535 prelude->nd_body = node; 16536 scope->nd_body = prelude; 16537 } 16538 else { 16539 scope->nd_body = node; 16540 } 16541 16542 return scope; 16543} 16544 16545static const struct { 16546 ID token; 16547 const char *name; 16548} op_tbl[] = { 16549 {tDOT2, ".."}, 16550 {tDOT3, "..."}, 16551 {tPOW, "**"}, 16552 {tDSTAR, "**"}, 16553 {tUPLUS, "+@"}, 16554 {tUMINUS, "-@"}, 16555 {tCMP, "<=>"}, 16556 {tGEQ, ">="}, 16557 {tLEQ, "<="}, 16558 {tEQ, "=="}, 16559 {tEQQ, "==="}, 16560 {tNEQ, "!="}, 16561 {tMATCH, "=~"}, 16562 {tNMATCH, "!~"}, 16563 {tAREF, "[]"}, 16564 {tASET, "[]="}, 16565 {tLSHFT, "<<"}, 16566 {tRSHFT, ">>"}, 16567 {tCOLON2, "::"}, 16568}; 16569 16570#define op_tbl_count numberof(op_tbl) 16571 16572#ifndef ENABLE_SELECTOR_NAMESPACE 16573#define ENABLE_SELECTOR_NAMESPACE 0 16574#endif 16575 16576static struct symbols { 16577 ID last_id; 16578 st_table *sym_id; 16579 st_table *id_str; 16580#if ENABLE_SELECTOR_NAMESPACE 16581 st_table *ivar2_id; 16582 st_table *id_ivar2; 16583#endif 16584 VALUE op_sym[tLAST_OP_ID]; 16585} global_symbols = {tLAST_TOKEN}; 16586 16587static const struct st_hash_type symhash = { 16588 rb_str_hash_cmp, 16589 rb_str_hash, 16590}; 16591 16592#if ENABLE_SELECTOR_NAMESPACE 16593struct ivar2_key { 16594 ID id; 16595 VALUE klass; 16596}; 16597 16598static int 16599ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) 16600{ 16601 if (key1->id == key2->id && key1->klass == key2->klass) { 16602 return 0; 16603 } 16604 return 1; 16605} 16606 16607static int 16608ivar2_hash(struct ivar2_key *key) 16609{ 16610 return (key->id << 8) ^ (key->klass >> 2); 16611} 16612 16613static const struct st_hash_type ivar2_hash_type = { 16614 ivar2_cmp, 16615 ivar2_hash, 16616}; 16617#endif 16618 16619void 16620Init_sym(void) 16621{ 16622 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); 16623 global_symbols.id_str = st_init_numtable_with_size(1000); 16624#if ENABLE_SELECTOR_NAMESPACE 16625 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); 16626 global_symbols.id_ivar2 = st_init_numtable_with_size(1000); 16627#endif 16628 16629 (void)nodetype; 16630 (void)nodeline; 16631#if PARSER_DEBUG 16632 (void)lex_state_name(-1); 16633#endif 16634 16635 Init_id(); 16636} 16637 16638void 16639rb_gc_mark_symbols(void) 16640{ 16641 rb_mark_tbl(global_symbols.id_str); 16642 rb_gc_mark_locations(global_symbols.op_sym, 16643 global_symbols.op_sym + numberof(global_symbols.op_sym)); 16644} 16645#endif /* !RIPPER */ 16646 16647static ID 16648internal_id_gen(struct parser_params *parser) 16649{ 16650 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars); 16651 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1; 16652 return ID_INTERNAL | (id << ID_SCOPE_SHIFT); 16653} 16654 16655#ifndef RIPPER 16656static int 16657is_special_global_name(const char *m, const char *e, rb_encoding *enc) 16658{ 16659 int mb = 0; 16660 16661 if (m >= e) return 0; 16662 if (is_global_name_punct(*m)) { 16663 ++m; 16664 } 16665 else if (*m == '-') { 16666 ++m; 16667 if (m < e && is_identchar(m, e, enc)) { 16668 if (!ISASCII(*m)) mb = 1; 16669 m += rb_enc_mbclen(m, e, enc); 16670 } 16671 } 16672 else { 16673 if (!rb_enc_isdigit(*m, enc)) return 0; 16674 do { 16675 if (!ISASCII(*m)) mb = 1; 16676 ++m; 16677 } while (m < e && rb_enc_isdigit(*m, enc)); 16678 } 16679 return m == e ? mb + 1 : 0; 16680} 16681 16682int 16683rb_symname_p(const char *name) 16684{ 16685 return rb_enc_symname_p(name, rb_ascii8bit_encoding()); 16686} 16687 16688int 16689rb_enc_symname_p(const char *name, rb_encoding *enc) 16690{ 16691 return rb_enc_symname2_p(name, strlen(name), enc); 16692} 16693 16694#define IDSET_ATTRSET_FOR_SYNTAX ((1U<<ID_LOCAL)|(1U<<ID_CONST)) 16695#define IDSET_ATTRSET_FOR_INTERN (~(~0U<<(1<<ID_SCOPE_SHIFT)) & ~(1U<<ID_ATTRSET)) 16696 16697static int 16698rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_atttset) 16699{ 16700 const char *m = name; 16701 const char *e = m + len; 16702 int type = ID_JUNK; 16703 16704 if (!m || len <= 0) return -1; 16705 switch (*m) { 16706 case '\0': 16707 return -1; 16708 16709 case '$': 16710 type = ID_GLOBAL; 16711 if (is_special_global_name(++m, e, enc)) return type; 16712 goto id; 16713 16714 case '@': 16715 type = ID_INSTANCE; 16716 if (*++m == '@') { 16717 ++m; 16718 type = ID_CLASS; 16719 } 16720 goto id; 16721 16722 case '<': 16723 switch (*++m) { 16724 case '<': ++m; break; 16725 case '=': if (*++m == '>') ++m; break; 16726 default: break; 16727 } 16728 break; 16729 16730 case '>': 16731 switch (*++m) { 16732 case '>': case '=': ++m; break; 16733 } 16734 break; 16735 16736 case '=': 16737 switch (*++m) { 16738 case '~': ++m; break; 16739 case '=': if (*++m == '=') ++m; break; 16740 default: return -1; 16741 } 16742 break; 16743 16744 case '*': 16745 if (*++m == '*') ++m; 16746 break; 16747 16748 case '+': case '-': 16749 if (*++m == '@') ++m; 16750 break; 16751 16752 case '|': case '^': case '&': case '/': case '%': case '~': case '`': 16753 ++m; 16754 break; 16755 16756 case '[': 16757 if (*++m != ']') return -1; 16758 if (*++m == '=') ++m; 16759 break; 16760 16761 case '!': 16762 if (len == 1) return ID_JUNK; 16763 switch (*++m) { 16764 case '=': case '~': ++m; break; 16765 default: return -1; 16766 } 16767 break; 16768 16769 default: 16770 type = rb_enc_isupper(*m, enc) ? ID_CONST : ID_LOCAL; 16771 id: 16772 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m))) 16773 return -1; 16774 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc); 16775 if (m >= e) break; 16776 switch (*m) { 16777 case '!': case '?': 16778 if (type == ID_GLOBAL || type == ID_CLASS || type == ID_INSTANCE) return -1; 16779 type = ID_JUNK; 16780 ++m; 16781 if (m + 1 < e || *m != '=') break; 16782 /* fall through */ 16783 case '=': 16784 if (!(allowed_atttset & (1U << type))) return -1; 16785 type = ID_ATTRSET; 16786 ++m; 16787 break; 16788 } 16789 break; 16790 } 16791 return m == e ? type : -1; 16792} 16793 16794int 16795rb_enc_symname2_p(const char *name, long len, rb_encoding *enc) 16796{ 16797 return rb_enc_symname_type(name, len, enc, IDSET_ATTRSET_FOR_SYNTAX) != -1; 16798} 16799 16800static int 16801rb_str_symname_type(VALUE name, unsigned int allowed_atttset) 16802{ 16803 const char *ptr = StringValuePtr(name); 16804 long len = RSTRING_LEN(name); 16805 int type = rb_enc_symname_type(ptr, len, rb_enc_get(name), allowed_atttset); 16806 RB_GC_GUARD(name); 16807 return type; 16808} 16809 16810static ID 16811register_symid(ID id, const char *name, long len, rb_encoding *enc) 16812{ 16813 VALUE str = rb_enc_str_new(name, len, enc); 16814 return register_symid_str(id, str); 16815} 16816 16817static ID 16818register_symid_str(ID id, VALUE str) 16819{ 16820 OBJ_FREEZE(str); 16821 st_add_direct(global_symbols.sym_id, (st_data_t)str, id); 16822 st_add_direct(global_symbols.id_str, id, (st_data_t)str); 16823 return id; 16824} 16825 16826static int 16827sym_check_asciionly(VALUE str) 16828{ 16829 if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE; 16830 switch (rb_enc_str_coderange(str)) { 16831 case ENC_CODERANGE_BROKEN: 16832 rb_raise(rb_eEncodingError, "invalid encoding symbol"); 16833 case ENC_CODERANGE_7BIT: 16834 return TRUE; 16835 } 16836 return FALSE; 16837} 16838 16839/* 16840 * _str_ itself will be registered at the global symbol table. _str_ 16841 * can be modified before the registration, since the encoding will be 16842 * set to ASCII-8BIT if it is a special global name. 16843 */ 16844static ID intern_str(VALUE str); 16845 16846ID 16847rb_intern3(const char *name, long len, rb_encoding *enc) 16848{ 16849 VALUE str; 16850 st_data_t data; 16851 struct RString fake_str; 16852 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 16853 fake_str.basic.klass = rb_cString; 16854 fake_str.as.heap.len = len; 16855 fake_str.as.heap.ptr = (char *)name; 16856 fake_str.as.heap.aux.capa = len; 16857 str = (VALUE)&fake_str; 16858 rb_enc_associate(str, enc); 16859 OBJ_FREEZE(str); 16860 16861 if (st_lookup(global_symbols.sym_id, str, &data)) 16862 return (ID)data; 16863 16864 str = rb_enc_str_new(name, len, enc); /* make true string */ 16865 return intern_str(str); 16866} 16867 16868static ID 16869intern_str(VALUE str) 16870{ 16871 const char *name, *m, *e; 16872 long len, last; 16873 rb_encoding *enc, *symenc; 16874 unsigned char c; 16875 ID id; 16876 int mb; 16877 16878 RSTRING_GETMEM(str, name, len); 16879 m = name; 16880 e = m + len; 16881 enc = rb_enc_get(str); 16882 symenc = enc; 16883 16884 if (!len || (rb_cString && !rb_enc_asciicompat(enc))) { 16885 junk: 16886 id = ID_JUNK; 16887 goto new_id; 16888 } 16889 last = len-1; 16890 id = 0; 16891 switch (*m) { 16892 case '$': 16893 if (len < 2) goto junk; 16894 id |= ID_GLOBAL; 16895 if ((mb = is_special_global_name(++m, e, enc)) != 0) { 16896 if (!--mb) symenc = rb_usascii_encoding(); 16897 goto new_id; 16898 } 16899 break; 16900 case '@': 16901 if (m[1] == '@') { 16902 if (len < 3) goto junk; 16903 m++; 16904 id |= ID_CLASS; 16905 } 16906 else { 16907 if (len < 2) goto junk; 16908 id |= ID_INSTANCE; 16909 } 16910 m++; 16911 break; 16912 default: 16913 c = m[0]; 16914 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) { 16915 /* operators */ 16916 int i; 16917 16918 if (len == 1) { 16919 id = c; 16920 goto id_register; 16921 } 16922 for (i = 0; i < op_tbl_count; i++) { 16923 if (*op_tbl[i].name == *m && 16924 strcmp(op_tbl[i].name, m) == 0) { 16925 id = op_tbl[i].token; 16926 goto id_register; 16927 } 16928 } 16929 } 16930 break; 16931 } 16932 if (name[last] == '=') { 16933 /* attribute assignment */ 16934 if (last > 1 && name[last-1] == '=') 16935 goto junk; 16936 id = rb_intern3(name, last, enc); 16937 if (id > tLAST_OP_ID && !is_attrset_id(id)) { 16938 enc = rb_enc_get(rb_id2str(id)); 16939 id = rb_id_attrset(id); 16940 goto id_register; 16941 } 16942 id = ID_ATTRSET; 16943 } 16944 else if (id == 0) { 16945 if (rb_enc_isupper(m[0], enc)) { 16946 id = ID_CONST; 16947 } 16948 else { 16949 id = ID_LOCAL; 16950 } 16951 } 16952 if (!rb_enc_isdigit(*m, enc)) { 16953 while (m <= name + last && is_identchar(m, e, enc)) { 16954 if (ISASCII(*m)) { 16955 m++; 16956 } 16957 else { 16958 m += rb_enc_mbclen(m, e, enc); 16959 } 16960 } 16961 } 16962 if (id != ID_ATTRSET && m - name < len) id = ID_JUNK; 16963 if (sym_check_asciionly(str)) symenc = rb_usascii_encoding(); 16964 new_id: 16965 if (symenc != enc) rb_enc_associate(str, symenc); 16966 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) { 16967 if (len > 20) { 16968 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)", 16969 name); 16970 } 16971 else { 16972 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)", 16973 (int)len, name); 16974 } 16975 } 16976 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT; 16977 id_register: 16978 return register_symid_str(id, str); 16979} 16980 16981ID 16982rb_intern2(const char *name, long len) 16983{ 16984 return rb_intern3(name, len, rb_usascii_encoding()); 16985} 16986 16987#undef rb_intern 16988ID 16989rb_intern(const char *name) 16990{ 16991 return rb_intern2(name, strlen(name)); 16992} 16993 16994ID 16995rb_intern_str(VALUE str) 16996{ 16997 st_data_t id; 16998 16999 if (st_lookup(global_symbols.sym_id, str, &id)) 17000 return (ID)id; 17001 return intern_str(rb_str_dup(str)); 17002} 17003 17004VALUE 17005rb_id2str(ID id) 17006{ 17007 st_data_t data; 17008 17009 if (id < tLAST_TOKEN) { 17010 int i = 0; 17011 17012 if (id < INT_MAX && rb_ispunct((int)id)) { 17013 VALUE str = global_symbols.op_sym[i = (int)id]; 17014 if (!str) { 17015 char name[2]; 17016 name[0] = (char)id; 17017 name[1] = 0; 17018 str = rb_usascii_str_new(name, 1); 17019 OBJ_FREEZE(str); 17020 global_symbols.op_sym[i] = str; 17021 } 17022 return str; 17023 } 17024 for (i = 0; i < op_tbl_count; i++) { 17025 if (op_tbl[i].token == id) { 17026 VALUE str = global_symbols.op_sym[i]; 17027 if (!str) { 17028 str = rb_usascii_str_new2(op_tbl[i].name); 17029 OBJ_FREEZE(str); 17030 global_symbols.op_sym[i] = str; 17031 } 17032 return str; 17033 } 17034 } 17035 } 17036 17037 if (st_lookup(global_symbols.id_str, id, &data)) { 17038 VALUE str = (VALUE)data; 17039 if (RBASIC(str)->klass == 0) 17040 RBASIC(str)->klass = rb_cString; 17041 return str; 17042 } 17043 17044 if (is_attrset_id(id)) { 17045 ID id_stem = (id & ~ID_SCOPE_MASK); 17046 VALUE str; 17047 17048 do { 17049 if (!!(str = rb_id2str(id_stem | ID_LOCAL))) break; 17050 if (!!(str = rb_id2str(id_stem | ID_CONST))) break; 17051 if (!!(str = rb_id2str(id_stem | ID_INSTANCE))) break; 17052 if (!!(str = rb_id2str(id_stem | ID_GLOBAL))) break; 17053 if (!!(str = rb_id2str(id_stem | ID_CLASS))) break; 17054 if (!!(str = rb_id2str(id_stem | ID_JUNK))) break; 17055 return 0; 17056 } while (0); 17057 str = rb_str_dup(str); 17058 rb_str_cat(str, "=", 1); 17059 register_symid_str(id, str); 17060 if (st_lookup(global_symbols.id_str, id, &data)) { 17061 VALUE str = (VALUE)data; 17062 if (RBASIC(str)->klass == 0) 17063 RBASIC(str)->klass = rb_cString; 17064 return str; 17065 } 17066 } 17067 return 0; 17068} 17069 17070const char * 17071rb_id2name(ID id) 17072{ 17073 VALUE str = rb_id2str(id); 17074 17075 if (!str) return 0; 17076 return RSTRING_PTR(str); 17077} 17078 17079static int 17080symbols_i(VALUE sym, ID value, VALUE ary) 17081{ 17082 rb_ary_push(ary, ID2SYM(value)); 17083 return ST_CONTINUE; 17084} 17085 17086/* 17087 * call-seq: 17088 * Symbol.all_symbols => array 17089 * 17090 * Returns an array of all the symbols currently in Ruby's symbol 17091 * table. 17092 * 17093 * Symbol.all_symbols.size #=> 903 17094 * Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink, 17095 * :chown, :EOFError, :$;, :String, 17096 * :LOCK_SH, :"setuid?", :$<, 17097 * :default_proc, :compact, :extend, 17098 * :Tms, :getwd, :$=, :ThreadGroup, 17099 * :wait2, :$>] 17100 */ 17101 17102VALUE 17103rb_sym_all_symbols(void) 17104{ 17105 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries); 17106 17107 st_foreach(global_symbols.sym_id, symbols_i, ary); 17108 return ary; 17109} 17110 17111int 17112rb_is_const_id(ID id) 17113{ 17114 return is_const_id(id); 17115} 17116 17117int 17118rb_is_class_id(ID id) 17119{ 17120 return is_class_id(id); 17121} 17122 17123int 17124rb_is_global_id(ID id) 17125{ 17126 return is_global_id(id); 17127} 17128 17129int 17130rb_is_instance_id(ID id) 17131{ 17132 return is_instance_id(id); 17133} 17134 17135int 17136rb_is_attrset_id(ID id) 17137{ 17138 return is_attrset_id(id); 17139} 17140 17141int 17142rb_is_local_id(ID id) 17143{ 17144 return is_local_id(id); 17145} 17146 17147int 17148rb_is_junk_id(ID id) 17149{ 17150 return is_junk_id(id); 17151} 17152 17153/** 17154 * Returns ID for the given name if it is interned already, or 0. 17155 * 17156 * \param namep the pointer to the name object 17157 * \return the ID for *namep 17158 * \pre the object referred by \p namep must be a Symbol or 17159 * a String, or possible to convert with to_str method. 17160 * \post the object referred by \p namep is a Symbol or a 17161 * String if non-zero value is returned, or is a String 17162 * if 0 is returned. 17163 */ 17164ID 17165rb_check_id(volatile VALUE *namep) 17166{ 17167 st_data_t id; 17168 VALUE tmp; 17169 VALUE name = *namep; 17170 17171 if (SYMBOL_P(name)) { 17172 return SYM2ID(name); 17173 } 17174 else if (!RB_TYPE_P(name, T_STRING)) { 17175 tmp = rb_check_string_type(name); 17176 if (NIL_P(tmp)) { 17177 tmp = rb_inspect(name); 17178 rb_raise(rb_eTypeError, "%s is not a symbol", 17179 RSTRING_PTR(tmp)); 17180 } 17181 name = tmp; 17182 *namep = name; 17183 } 17184 17185 sym_check_asciionly(name); 17186 17187 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17188 return (ID)id; 17189 17190 if (rb_is_attrset_name(name)) { 17191 struct RString fake_str; 17192 const VALUE localname = (VALUE)&fake_str; 17193 /* make local name by chopping '=' */ 17194 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17195 fake_str.basic.klass = rb_cString; 17196 fake_str.as.heap.len = RSTRING_LEN(name) - 1; 17197 fake_str.as.heap.ptr = RSTRING_PTR(name); 17198 fake_str.as.heap.aux.capa = fake_str.as.heap.len; 17199 rb_enc_copy(localname, name); 17200 OBJ_FREEZE(localname); 17201 17202 if (st_lookup(global_symbols.sym_id, (st_data_t)localname, &id)) { 17203 return rb_id_attrset((ID)id); 17204 } 17205 RB_GC_GUARD(name); 17206 } 17207 17208 return (ID)0; 17209} 17210 17211ID 17212rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc) 17213{ 17214 st_data_t id; 17215 struct RString fake_str; 17216 const VALUE name = (VALUE)&fake_str; 17217 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED; 17218 fake_str.basic.klass = rb_cString; 17219 fake_str.as.heap.len = len; 17220 fake_str.as.heap.ptr = (char *)ptr; 17221 fake_str.as.heap.aux.capa = len; 17222 rb_enc_associate(name, enc); 17223 17224 sym_check_asciionly(name); 17225 17226 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) 17227 return (ID)id; 17228 17229 if (rb_is_attrset_name(name)) { 17230 fake_str.as.heap.len = len - 1; 17231 if (st_lookup(global_symbols.sym_id, (st_data_t)name, &id)) { 17232 return rb_id_attrset((ID)id); 17233 } 17234 } 17235 17236 return (ID)0; 17237} 17238 17239int 17240rb_is_const_name(VALUE name) 17241{ 17242 return rb_str_symname_type(name, 0) == ID_CONST; 17243} 17244 17245int 17246rb_is_class_name(VALUE name) 17247{ 17248 return rb_str_symname_type(name, 0) == ID_CLASS; 17249} 17250 17251int 17252rb_is_global_name(VALUE name) 17253{ 17254 return rb_str_symname_type(name, 0) == ID_GLOBAL; 17255} 17256 17257int 17258rb_is_instance_name(VALUE name) 17259{ 17260 return rb_str_symname_type(name, 0) == ID_INSTANCE; 17261} 17262 17263int 17264rb_is_attrset_name(VALUE name) 17265{ 17266 return rb_str_symname_type(name, IDSET_ATTRSET_FOR_INTERN) == ID_ATTRSET; 17267} 17268 17269int 17270rb_is_local_name(VALUE name) 17271{ 17272 return rb_str_symname_type(name, 0) == ID_LOCAL; 17273} 17274 17275int 17276rb_is_method_name(VALUE name) 17277{ 17278 switch (rb_str_symname_type(name, 0)) { 17279 case ID_LOCAL: case ID_ATTRSET: case ID_JUNK: 17280 return TRUE; 17281 } 17282 return FALSE; 17283} 17284 17285int 17286rb_is_junk_name(VALUE name) 17287{ 17288 return rb_str_symname_type(name, IDSET_ATTRSET_FOR_SYNTAX) == -1; 17289} 17290 17291#endif /* !RIPPER */ 17292 17293static void 17294parser_initialize(struct parser_params *parser) 17295{ 17296 parser->eofp = Qfalse; 17297 17298 parser->parser_lex_strterm = 0; 17299 parser->parser_cond_stack = 0; 17300 parser->parser_cmdarg_stack = 0; 17301 parser->parser_class_nest = 0; 17302 parser->parser_paren_nest = 0; 17303 parser->parser_lpar_beg = 0; 17304 parser->parser_brace_nest = 0; 17305 parser->parser_in_single = 0; 17306 parser->parser_in_def = 0; 17307 parser->parser_in_defined = 0; 17308 parser->parser_compile_for_eval = 0; 17309 parser->parser_cur_mid = 0; 17310 parser->parser_tokenbuf = NULL; 17311 parser->parser_tokidx = 0; 17312 parser->parser_toksiz = 0; 17313 parser->parser_heredoc_end = 0; 17314 parser->parser_command_start = TRUE; 17315 parser->parser_deferred_nodes = 0; 17316 parser->parser_lex_pbeg = 0; 17317 parser->parser_lex_p = 0; 17318 parser->parser_lex_pend = 0; 17319 parser->parser_lvtbl = 0; 17320 parser->parser_ruby__end__seen = 0; 17321 parser->parser_ruby_sourcefile = 0; 17322 parser->parser_ruby_sourcefile_string = Qnil; 17323#ifndef RIPPER 17324 parser->is_ripper = 0; 17325 parser->parser_eval_tree_begin = 0; 17326 parser->parser_eval_tree = 0; 17327#else 17328 parser->is_ripper = 1; 17329 parser->delayed = Qnil; 17330 17331 parser->result = Qnil; 17332 parser->parsing_thread = Qnil; 17333 parser->toplevel_p = TRUE; 17334#endif 17335#ifdef YYMALLOC 17336 parser->heap = NULL; 17337#endif 17338 parser->enc = rb_utf8_encoding(); 17339} 17340 17341#ifdef RIPPER 17342#define parser_mark ripper_parser_mark 17343#define parser_free ripper_parser_free 17344#endif 17345 17346static void 17347parser_mark(void *ptr) 17348{ 17349 struct parser_params *p = (struct parser_params*)ptr; 17350 17351 rb_gc_mark((VALUE)p->parser_lex_strterm); 17352 rb_gc_mark((VALUE)p->parser_deferred_nodes); 17353 rb_gc_mark(p->parser_lex_input); 17354 rb_gc_mark(p->parser_lex_lastline); 17355 rb_gc_mark(p->parser_lex_nextline); 17356 rb_gc_mark(p->parser_ruby_sourcefile_string); 17357#ifndef RIPPER 17358 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ; 17359 rb_gc_mark((VALUE)p->parser_eval_tree) ; 17360 rb_gc_mark(p->debug_lines); 17361#else 17362 rb_gc_mark(p->delayed); 17363 rb_gc_mark(p->value); 17364 rb_gc_mark(p->result); 17365 rb_gc_mark(p->parsing_thread); 17366#endif 17367#ifdef YYMALLOC 17368 rb_gc_mark((VALUE)p->heap); 17369#endif 17370} 17371 17372static void 17373parser_free(void *ptr) 17374{ 17375 struct parser_params *p = (struct parser_params*)ptr; 17376 struct local_vars *local, *prev; 17377 17378 if (p->parser_tokenbuf) { 17379 xfree(p->parser_tokenbuf); 17380 } 17381 for (local = p->parser_lvtbl; local; local = prev) { 17382 if (local->vars) xfree(local->vars); 17383 prev = local->prev; 17384 xfree(local); 17385 } 17386 xfree(p); 17387} 17388 17389static size_t 17390parser_memsize(const void *ptr) 17391{ 17392 struct parser_params *p = (struct parser_params*)ptr; 17393 struct local_vars *local; 17394 size_t size = sizeof(*p); 17395 17396 if (!ptr) return 0; 17397 size += p->parser_toksiz; 17398 for (local = p->parser_lvtbl; local; local = local->prev) { 17399 size += sizeof(*local); 17400 if (local->vars) size += local->vars->capa * sizeof(ID); 17401 } 17402 return size; 17403} 17404 17405static 17406#ifndef RIPPER 17407const 17408#endif 17409rb_data_type_t parser_data_type = { 17410 "parser", 17411 { 17412 parser_mark, 17413 parser_free, 17414 parser_memsize, 17415 }, 17416}; 17417 17418#ifndef RIPPER 17419#undef rb_reserved_word 17420 17421const struct kwtable * 17422rb_reserved_word(const char *str, unsigned int len) 17423{ 17424 return reserved_word(str, len); 17425} 17426 17427static struct parser_params * 17428parser_new(void) 17429{ 17430 struct parser_params *p; 17431 17432 p = ALLOC_N(struct parser_params, 1); 17433 MEMZERO(p, struct parser_params, 1); 17434 parser_initialize(p); 17435 return p; 17436} 17437 17438VALUE 17439rb_parser_new(void) 17440{ 17441 struct parser_params *p = parser_new(); 17442 17443 return TypedData_Wrap_Struct(0, &parser_data_type, p); 17444} 17445 17446/* 17447 * call-seq: 17448 * ripper#end_seen? -> Boolean 17449 * 17450 * Return true if parsed source ended by +\_\_END\_\_+. 17451 */ 17452VALUE 17453rb_parser_end_seen_p(VALUE vparser) 17454{ 17455 struct parser_params *parser; 17456 17457 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17458 return ruby__end__seen ? Qtrue : Qfalse; 17459} 17460 17461/* 17462 * call-seq: 17463 * ripper#encoding -> encoding 17464 * 17465 * Return encoding of the source. 17466 */ 17467VALUE 17468rb_parser_encoding(VALUE vparser) 17469{ 17470 struct parser_params *parser; 17471 17472 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser); 17473 return rb_enc_from_encoding(current_enc); 17474} 17475 17476/* 17477 * call-seq: 17478 * ripper.yydebug -> true or false 17479 * 17480 * Get yydebug. 17481 */ 17482VALUE 17483rb_parser_get_yydebug(VALUE self) 17484{ 17485 struct parser_params *parser; 17486 17487 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17488 return yydebug ? Qtrue : Qfalse; 17489} 17490 17491/* 17492 * call-seq: 17493 * ripper.yydebug = flag 17494 * 17495 * Set yydebug. 17496 */ 17497VALUE 17498rb_parser_set_yydebug(VALUE self, VALUE flag) 17499{ 17500 struct parser_params *parser; 17501 17502 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17503 yydebug = RTEST(flag); 17504 return flag; 17505} 17506 17507#ifdef YYMALLOC 17508#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE)) 17509#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0) 17510#define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \ 17511 (n)->u3.cnt = (c), (p)) 17512 17513void * 17514rb_parser_malloc(struct parser_params *parser, size_t size) 17515{ 17516 size_t cnt = HEAPCNT(1, size); 17517 NODE *n = NEWHEAP(); 17518 void *ptr = xmalloc(size); 17519 17520 return ADD2HEAP(n, cnt, ptr); 17521} 17522 17523void * 17524rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size) 17525{ 17526 size_t cnt = HEAPCNT(nelem, size); 17527 NODE *n = NEWHEAP(); 17528 void *ptr = xcalloc(nelem, size); 17529 17530 return ADD2HEAP(n, cnt, ptr); 17531} 17532 17533void * 17534rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size) 17535{ 17536 NODE *n; 17537 size_t cnt = HEAPCNT(1, size); 17538 17539 if (ptr && (n = parser->heap) != NULL) { 17540 do { 17541 if (n->u1.node == ptr) { 17542 n->u1.node = ptr = xrealloc(ptr, size); 17543 if (n->u3.cnt) n->u3.cnt = cnt; 17544 return ptr; 17545 } 17546 } while ((n = n->u2.node) != NULL); 17547 } 17548 n = NEWHEAP(); 17549 ptr = xrealloc(ptr, size); 17550 return ADD2HEAP(n, cnt, ptr); 17551} 17552 17553void 17554rb_parser_free(struct parser_params *parser, void *ptr) 17555{ 17556 NODE **prev = &parser->heap, *n; 17557 17558 while ((n = *prev) != NULL) { 17559 if (n->u1.node == ptr) { 17560 *prev = n->u2.node; 17561 rb_gc_force_recycle((VALUE)n); 17562 break; 17563 } 17564 prev = &n->u2.node; 17565 } 17566 xfree(ptr); 17567} 17568#endif 17569#endif 17570 17571#ifdef RIPPER 17572#ifdef RIPPER_DEBUG 17573extern int rb_is_pointer_to_heap(VALUE); 17574 17575/* :nodoc: */ 17576static VALUE 17577ripper_validate_object(VALUE self, VALUE x) 17578{ 17579 if (x == Qfalse) return x; 17580 if (x == Qtrue) return x; 17581 if (x == Qnil) return x; 17582 if (x == Qundef) 17583 rb_raise(rb_eArgError, "Qundef given"); 17584 if (FIXNUM_P(x)) return x; 17585 if (SYMBOL_P(x)) return x; 17586 if (!rb_is_pointer_to_heap(x)) 17587 rb_raise(rb_eArgError, "invalid pointer: %p", x); 17588 switch (TYPE(x)) { 17589 case T_STRING: 17590 case T_OBJECT: 17591 case T_ARRAY: 17592 case T_BIGNUM: 17593 case T_FLOAT: 17594 return x; 17595 case T_NODE: 17596 if (nd_type(x) != NODE_LASGN) { 17597 rb_raise(rb_eArgError, "NODE given: %p", x); 17598 } 17599 return ((NODE *)x)->nd_rval; 17600 default: 17601 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)", 17602 x, rb_obj_classname(x)); 17603 } 17604 return x; 17605} 17606#endif 17607 17608#define validate(x) ((x) = get_value(x)) 17609 17610static VALUE 17611ripper_dispatch0(struct parser_params *parser, ID mid) 17612{ 17613 return rb_funcall(parser->value, mid, 0); 17614} 17615 17616static VALUE 17617ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a) 17618{ 17619 validate(a); 17620 return rb_funcall(parser->value, mid, 1, a); 17621} 17622 17623static VALUE 17624ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b) 17625{ 17626 validate(a); 17627 validate(b); 17628 return rb_funcall(parser->value, mid, 2, a, b); 17629} 17630 17631static VALUE 17632ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c) 17633{ 17634 validate(a); 17635 validate(b); 17636 validate(c); 17637 return rb_funcall(parser->value, mid, 3, a, b, c); 17638} 17639 17640static VALUE 17641ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d) 17642{ 17643 validate(a); 17644 validate(b); 17645 validate(c); 17646 validate(d); 17647 return rb_funcall(parser->value, mid, 4, a, b, c, d); 17648} 17649 17650static VALUE 17651ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e) 17652{ 17653 validate(a); 17654 validate(b); 17655 validate(c); 17656 validate(d); 17657 validate(e); 17658 return rb_funcall(parser->value, mid, 5, a, b, c, d, e); 17659} 17660 17661static VALUE 17662ripper_dispatch7(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g) 17663{ 17664 validate(a); 17665 validate(b); 17666 validate(c); 17667 validate(d); 17668 validate(e); 17669 validate(f); 17670 validate(g); 17671 return rb_funcall(parser->value, mid, 7, a, b, c, d, e, f, g); 17672} 17673 17674static const struct kw_assoc { 17675 ID id; 17676 const char *name; 17677} keyword_to_name[] = { 17678 {keyword_class, "class"}, 17679 {keyword_module, "module"}, 17680 {keyword_def, "def"}, 17681 {keyword_undef, "undef"}, 17682 {keyword_begin, "begin"}, 17683 {keyword_rescue, "rescue"}, 17684 {keyword_ensure, "ensure"}, 17685 {keyword_end, "end"}, 17686 {keyword_if, "if"}, 17687 {keyword_unless, "unless"}, 17688 {keyword_then, "then"}, 17689 {keyword_elsif, "elsif"}, 17690 {keyword_else, "else"}, 17691 {keyword_case, "case"}, 17692 {keyword_when, "when"}, 17693 {keyword_while, "while"}, 17694 {keyword_until, "until"}, 17695 {keyword_for, "for"}, 17696 {keyword_break, "break"}, 17697 {keyword_next, "next"}, 17698 {keyword_redo, "redo"}, 17699 {keyword_retry, "retry"}, 17700 {keyword_in, "in"}, 17701 {keyword_do, "do"}, 17702 {keyword_do_cond, "do"}, 17703 {keyword_do_block, "do"}, 17704 {keyword_return, "return"}, 17705 {keyword_yield, "yield"}, 17706 {keyword_super, "super"}, 17707 {keyword_self, "self"}, 17708 {keyword_nil, "nil"}, 17709 {keyword_true, "true"}, 17710 {keyword_false, "false"}, 17711 {keyword_and, "and"}, 17712 {keyword_or, "or"}, 17713 {keyword_not, "not"}, 17714 {modifier_if, "if"}, 17715 {modifier_unless, "unless"}, 17716 {modifier_while, "while"}, 17717 {modifier_until, "until"}, 17718 {modifier_rescue, "rescue"}, 17719 {keyword_alias, "alias"}, 17720 {keyword_defined, "defined?"}, 17721 {keyword_BEGIN, "BEGIN"}, 17722 {keyword_END, "END"}, 17723 {keyword__LINE__, "__LINE__"}, 17724 {keyword__FILE__, "__FILE__"}, 17725 {keyword__ENCODING__, "__ENCODING__"}, 17726 {0, NULL} 17727}; 17728 17729static const char* 17730keyword_id_to_str(ID id) 17731{ 17732 const struct kw_assoc *a; 17733 17734 for (a = keyword_to_name; a->id; a++) { 17735 if (a->id == id) 17736 return a->name; 17737 } 17738 return NULL; 17739} 17740 17741#undef ripper_id2sym 17742static VALUE 17743ripper_id2sym(ID id) 17744{ 17745 const char *name; 17746 char buf[8]; 17747 17748 if (id <= 256) { 17749 buf[0] = (char)id; 17750 buf[1] = '\0'; 17751 return ID2SYM(rb_intern2(buf, 1)); 17752 } 17753 if ((name = keyword_id_to_str(id))) { 17754 return ID2SYM(rb_intern(name)); 17755 } 17756 switch (id) { 17757 case tOROP: 17758 name = "||"; 17759 break; 17760 case tANDOP: 17761 name = "&&"; 17762 break; 17763 default: 17764 name = rb_id2name(id); 17765 if (!name) { 17766 rb_bug("cannot convert ID to string: %ld", (unsigned long)id); 17767 } 17768 return ID2SYM(id); 17769 } 17770 return ID2SYM(rb_intern(name)); 17771} 17772 17773static ID 17774ripper_get_id(VALUE v) 17775{ 17776 NODE *nd; 17777 if (!RB_TYPE_P(v, T_NODE)) return 0; 17778 nd = (NODE *)v; 17779 if (nd_type(nd) != NODE_LASGN) return 0; 17780 return nd->nd_vid; 17781} 17782 17783static VALUE 17784ripper_get_value(VALUE v) 17785{ 17786 NODE *nd; 17787 if (v == Qundef) return Qnil; 17788 if (!RB_TYPE_P(v, T_NODE)) return v; 17789 nd = (NODE *)v; 17790 if (nd_type(nd) != NODE_LASGN) return Qnil; 17791 return nd->nd_rval; 17792} 17793 17794static void 17795ripper_compile_error(struct parser_params *parser, const char *fmt, ...) 17796{ 17797 VALUE str; 17798 va_list args; 17799 17800 va_start(args, fmt); 17801 str = rb_vsprintf(fmt, args); 17802 va_end(args); 17803 rb_funcall(parser->value, rb_intern("compile_error"), 1, str); 17804} 17805 17806static void 17807ripper_warn0(struct parser_params *parser, const char *fmt) 17808{ 17809 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt)); 17810} 17811 17812static void 17813ripper_warnI(struct parser_params *parser, const char *fmt, int a) 17814{ 17815 rb_funcall(parser->value, rb_intern("warn"), 2, 17816 STR_NEW2(fmt), INT2NUM(a)); 17817} 17818 17819static void 17820ripper_warnS(struct parser_params *parser, const char *fmt, const char *str) 17821{ 17822 rb_funcall(parser->value, rb_intern("warn"), 2, 17823 STR_NEW2(fmt), STR_NEW2(str)); 17824} 17825 17826static void 17827ripper_warning0(struct parser_params *parser, const char *fmt) 17828{ 17829 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt)); 17830} 17831 17832static void 17833ripper_warningS(struct parser_params *parser, const char *fmt, const char *str) 17834{ 17835 rb_funcall(parser->value, rb_intern("warning"), 2, 17836 STR_NEW2(fmt), STR_NEW2(str)); 17837} 17838 17839static VALUE 17840ripper_lex_get_generic(struct parser_params *parser, VALUE src) 17841{ 17842 return rb_io_gets(src); 17843} 17844 17845static VALUE 17846ripper_s_allocate(VALUE klass) 17847{ 17848 struct parser_params *p; 17849 VALUE self; 17850 17851 p = ALLOC_N(struct parser_params, 1); 17852 MEMZERO(p, struct parser_params, 1); 17853 self = TypedData_Wrap_Struct(klass, &parser_data_type, p); 17854 p->value = self; 17855 return self; 17856} 17857 17858#define ripper_initialized_p(r) ((r)->parser_lex_input != 0) 17859 17860/* 17861 * call-seq: 17862 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper 17863 * 17864 * Create a new Ripper object. 17865 * _src_ must be a String, an IO, or an Object which has #gets method. 17866 * 17867 * This method does not starts parsing. 17868 * See also Ripper#parse and Ripper.parse. 17869 */ 17870static VALUE 17871ripper_initialize(int argc, VALUE *argv, VALUE self) 17872{ 17873 struct parser_params *parser; 17874 VALUE src, fname, lineno; 17875 17876 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17877 rb_scan_args(argc, argv, "12", &src, &fname, &lineno); 17878 if (RB_TYPE_P(src, T_FILE)) { 17879 parser->parser_lex_gets = ripper_lex_get_generic; 17880 } 17881 else { 17882 StringValue(src); 17883 parser->parser_lex_gets = lex_get_str; 17884 } 17885 parser->parser_lex_input = src; 17886 parser->eofp = Qfalse; 17887 if (NIL_P(fname)) { 17888 fname = STR_NEW2("(ripper)"); 17889 } 17890 else { 17891 StringValue(fname); 17892 } 17893 parser_initialize(parser); 17894 17895 parser->parser_ruby_sourcefile_string = fname; 17896 parser->parser_ruby_sourcefile = RSTRING_PTR(fname); 17897 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1; 17898 17899 return Qnil; 17900} 17901 17902struct ripper_args { 17903 struct parser_params *parser; 17904 int argc; 17905 VALUE *argv; 17906}; 17907 17908static VALUE 17909ripper_parse0(VALUE parser_v) 17910{ 17911 struct parser_params *parser; 17912 17913 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17914 parser_prepare(parser); 17915 ripper_yyparse((void*)parser); 17916 return parser->result; 17917} 17918 17919static VALUE 17920ripper_ensure(VALUE parser_v) 17921{ 17922 struct parser_params *parser; 17923 17924 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser); 17925 parser->parsing_thread = Qnil; 17926 return Qnil; 17927} 17928 17929/* 17930 * call-seq: 17931 * ripper#parse 17932 * 17933 * Start parsing and returns the value of the root action. 17934 */ 17935static VALUE 17936ripper_parse(VALUE self) 17937{ 17938 struct parser_params *parser; 17939 17940 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17941 if (!ripper_initialized_p(parser)) { 17942 rb_raise(rb_eArgError, "method called for uninitialized object"); 17943 } 17944 if (!NIL_P(parser->parsing_thread)) { 17945 if (parser->parsing_thread == rb_thread_current()) 17946 rb_raise(rb_eArgError, "Ripper#parse is not reentrant"); 17947 else 17948 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe"); 17949 } 17950 parser->parsing_thread = rb_thread_current(); 17951 rb_ensure(ripper_parse0, self, ripper_ensure, self); 17952 17953 return parser->result; 17954} 17955 17956/* 17957 * call-seq: 17958 * ripper#column -> Integer 17959 * 17960 * Return column number of current parsing line. 17961 * This number starts from 0. 17962 */ 17963static VALUE 17964ripper_column(VALUE self) 17965{ 17966 struct parser_params *parser; 17967 long col; 17968 17969 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17970 if (!ripper_initialized_p(parser)) { 17971 rb_raise(rb_eArgError, "method called for uninitialized object"); 17972 } 17973 if (NIL_P(parser->parsing_thread)) return Qnil; 17974 col = parser->tokp - parser->parser_lex_pbeg; 17975 return LONG2NUM(col); 17976} 17977 17978/* 17979 * call-seq: 17980 * ripper#filename -> String 17981 * 17982 * Return current parsing filename. 17983 */ 17984static VALUE 17985ripper_filename(VALUE self) 17986{ 17987 struct parser_params *parser; 17988 17989 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 17990 if (!ripper_initialized_p(parser)) { 17991 rb_raise(rb_eArgError, "method called for uninitialized object"); 17992 } 17993 return parser->parser_ruby_sourcefile_string; 17994} 17995 17996/* 17997 * call-seq: 17998 * ripper#lineno -> Integer 17999 * 18000 * Return line number of current parsing line. 18001 * This number starts from 1. 18002 */ 18003static VALUE 18004ripper_lineno(VALUE self) 18005{ 18006 struct parser_params *parser; 18007 18008 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser); 18009 if (!ripper_initialized_p(parser)) { 18010 rb_raise(rb_eArgError, "method called for uninitialized object"); 18011 } 18012 if (NIL_P(parser->parsing_thread)) return Qnil; 18013 return INT2NUM(parser->parser_ruby_sourceline); 18014} 18015 18016#ifdef RIPPER_DEBUG 18017/* :nodoc: */ 18018static VALUE 18019ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg) 18020{ 18021 StringValue(msg); 18022 if (obj == Qundef) { 18023 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg)); 18024 } 18025 return Qnil; 18026} 18027 18028/* :nodoc: */ 18029static VALUE 18030ripper_value(VALUE self, VALUE obj) 18031{ 18032 return ULONG2NUM(obj); 18033} 18034#endif 18035 18036 18037void 18038Init_ripper(void) 18039{ 18040 parser_data_type.parent = RTYPEDDATA_TYPE(rb_parser_new()); 18041 18042 ripper_init_eventids1(); 18043 ripper_init_eventids2(); 18044 /* ensure existing in symbol table */ 18045 (void)rb_intern("||"); 18046 (void)rb_intern("&&"); 18047 18048 InitVM(ripper); 18049} 18050 18051void 18052InitVM_ripper(void) 18053{ 18054 VALUE Ripper; 18055 18056 Ripper = rb_define_class("Ripper", rb_cObject); 18057 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION)); 18058 rb_define_alloc_func(Ripper, ripper_s_allocate); 18059 rb_define_method(Ripper, "initialize", ripper_initialize, -1); 18060 rb_define_method(Ripper, "parse", ripper_parse, 0); 18061 rb_define_method(Ripper, "column", ripper_column, 0); 18062 rb_define_method(Ripper, "filename", ripper_filename, 0); 18063 rb_define_method(Ripper, "lineno", ripper_lineno, 0); 18064 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0); 18065 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0); 18066 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0); 18067 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1); 18068#ifdef RIPPER_DEBUG 18069 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2); 18070 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1); 18071 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1); 18072#endif 18073 18074 ripper_init_eventids1_table(Ripper); 18075 ripper_init_eventids2_table(Ripper); 18076 18077# if 0 18078 /* Hack to let RDoc document SCRIPT_LINES__ */ 18079 18080 /* 18081 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded 18082 * after the assignment will be added as an Array of lines with the file 18083 * name as the key. 18084 */ 18085 rb_define_global_const("SCRIPT_LINES__", Qnil); 18086#endif 18087 18088} 18089#endif /* RIPPER */ 18090 18091