00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #define YYBISON 1
00046
00047
00048 #define YYBISON_VERSION "2.4.2"
00049
00050
00051 #define YYSKELETON_NAME "yacc.c"
00052
00053
00054 #define YYPURE 1
00055
00056
00057 #define YYPUSH 0
00058
00059
00060 #define YYPULL 1
00061
00062
00063 #define YYLSP_NEEDED 0
00064
00065
00066
00067
00068
00069
00070 #line 12 "ripper.y"
00071
00072
00073 #define YYDEBUG 1
00074 #define YYERROR_VERBOSE 1
00075 #define YYSTACK_USE_ALLOCA 0
00076
00077 #include "ruby/ruby.h"
00078 #include "ruby/st.h"
00079 #include "ruby/encoding.h"
00080 #include "node.h"
00081 #include "parse.h"
00082 #include "id.h"
00083 #include "regenc.h"
00084 #include <stdio.h>
00085 #include <errno.h>
00086 #include <ctype.h>
00087
00088 #define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
00089
00090 #define YYMALLOC(size) rb_parser_malloc(parser, size)
00091 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, ptr, size)
00092 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size)
00093 #define YYFREE(ptr) rb_parser_free(parser, ptr)
00094 #define malloc YYMALLOC
00095 #define realloc YYREALLOC
00096 #define calloc YYCALLOC
00097 #define free YYFREE
00098
00099 #ifndef RIPPER
00100 static ID register_symid(ID, const char *, long, rb_encoding *);
00101 #define REGISTER_SYMID(id, name) register_symid(id, name, strlen(name), enc)
00102 #include "id.c"
00103 #endif
00104
00105 #define is_notop_id(id) ((id)>tLAST_TOKEN)
00106 #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
00107 #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
00108 #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
00109 #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
00110 #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
00111 #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
00112 #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
00113
00114 #define is_asgn_or_id(id) ((is_notop_id(id)) && \
00115 (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
00116 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
00117 ((id)&ID_SCOPE_MASK) == ID_CLASS))
00118
00119 enum lex_state_e {
00120 EXPR_BEG,
00121 EXPR_END,
00122 EXPR_ENDARG,
00123 EXPR_ENDFN,
00124 EXPR_ARG,
00125 EXPR_CMDARG,
00126 EXPR_MID,
00127 EXPR_FNAME,
00128 EXPR_DOT,
00129 EXPR_CLASS,
00130 EXPR_VALUE,
00131 EXPR_MAX_STATE
00132 };
00133
00134 typedef VALUE stack_type;
00135
00136 # define BITSTACK_PUSH(stack, n) (stack = (stack<<1)|((n)&1))
00137 # define BITSTACK_POP(stack) (stack = stack >> 1)
00138 # define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1))
00139 # define BITSTACK_SET_P(stack) (stack&1)
00140
00141 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, n)
00142 #define COND_POP() BITSTACK_POP(cond_stack)
00143 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack)
00144 #define COND_P() BITSTACK_SET_P(cond_stack)
00145
00146 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, n)
00147 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
00148 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack)
00149 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
00150
00151 struct vtable {
00152 ID *tbl;
00153 int pos;
00154 int capa;
00155 struct vtable *prev;
00156 };
00157
00158 struct local_vars {
00159 struct vtable *args;
00160 struct vtable *vars;
00161 struct local_vars *prev;
00162 };
00163
00164 #define DVARS_INHERIT ((void*)1)
00165 #define DVARS_TOPSCOPE NULL
00166 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl))
00167 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3)
00168
00169 static int
00170 vtable_size(const struct vtable *tbl)
00171 {
00172 if (POINTER_P(tbl)) {
00173 return tbl->pos;
00174 }
00175 else {
00176 return 0;
00177 }
00178 }
00179
00180 #define VTBL_DEBUG 0
00181
00182 static struct vtable *
00183 vtable_alloc(struct vtable *prev)
00184 {
00185 struct vtable *tbl = ALLOC(struct vtable);
00186 tbl->pos = 0;
00187 tbl->capa = 8;
00188 tbl->tbl = ALLOC_N(ID, tbl->capa);
00189 tbl->prev = prev;
00190 if (VTBL_DEBUG) printf("vtable_alloc: %p\n", (void *)tbl);
00191 return tbl;
00192 }
00193
00194 static void
00195 vtable_free(struct vtable *tbl)
00196 {
00197 if (VTBL_DEBUG)printf("vtable_free: %p\n", (void *)tbl);
00198 if (POINTER_P(tbl)) {
00199 if (tbl->tbl) {
00200 xfree(tbl->tbl);
00201 }
00202 xfree(tbl);
00203 }
00204 }
00205
00206 static void
00207 vtable_add(struct vtable *tbl, ID id)
00208 {
00209 if (!POINTER_P(tbl)) {
00210 rb_bug("vtable_add: vtable is not allocated (%p)", (void *)tbl);
00211 }
00212 if (VTBL_DEBUG) printf("vtable_add: %p, %s\n", (void *)tbl, rb_id2name(id));
00213
00214 if (tbl->pos == tbl->capa) {
00215 tbl->capa = tbl->capa * 2;
00216 REALLOC_N(tbl->tbl, ID, tbl->capa);
00217 }
00218 tbl->tbl[tbl->pos++] = id;
00219 }
00220
00221 static int
00222 vtable_included(const struct vtable * tbl, ID id)
00223 {
00224 int i;
00225
00226 if (POINTER_P(tbl)) {
00227 for (i = 0; i < tbl->pos; i++) {
00228 if (tbl->tbl[i] == id) {
00229 return 1;
00230 }
00231 }
00232 }
00233 return 0;
00234 }
00235
00236
00237 #ifndef RIPPER
00238 typedef struct token_info {
00239 const char *token;
00240 int linenum;
00241 int column;
00242 int nonspc;
00243 struct token_info *next;
00244 } token_info;
00245 #endif
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256 struct parser_params {
00257 int is_ripper;
00258 NODE *heap;
00259
00260 YYSTYPE *parser_yylval;
00261 VALUE eofp;
00262
00263 NODE *parser_lex_strterm;
00264 enum lex_state_e parser_lex_state;
00265 stack_type parser_cond_stack;
00266 stack_type parser_cmdarg_stack;
00267 int parser_class_nest;
00268 int parser_paren_nest;
00269 int parser_lpar_beg;
00270 int parser_in_single;
00271 int parser_in_def;
00272 int parser_compile_for_eval;
00273 VALUE parser_cur_mid;
00274 int parser_in_defined;
00275 char *parser_tokenbuf;
00276 int parser_tokidx;
00277 int parser_toksiz;
00278 VALUE parser_lex_input;
00279 VALUE parser_lex_lastline;
00280 VALUE parser_lex_nextline;
00281 const char *parser_lex_pbeg;
00282 const char *parser_lex_p;
00283 const char *parser_lex_pend;
00284 int parser_heredoc_end;
00285 int parser_command_start;
00286 NODE *parser_deferred_nodes;
00287 long parser_lex_gets_ptr;
00288 VALUE (*parser_lex_gets)(struct parser_params*,VALUE);
00289 struct local_vars *parser_lvtbl;
00290 int parser_ruby__end__seen;
00291 int line_count;
00292 int has_shebang;
00293 char *parser_ruby_sourcefile;
00294 int parser_ruby_sourceline;
00295 rb_encoding *enc;
00296 rb_encoding *utf8;
00297
00298 int parser_yydebug;
00299
00300 #ifndef RIPPER
00301
00302 NODE *parser_eval_tree_begin;
00303 NODE *parser_eval_tree;
00304 VALUE debug_lines;
00305 VALUE coverage;
00306 int nerr;
00307
00308 token_info *parser_token_info;
00309 #else
00310
00311 VALUE parser_ruby_sourcefile_string;
00312 const char *tokp;
00313 VALUE delayed;
00314 int delayed_line;
00315 int delayed_col;
00316
00317 VALUE value;
00318 VALUE result;
00319 VALUE parsing_thread;
00320 int toplevel_p;
00321 #endif
00322 };
00323
00324 #define UTF8_ENC() (parser->utf8 ? parser->utf8 : \
00325 (parser->utf8 = rb_utf8_encoding()))
00326 #define STR_NEW(p,n) rb_enc_str_new((p),(n),parser->enc)
00327 #define STR_NEW0() rb_enc_str_new(0,0,parser->enc)
00328 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),parser->enc)
00329 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),parser->enc)
00330 #define ENC_SINGLE(cr) ((cr)==ENC_CODERANGE_7BIT)
00331 #define TOK_INTERN(mb) rb_intern3(tok(), toklen(), parser->enc)
00332
00333 #ifdef YYMALLOC
00334 void *rb_parser_malloc(struct parser_params *, size_t);
00335 void *rb_parser_realloc(struct parser_params *, void *, size_t);
00336 void *rb_parser_calloc(struct parser_params *, size_t, size_t);
00337 void rb_parser_free(struct parser_params *, void *);
00338 #endif
00339
00340 static int parser_yyerror(struct parser_params*, const char*);
00341 #define yyerror(msg) parser_yyerror(parser, msg)
00342
00343 #define YYLEX_PARAM parser
00344
00345 #define lex_strterm (parser->parser_lex_strterm)
00346 #define lex_state (parser->parser_lex_state)
00347 #define cond_stack (parser->parser_cond_stack)
00348 #define cmdarg_stack (parser->parser_cmdarg_stack)
00349 #define class_nest (parser->parser_class_nest)
00350 #define paren_nest (parser->parser_paren_nest)
00351 #define lpar_beg (parser->parser_lpar_beg)
00352 #define in_single (parser->parser_in_single)
00353 #define in_def (parser->parser_in_def)
00354 #define compile_for_eval (parser->parser_compile_for_eval)
00355 #define cur_mid (parser->parser_cur_mid)
00356 #define in_defined (parser->parser_in_defined)
00357 #define tokenbuf (parser->parser_tokenbuf)
00358 #define tokidx (parser->parser_tokidx)
00359 #define toksiz (parser->parser_toksiz)
00360 #define lex_input (parser->parser_lex_input)
00361 #define lex_lastline (parser->parser_lex_lastline)
00362 #define lex_nextline (parser->parser_lex_nextline)
00363 #define lex_pbeg (parser->parser_lex_pbeg)
00364 #define lex_p (parser->parser_lex_p)
00365 #define lex_pend (parser->parser_lex_pend)
00366 #define heredoc_end (parser->parser_heredoc_end)
00367 #define command_start (parser->parser_command_start)
00368 #define deferred_nodes (parser->parser_deferred_nodes)
00369 #define lex_gets_ptr (parser->parser_lex_gets_ptr)
00370 #define lex_gets (parser->parser_lex_gets)
00371 #define lvtbl (parser->parser_lvtbl)
00372 #define ruby__end__seen (parser->parser_ruby__end__seen)
00373 #define ruby_sourceline (parser->parser_ruby_sourceline)
00374 #define ruby_sourcefile (parser->parser_ruby_sourcefile)
00375 #define yydebug (parser->parser_yydebug)
00376 #ifdef RIPPER
00377 #else
00378 #define ruby_eval_tree (parser->parser_eval_tree)
00379 #define ruby_eval_tree_begin (parser->parser_eval_tree_begin)
00380 #define ruby_debug_lines (parser->debug_lines)
00381 #define ruby_coverage (parser->coverage)
00382 #endif
00383
00384 static int yylex(void*, void*);
00385
00386 #ifndef RIPPER
00387 #define yyparse ruby_yyparse
00388
00389 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE);
00390 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, type, a1, a2, a3)
00391
00392 static NODE *cond_gen(struct parser_params*,NODE*);
00393 #define cond(node) cond_gen(parser, node)
00394 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
00395 #define logop(type,node1,node2) logop_gen(parser, type, node1, node2)
00396
00397 static NODE *newline_node(NODE*);
00398 static void fixpos(NODE*,NODE*);
00399
00400 static int value_expr_gen(struct parser_params*,NODE*);
00401 static void void_expr_gen(struct parser_params*,NODE*);
00402 static NODE *remove_begin(NODE*);
00403 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
00404 #define void_expr0(node) void_expr_gen(parser, (node))
00405 #define void_expr(node) void_expr0((node) = remove_begin(node))
00406 static void void_stmts_gen(struct parser_params*,NODE*);
00407 #define void_stmts(node) void_stmts_gen(parser, node)
00408 static void reduce_nodes_gen(struct parser_params*,NODE**);
00409 #define reduce_nodes(n) reduce_nodes_gen(parser,n)
00410 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*);
00411 #define block_dup_check(n1,n2) block_dup_check_gen(parser,n1,n2)
00412
00413 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*);
00414 #define block_append(h,t) block_append_gen(parser,h,t)
00415 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*);
00416 #define list_append(l,i) list_append_gen(parser,l,i)
00417 static NODE *list_concat_gen(struct parser_params*,NODE*,NODE*);
00418 #define list_concat(h,t) list_concat_gen(parser,h,t)
00419 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*);
00420 #define arg_append(h,t) arg_append_gen(parser,h,t)
00421 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*);
00422 #define arg_concat(h,t) arg_concat_gen(parser,h,t)
00423 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*);
00424 #define literal_concat(h,t) literal_concat_gen(parser,h,t)
00425 static int literal_concat0(struct parser_params *, VALUE, VALUE);
00426 static NODE *new_evstr_gen(struct parser_params*,NODE*);
00427 #define new_evstr(n) new_evstr_gen(parser,n)
00428 static NODE *evstr2dstr_gen(struct parser_params*,NODE*);
00429 #define evstr2dstr(n) evstr2dstr_gen(parser,n)
00430 static NODE *splat_array(NODE*);
00431
00432 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*);
00433 #define call_bin_op(recv,id,arg1) call_bin_op_gen(parser, recv,id,arg1)
00434 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID);
00435 #define call_uni_op(recv,id) call_uni_op_gen(parser, recv,id)
00436
00437 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,ID);
00438 #define new_args(f,o,r,p,b) new_args_gen(parser, f,o,r,p,b)
00439
00440 static NODE *negate_lit(NODE*);
00441 static NODE *ret_args_gen(struct parser_params*,NODE*);
00442 #define ret_args(node) ret_args_gen(parser, node)
00443 static NODE *arg_blk_pass(NODE*,NODE*);
00444 static NODE *new_yield_gen(struct parser_params*,NODE*);
00445 #define new_yield(node) new_yield_gen(parser, node)
00446
00447 static NODE *gettable_gen(struct parser_params*,ID);
00448 #define gettable(id) gettable_gen(parser,id)
00449 static NODE *assignable_gen(struct parser_params*,ID,NODE*);
00450 #define assignable(id,node) assignable_gen(parser, id, node)
00451
00452 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
00453 #define aryset(node1,node2) aryset_gen(parser, node1, node2)
00454 static NODE *attrset_gen(struct parser_params*,NODE*,ID);
00455 #define attrset(node,id) attrset_gen(parser, node, id)
00456
00457 static void rb_backref_error_gen(struct parser_params*,NODE*);
00458 #define rb_backref_error(n) rb_backref_error_gen(parser,n)
00459 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
00460 #define node_assign(node1, node2) node_assign_gen(parser, node1, node2)
00461
00462 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
00463 #define match_op(node1,node2) match_op_gen(parser, node1, node2)
00464
00465 static ID *local_tbl_gen(struct parser_params*);
00466 #define local_tbl() local_tbl_gen(parser)
00467
00468 static void fixup_nodes(NODE **);
00469
00470 extern int rb_dvar_defined(ID);
00471 extern int rb_local_defined(ID);
00472 extern int rb_parse_in_eval(void);
00473 extern int rb_parse_in_main(void);
00474
00475 static VALUE reg_compile_gen(struct parser_params*, VALUE, int);
00476 #define reg_compile(str,options) reg_compile_gen(parser, str, options)
00477 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int);
00478 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, str, options)
00479 static int reg_fragment_check_gen(struct parser_params*, VALUE, int);
00480 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, str, options)
00481 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match);
00482 #define reg_named_capture_assign(regexp,match) reg_named_capture_assign_gen(parser,regexp,match)
00483
00484 #define get_id(id) (id)
00485 #define get_value(val) (val)
00486 #else
00487 #define remove_begin(node) (node)
00488 #define rb_dvar_defined(id) 0
00489 #define rb_local_defined(id) 0
00490 static ID ripper_get_id(VALUE);
00491 #define get_id(id) ripper_get_id(id)
00492 static VALUE ripper_get_value(VALUE);
00493 #define get_value(val) ripper_get_value(val)
00494 static VALUE assignable_gen(struct parser_params*,VALUE);
00495 #define assignable(lhs,node) assignable_gen(parser, lhs)
00496 #endif
00497
00498 static ID formal_argument_gen(struct parser_params*, ID);
00499 #define formal_argument(id) formal_argument_gen(parser, id)
00500 static ID shadowing_lvar_gen(struct parser_params*,ID);
00501 #define shadowing_lvar(name) shadowing_lvar_gen(parser, name)
00502 static void new_bv_gen(struct parser_params*,ID);
00503 #define new_bv(id) new_bv_gen(parser, id)
00504
00505 static void local_push_gen(struct parser_params*,int);
00506 #define local_push(top) local_push_gen(parser,top)
00507 static void local_pop_gen(struct parser_params*);
00508 #define local_pop() local_pop_gen(parser)
00509 static int local_var_gen(struct parser_params*, ID);
00510 #define local_var(id) local_var_gen(parser, id);
00511 static int arg_var_gen(struct parser_params*, ID);
00512 #define arg_var(id) arg_var_gen(parser, id)
00513 static int local_id_gen(struct parser_params*, ID);
00514 #define local_id(id) local_id_gen(parser, id)
00515 static ID internal_id_gen(struct parser_params*);
00516 #define internal_id() internal_id_gen(parser)
00517
00518 static const struct vtable *dyna_push_gen(struct parser_params *);
00519 #define dyna_push() dyna_push_gen(parser)
00520 static void dyna_pop_gen(struct parser_params*, const struct vtable *);
00521 #define dyna_pop(node) dyna_pop_gen(parser, node)
00522 static int dyna_in_block_gen(struct parser_params*);
00523 #define dyna_in_block() dyna_in_block_gen(parser)
00524 #define dyna_var(id) local_var(id)
00525 static int dvar_defined_gen(struct parser_params*,ID);
00526 #define dvar_defined(id) dvar_defined_gen(parser, id)
00527 static int dvar_curr_gen(struct parser_params*,ID);
00528 #define dvar_curr(id) dvar_curr_gen(parser, id)
00529
00530 static int lvar_defined_gen(struct parser_params*, ID);
00531 #define lvar_defined(id) lvar_defined_gen(parser, id)
00532
00533 #define RE_OPTION_ONCE (1<<16)
00534 #define RE_OPTION_ENCODING_SHIFT 8
00535 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
00536 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
00537 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
00538 #define RE_OPTION_MASK 0xff
00539 #define RE_OPTION_ARG_ENCODING_NONE 32
00540
00541 #define NODE_STRTERM NODE_ZARRAY
00542 #define NODE_HEREDOC NODE_ARRAY
00543 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
00544 #define nd_func u1.id
00545 #if SIZEOF_SHORT == 2
00546 #define nd_term(node) ((signed short)(node)->u2.id)
00547 #else
00548 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
00549 #endif
00550 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
00551 #define nd_nest u3.cnt
00552
00553
00554
00555 #ifdef RIPPER
00556 #define RIPPER_VERSION "0.1.0"
00557
00558 #include "eventids1.c"
00559 #include "eventids2.c"
00560 static ID ripper_id_gets;
00561
00562 static VALUE ripper_dispatch0(struct parser_params*,ID);
00563 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
00564 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
00565 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
00566 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
00567 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
00568
00569 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
00570 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a)
00571 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b)
00572 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c)
00573 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d)
00574 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e)
00575
00576 #define yyparse ripper_yyparse
00577
00578 #define ripper_intern(s) ID2SYM(rb_intern(s))
00579 static VALUE ripper_id2sym(ID);
00580 #ifdef __GNUC__
00581 #define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
00582 ID2SYM(id) : ripper_id2sym(id))
00583 #endif
00584
00585 #define arg_new() dispatch0(args_new)
00586 #define arg_add(l,a) dispatch2(args_add, l, a)
00587 #define arg_add_star(l,a) dispatch2(args_add_star, l, a)
00588 #define arg_add_block(l,b) dispatch2(args_add_block, l, b)
00589 #define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(args_add_block, l, b))
00590 #define bare_assoc(v) dispatch1(bare_assoc_hash, v)
00591 #define arg_add_assocs(l,b) arg_add(l, bare_assoc(b))
00592
00593 #define args2mrhs(a) dispatch1(mrhs_new_from_args, a)
00594 #define mrhs_new() dispatch0(mrhs_new)
00595 #define mrhs_add(l,a) dispatch2(mrhs_add, l, a)
00596 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a)
00597
00598 #define mlhs_new() dispatch0(mlhs_new)
00599 #define mlhs_add(l,a) dispatch2(mlhs_add, l, a)
00600 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a)
00601
00602 #define params_new(pars, opts, rest, pars2, blk) \
00603 dispatch5(params, pars, opts, rest, pars2, blk)
00604
00605 #define blockvar_new(p,v) dispatch2(block_var, p, v)
00606 #define blockvar_add_star(l,a) dispatch2(block_var_add_star, l, a)
00607 #define blockvar_add_block(l,a) dispatch2(block_var_add_block, l, a)
00608
00609 #define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a))
00610 #define method_arg(m,a) dispatch2(method_add_arg,m,a)
00611 #define method_add_block(m,b) dispatch2(method_add_block, m, b)
00612
00613 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
00614
00615 #define FIXME 0
00616
00617 #endif
00618
00619 #ifndef RIPPER
00620 # define ifndef_ripper(x) x
00621 #else
00622 # define ifndef_ripper(x)
00623 #endif
00624
00625 #ifndef RIPPER
00626 # define rb_warn0(fmt) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt)
00627 # define rb_warnI(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a)
00628 # define rb_warnS(fmt,a) rb_compile_warn(ruby_sourcefile, ruby_sourceline, fmt, a)
00629 # define rb_warning0(fmt) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt)
00630 # define rb_warningS(fmt,a) rb_compile_warning(ruby_sourcefile, ruby_sourceline, fmt, a)
00631 #else
00632 # define rb_warn0(fmt) ripper_warn0(parser, fmt)
00633 # define rb_warnI(fmt,a) ripper_warnI(parser, fmt, a)
00634 # define rb_warnS(fmt,a) ripper_warnS(parser, fmt, a)
00635 # define rb_warning0(fmt) ripper_warning0(parser, fmt)
00636 # define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a)
00637 static void ripper_warn0(struct parser_params*, const char*);
00638 static void ripper_warnI(struct parser_params*, const char*, int);
00639 #if 0
00640 static void ripper_warnS(struct parser_params*, const char*, const char*);
00641 #endif
00642 static void ripper_warning0(struct parser_params*, const char*);
00643 static void ripper_warningS(struct parser_params*, const char*, const char*);
00644 #endif
00645
00646 #ifdef RIPPER
00647 static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
00648 # define rb_compile_error ripper_compile_error
00649 # define compile_error ripper_compile_error
00650 # define PARSER_ARG parser,
00651 #else
00652 # define compile_error parser->nerr++,rb_compile_error
00653 # define PARSER_ARG ruby_sourcefile, ruby_sourceline,
00654 #endif
00655
00656
00657
00658
00659 #ifdef OLD_YACC
00660 #ifndef YYMAXDEPTH
00661 #define YYMAXDEPTH 10000
00662 #endif
00663 #endif
00664
00665 #ifndef RIPPER
00666 static void token_info_push(struct parser_params*, const char *token);
00667 static void token_info_pop(struct parser_params*, const char *token);
00668 #define token_info_push(token) (RTEST(ruby_verbose) ? token_info_push(parser, token) : (void)0)
00669 #define token_info_pop(token) (RTEST(ruby_verbose) ? token_info_pop(parser, token) : (void)0)
00670 #else
00671 #define token_info_push(token)
00672 #define token_info_pop(token)
00673 #endif
00674
00675
00676
00677 #line 678 "parse.c"
00678
00679
00680 #ifndef YYDEBUG
00681 # define YYDEBUG 1
00682 #endif
00683
00684
00685 #ifdef YYERROR_VERBOSE
00686 # undef YYERROR_VERBOSE
00687 # define YYERROR_VERBOSE 1
00688 #else
00689 # define YYERROR_VERBOSE 0
00690 #endif
00691
00692
00693 #ifndef YYTOKEN_TABLE
00694 # define YYTOKEN_TABLE 0
00695 #endif
00696
00697
00698
00699 #ifndef YYTOKENTYPE
00700 # define YYTOKENTYPE
00701
00702
00703 enum yytokentype {
00704 keyword_class = 258,
00705 keyword_module = 259,
00706 keyword_def = 260,
00707 keyword_undef = 261,
00708 keyword_begin = 262,
00709 keyword_rescue = 263,
00710 keyword_ensure = 264,
00711 keyword_end = 265,
00712 keyword_if = 266,
00713 keyword_unless = 267,
00714 keyword_then = 268,
00715 keyword_elsif = 269,
00716 keyword_else = 270,
00717 keyword_case = 271,
00718 keyword_when = 272,
00719 keyword_while = 273,
00720 keyword_until = 274,
00721 keyword_for = 275,
00722 keyword_break = 276,
00723 keyword_next = 277,
00724 keyword_redo = 278,
00725 keyword_retry = 279,
00726 keyword_in = 280,
00727 keyword_do = 281,
00728 keyword_do_cond = 282,
00729 keyword_do_block = 283,
00730 keyword_do_LAMBDA = 284,
00731 keyword_return = 285,
00732 keyword_yield = 286,
00733 keyword_super = 287,
00734 keyword_self = 288,
00735 keyword_nil = 289,
00736 keyword_true = 290,
00737 keyword_false = 291,
00738 keyword_and = 292,
00739 keyword_or = 293,
00740 keyword_not = 294,
00741 modifier_if = 295,
00742 modifier_unless = 296,
00743 modifier_while = 297,
00744 modifier_until = 298,
00745 modifier_rescue = 299,
00746 keyword_alias = 300,
00747 keyword_defined = 301,
00748 keyword_BEGIN = 302,
00749 keyword_END = 303,
00750 keyword__LINE__ = 304,
00751 keyword__FILE__ = 305,
00752 keyword__ENCODING__ = 306,
00753 tIDENTIFIER = 307,
00754 tFID = 308,
00755 tGVAR = 309,
00756 tIVAR = 310,
00757 tCONSTANT = 311,
00758 tCVAR = 312,
00759 tLABEL = 313,
00760 tINTEGER = 314,
00761 tFLOAT = 315,
00762 tSTRING_CONTENT = 316,
00763 tCHAR = 317,
00764 tNTH_REF = 318,
00765 tBACK_REF = 319,
00766 tREGEXP_END = 320,
00767 tUPLUS = 321,
00768 tUMINUS = 322,
00769 tPOW = 323,
00770 tCMP = 324,
00771 tEQ = 325,
00772 tEQQ = 326,
00773 tNEQ = 327,
00774 tGEQ = 328,
00775 tLEQ = 329,
00776 tANDOP = 330,
00777 tOROP = 331,
00778 tMATCH = 332,
00779 tNMATCH = 333,
00780 tDOT2 = 334,
00781 tDOT3 = 335,
00782 tAREF = 336,
00783 tASET = 337,
00784 tLSHFT = 338,
00785 tRSHFT = 339,
00786 tCOLON2 = 340,
00787 tCOLON3 = 341,
00788 tOP_ASGN = 342,
00789 tASSOC = 343,
00790 tLPAREN = 344,
00791 tLPAREN_ARG = 345,
00792 tRPAREN = 346,
00793 tLBRACK = 347,
00794 tLBRACE = 348,
00795 tLBRACE_ARG = 349,
00796 tSTAR = 350,
00797 tAMPER = 351,
00798 tLAMBDA = 352,
00799 tSYMBEG = 353,
00800 tSTRING_BEG = 354,
00801 tXSTRING_BEG = 355,
00802 tREGEXP_BEG = 356,
00803 tWORDS_BEG = 357,
00804 tQWORDS_BEG = 358,
00805 tSTRING_DBEG = 359,
00806 tSTRING_DVAR = 360,
00807 tSTRING_END = 361,
00808 tLAMBEG = 362,
00809 tLOWEST = 363,
00810 tUMINUS_NUM = 364,
00811 idNULL = 365,
00812 idRespond_to = 366,
00813 idIFUNC = 367,
00814 idCFUNC = 368,
00815 id_core_set_method_alias = 369,
00816 id_core_set_variable_alias = 370,
00817 id_core_undef_method = 371,
00818 id_core_define_method = 372,
00819 id_core_define_singleton_method = 373,
00820 id_core_set_postexe = 374,
00821 tLAST_TOKEN = 375
00822 };
00823 #endif
00824
00825
00826
00827 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00828 typedef union YYSTYPE
00829 {
00830
00831
00832 #line 620 "ripper.y"
00833
00834 VALUE val;
00835 NODE *node;
00836 ID id;
00837 int num;
00838 const struct vtable *vars;
00839
00840
00841
00842
00843 #line 844 "parse.c"
00844 } YYSTYPE;
00845 # define YYSTYPE_IS_TRIVIAL 1
00846 # define yystype YYSTYPE
00847 # define YYSTYPE_IS_DECLARED 1
00848 #endif
00849
00850
00851
00852
00853
00854
00855 #line 856 "parse.c"
00856
00857 #ifdef short
00858 # undef short
00859 #endif
00860
00861 #ifdef YYTYPE_UINT8
00862 typedef YYTYPE_UINT8 yytype_uint8;
00863 #else
00864 typedef unsigned char yytype_uint8;
00865 #endif
00866
00867 #ifdef YYTYPE_INT8
00868 typedef YYTYPE_INT8 yytype_int8;
00869 #elif (defined __STDC__ || defined __C99__FUNC__ \
00870 || defined __cplusplus || defined _MSC_VER)
00871 typedef signed char yytype_int8;
00872 #else
00873 typedef short int yytype_int8;
00874 #endif
00875
00876 #ifdef YYTYPE_UINT16
00877 typedef YYTYPE_UINT16 yytype_uint16;
00878 #else
00879 typedef unsigned short int yytype_uint16;
00880 #endif
00881
00882 #ifdef YYTYPE_INT16
00883 typedef YYTYPE_INT16 yytype_int16;
00884 #else
00885 typedef short int yytype_int16;
00886 #endif
00887
00888 #ifndef YYSIZE_T
00889 # ifdef __SIZE_TYPE__
00890 # define YYSIZE_T __SIZE_TYPE__
00891 # elif defined size_t
00892 # define YYSIZE_T size_t
00893 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00894 || defined __cplusplus || defined _MSC_VER)
00895 # include <stddef.h>
00896 # define YYSIZE_T size_t
00897 # else
00898 # define YYSIZE_T unsigned int
00899 # endif
00900 #endif
00901
00902 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00903
00904 #ifndef YY_
00905 # if defined YYENABLE_NLS && YYENABLE_NLS
00906 # if ENABLE_NLS
00907 # include <libintl.h>
00908 # define YY_(msgid) dgettext ("bison-runtime", msgid)
00909 # endif
00910 # endif
00911 # ifndef YY_
00912 # define YY_(msgid) msgid
00913 # endif
00914 #endif
00915
00916
00917 #if ! defined lint || defined __GNUC__
00918 # define YYUSE(e) ((void) (e))
00919 #else
00920 # define YYUSE(e)
00921 #endif
00922
00923
00924 #ifndef lint
00925 # define YYID(n) (n)
00926 #else
00927 #if (defined __STDC__ || defined __C99__FUNC__ \
00928 || defined __cplusplus || defined _MSC_VER)
00929 static int
00930 YYID (int yyi)
00931 #else
00932 static int
00933 YYID (yyi)
00934 int yyi;
00935 #endif
00936 {
00937 return yyi;
00938 }
00939 #endif
00940
00941 #if ! defined yyoverflow || YYERROR_VERBOSE
00942
00943
00944
00945 # ifdef YYSTACK_USE_ALLOCA
00946 # if YYSTACK_USE_ALLOCA
00947 # ifdef __GNUC__
00948 # define YYSTACK_ALLOC __builtin_alloca
00949 # elif defined __BUILTIN_VA_ARG_INCR
00950 # include <alloca.h>
00951 # elif defined _AIX
00952 # define YYSTACK_ALLOC __alloca
00953 # elif defined _MSC_VER
00954 # include <malloc.h>
00955 # define alloca _alloca
00956 # else
00957 # define YYSTACK_ALLOC alloca
00958 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00959 || defined __cplusplus || defined _MSC_VER)
00960 # include <stdlib.h>
00961 # ifndef _STDLIB_H
00962 # define _STDLIB_H 1
00963 # endif
00964 # endif
00965 # endif
00966 # endif
00967 # endif
00968
00969 # ifdef YYSTACK_ALLOC
00970
00971 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
00972 # ifndef YYSTACK_ALLOC_MAXIMUM
00973
00974
00975
00976
00977 # define YYSTACK_ALLOC_MAXIMUM 4032
00978 # endif
00979 # else
00980 # define YYSTACK_ALLOC YYMALLOC
00981 # define YYSTACK_FREE YYFREE
00982 # ifndef YYSTACK_ALLOC_MAXIMUM
00983 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00984 # endif
00985 # if (defined __cplusplus && ! defined _STDLIB_H \
00986 && ! ((defined YYMALLOC || defined malloc) \
00987 && (defined YYFREE || defined free)))
00988 # include <stdlib.h>
00989 # ifndef _STDLIB_H
00990 # define _STDLIB_H 1
00991 # endif
00992 # endif
00993 # ifndef YYMALLOC
00994 # define YYMALLOC malloc
00995 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00996 || defined __cplusplus || defined _MSC_VER)
00997 void *malloc (YYSIZE_T);
00998 # endif
00999 # endif
01000 # ifndef YYFREE
01001 # define YYFREE free
01002 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
01003 || defined __cplusplus || defined _MSC_VER)
01004 void free (void *);
01005 # endif
01006 # endif
01007 # endif
01008 #endif
01009
01010
01011 #if (! defined yyoverflow \
01012 && (! defined __cplusplus \
01013 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
01014
01015
01016 union yyalloc
01017 {
01018 yytype_int16 yyss_alloc;
01019 YYSTYPE yyvs_alloc;
01020 };
01021
01022
01023 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
01024
01025
01026
01027 # define YYSTACK_BYTES(N) \
01028 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
01029 + YYSTACK_GAP_MAXIMUM)
01030
01031
01032
01033 # ifndef YYCOPY
01034 # if defined __GNUC__ && 1 < __GNUC__
01035 # define YYCOPY(To, From, Count) \
01036 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
01037 # else
01038 # define YYCOPY(To, From, Count) \
01039 do \
01040 { \
01041 YYSIZE_T yyi; \
01042 for (yyi = 0; yyi < (Count); yyi++) \
01043 (To)[yyi] = (From)[yyi]; \
01044 } \
01045 while (YYID (0))
01046 # endif
01047 # endif
01048
01049
01050
01051
01052
01053
01054 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
01055 do \
01056 { \
01057 YYSIZE_T yynewbytes; \
01058 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
01059 Stack = &yyptr->Stack_alloc; \
01060 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
01061 yyptr += yynewbytes / sizeof (*yyptr); \
01062 } \
01063 while (YYID (0))
01064
01065 #endif
01066
01067
01068 #define YYFINAL 3
01069
01070 #define YYLAST 10410
01071
01072
01073 #define YYNTOKENS 148
01074
01075 #define YYNNTS 172
01076
01077 #define YYNRULES 565
01078
01079 #define YYNSTATES 975
01080
01081
01082 #define YYUNDEFTOK 2
01083 #define YYMAXUTOK 375
01084
01085 #define YYTRANSLATE(YYX) \
01086 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
01087
01088
01089 static const yytype_uint8 yytranslate[] =
01090 {
01091 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01092 147, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01093 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01094 2, 2, 146, 123, 2, 2, 2, 121, 116, 2,
01095 142, 143, 119, 117, 140, 118, 139, 120, 2, 2,
01096 2, 2, 2, 2, 2, 2, 2, 2, 111, 145,
01097 113, 109, 112, 110, 2, 2, 2, 2, 2, 2,
01098 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01099 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01100 2, 138, 2, 144, 115, 2, 141, 2, 2, 2,
01101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01103 2, 2, 2, 136, 114, 137, 124, 2, 2, 2,
01104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01107 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01108 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01109 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01110 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01111 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01112 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01113 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01114 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01115 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
01116 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
01117 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
01118 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
01119 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
01120 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
01121 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
01122 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
01123 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
01124 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
01125 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
01126 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
01127 105, 106, 107, 108, 122, 125, 126, 127, 128, 129,
01128 130, 131, 132, 133, 134, 135
01129 };
01130
01131 #if YYDEBUG
01132
01133
01134 static const yytype_uint16 yyprhs[] =
01135 {
01136 0, 0, 3, 4, 7, 10, 12, 14, 18, 21,
01137 23, 24, 30, 35, 38, 40, 42, 46, 49, 50,
01138 55, 59, 63, 67, 70, 74, 78, 82, 86, 90,
01139 95, 99, 103, 107, 114, 120, 126, 132, 138, 142,
01140 146, 150, 154, 156, 158, 162, 166, 170, 173, 175,
01141 177, 179, 181, 183, 188, 193, 194, 200, 203, 207,
01142 212, 218, 223, 229, 232, 235, 238, 241, 244, 246,
01143 250, 252, 256, 258, 261, 265, 271, 274, 279, 282,
01144 287, 289, 293, 295, 299, 302, 306, 308, 312, 314,
01145 319, 323, 327, 331, 335, 338, 340, 342, 347, 351,
01146 355, 359, 363, 366, 368, 370, 372, 375, 377, 381,
01147 383, 385, 387, 389, 391, 393, 395, 397, 399, 401,
01148 402, 407, 409, 411, 413, 415, 417, 419, 421, 423,
01149 425, 427, 429, 431, 433, 435, 437, 439, 441, 443,
01150 445, 447, 449, 451, 453, 455, 457, 459, 461, 463,
01151 465, 467, 469, 471, 473, 475, 477, 479, 481, 483,
01152 485, 487, 489, 491, 493, 495, 497, 499, 501, 503,
01153 505, 507, 509, 511, 513, 515, 517, 519, 521, 523,
01154 525, 527, 529, 531, 533, 535, 537, 539, 541, 543,
01155 545, 547, 551, 557, 561, 567, 574, 580, 586, 592,
01156 598, 603, 607, 611, 615, 619, 623, 627, 631, 635,
01157 639, 644, 649, 652, 655, 659, 663, 667, 671, 675,
01158 679, 683, 687, 691, 695, 699, 703, 707, 710, 713,
01159 717, 721, 725, 729, 730, 735, 742, 744, 746, 748,
01160 751, 756, 759, 763, 765, 767, 769, 771, 773, 776,
01161 779, 784, 786, 787, 790, 793, 796, 798, 800, 802,
01162 805, 809, 814, 818, 823, 826, 828, 830, 832, 834,
01163 836, 838, 840, 842, 844, 845, 850, 851, 856, 860,
01164 864, 867, 871, 875, 877, 882, 886, 888, 889, 896,
01165 901, 905, 908, 910, 913, 916, 923, 930, 931, 932,
01166 940, 941, 942, 950, 956, 961, 962, 963, 973, 974,
01167 981, 982, 983, 992, 993, 999, 1000, 1007, 1008, 1009,
01168 1019, 1021, 1023, 1025, 1027, 1029, 1031, 1033, 1035, 1037,
01169 1039, 1041, 1043, 1045, 1047, 1049, 1051, 1053, 1055, 1058,
01170 1060, 1062, 1064, 1070, 1072, 1075, 1077, 1079, 1081, 1085,
01171 1087, 1091, 1093, 1098, 1105, 1109, 1115, 1118, 1123, 1125,
01172 1129, 1136, 1145, 1150, 1157, 1162, 1165, 1172, 1175, 1180,
01173 1187, 1190, 1195, 1198, 1203, 1205, 1207, 1209, 1213, 1215,
01174 1220, 1222, 1225, 1227, 1231, 1233, 1235, 1236, 1237, 1242,
01175 1247, 1249, 1253, 1257, 1258, 1264, 1267, 1272, 1277, 1280,
01176 1285, 1290, 1294, 1298, 1302, 1305, 1307, 1312, 1313, 1319,
01177 1320, 1326, 1332, 1334, 1336, 1343, 1345, 1347, 1349, 1351,
01178 1354, 1356, 1359, 1361, 1363, 1365, 1367, 1369, 1371, 1373,
01179 1376, 1380, 1384, 1388, 1392, 1396, 1397, 1401, 1403, 1406,
01180 1410, 1414, 1415, 1419, 1420, 1423, 1424, 1427, 1428, 1431,
01181 1433, 1434, 1438, 1439, 1440, 1446, 1448, 1450, 1452, 1454,
01182 1457, 1459, 1461, 1463, 1465, 1469, 1471, 1473, 1476, 1479,
01183 1481, 1483, 1485, 1487, 1489, 1491, 1493, 1495, 1497, 1499,
01184 1501, 1503, 1505, 1507, 1509, 1511, 1513, 1514, 1519, 1522,
01185 1526, 1529, 1536, 1545, 1550, 1557, 1562, 1569, 1572, 1577,
01186 1584, 1587, 1592, 1595, 1600, 1602, 1603, 1605, 1607, 1609,
01187 1611, 1613, 1615, 1617, 1621, 1623, 1627, 1631, 1635, 1637,
01188 1641, 1643, 1647, 1649, 1651, 1654, 1656, 1658, 1660, 1663,
01189 1666, 1668, 1670, 1671, 1676, 1678, 1681, 1683, 1687, 1691,
01190 1694, 1696, 1698, 1700, 1702, 1704, 1706, 1708, 1710, 1712,
01191 1714, 1716, 1718, 1719, 1721, 1722, 1724, 1727, 1730, 1731,
01192 1733, 1735, 1737, 1739, 1741, 1744
01193 };
01194
01195
01196 static const yytype_int16 yyrhs[] =
01197 {
01198 149, 0, -1, -1, 150, 151, -1, 152, 312, -1,
01199 319, -1, 153, -1, 152, 318, 153, -1, 1, 153,
01200 -1, 158, -1, -1, 47, 154, 136, 151, 137, -1,
01201 156, 255, 230, 258, -1, 157, 312, -1, 319, -1,
01202 158, -1, 157, 318, 158, -1, 1, 158, -1, -1,
01203 45, 179, 159, 179, -1, 45, 54, 54, -1, 45,
01204 54, 64, -1, 45, 54, 63, -1, 6, 180, -1,
01205 158, 40, 161, -1, 158, 41, 161, -1, 158, 42,
01206 161, -1, 158, 43, 161, -1, 158, 44, 158, -1,
01207 48, 136, 156, 137, -1, 174, 109, 162, -1, 167,
01208 109, 162, -1, 284, 87, 162, -1, 215, 138, 190,
01209 315, 87, 162, -1, 215, 139, 52, 87, 162, -1,
01210 215, 139, 56, 87, 162, -1, 215, 85, 56, 87,
01211 162, -1, 215, 85, 52, 87, 162, -1, 285, 87,
01212 162, -1, 174, 109, 197, -1, 167, 109, 186, -1,
01213 167, 109, 197, -1, 160, -1, 162, -1, 160, 37,
01214 160, -1, 160, 38, 160, -1, 39, 313, 160, -1,
01215 123, 162, -1, 184, -1, 160, -1, 166, -1, 163,
01216 -1, 248, -1, 248, 139, 309, 192, -1, 248, 85,
01217 309, 192, -1, -1, 94, 165, 236, 156, 137, -1,
01218 308, 192, -1, 308, 192, 164, -1, 215, 139, 309,
01219 192, -1, 215, 139, 309, 192, 164, -1, 215, 85,
01220 309, 192, -1, 215, 85, 309, 192, 164, -1, 32,
01221 192, -1, 31, 192, -1, 30, 191, -1, 21, 191,
01222 -1, 22, 191, -1, 169, -1, 89, 168, 314, -1,
01223 169, -1, 89, 168, 314, -1, 171, -1, 171, 170,
01224 -1, 171, 95, 173, -1, 171, 95, 173, 140, 172,
01225 -1, 171, 95, -1, 171, 95, 140, 172, -1, 95,
01226 173, -1, 95, 173, 140, 172, -1, 95, -1, 95,
01227 140, 172, -1, 173, -1, 89, 168, 314, -1, 170,
01228 140, -1, 171, 170, 140, -1, 170, -1, 172, 140,
01229 170, -1, 282, -1, 215, 138, 190, 315, -1, 215,
01230 139, 52, -1, 215, 85, 52, -1, 215, 139, 56,
01231 -1, 215, 85, 56, -1, 86, 56, -1, 285, -1,
01232 282, -1, 215, 138, 190, 315, -1, 215, 139, 52,
01233 -1, 215, 85, 52, -1, 215, 139, 56, -1, 215,
01234 85, 56, -1, 86, 56, -1, 285, -1, 52, -1,
01235 56, -1, 86, 175, -1, 175, -1, 215, 85, 175,
01236 -1, 52, -1, 56, -1, 53, -1, 182, -1, 183,
01237 -1, 177, -1, 278, -1, 178, -1, 280, -1, 179,
01238 -1, -1, 180, 140, 181, 179, -1, 114, -1, 115,
01239 -1, 116, -1, 69, -1, 70, -1, 71, -1, 77,
01240 -1, 78, -1, 112, -1, 73, -1, 113, -1, 74,
01241 -1, 72, -1, 83, -1, 84, -1, 117, -1, 118,
01242 -1, 119, -1, 95, -1, 120, -1, 121, -1, 68,
01243 -1, 123, -1, 124, -1, 66, -1, 67, -1, 81,
01244 -1, 82, -1, 141, -1, 49, -1, 50, -1, 51,
01245 -1, 47, -1, 48, -1, 45, -1, 37, -1, 7,
01246 -1, 21, -1, 16, -1, 3, -1, 5, -1, 46,
01247 -1, 26, -1, 15, -1, 14, -1, 10, -1, 9,
01248 -1, 36, -1, 20, -1, 25, -1, 4, -1, 22,
01249 -1, 34, -1, 39, -1, 38, -1, 23, -1, 8,
01250 -1, 24, -1, 30, -1, 33, -1, 32, -1, 13,
01251 -1, 35, -1, 6, -1, 17, -1, 31, -1, 11,
01252 -1, 12, -1, 18, -1, 19, -1, 174, 109, 184,
01253 -1, 174, 109, 184, 44, 184, -1, 284, 87, 184,
01254 -1, 284, 87, 184, 44, 184, -1, 215, 138, 190,
01255 315, 87, 184, -1, 215, 139, 52, 87, 184, -1,
01256 215, 139, 56, 87, 184, -1, 215, 85, 52, 87,
01257 184, -1, 215, 85, 56, 87, 184, -1, 86, 56,
01258 87, 184, -1, 285, 87, 184, -1, 184, 79, 184,
01259 -1, 184, 80, 184, -1, 184, 117, 184, -1, 184,
01260 118, 184, -1, 184, 119, 184, -1, 184, 120, 184,
01261 -1, 184, 121, 184, -1, 184, 68, 184, -1, 122,
01262 59, 68, 184, -1, 122, 60, 68, 184, -1, 66,
01263 184, -1, 67, 184, -1, 184, 114, 184, -1, 184,
01264 115, 184, -1, 184, 116, 184, -1, 184, 69, 184,
01265 -1, 184, 112, 184, -1, 184, 73, 184, -1, 184,
01266 113, 184, -1, 184, 74, 184, -1, 184, 70, 184,
01267 -1, 184, 71, 184, -1, 184, 72, 184, -1, 184,
01268 77, 184, -1, 184, 78, 184, -1, 123, 184, -1,
01269 124, 184, -1, 184, 83, 184, -1, 184, 84, 184,
01270 -1, 184, 75, 184, -1, 184, 76, 184, -1, -1,
01271 46, 313, 185, 184, -1, 184, 110, 184, 313, 111,
01272 184, -1, 198, -1, 184, -1, 319, -1, 196, 316,
01273 -1, 196, 140, 306, 316, -1, 306, 316, -1, 142,
01274 190, 314, -1, 319, -1, 188, -1, 319, -1, 191,
01275 -1, 166, -1, 196, 195, -1, 306, 195, -1, 196,
01276 140, 306, 195, -1, 194, -1, -1, 193, 191, -1,
01277 96, 186, -1, 140, 194, -1, 140, -1, 319, -1,
01278 186, -1, 95, 186, -1, 196, 140, 186, -1, 196,
01279 140, 95, 186, -1, 196, 140, 186, -1, 196, 140,
01280 95, 186, -1, 95, 186, -1, 259, -1, 260, -1,
01281 263, -1, 264, -1, 265, -1, 268, -1, 283, -1,
01282 285, -1, 53, -1, -1, 216, 199, 155, 226, -1,
01283 -1, 90, 160, 200, 314, -1, 89, 156, 143, -1,
01284 215, 85, 56, -1, 86, 56, -1, 92, 187, 144,
01285 -1, 93, 305, 137, -1, 30, -1, 31, 142, 191,
01286 314, -1, 31, 142, 314, -1, 31, -1, -1, 46,
01287 313, 142, 201, 160, 314, -1, 39, 142, 160, 314,
01288 -1, 39, 142, 314, -1, 308, 250, -1, 249, -1,
01289 249, 250, -1, 97, 241, -1, 217, 161, 227, 156,
01290 229, 226, -1, 218, 161, 227, 156, 230, 226, -1,
01291 -1, -1, 219, 202, 161, 228, 203, 156, 226, -1,
01292 -1, -1, 220, 204, 161, 228, 205, 156, 226, -1,
01293 221, 161, 312, 253, 226, -1, 221, 312, 253, 226,
01294 -1, -1, -1, 222, 231, 25, 206, 161, 228, 207,
01295 156, 226, -1, -1, 223, 176, 286, 208, 155, 226,
01296 -1, -1, -1, 223, 83, 160, 209, 317, 210, 155,
01297 226, -1, -1, 224, 176, 211, 155, 226, -1, -1,
01298 225, 177, 212, 288, 155, 226, -1, -1, -1, 225,
01299 303, 311, 213, 177, 214, 288, 155, 226, -1, 21,
01300 -1, 22, -1, 23, -1, 24, -1, 198, -1, 7,
01301 -1, 11, -1, 12, -1, 18, -1, 19, -1, 16,
01302 -1, 20, -1, 3, -1, 4, -1, 5, -1, 10,
01303 -1, 317, -1, 13, -1, 317, 13, -1, 317, -1,
01304 27, -1, 230, -1, 14, 161, 227, 156, 229, -1,
01305 319, -1, 15, 156, -1, 174, -1, 167, -1, 291,
01306 -1, 89, 234, 314, -1, 232, -1, 233, 140, 232,
01307 -1, 233, -1, 233, 140, 95, 291, -1, 233, 140,
01308 95, 291, 140, 233, -1, 233, 140, 95, -1, 233,
01309 140, 95, 140, 233, -1, 95, 291, -1, 95, 291,
01310 140, 233, -1, 95, -1, 95, 140, 233, -1, 293,
01311 140, 296, 140, 299, 302, -1, 293, 140, 296, 140,
01312 299, 140, 293, 302, -1, 293, 140, 296, 302, -1,
01313 293, 140, 296, 140, 293, 302, -1, 293, 140, 299,
01314 302, -1, 293, 140, -1, 293, 140, 299, 140, 293,
01315 302, -1, 293, 302, -1, 296, 140, 299, 302, -1,
01316 296, 140, 299, 140, 293, 302, -1, 296, 302, -1,
01317 296, 140, 293, 302, -1, 299, 302, -1, 299, 140,
01318 293, 302, -1, 301, -1, 319, -1, 237, -1, 114,
01319 238, 114, -1, 76, -1, 114, 235, 238, 114, -1,
01320 319, -1, 145, 239, -1, 240, -1, 239, 140, 240,
01321 -1, 52, -1, 290, -1, -1, -1, 242, 243, 244,
01322 245, -1, 142, 289, 238, 314, -1, 289, -1, 107,
01323 156, 137, -1, 29, 156, 10, -1, -1, 28, 247,
01324 236, 156, 10, -1, 166, 246, -1, 248, 139, 309,
01325 189, -1, 248, 85, 309, 189, -1, 308, 188, -1,
01326 215, 139, 309, 189, -1, 215, 85, 309, 188, -1,
01327 215, 85, 310, -1, 215, 139, 188, -1, 215, 85,
01328 188, -1, 32, 188, -1, 32, -1, 215, 138, 190,
01329 315, -1, -1, 136, 251, 236, 156, 137, -1, -1,
01330 26, 252, 236, 156, 10, -1, 17, 196, 227, 156,
01331 254, -1, 230, -1, 253, -1, 8, 256, 257, 227,
01332 156, 255, -1, 319, -1, 186, -1, 197, -1, 319,
01333 -1, 88, 174, -1, 319, -1, 9, 156, -1, 319,
01334 -1, 281, -1, 278, -1, 280, -1, 261, -1, 62,
01335 -1, 262, -1, 261, 262, -1, 99, 270, 106, -1,
01336 100, 271, 106, -1, 101, 272, 65, -1, 102, 146,
01337 106, -1, 102, 266, 106, -1, -1, 266, 267, 146,
01338 -1, 273, -1, 267, 273, -1, 103, 146, 106, -1,
01339 103, 269, 106, -1, -1, 269, 61, 146, -1, -1,
01340 270, 273, -1, -1, 271, 273, -1, -1, 272, 273,
01341 -1, 61, -1, -1, 105, 274, 277, -1, -1, -1,
01342 104, 275, 276, 156, 137, -1, 54, -1, 55, -1,
01343 57, -1, 285, -1, 98, 279, -1, 177, -1, 55,
01344 -1, 54, -1, 57, -1, 98, 271, 106, -1, 59,
01345 -1, 60, -1, 122, 59, -1, 122, 60, -1, 52,
01346 -1, 55, -1, 54, -1, 56, -1, 57, -1, 34,
01347 -1, 33, -1, 35, -1, 36, -1, 50, -1, 49,
01348 -1, 51, -1, 282, -1, 282, -1, 63, -1, 64,
01349 -1, 317, -1, -1, 113, 287, 161, 317, -1, 1,
01350 317, -1, 142, 289, 314, -1, 289, 317, -1, 293,
01351 140, 297, 140, 299, 302, -1, 293, 140, 297, 140,
01352 299, 140, 293, 302, -1, 293, 140, 297, 302, -1,
01353 293, 140, 297, 140, 293, 302, -1, 293, 140, 299,
01354 302, -1, 293, 140, 299, 140, 293, 302, -1, 293,
01355 302, -1, 297, 140, 299, 302, -1, 297, 140, 299,
01356 140, 293, 302, -1, 297, 302, -1, 297, 140, 293,
01357 302, -1, 299, 302, -1, 299, 140, 293, 302, -1,
01358 301, -1, -1, 56, -1, 55, -1, 54, -1, 57,
01359 -1, 290, -1, 52, -1, 291, -1, 89, 234, 314,
01360 -1, 292, -1, 293, 140, 292, -1, 52, 109, 186,
01361 -1, 52, 109, 215, -1, 295, -1, 296, 140, 295,
01362 -1, 294, -1, 297, 140, 294, -1, 119, -1, 95,
01363 -1, 298, 52, -1, 298, -1, 116, -1, 96, -1,
01364 300, 52, -1, 140, 301, -1, 319, -1, 283, -1,
01365 -1, 142, 304, 160, 314, -1, 319, -1, 306, 316,
01366 -1, 307, -1, 306, 140, 307, -1, 186, 88, 186,
01367 -1, 58, 186, -1, 52, -1, 56, -1, 53, -1,
01368 52, -1, 56, -1, 53, -1, 182, -1, 52, -1,
01369 53, -1, 182, -1, 139, -1, 85, -1, -1, 318,
01370 -1, -1, 147, -1, 313, 143, -1, 313, 144, -1,
01371 -1, 147, -1, 140, -1, 145, -1, 147, -1, 317,
01372 -1, 318, 145, -1, -1
01373 };
01374
01375
01376 static const yytype_uint16 yyrline[] =
01377 {
01378 0, 786, 786, 786, 817, 828, 837, 845, 853, 859,
01379 861, 860, 884, 917, 928, 937, 945, 953, 959, 959,
01380 967, 975, 986, 996, 1004, 1013, 1022, 1035, 1048, 1057,
01381 1069, 1078, 1088, 1117, 1138, 1155, 1172, 1177, 1194, 1204,
01382 1213, 1222, 1231, 1234, 1235, 1243, 1251, 1259, 1267, 1270,
01383 1282, 1283, 1286, 1287, 1296, 1308, 1307, 1329, 1338, 1350,
01384 1359, 1371, 1380, 1392, 1401, 1410, 1418, 1426, 1436, 1437,
01385 1447, 1448, 1458, 1466, 1474, 1482, 1491, 1499, 1507, 1515,
01386 1523, 1531, 1541, 1542, 1552, 1560, 1570, 1578, 1588, 1592,
01387 1600, 1608, 1616, 1624, 1636, 1646, 1658, 1667, 1675, 1683,
01388 1691, 1699, 1712, 1725, 1736, 1744, 1747, 1755, 1763, 1773,
01389 1774, 1775, 1776, 1781, 1792, 1793, 1796, 1804, 1807, 1815,
01390 1815, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833,
01391 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843,
01392 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853,
01393 1856, 1856, 1856, 1857, 1857, 1858, 1858, 1858, 1859, 1859,
01394 1859, 1859, 1860, 1860, 1860, 1860, 1861, 1861, 1861, 1862,
01395 1862, 1862, 1862, 1863, 1863, 1863, 1863, 1864, 1864, 1864,
01396 1864, 1865, 1865, 1865, 1865, 1866, 1866, 1866, 1866, 1867,
01397 1867, 1870, 1879, 1889, 1918, 1949, 1975, 1992, 2009, 2026,
01398 2037, 2048, 2059, 2073, 2087, 2095, 2103, 2111, 2119, 2127,
01399 2135, 2144, 2153, 2161, 2169, 2177, 2185, 2193, 2201, 2209,
01400 2217, 2225, 2233, 2241, 2249, 2257, 2268, 2276, 2284, 2292,
01401 2300, 2308, 2316, 2324, 2324, 2334, 2344, 2350, 2362, 2363,
01402 2367, 2375, 2385, 2395, 2396, 2399, 2400, 2403, 2412, 2420,
01403 2430, 2439, 2448, 2448, 2460, 2470, 2474, 2478, 2484, 2492,
01404 2500, 2514, 2530, 2544, 2559, 2569, 2570, 2571, 2572, 2573,
01405 2574, 2575, 2576, 2577, 2586, 2585, 2610, 2610, 2619, 2627,
01406 2635, 2643, 2656, 2664, 2672, 2680, 2688, 2696, 2696, 2706,
01407 2714, 2722, 2733, 2734, 2745, 2749, 2761, 2773, 2773, 2773,
01408 2784, 2784, 2784, 2795, 2806, 2815, 2817, 2814, 2881, 2880,
01409 2902, 2907, 2901, 2926, 2925, 2947, 2946, 2969, 2970, 2969,
01410 2990, 2998, 3006, 3014, 3024, 3036, 3042, 3048, 3054, 3060,
01411 3066, 3072, 3078, 3084, 3090, 3100, 3106, 3111, 3112, 3119,
01412 3124, 3127, 3128, 3141, 3142, 3152, 3153, 3156, 3164, 3174,
01413 3182, 3192, 3200, 3209, 3218, 3226, 3234, 3243, 3255, 3263,
01414 3273, 3281, 3289, 3297, 3305, 3313, 3322, 3330, 3338, 3346,
01415 3354, 3362, 3370, 3378, 3386, 3396, 3397, 3403, 3412, 3421,
01416 3432, 3433, 3443, 3450, 3459, 3467, 3473, 3476, 3473, 3494,
01417 3502, 3512, 3516, 3523, 3522, 3543, 3559, 3568, 3579, 3588,
01418 3598, 3608, 3616, 3627, 3638, 3646, 3654, 3669, 3668, 3688,
01419 3687, 3708, 3720, 3721, 3724, 3743, 3746, 3754, 3762, 3765,
01420 3769, 3772, 3780, 3783, 3784, 3792, 3795, 3812, 3813, 3814,
01421 3824, 3834, 3861, 3925, 3933, 3940, 3947, 3957, 3965, 3975,
01422 3983, 3990, 3997, 4008, 4015, 4026, 4033, 4044, 4051, 4080,
01423 4082, 4081, 4098, 4104, 4097, 4123, 4131, 4139, 4147, 4150,
01424 4161, 4162, 4163, 4164, 4167, 4197, 4198, 4199, 4207, 4217,
01425 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227,
01426 4228, 4231, 4241, 4251, 4252, 4255, 4264, 4263, 4271, 4283,
01427 4293, 4299, 4307, 4315, 4323, 4331, 4339, 4347, 4355, 4363,
01428 4371, 4379, 4387, 4395, 4403, 4412, 4421, 4430, 4439, 4448,
01429 4459, 4460, 4467, 4476, 4495, 4502, 4515, 4527, 4539, 4547,
01430 4563, 4571, 4587, 4588, 4591, 4604, 4615, 4616, 4619, 4636,
01431 4640, 4650, 4660, 4660, 4689, 4690, 4700, 4707, 4717, 4725,
01432 4735, 4736, 4737, 4740, 4741, 4742, 4743, 4746, 4747, 4748,
01433 4751, 4756, 4763, 4764, 4767, 4768, 4771, 4774, 4777, 4778,
01434 4779, 4782, 4783, 4786, 4787, 4791
01435 };
01436 #endif
01437
01438 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
01439
01440
01441 static const char *const yytname[] =
01442 {
01443 "$end", "error", "$undefined", "keyword_class", "keyword_module",
01444 "keyword_def", "keyword_undef", "keyword_begin", "keyword_rescue",
01445 "keyword_ensure", "keyword_end", "keyword_if", "keyword_unless",
01446 "keyword_then", "keyword_elsif", "keyword_else", "keyword_case",
01447 "keyword_when", "keyword_while", "keyword_until", "keyword_for",
01448 "keyword_break", "keyword_next", "keyword_redo", "keyword_retry",
01449 "keyword_in", "keyword_do", "keyword_do_cond", "keyword_do_block",
01450 "keyword_do_LAMBDA", "keyword_return", "keyword_yield", "keyword_super",
01451 "keyword_self", "keyword_nil", "keyword_true", "keyword_false",
01452 "keyword_and", "keyword_or", "keyword_not", "modifier_if",
01453 "modifier_unless", "modifier_while", "modifier_until", "modifier_rescue",
01454 "keyword_alias", "keyword_defined", "keyword_BEGIN", "keyword_END",
01455 "keyword__LINE__", "keyword__FILE__", "keyword__ENCODING__",
01456 "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tCVAR", "tLABEL",
01457 "tINTEGER", "tFLOAT", "tSTRING_CONTENT", "tCHAR", "tNTH_REF",
01458 "tBACK_REF", "tREGEXP_END", "tUPLUS", "tUMINUS", "tPOW", "tCMP", "tEQ",
01459 "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH",
01460 "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2",
01461 "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN_ARG", "tRPAREN",
01462 "tLBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tAMPER", "tLAMBDA",
01463 "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG",
01464 "tQWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG",
01465 "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'",
01466 "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "idNULL",
01467 "idRespond_to", "idIFUNC", "idCFUNC", "id_core_set_method_alias",
01468 "id_core_set_variable_alias", "id_core_undef_method",
01469 "id_core_define_method", "id_core_define_singleton_method",
01470 "id_core_set_postexe", "tLAST_TOKEN", "'{'", "'}'", "'['", "'.'", "','",
01471 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
01472 "$@1", "top_compstmt", "top_stmts", "top_stmt", "$@2", "bodystmt",
01473 "compstmt", "stmts", "stmt", "$@3", "expr", "expr_value", "command_call",
01474 "block_command", "cmd_brace_block", "@4", "command", "mlhs",
01475 "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post",
01476 "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", "fitem",
01477 "undef_list", "$@5", "op", "reswords", "arg", "$@6", "arg_value",
01478 "aref_args", "paren_args", "opt_paren_args", "opt_call_args",
01479 "call_args", "command_args", "@7", "block_arg", "opt_block_arg", "args",
01480 "mrhs", "primary", "@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14",
01481 "$@15", "$@16", "@17", "@18", "@19", "@20", "@21", "$@22", "$@23",
01482 "primary_value", "k_begin", "k_if", "k_unless", "k_while", "k_until",
01483 "k_case", "k_for", "k_class", "k_module", "k_def", "k_end", "then", "do",
01484 "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs",
01485 "block_param", "opt_block_param", "block_param_def", "opt_bv_decl",
01486 "bv_decls", "bvar", "lambda", "@24", "@25", "f_larglist", "lambda_body",
01487 "do_block", "@26", "block_call", "method_call", "brace_block", "@27",
01488 "@28", "case_body", "cases", "opt_rescue", "exc_list", "exc_var",
01489 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
01490 "regexp", "words", "word_list", "word", "qwords", "qword_list",
01491 "string_contents", "xstring_contents", "regexp_contents",
01492 "string_content", "@29", "@30", "@31", "string_dvar", "symbol", "sym",
01493 "dsym", "numeric", "variable", "var_ref", "var_lhs", "backref",
01494 "superclass", "$@32", "f_arglist", "f_args", "f_bad_arg", "f_norm_arg",
01495 "f_arg_item", "f_arg", "f_opt", "f_block_opt", "f_block_optarg",
01496 "f_optarg", "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
01497 "opt_f_block_arg", "singleton", "$@33", "assoc_list", "assocs", "assoc",
01498 "operation", "operation2", "operation3", "dot_or_colon", "opt_terms",
01499 "opt_nl", "rparen", "rbracket", "trailer", "term", "terms", "none", 0
01500 };
01501 #endif
01502
01503 # ifdef YYPRINT
01504
01505
01506 static const yytype_uint16 yytoknum[] =
01507 {
01508 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
01509 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
01510 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
01511 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
01512 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
01513 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
01514 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
01515 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
01516 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
01517 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
01518 355, 356, 357, 358, 359, 360, 361, 362, 363, 61,
01519 63, 58, 62, 60, 124, 94, 38, 43, 45, 42,
01520 47, 37, 364, 33, 126, 365, 366, 367, 368, 369,
01521 370, 371, 372, 373, 374, 375, 123, 125, 91, 46,
01522 44, 96, 40, 41, 93, 59, 32, 10
01523 };
01524 # endif
01525
01526
01527 static const yytype_uint16 yyr1[] =
01528 {
01529 0, 148, 150, 149, 151, 152, 152, 152, 152, 153,
01530 154, 153, 155, 156, 157, 157, 157, 157, 159, 158,
01531 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
01532 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
01533 158, 158, 158, 160, 160, 160, 160, 160, 160, 161,
01534 162, 162, 163, 163, 163, 165, 164, 166, 166, 166,
01535 166, 166, 166, 166, 166, 166, 166, 166, 167, 167,
01536 168, 168, 169, 169, 169, 169, 169, 169, 169, 169,
01537 169, 169, 170, 170, 171, 171, 172, 172, 173, 173,
01538 173, 173, 173, 173, 173, 173, 174, 174, 174, 174,
01539 174, 174, 174, 174, 175, 175, 176, 176, 176, 177,
01540 177, 177, 177, 177, 178, 178, 179, 179, 180, 181,
01541 180, 182, 182, 182, 182, 182, 182, 182, 182, 182,
01542 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
01543 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
01544 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
01545 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
01546 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
01547 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
01548 183, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01549 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01550 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01551 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
01552 184, 184, 184, 185, 184, 184, 184, 186, 187, 187,
01553 187, 187, 188, 189, 189, 190, 190, 191, 191, 191,
01554 191, 191, 193, 192, 194, 195, 195, 195, 196, 196,
01555 196, 196, 197, 197, 197, 198, 198, 198, 198, 198,
01556 198, 198, 198, 198, 199, 198, 200, 198, 198, 198,
01557 198, 198, 198, 198, 198, 198, 198, 201, 198, 198,
01558 198, 198, 198, 198, 198, 198, 198, 202, 203, 198,
01559 204, 205, 198, 198, 198, 206, 207, 198, 208, 198,
01560 209, 210, 198, 211, 198, 212, 198, 213, 214, 198,
01561 198, 198, 198, 198, 215, 216, 217, 218, 219, 220,
01562 221, 222, 223, 224, 225, 226, 227, 227, 227, 228,
01563 228, 229, 229, 230, 230, 231, 231, 232, 232, 233,
01564 233, 234, 234, 234, 234, 234, 234, 234, 234, 234,
01565 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
01566 235, 235, 235, 235, 235, 236, 236, 237, 237, 237,
01567 238, 238, 239, 239, 240, 240, 242, 243, 241, 244,
01568 244, 245, 245, 247, 246, 248, 248, 248, 249, 249,
01569 249, 249, 249, 249, 249, 249, 249, 251, 250, 252,
01570 250, 253, 254, 254, 255, 255, 256, 256, 256, 257,
01571 257, 258, 258, 259, 259, 259, 260, 261, 261, 261,
01572 262, 263, 264, 265, 265, 266, 266, 267, 267, 268,
01573 268, 269, 269, 270, 270, 271, 271, 272, 272, 273,
01574 274, 273, 275, 276, 273, 277, 277, 277, 277, 278,
01575 279, 279, 279, 279, 280, 281, 281, 281, 281, 282,
01576 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
01577 282, 283, 284, 285, 285, 286, 287, 286, 286, 288,
01578 288, 289, 289, 289, 289, 289, 289, 289, 289, 289,
01579 289, 289, 289, 289, 289, 289, 290, 290, 290, 290,
01580 291, 291, 292, 292, 293, 293, 294, 295, 296, 296,
01581 297, 297, 298, 298, 299, 299, 300, 300, 301, 302,
01582 302, 303, 304, 303, 305, 305, 306, 306, 307, 307,
01583 308, 308, 308, 309, 309, 309, 309, 310, 310, 310,
01584 311, 311, 312, 312, 313, 313, 314, 315, 316, 316,
01585 316, 317, 317, 318, 318, 319
01586 };
01587
01588
01589 static const yytype_uint8 yyr2[] =
01590 {
01591 0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
01592 0, 5, 4, 2, 1, 1, 3, 2, 0, 4,
01593 3, 3, 3, 2, 3, 3, 3, 3, 3, 4,
01594 3, 3, 3, 6, 5, 5, 5, 5, 3, 3,
01595 3, 3, 1, 1, 3, 3, 3, 2, 1, 1,
01596 1, 1, 1, 4, 4, 0, 5, 2, 3, 4,
01597 5, 4, 5, 2, 2, 2, 2, 2, 1, 3,
01598 1, 3, 1, 2, 3, 5, 2, 4, 2, 4,
01599 1, 3, 1, 3, 2, 3, 1, 3, 1, 4,
01600 3, 3, 3, 3, 2, 1, 1, 4, 3, 3,
01601 3, 3, 2, 1, 1, 1, 2, 1, 3, 1,
01602 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
01603 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01604 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01605 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01606 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01607 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01608 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01610 1, 3, 5, 3, 5, 6, 5, 5, 5, 5,
01611 4, 3, 3, 3, 3, 3, 3, 3, 3, 3,
01612 4, 4, 2, 2, 3, 3, 3, 3, 3, 3,
01613 3, 3, 3, 3, 3, 3, 3, 2, 2, 3,
01614 3, 3, 3, 0, 4, 6, 1, 1, 1, 2,
01615 4, 2, 3, 1, 1, 1, 1, 1, 2, 2,
01616 4, 1, 0, 2, 2, 2, 1, 1, 1, 2,
01617 3, 4, 3, 4, 2, 1, 1, 1, 1, 1,
01618 1, 1, 1, 1, 0, 4, 0, 4, 3, 3,
01619 2, 3, 3, 1, 4, 3, 1, 0, 6, 4,
01620 3, 2, 1, 2, 2, 6, 6, 0, 0, 7,
01621 0, 0, 7, 5, 4, 0, 0, 9, 0, 6,
01622 0, 0, 8, 0, 5, 0, 6, 0, 0, 9,
01623 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01624 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
01625 1, 1, 5, 1, 2, 1, 1, 1, 3, 1,
01626 3, 1, 4, 6, 3, 5, 2, 4, 1, 3,
01627 6, 8, 4, 6, 4, 2, 6, 2, 4, 6,
01628 2, 4, 2, 4, 1, 1, 1, 3, 1, 4,
01629 1, 2, 1, 3, 1, 1, 0, 0, 4, 4,
01630 1, 3, 3, 0, 5, 2, 4, 4, 2, 4,
01631 4, 3, 3, 3, 2, 1, 4, 0, 5, 0,
01632 5, 5, 1, 1, 6, 1, 1, 1, 1, 2,
01633 1, 2, 1, 1, 1, 1, 1, 1, 1, 2,
01634 3, 3, 3, 3, 3, 0, 3, 1, 2, 3,
01635 3, 0, 3, 0, 2, 0, 2, 0, 2, 1,
01636 0, 3, 0, 0, 5, 1, 1, 1, 1, 2,
01637 1, 1, 1, 1, 3, 1, 1, 2, 2, 1,
01638 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01639 1, 1, 1, 1, 1, 1, 0, 4, 2, 3,
01640 2, 6, 8, 4, 6, 4, 6, 2, 4, 6,
01641 2, 4, 2, 4, 1, 0, 1, 1, 1, 1,
01642 1, 1, 1, 3, 1, 3, 3, 3, 1, 3,
01643 1, 3, 1, 1, 2, 1, 1, 1, 2, 2,
01644 1, 1, 0, 4, 1, 2, 1, 3, 3, 2,
01645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
01646 1, 1, 0, 1, 0, 1, 2, 2, 0, 1,
01647 1, 1, 1, 1, 2, 0
01648 };
01649
01650
01651
01652
01653 static const yytype_uint16 yydefact[] =
01654 {
01655 2, 0, 0, 1, 0, 332, 333, 334, 0, 325,
01656 326, 327, 330, 328, 329, 331, 320, 321, 322, 323,
01657 283, 252, 252, 475, 474, 476, 477, 554, 0, 554,
01658 10, 0, 479, 478, 480, 469, 542, 471, 470, 472,
01659 473, 465, 466, 427, 483, 484, 0, 0, 0, 0,
01660 0, 565, 565, 80, 386, 445, 443, 445, 447, 435,
01661 441, 0, 0, 0, 3, 552, 6, 9, 42, 43,
01662 51, 50, 0, 68, 0, 72, 82, 0, 48, 236,
01663 0, 274, 0, 0, 297, 300, 552, 0, 0, 0,
01664 0, 52, 292, 265, 266, 426, 428, 267, 268, 269,
01665 270, 424, 425, 423, 481, 271, 0, 272, 252, 5,
01666 8, 160, 171, 161, 184, 157, 177, 167, 166, 187,
01667 188, 182, 165, 164, 159, 185, 189, 190, 169, 158,
01668 172, 176, 178, 170, 163, 179, 186, 181, 180, 173,
01669 183, 168, 156, 175, 174, 155, 162, 153, 154, 150,
01670 151, 152, 109, 111, 110, 145, 146, 142, 124, 125,
01671 126, 133, 130, 132, 127, 128, 147, 148, 134, 135,
01672 139, 129, 131, 121, 122, 123, 136, 137, 138, 140,
01673 141, 143, 144, 149, 114, 116, 118, 23, 112, 113,
01674 115, 117, 0, 0, 0, 0, 0, 0, 0, 247,
01675 0, 237, 258, 66, 251, 565, 0, 481, 0, 272,
01676 565, 536, 67, 65, 554, 64, 0, 565, 404, 63,
01677 554, 555, 0, 0, 18, 233, 0, 0, 320, 321,
01678 283, 286, 405, 212, 0, 0, 213, 280, 0, 0,
01679 0, 552, 15, 554, 70, 14, 276, 0, 558, 558,
01680 238, 0, 0, 558, 534, 554, 0, 0, 0, 78,
01681 324, 0, 88, 95, 294, 387, 462, 461, 463, 460,
01682 0, 459, 0, 0, 0, 0, 0, 0, 0, 467,
01683 468, 47, 227, 228, 561, 562, 4, 563, 553, 0,
01684 0, 0, 0, 0, 0, 0, 393, 395, 0, 84,
01685 0, 76, 73, 0, 0, 0, 0, 0, 0, 0,
01686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
01687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
01688 0, 565, 0, 0, 49, 0, 0, 0, 0, 552,
01689 0, 553, 0, 346, 345, 0, 0, 481, 272, 104,
01690 105, 0, 0, 107, 0, 0, 481, 272, 313, 180,
01691 173, 183, 168, 150, 151, 152, 109, 110, 532, 315,
01692 531, 0, 0, 0, 409, 407, 293, 429, 0, 0,
01693 398, 57, 291, 119, 539, 280, 259, 254, 0, 0,
01694 256, 248, 257, 0, 565, 0, 0, 0, 256, 249,
01695 554, 0, 285, 253, 554, 246, 245, 554, 290, 46,
01696 20, 22, 21, 0, 287, 0, 0, 0, 0, 0,
01697 0, 17, 554, 278, 13, 553, 69, 554, 281, 560,
01698 559, 239, 560, 241, 282, 535, 0, 94, 467, 468,
01699 86, 81, 0, 0, 565, 0, 505, 449, 452, 450,
01700 464, 446, 430, 444, 431, 432, 448, 433, 434, 0,
01701 437, 439, 0, 440, 0, 0, 564, 7, 24, 25,
01702 26, 27, 28, 44, 45, 565, 0, 31, 40, 0,
01703 41, 554, 0, 74, 85, 30, 191, 258, 39, 209,
01704 217, 222, 223, 224, 219, 221, 231, 232, 225, 226,
01705 202, 203, 229, 230, 554, 218, 220, 214, 215, 216,
01706 204, 205, 206, 207, 208, 543, 548, 544, 549, 403,
01707 252, 401, 554, 543, 545, 544, 546, 402, 252, 0,
01708 565, 337, 0, 336, 0, 0, 0, 0, 0, 0,
01709 280, 0, 565, 0, 305, 310, 104, 105, 106, 0,
01710 486, 308, 485, 0, 565, 0, 0, 0, 505, 551,
01711 550, 317, 543, 544, 252, 252, 565, 565, 32, 193,
01712 38, 201, 55, 58, 0, 191, 538, 0, 260, 255,
01713 565, 547, 544, 554, 543, 544, 537, 284, 556, 242,
01714 289, 19, 0, 234, 0, 29, 0, 565, 200, 71,
01715 16, 277, 558, 0, 79, 91, 93, 554, 543, 544,
01716 511, 508, 507, 506, 509, 0, 523, 527, 526, 522,
01717 505, 0, 390, 510, 512, 514, 565, 520, 565, 525,
01718 565, 0, 504, 453, 0, 436, 438, 442, 210, 211,
01719 378, 565, 0, 376, 375, 264, 0, 83, 77, 0,
01720 0, 0, 0, 0, 400, 61, 0, 406, 0, 0,
01721 244, 399, 59, 243, 335, 275, 565, 565, 415, 565,
01722 338, 565, 340, 298, 339, 301, 0, 0, 304, 547,
01723 279, 554, 543, 544, 0, 0, 488, 0, 0, 104,
01724 105, 108, 554, 0, 554, 505, 0, 0, 0, 397,
01725 54, 396, 53, 0, 0, 0, 565, 120, 261, 250,
01726 0, 0, 406, 0, 0, 554, 11, 240, 87, 89,
01727 0, 511, 0, 358, 349, 351, 554, 347, 565, 0,
01728 0, 388, 0, 497, 530, 0, 500, 524, 0, 502,
01729 528, 0, 455, 456, 457, 451, 458, 511, 0, 565,
01730 0, 565, 518, 565, 565, 374, 380, 0, 0, 262,
01731 75, 192, 0, 37, 198, 36, 199, 62, 557, 0,
01732 34, 196, 35, 197, 60, 416, 417, 565, 418, 0,
01733 565, 343, 0, 0, 341, 0, 0, 0, 303, 0,
01734 0, 406, 0, 311, 0, 0, 406, 314, 533, 554,
01735 0, 490, 318, 0, 0, 194, 0, 0, 288, 516,
01736 554, 0, 356, 0, 513, 554, 0, 0, 515, 565,
01737 565, 529, 565, 521, 565, 565, 0, 0, 384, 381,
01738 382, 385, 0, 377, 365, 367, 0, 370, 0, 372,
01739 394, 263, 235, 33, 195, 0, 0, 420, 344, 0,
01740 12, 422, 0, 295, 296, 0, 0, 260, 565, 306,
01741 0, 487, 309, 489, 316, 505, 410, 408, 0, 348,
01742 359, 0, 354, 350, 389, 392, 391, 0, 493, 0,
01743 495, 0, 501, 0, 498, 503, 454, 0, 517, 0,
01744 379, 565, 565, 565, 519, 565, 565, 0, 419, 0,
01745 96, 103, 0, 421, 0, 299, 302, 412, 413, 411,
01746 0, 0, 0, 56, 0, 357, 0, 352, 565, 565,
01747 565, 565, 280, 0, 383, 0, 362, 0, 364, 371,
01748 0, 368, 373, 102, 0, 565, 0, 565, 565, 0,
01749 312, 0, 355, 0, 494, 0, 491, 496, 499, 547,
01750 279, 565, 565, 565, 565, 547, 101, 554, 543, 544,
01751 414, 342, 307, 319, 353, 565, 363, 0, 360, 366,
01752 369, 406, 492, 565, 361
01753 };
01754
01755
01756 static const yytype_int16 yydefgoto[] =
01757 {
01758 -1, 1, 2, 64, 65, 66, 226, 529, 530, 241,
01759 242, 413, 68, 335, 69, 70, 573, 706, 71, 72,
01760 243, 73, 74, 75, 441, 76, 200, 353, 354, 184,
01761 185, 186, 187, 574, 526, 189, 78, 415, 202, 247,
01762 519, 661, 404, 405, 215, 216, 204, 391, 205, 480,
01763 79, 333, 427, 592, 337, 786, 338, 787, 684, 910,
01764 688, 685, 860, 556, 558, 698, 865, 234, 81, 82,
01765 83, 84, 85, 86, 87, 88, 89, 90, 665, 532,
01766 673, 783, 784, 346, 724, 725, 726, 749, 642, 643,
01767 750, 829, 830, 264, 265, 446, 621, 731, 297, 475,
01768 91, 92, 382, 567, 566, 539, 909, 667, 777, 846,
01769 850, 93, 94, 95, 96, 97, 98, 99, 276, 459,
01770 100, 278, 272, 270, 274, 451, 634, 633, 741, 745,
01771 101, 271, 102, 103, 207, 105, 208, 209, 551, 687,
01772 696, 697, 623, 624, 625, 626, 627, 752, 753, 628,
01773 629, 630, 631, 821, 733, 371, 557, 252, 210, 211,
01774 108, 596, 521, 561, 286, 401, 402, 657, 431, 533,
01775 341, 245
01776 };
01777
01778
01779
01780 #define YYPACT_NINF -778
01781 static const yytype_int16 yypact[] =
01782 {
01783 -778, 133, 2394, -778, 7010, -778, -778, -778, 6523, -778,
01784 -778, -778, -778, -778, -778, -778, 7228, 7228, -778, -778,
01785 7228, 3145, 2722, -778, -778, -778, -778, 164, 6384, -11,
01786 -778, 69, -778, -778, -778, 5623, 2863, -778, -778, 5750,
01787 -778, -778, -778, -778, -778, -778, 8427, 8427, 96, 4342,
01788 8536, 7446, 7773, 6786, -778, 6245, -778, -778, -778, 74,
01789 93, 122, 8645, 8427, -778, 187, -778, 698, 288, -778,
01790 -778, 230, 167, -778, 180, 8754, -778, 234, 2846, 273,
01791 310, -778, 8536, 8536, -778, -778, 4986, 8859, 8964, 9069,
01792 5496, 16, 60, -778, -778, 174, -778, -778, -778, -778,
01793 -778, -778, -778, -778, 201, -778, 258, 282, 206, -778,
01794 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01795 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01796 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01797 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01798 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01799 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01800 -778, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01801 -778, -778, -778, -778, -778, -778, -778, 212, -778, -778,
01802 -778, -778, 215, 8427, 303, 4472, 8427, 8427, 8427, -778,
01803 257, 2846, 285, -778, -778, 281, 343, 38, 337, 263,
01804 290, -778, -778, -778, 4877, -778, 7228, 7228, -778, -778,
01805 5116, -778, 8536, 599, -778, 296, 315, 4602, -778, -778,
01806 -778, 311, 328, -778, 347, 206, 396, 446, 7119, 4342,
01807 329, 187, 698, -11, 370, -778, 288, 339, -30, 30,
01808 -778, 285, 356, 30, -778, -11, 442, 375, 9174, 390,
01809 -778, 351, 373, 383, -778, -778, -778, -778, -778, -778,
01810 515, -778, 552, 587, 620, 397, 607, 407, 34, 473,
01811 474, -778, -778, -778, -778, -778, -778, -778, 5225, 8536,
01812 8536, 8536, 8536, 7119, 8536, 8536, -778, -778, 7882, -778,
01813 4342, 6898, 413, 7882, 8427, 8427, 8427, 8427, 8427, 8427,
01814 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427,
01815 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427, 8427,
01816 1712, 7228, 2060, 3517, 288, 80, 80, 8536, 8536, 187,
01817 534, 416, 516, -778, -778, 386, 568, 50, 72, 301,
01818 321, 8536, 363, -778, 66, 393, -778, -778, -778, 36,
01819 41, 103, 224, 259, 266, 322, 348, 369, -778, -778,
01820 -778, 377, 10211, 10211, -778, -778, -778, -778, 8645, 8645,
01821 -778, 483, -778, -778, -778, 268, -778, -778, 8427, 8427,
01822 7337, -778, -778, 2216, 7228, 9441, 8427, 8427, 7555, -778,
01823 -11, 454, -778, -778, -11, -778, -778, 70, -778, -778,
01824 -778, -778, -778, 6523, -778, 8427, 3937, 463, 2216, 9441,
01825 8427, 698, -11, -778, -778, 5353, 462, -11, -778, 7664,
01826 -778, -778, 7773, -778, -778, -778, 296, 411, -778, -778,
01827 -778, 467, 9174, 9518, 7228, 9595, 1033, -778, -778, -778,
01828 -778, -778, -778, -778, -778, -778, -778, -778, -778, 39,
01829 -778, -778, 472, -778, 8427, 8427, -778, -778, -778, -778,
01830 -778, -778, -778, -778, -778, 28, 8427, -778, 468, 487,
01831 -778, -11, 9174, 496, -778, -778, 1576, -778, -778, 396,
01832 1512, 1512, 1512, 1512, 1223, 1223, 1879, 2079, 1512, 1512,
01833 2146, 2146, 582, 582, 2705, 1223, 1223, 1098, 1098, 790,
01834 514, 514, 396, 396, 396, 3286, 5991, 3372, 6105, -778,
01835 328, -778, -11, 448, -778, 451, -778, -778, 3004, 639,
01836 644, -778, 3662, 646, 4082, 42, 42, 534, 7991, 639,
01837 109, 9672, 7228, 9749, -778, 288, -778, 411, -778, 187,
01838 -778, -778, -778, 9826, 7228, 9903, 3517, 8536, 1115, -778,
01839 -778, -778, -778, -778, 1235, 1235, 28, 28, -778, 10270,
01840 -778, 2846, -778, -778, 6523, 10289, -778, 8427, 285, -778,
01841 290, 5877, 2581, -11, 410, 529, -778, -778, -778, -778,
01842 -778, -778, 8536, 2846, 535, -778, 328, 328, 2846, 20,
01843 698, -778, 30, 9174, 467, 338, 271, -11, 228, 261,
01844 557, -778, -778, -778, -778, 666, -778, -778, -778, -778,
01845 923, 43, -778, -778, -778, -778, 543, -778, 544, 623,
01846 547, 642, -778, -778, 722, -778, -778, -778, 396, 396,
01847 -778, 904, 4747, -778, -778, 555, 8100, -778, 467, 9174,
01848 8427, 598, 8645, 8645, -778, 483, 570, 538, 8645, 8645,
01849 -778, -778, 483, -778, -778, -778, 8209, 701, -778, 441,
01850 -778, 701, -778, -778, -778, -778, 639, 31, -778, 110,
01851 132, -11, 126, 144, 8536, 187, -778, 8536, 3517, 338,
01852 271, -778, -11, 639, 70, 923, 3517, 187, 6662, -778,
01853 -778, -778, -778, 4747, 4602, 8427, 28, -778, -778, -778,
01854 8427, 8427, 536, 8427, 8427, 70, -778, -778, -778, 251,
01855 8427, -778, 666, 450, -778, 579, -11, -778, 583, 4747,
01856 4602, -778, 923, -778, -778, 923, -778, -778, 779, -778,
01857 -778, 4602, -778, -778, -778, -778, -778, 625, 809, 583,
01858 615, 595, -778, 604, 605, -778, -778, 740, 8427, 619,
01859 467, 2846, 8427, -778, 2846, -778, 2846, -778, -778, 8645,
01860 -778, 2846, -778, 2846, -778, 468, -778, 675, -778, 4212,
01861 757, -778, 8536, 639, -778, 639, 4747, 4747, -778, 8318,
01862 3807, 147, 42, -778, 187, 639, -778, -778, -778, -11,
01863 639, -778, -778, 759, 630, 2846, 4602, 8427, -778, -778,
01864 -11, 845, 632, 826, -778, -11, 760, 637, -778, 640,
01865 643, -778, 647, -778, 651, 647, 656, 9279, -778, 657,
01866 -778, -778, 682, -778, 1199, -778, 1199, -778, 779, -778,
01867 -778, 658, 2846, -778, 2846, 9384, 80, -778, -778, 4747,
01868 -778, -778, 80, -778, -778, 639, 639, -778, 115, -778,
01869 3517, -778, -778, -778, -778, 1115, -778, -778, 664, -778,
01870 662, 845, 491, -778, -778, -778, -778, 923, -778, 779,
01871 -778, 779, -778, 779, -778, -778, -778, 751, 429, 809,
01872 -778, 672, 673, 647, -778, 679, 647, 765, -778, 432,
01873 373, 383, 3517, -778, 3662, -778, -778, -778, -778, -778,
01874 4747, 639, 3517, -778, 845, 662, 845, 685, 647, 686,
01875 647, 647, -778, 9980, -778, 1199, -778, 779, -778, -778,
01876 779, -778, -778, 411, 10057, 7228, 10134, 644, 441, 639,
01877 -778, 639, 662, 845, -778, 779, -778, -778, -778, 688,
01878 690, 647, 687, 647, 647, 81, 271, -11, 86, 118,
01879 -778, -778, -778, -778, 662, 647, -778, 779, -778, -778,
01880 -778, 124, -778, 647, -778
01881 };
01882
01883
01884 static const yytype_int16 yypgoto[] =
01885 {
01886 -778, -778, -778, 399, -778, 33, -778, -530, -33, -778,
01887 159, -778, 23, -55, 21, -778, -462, -778, -15, 741,
01888 -136, -1, -66, -778, -403, -26, 1181, -306, 750, -52,
01889 -778, -20, -778, -778, 32, -778, 748, -778, 540, -778,
01890 46, -98, -298, 54, 76, -778, -278, -196, -44, -283,
01891 27, -778, -778, -778, -778, -778, -778, -778, -778, -778,
01892 -778, -778, -778, -778, -778, -778, -778, 2, -778, -778,
01893 -778, -778, -778, -778, -778, -778, -778, -778, 298, -323,
01894 -512, -97, -610, -778, -755, -748, 120, -778, -485, -778,
01895 -636, -778, -49, -778, -778, -778, -778, -778, -778, -778,
01896 -778, -778, 752, -778, -778, -520, -778, -92, -778, -778,
01897 -778, -778, -778, -778, 753, -778, -778, -778, -778, -778,
01898 -778, -778, -778, 792, -778, -229, -778, -778, -778, -778,
01899 7, -778, 13, -778, 1031, 762, 1198, 1109, -778, -778,
01900 -12, -416, -706, -549, -667, -121, -679, -777, 25, 128,
01901 -778, -579, -778, -434, 531, -778, -778, -778, -41, -287,
01902 1927, -254, -778, -778, -32, -4, 88, -554, -217, 63,
01903 -31, -2
01904 };
01905
01906
01907
01908
01909
01910 #define YYTABLE_NINF -566
01911 static const yytype_int16 yytable[] =
01912 {
01913 109, 199, 199, 269, 80, 199, 80, 248, 224, 302,
01914 249, 253, 632, 534, 399, 190, 240, 676, 206, 206,
01915 488, 191, 206, 222, 675, 225, 693, 259, 336, 712,
01916 622, 339, 433, 522, 288, 190, 435, 110, 369, 604,
01917 188, 191, 831, 453, 531, 456, 548, 460, 244, 250,
01918 254, 80, 206, 719, 340, 261, 823, 780, 873, 894,
01919 188, 785, 754, 870, 206, 818, 727, 549, 218, 672,
01920 203, 212, 729, 246, 213, -96, 520, 261, 528, 648,
01921 260, 703, 704, 281, 206, 206, 374, 188, 206, 345,
01922 355, 355, 815, 531, -99, 462, 583, -103, 219, -98,
01923 447, 372, 260, 422, 640, 334, 334, 294, 295, 334,
01924 429, 586, 579, 832, 260, 260, 260, 430, 564, 565,
01925 579, -475, 188, 915, 632, -482, -474, 791, 287, -69,
01926 779, -100, 538, 3, -102, -99, 221, -97, 796, 520,
01927 463, 528, 641, 448, 449, 586, 607, -96, 894, 287,
01928 730, -98, 237, 820, 380, 373, 824, -101, 795, 873,
01929 -83, 67, 240, 67, 481, 597, 800, 818, 942, -100,
01930 432, 789, -97, 727, 812, -475, 284, 430, 285, 550,
01931 -474, 279, 280, 831, 381, 635, 632, 284, -476, 285,
01932 -88, 597, 440, 767, 417, 964, 375, 80, 823, 199,
01933 774, 199, 199, 392, 728, 227, 240, 755, 392, 424,
01934 425, 284, -95, 285, 818, 406, 206, 221, 206, 206,
01935 275, 806, 206, -543, 206, 284, -99, 285, -99, 80,
01936 636, -98, 374, -98, 468, 469, 470, 471, 244, 277,
01937 80, 80, -476, 407, 681, 409, 760, 691, 907, -94,
01938 -91, 436, -543, -90, 479, 892, 692, 895, 296, 479,
01939 261, 632, 727, -100, 727, -100, -90, 240, 400, -97,
01940 403, -97, -93, 56, -544, 483, 298, -406, 218, 799,
01941 859, 380, 535, 536, -92, 260, -92, -89, -482, 597,
01942 80, 206, 206, 206, 206, 80, 206, 206, 919, 244,
01943 206, 597, 80, 261, 287, 206, 220, 537, 408, -477,
01944 -96, 221, 334, 334, 334, 334, 199, 473, 474, 477,
01945 299, 467, 727, 917, 485, 294, 295, -540, 260, 406,
01946 911, 426, 284, 206, 285, 80, -406, -90, 908, 206,
01947 206, -88, 375, 303, -479, 378, 952, -541, 217, 580,
01948 397, -478, 383, 206, 790, 420, -279, 220, -324, 385,
01949 334, 334, 518, -477, -547, 727, 388, 727, -90, 379,
01950 -92, -90, -103, 389, 545, -90, 440, -102, 527, 199,
01951 206, 206, 941, 776, 709, 717, -469, -406, 602, -406,
01952 -406, -103, 406, 591, 727, 330, 206, 421, -479, 568,
01953 570, -92, 287, 971, -92, -478, -472, -480, -92, -279,
01954 -279, -324, -324, -544, 109, 546, 440, 552, 80, 547,
01955 190, 390, -95, -547, 396, 518, 191, 80, 393, 199,
01956 398, 632, 418, -469, 438, 439, 443, -540, 414, -469,
01957 -469, 527, 406, -540, 261, 188, 206, 67, 331, 332,
01958 518, 416, 472, 214, -472, 782, 779, -541, -481, -472,
01959 -472, -480, 559, -541, 304, 527, 699, 701, -272, 260,
01960 217, 541, 423, 644, -547, 518, -547, -547, 553, -68,
01961 -543, 394, 395, 428, 261, 394, 419, -469, 587, 444,
01962 445, 527, 589, 434, 677, 590, -280, 713, 437, 669,
01963 651, 671, 721, 457, 611, 612, 613, 614, -472, 260,
01964 599, -481, -481, 461, 923, 601, 560, 934, 656, -98,
01965 751, -272, -272, 902, 542, 543, 663, 199, 668, 904,
01966 442, 554, 555, 420, 80, 658, 80, 718, 659, 199,
01967 406, 464, 465, 721, 206, 611, 612, 613, 614, -280,
01968 -280, 538, 406, 484, 707, -102, 206, -98, 80, 206,
01969 -100, 466, 663, 663, 644, 644, 654, 554, 555, 647,
01970 935, 936, 540, 518, 660, 67, 447, 572, 392, 656,
01971 694, 190, 304, 440, 600, 518, -94, 191, -90, 527,
01972 811, -92, 251, 544, 206, 663, 655, 588, 674, 674,
01973 595, 527, -83, 656, 662, 261, 188, 603, -258, 757,
01974 660, 660, 686, 447, 822, 715, 714, 825, 637, 448,
01975 449, 450, 479, 807, 734, 769, 734, 646, 734, 792,
01976 260, 916, 794, 327, 328, 329, 649, 957, -100, 756,
01977 700, 702, 654, 660, 80, -97, 802, -97, 447, 664,
01978 304, 261, 666, 410, 206, 206, 448, 449, 452, 670,
01979 206, 206, 411, 412, 778, 781, 720, 781, 447, 781,
01980 803, 804, 716, 763, 765, 737, 260, 656, -89, 770,
01981 772, 447, 597, 732, 735, 455, 206, 738, 656, 206,
01982 80, 448, 449, 454, 740, -259, 816, 817, 80, 325,
01983 326, 327, 328, 329, 644, 80, 80, 334, 826, 762,
01984 334, 448, 449, 458, 768, 893, 779, 896, 721, 813,
01985 611, 612, 613, 614, 448, 449, 756, 852, 748, 833,
01986 188, 80, 80, 384, 827, 834, 386, 387, 289, 290,
01987 291, 292, 293, 80, 836, 838, 848, 756, 793, 734,
01988 840, 734, 734, 855, 856, 722, 918, 858, 920, -260,
01989 801, 723, 921, 845, 201, 201, 849, 867, 201, 866,
01990 875, 206, 871, 868, 876, 847, 742, 743, 851, 744,
01991 877, 80, 798, 879, 206, 44, 45, 881, 80, 80,
01992 843, 883, 80, 886, 233, 236, 890, 889, -261, 201,
01993 201, 913, 914, 808, 951, 334, 953, 922, 80, 954,
01994 282, 283, 925, 927, 814, 594, 903, 734, 734, 930,
01995 734, 933, 734, 734, 965, 943, 945, 967, 343, 888,
01996 -543, 721, -544, 611, 612, 613, 614, 678, 478, 358,
01997 924, 961, 810, 487, 376, 960, 973, 899, 377, 273,
01998 0, 80, 370, 912, 260, 674, 781, 861, 304, 891,
01999 819, 828, 80, 611, 612, 613, 614, 0, 615, 937,
02000 0, 938, 260, 317, 318, 617, 0, 939, 721, 0,
02001 611, 612, 613, 614, 0, 0, 0, 863, 0, 734,
02002 734, 734, 0, 734, 734, 618, 0, 721, 869, 611,
02003 612, 613, 614, 874, 80, 0, 80, 325, 326, 327,
02004 328, 329, 80, 0, 80, 722, 734, 734, 734, 734,
02005 199, 872, 0, 0, 0, 0, 0, 0, 0, 576,
02006 578, 0, 0, 406, 722, 668, 781, 206, 251, 0,
02007 0, 201, 0, 0, 201, 201, 282, 0, 0, 734,
02008 734, 734, 734, 656, 0, 518, 747, 0, 611, 612,
02009 613, 614, 201, 734, 201, 201, 518, 0, 0, 578,
02010 0, 734, 251, 0, 788, 610, 0, 611, 612, 613,
02011 614, 0, 527, 0, 0, 0, 0, 0, 0, 0,
02012 0, 797, 0, 615, 0, 0, 0, 0, 0, 616,
02013 617, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02014 0, 0, 615, 0, 0, 0, 645, 0, 616, 617,
02015 618, 0, 0, 619, 0, 0, 0, 0, 0, 0,
02016 0, 0, 0, 104, 0, 104, 0, 0, 0, 618,
02017 0, 0, 619, 0, 0, 0, 201, 0, 0, 748,
02018 0, 486, 489, 490, 491, 492, 493, 494, 495, 496,
02019 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
02020 507, 508, 509, 510, 511, 512, 513, 514, 487, 201,
02021 104, 853, 0, 854, 262, 610, 0, 611, 612, 613,
02022 614, 0, 0, 862, 0, 0, 0, 0, 864, 0,
02023 0, 0, 0, 0, 0, 0, 262, 0, 0, 0,
02024 0, 107, 0, 107, 0, 0, 0, 708, 347, 356,
02025 356, 356, 615, 0, 0, 0, 569, 571, 616, 617,
02026 0, 0, 0, 0, 0, 0, 575, 201, 201, 0,
02027 0, 0, 201, 0, 569, 571, 201, 0, 0, 618,
02028 0, 0, 619, 905, 906, 0, 0, 0, 107, 736,
02029 0, 739, 263, 593, 0, 0, 304, 610, 598, 611,
02030 612, 613, 614, 0, 0, 620, 0, 201, 0, 0,
02031 201, 317, 318, 77, 263, 77, 759, 0, 0, 0,
02032 0, 0, 201, 0, 0, 0, 348, 357, 357, 0,
02033 106, 0, 106, 0, 615, 0, 775, 0, 0, 940,
02034 616, 617, 638, 639, 324, 325, 326, 327, 328, 329,
02035 0, 0, 0, 0, 201, 0, 104, 0, 0, 0,
02036 77, 618, 0, 0, 619, -565, 0, 962, 0, 963,
02037 0, 0, 0, -565, -565, -565, 0, 106, -565, -565,
02038 -565, 747, -565, 611, 612, 613, 614, 695, 104, 0,
02039 809, 0, -565, 0, 0, 0, 0, 0, 344, 104,
02040 104, 0, -565, -565, 0, -565, -565, -565, -565, -565,
02041 0, 0, 835, 0, 837, 839, 201, 0, 615, 262,
02042 201, 304, 0, 0, 616, 617, 0, 0, 841, 0,
02043 0, 0, 201, 0, 107, 0, 317, 318, 0, 0,
02044 0, 0, 0, 0, 0, 618, 0, 0, 619, 104,
02045 -565, 0, 0, 0, 104, 201, 0, 0, 0, 857,
02046 0, 104, 262, 0, 0, 0, 107, 322, 323, 324,
02047 325, 326, 327, 328, 329, 0, 0, 107, 107, 0,
02048 878, 880, 0, 882, 0, 884, 885, 0, 0, 0,
02049 0, 0, 0, 0, 104, 0, 0, 263, 0, 0,
02050 0, 0, -565, 0, -565, 0, 77, 217, -565, 0,
02051 -565, 0, -565, 0, 0, 0, 0, 0, 0, 0,
02052 0, 0, 0, 106, 201, 0, 0, 107, 761, 0,
02053 764, 766, 107, 0, 0, 0, 771, 773, 77, 107,
02054 263, 0, 0, 0, 201, 0, 0, 0, 0, 77,
02055 77, 0, 926, 928, 929, 106, 931, 932, 0, 0,
02056 0, 0, 0, 0, 0, 0, 106, 106, 0, 0,
02057 0, 0, 107, 0, 0, 0, 0, 104, 0, 944,
02058 946, 947, 948, 805, 0, 0, 104, 0, 764, 766,
02059 0, 771, 773, 0, 0, 0, 0, 0, 201, 77,
02060 0, 0, 0, 262, 77, 0, 0, 0, 0, 0,
02061 0, 77, 966, 968, 969, 970, 106, 0, 0, 0,
02062 0, 106, 0, 0, 0, 0, 972, 0, 106, 0,
02063 0, 0, 0, 0, 974, 0, 201, 0, 0, 0,
02064 842, 0, 0, 262, 77, 0, 0, 844, 0, 0,
02065 0, 0, 0, 0, 0, 107, 0, 0, 0, 0,
02066 0, 106, 0, 0, 107, 0, 0, 201, 0, 0,
02067 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02068 0, 263, 0, 0, 0, 844, 0, 0, 0, 0,
02069 0, 0, 0, 104, 0, 104, 0, 0, 0, 0,
02070 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02071 304, -566, -566, -566, -566, 309, 310, 104, 0, -566,
02072 -566, 263, 0, 0, 0, 317, 318, 77, 0, 0,
02073 0, 0, 0, 0, 0, 0, 77, 0, 0, 0,
02074 0, 0, 0, 0, 106, 0, 0, 0, 0, 0,
02075 650, 0, 0, 106, 320, 321, 322, 323, 324, 325,
02076 326, 327, 328, 329, 262, 0, 0, 0, 0, 0,
02077 0, 107, 0, 107, 304, 305, 306, 307, 308, 309,
02078 310, 311, 312, 313, 314, 315, 316, 0, 0, 317,
02079 318, 0, 0, 0, 0, 107, 0, 0, 0, 0,
02080 0, 0, 0, 104, 0, 0, 0, 0, 0, 0,
02081 262, 0, 0, 201, 0, 0, 319, 0, 320, 321,
02082 322, 323, 324, 325, 326, 327, 328, 329, 0, 0,
02083 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02084 0, 0, 263, 77, 0, 77, -237, 0, 0, 104,
02085 0, 0, 0, 0, 0, 0, 0, 104, 0, 0,
02086 106, 0, 106, 0, 104, 104, 0, 77, 0, 0,
02087 0, 0, 0, 746, 0, 0, 0, 0, 0, 0,
02088 0, 107, 0, 0, 106, 0, 0, 0, 263, 0,
02089 104, 104, 0, 0, 515, 516, 0, 0, 517, 0,
02090 0, 0, 104, 0, 0, 0, 0, 0, 155, 156,
02091 157, 158, 159, 160, 161, 162, 163, 0, 0, 164,
02092 165, 0, 0, 166, 167, 168, 169, 107, 0, 0,
02093 0, 0, 0, 0, 0, 107, 0, 170, 0, 0,
02094 104, 0, 107, 107, 0, 0, 0, 104, 104, 0,
02095 0, 104, 0, 77, 171, 172, 173, 174, 175, 176,
02096 177, 178, 179, 180, 0, 181, 182, 104, 107, 107,
02097 106, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02098 107, 0, 0, 183, 217, 0, 0, 0, 356, 0,
02099 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
02100 0, 0, 0, 0, 0, 0, 900, 77, 0, 0,
02101 104, 0, 0, 0, 77, 77, 106, 0, 107, 0,
02102 0, 104, 0, 0, 106, 107, 107, 0, 0, 107,
02103 0, 106, 106, 0, 0, 0, 0, 0, 0, 0,
02104 77, 77, 0, 0, 0, 107, 0, 0, 0, 0,
02105 0, 0, 77, 0, 0, 0, 0, 106, 106, 0,
02106 0, 0, 0, 104, 0, 104, 357, 0, 0, 106,
02107 0, 104, 0, 104, 0, 0, 0, 304, 305, 306,
02108 307, 308, 309, 310, 901, 0, 313, 314, 107, 0,
02109 77, 0, 317, 318, 0, 0, 0, 77, 77, 107,
02110 0, 77, 0, 235, 235, 0, 0, 106, 235, 235,
02111 235, 0, 0, 0, 106, 106, 0, 77, 106, 0,
02112 235, 320, 321, 322, 323, 324, 325, 326, 327, 328,
02113 329, 0, 235, 0, 106, 0, 0, 0, 0, 0,
02114 0, 107, 0, 107, 235, 235, 235, 0, 0, 107,
02115 0, 107, 0, 0, 0, 0, 898, 0, 0, 0,
02116 77, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02117 0, 77, 0, 0, 0, 0, 0, 106, 0, 0,
02118 0, 0, 0, 0, 0, 0, 0, 0, 106, 0,
02119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02121 0, 0, 0, 77, 0, 77, 0, 0, 0, 0,
02122 0, 77, 0, 77, 0, 0, 0, 0, 0, 0,
02123 106, 0, 106, 0, 0, 0, 0, 0, 106, 0,
02124 106, 0, 523, 524, 0, 0, 525, 0, 0, 0,
02125 235, 0, 0, 235, 235, 235, 155, 156, 157, 158,
02126 159, 160, 161, 162, 163, 0, 0, 164, 165, 0,
02127 0, 166, 167, 168, 169, 0, 0, 304, 305, 306,
02128 307, 308, 309, 310, 311, 170, 313, 314, 0, 0,
02129 0, 0, 317, 318, 0, 0, 0, 0, 0, 0,
02130 0, 0, 171, 172, 173, 174, 175, 176, 177, 178,
02131 179, 180, 0, 181, 182, 235, 0, 0, 0, 0,
02132 0, 320, 321, 322, 323, 324, 325, 326, 327, 328,
02133 329, 183, 217, 0, 0, 0, 0, 0, 0, 0,
02134 0, 0, 0, 0, 304, 305, 306, 307, 308, 309,
02135 310, 311, 312, 313, 314, -566, -566, 0, 235, 317,
02136 318, 235, 235, 235, 235, 235, 235, 235, 235, 235,
02137 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
02138 235, 235, 235, 235, 235, 235, 235, 0, 320, 321,
02139 322, 323, 324, 325, 326, 327, 328, 329, 581, 516,
02140 0, 0, 582, 0, 0, 0, 0, 0, 0, 0,
02141 0, 0, 155, 156, 157, 158, 159, 160, 161, 162,
02142 163, 0, 0, 164, 165, 0, 0, 166, 167, 168,
02143 169, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02144 0, 170, 0, 0, 0, 235, 235, 235, 0, 0,
02145 0, 0, 0, 235, 235, 235, 0, 0, 171, 172,
02146 173, 174, 175, 176, 177, 178, 179, 180, 0, 181,
02147 182, 0, 235, 0, 0, 0, 0, 235, 0, 0,
02148 0, 0, 0, 0, 0, 0, 235, 183, 217, 235,
02149 0, 0, 0, 0, 0, 0, 0, 0, 0, 235,
02150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02152 0, 235, 235, 0, -565, 4, 0, 5, 6, 7,
02153 8, 9, 0, 235, 0, 10, 11, 0, 0, 235,
02154 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
02155 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
02156 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
02157 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
02158 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02159 46, 47, 0, 0, 0, 235, 0, 0, 0, 0,
02160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02161 48, 0, 0, 49, 50, 0, 51, 52, 0, 53,
02162 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02163 0, 0, 0, 0, 235, 0, 0, 0, 0, 0,
02164 0, 0, 0, 0, 0, 0, 61, 62, 63, 0,
02165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02166 235, 0, 0, 0, 0, 0, 0, 0, 0, -565,
02167 0, -565, 0, 0, 0, 0, 0, 0, 0, 0,
02168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02170 0, 0, 0, 235, 0, 0, 235, 235, 0, 0,
02171 0, -279, 0, 0, 0, 0, 0, 0, 0, -279,
02172 -279, -279, 0, 235, -279, -279, -279, 0, -279, 0,
02173 0, 0, 0, 0, 0, 0, 0, 0, -279, -279,
02174 -279, 0, 0, 0, 0, 0, 0, 0, -279, -279,
02175 0, -279, -279, -279, -279, -279, 0, 0, 0, 0,
02176 0, 0, 235, 0, 0, 0, 0, 235, 235, 0,
02177 235, 235, 0, 0, 0, 0, 0, 235, 0, -279,
02178 -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
02179 -279, -279, 0, 0, -279, -279, -279, 0, 711, -279,
02180 0, 0, 0, 0, 0, -279, 0, 0, 0, 0,
02181 0, 0, 0, 0, 0, 235, 0, 0, -279, 235,
02182 -101, -279, -279, -279, -279, -279, -279, -279, -279, -279,
02183 -279, -279, -279, 0, 0, 0, 0, 0, 0, 0,
02184 0, 0, 0, 0, 0, 0, 235, 0, -279, -279,
02185 -279, -279, -405, 0, -279, -279, -279, 0, -279, 0,
02186 -405, -405, -405, 0, 235, -405, -405, -405, 0, -405,
02187 0, 0, 0, 0, 0, 0, 0, 0, -405, -405,
02188 -405, 0, 0, 0, 235, 0, 0, 0, 0, -405,
02189 -405, 0, -405, -405, -405, -405, -405, 0, 0, 0,
02190 0, 0, 235, 304, 305, 306, 307, 308, 309, 310,
02191 311, 312, 313, 314, 315, 316, 0, 0, 317, 318,
02192 -405, -405, -405, -405, -405, -405, -405, -405, -405, -405,
02193 -405, -405, -405, 0, 0, -405, -405, -405, 0, 0,
02194 -405, 0, 0, 0, 0, 319, -405, 320, 321, 322,
02195 323, 324, 325, 326, 327, 328, 329, 0, 0, 0,
02196 0, 0, -405, 0, -405, -405, -405, -405, -405, -405,
02197 -405, -405, -405, -405, 0, 0, 0, 0, 0, 0,
02198 0, 0, 221, 0, 0, 0, 0, 0, -405, -405,
02199 -405, -405, -405, -273, 217, -405, -405, -405, 0, -405,
02200 0, -273, -273, -273, 0, 0, -273, -273, -273, 0,
02201 -273, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02202 -273, -273, -273, 0, 0, 0, 0, 0, 0, 0,
02203 -273, -273, 0, -273, -273, -273, -273, -273, 0, 0,
02204 0, 0, 0, 0, 304, 305, 306, 307, 308, 309,
02205 310, 311, 312, 313, 314, 315, 316, 0, 0, 317,
02206 318, -273, -273, -273, -273, -273, -273, -273, -273, -273,
02207 -273, -273, -273, -273, 0, 0, -273, -273, -273, 0,
02208 0, -273, 0, 0, 0, 0, 319, -273, 320, 321,
02209 322, 323, 324, 325, 326, 327, 328, 329, 0, 0,
02210 -273, 0, 0, -273, -273, -273, -273, -273, -273, -273,
02211 -273, -273, -273, -273, -273, 0, 0, 0, 0, 0,
02212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02213 -273, -273, -273, -273, -565, 0, -273, -273, -273, 0,
02214 -273, 0, -565, -565, -565, 0, 0, -565, -565, -565,
02215 0, -565, 0, 0, 0, 0, 0, 0, 0, 0,
02216 -565, -565, -565, 0, 0, 0, 0, 0, 0, 0,
02217 0, -565, -565, 0, -565, -565, -565, -565, -565, 0,
02218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02220 0, 0, -565, -565, -565, -565, -565, -565, -565, -565,
02221 -565, -565, -565, -565, -565, 0, 0, -565, -565, -565,
02222 0, 0, -565, 0, 0, 0, 0, 0, -565, 0,
02223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02224 0, 0, 0, 0, -565, 0, -565, -565, -565, -565,
02225 -565, -565, -565, -565, -565, -565, 0, 0, 0, 0,
02226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02227 -565, -565, -565, -565, -565, -286, 217, -565, -565, -565,
02228 0, -565, 0, -286, -286, -286, 0, 0, -286, -286,
02229 -286, 0, -286, 0, 0, 0, 0, 0, 0, 0,
02230 0, 0, -286, -286, 0, 0, 0, 0, 0, 0,
02231 0, 0, -286, -286, 0, -286, -286, -286, -286, -286,
02232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02234 0, 0, 0, -286, -286, -286, -286, -286, -286, -286,
02235 -286, -286, -286, -286, -286, -286, 0, 0, -286, -286,
02236 -286, 0, 0, -286, 0, 0, 0, 0, 0, -286,
02237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02238 0, 0, 0, 0, 0, -286, 0, -286, -286, -286,
02239 -286, -286, -286, -286, -286, -286, -286, 0, 0, 0,
02240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02241 0, 0, -286, -286, -286, -286, -547, 214, -286, -286,
02242 -286, 0, -286, 0, -547, -547, -547, 0, 0, 0,
02243 -547, -547, 0, -547, 0, 0, 0, 0, 0, 0,
02244 0, 0, -547, 0, 0, 0, 0, 0, 0, 0,
02245 0, 0, 0, -547, -547, 0, -547, -547, -547, -547,
02246 -547, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02247 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02248 0, 0, 0, 0, -547, -547, -547, -547, -547, -547,
02249 -547, -547, -547, -547, -547, -547, -547, 0, 0, -547,
02250 -547, -547, -279, 652, 0, 0, 0, 0, 0, 0,
02251 -279, -279, -279, 0, 0, 0, -279, -279, 0, -279,
02252 0, 0, 0, 0, 0, -99, -547, 0, -547, -547,
02253 -547, -547, -547, -547, -547, -547, -547, -547, 0, -279,
02254 -279, 0, -279, -279, -279, -279, -279, 0, 0, 0,
02255 0, 0, -547, -547, -547, -547, -91, 0, 0, -547,
02256 0, -547, 0, -547, 0, 0, 0, 0, 0, 0,
02257 -279, -279, -279, -279, -279, -279, -279, -279, -279, -279,
02258 -279, -279, -279, 0, 0, -279, -279, -279, 0, 653,
02259 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02260 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02261 0, -101, -279, 0, -279, -279, -279, -279, -279, -279,
02262 -279, -279, -279, -279, 0, 0, 0, 0, 0, 0,
02263 0, 0, 0, 0, 0, 0, 0, 0, 0, -279,
02264 -279, -279, -93, 0, 0, -279, 0, -279, 238, -279,
02265 5, 6, 7, 8, 9, -565, -565, -565, 10, 11,
02266 0, 0, -565, 12, 0, 13, 14, 15, 16, 17,
02267 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02268 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
02269 0, 0, 28, 29, 0, 31, 32, 33, 34, 35,
02270 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02271 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02273 0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
02274 52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
02275 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02276 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
02277 62, 63, 0, 0, 0, 0, 0, 0, 0, 0,
02278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02279 0, 0, -565, 238, -565, 5, 6, 7, 8, 9,
02280 0, 0, -565, 10, 11, 0, -565, -565, 12, 0,
02281 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02282 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02283 0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
02284 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02285 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02286 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02287 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02288 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02289 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02291 0, 0, 0, 0, 61, 62, 63, 0, 0, 0,
02292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02293 0, 0, 0, 0, 0, 0, 0, -565, 238, -565,
02294 5, 6, 7, 8, 9, 0, 0, -565, 10, 11,
02295 0, 0, -565, 12, -565, 13, 14, 15, 16, 17,
02296 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02297 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
02298 0, 0, 28, 29, 0, 31, 32, 33, 34, 35,
02299 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02300 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02302 0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
02303 52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
02304 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02305 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
02306 62, 63, 0, 0, 0, 0, 0, 0, 4, 0,
02307 5, 6, 7, 8, 9, 0, 0, 0, 10, 11,
02308 0, 0, -565, 12, -565, 13, 14, 15, 16, 17,
02309 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02310 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
02311 0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
02312 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02313 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02314 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02315 0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
02316 52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
02317 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02318 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
02319 62, 63, 0, 0, 0, 0, 0, 0, 0, 0,
02320 0, 0, 0, 0, -565, 0, 0, 0, 0, 0,
02321 0, 0, -565, 238, -565, 5, 6, 7, 8, 9,
02322 0, 0, -565, 10, 11, 0, 0, -565, 12, 0,
02323 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02324 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02325 0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
02326 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02327 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02329 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02330 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02331 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02333 0, 0, 0, 0, 61, 62, 63, 0, 0, 0,
02334 0, 0, 0, 238, 0, 5, 6, 7, 8, 9,
02335 0, -565, -565, 10, 11, 0, 0, -565, 12, -565,
02336 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02337 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02338 0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
02339 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02340 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02342 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02343 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02344 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02346 0, 0, 0, 0, 61, 62, 63, 0, 0, 0,
02347 0, 0, 0, 238, 0, 5, 6, 7, 8, 9,
02348 0, 0, 0, 10, 11, 0, 0, -565, 12, -565,
02349 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02350 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02351 0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
02352 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02353 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02355 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02356 0, 239, 50, 0, 51, 52, 0, 53, 0, 54,
02357 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02359 0, 0, 0, 0, 61, 62, 63, 0, 0, 0,
02360 0, 0, 0, 238, 0, 5, 6, 7, 8, 9,
02361 0, 0, 0, 10, 11, -565, 0, -565, 12, -565,
02362 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02363 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02364 0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
02365 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02366 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02368 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02369 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02370 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02372 0, 0, 0, 0, 61, 62, 63, 0, 0, 0,
02373 0, 0, 0, 238, 0, 5, 6, 7, 8, 9,
02374 0, 0, 0, 10, 11, -565, 0, -565, 12, -565,
02375 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02376 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02377 0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
02378 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02379 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02380 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02381 0, 0, 0, 0, 0, 0, 0, 0, 48, 0,
02382 0, 49, 50, 0, 51, 52, 0, 53, 0, 54,
02383 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02385 0, 0, 0, 0, 61, 62, 63, 0, 0, 0,
02386 0, 0, 0, 0, 0, 0, 0, 0, 0, -565,
02387 0, 0, 0, 0, 0, 0, 0, -565, 238, -565,
02388 5, 6, 7, 8, 9, 0, 0, -565, 10, 11,
02389 0, 0, 0, 12, 0, 13, 14, 15, 16, 17,
02390 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02391 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
02392 0, 0, 28, 29, 0, 31, 32, 33, 34, 35,
02393 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02394 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02395 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02396 0, 0, 0, 48, 0, 0, 49, 50, 0, 51,
02397 52, 0, 53, 0, 54, 55, 56, 57, 58, 59,
02398 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02399 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
02400 62, 63, 0, 0, 0, 0, 0, 0, 0, 0,
02401 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
02402 0, 0, -565, 12, -565, 13, 14, 15, 16, 17,
02403 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
02404 23, 24, 25, 26, 0, 0, 192, 0, 0, 0,
02405 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
02406 36, 37, 38, 39, 40, 193, 41, 42, 0, 43,
02407 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02409 0, 0, 0, 194, 0, 0, 195, 50, 0, 51,
02410 52, 0, 196, 197, 54, 55, 56, 57, 58, 59,
02411 60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
02412 6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
02413 198, 63, 12, 0, 13, 14, 15, 16, 17, 18,
02414 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
02415 24, 25, 26, 0, 221, 27, 0, 0, 0, 0,
02416 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
02417 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02418 45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
02419 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02420 0, 0, 194, 0, 0, 195, 50, 0, 51, 52,
02421 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02423 0, 0, 0, 0, 0, 0, 0, 0, 61, 62,
02424 63, 0, 0, 0, 0, 0, 0, 0, 0, 5,
02425 6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
02426 0, 284, 12, 285, 13, 14, 15, 16, 17, 18,
02427 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
02428 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
02429 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
02430 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02431 45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
02432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02433 0, 0, 194, 0, 0, 195, 50, 0, 51, 52,
02434 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02435 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
02436 7, 8, 9, 0, 0, 0, 10, 11, 61, 62,
02437 63, 12, 0, 13, 14, 15, 16, 17, 18, 19,
02438 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
02439 25, 26, 0, 221, 27, 0, 0, 0, 0, 0,
02440 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
02441 38, 39, 40, 0, 41, 42, 0, 43, 44, 45,
02442 0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
02443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02444 0, 48, 0, 0, 49, 50, 0, 51, 52, 0,
02445 53, 0, 54, 55, 56, 57, 58, 59, 60, 0,
02446 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02447 0, 0, 0, 0, 0, 0, 0, 61, 62, 63,
02448 0, 0, 0, 0, 0, 0, 5, 6, 7, 8,
02449 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
02450 466, 13, 14, 15, 16, 17, 18, 19, 0, 0,
02451 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
02452 0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
02453 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
02454 40, 0, 41, 42, 0, 43, 44, 45, 0, 46,
02455 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02456 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
02457 0, 0, 49, 50, 0, 51, 52, 0, 53, 0,
02458 54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
02459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02460 0, 0, 0, 0, 0, 61, 62, 63, 0, 0,
02461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02462 0, 0, 0, 0, 0, 0, 0, 0, 466, 111,
02463 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
02464 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
02465 132, 133, 134, 0, 0, 0, 135, 136, 137, 359,
02466 360, 361, 362, 142, 143, 144, 0, 0, 0, 0,
02467 0, 145, 146, 147, 148, 363, 364, 365, 366, 153,
02468 37, 38, 367, 40, 0, 0, 0, 0, 0, 0,
02469 0, 0, 155, 156, 157, 158, 159, 160, 161, 162,
02470 163, 0, 0, 164, 165, 0, 0, 166, 167, 168,
02471 169, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02472 0, 170, 0, 0, 0, 0, 0, 0, 0, 0,
02473 0, 0, 0, 0, 0, 0, 0, 0, 171, 172,
02474 173, 174, 175, 176, 177, 178, 179, 180, 0, 181,
02475 182, 0, 0, 0, 0, 0, -540, -540, -540, 0,
02476 -540, 0, 0, 0, -540, -540, 0, 183, 368, -540,
02477 0, -540, -540, -540, -540, -540, -540, -540, 0, -540,
02478 0, 0, 0, -540, -540, -540, -540, -540, -540, -540,
02479 0, 0, -540, 0, 0, 0, 0, 0, 0, -540,
02480 0, 0, -540, -540, -540, -540, -540, -540, -540, -540,
02481 -540, -540, -540, -540, 0, -540, -540, -540, 0, -540,
02482 -540, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02483 0, 0, 0, 0, 0, 0, 0, 0, 0, -540,
02484 0, 0, -540, -540, 0, -540, -540, 0, -540, -540,
02485 -540, -540, -540, -540, -540, -540, -540, 0, 0, 0,
02486 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02487 0, 0, 0, 0, 0, -540, -540, -540, 0, 0,
02488 0, 0, 0, -541, -541, -541, 0, -541, 0, -540,
02489 0, -541, -541, 0, 0, -540, -541, 0, -541, -541,
02490 -541, -541, -541, -541, -541, 0, -541, 0, 0, 0,
02491 -541, -541, -541, -541, -541, -541, -541, 0, 0, -541,
02492 0, 0, 0, 0, 0, 0, -541, 0, 0, -541,
02493 -541, -541, -541, -541, -541, -541, -541, -541, -541, -541,
02494 -541, 0, -541, -541, -541, 0, -541, -541, 0, 0,
02495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02496 0, 0, 0, 0, 0, 0, -541, 0, 0, -541,
02497 -541, 0, -541, -541, 0, -541, -541, -541, -541, -541,
02498 -541, -541, -541, -541, 0, 0, 0, 0, 0, 0,
02499 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02500 0, 0, -541, -541, -541, 0, 0, 0, 0, 0,
02501 -543, -543, -543, 0, -543, 0, -541, 0, -543, -543,
02502 0, 0, -541, -543, 0, -543, -543, -543, -543, -543,
02503 -543, -543, 0, 0, 0, 0, 0, -543, -543, -543,
02504 -543, -543, -543, -543, 0, 0, -543, 0, 0, 0,
02505 0, 0, 0, -543, 0, 0, -543, -543, -543, -543,
02506 -543, -543, -543, -543, -543, -543, -543, -543, 0, -543,
02507 -543, -543, 0, -543, -543, 0, 0, 0, 0, 0,
02508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02509 0, 0, 0, -543, 710, 0, -543, -543, 0, -543,
02510 -543, 0, -543, -543, -543, -543, -543, -543, -543, -543,
02511 -543, 0, 0, 0, 0, 0, -99, 0, 0, 0,
02512 0, 0, 0, 0, -545, -545, -545, 0, -545, -543,
02513 -543, -543, -545, -545, 0, 0, 0, -545, 0, -545,
02514 -545, -545, -545, -545, -545, -545, 0, 0, 0, -543,
02515 0, -545, -545, -545, -545, -545, -545, -545, 0, 0,
02516 -545, 0, 0, 0, 0, 0, 0, -545, 0, 0,
02517 -545, -545, -545, -545, -545, -545, -545, -545, -545, -545,
02518 -545, -545, 0, -545, -545, -545, 0, -545, -545, 0,
02519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02520 0, 0, 0, 0, 0, 0, 0, -545, 0, 0,
02521 -545, -545, 0, -545, -545, 0, -545, -545, -545, -545,
02522 -545, -545, -545, -545, -545, 0, 0, 0, 0, 0,
02523 0, 0, 0, 0, 0, 0, 0, 0, -546, -546,
02524 -546, 0, -546, -545, -545, -545, -546, -546, 0, 0,
02525 0, -546, 0, -546, -546, -546, -546, -546, -546, -546,
02526 0, 0, 0, -545, 0, -546, -546, -546, -546, -546,
02527 -546, -546, 0, 0, -546, 0, 0, 0, 0, 0,
02528 0, -546, 0, 0, -546, -546, -546, -546, -546, -546,
02529 -546, -546, -546, -546, -546, -546, 0, -546, -546, -546,
02530 0, -546, -546, 0, 0, 0, 0, 0, 0, 0,
02531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02532 0, -546, 0, 0, -546, -546, 0, -546, -546, 0,
02533 -546, -546, -546, -546, -546, -546, -546, -546, -546, 0,
02534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02535 0, 0, 0, 0, 0, 0, 0, -546, -546, -546,
02536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02537 0, 0, 0, 0, 0, 0, 0, -546, 111, 112,
02538 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
02539 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
02540 133, 134, 0, 0, 0, 135, 136, 137, 138, 139,
02541 140, 141, 142, 143, 144, 0, 0, 0, 0, 0,
02542 145, 146, 147, 148, 149, 150, 151, 152, 153, 266,
02543 267, 154, 268, 0, 0, 0, 0, 0, 0, 0,
02544 0, 155, 156, 157, 158, 159, 160, 161, 162, 163,
02545 0, 0, 164, 165, 0, 0, 166, 167, 168, 169,
02546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02547 170, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02548 0, 0, 0, 0, 0, 0, 0, 171, 172, 173,
02549 174, 175, 176, 177, 178, 179, 180, 0, 181, 182,
02550 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02551 0, 0, 0, 0, 0, 0, 183, 111, 112, 113,
02552 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
02553 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
02554 134, 0, 0, 0, 135, 136, 137, 138, 139, 140,
02555 141, 142, 143, 144, 0, 0, 0, 0, 0, 145,
02556 146, 147, 148, 149, 150, 151, 152, 153, 223, 0,
02557 154, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02558 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
02559 0, 164, 165, 0, 0, 166, 167, 168, 169, 0,
02560 0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
02561 0, 0, 55, 0, 0, 0, 0, 0, 0, 0,
02562 0, 0, 0, 0, 0, 0, 171, 172, 173, 174,
02563 175, 176, 177, 178, 179, 180, 0, 181, 182, 0,
02564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02565 0, 0, 0, 0, 0, 183, 111, 112, 113, 114,
02566 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
02567 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
02568 0, 0, 0, 135, 136, 137, 138, 139, 140, 141,
02569 142, 143, 144, 0, 0, 0, 0, 0, 145, 146,
02570 147, 148, 149, 150, 151, 152, 153, 0, 0, 154,
02571 0, 0, 0, 0, 0, 0, 0, 0, 0, 155,
02572 156, 157, 158, 159, 160, 161, 162, 163, 0, 0,
02573 164, 165, 0, 0, 166, 167, 168, 169, 0, 0,
02574 0, 0, 0, 0, 0, 0, 0, 0, 170, 0,
02575 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
02576 0, 0, 0, 0, 0, 171, 172, 173, 174, 175,
02577 176, 177, 178, 179, 180, 0, 181, 182, 0, 0,
02578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02579 0, 0, 0, 0, 183, 111, 112, 113, 114, 115,
02580 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
02581 126, 127, 128, 129, 130, 131, 132, 133, 134, 0,
02582 0, 0, 135, 136, 137, 138, 139, 140, 141, 142,
02583 143, 144, 0, 0, 0, 0, 0, 145, 146, 147,
02584 148, 149, 150, 151, 152, 153, 0, 0, 154, 0,
02585 0, 0, 0, 0, 0, 0, 0, 0, 155, 156,
02586 157, 158, 159, 160, 161, 162, 163, 0, 0, 164,
02587 165, 0, 0, 166, 167, 168, 169, 0, 0, 0,
02588 0, 0, 0, 0, 0, 0, 0, 170, 0, 0,
02589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02590 0, 0, 0, 0, 171, 172, 173, 174, 175, 176,
02591 177, 178, 179, 180, 0, 181, 182, 0, 0, 5,
02592 6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
02593 0, 0, 12, 183, 13, 14, 15, 228, 229, 18,
02594 19, 0, 0, 0, 0, 0, 230, 231, 232, 23,
02595 24, 25, 26, 0, 0, 192, 0, 0, 0, 0,
02596 0, 0, 255, 0, 0, 32, 33, 34, 35, 36,
02597 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02598 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02600 0, 0, 256, 0, 0, 195, 50, 0, 51, 52,
02601 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02603 0, 5, 6, 7, 0, 9, 0, 0, 257, 10,
02604 11, 0, 0, 0, 12, 0, 13, 14, 15, 228,
02605 229, 18, 19, 0, 0, 0, 258, 0, 230, 231,
02606 232, 23, 24, 25, 26, 0, 0, 192, 0, 0,
02607 0, 0, 0, 0, 255, 0, 0, 32, 33, 34,
02608 35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
02609 43, 44, 45, 0, 0, 0, 0, 0, 0, 0,
02610 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02611 0, 0, 0, 0, 256, 0, 0, 195, 50, 0,
02612 51, 52, 0, 0, 0, 54, 55, 56, 57, 58,
02613 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02614 0, 0, 0, 5, 6, 7, 8, 9, 0, 0,
02615 257, 10, 11, 0, 0, 0, 12, 0, 13, 14,
02616 15, 16, 17, 18, 19, 0, 0, 0, 482, 0,
02617 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
02618 0, 0, 0, 0, 0, 28, 29, 30, 31, 32,
02619 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
02620 42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
02621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02622 0, 0, 0, 0, 0, 0, 48, 0, 0, 49,
02623 50, 0, 51, 52, 0, 53, 0, 54, 55, 56,
02624 57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
02625 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
02626 10, 11, 61, 62, 63, 12, 0, 13, 14, 15,
02627 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
02628 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
02629 0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
02630 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02631 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02633 0, 0, 0, 0, 0, 48, 0, 0, 49, 50,
02634 0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
02635 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02636 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02637 11, 61, 62, 63, 12, 0, 13, 14, 15, 16,
02638 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
02639 22, 23, 24, 25, 26, 0, 0, 192, 0, 0,
02640 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
02641 35, 36, 37, 38, 39, 40, 193, 41, 42, 0,
02642 43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
02643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02644 0, 0, 0, 0, 194, 0, 0, 195, 50, 0,
02645 51, 52, 0, 196, 197, 54, 55, 56, 57, 58,
02646 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02647 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
02648 61, 198, 63, 12, 0, 13, 14, 15, 228, 229,
02649 18, 19, 0, 0, 0, 0, 0, 230, 231, 232,
02650 23, 24, 25, 26, 0, 0, 192, 0, 0, 0,
02651 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
02652 36, 37, 38, 39, 40, 193, 41, 42, 0, 43,
02653 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02655 0, 0, 0, 194, 0, 0, 195, 50, 0, 51,
02656 52, 0, 577, 197, 54, 55, 56, 57, 58, 59,
02657 60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
02658 6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
02659 198, 63, 12, 0, 13, 14, 15, 228, 229, 18,
02660 19, 0, 0, 0, 0, 0, 230, 231, 232, 23,
02661 24, 25, 26, 0, 0, 192, 0, 0, 0, 0,
02662 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
02663 37, 38, 39, 40, 193, 41, 42, 0, 43, 44,
02664 45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
02665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02666 0, 0, 194, 0, 0, 195, 50, 0, 51, 52,
02667 0, 196, 0, 54, 55, 56, 57, 58, 59, 60,
02668 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
02669 7, 0, 9, 0, 0, 0, 10, 11, 61, 198,
02670 63, 12, 0, 13, 14, 15, 228, 229, 18, 19,
02671 0, 0, 0, 0, 0, 230, 231, 232, 23, 24,
02672 25, 26, 0, 0, 192, 0, 0, 0, 0, 0,
02673 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
02674 38, 39, 40, 193, 41, 42, 0, 43, 44, 45,
02675 0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
02676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02677 0, 194, 0, 0, 195, 50, 0, 51, 52, 0,
02678 0, 197, 54, 55, 56, 57, 58, 59, 60, 0,
02679 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
02680 0, 9, 0, 0, 0, 10, 11, 61, 198, 63,
02681 12, 0, 13, 14, 15, 228, 229, 18, 19, 0,
02682 0, 0, 0, 0, 230, 231, 232, 23, 24, 25,
02683 26, 0, 0, 192, 0, 0, 0, 0, 0, 0,
02684 29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
02685 39, 40, 193, 41, 42, 0, 43, 44, 45, 0,
02686 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
02687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02688 194, 0, 0, 195, 50, 0, 51, 52, 0, 577,
02689 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02690 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
02691 9, 0, 0, 0, 10, 11, 61, 198, 63, 12,
02692 0, 13, 14, 15, 228, 229, 18, 19, 0, 0,
02693 0, 0, 0, 230, 231, 232, 23, 24, 25, 26,
02694 0, 0, 192, 0, 0, 0, 0, 0, 0, 29,
02695 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
02696 40, 193, 41, 42, 0, 43, 44, 45, 0, 46,
02697 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02698 0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
02699 0, 0, 195, 50, 0, 51, 52, 0, 0, 0,
02700 54, 55, 56, 57, 58, 59, 60, 0, 0, 0,
02701 0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
02702 0, 0, 0, 10, 11, 61, 198, 63, 12, 0,
02703 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
02704 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
02705 0, 192, 0, 0, 0, 0, 0, 0, 29, 0,
02706 0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
02707 0, 41, 42, 0, 43, 44, 45, 0, 46, 47,
02708 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02709 0, 0, 0, 0, 0, 0, 0, 0, 194, 0,
02710 0, 195, 50, 0, 51, 52, 0, 476, 0, 54,
02711 55, 56, 57, 58, 59, 60, 0, 0, 0, 0,
02712 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
02713 0, 0, 10, 11, 61, 198, 63, 12, 0, 13,
02714 14, 15, 228, 229, 18, 19, 0, 0, 0, 0,
02715 0, 230, 231, 232, 23, 24, 25, 26, 0, 0,
02716 192, 0, 0, 0, 0, 0, 0, 29, 0, 0,
02717 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
02718 41, 42, 0, 43, 44, 45, 0, 46, 47, 0,
02719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02720 0, 0, 0, 0, 0, 0, 0, 194, 0, 0,
02721 195, 50, 0, 51, 52, 0, 196, 0, 54, 55,
02722 56, 57, 58, 59, 60, 0, 0, 0, 0, 0,
02723 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
02724 0, 10, 11, 61, 198, 63, 12, 0, 13, 14,
02725 15, 228, 229, 18, 19, 0, 0, 0, 0, 0,
02726 230, 231, 232, 23, 24, 25, 26, 0, 0, 192,
02727 0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
02728 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
02729 42, 0, 43, 44, 45, 0, 46, 47, 0, 0,
02730 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02731 0, 0, 0, 0, 0, 0, 194, 0, 0, 195,
02732 50, 0, 51, 52, 0, 758, 0, 54, 55, 56,
02733 57, 58, 59, 60, 0, 0, 0, 0, 0, 0,
02734 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02735 10, 11, 61, 198, 63, 12, 0, 13, 14, 15,
02736 228, 229, 18, 19, 0, 0, 0, 0, 0, 230,
02737 231, 232, 23, 24, 25, 26, 0, 0, 192, 0,
02738 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
02739 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02740 0, 43, 44, 45, 0, 46, 47, 0, 0, 0,
02741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02742 0, 0, 0, 0, 0, 194, 0, 0, 195, 50,
02743 0, 51, 52, 0, 476, 0, 54, 55, 56, 57,
02744 58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
02745 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
02746 11, 61, 198, 63, 12, 0, 13, 14, 15, 228,
02747 229, 18, 19, 0, 0, 0, 0, 0, 230, 231,
02748 232, 23, 24, 25, 26, 0, 0, 192, 0, 0,
02749 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
02750 35, 36, 37, 38, 39, 40, 0, 41, 42, 0,
02751 43, 44, 45, 0, 46, 47, 0, 0, 0, 0,
02752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02753 0, 0, 0, 0, 194, 0, 0, 195, 50, 0,
02754 51, 52, 0, 577, 0, 54, 55, 56, 57, 58,
02755 59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
02756 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
02757 61, 198, 63, 12, 0, 13, 14, 15, 228, 229,
02758 18, 19, 0, 0, 0, 0, 0, 230, 231, 232,
02759 23, 24, 25, 26, 0, 0, 192, 0, 0, 0,
02760 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
02761 36, 37, 38, 39, 40, 0, 41, 42, 0, 43,
02762 44, 45, 0, 46, 47, 0, 0, 0, 0, 0,
02763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02764 0, 0, 0, 194, 0, 0, 195, 50, 0, 51,
02765 52, 0, 0, 0, 54, 55, 56, 57, 58, 59,
02766 60, 0, 0, 0, 0, 0, 0, 0, 0, 5,
02767 6, 7, 0, 9, 0, 0, 0, 10, 11, 61,
02768 198, 63, 12, 0, 13, 14, 15, 16, 17, 18,
02769 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
02770 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
02771 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
02772 37, 38, 39, 40, 0, 41, 42, 0, 43, 44,
02773 45, 0, 46, 47, 0, 0, 0, 0, 0, 0,
02774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02775 0, 0, 194, 0, 0, 195, 50, 0, 51, 52,
02776 0, 0, 0, 54, 55, 56, 57, 58, 59, 60,
02777 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
02778 7, 0, 9, 0, 0, 0, 10, 11, 61, 62,
02779 63, 12, 0, 13, 14, 15, 16, 17, 18, 19,
02780 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
02781 25, 26, 0, 0, 192, 0, 0, 0, 0, 0,
02782 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
02783 38, 39, 40, 0, 41, 42, 0, 43, 44, 45,
02784 0, 46, 47, 0, 0, 0, 0, 0, 0, 0,
02785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02786 0, 194, 0, 0, 195, 50, 0, 51, 52, 0,
02787 0, 0, 54, 55, 56, 57, 58, 59, 60, 0,
02788 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
02789 0, 9, 0, 0, 0, 10, 11, 61, 198, 63,
02790 12, 0, 13, 14, 15, 228, 229, 18, 19, 0,
02791 0, 0, 0, 0, 230, 231, 232, 23, 24, 25,
02792 26, 0, 0, 192, 0, 0, 0, 0, 0, 0,
02793 255, 0, 0, 32, 33, 34, 35, 36, 37, 38,
02794 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02797 256, 0, 0, 300, 50, 0, 51, 52, 0, 301,
02798 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02799 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02800 10, 11, 0, 0, 0, 12, 257, 13, 14, 15,
02801 228, 229, 18, 19, 0, 0, 0, 0, 0, 230,
02802 231, 232, 23, 24, 25, 26, 0, 0, 192, 0,
02803 0, 0, 0, 0, 0, 255, 0, 0, 32, 33,
02804 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02805 0, 43, 44, 45, 0, 0, 0, 0, 0, 0,
02806 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02807 0, 0, 0, 0, 0, 342, 0, 0, 49, 50,
02808 0, 51, 52, 0, 53, 0, 54, 55, 56, 57,
02809 58, 59, 60, 0, 0, 0, 0, 5, 6, 7,
02810 0, 9, 0, 0, 0, 10, 11, 0, 0, 0,
02811 12, 257, 13, 14, 15, 228, 229, 18, 19, 0,
02812 0, 0, 0, 0, 230, 231, 232, 23, 24, 25,
02813 26, 0, 0, 192, 0, 0, 0, 0, 0, 0,
02814 255, 0, 0, 32, 33, 34, 349, 36, 37, 38,
02815 350, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02816 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02817 0, 0, 0, 0, 0, 0, 0, 351, 0, 0,
02818 352, 0, 0, 195, 50, 0, 51, 52, 0, 0,
02819 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02820 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02821 10, 11, 0, 0, 0, 12, 257, 13, 14, 15,
02822 228, 229, 18, 19, 0, 0, 0, 0, 0, 230,
02823 231, 232, 23, 24, 25, 26, 0, 0, 192, 0,
02824 0, 0, 0, 0, 0, 255, 0, 0, 32, 33,
02825 34, 349, 36, 37, 38, 350, 40, 0, 41, 42,
02826 0, 43, 44, 45, 0, 0, 0, 0, 0, 0,
02827 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02828 0, 0, 0, 0, 0, 352, 0, 0, 195, 50,
02829 0, 51, 52, 0, 0, 0, 54, 55, 56, 57,
02830 58, 59, 60, 0, 0, 0, 0, 5, 6, 7,
02831 0, 9, 0, 0, 0, 10, 11, 0, 0, 0,
02832 12, 257, 13, 14, 15, 228, 229, 18, 19, 0,
02833 0, 0, 0, 0, 230, 231, 232, 23, 24, 25,
02834 26, 0, 0, 192, 0, 0, 0, 0, 0, 0,
02835 255, 0, 0, 32, 33, 34, 35, 36, 37, 38,
02836 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02838 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02839 256, 0, 0, 300, 50, 0, 51, 52, 0, 0,
02840 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02841 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
02842 10, 11, 0, 0, 0, 12, 257, 13, 14, 15,
02843 228, 229, 18, 19, 0, 0, 0, 0, 0, 230,
02844 231, 232, 23, 24, 25, 26, 0, 0, 192, 0,
02845 0, 0, 0, 0, 0, 255, 0, 0, 32, 33,
02846 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
02847 0, 43, 44, 45, 0, 0, 0, 0, 0, 0,
02848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02849 0, 0, 0, 0, 0, 887, 0, 0, 195, 50,
02850 0, 51, 52, 0, 0, 0, 54, 55, 56, 57,
02851 58, 59, 60, 0, 0, 0, 0, 5, 6, 7,
02852 0, 9, 0, 0, 0, 10, 11, 0, 0, 0,
02853 12, 257, 13, 14, 15, 228, 229, 18, 19, 0,
02854 0, 0, 0, 0, 230, 231, 232, 23, 24, 25,
02855 26, 0, 0, 192, 0, 0, 0, 0, 0, 0,
02856 255, 0, 0, 32, 33, 34, 35, 36, 37, 38,
02857 39, 40, 0, 41, 42, 0, 43, 44, 45, 0,
02858 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02859 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02860 897, 0, 0, 195, 50, 0, 51, 52, 0, 0,
02861 0, 54, 55, 56, 57, 58, 59, 60, 0, 0,
02862 0, 0, 0, 584, 524, 0, 0, 585, 0, 0,
02863 0, 0, 0, 0, 0, 0, 257, 155, 156, 157,
02864 158, 159, 160, 161, 162, 163, 0, 0, 164, 165,
02865 0, 0, 166, 167, 168, 169, 0, 0, 0, 0,
02866 0, 0, 0, 0, 0, 0, 170, 0, 0, 0,
02867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02868 0, 0, 0, 171, 172, 173, 174, 175, 176, 177,
02869 178, 179, 180, 0, 181, 182, 0, 0, 0, 0,
02870 605, 516, 0, 0, 606, 0, 0, 0, 0, 0,
02871 0, 0, 183, 217, 155, 156, 157, 158, 159, 160,
02872 161, 162, 163, 0, 0, 164, 165, 0, 0, 166,
02873 167, 168, 169, 0, 0, 0, 0, 0, 0, 0,
02874 0, 0, 0, 170, 0, 0, 0, 0, 0, 0,
02875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02876 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
02877 0, 181, 182, 0, 0, 0, 0, 608, 524, 0,
02878 0, 609, 0, 0, 0, 0, 0, 0, 0, 183,
02879 217, 155, 156, 157, 158, 159, 160, 161, 162, 163,
02880 0, 0, 164, 165, 0, 0, 166, 167, 168, 169,
02881 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02882 170, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02883 0, 0, 0, 0, 0, 0, 0, 171, 172, 173,
02884 174, 175, 176, 177, 178, 179, 180, 0, 181, 182,
02885 0, 0, 0, 0, 679, 516, 0, 0, 680, 0,
02886 0, 0, 0, 0, 0, 0, 183, 217, 155, 156,
02887 157, 158, 159, 160, 161, 162, 163, 0, 0, 164,
02888 165, 0, 0, 166, 167, 168, 169, 0, 0, 0,
02889 0, 0, 0, 0, 0, 0, 0, 170, 0, 0,
02890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02891 0, 0, 0, 0, 171, 172, 173, 174, 175, 176,
02892 177, 178, 179, 180, 0, 181, 182, 0, 0, 0,
02893 0, 682, 524, 0, 0, 683, 0, 0, 0, 0,
02894 0, 0, 0, 183, 217, 155, 156, 157, 158, 159,
02895 160, 161, 162, 163, 0, 0, 164, 165, 0, 0,
02896 166, 167, 168, 169, 0, 0, 0, 0, 0, 0,
02897 0, 0, 0, 0, 170, 0, 0, 0, 0, 0,
02898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02899 0, 171, 172, 173, 174, 175, 176, 177, 178, 179,
02900 180, 0, 181, 182, 0, 0, 0, 0, 689, 516,
02901 0, 0, 690, 0, 0, 0, 0, 0, 0, 0,
02902 183, 217, 155, 156, 157, 158, 159, 160, 161, 162,
02903 163, 0, 0, 164, 165, 0, 0, 166, 167, 168,
02904 169, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02905 0, 170, 0, 0, 0, 0, 0, 0, 0, 0,
02906 0, 0, 0, 0, 0, 0, 0, 0, 171, 172,
02907 173, 174, 175, 176, 177, 178, 179, 180, 0, 181,
02908 182, 0, 0, 0, 0, 562, 524, 0, 0, 563,
02909 0, 0, 0, 0, 0, 0, 0, 183, 217, 155,
02910 156, 157, 158, 159, 160, 161, 162, 163, 0, 0,
02911 164, 165, 0, 0, 166, 167, 168, 169, 0, 0,
02912 0, 0, 0, 0, 0, 0, 0, 0, 170, 0,
02913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02914 0, 0, 0, 0, 0, 171, 172, 173, 174, 175,
02915 176, 177, 178, 179, 180, 0, 181, 182, 0, 0,
02916 0, 0, 949, 516, 0, 0, 950, 0, 0, 0,
02917 0, 0, 0, 0, 183, 217, 155, 156, 157, 158,
02918 159, 160, 161, 162, 163, 0, 0, 164, 165, 0,
02919 0, 166, 167, 168, 169, 0, 0, 0, 0, 0,
02920 0, 0, 0, 0, 0, 170, 0, 0, 0, 0,
02921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02922 0, 0, 171, 172, 173, 174, 175, 176, 177, 178,
02923 179, 180, 0, 181, 182, 0, 0, 0, 0, 955,
02924 516, 0, 0, 956, 0, 0, 0, 0, 0, 0,
02925 0, 183, 217, 155, 156, 157, 158, 159, 160, 161,
02926 162, 163, 0, 0, 164, 165, 0, 0, 166, 167,
02927 168, 169, 0, 0, 0, 0, 0, 0, 0, 0,
02928 0, 0, 170, 0, 0, 0, 0, 0, 0, 0,
02929 0, 0, 0, 0, 0, 0, 0, 0, 0, 171,
02930 172, 173, 174, 175, 176, 177, 178, 179, 180, 0,
02931 181, 182, 0, 0, 0, 0, 958, 524, 0, 0,
02932 959, 0, 0, 0, 0, 0, 0, 0, 183, 217,
02933 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
02934 0, 164, 165, 0, 0, 166, 167, 168, 169, 0,
02935 0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
02936 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
02937 0, 0, 0, 0, 0, 0, 171, 172, 173, 174,
02938 175, 176, 177, 178, 179, 180, 0, 181, 182, 0,
02939 0, 0, 0, 562, 524, 0, 0, 563, 0, 0,
02940 0, 0, 0, 0, 0, 183, 217, 155, 156, 157,
02941 158, 159, 160, 161, 162, 163, 0, 0, 164, 165,
02942 0, 0, 166, 167, 168, 169, 0, 0, 0, 0,
02943 0, 0, 0, 0, 0, 0, 170, 0, 0, 0,
02944 0, 0, 0, 0, 705, 0, 0, 0, 0, 0,
02945 0, 0, 0, 171, 172, 173, 174, 175, 176, 177,
02946 178, 179, 180, 650, 181, 182, 0, 0, 304, 305,
02947 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
02948 316, 0, 183, 317, 318, 0, 0, 304, 305, 306,
02949 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
02950 0, 0, 317, 318, 0, 0, 0, 0, 0, 0,
02951 319, 0, 320, 321, 322, 323, 324, 325, 326, 327,
02952 328, 329, 0, 0, 0, 0, 0, 0, 0, 319,
02953 0, 320, 321, 322, 323, 324, 325, 326, 327, 328,
02954 329
02955 };
02956
02957 static const yytype_int16 yycheck[] =
02958 {
02959 2, 16, 17, 55, 2, 20, 4, 51, 28, 75,
02960 51, 52, 446, 336, 210, 8, 49, 537, 16, 17,
02961 303, 8, 20, 27, 536, 29, 556, 53, 83, 583,
02962 446, 86, 249, 331, 65, 28, 253, 4, 90, 442,
02963 8, 28, 748, 272, 13, 274, 352, 276, 49, 51,
02964 52, 49, 50, 607, 86, 53, 735, 667, 813, 836,
02965 28, 671, 641, 811, 62, 732, 615, 1, 22, 27,
02966 16, 17, 29, 50, 20, 25, 330, 75, 332, 482,
02967 53, 566, 567, 62, 82, 83, 26, 55, 86, 87,
02968 88, 89, 728, 13, 13, 61, 394, 25, 22, 13,
02969 61, 85, 75, 239, 76, 82, 83, 37, 38, 86,
02970 140, 398, 390, 749, 87, 88, 89, 147, 372, 373,
02971 398, 85, 90, 871, 558, 87, 85, 681, 65, 109,
02972 15, 13, 17, 0, 25, 25, 147, 13, 692, 393,
02973 106, 395, 114, 104, 105, 432, 444, 109, 925, 86,
02974 107, 25, 56, 732, 108, 139, 735, 25, 688, 914,
02975 140, 2, 195, 4, 300, 419, 696, 834, 916, 25,
02976 140, 140, 25, 722, 723, 139, 145, 147, 147, 113,
02977 139, 59, 60, 889, 108, 146, 620, 145, 85, 147,
02978 140, 445, 258, 655, 227, 943, 136, 195, 877, 214,
02979 662, 216, 217, 205, 620, 136, 239, 641, 210, 241,
02980 241, 145, 140, 147, 881, 217, 214, 147, 216, 217,
02981 146, 706, 220, 142, 222, 145, 145, 147, 147, 227,
02982 459, 145, 26, 147, 289, 290, 291, 292, 239, 146,
02983 238, 239, 139, 220, 542, 222, 649, 553, 858, 140,
02984 140, 255, 142, 25, 298, 834, 554, 836, 28, 303,
02985 258, 695, 811, 145, 813, 147, 140, 300, 214, 145,
02986 216, 147, 140, 99, 142, 301, 109, 26, 232, 695,
02987 792, 235, 337, 338, 140, 258, 25, 140, 87, 543,
02988 288, 289, 290, 291, 292, 293, 294, 295, 877, 300,
02989 298, 555, 300, 301, 241, 303, 142, 339, 220, 85,
02990 109, 147, 289, 290, 291, 292, 331, 294, 295, 298,
02991 140, 288, 871, 872, 303, 37, 38, 26, 301, 331,
02992 860, 243, 145, 331, 147, 333, 85, 109, 858, 337,
02993 338, 140, 136, 109, 85, 87, 925, 26, 142, 390,
02994 87, 85, 140, 351, 677, 87, 85, 142, 85, 56,
02995 337, 338, 330, 139, 26, 914, 109, 916, 140, 87,
02996 109, 143, 109, 88, 351, 147, 442, 109, 332, 394,
02997 378, 379, 912, 666, 580, 602, 85, 136, 429, 138,
02998 139, 109, 394, 413, 943, 85, 394, 238, 139, 378,
02999 379, 140, 339, 957, 143, 139, 85, 85, 147, 138,
03000 139, 138, 139, 142, 416, 52, 482, 354, 416, 56,
03001 413, 140, 140, 85, 87, 393, 413, 425, 85, 444,
03002 140, 865, 85, 85, 59, 60, 85, 136, 142, 138,
03003 139, 395, 444, 142, 442, 413, 444, 288, 138, 139,
03004 418, 136, 293, 142, 85, 14, 15, 136, 85, 138,
03005 139, 139, 85, 142, 68, 419, 564, 565, 85, 442,
03006 142, 85, 143, 475, 136, 443, 138, 139, 85, 109,
03007 142, 138, 139, 144, 482, 138, 139, 139, 400, 138,
03008 139, 445, 404, 137, 538, 407, 85, 87, 56, 532,
03009 504, 534, 52, 106, 54, 55, 56, 57, 139, 482,
03010 422, 138, 139, 106, 85, 427, 139, 85, 522, 109,
03011 641, 138, 139, 846, 138, 139, 528, 542, 530, 852,
03012 140, 138, 139, 87, 532, 87, 534, 603, 87, 554,
03013 542, 68, 68, 52, 542, 54, 55, 56, 57, 138,
03014 139, 17, 554, 140, 574, 109, 554, 109, 556, 557,
03015 109, 145, 564, 565, 566, 567, 520, 138, 139, 481,
03016 138, 139, 56, 541, 528, 416, 61, 94, 580, 583,
03017 557, 574, 68, 649, 425, 553, 140, 574, 140, 543,
03018 140, 140, 52, 25, 592, 597, 520, 143, 535, 536,
03019 137, 555, 140, 607, 528, 603, 574, 140, 140, 642,
03020 564, 565, 549, 61, 735, 592, 87, 738, 146, 104,
03021 105, 106, 666, 87, 626, 87, 628, 140, 630, 684,
03022 603, 140, 687, 119, 120, 121, 140, 935, 109, 641,
03023 564, 565, 596, 597, 642, 109, 698, 109, 61, 10,
03024 68, 649, 8, 54, 652, 653, 104, 105, 106, 13,
03025 658, 659, 63, 64, 666, 667, 109, 669, 61, 671,
03026 703, 704, 137, 652, 653, 52, 649, 681, 140, 658,
03027 659, 61, 936, 140, 140, 65, 684, 140, 692, 687,
03028 688, 104, 105, 106, 52, 140, 729, 730, 696, 117,
03029 118, 119, 120, 121, 706, 703, 704, 684, 741, 111,
03030 687, 104, 105, 106, 144, 836, 15, 838, 52, 140,
03031 54, 55, 56, 57, 104, 105, 728, 782, 145, 114,
03032 698, 729, 730, 193, 109, 140, 196, 197, 40, 41,
03033 42, 43, 44, 741, 140, 140, 779, 749, 685, 751,
03034 10, 753, 754, 786, 787, 89, 877, 790, 879, 140,
03035 697, 95, 883, 88, 16, 17, 9, 137, 20, 10,
03036 10, 769, 140, 806, 137, 777, 54, 55, 780, 57,
03037 140, 779, 694, 140, 782, 63, 64, 140, 786, 787,
03038 769, 140, 790, 137, 46, 47, 114, 140, 140, 51,
03039 52, 137, 140, 715, 925, 782, 927, 56, 806, 930,
03040 62, 63, 140, 140, 726, 416, 849, 819, 820, 140,
03041 822, 56, 824, 825, 945, 140, 140, 140, 87, 827,
03042 142, 52, 142, 54, 55, 56, 57, 539, 298, 89,
03043 889, 938, 722, 303, 92, 937, 967, 845, 95, 57,
03044 -1, 849, 90, 865, 827, 792, 858, 794, 68, 834,
03045 732, 52, 860, 54, 55, 56, 57, -1, 89, 902,
03046 -1, 904, 845, 83, 84, 96, -1, 910, 52, -1,
03047 54, 55, 56, 57, -1, -1, -1, 799, -1, 891,
03048 892, 893, -1, 895, 896, 116, -1, 52, 810, 54,
03049 55, 56, 57, 815, 902, -1, 904, 117, 118, 119,
03050 120, 121, 910, -1, 912, 89, 918, 919, 920, 921,
03051 935, 95, -1, -1, -1, -1, -1, -1, -1, 389,
03052 390, -1, -1, 935, 89, 937, 938, 935, 398, -1,
03053 -1, 193, -1, -1, 196, 197, 198, -1, -1, 951,
03054 952, 953, 954, 957, -1, 923, 52, -1, 54, 55,
03055 56, 57, 214, 965, 216, 217, 934, -1, -1, 429,
03056 -1, 973, 432, -1, 676, 52, -1, 54, 55, 56,
03057 57, -1, 936, -1, -1, -1, -1, -1, -1, -1,
03058 -1, 693, -1, 89, -1, -1, -1, -1, -1, 95,
03059 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03060 -1, -1, 89, -1, -1, -1, 476, -1, 95, 96,
03061 116, -1, -1, 119, -1, -1, -1, -1, -1, -1,
03062 -1, -1, -1, 2, -1, 4, -1, -1, -1, 116,
03063 -1, -1, 119, -1, -1, -1, 298, -1, -1, 145,
03064 -1, 303, 304, 305, 306, 307, 308, 309, 310, 311,
03065 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
03066 322, 323, 324, 325, 326, 327, 328, 329, 538, 331,
03067 49, 783, -1, 785, 53, 52, -1, 54, 55, 56,
03068 57, -1, -1, 795, -1, -1, -1, -1, 800, -1,
03069 -1, -1, -1, -1, -1, -1, 75, -1, -1, -1,
03070 -1, 2, -1, 4, -1, -1, -1, 577, 87, 88,
03071 89, 90, 89, -1, -1, -1, 378, 379, 95, 96,
03072 -1, -1, -1, -1, -1, -1, 388, 389, 390, -1,
03073 -1, -1, 394, -1, 396, 397, 398, -1, -1, 116,
03074 -1, -1, 119, 855, 856, -1, -1, -1, 49, 628,
03075 -1, 630, 53, 415, -1, -1, 68, 52, 420, 54,
03076 55, 56, 57, -1, -1, 142, -1, 429, -1, -1,
03077 432, 83, 84, 2, 75, 4, 646, -1, -1, -1,
03078 -1, -1, 444, -1, -1, -1, 87, 88, 89, -1,
03079 2, -1, 4, -1, 89, -1, 666, -1, -1, 911,
03080 95, 96, 464, 465, 116, 117, 118, 119, 120, 121,
03081 -1, -1, -1, -1, 476, -1, 195, -1, -1, -1,
03082 49, 116, -1, -1, 119, 0, -1, 939, -1, 941,
03083 -1, -1, -1, 8, 9, 10, -1, 49, 13, 14,
03084 15, 52, 17, 54, 55, 56, 57, 142, 227, -1,
03085 720, -1, 27, -1, -1, -1, -1, -1, 87, 238,
03086 239, -1, 37, 38, -1, 40, 41, 42, 43, 44,
03087 -1, -1, 751, -1, 753, 754, 538, -1, 89, 258,
03088 542, 68, -1, -1, 95, 96, -1, -1, 758, -1,
03089 -1, -1, 554, -1, 195, -1, 83, 84, -1, -1,
03090 -1, -1, -1, -1, -1, 116, -1, -1, 119, 288,
03091 85, -1, -1, -1, 293, 577, -1, -1, -1, 789,
03092 -1, 300, 301, -1, -1, -1, 227, 114, 115, 116,
03093 117, 118, 119, 120, 121, -1, -1, 238, 239, -1,
03094 819, 820, -1, 822, -1, 824, 825, -1, -1, -1,
03095 -1, -1, -1, -1, 333, -1, -1, 258, -1, -1,
03096 -1, -1, 137, -1, 139, -1, 195, 142, 143, -1,
03097 145, -1, 147, -1, -1, -1, -1, -1, -1, -1,
03098 -1, -1, -1, 195, 646, -1, -1, 288, 650, -1,
03099 652, 653, 293, -1, -1, -1, 658, 659, 227, 300,
03100 301, -1, -1, -1, 666, -1, -1, -1, -1, 238,
03101 239, -1, 891, 892, 893, 227, 895, 896, -1, -1,
03102 -1, -1, -1, -1, -1, -1, 238, 239, -1, -1,
03103 -1, -1, 333, -1, -1, -1, -1, 416, -1, 918,
03104 919, 920, 921, 705, -1, -1, 425, -1, 710, 711,
03105 -1, 713, 714, -1, -1, -1, -1, -1, 720, 288,
03106 -1, -1, -1, 442, 293, -1, -1, -1, -1, -1,
03107 -1, 300, 951, 952, 953, 954, 288, -1, -1, -1,
03108 -1, 293, -1, -1, -1, -1, 965, -1, 300, -1,
03109 -1, -1, -1, -1, 973, -1, 758, -1, -1, -1,
03110 762, -1, -1, 482, 333, -1, -1, 769, -1, -1,
03111 -1, -1, -1, -1, -1, 416, -1, -1, -1, -1,
03112 -1, 333, -1, -1, 425, -1, -1, 789, -1, -1,
03113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03114 -1, 442, -1, -1, -1, 807, -1, -1, -1, -1,
03115 -1, -1, -1, 532, -1, 534, -1, -1, -1, -1,
03116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03117 68, 69, 70, 71, 72, 73, 74, 556, -1, 77,
03118 78, 482, -1, -1, -1, 83, 84, 416, -1, -1,
03119 -1, -1, -1, -1, -1, -1, 425, -1, -1, -1,
03120 -1, -1, -1, -1, 416, -1, -1, -1, -1, -1,
03121 44, -1, -1, 425, 112, 113, 114, 115, 116, 117,
03122 118, 119, 120, 121, 603, -1, -1, -1, -1, -1,
03123 -1, 532, -1, 534, 68, 69, 70, 71, 72, 73,
03124 74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
03125 84, -1, -1, -1, -1, 556, -1, -1, -1, -1,
03126 -1, -1, -1, 642, -1, -1, -1, -1, -1, -1,
03127 649, -1, -1, 935, -1, -1, 110, -1, 112, 113,
03128 114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
03129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03130 -1, -1, 603, 532, -1, 534, 140, -1, -1, 688,
03131 -1, -1, -1, -1, -1, -1, -1, 696, -1, -1,
03132 532, -1, 534, -1, 703, 704, -1, 556, -1, -1,
03133 -1, -1, -1, 634, -1, -1, -1, -1, -1, -1,
03134 -1, 642, -1, -1, 556, -1, -1, -1, 649, -1,
03135 729, 730, -1, -1, 52, 53, -1, -1, 56, -1,
03136 -1, -1, 741, -1, -1, -1, -1, -1, 66, 67,
03137 68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
03138 78, -1, -1, 81, 82, 83, 84, 688, -1, -1,
03139 -1, -1, -1, -1, -1, 696, -1, 95, -1, -1,
03140 779, -1, 703, 704, -1, -1, -1, 786, 787, -1,
03141 -1, 790, -1, 642, 112, 113, 114, 115, 116, 117,
03142 118, 119, 120, 121, -1, 123, 124, 806, 729, 730,
03143 642, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03144 741, -1, -1, 141, 142, -1, -1, -1, 827, -1,
03145 -1, -1, -1, -1, -1, -1, -1, -1, -1, 688,
03146 -1, -1, -1, -1, -1, -1, 845, 696, -1, -1,
03147 849, -1, -1, -1, 703, 704, 688, -1, 779, -1,
03148 -1, 860, -1, -1, 696, 786, 787, -1, -1, 790,
03149 -1, 703, 704, -1, -1, -1, -1, -1, -1, -1,
03150 729, 730, -1, -1, -1, 806, -1, -1, -1, -1,
03151 -1, -1, 741, -1, -1, -1, -1, 729, 730, -1,
03152 -1, -1, -1, 902, -1, 904, 827, -1, -1, 741,
03153 -1, 910, -1, 912, -1, -1, -1, 68, 69, 70,
03154 71, 72, 73, 74, 845, -1, 77, 78, 849, -1,
03155 779, -1, 83, 84, -1, -1, -1, 786, 787, 860,
03156 -1, 790, -1, 46, 47, -1, -1, 779, 51, 52,
03157 53, -1, -1, -1, 786, 787, -1, 806, 790, -1,
03158 63, 112, 113, 114, 115, 116, 117, 118, 119, 120,
03159 121, -1, 75, -1, 806, -1, -1, -1, -1, -1,
03160 -1, 902, -1, 904, 87, 88, 89, -1, -1, 910,
03161 -1, 912, -1, -1, -1, -1, 845, -1, -1, -1,
03162 849, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03163 -1, 860, -1, -1, -1, -1, -1, 849, -1, -1,
03164 -1, -1, -1, -1, -1, -1, -1, -1, 860, -1,
03165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03167 -1, -1, -1, 902, -1, 904, -1, -1, -1, -1,
03168 -1, 910, -1, 912, -1, -1, -1, -1, -1, -1,
03169 902, -1, 904, -1, -1, -1, -1, -1, 910, -1,
03170 912, -1, 52, 53, -1, -1, 56, -1, -1, -1,
03171 193, -1, -1, 196, 197, 198, 66, 67, 68, 69,
03172 70, 71, 72, 73, 74, -1, -1, 77, 78, -1,
03173 -1, 81, 82, 83, 84, -1, -1, 68, 69, 70,
03174 71, 72, 73, 74, 75, 95, 77, 78, -1, -1,
03175 -1, -1, 83, 84, -1, -1, -1, -1, -1, -1,
03176 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119,
03177 120, 121, -1, 123, 124, 258, -1, -1, -1, -1,
03178 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
03179 121, 141, 142, -1, -1, -1, -1, -1, -1, -1,
03180 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
03181 74, 75, 76, 77, 78, 79, 80, -1, 301, 83,
03182 84, 304, 305, 306, 307, 308, 309, 310, 311, 312,
03183 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
03184 323, 324, 325, 326, 327, 328, 329, -1, 112, 113,
03185 114, 115, 116, 117, 118, 119, 120, 121, 52, 53,
03186 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
03187 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
03188 74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
03189 84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03190 -1, 95, -1, -1, -1, 388, 389, 390, -1, -1,
03191 -1, -1, -1, 396, 397, 398, -1, -1, 112, 113,
03192 114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
03193 124, -1, 415, -1, -1, -1, -1, 420, -1, -1,
03194 -1, -1, -1, -1, -1, -1, 429, 141, 142, 432,
03195 -1, -1, -1, -1, -1, -1, -1, -1, -1, 442,
03196 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03198 -1, 464, 465, -1, 0, 1, -1, 3, 4, 5,
03199 6, 7, -1, 476, -1, 11, 12, -1, -1, 482,
03200 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
03201 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03202 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
03203 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
03204 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03205 66, 67, -1, -1, -1, 538, -1, -1, -1, -1,
03206 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03207 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03208 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03209 -1, -1, -1, -1, 577, -1, -1, -1, -1, -1,
03210 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
03211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03212 603, -1, -1, -1, -1, -1, -1, -1, -1, 145,
03213 -1, 147, -1, -1, -1, -1, -1, -1, -1, -1,
03214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03216 -1, -1, -1, 646, -1, -1, 649, 650, -1, -1,
03217 -1, 0, -1, -1, -1, -1, -1, -1, -1, 8,
03218 9, 10, -1, 666, 13, 14, 15, -1, 17, -1,
03219 -1, -1, -1, -1, -1, -1, -1, -1, 27, 28,
03220 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
03221 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
03222 -1, -1, 705, -1, -1, -1, -1, 710, 711, -1,
03223 713, 714, -1, -1, -1, -1, -1, 720, -1, 68,
03224 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
03225 79, 80, -1, -1, 83, 84, 85, -1, 87, 88,
03226 -1, -1, -1, -1, -1, 94, -1, -1, -1, -1,
03227 -1, -1, -1, -1, -1, 758, -1, -1, 107, 762,
03228 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
03229 119, 120, 121, -1, -1, -1, -1, -1, -1, -1,
03230 -1, -1, -1, -1, -1, -1, 789, -1, 137, 138,
03231 139, 140, 0, -1, 143, 144, 145, -1, 147, -1,
03232 8, 9, 10, -1, 807, 13, 14, 15, -1, 17,
03233 -1, -1, -1, -1, -1, -1, -1, -1, 26, 27,
03234 28, -1, -1, -1, 827, -1, -1, -1, -1, 37,
03235 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
03236 -1, -1, 845, 68, 69, 70, 71, 72, 73, 74,
03237 75, 76, 77, 78, 79, 80, -1, -1, 83, 84,
03238 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
03239 78, 79, 80, -1, -1, 83, 84, 85, -1, -1,
03240 88, -1, -1, -1, -1, 110, 94, 112, 113, 114,
03241 115, 116, 117, 118, 119, 120, 121, -1, -1, -1,
03242 -1, -1, 110, -1, 112, 113, 114, 115, 116, 117,
03243 118, 119, 120, 121, -1, -1, -1, -1, -1, -1,
03244 -1, -1, 147, -1, -1, -1, -1, -1, 136, 137,
03245 138, 139, 140, 0, 142, 143, 144, 145, -1, 147,
03246 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
03247 17, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03248 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
03249 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
03250 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
03251 74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
03252 84, 68, 69, 70, 71, 72, 73, 74, 75, 76,
03253 77, 78, 79, 80, -1, -1, 83, 84, 85, -1,
03254 -1, 88, -1, -1, -1, -1, 110, 94, 112, 113,
03255 114, 115, 116, 117, 118, 119, 120, 121, -1, -1,
03256 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
03257 117, 118, 119, 120, 121, -1, -1, -1, -1, -1,
03258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03259 137, 138, 139, 140, 0, -1, 143, 144, 145, -1,
03260 147, -1, 8, 9, 10, -1, -1, 13, 14, 15,
03261 -1, 17, -1, -1, -1, -1, -1, -1, -1, -1,
03262 26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
03263 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
03264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03266 -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
03267 76, 77, 78, 79, 80, -1, -1, 83, 84, 85,
03268 -1, -1, 88, -1, -1, -1, -1, -1, 94, -1,
03269 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03270 -1, -1, -1, -1, 110, -1, 112, 113, 114, 115,
03271 116, 117, 118, 119, 120, 121, -1, -1, -1, -1,
03272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03273 136, 137, 138, 139, 140, 0, 142, 143, 144, 145,
03274 -1, 147, -1, 8, 9, 10, -1, -1, 13, 14,
03275 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
03276 -1, -1, 27, 28, -1, -1, -1, -1, -1, -1,
03277 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
03278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03279 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03280 -1, -1, -1, 68, 69, 70, 71, 72, 73, 74,
03281 75, 76, 77, 78, 79, 80, -1, -1, 83, 84,
03282 85, -1, -1, 88, -1, -1, -1, -1, -1, 94,
03283 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03284 -1, -1, -1, -1, -1, 110, -1, 112, 113, 114,
03285 115, 116, 117, 118, 119, 120, 121, -1, -1, -1,
03286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03287 -1, -1, 137, 138, 139, 140, 0, 142, 143, 144,
03288 145, -1, 147, -1, 8, 9, 10, -1, -1, -1,
03289 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
03290 -1, -1, 26, -1, -1, -1, -1, -1, -1, -1,
03291 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
03292 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03294 -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
03295 74, 75, 76, 77, 78, 79, 80, -1, -1, 83,
03296 84, 85, 0, 87, -1, -1, -1, -1, -1, -1,
03297 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
03298 -1, -1, -1, -1, -1, 109, 110, -1, 112, 113,
03299 114, 115, 116, 117, 118, 119, 120, 121, -1, 37,
03300 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
03301 -1, -1, 136, 137, 138, 139, 140, -1, -1, 143,
03302 -1, 145, -1, 147, -1, -1, -1, -1, -1, -1,
03303 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
03304 78, 79, 80, -1, -1, 83, 84, 85, -1, 87,
03305 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03306 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03307 -1, 109, 110, -1, 112, 113, 114, 115, 116, 117,
03308 118, 119, 120, 121, -1, -1, -1, -1, -1, -1,
03309 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
03310 138, 139, 140, -1, -1, 143, -1, 145, 1, 147,
03311 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
03312 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
03313 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03314 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03315 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52,
03316 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03317 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03319 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03320 93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
03321 103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03322 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
03323 123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
03324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03325 -1, -1, 145, 1, 147, 3, 4, 5, 6, 7,
03326 -1, -1, 10, 11, 12, -1, 14, 15, 16, -1,
03327 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03328 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03329 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
03330 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03331 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03332 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03333 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03334 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03335 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03337 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03338 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03339 -1, -1, -1, -1, -1, -1, -1, 145, 1, 147,
03340 3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
03341 -1, -1, 15, 16, 17, 18, 19, 20, 21, 22,
03342 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03343 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03344 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52,
03345 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03346 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03347 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03348 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03349 93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
03350 103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03351 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
03352 123, 124, -1, -1, -1, -1, -1, -1, 1, -1,
03353 3, 4, 5, 6, 7, -1, -1, -1, 11, 12,
03354 -1, -1, 145, 16, 147, 18, 19, 20, 21, 22,
03355 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03356 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03357 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
03358 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03359 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03361 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03362 93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
03363 103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03364 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
03365 123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
03366 -1, -1, -1, -1, 137, -1, -1, -1, -1, -1,
03367 -1, -1, 145, 1, 147, 3, 4, 5, 6, 7,
03368 -1, -1, 10, 11, 12, -1, -1, 15, 16, -1,
03369 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03370 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03371 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
03372 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03373 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03375 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03376 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03377 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03378 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03379 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03380 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
03381 -1, 9, 10, 11, 12, -1, -1, 145, 16, 147,
03382 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03383 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03384 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
03385 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03386 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03388 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03389 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03390 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03391 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03392 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03393 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
03394 -1, -1, -1, 11, 12, -1, -1, 145, 16, 147,
03395 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03396 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03397 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
03398 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03399 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03401 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03402 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03403 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03404 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03405 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03406 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
03407 -1, -1, -1, 11, 12, 143, -1, 145, 16, 147,
03408 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03409 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03410 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
03411 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03412 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03414 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03415 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03416 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03418 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03419 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
03420 -1, -1, -1, 11, 12, 143, -1, 145, 16, 147,
03421 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03422 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03423 -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
03424 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03425 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03427 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03428 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03429 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03431 -1, -1, -1, -1, 122, 123, 124, -1, -1, -1,
03432 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
03433 -1, -1, -1, -1, -1, -1, -1, 145, 1, 147,
03434 3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
03435 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
03436 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03437 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03438 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52,
03439 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03440 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03442 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03443 93, -1, 95, -1, 97, 98, 99, 100, 101, 102,
03444 103, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03445 -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
03446 123, 124, -1, -1, -1, -1, -1, -1, -1, -1,
03447 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
03448 -1, -1, 145, 16, 147, 18, 19, 20, 21, 22,
03449 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03450 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03451 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03452 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
03453 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03455 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03456 93, -1, 95, 96, 97, 98, 99, 100, 101, 102,
03457 103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
03458 4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
03459 123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
03460 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03461 34, 35, 36, -1, 147, 39, -1, -1, -1, -1,
03462 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03463 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03464 64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
03465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03466 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03467 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03469 -1, -1, -1, -1, -1, -1, -1, -1, 122, 123,
03470 124, -1, -1, -1, -1, -1, -1, -1, -1, 3,
03471 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
03472 -1, 145, 16, 147, 18, 19, 20, 21, 22, 23,
03473 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03474 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03475 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03476 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03477 64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
03478 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03479 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03480 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03481 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
03482 5, 6, 7, -1, -1, -1, 11, 12, 122, 123,
03483 124, 16, -1, 18, 19, 20, 21, 22, 23, 24,
03484 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
03485 35, 36, -1, 147, 39, -1, -1, -1, -1, -1,
03486 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
03487 55, 56, 57, -1, 59, 60, -1, 62, 63, 64,
03488 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03490 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03491 95, -1, 97, 98, 99, 100, 101, 102, 103, -1,
03492 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03493 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
03494 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
03495 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
03496 145, 18, 19, 20, 21, 22, 23, 24, -1, -1,
03497 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
03498 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
03499 -1, 48, 49, 50, 51, 52, 53, 54, 55, 56,
03500 57, -1, 59, 60, -1, 62, 63, 64, -1, 66,
03501 67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03502 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
03503 -1, -1, 89, 90, -1, 92, 93, -1, 95, -1,
03504 97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
03505 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03506 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1,
03507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03508 -1, -1, -1, -1, -1, -1, -1, -1, 145, 3,
03509 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
03510 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
03511 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
03512 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
03513 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
03514 54, 55, 56, 57, -1, -1, -1, -1, -1, -1,
03515 -1, -1, 66, 67, 68, 69, 70, 71, 72, 73,
03516 74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
03517 84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03518 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1,
03519 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
03520 114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
03521 124, -1, -1, -1, -1, -1, 3, 4, 5, -1,
03522 7, -1, -1, -1, 11, 12, -1, 141, 142, 16,
03523 -1, 18, 19, 20, 21, 22, 23, 24, -1, 26,
03524 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
03525 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
03526 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
03527 57, 58, 59, 60, -1, 62, 63, 64, -1, 66,
03528 67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03529 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
03530 -1, -1, 89, 90, -1, 92, 93, -1, 95, 96,
03531 97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
03532 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03533 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1,
03534 -1, -1, -1, 3, 4, 5, -1, 7, -1, 136,
03535 -1, 11, 12, -1, -1, 142, 16, -1, 18, 19,
03536 20, 21, 22, 23, 24, -1, 26, -1, -1, -1,
03537 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
03538 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
03539 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
03540 60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
03541 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03542 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
03543 90, -1, 92, 93, -1, 95, 96, 97, 98, 99,
03544 100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
03545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03546 -1, -1, 122, 123, 124, -1, -1, -1, -1, -1,
03547 3, 4, 5, -1, 7, -1, 136, -1, 11, 12,
03548 -1, -1, 142, 16, -1, 18, 19, 20, 21, 22,
03549 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03550 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03551 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03552 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
03553 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03554 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03555 -1, -1, -1, 86, 87, -1, 89, 90, -1, 92,
03556 93, -1, 95, 96, 97, 98, 99, 100, 101, 102,
03557 103, -1, -1, -1, -1, -1, 109, -1, -1, -1,
03558 -1, -1, -1, -1, 3, 4, 5, -1, 7, 122,
03559 123, 124, 11, 12, -1, -1, -1, 16, -1, 18,
03560 19, 20, 21, 22, 23, 24, -1, -1, -1, 142,
03561 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03562 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
03563 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
03564 59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
03565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03566 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03567 89, 90, -1, 92, 93, -1, 95, 96, 97, 98,
03568 99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
03569 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
03570 5, -1, 7, 122, 123, 124, 11, 12, -1, -1,
03571 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
03572 -1, -1, -1, 142, -1, 30, 31, 32, 33, 34,
03573 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
03574 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
03575 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
03576 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03578 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03579 95, 96, 97, 98, 99, 100, 101, 102, 103, -1,
03580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03581 -1, -1, -1, -1, -1, -1, -1, 122, 123, 124,
03582 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03583 -1, -1, -1, -1, -1, -1, -1, 142, 3, 4,
03584 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
03585 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
03586 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
03587 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
03588 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
03589 55, 56, 57, -1, -1, -1, -1, -1, -1, -1,
03590 -1, 66, 67, 68, 69, 70, 71, 72, 73, 74,
03591 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
03592 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03593 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03594 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
03595 115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
03596 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03597 -1, -1, -1, -1, -1, -1, 141, 3, 4, 5,
03598 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
03599 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
03600 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03601 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
03602 46, 47, 48, 49, 50, 51, 52, 53, 54, -1,
03603 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03604 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
03605 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
03606 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
03607 -1, -1, 98, -1, -1, -1, -1, -1, -1, -1,
03608 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
03609 116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
03610 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03611 -1, -1, -1, -1, -1, 141, 3, 4, 5, 6,
03612 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
03613 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
03614 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
03615 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
03616 47, 48, 49, 50, 51, 52, 53, -1, -1, 56,
03617 -1, -1, -1, -1, -1, -1, -1, -1, -1, 66,
03618 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
03619 77, 78, -1, -1, 81, 82, 83, 84, -1, -1,
03620 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1,
03621 -1, 98, -1, -1, -1, -1, -1, -1, -1, -1,
03622 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
03623 117, 118, 119, 120, 121, -1, 123, 124, -1, -1,
03624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03625 -1, -1, -1, -1, 141, 3, 4, 5, 6, 7,
03626 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
03627 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
03628 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
03629 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
03630 48, 49, 50, 51, 52, 53, -1, -1, 56, -1,
03631 -1, -1, -1, -1, -1, -1, -1, -1, 66, 67,
03632 68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
03633 78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
03634 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
03635 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03636 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
03637 118, 119, 120, 121, -1, 123, 124, -1, -1, 3,
03638 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
03639 -1, -1, 16, 141, 18, 19, 20, 21, 22, 23,
03640 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03641 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03642 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03643 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03644 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03646 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03647 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03648 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03649 -1, 3, 4, 5, -1, 7, -1, -1, 122, 11,
03650 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
03651 22, 23, 24, -1, -1, -1, 140, -1, 30, 31,
03652 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03653 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03654 52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
03655 62, 63, 64, -1, -1, -1, -1, -1, -1, -1,
03656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03657 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03658 92, 93, -1, -1, -1, 97, 98, 99, 100, 101,
03659 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03660 -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
03661 122, 11, 12, -1, -1, -1, 16, -1, 18, 19,
03662 20, 21, 22, 23, 24, -1, -1, -1, 140, -1,
03663 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
03664 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
03665 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
03666 60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
03667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03668 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
03669 90, -1, 92, 93, -1, 95, -1, 97, 98, 99,
03670 100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
03671 -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
03672 11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
03673 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03674 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03675 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
03676 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03677 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03678 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03679 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03680 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03681 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03682 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03683 12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
03684 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03685 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03686 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03687 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
03688 62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
03689 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03690 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03691 92, 93, -1, 95, 96, 97, 98, 99, 100, 101,
03692 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03693 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
03694 122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
03695 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03696 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03697 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03698 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
03699 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03700 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03701 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03702 93, -1, 95, 96, 97, 98, 99, 100, 101, 102,
03703 103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
03704 4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
03705 123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
03706 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03707 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03708 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03709 54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
03710 64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
03711 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03712 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03713 -1, 95, -1, 97, 98, 99, 100, 101, 102, 103,
03714 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
03715 5, -1, 7, -1, -1, -1, 11, 12, 122, 123,
03716 124, 16, -1, 18, 19, 20, 21, 22, 23, 24,
03717 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
03718 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
03719 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
03720 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
03721 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03722 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03723 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03724 -1, 96, 97, 98, 99, 100, 101, 102, 103, -1,
03725 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
03726 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124,
03727 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
03728 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03729 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
03730 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
03731 56, 57, 58, 59, 60, -1, 62, 63, 64, -1,
03732 66, 67, -1, -1, -1, -1, -1, -1, -1, -1,
03733 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03734 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03735 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03736 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
03737 7, -1, -1, -1, 11, 12, 122, 123, 124, 16,
03738 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
03739 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
03740 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
03741 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
03742 57, 58, 59, 60, -1, 62, 63, 64, -1, 66,
03743 67, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03744 -1, -1, -1, -1, -1, -1, -1, -1, -1, 86,
03745 -1, -1, 89, 90, -1, 92, 93, -1, -1, -1,
03746 97, 98, 99, 100, 101, 102, 103, -1, -1, -1,
03747 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
03748 -1, -1, -1, 11, 12, 122, 123, 124, 16, -1,
03749 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
03750 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
03751 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
03752 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
03753 -1, 59, 60, -1, 62, 63, 64, -1, 66, 67,
03754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03755 -1, -1, -1, -1, -1, -1, -1, -1, 86, -1,
03756 -1, 89, 90, -1, 92, 93, -1, 95, -1, 97,
03757 98, 99, 100, 101, 102, 103, -1, -1, -1, -1,
03758 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
03759 -1, -1, 11, 12, 122, 123, 124, 16, -1, 18,
03760 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
03761 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
03762 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
03763 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
03764 59, 60, -1, 62, 63, 64, -1, 66, 67, -1,
03765 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03766 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
03767 89, 90, -1, 92, 93, -1, 95, -1, 97, 98,
03768 99, 100, 101, 102, 103, -1, -1, -1, -1, -1,
03769 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
03770 -1, 11, 12, 122, 123, 124, 16, -1, 18, 19,
03771 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
03772 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
03773 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
03774 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
03775 60, -1, 62, 63, 64, -1, 66, 67, -1, -1,
03776 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03777 -1, -1, -1, -1, -1, -1, 86, -1, -1, 89,
03778 90, -1, 92, 93, -1, 95, -1, 97, 98, 99,
03779 100, 101, 102, 103, -1, -1, -1, -1, -1, -1,
03780 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03781 11, 12, 122, 123, 124, 16, -1, 18, 19, 20,
03782 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03783 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03784 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03785 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03786 -1, 62, 63, 64, -1, 66, 67, -1, -1, -1,
03787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03788 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03789 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03790 101, 102, 103, -1, -1, -1, -1, -1, -1, -1,
03791 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
03792 12, 122, 123, 124, 16, -1, 18, 19, 20, 21,
03793 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
03794 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
03795 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
03796 52, 53, 54, 55, 56, 57, -1, 59, 60, -1,
03797 62, 63, 64, -1, 66, 67, -1, -1, -1, -1,
03798 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03799 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
03800 92, 93, -1, 95, -1, 97, 98, 99, 100, 101,
03801 102, 103, -1, -1, -1, -1, -1, -1, -1, -1,
03802 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
03803 122, 123, 124, 16, -1, 18, 19, 20, 21, 22,
03804 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
03805 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
03806 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
03807 53, 54, 55, 56, 57, -1, 59, 60, -1, 62,
03808 63, 64, -1, 66, 67, -1, -1, -1, -1, -1,
03809 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03810 -1, -1, -1, 86, -1, -1, 89, 90, -1, 92,
03811 93, -1, -1, -1, 97, 98, 99, 100, 101, 102,
03812 103, -1, -1, -1, -1, -1, -1, -1, -1, 3,
03813 4, 5, -1, 7, -1, -1, -1, 11, 12, 122,
03814 123, 124, 16, -1, 18, 19, 20, 21, 22, 23,
03815 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
03816 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
03817 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
03818 54, 55, 56, 57, -1, 59, 60, -1, 62, 63,
03819 64, -1, 66, 67, -1, -1, -1, -1, -1, -1,
03820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03821 -1, -1, 86, -1, -1, 89, 90, -1, 92, 93,
03822 -1, -1, -1, 97, 98, 99, 100, 101, 102, 103,
03823 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
03824 5, -1, 7, -1, -1, -1, 11, 12, 122, 123,
03825 124, 16, -1, 18, 19, 20, 21, 22, 23, 24,
03826 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
03827 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
03828 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
03829 55, 56, 57, -1, 59, 60, -1, 62, 63, 64,
03830 -1, 66, 67, -1, -1, -1, -1, -1, -1, -1,
03831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03832 -1, 86, -1, -1, 89, 90, -1, 92, 93, -1,
03833 -1, -1, 97, 98, 99, 100, 101, 102, 103, -1,
03834 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
03835 -1, 7, -1, -1, -1, 11, 12, 122, 123, 124,
03836 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
03837 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03838 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
03839 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
03840 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03841 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03842 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03843 86, -1, -1, 89, 90, -1, 92, 93, -1, 95,
03844 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03845 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03846 11, 12, -1, -1, -1, 16, 122, 18, 19, 20,
03847 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03848 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03849 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03850 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03851 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1,
03852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03853 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03854 -1, 92, 93, -1, 95, -1, 97, 98, 99, 100,
03855 101, 102, 103, -1, -1, -1, -1, 3, 4, 5,
03856 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
03857 16, 122, 18, 19, 20, 21, 22, 23, 24, -1,
03858 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03859 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
03860 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
03861 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03863 -1, -1, -1, -1, -1, -1, -1, 83, -1, -1,
03864 86, -1, -1, 89, 90, -1, 92, 93, -1, -1,
03865 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03866 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03867 11, 12, -1, -1, -1, 16, 122, 18, 19, 20,
03868 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03869 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03870 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03871 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03872 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1,
03873 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03874 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03875 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100,
03876 101, 102, 103, -1, -1, -1, -1, 3, 4, 5,
03877 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
03878 16, 122, 18, 19, 20, 21, 22, 23, 24, -1,
03879 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03880 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
03881 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
03882 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03885 86, -1, -1, 89, 90, -1, 92, 93, -1, -1,
03886 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03887 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
03888 11, 12, -1, -1, -1, 16, 122, 18, 19, 20,
03889 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
03890 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
03891 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
03892 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
03893 -1, 62, 63, 64, -1, -1, -1, -1, -1, -1,
03894 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03895 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
03896 -1, 92, 93, -1, -1, -1, 97, 98, 99, 100,
03897 101, 102, 103, -1, -1, -1, -1, 3, 4, 5,
03898 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
03899 16, 122, 18, 19, 20, 21, 22, 23, 24, -1,
03900 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
03901 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
03902 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
03903 56, 57, -1, 59, 60, -1, 62, 63, 64, -1,
03904 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03905 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03906 86, -1, -1, 89, 90, -1, 92, 93, -1, -1,
03907 -1, 97, 98, 99, 100, 101, 102, 103, -1, -1,
03908 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
03909 -1, -1, -1, -1, -1, -1, 122, 66, 67, 68,
03910 69, 70, 71, 72, 73, 74, -1, -1, 77, 78,
03911 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1,
03912 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1,
03913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03914 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118,
03915 119, 120, 121, -1, 123, 124, -1, -1, -1, -1,
03916 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
03917 -1, -1, 141, 142, 66, 67, 68, 69, 70, 71,
03918 72, 73, 74, -1, -1, 77, 78, -1, -1, 81,
03919 82, 83, 84, -1, -1, -1, -1, -1, -1, -1,
03920 -1, -1, -1, 95, -1, -1, -1, -1, -1, -1,
03921 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03922 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
03923 -1, 123, 124, -1, -1, -1, -1, 52, 53, -1,
03924 -1, 56, -1, -1, -1, -1, -1, -1, -1, 141,
03925 142, 66, 67, 68, 69, 70, 71, 72, 73, 74,
03926 -1, -1, 77, 78, -1, -1, 81, 82, 83, 84,
03927 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03928 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03929 -1, -1, -1, -1, -1, -1, -1, 112, 113, 114,
03930 115, 116, 117, 118, 119, 120, 121, -1, 123, 124,
03931 -1, -1, -1, -1, 52, 53, -1, -1, 56, -1,
03932 -1, -1, -1, -1, -1, -1, 141, 142, 66, 67,
03933 68, 69, 70, 71, 72, 73, 74, -1, -1, 77,
03934 78, -1, -1, 81, 82, 83, 84, -1, -1, -1,
03935 -1, -1, -1, -1, -1, -1, -1, 95, -1, -1,
03936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03937 -1, -1, -1, -1, 112, 113, 114, 115, 116, 117,
03938 118, 119, 120, 121, -1, 123, 124, -1, -1, -1,
03939 -1, 52, 53, -1, -1, 56, -1, -1, -1, -1,
03940 -1, -1, -1, 141, 142, 66, 67, 68, 69, 70,
03941 71, 72, 73, 74, -1, -1, 77, 78, -1, -1,
03942 81, 82, 83, 84, -1, -1, -1, -1, -1, -1,
03943 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
03944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03945 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
03946 121, -1, 123, 124, -1, -1, -1, -1, 52, 53,
03947 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
03948 141, 142, 66, 67, 68, 69, 70, 71, 72, 73,
03949 74, -1, -1, 77, 78, -1, -1, 81, 82, 83,
03950 84, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03951 -1, 95, -1, -1, -1, -1, -1, -1, -1, -1,
03952 -1, -1, -1, -1, -1, -1, -1, -1, 112, 113,
03953 114, 115, 116, 117, 118, 119, 120, 121, -1, 123,
03954 124, -1, -1, -1, -1, 52, 53, -1, -1, 56,
03955 -1, -1, -1, -1, -1, -1, -1, 141, 142, 66,
03956 67, 68, 69, 70, 71, 72, 73, 74, -1, -1,
03957 77, 78, -1, -1, 81, 82, 83, 84, -1, -1,
03958 -1, -1, -1, -1, -1, -1, -1, -1, 95, -1,
03959 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03960 -1, -1, -1, -1, -1, 112, 113, 114, 115, 116,
03961 117, 118, 119, 120, 121, -1, 123, 124, -1, -1,
03962 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1,
03963 -1, -1, -1, -1, 141, 142, 66, 67, 68, 69,
03964 70, 71, 72, 73, 74, -1, -1, 77, 78, -1,
03965 -1, 81, 82, 83, 84, -1, -1, -1, -1, -1,
03966 -1, -1, -1, -1, -1, 95, -1, -1, -1, -1,
03967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03968 -1, -1, 112, 113, 114, 115, 116, 117, 118, 119,
03969 120, 121, -1, 123, 124, -1, -1, -1, -1, 52,
03970 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
03971 -1, 141, 142, 66, 67, 68, 69, 70, 71, 72,
03972 73, 74, -1, -1, 77, 78, -1, -1, 81, 82,
03973 83, 84, -1, -1, -1, -1, -1, -1, -1, -1,
03974 -1, -1, 95, -1, -1, -1, -1, -1, -1, -1,
03975 -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
03976 113, 114, 115, 116, 117, 118, 119, 120, 121, -1,
03977 123, 124, -1, -1, -1, -1, 52, 53, -1, -1,
03978 56, -1, -1, -1, -1, -1, -1, -1, 141, 142,
03979 66, 67, 68, 69, 70, 71, 72, 73, 74, -1,
03980 -1, 77, 78, -1, -1, 81, 82, 83, 84, -1,
03981 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
03982 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
03983 -1, -1, -1, -1, -1, -1, 112, 113, 114, 115,
03984 116, 117, 118, 119, 120, 121, -1, 123, 124, -1,
03985 -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
03986 -1, -1, -1, -1, -1, 141, 142, 66, 67, 68,
03987 69, 70, 71, 72, 73, 74, -1, -1, 77, 78,
03988 -1, -1, 81, 82, 83, 84, -1, -1, -1, -1,
03989 -1, -1, -1, -1, -1, -1, 95, -1, -1, -1,
03990 -1, -1, -1, -1, 44, -1, -1, -1, -1, -1,
03991 -1, -1, -1, 112, 113, 114, 115, 116, 117, 118,
03992 119, 120, 121, 44, 123, 124, -1, -1, 68, 69,
03993 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
03994 80, -1, 141, 83, 84, -1, -1, 68, 69, 70,
03995 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
03996 -1, -1, 83, 84, -1, -1, -1, -1, -1, -1,
03997 110, -1, 112, 113, 114, 115, 116, 117, 118, 119,
03998 120, 121, -1, -1, -1, -1, -1, -1, -1, 110,
03999 -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
04000 121
04001 };
04002
04003
04004
04005 static const yytype_uint16 yystos[] =
04006 {
04007 0, 149, 150, 0, 1, 3, 4, 5, 6, 7,
04008 11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
04009 30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
04010 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
04011 57, 59, 60, 62, 63, 64, 66, 67, 86, 89,
04012 90, 92, 93, 95, 97, 98, 99, 100, 101, 102,
04013 103, 122, 123, 124, 151, 152, 153, 158, 160, 162,
04014 163, 166, 167, 169, 170, 171, 173, 174, 184, 198,
04015 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
04016 225, 248, 249, 259, 260, 261, 262, 263, 264, 265,
04017 268, 278, 280, 281, 282, 283, 284, 285, 308, 319,
04018 153, 3, 4, 5, 6, 7, 8, 9, 10, 11,
04019 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
04020 22, 23, 24, 25, 26, 30, 31, 32, 33, 34,
04021 35, 36, 37, 38, 39, 45, 46, 47, 48, 49,
04022 50, 51, 52, 53, 56, 66, 67, 68, 69, 70,
04023 71, 72, 73, 74, 77, 78, 81, 82, 83, 84,
04024 95, 112, 113, 114, 115, 116, 117, 118, 119, 120,
04025 121, 123, 124, 141, 177, 178, 179, 180, 182, 183,
04026 278, 280, 39, 58, 86, 89, 95, 96, 123, 166,
04027 174, 184, 186, 191, 194, 196, 215, 282, 284, 285,
04028 306, 307, 191, 191, 142, 192, 193, 142, 188, 192,
04029 142, 147, 313, 54, 179, 313, 154, 136, 21, 22,
04030 30, 31, 32, 184, 215, 308, 184, 56, 1, 89,
04031 156, 157, 158, 168, 169, 319, 160, 187, 196, 306,
04032 319, 186, 305, 306, 319, 46, 86, 122, 140, 173,
04033 198, 215, 282, 285, 241, 242, 54, 55, 57, 177,
04034 271, 279, 270, 271, 272, 146, 266, 146, 269, 59,
04035 60, 162, 184, 184, 145, 147, 312, 317, 318, 40,
04036 41, 42, 43, 44, 37, 38, 28, 246, 109, 140,
04037 89, 95, 170, 109, 68, 69, 70, 71, 72, 73,
04038 74, 75, 76, 77, 78, 79, 80, 83, 84, 110,
04039 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
04040 85, 138, 139, 199, 160, 161, 161, 202, 204, 161,
04041 312, 318, 86, 167, 174, 215, 231, 282, 285, 52,
04042 56, 83, 86, 175, 176, 215, 282, 285, 176, 33,
04043 34, 35, 36, 49, 50, 51, 52, 56, 142, 177,
04044 283, 303, 85, 139, 26, 136, 250, 262, 87, 87,
04045 188, 192, 250, 140, 186, 56, 186, 186, 109, 88,
04046 140, 195, 319, 85, 138, 139, 87, 87, 140, 195,
04047 191, 313, 314, 191, 190, 191, 319, 160, 314, 160,
04048 54, 63, 64, 159, 142, 185, 136, 156, 85, 139,
04049 87, 158, 168, 143, 312, 318, 314, 200, 144, 140,
04050 147, 316, 140, 316, 137, 316, 313, 56, 59, 60,
04051 170, 172, 140, 85, 138, 139, 243, 61, 104, 105,
04052 106, 273, 106, 273, 106, 65, 273, 106, 106, 267,
04053 273, 106, 61, 106, 68, 68, 145, 153, 161, 161,
04054 161, 161, 158, 160, 160, 247, 95, 162, 186, 196,
04055 197, 168, 140, 173, 140, 162, 184, 186, 197, 184,
04056 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
04057 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
04058 184, 184, 184, 184, 184, 52, 53, 56, 182, 188,
04059 309, 310, 190, 52, 53, 56, 182, 188, 309, 155,
04060 156, 13, 227, 317, 227, 161, 161, 312, 17, 253,
04061 56, 85, 138, 139, 25, 160, 52, 56, 175, 1,
04062 113, 286, 317, 85, 138, 139, 211, 304, 212, 85,
04063 139, 311, 52, 56, 309, 309, 252, 251, 162, 184,
04064 162, 184, 94, 164, 181, 184, 186, 95, 186, 194,
04065 306, 52, 56, 190, 52, 56, 307, 314, 143, 314,
04066 314, 179, 201, 184, 151, 137, 309, 309, 184, 314,
04067 158, 314, 306, 140, 172, 52, 56, 190, 52, 56,
04068 52, 54, 55, 56, 57, 89, 95, 96, 116, 119,
04069 142, 244, 289, 290, 291, 292, 293, 294, 297, 298,
04070 299, 300, 301, 275, 274, 146, 273, 146, 184, 184,
04071 76, 114, 236, 237, 319, 186, 140, 314, 172, 140,
04072 44, 313, 87, 87, 188, 192, 313, 315, 87, 87,
04073 188, 189, 192, 319, 10, 226, 8, 255, 319, 156,
04074 13, 156, 27, 228, 317, 228, 253, 196, 226, 52,
04075 56, 190, 52, 56, 206, 209, 317, 287, 208, 52,
04076 56, 175, 190, 155, 160, 142, 288, 289, 213, 189,
04077 192, 189, 192, 236, 236, 44, 165, 179, 186, 195,
04078 87, 87, 315, 87, 87, 160, 137, 316, 170, 315,
04079 109, 52, 89, 95, 232, 233, 234, 291, 289, 29,
04080 107, 245, 140, 302, 319, 140, 302, 52, 140, 302,
04081 52, 276, 54, 55, 57, 277, 285, 52, 145, 235,
04082 238, 293, 295, 296, 299, 301, 319, 156, 95, 186,
04083 172, 184, 111, 162, 184, 162, 184, 164, 144, 87,
04084 162, 184, 162, 184, 164, 186, 197, 256, 319, 15,
04085 230, 319, 14, 229, 230, 230, 203, 205, 226, 140,
04086 227, 315, 161, 317, 161, 155, 315, 226, 314, 289,
04087 155, 317, 177, 156, 156, 184, 236, 87, 314, 186,
04088 234, 140, 291, 140, 314, 238, 156, 156, 292, 297,
04089 299, 301, 293, 294, 299, 293, 156, 109, 52, 239,
04090 240, 290, 238, 114, 140, 302, 140, 302, 140, 302,
04091 10, 186, 184, 162, 184, 88, 257, 319, 156, 9,
04092 258, 319, 161, 226, 226, 156, 156, 186, 156, 228,
04093 210, 317, 226, 314, 226, 214, 10, 137, 156, 314,
04094 233, 140, 95, 232, 314, 10, 137, 140, 302, 140,
04095 302, 140, 302, 140, 302, 302, 137, 86, 215, 140,
04096 114, 296, 299, 293, 295, 299, 293, 86, 174, 215,
04097 282, 285, 227, 156, 227, 226, 226, 230, 253, 254,
04098 207, 155, 288, 137, 140, 233, 140, 291, 293, 299,
04099 293, 293, 56, 85, 240, 140, 302, 140, 302, 302,
04100 140, 302, 302, 56, 85, 138, 139, 156, 156, 156,
04101 226, 155, 233, 140, 302, 140, 302, 302, 302, 52,
04102 56, 293, 299, 293, 293, 52, 56, 190, 52, 56,
04103 255, 229, 226, 226, 233, 293, 302, 140, 302, 302,
04104 302, 315, 302, 293, 302
04105 };
04106
04107 #define yyerrok (yyerrstatus = 0)
04108 #define yyclearin (yychar = YYEMPTY)
04109 #define YYEMPTY (-2)
04110 #define YYEOF 0
04111
04112 #define YYACCEPT goto yyacceptlab
04113 #define YYABORT goto yyabortlab
04114 #define YYERROR goto yyerrorlab
04115
04116
04117
04118
04119
04120
04121
04122
04123
04124 #define YYFAIL goto yyerrlab
04125 #if defined YYFAIL
04126
04127
04128
04129
04130 #endif
04131
04132 #define YYRECOVERING() (!!yyerrstatus)
04133
04134 #define YYBACKUP(Token, Value) \
04135 do \
04136 if (yychar == YYEMPTY && yylen == 1) \
04137 { \
04138 yychar = (Token); \
04139 yylval = (Value); \
04140 yytoken = YYTRANSLATE (yychar); \
04141 YYPOPSTACK (1); \
04142 goto yybackup; \
04143 } \
04144 else \
04145 { \
04146 parser_yyerror (parser, YY_("syntax error: cannot back up")); \
04147 YYERROR; \
04148 } \
04149 while (YYID (0))
04150
04151
04152 #define YYTERROR 1
04153 #define YYERRCODE 256
04154
04155
04156
04157
04158
04159
04160 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
04161 #ifndef YYLLOC_DEFAULT
04162 # define YYLLOC_DEFAULT(Current, Rhs, N) \
04163 do \
04164 if (YYID (N)) \
04165 { \
04166 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
04167 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
04168 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
04169 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
04170 } \
04171 else \
04172 { \
04173 (Current).first_line = (Current).last_line = \
04174 YYRHSLOC (Rhs, 0).last_line; \
04175 (Current).first_column = (Current).last_column = \
04176 YYRHSLOC (Rhs, 0).last_column; \
04177 } \
04178 while (YYID (0))
04179 #endif
04180
04181
04182
04183
04184
04185
04186 #ifndef YY_LOCATION_PRINT
04187 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
04188 # define YY_LOCATION_PRINT(File, Loc) \
04189 fprintf (File, "%d.%d-%d.%d", \
04190 (Loc).first_line, (Loc).first_column, \
04191 (Loc).last_line, (Loc).last_column)
04192 # else
04193 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
04194 # endif
04195 #endif
04196
04197
04198
04199
04200 #ifdef YYLEX_PARAM
04201 # define YYLEX yylex (&yylval, YYLEX_PARAM)
04202 #else
04203 # define YYLEX yylex (&yylval)
04204 #endif
04205
04206
04207 #if YYDEBUG
04208
04209 # ifndef YYFPRINTF
04210 # include <stdio.h>
04211 # define YYFPRINTF fprintf
04212 # endif
04213
04214 # define YYDPRINTF(Args) \
04215 do { \
04216 if (yydebug) \
04217 YYFPRINTF Args; \
04218 } while (YYID (0))
04219
04220 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
04221 do { \
04222 if (yydebug) \
04223 { \
04224 YYFPRINTF (stderr, "%s ", Title); \
04225 yy_symbol_print (stderr, \
04226 Type, Value, parser); \
04227 YYFPRINTF (stderr, "\n"); \
04228 } \
04229 } while (YYID (0))
04230
04231
04232
04233
04234
04235
04236
04237 #if (defined __STDC__ || defined __C99__FUNC__ \
04238 || defined __cplusplus || defined _MSC_VER)
04239 static void
04240 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
04241 #else
04242 static void
04243 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser)
04244 FILE *yyoutput;
04245 int yytype;
04246 YYSTYPE const * const yyvaluep;
04247 struct parser_params *parser;
04248 #endif
04249 {
04250 if (!yyvaluep)
04251 return;
04252 YYUSE (parser);
04253 # ifdef YYPRINT
04254 if (yytype < YYNTOKENS)
04255 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
04256 # else
04257 YYUSE (yyoutput);
04258 # endif
04259 switch (yytype)
04260 {
04261 default:
04262 break;
04263 }
04264 }
04265
04266
04267
04268
04269
04270
04271 #if (defined __STDC__ || defined __C99__FUNC__ \
04272 || defined __cplusplus || defined _MSC_VER)
04273 static void
04274 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct parser_params *parser)
04275 #else
04276 static void
04277 yy_symbol_print (yyoutput, yytype, yyvaluep, parser)
04278 FILE *yyoutput;
04279 int yytype;
04280 YYSTYPE const * const yyvaluep;
04281 struct parser_params *parser;
04282 #endif
04283 {
04284 if (yytype < YYNTOKENS)
04285 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
04286 else
04287 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
04288
04289 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
04290 YYFPRINTF (yyoutput, ")");
04291 }
04292
04293
04294
04295
04296
04297
04298 #if (defined __STDC__ || defined __C99__FUNC__ \
04299 || defined __cplusplus || defined _MSC_VER)
04300 static void
04301 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
04302 #else
04303 static void
04304 yy_stack_print (yybottom, yytop)
04305 yytype_int16 *yybottom;
04306 yytype_int16 *yytop;
04307 #endif
04308 {
04309 YYFPRINTF (stderr, "Stack now");
04310 for (; yybottom <= yytop; yybottom++)
04311 {
04312 int yybot = *yybottom;
04313 YYFPRINTF (stderr, " %d", yybot);
04314 }
04315 YYFPRINTF (stderr, "\n");
04316 }
04317
04318 # define YY_STACK_PRINT(Bottom, Top) \
04319 do { \
04320 if (yydebug) \
04321 yy_stack_print ((Bottom), (Top)); \
04322 } while (YYID (0))
04323
04324
04325
04326
04327
04328
04329 #if (defined __STDC__ || defined __C99__FUNC__ \
04330 || defined __cplusplus || defined _MSC_VER)
04331 static void
04332 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct parser_params *parser)
04333 #else
04334 static void
04335 yy_reduce_print (yyvsp, yyrule, parser)
04336 YYSTYPE *yyvsp;
04337 int yyrule;
04338 struct parser_params *parser;
04339 #endif
04340 {
04341 int yynrhs = yyr2[yyrule];
04342 int yyi;
04343 unsigned long int yylno = yyrline[yyrule];
04344 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
04345 yyrule - 1, yylno);
04346
04347 for (yyi = 0; yyi < yynrhs; yyi++)
04348 {
04349 YYFPRINTF (stderr, " $%d = ", yyi + 1);
04350 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
04351 &(yyvsp[(yyi + 1) - (yynrhs)])
04352 , parser);
04353 YYFPRINTF (stderr, "\n");
04354 }
04355 }
04356
04357 # define YY_REDUCE_PRINT(Rule) \
04358 do { \
04359 if (yydebug) \
04360 yy_reduce_print (yyvsp, Rule, parser); \
04361 } while (YYID (0))
04362
04363
04364
04365 #ifndef yydebug
04366 int yydebug;
04367 #endif
04368 #else
04369 # define YYDPRINTF(Args)
04370 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
04371 # define YY_STACK_PRINT(Bottom, Top)
04372 # define YY_REDUCE_PRINT(Rule)
04373 #endif
04374
04375
04376
04377 #ifndef YYINITDEPTH
04378 # define YYINITDEPTH 200
04379 #endif
04380
04381
04382
04383
04384
04385
04386
04387
04388 #ifndef YYMAXDEPTH
04389 # define YYMAXDEPTH 10000
04390 #endif
04391
04392
04393
04394 #if YYERROR_VERBOSE
04395
04396 # ifndef yystrlen
04397 # if defined __GLIBC__ && defined _STRING_H
04398 # define yystrlen strlen
04399 # else
04400
04401 #if (defined __STDC__ || defined __C99__FUNC__ \
04402 || defined __cplusplus || defined _MSC_VER)
04403 static YYSIZE_T
04404 yystrlen (const char *yystr)
04405 #else
04406 static YYSIZE_T
04407 yystrlen (yystr)
04408 const char *yystr;
04409 #endif
04410 {
04411 YYSIZE_T yylen;
04412 for (yylen = 0; yystr[yylen]; yylen++)
04413 continue;
04414 return yylen;
04415 }
04416 # endif
04417 # endif
04418
04419 # ifndef yystpcpy
04420 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
04421 # define yystpcpy stpcpy
04422 # else
04423
04424
04425 #if (defined __STDC__ || defined __C99__FUNC__ \
04426 || defined __cplusplus || defined _MSC_VER)
04427 static char *
04428 yystpcpy (char *yydest, const char *yysrc)
04429 #else
04430 static char *
04431 yystpcpy (yydest, yysrc)
04432 char *yydest;
04433 const char *yysrc;
04434 #endif
04435 {
04436 char *yyd = yydest;
04437 const char *yys = yysrc;
04438
04439 while ((*yyd++ = *yys++) != '\0')
04440 continue;
04441
04442 return yyd - 1;
04443 }
04444 # endif
04445 # endif
04446
04447 # ifndef yytnamerr
04448
04449
04450
04451
04452
04453
04454
04455 static YYSIZE_T
04456 yytnamerr (char *yyres, const char *yystr)
04457 {
04458 if (*yystr == '"')
04459 {
04460 YYSIZE_T yyn = 0;
04461 char const *yyp = yystr;
04462
04463 for (;;)
04464 switch (*++yyp)
04465 {
04466 case '\'':
04467 case ',':
04468 goto do_not_strip_quotes;
04469
04470 case '\\':
04471 if (*++yyp != '\\')
04472 goto do_not_strip_quotes;
04473
04474 default:
04475 if (yyres)
04476 yyres[yyn] = *yyp;
04477 yyn++;
04478 break;
04479
04480 case '"':
04481 if (yyres)
04482 yyres[yyn] = '\0';
04483 return yyn;
04484 }
04485 do_not_strip_quotes: ;
04486 }
04487
04488 if (! yyres)
04489 return yystrlen (yystr);
04490
04491 return yystpcpy (yyres, yystr) - yyres;
04492 }
04493 # endif
04494
04495
04496
04497
04498
04499
04500
04501
04502 static YYSIZE_T
04503 yysyntax_error (char *yyresult, int yystate, int yychar)
04504 {
04505 int yyn = yypact[yystate];
04506
04507 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
04508 return 0;
04509 else
04510 {
04511 int yytype = YYTRANSLATE (yychar);
04512 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
04513 YYSIZE_T yysize = yysize0;
04514 YYSIZE_T yysize1;
04515 int yysize_overflow = 0;
04516 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
04517 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
04518 int yyx;
04519
04520 # if 0
04521
04522
04523 YY_("syntax error, unexpected %s");
04524 YY_("syntax error, unexpected %s, expecting %s");
04525 YY_("syntax error, unexpected %s, expecting %s or %s");
04526 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
04527 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
04528 # endif
04529 char *yyfmt;
04530 char const *yyf;
04531 static char const yyunexpected[] = "syntax error, unexpected %s";
04532 static char const yyexpecting[] = ", expecting %s";
04533 static char const yyor[] = " or %s";
04534 char yyformat[sizeof yyunexpected
04535 + sizeof yyexpecting - 1
04536 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
04537 * (sizeof yyor - 1))];
04538 char const *yyprefix = yyexpecting;
04539
04540
04541
04542 int yyxbegin = yyn < 0 ? -yyn : 0;
04543
04544
04545 int yychecklim = YYLAST - yyn + 1;
04546 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
04547 int yycount = 1;
04548
04549 yyarg[0] = yytname[yytype];
04550 yyfmt = yystpcpy (yyformat, yyunexpected);
04551
04552 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
04553 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
04554 {
04555 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
04556 {
04557 yycount = 1;
04558 yysize = yysize0;
04559 yyformat[sizeof yyunexpected - 1] = '\0';
04560 break;
04561 }
04562 yyarg[yycount++] = yytname[yyx];
04563 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
04564 yysize_overflow |= (yysize1 < yysize);
04565 yysize = yysize1;
04566 yyfmt = yystpcpy (yyfmt, yyprefix);
04567 yyprefix = yyor;
04568 }
04569
04570 yyf = YY_(yyformat);
04571 yysize1 = yysize + yystrlen (yyf);
04572 yysize_overflow |= (yysize1 < yysize);
04573 yysize = yysize1;
04574
04575 if (yysize_overflow)
04576 return YYSIZE_MAXIMUM;
04577
04578 if (yyresult)
04579 {
04580
04581
04582
04583 char *yyp = yyresult;
04584 int yyi = 0;
04585 while ((*yyp = *yyf) != '\0')
04586 {
04587 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
04588 {
04589 yyp += yytnamerr (yyp, yyarg[yyi++]);
04590 yyf += 2;
04591 }
04592 else
04593 {
04594 yyp++;
04595 yyf++;
04596 }
04597 }
04598 }
04599 return yysize;
04600 }
04601 }
04602 #endif
04603
04604
04605
04606
04607
04608
04609
04610 #if (defined __STDC__ || defined __C99__FUNC__ \
04611 || defined __cplusplus || defined _MSC_VER)
04612 static void
04613 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct parser_params *parser)
04614 #else
04615 static void
04616 yydestruct (yymsg, yytype, yyvaluep, parser)
04617 const char *yymsg;
04618 int yytype;
04619 YYSTYPE *yyvaluep;
04620 struct parser_params *parser;
04621 #endif
04622 {
04623 YYUSE (yyvaluep);
04624 YYUSE (parser);
04625
04626 if (!yymsg)
04627 yymsg = "Deleting";
04628 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
04629
04630 switch (yytype)
04631 {
04632
04633 default:
04634 break;
04635 }
04636 }
04637
04638
04639 #ifdef YYPARSE_PARAM
04640 #if defined __STDC__ || defined __cplusplus
04641 int yyparse (void *YYPARSE_PARAM);
04642 #else
04643 int yyparse ();
04644 #endif
04645 #else
04646 #if defined __STDC__ || defined __cplusplus
04647 int yyparse (struct parser_params *parser);
04648 #else
04649 int yyparse ();
04650 #endif
04651 #endif
04652
04653
04654
04655
04656
04657
04658
04659
04660
04661 #ifdef YYPARSE_PARAM
04662 #if (defined __STDC__ || defined __C99__FUNC__ \
04663 || defined __cplusplus || defined _MSC_VER)
04664 int
04665 yyparse (void *YYPARSE_PARAM)
04666 #else
04667 int
04668 yyparse (YYPARSE_PARAM)
04669 void *YYPARSE_PARAM;
04670 #endif
04671 #else
04672 #if (defined __STDC__ || defined __C99__FUNC__ \
04673 || defined __cplusplus || defined _MSC_VER)
04674 int
04675 yyparse (struct parser_params *parser)
04676 #else
04677 int
04678 yyparse (parser)
04679 struct parser_params *parser;
04680 #endif
04681 #endif
04682 {
04683
04684 int yychar;
04685
04686
04687 YYSTYPE yylval;
04688
04689
04690 int yynerrs;
04691
04692 int yystate;
04693
04694 int yyerrstatus;
04695
04696
04697
04698
04699
04700
04701
04702
04703
04704 yytype_int16 yyssa[YYINITDEPTH];
04705 yytype_int16 *yyss;
04706 yytype_int16 *yyssp;
04707
04708
04709 YYSTYPE yyvsa[YYINITDEPTH];
04710 YYSTYPE *yyvs;
04711 YYSTYPE *yyvsp;
04712
04713 YYSIZE_T yystacksize;
04714
04715 int yyn;
04716 int yyresult;
04717
04718 int yytoken;
04719
04720
04721 YYSTYPE yyval;
04722
04723 #if YYERROR_VERBOSE
04724
04725 char yymsgbuf[128];
04726 char *yymsg = yymsgbuf;
04727 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
04728 #endif
04729
04730 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
04731
04732
04733
04734 int yylen = 0;
04735
04736 yytoken = 0;
04737 yyss = yyssa;
04738 yyvs = yyvsa;
04739 yystacksize = YYINITDEPTH;
04740
04741 YYDPRINTF ((stderr, "Starting parse\n"));
04742
04743 yystate = 0;
04744 yyerrstatus = 0;
04745 yynerrs = 0;
04746 yychar = YYEMPTY;
04747
04748
04749
04750
04751
04752 yyssp = yyss;
04753 yyvsp = yyvs;
04754
04755 goto yysetstate;
04756
04757
04758
04759
04760 yynewstate:
04761
04762
04763 yyssp++;
04764
04765 yysetstate:
04766 *yyssp = yystate;
04767
04768 if (yyss + yystacksize - 1 <= yyssp)
04769 {
04770
04771 YYSIZE_T yysize = yyssp - yyss + 1;
04772
04773 #ifdef yyoverflow
04774 {
04775
04776
04777
04778 YYSTYPE *yyvs1 = yyvs;
04779 yytype_int16 *yyss1 = yyss;
04780
04781
04782
04783
04784
04785 yyoverflow (YY_("memory exhausted"),
04786 &yyss1, yysize * sizeof (*yyssp),
04787 &yyvs1, yysize * sizeof (*yyvsp),
04788 &yystacksize);
04789
04790 yyss = yyss1;
04791 yyvs = yyvs1;
04792 }
04793 #else
04794 # ifndef YYSTACK_RELOCATE
04795 goto yyexhaustedlab;
04796 # else
04797
04798 if (YYMAXDEPTH <= yystacksize)
04799 goto yyexhaustedlab;
04800 yystacksize *= 2;
04801 if (YYMAXDEPTH < yystacksize)
04802 yystacksize = YYMAXDEPTH;
04803
04804 {
04805 yytype_int16 *yyss1 = yyss;
04806 union yyalloc *yyptr =
04807 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
04808 if (! yyptr)
04809 goto yyexhaustedlab;
04810 YYSTACK_RELOCATE (yyss_alloc, yyss);
04811 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
04812 # undef YYSTACK_RELOCATE
04813 if (yyss1 != yyssa)
04814 YYSTACK_FREE (yyss1);
04815 }
04816 # endif
04817 #endif
04818
04819 yyssp = yyss + yysize - 1;
04820 yyvsp = yyvs + yysize - 1;
04821
04822 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
04823 (unsigned long int) yystacksize));
04824
04825 if (yyss + yystacksize - 1 <= yyssp)
04826 YYABORT;
04827 }
04828
04829 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
04830
04831 if (yystate == YYFINAL)
04832 YYACCEPT;
04833
04834 goto yybackup;
04835
04836
04837
04838
04839 yybackup:
04840
04841
04842
04843
04844
04845 yyn = yypact[yystate];
04846 if (yyn == YYPACT_NINF)
04847 goto yydefault;
04848
04849
04850
04851
04852 if (yychar == YYEMPTY)
04853 {
04854 YYDPRINTF ((stderr, "Reading a token: "));
04855 yychar = YYLEX;
04856 }
04857
04858 if (yychar <= YYEOF)
04859 {
04860 yychar = yytoken = YYEOF;
04861 YYDPRINTF ((stderr, "Now at end of input.\n"));
04862 }
04863 else
04864 {
04865 yytoken = YYTRANSLATE (yychar);
04866 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
04867 }
04868
04869
04870
04871 yyn += yytoken;
04872 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
04873 goto yydefault;
04874 yyn = yytable[yyn];
04875 if (yyn <= 0)
04876 {
04877 if (yyn == 0 || yyn == YYTABLE_NINF)
04878 goto yyerrlab;
04879 yyn = -yyn;
04880 goto yyreduce;
04881 }
04882
04883
04884
04885 if (yyerrstatus)
04886 yyerrstatus--;
04887
04888
04889 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
04890
04891
04892 yychar = YYEMPTY;
04893
04894 yystate = yyn;
04895 *++yyvsp = yylval;
04896
04897 goto yynewstate;
04898
04899
04900
04901
04902
04903 yydefault:
04904 yyn = yydefact[yystate];
04905 if (yyn == 0)
04906 goto yyerrlab;
04907 goto yyreduce;
04908
04909
04910
04911
04912
04913 yyreduce:
04914
04915 yylen = yyr2[yyn];
04916
04917
04918
04919
04920
04921
04922
04923
04924
04925 yyval = yyvsp[1-yylen];
04926
04927
04928 YY_REDUCE_PRINT (yyn);
04929 switch (yyn)
04930 {
04931 case 2:
04932
04933
04934 #line 786 "ripper.y"
04935 {
04936 lex_state = EXPR_BEG;
04937 #if 0
04938 local_push(compile_for_eval || rb_parse_in_main());
04939 #endif
04940 local_push(0);
04941
04942 ;}
04943 break;
04944
04945 case 3:
04946
04947
04948 #line 795 "ripper.y"
04949 {
04950 #if 0
04951 if ((yyvsp[(2) - (2)].val) && !compile_for_eval) {
04952
04953 if (nd_type((yyvsp[(2) - (2)].val)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].val));
04954 else {
04955 NODE *node = (yyvsp[(2) - (2)].val);
04956 while (node->nd_next) {
04957 node = node->nd_next;
04958 }
04959 void_expr(node->nd_head);
04960 }
04961 }
04962 ruby_eval_tree = NEW_SCOPE(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].val)));
04963 #endif
04964 (yyval.val) = (yyvsp[(2) - (2)].val);
04965 parser->result = dispatch1(program, (yyval.val));
04966
04967 local_pop();
04968 ;}
04969 break;
04970
04971 case 4:
04972
04973
04974 #line 818 "ripper.y"
04975 {
04976 #if 0
04977 void_stmts((yyvsp[(1) - (2)].val));
04978 fixup_nodes(&deferred_nodes);
04979 #endif
04980
04981 (yyval.val) = (yyvsp[(1) - (2)].val);
04982 ;}
04983 break;
04984
04985 case 5:
04986
04987
04988 #line 829 "ripper.y"
04989 {
04990 #if 0
04991 (yyval.val) = NEW_BEGIN(0);
04992 #endif
04993 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new),
04994 dispatch0(void_stmt));
04995
04996 ;}
04997 break;
04998
04999 case 6:
05000
05001
05002 #line 838 "ripper.y"
05003 {
05004 #if 0
05005 (yyval.val) = newline_node((yyvsp[(1) - (1)].val));
05006 #endif
05007 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val));
05008
05009 ;}
05010 break;
05011
05012 case 7:
05013
05014
05015 #line 846 "ripper.y"
05016 {
05017 #if 0
05018 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val)));
05019 #endif
05020 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05021
05022 ;}
05023 break;
05024
05025 case 8:
05026
05027
05028 #line 854 "ripper.y"
05029 {
05030 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val));
05031 ;}
05032 break;
05033
05034 case 10:
05035
05036
05037 #line 861 "ripper.y"
05038 {
05039 if (in_def || in_single) {
05040 yyerror("BEGIN in method");
05041 }
05042 #if 0
05043
05044 #endif
05045
05046 ;}
05047 break;
05048
05049 case 11:
05050
05051
05052 #line 871 "ripper.y"
05053 {
05054 #if 0
05055 ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
05056 (yyvsp[(4) - (5)].val));
05057
05058
05059 (yyval.val) = NEW_BEGIN(0);
05060 #endif
05061 (yyval.val) = dispatch1(BEGIN, (yyvsp[(4) - (5)].val));
05062
05063 ;}
05064 break;
05065
05066 case 12:
05067
05068
05069 #line 888 "ripper.y"
05070 {
05071 #if 0
05072 (yyval.val) = (yyvsp[(1) - (4)].val);
05073 if ((yyvsp[(2) - (4)].val)) {
05074 (yyval.val) = NEW_RESCUE((yyvsp[(1) - (4)].val), (yyvsp[(2) - (4)].val), (yyvsp[(3) - (4)].val));
05075 }
05076 else if ((yyvsp[(3) - (4)].val)) {
05077 rb_warn0("else without rescue is useless");
05078 (yyval.val) = block_append((yyval.val), (yyvsp[(3) - (4)].val));
05079 }
05080 if ((yyvsp[(4) - (4)].val)) {
05081 if ((yyval.val)) {
05082 (yyval.val) = NEW_ENSURE((yyval.val), (yyvsp[(4) - (4)].val));
05083 }
05084 else {
05085 (yyval.val) = block_append((yyvsp[(4) - (4)].val), NEW_NIL());
05086 }
05087 }
05088 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
05089 #endif
05090 (yyval.val) = dispatch4(bodystmt,
05091 escape_Qundef((yyvsp[(1) - (4)].val)),
05092 escape_Qundef((yyvsp[(2) - (4)].val)),
05093 escape_Qundef((yyvsp[(3) - (4)].val)),
05094 escape_Qundef((yyvsp[(4) - (4)].val)));
05095
05096 ;}
05097 break;
05098
05099 case 13:
05100
05101
05102 #line 918 "ripper.y"
05103 {
05104 #if 0
05105 void_stmts((yyvsp[(1) - (2)].val));
05106 fixup_nodes(&deferred_nodes);
05107 #endif
05108
05109 (yyval.val) = (yyvsp[(1) - (2)].val);
05110 ;}
05111 break;
05112
05113 case 14:
05114
05115
05116 #line 929 "ripper.y"
05117 {
05118 #if 0
05119 (yyval.val) = NEW_BEGIN(0);
05120 #endif
05121 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new),
05122 dispatch0(void_stmt));
05123
05124 ;}
05125 break;
05126
05127 case 15:
05128
05129
05130 #line 938 "ripper.y"
05131 {
05132 #if 0
05133 (yyval.val) = newline_node((yyvsp[(1) - (1)].val));
05134 #endif
05135 (yyval.val) = dispatch2(stmts_add, dispatch0(stmts_new), (yyvsp[(1) - (1)].val));
05136
05137 ;}
05138 break;
05139
05140 case 16:
05141
05142
05143 #line 946 "ripper.y"
05144 {
05145 #if 0
05146 (yyval.val) = block_append((yyvsp[(1) - (3)].val), newline_node((yyvsp[(3) - (3)].val)));
05147 #endif
05148 (yyval.val) = dispatch2(stmts_add, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05149
05150 ;}
05151 break;
05152
05153 case 17:
05154
05155
05156 #line 954 "ripper.y"
05157 {
05158 (yyval.val) = remove_begin((yyvsp[(2) - (2)].val));
05159 ;}
05160 break;
05161
05162 case 18:
05163
05164
05165 #line 959 "ripper.y"
05166 {lex_state = EXPR_FNAME;;}
05167 break;
05168
05169 case 19:
05170
05171
05172 #line 960 "ripper.y"
05173 {
05174 #if 0
05175 (yyval.val) = NEW_ALIAS((yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
05176 #endif
05177 (yyval.val) = dispatch2(alias, (yyvsp[(2) - (4)].val), (yyvsp[(4) - (4)].val));
05178
05179 ;}
05180 break;
05181
05182 case 20:
05183
05184
05185 #line 968 "ripper.y"
05186 {
05187 #if 0
05188 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05189 #endif
05190 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05191
05192 ;}
05193 break;
05194
05195 case 21:
05196
05197
05198 #line 976 "ripper.y"
05199 {
05200 #if 0
05201 char buf[2];
05202 buf[0] = '$';
05203 buf[1] = (char)(yyvsp[(3) - (3)].val)->nd_nth;
05204 (yyval.val) = NEW_VALIAS((yyvsp[(2) - (3)].val), rb_intern2(buf, 2));
05205 #endif
05206 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05207
05208 ;}
05209 break;
05210
05211 case 22:
05212
05213
05214 #line 987 "ripper.y"
05215 {
05216 #if 0
05217 yyerror("can't make alias for the number variables");
05218 (yyval.val) = NEW_BEGIN(0);
05219 #endif
05220 (yyval.val) = dispatch2(var_alias, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05221 (yyval.val) = dispatch1(alias_error, (yyval.val));
05222
05223 ;}
05224 break;
05225
05226 case 23:
05227
05228
05229 #line 997 "ripper.y"
05230 {
05231 #if 0
05232 (yyval.val) = (yyvsp[(2) - (2)].val);
05233 #endif
05234 (yyval.val) = dispatch1(undef, (yyvsp[(2) - (2)].val));
05235
05236 ;}
05237 break;
05238
05239 case 24:
05240
05241
05242 #line 1005 "ripper.y"
05243 {
05244 #if 0
05245 (yyval.val) = NEW_IF(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0);
05246 fixpos((yyval.val), (yyvsp[(3) - (3)].val));
05247 #endif
05248 (yyval.val) = dispatch2(if_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05249
05250 ;}
05251 break;
05252
05253 case 25:
05254
05255
05256 #line 1014 "ripper.y"
05257 {
05258 #if 0
05259 (yyval.val) = NEW_UNLESS(cond((yyvsp[(3) - (3)].val)), remove_begin((yyvsp[(1) - (3)].val)), 0);
05260 fixpos((yyval.val), (yyvsp[(3) - (3)].val));
05261 #endif
05262 (yyval.val) = dispatch2(unless_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05263
05264 ;}
05265 break;
05266
05267 case 26:
05268
05269
05270 #line 1023 "ripper.y"
05271 {
05272 #if 0
05273 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) {
05274 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0);
05275 }
05276 else {
05277 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1);
05278 }
05279 #endif
05280 (yyval.val) = dispatch2(while_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05281
05282 ;}
05283 break;
05284
05285 case 27:
05286
05287
05288 #line 1036 "ripper.y"
05289 {
05290 #if 0
05291 if ((yyvsp[(1) - (3)].val) && nd_type((yyvsp[(1) - (3)].val)) == NODE_BEGIN) {
05292 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val)->nd_body, 0);
05293 }
05294 else {
05295 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (3)].val)), (yyvsp[(1) - (3)].val), 1);
05296 }
05297 #endif
05298 (yyval.val) = dispatch2(until_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05299
05300 ;}
05301 break;
05302
05303 case 28:
05304
05305
05306 #line 1049 "ripper.y"
05307 {
05308 #if 0
05309 NODE *resq = NEW_RESBODY(0, remove_begin((yyvsp[(3) - (3)].val)), 0);
05310 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[(1) - (3)].val)), resq, 0);
05311 #endif
05312 (yyval.val) = dispatch2(rescue_mod, (yyvsp[(3) - (3)].val), (yyvsp[(1) - (3)].val));
05313
05314 ;}
05315 break;
05316
05317 case 29:
05318
05319
05320 #line 1058 "ripper.y"
05321 {
05322 if (in_def || in_single) {
05323 rb_warn0("END in method; use at_exit");
05324 }
05325 #if 0
05326 (yyval.val) = NEW_POSTEXE(NEW_NODE(
05327 NODE_SCOPE, 0 , (yyvsp[(3) - (4)].val) , 0 ));
05328 #endif
05329 (yyval.val) = dispatch1(END, (yyvsp[(3) - (4)].val));
05330
05331 ;}
05332 break;
05333
05334 case 30:
05335
05336
05337 #line 1070 "ripper.y"
05338 {
05339 #if 0
05340 value_expr((yyvsp[(3) - (3)].val));
05341 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05342 #endif
05343 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05344
05345 ;}
05346 break;
05347
05348 case 31:
05349
05350
05351 #line 1079 "ripper.y"
05352 {
05353 #if 0
05354 value_expr((yyvsp[(3) - (3)].val));
05355 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05356 (yyval.val) = (yyvsp[(1) - (3)].val);
05357 #endif
05358 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05359
05360 ;}
05361 break;
05362
05363 case 32:
05364
05365
05366 #line 1089 "ripper.y"
05367 {
05368 #if 0
05369 value_expr((yyvsp[(3) - (3)].val));
05370 if ((yyvsp[(1) - (3)].val)) {
05371 ID vid = (yyvsp[(1) - (3)].val)->nd_vid;
05372 if ((yyvsp[(2) - (3)].val) == tOROP) {
05373 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05374 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val));
05375 if (is_asgn_or_id(vid)) {
05376 (yyval.val)->nd_aid = vid;
05377 }
05378 }
05379 else if ((yyvsp[(2) - (3)].val) == tANDOP) {
05380 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05381 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val));
05382 }
05383 else {
05384 (yyval.val) = (yyvsp[(1) - (3)].val);
05385 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val)));
05386 }
05387 }
05388 else {
05389 (yyval.val) = NEW_BEGIN(0);
05390 }
05391 #endif
05392 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
05393
05394 ;}
05395 break;
05396
05397 case 33:
05398
05399
05400 #line 1118 "ripper.y"
05401 {
05402 #if 0
05403 NODE *args;
05404
05405 value_expr((yyvsp[(6) - (6)].val));
05406 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY();
05407 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
05408 if ((yyvsp[(5) - (6)].val) == tOROP) {
05409 (yyvsp[(5) - (6)].val) = 0;
05410 }
05411 else if ((yyvsp[(5) - (6)].val) == tANDOP) {
05412 (yyvsp[(5) - (6)].val) = 1;
05413 }
05414 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args);
05415 fixpos((yyval.val), (yyvsp[(1) - (6)].val));
05416 #endif
05417 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val)));
05418 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
05419
05420 ;}
05421 break;
05422
05423 case 34:
05424
05425
05426 #line 1139 "ripper.y"
05427 {
05428 #if 0
05429 value_expr((yyvsp[(5) - (5)].val));
05430 if ((yyvsp[(4) - (5)].val) == tOROP) {
05431 (yyvsp[(4) - (5)].val) = 0;
05432 }
05433 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
05434 (yyvsp[(4) - (5)].val) = 1;
05435 }
05436 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05437 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05438 #endif
05439 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
05440 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05441
05442 ;}
05443 break;
05444
05445 case 35:
05446
05447
05448 #line 1156 "ripper.y"
05449 {
05450 #if 0
05451 value_expr((yyvsp[(5) - (5)].val));
05452 if ((yyvsp[(4) - (5)].val) == tOROP) {
05453 (yyvsp[(4) - (5)].val) = 0;
05454 }
05455 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
05456 (yyvsp[(4) - (5)].val) = 1;
05457 }
05458 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05459 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05460 #endif
05461 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
05462 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05463
05464 ;}
05465 break;
05466
05467 case 36:
05468
05469
05470 #line 1173 "ripper.y"
05471 {
05472 yyerror("constant re-assignment");
05473 (yyval.val) = 0;
05474 ;}
05475 break;
05476
05477 case 37:
05478
05479
05480 #line 1178 "ripper.y"
05481 {
05482 #if 0
05483 value_expr((yyvsp[(5) - (5)].val));
05484 if ((yyvsp[(4) - (5)].val) == tOROP) {
05485 (yyvsp[(4) - (5)].val) = 0;
05486 }
05487 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
05488 (yyvsp[(4) - (5)].val) = 1;
05489 }
05490 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05491 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05492 #endif
05493 (yyval.val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val));
05494 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
05495
05496 ;}
05497 break;
05498
05499 case 38:
05500
05501
05502 #line 1195 "ripper.y"
05503 {
05504 #if 0
05505 rb_backref_error((yyvsp[(1) - (3)].val));
05506 (yyval.val) = NEW_BEGIN(0);
05507 #endif
05508 (yyval.val) = dispatch2(assign, dispatch1(var_field, (yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
05509 (yyval.val) = dispatch1(assign_error, (yyval.val));
05510
05511 ;}
05512 break;
05513
05514 case 39:
05515
05516
05517 #line 1205 "ripper.y"
05518 {
05519 #if 0
05520 value_expr((yyvsp[(3) - (3)].val));
05521 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05522 #endif
05523 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05524
05525 ;}
05526 break;
05527
05528 case 40:
05529
05530
05531 #line 1214 "ripper.y"
05532 {
05533 #if 0
05534 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05535 (yyval.val) = (yyvsp[(1) - (3)].val);
05536 #endif
05537 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05538
05539 ;}
05540 break;
05541
05542 case 41:
05543
05544
05545 #line 1223 "ripper.y"
05546 {
05547 #if 0
05548 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
05549 (yyval.val) = (yyvsp[(1) - (3)].val);
05550 #endif
05551 (yyval.val) = dispatch2(massign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05552
05553 ;}
05554 break;
05555
05556 case 44:
05557
05558
05559 #line 1236 "ripper.y"
05560 {
05561 #if 0
05562 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05563 #endif
05564 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("and"), (yyvsp[(3) - (3)].val));
05565
05566 ;}
05567 break;
05568
05569 case 45:
05570
05571
05572 #line 1244 "ripper.y"
05573 {
05574 #if 0
05575 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05576 #endif
05577 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("or"), (yyvsp[(3) - (3)].val));
05578
05579 ;}
05580 break;
05581
05582 case 46:
05583
05584
05585 #line 1252 "ripper.y"
05586 {
05587 #if 0
05588 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (3)].val)), '!');
05589 #endif
05590 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (3)].val));
05591
05592 ;}
05593 break;
05594
05595 case 47:
05596
05597
05598 #line 1260 "ripper.y"
05599 {
05600 #if 0
05601 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!');
05602 #endif
05603 (yyval.val) = dispatch2(unary, ripper_id2sym('!'), (yyvsp[(2) - (2)].val));
05604
05605 ;}
05606 break;
05607
05608 case 49:
05609
05610
05611 #line 1271 "ripper.y"
05612 {
05613 #if 0
05614 value_expr((yyvsp[(1) - (1)].val));
05615 (yyval.val) = (yyvsp[(1) - (1)].val);
05616 if (!(yyval.val)) (yyval.val) = NEW_NIL();
05617 #endif
05618 (yyval.val) = (yyvsp[(1) - (1)].val);
05619
05620 ;}
05621 break;
05622
05623 case 53:
05624
05625
05626 #line 1288 "ripper.y"
05627 {
05628 #if 0
05629 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05630 #endif
05631 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
05632 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val));
05633
05634 ;}
05635 break;
05636
05637 case 54:
05638
05639
05640 #line 1297 "ripper.y"
05641 {
05642 #if 0
05643 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05644 #endif
05645 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val));
05646 (yyval.val) = method_arg((yyval.val), (yyvsp[(4) - (4)].val));
05647
05648 ;}
05649 break;
05650
05651 case 55:
05652
05653
05654 #line 1308 "ripper.y"
05655 {
05656 (yyvsp[(1) - (1)].vars) = dyna_push();
05657 #if 0
05658 (yyval.num) = ruby_sourceline;
05659 #endif
05660
05661 ;}
05662 break;
05663
05664 case 56:
05665
05666
05667 #line 1318 "ripper.y"
05668 {
05669 #if 0
05670 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
05671 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
05672 #endif
05673 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
05674
05675 dyna_pop((yyvsp[(1) - (5)].vars));
05676 ;}
05677 break;
05678
05679 case 57:
05680
05681
05682 #line 1330 "ripper.y"
05683 {
05684 #if 0
05685 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
05686 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
05687 #endif
05688 (yyval.val) = dispatch2(command, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
05689
05690 ;}
05691 break;
05692
05693 case 58:
05694
05695
05696 #line 1339 "ripper.y"
05697 {
05698 #if 0
05699 block_dup_check((yyvsp[(2) - (3)].val),(yyvsp[(3) - (3)].val));
05700 (yyvsp[(3) - (3)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
05701 (yyval.val) = (yyvsp[(3) - (3)].val);
05702 fixpos((yyval.val), (yyvsp[(2) - (3)].val));
05703 #endif
05704 (yyval.val) = dispatch2(command, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
05705 (yyval.val) = method_add_block((yyval.val), (yyvsp[(3) - (3)].val));
05706
05707 ;}
05708 break;
05709
05710 case 59:
05711
05712
05713 #line 1351 "ripper.y"
05714 {
05715 #if 0
05716 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05717 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
05718 #endif
05719 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05720
05721 ;}
05722 break;
05723
05724 case 60:
05725
05726
05727 #line 1360 "ripper.y"
05728 {
05729 #if 0
05730 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val));
05731 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05732 (yyval.val) = (yyvsp[(5) - (5)].val);
05733 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05734 #endif
05735 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05736 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val));
05737
05738 ;}
05739 break;
05740
05741 case 61:
05742
05743
05744 #line 1372 "ripper.y"
05745 {
05746 #if 0
05747 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05748 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
05749 #endif
05750 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
05751
05752 ;}
05753 break;
05754
05755 case 62:
05756
05757
05758 #line 1381 "ripper.y"
05759 {
05760 #if 0
05761 block_dup_check((yyvsp[(4) - (5)].val),(yyvsp[(5) - (5)].val));
05762 (yyvsp[(5) - (5)].val)->nd_iter = NEW_CALL((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05763 (yyval.val) = (yyvsp[(5) - (5)].val);
05764 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
05765 #endif
05766 (yyval.val) = dispatch4(command_call, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val));
05767 (yyval.val) = method_add_block((yyval.val), (yyvsp[(5) - (5)].val));
05768
05769 ;}
05770 break;
05771
05772 case 63:
05773
05774
05775 #line 1393 "ripper.y"
05776 {
05777 #if 0
05778 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val));
05779 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
05780 #endif
05781 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val));
05782
05783 ;}
05784 break;
05785
05786 case 64:
05787
05788
05789 #line 1402 "ripper.y"
05790 {
05791 #if 0
05792 (yyval.val) = new_yield((yyvsp[(2) - (2)].val));
05793 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
05794 #endif
05795 (yyval.val) = dispatch1(yield, (yyvsp[(2) - (2)].val));
05796
05797 ;}
05798 break;
05799
05800 case 65:
05801
05802
05803 #line 1411 "ripper.y"
05804 {
05805 #if 0
05806 (yyval.val) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].val)));
05807 #endif
05808 (yyval.val) = dispatch1(return, (yyvsp[(2) - (2)].val));
05809
05810 ;}
05811 break;
05812
05813 case 66:
05814
05815
05816 #line 1419 "ripper.y"
05817 {
05818 #if 0
05819 (yyval.val) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].val)));
05820 #endif
05821 (yyval.val) = dispatch1(break, (yyvsp[(2) - (2)].val));
05822
05823 ;}
05824 break;
05825
05826 case 67:
05827
05828
05829 #line 1427 "ripper.y"
05830 {
05831 #if 0
05832 (yyval.val) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].val)));
05833 #endif
05834 (yyval.val) = dispatch1(next, (yyvsp[(2) - (2)].val));
05835
05836 ;}
05837 break;
05838
05839 case 69:
05840
05841
05842 #line 1438 "ripper.y"
05843 {
05844 #if 0
05845 (yyval.val) = (yyvsp[(2) - (3)].val);
05846 #endif
05847 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
05848
05849 ;}
05850 break;
05851
05852 case 71:
05853
05854
05855 #line 1449 "ripper.y"
05856 {
05857 #if 0
05858 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[(2) - (3)].val)), 0);
05859 #endif
05860 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
05861
05862 ;}
05863 break;
05864
05865 case 72:
05866
05867
05868 #line 1459 "ripper.y"
05869 {
05870 #if 0
05871 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0);
05872 #endif
05873 (yyval.val) = (yyvsp[(1) - (1)].val);
05874
05875 ;}
05876 break;
05877
05878 case 73:
05879
05880
05881 #line 1467 "ripper.y"
05882 {
05883 #if 0
05884 (yyval.val) = NEW_MASGN(list_append((yyvsp[(1) - (2)].val),(yyvsp[(2) - (2)].val)), 0);
05885 #endif
05886 (yyval.val) = mlhs_add((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
05887
05888 ;}
05889 break;
05890
05891 case 74:
05892
05893
05894 #line 1475 "ripper.y"
05895 {
05896 #if 0
05897 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05898 #endif
05899 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
05900
05901 ;}
05902 break;
05903
05904 case 75:
05905
05906
05907 #line 1483 "ripper.y"
05908 {
05909 #if 0
05910 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG((yyvsp[(3) - (5)].val),(yyvsp[(5) - (5)].val)));
05911 #endif
05912 (yyvsp[(1) - (5)].val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
05913 (yyval.val) = mlhs_add((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val));
05914
05915 ;}
05916 break;
05917
05918 case 76:
05919
05920
05921 #line 1492 "ripper.y"
05922 {
05923 #if 0
05924 (yyval.val) = NEW_MASGN((yyvsp[(1) - (2)].val), -1);
05925 #endif
05926 (yyval.val) = mlhs_add_star((yyvsp[(1) - (2)].val), Qnil);
05927
05928 ;}
05929 break;
05930
05931 case 77:
05932
05933
05934 #line 1500 "ripper.y"
05935 {
05936 #if 0
05937 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), NEW_POSTARG(-1, (yyvsp[(4) - (4)].val)));
05938 #endif
05939 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), Qnil);
05940
05941 ;}
05942 break;
05943
05944 case 78:
05945
05946
05947 #line 1508 "ripper.y"
05948 {
05949 #if 0
05950 (yyval.val) = NEW_MASGN(0, (yyvsp[(2) - (2)].val));
05951 #endif
05952 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (2)].val));
05953
05954 ;}
05955 break;
05956
05957 case 79:
05958
05959
05960 #line 1516 "ripper.y"
05961 {
05962 #if 0
05963 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[(2) - (4)].val),(yyvsp[(4) - (4)].val)));
05964 #endif
05965 (yyval.val) = mlhs_add_star(mlhs_new(), (yyvsp[(2) - (4)].val));
05966
05967 ;}
05968 break;
05969
05970 case 80:
05971
05972
05973 #line 1524 "ripper.y"
05974 {
05975 #if 0
05976 (yyval.val) = NEW_MASGN(0, -1);
05977 #endif
05978 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
05979
05980 ;}
05981 break;
05982
05983 case 81:
05984
05985
05986 #line 1532 "ripper.y"
05987 {
05988 #if 0
05989 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val)));
05990 #endif
05991 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
05992
05993 ;}
05994 break;
05995
05996 case 83:
05997
05998
05999 #line 1543 "ripper.y"
06000 {
06001 #if 0
06002 (yyval.val) = (yyvsp[(2) - (3)].val);
06003 #endif
06004 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
06005
06006 ;}
06007 break;
06008
06009 case 84:
06010
06011
06012 #line 1553 "ripper.y"
06013 {
06014 #if 0
06015 (yyval.val) = NEW_LIST((yyvsp[(1) - (2)].val));
06016 #endif
06017 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (2)].val));
06018
06019 ;}
06020 break;
06021
06022 case 85:
06023
06024
06025 #line 1561 "ripper.y"
06026 {
06027 #if 0
06028 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
06029 #endif
06030 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
06031
06032 ;}
06033 break;
06034
06035 case 86:
06036
06037
06038 #line 1571 "ripper.y"
06039 {
06040 #if 0
06041 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
06042 #endif
06043 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val));
06044
06045 ;}
06046 break;
06047
06048 case 87:
06049
06050
06051 #line 1579 "ripper.y"
06052 {
06053 #if 0
06054 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06055 #endif
06056 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06057
06058 ;}
06059 break;
06060
06061 case 88:
06062
06063
06064 #line 1589 "ripper.y"
06065 {
06066 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
06067 ;}
06068 break;
06069
06070 case 89:
06071
06072
06073 #line 1593 "ripper.y"
06074 {
06075 #if 0
06076 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
06077 #endif
06078 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
06079
06080 ;}
06081 break;
06082
06083 case 90:
06084
06085
06086 #line 1601 "ripper.y"
06087 {
06088 #if 0
06089 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06090 #endif
06091 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06092
06093 ;}
06094 break;
06095
06096 case 91:
06097
06098
06099 #line 1609 "ripper.y"
06100 {
06101 #if 0
06102 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06103 #endif
06104 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06105
06106 ;}
06107 break;
06108
06109 case 92:
06110
06111
06112 #line 1617 "ripper.y"
06113 {
06114 #if 0
06115 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06116 #endif
06117 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06118
06119 ;}
06120 break;
06121
06122 case 93:
06123
06124
06125 #line 1625 "ripper.y"
06126 {
06127 #if 0
06128 if (in_def || in_single)
06129 yyerror("dynamic constant assignment");
06130 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)));
06131 #endif
06132 if (in_def || in_single)
06133 yyerror("dynamic constant assignment");
06134 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06135
06136 ;}
06137 break;
06138
06139 case 94:
06140
06141
06142 #line 1637 "ripper.y"
06143 {
06144 #if 0
06145 if (in_def || in_single)
06146 yyerror("dynamic constant assignment");
06147 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val)));
06148 #endif
06149 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val));
06150
06151 ;}
06152 break;
06153
06154 case 95:
06155
06156
06157 #line 1647 "ripper.y"
06158 {
06159 #if 0
06160 rb_backref_error((yyvsp[(1) - (1)].val));
06161 (yyval.val) = NEW_BEGIN(0);
06162 #endif
06163 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (1)].val));
06164 (yyval.val) = dispatch1(assign_error, (yyval.val));
06165
06166 ;}
06167 break;
06168
06169 case 96:
06170
06171
06172 #line 1659 "ripper.y"
06173 {
06174 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
06175 #if 0
06176 if (!(yyval.val)) (yyval.val) = NEW_BEGIN(0);
06177 #endif
06178 (yyval.val) = dispatch1(var_field, (yyval.val));
06179
06180 ;}
06181 break;
06182
06183 case 97:
06184
06185
06186 #line 1668 "ripper.y"
06187 {
06188 #if 0
06189 (yyval.val) = aryset((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
06190 #endif
06191 (yyval.val) = dispatch2(aref_field, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
06192
06193 ;}
06194 break;
06195
06196 case 98:
06197
06198
06199 #line 1676 "ripper.y"
06200 {
06201 #if 0
06202 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06203 #endif
06204 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06205
06206 ;}
06207 break;
06208
06209 case 99:
06210
06211
06212 #line 1684 "ripper.y"
06213 {
06214 #if 0
06215 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06216 #endif
06217 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val));
06218
06219 ;}
06220 break;
06221
06222 case 100:
06223
06224
06225 #line 1692 "ripper.y"
06226 {
06227 #if 0
06228 (yyval.val) = attrset((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06229 #endif
06230 (yyval.val) = dispatch3(field, (yyvsp[(1) - (3)].val), ripper_id2sym('.'), (yyvsp[(3) - (3)].val));
06231
06232 ;}
06233 break;
06234
06235 case 101:
06236
06237
06238 #line 1700 "ripper.y"
06239 {
06240 #if 0
06241 if (in_def || in_single)
06242 yyerror("dynamic constant assignment");
06243 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)));
06244 #endif
06245 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06246 if (in_def || in_single) {
06247 (yyval.val) = dispatch1(assign_error, (yyval.val));
06248 }
06249
06250 ;}
06251 break;
06252
06253 case 102:
06254
06255
06256 #line 1713 "ripper.y"
06257 {
06258 #if 0
06259 if (in_def || in_single)
06260 yyerror("dynamic constant assignment");
06261 (yyval.val) = NEW_CDECL(0, 0, NEW_COLON3((yyvsp[(2) - (2)].val)));
06262 #endif
06263 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (2)].val));
06264 if (in_def || in_single) {
06265 (yyval.val) = dispatch1(assign_error, (yyval.val));
06266 }
06267
06268 ;}
06269 break;
06270
06271 case 103:
06272
06273
06274 #line 1726 "ripper.y"
06275 {
06276 #if 0
06277 rb_backref_error((yyvsp[(1) - (1)].val));
06278 (yyval.val) = NEW_BEGIN(0);
06279 #endif
06280 (yyval.val) = dispatch1(assign_error, (yyvsp[(1) - (1)].val));
06281
06282 ;}
06283 break;
06284
06285 case 104:
06286
06287
06288 #line 1737 "ripper.y"
06289 {
06290 #if 0
06291 yyerror("class/module name must be CONSTANT");
06292 #endif
06293 (yyval.val) = dispatch1(class_name_error, (yyvsp[(1) - (1)].val));
06294
06295 ;}
06296 break;
06297
06298 case 106:
06299
06300
06301 #line 1748 "ripper.y"
06302 {
06303 #if 0
06304 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val));
06305 #endif
06306 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val));
06307
06308 ;}
06309 break;
06310
06311 case 107:
06312
06313
06314 #line 1756 "ripper.y"
06315 {
06316 #if 0
06317 (yyval.val) = NEW_COLON2(0, (yyval.val));
06318 #endif
06319 (yyval.val) = dispatch1(const_ref, (yyvsp[(1) - (1)].val));
06320
06321 ;}
06322 break;
06323
06324 case 108:
06325
06326
06327 #line 1764 "ripper.y"
06328 {
06329 #if 0
06330 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06331 #endif
06332 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06333
06334 ;}
06335 break;
06336
06337 case 112:
06338
06339
06340 #line 1777 "ripper.y"
06341 {
06342 lex_state = EXPR_ENDFN;
06343 (yyval.val) = (yyvsp[(1) - (1)].val);
06344 ;}
06345 break;
06346
06347 case 113:
06348
06349
06350 #line 1782 "ripper.y"
06351 {
06352 lex_state = EXPR_ENDFN;
06353 #if 0
06354 (yyval.val) = (yyvsp[(1) - (1)].id);
06355 #endif
06356 (yyval.val) = (yyvsp[(1) - (1)].val);
06357
06358 ;}
06359 break;
06360
06361 case 116:
06362
06363
06364 #line 1797 "ripper.y"
06365 {
06366 #if 0
06367 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val)));
06368 #endif
06369 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val));
06370
06371 ;}
06372 break;
06373
06374 case 118:
06375
06376
06377 #line 1808 "ripper.y"
06378 {
06379 #if 0
06380 (yyval.val) = NEW_UNDEF((yyvsp[(1) - (1)].val));
06381 #endif
06382 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
06383
06384 ;}
06385 break;
06386
06387 case 119:
06388
06389
06390 #line 1815 "ripper.y"
06391 {lex_state = EXPR_FNAME;;}
06392 break;
06393
06394 case 120:
06395
06396
06397 #line 1816 "ripper.y"
06398 {
06399 #if 0
06400 (yyval.val) = block_append((yyvsp[(1) - (4)].val), NEW_UNDEF((yyvsp[(4) - (4)].val)));
06401 #endif
06402 rb_ary_push((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
06403
06404 ;}
06405 break;
06406
06407 case 121:
06408
06409
06410 #line 1825 "ripper.y"
06411 { ifndef_ripper((yyval.val) = '|'); ;}
06412 break;
06413
06414 case 122:
06415
06416
06417 #line 1826 "ripper.y"
06418 { ifndef_ripper((yyval.val) = '^'); ;}
06419 break;
06420
06421 case 123:
06422
06423
06424 #line 1827 "ripper.y"
06425 { ifndef_ripper((yyval.val) = '&'); ;}
06426 break;
06427
06428 case 124:
06429
06430
06431 #line 1828 "ripper.y"
06432 { ifndef_ripper((yyval.val) = tCMP); ;}
06433 break;
06434
06435 case 125:
06436
06437
06438 #line 1829 "ripper.y"
06439 { ifndef_ripper((yyval.val) = tEQ); ;}
06440 break;
06441
06442 case 126:
06443
06444
06445 #line 1830 "ripper.y"
06446 { ifndef_ripper((yyval.val) = tEQQ); ;}
06447 break;
06448
06449 case 127:
06450
06451
06452 #line 1831 "ripper.y"
06453 { ifndef_ripper((yyval.val) = tMATCH); ;}
06454 break;
06455
06456 case 128:
06457
06458
06459 #line 1832 "ripper.y"
06460 { ifndef_ripper((yyval.val) = tNMATCH); ;}
06461 break;
06462
06463 case 129:
06464
06465
06466 #line 1833 "ripper.y"
06467 { ifndef_ripper((yyval.val) = '>'); ;}
06468 break;
06469
06470 case 130:
06471
06472
06473 #line 1834 "ripper.y"
06474 { ifndef_ripper((yyval.val) = tGEQ); ;}
06475 break;
06476
06477 case 131:
06478
06479
06480 #line 1835 "ripper.y"
06481 { ifndef_ripper((yyval.val) = '<'); ;}
06482 break;
06483
06484 case 132:
06485
06486
06487 #line 1836 "ripper.y"
06488 { ifndef_ripper((yyval.val) = tLEQ); ;}
06489 break;
06490
06491 case 133:
06492
06493
06494 #line 1837 "ripper.y"
06495 { ifndef_ripper((yyval.val) = tNEQ); ;}
06496 break;
06497
06498 case 134:
06499
06500
06501 #line 1838 "ripper.y"
06502 { ifndef_ripper((yyval.val) = tLSHFT); ;}
06503 break;
06504
06505 case 135:
06506
06507
06508 #line 1839 "ripper.y"
06509 { ifndef_ripper((yyval.val) = tRSHFT); ;}
06510 break;
06511
06512 case 136:
06513
06514
06515 #line 1840 "ripper.y"
06516 { ifndef_ripper((yyval.val) = '+'); ;}
06517 break;
06518
06519 case 137:
06520
06521
06522 #line 1841 "ripper.y"
06523 { ifndef_ripper((yyval.val) = '-'); ;}
06524 break;
06525
06526 case 138:
06527
06528
06529 #line 1842 "ripper.y"
06530 { ifndef_ripper((yyval.val) = '*'); ;}
06531 break;
06532
06533 case 139:
06534
06535
06536 #line 1843 "ripper.y"
06537 { ifndef_ripper((yyval.val) = '*'); ;}
06538 break;
06539
06540 case 140:
06541
06542
06543 #line 1844 "ripper.y"
06544 { ifndef_ripper((yyval.val) = '/'); ;}
06545 break;
06546
06547 case 141:
06548
06549
06550 #line 1845 "ripper.y"
06551 { ifndef_ripper((yyval.val) = '%'); ;}
06552 break;
06553
06554 case 142:
06555
06556
06557 #line 1846 "ripper.y"
06558 { ifndef_ripper((yyval.val) = tPOW); ;}
06559 break;
06560
06561 case 143:
06562
06563
06564 #line 1847 "ripper.y"
06565 { ifndef_ripper((yyval.val) = '!'); ;}
06566 break;
06567
06568 case 144:
06569
06570
06571 #line 1848 "ripper.y"
06572 { ifndef_ripper((yyval.val) = '~'); ;}
06573 break;
06574
06575 case 145:
06576
06577
06578 #line 1849 "ripper.y"
06579 { ifndef_ripper((yyval.val) = tUPLUS); ;}
06580 break;
06581
06582 case 146:
06583
06584
06585 #line 1850 "ripper.y"
06586 { ifndef_ripper((yyval.val) = tUMINUS); ;}
06587 break;
06588
06589 case 147:
06590
06591
06592 #line 1851 "ripper.y"
06593 { ifndef_ripper((yyval.val) = tAREF); ;}
06594 break;
06595
06596 case 148:
06597
06598
06599 #line 1852 "ripper.y"
06600 { ifndef_ripper((yyval.val) = tASET); ;}
06601 break;
06602
06603 case 149:
06604
06605
06606 #line 1853 "ripper.y"
06607 { ifndef_ripper((yyval.val) = '`'); ;}
06608 break;
06609
06610 case 191:
06611
06612
06613 #line 1871 "ripper.y"
06614 {
06615 #if 0
06616 value_expr((yyvsp[(3) - (3)].val));
06617 (yyval.val) = node_assign((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06618 #endif
06619 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06620
06621 ;}
06622 break;
06623
06624 case 192:
06625
06626
06627 #line 1880 "ripper.y"
06628 {
06629 #if 0
06630 value_expr((yyvsp[(3) - (5)].val));
06631 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0);
06632 (yyval.val) = node_assign((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
06633 #endif
06634 (yyval.val) = dispatch2(assign, (yyvsp[(1) - (5)].val), dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)));
06635
06636 ;}
06637 break;
06638
06639 case 193:
06640
06641
06642 #line 1890 "ripper.y"
06643 {
06644 #if 0
06645 value_expr((yyvsp[(3) - (3)].val));
06646 if ((yyvsp[(1) - (3)].val)) {
06647 ID vid = (yyvsp[(1) - (3)].val)->nd_vid;
06648 if ((yyvsp[(2) - (3)].val) == tOROP) {
06649 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
06650 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (3)].val));
06651 if (is_asgn_or_id(vid)) {
06652 (yyval.val)->nd_aid = vid;
06653 }
06654 }
06655 else if ((yyvsp[(2) - (3)].val) == tANDOP) {
06656 (yyvsp[(1) - (3)].val)->nd_value = (yyvsp[(3) - (3)].val);
06657 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (3)].val));
06658 }
06659 else {
06660 (yyval.val) = (yyvsp[(1) - (3)].val);
06661 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (3)].val), NEW_LIST((yyvsp[(3) - (3)].val)));
06662 }
06663 }
06664 else {
06665 (yyval.val) = NEW_BEGIN(0);
06666 }
06667 #endif
06668 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
06669
06670 ;}
06671 break;
06672
06673 case 194:
06674
06675
06676 #line 1919 "ripper.y"
06677 {
06678 #if 0
06679 value_expr((yyvsp[(3) - (5)].val));
06680 (yyvsp[(3) - (5)].val) = NEW_RESCUE((yyvsp[(3) - (5)].val), NEW_RESBODY(0,(yyvsp[(5) - (5)].val),0), 0);
06681 if ((yyvsp[(1) - (5)].val)) {
06682 ID vid = (yyvsp[(1) - (5)].val)->nd_vid;
06683 if ((yyvsp[(2) - (5)].val) == tOROP) {
06684 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val);
06685 (yyval.val) = NEW_OP_ASGN_OR(gettable(vid), (yyvsp[(1) - (5)].val));
06686 if (is_asgn_or_id(vid)) {
06687 (yyval.val)->nd_aid = vid;
06688 }
06689 }
06690 else if ((yyvsp[(2) - (5)].val) == tANDOP) {
06691 (yyvsp[(1) - (5)].val)->nd_value = (yyvsp[(3) - (5)].val);
06692 (yyval.val) = NEW_OP_ASGN_AND(gettable(vid), (yyvsp[(1) - (5)].val));
06693 }
06694 else {
06695 (yyval.val) = (yyvsp[(1) - (5)].val);
06696 (yyval.val)->nd_value = NEW_CALL(gettable(vid), (yyvsp[(2) - (5)].val), NEW_LIST((yyvsp[(3) - (5)].val)));
06697 }
06698 }
06699 else {
06700 (yyval.val) = NEW_BEGIN(0);
06701 }
06702 #endif
06703 (yyvsp[(3) - (5)].val) = dispatch2(rescue_mod, (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val));
06704 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val));
06705
06706 ;}
06707 break;
06708
06709 case 195:
06710
06711
06712 #line 1950 "ripper.y"
06713 {
06714 #if 0
06715 NODE *args;
06716
06717 value_expr((yyvsp[(6) - (6)].val));
06718 if (!(yyvsp[(3) - (6)].val)) (yyvsp[(3) - (6)].val) = NEW_ZARRAY();
06719 if (nd_type((yyvsp[(3) - (6)].val)) == NODE_BLOCK_PASS) {
06720 args = NEW_ARGSCAT((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
06721 }
06722 else {
06723 args = arg_concat((yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
06724 }
06725 if ((yyvsp[(5) - (6)].val) == tOROP) {
06726 (yyvsp[(5) - (6)].val) = 0;
06727 }
06728 else if ((yyvsp[(5) - (6)].val) == tANDOP) {
06729 (yyvsp[(5) - (6)].val) = 1;
06730 }
06731 (yyval.val) = NEW_OP_ASGN1((yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), args);
06732 fixpos((yyval.val), (yyvsp[(1) - (6)].val));
06733 #endif
06734 (yyvsp[(1) - (6)].val) = dispatch2(aref_field, (yyvsp[(1) - (6)].val), escape_Qundef((yyvsp[(3) - (6)].val)));
06735 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
06736
06737 ;}
06738 break;
06739
06740 case 196:
06741
06742
06743 #line 1976 "ripper.y"
06744 {
06745 #if 0
06746 value_expr((yyvsp[(5) - (5)].val));
06747 if ((yyvsp[(4) - (5)].val) == tOROP) {
06748 (yyvsp[(4) - (5)].val) = 0;
06749 }
06750 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
06751 (yyvsp[(4) - (5)].val) = 1;
06752 }
06753 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06754 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
06755 #endif
06756 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
06757 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06758
06759 ;}
06760 break;
06761
06762 case 197:
06763
06764
06765 #line 1993 "ripper.y"
06766 {
06767 #if 0
06768 value_expr((yyvsp[(5) - (5)].val));
06769 if ((yyvsp[(4) - (5)].val) == tOROP) {
06770 (yyvsp[(4) - (5)].val) = 0;
06771 }
06772 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
06773 (yyvsp[(4) - (5)].val) = 1;
06774 }
06775 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06776 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
06777 #endif
06778 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_id2sym('.'), (yyvsp[(3) - (5)].val));
06779 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06780
06781 ;}
06782 break;
06783
06784 case 198:
06785
06786
06787 #line 2010 "ripper.y"
06788 {
06789 #if 0
06790 value_expr((yyvsp[(5) - (5)].val));
06791 if ((yyvsp[(4) - (5)].val) == tOROP) {
06792 (yyvsp[(4) - (5)].val) = 0;
06793 }
06794 else if ((yyvsp[(4) - (5)].val) == tANDOP) {
06795 (yyvsp[(4) - (5)].val) = 1;
06796 }
06797 (yyval.val) = NEW_OP_ASGN2((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06798 fixpos((yyval.val), (yyvsp[(1) - (5)].val));
06799 #endif
06800 (yyvsp[(1) - (5)].val) = dispatch3(field, (yyvsp[(1) - (5)].val), ripper_intern("::"), (yyvsp[(3) - (5)].val));
06801 (yyval.val) = dispatch3(opassign, (yyvsp[(1) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06802
06803 ;}
06804 break;
06805
06806 case 199:
06807
06808
06809 #line 2027 "ripper.y"
06810 {
06811 #if 0
06812 yyerror("constant re-assignment");
06813 (yyval.val) = NEW_BEGIN(0);
06814 #endif
06815 (yyval.val) = dispatch2(const_path_field, (yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val));
06816 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
06817 (yyval.val) = dispatch1(assign_error, (yyval.val));
06818
06819 ;}
06820 break;
06821
06822 case 200:
06823
06824
06825 #line 2038 "ripper.y"
06826 {
06827 #if 0
06828 yyerror("constant re-assignment");
06829 (yyval.val) = NEW_BEGIN(0);
06830 #endif
06831 (yyval.val) = dispatch1(top_const_field, (yyvsp[(2) - (4)].val));
06832 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
06833 (yyval.val) = dispatch1(assign_error, (yyval.val));
06834
06835 ;}
06836 break;
06837
06838 case 201:
06839
06840
06841 #line 2049 "ripper.y"
06842 {
06843 #if 0
06844 rb_backref_error((yyvsp[(1) - (3)].val));
06845 (yyval.val) = NEW_BEGIN(0);
06846 #endif
06847 (yyval.val) = dispatch1(var_field, (yyvsp[(1) - (3)].val));
06848 (yyval.val) = dispatch3(opassign, (yyval.val), (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
06849 (yyval.val) = dispatch1(assign_error, (yyval.val));
06850
06851 ;}
06852 break;
06853
06854 case 202:
06855
06856
06857 #line 2060 "ripper.y"
06858 {
06859 #if 0
06860 value_expr((yyvsp[(1) - (3)].val));
06861 value_expr((yyvsp[(3) - (3)].val));
06862 (yyval.val) = NEW_DOT2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06863 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) &&
06864 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) {
06865 deferred_nodes = list_append(deferred_nodes, (yyval.val));
06866 }
06867 #endif
06868 (yyval.val) = dispatch2(dot2, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06869
06870 ;}
06871 break;
06872
06873 case 203:
06874
06875
06876 #line 2074 "ripper.y"
06877 {
06878 #if 0
06879 value_expr((yyvsp[(1) - (3)].val));
06880 value_expr((yyvsp[(3) - (3)].val));
06881 (yyval.val) = NEW_DOT3((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06882 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(1) - (3)].val)->nd_lit) &&
06883 nd_type((yyvsp[(3) - (3)].val)) == NODE_LIT && FIXNUM_P((yyvsp[(3) - (3)].val)->nd_lit)) {
06884 deferred_nodes = list_append(deferred_nodes, (yyval.val));
06885 }
06886 #endif
06887 (yyval.val) = dispatch2(dot3, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
06888
06889 ;}
06890 break;
06891
06892 case 204:
06893
06894
06895 #line 2088 "ripper.y"
06896 {
06897 #if 0
06898 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '+', (yyvsp[(3) - (3)].val));
06899 #endif
06900 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('+'), (yyvsp[(3) - (3)].val));
06901
06902 ;}
06903 break;
06904
06905 case 205:
06906
06907
06908 #line 2096 "ripper.y"
06909 {
06910 #if 0
06911 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '-', (yyvsp[(3) - (3)].val));
06912 #endif
06913 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('-'), (yyvsp[(3) - (3)].val));
06914
06915 ;}
06916 break;
06917
06918 case 206:
06919
06920
06921 #line 2104 "ripper.y"
06922 {
06923 #if 0
06924 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '*', (yyvsp[(3) - (3)].val));
06925 #endif
06926 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('*'), (yyvsp[(3) - (3)].val));
06927
06928 ;}
06929 break;
06930
06931 case 207:
06932
06933
06934 #line 2112 "ripper.y"
06935 {
06936 #if 0
06937 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '/', (yyvsp[(3) - (3)].val));
06938 #endif
06939 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('/'), (yyvsp[(3) - (3)].val));
06940
06941 ;}
06942 break;
06943
06944 case 208:
06945
06946
06947 #line 2120 "ripper.y"
06948 {
06949 #if 0
06950 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '%', (yyvsp[(3) - (3)].val));
06951 #endif
06952 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('%'), (yyvsp[(3) - (3)].val));
06953
06954 ;}
06955 break;
06956
06957 case 209:
06958
06959
06960 #line 2128 "ripper.y"
06961 {
06962 #if 0
06963 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tPOW, (yyvsp[(3) - (3)].val));
06964 #endif
06965 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("**"), (yyvsp[(3) - (3)].val));
06966
06967 ;}
06968 break;
06969
06970 case 210:
06971
06972
06973 #line 2136 "ripper.y"
06974 {
06975 #if 0
06976 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0);
06977 #endif
06978 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val));
06979 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val));
06980
06981 ;}
06982 break;
06983
06984 case 211:
06985
06986
06987 #line 2145 "ripper.y"
06988 {
06989 #if 0
06990 (yyval.val) = NEW_CALL(call_bin_op((yyvsp[(2) - (4)].val), tPOW, (yyvsp[(4) - (4)].val)), tUMINUS, 0);
06991 #endif
06992 (yyval.val) = dispatch3(binary, (yyvsp[(2) - (4)].val), ripper_intern("**"), (yyvsp[(4) - (4)].val));
06993 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyval.val));
06994
06995 ;}
06996 break;
06997
06998 case 212:
06999
07000
07001 #line 2154 "ripper.y"
07002 {
07003 #if 0
07004 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUPLUS);
07005 #endif
07006 (yyval.val) = dispatch2(unary, ripper_intern("+@"), (yyvsp[(2) - (2)].val));
07007
07008 ;}
07009 break;
07010
07011 case 213:
07012
07013
07014 #line 2162 "ripper.y"
07015 {
07016 #if 0
07017 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), tUMINUS);
07018 #endif
07019 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
07020
07021 ;}
07022 break;
07023
07024 case 214:
07025
07026
07027 #line 2170 "ripper.y"
07028 {
07029 #if 0
07030 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '|', (yyvsp[(3) - (3)].val));
07031 #endif
07032 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('|'), (yyvsp[(3) - (3)].val));
07033
07034 ;}
07035 break;
07036
07037 case 215:
07038
07039
07040 #line 2178 "ripper.y"
07041 {
07042 #if 0
07043 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '^', (yyvsp[(3) - (3)].val));
07044 #endif
07045 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('^'), (yyvsp[(3) - (3)].val));
07046
07047 ;}
07048 break;
07049
07050 case 216:
07051
07052
07053 #line 2186 "ripper.y"
07054 {
07055 #if 0
07056 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '&', (yyvsp[(3) - (3)].val));
07057 #endif
07058 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('&'), (yyvsp[(3) - (3)].val));
07059
07060 ;}
07061 break;
07062
07063 case 217:
07064
07065
07066 #line 2194 "ripper.y"
07067 {
07068 #if 0
07069 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tCMP, (yyvsp[(3) - (3)].val));
07070 #endif
07071 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<=>"), (yyvsp[(3) - (3)].val));
07072
07073 ;}
07074 break;
07075
07076 case 218:
07077
07078
07079 #line 2202 "ripper.y"
07080 {
07081 #if 0
07082 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '>', (yyvsp[(3) - (3)].val));
07083 #endif
07084 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('>'), (yyvsp[(3) - (3)].val));
07085
07086 ;}
07087 break;
07088
07089 case 219:
07090
07091
07092 #line 2210 "ripper.y"
07093 {
07094 #if 0
07095 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tGEQ, (yyvsp[(3) - (3)].val));
07096 #endif
07097 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">="), (yyvsp[(3) - (3)].val));
07098
07099 ;}
07100 break;
07101
07102 case 220:
07103
07104
07105 #line 2218 "ripper.y"
07106 {
07107 #if 0
07108 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), '<', (yyvsp[(3) - (3)].val));
07109 #endif
07110 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ID2SYM('<'), (yyvsp[(3) - (3)].val));
07111
07112 ;}
07113 break;
07114
07115 case 221:
07116
07117
07118 #line 2226 "ripper.y"
07119 {
07120 #if 0
07121 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLEQ, (yyvsp[(3) - (3)].val));
07122 #endif
07123 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<="), (yyvsp[(3) - (3)].val));
07124
07125 ;}
07126 break;
07127
07128 case 222:
07129
07130
07131 #line 2234 "ripper.y"
07132 {
07133 #if 0
07134 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQ, (yyvsp[(3) - (3)].val));
07135 #endif
07136 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=="), (yyvsp[(3) - (3)].val));
07137
07138 ;}
07139 break;
07140
07141 case 223:
07142
07143
07144 #line 2242 "ripper.y"
07145 {
07146 #if 0
07147 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tEQQ, (yyvsp[(3) - (3)].val));
07148 #endif
07149 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("==="), (yyvsp[(3) - (3)].val));
07150
07151 ;}
07152 break;
07153
07154 case 224:
07155
07156
07157 #line 2250 "ripper.y"
07158 {
07159 #if 0
07160 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNEQ, (yyvsp[(3) - (3)].val));
07161 #endif
07162 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!="), (yyvsp[(3) - (3)].val));
07163
07164 ;}
07165 break;
07166
07167 case 225:
07168
07169
07170 #line 2258 "ripper.y"
07171 {
07172 #if 0
07173 (yyval.val) = match_op((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07174 if (nd_type((yyvsp[(1) - (3)].val)) == NODE_LIT && TYPE((yyvsp[(1) - (3)].val)->nd_lit) == T_REGEXP) {
07175 (yyval.val) = reg_named_capture_assign((yyvsp[(1) - (3)].val)->nd_lit, (yyval.val));
07176 }
07177 #endif
07178 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("=~"), (yyvsp[(3) - (3)].val));
07179
07180 ;}
07181 break;
07182
07183 case 226:
07184
07185
07186 #line 2269 "ripper.y"
07187 {
07188 #if 0
07189 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tNMATCH, (yyvsp[(3) - (3)].val));
07190 #endif
07191 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("!~"), (yyvsp[(3) - (3)].val));
07192
07193 ;}
07194 break;
07195
07196 case 227:
07197
07198
07199 #line 2277 "ripper.y"
07200 {
07201 #if 0
07202 (yyval.val) = call_uni_op(cond((yyvsp[(2) - (2)].val)), '!');
07203 #endif
07204 (yyval.val) = dispatch2(unary, ID2SYM('!'), (yyvsp[(2) - (2)].val));
07205
07206 ;}
07207 break;
07208
07209 case 228:
07210
07211
07212 #line 2285 "ripper.y"
07213 {
07214 #if 0
07215 (yyval.val) = call_uni_op((yyvsp[(2) - (2)].val), '~');
07216 #endif
07217 (yyval.val) = dispatch2(unary, ID2SYM('~'), (yyvsp[(2) - (2)].val));
07218
07219 ;}
07220 break;
07221
07222 case 229:
07223
07224
07225 #line 2293 "ripper.y"
07226 {
07227 #if 0
07228 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tLSHFT, (yyvsp[(3) - (3)].val));
07229 #endif
07230 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("<<"), (yyvsp[(3) - (3)].val));
07231
07232 ;}
07233 break;
07234
07235 case 230:
07236
07237
07238 #line 2301 "ripper.y"
07239 {
07240 #if 0
07241 (yyval.val) = call_bin_op((yyvsp[(1) - (3)].val), tRSHFT, (yyvsp[(3) - (3)].val));
07242 #endif
07243 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern(">>"), (yyvsp[(3) - (3)].val));
07244
07245 ;}
07246 break;
07247
07248 case 231:
07249
07250
07251 #line 2309 "ripper.y"
07252 {
07253 #if 0
07254 (yyval.val) = logop(NODE_AND, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07255 #endif
07256 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("&&"), (yyvsp[(3) - (3)].val));
07257
07258 ;}
07259 break;
07260
07261 case 232:
07262
07263
07264 #line 2317 "ripper.y"
07265 {
07266 #if 0
07267 (yyval.val) = logop(NODE_OR, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07268 #endif
07269 (yyval.val) = dispatch3(binary, (yyvsp[(1) - (3)].val), ripper_intern("||"), (yyvsp[(3) - (3)].val));
07270
07271 ;}
07272 break;
07273
07274 case 233:
07275
07276
07277 #line 2324 "ripper.y"
07278 {in_defined = 1;;}
07279 break;
07280
07281 case 234:
07282
07283
07284 #line 2325 "ripper.y"
07285 {
07286 #if 0
07287 in_defined = 0;
07288 (yyval.val) = NEW_DEFINED((yyvsp[(4) - (4)].val));
07289 #endif
07290 in_defined = 0;
07291 (yyval.val) = dispatch1(defined, (yyvsp[(4) - (4)].val));
07292
07293 ;}
07294 break;
07295
07296 case 235:
07297
07298
07299 #line 2335 "ripper.y"
07300 {
07301 #if 0
07302 value_expr((yyvsp[(1) - (6)].val));
07303 (yyval.val) = NEW_IF(cond((yyvsp[(1) - (6)].val)), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
07304 fixpos((yyval.val), (yyvsp[(1) - (6)].val));
07305 #endif
07306 (yyval.val) = dispatch3(ifop, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(6) - (6)].val));
07307
07308 ;}
07309 break;
07310
07311 case 236:
07312
07313
07314 #line 2345 "ripper.y"
07315 {
07316 (yyval.val) = (yyvsp[(1) - (1)].val);
07317 ;}
07318 break;
07319
07320 case 237:
07321
07322
07323 #line 2351 "ripper.y"
07324 {
07325 #if 0
07326 value_expr((yyvsp[(1) - (1)].val));
07327 (yyval.val) = (yyvsp[(1) - (1)].val);
07328 if (!(yyval.val)) (yyval.val) = NEW_NIL();
07329 #endif
07330 (yyval.val) = (yyvsp[(1) - (1)].val);
07331
07332 ;}
07333 break;
07334
07335 case 239:
07336
07337
07338 #line 2364 "ripper.y"
07339 {
07340 (yyval.val) = (yyvsp[(1) - (2)].val);
07341 ;}
07342 break;
07343
07344 case 240:
07345
07346
07347 #line 2368 "ripper.y"
07348 {
07349 #if 0
07350 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
07351 #endif
07352 (yyval.val) = arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val));
07353
07354 ;}
07355 break;
07356
07357 case 241:
07358
07359
07360 #line 2376 "ripper.y"
07361 {
07362 #if 0
07363 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
07364 #endif
07365 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
07366
07367 ;}
07368 break;
07369
07370 case 242:
07371
07372
07373 #line 2386 "ripper.y"
07374 {
07375 #if 0
07376 (yyval.val) = (yyvsp[(2) - (3)].val);
07377 #endif
07378 (yyval.val) = dispatch1(arg_paren, escape_Qundef((yyvsp[(2) - (3)].val)));
07379
07380 ;}
07381 break;
07382
07383 case 247:
07384
07385
07386 #line 2404 "ripper.y"
07387 {
07388 #if 0
07389 value_expr((yyvsp[(1) - (1)].val));
07390 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
07391 #endif
07392 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val));
07393
07394 ;}
07395 break;
07396
07397 case 248:
07398
07399
07400 #line 2413 "ripper.y"
07401 {
07402 #if 0
07403 (yyval.val) = arg_blk_pass((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
07404 #endif
07405 (yyval.val) = arg_add_optblock((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
07406
07407 ;}
07408 break;
07409
07410 case 249:
07411
07412
07413 #line 2421 "ripper.y"
07414 {
07415 #if 0
07416 (yyval.val) = NEW_LIST(NEW_HASH((yyvsp[(1) - (2)].val)));
07417 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(2) - (2)].val));
07418 #endif
07419 (yyval.val) = arg_add_assocs(arg_new(), (yyvsp[(1) - (2)].val));
07420 (yyval.val) = arg_add_optblock((yyval.val), (yyvsp[(2) - (2)].val));
07421
07422 ;}
07423 break;
07424
07425 case 250:
07426
07427
07428 #line 2431 "ripper.y"
07429 {
07430 #if 0
07431 (yyval.val) = arg_append((yyvsp[(1) - (4)].val), NEW_HASH((yyvsp[(3) - (4)].val)));
07432 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[(4) - (4)].val));
07433 #endif
07434 (yyval.val) = arg_add_optblock(arg_add_assocs((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val)), (yyvsp[(4) - (4)].val));
07435
07436 ;}
07437 break;
07438
07439 case 251:
07440
07441
07442 #line 2442 "ripper.y"
07443 {
07444 (yyval.val) = arg_add_block(arg_new(), (yyvsp[(1) - (1)].val));
07445 ;}
07446 break;
07447
07448 case 252:
07449
07450
07451 #line 2448 "ripper.y"
07452 {
07453 (yyval.val) = cmdarg_stack;
07454 CMDARG_PUSH(1);
07455 ;}
07456 break;
07457
07458 case 253:
07459
07460
07461 #line 2453 "ripper.y"
07462 {
07463
07464 cmdarg_stack = (yyvsp[(1) - (2)].val);
07465 (yyval.val) = (yyvsp[(2) - (2)].val);
07466 ;}
07467 break;
07468
07469 case 254:
07470
07471
07472 #line 2461 "ripper.y"
07473 {
07474 #if 0
07475 (yyval.val) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].val));
07476 #endif
07477 (yyval.val) = (yyvsp[(2) - (2)].val);
07478
07479 ;}
07480 break;
07481
07482 case 255:
07483
07484
07485 #line 2471 "ripper.y"
07486 {
07487 (yyval.val) = (yyvsp[(2) - (2)].val);
07488 ;}
07489 break;
07490
07491 case 256:
07492
07493
07494 #line 2475 "ripper.y"
07495 {
07496 (yyval.val) = 0;
07497 ;}
07498 break;
07499
07500 case 257:
07501
07502
07503 #line 2479 "ripper.y"
07504 {
07505 (yyval.val) = 0;
07506 ;}
07507 break;
07508
07509 case 258:
07510
07511
07512 #line 2485 "ripper.y"
07513 {
07514 #if 0
07515 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
07516 #endif
07517 (yyval.val) = arg_add(arg_new(), (yyvsp[(1) - (1)].val));
07518
07519 ;}
07520 break;
07521
07522 case 259:
07523
07524
07525 #line 2493 "ripper.y"
07526 {
07527 #if 0
07528 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val));
07529 #endif
07530 (yyval.val) = arg_add_star(arg_new(), (yyvsp[(2) - (2)].val));
07531
07532 ;}
07533 break;
07534
07535 case 260:
07536
07537
07538 #line 2501 "ripper.y"
07539 {
07540 #if 0
07541 NODE *n1;
07542 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) {
07543 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val));
07544 }
07545 else {
07546 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07547 }
07548 #endif
07549 (yyval.val) = arg_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07550
07551 ;}
07552 break;
07553
07554 case 261:
07555
07556
07557 #line 2515 "ripper.y"
07558 {
07559 #if 0
07560 NODE *n1;
07561 if ((nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) {
07562 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val));
07563 }
07564 else {
07565 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
07566 }
07567 #endif
07568 (yyval.val) = arg_add_star((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
07569
07570 ;}
07571 break;
07572
07573 case 262:
07574
07575
07576 #line 2531 "ripper.y"
07577 {
07578 #if 0
07579 NODE *n1;
07580 if ((n1 = splat_array((yyvsp[(1) - (3)].val))) != 0) {
07581 (yyval.val) = list_append(n1, (yyvsp[(3) - (3)].val));
07582 }
07583 else {
07584 (yyval.val) = arg_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07585 }
07586 #endif
07587 (yyval.val) = mrhs_add(args2mrhs((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
07588
07589 ;}
07590 break;
07591
07592 case 263:
07593
07594
07595 #line 2545 "ripper.y"
07596 {
07597 #if 0
07598 NODE *n1;
07599 if (nd_type((yyvsp[(4) - (4)].val)) == NODE_ARRAY &&
07600 (n1 = splat_array((yyvsp[(1) - (4)].val))) != 0) {
07601 (yyval.val) = list_concat(n1, (yyvsp[(4) - (4)].val));
07602 }
07603 else {
07604 (yyval.val) = arg_concat((yyvsp[(1) - (4)].val), (yyvsp[(4) - (4)].val));
07605 }
07606 #endif
07607 (yyval.val) = mrhs_add_star(args2mrhs((yyvsp[(1) - (4)].val)), (yyvsp[(4) - (4)].val));
07608
07609 ;}
07610 break;
07611
07612 case 264:
07613
07614
07615 #line 2560 "ripper.y"
07616 {
07617 #if 0
07618 (yyval.val) = NEW_SPLAT((yyvsp[(2) - (2)].val));
07619 #endif
07620 (yyval.val) = mrhs_add_star(mrhs_new(), (yyvsp[(2) - (2)].val));
07621
07622 ;}
07623 break;
07624
07625 case 273:
07626
07627
07628 #line 2578 "ripper.y"
07629 {
07630 #if 0
07631 (yyval.val) = NEW_FCALL((yyvsp[(1) - (1)].val), 0);
07632 #endif
07633 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (1)].val)), arg_new());
07634
07635 ;}
07636 break;
07637
07638 case 274:
07639
07640
07641 #line 2586 "ripper.y"
07642 {
07643 #if 0
07644 (yyval.num) = ruby_sourceline;
07645 #endif
07646
07647 ;}
07648 break;
07649
07650 case 275:
07651
07652
07653 #line 2594 "ripper.y"
07654 {
07655 #if 0
07656 if ((yyvsp[(3) - (4)].val) == NULL) {
07657 (yyval.val) = NEW_NIL();
07658 }
07659 else {
07660 if (nd_type((yyvsp[(3) - (4)].val)) == NODE_RESCUE ||
07661 nd_type((yyvsp[(3) - (4)].val)) == NODE_ENSURE)
07662 nd_set_line((yyvsp[(3) - (4)].val), (yyvsp[(2) - (4)].num));
07663 (yyval.val) = NEW_BEGIN((yyvsp[(3) - (4)].val));
07664 }
07665 nd_set_line((yyval.val), (yyvsp[(2) - (4)].num));
07666 #endif
07667 (yyval.val) = dispatch1(begin, (yyvsp[(3) - (4)].val));
07668
07669 ;}
07670 break;
07671
07672 case 276:
07673
07674
07675 #line 2610 "ripper.y"
07676 {lex_state = EXPR_ENDARG;;}
07677 break;
07678
07679 case 277:
07680
07681
07682 #line 2611 "ripper.y"
07683 {
07684 rb_warning0("(...) interpreted as grouped expression");
07685 #if 0
07686 (yyval.val) = (yyvsp[(2) - (4)].val);
07687 #endif
07688 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val));
07689
07690 ;}
07691 break;
07692
07693 case 278:
07694
07695
07696 #line 2620 "ripper.y"
07697 {
07698 #if 0
07699 (yyval.val) = (yyvsp[(2) - (3)].val);
07700 #endif
07701 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val));
07702
07703 ;}
07704 break;
07705
07706 case 279:
07707
07708
07709 #line 2628 "ripper.y"
07710 {
07711 #if 0
07712 (yyval.val) = NEW_COLON2((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07713 #endif
07714 (yyval.val) = dispatch2(const_path_ref, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
07715
07716 ;}
07717 break;
07718
07719 case 280:
07720
07721
07722 #line 2636 "ripper.y"
07723 {
07724 #if 0
07725 (yyval.val) = NEW_COLON3((yyvsp[(2) - (2)].val));
07726 #endif
07727 (yyval.val) = dispatch1(top_const_ref, (yyvsp[(2) - (2)].val));
07728
07729 ;}
07730 break;
07731
07732 case 281:
07733
07734
07735 #line 2644 "ripper.y"
07736 {
07737 #if 0
07738 if ((yyvsp[(2) - (3)].val) == 0) {
07739 (yyval.val) = NEW_ZARRAY();
07740 }
07741 else {
07742 (yyval.val) = (yyvsp[(2) - (3)].val);
07743 }
07744 #endif
07745 (yyval.val) = dispatch1(array, escape_Qundef((yyvsp[(2) - (3)].val)));
07746
07747 ;}
07748 break;
07749
07750 case 282:
07751
07752
07753 #line 2657 "ripper.y"
07754 {
07755 #if 0
07756 (yyval.val) = NEW_HASH((yyvsp[(2) - (3)].val));
07757 #endif
07758 (yyval.val) = dispatch1(hash, escape_Qundef((yyvsp[(2) - (3)].val)));
07759
07760 ;}
07761 break;
07762
07763 case 283:
07764
07765
07766 #line 2665 "ripper.y"
07767 {
07768 #if 0
07769 (yyval.val) = NEW_RETURN(0);
07770 #endif
07771 (yyval.val) = dispatch0(return0);
07772
07773 ;}
07774 break;
07775
07776 case 284:
07777
07778
07779 #line 2673 "ripper.y"
07780 {
07781 #if 0
07782 (yyval.val) = new_yield((yyvsp[(3) - (4)].val));
07783 #endif
07784 (yyval.val) = dispatch1(yield, dispatch1(paren, (yyvsp[(3) - (4)].val)));
07785
07786 ;}
07787 break;
07788
07789 case 285:
07790
07791
07792 #line 2681 "ripper.y"
07793 {
07794 #if 0
07795 (yyval.val) = NEW_YIELD(0, Qfalse);
07796 #endif
07797 (yyval.val) = dispatch1(yield, dispatch1(paren, arg_new()));
07798
07799 ;}
07800 break;
07801
07802 case 286:
07803
07804
07805 #line 2689 "ripper.y"
07806 {
07807 #if 0
07808 (yyval.val) = NEW_YIELD(0, Qfalse);
07809 #endif
07810 (yyval.val) = dispatch0(yield0);
07811
07812 ;}
07813 break;
07814
07815 case 287:
07816
07817
07818 #line 2696 "ripper.y"
07819 {in_defined = 1;;}
07820 break;
07821
07822 case 288:
07823
07824
07825 #line 2697 "ripper.y"
07826 {
07827 #if 0
07828 in_defined = 0;
07829 (yyval.val) = NEW_DEFINED((yyvsp[(5) - (6)].val));
07830 #endif
07831 in_defined = 0;
07832 (yyval.val) = dispatch1(defined, (yyvsp[(5) - (6)].val));
07833
07834 ;}
07835 break;
07836
07837 case 289:
07838
07839
07840 #line 2707 "ripper.y"
07841 {
07842 #if 0
07843 (yyval.val) = call_uni_op(cond((yyvsp[(3) - (4)].val)), '!');
07844 #endif
07845 (yyval.val) = dispatch2(unary, ripper_intern("not"), (yyvsp[(3) - (4)].val));
07846
07847 ;}
07848 break;
07849
07850 case 290:
07851
07852
07853 #line 2715 "ripper.y"
07854 {
07855 #if 0
07856 (yyval.val) = call_uni_op(cond(NEW_NIL()), '!');
07857 #endif
07858 (yyval.val) = dispatch2(unary, ripper_intern("not"), Qnil);
07859
07860 ;}
07861 break;
07862
07863 case 291:
07864
07865
07866 #line 2723 "ripper.y"
07867 {
07868 #if 0
07869 (yyvsp[(2) - (2)].val)->nd_iter = NEW_FCALL((yyvsp[(1) - (2)].val), 0);
07870 (yyval.val) = (yyvsp[(2) - (2)].val);
07871 fixpos((yyvsp[(2) - (2)].val)->nd_iter, (yyvsp[(2) - (2)].val));
07872 #endif
07873 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), arg_new());
07874 (yyval.val) = method_add_block((yyval.val), (yyvsp[(2) - (2)].val));
07875
07876 ;}
07877 break;
07878
07879 case 293:
07880
07881
07882 #line 2735 "ripper.y"
07883 {
07884 #if 0
07885 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val));
07886 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val);
07887 (yyval.val) = (yyvsp[(2) - (2)].val);
07888 fixpos((yyval.val), (yyvsp[(1) - (2)].val));
07889 #endif
07890 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
07891
07892 ;}
07893 break;
07894
07895 case 294:
07896
07897
07898 #line 2746 "ripper.y"
07899 {
07900 (yyval.val) = (yyvsp[(2) - (2)].val);
07901 ;}
07902 break;
07903
07904 case 295:
07905
07906
07907 #line 2753 "ripper.y"
07908 {
07909 #if 0
07910 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
07911 fixpos((yyval.val), (yyvsp[(2) - (6)].val));
07912 #endif
07913 (yyval.val) = dispatch3(if, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val)));
07914
07915 ;}
07916 break;
07917
07918 case 296:
07919
07920
07921 #line 2765 "ripper.y"
07922 {
07923 #if 0
07924 (yyval.val) = NEW_UNLESS(cond((yyvsp[(2) - (6)].val)), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
07925 fixpos((yyval.val), (yyvsp[(2) - (6)].val));
07926 #endif
07927 (yyval.val) = dispatch3(unless, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), escape_Qundef((yyvsp[(5) - (6)].val)));
07928
07929 ;}
07930 break;
07931
07932 case 297:
07933
07934
07935 #line 2773 "ripper.y"
07936 {COND_PUSH(1);;}
07937 break;
07938
07939 case 298:
07940
07941
07942 #line 2773 "ripper.y"
07943 {COND_POP();;}
07944 break;
07945
07946 case 299:
07947
07948
07949 #line 2776 "ripper.y"
07950 {
07951 #if 0
07952 (yyval.val) = NEW_WHILE(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1);
07953 fixpos((yyval.val), (yyvsp[(3) - (7)].val));
07954 #endif
07955 (yyval.val) = dispatch2(while, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val));
07956
07957 ;}
07958 break;
07959
07960 case 300:
07961
07962
07963 #line 2784 "ripper.y"
07964 {COND_PUSH(1);;}
07965 break;
07966
07967 case 301:
07968
07969
07970 #line 2784 "ripper.y"
07971 {COND_POP();;}
07972 break;
07973
07974 case 302:
07975
07976
07977 #line 2787 "ripper.y"
07978 {
07979 #if 0
07980 (yyval.val) = NEW_UNTIL(cond((yyvsp[(3) - (7)].val)), (yyvsp[(6) - (7)].val), 1);
07981 fixpos((yyval.val), (yyvsp[(3) - (7)].val));
07982 #endif
07983 (yyval.val) = dispatch2(until, (yyvsp[(3) - (7)].val), (yyvsp[(6) - (7)].val));
07984
07985 ;}
07986 break;
07987
07988 case 303:
07989
07990
07991 #line 2798 "ripper.y"
07992 {
07993 #if 0
07994 (yyval.val) = NEW_CASE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
07995 fixpos((yyval.val), (yyvsp[(2) - (5)].val));
07996 #endif
07997 (yyval.val) = dispatch2(case, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
07998
07999 ;}
08000 break;
08001
08002 case 304:
08003
08004
08005 #line 2807 "ripper.y"
08006 {
08007 #if 0
08008 (yyval.val) = NEW_CASE(0, (yyvsp[(3) - (4)].val));
08009 #endif
08010 (yyval.val) = dispatch2(case, Qnil, (yyvsp[(3) - (4)].val));
08011
08012 ;}
08013 break;
08014
08015 case 305:
08016
08017
08018 #line 2815 "ripper.y"
08019 {COND_PUSH(1);;}
08020 break;
08021
08022 case 306:
08023
08024
08025 #line 2817 "ripper.y"
08026 {COND_POP();;}
08027 break;
08028
08029 case 307:
08030
08031
08032 #line 2820 "ripper.y"
08033 {
08034 #if 0
08035
08036
08037
08038
08039
08040
08041
08042
08043
08044 ID id = internal_id();
08045 ID *tbl = ALLOC_N(ID, 2);
08046 NODE *m = NEW_ARGS_AUX(0, 0);
08047 NODE *args, *scope;
08048
08049 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_MASGN) {
08050
08051
08052
08053
08054 NODE *one = NEW_LIST(NEW_LIT(INT2FIX(1)));
08055 NODE *zero = NEW_LIST(NEW_LIT(INT2FIX(0)));
08056 m->nd_next = block_append(
08057 NEW_IF(
08058 NEW_NODE(NODE_AND,
08059 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("length"), 0),
08060 rb_intern("=="), one),
08061 NEW_CALL(NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero),
08062 rb_intern("kind_of?"), NEW_LIST(NEW_LIT(rb_cArray))),
08063 0),
08064 NEW_DASGN_CURR(id,
08065 NEW_CALL(NEW_DVAR(id), rb_intern("[]"), zero)),
08066 0),
08067 node_assign((yyvsp[(2) - (9)].val), NEW_DVAR(id)));
08068
08069 args = new_args(m, 0, id, 0, 0);
08070 }
08071 else {
08072 if (nd_type((yyvsp[(2) - (9)].val)) == NODE_LASGN ||
08073 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN ||
08074 nd_type((yyvsp[(2) - (9)].val)) == NODE_DASGN_CURR) {
08075 (yyvsp[(2) - (9)].val)->nd_value = NEW_DVAR(id);
08076 m->nd_plen = 1;
08077 m->nd_next = (yyvsp[(2) - (9)].val);
08078 args = new_args(m, 0, 0, 0, 0);
08079 }
08080 else {
08081 m->nd_next = node_assign(NEW_MASGN(NEW_LIST((yyvsp[(2) - (9)].val)), 0), NEW_DVAR(id));
08082 args = new_args(m, 0, id, 0, 0);
08083 }
08084 }
08085 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].val), args);
08086 tbl[0] = 1; tbl[1] = id;
08087 (yyval.val) = NEW_FOR(0, (yyvsp[(5) - (9)].val), scope);
08088 fixpos((yyval.val), (yyvsp[(2) - (9)].val));
08089 #endif
08090 (yyval.val) = dispatch3(for, (yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(8) - (9)].val));
08091
08092 ;}
08093 break;
08094
08095 case 308:
08096
08097
08098 #line 2881 "ripper.y"
08099 {
08100 if (in_def || in_single)
08101 yyerror("class definition in method body");
08102 local_push(0);
08103 #if 0
08104 (yyval.num) = ruby_sourceline;
08105 #endif
08106
08107 ;}
08108 break;
08109
08110 case 309:
08111
08112
08113 #line 2892 "ripper.y"
08114 {
08115 #if 0
08116 (yyval.val) = NEW_CLASS((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(3) - (6)].val));
08117 nd_set_line((yyval.val), (yyvsp[(4) - (6)].num));
08118 #endif
08119 (yyval.val) = dispatch3(class, (yyvsp[(2) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val));
08120
08121 local_pop();
08122 ;}
08123 break;
08124
08125 case 310:
08126
08127
08128 #line 2902 "ripper.y"
08129 {
08130 (yyval.num) = in_def;
08131 in_def = 0;
08132 ;}
08133 break;
08134
08135 case 311:
08136
08137
08138 #line 2907 "ripper.y"
08139 {
08140 (yyval.num) = in_single;
08141 in_single = 0;
08142 local_push(0);
08143 ;}
08144 break;
08145
08146 case 312:
08147
08148
08149 #line 2914 "ripper.y"
08150 {
08151 #if 0
08152 (yyval.val) = NEW_SCLASS((yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val));
08153 fixpos((yyval.val), (yyvsp[(3) - (8)].val));
08154 #endif
08155 (yyval.val) = dispatch2(sclass, (yyvsp[(3) - (8)].val), (yyvsp[(7) - (8)].val));
08156
08157 local_pop();
08158 in_def = (yyvsp[(4) - (8)].num);
08159 in_single = (yyvsp[(6) - (8)].num);
08160 ;}
08161 break;
08162
08163 case 313:
08164
08165
08166 #line 2926 "ripper.y"
08167 {
08168 if (in_def || in_single)
08169 yyerror("module definition in method body");
08170 local_push(0);
08171 #if 0
08172 (yyval.num) = ruby_sourceline;
08173 #endif
08174
08175 ;}
08176 break;
08177
08178 case 314:
08179
08180
08181 #line 2937 "ripper.y"
08182 {
08183 #if 0
08184 (yyval.val) = NEW_MODULE((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
08185 nd_set_line((yyval.val), (yyvsp[(3) - (5)].num));
08186 #endif
08187 (yyval.val) = dispatch2(module, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val));
08188
08189 local_pop();
08190 ;}
08191 break;
08192
08193 case 315:
08194
08195
08196 #line 2947 "ripper.y"
08197 {
08198 (yyval.id) = cur_mid;
08199 cur_mid = (yyvsp[(2) - (2)].val);
08200 in_def++;
08201 local_push(0);
08202 ;}
08203 break;
08204
08205 case 316:
08206
08207
08208 #line 2956 "ripper.y"
08209 {
08210 #if 0
08211 NODE *body = remove_begin((yyvsp[(5) - (6)].val));
08212 reduce_nodes(&body);
08213 (yyval.val) = NEW_DEFN((yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), body, NOEX_PRIVATE);
08214 nd_set_line((yyval.val), (yyvsp[(1) - (6)].num));
08215 #endif
08216 (yyval.val) = dispatch3(def, (yyvsp[(2) - (6)].val), (yyvsp[(4) - (6)].val), (yyvsp[(5) - (6)].val));
08217
08218 local_pop();
08219 in_def--;
08220 cur_mid = (yyvsp[(3) - (6)].id);
08221 ;}
08222 break;
08223
08224 case 317:
08225
08226
08227 #line 2969 "ripper.y"
08228 {lex_state = EXPR_FNAME;;}
08229 break;
08230
08231 case 318:
08232
08233
08234 #line 2970 "ripper.y"
08235 {
08236 in_single++;
08237 lex_state = EXPR_ENDFN;
08238 local_push(0);
08239 ;}
08240 break;
08241
08242 case 319:
08243
08244
08245 #line 2978 "ripper.y"
08246 {
08247 #if 0
08248 NODE *body = remove_begin((yyvsp[(8) - (9)].val));
08249 reduce_nodes(&body);
08250 (yyval.val) = NEW_DEFS((yyvsp[(2) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), body);
08251 nd_set_line((yyval.val), (yyvsp[(1) - (9)].num));
08252 #endif
08253 (yyval.val) = dispatch5(defs, (yyvsp[(2) - (9)].val), (yyvsp[(3) - (9)].val), (yyvsp[(5) - (9)].val), (yyvsp[(7) - (9)].val), (yyvsp[(8) - (9)].val));
08254
08255 local_pop();
08256 in_single--;
08257 ;}
08258 break;
08259
08260 case 320:
08261
08262
08263 #line 2991 "ripper.y"
08264 {
08265 #if 0
08266 (yyval.val) = NEW_BREAK(0);
08267 #endif
08268 (yyval.val) = dispatch1(break, arg_new());
08269
08270 ;}
08271 break;
08272
08273 case 321:
08274
08275
08276 #line 2999 "ripper.y"
08277 {
08278 #if 0
08279 (yyval.val) = NEW_NEXT(0);
08280 #endif
08281 (yyval.val) = dispatch1(next, arg_new());
08282
08283 ;}
08284 break;
08285
08286 case 322:
08287
08288
08289 #line 3007 "ripper.y"
08290 {
08291 #if 0
08292 (yyval.val) = NEW_REDO();
08293 #endif
08294 (yyval.val) = dispatch0(redo);
08295
08296 ;}
08297 break;
08298
08299 case 323:
08300
08301
08302 #line 3015 "ripper.y"
08303 {
08304 #if 0
08305 (yyval.val) = NEW_RETRY();
08306 #endif
08307 (yyval.val) = dispatch0(retry);
08308
08309 ;}
08310 break;
08311
08312 case 324:
08313
08314
08315 #line 3025 "ripper.y"
08316 {
08317 #if 0
08318 value_expr((yyvsp[(1) - (1)].val));
08319 (yyval.val) = (yyvsp[(1) - (1)].val);
08320 if (!(yyval.val)) (yyval.val) = NEW_NIL();
08321 #endif
08322 (yyval.val) = (yyvsp[(1) - (1)].val);
08323
08324 ;}
08325 break;
08326
08327 case 325:
08328
08329
08330 #line 3037 "ripper.y"
08331 {
08332 token_info_push("begin");
08333 ;}
08334 break;
08335
08336 case 326:
08337
08338
08339 #line 3043 "ripper.y"
08340 {
08341 token_info_push("if");
08342 ;}
08343 break;
08344
08345 case 327:
08346
08347
08348 #line 3049 "ripper.y"
08349 {
08350 token_info_push("unless");
08351 ;}
08352 break;
08353
08354 case 328:
08355
08356
08357 #line 3055 "ripper.y"
08358 {
08359 token_info_push("while");
08360 ;}
08361 break;
08362
08363 case 329:
08364
08365
08366 #line 3061 "ripper.y"
08367 {
08368 token_info_push("until");
08369 ;}
08370 break;
08371
08372 case 330:
08373
08374
08375 #line 3067 "ripper.y"
08376 {
08377 token_info_push("case");
08378 ;}
08379 break;
08380
08381 case 331:
08382
08383
08384 #line 3073 "ripper.y"
08385 {
08386 token_info_push("for");
08387 ;}
08388 break;
08389
08390 case 332:
08391
08392
08393 #line 3079 "ripper.y"
08394 {
08395 token_info_push("class");
08396 ;}
08397 break;
08398
08399 case 333:
08400
08401
08402 #line 3085 "ripper.y"
08403 {
08404 token_info_push("module");
08405 ;}
08406 break;
08407
08408 case 334:
08409
08410
08411 #line 3091 "ripper.y"
08412 {
08413 token_info_push("def");
08414 #if 0
08415 (yyval.num) = ruby_sourceline;
08416 #endif
08417
08418 ;}
08419 break;
08420
08421 case 335:
08422
08423
08424 #line 3101 "ripper.y"
08425 {
08426 token_info_pop("end");
08427 ;}
08428 break;
08429
08430 case 336:
08431
08432
08433 #line 3109 "ripper.y"
08434 { (yyval.val) = Qnil; ;}
08435 break;
08436
08437 case 338:
08438
08439
08440 #line 3115 "ripper.y"
08441 { (yyval.val) = (yyvsp[(2) - (2)].val); ;}
08442 break;
08443
08444 case 339:
08445
08446
08447 #line 3122 "ripper.y"
08448 { (yyval.val) = Qnil; ;}
08449 break;
08450
08451 case 342:
08452
08453
08454 #line 3131 "ripper.y"
08455 {
08456 #if 0
08457 (yyval.val) = NEW_IF(cond((yyvsp[(2) - (5)].val)), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
08458 fixpos((yyval.val), (yyvsp[(2) - (5)].val));
08459 #endif
08460 (yyval.val) = dispatch3(elsif, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val)));
08461
08462 ;}
08463 break;
08464
08465 case 344:
08466
08467
08468 #line 3143 "ripper.y"
08469 {
08470 #if 0
08471 (yyval.val) = (yyvsp[(2) - (2)].val);
08472 #endif
08473 (yyval.val) = dispatch1(else, (yyvsp[(2) - (2)].val));
08474
08475 ;}
08476 break;
08477
08478 case 347:
08479
08480
08481 #line 3157 "ripper.y"
08482 {
08483 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
08484 #if 0
08485 #endif
08486 (yyval.val) = dispatch1(mlhs_paren, (yyval.val));
08487
08488 ;}
08489 break;
08490
08491 case 348:
08492
08493
08494 #line 3165 "ripper.y"
08495 {
08496 #if 0
08497 (yyval.val) = (yyvsp[(2) - (3)].val);
08498 #endif
08499 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
08500
08501 ;}
08502 break;
08503
08504 case 349:
08505
08506
08507 #line 3175 "ripper.y"
08508 {
08509 #if 0
08510 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
08511 #endif
08512 (yyval.val) = mlhs_add(mlhs_new(), (yyvsp[(1) - (1)].val));
08513
08514 ;}
08515 break;
08516
08517 case 350:
08518
08519
08520 #line 3183 "ripper.y"
08521 {
08522 #if 0
08523 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
08524 #endif
08525 (yyval.val) = mlhs_add((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
08526
08527 ;}
08528 break;
08529
08530 case 351:
08531
08532
08533 #line 3193 "ripper.y"
08534 {
08535 #if 0
08536 (yyval.val) = NEW_MASGN((yyvsp[(1) - (1)].val), 0);
08537 #endif
08538 (yyval.val) = (yyvsp[(1) - (1)].val);
08539
08540 ;}
08541 break;
08542
08543 case 352:
08544
08545
08546 #line 3201 "ripper.y"
08547 {
08548 (yyval.val) = assignable((yyvsp[(4) - (4)].val), 0);
08549 #if 0
08550 (yyval.val) = NEW_MASGN((yyvsp[(1) - (4)].val), (yyval.val));
08551 #endif
08552 (yyval.val) = mlhs_add_star((yyvsp[(1) - (4)].val), (yyval.val));
08553
08554 ;}
08555 break;
08556
08557 case 353:
08558
08559
08560 #line 3210 "ripper.y"
08561 {
08562 (yyval.val) = assignable((yyvsp[(4) - (6)].val), 0);
08563 #if 0
08564 (yyval.val) = NEW_MASGN((yyvsp[(1) - (6)].val), NEW_POSTARG((yyval.val), (yyvsp[(6) - (6)].val)));
08565 #endif
08566 (yyval.val) = mlhs_add_star((yyvsp[(1) - (6)].val), (yyval.val));
08567
08568 ;}
08569 break;
08570
08571 case 354:
08572
08573
08574 #line 3219 "ripper.y"
08575 {
08576 #if 0
08577 (yyval.val) = NEW_MASGN((yyvsp[(1) - (3)].val), -1);
08578 #endif
08579 (yyval.val) = mlhs_add_star((yyvsp[(1) - (3)].val), Qnil);
08580
08581 ;}
08582 break;
08583
08584 case 355:
08585
08586
08587 #line 3227 "ripper.y"
08588 {
08589 #if 0
08590 (yyval.val) = NEW_MASGN((yyvsp[(1) - (5)].val), NEW_POSTARG(-1, (yyvsp[(5) - (5)].val)));
08591 #endif
08592 (yyval.val) = mlhs_add_star((yyvsp[(1) - (5)].val), (yyvsp[(5) - (5)].val));
08593
08594 ;}
08595 break;
08596
08597 case 356:
08598
08599
08600 #line 3235 "ripper.y"
08601 {
08602 (yyval.val) = assignable((yyvsp[(2) - (2)].val), 0);
08603 #if 0
08604 (yyval.val) = NEW_MASGN(0, (yyval.val));
08605 #endif
08606 (yyval.val) = mlhs_add_star(mlhs_new(), (yyval.val));
08607
08608 ;}
08609 break;
08610
08611 case 357:
08612
08613
08614 #line 3244 "ripper.y"
08615 {
08616 (yyval.val) = assignable((yyvsp[(2) - (4)].val), 0);
08617 #if 0
08618 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyval.val), (yyvsp[(4) - (4)].val)));
08619 #endif
08620 #if 0
08621 TODO: Check me
08622 #endif
08623 (yyval.val) = mlhs_add_star((yyval.val), (yyvsp[(4) - (4)].val));
08624
08625 ;}
08626 break;
08627
08628 case 358:
08629
08630
08631 #line 3256 "ripper.y"
08632 {
08633 #if 0
08634 (yyval.val) = NEW_MASGN(0, -1);
08635 #endif
08636 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
08637
08638 ;}
08639 break;
08640
08641 case 359:
08642
08643
08644 #line 3264 "ripper.y"
08645 {
08646 #if 0
08647 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(-1, (yyvsp[(3) - (3)].val)));
08648 #endif
08649 (yyval.val) = mlhs_add_star(mlhs_new(), Qnil);
08650
08651 ;}
08652 break;
08653
08654 case 360:
08655
08656
08657 #line 3274 "ripper.y"
08658 {
08659 #if 0
08660 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val));
08661 #endif
08662 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val)));
08663
08664 ;}
08665 break;
08666
08667 case 361:
08668
08669
08670 #line 3282 "ripper.y"
08671 {
08672 #if 0
08673 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val));
08674 #endif
08675 (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val)));
08676
08677 ;}
08678 break;
08679
08680 case 362:
08681
08682
08683 #line 3290 "ripper.y"
08684 {
08685 #if 0
08686 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val));
08687 #endif
08688 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
08689
08690 ;}
08691 break;
08692
08693 case 363:
08694
08695
08696 #line 3298 "ripper.y"
08697 {
08698 #if 0
08699 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
08700 #endif
08701 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
08702
08703 ;}
08704 break;
08705
08706 case 364:
08707
08708
08709 #line 3306 "ripper.y"
08710 {
08711 #if 0
08712 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
08713 #endif
08714 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
08715
08716 ;}
08717 break;
08718
08719 case 365:
08720
08721
08722 #line 3314 "ripper.y"
08723 {
08724 #if 0
08725 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 1, 0, 0);
08726 #endif
08727 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil, Qnil);
08728 dispatch1(excessed_comma, (yyval.val));
08729
08730 ;}
08731 break;
08732
08733 case 366:
08734
08735
08736 #line 3323 "ripper.y"
08737 {
08738 #if 0
08739 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
08740 #endif
08741 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
08742
08743 ;}
08744 break;
08745
08746 case 367:
08747
08748
08749 #line 3331 "ripper.y"
08750 {
08751 #if 0
08752 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val));
08753 #endif
08754 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil,Qnil, Qnil, escape_Qundef((yyvsp[(2) - (2)].val)));
08755
08756 ;}
08757 break;
08758
08759 case 368:
08760
08761
08762 #line 3339 "ripper.y"
08763 {
08764 #if 0
08765 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
08766 #endif
08767 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
08768
08769 ;}
08770 break;
08771
08772 case 369:
08773
08774
08775 #line 3347 "ripper.y"
08776 {
08777 #if 0
08778 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
08779 #endif
08780 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
08781
08782 ;}
08783 break;
08784
08785 case 370:
08786
08787
08788 #line 3355 "ripper.y"
08789 {
08790 #if 0
08791 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val));
08792 #endif
08793 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
08794
08795 ;}
08796 break;
08797
08798 case 371:
08799
08800
08801 #line 3363 "ripper.y"
08802 {
08803 #if 0
08804 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
08805 #endif
08806 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
08807
08808 ;}
08809 break;
08810
08811 case 372:
08812
08813
08814 #line 3371 "ripper.y"
08815 {
08816 #if 0
08817 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val));
08818 #endif
08819 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil, escape_Qundef((yyvsp[(2) - (2)].val)));
08820
08821 ;}
08822 break;
08823
08824 case 373:
08825
08826
08827 #line 3379 "ripper.y"
08828 {
08829 #if 0
08830 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
08831 #endif
08832 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
08833
08834 ;}
08835 break;
08836
08837 case 374:
08838
08839
08840 #line 3387 "ripper.y"
08841 {
08842 #if 0
08843 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val));
08844 #endif
08845 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val));
08846
08847 ;}
08848 break;
08849
08850 case 376:
08851
08852
08853 #line 3398 "ripper.y"
08854 {
08855 command_start = TRUE;
08856 ;}
08857 break;
08858
08859 case 377:
08860
08861
08862 #line 3404 "ripper.y"
08863 {
08864 #if 0
08865 (yyval.val) = 0;
08866 #endif
08867 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
08868 escape_Qundef((yyvsp[(2) - (3)].val)));
08869
08870 ;}
08871 break;
08872
08873 case 378:
08874
08875
08876 #line 3413 "ripper.y"
08877 {
08878 #if 0
08879 (yyval.val) = 0;
08880 #endif
08881 (yyval.val) = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil),
08882 Qnil);
08883
08884 ;}
08885 break;
08886
08887 case 379:
08888
08889
08890 #line 3422 "ripper.y"
08891 {
08892 #if 0
08893 (yyval.val) = (yyvsp[(2) - (4)].val);
08894 #endif
08895 (yyval.val) = blockvar_new(escape_Qundef((yyvsp[(2) - (4)].val)), escape_Qundef((yyvsp[(3) - (4)].val)));
08896
08897 ;}
08898 break;
08899
08900 case 381:
08901
08902
08903 #line 3434 "ripper.y"
08904 {
08905 #if 0
08906 (yyval.val) = 0;
08907 #endif
08908 (yyval.val) = (yyvsp[(2) - (2)].val);
08909
08910 ;}
08911 break;
08912
08913 case 382:
08914
08915
08916 #line 3446 "ripper.y"
08917 {
08918 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
08919 ;}
08920 break;
08921
08922 case 383:
08923
08924
08925 #line 3453 "ripper.y"
08926 {
08927 rb_ary_push((yyval.val), (yyvsp[(3) - (3)].val));
08928 ;}
08929 break;
08930
08931 case 384:
08932
08933
08934 #line 3460 "ripper.y"
08935 {
08936 new_bv(get_id((yyvsp[(1) - (1)].val)));
08937 #if 0
08938 #endif
08939 (yyval.val) = get_value((yyvsp[(1) - (1)].val));
08940
08941 ;}
08942 break;
08943
08944 case 385:
08945
08946
08947 #line 3468 "ripper.y"
08948 {
08949 (yyval.val) = 0;
08950 ;}
08951 break;
08952
08953 case 386:
08954
08955
08956 #line 3473 "ripper.y"
08957 {
08958 (yyval.vars) = dyna_push();
08959 ;}
08960 break;
08961
08962 case 387:
08963
08964
08965 #line 3476 "ripper.y"
08966 {
08967 (yyval.num) = lpar_beg;
08968 lpar_beg = ++paren_nest;
08969 ;}
08970 break;
08971
08972 case 388:
08973
08974
08975 #line 3482 "ripper.y"
08976 {
08977 lpar_beg = (yyvsp[(2) - (4)].num);
08978 #if 0
08979 (yyval.val) = (yyvsp[(3) - (4)].val);
08980 (yyval.val)->nd_body = NEW_SCOPE((yyvsp[(3) - (4)].val)->nd_head, (yyvsp[(4) - (4)].val));
08981 #endif
08982 (yyval.val) = dispatch2(lambda, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
08983
08984 dyna_pop((yyvsp[(1) - (4)].vars));
08985 ;}
08986 break;
08987
08988 case 389:
08989
08990
08991 #line 3495 "ripper.y"
08992 {
08993 #if 0
08994 (yyval.val) = NEW_LAMBDA((yyvsp[(2) - (4)].val));
08995 #endif
08996 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (4)].val));
08997
08998 ;}
08999 break;
09000
09001 case 390:
09002
09003
09004 #line 3503 "ripper.y"
09005 {
09006 #if 0
09007 (yyval.val) = NEW_LAMBDA((yyvsp[(1) - (1)].val));
09008 #endif
09009 (yyval.val) = (yyvsp[(1) - (1)].val);
09010
09011 ;}
09012 break;
09013
09014 case 391:
09015
09016
09017 #line 3513 "ripper.y"
09018 {
09019 (yyval.val) = (yyvsp[(2) - (3)].val);
09020 ;}
09021 break;
09022
09023 case 392:
09024
09025
09026 #line 3517 "ripper.y"
09027 {
09028 (yyval.val) = (yyvsp[(2) - (3)].val);
09029 ;}
09030 break;
09031
09032 case 393:
09033
09034
09035 #line 3523 "ripper.y"
09036 {
09037 (yyvsp[(1) - (1)].vars) = dyna_push();
09038 #if 0
09039 (yyval.num) = ruby_sourceline;
09040 #endif
09041 ;}
09042 break;
09043
09044 case 394:
09045
09046
09047 #line 3532 "ripper.y"
09048 {
09049 #if 0
09050 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
09051 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
09052 #endif
09053 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
09054
09055 dyna_pop((yyvsp[(1) - (5)].vars));
09056 ;}
09057 break;
09058
09059 case 395:
09060
09061
09062 #line 3544 "ripper.y"
09063 {
09064 #if 0
09065 if (nd_type((yyvsp[(1) - (2)].val)) == NODE_YIELD) {
09066 compile_error(PARSER_ARG "block given to yield");
09067 }
09068 else {
09069 block_dup_check((yyvsp[(1) - (2)].val)->nd_args, (yyvsp[(2) - (2)].val));
09070 }
09071 (yyvsp[(2) - (2)].val)->nd_iter = (yyvsp[(1) - (2)].val);
09072 (yyval.val) = (yyvsp[(2) - (2)].val);
09073 fixpos((yyval.val), (yyvsp[(1) - (2)].val));
09074 #endif
09075 (yyval.val) = method_add_block((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09076
09077 ;}
09078 break;
09079
09080 case 396:
09081
09082
09083 #line 3560 "ripper.y"
09084 {
09085 #if 0
09086 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09087 #endif
09088 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
09089 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09090
09091 ;}
09092 break;
09093
09094 case 397:
09095
09096
09097 #line 3569 "ripper.y"
09098 {
09099 #if 0
09100 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09101 #endif
09102 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_intern("::"), (yyvsp[(3) - (4)].val));
09103 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09104
09105 ;}
09106 break;
09107
09108 case 398:
09109
09110
09111 #line 3580 "ripper.y"
09112 {
09113 #if 0
09114 (yyval.val) = NEW_FCALL((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09115 fixpos((yyval.val), (yyvsp[(2) - (2)].val));
09116 #endif
09117 (yyval.val) = method_arg(dispatch1(fcall, (yyvsp[(1) - (2)].val)), (yyvsp[(2) - (2)].val));
09118
09119 ;}
09120 break;
09121
09122 case 399:
09123
09124
09125 #line 3589 "ripper.y"
09126 {
09127 #if 0
09128 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09129 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
09130 #endif
09131 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
09132 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09133
09134 ;}
09135 break;
09136
09137 case 400:
09138
09139
09140 #line 3599 "ripper.y"
09141 {
09142 #if 0
09143 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
09144 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
09145 #endif
09146 (yyval.val) = dispatch3(call, (yyvsp[(1) - (4)].val), ripper_id2sym('.'), (yyvsp[(3) - (4)].val));
09147 (yyval.val) = method_optarg((yyval.val), (yyvsp[(4) - (4)].val));
09148
09149 ;}
09150 break;
09151
09152 case 401:
09153
09154
09155 #line 3609 "ripper.y"
09156 {
09157 #if 0
09158 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), 0);
09159 #endif
09160 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"), (yyvsp[(3) - (3)].val));
09161
09162 ;}
09163 break;
09164
09165 case 402:
09166
09167
09168 #line 3617 "ripper.y"
09169 {
09170 #if 0
09171 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val));
09172 fixpos((yyval.val), (yyvsp[(1) - (3)].val));
09173 #endif
09174 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_id2sym('.'),
09175 ripper_intern("call"));
09176 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val));
09177
09178 ;}
09179 break;
09180
09181 case 403:
09182
09183
09184 #line 3628 "ripper.y"
09185 {
09186 #if 0
09187 (yyval.val) = NEW_CALL((yyvsp[(1) - (3)].val), rb_intern("call"), (yyvsp[(3) - (3)].val));
09188 fixpos((yyval.val), (yyvsp[(1) - (3)].val));
09189 #endif
09190 (yyval.val) = dispatch3(call, (yyvsp[(1) - (3)].val), ripper_intern("::"),
09191 ripper_intern("call"));
09192 (yyval.val) = method_optarg((yyval.val), (yyvsp[(3) - (3)].val));
09193
09194 ;}
09195 break;
09196
09197 case 404:
09198
09199
09200 #line 3639 "ripper.y"
09201 {
09202 #if 0
09203 (yyval.val) = NEW_SUPER((yyvsp[(2) - (2)].val));
09204 #endif
09205 (yyval.val) = dispatch1(super, (yyvsp[(2) - (2)].val));
09206
09207 ;}
09208 break;
09209
09210 case 405:
09211
09212
09213 #line 3647 "ripper.y"
09214 {
09215 #if 0
09216 (yyval.val) = NEW_ZSUPER();
09217 #endif
09218 (yyval.val) = dispatch0(zsuper);
09219
09220 ;}
09221 break;
09222
09223 case 406:
09224
09225
09226 #line 3655 "ripper.y"
09227 {
09228 #if 0
09229 if ((yyvsp[(1) - (4)].val) && nd_type((yyvsp[(1) - (4)].val)) == NODE_SELF)
09230 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[(3) - (4)].val));
09231 else
09232 (yyval.val) = NEW_CALL((yyvsp[(1) - (4)].val), tAREF, (yyvsp[(3) - (4)].val));
09233 fixpos((yyval.val), (yyvsp[(1) - (4)].val));
09234 #endif
09235 (yyval.val) = dispatch2(aref, (yyvsp[(1) - (4)].val), escape_Qundef((yyvsp[(3) - (4)].val)));
09236
09237 ;}
09238 break;
09239
09240 case 407:
09241
09242
09243 #line 3669 "ripper.y"
09244 {
09245 (yyvsp[(1) - (1)].vars) = dyna_push();
09246 #if 0
09247 (yyval.num) = ruby_sourceline;
09248 #endif
09249
09250 ;}
09251 break;
09252
09253 case 408:
09254
09255
09256 #line 3678 "ripper.y"
09257 {
09258 #if 0
09259 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
09260 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
09261 #endif
09262 (yyval.val) = dispatch2(brace_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
09263
09264 dyna_pop((yyvsp[(1) - (5)].vars));
09265 ;}
09266 break;
09267
09268 case 409:
09269
09270
09271 #line 3688 "ripper.y"
09272 {
09273 (yyvsp[(1) - (1)].vars) = dyna_push();
09274 #if 0
09275 (yyval.num) = ruby_sourceline;
09276 #endif
09277
09278 ;}
09279 break;
09280
09281 case 410:
09282
09283
09284 #line 3697 "ripper.y"
09285 {
09286 #if 0
09287 (yyval.val) = NEW_ITER((yyvsp[(3) - (5)].val),(yyvsp[(4) - (5)].val));
09288 nd_set_line((yyval.val), (yyvsp[(2) - (5)].num));
09289 #endif
09290 (yyval.val) = dispatch2(do_block, escape_Qundef((yyvsp[(3) - (5)].val)), (yyvsp[(4) - (5)].val));
09291
09292 dyna_pop((yyvsp[(1) - (5)].vars));
09293 ;}
09294 break;
09295
09296 case 411:
09297
09298
09299 #line 3711 "ripper.y"
09300 {
09301 #if 0
09302 (yyval.val) = NEW_WHEN((yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].val));
09303 #endif
09304 (yyval.val) = dispatch3(when, (yyvsp[(2) - (5)].val), (yyvsp[(4) - (5)].val), escape_Qundef((yyvsp[(5) - (5)].val)));
09305
09306 ;}
09307 break;
09308
09309 case 414:
09310
09311
09312 #line 3727 "ripper.y"
09313 {
09314 #if 0
09315 if ((yyvsp[(3) - (6)].val)) {
09316 (yyvsp[(3) - (6)].val) = node_assign((yyvsp[(3) - (6)].val), NEW_ERRINFO());
09317 (yyvsp[(5) - (6)].val) = block_append((yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val));
09318 }
09319 (yyval.val) = NEW_RESBODY((yyvsp[(2) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
09320 fixpos((yyval.val), (yyvsp[(2) - (6)].val)?(yyvsp[(2) - (6)].val):(yyvsp[(5) - (6)].val));
09321 #endif
09322 (yyval.val) = dispatch4(rescue,
09323 escape_Qundef((yyvsp[(2) - (6)].val)),
09324 escape_Qundef((yyvsp[(3) - (6)].val)),
09325 escape_Qundef((yyvsp[(5) - (6)].val)),
09326 escape_Qundef((yyvsp[(6) - (6)].val)));
09327
09328 ;}
09329 break;
09330
09331 case 416:
09332
09333
09334 #line 3747 "ripper.y"
09335 {
09336 #if 0
09337 (yyval.val) = NEW_LIST((yyvsp[(1) - (1)].val));
09338 #endif
09339 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
09340
09341 ;}
09342 break;
09343
09344 case 417:
09345
09346
09347 #line 3755 "ripper.y"
09348 {
09349 #if 0
09350 if (!((yyval.val) = splat_array((yyvsp[(1) - (1)].val)))) (yyval.val) = (yyvsp[(1) - (1)].val);
09351 #endif
09352 (yyval.val) = (yyvsp[(1) - (1)].val);
09353
09354 ;}
09355 break;
09356
09357 case 419:
09358
09359
09360 #line 3766 "ripper.y"
09361 {
09362 (yyval.val) = (yyvsp[(2) - (2)].val);
09363 ;}
09364 break;
09365
09366 case 421:
09367
09368
09369 #line 3773 "ripper.y"
09370 {
09371 #if 0
09372 (yyval.val) = (yyvsp[(2) - (2)].val);
09373 #endif
09374 (yyval.val) = dispatch1(ensure, (yyvsp[(2) - (2)].val));
09375
09376 ;}
09377 break;
09378
09379 case 424:
09380
09381
09382 #line 3785 "ripper.y"
09383 {
09384 #if 0
09385 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[(1) - (1)].val)));
09386 #endif
09387 (yyval.val) = dispatch1(symbol_literal, (yyvsp[(1) - (1)].val));
09388
09389 ;}
09390 break;
09391
09392 case 426:
09393
09394
09395 #line 3796 "ripper.y"
09396 {
09397 #if 0
09398 NODE *node = (yyvsp[(1) - (1)].val);
09399 if (!node) {
09400 node = NEW_STR(STR_NEW0());
09401 }
09402 else {
09403 node = evstr2dstr(node);
09404 }
09405 (yyval.val) = node;
09406 #endif
09407 (yyval.val) = (yyvsp[(1) - (1)].val);
09408
09409 ;}
09410 break;
09411
09412 case 429:
09413
09414
09415 #line 3815 "ripper.y"
09416 {
09417 #if 0
09418 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09419 #endif
09420 (yyval.val) = dispatch2(string_concat, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09421
09422 ;}
09423 break;
09424
09425 case 430:
09426
09427
09428 #line 3825 "ripper.y"
09429 {
09430 #if 0
09431 (yyval.val) = (yyvsp[(2) - (3)].val);
09432 #endif
09433 (yyval.val) = dispatch1(string_literal, (yyvsp[(2) - (3)].val));
09434
09435 ;}
09436 break;
09437
09438 case 431:
09439
09440
09441 #line 3835 "ripper.y"
09442 {
09443 #if 0
09444 NODE *node = (yyvsp[(2) - (3)].val);
09445 if (!node) {
09446 node = NEW_XSTR(STR_NEW0());
09447 }
09448 else {
09449 switch (nd_type(node)) {
09450 case NODE_STR:
09451 nd_set_type(node, NODE_XSTR);
09452 break;
09453 case NODE_DSTR:
09454 nd_set_type(node, NODE_DXSTR);
09455 break;
09456 default:
09457 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node));
09458 break;
09459 }
09460 }
09461 (yyval.val) = node;
09462 #endif
09463 (yyval.val) = dispatch1(xstring_literal, (yyvsp[(2) - (3)].val));
09464
09465 ;}
09466 break;
09467
09468 case 432:
09469
09470
09471 #line 3862 "ripper.y"
09472 {
09473 #if 0
09474 int options = (yyvsp[(3) - (3)].val);
09475 NODE *node = (yyvsp[(2) - (3)].val);
09476 NODE *list, *prev;
09477 if (!node) {
09478 node = NEW_LIT(reg_compile(STR_NEW0(), options));
09479 }
09480 else switch (nd_type(node)) {
09481 case NODE_STR:
09482 {
09483 VALUE src = node->nd_lit;
09484 nd_set_type(node, NODE_LIT);
09485 node->nd_lit = reg_compile(src, options);
09486 }
09487 break;
09488 default:
09489 node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, NEW_LIST(node));
09490 case NODE_DSTR:
09491 if (options & RE_OPTION_ONCE) {
09492 nd_set_type(node, NODE_DREGX_ONCE);
09493 }
09494 else {
09495 nd_set_type(node, NODE_DREGX);
09496 }
09497 node->nd_cflag = options & RE_OPTION_MASK;
09498 if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options);
09499 for (list = (prev = node)->nd_next; list; list = list->nd_next) {
09500 if (nd_type(list->nd_head) == NODE_STR) {
09501 VALUE tail = list->nd_head->nd_lit;
09502 if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
09503 if (!literal_concat0(parser, prev->nd_lit, tail)) {
09504 node = 0;
09505 break;
09506 }
09507 rb_str_resize(tail, 0);
09508 prev->nd_next = list->nd_next;
09509 rb_gc_force_recycle((VALUE)list->nd_head);
09510 rb_gc_force_recycle((VALUE)list);
09511 list = prev;
09512 }
09513 else {
09514 prev = list;
09515 }
09516 }
09517 else {
09518 prev = 0;
09519 }
09520 }
09521 if (!node->nd_next) {
09522 VALUE src = node->nd_lit;
09523 nd_set_type(node, NODE_LIT);
09524 node->nd_lit = reg_compile(src, options);
09525 }
09526 break;
09527 }
09528 (yyval.val) = node;
09529 #endif
09530 (yyval.val) = dispatch2(regexp_literal, (yyvsp[(2) - (3)].val), (yyvsp[(3) - (3)].val));
09531
09532 ;}
09533 break;
09534
09535 case 433:
09536
09537
09538 #line 3926 "ripper.y"
09539 {
09540 #if 0
09541 (yyval.val) = NEW_ZARRAY();
09542 #endif
09543 (yyval.val) = dispatch0(words_new);
09544
09545 ;}
09546 break;
09547
09548 case 434:
09549
09550
09551 #line 3934 "ripper.y"
09552 {
09553 (yyval.val) = (yyvsp[(2) - (3)].val);
09554 ;}
09555 break;
09556
09557 case 435:
09558
09559
09560 #line 3940 "ripper.y"
09561 {
09562 #if 0
09563 (yyval.val) = 0;
09564 #endif
09565 (yyval.val) = dispatch0(words_new);
09566
09567 ;}
09568 break;
09569
09570 case 436:
09571
09572
09573 #line 3948 "ripper.y"
09574 {
09575 #if 0
09576 (yyval.val) = list_append((yyvsp[(1) - (3)].val), evstr2dstr((yyvsp[(2) - (3)].val)));
09577 #endif
09578 (yyval.val) = dispatch2(words_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
09579
09580 ;}
09581 break;
09582
09583 case 437:
09584
09585
09586 #line 3960 "ripper.y"
09587 {
09588 (yyval.val) = dispatch0(word_new);
09589 (yyval.val) = dispatch2(word_add, (yyval.val), (yyvsp[(1) - (1)].val));
09590 ;}
09591 break;
09592
09593 case 438:
09594
09595
09596 #line 3966 "ripper.y"
09597 {
09598 #if 0
09599 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09600 #endif
09601 (yyval.val) = dispatch2(word_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09602
09603 ;}
09604 break;
09605
09606 case 439:
09607
09608
09609 #line 3976 "ripper.y"
09610 {
09611 #if 0
09612 (yyval.val) = NEW_ZARRAY();
09613 #endif
09614 (yyval.val) = dispatch0(qwords_new);
09615
09616 ;}
09617 break;
09618
09619 case 440:
09620
09621
09622 #line 3984 "ripper.y"
09623 {
09624 (yyval.val) = (yyvsp[(2) - (3)].val);
09625 ;}
09626 break;
09627
09628 case 441:
09629
09630
09631 #line 3990 "ripper.y"
09632 {
09633 #if 0
09634 (yyval.val) = 0;
09635 #endif
09636 (yyval.val) = dispatch0(qwords_new);
09637
09638 ;}
09639 break;
09640
09641 case 442:
09642
09643
09644 #line 3998 "ripper.y"
09645 {
09646 #if 0
09647 (yyval.val) = list_append((yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
09648 #endif
09649 (yyval.val) = dispatch2(qwords_add, (yyvsp[(1) - (3)].val), (yyvsp[(2) - (3)].val));
09650
09651 ;}
09652 break;
09653
09654 case 443:
09655
09656
09657 #line 4008 "ripper.y"
09658 {
09659 #if 0
09660 (yyval.val) = 0;
09661 #endif
09662 (yyval.val) = dispatch0(string_content);
09663
09664 ;}
09665 break;
09666
09667 case 444:
09668
09669
09670 #line 4016 "ripper.y"
09671 {
09672 #if 0
09673 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09674 #endif
09675 (yyval.val) = dispatch2(string_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09676
09677 ;}
09678 break;
09679
09680 case 445:
09681
09682
09683 #line 4026 "ripper.y"
09684 {
09685 #if 0
09686 (yyval.val) = 0;
09687 #endif
09688 (yyval.val) = dispatch0(xstring_new);
09689
09690 ;}
09691 break;
09692
09693 case 446:
09694
09695
09696 #line 4034 "ripper.y"
09697 {
09698 #if 0
09699 (yyval.val) = literal_concat((yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09700 #endif
09701 (yyval.val) = dispatch2(xstring_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09702
09703 ;}
09704 break;
09705
09706 case 447:
09707
09708
09709 #line 4044 "ripper.y"
09710 {
09711 #if 0
09712 (yyval.val) = 0;
09713 #endif
09714 (yyval.val) = dispatch0(regexp_new);
09715
09716 ;}
09717 break;
09718
09719 case 448:
09720
09721
09722 #line 4052 "ripper.y"
09723 {
09724 #if 0
09725 NODE *head = (yyvsp[(1) - (2)].val), *tail = (yyvsp[(2) - (2)].val);
09726 if (!head) {
09727 (yyval.val) = tail;
09728 }
09729 else if (!tail) {
09730 (yyval.val) = head;
09731 }
09732 else {
09733 switch (nd_type(head)) {
09734 case NODE_STR:
09735 nd_set_type(head, NODE_DSTR);
09736 break;
09737 case NODE_DSTR:
09738 break;
09739 default:
09740 head = list_append(NEW_DSTR(Qnil), head);
09741 break;
09742 }
09743 (yyval.val) = list_append(head, tail);
09744 }
09745 #endif
09746 (yyval.val) = dispatch2(regexp_add, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
09747
09748 ;}
09749 break;
09750
09751 case 450:
09752
09753
09754 #line 4082 "ripper.y"
09755 {
09756 (yyval.node) = lex_strterm;
09757 lex_strterm = 0;
09758 lex_state = EXPR_BEG;
09759 ;}
09760 break;
09761
09762 case 451:
09763
09764
09765 #line 4088 "ripper.y"
09766 {
09767 #if 0
09768 lex_strterm = (yyvsp[(2) - (3)].node);
09769 (yyval.val) = NEW_EVSTR((yyvsp[(3) - (3)].val));
09770 #endif
09771 lex_strterm = (yyvsp[(2) - (3)].node);
09772 (yyval.val) = dispatch1(string_dvar, (yyvsp[(3) - (3)].val));
09773
09774 ;}
09775 break;
09776
09777 case 452:
09778
09779
09780 #line 4098 "ripper.y"
09781 {
09782 (yyvsp[(1) - (1)].val) = cond_stack;
09783 (yyval.val) = cmdarg_stack;
09784 cond_stack = 0;
09785 cmdarg_stack = 0;
09786 ;}
09787 break;
09788
09789 case 453:
09790
09791
09792 #line 4104 "ripper.y"
09793 {
09794 (yyval.node) = lex_strterm;
09795 lex_strterm = 0;
09796 lex_state = EXPR_BEG;
09797 ;}
09798 break;
09799
09800 case 454:
09801
09802
09803 #line 4110 "ripper.y"
09804 {
09805 cond_stack = (yyvsp[(1) - (5)].val);
09806 cmdarg_stack = (yyvsp[(2) - (5)].val);
09807 lex_strterm = (yyvsp[(3) - (5)].node);
09808 #if 0
09809 if ((yyvsp[(4) - (5)].val)) (yyvsp[(4) - (5)].val)->flags &= ~NODE_FL_NEWLINE;
09810 (yyval.val) = new_evstr((yyvsp[(4) - (5)].val));
09811 #endif
09812 (yyval.val) = dispatch1(string_embexpr, (yyvsp[(4) - (5)].val));
09813
09814 ;}
09815 break;
09816
09817 case 455:
09818
09819
09820 #line 4124 "ripper.y"
09821 {
09822 #if 0
09823 (yyval.val) = NEW_GVAR((yyvsp[(1) - (1)].val));
09824 #endif
09825 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
09826
09827 ;}
09828 break;
09829
09830 case 456:
09831
09832
09833 #line 4132 "ripper.y"
09834 {
09835 #if 0
09836 (yyval.val) = NEW_IVAR((yyvsp[(1) - (1)].val));
09837 #endif
09838 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
09839
09840 ;}
09841 break;
09842
09843 case 457:
09844
09845
09846 #line 4140 "ripper.y"
09847 {
09848 #if 0
09849 (yyval.val) = NEW_CVAR((yyvsp[(1) - (1)].val));
09850 #endif
09851 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
09852
09853 ;}
09854 break;
09855
09856 case 459:
09857
09858
09859 #line 4151 "ripper.y"
09860 {
09861 lex_state = EXPR_END;
09862 #if 0
09863 (yyval.val) = (yyvsp[(2) - (2)].val);
09864 #endif
09865 (yyval.val) = dispatch1(symbol, (yyvsp[(2) - (2)].val));
09866
09867 ;}
09868 break;
09869
09870 case 464:
09871
09872
09873 #line 4168 "ripper.y"
09874 {
09875 lex_state = EXPR_END;
09876 #if 0
09877 if (!((yyval.val) = (yyvsp[(2) - (3)].val))) {
09878 (yyval.val) = NEW_LIT(ID2SYM(rb_intern("")));
09879 }
09880 else {
09881 VALUE lit;
09882
09883 switch (nd_type((yyval.val))) {
09884 case NODE_DSTR:
09885 nd_set_type((yyval.val), NODE_DSYM);
09886 break;
09887 case NODE_STR:
09888 lit = (yyval.val)->nd_lit;
09889 (yyval.val)->nd_lit = ID2SYM(rb_intern_str(lit));
09890 nd_set_type((yyval.val), NODE_LIT);
09891 break;
09892 default:
09893 (yyval.val) = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST((yyval.val)));
09894 break;
09895 }
09896 }
09897 #endif
09898 (yyval.val) = dispatch1(dyna_symbol, (yyvsp[(2) - (3)].val));
09899
09900 ;}
09901 break;
09902
09903 case 467:
09904
09905
09906 #line 4200 "ripper.y"
09907 {
09908 #if 0
09909 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val));
09910 #endif
09911 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
09912
09913 ;}
09914 break;
09915
09916 case 468:
09917
09918
09919 #line 4208 "ripper.y"
09920 {
09921 #if 0
09922 (yyval.val) = negate_lit((yyvsp[(2) - (2)].val));
09923 #endif
09924 (yyval.val) = dispatch2(unary, ripper_intern("-@"), (yyvsp[(2) - (2)].val));
09925
09926 ;}
09927 break;
09928
09929 case 474:
09930
09931
09932 #line 4222 "ripper.y"
09933 {ifndef_ripper((yyval.val) = keyword_nil);;}
09934 break;
09935
09936 case 475:
09937
09938
09939 #line 4223 "ripper.y"
09940 {ifndef_ripper((yyval.val) = keyword_self);;}
09941 break;
09942
09943 case 476:
09944
09945
09946 #line 4224 "ripper.y"
09947 {ifndef_ripper((yyval.val) = keyword_true);;}
09948 break;
09949
09950 case 477:
09951
09952
09953 #line 4225 "ripper.y"
09954 {ifndef_ripper((yyval.val) = keyword_false);;}
09955 break;
09956
09957 case 478:
09958
09959
09960 #line 4226 "ripper.y"
09961 {ifndef_ripper((yyval.val) = keyword__FILE__);;}
09962 break;
09963
09964 case 479:
09965
09966
09967 #line 4227 "ripper.y"
09968 {ifndef_ripper((yyval.val) = keyword__LINE__);;}
09969 break;
09970
09971 case 480:
09972
09973
09974 #line 4228 "ripper.y"
09975 {ifndef_ripper((yyval.val) = keyword__ENCODING__);;}
09976 break;
09977
09978 case 481:
09979
09980
09981 #line 4232 "ripper.y"
09982 {
09983 #if 0
09984 if (!((yyval.val) = gettable((yyvsp[(1) - (1)].val)))) (yyval.val) = NEW_BEGIN(0);
09985 #endif
09986 (yyval.val) = dispatch1(var_ref, (yyvsp[(1) - (1)].val));
09987
09988 ;}
09989 break;
09990
09991 case 482:
09992
09993
09994 #line 4242 "ripper.y"
09995 {
09996 (yyval.val) = assignable((yyvsp[(1) - (1)].val), 0);
09997 #if 0
09998 #endif
09999 (yyval.val) = dispatch1(var_field, (yyval.val));
10000
10001 ;}
10002 break;
10003
10004 case 485:
10005
10006
10007 #line 4256 "ripper.y"
10008 {
10009 #if 0
10010 (yyval.val) = 0;
10011 #endif
10012 (yyval.val) = Qnil;
10013
10014 ;}
10015 break;
10016
10017 case 486:
10018
10019
10020 #line 4264 "ripper.y"
10021 {
10022 lex_state = EXPR_BEG;
10023 ;}
10024 break;
10025
10026 case 487:
10027
10028
10029 #line 4268 "ripper.y"
10030 {
10031 (yyval.val) = (yyvsp[(3) - (4)].val);
10032 ;}
10033 break;
10034
10035 case 488:
10036
10037
10038 #line 4272 "ripper.y"
10039 {
10040 #if 0
10041 yyerrok;
10042 (yyval.val) = 0;
10043 #endif
10044 yyerrok;
10045 (yyval.val) = Qnil;
10046
10047 ;}
10048 break;
10049
10050 case 489:
10051
10052
10053 #line 4284 "ripper.y"
10054 {
10055 #if 0
10056 (yyval.val) = (yyvsp[(2) - (3)].val);
10057 #endif
10058 (yyval.val) = dispatch1(paren, (yyvsp[(2) - (3)].val));
10059
10060 lex_state = EXPR_BEG;
10061 command_start = TRUE;
10062 ;}
10063 break;
10064
10065 case 490:
10066
10067
10068 #line 4294 "ripper.y"
10069 {
10070 (yyval.val) = (yyvsp[(1) - (2)].val);
10071 ;}
10072 break;
10073
10074 case 491:
10075
10076
10077 #line 4300 "ripper.y"
10078 {
10079 #if 0
10080 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), 0, (yyvsp[(6) - (6)].val));
10081 #endif
10082 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), Qnil, escape_Qundef((yyvsp[(6) - (6)].val)));
10083
10084 ;}
10085 break;
10086
10087 case 492:
10088
10089
10090 #line 4308 "ripper.y"
10091 {
10092 #if 0
10093 (yyval.val) = new_args((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), (yyvsp[(8) - (8)].val));
10094 #endif
10095 (yyval.val) = params_new((yyvsp[(1) - (8)].val), (yyvsp[(3) - (8)].val), (yyvsp[(5) - (8)].val), (yyvsp[(7) - (8)].val), escape_Qundef((yyvsp[(8) - (8)].val)));
10096
10097 ;}
10098 break;
10099
10100 case 493:
10101
10102
10103 #line 4316 "ripper.y"
10104 {
10105 #if 0
10106 (yyval.val) = new_args((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, 0, (yyvsp[(4) - (4)].val));
10107 #endif
10108 (yyval.val) = params_new((yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
10109
10110 ;}
10111 break;
10112
10113 case 494:
10114
10115
10116 #line 4324 "ripper.y"
10117 {
10118 #if 0
10119 (yyval.val) = new_args((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), 0, (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
10120 #endif
10121 (yyval.val) = params_new((yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), Qnil, (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
10122
10123 ;}
10124 break;
10125
10126 case 495:
10127
10128
10129 #line 4332 "ripper.y"
10130 {
10131 #if 0
10132 (yyval.val) = new_args((yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
10133 #endif
10134 (yyval.val) = params_new((yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
10135
10136 ;}
10137 break;
10138
10139 case 496:
10140
10141
10142 #line 4340 "ripper.y"
10143 {
10144 #if 0
10145 (yyval.val) = new_args((yyvsp[(1) - (6)].val), 0, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
10146 #endif
10147 (yyval.val) = params_new((yyvsp[(1) - (6)].val), Qnil, (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
10148
10149 ;}
10150 break;
10151
10152 case 497:
10153
10154
10155 #line 4348 "ripper.y"
10156 {
10157 #if 0
10158 (yyval.val) = new_args((yyvsp[(1) - (2)].val), 0, 0, 0, (yyvsp[(2) - (2)].val));
10159 #endif
10160 (yyval.val) = params_new((yyvsp[(1) - (2)].val), Qnil, Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
10161
10162 ;}
10163 break;
10164
10165 case 498:
10166
10167
10168 #line 4356 "ripper.y"
10169 {
10170 #if 0
10171 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), 0, (yyvsp[(4) - (4)].val));
10172 #endif
10173 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), Qnil, escape_Qundef((yyvsp[(4) - (4)].val)));
10174
10175 ;}
10176 break;
10177
10178 case 499:
10179
10180
10181 #line 4364 "ripper.y"
10182 {
10183 #if 0
10184 (yyval.val) = new_args(0, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), (yyvsp[(6) - (6)].val));
10185 #endif
10186 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (6)].val), (yyvsp[(3) - (6)].val), (yyvsp[(5) - (6)].val), escape_Qundef((yyvsp[(6) - (6)].val)));
10187
10188 ;}
10189 break;
10190
10191 case 500:
10192
10193
10194 #line 4372 "ripper.y"
10195 {
10196 #if 0
10197 (yyval.val) = new_args(0, (yyvsp[(1) - (2)].val), 0, 0, (yyvsp[(2) - (2)].val));
10198 #endif
10199 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (2)].val), Qnil, Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
10200
10201 ;}
10202 break;
10203
10204 case 501:
10205
10206
10207 #line 4380 "ripper.y"
10208 {
10209 #if 0
10210 (yyval.val) = new_args(0, (yyvsp[(1) - (4)].val), 0, (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
10211 #endif
10212 (yyval.val) = params_new(Qnil, (yyvsp[(1) - (4)].val), Qnil, (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
10213
10214 ;}
10215 break;
10216
10217 case 502:
10218
10219
10220 #line 4388 "ripper.y"
10221 {
10222 #if 0
10223 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (2)].val), 0, (yyvsp[(2) - (2)].val));
10224 #endif
10225 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (2)].val), Qnil,escape_Qundef((yyvsp[(2) - (2)].val)));
10226
10227 ;}
10228 break;
10229
10230 case 503:
10231
10232
10233 #line 4396 "ripper.y"
10234 {
10235 #if 0
10236 (yyval.val) = new_args(0, 0, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), (yyvsp[(4) - (4)].val));
10237 #endif
10238 (yyval.val) = params_new(Qnil, Qnil, (yyvsp[(1) - (4)].val), (yyvsp[(3) - (4)].val), escape_Qundef((yyvsp[(4) - (4)].val)));
10239
10240 ;}
10241 break;
10242
10243 case 504:
10244
10245
10246 #line 4404 "ripper.y"
10247 {
10248 #if 0
10249 (yyval.val) = new_args(0, 0, 0, 0, (yyvsp[(1) - (1)].val));
10250 #endif
10251 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, (yyvsp[(1) - (1)].val));
10252
10253 ;}
10254 break;
10255
10256 case 505:
10257
10258
10259 #line 4412 "ripper.y"
10260 {
10261 #if 0
10262 (yyval.val) = new_args(0, 0, 0, 0, 0);
10263 #endif
10264 (yyval.val) = params_new(Qnil, Qnil, Qnil, Qnil, Qnil);
10265
10266 ;}
10267 break;
10268
10269 case 506:
10270
10271
10272 #line 4422 "ripper.y"
10273 {
10274 #if 0
10275 yyerror("formal argument cannot be a constant");
10276 (yyval.val) = 0;
10277 #endif
10278 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10279
10280 ;}
10281 break;
10282
10283 case 507:
10284
10285
10286 #line 4431 "ripper.y"
10287 {
10288 #if 0
10289 yyerror("formal argument cannot be an instance variable");
10290 (yyval.val) = 0;
10291 #endif
10292 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10293
10294 ;}
10295 break;
10296
10297 case 508:
10298
10299
10300 #line 4440 "ripper.y"
10301 {
10302 #if 0
10303 yyerror("formal argument cannot be a global variable");
10304 (yyval.val) = 0;
10305 #endif
10306 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10307
10308 ;}
10309 break;
10310
10311 case 509:
10312
10313
10314 #line 4449 "ripper.y"
10315 {
10316 #if 0
10317 yyerror("formal argument cannot be a class variable");
10318 (yyval.val) = 0;
10319 #endif
10320 (yyval.val) = dispatch1(param_error, (yyvsp[(1) - (1)].val));
10321
10322 ;}
10323 break;
10324
10325 case 511:
10326
10327
10328 #line 4461 "ripper.y"
10329 {
10330 formal_argument(get_id((yyvsp[(1) - (1)].val)));
10331 (yyval.val) = (yyvsp[(1) - (1)].val);
10332 ;}
10333 break;
10334
10335 case 512:
10336
10337
10338 #line 4468 "ripper.y"
10339 {
10340 arg_var(get_id((yyvsp[(1) - (1)].val)));
10341 #if 0
10342 (yyval.val) = NEW_ARGS_AUX((yyvsp[(1) - (1)].val), 1);
10343 #endif
10344 (yyval.val) = get_value((yyvsp[(1) - (1)].val));
10345
10346 ;}
10347 break;
10348
10349 case 513:
10350
10351
10352 #line 4477 "ripper.y"
10353 {
10354 ID tid = internal_id();
10355 arg_var(tid);
10356 #if 0
10357 if (dyna_in_block()) {
10358 (yyvsp[(2) - (3)].val)->nd_value = NEW_DVAR(tid);
10359 }
10360 else {
10361 (yyvsp[(2) - (3)].val)->nd_value = NEW_LVAR(tid);
10362 }
10363 (yyval.val) = NEW_ARGS_AUX(tid, 1);
10364 (yyval.val)->nd_next = (yyvsp[(2) - (3)].val);
10365 #endif
10366 (yyval.val) = dispatch1(mlhs_paren, (yyvsp[(2) - (3)].val));
10367
10368 ;}
10369 break;
10370
10371 case 514:
10372
10373
10374 #line 4498 "ripper.y"
10375 {
10376 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10377 ;}
10378 break;
10379
10380 case 515:
10381
10382
10383 #line 4503 "ripper.y"
10384 {
10385 #if 0
10386 (yyval.val) = (yyvsp[(1) - (3)].val);
10387 (yyval.val)->nd_plen++;
10388 (yyval.val)->nd_next = block_append((yyval.val)->nd_next, (yyvsp[(3) - (3)].val)->nd_next);
10389 rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].val));
10390 #endif
10391 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10392
10393 ;}
10394 break;
10395
10396 case 516:
10397
10398
10399 #line 4516 "ripper.y"
10400 {
10401 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val))));
10402 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10403 #if 0
10404 (yyval.val) = NEW_OPT_ARG(0, (yyval.val));
10405 #endif
10406 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val));
10407
10408 ;}
10409 break;
10410
10411 case 517:
10412
10413
10414 #line 4528 "ripper.y"
10415 {
10416 arg_var(formal_argument(get_id((yyvsp[(1) - (3)].val))));
10417 (yyval.val) = assignable((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10418 #if 0
10419 (yyval.val) = NEW_OPT_ARG(0, (yyval.val));
10420 #endif
10421 (yyval.val) = rb_assoc_new((yyval.val), (yyvsp[(3) - (3)].val));
10422
10423 ;}
10424 break;
10425
10426 case 518:
10427
10428
10429 #line 4540 "ripper.y"
10430 {
10431 #if 0
10432 (yyval.val) = (yyvsp[(1) - (1)].val);
10433 #endif
10434 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10435
10436 ;}
10437 break;
10438
10439 case 519:
10440
10441
10442 #line 4548 "ripper.y"
10443 {
10444 #if 0
10445 NODE *opts = (yyvsp[(1) - (3)].val);
10446
10447 while (opts->nd_next) {
10448 opts = opts->nd_next;
10449 }
10450 opts->nd_next = (yyvsp[(3) - (3)].val);
10451 (yyval.val) = (yyvsp[(1) - (3)].val);
10452 #endif
10453 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10454
10455 ;}
10456 break;
10457
10458 case 520:
10459
10460
10461 #line 4564 "ripper.y"
10462 {
10463 #if 0
10464 (yyval.val) = (yyvsp[(1) - (1)].val);
10465 #endif
10466 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10467
10468 ;}
10469 break;
10470
10471 case 521:
10472
10473
10474 #line 4572 "ripper.y"
10475 {
10476 #if 0
10477 NODE *opts = (yyvsp[(1) - (3)].val);
10478
10479 while (opts->nd_next) {
10480 opts = opts->nd_next;
10481 }
10482 opts->nd_next = (yyvsp[(3) - (3)].val);
10483 (yyval.val) = (yyvsp[(1) - (3)].val);
10484 #endif
10485 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10486
10487 ;}
10488 break;
10489
10490 case 524:
10491
10492
10493 #line 4592 "ripper.y"
10494 {
10495 #if 0
10496 if (!is_local_id((yyvsp[(2) - (2)].val)))
10497 yyerror("rest argument must be local variable");
10498 #endif
10499 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val))));
10500 #if 0
10501 (yyval.val) = (yyvsp[(2) - (2)].val);
10502 #endif
10503 (yyval.val) = dispatch1(rest_param, (yyvsp[(2) - (2)].val));
10504
10505 ;}
10506 break;
10507
10508 case 525:
10509
10510
10511 #line 4605 "ripper.y"
10512 {
10513 #if 0
10514 (yyval.val) = internal_id();
10515 arg_var((yyval.val));
10516 #endif
10517 (yyval.val) = dispatch1(rest_param, Qnil);
10518
10519 ;}
10520 break;
10521
10522 case 528:
10523
10524
10525 #line 4620 "ripper.y"
10526 {
10527 #if 0
10528 if (!is_local_id((yyvsp[(2) - (2)].val)))
10529 yyerror("block argument must be local variable");
10530 else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].val)))
10531 yyerror("duplicated block argument name");
10532 #endif
10533 arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].val))));
10534 #if 0
10535 (yyval.val) = (yyvsp[(2) - (2)].val);
10536 #endif
10537 (yyval.val) = dispatch1(blockarg, (yyvsp[(2) - (2)].val));
10538
10539 ;}
10540 break;
10541
10542 case 529:
10543
10544
10545 #line 4637 "ripper.y"
10546 {
10547 (yyval.val) = (yyvsp[(2) - (2)].val);
10548 ;}
10549 break;
10550
10551 case 530:
10552
10553
10554 #line 4641 "ripper.y"
10555 {
10556 #if 0
10557 (yyval.val) = 0;
10558 #endif
10559 (yyval.val) = Qundef;
10560
10561 ;}
10562 break;
10563
10564 case 531:
10565
10566
10567 #line 4651 "ripper.y"
10568 {
10569 #if 0
10570 value_expr((yyvsp[(1) - (1)].val));
10571 (yyval.val) = (yyvsp[(1) - (1)].val);
10572 if (!(yyval.val)) (yyval.val) = NEW_NIL();
10573 #endif
10574 (yyval.val) = (yyvsp[(1) - (1)].val);
10575
10576 ;}
10577 break;
10578
10579 case 532:
10580
10581
10582 #line 4660 "ripper.y"
10583 {lex_state = EXPR_BEG;;}
10584 break;
10585
10586 case 533:
10587
10588
10589 #line 4661 "ripper.y"
10590 {
10591 #if 0
10592 if ((yyvsp[(3) - (4)].val) == 0) {
10593 yyerror("can't define singleton method for ().");
10594 }
10595 else {
10596 switch (nd_type((yyvsp[(3) - (4)].val))) {
10597 case NODE_STR:
10598 case NODE_DSTR:
10599 case NODE_XSTR:
10600 case NODE_DXSTR:
10601 case NODE_DREGX:
10602 case NODE_LIT:
10603 case NODE_ARRAY:
10604 case NODE_ZARRAY:
10605 yyerror("can't define singleton method for literals");
10606 default:
10607 value_expr((yyvsp[(3) - (4)].val));
10608 break;
10609 }
10610 }
10611 (yyval.val) = (yyvsp[(3) - (4)].val);
10612 #endif
10613 (yyval.val) = dispatch1(paren, (yyvsp[(3) - (4)].val));
10614
10615 ;}
10616 break;
10617
10618 case 535:
10619
10620
10621 #line 4691 "ripper.y"
10622 {
10623 #if 0
10624 (yyval.val) = (yyvsp[(1) - (2)].val);
10625 #endif
10626 (yyval.val) = dispatch1(assoclist_from_args, (yyvsp[(1) - (2)].val));
10627
10628 ;}
10629 break;
10630
10631 case 536:
10632
10633
10634 #line 4703 "ripper.y"
10635 {
10636 (yyval.val) = rb_ary_new3(1, (yyvsp[(1) - (1)].val));
10637 ;}
10638 break;
10639
10640 case 537:
10641
10642
10643 #line 4708 "ripper.y"
10644 {
10645 #if 0
10646 (yyval.val) = list_concat((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10647 #endif
10648 (yyval.val) = rb_ary_push((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10649
10650 ;}
10651 break;
10652
10653 case 538:
10654
10655
10656 #line 4718 "ripper.y"
10657 {
10658 #if 0
10659 (yyval.val) = list_append(NEW_LIST((yyvsp[(1) - (3)].val)), (yyvsp[(3) - (3)].val));
10660 #endif
10661 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
10662
10663 ;}
10664 break;
10665
10666 case 539:
10667
10668
10669 #line 4726 "ripper.y"
10670 {
10671 #if 0
10672 (yyval.val) = list_append(NEW_LIST(NEW_LIT(ID2SYM((yyvsp[(1) - (2)].val)))), (yyvsp[(2) - (2)].val));
10673 #endif
10674 (yyval.val) = dispatch2(assoc_new, (yyvsp[(1) - (2)].val), (yyvsp[(2) - (2)].val));
10675
10676 ;}
10677 break;
10678
10679 case 550:
10680
10681
10682 #line 4754 "ripper.y"
10683 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
10684 break;
10685
10686 case 551:
10687
10688
10689 #line 4759 "ripper.y"
10690 { (yyval.val) = (yyvsp[(1) - (1)].val); ;}
10691 break;
10692
10693 case 561:
10694
10695
10696 #line 4782 "ripper.y"
10697 {yyerrok;;}
10698 break;
10699
10700 case 564:
10701
10702
10703 #line 4787 "ripper.y"
10704 {yyerrok;;}
10705 break;
10706
10707 case 565:
10708
10709
10710 #line 4791 "ripper.y"
10711 {
10712 #if 0
10713 (yyval.val) = 0;
10714 #endif
10715 (yyval.val) = Qundef;
10716
10717 ;}
10718 break;
10719
10720
10721
10722
10723 #line 10722 "parse.c"
10724 default: break;
10725 }
10726 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10727
10728 YYPOPSTACK (yylen);
10729 yylen = 0;
10730 YY_STACK_PRINT (yyss, yyssp);
10731
10732 *++yyvsp = yyval;
10733
10734
10735
10736
10737
10738 yyn = yyr1[yyn];
10739
10740 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10741 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10742 yystate = yytable[yystate];
10743 else
10744 yystate = yydefgoto[yyn - YYNTOKENS];
10745
10746 goto yynewstate;
10747
10748
10749
10750
10751
10752 yyerrlab:
10753
10754 if (!yyerrstatus)
10755 {
10756 ++yynerrs;
10757 #if ! YYERROR_VERBOSE
10758 parser_yyerror (parser, YY_("syntax error"));
10759 #else
10760 {
10761 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
10762 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
10763 {
10764 YYSIZE_T yyalloc = 2 * yysize;
10765 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
10766 yyalloc = YYSTACK_ALLOC_MAXIMUM;
10767 if (yymsg != yymsgbuf)
10768 YYSTACK_FREE (yymsg);
10769 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
10770 if (yymsg)
10771 yymsg_alloc = yyalloc;
10772 else
10773 {
10774 yymsg = yymsgbuf;
10775 yymsg_alloc = sizeof yymsgbuf;
10776 }
10777 }
10778
10779 if (0 < yysize && yysize <= yymsg_alloc)
10780 {
10781 (void) yysyntax_error (yymsg, yystate, yychar);
10782 parser_yyerror (parser, yymsg);
10783 }
10784 else
10785 {
10786 parser_yyerror (parser, YY_("syntax error"));
10787 if (yysize != 0)
10788 goto yyexhaustedlab;
10789 }
10790 }
10791 #endif
10792 }
10793
10794
10795
10796 if (yyerrstatus == 3)
10797 {
10798
10799
10800
10801 if (yychar <= YYEOF)
10802 {
10803
10804 if (yychar == YYEOF)
10805 YYABORT;
10806 }
10807 else
10808 {
10809 yydestruct ("Error: discarding",
10810 yytoken, &yylval, parser);
10811 yychar = YYEMPTY;
10812 }
10813 }
10814
10815
10816
10817 goto yyerrlab1;
10818
10819
10820
10821
10822
10823 yyerrorlab:
10824
10825
10826
10827
10828 if ( 0)
10829 goto yyerrorlab;
10830
10831
10832
10833 YYPOPSTACK (yylen);
10834 yylen = 0;
10835 YY_STACK_PRINT (yyss, yyssp);
10836 yystate = *yyssp;
10837 goto yyerrlab1;
10838
10839
10840
10841
10842
10843 yyerrlab1:
10844 yyerrstatus = 3;
10845
10846 for (;;)
10847 {
10848 yyn = yypact[yystate];
10849 if (yyn != YYPACT_NINF)
10850 {
10851 yyn += YYTERROR;
10852 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10853 {
10854 yyn = yytable[yyn];
10855 if (0 < yyn)
10856 break;
10857 }
10858 }
10859
10860
10861 if (yyssp == yyss)
10862 YYABORT;
10863
10864
10865 yydestruct ("Error: popping",
10866 yystos[yystate], yyvsp, parser);
10867 YYPOPSTACK (1);
10868 yystate = *yyssp;
10869 YY_STACK_PRINT (yyss, yyssp);
10870 }
10871
10872 *++yyvsp = yylval;
10873
10874
10875
10876 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
10877
10878 yystate = yyn;
10879 goto yynewstate;
10880
10881
10882
10883
10884
10885 yyacceptlab:
10886 yyresult = 0;
10887 goto yyreturn;
10888
10889
10890
10891
10892 yyabortlab:
10893 yyresult = 1;
10894 goto yyreturn;
10895
10896 #if !defined(yyoverflow) || YYERROR_VERBOSE
10897
10898
10899
10900 yyexhaustedlab:
10901 parser_yyerror (parser, YY_("memory exhausted"));
10902 yyresult = 2;
10903
10904 #endif
10905
10906 yyreturn:
10907 if (yychar != YYEMPTY)
10908 yydestruct ("Cleanup: discarding lookahead",
10909 yytoken, &yylval, parser);
10910
10911
10912 YYPOPSTACK (yylen);
10913 YY_STACK_PRINT (yyss, yyssp);
10914 while (yyssp != yyss)
10915 {
10916 yydestruct ("Cleanup: popping",
10917 yystos[*yyssp], yyvsp, parser);
10918 YYPOPSTACK (1);
10919 }
10920 #ifndef yyoverflow
10921 if (yyss != yyssa)
10922 YYSTACK_FREE (yyss);
10923 #endif
10924 #if YYERROR_VERBOSE
10925 if (yymsg != yymsgbuf)
10926 YYSTACK_FREE (yymsg);
10927 #endif
10928
10929 return YYID (yyresult);
10930 }
10931
10932
10933
10934
10935 #line 4799 "ripper.y"
10936
10937 # undef parser
10938 # undef yylex
10939 # undef yylval
10940 # define yylval (*((YYSTYPE*)(parser->parser_yylval)))
10941
10942 static int parser_regx_options(struct parser_params*);
10943 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**);
10944 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc);
10945 static int parser_parse_string(struct parser_params*,NODE*);
10946 static int parser_here_document(struct parser_params*,NODE*);
10947
10948
10949 # define nextc() parser_nextc(parser)
10950 # define pushback(c) parser_pushback(parser, c)
10951 # define newtok() parser_newtok(parser)
10952 # define tokspace(n) parser_tokspace(parser, n)
10953 # define tokadd(c) parser_tokadd(parser, c)
10954 # define tok_hex(numlen) parser_tok_hex(parser, numlen)
10955 # define read_escape(flags,e) parser_read_escape(parser, flags, e)
10956 # define tokadd_escape(e) parser_tokadd_escape(parser, e)
10957 # define regx_options() parser_regx_options(parser)
10958 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,f,t,p,n,e)
10959 # define parse_string(n) parser_parse_string(parser,n)
10960 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, c, enc)
10961 # define here_document(n) parser_here_document(parser,n)
10962 # define heredoc_identifier() parser_heredoc_identifier(parser)
10963 # define heredoc_restore(n) parser_heredoc_restore(parser,n)
10964 # define whole_match_p(e,l,i) parser_whole_match_p(parser,e,l,i)
10965
10966 #ifndef RIPPER
10967 # define set_yylval_str(x) yylval.node = NEW_STR(x)
10968 # define set_yylval_num(x) yylval.num = x
10969 # define set_yylval_id(x) yylval.id = x
10970 # define set_yylval_name(x) yylval.id = x
10971 # define set_yylval_literal(x) yylval.node = NEW_LIT(x)
10972 # define set_yylval_node(x) yylval.node = x
10973 # define yylval_id() yylval.id
10974 #else
10975 static inline VALUE
10976 ripper_yylval_id(ID x)
10977 {
10978 return (VALUE)NEW_LASGN(x, ID2SYM(x));
10979 }
10980 # define set_yylval_str(x) (void)(x)
10981 # define set_yylval_num(x) (void)(x)
10982 # define set_yylval_id(x) (void)(x)
10983 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x))
10984 # define set_yylval_literal(x) (void)(x)
10985 # define set_yylval_node(x) (void)(x)
10986 # define yylval_id() yylval.id
10987 #endif
10988
10989 #ifndef RIPPER
10990 #define ripper_flush(p) (void)(p)
10991 #else
10992 #define ripper_flush(p) (p->tokp = p->parser_lex_p)
10993
10994 #define yylval_rval *(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val)
10995
10996 static int
10997 ripper_has_scan_event(struct parser_params *parser)
10998 {
10999
11000 if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
11001 return lex_p > parser->tokp;
11002 }
11003
11004 static VALUE
11005 ripper_scan_event_val(struct parser_params *parser, int t)
11006 {
11007 VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp);
11008 VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str);
11009 ripper_flush(parser);
11010 return rval;
11011 }
11012
11013 static void
11014 ripper_dispatch_scan_event(struct parser_params *parser, int t)
11015 {
11016 if (!ripper_has_scan_event(parser)) return;
11017 yylval_rval = ripper_scan_event_val(parser, t);
11018 }
11019
11020 static void
11021 ripper_dispatch_ignored_scan_event(struct parser_params *parser, int t)
11022 {
11023 if (!ripper_has_scan_event(parser)) return;
11024 (void)ripper_scan_event_val(parser, t);
11025 }
11026
11027 static void
11028 ripper_dispatch_delayed_token(struct parser_params *parser, int t)
11029 {
11030 int saved_line = ruby_sourceline;
11031 const char *saved_tokp = parser->tokp;
11032
11033 ruby_sourceline = parser->delayed_line;
11034 parser->tokp = lex_pbeg + parser->delayed_col;
11035 yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
11036 parser->delayed = Qnil;
11037 ruby_sourceline = saved_line;
11038 parser->tokp = saved_tokp;
11039 }
11040 #endif
11041
11042 #include "ruby/regex.h"
11043 #include "ruby/util.h"
11044
11045
11046
11047
11048
11049 #undef SIGN_EXTEND_CHAR
11050 #if __STDC__
11051 # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
11052 #else
11053
11054 # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
11055 #endif
11056
11057 #define parser_encoding_name() (parser->enc->name)
11058 #define parser_mbclen() mbclen((lex_p-1),lex_pend,parser->enc)
11059 #define parser_precise_mbclen() rb_enc_precise_mbclen((lex_p-1),lex_pend,parser->enc)
11060 #define is_identchar(p,e,enc) (rb_enc_isalnum(*p,enc) || (*p) == '_' || !ISASCII(*p))
11061 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,parser->enc))
11062
11063 #define parser_isascii() ISASCII(*(lex_p-1))
11064
11065 #ifndef RIPPER
11066 static int
11067 token_info_get_column(struct parser_params *parser, const char *token)
11068 {
11069 int column = 1;
11070 const char *p, *pend = lex_p - strlen(token);
11071 for (p = lex_pbeg; p < pend; p++) {
11072 if (*p == '\t') {
11073 column = (((column - 1) / 8) + 1) * 8;
11074 }
11075 column++;
11076 }
11077 return column;
11078 }
11079
11080 static int
11081 token_info_has_nonspaces(struct parser_params *parser, const char *token)
11082 {
11083 const char *p, *pend = lex_p - strlen(token);
11084 for (p = lex_pbeg; p < pend; p++) {
11085 if (*p != ' ' && *p != '\t') {
11086 return 1;
11087 }
11088 }
11089 return 0;
11090 }
11091
11092 #undef token_info_push
11093 static void
11094 token_info_push(struct parser_params *parser, const char *token)
11095 {
11096 token_info *ptinfo;
11097
11098 if (compile_for_eval) return;
11099 ptinfo = ALLOC(token_info);
11100 ptinfo->token = token;
11101 ptinfo->linenum = ruby_sourceline;
11102 ptinfo->column = token_info_get_column(parser, token);
11103 ptinfo->nonspc = token_info_has_nonspaces(parser, token);
11104 ptinfo->next = parser->parser_token_info;
11105
11106 parser->parser_token_info = ptinfo;
11107 }
11108
11109 #undef token_info_pop
11110 static void
11111 token_info_pop(struct parser_params *parser, const char *token)
11112 {
11113 int linenum;
11114 token_info *ptinfo = parser->parser_token_info;
11115
11116 if (!ptinfo) return;
11117 parser->parser_token_info = ptinfo->next;
11118 if (token_info_get_column(parser, token) == ptinfo->column) {
11119 goto finish;
11120 }
11121 linenum = ruby_sourceline;
11122 if (linenum == ptinfo->linenum) {
11123 goto finish;
11124 }
11125 if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) {
11126 goto finish;
11127 }
11128 rb_compile_warning(ruby_sourcefile, linenum,
11129 "mismatched indentations at '%s' with '%s' at %d",
11130 token, ptinfo->token, ptinfo->linenum);
11131
11132 finish:
11133 xfree(ptinfo);
11134 }
11135 #endif
11136
11137 static int
11138 parser_yyerror(struct parser_params *parser, const char *msg)
11139 {
11140 #ifndef RIPPER
11141 const int max_line_margin = 30;
11142 const char *p, *pe;
11143 char *buf;
11144 long len;
11145 int i;
11146
11147 compile_error(PARSER_ARG "%s", msg);
11148 p = lex_p;
11149 while (lex_pbeg <= p) {
11150 if (*p == '\n') break;
11151 p--;
11152 }
11153 p++;
11154
11155 pe = lex_p;
11156 while (pe < lex_pend) {
11157 if (*pe == '\n') break;
11158 pe++;
11159 }
11160
11161 len = pe - p;
11162 if (len > 4) {
11163 char *p2;
11164 const char *pre = "", *post = "";
11165
11166 if (len > max_line_margin * 2 + 10) {
11167 if (lex_p - p > max_line_margin) {
11168 p = rb_enc_prev_char(p, lex_p - max_line_margin, pe, rb_enc_get(lex_lastline));
11169 pre = "...";
11170 }
11171 if (pe - lex_p > max_line_margin) {
11172 pe = rb_enc_prev_char(lex_p, lex_p + max_line_margin, pe, rb_enc_get(lex_lastline));
11173 post = "...";
11174 }
11175 len = pe - p;
11176 }
11177 buf = ALLOCA_N(char, len+2);
11178 MEMCPY(buf, p, char, len);
11179 buf[len] = '\0';
11180 rb_compile_error_append("%s%s%s", pre, buf, post);
11181
11182 i = (int)(lex_p - p);
11183 p2 = buf; pe = buf + len;
11184
11185 while (p2 < pe) {
11186 if (*p2 != '\t') *p2 = ' ';
11187 p2++;
11188 }
11189 buf[i] = '^';
11190 buf[i+1] = '\0';
11191 rb_compile_error_append("%s%s", pre, buf);
11192 }
11193 #else
11194 dispatch1(parse_error, STR_NEW2(msg));
11195 #endif
11196 return 0;
11197 }
11198
11199 static void parser_prepare(struct parser_params *parser);
11200
11201 #ifndef RIPPER
11202 VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always);
11203
11204 static VALUE
11205 debug_lines(const char *f)
11206 {
11207 ID script_lines;
11208 CONST_ID(script_lines, "SCRIPT_LINES__");
11209 if (rb_const_defined_at(rb_cObject, script_lines)) {
11210 VALUE hash = rb_const_get_at(rb_cObject, script_lines);
11211 if (TYPE(hash) == T_HASH) {
11212 VALUE fname = rb_str_new2(f);
11213 VALUE lines = rb_ary_new();
11214 rb_hash_aset(hash, fname, lines);
11215 return lines;
11216 }
11217 }
11218 return 0;
11219 }
11220
11221 static VALUE
11222 coverage(const char *f, int n)
11223 {
11224 extern VALUE rb_get_coverages(void);
11225 VALUE coverages = rb_get_coverages();
11226 if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {
11227 VALUE fname = rb_str_new2(f);
11228 VALUE lines = rb_ary_new2(n);
11229 int i;
11230 RBASIC(lines)->klass = 0;
11231 for (i = 0; i < n; i++) RARRAY_PTR(lines)[i] = Qnil;
11232 RARRAY(lines)->as.heap.len = n;
11233 rb_hash_aset(coverages, fname, lines);
11234 return lines;
11235 }
11236 return 0;
11237 }
11238
11239 static int
11240 e_option_supplied(struct parser_params *parser)
11241 {
11242 return strcmp(ruby_sourcefile, "-e") == 0;
11243 }
11244
11245 static VALUE
11246 yycompile0(VALUE arg, int tracing)
11247 {
11248 int n;
11249 NODE *tree;
11250 struct parser_params *parser = (struct parser_params *)arg;
11251
11252 if (!compile_for_eval && rb_safe_level() == 0) {
11253 ruby_debug_lines = debug_lines(ruby_sourcefile);
11254 if (ruby_debug_lines && ruby_sourceline > 0) {
11255 VALUE str = STR_NEW0();
11256 n = ruby_sourceline;
11257 do {
11258 rb_ary_push(ruby_debug_lines, str);
11259 } while (--n);
11260 }
11261
11262 if (!e_option_supplied(parser)) {
11263 ruby_coverage = coverage(ruby_sourcefile, ruby_sourceline);
11264 }
11265 }
11266
11267 parser_prepare(parser);
11268 deferred_nodes = 0;
11269 n = yyparse((void*)parser);
11270 ruby_debug_lines = 0;
11271 ruby_coverage = 0;
11272 compile_for_eval = 0;
11273
11274 lex_strterm = 0;
11275 lex_p = lex_pbeg = lex_pend = 0;
11276 lex_lastline = lex_nextline = 0;
11277 if (parser->nerr) {
11278 return 0;
11279 }
11280 tree = ruby_eval_tree;
11281 if (!tree) {
11282 tree = NEW_NIL();
11283 }
11284 else if (ruby_eval_tree_begin) {
11285 tree->nd_body = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body);
11286 }
11287 return (VALUE)tree;
11288 }
11289
11290 static NODE*
11291 yycompile(struct parser_params *parser, const char *f, int line)
11292 {
11293 ruby_sourcefile = ruby_strdup(f);
11294 ruby_sourceline = line - 1;
11295 return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, TRUE);
11296 }
11297 #endif
11298
11299 static rb_encoding *
11300 must_be_ascii_compatible(VALUE s)
11301 {
11302 rb_encoding *enc = rb_enc_get(s);
11303 if (!rb_enc_asciicompat(enc)) {
11304 rb_raise(rb_eArgError, "invalid source encoding");
11305 }
11306 return enc;
11307 }
11308
11309 static VALUE
11310 lex_get_str(struct parser_params *parser, VALUE s)
11311 {
11312 char *beg, *end, *pend;
11313 rb_encoding *enc = must_be_ascii_compatible(s);
11314
11315 beg = RSTRING_PTR(s);
11316 if (lex_gets_ptr) {
11317 if (RSTRING_LEN(s) == lex_gets_ptr) return Qnil;
11318 beg += lex_gets_ptr;
11319 }
11320 pend = RSTRING_PTR(s) + RSTRING_LEN(s);
11321 end = beg;
11322 while (end < pend) {
11323 if (*end++ == '\n') break;
11324 }
11325 lex_gets_ptr = end - RSTRING_PTR(s);
11326 return rb_enc_str_new(beg, end - beg, enc);
11327 }
11328
11329 static VALUE
11330 lex_getline(struct parser_params *parser)
11331 {
11332 VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
11333 if (NIL_P(line)) return line;
11334 must_be_ascii_compatible(line);
11335 #ifndef RIPPER
11336 if (ruby_debug_lines) {
11337 rb_ary_push(ruby_debug_lines, line);
11338 }
11339 if (ruby_coverage) {
11340 rb_ary_push(ruby_coverage, Qnil);
11341 }
11342 #endif
11343 return line;
11344 }
11345
11346 static const rb_data_type_t parser_data_type;
11347
11348 #ifndef RIPPER
11349 static NODE*
11350 parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
11351 {
11352 struct parser_params *parser;
11353 NODE *node;
11354 volatile VALUE tmp;
11355
11356 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11357 lex_gets = lex_get_str;
11358 lex_gets_ptr = 0;
11359 lex_input = s;
11360 lex_pbeg = lex_p = lex_pend = 0;
11361 compile_for_eval = rb_parse_in_eval();
11362
11363 node = yycompile(parser, f, line);
11364 tmp = vparser;
11365
11366 return node;
11367 }
11368
11369 NODE*
11370 rb_compile_string(const char *f, VALUE s, int line)
11371 {
11372 must_be_ascii_compatible(s);
11373 return parser_compile_string(rb_parser_new(), f, s, line);
11374 }
11375
11376 NODE*
11377 rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
11378 {
11379 must_be_ascii_compatible(s);
11380 return parser_compile_string(vparser, f, s, line);
11381 }
11382
11383 NODE*
11384 rb_compile_cstr(const char *f, const char *s, int len, int line)
11385 {
11386 VALUE str = rb_str_new(s, len);
11387 return parser_compile_string(rb_parser_new(), f, str, line);
11388 }
11389
11390 NODE*
11391 rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line)
11392 {
11393 VALUE str = rb_str_new(s, len);
11394 return parser_compile_string(vparser, f, str, line);
11395 }
11396
11397 static VALUE
11398 lex_io_gets(struct parser_params *parser, VALUE io)
11399 {
11400 return rb_io_gets(io);
11401 }
11402
11403 NODE*
11404 rb_compile_file(const char *f, VALUE file, int start)
11405 {
11406 VALUE volatile vparser = rb_parser_new();
11407
11408 return rb_parser_compile_file(vparser, f, file, start);
11409 }
11410
11411 NODE*
11412 rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start)
11413 {
11414 struct parser_params *parser;
11415 volatile VALUE tmp;
11416 NODE *node;
11417
11418 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11419 lex_gets = lex_io_gets;
11420 lex_input = file;
11421 lex_pbeg = lex_p = lex_pend = 0;
11422 compile_for_eval = rb_parse_in_eval();
11423
11424 node = yycompile(parser, f, start);
11425 tmp = vparser;
11426
11427 return node;
11428 }
11429 #endif
11430
11431 #define STR_FUNC_ESCAPE 0x01
11432 #define STR_FUNC_EXPAND 0x02
11433 #define STR_FUNC_REGEXP 0x04
11434 #define STR_FUNC_QWORDS 0x08
11435 #define STR_FUNC_SYMBOL 0x10
11436 #define STR_FUNC_INDENT 0x20
11437
11438 enum string_type {
11439 str_squote = (0),
11440 str_dquote = (STR_FUNC_EXPAND),
11441 str_xquote = (STR_FUNC_EXPAND),
11442 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
11443 str_sword = (STR_FUNC_QWORDS),
11444 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
11445 str_ssym = (STR_FUNC_SYMBOL),
11446 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
11447 };
11448
11449 static VALUE
11450 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
11451 {
11452 VALUE str;
11453
11454 str = rb_enc_str_new(p, n, enc);
11455 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
11456 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) {
11457 }
11458 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
11459 rb_enc_associate(str, rb_ascii8bit_encoding());
11460 }
11461 }
11462
11463 return str;
11464 }
11465
11466 #define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend)
11467 #define peek(c) (lex_p < lex_pend && (c) == *lex_p)
11468
11469 static inline int
11470 parser_nextc(struct parser_params *parser)
11471 {
11472 int c;
11473
11474 if (lex_p == lex_pend) {
11475 VALUE v = lex_nextline;
11476 lex_nextline = 0;
11477 if (!v) {
11478 if (parser->eofp)
11479 return -1;
11480
11481 if (!lex_input || NIL_P(v = lex_getline(parser))) {
11482 parser->eofp = Qtrue;
11483 lex_goto_eol(parser);
11484 return -1;
11485 }
11486 }
11487 {
11488 #ifdef RIPPER
11489 if (parser->tokp < lex_pend) {
11490 if (NIL_P(parser->delayed)) {
11491 parser->delayed = rb_str_buf_new(1024);
11492 rb_str_buf_cat(parser->delayed,
11493 parser->tokp, lex_pend - parser->tokp);
11494 parser->delayed_line = ruby_sourceline;
11495 parser->delayed_col = (int)(parser->tokp - lex_pbeg);
11496 }
11497 else {
11498 rb_str_buf_cat(parser->delayed,
11499 parser->tokp, lex_pend - parser->tokp);
11500 }
11501 }
11502 #endif
11503 if (heredoc_end > 0) {
11504 ruby_sourceline = heredoc_end;
11505 heredoc_end = 0;
11506 }
11507 ruby_sourceline++;
11508 parser->line_count++;
11509 lex_pbeg = lex_p = RSTRING_PTR(v);
11510 lex_pend = lex_p + RSTRING_LEN(v);
11511 ripper_flush(parser);
11512 lex_lastline = v;
11513 }
11514 }
11515 c = (unsigned char)*lex_p++;
11516 if (c == '\r' && peek('\n')) {
11517 lex_p++;
11518 c = '\n';
11519 }
11520
11521 return c;
11522 }
11523
11524 static void
11525 parser_pushback(struct parser_params *parser, int c)
11526 {
11527 if (c == -1) return;
11528 lex_p--;
11529 if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
11530 lex_p--;
11531 }
11532 }
11533
11534 #define was_bol() (lex_p == lex_pbeg + 1)
11535
11536 #define tokfix() (tokenbuf[tokidx]='\0')
11537 #define tok() tokenbuf
11538 #define toklen() tokidx
11539 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
11540
11541 static char*
11542 parser_newtok(struct parser_params *parser)
11543 {
11544 tokidx = 0;
11545 if (!tokenbuf) {
11546 toksiz = 60;
11547 tokenbuf = ALLOC_N(char, 60);
11548 }
11549 if (toksiz > 4096) {
11550 toksiz = 60;
11551 REALLOC_N(tokenbuf, char, 60);
11552 }
11553 return tokenbuf;
11554 }
11555
11556 static char *
11557 parser_tokspace(struct parser_params *parser, int n)
11558 {
11559 tokidx += n;
11560
11561 if (tokidx >= toksiz) {
11562 do {toksiz *= 2;} while (toksiz < tokidx);
11563 REALLOC_N(tokenbuf, char, toksiz);
11564 }
11565 return &tokenbuf[tokidx-n];
11566 }
11567
11568 static void
11569 parser_tokadd(struct parser_params *parser, int c)
11570 {
11571 tokenbuf[tokidx++] = (char)c;
11572 if (tokidx >= toksiz) {
11573 toksiz *= 2;
11574 REALLOC_N(tokenbuf, char, toksiz);
11575 }
11576 }
11577
11578 static int
11579 parser_tok_hex(struct parser_params *parser, size_t *numlen)
11580 {
11581 int c;
11582
11583 c = scan_hex(lex_p, 2, numlen);
11584 if (!*numlen) {
11585 yyerror("invalid hex escape");
11586 return 0;
11587 }
11588 lex_p += *numlen;
11589 return c;
11590 }
11591
11592 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n))
11593
11594 static int
11595 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp,
11596 int string_literal, int symbol_literal, int regexp_literal)
11597 {
11598
11599
11600
11601
11602
11603
11604
11605 int codepoint;
11606 size_t numlen;
11607
11608 if (regexp_literal) { tokadd('\\'); tokadd('u'); }
11609
11610 if (peek('{')) {
11611 do {
11612 if (regexp_literal) { tokadd(*lex_p); }
11613 nextc();
11614 codepoint = scan_hex(lex_p, 6, &numlen);
11615 if (numlen == 0) {
11616 yyerror("invalid Unicode escape");
11617 return 0;
11618 }
11619 if (codepoint > 0x10ffff) {
11620 yyerror("invalid Unicode codepoint (too large)");
11621 return 0;
11622 }
11623 lex_p += numlen;
11624 if (regexp_literal) {
11625 tokcopy((int)numlen);
11626 }
11627 else if (codepoint >= 0x80) {
11628 *encp = UTF8_ENC();
11629 if (string_literal) tokaddmbc(codepoint, *encp);
11630 }
11631 else if (string_literal) {
11632 tokadd(codepoint);
11633 }
11634 } while (string_literal && (peek(' ') || peek('\t')));
11635
11636 if (!peek('}')) {
11637 yyerror("unterminated Unicode escape");
11638 return 0;
11639 }
11640
11641 if (regexp_literal) { tokadd('}'); }
11642 nextc();
11643 }
11644 else {
11645 codepoint = scan_hex(lex_p, 4, &numlen);
11646 if (numlen < 4) {
11647 yyerror("invalid Unicode escape");
11648 return 0;
11649 }
11650 lex_p += 4;
11651 if (regexp_literal) {
11652 tokcopy(4);
11653 }
11654 else if (codepoint >= 0x80) {
11655 *encp = UTF8_ENC();
11656 if (string_literal) tokaddmbc(codepoint, *encp);
11657 }
11658 else if (string_literal) {
11659 tokadd(codepoint);
11660 }
11661 }
11662
11663 return codepoint;
11664 }
11665
11666 #define ESCAPE_CONTROL 1
11667 #define ESCAPE_META 2
11668
11669 static int
11670 parser_read_escape(struct parser_params *parser, int flags,
11671 rb_encoding **encp)
11672 {
11673 int c;
11674 size_t numlen;
11675
11676 switch (c = nextc()) {
11677 case '\\':
11678 return c;
11679
11680 case 'n':
11681 return '\n';
11682
11683 case 't':
11684 return '\t';
11685
11686 case 'r':
11687 return '\r';
11688
11689 case 'f':
11690 return '\f';
11691
11692 case 'v':
11693 return '\13';
11694
11695 case 'a':
11696 return '\007';
11697
11698 case 'e':
11699 return 033;
11700
11701 case '0': case '1': case '2': case '3':
11702 case '4': case '5': case '6': case '7':
11703 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
11704 pushback(c);
11705 c = scan_oct(lex_p, 3, &numlen);
11706 lex_p += numlen;
11707 return c;
11708
11709 case 'x':
11710 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
11711 c = tok_hex(&numlen);
11712 if (numlen == 0) return 0;
11713 return c;
11714
11715 case 'b':
11716 return '\010';
11717
11718 case 's':
11719 return ' ';
11720
11721 case 'M':
11722 if (flags & ESCAPE_META) goto eof;
11723 if ((c = nextc()) != '-') {
11724 pushback(c);
11725 goto eof;
11726 }
11727 if ((c = nextc()) == '\\') {
11728 if (peek('u')) goto eof;
11729 return read_escape(flags|ESCAPE_META, encp) | 0x80;
11730 }
11731 else if (c == -1 || !ISASCII(c)) goto eof;
11732 else {
11733 return ((c & 0xff) | 0x80);
11734 }
11735
11736 case 'C':
11737 if ((c = nextc()) != '-') {
11738 pushback(c);
11739 goto eof;
11740 }
11741 case 'c':
11742 if (flags & ESCAPE_CONTROL) goto eof;
11743 if ((c = nextc())== '\\') {
11744 if (peek('u')) goto eof;
11745 c = read_escape(flags|ESCAPE_CONTROL, encp);
11746 }
11747 else if (c == '?')
11748 return 0177;
11749 else if (c == -1 || !ISASCII(c)) goto eof;
11750 return c & 0x9f;
11751
11752 eof:
11753 case -1:
11754 yyerror("Invalid escape character syntax");
11755 return '\0';
11756
11757 default:
11758 return c;
11759 }
11760 }
11761
11762 static void
11763 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc)
11764 {
11765 int len = rb_enc_codelen(c, enc);
11766 rb_enc_mbcput(c, tokspace(len), enc);
11767 }
11768
11769 static int
11770 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
11771 {
11772 int c;
11773 int flags = 0;
11774 size_t numlen;
11775
11776 first:
11777 switch (c = nextc()) {
11778 case '\n':
11779 return 0;
11780
11781 case '0': case '1': case '2': case '3':
11782 case '4': case '5': case '6': case '7':
11783 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
11784 {
11785 ruby_scan_oct(--lex_p, 3, &numlen);
11786 if (numlen == 0) goto eof;
11787 lex_p += numlen;
11788 tokcopy((int)numlen + 1);
11789 }
11790 return 0;
11791
11792 case 'x':
11793 if (flags & (ESCAPE_CONTROL|ESCAPE_META)) goto eof;
11794 {
11795 tok_hex(&numlen);
11796 if (numlen == 0) goto eof;
11797 tokcopy((int)numlen + 2);
11798 }
11799 return 0;
11800
11801 case 'M':
11802 if (flags & ESCAPE_META) goto eof;
11803 if ((c = nextc()) != '-') {
11804 pushback(c);
11805 goto eof;
11806 }
11807 tokcopy(3);
11808 flags |= ESCAPE_META;
11809 goto escaped;
11810
11811 case 'C':
11812 if (flags & ESCAPE_CONTROL) goto eof;
11813 if ((c = nextc()) != '-') {
11814 pushback(c);
11815 goto eof;
11816 }
11817 tokcopy(3);
11818 goto escaped;
11819
11820 case 'c':
11821 if (flags & ESCAPE_CONTROL) goto eof;
11822 tokcopy(2);
11823 flags |= ESCAPE_CONTROL;
11824 escaped:
11825 if ((c = nextc()) == '\\') {
11826 goto first;
11827 }
11828 else if (c == -1) goto eof;
11829 tokadd(c);
11830 return 0;
11831
11832 eof:
11833 case -1:
11834 yyerror("Invalid escape character syntax");
11835 return -1;
11836
11837 default:
11838 tokadd('\\');
11839 tokadd(c);
11840 }
11841 return 0;
11842 }
11843
11844 extern int rb_char_to_option_kcode(int c, int *option, int *kcode);
11845
11846 static int
11847 parser_regx_options(struct parser_params *parser)
11848 {
11849 int kcode = 0;
11850 int kopt = 0;
11851 int options = 0;
11852 int c, opt, kc;
11853
11854 newtok();
11855 while (c = nextc(), ISALPHA(c)) {
11856 if (c == 'o') {
11857 options |= RE_OPTION_ONCE;
11858 }
11859 else if (rb_char_to_option_kcode(c, &opt, &kc)) {
11860 if (kc >= 0) {
11861 if (kc != rb_ascii8bit_encindex()) kcode = c;
11862 kopt = opt;
11863 }
11864 else {
11865 options |= opt;
11866 }
11867 }
11868 else {
11869 tokadd(c);
11870 }
11871 }
11872 options |= kopt;
11873 pushback(c);
11874 if (toklen()) {
11875 tokfix();
11876 compile_error(PARSER_ARG "unknown regexp option%s - %s",
11877 toklen() > 1 ? "s" : "", tok());
11878 }
11879 return options | RE_OPTION_ENCODING(kcode);
11880 }
11881
11882 static void
11883 dispose_string(VALUE str)
11884 {
11885
11886 if (RBASIC(str)->flags & RSTRING_NOEMBED)
11887 xfree(RSTRING_PTR(str));
11888 rb_gc_force_recycle(str);
11889 }
11890
11891 static int
11892 parser_tokadd_mbchar(struct parser_params *parser, int c)
11893 {
11894 int len = parser_precise_mbclen();
11895 if (!MBCLEN_CHARFOUND_P(len)) {
11896 compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name());
11897 return -1;
11898 }
11899 tokadd(c);
11900 lex_p += --len;
11901 if (len > 0) tokcopy(len);
11902 return c;
11903 }
11904
11905 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, c)
11906
11907 static int
11908 parser_tokadd_string(struct parser_params *parser,
11909 int func, int term, int paren, long *nest,
11910 rb_encoding **encp)
11911 {
11912 int c;
11913 int has_nonascii = 0;
11914 rb_encoding *enc = *encp;
11915 char *errbuf = 0;
11916 static const char mixed_msg[] = "%s mixed within %s source";
11917
11918 #define mixed_error(enc1, enc2) if (!errbuf) { \
11919 size_t len = sizeof(mixed_msg) - 4; \
11920 len += strlen(rb_enc_name(enc1)); \
11921 len += strlen(rb_enc_name(enc2)); \
11922 errbuf = ALLOCA_N(char, len); \
11923 snprintf(errbuf, len, mixed_msg, \
11924 rb_enc_name(enc1), \
11925 rb_enc_name(enc2)); \
11926 yyerror(errbuf); \
11927 }
11928 #define mixed_escape(beg, enc1, enc2) do { \
11929 const char *pos = lex_p; \
11930 lex_p = beg; \
11931 mixed_error(enc1, enc2); \
11932 lex_p = pos; \
11933 } while (0)
11934
11935 while ((c = nextc()) != -1) {
11936 if (paren && c == paren) {
11937 ++*nest;
11938 }
11939 else if (c == term) {
11940 if (!nest || !*nest) {
11941 pushback(c);
11942 break;
11943 }
11944 --*nest;
11945 }
11946 else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
11947 int c2 = *lex_p;
11948 if (c2 == '$' || c2 == '@' || c2 == '{') {
11949 pushback(c);
11950 break;
11951 }
11952 }
11953 else if (c == '\\') {
11954 const char *beg = lex_p - 1;
11955 c = nextc();
11956 switch (c) {
11957 case '\n':
11958 if (func & STR_FUNC_QWORDS) break;
11959 if (func & STR_FUNC_EXPAND) continue;
11960 tokadd('\\');
11961 break;
11962
11963 case '\\':
11964 if (func & STR_FUNC_ESCAPE) tokadd(c);
11965 break;
11966
11967 case 'u':
11968 if ((func & STR_FUNC_EXPAND) == 0) {
11969 tokadd('\\');
11970 break;
11971 }
11972 parser_tokadd_utf8(parser, &enc, 1,
11973 func & STR_FUNC_SYMBOL,
11974 func & STR_FUNC_REGEXP);
11975 if (has_nonascii && enc != *encp) {
11976 mixed_escape(beg, enc, *encp);
11977 }
11978 continue;
11979
11980 default:
11981 if (func & STR_FUNC_REGEXP) {
11982 pushback(c);
11983 if ((c = tokadd_escape(&enc)) < 0)
11984 return -1;
11985 if (has_nonascii && enc != *encp) {
11986 mixed_escape(beg, enc, *encp);
11987 }
11988 continue;
11989 }
11990 else if (func & STR_FUNC_EXPAND) {
11991 pushback(c);
11992 if (func & STR_FUNC_ESCAPE) tokadd('\\');
11993 c = read_escape(0, &enc);
11994 }
11995 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
11996
11997 }
11998 else if (c != term && !(paren && c == paren)) {
11999 tokadd('\\');
12000 pushback(c);
12001 continue;
12002 }
12003 }
12004 }
12005 else if (!parser_isascii()) {
12006 has_nonascii = 1;
12007 if (enc != *encp) {
12008 mixed_error(enc, *encp);
12009 continue;
12010 }
12011 if (tokadd_mbchar(c) == -1) return -1;
12012 continue;
12013 }
12014 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12015 pushback(c);
12016 break;
12017 }
12018 if (c & 0x80) {
12019 has_nonascii = 1;
12020 if (enc != *encp) {
12021 mixed_error(enc, *encp);
12022 continue;
12023 }
12024 }
12025 tokadd(c);
12026 }
12027 *encp = enc;
12028 return c;
12029 }
12030
12031 #define NEW_STRTERM(func, term, paren) \
12032 rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
12033
12034 static int
12035 parser_parse_string(struct parser_params *parser, NODE *quote)
12036 {
12037 int func = (int)quote->nd_func;
12038 int term = nd_term(quote);
12039 int paren = nd_paren(quote);
12040 int c, space = 0;
12041 rb_encoding *enc = parser->enc;
12042
12043 if (func == -1) return tSTRING_END;
12044 c = nextc();
12045 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12046 do {c = nextc();} while (ISSPACE(c));
12047 space = 1;
12048 }
12049 if (c == term && !quote->nd_nest) {
12050 if (func & STR_FUNC_QWORDS) {
12051 quote->nd_func = -1;
12052 return ' ';
12053 }
12054 if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
12055 set_yylval_num(regx_options());
12056 return tREGEXP_END;
12057 }
12058 if (space) {
12059 pushback(c);
12060 return ' ';
12061 }
12062 newtok();
12063 if ((func & STR_FUNC_EXPAND) && c == '#') {
12064 switch (c = nextc()) {
12065 case '$':
12066 case '@':
12067 pushback(c);
12068 return tSTRING_DVAR;
12069 case '{':
12070 return tSTRING_DBEG;
12071 }
12072 tokadd('#');
12073 }
12074 pushback(c);
12075 if (tokadd_string(func, term, paren, "e->nd_nest,
12076 &enc) == -1) {
12077 ruby_sourceline = nd_line(quote);
12078 if (func & STR_FUNC_REGEXP) {
12079 if (parser->eofp)
12080 compile_error(PARSER_ARG "unterminated regexp meets end of file");
12081 return tREGEXP_END;
12082 }
12083 else {
12084 if (parser->eofp)
12085 compile_error(PARSER_ARG "unterminated string meets end of file");
12086 return tSTRING_END;
12087 }
12088 }
12089
12090 tokfix();
12091 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12092 return tSTRING_CONTENT;
12093 }
12094
12095 static int
12096 parser_heredoc_identifier(struct parser_params *parser)
12097 {
12098 int c = nextc(), term, func = 0;
12099 long len;
12100
12101 if (c == '-') {
12102 c = nextc();
12103 func = STR_FUNC_INDENT;
12104 }
12105 switch (c) {
12106 case '\'':
12107 func |= str_squote; goto quoted;
12108 case '"':
12109 func |= str_dquote; goto quoted;
12110 case '`':
12111 func |= str_xquote;
12112 quoted:
12113 newtok();
12114 tokadd(func);
12115 term = c;
12116 while ((c = nextc()) != -1 && c != term) {
12117 if (tokadd_mbchar(c) == -1) return 0;
12118 }
12119 if (c == -1) {
12120 compile_error(PARSER_ARG "unterminated here document identifier");
12121 return 0;
12122 }
12123 break;
12124
12125 default:
12126 if (!parser_is_identchar()) {
12127 pushback(c);
12128 if (func & STR_FUNC_INDENT) {
12129 pushback('-');
12130 }
12131 return 0;
12132 }
12133 newtok();
12134 term = '"';
12135 tokadd(func |= str_dquote);
12136 do {
12137 if (tokadd_mbchar(c) == -1) return 0;
12138 } while ((c = nextc()) != -1 && parser_is_identchar());
12139 pushback(c);
12140 break;
12141 }
12142
12143 tokfix();
12144 #ifdef RIPPER
12145 ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
12146 #endif
12147 len = lex_p - lex_pbeg;
12148 lex_goto_eol(parser);
12149 lex_strterm = rb_node_newnode(NODE_HEREDOC,
12150 STR_NEW(tok(), toklen()),
12151 len,
12152 lex_lastline);
12153 nd_set_line(lex_strterm, ruby_sourceline);
12154 ripper_flush(parser);
12155 return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
12156 }
12157
12158 static void
12159 parser_heredoc_restore(struct parser_params *parser, NODE *here)
12160 {
12161 VALUE line;
12162
12163 line = here->nd_orig;
12164 lex_lastline = line;
12165 lex_pbeg = RSTRING_PTR(line);
12166 lex_pend = lex_pbeg + RSTRING_LEN(line);
12167 lex_p = lex_pbeg + here->nd_nth;
12168 heredoc_end = ruby_sourceline;
12169 ruby_sourceline = nd_line(here);
12170 dispose_string(here->nd_lit);
12171 rb_gc_force_recycle((VALUE)here);
12172 ripper_flush(parser);
12173 }
12174
12175 static int
12176 parser_whole_match_p(struct parser_params *parser,
12177 const char *eos, long len, int indent)
12178 {
12179 const char *p = lex_pbeg;
12180 long n;
12181
12182 if (indent) {
12183 while (*p && ISSPACE(*p)) p++;
12184 }
12185 n = lex_pend - (p + len);
12186 if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return FALSE;
12187 return strncmp(eos, p, len) == 0;
12188 }
12189
12190 static int
12191 parser_here_document(struct parser_params *parser, NODE *here)
12192 {
12193 int c, func, indent = 0;
12194 const char *eos, *p, *pend;
12195 long len;
12196 VALUE str = 0;
12197 rb_encoding *enc = parser->enc;
12198
12199 eos = RSTRING_PTR(here->nd_lit);
12200 len = RSTRING_LEN(here->nd_lit) - 1;
12201 indent = (func = *eos++) & STR_FUNC_INDENT;
12202
12203 if ((c = nextc()) == -1) {
12204 error:
12205 compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos);
12206 #ifdef RIPPER
12207 if (NIL_P(parser->delayed)) {
12208 ripper_dispatch_scan_event(parser, tSTRING_CONTENT);
12209 }
12210 else {
12211 if (str ||
12212 ((len = lex_p - parser->tokp) > 0 &&
12213 (str = STR_NEW3(parser->tokp, len, enc, func), 1))) {
12214 rb_str_append(parser->delayed, str);
12215 }
12216 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12217 }
12218 lex_goto_eol(parser);
12219 #endif
12220 restore:
12221 heredoc_restore(lex_strterm);
12222 lex_strterm = 0;
12223 return 0;
12224 }
12225 if (was_bol() && whole_match_p(eos, len, indent)) {
12226 heredoc_restore(lex_strterm);
12227 return tSTRING_END;
12228 }
12229
12230 if (!(func & STR_FUNC_EXPAND)) {
12231 do {
12232 p = RSTRING_PTR(lex_lastline);
12233 pend = lex_pend;
12234 if (pend > p) {
12235 switch (pend[-1]) {
12236 case '\n':
12237 if (--pend == p || pend[-1] != '\r') {
12238 pend++;
12239 break;
12240 }
12241 case '\r':
12242 --pend;
12243 }
12244 }
12245 if (str)
12246 rb_str_cat(str, p, pend - p);
12247 else
12248 str = STR_NEW(p, pend - p);
12249 if (pend < lex_pend) rb_str_cat(str, "\n", 1);
12250 lex_goto_eol(parser);
12251 if (nextc() == -1) {
12252 if (str) dispose_string(str);
12253 goto error;
12254 }
12255 } while (!whole_match_p(eos, len, indent));
12256 }
12257 else {
12258
12259 newtok();
12260 if (c == '#') {
12261 switch (c = nextc()) {
12262 case '$':
12263 case '@':
12264 pushback(c);
12265 return tSTRING_DVAR;
12266 case '{':
12267 return tSTRING_DBEG;
12268 }
12269 tokadd('#');
12270 }
12271 do {
12272 pushback(c);
12273 if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) {
12274 if (parser->eofp) goto error;
12275 goto restore;
12276 }
12277 if (c != '\n') {
12278 set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12279 return tSTRING_CONTENT;
12280 }
12281 tokadd(nextc());
12282
12283 if ((c = nextc()) == -1) goto error;
12284 } while (!whole_match_p(eos, len, indent));
12285 str = STR_NEW3(tok(), toklen(), enc, func);
12286 }
12287 #ifdef RIPPER
12288 if (!NIL_P(parser->delayed))
12289 ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
12290 lex_goto_eol(parser);
12291 ripper_dispatch_ignored_scan_event(parser, tHEREDOC_END);
12292 #endif
12293 heredoc_restore(lex_strterm);
12294 lex_strterm = NEW_STRTERM(-1, 0, 0);
12295 set_yylval_str(str);
12296 return tSTRING_CONTENT;
12297 }
12298
12299 #include "lex.c"
12300
12301 static void
12302 arg_ambiguous_gen(struct parser_params *parser)
12303 {
12304 #ifndef RIPPER
12305 rb_warning0("ambiguous first argument; put parentheses or even spaces");
12306 #else
12307 dispatch0(arg_ambiguous);
12308 #endif
12309 }
12310 #define arg_ambiguous() (arg_ambiguous_gen(parser), 1)
12311
12312 static ID
12313 formal_argument_gen(struct parser_params *parser, ID lhs)
12314 {
12315 #ifndef RIPPER
12316 if (!is_local_id(lhs))
12317 yyerror("formal argument must be local variable");
12318 #endif
12319 shadowing_lvar(lhs);
12320 return lhs;
12321 }
12322
12323 static int
12324 lvar_defined_gen(struct parser_params *parser, ID id)
12325 {
12326 return (dyna_in_block() && dvar_defined(id)) || local_id(id);
12327 }
12328
12329
12330 static long
12331 parser_encode_length(struct parser_params *parser, const char *name, long len)
12332 {
12333 long nlen;
12334
12335 if (len > 5 && name[nlen = len - 5] == '-') {
12336 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
12337 return nlen;
12338 }
12339 if (len > 4 && name[nlen = len - 5] == '-') {
12340 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
12341 return nlen;
12342 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0)
12343 return nlen;
12344 }
12345 return len;
12346 }
12347
12348 static void
12349 parser_set_encode(struct parser_params *parser, const char *name)
12350 {
12351 int idx = rb_enc_find_index(name);
12352 rb_encoding *enc;
12353 VALUE excargs[3];
12354
12355 if (idx < 0) {
12356 VALUE rb_make_backtrace(void);
12357 VALUE rb_make_exception(int, VALUE*);
12358
12359 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
12360 error:
12361 excargs[0] = rb_eArgError;
12362 excargs[2] = rb_make_backtrace();
12363 rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));
12364 rb_exc_raise(rb_make_exception(3, excargs));
12365 }
12366 enc = rb_enc_from_index(idx);
12367 if (!rb_enc_asciicompat(enc)) {
12368 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
12369 goto error;
12370 }
12371 parser->enc = enc;
12372 }
12373
12374 static int
12375 comment_at_top(struct parser_params *parser)
12376 {
12377 const char *p = lex_pbeg, *pend = lex_p - 1;
12378 if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0;
12379 while (p < pend) {
12380 if (!ISSPACE(*p)) return 0;
12381 p++;
12382 }
12383 return 1;
12384 }
12385
12386 #ifndef RIPPER
12387 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len);
12388 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val);
12389
12390 static void
12391 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
12392 {
12393 if (!comment_at_top(parser)) {
12394 return;
12395 }
12396 parser_set_encode(parser, val);
12397 }
12398
12399 struct magic_comment {
12400 const char *name;
12401 rb_magic_comment_setter_t func;
12402 rb_magic_comment_length_t length;
12403 };
12404
12405 static const struct magic_comment magic_comments[] = {
12406 {"coding", magic_comment_encoding, parser_encode_length},
12407 {"encoding", magic_comment_encoding, parser_encode_length},
12408 };
12409 #endif
12410
12411 static const char *
12412 magic_comment_marker(const char *str, long len)
12413 {
12414 long i = 2;
12415
12416 while (i < len) {
12417 switch (str[i]) {
12418 case '-':
12419 if (str[i-1] == '*' && str[i-2] == '-') {
12420 return str + i + 1;
12421 }
12422 i += 2;
12423 break;
12424 case '*':
12425 if (i + 1 >= len) return 0;
12426 if (str[i+1] != '-') {
12427 i += 4;
12428 }
12429 else if (str[i-1] != '-') {
12430 i += 2;
12431 }
12432 else {
12433 return str + i + 2;
12434 }
12435 break;
12436 default:
12437 i += 3;
12438 break;
12439 }
12440 }
12441 return 0;
12442 }
12443
12444 static int
12445 parser_magic_comment(struct parser_params *parser, const char *str, long len)
12446 {
12447 VALUE name = 0, val = 0;
12448 const char *beg, *end, *vbeg, *vend;
12449 #define str_copy(_s, _p, _n) ((_s) \
12450 ? (rb_str_resize((_s), (_n)), \
12451 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
12452 : ((_s) = STR_NEW((_p), (_n))))
12453
12454 if (len <= 7) return FALSE;
12455 if (!(beg = magic_comment_marker(str, len))) return FALSE;
12456 if (!(end = magic_comment_marker(beg, str + len - beg))) return FALSE;
12457 str = beg;
12458 len = end - beg - 3;
12459
12460
12461 while (len > 0) {
12462 #ifndef RIPPER
12463 const struct magic_comment *p = magic_comments;
12464 #endif
12465 char *s;
12466 int i;
12467 long n = 0;
12468
12469 for (; len > 0 && *str; str++, --len) {
12470 switch (*str) {
12471 case '\'': case '"': case ':': case ';':
12472 continue;
12473 }
12474 if (!ISSPACE(*str)) break;
12475 }
12476 for (beg = str; len > 0; str++, --len) {
12477 switch (*str) {
12478 case '\'': case '"': case ':': case ';':
12479 break;
12480 default:
12481 if (ISSPACE(*str)) break;
12482 continue;
12483 }
12484 break;
12485 }
12486 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
12487 if (!len) break;
12488 if (*str != ':') continue;
12489
12490 do str++; while (--len > 0 && ISSPACE(*str));
12491 if (!len) break;
12492 if (*str == '"') {
12493 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
12494 if (*str == '\\') {
12495 --len;
12496 ++str;
12497 }
12498 }
12499 vend = str;
12500 if (len) {
12501 --len;
12502 ++str;
12503 }
12504 }
12505 else {
12506 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
12507 vend = str;
12508 }
12509 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
12510
12511 n = end - beg;
12512 str_copy(name, beg, n);
12513 s = RSTRING_PTR(name);
12514 for (i = 0; i < n; ++i) {
12515 if (s[i] == '-') s[i] = '_';
12516 }
12517 #ifndef RIPPER
12518 do {
12519 if (STRNCASECMP(p->name, s, n) == 0) {
12520 n = vend - vbeg;
12521 if (p->length) {
12522 n = (*p->length)(parser, vbeg, n);
12523 }
12524 str_copy(val, vbeg, n);
12525 (*p->func)(parser, s, RSTRING_PTR(val));
12526 break;
12527 }
12528 } while (++p < magic_comments + numberof(magic_comments));
12529 #else
12530 dispatch2(magic_comment, name, val);
12531 #endif
12532 }
12533
12534 return TRUE;
12535 }
12536
12537 static void
12538 set_file_encoding(struct parser_params *parser, const char *str, const char *send)
12539 {
12540 int sep = 0;
12541 const char *beg = str;
12542 VALUE s;
12543
12544 for (;;) {
12545 if (send - str <= 6) return;
12546 switch (str[6]) {
12547 case 'C': case 'c': str += 6; continue;
12548 case 'O': case 'o': str += 5; continue;
12549 case 'D': case 'd': str += 4; continue;
12550 case 'I': case 'i': str += 3; continue;
12551 case 'N': case 'n': str += 2; continue;
12552 case 'G': case 'g': str += 1; continue;
12553 case '=': case ':':
12554 sep = 1;
12555 str += 6;
12556 break;
12557 default:
12558 str += 6;
12559 if (ISSPACE(*str)) break;
12560 continue;
12561 }
12562 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
12563 }
12564 for (;;) {
12565 do {
12566 if (++str >= send) return;
12567 } while (ISSPACE(*str));
12568 if (sep) break;
12569 if (*str != '=' && *str != ':') return;
12570 sep = 1;
12571 str++;
12572 }
12573 beg = str;
12574 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
12575 s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg));
12576 parser_set_encode(parser, RSTRING_PTR(s));
12577 rb_str_resize(s, 0);
12578 }
12579
12580 static void
12581 parser_prepare(struct parser_params *parser)
12582 {
12583 int c = nextc();
12584 switch (c) {
12585 case '#':
12586 if (peek('!')) parser->has_shebang = 1;
12587 break;
12588 case 0xef:
12589 if (lex_pend - lex_p >= 2 &&
12590 (unsigned char)lex_p[0] == 0xbb &&
12591 (unsigned char)lex_p[1] == 0xbf) {
12592 parser->enc = rb_utf8_encoding();
12593 lex_p += 2;
12594 lex_pbeg = lex_p;
12595 return;
12596 }
12597 break;
12598 case EOF:
12599 return;
12600 }
12601 pushback(c);
12602 parser->enc = rb_enc_get(lex_lastline);
12603 }
12604
12605 #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
12606 #define IS_END() (lex_state == EXPR_END || lex_state == EXPR_ENDARG || lex_state == EXPR_ENDFN)
12607 #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
12608 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12609
12610 #ifndef RIPPER
12611 #define ambiguous_operator(op, syn) ( \
12612 rb_warning0("`"op"' after local variable is interpreted as binary operator"), \
12613 rb_warning0("even though it seems like "syn""))
12614 #else
12615 #define ambiguous_operator(op, syn) dispatch2(operator_ambiguous, ripper_intern(op), rb_str_new_cstr(syn))
12616 #endif
12617 #define warn_balanced(op, syn) \
12618 (last_state != EXPR_CLASS && last_state != EXPR_DOT && \
12619 last_state != EXPR_FNAME && last_state != EXPR_ENDFN && \
12620 last_state != EXPR_ENDARG && \
12621 space_seen && !ISSPACE(c) && \
12622 (ambiguous_operator(op, syn), 0))
12623
12624 static int
12625 parser_yylex(struct parser_params *parser)
12626 {
12627 register int c;
12628 int space_seen = 0;
12629 int cmd_state;
12630 enum lex_state_e last_state;
12631 rb_encoding *enc;
12632 int mb;
12633 #ifdef RIPPER
12634 int fallthru = FALSE;
12635 #endif
12636
12637 if (lex_strterm) {
12638 int token;
12639 if (nd_type(lex_strterm) == NODE_HEREDOC) {
12640 token = here_document(lex_strterm);
12641 if (token == tSTRING_END) {
12642 lex_strterm = 0;
12643 lex_state = EXPR_END;
12644 }
12645 }
12646 else {
12647 token = parse_string(lex_strterm);
12648 if (token == tSTRING_END || token == tREGEXP_END) {
12649 rb_gc_force_recycle((VALUE)lex_strterm);
12650 lex_strterm = 0;
12651 lex_state = EXPR_END;
12652 }
12653 }
12654 return token;
12655 }
12656 cmd_state = command_start;
12657 command_start = FALSE;
12658 retry:
12659 last_state = lex_state;
12660 switch (c = nextc()) {
12661 case '\0':
12662 case '\004':
12663 case '\032':
12664 case -1:
12665 return 0;
12666
12667
12668 case ' ': case '\t': case '\f': case '\r':
12669 case '\13':
12670 space_seen = 1;
12671 #ifdef RIPPER
12672 while ((c = nextc())) {
12673 switch (c) {
12674 case ' ': case '\t': case '\f': case '\r':
12675 case '\13':
12676 break;
12677 default:
12678 goto outofloop;
12679 }
12680 }
12681 outofloop:
12682 pushback(c);
12683 ripper_dispatch_scan_event(parser, tSP);
12684 #endif
12685 goto retry;
12686
12687 case '#':
12688
12689 if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) {
12690 if (comment_at_top(parser)) {
12691 set_file_encoding(parser, lex_p, lex_pend);
12692 }
12693 }
12694 lex_p = lex_pend;
12695 #ifdef RIPPER
12696 ripper_dispatch_scan_event(parser, tCOMMENT);
12697 fallthru = TRUE;
12698 #endif
12699
12700 case '\n':
12701 switch (lex_state) {
12702 case EXPR_BEG:
12703 case EXPR_FNAME:
12704 case EXPR_DOT:
12705 case EXPR_CLASS:
12706 case EXPR_VALUE:
12707 #ifdef RIPPER
12708 if (!fallthru) {
12709 ripper_dispatch_scan_event(parser, tIGNORED_NL);
12710 }
12711 fallthru = FALSE;
12712 #endif
12713 goto retry;
12714 default:
12715 break;
12716 }
12717 while ((c = nextc())) {
12718 switch (c) {
12719 case ' ': case '\t': case '\f': case '\r':
12720 case '\13':
12721 space_seen = 1;
12722 break;
12723 case '.': {
12724 if ((c = nextc()) != '.') {
12725 pushback(c);
12726 pushback('.');
12727 goto retry;
12728 }
12729 }
12730 default:
12731 --ruby_sourceline;
12732 lex_nextline = lex_lastline;
12733 case -1:
12734 lex_goto_eol(parser);
12735 #ifdef RIPPER
12736 if (c != -1) {
12737 parser->tokp = lex_p;
12738 }
12739 #endif
12740 goto normal_newline;
12741 }
12742 }
12743 normal_newline:
12744 command_start = TRUE;
12745 lex_state = EXPR_BEG;
12746 return '\n';
12747
12748 case '*':
12749 if ((c = nextc()) == '*') {
12750 if ((c = nextc()) == '=') {
12751 set_yylval_id(tPOW);
12752 lex_state = EXPR_BEG;
12753 return tOP_ASGN;
12754 }
12755 pushback(c);
12756 c = tPOW;
12757 }
12758 else {
12759 if (c == '=') {
12760 set_yylval_id('*');
12761 lex_state = EXPR_BEG;
12762 return tOP_ASGN;
12763 }
12764 pushback(c);
12765 if (IS_SPCARG(c)) {
12766 rb_warning0("`*' interpreted as argument prefix");
12767 c = tSTAR;
12768 }
12769 else if (IS_BEG()) {
12770 c = tSTAR;
12771 }
12772 else {
12773 warn_balanced("*", "argument prefix");
12774 c = '*';
12775 }
12776 }
12777 switch (lex_state) {
12778 case EXPR_FNAME: case EXPR_DOT:
12779 lex_state = EXPR_ARG; break;
12780 default:
12781 lex_state = EXPR_BEG; break;
12782 }
12783 return c;
12784
12785 case '!':
12786 c = nextc();
12787 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
12788 lex_state = EXPR_ARG;
12789 if (c == '@') {
12790 return '!';
12791 }
12792 }
12793 else {
12794 lex_state = EXPR_BEG;
12795 }
12796 if (c == '=') {
12797 return tNEQ;
12798 }
12799 if (c == '~') {
12800 return tNMATCH;
12801 }
12802 pushback(c);
12803 return '!';
12804
12805 case '=':
12806 if (was_bol()) {
12807
12808 if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
12809 #ifdef RIPPER
12810 int first_p = TRUE;
12811
12812 lex_goto_eol(parser);
12813 ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
12814 #endif
12815 for (;;) {
12816 lex_goto_eol(parser);
12817 #ifdef RIPPER
12818 if (!first_p) {
12819 ripper_dispatch_scan_event(parser, tEMBDOC);
12820 }
12821 first_p = FALSE;
12822 #endif
12823 c = nextc();
12824 if (c == -1) {
12825 compile_error(PARSER_ARG "embedded document meets end of file");
12826 return 0;
12827 }
12828 if (c != '=') continue;
12829 if (strncmp(lex_p, "end", 3) == 0 &&
12830 (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
12831 break;
12832 }
12833 }
12834 lex_goto_eol(parser);
12835 #ifdef RIPPER
12836 ripper_dispatch_scan_event(parser, tEMBDOC_END);
12837 #endif
12838 goto retry;
12839 }
12840 }
12841
12842 switch (lex_state) {
12843 case EXPR_FNAME: case EXPR_DOT:
12844 lex_state = EXPR_ARG; break;
12845 default:
12846 lex_state = EXPR_BEG; break;
12847 }
12848 if ((c = nextc()) == '=') {
12849 if ((c = nextc()) == '=') {
12850 return tEQQ;
12851 }
12852 pushback(c);
12853 return tEQ;
12854 }
12855 if (c == '~') {
12856 return tMATCH;
12857 }
12858 else if (c == '>') {
12859 return tASSOC;
12860 }
12861 pushback(c);
12862 return '=';
12863
12864 case '<':
12865 last_state = lex_state;
12866 c = nextc();
12867 if (c == '<' &&
12868 lex_state != EXPR_DOT &&
12869 lex_state != EXPR_CLASS &&
12870 !IS_END() &&
12871 (!IS_ARG() || space_seen)) {
12872 int token = heredoc_identifier();
12873 if (token) return token;
12874 }
12875 switch (lex_state) {
12876 case EXPR_FNAME: case EXPR_DOT:
12877 lex_state = EXPR_ARG; break;
12878 default:
12879 lex_state = EXPR_BEG; break;
12880 }
12881 if (c == '=') {
12882 if ((c = nextc()) == '>') {
12883 return tCMP;
12884 }
12885 pushback(c);
12886 return tLEQ;
12887 }
12888 if (c == '<') {
12889 if ((c = nextc()) == '=') {
12890 set_yylval_id(tLSHFT);
12891 lex_state = EXPR_BEG;
12892 return tOP_ASGN;
12893 }
12894 pushback(c);
12895 warn_balanced("<<", "here document");
12896 return tLSHFT;
12897 }
12898 pushback(c);
12899 return '<';
12900
12901 case '>':
12902 switch (lex_state) {
12903 case EXPR_FNAME: case EXPR_DOT:
12904 lex_state = EXPR_ARG; break;
12905 default:
12906 lex_state = EXPR_BEG; break;
12907 }
12908 if ((c = nextc()) == '=') {
12909 return tGEQ;
12910 }
12911 if (c == '>') {
12912 if ((c = nextc()) == '=') {
12913 set_yylval_id(tRSHFT);
12914 lex_state = EXPR_BEG;
12915 return tOP_ASGN;
12916 }
12917 pushback(c);
12918 return tRSHFT;
12919 }
12920 pushback(c);
12921 return '>';
12922
12923 case '"':
12924 lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
12925 return tSTRING_BEG;
12926
12927 case '`':
12928 if (lex_state == EXPR_FNAME) {
12929 lex_state = EXPR_ENDFN;
12930 return c;
12931 }
12932 if (lex_state == EXPR_DOT) {
12933 if (cmd_state)
12934 lex_state = EXPR_CMDARG;
12935 else
12936 lex_state = EXPR_ARG;
12937 return c;
12938 }
12939 lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
12940 return tXSTRING_BEG;
12941
12942 case '\'':
12943 lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
12944 return tSTRING_BEG;
12945
12946 case '?':
12947 if (IS_END()) {
12948 lex_state = EXPR_VALUE;
12949 return '?';
12950 }
12951 c = nextc();
12952 if (c == -1) {
12953 compile_error(PARSER_ARG "incomplete character syntax");
12954 return 0;
12955 }
12956 if (rb_enc_isspace(c, parser->enc)) {
12957 if (!IS_ARG()) {
12958 int c2 = 0;
12959 switch (c) {
12960 case ' ':
12961 c2 = 's';
12962 break;
12963 case '\n':
12964 c2 = 'n';
12965 break;
12966 case '\t':
12967 c2 = 't';
12968 break;
12969 case '\v':
12970 c2 = 'v';
12971 break;
12972 case '\r':
12973 c2 = 'r';
12974 break;
12975 case '\f':
12976 c2 = 'f';
12977 break;
12978 }
12979 if (c2) {
12980 rb_warnI("invalid character syntax; use ?\\%c", c2);
12981 }
12982 }
12983 ternary:
12984 pushback(c);
12985 lex_state = EXPR_VALUE;
12986 return '?';
12987 }
12988 newtok();
12989 enc = parser->enc;
12990 if (!parser_isascii()) {
12991 if (tokadd_mbchar(c) == -1) return 0;
12992 }
12993 else if ((rb_enc_isalnum(c, parser->enc) || c == '_') &&
12994 lex_p < lex_pend && is_identchar(lex_p, lex_pend, parser->enc)) {
12995 goto ternary;
12996 }
12997 else if (c == '\\') {
12998 if (peek('u')) {
12999 nextc();
13000 c = parser_tokadd_utf8(parser, &enc, 0, 0, 0);
13001 if (0x80 <= c) {
13002 tokaddmbc(c, enc);
13003 }
13004 else {
13005 tokadd(c);
13006 }
13007 }
13008 else {
13009 c = read_escape(0, &enc);
13010 tokadd(c);
13011 }
13012 }
13013 else {
13014 tokadd(c);
13015 }
13016 tokfix();
13017 set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0));
13018 lex_state = EXPR_END;
13019 return tCHAR;
13020
13021 case '&':
13022 if ((c = nextc()) == '&') {
13023 lex_state = EXPR_BEG;
13024 if ((c = nextc()) == '=') {
13025 set_yylval_id(tANDOP);
13026 lex_state = EXPR_BEG;
13027 return tOP_ASGN;
13028 }
13029 pushback(c);
13030 return tANDOP;
13031 }
13032 else if (c == '=') {
13033 set_yylval_id('&');
13034 lex_state = EXPR_BEG;
13035 return tOP_ASGN;
13036 }
13037 pushback(c);
13038 if (IS_SPCARG(c)) {
13039 rb_warning0("`&' interpreted as argument prefix");
13040 c = tAMPER;
13041 }
13042 else if (IS_BEG()) {
13043 c = tAMPER;
13044 }
13045 else {
13046 warn_balanced("&", "argument prefix");
13047 c = '&';
13048 }
13049 switch (lex_state) {
13050 case EXPR_FNAME: case EXPR_DOT:
13051 lex_state = EXPR_ARG; break;
13052 default:
13053 lex_state = EXPR_BEG;
13054 }
13055 return c;
13056
13057 case '|':
13058 if ((c = nextc()) == '|') {
13059 lex_state = EXPR_BEG;
13060 if ((c = nextc()) == '=') {
13061 set_yylval_id(tOROP);
13062 lex_state = EXPR_BEG;
13063 return tOP_ASGN;
13064 }
13065 pushback(c);
13066 return tOROP;
13067 }
13068 if (c == '=') {
13069 set_yylval_id('|');
13070 lex_state = EXPR_BEG;
13071 return tOP_ASGN;
13072 }
13073 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13074 lex_state = EXPR_ARG;
13075 }
13076 else {
13077 lex_state = EXPR_BEG;
13078 }
13079 pushback(c);
13080 return '|';
13081
13082 case '+':
13083 c = nextc();
13084 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13085 lex_state = EXPR_ARG;
13086 if (c == '@') {
13087 return tUPLUS;
13088 }
13089 pushback(c);
13090 return '+';
13091 }
13092 if (c == '=') {
13093 set_yylval_id('+');
13094 lex_state = EXPR_BEG;
13095 return tOP_ASGN;
13096 }
13097 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
13098 lex_state = EXPR_BEG;
13099 pushback(c);
13100 if (c != -1 && ISDIGIT(c)) {
13101 c = '+';
13102 goto start_num;
13103 }
13104 return tUPLUS;
13105 }
13106 lex_state = EXPR_BEG;
13107 pushback(c);
13108 warn_balanced("+", "unary operator");
13109 return '+';
13110
13111 case '-':
13112 c = nextc();
13113 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13114 lex_state = EXPR_ARG;
13115 if (c == '@') {
13116 return tUMINUS;
13117 }
13118 pushback(c);
13119 return '-';
13120 }
13121 if (c == '=') {
13122 set_yylval_id('-');
13123 lex_state = EXPR_BEG;
13124 return tOP_ASGN;
13125 }
13126 if (c == '>') {
13127 lex_state = EXPR_ARG;
13128 return tLAMBDA;
13129 }
13130 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous())) {
13131 lex_state = EXPR_BEG;
13132 pushback(c);
13133 if (c != -1 && ISDIGIT(c)) {
13134 return tUMINUS_NUM;
13135 }
13136 return tUMINUS;
13137 }
13138 lex_state = EXPR_BEG;
13139 pushback(c);
13140 warn_balanced("-", "unary operator");
13141 return '-';
13142
13143 case '.':
13144 lex_state = EXPR_BEG;
13145 if ((c = nextc()) == '.') {
13146 if ((c = nextc()) == '.') {
13147 return tDOT3;
13148 }
13149 pushback(c);
13150 return tDOT2;
13151 }
13152 pushback(c);
13153 if (c != -1 && ISDIGIT(c)) {
13154 yyerror("no .<digit> floating literal anymore; put 0 before dot");
13155 }
13156 lex_state = EXPR_DOT;
13157 return '.';
13158
13159 start_num:
13160 case '0': case '1': case '2': case '3': case '4':
13161 case '5': case '6': case '7': case '8': case '9':
13162 {
13163 int is_float, seen_point, seen_e, nondigit;
13164
13165 is_float = seen_point = seen_e = nondigit = 0;
13166 lex_state = EXPR_END;
13167 newtok();
13168 if (c == '-' || c == '+') {
13169 tokadd(c);
13170 c = nextc();
13171 }
13172 if (c == '0') {
13173 #define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0)
13174 int start = toklen();
13175 c = nextc();
13176 if (c == 'x' || c == 'X') {
13177
13178 c = nextc();
13179 if (c != -1 && ISXDIGIT(c)) {
13180 do {
13181 if (c == '_') {
13182 if (nondigit) break;
13183 nondigit = c;
13184 continue;
13185 }
13186 if (!ISXDIGIT(c)) break;
13187 nondigit = 0;
13188 tokadd(c);
13189 } while ((c = nextc()) != -1);
13190 }
13191 pushback(c);
13192 tokfix();
13193 if (toklen() == start) {
13194 no_digits();
13195 }
13196 else if (nondigit) goto trailing_uc;
13197 set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE));
13198 return tINTEGER;
13199 }
13200 if (c == 'b' || c == 'B') {
13201
13202 c = nextc();
13203 if (c == '0' || c == '1') {
13204 do {
13205 if (c == '_') {
13206 if (nondigit) break;
13207 nondigit = c;
13208 continue;
13209 }
13210 if (c != '0' && c != '1') break;
13211 nondigit = 0;
13212 tokadd(c);
13213 } while ((c = nextc()) != -1);
13214 }
13215 pushback(c);
13216 tokfix();
13217 if (toklen() == start) {
13218 no_digits();
13219 }
13220 else if (nondigit) goto trailing_uc;
13221 set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE));
13222 return tINTEGER;
13223 }
13224 if (c == 'd' || c == 'D') {
13225
13226 c = nextc();
13227 if (c != -1 && ISDIGIT(c)) {
13228 do {
13229 if (c == '_') {
13230 if (nondigit) break;
13231 nondigit = c;
13232 continue;
13233 }
13234 if (!ISDIGIT(c)) break;
13235 nondigit = 0;
13236 tokadd(c);
13237 } while ((c = nextc()) != -1);
13238 }
13239 pushback(c);
13240 tokfix();
13241 if (toklen() == start) {
13242 no_digits();
13243 }
13244 else if (nondigit) goto trailing_uc;
13245 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE));
13246 return tINTEGER;
13247 }
13248 if (c == '_') {
13249
13250 goto octal_number;
13251 }
13252 if (c == 'o' || c == 'O') {
13253
13254 c = nextc();
13255 if (c == -1 || c == '_' || !ISDIGIT(c)) {
13256 no_digits();
13257 }
13258 }
13259 if (c >= '0' && c <= '7') {
13260
13261 octal_number:
13262 do {
13263 if (c == '_') {
13264 if (nondigit) break;
13265 nondigit = c;
13266 continue;
13267 }
13268 if (c < '0' || c > '9') break;
13269 if (c > '7') goto invalid_octal;
13270 nondigit = 0;
13271 tokadd(c);
13272 } while ((c = nextc()) != -1);
13273 if (toklen() > start) {
13274 pushback(c);
13275 tokfix();
13276 if (nondigit) goto trailing_uc;
13277 set_yylval_literal(rb_cstr_to_inum(tok(), 8, FALSE));
13278 return tINTEGER;
13279 }
13280 if (nondigit) {
13281 pushback(c);
13282 goto trailing_uc;
13283 }
13284 }
13285 if (c > '7' && c <= '9') {
13286 invalid_octal:
13287 yyerror("Invalid octal digit");
13288 }
13289 else if (c == '.' || c == 'e' || c == 'E') {
13290 tokadd('0');
13291 }
13292 else {
13293 pushback(c);
13294 set_yylval_literal(INT2FIX(0));
13295 return tINTEGER;
13296 }
13297 }
13298
13299 for (;;) {
13300 switch (c) {
13301 case '0': case '1': case '2': case '3': case '4':
13302 case '5': case '6': case '7': case '8': case '9':
13303 nondigit = 0;
13304 tokadd(c);
13305 break;
13306
13307 case '.':
13308 if (nondigit) goto trailing_uc;
13309 if (seen_point || seen_e) {
13310 goto decode_num;
13311 }
13312 else {
13313 int c0 = nextc();
13314 if (c0 == -1 || !ISDIGIT(c0)) {
13315 pushback(c0);
13316 goto decode_num;
13317 }
13318 c = c0;
13319 }
13320 tokadd('.');
13321 tokadd(c);
13322 is_float++;
13323 seen_point++;
13324 nondigit = 0;
13325 break;
13326
13327 case 'e':
13328 case 'E':
13329 if (nondigit) {
13330 pushback(c);
13331 c = nondigit;
13332 goto decode_num;
13333 }
13334 if (seen_e) {
13335 goto decode_num;
13336 }
13337 tokadd(c);
13338 seen_e++;
13339 is_float++;
13340 nondigit = c;
13341 c = nextc();
13342 if (c != '-' && c != '+') continue;
13343 tokadd(c);
13344 nondigit = c;
13345 break;
13346
13347 case '_':
13348 if (nondigit) goto decode_num;
13349 nondigit = c;
13350 break;
13351
13352 default:
13353 goto decode_num;
13354 }
13355 c = nextc();
13356 }
13357
13358 decode_num:
13359 pushback(c);
13360 if (nondigit) {
13361 char tmp[30];
13362 trailing_uc:
13363 snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
13364 yyerror(tmp);
13365 }
13366 tokfix();
13367 if (is_float) {
13368 double d = strtod(tok(), 0);
13369 if (errno == ERANGE) {
13370 rb_warningS("Float %s out of range", tok());
13371 errno = 0;
13372 }
13373 set_yylval_literal(DBL2NUM(d));
13374 return tFLOAT;
13375 }
13376 set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE));
13377 return tINTEGER;
13378 }
13379
13380 case ')':
13381 case ']':
13382 paren_nest--;
13383 case '}':
13384 COND_LEXPOP();
13385 CMDARG_LEXPOP();
13386 if (c == ')')
13387 lex_state = EXPR_ENDFN;
13388 else
13389 lex_state = EXPR_ENDARG;
13390 return c;
13391
13392 case ':':
13393 c = nextc();
13394 if (c == ':') {
13395 if (IS_BEG() || lex_state == EXPR_CLASS || IS_SPCARG(-1)) {
13396 lex_state = EXPR_BEG;
13397 return tCOLON3;
13398 }
13399 lex_state = EXPR_DOT;
13400 return tCOLON2;
13401 }
13402 if (IS_END() || ISSPACE(c)) {
13403 pushback(c);
13404 warn_balanced(":", "symbol literal");
13405 lex_state = EXPR_BEG;
13406 return ':';
13407 }
13408 switch (c) {
13409 case '\'':
13410 lex_strterm = NEW_STRTERM(str_ssym, c, 0);
13411 break;
13412 case '"':
13413 lex_strterm = NEW_STRTERM(str_dsym, c, 0);
13414 break;
13415 default:
13416 pushback(c);
13417 break;
13418 }
13419 lex_state = EXPR_FNAME;
13420 return tSYMBEG;
13421
13422 case '/':
13423 if (IS_BEG()) {
13424 lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
13425 return tREGEXP_BEG;
13426 }
13427 if ((c = nextc()) == '=') {
13428 set_yylval_id('/');
13429 lex_state = EXPR_BEG;
13430 return tOP_ASGN;
13431 }
13432 pushback(c);
13433 if (IS_SPCARG(c)) {
13434 arg_ambiguous();
13435 lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
13436 return tREGEXP_BEG;
13437 }
13438 switch (lex_state) {
13439 case EXPR_FNAME: case EXPR_DOT:
13440 lex_state = EXPR_ARG; break;
13441 default:
13442 lex_state = EXPR_BEG; break;
13443 }
13444 warn_balanced("/", "regexp literal");
13445 return '/';
13446
13447 case '^':
13448 if ((c = nextc()) == '=') {
13449 set_yylval_id('^');
13450 lex_state = EXPR_BEG;
13451 return tOP_ASGN;
13452 }
13453 switch (lex_state) {
13454 case EXPR_FNAME: case EXPR_DOT:
13455 lex_state = EXPR_ARG; break;
13456 default:
13457 lex_state = EXPR_BEG; break;
13458 }
13459 pushback(c);
13460 return '^';
13461
13462 case ';':
13463 lex_state = EXPR_BEG;
13464 command_start = TRUE;
13465 return ';';
13466
13467 case ',':
13468 lex_state = EXPR_BEG;
13469 return ',';
13470
13471 case '~':
13472 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13473 if ((c = nextc()) != '@') {
13474 pushback(c);
13475 }
13476 lex_state = EXPR_ARG;
13477 }
13478 else {
13479 lex_state = EXPR_BEG;
13480 }
13481 return '~';
13482
13483 case '(':
13484 if (IS_BEG()) {
13485 c = tLPAREN;
13486 }
13487 else if (IS_SPCARG(-1)) {
13488 c = tLPAREN_ARG;
13489 }
13490 paren_nest++;
13491 COND_PUSH(0);
13492 CMDARG_PUSH(0);
13493 lex_state = EXPR_BEG;
13494 return c;
13495
13496 case '[':
13497 paren_nest++;
13498 if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
13499 lex_state = EXPR_ARG;
13500 if ((c = nextc()) == ']') {
13501 if ((c = nextc()) == '=') {
13502 return tASET;
13503 }
13504 pushback(c);
13505 return tAREF;
13506 }
13507 pushback(c);
13508 return '[';
13509 }
13510 else if (IS_BEG()) {
13511 c = tLBRACK;
13512 }
13513 else if (IS_ARG() && space_seen) {
13514 c = tLBRACK;
13515 }
13516 lex_state = EXPR_BEG;
13517 COND_PUSH(0);
13518 CMDARG_PUSH(0);
13519 return c;
13520
13521 case '{':
13522 if (lpar_beg && lpar_beg == paren_nest) {
13523 lex_state = EXPR_BEG;
13524 lpar_beg = 0;
13525 --paren_nest;
13526 COND_PUSH(0);
13527 CMDARG_PUSH(0);
13528 return tLAMBEG;
13529 }
13530 if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_ENDFN)
13531 c = '{';
13532 else if (lex_state == EXPR_ENDARG)
13533 c = tLBRACE_ARG;
13534 else
13535 c = tLBRACE;
13536 COND_PUSH(0);
13537 CMDARG_PUSH(0);
13538 lex_state = EXPR_BEG;
13539 if (c != tLBRACE) command_start = TRUE;
13540 return c;
13541
13542 case '\\':
13543 c = nextc();
13544 if (c == '\n') {
13545 space_seen = 1;
13546 #ifdef RIPPER
13547 ripper_dispatch_scan_event(parser, tSP);
13548 #endif
13549 goto retry;
13550 }
13551 pushback(c);
13552 return '\\';
13553
13554 case '%':
13555 if (IS_BEG()) {
13556 int term;
13557 int paren;
13558
13559 c = nextc();
13560 quotation:
13561 if (c == -1 || !ISALNUM(c)) {
13562 term = c;
13563 c = 'Q';
13564 }
13565 else {
13566 term = nextc();
13567 if (rb_enc_isalnum(term, parser->enc) || !parser_isascii()) {
13568 yyerror("unknown type of %string");
13569 return 0;
13570 }
13571 }
13572 if (c == -1 || term == -1) {
13573 compile_error(PARSER_ARG "unterminated quoted string meets end of file");
13574 return 0;
13575 }
13576 paren = term;
13577 if (term == '(') term = ')';
13578 else if (term == '[') term = ']';
13579 else if (term == '{') term = '}';
13580 else if (term == '<') term = '>';
13581 else paren = 0;
13582
13583 switch (c) {
13584 case 'Q':
13585 lex_strterm = NEW_STRTERM(str_dquote, term, paren);
13586 return tSTRING_BEG;
13587
13588 case 'q':
13589 lex_strterm = NEW_STRTERM(str_squote, term, paren);
13590 return tSTRING_BEG;
13591
13592 case 'W':
13593 lex_strterm = NEW_STRTERM(str_dword, term, paren);
13594 do {c = nextc();} while (ISSPACE(c));
13595 pushback(c);
13596 return tWORDS_BEG;
13597
13598 case 'w':
13599 lex_strterm = NEW_STRTERM(str_sword, term, paren);
13600 do {c = nextc();} while (ISSPACE(c));
13601 pushback(c);
13602 return tQWORDS_BEG;
13603
13604 case 'x':
13605 lex_strterm = NEW_STRTERM(str_xquote, term, paren);
13606 return tXSTRING_BEG;
13607
13608 case 'r':
13609 lex_strterm = NEW_STRTERM(str_regexp, term, paren);
13610 return tREGEXP_BEG;
13611
13612 case 's':
13613 lex_strterm = NEW_STRTERM(str_ssym, term, paren);
13614 lex_state = EXPR_FNAME;
13615 return tSYMBEG;
13616
13617 default:
13618 yyerror("unknown type of %string");
13619 return 0;
13620 }
13621 }
13622 if ((c = nextc()) == '=') {
13623 set_yylval_id('%');
13624 lex_state = EXPR_BEG;
13625 return tOP_ASGN;
13626 }
13627 if (IS_SPCARG(c)) {
13628 goto quotation;
13629 }
13630 switch (lex_state) {
13631 case EXPR_FNAME: case EXPR_DOT:
13632 lex_state = EXPR_ARG; break;
13633 default:
13634 lex_state = EXPR_BEG; break;
13635 }
13636 pushback(c);
13637 warn_balanced("%%", "string literal");
13638 return '%';
13639
13640 case '$':
13641 lex_state = EXPR_END;
13642 newtok();
13643 c = nextc();
13644 switch (c) {
13645 case '_':
13646 c = nextc();
13647 if (parser_is_identchar()) {
13648 tokadd('$');
13649 tokadd('_');
13650 break;
13651 }
13652 pushback(c);
13653 c = '_';
13654
13655 case '~':
13656 case '*':
13657 case '$':
13658 case '?':
13659 case '!':
13660 case '@':
13661 case '/':
13662 case '\\':
13663 case ';':
13664 case ',':
13665 case '.':
13666 case '=':
13667 case ':':
13668 case '<':
13669 case '>':
13670 case '\"':
13671 tokadd('$');
13672 tokadd(c);
13673 tokfix();
13674 set_yylval_name(rb_intern(tok()));
13675 return tGVAR;
13676
13677 case '-':
13678 tokadd('$');
13679 tokadd(c);
13680 c = nextc();
13681 if (parser_is_identchar()) {
13682 if (tokadd_mbchar(c) == -1) return 0;
13683 }
13684 else {
13685 pushback(c);
13686 }
13687 gvar:
13688 tokfix();
13689 set_yylval_name(rb_intern(tok()));
13690 return tGVAR;
13691
13692 case '&':
13693 case '`':
13694 case '\'':
13695 case '+':
13696 if (last_state == EXPR_FNAME) {
13697 tokadd('$');
13698 tokadd(c);
13699 goto gvar;
13700 }
13701 set_yylval_node(NEW_BACK_REF(c));
13702 return tBACK_REF;
13703
13704 case '1': case '2': case '3':
13705 case '4': case '5': case '6':
13706 case '7': case '8': case '9':
13707 tokadd('$');
13708 do {
13709 tokadd(c);
13710 c = nextc();
13711 } while (c != -1 && ISDIGIT(c));
13712 pushback(c);
13713 if (last_state == EXPR_FNAME) goto gvar;
13714 tokfix();
13715 set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
13716 return tNTH_REF;
13717
13718 default:
13719 if (!parser_is_identchar()) {
13720 pushback(c);
13721 return '$';
13722 }
13723 case '0':
13724 tokadd('$');
13725 }
13726 break;
13727
13728 case '@':
13729 c = nextc();
13730 newtok();
13731 tokadd('@');
13732 if (c == '@') {
13733 tokadd('@');
13734 c = nextc();
13735 }
13736 if (c != -1 && ISDIGIT(c)) {
13737 if (tokidx == 1) {
13738 compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c);
13739 }
13740 else {
13741 compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c);
13742 }
13743 return 0;
13744 }
13745 if (!parser_is_identchar()) {
13746 pushback(c);
13747 return '@';
13748 }
13749 break;
13750
13751 case '_':
13752 if (was_bol() && whole_match_p("__END__", 7, 0)) {
13753 ruby__end__seen = 1;
13754 parser->eofp = Qtrue;
13755 #ifndef RIPPER
13756 return -1;
13757 #else
13758 lex_goto_eol(parser);
13759 ripper_dispatch_scan_event(parser, k__END__);
13760 return 0;
13761 #endif
13762 }
13763 newtok();
13764 break;
13765
13766 default:
13767 if (!parser_is_identchar()) {
13768 rb_compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c);
13769 goto retry;
13770 }
13771
13772 newtok();
13773 break;
13774 }
13775
13776 mb = ENC_CODERANGE_7BIT;
13777 do {
13778 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
13779 if (tokadd_mbchar(c) == -1) return 0;
13780 c = nextc();
13781 } while (parser_is_identchar());
13782 switch (tok()[0]) {
13783 case '@': case '$':
13784 pushback(c);
13785 break;
13786 default:
13787 if ((c == '!' || c == '?') && !peek('=')) {
13788 tokadd(c);
13789 }
13790 else {
13791 pushback(c);
13792 }
13793 }
13794 tokfix();
13795
13796 {
13797 int result = 0;
13798
13799 last_state = lex_state;
13800 switch (tok()[0]) {
13801 case '$':
13802 lex_state = EXPR_END;
13803 result = tGVAR;
13804 break;
13805 case '@':
13806 lex_state = EXPR_END;
13807 if (tok()[1] == '@')
13808 result = tCVAR;
13809 else
13810 result = tIVAR;
13811 break;
13812
13813 default:
13814 if (toklast() == '!' || toklast() == '?') {
13815 result = tFID;
13816 }
13817 else {
13818 if (lex_state == EXPR_FNAME) {
13819 if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
13820 (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) {
13821 result = tIDENTIFIER;
13822 tokadd(c);
13823 tokfix();
13824 }
13825 else {
13826 pushback(c);
13827 }
13828 }
13829 if (result == 0 && ISUPPER(tok()[0])) {
13830 result = tCONSTANT;
13831 }
13832 else {
13833 result = tIDENTIFIER;
13834 }
13835 }
13836
13837 if ((lex_state == EXPR_BEG && !cmd_state) ||
13838 IS_ARG()) {
13839 if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) {
13840 lex_state = EXPR_BEG;
13841 nextc();
13842 set_yylval_name(TOK_INTERN(!ENC_SINGLE(mb)));
13843 return tLABEL;
13844 }
13845 }
13846 if (mb == ENC_CODERANGE_7BIT && lex_state != EXPR_DOT) {
13847 const struct kwtable *kw;
13848
13849
13850 kw = rb_reserved_word(tok(), toklen());
13851 if (kw) {
13852 enum lex_state_e state = lex_state;
13853 lex_state = kw->state;
13854 if (state == EXPR_FNAME) {
13855 set_yylval_name(rb_intern(kw->name));
13856 return kw->id[0];
13857 }
13858 if (kw->id[0] == keyword_do) {
13859 command_start = TRUE;
13860 if (lpar_beg && lpar_beg == paren_nest) {
13861 lpar_beg = 0;
13862 --paren_nest;
13863 return keyword_do_LAMBDA;
13864 }
13865 if (COND_P()) return keyword_do_cond;
13866 if (CMDARG_P() && state != EXPR_CMDARG)
13867 return keyword_do_block;
13868 if (state == EXPR_ENDARG || state == EXPR_BEG)
13869 return keyword_do_block;
13870 return keyword_do;
13871 }
13872 if (state == EXPR_BEG || state == EXPR_VALUE)
13873 return kw->id[0];
13874 else {
13875 if (kw->id[0] != kw->id[1])
13876 lex_state = EXPR_BEG;
13877 return kw->id[1];
13878 }
13879 }
13880 }
13881
13882 if (IS_BEG() ||
13883 lex_state == EXPR_DOT ||
13884 IS_ARG()) {
13885 if (cmd_state) {
13886 lex_state = EXPR_CMDARG;
13887 }
13888 else {
13889 lex_state = EXPR_ARG;
13890 }
13891 }
13892 else if (lex_state == EXPR_FNAME) {
13893 lex_state = EXPR_ENDFN;
13894 }
13895 else {
13896 lex_state = EXPR_END;
13897 }
13898 }
13899 {
13900 ID ident = TOK_INTERN(!ENC_SINGLE(mb));
13901
13902 set_yylval_name(ident);
13903 if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) {
13904 lex_state = EXPR_END;
13905 }
13906 }
13907 return result;
13908 }
13909 }
13910
13911 #if YYPURE
13912 static int
13913 yylex(void *lval, void *p)
13914 #else
13915 yylex(void *p)
13916 #endif
13917 {
13918 struct parser_params *parser = (struct parser_params*)p;
13919 int t;
13920
13921 #if YYPURE
13922 parser->parser_yylval = lval;
13923 parser->parser_yylval->val = Qundef;
13924 #endif
13925 t = parser_yylex(parser);
13926 #ifdef RIPPER
13927 if (!NIL_P(parser->delayed)) {
13928 ripper_dispatch_delayed_token(parser, t);
13929 }
13930 if (t != 0)
13931 ripper_dispatch_scan_event(parser, t);
13932 #endif
13933
13934 return t;
13935 }
13936
13937 #ifndef RIPPER
13938 static NODE*
13939 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
13940 {
13941 NODE *n = (rb_node_newnode)(type, a0, a1, a2);
13942 nd_set_line(n, ruby_sourceline);
13943 return n;
13944 }
13945
13946 enum node_type
13947 nodetype(NODE *node)
13948 {
13949 return (enum node_type)nd_type(node);
13950 }
13951
13952 int
13953 nodeline(NODE *node)
13954 {
13955 return nd_line(node);
13956 }
13957
13958 static NODE*
13959 newline_node(NODE *node)
13960 {
13961 if (node) {
13962 node = remove_begin(node);
13963 node->flags |= NODE_FL_NEWLINE;
13964 }
13965 return node;
13966 }
13967
13968 static void
13969 fixpos(NODE *node, NODE *orig)
13970 {
13971 if (!node) return;
13972 if (!orig) return;
13973 if (orig == (NODE*)1) return;
13974 nd_set_line(node, nd_line(orig));
13975 }
13976
13977 static void
13978 parser_warning(struct parser_params *parser, NODE *node, const char *mesg)
13979 {
13980 rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg);
13981 }
13982 #define parser_warning(node, mesg) parser_warning(parser, node, mesg)
13983
13984 static void
13985 parser_warn(struct parser_params *parser, NODE *node, const char *mesg)
13986 {
13987 rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg);
13988 }
13989 #define parser_warn(node, mesg) parser_warn(parser, node, mesg)
13990
13991 static NODE*
13992 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail)
13993 {
13994 NODE *end, *h = head, *nd;
13995
13996 if (tail == 0) return head;
13997
13998 if (h == 0) return tail;
13999 switch (nd_type(h)) {
14000 case NODE_LIT:
14001 case NODE_STR:
14002 case NODE_SELF:
14003 case NODE_TRUE:
14004 case NODE_FALSE:
14005 case NODE_NIL:
14006 parser_warning(h, "unused literal ignored");
14007 return tail;
14008 default:
14009 h = end = NEW_BLOCK(head);
14010 end->nd_end = end;
14011 fixpos(end, head);
14012 head = end;
14013 break;
14014 case NODE_BLOCK:
14015 end = h->nd_end;
14016 break;
14017 }
14018
14019 nd = end->nd_head;
14020 switch (nd_type(nd)) {
14021 case NODE_RETURN:
14022 case NODE_BREAK:
14023 case NODE_NEXT:
14024 case NODE_REDO:
14025 case NODE_RETRY:
14026 if (RTEST(ruby_verbose)) {
14027 parser_warning(nd, "statement not reached");
14028 }
14029 break;
14030
14031 default:
14032 break;
14033 }
14034
14035 if (nd_type(tail) != NODE_BLOCK) {
14036 tail = NEW_BLOCK(tail);
14037 tail->nd_end = tail;
14038 }
14039 end->nd_next = tail;
14040 h->nd_end = tail->nd_end;
14041 return head;
14042 }
14043
14044
14045 static NODE*
14046 list_append_gen(struct parser_params *parser, NODE *list, NODE *item)
14047 {
14048 NODE *last;
14049
14050 if (list == 0) return NEW_LIST(item);
14051 if (list->nd_next) {
14052 last = list->nd_next->nd_end;
14053 }
14054 else {
14055 last = list;
14056 }
14057
14058 list->nd_alen += 1;
14059 last->nd_next = NEW_LIST(item);
14060 list->nd_next->nd_end = last->nd_next;
14061 return list;
14062 }
14063
14064
14065 static NODE*
14066 list_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
14067 {
14068 NODE *last;
14069
14070 if (head->nd_next) {
14071 last = head->nd_next->nd_end;
14072 }
14073 else {
14074 last = head;
14075 }
14076
14077 head->nd_alen += tail->nd_alen;
14078 last->nd_next = tail;
14079 if (tail->nd_next) {
14080 head->nd_next->nd_end = tail->nd_next->nd_end;
14081 }
14082 else {
14083 head->nd_next->nd_end = tail;
14084 }
14085
14086 return head;
14087 }
14088
14089 static int
14090 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
14091 {
14092 if (NIL_P(tail)) return 1;
14093 if (!rb_enc_compatible(head, tail)) {
14094 compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
14095 rb_enc_name(rb_enc_get(head)),
14096 rb_enc_name(rb_enc_get(tail)));
14097 rb_str_resize(head, 0);
14098 rb_str_resize(tail, 0);
14099 return 0;
14100 }
14101 rb_str_buf_append(head, tail);
14102 return 1;
14103 }
14104
14105
14106 static NODE *
14107 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
14108 {
14109 enum node_type htype;
14110
14111 if (!head) return tail;
14112 if (!tail) return head;
14113
14114 htype = nd_type(head);
14115 if (htype == NODE_EVSTR) {
14116 NODE *node = NEW_DSTR(Qnil);
14117 head = list_append(node, head);
14118 }
14119 switch (nd_type(tail)) {
14120 case NODE_STR:
14121 if (htype == NODE_STR) {
14122 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit)) {
14123 error:
14124 rb_gc_force_recycle((VALUE)head);
14125 rb_gc_force_recycle((VALUE)tail);
14126 return 0;
14127 }
14128 rb_gc_force_recycle((VALUE)tail);
14129 }
14130 else {
14131 list_append(head, tail);
14132 }
14133 break;
14134
14135 case NODE_DSTR:
14136 if (htype == NODE_STR) {
14137 if (!literal_concat0(parser, head->nd_lit, tail->nd_lit))
14138 goto error;
14139 tail->nd_lit = head->nd_lit;
14140 rb_gc_force_recycle((VALUE)head);
14141 head = tail;
14142 }
14143 else if (NIL_P(tail->nd_lit)) {
14144 head->nd_alen += tail->nd_alen - 1;
14145 head->nd_next->nd_end->nd_next = tail->nd_next;
14146 head->nd_next->nd_end = tail->nd_next->nd_end;
14147 rb_gc_force_recycle((VALUE)tail);
14148 }
14149 else {
14150 nd_set_type(tail, NODE_ARRAY);
14151 tail->nd_head = NEW_STR(tail->nd_lit);
14152 list_concat(head, tail);
14153 }
14154 break;
14155
14156 case NODE_EVSTR:
14157 if (htype == NODE_STR) {
14158 nd_set_type(head, NODE_DSTR);
14159 head->nd_alen = 1;
14160 }
14161 list_append(head, tail);
14162 break;
14163 }
14164 return head;
14165 }
14166
14167 static NODE *
14168 evstr2dstr_gen(struct parser_params *parser, NODE *node)
14169 {
14170 if (nd_type(node) == NODE_EVSTR) {
14171 node = list_append(NEW_DSTR(Qnil), node);
14172 }
14173 return node;
14174 }
14175
14176 static NODE *
14177 new_evstr_gen(struct parser_params *parser, NODE *node)
14178 {
14179 NODE *head = node;
14180
14181 if (node) {
14182 switch (nd_type(node)) {
14183 case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
14184 return node;
14185 }
14186 }
14187 return NEW_EVSTR(head);
14188 }
14189
14190 static NODE *
14191 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1)
14192 {
14193 value_expr(recv);
14194 value_expr(arg1);
14195 return NEW_CALL(recv, id, NEW_LIST(arg1));
14196 }
14197
14198 static NODE *
14199 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id)
14200 {
14201 value_expr(recv);
14202 return NEW_CALL(recv, id, 0);
14203 }
14204
14205 static NODE*
14206 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14207 {
14208 value_expr(node1);
14209 value_expr(node2);
14210 if (node1) {
14211 switch (nd_type(node1)) {
14212 case NODE_DREGX:
14213 case NODE_DREGX_ONCE:
14214 return NEW_MATCH2(node1, node2);
14215
14216 case NODE_LIT:
14217 if (TYPE(node1->nd_lit) == T_REGEXP) {
14218 return NEW_MATCH2(node1, node2);
14219 }
14220 }
14221 }
14222
14223 if (node2) {
14224 switch (nd_type(node2)) {
14225 case NODE_DREGX:
14226 case NODE_DREGX_ONCE:
14227 return NEW_MATCH3(node2, node1);
14228
14229 case NODE_LIT:
14230 if (TYPE(node2->nd_lit) == T_REGEXP) {
14231 return NEW_MATCH3(node2, node1);
14232 }
14233 }
14234 }
14235
14236 return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
14237 }
14238
14239 static NODE*
14240 gettable_gen(struct parser_params *parser, ID id)
14241 {
14242 if (id == keyword_self) {
14243 return NEW_SELF();
14244 }
14245 else if (id == keyword_nil) {
14246 return NEW_NIL();
14247 }
14248 else if (id == keyword_true) {
14249 return NEW_TRUE();
14250 }
14251 else if (id == keyword_false) {
14252 return NEW_FALSE();
14253 }
14254 else if (id == keyword__FILE__) {
14255 return NEW_STR(rb_external_str_new_with_enc(ruby_sourcefile, strlen(ruby_sourcefile),
14256 rb_filesystem_encoding()));
14257 }
14258 else if (id == keyword__LINE__) {
14259 return NEW_LIT(INT2FIX(ruby_sourceline));
14260 }
14261 else if (id == keyword__ENCODING__) {
14262 return NEW_LIT(rb_enc_from_encoding(parser->enc));
14263 }
14264 else if (is_local_id(id)) {
14265 if (dyna_in_block() && dvar_defined(id)) return NEW_DVAR(id);
14266 if (local_id(id)) return NEW_LVAR(id);
14267
14268 return NEW_VCALL(id);
14269 }
14270 else if (is_global_id(id)) {
14271 return NEW_GVAR(id);
14272 }
14273 else if (is_instance_id(id)) {
14274 return NEW_IVAR(id);
14275 }
14276 else if (is_const_id(id)) {
14277 return NEW_CONST(id);
14278 }
14279 else if (is_class_id(id)) {
14280 return NEW_CVAR(id);
14281 }
14282 compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2name(id));
14283 return 0;
14284 }
14285 #endif
14286
14287 #ifdef RIPPER
14288 static VALUE
14289 assignable_gen(struct parser_params *parser, VALUE lhs)
14290 #else
14291 static NODE*
14292 assignable_gen(struct parser_params *parser, ID id, NODE *val)
14293 #endif
14294 {
14295 #ifdef RIPPER
14296 ID id = get_id(lhs);
14297 # define assignable_result(x) get_value(lhs)
14298 # define parser_yyerror(parser, x) dispatch1(assign_error, lhs)
14299 #else
14300 # define assignable_result(x) x
14301 #endif
14302 if (!id) return assignable_result(0);
14303 if (id == keyword_self) {
14304 yyerror("Can't change the value of self");
14305 }
14306 else if (id == keyword_nil) {
14307 yyerror("Can't assign to nil");
14308 }
14309 else if (id == keyword_true) {
14310 yyerror("Can't assign to true");
14311 }
14312 else if (id == keyword_false) {
14313 yyerror("Can't assign to false");
14314 }
14315 else if (id == keyword__FILE__) {
14316 yyerror("Can't assign to __FILE__");
14317 }
14318 else if (id == keyword__LINE__) {
14319 yyerror("Can't assign to __LINE__");
14320 }
14321 else if (id == keyword__ENCODING__) {
14322 yyerror("Can't assign to __ENCODING__");
14323 }
14324 else if (is_local_id(id)) {
14325 if (dyna_in_block()) {
14326 if (dvar_curr(id)) {
14327 return assignable_result(NEW_DASGN_CURR(id, val));
14328 }
14329 else if (dvar_defined(id)) {
14330 return assignable_result(NEW_DASGN(id, val));
14331 }
14332 else if (local_id(id)) {
14333 return assignable_result(NEW_LASGN(id, val));
14334 }
14335 else {
14336 dyna_var(id);
14337 return assignable_result(NEW_DASGN_CURR(id, val));
14338 }
14339 }
14340 else {
14341 if (!local_id(id)) {
14342 local_var(id);
14343 }
14344 return assignable_result(NEW_LASGN(id, val));
14345 }
14346 }
14347 else if (is_global_id(id)) {
14348 return assignable_result(NEW_GASGN(id, val));
14349 }
14350 else if (is_instance_id(id)) {
14351 return assignable_result(NEW_IASGN(id, val));
14352 }
14353 else if (is_const_id(id)) {
14354 if (!in_def && !in_single)
14355 return assignable_result(NEW_CDECL(id, val, 0));
14356 yyerror("dynamic constant assignment");
14357 }
14358 else if (is_class_id(id)) {
14359 return assignable_result(NEW_CVASGN(id, val));
14360 }
14361 else {
14362 compile_error(PARSER_ARG "identifier %s is not valid to set", rb_id2name(id));
14363 }
14364 return assignable_result(0);
14365 #undef assignable_result
14366 #undef parser_yyerror
14367 }
14368
14369 static ID
14370 shadowing_lvar_gen(struct parser_params *parser, ID name)
14371 {
14372 ID uscore;
14373
14374 CONST_ID(uscore, "_");
14375 if (uscore == name) return name;
14376 if (dyna_in_block()) {
14377 if (dvar_curr(name)) {
14378 yyerror("duplicated argument name");
14379 }
14380 else if (dvar_defined(name) || local_id(name)) {
14381 rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
14382 vtable_add(lvtbl->vars, name);
14383 }
14384 }
14385 else {
14386 if (local_id(name)) {
14387 yyerror("duplicated argument name");
14388 }
14389 }
14390 return name;
14391 }
14392
14393 static void
14394 new_bv_gen(struct parser_params *parser, ID name)
14395 {
14396 if (!name) return;
14397 if (!is_local_id(name)) {
14398 compile_error(PARSER_ARG "invalid local variable - %s",
14399 rb_id2name(name));
14400 return;
14401 }
14402 shadowing_lvar(name);
14403 dyna_var(name);
14404 }
14405
14406 #ifndef RIPPER
14407 static NODE *
14408 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
14409 {
14410 if (recv && nd_type(recv) == NODE_SELF)
14411 recv = (NODE *)1;
14412 return NEW_ATTRASGN(recv, tASET, idx);
14413 }
14414
14415 static void
14416 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14417 {
14418 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
14419 compile_error(PARSER_ARG "both block arg and actual block given");
14420 }
14421 }
14422
14423 ID
14424 rb_id_attrset(ID id)
14425 {
14426 id &= ~ID_SCOPE_MASK;
14427 id |= ID_ATTRSET;
14428 return id;
14429 }
14430
14431 static NODE *
14432 attrset_gen(struct parser_params *parser, NODE *recv, ID id)
14433 {
14434 if (recv && nd_type(recv) == NODE_SELF)
14435 recv = (NODE *)1;
14436 return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
14437 }
14438
14439 static void
14440 rb_backref_error_gen(struct parser_params *parser, NODE *node)
14441 {
14442 switch (nd_type(node)) {
14443 case NODE_NTH_REF:
14444 compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth);
14445 break;
14446 case NODE_BACK_REF:
14447 compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth);
14448 break;
14449 }
14450 }
14451
14452 static NODE *
14453 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14454 {
14455 if (!node2) return node1;
14456 switch (nd_type(node1)) {
14457 case NODE_BLOCK_PASS:
14458 if (node1->nd_head)
14459 node1->nd_head = arg_concat(node1->nd_head, node2);
14460 else
14461 node1->nd_head = NEW_LIST(node2);
14462 return node1;
14463 case NODE_ARGSPUSH:
14464 if (nd_type(node2) != NODE_ARRAY) break;
14465 node1->nd_body = list_concat(NEW_LIST(node1->nd_body), node2);
14466 nd_set_type(node1, NODE_ARGSCAT);
14467 return node1;
14468 case NODE_ARGSCAT:
14469 if (nd_type(node2) != NODE_ARRAY ||
14470 nd_type(node1->nd_body) != NODE_ARRAY) break;
14471 node1->nd_body = list_concat(node1->nd_body, node2);
14472 return node1;
14473 }
14474 return NEW_ARGSCAT(node1, node2);
14475 }
14476
14477 static NODE *
14478 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2)
14479 {
14480 if (!node1) return NEW_LIST(node2);
14481 switch (nd_type(node1)) {
14482 case NODE_ARRAY:
14483 return list_append(node1, node2);
14484 case NODE_BLOCK_PASS:
14485 node1->nd_head = arg_append(node1->nd_head, node2);
14486 return node1;
14487 case NODE_ARGSPUSH:
14488 node1->nd_body = list_append(NEW_LIST(node1->nd_body), node2);
14489 nd_set_type(node1, NODE_ARGSCAT);
14490 return node1;
14491 }
14492 return NEW_ARGSPUSH(node1, node2);
14493 }
14494
14495 static NODE *
14496 splat_array(NODE* node)
14497 {
14498 if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
14499 if (nd_type(node) == NODE_ARRAY) return node;
14500 return 0;
14501 }
14502
14503 static NODE *
14504 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
14505 {
14506 if (!lhs) return 0;
14507
14508 switch (nd_type(lhs)) {
14509 case NODE_GASGN:
14510 case NODE_IASGN:
14511 case NODE_IASGN2:
14512 case NODE_LASGN:
14513 case NODE_DASGN:
14514 case NODE_DASGN_CURR:
14515 case NODE_MASGN:
14516 case NODE_CDECL:
14517 case NODE_CVASGN:
14518 lhs->nd_value = rhs;
14519 break;
14520
14521 case NODE_ATTRASGN:
14522 case NODE_CALL:
14523 lhs->nd_args = arg_append(lhs->nd_args, rhs);
14524 break;
14525
14526 default:
14527
14528 break;
14529 }
14530
14531 return lhs;
14532 }
14533
14534 static int
14535 value_expr_gen(struct parser_params *parser, NODE *node)
14536 {
14537 int cond = 0;
14538
14539 if (!node) {
14540 rb_warning0("empty expression");
14541 }
14542 while (node) {
14543 switch (nd_type(node)) {
14544 case NODE_DEFN:
14545 case NODE_DEFS:
14546 parser_warning(node, "void value expression");
14547 return FALSE;
14548
14549 case NODE_RETURN:
14550 case NODE_BREAK:
14551 case NODE_NEXT:
14552 case NODE_REDO:
14553 case NODE_RETRY:
14554 if (!cond) yyerror("void value expression");
14555
14556 return FALSE;
14557
14558 case NODE_BLOCK:
14559 while (node->nd_next) {
14560 node = node->nd_next;
14561 }
14562 node = node->nd_head;
14563 break;
14564
14565 case NODE_BEGIN:
14566 node = node->nd_body;
14567 break;
14568
14569 case NODE_IF:
14570 if (!node->nd_body) {
14571 node = node->nd_else;
14572 break;
14573 }
14574 else if (!node->nd_else) {
14575 node = node->nd_body;
14576 break;
14577 }
14578 if (!value_expr(node->nd_body)) return FALSE;
14579 node = node->nd_else;
14580 break;
14581
14582 case NODE_AND:
14583 case NODE_OR:
14584 cond = 1;
14585 node = node->nd_2nd;
14586 break;
14587
14588 default:
14589 return TRUE;
14590 }
14591 }
14592
14593 return TRUE;
14594 }
14595
14596 static void
14597 void_expr_gen(struct parser_params *parser, NODE *node)
14598 {
14599 const char *useless = 0;
14600
14601 if (!RTEST(ruby_verbose)) return;
14602
14603 if (!node) return;
14604 switch (nd_type(node)) {
14605 case NODE_CALL:
14606 switch (node->nd_mid) {
14607 case '+':
14608 case '-':
14609 case '*':
14610 case '/':
14611 case '%':
14612 case tPOW:
14613 case tUPLUS:
14614 case tUMINUS:
14615 case '|':
14616 case '^':
14617 case '&':
14618 case tCMP:
14619 case '>':
14620 case tGEQ:
14621 case '<':
14622 case tLEQ:
14623 case tEQ:
14624 case tNEQ:
14625 useless = rb_id2name(node->nd_mid);
14626 break;
14627 }
14628 break;
14629
14630 case NODE_LVAR:
14631 case NODE_DVAR:
14632 case NODE_GVAR:
14633 case NODE_IVAR:
14634 case NODE_CVAR:
14635 case NODE_NTH_REF:
14636 case NODE_BACK_REF:
14637 useless = "a variable";
14638 break;
14639 case NODE_CONST:
14640 useless = "a constant";
14641 break;
14642 case NODE_LIT:
14643 case NODE_STR:
14644 case NODE_DSTR:
14645 case NODE_DREGX:
14646 case NODE_DREGX_ONCE:
14647 useless = "a literal";
14648 break;
14649 case NODE_COLON2:
14650 case NODE_COLON3:
14651 useless = "::";
14652 break;
14653 case NODE_DOT2:
14654 useless = "..";
14655 break;
14656 case NODE_DOT3:
14657 useless = "...";
14658 break;
14659 case NODE_SELF:
14660 useless = "self";
14661 break;
14662 case NODE_NIL:
14663 useless = "nil";
14664 break;
14665 case NODE_TRUE:
14666 useless = "true";
14667 break;
14668 case NODE_FALSE:
14669 useless = "false";
14670 break;
14671 case NODE_DEFINED:
14672 useless = "defined?";
14673 break;
14674 }
14675
14676 if (useless) {
14677 int line = ruby_sourceline;
14678
14679 ruby_sourceline = nd_line(node);
14680 rb_warnS("useless use of %s in void context", useless);
14681 ruby_sourceline = line;
14682 }
14683 }
14684
14685 static void
14686 void_stmts_gen(struct parser_params *parser, NODE *node)
14687 {
14688 if (!RTEST(ruby_verbose)) return;
14689 if (!node) return;
14690 if (nd_type(node) != NODE_BLOCK) return;
14691
14692 for (;;) {
14693 if (!node->nd_next) return;
14694 void_expr0(node->nd_head);
14695 node = node->nd_next;
14696 }
14697 }
14698
14699 static NODE *
14700 remove_begin(NODE *node)
14701 {
14702 NODE **n = &node, *n1 = node;
14703 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
14704 *n = n1 = n1->nd_body;
14705 }
14706 return node;
14707 }
14708
14709 static void
14710 reduce_nodes_gen(struct parser_params *parser, NODE **body)
14711 {
14712 NODE *node = *body;
14713
14714 if (!node) {
14715 *body = NEW_NIL();
14716 return;
14717 }
14718 #define subnodes(n1, n2) \
14719 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
14720 (!node->n2) ? (body = &node->n1, 1) : \
14721 (reduce_nodes(&node->n1), body = &node->n2, 1))
14722
14723 while (node) {
14724 int newline = (int)(node->flags & NODE_FL_NEWLINE);
14725 switch (nd_type(node)) {
14726 end:
14727 case NODE_NIL:
14728 *body = 0;
14729 return;
14730 case NODE_RETURN:
14731 *body = node = node->nd_stts;
14732 if (newline && node) node->flags |= NODE_FL_NEWLINE;
14733 continue;
14734 case NODE_BEGIN:
14735 *body = node = node->nd_body;
14736 if (newline && node) node->flags |= NODE_FL_NEWLINE;
14737 continue;
14738 case NODE_BLOCK:
14739 body = &node->nd_end->nd_head;
14740 break;
14741 case NODE_IF:
14742 if (subnodes(nd_body, nd_else)) break;
14743 return;
14744 case NODE_CASE:
14745 body = &node->nd_body;
14746 break;
14747 case NODE_WHEN:
14748 if (!subnodes(nd_body, nd_next)) goto end;
14749 break;
14750 case NODE_ENSURE:
14751 if (!subnodes(nd_head, nd_resq)) goto end;
14752 break;
14753 case NODE_RESCUE:
14754 if (!subnodes(nd_head, nd_resq)) goto end;
14755 break;
14756 default:
14757 return;
14758 }
14759 node = *body;
14760 if (newline && node) node->flags |= NODE_FL_NEWLINE;
14761 }
14762
14763 #undef subnodes
14764 }
14765
14766 static int
14767 assign_in_cond(struct parser_params *parser, NODE *node)
14768 {
14769 switch (nd_type(node)) {
14770 case NODE_MASGN:
14771 yyerror("multiple assignment in conditional");
14772 return 1;
14773
14774 case NODE_LASGN:
14775 case NODE_DASGN:
14776 case NODE_DASGN_CURR:
14777 case NODE_GASGN:
14778 case NODE_IASGN:
14779 break;
14780
14781 default:
14782 return 0;
14783 }
14784
14785 switch (nd_type(node->nd_value)) {
14786 case NODE_LIT:
14787 case NODE_STR:
14788 case NODE_NIL:
14789 case NODE_TRUE:
14790 case NODE_FALSE:
14791
14792 parser_warn(node->nd_value, "found = in conditional, should be ==");
14793 return 1;
14794
14795 case NODE_DSTR:
14796 case NODE_XSTR:
14797 case NODE_DXSTR:
14798 case NODE_EVSTR:
14799 case NODE_DREGX:
14800 default:
14801 break;
14802 }
14803 return 1;
14804 }
14805
14806 static void
14807 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
14808 {
14809 if (!e_option_supplied(parser)) parser_warn(node, str);
14810 }
14811
14812 static void
14813 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
14814 {
14815 if (!e_option_supplied(parser)) parser_warning(node, str);
14816 }
14817
14818 static void
14819 fixup_nodes(NODE **rootnode)
14820 {
14821 NODE *node, *next, *head;
14822
14823 for (node = *rootnode; node; node = next) {
14824 enum node_type type;
14825 VALUE val;
14826
14827 next = node->nd_next;
14828 head = node->nd_head;
14829 rb_gc_force_recycle((VALUE)node);
14830 *rootnode = next;
14831 switch (type = nd_type(head)) {
14832 case NODE_DOT2:
14833 case NODE_DOT3:
14834 val = rb_range_new(head->nd_beg->nd_lit, head->nd_end->nd_lit,
14835 type == NODE_DOT3);
14836 rb_gc_force_recycle((VALUE)head->nd_beg);
14837 rb_gc_force_recycle((VALUE)head->nd_end);
14838 nd_set_type(head, NODE_LIT);
14839 head->nd_lit = val;
14840 break;
14841 default:
14842 break;
14843 }
14844 }
14845 }
14846
14847 static NODE *cond0(struct parser_params*,NODE*);
14848
14849 static NODE*
14850 range_op(struct parser_params *parser, NODE *node)
14851 {
14852 enum node_type type;
14853
14854 if (node == 0) return 0;
14855
14856 type = nd_type(node);
14857 value_expr(node);
14858 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
14859 warn_unless_e_option(parser, node, "integer literal in conditional range");
14860 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."))));
14861 }
14862 return cond0(parser, node);
14863 }
14864
14865 static int
14866 literal_node(NODE *node)
14867 {
14868 if (!node) return 1;
14869 switch (nd_type(node)) {
14870 case NODE_LIT:
14871 case NODE_STR:
14872 case NODE_DSTR:
14873 case NODE_EVSTR:
14874 case NODE_DREGX:
14875 case NODE_DREGX_ONCE:
14876 case NODE_DSYM:
14877 return 2;
14878 case NODE_TRUE:
14879 case NODE_FALSE:
14880 case NODE_NIL:
14881 return 1;
14882 }
14883 return 0;
14884 }
14885
14886 static NODE*
14887 cond0(struct parser_params *parser, NODE *node)
14888 {
14889 if (node == 0) return 0;
14890 assign_in_cond(parser, node);
14891
14892 switch (nd_type(node)) {
14893 case NODE_DSTR:
14894 case NODE_EVSTR:
14895 case NODE_STR:
14896 rb_warn0("string literal in condition");
14897 break;
14898
14899 case NODE_DREGX:
14900 case NODE_DREGX_ONCE:
14901 warning_unless_e_option(parser, node, "regex literal in condition");
14902 return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
14903
14904 case NODE_AND:
14905 case NODE_OR:
14906 node->nd_1st = cond0(parser, node->nd_1st);
14907 node->nd_2nd = cond0(parser, node->nd_2nd);
14908 break;
14909
14910 case NODE_DOT2:
14911 case NODE_DOT3:
14912 node->nd_beg = range_op(parser, node->nd_beg);
14913 node->nd_end = range_op(parser, node->nd_end);
14914 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
14915 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
14916 if (!e_option_supplied(parser)) {
14917 int b = literal_node(node->nd_beg);
14918 int e = literal_node(node->nd_end);
14919 if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
14920 parser_warn(node, "range literal in condition");
14921 }
14922 }
14923 break;
14924
14925 case NODE_DSYM:
14926 parser_warning(node, "literal in condition");
14927 break;
14928
14929 case NODE_LIT:
14930 if (TYPE(node->nd_lit) == T_REGEXP) {
14931 warn_unless_e_option(parser, node, "regex literal in condition");
14932 nd_set_type(node, NODE_MATCH);
14933 }
14934 else {
14935 parser_warning(node, "literal in condition");
14936 }
14937 default:
14938 break;
14939 }
14940 return node;
14941 }
14942
14943 static NODE*
14944 cond_gen(struct parser_params *parser, NODE *node)
14945 {
14946 if (node == 0) return 0;
14947 return cond0(parser, node);
14948 }
14949
14950 static NODE*
14951 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
14952 {
14953 value_expr(left);
14954 if (left && (enum node_type)nd_type(left) == type) {
14955 NODE *node = left, *second;
14956 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
14957 node = second;
14958 }
14959 node->nd_2nd = NEW_NODE(type, second, right, 0);
14960 return left;
14961 }
14962 return NEW_NODE(type, left, right, 0);
14963 }
14964
14965 static void
14966 no_blockarg(struct parser_params *parser, NODE *node)
14967 {
14968 if (node && nd_type(node) == NODE_BLOCK_PASS) {
14969 compile_error(PARSER_ARG "block argument should not be given");
14970 }
14971 }
14972
14973 static NODE *
14974 ret_args_gen(struct parser_params *parser, NODE *node)
14975 {
14976 if (node) {
14977 no_blockarg(parser, node);
14978 if (nd_type(node) == NODE_ARRAY) {
14979 if (node->nd_next == 0) {
14980 node = node->nd_head;
14981 }
14982 else {
14983 nd_set_type(node, NODE_VALUES);
14984 }
14985 }
14986 }
14987 return node;
14988 }
14989
14990 static NODE *
14991 new_yield_gen(struct parser_params *parser, NODE *node)
14992 {
14993 long state = Qtrue;
14994
14995 if (node) {
14996 no_blockarg(parser, node);
14997 if (node && nd_type(node) == NODE_SPLAT) {
14998 state = Qtrue;
14999 }
15000 }
15001 else {
15002 state = Qfalse;
15003 }
15004 return NEW_YIELD(node, state);
15005 }
15006
15007 static NODE*
15008 negate_lit(NODE *node)
15009 {
15010 switch (TYPE(node->nd_lit)) {
15011 case T_FIXNUM:
15012 node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
15013 break;
15014 case T_BIGNUM:
15015 node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
15016 break;
15017 case T_FLOAT:
15018 RFLOAT(node->nd_lit)->float_value = -RFLOAT_VALUE(node->nd_lit);
15019 break;
15020 default:
15021 break;
15022 }
15023 return node;
15024 }
15025
15026 static NODE *
15027 arg_blk_pass(NODE *node1, NODE *node2)
15028 {
15029 if (node2) {
15030 node2->nd_head = node1;
15031 return node2;
15032 }
15033 return node1;
15034 }
15035
15036 static NODE*
15037 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, ID b)
15038 {
15039 int saved_line = ruby_sourceline;
15040 NODE *node;
15041 NODE *i1, *i2 = 0;
15042
15043 node = NEW_ARGS(m ? m->nd_plen : 0, o);
15044 i1 = m ? m->nd_next : 0;
15045 node->nd_next = NEW_ARGS_AUX(r, b);
15046
15047 if (p) {
15048 i2 = p->nd_next;
15049 node->nd_next->nd_next = NEW_ARGS_AUX(p->nd_pid, p->nd_plen);
15050 }
15051 else if (i1) {
15052 node->nd_next->nd_next = NEW_ARGS_AUX(0, 0);
15053 }
15054 if (i1 || i2) {
15055 node->nd_next->nd_next->nd_next = NEW_NODE(NODE_AND, i1, i2, 0);
15056 }
15057 ruby_sourceline = saved_line;
15058 return node;
15059 }
15060 #endif
15061
15062 static void
15063 local_push_gen(struct parser_params *parser, int inherit_dvars)
15064 {
15065 struct local_vars *local;
15066
15067 local = ALLOC(struct local_vars);
15068 local->prev = lvtbl;
15069 local->args = vtable_alloc(0);
15070 local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
15071 lvtbl = local;
15072 }
15073
15074 static void
15075 local_pop_gen(struct parser_params *parser)
15076 {
15077 struct local_vars *local = lvtbl->prev;
15078 vtable_free(lvtbl->args);
15079 vtable_free(lvtbl->vars);
15080 xfree(lvtbl);
15081 lvtbl = local;
15082 }
15083
15084 #ifndef RIPPER
15085 static ID*
15086 vtable_tblcpy(ID *buf, const struct vtable *src)
15087 {
15088 int i, cnt = vtable_size(src);
15089
15090 if (cnt > 0) {
15091 buf[0] = cnt;
15092 for (i = 0; i < cnt; i++) {
15093 buf[i] = src->tbl[i];
15094 }
15095 return buf;
15096 }
15097 return 0;
15098 }
15099
15100 static ID*
15101 local_tbl_gen(struct parser_params *parser)
15102 {
15103 int cnt = vtable_size(lvtbl->args) + vtable_size(lvtbl->vars);
15104 ID *buf;
15105
15106 if (cnt <= 0) return 0;
15107 buf = ALLOC_N(ID, cnt + 1);
15108 vtable_tblcpy(buf+1, lvtbl->args);
15109 vtable_tblcpy(buf+vtable_size(lvtbl->args)+1, lvtbl->vars);
15110 buf[0] = cnt;
15111 return buf;
15112 }
15113 #endif
15114
15115 static int
15116 arg_var_gen(struct parser_params *parser, ID id)
15117 {
15118 vtable_add(lvtbl->args, id);
15119 return vtable_size(lvtbl->args) - 1;
15120 }
15121
15122 static int
15123 local_var_gen(struct parser_params *parser, ID id)
15124 {
15125 vtable_add(lvtbl->vars, id);
15126 return vtable_size(lvtbl->vars) - 1;
15127 }
15128
15129 static int
15130 local_id_gen(struct parser_params *parser, ID id)
15131 {
15132 struct vtable *vars, *args;
15133
15134 vars = lvtbl->vars;
15135 args = lvtbl->args;
15136
15137 while (vars && POINTER_P(vars->prev)) {
15138 vars = vars->prev;
15139 args = args->prev;
15140 }
15141
15142 if (vars && vars->prev == DVARS_INHERIT) {
15143 return rb_local_defined(id);
15144 }
15145 else {
15146 return (vtable_included(args, id) ||
15147 vtable_included(vars, id));
15148 }
15149 }
15150
15151 static const struct vtable *
15152 dyna_push_gen(struct parser_params *parser)
15153 {
15154 lvtbl->args = vtable_alloc(lvtbl->args);
15155 lvtbl->vars = vtable_alloc(lvtbl->vars);
15156 return lvtbl->args;
15157 }
15158
15159 static void
15160 dyna_pop_1(struct parser_params *parser)
15161 {
15162 struct vtable *tmp;
15163
15164 tmp = lvtbl->args;
15165 lvtbl->args = lvtbl->args->prev;
15166 vtable_free(tmp);
15167 tmp = lvtbl->vars;
15168 lvtbl->vars = lvtbl->vars->prev;
15169 vtable_free(tmp);
15170 }
15171
15172 static void
15173 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
15174 {
15175 while (lvtbl->args != lvargs) {
15176 dyna_pop_1(parser);
15177 if (!lvtbl->args) {
15178 struct local_vars *local = lvtbl->prev;
15179 xfree(lvtbl);
15180 lvtbl = local;
15181 }
15182 }
15183 dyna_pop_1(parser);
15184 }
15185
15186 static int
15187 dyna_in_block_gen(struct parser_params *parser)
15188 {
15189 return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE;
15190 }
15191
15192 static int
15193 dvar_defined_gen(struct parser_params *parser, ID id)
15194 {
15195 struct vtable *vars, *args;
15196
15197 args = lvtbl->args;
15198 vars = lvtbl->vars;
15199
15200 while (POINTER_P(vars)) {
15201 if (vtable_included(args, id)) {
15202 return 1;
15203 }
15204 if (vtable_included(vars, id)) {
15205 return 1;
15206 }
15207 args = args->prev;
15208 vars = vars->prev;
15209 }
15210
15211 if (vars == DVARS_INHERIT) {
15212 return rb_dvar_defined(id);
15213 }
15214
15215 return 0;
15216 }
15217
15218 static int
15219 dvar_curr_gen(struct parser_params *parser, ID id)
15220 {
15221 return (vtable_included(lvtbl->args, id) ||
15222 vtable_included(lvtbl->vars, id));
15223 }
15224
15225 #ifndef RIPPER
15226 VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
15227 VALUE rb_reg_check_preprocess(VALUE);
15228
15229 static void
15230 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options)
15231 {
15232 int c = RE_OPTION_ENCODING_IDX(options);
15233
15234 if (c) {
15235 int opt, idx;
15236 rb_char_to_option_kcode(c, &opt, &idx);
15237 if (idx != ENCODING_GET(str) &&
15238 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
15239 goto error;
15240 }
15241 ENCODING_SET(str, idx);
15242 }
15243 else if (RE_OPTION_ENCODING_NONE(options)) {
15244 if (!ENCODING_IS_ASCII8BIT(str) &&
15245 rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
15246 c = 'n';
15247 goto error;
15248 }
15249 rb_enc_associate(str, rb_ascii8bit_encoding());
15250 }
15251 else if (parser->enc == rb_usascii_encoding()) {
15252 if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
15253
15254 rb_enc_associate(str, rb_usascii_encoding());
15255 }
15256 else {
15257 rb_enc_associate(str, rb_ascii8bit_encoding());
15258 }
15259 }
15260 return;
15261
15262 error:
15263 compile_error(PARSER_ARG
15264 "regexp encoding option '%c' differs from source encoding '%s'",
15265 c, rb_enc_name(rb_enc_get(str)));
15266 }
15267
15268 static int
15269 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options)
15270 {
15271 VALUE err;
15272 reg_fragment_setenc(str, options);
15273 err = rb_reg_check_preprocess(str);
15274 if (err != Qnil) {
15275 err = rb_obj_as_string(err);
15276 compile_error(PARSER_ARG "%s", RSTRING_PTR(err));
15277 RB_GC_GUARD(err);
15278 return 0;
15279 }
15280 return 1;
15281 }
15282
15283 typedef struct {
15284 struct parser_params* parser;
15285 rb_encoding *enc;
15286 NODE *succ_block;
15287 NODE *fail_block;
15288 int num;
15289 } reg_named_capture_assign_t;
15290
15291 static int
15292 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
15293 int back_num, int *back_refs, OnigRegex regex, void *arg0)
15294 {
15295 reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0;
15296 struct parser_params* parser = arg->parser;
15297 rb_encoding *enc = arg->enc;
15298 long len = name_end - name;
15299 const char *s = (const char *)name;
15300 ID var;
15301
15302 arg->num++;
15303
15304 if (arg->succ_block == 0) {
15305 arg->succ_block = NEW_BEGIN(0);
15306 arg->fail_block = NEW_BEGIN(0);
15307 }
15308
15309 if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
15310 (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) ||
15311 !rb_enc_symname2_p(s, len, enc)) {
15312 return ST_CONTINUE;
15313 }
15314 var = rb_intern3(s, len, enc);
15315 if (dvar_defined(var) || local_id(var)) {
15316 rb_warningS("named capture conflicts a local variable - %s",
15317 rb_id2name(var));
15318 }
15319 arg->succ_block = block_append(arg->succ_block,
15320 newline_node(node_assign(assignable(var,0),
15321 NEW_CALL(
15322 gettable(rb_intern("$~")),
15323 idAREF,
15324 NEW_LIST(NEW_LIT(ID2SYM(var))))
15325 )));
15326 arg->fail_block = block_append(arg->fail_block,
15327 newline_node(node_assign(assignable(var,0), NEW_LIT(Qnil))));
15328 return ST_CONTINUE;
15329 }
15330
15331 static NODE *
15332 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, NODE *match)
15333 {
15334 reg_named_capture_assign_t arg;
15335
15336 arg.parser = parser;
15337 arg.enc = rb_enc_get(regexp);
15338 arg.succ_block = 0;
15339 arg.fail_block = 0;
15340 arg.num = 0;
15341 onig_foreach_name(RREGEXP(regexp)->ptr, reg_named_capture_assign_iter, (void*)&arg);
15342
15343 if (arg.num == 0)
15344 return match;
15345
15346 return
15347 block_append(
15348 newline_node(match),
15349 NEW_IF(gettable(rb_intern("$~")),
15350 block_append(
15351 newline_node(arg.succ_block),
15352 newline_node(
15353 NEW_CALL(
15354 gettable(rb_intern("$~")),
15355 rb_intern("begin"),
15356 NEW_LIST(NEW_LIT(INT2FIX(0)))))),
15357 block_append(
15358 newline_node(arg.fail_block),
15359 newline_node(
15360 NEW_LIT(Qnil)))));
15361 }
15362
15363 static VALUE
15364 reg_compile_gen(struct parser_params* parser, VALUE str, int options)
15365 {
15366 VALUE re;
15367 VALUE err;
15368
15369 reg_fragment_setenc(str, options);
15370 err = rb_errinfo();
15371 re = rb_reg_compile(str, options & RE_OPTION_MASK, ruby_sourcefile, ruby_sourceline);
15372 if (NIL_P(re)) {
15373 ID mesg = rb_intern("mesg");
15374 VALUE m = rb_attr_get(rb_errinfo(), mesg);
15375 rb_set_errinfo(err);
15376 if (!NIL_P(err)) {
15377 rb_str_append(rb_str_cat(rb_attr_get(err, mesg), "\n", 1), m);
15378 }
15379 else {
15380 compile_error(PARSER_ARG "%s", RSTRING_PTR(m));
15381 }
15382 return Qnil;
15383 }
15384 return re;
15385 }
15386
15387 void
15388 rb_gc_mark_parser(void)
15389 {
15390 }
15391
15392 NODE*
15393 rb_parser_append_print(VALUE vparser, NODE *node)
15394 {
15395 NODE *prelude = 0;
15396 NODE *scope = node;
15397 struct parser_params *parser;
15398
15399 if (!node) return node;
15400
15401 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15402
15403 node = node->nd_body;
15404
15405 if (nd_type(node) == NODE_PRELUDE) {
15406 prelude = node;
15407 node = node->nd_body;
15408 }
15409
15410 node = block_append(node,
15411 NEW_FCALL(rb_intern("print"),
15412 NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
15413 if (prelude) {
15414 prelude->nd_body = node;
15415 scope->nd_body = prelude;
15416 }
15417 else {
15418 scope->nd_body = node;
15419 }
15420
15421 return scope;
15422 }
15423
15424 NODE *
15425 rb_parser_while_loop(VALUE vparser, NODE *node, int chop, int split)
15426 {
15427 NODE *prelude = 0;
15428 NODE *scope = node;
15429 struct parser_params *parser;
15430
15431 if (!node) return node;
15432
15433 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
15434
15435 node = node->nd_body;
15436
15437 if (nd_type(node) == NODE_PRELUDE) {
15438 prelude = node;
15439 node = node->nd_body;
15440 }
15441 if (split) {
15442 node = block_append(NEW_GASGN(rb_intern("$F"),
15443 NEW_CALL(NEW_GVAR(rb_intern("$_")),
15444 rb_intern("split"), 0)),
15445 node);
15446 }
15447 if (chop) {
15448 node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
15449 rb_intern("chop!"), 0), node);
15450 }
15451
15452 node = NEW_OPT_N(node);
15453
15454 if (prelude) {
15455 prelude->nd_body = node;
15456 scope->nd_body = prelude;
15457 }
15458 else {
15459 scope->nd_body = node;
15460 }
15461
15462 return scope;
15463 }
15464
15465 static const struct {
15466 ID token;
15467 const char *name;
15468 } op_tbl[] = {
15469 {tDOT2, ".."},
15470 {tDOT3, "..."},
15471 {'+', "+(binary)"},
15472 {'-', "-(binary)"},
15473 {tPOW, "**"},
15474 {tUPLUS, "+@"},
15475 {tUMINUS, "-@"},
15476 {tCMP, "<=>"},
15477 {tGEQ, ">="},
15478 {tLEQ, "<="},
15479 {tEQ, "=="},
15480 {tEQQ, "==="},
15481 {tNEQ, "!="},
15482 {tMATCH, "=~"},
15483 {tNMATCH, "!~"},
15484 {tAREF, "[]"},
15485 {tASET, "[]="},
15486 {tLSHFT, "<<"},
15487 {tRSHFT, ">>"},
15488 {tCOLON2, "::"},
15489 };
15490
15491 #define op_tbl_count numberof(op_tbl)
15492
15493 #ifndef ENABLE_SELECTOR_NAMESPACE
15494 #define ENABLE_SELECTOR_NAMESPACE 0
15495 #endif
15496
15497 static struct symbols {
15498 ID last_id;
15499 st_table *sym_id;
15500 st_table *id_str;
15501 #if ENABLE_SELECTOR_NAMESPACE
15502 st_table *ivar2_id;
15503 st_table *id_ivar2;
15504 #endif
15505 VALUE op_sym[tLAST_TOKEN];
15506 } global_symbols = {tLAST_ID};
15507
15508 static const struct st_hash_type symhash = {
15509 rb_str_hash_cmp,
15510 rb_str_hash,
15511 };
15512
15513 #if ENABLE_SELECTOR_NAMESPACE
15514 struct ivar2_key {
15515 ID id;
15516 VALUE klass;
15517 };
15518
15519 static int
15520 ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2)
15521 {
15522 if (key1->id == key2->id && key1->klass == key2->klass) {
15523 return 0;
15524 }
15525 return 1;
15526 }
15527
15528 static int
15529 ivar2_hash(struct ivar2_key *key)
15530 {
15531 return (key->id << 8) ^ (key->klass >> 2);
15532 }
15533
15534 static const struct st_hash_type ivar2_hash_type = {
15535 ivar2_cmp,
15536 ivar2_hash,
15537 };
15538 #endif
15539
15540 void
15541 Init_sym(void)
15542 {
15543 global_symbols.sym_id = st_init_table_with_size(&symhash, 1000);
15544 global_symbols.id_str = st_init_numtable_with_size(1000);
15545 #if ENABLE_SELECTOR_NAMESPACE
15546 global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000);
15547 global_symbols.id_ivar2 = st_init_numtable_with_size(1000);
15548 #endif
15549
15550 Init_id();
15551 }
15552
15553 void
15554 rb_gc_mark_symbols(void)
15555 {
15556 rb_mark_tbl(global_symbols.id_str);
15557 rb_gc_mark_locations(global_symbols.op_sym,
15558 global_symbols.op_sym + tLAST_TOKEN);
15559 }
15560 #endif
15561
15562 static ID
15563 internal_id_gen(struct parser_params *parser)
15564 {
15565 ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars);
15566 id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1;
15567 return ID_INTERNAL | (id << ID_SCOPE_SHIFT);
15568 }
15569
15570 #ifndef RIPPER
15571 static int
15572 is_special_global_name(const char *m, const char *e, rb_encoding *enc)
15573 {
15574 int mb = 0;
15575
15576 if (m >= e) return 0;
15577 switch (*m) {
15578 case '~': case '*': case '$': case '?': case '!': case '@':
15579 case '/': case '\\': case ';': case ',': case '.': case '=':
15580 case ':': case '<': case '>': case '\"':
15581 case '&': case '`': case '\'': case '+':
15582 case '0':
15583 ++m;
15584 break;
15585 case '-':
15586 ++m;
15587 if (m < e && is_identchar(m, e, enc)) {
15588 if (!ISASCII(*m)) mb = 1;
15589 m += rb_enc_mbclen(m, e, enc);
15590 }
15591 break;
15592 default:
15593 if (!rb_enc_isdigit(*m, enc)) return 0;
15594 do {
15595 if (!ISASCII(*m)) mb = 1;
15596 ++m;
15597 } while (m < e && rb_enc_isdigit(*m, enc));
15598 }
15599 return m == e ? mb + 1 : 0;
15600 }
15601
15602 int
15603 rb_symname_p(const char *name)
15604 {
15605 return rb_enc_symname_p(name, rb_ascii8bit_encoding());
15606 }
15607
15608 int
15609 rb_enc_symname_p(const char *name, rb_encoding *enc)
15610 {
15611 return rb_enc_symname2_p(name, strlen(name), enc);
15612 }
15613
15614 int
15615 rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
15616 {
15617 const char *m = name;
15618 const char *e = m + len;
15619 int localid = FALSE;
15620
15621 if (!m) return FALSE;
15622 switch (*m) {
15623 case '\0':
15624 return FALSE;
15625
15626 case '$':
15627 if (is_special_global_name(++m, e, enc)) return TRUE;
15628 goto id;
15629
15630 case '@':
15631 if (*++m == '@') ++m;
15632 goto id;
15633
15634 case '<':
15635 switch (*++m) {
15636 case '<': ++m; break;
15637 case '=': if (*++m == '>') ++m; break;
15638 default: break;
15639 }
15640 break;
15641
15642 case '>':
15643 switch (*++m) {
15644 case '>': case '=': ++m; break;
15645 }
15646 break;
15647
15648 case '=':
15649 switch (*++m) {
15650 case '~': ++m; break;
15651 case '=': if (*++m == '=') ++m; break;
15652 default: return FALSE;
15653 }
15654 break;
15655
15656 case '*':
15657 if (*++m == '*') ++m;
15658 break;
15659
15660 case '+': case '-':
15661 if (*++m == '@') ++m;
15662 break;
15663
15664 case '|': case '^': case '&': case '/': case '%': case '~': case '`':
15665 ++m;
15666 break;
15667
15668 case '[':
15669 if (*++m != ']') return FALSE;
15670 if (*++m == '=') ++m;
15671 break;
15672
15673 case '!':
15674 switch (*++m) {
15675 case '\0': return TRUE;
15676 case '=': case '~': ++m; break;
15677 default: return FALSE;
15678 }
15679 break;
15680
15681 default:
15682 localid = !rb_enc_isupper(*m, enc);
15683 id:
15684 if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m)))
15685 return FALSE;
15686 while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc);
15687 if (localid) {
15688 switch (*m) {
15689 case '!': case '?': case '=': ++m;
15690 }
15691 }
15692 break;
15693 }
15694 return m == e;
15695 }
15696
15697 static ID
15698 register_symid(ID id, const char *name, long len, rb_encoding *enc)
15699 {
15700 VALUE str = rb_enc_str_new(name, len, enc);
15701 OBJ_FREEZE(str);
15702 st_add_direct(global_symbols.sym_id, (st_data_t)str, id);
15703 st_add_direct(global_symbols.id_str, id, (st_data_t)str);
15704 return id;
15705 }
15706
15707 ID
15708 rb_intern3(const char *name, long len, rb_encoding *enc)
15709 {
15710 const char *m = name;
15711 const char *e = m + len;
15712 unsigned char c;
15713 VALUE str;
15714 ID id;
15715 long last;
15716 int mb;
15717 st_data_t data;
15718 struct RString fake_str;
15719 fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE;
15720 fake_str.basic.klass = rb_cString;
15721 fake_str.as.heap.len = len;
15722 fake_str.as.heap.ptr = (char *)name;
15723 fake_str.as.heap.aux.capa = len;
15724 str = (VALUE)&fake_str;
15725 rb_enc_associate(str, enc);
15726
15727 if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) {
15728 rb_raise(rb_eEncodingError, "invalid encoding symbol");
15729 }
15730
15731 if (st_lookup(global_symbols.sym_id, str, &data))
15732 return (ID)data;
15733
15734 if (rb_cString && !rb_enc_asciicompat(enc)) {
15735 id = ID_JUNK;
15736 goto new_id;
15737 }
15738 last = len-1;
15739 id = 0;
15740 switch (*m) {
15741 case '$':
15742 id |= ID_GLOBAL;
15743 if ((mb = is_special_global_name(++m, e, enc)) != 0) {
15744 if (!--mb) enc = rb_ascii8bit_encoding();
15745 goto new_id;
15746 }
15747 break;
15748 case '@':
15749 if (m[1] == '@') {
15750 m++;
15751 id |= ID_CLASS;
15752 }
15753 else {
15754 id |= ID_INSTANCE;
15755 }
15756 m++;
15757 break;
15758 default:
15759 c = m[0];
15760 if (c != '_' && rb_enc_isascii(c, enc) && rb_enc_ispunct(c, enc)) {
15761
15762 int i;
15763
15764 if (len == 1) {
15765 id = c;
15766 goto id_register;
15767 }
15768 for (i = 0; i < op_tbl_count; i++) {
15769 if (*op_tbl[i].name == *m &&
15770 strcmp(op_tbl[i].name, m) == 0) {
15771 id = op_tbl[i].token;
15772 goto id_register;
15773 }
15774 }
15775 }
15776
15777 if (m[last] == '=') {
15778
15779 id = rb_intern3(name, last, enc);
15780 if (id > tLAST_TOKEN && !is_attrset_id(id)) {
15781 enc = rb_enc_get(rb_id2str(id));
15782 id = rb_id_attrset(id);
15783 goto id_register;
15784 }
15785 id = ID_ATTRSET;
15786 }
15787 else if (rb_enc_isupper(m[0], enc)) {
15788 id = ID_CONST;
15789 }
15790 else {
15791 id = ID_LOCAL;
15792 }
15793 break;
15794 }
15795 mb = 0;
15796 if (!rb_enc_isdigit(*m, enc)) {
15797 while (m <= name + last && is_identchar(m, e, enc)) {
15798 if (ISASCII(*m)) {
15799 m++;
15800 }
15801 else {
15802 mb = 1;
15803 m += rb_enc_mbclen(m, e, enc);
15804 }
15805 }
15806 }
15807 if (m - name < len) id = ID_JUNK;
15808 if (enc != rb_usascii_encoding()) {
15809
15810
15811
15812
15813 if (!mb) {
15814 for (; m <= name + len; ++m) {
15815 if (!ISASCII(*m)) goto mbstr;
15816 }
15817 enc = rb_usascii_encoding();
15818 }
15819 mbstr:;
15820 }
15821 new_id:
15822 if (global_symbols.last_id >= ~(ID)0 >> (ID_SCOPE_SHIFT+RUBY_SPECIAL_SHIFT)) {
15823 if (len > 20) {
15824 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.20s...)",
15825 name);
15826 }
15827 else {
15828 rb_raise(rb_eRuntimeError, "symbol table overflow (symbol %.*s)",
15829 (int)len, name);
15830 }
15831 }
15832 id |= ++global_symbols.last_id << ID_SCOPE_SHIFT;
15833 id_register:
15834 return register_symid(id, name, len, enc);
15835 }
15836
15837 ID
15838 rb_intern2(const char *name, long len)
15839 {
15840 return rb_intern3(name, len, rb_usascii_encoding());
15841 }
15842
15843 #undef rb_intern
15844 ID
15845 rb_intern(const char *name)
15846 {
15847 return rb_intern2(name, strlen(name));
15848 }
15849
15850 ID
15851 rb_intern_str(VALUE str)
15852 {
15853 rb_encoding *enc;
15854 ID id;
15855
15856 if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) {
15857 enc = rb_usascii_encoding();
15858 }
15859 else {
15860 enc = rb_enc_get(str);
15861 }
15862 id = rb_intern3(RSTRING_PTR(str), RSTRING_LEN(str), enc);
15863 RB_GC_GUARD(str);
15864 return id;
15865 }
15866
15867 VALUE
15868 rb_id2str(ID id)
15869 {
15870 st_data_t data;
15871
15872 if (id < tLAST_TOKEN) {
15873 int i = 0;
15874
15875 if (id < INT_MAX && rb_ispunct((int)id)) {
15876 VALUE str = global_symbols.op_sym[i = (int)id];
15877 if (!str) {
15878 char name[2];
15879 name[0] = (char)id;
15880 name[1] = 0;
15881 str = rb_usascii_str_new(name, 1);
15882 OBJ_FREEZE(str);
15883 global_symbols.op_sym[i] = str;
15884 }
15885 return str;
15886 }
15887 for (i = 0; i < op_tbl_count; i++) {
15888 if (op_tbl[i].token == id) {
15889 VALUE str = global_symbols.op_sym[i];
15890 if (!str) {
15891 str = rb_usascii_str_new2(op_tbl[i].name);
15892 OBJ_FREEZE(str);
15893 global_symbols.op_sym[i] = str;
15894 }
15895 return str;
15896 }
15897 }
15898 }
15899
15900 if (st_lookup(global_symbols.id_str, id, &data)) {
15901 VALUE str = (VALUE)data;
15902 if (RBASIC(str)->klass == 0)
15903 RBASIC(str)->klass = rb_cString;
15904 return str;
15905 }
15906
15907 if (is_attrset_id(id)) {
15908 ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
15909 VALUE str;
15910
15911 while (!(str = rb_id2str(id2))) {
15912 if (!is_local_id(id2)) return 0;
15913 id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
15914 }
15915 str = rb_str_dup(str);
15916 rb_str_cat(str, "=", 1);
15917 rb_intern_str(str);
15918 if (st_lookup(global_symbols.id_str, id, &data)) {
15919 VALUE str = (VALUE)data;
15920 if (RBASIC(str)->klass == 0)
15921 RBASIC(str)->klass = rb_cString;
15922 return str;
15923 }
15924 }
15925 return 0;
15926 }
15927
15928 const char *
15929 rb_id2name(ID id)
15930 {
15931 VALUE str = rb_id2str(id);
15932
15933 if (!str) return 0;
15934 return RSTRING_PTR(str);
15935 }
15936
15937 static int
15938 symbols_i(VALUE sym, ID value, VALUE ary)
15939 {
15940 rb_ary_push(ary, ID2SYM(value));
15941 return ST_CONTINUE;
15942 }
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960 VALUE
15961 rb_sym_all_symbols(void)
15962 {
15963 VALUE ary = rb_ary_new2(global_symbols.sym_id->num_entries);
15964
15965 st_foreach(global_symbols.sym_id, symbols_i, ary);
15966 return ary;
15967 }
15968
15969 int
15970 rb_is_const_id(ID id)
15971 {
15972 return is_const_id(id);
15973 }
15974
15975 int
15976 rb_is_class_id(ID id)
15977 {
15978 return is_class_id(id);
15979 }
15980
15981 int
15982 rb_is_instance_id(ID id)
15983 {
15984 return is_instance_id(id);
15985 }
15986
15987 int
15988 rb_is_local_id(ID id)
15989 {
15990 return is_local_id(id);
15991 }
15992
15993 int
15994 rb_is_junk_id(ID id)
15995 {
15996 return is_junk_id(id);
15997 }
15998
15999 #endif
16000
16001 static void
16002 parser_initialize(struct parser_params *parser)
16003 {
16004 parser->eofp = Qfalse;
16005
16006 parser->parser_lex_strterm = 0;
16007 parser->parser_cond_stack = 0;
16008 parser->parser_cmdarg_stack = 0;
16009 parser->parser_class_nest = 0;
16010 parser->parser_paren_nest = 0;
16011 parser->parser_lpar_beg = 0;
16012 parser->parser_in_single = 0;
16013 parser->parser_in_def = 0;
16014 parser->parser_in_defined = 0;
16015 parser->parser_compile_for_eval = 0;
16016 parser->parser_cur_mid = 0;
16017 parser->parser_tokenbuf = NULL;
16018 parser->parser_tokidx = 0;
16019 parser->parser_toksiz = 0;
16020 parser->parser_heredoc_end = 0;
16021 parser->parser_command_start = TRUE;
16022 parser->parser_deferred_nodes = 0;
16023 parser->parser_lex_pbeg = 0;
16024 parser->parser_lex_p = 0;
16025 parser->parser_lex_pend = 0;
16026 parser->parser_lvtbl = 0;
16027 parser->parser_ruby__end__seen = 0;
16028 parser->parser_ruby_sourcefile = 0;
16029 #ifndef RIPPER
16030 parser->is_ripper = 0;
16031 parser->parser_eval_tree_begin = 0;
16032 parser->parser_eval_tree = 0;
16033 #else
16034 parser->is_ripper = 1;
16035 parser->parser_ruby_sourcefile_string = Qnil;
16036 parser->delayed = Qnil;
16037
16038 parser->result = Qnil;
16039 parser->parsing_thread = Qnil;
16040 parser->toplevel_p = TRUE;
16041 #endif
16042 #ifdef YYMALLOC
16043 parser->heap = NULL;
16044 #endif
16045 parser->enc = rb_usascii_encoding();
16046 }
16047
16048 #ifdef RIPPER
16049 #define parser_mark ripper_parser_mark
16050 #define parser_free ripper_parser_free
16051 #endif
16052
16053 static void
16054 parser_mark(void *ptr)
16055 {
16056 struct parser_params *p = (struct parser_params*)ptr;
16057
16058 rb_gc_mark((VALUE)p->parser_lex_strterm);
16059 rb_gc_mark((VALUE)p->parser_deferred_nodes);
16060 rb_gc_mark(p->parser_lex_input);
16061 rb_gc_mark(p->parser_lex_lastline);
16062 rb_gc_mark(p->parser_lex_nextline);
16063 #ifndef RIPPER
16064 rb_gc_mark((VALUE)p->parser_eval_tree_begin) ;
16065 rb_gc_mark((VALUE)p->parser_eval_tree) ;
16066 rb_gc_mark(p->debug_lines);
16067 #else
16068 rb_gc_mark(p->parser_ruby_sourcefile_string);
16069 rb_gc_mark(p->delayed);
16070 rb_gc_mark(p->value);
16071 rb_gc_mark(p->result);
16072 rb_gc_mark(p->parsing_thread);
16073 #endif
16074 #ifdef YYMALLOC
16075 rb_gc_mark((VALUE)p->heap);
16076 #endif
16077 }
16078
16079 static void
16080 parser_free(void *ptr)
16081 {
16082 struct parser_params *p = (struct parser_params*)ptr;
16083 struct local_vars *local, *prev;
16084
16085 if (p->parser_tokenbuf) {
16086 xfree(p->parser_tokenbuf);
16087 }
16088 for (local = p->parser_lvtbl; local; local = prev) {
16089 if (local->vars) xfree(local->vars);
16090 prev = local->prev;
16091 xfree(local);
16092 }
16093 #ifndef RIPPER
16094 xfree(p->parser_ruby_sourcefile);
16095 #endif
16096 xfree(p);
16097 }
16098
16099 static size_t
16100 parser_memsize(const void *ptr)
16101 {
16102 struct parser_params *p = (struct parser_params*)ptr;
16103 struct local_vars *local;
16104 size_t size = sizeof(*p);
16105
16106 if (!ptr) return 0;
16107 size += p->parser_toksiz;
16108 for (local = p->parser_lvtbl; local; local = local->prev) {
16109 size += sizeof(*local);
16110 if (local->vars) size += local->vars->capa * sizeof(ID);
16111 }
16112 #ifndef RIPPER
16113 if (p->parser_ruby_sourcefile) {
16114 size += strlen(p->parser_ruby_sourcefile) + 1;
16115 }
16116 #endif
16117 return size;
16118 }
16119
16120 static const rb_data_type_t parser_data_type = {
16121 "parser",
16122 parser_mark,
16123 parser_free,
16124 parser_memsize,
16125 };
16126
16127 VALUE rb_parser_get_yydebug(VALUE);
16128 VALUE rb_parser_set_yydebug(VALUE, VALUE);
16129
16130 #ifndef RIPPER
16131 #undef rb_reserved_word
16132
16133 const struct kwtable *
16134 rb_reserved_word(const char *str, unsigned int len)
16135 {
16136 return reserved_word(str, len);
16137 }
16138
16139 static struct parser_params *
16140 parser_new(void)
16141 {
16142 struct parser_params *p;
16143
16144 p = ALLOC_N(struct parser_params, 1);
16145 MEMZERO(p, struct parser_params, 1);
16146 parser_initialize(p);
16147 return p;
16148 }
16149
16150 VALUE
16151 rb_parser_new(void)
16152 {
16153 struct parser_params *p = parser_new();
16154
16155 return TypedData_Wrap_Struct(0, &parser_data_type, p);
16156 }
16157
16158
16159
16160
16161
16162
16163
16164
16165 VALUE
16166 rb_parser_end_seen_p(VALUE vparser)
16167 {
16168 struct parser_params *parser;
16169
16170 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
16171 return ruby__end__seen ? Qtrue : Qfalse;
16172 }
16173
16174
16175
16176
16177
16178
16179
16180 VALUE
16181 rb_parser_encoding(VALUE vparser)
16182 {
16183 struct parser_params *parser;
16184
16185 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
16186 return rb_enc_from_encoding(parser->enc);
16187 }
16188
16189
16190
16191
16192
16193
16194
16195 VALUE
16196 rb_parser_get_yydebug(VALUE self)
16197 {
16198 struct parser_params *parser;
16199
16200 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16201 return yydebug ? Qtrue : Qfalse;
16202 }
16203
16204
16205
16206
16207
16208
16209
16210 VALUE
16211 rb_parser_set_yydebug(VALUE self, VALUE flag)
16212 {
16213 struct parser_params *parser;
16214
16215 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16216 yydebug = RTEST(flag);
16217 return flag;
16218 }
16219
16220 #ifdef YYMALLOC
16221 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
16222 #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parser->heap, 0)
16223 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->u1.node = (p), \
16224 (n)->u3.cnt = (c), (p))
16225
16226 void *
16227 rb_parser_malloc(struct parser_params *parser, size_t size)
16228 {
16229 size_t cnt = HEAPCNT(1, size);
16230 NODE *n = NEWHEAP();
16231 void *ptr = xmalloc(size);
16232
16233 return ADD2HEAP(n, cnt, ptr);
16234 }
16235
16236 void *
16237 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
16238 {
16239 size_t cnt = HEAPCNT(nelem, size);
16240 NODE *n = NEWHEAP();
16241 void *ptr = xcalloc(nelem, size);
16242
16243 return ADD2HEAP(n, cnt, ptr);
16244 }
16245
16246 void *
16247 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
16248 {
16249 NODE *n;
16250 size_t cnt = HEAPCNT(1, size);
16251
16252 if (ptr && (n = parser->heap) != NULL) {
16253 do {
16254 if (n->u1.node == ptr) {
16255 n->u1.node = ptr = xrealloc(ptr, size);
16256 if (n->u3.cnt) n->u3.cnt = cnt;
16257 return ptr;
16258 }
16259 } while ((n = n->u2.node) != NULL);
16260 }
16261 n = NEWHEAP();
16262 ptr = xrealloc(ptr, size);
16263 return ADD2HEAP(n, cnt, ptr);
16264 }
16265
16266 void
16267 rb_parser_free(struct parser_params *parser, void *ptr)
16268 {
16269 NODE **prev = &parser->heap, *n;
16270
16271 while ((n = *prev) != NULL) {
16272 if (n->u1.node == ptr) {
16273 *prev = n->u2.node;
16274 rb_gc_force_recycle((VALUE)n);
16275 break;
16276 }
16277 prev = &n->u2.node;
16278 }
16279 xfree(ptr);
16280 }
16281 #endif
16282 #endif
16283
16284 #ifdef RIPPER
16285 #ifdef RIPPER_DEBUG
16286 extern int rb_is_pointer_to_heap(VALUE);
16287
16288
16289 static VALUE
16290 ripper_validate_object(VALUE self, VALUE x)
16291 {
16292 if (x == Qfalse) return x;
16293 if (x == Qtrue) return x;
16294 if (x == Qnil) return x;
16295 if (x == Qundef)
16296 rb_raise(rb_eArgError, "Qundef given");
16297 if (FIXNUM_P(x)) return x;
16298 if (SYMBOL_P(x)) return x;
16299 if (!rb_is_pointer_to_heap(x))
16300 rb_raise(rb_eArgError, "invalid pointer: %p", x);
16301 switch (TYPE(x)) {
16302 case T_STRING:
16303 case T_OBJECT:
16304 case T_ARRAY:
16305 case T_BIGNUM:
16306 case T_FLOAT:
16307 return x;
16308 case T_NODE:
16309 if (nd_type(x) != NODE_LASGN) {
16310 rb_raise(rb_eArgError, "NODE given: %p", x);
16311 }
16312 return ((NODE *)x)->nd_rval;
16313 default:
16314 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
16315 x, rb_obj_classname(x));
16316 }
16317 return x;
16318 }
16319 #endif
16320
16321 #define validate(x) (x = get_value(x))
16322
16323 static VALUE
16324 ripper_dispatch0(struct parser_params *parser, ID mid)
16325 {
16326 return rb_funcall(parser->value, mid, 0);
16327 }
16328
16329 static VALUE
16330 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
16331 {
16332 validate(a);
16333 return rb_funcall(parser->value, mid, 1, a);
16334 }
16335
16336 static VALUE
16337 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
16338 {
16339 validate(a);
16340 validate(b);
16341 return rb_funcall(parser->value, mid, 2, a, b);
16342 }
16343
16344 static VALUE
16345 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
16346 {
16347 validate(a);
16348 validate(b);
16349 validate(c);
16350 return rb_funcall(parser->value, mid, 3, a, b, c);
16351 }
16352
16353 static VALUE
16354 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
16355 {
16356 validate(a);
16357 validate(b);
16358 validate(c);
16359 validate(d);
16360 return rb_funcall(parser->value, mid, 4, a, b, c, d);
16361 }
16362
16363 static VALUE
16364 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
16365 {
16366 validate(a);
16367 validate(b);
16368 validate(c);
16369 validate(d);
16370 validate(e);
16371 return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
16372 }
16373
16374 static const struct kw_assoc {
16375 ID id;
16376 const char *name;
16377 } keyword_to_name[] = {
16378 {keyword_class, "class"},
16379 {keyword_module, "module"},
16380 {keyword_def, "def"},
16381 {keyword_undef, "undef"},
16382 {keyword_begin, "begin"},
16383 {keyword_rescue, "rescue"},
16384 {keyword_ensure, "ensure"},
16385 {keyword_end, "end"},
16386 {keyword_if, "if"},
16387 {keyword_unless, "unless"},
16388 {keyword_then, "then"},
16389 {keyword_elsif, "elsif"},
16390 {keyword_else, "else"},
16391 {keyword_case, "case"},
16392 {keyword_when, "when"},
16393 {keyword_while, "while"},
16394 {keyword_until, "until"},
16395 {keyword_for, "for"},
16396 {keyword_break, "break"},
16397 {keyword_next, "next"},
16398 {keyword_redo, "redo"},
16399 {keyword_retry, "retry"},
16400 {keyword_in, "in"},
16401 {keyword_do, "do"},
16402 {keyword_do_cond, "do"},
16403 {keyword_do_block, "do"},
16404 {keyword_return, "return"},
16405 {keyword_yield, "yield"},
16406 {keyword_super, "super"},
16407 {keyword_self, "self"},
16408 {keyword_nil, "nil"},
16409 {keyword_true, "true"},
16410 {keyword_false, "false"},
16411 {keyword_and, "and"},
16412 {keyword_or, "or"},
16413 {keyword_not, "not"},
16414 {modifier_if, "if"},
16415 {modifier_unless, "unless"},
16416 {modifier_while, "while"},
16417 {modifier_until, "until"},
16418 {modifier_rescue, "rescue"},
16419 {keyword_alias, "alias"},
16420 {keyword_defined, "defined?"},
16421 {keyword_BEGIN, "BEGIN"},
16422 {keyword_END, "END"},
16423 {keyword__LINE__, "__LINE__"},
16424 {keyword__FILE__, "__FILE__"},
16425 {keyword__ENCODING__, "__ENCODING__"},
16426 {0, NULL}
16427 };
16428
16429 static const char*
16430 keyword_id_to_str(ID id)
16431 {
16432 const struct kw_assoc *a;
16433
16434 for (a = keyword_to_name; a->id; a++) {
16435 if (a->id == id)
16436 return a->name;
16437 }
16438 return NULL;
16439 }
16440
16441 #undef ripper_id2sym
16442 static VALUE
16443 ripper_id2sym(ID id)
16444 {
16445 const char *name;
16446 char buf[8];
16447
16448 if (id <= 256) {
16449 buf[0] = (char)id;
16450 buf[1] = '\0';
16451 return ID2SYM(rb_intern2(buf, 1));
16452 }
16453 if ((name = keyword_id_to_str(id))) {
16454 return ID2SYM(rb_intern(name));
16455 }
16456 switch (id) {
16457 case tOROP:
16458 name = "||";
16459 break;
16460 case tANDOP:
16461 name = "&&";
16462 break;
16463 default:
16464 name = rb_id2name(id);
16465 if (!name) {
16466 rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
16467 }
16468 return ID2SYM(id);
16469 }
16470 return ID2SYM(rb_intern(name));
16471 }
16472
16473 static ID
16474 ripper_get_id(VALUE v)
16475 {
16476 NODE *nd;
16477 if (!RB_TYPE_P(v, T_NODE)) return 0;
16478 nd = (NODE *)v;
16479 if (nd_type(nd) != NODE_LASGN) return 0;
16480 return nd->nd_vid;
16481 }
16482
16483 static VALUE
16484 ripper_get_value(VALUE v)
16485 {
16486 NODE *nd;
16487 if (v == Qundef) return Qnil;
16488 if (!RB_TYPE_P(v, T_NODE)) return v;
16489 nd = (NODE *)v;
16490 if (nd_type(nd) != NODE_LASGN) return Qnil;
16491 return nd->nd_rval;
16492 }
16493
16494 static void
16495 ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
16496 {
16497 VALUE str;
16498 va_list args;
16499
16500 va_start(args, fmt);
16501 str = rb_vsprintf(fmt, args);
16502 va_end(args);
16503 rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
16504 }
16505
16506 static void
16507 ripper_warn0(struct parser_params *parser, const char *fmt)
16508 {
16509 rb_funcall(parser->value, rb_intern("warn"), 1, STR_NEW2(fmt));
16510 }
16511
16512 static void
16513 ripper_warnI(struct parser_params *parser, const char *fmt, int a)
16514 {
16515 rb_funcall(parser->value, rb_intern("warn"), 2,
16516 STR_NEW2(fmt), INT2NUM(a));
16517 }
16518
16519 #if 0
16520 static void
16521 ripper_warnS(struct parser_params *parser, const char *fmt, const char *str)
16522 {
16523 rb_funcall(parser->value, rb_intern("warn"), 2,
16524 STR_NEW2(fmt), STR_NEW2(str));
16525 }
16526 #endif
16527
16528 static void
16529 ripper_warning0(struct parser_params *parser, const char *fmt)
16530 {
16531 rb_funcall(parser->value, rb_intern("warning"), 1, STR_NEW2(fmt));
16532 }
16533
16534 static void
16535 ripper_warningS(struct parser_params *parser, const char *fmt, const char *str)
16536 {
16537 rb_funcall(parser->value, rb_intern("warning"), 2,
16538 STR_NEW2(fmt), STR_NEW2(str));
16539 }
16540
16541 static VALUE
16542 ripper_lex_get_generic(struct parser_params *parser, VALUE src)
16543 {
16544 return rb_funcall(src, ripper_id_gets, 0);
16545 }
16546
16547 static VALUE
16548 ripper_s_allocate(VALUE klass)
16549 {
16550 struct parser_params *p;
16551 VALUE self;
16552
16553 p = ALLOC_N(struct parser_params, 1);
16554 MEMZERO(p, struct parser_params, 1);
16555 self = TypedData_Wrap_Struct(klass, &parser_data_type, p);
16556 p->value = self;
16557 return self;
16558 }
16559
16560 #define ripper_initialized_p(r) ((r)->parser_lex_input != 0)
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572 static VALUE
16573 ripper_initialize(int argc, VALUE *argv, VALUE self)
16574 {
16575 struct parser_params *parser;
16576 VALUE src, fname, lineno;
16577
16578 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16579 rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
16580 if (rb_obj_respond_to(src, ripper_id_gets, 0)) {
16581 parser->parser_lex_gets = ripper_lex_get_generic;
16582 }
16583 else {
16584 StringValue(src);
16585 parser->parser_lex_gets = lex_get_str;
16586 }
16587 parser->parser_lex_input = src;
16588 parser->eofp = Qfalse;
16589 if (NIL_P(fname)) {
16590 fname = STR_NEW2("(ripper)");
16591 }
16592 else {
16593 StringValue(fname);
16594 }
16595 parser_initialize(parser);
16596
16597 parser->parser_ruby_sourcefile_string = fname;
16598 parser->parser_ruby_sourcefile = RSTRING_PTR(fname);
16599 parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
16600
16601 return Qnil;
16602 }
16603
16604 extern VALUE rb_thread_pass(void);
16605
16606 struct ripper_args {
16607 struct parser_params *parser;
16608 int argc;
16609 VALUE *argv;
16610 };
16611
16612 static VALUE
16613 ripper_parse0(VALUE parser_v)
16614 {
16615 struct parser_params *parser;
16616
16617 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16618 parser_prepare(parser);
16619 ripper_yyparse((void*)parser);
16620 return parser->result;
16621 }
16622
16623 static VALUE
16624 ripper_ensure(VALUE parser_v)
16625 {
16626 struct parser_params *parser;
16627
16628 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
16629 parser->parsing_thread = Qnil;
16630 return Qnil;
16631 }
16632
16633
16634
16635
16636
16637
16638
16639 static VALUE
16640 ripper_parse(VALUE self)
16641 {
16642 struct parser_params *parser;
16643
16644 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16645 if (!ripper_initialized_p(parser)) {
16646 rb_raise(rb_eArgError, "method called for uninitialized object");
16647 }
16648 if (!NIL_P(parser->parsing_thread)) {
16649 if (parser->parsing_thread == rb_thread_current())
16650 rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
16651 else
16652 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
16653 }
16654 parser->parsing_thread = rb_thread_current();
16655 rb_ensure(ripper_parse0, self, ripper_ensure, self);
16656
16657 return parser->result;
16658 }
16659
16660
16661
16662
16663
16664
16665
16666
16667 static VALUE
16668 ripper_column(VALUE self)
16669 {
16670 struct parser_params *parser;
16671 long col;
16672
16673 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16674 if (!ripper_initialized_p(parser)) {
16675 rb_raise(rb_eArgError, "method called for uninitialized object");
16676 }
16677 if (NIL_P(parser->parsing_thread)) return Qnil;
16678 col = parser->tokp - parser->parser_lex_pbeg;
16679 return LONG2NUM(col);
16680 }
16681
16682
16683
16684
16685
16686
16687
16688 static VALUE
16689 ripper_filename(VALUE self)
16690 {
16691 struct parser_params *parser;
16692
16693 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16694 if (!ripper_initialized_p(parser)) {
16695 rb_raise(rb_eArgError, "method called for uninitialized object");
16696 }
16697 return parser->parser_ruby_sourcefile_string;
16698 }
16699
16700
16701
16702
16703
16704
16705
16706
16707 static VALUE
16708 ripper_lineno(VALUE self)
16709 {
16710 struct parser_params *parser;
16711
16712 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
16713 if (!ripper_initialized_p(parser)) {
16714 rb_raise(rb_eArgError, "method called for uninitialized object");
16715 }
16716 if (NIL_P(parser->parsing_thread)) return Qnil;
16717 return INT2NUM(parser->parser_ruby_sourceline);
16718 }
16719
16720 #ifdef RIPPER_DEBUG
16721
16722 static VALUE
16723 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
16724 {
16725 StringValue(msg);
16726 if (obj == Qundef) {
16727 rb_raise(rb_eArgError, "%s", RSTRING_PTR(msg));
16728 }
16729 return Qnil;
16730 }
16731
16732
16733 static VALUE
16734 ripper_value(VALUE self, VALUE obj)
16735 {
16736 return ULONG2NUM(obj);
16737 }
16738 #endif
16739
16740 void
16741 Init_ripper(void)
16742 {
16743 VALUE Ripper;
16744
16745 Ripper = rb_define_class("Ripper", rb_cObject);
16746 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
16747 rb_define_alloc_func(Ripper, ripper_s_allocate);
16748 rb_define_method(Ripper, "initialize", ripper_initialize, -1);
16749 rb_define_method(Ripper, "parse", ripper_parse, 0);
16750 rb_define_method(Ripper, "column", ripper_column, 0);
16751 rb_define_method(Ripper, "filename", ripper_filename, 0);
16752 rb_define_method(Ripper, "lineno", ripper_lineno, 0);
16753 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
16754 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
16755 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
16756 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
16757 #ifdef RIPPER_DEBUG
16758 rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
16759 rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
16760 rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
16761 #endif
16762
16763 ripper_id_gets = rb_intern("gets");
16764 ripper_init_eventids1(Ripper);
16765 ripper_init_eventids2(Ripper);
16766
16767 rb_intern("||");
16768 rb_intern("&&");
16769 }
16770 #endif
16771
16772